rn-inspector 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,15 +1,163 @@
1
- # rn-inspector
1
+ # rn-inspector CLI
2
2
 
3
- Single command starts everything: proxy + UI (served in browser) + Metro attach.
3
+ > **Warning:** All versions **before `0.1.6`** had known issues (especially on macOS). Please upgrade and use the latest version `0.1.6` or newer. We’re sorry for the inconvenience.
4
4
 
5
- ## Install
5
+ `rn-inspector` is a small CLI + Web UI that helps you debug **React Native** apps by:
6
+
7
+ - Proxying **Metro** messages.
8
+ - Attaching to **DevTools** targets (one or many devices/emulators).
9
+ - Streaming **console logs** and **network requests** into a rich, glassy web UI.
10
+
11
+ This package is the CLI entry point that you install globally.
12
+
13
+ ---
14
+
15
+ ## Installation
16
+
17
+ Install globally from npm:
6
18
 
7
19
  ```bash
8
- npm i -g rn-inspector
20
+ npm install -g rn-inspector
9
21
  ```
10
22
 
11
- ## Run
23
+ After installing, the `rn-inspector` command is available in your shell.
24
+
25
+ ---
26
+
27
+ ## Quick start
28
+
29
+ 1. Start your React Native app as usual (Metro running, app open in simulator or device).
30
+ 2. In another terminal, run:
31
+
32
+ ```bash
33
+ rn-inspector
34
+ ```
35
+
36
+ 3. By default this will:
37
+
38
+ - Connect to **Metro** on port `8081`.
39
+ - Start a **WebSocket proxy** for the UI at `ws://localhost:9230/inspector`.
40
+ - Serve the **UI** at `http://localhost:4173`.
41
+ - Auto-discover any available **DevTools targets** (for connected devices/emulators).
42
+
43
+ 4. Open the UI in your browser (or use the `o` keyboard shortcut, see below), pick a device from the header, and start inspecting **Console** and **Network** events.
44
+
45
+ ---
46
+
47
+ ## CLI usage
12
48
 
13
49
  ```bash
14
- rn-inspector --port 8081 # Metro port (default 8081)
15
- ```
50
+ rn-inspector [--port=8081] [--ui-port=4173] [--ui-ws-port=9230] [--devtools-url=ws://...]
51
+ ```
52
+
53
+ ### Options
54
+
55
+ - `--port=<number>`
56
+ - Metro port to connect to.
57
+ - Default: `8081`.
58
+ - This is also affected by the `METRO_PORT` environment variable (see below).
59
+
60
+ - `--ui-port=<number>`
61
+ - HTTP port where the Web UI is served.
62
+ - Default: `4173`.
63
+ - The UI will be available at `http://localhost:<ui-port>`.
64
+
65
+ - `--ui-ws-port=<number>`
66
+ - WebSocket port used between the CLI proxy and the Web UI.
67
+ - Default: `9230`.
68
+ - The UI connects to `ws://localhost:<ui-ws-port>/inspector`.
69
+
70
+ - `--devtools-url=<ws-url>`
71
+ - Explicit DevTools websocket URL to attach to (for advanced usage).
72
+ - If omitted, `rn-inspector` will **auto-discover** DevTools targets via `http://<host>:<port>/json` on a range of ports (starting around the Metro port) and attach to all matching targets.
73
+
74
+ ### Environment variables
75
+
76
+ - `METRO_PORT`
77
+ - If set, this overrides the default Metro port.
78
+ - Equivalent to passing `--port=<METRO_PORT>`.
79
+
80
+ - `RN_INSPECTOR_DEVTOOLS_URL`
81
+ - Default DevTools websocket URL if `--devtools-url` is not provided.
82
+ - Example: `ws://localhost:9229/devtools/page/XXXX-YYYY`.
83
+
84
+ ---
85
+
86
+ ## Multi-device DevTools support
87
+
88
+ `rn-inspector` is designed to work with **multiple React Native targets** at once:
89
+
90
+ - The CLI scans a set of ports (around the Metro port and some common DevTools ports) for `/json` endpoints.
91
+ - For each DevTools target it finds, it:
92
+ - Opens a WebSocket connection.
93
+ - Tags all console and network events with a `deviceId`.
94
+ - The CLI periodically sends a **meta `devices` event** over the UI WebSocket with a list of currently attached devices.
95
+ - The Web UI:
96
+ - Shows a **global device selector** in the header.
97
+ - Filters **Console** and **Network** events by the selected device while still showing Metro-only events.
98
+
99
+ If you prefer to control the DevTools connection manually, you can pass a `--devtools-url` instead of relying on auto-discovery.
100
+
101
+ ---
102
+
103
+ ## Web UI overview
104
+
105
+ When `rn-inspector` is running, the UI is served from:
106
+
107
+ ```text
108
+ http://localhost:<ui-port>
109
+ ```
110
+
111
+ By default this is `http://localhost:4173`.
112
+
113
+ The UI includes:
114
+
115
+ - **Console** page
116
+ - Live console logs from Metro and DevTools.
117
+ - Level filters (log/info/warn/error).
118
+ - Detail drawer with copy-to-clipboard and timestamps.
119
+
120
+ - **Network** page
121
+ - HTTP requests captured via an injected fetch wrapper / DevTools Network domain.
122
+ - Detail drawer with headers, payload, and response preview (including text, JSON, images, and some binary types).
123
+
124
+ - **Header controls**
125
+ - Global **device selector** (backed by the `deviceId` tagging in the CLI).
126
+ - Global **capture toggles** for Console and Network streams.
127
+
128
+ ---
129
+
130
+ ## Keyboard shortcuts (CLI)
131
+
132
+ While `rn-inspector` is running in a TTY, the CLI listens for a few simple shortcuts:
133
+
134
+ - `o` / `O`
135
+ - Open the Web UI in your default browser (using `start` on Windows, `open` on macOS, or `xdg-open` on Linux).
136
+
137
+ - `r` / `R`
138
+ - Print a hint on how to fully reload the CLI:
139
+ - Press `Ctrl+C` to stop the process, then run `rn-inspector` again.
140
+
141
+ - `Ctrl+C`
142
+ - Quit `rn-inspector`.
143
+
144
+ If the terminal does not support raw mode (no TTY), these shortcuts are safely disabled.
145
+
146
+ ---
147
+
148
+ ## Error handling & reconnection
149
+
150
+ - If the **Metro websocket** closes or errors, the CLI logs a message and sends a small `meta` event to the UI so you can see the status.
151
+ - For **DevTools websockets** (one per device):
152
+ - The CLI retries reconnecting a few times with a delay.
153
+ - After several failures, it stops reconnecting and emits a `meta` event so the UI can reflect that the device is offline.
154
+
155
+ ---
156
+
157
+ ## Repository
158
+
159
+ This CLI is part of the **RN Inspector Monorepo**:
160
+
161
+ - GitHub: <https://github.com/afzaal-28/rn-inspector>
162
+
163
+ Please open issues or pull requests in that repository for bugs, feature requests, or contributions.
package/dist/index.js CHANGED
@@ -894,12 +894,8 @@ async function main() {
894
894
  console.log(`[rn-inspector] open ${uiUrl} (UI connects to ws://localhost:${uiWsPort ?? DEFAULT_UI_WS_PORT}/inspector)`);
895
895
  registerKeyHandlers(uiUrl);
896
896
  }
897
- const entrypoint = baseFile;
898
- const invoked = process.argv[1] && path_1.default.resolve(process.argv[1]) === entrypoint;
899
- if (invoked) {
900
- main().catch((err) => {
901
- console.error('[rn-inspector] CLI failed:', err);
902
- process.exit(1);
903
- });
904
- }
897
+ main().catch((err) => {
898
+ console.error('[rn-inspector] CLI failed:', err);
899
+ process.exit(1);
900
+ });
905
901
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA45BA,oBAsBC;AAj7BD,gDAA6D;AAC7D,yCAAyD;AACzD,gDAAwB;AACxB,gEAAuC;AACvC,gEAAwC;AACxC,iDAAsC;AAEtC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,QAAQ,GAAW,OAAO,UAAU,KAAK,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC9G,MAAM,OAAO,GAAW,OAAO,SAAS,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAgB9F,SAAS,SAAS;IAChB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,MAAM,GAAoF;QAC9F,SAAS,EAAE,kBAAkB;QAC7B,QAAQ,EAAE,kBAAkB;QAC5B,MAAM,EAAE,sBAAsB;QAC9B,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB;KACrD,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC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AG,CAAC,qCAAqC,CAAC,CAAC;IACnD,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtB,MAAM,KAAK,GAAG,oBAAoB,MAAM,EAAE,CAAC;IAC3C,OAAO,CAAC,GAAG,CACT,uBAAuB,KAAK,mCAAmC,QAAQ,IAAI,kBAAkB,aAAa,CAC3G,CAAC;IAEF,mBAAmB,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;IACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "rn-inspector",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
+ "description": "CLI + Web UI to inspect React Native console and network traffic via Metro and DevTools.",
4
5
  "private": false,
5
6
  "type": "commonjs",
6
7
  "bin": {
@@ -26,5 +27,23 @@
26
27
  "@types/ws": "^8.5.10",
27
28
  "@types/serve-static": "^1.15.7",
28
29
  "@types/finalhandler": "^1.1.3"
29
- }
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/afzaal-28/rn-inspector.git"
34
+ },
35
+ "homepage": "https://github.com/afzaal-28/rn-inspector#readme",
36
+ "bugs": {
37
+ "url": "https://github.com/afzaal-28/rn-inspector/issues"
38
+ },
39
+ "author": "afzaal-28",
40
+ "keywords": [
41
+ "react-native",
42
+ "react",
43
+ "devtools",
44
+ "inspector",
45
+ "debugging",
46
+ "network",
47
+ "console"
48
+ ]
30
49
  }
@@ -153,7 +153,7 @@ export default theme;`}function k1(e){return typeof e=="number"?`${(e*100).toFix
153
153
  `),()=>{E.contains(T)&&E.removeChild(T)}},[t]),w.jsx(FL,{isPresent:t,childRef:l,sizeRef:u,children:b.cloneElement(e,{ref:d})})}const YL=({children:e,initial:t,isPresent:o,onExitComplete:a,custom:s,presenceAffectsLayout:l,mode:u,anchorX:f,root:d})=>{const h=py(WL),g=b.useId();let y=!0,v=b.useMemo(()=>(y=!1,{id:g,initial:t,isPresent:o,custom:s,onExitComplete:x=>{h.set(x,!0);for(const S of h.values())if(!S)return;a&&a()},register:x=>(h.set(x,!1),()=>h.delete(x))}),[o,h,a]);return l&&y&&(v={...v}),b.useMemo(()=>{h.forEach((x,S)=>h.set(S,!1))},[o]),b.useEffect(()=>{!o&&!h.size&&a&&a()},[o]),u==="popLayout"&&(e=w.jsx(qL,{isPresent:o,anchorX:f,root:d,children:e})),w.jsx(Ad.Provider,{value:v,children:e})};function WL(){return new Map}function NT(e=!0){const t=b.useContext(Ad);if(t===null)return[!0,null];const{isPresent:o,onExitComplete:a,register:s}=t,l=b.useId();b.useEffect(()=>{if(e)return s(l)},[e]);const u=b.useCallback(()=>e&&a&&a(l),[l,a,e]);return!o&&a?[!1,u]:[!0]}const xf=e=>e.key||"";function GS(e){const t=[];return b.Children.forEach(e,o=>{b.isValidElement(o)&&t.push(o)}),t}const GL=({children:e,custom:t,initial:o=!0,onExitComplete:a,presenceAffectsLayout:s=!0,mode:l="sync",propagate:u=!1,anchorX:f="left",root:d})=>{const[h,g]=NT(u),y=b.useMemo(()=>GS(e),[e]),v=u&&!h?[]:y.map(xf),x=b.useRef(!0),S=b.useRef(y),T=py(()=>new Map),[E,R]=b.useState(y),[k,O]=b.useState(y);Y2(()=>{x.current=!1,S.current=y;for(let P=0;P<k.length;P++){const M=xf(k[P]);v.includes(M)?T.delete(M):T.get(M)!==!0&&T.set(M,!1)}},[k,v.length,v.join("-")]);const D=[];if(y!==E){let P=[...y];for(let M=0;M<k.length;M++){const $=k[M],V=xf($);v.includes(V)||(P.splice(M,0,$),D.push($))}return l==="wait"&&D.length&&(P=D),O(GS(P)),R(y),null}const{forceRender:z}=b.useContext(dy);return w.jsx(w.Fragment,{children:k.map(P=>{const M=xf(P),$=u&&!h?!1:y===k||v.includes(M),V=()=>{if(T.has(M))T.set(M,!0);else return;let I=!0;T.forEach(L=>{L||(I=!1)}),I&&(z?.(),O(S.current),u&&g?.(),a&&a())};return w.jsx(YL,{isPresent:$,initial:!x.current||o?void 0:!1,custom:t,presenceAffectsLayout:s,mode:l,root:d,onExitComplete:$?void 0:V,anchorX:f,children:P},M)})})},$T=b.createContext({strict:!1}),KS={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Hs={};for(const e in KS)Hs[e]={isEnabled:t=>KS[e].some(o=>!!t[o])};function KL(e){for(const t in e)Hs[t]={...Hs[t],...e[t]}}const XL=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function td(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XL.has(e)}let _T=e=>!td(e);function QL(e){typeof e=="function"&&(_T=t=>t.startsWith("on")?!td(t):e(t))}try{QL(require("@emotion/is-prop-valid").default)}catch{}function ZL(e,t,o){const a={};for(const s in e)s==="values"&&typeof e.values=="object"||(_T(s)||o===!0&&td(s)||!t&&!td(s)||e.draggable&&s.startsWith("onDrag"))&&(a[s]=e[s]);return a}const Od=b.createContext({});function Dd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ec(e){return typeof e=="string"||Array.isArray(e)}const Ny=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$y=["initial",...Ny];function kd(e){return Dd(e.animate)||$y.some(t=>Ec(e[t]))}function VT(e){return!!(kd(e)||e.variants)}function JL(e,t){if(kd(e)){const{initial:o,animate:a}=e;return{initial:o===!1||Ec(o)?o:void 0,animate:Ec(a)?a:void 0}}return e.inherit!==!1?t:{}}function e6(e){const{initial:t,animate:o}=JL(e,b.useContext(Od));return b.useMemo(()=>({initial:t,animate:o}),[XS(t),XS(o)])}function XS(e){return Array.isArray(e)?e.join(" "):e}const Rc={};function t6(e){for(const t in e)Rc[t]=e[t],Cy(t)&&(Rc[t].isCSSVariable=!0)}function UT(e,{layout:t,layoutId:o}){return Ks.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!Rc[e]||e==="opacity")}const n6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},r6=Gs.length;function o6(e,t,o){let a="",s=!0;for(let l=0;l<r6;l++){const u=Gs[l],f=e[u];if(f===void 0)continue;let d=!0;if(typeof f=="number"?d=f===(u.startsWith("scale")?1:0):d=parseFloat(f)===0,!d||o){const h=kT(f,jy[u]);if(!d){s=!1;const g=n6[u]||u;a+=`${g}(${h}) `}o&&(t[u]=h)}}return a=a.trim(),o?a=o(t,s?"":a):s&&(a="none"),a}function _y(e,t,o){const{style:a,vars:s,transformOrigin:l}=e;let u=!1,f=!1;for(const d in t){const h=t[d];if(Ks.has(d)){u=!0;continue}else if(Cy(d)){s[d]=h;continue}else{const g=kT(h,jy[d]);d.startsWith("origin")?(f=!0,l[d]=g):a[d]=g}}if(t.transform||(u||o?a.transform=o6(t,e.transform,o):a.transform&&(a.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:g=0}=l;a.transformOrigin=`${d} ${h} ${g}`}}const Vy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function HT(e,t,o){for(const a in t)!In(t[a])&&!UT(a,o)&&(e[a]=t[a])}function a6({transformTemplate:e},t){return b.useMemo(()=>{const o=Vy();return _y(o,t,e),Object.assign({},o.vars,o.style)},[t])}function i6(e,t){const o=e.style||{},a={};return HT(a,o,e),Object.assign(a,a6(e,t)),a}function s6(e,t){const o={},a=i6(e,t);return e.drag&&e.dragListener!==!1&&(o.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(o.tabIndex=0),o.style=a,o}const l6={offset:"stroke-dashoffset",array:"stroke-dasharray"},c6={offset:"strokeDashoffset",array:"strokeDasharray"};function u6(e,t,o=1,a=0,s=!0){e.pathLength=1;const l=s?l6:c6;e[l.offset]=Fe.transform(-a);const u=Fe.transform(t),f=Fe.transform(o);e[l.array]=`${u} ${f}`}function IT(e,{attrX:t,attrY:o,attrScale:a,pathLength:s,pathSpacing:l=1,pathOffset:u=0,...f},d,h,g){if(_y(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=g?.transformBox??"fill-box",delete y.transformBox),t!==void 0&&(y.x=t),o!==void 0&&(y.y=o),a!==void 0&&(y.scale=a),s!==void 0&&u6(y,s,l,u,!1)}const FT=()=>({...Vy(),attrs:{}}),qT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function f6(e,t,o,a){const s=b.useMemo(()=>{const l=FT();return IT(l,t,qT(a),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};HT(l,e.style,e),s.style={...l,...s.style}}return s}const d6=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Uy(e){return typeof e!="string"||e.includes("-")?!1:!!(d6.indexOf(e)>-1||/[A-Z]/u.test(e))}function p6(e,t,o,{latestValues:a},s,l=!1){const f=(Uy(e)?f6:s6)(t,a,s,e),d=ZL(t,typeof e=="string",l),h=e!==b.Fragment?{...d,...f,ref:o}:{},{children:g}=t,y=b.useMemo(()=>In(g)?g.get():g,[g]);return b.createElement(e,{...h,children:y})}function QS(e){const t=[{},{}];return e?.values.forEach((o,a)=>{t[0][a]=o.get(),t[1][a]=o.getVelocity()}),t}function Hy(e,t,o,a){if(typeof t=="function"){const[s,l]=QS(a);t=t(o!==void 0?o:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=QS(a);t=t(o!==void 0?o:e.custom,s,l)}return t}function jf(e){return In(e)?e.get():e}function h6({scrapeMotionValuesFromProps:e,createRenderState:t},o,a,s){return{latestValues:m6(o,a,s,e),renderState:t()}}function m6(e,t,o,a){const s={},l=a(e,{});for(const v in l)s[v]=jf(l[v]);let{initial:u,animate:f}=e;const d=kd(e),h=VT(e);t&&h&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let g=o?o.initial===!1:!1;g=g||u===!1;const y=g?f:u;if(y&&typeof y!="boolean"&&!Dd(y)){const v=Array.isArray(y)?y:[y];for(let x=0;x<v.length;x++){const S=Hy(e,v[x]);if(S){const{transitionEnd:T,transition:E,...R}=S;for(const k in R){let O=R[k];if(Array.isArray(O)){const D=g?O.length-1:0;O=O[D]}O!==null&&(s[k]=O)}for(const k in T)s[k]=T[k]}}}return s}const YT=e=>(t,o)=>{const a=b.useContext(Od),s=b.useContext(Ad),l=()=>h6(e,t,a,s);return o?l():py(l)};function Iy(e,t,o){const{style:a}=e,s={};for(const l in a)(In(a[l])||t.style&&In(t.style[l])||UT(l,e)||o?.getValue(l)?.liveStyle!==void 0)&&(s[l]=a[l]);return s}const g6=YT({scrapeMotionValuesFromProps:Iy,createRenderState:Vy});function WT(e,t,o){const a=Iy(e,t,o);for(const s in e)if(In(e[s])||In(t[s])){const l=Gs.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;a[l]=e[s]}return a}const y6=YT({scrapeMotionValuesFromProps:WT,createRenderState:FT}),v6=Symbol.for("motionComponentSymbol");function Cs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function b6(e,t,o){return b.useCallback(a=>{a&&e.onMount&&e.onMount(a),t&&(a?t.mount(a):t.unmount()),o&&(typeof o=="function"?o(a):Cs(o)&&(o.current=a))},[t])}const Fy=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),x6="framerAppearId",GT="data-"+Fy(x6),KT=b.createContext({});function S6(e,t,o,a,s){const{visualElement:l}=b.useContext(Od),u=b.useContext($T),f=b.useContext(Ad),d=b.useContext(Ly).reducedMotion,h=b.useRef(null);a=a||u.renderer,!h.current&&a&&(h.current=a(e,{visualState:t,parent:l,props:o,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:d}));const g=h.current,y=b.useContext(KT);g&&!g.projection&&s&&(g.type==="html"||g.type==="svg")&&C6(h.current,o,s,y);const v=b.useRef(!1);b.useInsertionEffect(()=>{g&&v.current&&g.update(o,f)});const x=o[GT],S=b.useRef(!!x&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return Y2(()=>{g&&(v.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),S.current&&g.animationState&&g.animationState.animateChanges())}),b.useEffect(()=>{g&&(!S.current&&g.animationState&&g.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),S.current=!1),g.enteringChildren=void 0)}),g}function C6(e,t,o,a){const{layoutId:s,layout:l,drag:u,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:g}=t;e.projection=new o(e.latestValues,t["data-framer-portal-id"]?void 0:XT(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!u||f&&Cs(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:a,crossfade:g,layoutScroll:d,layoutRoot:h})}function XT(e){if(e)return e.options.allowProjection!==!1?e.projection:XT(e.parent)}function ym(e,{forwardMotionProps:t=!1}={},o,a){o&&KL(o);const s=Uy(e)?y6:g6;function l(f,d){let h;const g={...b.useContext(Ly),...f,layoutId:w6(f)},{isStatic:y}=g,v=e6(f),x=s(f,y);if(!y&&hy){T6();const S=E6(g);h=S.MeasureLayout,v.visualElement=S6(e,x,g,a,S.ProjectionNode)}return w.jsxs(Od.Provider,{value:v,children:[h&&v.visualElement?w.jsx(h,{visualElement:v.visualElement,...g}):null,p6(e,f,b6(x,v.visualElement,d),x,y,t)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=b.forwardRef(l);return u[v6]=e,u}function w6({layoutId:e}){const t=b.useContext(dy).id;return t&&e!==void 0?t+"-"+e:e}function T6(e,t){b.useContext($T).strict}function E6(e){const{drag:t,layout:o}=Hs;if(!t&&!o)return{};const a={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function R6(e,t){if(typeof Proxy>"u")return ym;const o=new Map,a=(l,u)=>ym(l,u,e,t),s=(l,u)=>a(l,u);return new Proxy(s,{get:(l,u)=>u==="create"?a:(o.has(u)||o.set(u,ym(u,void 0,e,t)),o.get(u))})}function QT({top:e,left:t,right:o,bottom:a}){return{x:{min:t,max:o},y:{min:e,max:a}}}function M6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function A6(e,t){if(!t)return e;const o=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:o.y,left:o.x,bottom:a.y,right:a.x}}function vm(e){return e===void 0||e===1}function pg({scale:e,scaleX:t,scaleY:o}){return!vm(e)||!vm(t)||!vm(o)}function pi(e){return pg(e)||ZT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ZT(e){return ZS(e.x)||ZS(e.y)}function ZS(e){return e&&e!=="0%"}function nd(e,t,o){const a=e-o,s=t*a;return o+s}function JS(e,t,o,a,s){return s!==void 0&&(e=nd(e,s,a)),nd(e,o,a)+t}function hg(e,t=0,o=1,a,s){e.min=JS(e.min,t,o,a,s),e.max=JS(e.max,t,o,a,s)}function JT(e,{x:t,y:o}){hg(e.x,t.translate,t.scale,t.originPoint),hg(e.y,o.translate,o.scale,o.originPoint)}const eC=.999999999999,tC=1.0000000000001;function O6(e,t,o,a=!1){const s=o.length;if(!s)return;t.x=t.y=1;let l,u;for(let f=0;f<s;f++){l=o[f],u=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Ts(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),u&&(t.x*=u.x.scale,t.y*=u.y.scale,JT(e,u)),a&&pi(l.latestValues)&&Ts(e,l.latestValues))}t.x<tC&&t.x>eC&&(t.x=1),t.y<tC&&t.y>eC&&(t.y=1)}function ws(e,t){e.min=e.min+t,e.max=e.max+t}function nC(e,t,o,a,s=.5){const l=nn(e.min,e.max,s);hg(e,t,o,l,a)}function Ts(e,t){nC(e.x,t.x,t.scaleX,t.scale,t.originX),nC(e.y,t.y,t.scaleY,t.scale,t.originY)}function eE(e,t){return QT(A6(e.getBoundingClientRect(),t))}function D6(e,t,o){const a=eE(e,o),{scroll:s}=t;return s&&(ws(a.x,s.offset.x),ws(a.y,s.offset.y)),a}const rC=()=>({translate:0,scale:1,origin:0,originPoint:0}),Es=()=>({x:rC(),y:rC()}),oC=()=>({min:0,max:0}),On=()=>({x:oC(),y:oC()}),mg={current:null},tE={current:!1};function k6(){if(tE.current=!0,!!hy)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>mg.current=e.matches;e.addEventListener("change",t),t()}else mg.current=!1}const z6=new WeakMap;function j6(e,t,o){for(const a in t){const s=t[a],l=o[a];if(In(s))e.addValue(a,s);else if(In(l))e.addValue(a,Us(s,{owner:e}));else if(l!==s)if(e.hasValue(a)){const u=e.getValue(a);u.liveStyle===!0?u.jump(s):u.hasAnimated||u.set(s)}else{const u=e.getStaticValue(a);e.addValue(a,Us(u!==void 0?u:s,{owner:e}))}}for(const a in o)t[a]===void 0&&e.removeValue(a);return t}const aC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class P6{scrapeMotionValuesFromProps(t,o,a){return{}}constructor({parent:t,props:o,presenceContext:a,reducedMotionConfig:s,blockInitialAnimation:l,visualState:u},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ky,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const v=ar.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,tn.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=o.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=o,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=kd(o),this.isVariantNode=VT(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...y}=this.scrapeMotionValuesFromProps(o,{},this);for(const v in y){const x=y[v];d[v]!==void 0&&In(x)&&x.set(d[v])}}mount(t){this.current=t,z6.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,a)=>this.bindToMotionValue(a,o)),tE.current||k6(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mg.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ba(this.notifyUpdate),Ba(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const o=this.features[t];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,o){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const a=Ks.has(t);a&&this.onBindTransform&&this.onBindTransform();const s=o.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&tn.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,o)),this.valueSubscriptions.set(t,()=>{s(),l&&l(),o.owner&&o.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hs){const o=Hs[t];if(!o)continue;const{isEnabled:a,Feature:s}=o;if(!this.features[t]&&s&&a(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):On()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,o){this.latestValues[t]=o}update(t,o){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let a=0;a<aC.length;a++){const s=aC[a];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,u=t[l];u&&(this.propEventSubscriptions[s]=this.on(s,u))}this.prevMotionValues=j6(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(t),()=>o.variantChildren.delete(t)}addValue(t,o){const a=this.values.get(t);o!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,o),this.values.set(t,o),this.latestValues[t]=o.get())}removeValue(t){this.values.delete(t);const o=this.valueSubscriptions.get(t);o&&(o(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,o){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&o!==void 0&&(a=Us(o===null?void 0:o,{owner:this}),this.addValue(t,a)),a}readValue(t,o){let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(W2(a)||K2(a))?a=parseFloat(a):!UL(a)&&La.test(o)&&(a=DT(t,o)),this.setBaseTarget(t,In(a)?a.get():a)),In(a)?a.get():a}setBaseTarget(t,o){this.baseTarget[t]=o}getBaseTarget(t){const{initial:o}=this.props;let a;if(typeof o=="string"||typeof o=="object"){const l=Hy(this.props,o,this.presenceContext?.custom);l&&(a=l[t])}if(o&&a!==void 0)return a;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!In(s)?s:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,o){return this.events[t]||(this.events[t]=new by),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){Py.render(this.render)}}class nE extends P6{constructor(){super(...arguments),this.KeyframeResolver=OL}sortInstanceNodePosition(t,o){return t.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(t,o){return t.style?t.style[o]:void 0}removeValueFromRenderState(t,{vars:o,style:a}){delete o[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;In(t)&&(this.childSubscription=t.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}}function rE(e,{style:t,vars:o},a,s){const l=e.style;let u;for(u in t)l[u]=t[u];s?.applyProjectionStyles(l,a);for(u in o)l.setProperty(u,o[u])}function B6(e){return window.getComputedStyle(e)}class L6 extends nE{constructor(){super(...arguments),this.type="html",this.renderInstance=rE}readValueFromInstance(t,o){if(Ks.has(o))return this.projection?.isProjecting?ig(o):GB(t,o);{const a=B6(t),s=(Cy(o)?a.getPropertyValue(o):a[o])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:o}){return eE(t,o)}build(t,o,a){_y(t,o,a.transformTemplate)}scrapeMotionValuesFromProps(t,o,a){return Iy(t,o,a)}}const oE=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function N6(e,t,o,a){rE(e,t,void 0,a);for(const s in t.attrs)e.setAttribute(oE.has(s)?s:Fy(s),t.attrs[s])}class $6 extends nE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=On}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(Ks.has(o)){const a=OT(o);return a&&a.default||0}return o=oE.has(o)?o:Fy(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,a){return WT(t,o,a)}build(t,o,a){IT(t,o,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,o,a,s){N6(t,o,a,s)}mount(t){this.isSVGTag=qT(t.tagName),super.mount(t)}}const _6=(e,t)=>Uy(e)?new $6(t):new L6(t,{allowProjection:e!==b.Fragment});function Os(e,t,o){const a=e.getProps();return Hy(a,t,o!==void 0?o:a.custom,e)}const gg=e=>Array.isArray(e);function V6(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,Us(o))}function U6(e){return gg(e)?e[e.length-1]||0:e}function H6(e,t){const o=Os(e,t);let{transitionEnd:a={},transition:s={},...l}=o||{};l={...l,...a};for(const u in l){const f=U6(l[u]);V6(e,u,f)}}function I6(e){return!!(In(e)&&e.add)}function yg(e,t){const o=e.getValue("willChange");if(I6(o))return o.add(t);if(!o&&na.WillChange){const a=new na.WillChange("auto");e.addValue("willChange",a),a.add(t)}}function aE(e){return e.props[GT]}const F6=e=>e!==null;function q6(e,{repeat:t,repeatType:o="loop"},a){const s=e.filter(F6),l=t&&o!=="loop"&&t%2===1?0:s.length-1;return s[l]}const Y6={type:"spring",stiffness:500,damping:25,restSpeed:10},W6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),G6={type:"keyframes",duration:.8},K6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},X6=(e,{keyframes:t})=>t.length>2?G6:Ks.has(e)?e.startsWith("scale")?W6(t[1]):Y6:K6;function Q6({when:e,delay:t,delayChildren:o,staggerChildren:a,staggerDirection:s,repeat:l,repeatType:u,repeatDelay:f,from:d,elapsed:h,...g}){return!!Object.keys(g).length}const qy=(e,t,o,a={},s,l)=>u=>{const f=zy(a,e)||{},d=f.delay||a.delay||0;let{elapsed:h=0}=a;h=h-Eo(d);const g={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{u(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:s};Q6(f)||Object.assign(g,X6(e,g)),g.duration&&(g.duration=Eo(g.duration)),g.repeatDelay&&(g.repeatDelay=Eo(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let y=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(fg(g),g.delay===0&&(y=!0)),(na.instantAnimations||na.skipAnimations)&&(y=!0,fg(g),g.delay=0),g.allowFlatten=!f.type&&!f.ease,y&&!l&&t.get()!==void 0){const v=q6(g.keyframes,f);if(v!==void 0){tn.update(()=>{g.onUpdate(v),g.onComplete()});return}}return f.isSync?new Dy(g):new yL(g)};function Z6({protectedKeys:e,needsAnimating:t},o){const a=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,a}function iE(e,t,{delay:o=0,transitionOverride:a,type:s}={}){let{transition:l=e.getDefaultTransition(),transitionEnd:u,...f}=t;a&&(l=a);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const g in f){const y=e.getValue(g,e.latestValues[g]??null),v=f[g];if(v===void 0||h&&Z6(h,g))continue;const x={delay:o,...zy(l||{},g)},S=y.get();if(S!==void 0&&!y.isAnimating&&!Array.isArray(v)&&v===S&&!x.velocity)continue;let T=!1;if(window.MotionHandoffAnimation){const R=aE(e);if(R){const k=window.MotionHandoffAnimation(R,g,tn);k!==null&&(x.startTime=k,T=!0)}}yg(e,g),y.start(qy(g,y,v,e.shouldReduceMotion&&RT.has(g)?{type:!1}:x,e,T));const E=y.animation;E&&d.push(E)}return u&&Promise.all(d).then(()=>{tn.update(()=>{u&&H6(e,u)})}),d}function sE(e,t,o,a=0,s=1){const l=Array.from(e).sort((h,g)=>h.sortNodePosition(g)).indexOf(t),u=e.size,f=(u-1)*a;return typeof o=="function"?o(l,u):s===1?l*a:f-l*a}function vg(e,t,o={}){const a=Os(e,t,o.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=a||{};o.transitionOverride&&(s=o.transitionOverride);const l=a?()=>Promise.all(iE(e,a,o)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:y}=s;return J6(e,t,d,h,g,y,o)}:()=>Promise.resolve(),{when:f}=s;if(f){const[d,h]=f==="beforeChildren"?[l,u]:[u,l];return d().then(()=>h())}else return Promise.all([l(),u(o.delay)])}function J6(e,t,o=0,a=0,s=0,l=1,u){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(vg(d,t,{...u,delay:o+(typeof a=="function"?0:a)+sE(e.variantChildren,d,a,s,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function eN(e,t,o={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const s=t.map(l=>vg(e,l,o));a=Promise.all(s)}else if(typeof t=="string")a=vg(e,t,o);else{const s=typeof t=="function"?Os(e,t,o.custom):t;a=Promise.all(iE(e,s,o))}return a.then(()=>{e.notify("AnimationComplete",t)})}function lE(e,t){if(!Array.isArray(t))return!1;const o=t.length;if(o!==e.length)return!1;for(let a=0;a<o;a++)if(t[a]!==e[a])return!1;return!0}const tN=$y.length;function cE(e){if(!e)return;if(!e.isControllingVariants){const o=e.parent?cE(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}const t={};for(let o=0;o<tN;o++){const a=$y[o],s=e.props[a];(Ec(s)||s===!1)&&(t[a]=s)}return t}const nN=[...Ny].reverse(),rN=Ny.length;function oN(e){return t=>Promise.all(t.map(({animation:o,options:a})=>eN(e,o,a)))}function aN(e){let t=oN(e),o=iC(),a=!0;const s=d=>(h,g)=>{const y=Os(e,g,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:v,transitionEnd:x,...S}=y;h={...h,...S,...x}}return h};function l(d){t=d(e)}function u(d){const{props:h}=e,g=cE(e.parent)||{},y=[],v=new Set;let x={},S=1/0;for(let E=0;E<rN;E++){const R=nN[E],k=o[R],O=h[R]!==void 0?h[R]:g[R],D=Ec(O),z=R===d?k.isActive:null;z===!1&&(S=E);let P=O===g[R]&&O!==h[R]&&D;if(P&&a&&e.manuallyAnimateOnMount&&(P=!1),k.protectedKeys={...x},!k.isActive&&z===null||!O&&!k.prevProp||Dd(O)||typeof O=="boolean")continue;const M=iN(k.prevProp,O);let $=M||R===d&&k.isActive&&!P&&D||E>S&&D,V=!1;const I=Array.isArray(O)?O:[O];let L=I.reduce(s(R),{});z===!1&&(L={});const{prevResolvedValues:A={}}=k,F={...A,...L},H=q=>{$=!0,v.has(q)&&(V=!0,v.delete(q)),k.needsAnimating[q]=!0;const K=e.getValue(q);K&&(K.liveStyle=!1)};for(const q in F){const K=L[q],te=A[q];if(x.hasOwnProperty(q))continue;let ue=!1;gg(K)&&gg(te)?ue=!lE(K,te):ue=K!==te,ue?K!=null?H(q):v.add(q):K!==void 0&&v.has(q)?H(q):k.protectedKeys[q]=!0}k.prevProp=O,k.prevResolvedValues=L,k.isActive&&(x={...x,...L}),a&&e.blockInitialAnimation&&($=!1);const G=P&&M;$&&(!G||V)&&y.push(...I.map(q=>{const K={type:R};if(typeof q=="string"&&a&&!G&&e.manuallyAnimateOnMount&&e.parent){const{parent:te}=e,ue=Os(te,q);if(te.enteringChildren&&ue){const{delayChildren:N}=ue.transition||{};K.delay=sE(te.enteringChildren,e,N)}}return{animation:q,options:K}}))}if(v.size){const E={};if(typeof h.initial!="boolean"){const R=Os(e,Array.isArray(h.initial)?h.initial[0]:h.initial);R&&R.transition&&(E.transition=R.transition)}v.forEach(R=>{const k=e.getBaseTarget(R),O=e.getValue(R);O&&(O.liveStyle=!0),E[R]=k??null}),y.push({animation:E})}let T=!!y.length;return a&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(T=!1),a=!1,T?t(y):Promise.resolve()}function f(d,h){if(o[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(d,h)),o[d].isActive=h;const g=u(d);for(const y in o)o[y].protectedKeys={};return g}return{animateChanges:u,setActive:f,setAnimateFunction:l,getState:()=>o,reset:()=>{o=iC()}}}function iN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lE(t,e):!1}function ui(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iC(){return{animate:ui(!0),whileInView:ui(),whileHover:ui(),whileTap:ui(),whileDrag:ui(),whileFocus:ui(),exit:ui()}}class Ua{constructor(t){this.isMounted=!1,this.node=t}update(){}}class sN extends Ua{constructor(t){super(t),t.animationState||(t.animationState=aN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Dd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:o}=this.node.prevProps||{};t!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let lN=0;class cN extends Ua{constructor(){super(...arguments),this.id=lN++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:o}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;const s=this.node.animationState.setActive("exit",!t);o&&!t&&s.then(()=>{o(this.id)})}mount(){const{register:t,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const uN={animation:{Feature:sN},exit:{Feature:cN}};function Mc(e,t,o,a={passive:!0}){return e.addEventListener(t,o,a),()=>e.removeEventListener(t,o)}function Fc(e){return{point:{x:e.pageX,y:e.pageY}}}const fN=e=>t=>By(t)&&e(t,Fc(t));function pc(e,t,o,a){return Mc(e,t,fN(o),a)}const uE=1e-4,dN=1-uE,pN=1+uE,fE=.01,hN=0-fE,mN=0+fE;function Gn(e){return e.max-e.min}function gN(e,t,o){return Math.abs(e-t)<=o}function sC(e,t,o,a=.5){e.origin=a,e.originPoint=nn(t.min,t.max,e.origin),e.scale=Gn(o)/Gn(t),e.translate=nn(o.min,o.max,e.origin)-e.originPoint,(e.scale>=dN&&e.scale<=pN||isNaN(e.scale))&&(e.scale=1),(e.translate>=hN&&e.translate<=mN||isNaN(e.translate))&&(e.translate=0)}function hc(e,t,o,a){sC(e.x,t.x,o.x,a?a.originX:void 0),sC(e.y,t.y,o.y,a?a.originY:void 0)}function lC(e,t,o){e.min=o.min+t.min,e.max=e.min+Gn(t)}function yN(e,t,o){lC(e.x,t.x,o.x),lC(e.y,t.y,o.y)}function cC(e,t,o){e.min=t.min-o.min,e.max=e.min+Gn(t)}function rd(e,t,o){cC(e.x,t.x,o.x),cC(e.y,t.y,o.y)}function Vr(e){return[e("x"),e("y")]}const dE=({current:e})=>e?e.ownerDocument.defaultView:null,uC=(e,t)=>Math.abs(e-t);function vN(e,t){const o=uC(e.x,t.x),a=uC(e.y,t.y);return Math.sqrt(o**2+a**2)}class pE{constructor(t,o,{transformPagePoint:a,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:u=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=xm(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,S=vN(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!S)return;const{point:T}=v,{timestamp:E}=$n;this.history.push({...T,timestamp:E});const{onStart:R,onMove:k}=this.handlers;x||(R&&R(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,v)},this.handlePointerMove=(v,x)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=bm(x,this.transformPagePoint),tn.update(this.updatePoint,!0)},this.handlePointerUp=(v,x)=>{this.end();const{onEnd:S,onSessionEnd:T,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=xm(v.type==="pointercancel"?this.lastMoveEventInfo:bm(x,this.transformPagePoint),this.history);this.startEvent&&S&&S(v,R),T&&T(v,R)},!By(t))return;this.dragSnapToOrigin=l,this.handlers=o,this.transformPagePoint=a,this.distanceThreshold=u,this.contextWindow=s||window;const f=Fc(t),d=bm(f,this.transformPagePoint),{point:h}=d,{timestamp:g}=$n;this.history=[{...h,timestamp:g}];const{onSessionStart:y}=o;y&&y(t,xm(d,this.history)),this.removeListeners=Uc(pc(this.contextWindow,"pointermove",this.handlePointerMove),pc(this.contextWindow,"pointerup",this.handlePointerUp),pc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ba(this.updatePoint)}}function bm(e,t){return t?{point:t(e.point)}:e}function fC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xm({point:e},t){return{point:e,delta:fC(e,hE(t)),offset:fC(e,bN(t)),velocity:xN(t,.1)}}function bN(e){return e[0]}function hE(e){return e[e.length-1]}function xN(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,a=null;const s=hE(e);for(;o>=0&&(a=e[o],!(s.timestamp-a.timestamp>Eo(t)));)o--;if(!a)return{x:0,y:0};const l=Yr(s.timestamp-a.timestamp);if(l===0)return{x:0,y:0};const u={x:(s.x-a.x)/l,y:(s.y-a.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function SN(e,{min:t,max:o},a){return t!==void 0&&e<t?e=a?nn(t,e,a.min):Math.max(e,t):o!==void 0&&e>o&&(e=a?nn(o,e,a.max):Math.min(e,o)),e}function dC(e,t,o){return{min:t!==void 0?e.min+t:void 0,max:o!==void 0?e.max+o-(e.max-e.min):void 0}}function CN(e,{top:t,left:o,bottom:a,right:s}){return{x:dC(e.x,o,s),y:dC(e.y,t,a)}}function pC(e,t){let o=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([o,a]=[a,o]),{min:o,max:a}}function wN(e,t){return{x:pC(e.x,t.x),y:pC(e.y,t.y)}}function TN(e,t){let o=.5;const a=Gn(e),s=Gn(t);return s>a?o=Cc(t.min,t.max-a,e.min):a>s&&(o=Cc(e.min,e.max-s,t.min)),ta(0,1,o)}function EN(e,t){const o={};return t.min!==void 0&&(o.min=t.min-e.min),t.max!==void 0&&(o.max=t.max-e.min),o}const bg=.35;function RN(e=bg){return e===!1?e=0:e===!0&&(e=bg),{x:hC(e,"left","right"),y:hC(e,"top","bottom")}}function hC(e,t,o){return{min:mC(e,t),max:mC(e,o)}}function mC(e,t){return typeof e=="number"?e:e[t]||0}const MN=new WeakMap;class AN{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=On(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:o=!1,distanceThreshold:a}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(Fc(y).point)},u=(y,v)=>{const{drag:x,dragPropagation:S,onDragStart:T}=this.getProps();if(x&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jL(x),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vr(R=>{let k=this.getAxisMotionValue(R).get()||0;if(Ro.test(k)){const{projection:O}=this.visualElement;if(O&&O.layout){const D=O.layout.layoutBox[R];D&&(k=Gn(D)*(parseFloat(k)/100))}}this.originPoint[R]=k}),T&&tn.postRender(()=>T(y,v)),yg(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:x,dragDirectionLock:S,onDirectionLock:T,onDrag:E}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:R}=v;if(S&&this.currentDirection===null){this.currentDirection=ON(R),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",v.point,R),this.updateAxis("y",v.point,R),this.visualElement.render(),E&&E(y,v)},d=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Vr(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:g}=this.getProps();this.panSession=new pE(t,{onSessionStart:l,onStart:u,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:a,contextWindow:dE(this.visualElement)})}stop(t,o){const a=t||this.latestPointerEvent,s=o||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!a)return;const{velocity:u}=s;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&tn.postRender(()=>f(a,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:o}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(t,o,a){const{drag:s}=this.getProps();if(!a||!Sf(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(u=SN(u,this.constraints[t],this.elastic[t])),l.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:o}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Cs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=CN(a.layoutBox,t):this.constraints=!1,this.elastic=RN(o),s!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&Vr(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=EN(a.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!Cs(t))return!1;const a=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const l=D6(a,s.root,this.visualElement.getTransformPagePoint());let u=wN(s.layout.layoutBox,l);if(o){const f=o(M6(u));this.hasMutatedConstraints=!!f,f&&(u=QT(f))}return u}startAnimation(t){const{drag:o,dragMomentum:a,dragElastic:s,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Vr(g=>{if(!Sf(g,o,this.currentDirection))return;let y=d&&d[g]||{};u&&(y={min:0,max:0});const v=s?200:1e6,x=s?40:1e7,S={type:"inertia",velocity:a?t[g]:0,bounceStiffness:v,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(g,S)});return Promise.all(h).then(f)}startAxisValueAnimation(t,o){const a=this.getAxisMotionValue(t);return yg(this.visualElement,t),a.start(qy(t,a,0,o,this.visualElement,!1))}stopAnimation(){Vr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Vr(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const o=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),s=a[o];return s||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){Vr(o=>{const{drag:a}=this.getProps();if(!Sf(o,a,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(o);if(s&&s.layout){const{min:u,max:f}=s.layout.layoutBox[o];l.set(t[o]-nn(u,f,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:o}=this.getProps(),{projection:a}=this.visualElement;if(!Cs(o)||!a||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Vr(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const d=f.get();s[u]=TN({min:d,max:d},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),Vr(u=>{if(!Sf(u,t,null))return;const f=this.getAxisMotionValue(u),{min:d,max:h}=this.constraints[u];f.set(nn(d,h,s[u]))})}addListeners(){if(!this.visualElement.current)return;MN.set(this.visualElement,this);const t=this.visualElement.current,o=pc(t,"pointerdown",d=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(d)}),a=()=>{const{dragConstraints:d}=this.getProps();Cs(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,l=s.addEventListener("measure",a);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),tn.read(a);const u=Mc(window,"resize",()=>this.scalePositionWithinConstraints()),f=s.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Vr(g=>{const y=this.getAxisMotionValue(g);y&&(this.originPoint[g]+=d[g].translate,y.set(y.get()+d[g].translate))}),this.visualElement.render())}));return()=>{u(),o(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:a=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:u=bg,dragMomentum:f=!0}=t;return{...t,drag:o,dragDirectionLock:a,dragPropagation:s,dragConstraints:l,dragElastic:u,dragMomentum:f}}}function Sf(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function ON(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}class DN extends Ua{constructor(t){super(t),this.removeGroupControls=Gr,this.removeListeners=Gr,this.controls=new AN(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gr}unmount(){this.removeGroupControls(),this.removeListeners()}}const gC=e=>(t,o)=>{e&&tn.postRender(()=>e(t,o))};class kN extends Ua{constructor(){super(...arguments),this.removePointerDownListener=Gr}onPointerDown(t){this.session=new pE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:o,onPan:a,onPanEnd:s}=this.node.getProps();return{onSessionStart:gC(t),onStart:gC(o),onMove:a,onEnd:(l,u)=>{delete this.session,s&&tn.postRender(()=>s(l,u))}}}mount(){this.removePointerDownListener=pc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Pf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function yC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Kl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Fe.test(e))e=parseFloat(e);else return e;const o=yC(e,t.target.x),a=yC(e,t.target.y);return`${o}% ${a}%`}},zN={correct:(e,{treeScale:t,projectionDelta:o})=>{const a=e,s=La.parse(e);if(s.length>5)return a;const l=La.createTransformer(e),u=typeof s[0]!="number"?1:0,f=o.x.scale*t.x,d=o.y.scale*t.y;s[0+u]/=f,s[1+u]/=d;const h=nn(f,d,.5);return typeof s[2+u]=="number"&&(s[2+u]/=h),typeof s[3+u]=="number"&&(s[3+u]/=h),l(s)}};let Sm=!1;class jN extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:o,switchLayoutGroup:a,layoutId:s}=this.props,{projection:l}=t;t6(PN),l&&(o.group&&o.group.add(l),a&&a.register&&s&&a.register(l),Sm&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Pf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:o,visualElement:a,drag:s,isPresent:l}=this.props,{projection:u}=a;return u&&(u.isPresent=l,Sm=!0,s||t.layoutDependency!==o||o===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||tn.postRender(()=>{const f=u.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Py.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:o,switchLayoutGroup:a}=this.props,{projection:s}=t;Sm=!0,s&&(s.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(s),a&&a.deregister&&a.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function mE(e){const[t,o]=NT(),a=b.useContext(dy);return w.jsx(jN,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(KT),isPresent:t,safeToRemove:o})}const PN={borderRadius:{...Kl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kl,borderTopRightRadius:Kl,borderBottomLeftRadius:Kl,borderBottomRightRadius:Kl,boxShadow:zN};function BN(e,t,o){const a=In(e)?e:Us(e);return a.start(qy("",a,t,o)),a.animation}const LN=(e,t)=>e.depth-t.depth;class NN{constructor(){this.children=[],this.isDirty=!1}add(t){my(this.children,t),this.isDirty=!0}remove(t){gy(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LN),this.isDirty=!1,this.children.forEach(t)}}function $N(e,t){const o=ar.now(),a=({timestamp:s})=>{const l=s-o;l>=t&&(Ba(a),e(l-t))};return tn.setup(a,!0),()=>Ba(a)}const gE=["TopLeft","TopRight","BottomLeft","BottomRight"],_N=gE.length,vC=e=>typeof e=="string"?parseFloat(e):e,bC=e=>typeof e=="number"||Fe.test(e);function VN(e,t,o,a,s,l){s?(e.opacity=nn(0,o.opacity??1,UN(a)),e.opacityExit=nn(t.opacity??1,0,HN(a))):l&&(e.opacity=nn(t.opacity??1,o.opacity??1,a));for(let u=0;u<_N;u++){const f=`border${gE[u]}Radius`;let d=xC(t,f),h=xC(o,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||bC(d)===bC(h)?(e[f]=Math.max(nn(vC(d),vC(h),a),0),(Ro.test(h)||Ro.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||o.rotate)&&(e.rotate=nn(t.rotate||0,o.rotate||0,a))}function xC(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const UN=yE(0,.5,rT),HN=yE(.5,.95,Gr);function yE(e,t,o){return a=>a<e?0:a>t?1:o(Cc(e,t,a))}function SC(e,t){e.min=t.min,e.max=t.max}function io(e,t){SC(e.x,t.x),SC(e.y,t.y)}function CC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wC(e,t,o,a,s){return e-=t,e=nd(e,1/o,a),s!==void 0&&(e=nd(e,1/s,a)),e}function IN(e,t=0,o=1,a=.5,s,l=e,u=e){if(Ro.test(t)&&(t=parseFloat(t),t=nn(u.min,u.max,t/100)-u.min),typeof t!="number")return;let f=nn(l.min,l.max,a);e===l&&(f-=t),e.min=wC(e.min,t,o,f,s),e.max=wC(e.max,t,o,f,s)}function TC(e,t,[o,a,s],l,u){IN(e,t[o],t[a],t[s],t.scale,l,u)}const FN=["x","scaleX","originX"],qN=["y","scaleY","originY"];function EC(e,t,o,a){TC(e.x,t,FN,o?o.x:void 0,a?a.x:void 0),TC(e.y,t,qN,o?o.y:void 0,a?a.y:void 0)}function RC(e){return e.translate===0&&e.scale===1}function vE(e){return RC(e.x)&&RC(e.y)}function MC(e,t){return e.min===t.min&&e.max===t.max}function YN(e,t){return MC(e.x,t.x)&&MC(e.y,t.y)}function AC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bE(e,t){return AC(e.x,t.x)&&AC(e.y,t.y)}function OC(e){return Gn(e.x)/Gn(e.y)}function DC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class WN{constructor(){this.members=[]}add(t){my(this.members,t),t.scheduleRender()}remove(t){if(gy(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(t){const o=this.members.findIndex(s=>t===s);if(o===0)return!1;let a;for(let s=o;s>=0;s--){const l=this.members[s];if(l.isPresent!==!1){a=l;break}}return a?(this.promote(a),!0):!1}promote(t,o){const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.instance&&a.scheduleRender(),t.scheduleRender(),t.resumeFrom=a,o&&(t.resumeFrom.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:o,resumingFrom:a}=t;o.onExitComplete&&o.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function GN(e,t,o){let a="";const s=e.x.translate/t.x,l=e.y.translate/t.y,u=o?.z||0;if((s||l||u)&&(a=`translate3d(${s}px, ${l}px, ${u}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),o){const{transformPerspective:h,rotate:g,rotateX:y,rotateY:v,skewX:x,skewY:S}=o;h&&(a=`perspective(${h}px) ${a}`),g&&(a+=`rotate(${g}deg) `),y&&(a+=`rotateX(${y}deg) `),v&&(a+=`rotateY(${v}deg) `),x&&(a+=`skewX(${x}deg) `),S&&(a+=`skewY(${S}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(a+=`scale(${f}, ${d})`),a||"none"}const Cm=["","X","Y","Z"],KN=1e3;let XN=0;function wm(e,t,o,a){const{latestValues:s}=t;s[e]&&(o[e]=s[e],t.setStaticValue(e,0),a&&(a[e]=0))}function xE(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const o=aE(t);if(window.MotionHasOptimisedAnimation(o,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",tn,!(s||l))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&xE(a)}function SE({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:a,resetTransform:s}){return class{constructor(u={},f=t?.()){this.id=XN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(JN),this.nodes.forEach(r$),this.nodes.forEach(o$),this.nodes.forEach(e$)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new NN)}addEventListener(u,f){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new by),this.eventHandlers.get(u).add(f)}notifyListeners(u,...f){const d=this.eventHandlers.get(u);d&&d.notify(...f)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=LT(u)&&!_L(u),this.instance=u;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let g,y=0;const v=()=>this.root.updateBlockedByResize=!1;tn.read(()=>{y=window.innerWidth}),e(u,()=>{const x=window.innerWidth;x!==y&&(y=x,this.root.updateBlockedByResize=!0,g&&g(),g=$N(v,250),Pf.hasAnimatedSinceResize&&(Pf.hasAnimatedSinceResize=!1,this.nodes.forEach(jC)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||c$,{onLayoutAnimationStart:T,onLayoutAnimationComplete:E}=h.getProps(),R=!this.targetLayout||!bE(this.targetLayout,x),k=!y&&v;if(this.options.layoutRoot||this.resumeFrom||k||y&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const O={...zy(S,"layout"),onPlay:T,onComplete:E};(h.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O),this.setAnimationOrigin(g,k)}else y||jC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ba(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(a$),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&xE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const y=this.path[g];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(kC);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zC);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(n$),this.nodes.forEach(QN),this.nodes.forEach(ZN)):this.nodes.forEach(zC),this.clearAllSnapshots();const f=ar.now();$n.delta=ta(0,1e3/60,f-$n.timestamp),$n.timestamp=f,$n.isProcessing=!0,fm.update.process($n),fm.preRender.process($n),fm.render.process($n),$n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Py.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(t$),this.sharedNodes.forEach(i$)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Gn(this.snapshot.measuredBox.x)&&!Gn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=On(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(f=!1),f&&this.instance){const d=a(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:d,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!vE(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,g=h!==this.prevTransformTemplateValue;u&&this.instance&&(f||pi(this.latestValues)||g)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return u&&(d=this.removeTransform(d)),u$(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return On();const f=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(f$))){const{scroll:h}=this.root;h&&(ws(f.x,h.offset.x),ws(f.y,h.offset.y))}return f}removeElementScroll(u){const f=On();if(io(f,u),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:g,options:y}=h;h!==this.root&&g&&y.layoutScroll&&(g.wasRoot&&io(f,u),ws(f.x,g.offset.x),ws(f.y,g.offset.y))}return f}applyTransform(u,f=!1){const d=On();io(d,u);for(let h=0;h<this.path.length;h++){const g=this.path[h];!f&&g.options.layoutScroll&&g.scroll&&g!==g.root&&Ts(d,{x:-g.scroll.offset.x,y:-g.scroll.offset.y}),pi(g.latestValues)&&Ts(d,g.latestValues)}return pi(this.latestValues)&&Ts(d,this.latestValues),d}removeTransform(u){const f=On();io(f,u);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!pi(h.latestValues))continue;pg(h.latestValues)&&h.updateSnapshot();const g=On(),y=h.measurePageBox();io(g,y),EC(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,g)}return pi(this.latestValues)&&EC(f,this.latestValues),f}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(u||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:y}=this.options;if(!this.layout||!(g||y))return;this.resolvedRelativeTargetAt=$n.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=On(),this.targetWithTransforms=On()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),yN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):io(this.target,this.layout.layoutBox),JT(this.target,this.targetDelta)):io(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pg(this.parent.latestValues)||ZT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,f,d){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=On(),this.relativeTargetOrigin=On(),rd(this.relativeTargetOrigin,f,d),io(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const u=this.getLead(),f=!!this.resumingFrom||this!==u;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===$n.timestamp&&(d=!1),d)return;const{layout:h,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||g))return;io(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;O6(this.layoutCorrected,this.treeScale,this.path,f),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=On());const{target:x}=u;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(CC(this.prevProjectionDelta.x,this.projectionDelta.x),CC(this.prevProjectionDelta.y,this.projectionDelta.y)),hc(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!DC(this.projectionDelta.x,this.prevProjectionDelta.x)||!DC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Es(),this.projectionDelta=Es(),this.projectionDeltaWithTransform=Es()}setAnimationOrigin(u,f=!1){const d=this.snapshot,h=d?d.latestValues:{},g={...this.latestValues},y=Es();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=On(),x=d?d.source:void 0,S=this.layout?this.layout.source:void 0,T=x!==S,E=this.getStack(),R=!E||E.members.length<=1,k=!!(T&&!R&&this.options.crossfade===!0&&!this.path.some(l$));this.animationProgress=0;let O;this.mixTargetDelta=D=>{const z=D/1e3;PC(y.x,u.x,z),PC(y.y,u.y,z),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rd(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),s$(this.relativeTarget,this.relativeTargetOrigin,v,z),O&&YN(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=On()),io(O,this.relativeTarget)),T&&(this.animationValues=g,VN(g,h,this.latestValues,z,k,R)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=z},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ba(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tn.update(()=>{Pf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Us(0)),this.currentAnimation=BN(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),u.onUpdate&&u.onUpdate(f)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:g}=u;if(!(!f||!d||!h)){if(this!==u&&this.layout&&h&&CE(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||On();const y=Gn(this.layout.layoutBox.x);d.x.min=u.target.x.min,d.x.max=d.x.min+y;const v=Gn(this.layout.layoutBox.y);d.y.min=u.target.y.min,d.y.max=d.y.min+v}io(f,d),Ts(f,g),hc(this.projectionDeltaWithTransform,this.layoutCorrected,f,g)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new WN),this.sharedNodes.get(u).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let f=!1;const{latestValues:d}=u;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&wm("z",u,h,this.animationValues);for(let g=0;g<Cm.length;g++)wm(`rotate${Cm[g]}`,u,h,this.animationValues),wm(`skew${Cm[g]}`,u,h,this.animationValues);u.render();for(const g in h)u.setStaticValue(g,h[g]),this.animationValues&&(this.animationValues[g]=h[g]);u.scheduleRender()}applyProjectionStyles(u,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=jf(f?.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=jf(f?.pointerEvents)||""),this.hasProjected&&!pi(this.latestValues)&&(u.transform=d?d({},""):"none",this.hasProjected=!1);return}u.visibility="";const g=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=GN(this.projectionDeltaWithTransform,this.treeScale,g);d&&(y=d(g,y)),u.transform=y;const{x:v,y:x}=this.projectionDelta;u.transformOrigin=`${v.origin*100}% ${x.origin*100}% 0`,h.animationValues?u.opacity=h===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:u.opacity=h===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const S in Rc){if(g[S]===void 0)continue;const{correct:T,applyTo:E,isCSSVariable:R}=Rc[S],k=y==="none"?g[S]:T(g[S],h);if(E){const O=E.length;for(let D=0;D<O;D++)u[E[D]]=k}else R?this.options.visualElement.renderState.vars[S]=k:u[S]=k}this.options.layoutId&&(u.pointerEvents=h===this?jf(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(kC),this.root.sharedNodes.clear()}}}function QN(e){e.updateLayout()}function ZN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;s==="size"?Vr(g=>{const y=l?t.measuredBox[g]:t.layoutBox[g],v=Gn(y);y.min=o[g].min,y.max=y.min+v}):CE(s,t.layoutBox,o)&&Vr(g=>{const y=l?t.measuredBox[g]:t.layoutBox[g],v=Gn(o[g]);y.max=y.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+v)});const u=Es();hc(u,o,t.layoutBox);const f=Es();l?hc(f,e.applyTransform(a,!0),t.measuredBox):hc(f,o,t.layoutBox);const d=!vE(u);let h=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:y,layout:v}=g;if(y&&v){const x=On();rd(x,t.layoutBox,y.layoutBox);const S=On();rd(S,o,v.layoutBox),bE(x,S)||(h=!0),g.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=x,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:f,layoutDelta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function JN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function e$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function t$(e){e.clearSnapshot()}function kC(e){e.clearMeasurements()}function zC(e){e.isLayoutDirty=!1}function n$(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function r$(e){e.resolveTargetDelta()}function o$(e){e.calcProjection()}function a$(e){e.resetSkewAndRotation()}function i$(e){e.removeLeadSnapshot()}function PC(e,t,o){e.translate=nn(t.translate,0,o),e.scale=nn(t.scale,1,o),e.origin=t.origin,e.originPoint=t.originPoint}function BC(e,t,o,a){e.min=nn(t.min,o.min,a),e.max=nn(t.max,o.max,a)}function s$(e,t,o,a){BC(e.x,t.x,o.x,a),BC(e.y,t.y,o.y,a)}function l$(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const c$={duration:.45,ease:[.4,0,.1,1]},LC=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),NC=LC("applewebkit/")&&!LC("chrome/")?Math.round:Gr;function $C(e){e.min=NC(e.min),e.max=NC(e.max)}function u$(e){$C(e.x),$C(e.y)}function CE(e,t,o){return e==="position"||e==="preserve-aspect"&&!gN(OC(t),OC(o),.2)}function f$(e){return e!==e.root&&e.scroll?.wasRoot}const d$=SE({attachResizeListener:(e,t)=>Mc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Tm={current:void 0},wE=SE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Tm.current){const e=new d$({});e.mount(window),e.setOptions({layoutScroll:!0}),Tm.current=e}return Tm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),p$={pan:{Feature:kN},drag:{Feature:DN,ProjectionNode:wE,MeasureLayout:mE}};function _C(e,t,o){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",o==="Start");const s="onHover"+o,l=a[s];l&&tn.postRender(()=>l(t,Fc(t)))}class h$ extends Ua{mount(){const{current:t}=this.node;t&&(this.unmount=PL(t,(o,a)=>(_C(this.node,a,"Start"),s=>_C(this.node,s,"End"))))}unmount(){}}class m$ extends Ua{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Uc(Mc(this.node.current,"focus",()=>this.onFocus()),Mc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function VC(e,t,o){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",o==="Start");const s="onTap"+(o==="End"?"":o),l=a[s];l&&tn.postRender(()=>l(t,Fc(t)))}class g$ extends Ua{mount(){const{current:t}=this.node;t&&(this.unmount=$L(t,(o,a)=>(VC(this.node,a,"Start"),(s,{success:l})=>VC(this.node,s,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const xg=new WeakMap,Em=new WeakMap,y$=e=>{const t=xg.get(e.target);t&&t(e)},v$=e=>{e.forEach(y$)};function b$({root:e,...t}){const o=e||document;Em.has(o)||Em.set(o,{});const a=Em.get(o),s=JSON.stringify(t);return a[s]||(a[s]=new IntersectionObserver(v$,{root:e,...t})),a[s]}function x$(e,t,o){const a=b$(t);return xg.set(e,o),a.observe(e),()=>{xg.delete(e),a.unobserve(e)}}const S$={some:0,all:1};class C$ extends Ua{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:o,margin:a,amount:s="some",once:l}=t,u={root:o?o.current:void 0,rootMargin:a,threshold:typeof s=="number"?s:S$[s]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:g,onViewportLeave:y}=this.node.getProps(),v=h?g:y;v&&v(d)};return x$(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:o}=this.node;["amount","margin","root"].some(w$(t,o))&&this.startObserver()}unmount(){}}function w$({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}const T$={inView:{Feature:C$},tap:{Feature:g$},focus:{Feature:m$},hover:{Feature:h$}},E$={layout:{ProjectionNode:wE,MeasureLayout:mE}},R$={...uN,...T$,...p$,...E$},UC=R6(R$,_6),Yy=Xt(w.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),M$=Xt(w.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),A$=Xt(w.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),O$=Xt(w.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"})),D$=Xt(w.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"})),k$=(e,t)=>{const o={fontSize:"small",sx:{mr:1.5,color:t.palette[e].main||t.palette.primary.main,backgroundColor:Qo(t.palette[e].main||t.palette.primary.main,.1),borderRadius:"50%",p:.5,width:28,height:28}};switch(e){case"success":return w.jsx(M$,{...o});case"error":return w.jsx(A$,{...o});case"warning":return w.jsx(O$,{...o});case"info":default:return w.jsx(D$,{...o})}},Rm=({id:e,message:t,type:o,count:a=1,onDismiss:s,autoHideDuration:l=5e3})=>{const u=Na(),[f,d]=b.useState(!0);b.useEffect(()=>{const g=setTimeout(()=>{h()},l);return()=>clearTimeout(g)},[l]);const h=()=>{d(!1),setTimeout(()=>s(e),300)};return w.jsx(GL,{children:f&&w.jsxs(UC.div,{layout:!0,initial:{opacity:0,y:16,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,x:80},transition:{duration:.22,ease:"easeOut"},style:{width:"360px",maxWidth:"90vw",marginBottom:"8px",borderRadius:"12px",background:Qo(u.palette.background.paper,.95),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",boxShadow:"0 4px 20px -5px rgba(0, 0, 0, 0.1)",border:`1px solid ${Qo(u.palette.divider,.1)}`,overflow:"hidden",position:"relative",zIndex:1400,pointerEvents:"auto",willChange:"transform, opacity"},children:[w.jsxs(me,{sx:{display:"flex",alignItems:"flex-start",p:2,position:"relative"},children:[a>1&&w.jsx(me,{sx:{position:"absolute",top:8,right:8,minWidth:24,height:22,borderRadius:999,px:1,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:Qo(u.palette[o].main||u.palette.primary.main,.15)},children:w.jsxs(Ue,{variant:"caption",sx:{fontWeight:600,color:u.palette[o].main||u.palette.primary.main,lineHeight:1},children:["x",a]})}),w.jsxs(me,{sx:{display:"flex",alignItems:"flex-start",flex:1},children:[k$(o,u),w.jsx(me,{sx:{mt:.25},children:w.jsx(Ue,{variant:"body2",sx:{color:u.palette.text.primary,lineHeight:1.5,fontWeight:500},children:t})})]}),w.jsx(Sr,{size:"small",onClick:h,sx:{ml:1,color:u.palette.text.secondary,backgroundColor:"transparent",borderRadius:"50%",p:.5,"&:hover":{backgroundColor:Qo(u.palette.text.secondary,.08)}},children:w.jsx(Yy,{fontSize:"small"})})]}),w.jsx(me,{sx:{height:"2px",backgroundColor:u.palette.divider,position:"relative",overflow:"hidden"},children:w.jsx(UC.div,{initial:{width:"100%"},animate:{width:"0%"},transition:{duration:l/1e3,ease:"linear"},style:{height:"100%",backgroundColor:u.palette[o].main||u.palette.primary.main}})})]})})},z$=({position:e="bottom-right",autoHideDuration:t=6e3})=>{const[o,a]=b.useState([]),[s]=b.useState(!1);b.useEffect(()=>{if(typeof window<"u"){const v=(S,T="info")=>{a(E=>{const R=E.findIndex(O=>O.message===S&&O.type===T);if(R!==-1){const O=E[R],D={...O,count:(O.count??1)+1};return[...E.filter((P,M)=>M!==R),D]}const k=Math.random().toString(36).substr(2,9);return[...E,{id:k,message:S,type:T,count:1}]})};return(()=>{const S=window.__notificationQueue||[];S.length>0&&(S.forEach(({message:T,type:E="info"})=>{v(T,E)}),window.__notificationQueue=[])})(),window.showNotification=(S,T="info")=>{v(S,T)},()=>{window.showNotification=void 0}}},[]);const l=15,u=b.useCallback(v=>{a(x=>{const S=x.filter(T=>T.id!==v);return S.length>l?S.slice(S.length-l):S})},[]);b.useEffect(()=>{o.length>l&&a(v=>v.slice(-l))},[o.length]);const f=b.useMemo(()=>({"top-right":{top:24,right:24,alignItems:"flex-end","@media (max-width: 600px)":{top:16,right:16}},"top-left":{top:24,left:24,alignItems:"flex-start","@media (max-width: 600px)":{top:16,left:16}},"bottom-right":{bottom:24,right:24,alignItems:"flex-end","@media (max-width: 600px)":{bottom:16,right:16}},"bottom-left":{bottom:24,left:24,alignItems:"flex-start","@media (max-width: 600px)":{bottom:16,left:16}}})[e],[e]),d=o.length>2,h=o[o.length-1],g=s?o:h?[h]:[],y=!s&&o.length>1?o.slice(-Math.min(3,o.length)):[];return w.jsx(me,{sx:{position:"fixed",zIndex:1400,pointerEvents:"none",...f},children:w.jsxs(me,{sx:{display:"flex",flexDirection:"column",gap:1.5,pointerEvents:"none","& > *":{pointerEvents:"auto"}},children:[!s&&(o.length>1?w.jsxs(me,{sx:{position:"relative",display:"flex",flexDirection:"column"},children:[y.map((v,x)=>{const S=x===y.length-1,T=y.length-1-x,E=T*8,R=1-T*.06,k=1-T*.15;return w.jsx(me,{sx:{position:"relative",zIndex:1400-T,transform:`translateZ(0) translateY(${E}px) scale(${R})`,transformOrigin:"bottom right",mt:x===0?0:-3,opacity:k,pointerEvents:S?"auto":"none",transition:"transform 220ms ease, opacity 220ms ease",willChange:"transform, opacity"},children:w.jsx(Rm,{id:v.id,message:v.message,type:v.type,count:v.count,onDismiss:u,autoHideDuration:t})},`${v.id}-${v.count??1}`)}),d&&w.jsxs(me,{sx:{alignSelf:"flex-end",mt:.5,bgcolor:"background.paper",border:v=>`1px solid ${v.palette.divider}`,borderRadius:10,px:1,py:.25,fontSize:12,color:"text.secondary",boxShadow:1},children:["+",o.length-1]})]}):g.map(v=>w.jsx(Rm,{id:v.id,message:v.message,type:v.type,count:v.count,onDismiss:u,autoHideDuration:t},`${v.id}-${v.count??1}`))),s&&o.slice(-Math.min(3,o.length)).map(v=>w.jsx(me,{sx:{transition:"transform 0.2s ease, opacity 0.2s ease",transform:"translateY(0)",opacity:1,"&:hover":{transform:"translateY(-2px)",zIndex:1}},children:w.jsx(Rm,{id:v.id,message:v.message,type:v.type,count:v.count,onDismiss:u,autoHideDuration:t})},`${v.id}-${v.count??1}`))]})})},j$=b.createContext(void 0),P$=({children:e})=>{const t=b.useCallback((o,a="info")=>{try{if(typeof window<"u")if(window.showNotification)window.showNotification(o,a);else{const s=window.__notificationQueue||[];s.push({message:o,type:a}),window.__notificationQueue=s}console[a==="error"?"error":a==="warning"?"warn":"log"](`[Notification] ${a}:`,o)}catch(s){console.error("Error showing notification:",s)}},[]);return w.jsxs(j$.Provider,{value:{showNotification:t},children:[e,w.jsx(z$,{position:"bottom-right",autoHideDuration:5e3})]})};function B$(e){const t="ws://localhost:9230/inspector",o=b.useRef(null),[a,s]=b.useState([]),[l,u]=b.useState([]),[f,d]=b.useState("connecting"),[h,g]=b.useState([]),[y,v]=b.useState(()=>{if(typeof window<"u")try{const E=window.localStorage.getItem("rn_inspector_active_device");if(E)return E}catch{}return"all"}),x=E=>{if(E.type==="console")s(R=>[...R,E.payload].slice(-500));else if(E.type==="network")u(R=>[...R,E.payload].slice(-500));else if(E.type==="meta"){const R=E.payload;if(R?.kind==="devices"&&Array.isArray(R.devices)){const O=R.devices.map(D=>{if(!D)return null;const z=typeof D.id<"u"?String(D.id):"";if(!z)return null;const P=typeof D.label=="string"&&D.label.length>0?D.label:z,M=typeof D.url=="string"?D.url:void 0;return{id:z,label:P,url:M}}).filter(D=>D!=null);g(O),O.length>0&&v(D=>D!=="all"&&O.some(z=>z.id===D)?D:O[0]?.id??"all")}else{const O=typeof R?.message=="string"?R.message:"Proxy status changed.",D=R?.level??"info";typeof window<"u"&&typeof window.showNotification=="function"&&window.showNotification(O,D)}}};b.useEffect(()=>{let E=!1;return(()=>{if(E)return;d("connecting");const k=new WebSocket(t);o.current=k,k.addEventListener("open",()=>{d("open")}),k.addEventListener("message",O=>{try{const D=JSON.parse(O.data);x(D)}catch(D){console.warn("[ui] failed to parse proxy message",D)}}),k.addEventListener("close",()=>{E||(d("closed"),typeof window<"u"&&typeof window.showNotification=="function"&&window.showNotification("Proxy websocket closed. Click the WS chip to try reconnecting.","warning"))}),k.addEventListener("error",()=>{E||(d("error"),typeof window<"u"&&typeof window.showNotification=="function"&&window.showNotification("Proxy websocket error. Check the CLI status.","error"),k.close())})})(),()=>{E=!0,o.current?.close()}},[t]),b.useEffect(()=>{if(typeof window<"u"&&y)try{window.localStorage.setItem("rn_inspector_active_device",y)}catch{}},[y]);const S=b.useMemo(()=>({consoleCount:a.length,networkCount:l.length,status:f}),[a.length,l.length,f]);return{consoleEvents:a,networkEvents:l,status:f,stats:S,reconnect:()=>{d("connecting"),o.current?.close();const E=new WebSocket(t);o.current=E,E.addEventListener("open",()=>d("open")),E.addEventListener("message",R=>{try{const k=JSON.parse(R.data);x(k)}catch(k){console.warn("[ui] failed to parse proxy message",k)}}),E.addEventListener("close",()=>{d("closed")}),E.addEventListener("error",()=>{d("error"),typeof window<"u"&&typeof window.showNotification=="function"&&window.showNotification("Proxy websocket error. Check the CLI status.","error"),E.close()})},devices:h,activeDeviceId:y,setActiveDeviceId:v}}const TE=b.createContext(void 0),L$=({children:e})=>{const t=B$(),[o,a]=b.useState(()=>{if(typeof window<"u")try{const h=window.localStorage.getItem("rn_inspector_capture_console");if(h==="true"||h==="false")return h==="true"}catch{}return!0}),[s,l]=b.useState(()=>{if(typeof window<"u")try{const h=window.localStorage.getItem("rn_inspector_capture_network");if(h==="true"||h==="false")return h==="true"}catch{}return!0});b.useEffect(()=>{if(typeof window<"u")try{window.localStorage.setItem("rn_inspector_capture_console",String(o))}catch{}},[o]),b.useEffect(()=>{if(typeof window<"u")try{window.localStorage.setItem("rn_inspector_capture_network",String(s))}catch{}},[s]);const u=b.useMemo(()=>o?t.consoleEvents:[],[o,t.consoleEvents]),f=b.useMemo(()=>s?t.networkEvents:[],[s,t.networkEvents]),d={consoleEvents:u,networkEvents:f,status:t.status,stats:t.stats,reconnect:t.reconnect,devices:t.devices,activeDeviceId:t.activeDeviceId,setActiveDeviceId:t.setActiveDeviceId,captureConsole:o,setCaptureConsole:a,captureNetwork:s,setCaptureNetwork:l};return w.jsx(TE.Provider,{value:d,children:e})},Wy=()=>{const e=b.useContext(TE);if(!e)throw new Error("useProxy must be used within a ProxyProvider");return e};var EE=e=>{throw TypeError(e)},N$=(e,t,o)=>t.has(e)||EE("Cannot "+o),Mm=(e,t,o)=>(N$(e,t,"read from private field"),o?o.call(e):t.get(e)),$$=(e,t,o)=>t.has(e)?EE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),HC="popstate";function _$(e={}){function t(a,s){let{pathname:l,search:u,hash:f}=a.location;return Ac("",{pathname:l,search:u,hash:f},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function o(a,s){return typeof s=="string"?s:Oo(s)}return U$(t,o,null,e)}function lt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function V$(){return Math.random().toString(36).substring(2,10)}function IC(e,t){return{usr:e.state,key:e.key,idx:t}}function Ac(e,t,o=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ha(t):t,state:o,key:t&&t.key||a||V$()}}function Oo({pathname:e="/",search:t="",hash:o=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),o&&o!=="#"&&(e+=o.charAt(0)==="#"?o:"#"+o),e}function Ha(e){let t={};if(e){let o=e.indexOf("#");o>=0&&(t.hash=e.substring(o),e=e.substring(0,o));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function U$(e,t,o,a={}){let{window:s=document.defaultView,v5Compat:l=!1}=a,u=s.history,f="POP",d=null,h=g();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function g(){return(u.state||{idx:null}).idx}function y(){f="POP";let E=g(),R=E==null?null:E-h;h=E,d&&d({action:f,location:T.location,delta:R})}function v(E,R){f="PUSH";let k=Ac(T.location,E,R);h=g()+1;let O=IC(k,h),D=T.createHref(k);try{u.pushState(O,"",D)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;s.location.assign(D)}l&&d&&d({action:f,location:T.location,delta:1})}function x(E,R){f="REPLACE";let k=Ac(T.location,E,R);h=g();let O=IC(k,h),D=T.createHref(k);u.replaceState(O,"",D),l&&d&&d({action:f,location:T.location,delta:0})}function S(E){return RE(E)}let T={get action(){return f},get location(){return e(s,u)},listen(E){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(HC,y),d=E,()=>{s.removeEventListener(HC,y),d=null}},createHref(E){return t(s,E)},createURL:S,encodeLocation(E){let R=S(E);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:v,replace:x,go(E){return u.go(E)}};return T}function RE(e,t=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),lt(o,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Oo(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=o+a),new URL(a,o)}var oc,FC=class{constructor(e){if($$(this,oc,new Map),e)for(let[t,o]of e)this.set(t,o)}get(e){if(Mm(this,oc).has(e))return Mm(this,oc).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Mm(this,oc).set(e,t)}};oc=new WeakMap;var H$=new Set(["lazy","caseSensitive","path","id","index","children"]);function I$(e){return H$.has(e)}var F$=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function q$(e){return F$.has(e)}function Y$(e){return e.index===!0}function Oc(e,t,o=[],a={},s=!1){return e.map((l,u)=>{let f=[...o,String(u)],d=typeof l.id=="string"?l.id:f.join("-");if(lt(l.index!==!0||!l.children,"Cannot specify children on an index route"),lt(s||!a[d],`Found a route id collision on id "${d}". Route id's must be globally unique within Data Router usages`),Y$(l)){let h={...l,id:d};return a[d]=qC(h,t(h)),h}else{let h={...l,id:d,children:void 0};return a[d]=qC(h,t(h)),l.children&&(h.children=Oc(l.children,t,f,a,s)),h}})}function qC(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Oa(e,t,o="/"){return ac(e,t,o,!1)}function ac(e,t,o,a){let s=typeof t=="string"?Ha(t):t,l=Qr(s.pathname||"/",o);if(l==null)return null;let u=ME(e);G$(u);let f=null;for(let d=0;f==null&&d<u.length;++d){let h=a8(l);f=r8(u[d],h,a)}return f}function W$(e,t){let{route:o,pathname:a,params:s}=e;return{id:o.id,pathname:a,params:s,data:t[o.id],loaderData:t[o.id],handle:o.handle}}function ME(e,t=[],o=[],a="",s=!1){let l=(u,f,d=s,h)=>{let g={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(a)&&d)return;lt(g.relativePath.startsWith(a),`Absolute route path "${g.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(a.length)}let y=Mo([a,g.relativePath]),v=o.concat(g);u.children&&u.children.length>0&&(lt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),ME(u.children,t,v,y,d)),!(u.path==null&&!u.index)&&t.push({path:y,score:t8(y,u.index),routesMeta:v})};return e.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))l(u,f);else for(let d of AE(u.path))l(u,f,!0,d)}),t}function AE(e){let t=e.split("/");if(t.length===0)return[];let[o,...a]=t,s=o.endsWith("?"),l=o.replace(/\?$/,"");if(a.length===0)return s?[l,""]:[l];let u=AE(a.join("/")),f=[];return f.push(...u.map(d=>d===""?l:[l,d].join("/"))),s&&f.push(...u),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function G$(e){e.sort((t,o)=>t.score!==o.score?o.score-t.score:n8(t.routesMeta.map(a=>a.childrenIndex),o.routesMeta.map(a=>a.childrenIndex)))}var K$=/^:[\w-]+$/,X$=3,Q$=2,Z$=1,J$=10,e8=-2,YC=e=>e==="*";function t8(e,t){let o=e.split("/"),a=o.length;return o.some(YC)&&(a+=e8),t&&(a+=Q$),o.filter(s=>!YC(s)).reduce((s,l)=>s+(K$.test(l)?X$:l===""?Z$:J$),a)}function n8(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function r8(e,t,o=!1){let{routesMeta:a}=e,s={},l="/",u=[];for(let f=0;f<a.length;++f){let d=a[f],h=f===a.length-1,g=l==="/"?t:t.slice(l.length)||"/",y=od({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},g),v=d.route;if(!y&&h&&o&&!a[a.length-1].route.index&&(y=od({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},g)),!y)return null;Object.assign(s,y.params),u.push({params:s,pathname:Mo([l,y.pathname]),pathnameBase:c8(Mo([l,y.pathnameBase])),route:v}),y.pathnameBase!=="/"&&(l=Mo([l,y.pathnameBase]))}return u}function od(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[o,a]=o8(e.path,e.caseSensitive,e.end),s=t.match(o);if(!s)return null;let l=s[0],u=l.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((h,{paramName:g,isOptional:y},v)=>{if(g==="*"){let S=f[v]||"";u=l.slice(0,l.length-S.length).replace(/(.)\/+$/,"$1")}const x=f[v];return y&&!x?h[g]=void 0:h[g]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:u,pattern:e}}function o8(e,t=!1,o=!0){yn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,d)=>(a.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function a8(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return yn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Qr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let o=t.endsWith("/")?t.length-1:t.length,a=e.charAt(o);return a&&a!=="/"?null:e.slice(o)||"/"}function i8({basename:e,pathname:t}){return t==="/"?e:Mo([e,t])}var s8=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zd=e=>s8.test(e);function l8(e,t="/"){let{pathname:o,search:a="",hash:s=""}=typeof e=="string"?Ha(e):e,l;if(o)if(zd(o))l=o;else{if(o.includes("//")){let u=o;o=o.replace(/\/\/+/g,"/"),yn(!1,`Pathnames cannot have embedded double slashes - normalizing ${u} -> ${o}`)}o.startsWith("/")?l=WC(o.substring(1),"/"):l=WC(o,t)}else l=t;return{pathname:l,search:u8(a),hash:f8(s)}}function WC(e,t){let o=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?o.length>1&&o.pop():s!=="."&&o.push(s)}),o.length>1?o.join("/"):"/"}function Am(e,t,o,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function OE(e){return e.filter((t,o)=>o===0||t.route.path&&t.route.path.length>0)}function Gy(e){let t=OE(e);return t.map((o,a)=>a===t.length-1?o.pathname:o.pathnameBase)}function Ky(e,t,o,a=!1){let s;typeof e=="string"?s=Ha(e):(s={...e},lt(!s.pathname||!s.pathname.includes("?"),Am("?","pathname","search",s)),lt(!s.pathname||!s.pathname.includes("#"),Am("#","pathname","hash",s)),lt(!s.search||!s.search.includes("#"),Am("#","search","hash",s)));let l=e===""||s.pathname==="",u=l?"/":s.pathname,f;if(u==null)f=o;else{let y=t.length-1;if(!a&&u.startsWith("..")){let v=u.split("/");for(;v[0]==="..";)v.shift(),y-=1;s.pathname=v.join("/")}f=y>=0?t[y]:"/"}let d=l8(s,f),h=u&&u!=="/"&&u.endsWith("/"),g=(l||u===".")&&o.endsWith("/");return!d.pathname.endsWith("/")&&(h||g)&&(d.pathname+="/"),d}var Mo=e=>e.join("/").replace(/\/\/+/g,"/"),c8=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),u8=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,f8=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,jd=class{constructor(e,t,o,a=!1){this.status=e,this.statusText=t||"",this.internal=a,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Dc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function qc(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ka=Symbol("Uninstrumented");function d8(e,t){let o={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:t.id,index:t.index,path:t.path,instrument(l){let u=Object.keys(o);for(let f of u)l[f]&&o[f].push(l[f])}}));let a={};if(typeof t.lazy=="function"&&o.lazy.length>0){let s=Rs(o.lazy,t.lazy,()=>{});s&&(a.lazy=s)}if(typeof t.lazy=="object"){let s=t.lazy;["middleware","loader","action"].forEach(l=>{let u=s[l],f=o[`lazy.${l}`];if(typeof u=="function"&&f.length>0){let d=Rs(f,u,()=>{});d&&(a.lazy=Object.assign(a.lazy||{},{[l]:d}))}})}return["loader","action"].forEach(s=>{let l=t[s];if(typeof l=="function"&&o[s].length>0){let u=l[ka]??l,f=Rs(o[s],u,(...d)=>GC(d[0]));f&&(f[ka]=u,a[s]=f)}}),t.middleware&&t.middleware.length>0&&o.middleware.length>0&&(a.middleware=t.middleware.map(s=>{let l=s[ka]??s,u=Rs(o.middleware,l,(...f)=>GC(f[0]));return u?(u[ka]=l,u):s})),a}function p8(e,t){let o={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(s){let l=Object.keys(s);for(let u of l)s[u]&&o[u].push(s[u])}})),o.navigate.length>0){let a=e.navigate[ka]??e.navigate,s=Rs(o.navigate,a,(...l)=>{let[u,f]=l;return{to:typeof u=="number"||typeof u=="string"?u:u?Oo(u):".",...KC(e,f??{})}});s&&(s[ka]=a,e.navigate=s)}if(o.fetch.length>0){let a=e.fetch[ka]??e.fetch,s=Rs(o.fetch,a,(...l)=>{let[u,,f,d]=l;return{href:f??".",fetcherKey:u,...KC(e,d??{})}});s&&(s[ka]=a,e.fetch=s)}return e}function Rs(e,t,o){return e.length===0?null:async(...a)=>{let s=await DE(e,o(...a),()=>t(...a),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function DE(e,t,o,a){let s=e[a],l;if(s){let u,f=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=DE(e,t,o,a-1),l=await u,lt(l,"Expected a result"),l.type==="error"&&l.value instanceof Error?{status:"error",error:l.value}:{status:"success",error:void 0});try{await s(f,t)}catch(d){console.error("An instrumentation function threw an error:",d)}u||await f(),await u}else try{l={type:"success",value:await o()}}catch(u){l={type:"error",value:u}}return l||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function GC(e){let{request:t,context:o,params:a,unstable_pattern:s}=e;return{request:h8(t),params:{...a},unstable_pattern:s,context:m8(o)}}function KC(e,t){return{currentUrl:Oo(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function h8(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function m8(e){if(y8(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var g8=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function y8(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===g8}var kE=["POST","PUT","PATCH","DELETE"],v8=new Set(kE),b8=["GET",...kE],x8=new Set(b8),S8=new Set([301,302,303,307,308]),C8=new Set([307,308]),Om={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},w8={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},T8=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),zE="remix-router-transitions",jE=Symbol("ResetLoaderData");function E8(e){const t=e.window?e.window:typeof window<"u"?window:void 0,o=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";lt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],s=e.mapRouteProperties||T8,l=s;if(e.unstable_instrumentations){let _=e.unstable_instrumentations;l=W=>({...s(W),...d8(_.map(ee=>ee.route).filter(Boolean),W)})}let u={},f=Oc(e.routes,l,void 0,u),d,h=e.basename||"/";h.startsWith("/")||(h=`/${h}`);let g=e.dataStrategy||D8,y={...e.future},v=null,x=new Set,S=null,T=null,E=null,R=e.hydrationData!=null,k=Oa(f,e.history.location,h),O=!1,D=null,z;if(k==null&&!e.patchRoutesOnNavigation){let _=Ur(404,{pathname:e.history.location.pathname}),{matches:W,route:ee}=Cf(f);z=!0,k=W,D={[ee.id]:_}}else if(k&&!e.hydrationData&&Ie(k,f,e.history.location.pathname).active&&(k=null),k)if(k.some(_=>_.route.lazy))z=!1;else if(!k.some(_=>Xy(_.route)))z=!0;else{let _=e.hydrationData?e.hydrationData.loaderData:null,W=e.hydrationData?e.hydrationData.errors:null;if(W){let ee=k.findIndex(pe=>W[pe.route.id]!==void 0);z=k.slice(0,ee+1).every(pe=>!Cg(pe.route,_,W))}else z=k.every(ee=>!Cg(ee.route,_,W))}else{z=!1,k=[];let _=Ie(null,f,e.history.location.pathname);_.active&&_.matches&&(O=!0,k=_.matches)}let P,M={historyAction:e.history.action,location:e.history.location,matches:k,initialized:z,navigation:Om,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||D,fetchers:new Map,blockers:new Map},$="POP",V=null,I=!1,L,A=!1,F=new Map,H=null,G=!1,B=!1,q=new Set,K=new Map,te=0,ue=-1,N=new Map,X=new Set,oe=new Map,de=new Map,fe=new Set,le=new Map,ve,$e=null;function De(){if(v=e.history.listen(({action:_,location:W,delta:ee})=>{if(ve){ve(),ve=void 0;return}yn(le.size===0||ee!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let pe=Xn({currentLocation:M.location,nextLocation:W,historyAction:_});if(pe&&ee!=null){let ge=new Promise(Ae=>{ve=Ae});e.history.go(ee*-1),xn(pe,{state:"blocked",location:W,proceed(){xn(pe,{state:"proceeding",proceed:void 0,reset:void 0,location:W}),ge.then(()=>e.history.go(ee))},reset(){let Ae=new Map(M.blockers);Ae.set(pe,Xl),Re({blockers:Ae})}}),V?.resolve(),V=null;return}return bt(_,W)}),o){Y8(t,F);let _=()=>W8(t,F);t.addEventListener("pagehide",_),H=()=>t.removeEventListener("pagehide",_)}return M.initialized||bt("POP",M.location,{initialHydration:!0}),P}function je(){v&&v(),H&&H(),x.clear(),L&&L.abort(),M.fetchers.forEach((_,W)=>Qt(W)),M.blockers.forEach((_,W)=>Pt(W))}function He(_){return x.add(_),()=>x.delete(_)}function Re(_,W={}){_.matches&&(_.matches=_.matches.map(ge=>{let Ae=u[ge.route.id],we=ge.route;return we.element!==Ae.element||we.errorElement!==Ae.errorElement||we.hydrateFallbackElement!==Ae.hydrateFallbackElement?{...ge,route:Ae}:ge})),M={...M,..._};let ee=[],pe=[];M.fetchers.forEach((ge,Ae)=>{ge.state==="idle"&&(fe.has(Ae)?ee.push(Ae):pe.push(Ae))}),fe.forEach(ge=>{!M.fetchers.has(ge)&&!K.has(ge)&&ee.push(ge)}),[...x].forEach(ge=>ge(M,{deletedFetchers:ee,newErrors:_.errors??null,viewTransitionOpts:W.viewTransitionOpts,flushSync:W.flushSync===!0})),ee.forEach(ge=>Qt(ge)),pe.forEach(ge=>M.fetchers.delete(ge))}function Ct(_,W,{flushSync:ee}={}){let pe=M.actionData!=null&&M.navigation.formMethod!=null&&Yn(M.navigation.formMethod)&&M.navigation.state==="loading"&&_.state?._isRedirect!==!0,ge;W.actionData?Object.keys(W.actionData).length>0?ge=W.actionData:ge=null:pe?ge=M.actionData:ge=null;let Ae=W.loaderData?aw(M.loaderData,W.loaderData,W.matches||[],W.errors):M.loaderData,we=M.blockers;we.size>0&&(we=new Map(we),we.forEach((Pe,Be)=>we.set(Be,Xl)));let be=G?!1:ra(_,W.matches||M.matches),Ce=I===!0||M.navigation.formMethod!=null&&Yn(M.navigation.formMethod)&&_.state?._isRedirect!==!0;d&&(f=d,d=void 0),G||$==="POP"||($==="PUSH"?e.history.push(_,_.state):$==="REPLACE"&&e.history.replace(_,_.state));let ke;if($==="POP"){let Pe=F.get(M.location.pathname);Pe&&Pe.has(_.pathname)?ke={currentLocation:M.location,nextLocation:_}:F.has(_.pathname)&&(ke={currentLocation:_,nextLocation:M.location})}else if(A){let Pe=F.get(M.location.pathname);Pe?Pe.add(_.pathname):(Pe=new Set([_.pathname]),F.set(M.location.pathname,Pe)),ke={currentLocation:M.location,nextLocation:_}}Re({...W,actionData:ge,loaderData:Ae,historyAction:$,location:_,initialized:!0,navigation:Om,revalidation:"idle",restoreScrollPosition:be,preventScrollReset:Ce,blockers:we},{viewTransitionOpts:ke,flushSync:ee===!0}),$="POP",I=!1,A=!1,G=!1,B=!1,V?.resolve(),V=null,$e?.resolve(),$e=null}async function Me(_,W){if(V?.resolve(),V=null,typeof _=="number"){V||(V=cw());let Bt=V.promise;return e.history.go(_),Bt}let ee=Sg(M.location,M.matches,h,_,W?.fromRouteId,W?.relative),{path:pe,submission:ge,error:Ae}=XC(!1,ee,W),we=M.location,be=Ac(M.location,pe,W&&W.state);be={...be,...e.history.encodeLocation(be)};let Ce=W&&W.replace!=null?W.replace:void 0,ke="PUSH";Ce===!0?ke="REPLACE":Ce===!1||ge!=null&&Yn(ge.formMethod)&&ge.formAction===M.location.pathname+M.location.search&&(ke="REPLACE");let Pe=W&&"preventScrollReset"in W?W.preventScrollReset===!0:void 0,Be=(W&&W.flushSync)===!0,xt=Xn({currentLocation:we,nextLocation:be,historyAction:ke});if(xt){xn(xt,{state:"blocked",location:be,proceed(){xn(xt,{state:"proceeding",proceed:void 0,reset:void 0,location:be}),Me(_,W)},reset(){let Bt=new Map(M.blockers);Bt.set(xt,Xl),Re({blockers:Bt})}});return}await bt(ke,be,{submission:ge,pendingError:Ae,preventScrollReset:Pe,replace:W&&W.replace,enableViewTransition:W&&W.viewTransition,flushSync:Be})}function qe(){$e||($e=cw()),Ye(),Re({revalidation:"loading"});let _=$e.promise;return M.navigation.state==="submitting"?_:M.navigation.state==="idle"?(bt(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),_):(bt($||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:A===!0}),_)}async function bt(_,W,ee){L&&L.abort(),L=null,$=_,G=(ee&&ee.startUninterruptedRevalidation)===!0,eo(M.location,M.matches),I=(ee&&ee.preventScrollReset)===!0,A=(ee&&ee.enableViewTransition)===!0;let pe=d||f,ge=ee&&ee.overrideNavigation,Ae=ee?.initialHydration&&M.matches&&M.matches.length>0&&!O?M.matches:Oa(pe,W,h),we=(ee&&ee.flushSync)===!0;if(Ae&&M.initialized&&!B&&$8(M.location,W)&&!(ee&&ee.submission&&Yn(ee.submission.formMethod))){Ct(W,{matches:Ae},{flushSync:we});return}let be=Ie(Ae,pe,W.pathname);if(be.active&&be.matches&&(Ae=be.matches),!Ae){let{error:sn,notFoundMatches:Et,route:Rt}=Qn(W.pathname);Ct(W,{matches:Et,loaderData:{},errors:{[Rt.id]:sn}},{flushSync:we});return}L=new AbortController;let Ce=ys(e.history,W,L.signal,ee&&ee.submission),ke=e.getContext?await e.getContext():new FC,Pe;if(ee&&ee.pendingError)Pe=[Da(Ae).route.id,{type:"error",error:ee.pendingError}];else if(ee&&ee.submission&&Yn(ee.submission.formMethod)){let sn=await it(Ce,W,ee.submission,Ae,ke,be.active,ee&&ee.initialHydration===!0,{replace:ee.replace,flushSync:we});if(sn.shortCircuited)return;if(sn.pendingActionResult){let[Et,Rt]=sn.pendingActionResult;if(Cr(Rt)&&Dc(Rt.error)&&Rt.error.status===404){L=null,Ct(W,{matches:sn.matches,loaderData:{},errors:{[Et]:Rt.error}});return}}Ae=sn.matches||Ae,Pe=sn.pendingActionResult,ge=Dm(W,ee.submission),we=!1,be.active=!1,Ce=ys(e.history,Ce.url,Ce.signal)}let{shortCircuited:Be,matches:xt,loaderData:Bt,errors:Wt}=await Xe(Ce,W,Ae,ke,be.active,ge,ee&&ee.submission,ee&&ee.fetcherSubmission,ee&&ee.replace,ee&&ee.initialHydration===!0,we,Pe);Be||(L=null,Ct(W,{matches:xt||Ae,...iw(Pe),loaderData:Bt,errors:Wt}))}async function it(_,W,ee,pe,ge,Ae,we,be={}){Ye();let Ce=F8(W,ee);if(Re({navigation:Ce},{flushSync:be.flushSync===!0}),Ae){let Be=await Mn(pe,W.pathname,_.signal);if(Be.type==="aborted")return{shortCircuited:!0};if(Be.type==="error"){if(Be.partialMatches.length===0){let{matches:Bt,route:Wt}=Cf(f);return{matches:Bt,pendingActionResult:[Wt.id,{type:"error",error:Be.error}]}}let xt=Da(Be.partialMatches).route.id;return{matches:Be.partialMatches,pendingActionResult:[xt,{type:"error",error:Be.error}]}}else if(Be.matches)pe=Be.matches;else{let{notFoundMatches:xt,error:Bt,route:Wt}=Qn(W.pathname);return{matches:xt,pendingActionResult:[Wt.id,{type:"error",error:Bt}]}}}let ke,Pe=Bf(pe,W);if(!Pe.route.action&&!Pe.route.lazy)ke={type:"error",error:Ur(405,{method:_.method,pathname:W.pathname,routeId:Pe.route.id})};else{let Be=Ds(l,u,_,pe,Pe,we?[]:a,ge),xt=await on(_,Be,ge,null);if(ke=xt[Pe.route.id],!ke){for(let Bt of pe)if(xt[Bt.route.id]){ke=xt[Bt.route.id];break}}if(_.signal.aborted)return{shortCircuited:!0}}if(bi(ke)){let Be;return be&&be.replace!=null?Be=be.replace:Be=nw(ke.response.headers.get("Location"),new URL(_.url),h)===M.location.pathname+M.location.search,await _e(_,ke,!0,{submission:ee,replace:Be}),{shortCircuited:!0}}if(Cr(ke)){let Be=Da(pe,Pe.route.id);return(be&&be.replace)!==!0&&($="PUSH"),{matches:pe,pendingActionResult:[Be.route.id,ke,Pe.route.id]}}return{matches:pe,pendingActionResult:[Pe.route.id,ke]}}async function Xe(_,W,ee,pe,ge,Ae,we,be,Ce,ke,Pe,Be){let xt=Ae||Dm(W,we),Bt=we||be||lw(xt),Wt=!G&&!ke;if(ge){if(Wt){let Dn=Ze(Be);Re({navigation:xt,...Dn!==void 0?{actionData:Dn}:{}},{flushSync:Pe})}let gt=await Mn(ee,W.pathname,_.signal);if(gt.type==="aborted")return{shortCircuited:!0};if(gt.type==="error"){if(gt.partialMatches.length===0){let{matches:to,route:Or}=Cf(f);return{matches:to,loaderData:{},errors:{[Or.id]:gt.error}}}let Dn=Da(gt.partialMatches).route.id;return{matches:gt.partialMatches,loaderData:{},errors:{[Dn]:gt.error}}}else if(gt.matches)ee=gt.matches;else{let{error:Dn,notFoundMatches:to,route:Or}=Qn(W.pathname);return{matches:to,loaderData:{},errors:{[Or.id]:Dn}}}}let sn=d||f,{dsMatches:Et,revalidatingFetchers:Rt}=QC(_,pe,l,u,e.history,M,ee,Bt,W,ke?[]:a,ke===!0,B,q,fe,oe,X,sn,h,e.patchRoutesOnNavigation!=null,Be);if(ue=++te,!e.dataStrategy&&!Et.some(gt=>gt.shouldLoad)&&!Et.some(gt=>gt.route.middleware&&gt.route.middleware.length>0)&&Rt.length===0){let gt=Yt();return Ct(W,{matches:ee,loaderData:{},errors:Be&&Cr(Be[1])?{[Be[0]]:Be[1].error}:null,...iw(Be),...gt?{fetchers:new Map(M.fetchers)}:{}},{flushSync:Pe}),{shortCircuited:!0}}if(Wt){let gt={};if(!ge){gt.navigation=xt;let Dn=Ze(Be);Dn!==void 0&&(gt.actionData=Dn)}Rt.length>0&&(gt.fetchers=ht(Rt)),Re(gt,{flushSync:Pe})}Rt.forEach(gt=>{mt(gt.key),gt.controller&&K.set(gt.key,gt.controller)});let fr=()=>Rt.forEach(gt=>mt(gt.key));L&&L.signal.addEventListener("abort",fr);let{loaderResults:Ar,fetcherResults:Ft}=await wt(Et,Rt,_,pe);if(_.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",fr),Rt.forEach(gt=>K.delete(gt.key));let dr=wf(Ar);if(dr)return await _e(_,dr.result,!0,{replace:Ce}),{shortCircuited:!0};if(dr=wf(Ft),dr)return X.add(dr.key),await _e(_,dr.result,!0,{replace:Ce}),{shortCircuited:!0};let{loaderData:Ai,errors:pr}=ow(M,ee,Ar,Be,Rt,Ft);ke&&M.errors&&(pr={...M.errors,...pr});let Zn=Yt(),Oi=ze(ue),Fa=Zn||Oi||Rt.length>0;return{matches:ee,loaderData:Ai,errors:pr,...Fa?{fetchers:new Map(M.fetchers)}:{}}}function Ze(_){if(_&&!Cr(_[1]))return{[_[0]]:_[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function ht(_){return _.forEach(W=>{let ee=M.fetchers.get(W.key),pe=Ql(void 0,ee?ee.data:void 0);M.fetchers.set(W.key,pe)}),new Map(M.fetchers)}async function Qe(_,W,ee,pe){mt(_);let ge=(pe&&pe.flushSync)===!0,Ae=d||f,we=Sg(M.location,M.matches,h,ee,W,pe?.relative),be=Oa(Ae,we,h),Ce=Ie(be,Ae,we);if(Ce.active&&Ce.matches&&(be=Ce.matches),!be){ct(_,W,Ur(404,{pathname:we}),{flushSync:ge});return}let{path:ke,submission:Pe,error:Be}=XC(!0,we,pe);if(Be){ct(_,W,Be,{flushSync:ge});return}let xt=e.getContext?await e.getContext():new FC,Bt=(pe&&pe.preventScrollReset)===!0;if(Pe&&Yn(Pe.formMethod)){await Se(_,W,ke,be,xt,Ce.active,ge,Bt,Pe);return}oe.set(_,{routeId:W,path:ke}),await rn(_,W,ke,be,xt,Ce.active,ge,Bt,Pe)}async function Se(_,W,ee,pe,ge,Ae,we,be,Ce){Ye(),oe.delete(_);let ke=M.fetchers.get(_);st(_,q8(Ce,ke),{flushSync:we});let Pe=new AbortController,Be=ys(e.history,ee,Pe.signal,Ce);if(Ae){let Mt=await Mn(pe,new URL(Be.url).pathname,Be.signal,_);if(Mt.type==="aborted")return;if(Mt.type==="error"){ct(_,W,Mt.error,{flushSync:we});return}else if(Mt.matches)pe=Mt.matches;else{ct(_,W,Ur(404,{pathname:ee}),{flushSync:we});return}}let xt=Bf(pe,ee);if(!xt.route.action&&!xt.route.lazy){let Mt=Ur(405,{method:Ce.formMethod,pathname:ee,routeId:W});ct(_,W,Mt,{flushSync:we});return}K.set(_,Pe);let Bt=te,Wt=Ds(l,u,Be,pe,xt,a,ge),sn=await on(Be,Wt,ge,_),Et=sn[xt.route.id];if(!Et){for(let Mt of Wt)if(sn[Mt.route.id]){Et=sn[Mt.route.id];break}}if(Be.signal.aborted){K.get(_)===Pe&&K.delete(_);return}if(fe.has(_)){if(bi(Et)||Cr(Et)){st(_,Xo(void 0));return}}else{if(bi(Et))if(K.delete(_),ue>Bt){st(_,Xo(void 0));return}else return X.add(_),st(_,Ql(Ce)),_e(Be,Et,!1,{fetcherSubmission:Ce,preventScrollReset:be});if(Cr(Et)){ct(_,W,Et.error);return}}let Rt=M.navigation.location||M.location,fr=ys(e.history,Rt,Pe.signal),Ar=d||f,Ft=M.navigation.state!=="idle"?Oa(Ar,M.navigation.location,h):M.matches;lt(Ft,"Didn't find any matches after fetcher action");let dr=++te;N.set(_,dr);let Ai=Ql(Ce,Et.data);M.fetchers.set(_,Ai);let{dsMatches:pr,revalidatingFetchers:Zn}=QC(fr,ge,l,u,e.history,M,Ft,Ce,Rt,a,!1,B,q,fe,oe,X,Ar,h,e.patchRoutesOnNavigation!=null,[xt.route.id,Et]);Zn.filter(Mt=>Mt.key!==_).forEach(Mt=>{let jn=Mt.key,Xs=M.fetchers.get(jn),Ld=Ql(void 0,Xs?Xs.data:void 0);M.fetchers.set(jn,Ld),mt(jn),Mt.controller&&K.set(jn,Mt.controller)}),Re({fetchers:new Map(M.fetchers)});let Oi=()=>Zn.forEach(Mt=>mt(Mt.key));Pe.signal.addEventListener("abort",Oi);let{loaderResults:Fa,fetcherResults:gt}=await wt(pr,Zn,fr,ge);if(Pe.signal.aborted)return;if(Pe.signal.removeEventListener("abort",Oi),N.delete(_),K.delete(_),Zn.forEach(Mt=>K.delete(Mt.key)),M.fetchers.has(_)){let Mt=Xo(Et.data);M.fetchers.set(_,Mt)}let Dn=wf(Fa);if(Dn)return _e(fr,Dn.result,!1,{preventScrollReset:be});if(Dn=wf(gt),Dn)return X.add(Dn.key),_e(fr,Dn.result,!1,{preventScrollReset:be});let{loaderData:to,errors:Or}=ow(M,Ft,Fa,void 0,Zn,gt);ze(dr),M.navigation.state==="loading"&&dr>ue?(lt($,"Expected pending action"),L&&L.abort(),Ct(M.navigation.location,{matches:Ft,loaderData:to,errors:Or,fetchers:new Map(M.fetchers)})):(Re({errors:Or,loaderData:aw(M.loaderData,to,Ft,Or),fetchers:new Map(M.fetchers)}),B=!1)}async function rn(_,W,ee,pe,ge,Ae,we,be,Ce){let ke=M.fetchers.get(_);st(_,Ql(Ce,ke?ke.data:void 0),{flushSync:we});let Pe=new AbortController,Be=ys(e.history,ee,Pe.signal);if(Ae){let Rt=await Mn(pe,new URL(Be.url).pathname,Be.signal,_);if(Rt.type==="aborted")return;if(Rt.type==="error"){ct(_,W,Rt.error,{flushSync:we});return}else if(Rt.matches)pe=Rt.matches;else{ct(_,W,Ur(404,{pathname:ee}),{flushSync:we});return}}let xt=Bf(pe,ee);K.set(_,Pe);let Bt=te,Wt=Ds(l,u,Be,pe,xt,a,ge),Et=(await on(Be,Wt,ge,_))[xt.route.id];if(K.get(_)===Pe&&K.delete(_),!Be.signal.aborted){if(fe.has(_)){st(_,Xo(void 0));return}if(bi(Et))if(ue>Bt){st(_,Xo(void 0));return}else{X.add(_),await _e(Be,Et,!1,{preventScrollReset:be});return}if(Cr(Et)){ct(_,W,Et.error);return}st(_,Xo(Et.data))}}async function _e(_,W,ee,{submission:pe,fetcherSubmission:ge,preventScrollReset:Ae,replace:we}={}){ee||(V?.resolve(),V=null),W.response.headers.has("X-Remix-Revalidate")&&(B=!0);let be=W.response.headers.get("Location");lt(be,"Expected a Location header on the redirect Response"),be=nw(be,new URL(_.url),h);let Ce=Ac(M.location,be,{_isRedirect:!0});if(o){let Wt=!1;if(W.response.headers.has("X-Remix-Reload-Document"))Wt=!0;else if(zd(be)){const sn=RE(be,!0);Wt=sn.origin!==t.location.origin||Qr(sn.pathname,h)==null}if(Wt){we?t.location.replace(be):t.location.assign(be);return}}L=null;let ke=we===!0||W.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Pe,formAction:Be,formEncType:xt}=M.navigation;!pe&&!ge&&Pe&&Be&&xt&&(pe=lw(M.navigation));let Bt=pe||ge;if(C8.has(W.response.status)&&Bt&&Yn(Bt.formMethod))await bt(ke,Ce,{submission:{...Bt,formAction:be},preventScrollReset:Ae||I,enableViewTransition:ee?A:void 0});else{let Wt=Dm(Ce,pe);await bt(ke,Ce,{overrideNavigation:Wt,fetcherSubmission:ge,preventScrollReset:Ae||I,enableViewTransition:ee?A:void 0})}}async function on(_,W,ee,pe){let ge,Ae={};try{ge=await z8(g,_,W,pe,ee,!1)}catch(we){return W.filter(be=>be.shouldLoad).forEach(be=>{Ae[be.route.id]={type:"error",error:we}}),Ae}if(_.signal.aborted)return Ae;for(let[we,be]of Object.entries(ge))if(H8(be)){let Ce=be.result;Ae[we]={type:"redirect",response:L8(Ce,_,we,W,h)}}else Ae[we]=await B8(be);return Ae}async function wt(_,W,ee,pe){let ge=on(ee,_,pe,null),Ae=Promise.all(W.map(async Ce=>{if(Ce.matches&&Ce.match&&Ce.request&&Ce.controller){let Pe=(await on(Ce.request,Ce.matches,pe,Ce.key))[Ce.match.route.id];return{[Ce.key]:Pe}}else return Promise.resolve({[Ce.key]:{type:"error",error:Ur(404,{pathname:Ce.path})}})})),we=await ge,be=(await Ae).reduce((Ce,ke)=>Object.assign(Ce,ke),{});return{loaderResults:we,fetcherResults:be}}function Ye(){B=!0,oe.forEach((_,W)=>{K.has(W)&&q.add(W),mt(W)})}function st(_,W,ee={}){M.fetchers.set(_,W),Re({fetchers:new Map(M.fetchers)},{flushSync:(ee&&ee.flushSync)===!0})}function ct(_,W,ee,pe={}){let ge=Da(M.matches,W);Qt(_),Re({errors:{[ge.route.id]:ee},fetchers:new Map(M.fetchers)},{flushSync:(pe&&pe.flushSync)===!0})}function an(_){return de.set(_,(de.get(_)||0)+1),fe.has(_)&&fe.delete(_),M.fetchers.get(_)||w8}function Ge(_,W){mt(_,W?.reason),st(_,Xo(null))}function Qt(_){let W=M.fetchers.get(_);K.has(_)&&!(W&&W.state==="loading"&&N.has(_))&&mt(_),oe.delete(_),N.delete(_),X.delete(_),fe.delete(_),q.delete(_),M.fetchers.delete(_)}function Zt(_){let W=(de.get(_)||0)-1;W<=0?(de.delete(_),fe.add(_)):de.set(_,W),Re({fetchers:new Map(M.fetchers)})}function mt(_,W){let ee=K.get(_);ee&&(ee.abort(W),K.delete(_))}function bn(_){for(let W of _){let ee=an(W),pe=Xo(ee.data);M.fetchers.set(W,pe)}}function Yt(){let _=[],W=!1;for(let ee of X){let pe=M.fetchers.get(ee);lt(pe,`Expected fetcher: ${ee}`),pe.state==="loading"&&(X.delete(ee),_.push(ee),W=!0)}return bn(_),W}function ze(_){let W=[];for(let[ee,pe]of N)if(pe<_){let ge=M.fetchers.get(ee);lt(ge,`Expected fetcher: ${ee}`),ge.state==="loading"&&(mt(ee),N.delete(ee),W.push(ee))}return bn(W),W.length>0}function ut(_,W){let ee=M.blockers.get(_)||Xl;return le.get(_)!==W&&le.set(_,W),ee}function Pt(_){M.blockers.delete(_),le.delete(_)}function xn(_,W){let ee=M.blockers.get(_)||Xl;lt(ee.state==="unblocked"&&W.state==="blocked"||ee.state==="blocked"&&W.state==="blocked"||ee.state==="blocked"&&W.state==="proceeding"||ee.state==="blocked"&&W.state==="unblocked"||ee.state==="proceeding"&&W.state==="unblocked",`Invalid blocker state transition: ${ee.state} -> ${W.state}`);let pe=new Map(M.blockers);pe.set(_,W),Re({blockers:pe})}function Xn({currentLocation:_,nextLocation:W,historyAction:ee}){if(le.size===0)return;le.size>1&&yn(!1,"A router only supports one blocker at a time");let pe=Array.from(le.entries()),[ge,Ae]=pe[pe.length-1],we=M.blockers.get(ge);if(!(we&&we.state==="proceeding")&&Ae({currentLocation:_,nextLocation:W,historyAction:ee}))return ge}function Qn(_){let W=Ur(404,{pathname:_}),ee=d||f,{matches:pe,route:ge}=Cf(ee);return{notFoundMatches:pe,route:ge,error:W}}function ur(_,W,ee){if(S=_,E=W,T=ee||null,!R&&M.navigation===Om){R=!0;let pe=ra(M.location,M.matches);pe!=null&&Re({restoreScrollPosition:pe})}return()=>{S=null,E=null,T=null}}function Jr(_,W){return T&&T(_,W.map(pe=>W$(pe,M.loaderData)))||_.key}function eo(_,W){if(S&&E){let ee=Jr(_,W);S[ee]=E()}}function ra(_,W){if(S){let ee=Jr(_,W),pe=S[ee];if(typeof pe=="number")return pe}return null}function Ie(_,W,ee){if(e.patchRoutesOnNavigation)if(_){if(Object.keys(_[0].params).length>0)return{active:!0,matches:ac(W,ee,h,!0)}}else return{active:!0,matches:ac(W,ee,h,!0)||[]};return{active:!1,matches:null}}async function Mn(_,W,ee,pe){if(!e.patchRoutesOnNavigation)return{type:"success",matches:_};let ge=_;for(;;){let Ae=d==null,we=d||f,be=u;try{await e.patchRoutesOnNavigation({signal:ee,path:W,matches:ge,fetcherKey:pe,patch:(Pe,Be)=>{ee.aborted||ZC(Pe,Be,we,be,l,!1)}})}catch(Pe){return{type:"error",error:Pe,partialMatches:ge}}finally{Ae&&!ee.aborted&&(f=[...f])}if(ee.aborted)return{type:"aborted"};let Ce=Oa(we,W,h),ke=null;if(Ce){if(Object.keys(Ce[0].params).length===0)return{type:"success",matches:Ce};if(ke=ac(we,W,h,!0),!(ke&&ge.length<ke.length&&xe(ge,ke.slice(0,ge.length))))return{type:"success",matches:Ce}}if(ke||(ke=ac(we,W,h,!0)),!ke||xe(ge,ke))return{type:"success",matches:null};ge=ke}}function xe(_,W){return _.length===W.length&&_.every((ee,pe)=>ee.route.id===W[pe].route.id)}function Le(_){u={},d=Oc(_,l,void 0,u)}function Tt(_,W,ee=!1){let pe=d==null;ZC(_,W,d||f,u,l,ee),pe&&(f=[...f],Re({}))}return P={get basename(){return h},get future(){return y},get state(){return M},get routes(){return f},get window(){return t},initialize:De,subscribe:He,enableScrollRestoration:ur,navigate:Me,fetch:Qe,revalidate:qe,createHref:_=>e.history.createHref(_),encodeLocation:_=>e.history.encodeLocation(_),getFetcher:an,resetFetcher:Ge,deleteFetcher:Zt,dispose:je,getBlocker:ut,deleteBlocker:Pt,patchRoutes:Tt,_internalFetchControllers:K,_internalSetRoutes:Le,_internalSetStateDoNotUseOrYouWillBreakYourApp(_){Re(_)}},e.unstable_instrumentations&&(P=p8(P,e.unstable_instrumentations.map(_=>_.router).filter(Boolean))),P}function R8(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Sg(e,t,o,a,s,l){let u,f;if(s){u=[];for(let h of t)if(u.push(h),h.route.id===s){f=h;break}}else u=t,f=t[t.length-1];let d=Ky(a||".",Gy(u),Qr(e.pathname,o)||e.pathname,l==="path");if(a==null&&(d.search=e.search,d.hash=e.hash),(a==null||a===""||a===".")&&f){let h=Qy(d.search);if(f.route.index&&!h)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&h){let g=new URLSearchParams(d.search),y=g.getAll("index");g.delete("index"),y.filter(x=>x).forEach(x=>g.append("index",x));let v=g.toString();d.search=v?`?${v}`:""}}return o!=="/"&&(d.pathname=i8({basename:o,pathname:d.pathname})),Oo(d)}function XC(e,t,o){if(!o||!R8(o))return{path:t};if(o.formMethod&&!I8(o.formMethod))return{path:t,error:Ur(405,{method:o.formMethod})};let a=()=>({path:t,error:Ur(400,{type:"invalid-body"})}),l=(o.formMethod||"get").toUpperCase(),u=_E(t);if(o.body!==void 0){if(o.formEncType==="text/plain"){if(!Yn(l))return a();let y=typeof o.body=="string"?o.body:o.body instanceof FormData||o.body instanceof URLSearchParams?Array.from(o.body.entries()).reduce((v,[x,S])=>`${v}${x}=${S}
154
154
  `,""):String(o.body);return{path:t,submission:{formMethod:l,formAction:u,formEncType:o.formEncType,formData:void 0,json:void 0,text:y}}}else if(o.formEncType==="application/json"){if(!Yn(l))return a();try{let y=typeof o.body=="string"?JSON.parse(o.body):o.body;return{path:t,submission:{formMethod:l,formAction:u,formEncType:o.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}lt(typeof FormData=="function","FormData is not available in this environment");let f,d;if(o.formData)f=Tg(o.formData),d=o.formData;else if(o.body instanceof FormData)f=Tg(o.body),d=o.body;else if(o.body instanceof URLSearchParams)f=o.body,d=rw(f);else if(o.body==null)f=new URLSearchParams,d=new FormData;else try{f=new URLSearchParams(o.body),d=rw(f)}catch{return a()}let h={formMethod:l,formAction:u,formEncType:o&&o.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(Yn(h.formMethod))return{path:t,submission:h};let g=Ha(t);return e&&g.search&&Qy(g.search)&&f.append("index",""),g.search=`?${f}`,{path:Oo(g),submission:h}}function QC(e,t,o,a,s,l,u,f,d,h,g,y,v,x,S,T,E,R,k,O){let D=O?Cr(O[1])?O[1].error:O[1].data:void 0,z=s.createURL(l.location),P=s.createURL(d),M;if(g&&l.errors){let H=Object.keys(l.errors)[0];M=u.findIndex(G=>G.route.id===H)}else if(O&&Cr(O[1])){let H=O[0];M=u.findIndex(G=>G.route.id===H)-1}let $=O?O[1].statusCode:void 0,V=$&&$>=400,I={currentUrl:z,currentParams:l.matches[0]?.params||{},nextUrl:P,nextParams:u[0].params,...f,actionResult:D,actionStatus:$},L=qc(u),A=u.map((H,G)=>{let{route:B}=H,q=null;if(M!=null&&G>M?q=!1:B.lazy?q=!0:Xy(B)?g?q=Cg(B,l.loaderData,l.errors):M8(l.loaderData,l.matches[G],H)&&(q=!0):q=!1,q!==null)return wg(o,a,e,L,H,h,t,q);let K=V?!1:y||z.pathname+z.search===P.pathname+P.search||z.search!==P.search||A8(l.matches[G],H),te={...I,defaultShouldRevalidate:K},ue=ad(H,te);return wg(o,a,e,L,H,h,t,ue,te)}),F=[];return S.forEach((H,G)=>{if(g||!u.some(oe=>oe.route.id===H.routeId)||x.has(G))return;let B=l.fetchers.get(G),q=B&&B.state!=="idle"&&B.data===void 0,K=Oa(E,H.path,R);if(!K){if(k&&q)return;F.push({key:G,routeId:H.routeId,path:H.path,matches:null,match:null,request:null,controller:null});return}if(T.has(G))return;let te=Bf(K,H.path),ue=new AbortController,N=ys(s,H.path,ue.signal),X=null;if(v.has(G))v.delete(G),X=Ds(o,a,N,K,te,h,t);else if(q)y&&(X=Ds(o,a,N,K,te,h,t));else{let oe={...I,defaultShouldRevalidate:V?!1:y};ad(te,oe)&&(X=Ds(o,a,N,K,te,h,t,oe))}X&&F.push({key:G,routeId:H.routeId,path:H.path,matches:X,match:te,request:N,controller:ue})}),{dsMatches:A,revalidatingFetchers:F}}function Xy(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Cg(e,t,o){if(e.lazy)return!0;if(!Xy(e))return!1;let a=t!=null&&e.id in t,s=o!=null&&o[e.id]!==void 0;return!a&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!s}function M8(e,t,o){let a=!t||o.route.id!==t.route.id,s=!e.hasOwnProperty(o.route.id);return a||s}function A8(e,t){let o=e.route.path;return e.pathname!==t.pathname||o!=null&&o.endsWith("*")&&e.params["*"]!==t.params["*"]}function ad(e,t){if(e.route.shouldRevalidate){let o=e.route.shouldRevalidate(t);if(typeof o=="boolean")return o}return t.defaultShouldRevalidate}function ZC(e,t,o,a,s,l){let u;if(e){let h=a[e];lt(h,`No route found to patch children into: routeId = ${e}`),h.children||(h.children=[]),u=h.children}else u=o;let f=[],d=[];if(t.forEach(h=>{let g=u.find(y=>PE(h,y));g?d.push({existingRoute:g,newRoute:h}):f.push(h)}),f.length>0){let h=Oc(f,s,[e||"_","patch",String(u?.length||"0")],a);u.push(...h)}if(l&&d.length>0)for(let h=0;h<d.length;h++){let{existingRoute:g,newRoute:y}=d[h],v=g,[x]=Oc([y],s,[],{},!0);Object.assign(v,{element:x.element?x.element:v.element,errorElement:x.errorElement?x.errorElement:v.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:v.hydrateFallbackElement})}}function PE(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((o,a)=>t.children?.some(s=>PE(o,s))):!1}var JC=new WeakMap,BE=({key:e,route:t,manifest:o,mapRouteProperties:a})=>{let s=o[t.id];if(lt(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let l=s.lazy[e];if(!l)return;let u=JC.get(s);u||(u={},JC.set(s,u));let f=u[e];if(f)return f;let d=(async()=>{let h=I$(e),y=s[e]!==void 0&&e!=="hasErrorBoundary";if(h)yn(!h,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(y)yn(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let v=await l();v!=null&&(Object.assign(s,{[e]:v}),Object.assign(s,a(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(v=>v===void 0)&&(s.lazy=void 0))})();return u[e]=d,d},ew=new WeakMap;function O8(e,t,o,a,s){let l=o[e.id];if(lt(l,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let g=ew.get(l);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let y=(async()=>{lt(typeof e.lazy=="function","No lazy route function found");let v=await e.lazy(),x={};for(let S in v){let T=v[S];if(T===void 0)continue;let E=q$(S),k=l[S]!==void 0&&S!=="hasErrorBoundary";E?yn(!E,"Route property "+S+" is not a supported property to be returned from a lazy route function. This property will be ignored."):k?yn(!k,`Route "${l.id}" has a static property "${S}" defined but its lazy function is also returning a value for this property. The lazy route property "${S}" will be ignored.`):x[S]=T}Object.assign(l,x),Object.assign(l,{...a(l),lazy:void 0})})();return ew.set(l,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let u=Object.keys(e.lazy),f=[],d;for(let g of u){if(s&&s.includes(g))continue;let y=BE({key:g,route:e,manifest:o,mapRouteProperties:a});y&&(f.push(y),g===t&&(d=y))}let h=f.length>0?Promise.all(f).then(()=>{}):void 0;return h?.catch(()=>{}),d?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:d}}async function tw(e){let t=e.matches.filter(s=>s.shouldLoad),o={};return(await Promise.all(t.map(s=>s.resolve()))).forEach((s,l)=>{o[t[l].route.id]=s}),o}async function D8(e){return e.matches.some(t=>t.route.middleware)?LE(e,()=>tw(e)):tw(e)}function LE(e,t){return k8(e,t,a=>a,V8,o);function o(a,s,l){if(l)return Promise.resolve(Object.assign(l.value,{[s]:{type:"error",result:a}}));{let{matches:u}=e,f=Math.min(Math.max(u.findIndex(h=>h.route.id===s),0),Math.max(u.findIndex(h=>h.shouldCallHandler()),0)),d=Da(u,u[f].route.id).route.id;return Promise.resolve({[d]:{type:"error",result:a}})}}}async function k8(e,t,o,a,s){let{matches:l,request:u,params:f,context:d,unstable_pattern:h}=e,g=l.flatMap(v=>v.route.middleware?v.route.middleware.map(x=>[v.route.id,x]):[]);return await NE({request:u,params:f,context:d,unstable_pattern:h},g,t,o,a,s)}async function NE(e,t,o,a,s,l,u=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let d=t[u];if(!d)return await o();let[h,g]=d,y,v=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await NE(e,t,o,a,s,l,u+1)},y.value}catch(x){return y={value:await l(x,h,y)},y.value}};try{let x=await g(e,v),S=x!=null?a(x):void 0;return s(S)?S:y?S??y.value:(y={value:await v()},y.value)}catch(x){return await l(x,h,y)}}function $E(e,t,o,a,s){let l=BE({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),u=O8(a.route,Yn(o.method)?"action":"loader",t,e,s);return{middleware:l,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function wg(e,t,o,a,s,l,u,f,d=null){let h=!1,g=$E(e,t,o,s,l);return{...s,_lazyPromises:g,shouldLoad:f,shouldRevalidateArgs:d,shouldCallHandler(y){return h=!0,d?typeof y=="boolean"?ad(s,{...d,defaultShouldRevalidate:y}):ad(s,d):f},resolve(y){let{lazy:v,loader:x,middleware:S}=s.route,T=h||f||y&&!Yn(o.method)&&(v||x),E=S&&S.length>0&&!x&&!v;return T&&(Yn(o.method)||!E)?j8({request:o,unstable_pattern:a,match:s,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:y,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function Ds(e,t,o,a,s,l,u,f=null){return a.map(d=>d.route.id!==s.route.id?{...d,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:$E(e,t,o,d,l),resolve:()=>Promise.resolve({type:"data",result:void 0})}:wg(e,t,o,qc(a),d,l,u,!0,f))}async function z8(e,t,o,a,s,l){o.some(h=>h._lazyPromises?.middleware)&&await Promise.all(o.map(h=>h._lazyPromises?.middleware));let u={request:t,unstable_pattern:qc(o),params:o[0].params,context:s,matches:o},d=await e({...u,fetcherKey:a,runClientMiddleware:h=>{let g=u;return LE(g,()=>h({...g,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return d}async function j8({request:e,unstable_pattern:t,match:o,lazyHandlerPromise:a,lazyRoutePromise:s,handlerOverride:l,scopedContext:u}){let f,d,h=Yn(e.method),g=h?"action":"loader",y=v=>{let x,S=new Promise((R,k)=>x=k);d=()=>x(),e.signal.addEventListener("abort",d);let T=R=>typeof v!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${g}" [routeId: ${o.route.id}]`)):v({request:e,unstable_pattern:t,params:o.params,context:u},...R!==void 0?[R]:[]),E=(async()=>{try{return{type:"data",result:await(l?l(k=>T(k)):T())}}catch(R){return{type:"error",result:R}}})();return Promise.race([E,S])};try{let v=h?o.route.action:o.route.loader;if(a||s)if(v){let x,[S]=await Promise.all([y(v).catch(T=>{x=T}),a,s]);if(x!==void 0)throw x;f=S}else{await a;let x=h?o.route.action:o.route.loader;if(x)[f]=await Promise.all([y(x),s]);else if(g==="action"){let S=new URL(e.url),T=S.pathname+S.search;throw Ur(405,{method:e.method,pathname:T,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(v)f=await y(v);else{let x=new URL(e.url),S=x.pathname+x.search;throw Ur(404,{pathname:S})}}catch(v){return{type:"error",result:v}}finally{d&&e.signal.removeEventListener("abort",d)}return f}async function P8(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function B8(e){let{result:t,type:o}=e;if(VE(t)){let a;try{a=await P8(t)}catch(s){return{type:"error",error:s}}return o==="error"?{type:"error",error:new jd(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return o==="error"?sw(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:_8(t),statusCode:Dc(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Dc(t)?t.status:void 0}:sw(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function L8(e,t,o,a,s){let l=e.headers.get("Location");if(lt(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!zd(l)){let u=a.slice(0,a.findIndex(f=>f.route.id===o)+1);l=Sg(new URL(t.url),u,s,l),e.headers.set("Location",l)}return e}function nw(e,t,o){if(zd(e)){let a=e,s=a.startsWith("//")?new URL(t.protocol+a):new URL(a),l=Qr(s.pathname,o)!=null;if(s.origin===t.origin&&l)return s.pathname+s.search+s.hash}return e}function ys(e,t,o,a){let s=e.createURL(_E(t)).toString(),l={signal:o};if(a&&Yn(a.formMethod)){let{formMethod:u,formEncType:f}=a;l.method=u.toUpperCase(),f==="application/json"?(l.headers=new Headers({"Content-Type":f}),l.body=JSON.stringify(a.json)):f==="text/plain"?l.body=a.text:f==="application/x-www-form-urlencoded"&&a.formData?l.body=Tg(a.formData):l.body=a.formData}return new Request(s,l)}function Tg(e){let t=new URLSearchParams;for(let[o,a]of e.entries())t.append(o,typeof a=="string"?a:a.name);return t}function rw(e){let t=new FormData;for(let[o,a]of e.entries())t.append(o,a);return t}function N8(e,t,o,a=!1,s=!1){let l={},u=null,f,d=!1,h={},g=o&&Cr(o[1])?o[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in t))return;let v=y.route.id,x=t[v];if(lt(!bi(x),"Cannot handle redirect results in processLoaderData"),Cr(x)){let S=x.error;if(g!==void 0&&(S=g,g=void 0),u=u||{},s)u[v]=S;else{let T=Da(e,v);u[T.route.id]==null&&(u[T.route.id]=S)}a||(l[v]=jE),d||(d=!0,f=Dc(x.error)?x.error.status:500),x.headers&&(h[v]=x.headers)}else l[v]=x.data,x.statusCode&&x.statusCode!==200&&!d&&(f=x.statusCode),x.headers&&(h[v]=x.headers)}),g!==void 0&&o&&(u={[o[0]]:g},o[2]&&(l[o[2]]=void 0)),{loaderData:l,errors:u,statusCode:f||200,loaderHeaders:h}}function ow(e,t,o,a,s,l){let{loaderData:u,errors:f}=N8(t,o,a);return s.filter(d=>!d.matches||d.matches.some(h=>h.shouldLoad)).forEach(d=>{let{key:h,match:g,controller:y}=d;if(y&&y.signal.aborted)return;let v=l[h];if(lt(v,"Did not find corresponding fetcher result"),Cr(v)){let x=Da(e.matches,g?.route.id);f&&f[x.route.id]||(f={...f,[x.route.id]:v.error}),e.fetchers.delete(h)}else if(bi(v))lt(!1,"Unhandled fetcher revalidation redirect");else{let x=Xo(v.data);e.fetchers.set(h,x)}}),{loaderData:u,errors:f}}function aw(e,t,o,a){let s=Object.entries(t).filter(([,l])=>l!==jE).reduce((l,[u,f])=>(l[u]=f,l),{});for(let l of o){let u=l.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&l.route.loader&&(s[u]=e[u]),a&&a.hasOwnProperty(u))break}return s}function iw(e){return e?Cr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Da(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Cf(e){let t=e.length===1?e[0]:e.find(o=>o.index||!o.path||o.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ur(e,{pathname:t,routeId:o,method:a,type:s,message:l}={}){let u="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&t&&o?f=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${o}", so there is no way to handle the request.`:s==="invalid-body"&&(f="Unable to encode submission body")):e===403?(u="Forbidden",f=`Route "${o}" does not match URL "${t}"`):e===404?(u="Not Found",f=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",a&&t&&o?f=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${o}", so there is no way to handle the request.`:a&&(f=`Invalid request method "${a.toUpperCase()}"`)),new jd(e||500,u,new Error(f),!0)}function wf(e){let t=Object.entries(e);for(let o=t.length-1;o>=0;o--){let[a,s]=t[o];if(bi(s))return{key:a,result:s}}}function _E(e){let t=typeof e=="string"?Ha(e):e;return Oo({...t,hash:""})}function $8(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function _8(e){return new jd(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function V8(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,o])=>typeof t=="string"&&U8(o))}function U8(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function H8(e){return VE(e.result)&&S8.has(e.result.status)}function Cr(e){return e.type==="error"}function bi(e){return(e&&e.type)==="redirect"}function sw(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function VE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function I8(e){return x8.has(e.toUpperCase())}function Yn(e){return v8.has(e.toUpperCase())}function Qy(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Bf(e,t){let o=typeof t=="string"?Ha(t).search:t.search;if(e[e.length-1].route.index&&Qy(o||""))return e[e.length-1];let a=OE(e);return a[a.length-1]}function lw(e){let{formMethod:t,formAction:o,formEncType:a,text:s,formData:l,json:u}=e;if(!(!t||!o||!a)){if(s!=null)return{formMethod:t,formAction:o,formEncType:a,formData:void 0,json:void 0,text:s};if(l!=null)return{formMethod:t,formAction:o,formEncType:a,formData:l,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:o,formEncType:a,formData:void 0,json:u,text:void 0}}}function Dm(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function F8(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ql(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function q8(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Xo(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Y8(e,t){try{let o=e.sessionStorage.getItem(zE);if(o){let a=JSON.parse(o);for(let[s,l]of Object.entries(a||{}))l&&Array.isArray(l)&&t.set(s,new Set(l||[]))}}catch{}}function W8(e,t){if(t.size>0){let o={};for(let[a,s]of t)o[a]=[...s];try{e.sessionStorage.setItem(zE,JSON.stringify(o))}catch(a){yn(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function cw(){let e,t,o=new Promise((a,s)=>{e=async l=>{a(l);try{await o}catch{}},t=async l=>{s(l);try{await o}catch{}}});return{promise:o,resolve:e,reject:t}}var Mi=b.createContext(null);Mi.displayName="DataRouter";var Yc=b.createContext(null);Yc.displayName="DataRouterState";b.createContext(!1);var Zy=b.createContext({isTransitioning:!1});Zy.displayName="ViewTransition";var UE=b.createContext(new Map);UE.displayName="Fetchers";var G8=b.createContext(null);G8.displayName="Await";var uo=b.createContext(null);uo.displayName="Navigation";var Pd=b.createContext(null);Pd.displayName="Location";var Do=b.createContext({outlet:null,matches:[],isDataRoute:!1});Do.displayName="Route";var Jy=b.createContext(null);Jy.displayName="RouteError";function K8(e,{relative:t}={}){lt(Wc(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:a}=b.useContext(uo),{hash:s,pathname:l,search:u}=Gc(e,{relative:t}),f=l;return o!=="/"&&(f=l==="/"?o:Mo([o,l])),a.createHref({pathname:f,search:u,hash:s})}function Wc(){return b.useContext(Pd)!=null}function Ia(){return lt(Wc(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Pd).location}var HE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function IE(e){b.useContext(uo).static||b.useLayoutEffect(e)}function ev(){let{isDataRoute:e}=b.useContext(Do);return e?u9():X8()}function X8(){lt(Wc(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(Mi),{basename:t,navigator:o}=b.useContext(uo),{matches:a}=b.useContext(Do),{pathname:s}=Ia(),l=JSON.stringify(Gy(a)),u=b.useRef(!1);return IE(()=>{u.current=!0}),b.useCallback((d,h={})=>{if(yn(u.current,HE),!u.current)return;if(typeof d=="number"){o.go(d);return}let g=Ky(d,JSON.parse(l),s,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Mo([t,g.pathname])),(h.replace?o.replace:o.push)(g,h.state,h)},[t,o,l,s,e])}var Q8=b.createContext(null);function Z8(e){let t=b.useContext(Do).outlet;return b.useMemo(()=>t&&b.createElement(Q8.Provider,{value:e},t),[t,e])}function Gc(e,{relative:t}={}){let{matches:o}=b.useContext(Do),{pathname:a}=Ia(),s=JSON.stringify(Gy(o));return b.useMemo(()=>Ky(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function J8(e,t,o,a,s){lt(Wc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=b.useContext(uo),{matches:u}=b.useContext(Do),f=u[u.length-1],d=f?f.params:{},h=f?f.pathname:"/",g=f?f.pathnameBase:"/",y=f&&f.route;{let k=y&&y.path||"";FE(h,!y||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
155
155
 
156
- Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let v=Ia(),x;x=v;let S=x.pathname||"/",T=S;if(g!=="/"){let k=g.replace(/^\//,"").split("/");T="/"+S.replace(/^\//,"").split("/").slice(k.length).join("/")}let E=Oa(e,{pathname:T});return yn(y||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),yn(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),o9(E&&E.map(k=>Object.assign({},k,{params:Object.assign({},d,k.params),pathname:Mo([g,l.encodeLocation?l.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?g:Mo([g,l.encodeLocation?l.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),u,o,a,s)}function e9(){let e=c9(),t=Dc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),o=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:l},"ErrorBoundary")," or"," ",b.createElement("code",{style:l},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),o?b.createElement("pre",{style:s},o):null,u)}var t9=b.createElement(e9,null),n9=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?b.createElement(Do.Provider,{value:this.props.routeContext},b.createElement(Jy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function r9({routeContext:e,match:t,children:o}){let a=b.useContext(Mi);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Do.Provider,{value:e},o)}function o9(e,t=[],o=null,a=null,s=null){if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let l=e,u=o?.errors;if(u!=null){let g=l.findIndex(y=>y.route.id&&u?.[y.route.id]!==void 0);lt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),l=l.slice(0,Math.min(l.length,g+1))}let f=!1,d=-1;if(o)for(let g=0;g<l.length;g++){let y=l[g];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(d=g),y.route.id){let{loaderData:v,errors:x}=o,S=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!x||x[y.route.id]===void 0);if(y.route.lazy||S){f=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}let h=o&&a?(g,y)=>{a(g,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:qc(o.matches),errorInfo:y})}:void 0;return l.reduceRight((g,y,v)=>{let x,S=!1,T=null,E=null;o&&(x=u&&y.route.id?u[y.route.id]:void 0,T=y.route.errorElement||t9,f&&(d<0&&v===0?(FE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,E=null):d===v&&(S=!0,E=y.route.hydrateFallbackElement||null)));let R=t.concat(l.slice(0,v+1)),k=()=>{let O;return x?O=T:S?O=E:y.route.Component?O=b.createElement(y.route.Component,null):y.route.element?O=y.route.element:O=g,b.createElement(r9,{match:y,routeContext:{outlet:g,matches:R,isDataRoute:o!=null},children:O})};return o&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?b.createElement(n9,{location:o.location,revalidation:o.revalidation,component:T,error:x,children:k(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:h}):k()},null)}function tv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function a9(e){let t=b.useContext(Mi);return lt(t,tv(e)),t}function i9(e){let t=b.useContext(Yc);return lt(t,tv(e)),t}function s9(e){let t=b.useContext(Do);return lt(t,tv(e)),t}function nv(e){let t=s9(e),o=t.matches[t.matches.length-1];return lt(o.route.id,`${e} can only be used on routes that contain a unique "id"`),o.route.id}function l9(){return nv("useRouteId")}function c9(){let e=b.useContext(Jy),t=i9("useRouteError"),o=nv("useRouteError");return e!==void 0?e:t.errors?.[o]}function u9(){let{router:e}=a9("useNavigate"),t=nv("useNavigate"),o=b.useRef(!1);return IE(()=>{o.current=!0}),b.useCallback(async(s,l={})=>{yn(o.current,HE),o.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var uw={};function FE(e,t,o){!t&&!uw[e]&&(uw[e]=!0,yn(!1,o))}var fw={};function dw(e,t){!e&&!fw[t]&&(fw[t]=!0,console.warn(t))}var f9="useOptimistic",pw=$f[f9],d9=()=>{};function p9(e){return pw?pw(e):[e,d9]}function h9(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&yn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:b.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&yn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&yn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var m9=["HydrateFallback","hydrateFallbackElement"],g9=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=o=>{this.status==="pending"&&(this.status="resolved",e(o))},this.reject=o=>{this.status==="pending"&&(this.status="rejected",t(o))}})}};function y9({router:e,flushSync:t,unstable_onError:o,unstable_useTransitions:a}){let[s,l]=b.useState(e.state),[u,f]=p9(s),[d,h]=b.useState(),[g,y]=b.useState({isTransitioning:!1}),[v,x]=b.useState(),[S,T]=b.useState(),[E,R]=b.useState(),k=b.useRef(new Map),O=b.useCallback((M,{deletedFetchers:$,newErrors:V,flushSync:I,viewTransitionOpts:L})=>{V&&o&&Object.values(V).forEach(F=>o(F,{location:M.location,params:M.matches[0]?.params??{},unstable_pattern:qc(M.matches)})),M.fetchers.forEach((F,H)=>{F.data!==void 0&&k.current.set(H,F.data)}),$.forEach(F=>k.current.delete(F)),dw(I===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let A=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(dw(L==null||A,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!L||!A){t&&I?t(()=>l(M)):a===!1?l(M):b.startTransition(()=>{a===!0&&f(F=>hw(F,M)),l(M)});return}if(t&&I){t(()=>{S&&(v?.resolve(),S.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let F=e.window.document.startViewTransition(()=>{t(()=>l(M))});F.finished.finally(()=>{t(()=>{x(void 0),T(void 0),h(void 0),y({isTransitioning:!1})})}),t(()=>T(F));return}S?(v?.resolve(),S.skipTransition(),R({state:M,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(h(M),y({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[e.window,t,S,v,a,f,o]);b.useLayoutEffect(()=>e.subscribe(O),[e,O]),b.useEffect(()=>{g.isTransitioning&&!g.flushSync&&x(new g9)},[g]),b.useEffect(()=>{if(v&&d&&e.window){let M=d,$=v.promise,V=e.window.document.startViewTransition(async()=>{a===!1?l(M):b.startTransition(()=>{a===!0&&f(I=>hw(I,M)),l(M)}),await $});V.finished.finally(()=>{x(void 0),T(void 0),h(void 0),y({isTransitioning:!1})}),T(V)}},[d,v,e.window,a,f]),b.useEffect(()=>{v&&d&&u.location.key===d.location.key&&v.resolve()},[v,S,u.location,d]),b.useEffect(()=>{!g.isTransitioning&&E&&(h(E.state),y({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),R(void 0))},[g.isTransitioning,E]);let D=b.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:M=>e.navigate(M),push:(M,$,V)=>e.navigate(M,{state:$,preventScrollReset:V?.preventScrollReset}),replace:(M,$,V)=>e.navigate(M,{replace:!0,state:$,preventScrollReset:V?.preventScrollReset})}),[e]),z=e.basename||"/",P=b.useMemo(()=>({router:e,navigator:D,static:!1,basename:z,unstable_onError:o}),[e,D,z,o]);return b.createElement(b.Fragment,null,b.createElement(Mi.Provider,{value:P},b.createElement(Yc.Provider,{value:u},b.createElement(UE.Provider,{value:k.current},b.createElement(Zy.Provider,{value:g},b.createElement(S9,{basename:z,location:u.location,navigationType:u.historyAction,navigator:D,unstable_useTransitions:a===!0},b.createElement(v9,{routes:e.routes,future:e.future,state:u,unstable_onError:o})))))),null)}function hw(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var v9=b.memo(b9);function b9({routes:e,future:t,state:o,unstable_onError:a}){return J8(e,void 0,o,a,t)}function x9(e){return Z8(e.context)}function S9({basename:e="/",children:t=null,location:o,navigationType:a="POP",navigator:s,static:l=!1,unstable_useTransitions:u}){lt(!Wc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=b.useMemo(()=>({basename:f,navigator:s,static:l,unstable_useTransitions:u,future:{}}),[f,s,l,u]);typeof o=="string"&&(o=Ha(o));let{pathname:h="/",search:g="",hash:y="",state:v=null,key:x="default"}=o,S=b.useMemo(()=>{let T=Qr(h,f);return T==null?null:{location:{pathname:T,search:g,hash:y,state:v,key:x},navigationType:a}},[f,h,g,y,v,x,a]);return yn(S!=null,`<Router basename="${f}"> is not able to match the URL "${h}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:b.createElement(uo.Provider,{value:d},b.createElement(Pd.Provider,{children:t,value:S}))}var Lf="get",Nf="application/x-www-form-urlencoded";function Bd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function C9(e){return Bd(e)&&e.tagName.toLowerCase()==="button"}function w9(e){return Bd(e)&&e.tagName.toLowerCase()==="form"}function T9(e){return Bd(e)&&e.tagName.toLowerCase()==="input"}function E9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R9(e,t){return e.button===0&&(!t||t==="_self")&&!E9(e)}var Tf=null;function M9(){if(Tf===null)try{new FormData(document.createElement("form"),0),Tf=!1}catch{Tf=!0}return Tf}var A9=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function km(e){return e!=null&&!A9.has(e)?(yn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nf}"`),null):e}function O9(e,t){let o,a,s,l,u;if(w9(e)){let f=e.getAttribute("action");a=f?Qr(f,t):null,o=e.getAttribute("method")||Lf,s=km(e.getAttribute("enctype"))||Nf,l=new FormData(e)}else if(C9(e)||T9(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(a=d?Qr(d,t):null,o=e.getAttribute("formmethod")||f.getAttribute("method")||Lf,s=km(e.getAttribute("formenctype"))||km(f.getAttribute("enctype"))||Nf,l=new FormData(f,e),!M9()){let{name:h,type:g,value:y}=e;if(g==="image"){let v=h?`${h}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else h&&l.append(h,y)}}else{if(Bd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Lf,a=null,s=Nf,u=e}return l&&s==="text/plain"&&(u=l,l=void 0),{action:a,method:o.toLowerCase(),encType:s,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function D9(e,t,o){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a.pathname==="/"?a.pathname=`_root.${o}`:t&&Qr(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${o}`,a}async function k9(e,t){if(e.id in t)return t[e.id];try{let o=await import(e.module);return t[e.id]=o,o}catch(o){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function z9(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function j9(e,t,o){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let u=await k9(l,o);return u.links?u.links():[]}return[]}));return N9(a.flat(1).filter(z9).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function mw(e,t,o,a,s,l){let u=(d,h)=>o[h]?d.route.id!==o[h].route.id:!0,f=(d,h)=>o[h].pathname!==d.pathname||o[h].route.path?.endsWith("*")&&o[h].params["*"]!==d.params["*"];return l==="assets"?t.filter((d,h)=>u(d,h)||f(d,h)):l==="data"?t.filter((d,h)=>{let g=a.routes[d.route.id];if(!g||!g.hasLoader)return!1;if(u(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function P9(e,t,{includeHydrateFallback:o}={}){return B9(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),o&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function B9(e){return[...new Set(e)]}function L9(e){let t={},o=Object.keys(e).sort();for(let a of o)t[a]=e[a];return t}function N9(e,t){let o=new Set;return new Set(t),e.reduce((a,s)=>{let l=JSON.stringify(L9(s));return o.has(l)||(o.add(l),a.push({key:l,link:s})),a},[])}function qE(){let e=b.useContext(Mi);return rv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function $9(){let e=b.useContext(Yc);return rv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ov=b.createContext(void 0);ov.displayName="FrameworkContext";function YE(){let e=b.useContext(ov);return rv(e,"You must render this element inside a <HydratedRouter> element"),e}function _9(e,t){let o=b.useContext(ov),[a,s]=b.useState(!1),[l,u]=b.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:g,onTouchStart:y}=t,v=b.useRef(null);b.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let T=R=>{R.forEach(k=>{u(k.isIntersecting)})},E=new IntersectionObserver(T,{threshold:.5});return v.current&&E.observe(v.current),()=>{E.disconnect()}}},[e]),b.useEffect(()=>{if(a){let T=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(T)}}},[a]);let x=()=>{s(!0)},S=()=>{s(!1),u(!1)};return o?e!=="intent"?[l,v,{}]:[l,v,{onFocus:Zl(f,x),onBlur:Zl(d,S),onMouseEnter:Zl(h,x),onMouseLeave:Zl(g,S),onTouchStart:Zl(y,x)}]:[!1,v,{}]}function Zl(e,t){return o=>{e&&e(o),o.defaultPrevented||t(o)}}function V9({page:e,...t}){let{router:o}=qE(),a=b.useMemo(()=>Oa(o.routes,e,o.basename),[o.routes,e,o.basename]);return a?b.createElement(H9,{page:e,matches:a,...t}):null}function U9(e){let{manifest:t,routeModules:o}=YE(),[a,s]=b.useState([]);return b.useEffect(()=>{let l=!1;return j9(e,t,o).then(u=>{l||s(u)}),()=>{l=!0}},[e,t,o]),a}function H9({page:e,matches:t,...o}){let a=Ia(),{manifest:s,routeModules:l}=YE(),{basename:u}=qE(),{loaderData:f,matches:d}=$9(),h=b.useMemo(()=>mw(e,t,d,s,a,"data"),[e,t,d,s,a]),g=b.useMemo(()=>mw(e,t,d,s,a,"assets"),[e,t,d,s,a]),y=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let S=new Set,T=!1;if(t.forEach(R=>{let k=s.routes[R.route.id];!k||!k.hasLoader||(!h.some(O=>O.route.id===R.route.id)&&R.route.id in f&&l[R.route.id]?.shouldRevalidate||k.hasClientLoader?T=!0:S.add(R.route.id))}),S.size===0)return[];let E=D9(e,u,"data");return T&&S.size>0&&E.searchParams.set("_routes",t.filter(R=>S.has(R.route.id)).map(R=>R.route.id).join(",")),[E.pathname+E.search]},[u,f,a,s,h,t,e,l]),v=b.useMemo(()=>P9(g,s),[g,s]),x=U9(g);return b.createElement(b.Fragment,null,y.map(S=>b.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...o})),v.map(S=>b.createElement("link",{key:S,rel:"modulepreload",href:S,...o})),x.map(({key:S,link:T})=>b.createElement("link",{key:S,nonce:o.nonce,...T})))}function I9(...e){return t=>{e.forEach(o=>{typeof o=="function"?o(t):o!=null&&(o.current=t)})}}var WE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{WE&&(window.__reactRouterVersion="7.10.1")}catch{}function F9(e,t){return E8({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:_$({window:t?.window}),hydrationData:q9(),routes:e,mapRouteProperties:h9,hydrationRouteProperties:m9,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function q9(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Y9(e.errors)}),e}function Y9(e){if(!e)return null;let t=Object.entries(e),o={};for(let[a,s]of t)if(s&&s.__type==="RouteErrorResponse")o[a]=new jd(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let l=window[s.__subType];if(typeof l=="function")try{let u=new l(s.message);u.stack="",o[a]=u}catch{}}if(o[a]==null){let l=new Error(s.message);l.stack="",o[a]=l}}else o[a]=s;return o}var GE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KE=b.forwardRef(function({onClick:t,discover:o="render",prefetch:a="none",relative:s,reloadDocument:l,replace:u,state:f,target:d,to:h,preventScrollReset:g,viewTransition:y,...v},x){let{basename:S,unstable_useTransitions:T}=b.useContext(uo),E=typeof h=="string"&&GE.test(h),R,k=!1;if(typeof h=="string"&&E&&(R=h,WE))try{let I=new URL(window.location.href),L=h.startsWith("//")?new URL(I.protocol+h):new URL(h),A=Qr(L.pathname,S);L.origin===I.origin&&A!=null?h=A+L.search+L.hash:k=!0}catch{yn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let O=K8(h,{relative:s}),[D,z,P]=_9(a,v),M=X9(h,{replace:u,state:f,target:d,preventScrollReset:g,relative:s,viewTransition:y,unstable_useTransitions:T});function $(I){t&&t(I),I.defaultPrevented||M(I)}let V=b.createElement("a",{...v,...P,href:R||O,onClick:k||l?t:$,ref:I9(x,z),target:d,"data-discover":!E&&o==="render"?"true":void 0});return D&&!E?b.createElement(b.Fragment,null,V,b.createElement(V9,{page:O})):V});KE.displayName="Link";var W9=b.forwardRef(function({"aria-current":t="page",caseSensitive:o=!1,className:a="",end:s=!1,style:l,to:u,viewTransition:f,children:d,...h},g){let y=Gc(u,{relative:h.relative}),v=Ia(),x=b.useContext(Yc),{navigator:S,basename:T}=b.useContext(uo),E=x!=null&&t_(y)&&f===!0,R=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,k=v.pathname,O=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;o||(k=k.toLowerCase(),O=O?O.toLowerCase():null,R=R.toLowerCase()),O&&T&&(O=Qr(O,T)||O);const D=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let z=k===R||!s&&k.startsWith(R)&&k.charAt(D)==="/",P=O!=null&&(O===R||!s&&O.startsWith(R)&&O.charAt(R.length)==="/"),M={isActive:z,isPending:P,isTransitioning:E},$=z?t:void 0,V;typeof a=="function"?V=a(M):V=[a,z?"active":null,P?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let I=typeof l=="function"?l(M):l;return b.createElement(KE,{...h,"aria-current":$,className:V,ref:g,style:I,to:u,viewTransition:f},typeof d=="function"?d(M):d)});W9.displayName="NavLink";var G9=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:o,reloadDocument:a,replace:s,state:l,method:u=Lf,action:f,onSubmit:d,relative:h,preventScrollReset:g,viewTransition:y,...v},x)=>{let{unstable_useTransitions:S}=b.useContext(uo),T=J9(),E=e_(f,{relative:h}),R=u.toLowerCase()==="get"?"get":"post",k=typeof f=="string"&&GE.test(f),O=D=>{if(d&&d(D),D.defaultPrevented)return;D.preventDefault();let z=D.nativeEvent.submitter,P=z?.getAttribute("formmethod")||u,M=()=>T(z||D.currentTarget,{fetcherKey:t,method:P,navigate:o,replace:s,state:l,relative:h,preventScrollReset:g,viewTransition:y});S&&o!==!1?b.startTransition(()=>M()):M()};return b.createElement("form",{ref:x,method:R,action:E,onSubmit:a?d:O,...v,"data-discover":!k&&e==="render"?"true":void 0})});G9.displayName="Form";function K9(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function XE(e){let t=b.useContext(Mi);return lt(t,K9(e)),t}function X9(e,{target:t,replace:o,state:a,preventScrollReset:s,relative:l,viewTransition:u,unstable_useTransitions:f}={}){let d=ev(),h=Ia(),g=Gc(e,{relative:l});return b.useCallback(y=>{if(R9(y,t)){y.preventDefault();let v=o!==void 0?o:Oo(h)===Oo(g),x=()=>d(e,{replace:v,state:a,preventScrollReset:s,relative:l,viewTransition:u});f?b.startTransition(()=>x()):x()}},[h,d,g,o,a,t,e,s,l,u,f])}var Q9=0,Z9=()=>`__${String(++Q9)}__`;function J9(){let{router:e}=XE("useSubmit"),{basename:t}=b.useContext(uo),o=l9(),a=e.fetch,s=e.navigate;return b.useCallback(async(l,u={})=>{let{action:f,method:d,encType:h,formData:g,body:y}=O9(l,t);if(u.navigate===!1){let v=u.fetcherKey||Z9();await a(v,o,u.action||f,{preventScrollReset:u.preventScrollReset,formData:g,body:y,formMethod:u.method||d,formEncType:u.encType||h,flushSync:u.flushSync})}else await s(u.action||f,{preventScrollReset:u.preventScrollReset,formData:g,body:y,formMethod:u.method||d,formEncType:u.encType||h,replace:u.replace,state:u.state,fromRouteId:o,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,s,t,o])}function e_(e,{relative:t}={}){let{basename:o}=b.useContext(uo),a=b.useContext(Do);lt(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),l={...Gc(e||".",{relative:t})},u=Ia();if(e==null){l.search=u.search;let f=new URLSearchParams(l.search),d=f.getAll("index");if(d.some(g=>g==="")){f.delete("index"),d.filter(y=>y).forEach(y=>f.append("index",y));let g=f.toString();l.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(l.pathname=l.pathname==="/"?o:Mo([o,l.pathname])),Oo(l)}function t_(e,{relative:t}={}){let o=b.useContext(Zy);lt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=XE("useViewTransitionState"),s=Gc(e,{relative:t});if(!o.isTransitioning)return!1;let l=Qr(o.currentLocation.pathname,a)||o.currentLocation.pathname,u=Qr(o.nextLocation.pathname,a)||o.nextLocation.pathname;return od(s.pathname,u)!=null||od(s.pathname,l)!=null}function n_(e){return b.createElement(y9,{flushSync:Yg.flushSync,...e})}const r_=Xt(w.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"})),gw=Xt(w.jsx("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m0 14H4V8h16zm-2-1h-6v-2h6zM7.5 17l-1.41-1.41L8.67 13l-2.59-2.59L7.5 9l4 4z"})),yw=Xt(w.jsx("path",{d:"M13 22h8v-7h-3v-4h-5V9h3V2H8v7h3v2H6v4H3v7h8v-7H8v-2h8v2h-3z"})),vw=Xt(w.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"})),o_=Xt(w.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"})),a_=Xt(w.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"})),i_=Xt(w.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),s_=Xt(w.jsx("path",{d:"M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 5.5c0-.28-.22-.5-.5-.5M1 9l2 2c2.88-2.88 6.79-4.08 10.53-3.62l1.19-2.68C9.89 3.84 4.74 5.27 1 9m20 2 2-2c-1.64-1.64-3.55-2.82-5.59-3.57l-.53 2.82c1.5.62 2.9 1.53 4.12 2.75m-4 4 2-2c-.8-.8-1.7-1.42-2.66-1.89l-.55 2.92c.42.27.83.59 1.21.97M5 13l2 2c1.13-1.13 2.56-1.79 4.03-2l1.28-2.88c-2.63-.08-5.3.87-7.31 2.88"})),ms=220,bw=[{label:"Console",icon:w.jsx(gw,{fontSize:"small"}),path:"/",disabled:!1},{label:"Network",icon:w.jsx(s_,{fontSize:"small"}),path:"/network",disabled:!1},{label:"Sessions",icon:w.jsx(vw,{fontSize:"small"}),path:"/sessions",disabled:!0},{label:"Settings",icon:w.jsx(o_,{fontSize:"small"}),path:"/settings",disabled:!0},{label:"Storage",icon:w.jsx(vw,{fontSize:"small"}),path:"/storage",disabled:!0},{label:"Application",icon:w.jsx(yw,{fontSize:"small"}),path:"/application",disabled:!0},{label:"Components",icon:w.jsx(gw,{fontSize:"small"}),path:"/components",disabled:!0},{label:"Preview",icon:w.jsx(yw,{fontSize:"small"}),path:"/preview",disabled:!0}],zm=["0,12 12,12 22,12 32,2 44,22 56,6 70,18 84,10 100,12 120,12","0,12 10,12 20,4 30,20 40,8 50,18 60,6 72,20 84,8 100,12 120,12","0,12 12,10 24,6 36,16 48,8 60,18 72,10 88,14 104,12 120,12"];function l_(){const[e,t]=b.useState(!1),o=Ia(),a=ev(),{mode:s,toggleTheme:l}=h2(),{devices:u,activeDeviceId:f,setActiveDeviceId:d,captureConsole:h,setCaptureConsole:g,captureNetwork:y,setCaptureNetwork:v}=Wy(),[x,S]=b.useState(0),[T,E]=b.useState(null),R=!!T;b.useEffect(()=>{const $=setInterval(()=>{S(V=>{if(zm.length<=1)return 0;let I=V;for(;I===V;)I=Math.floor(Math.random()*zm.length);return I})},1400);return()=>clearInterval($)},[]);const k=b.useMemo(()=>bw.find($=>$.path==="/"?o.pathname==="/":o.pathname.startsWith($.path))?.path??"/",[o.pathname]),O=zm[x],D=M=>{E(R?null:M.currentTarget)},z=M=>{d(M),E(null)},P=w.jsxs(me,{sx:{display:"flex",flexDirection:"column",height:"100%",gap:1,py:1.5,px:1},children:[w.jsx(me,{sx:M=>({px:2,borderRadius:2,background:M.palette.custom.glassBg,border:`1px solid ${M.palette.custom.glassBorder}`,display:"flex",alignItems:"center",justifyContent:"center"}),children:w.jsx(me,{component:"img",src:"/banner.png",sx:{width:"100%",height:"auto",display:"block"}})}),w.jsx(Kf,{sx:{opacity:.4,mx:1}}),w.jsx(Jm,{sx:{flex:1,py:0,overflowY:"auto",overflowX:"hidden",pr:.5},children:bw.map(M=>w.jsxs(uS,{selected:!M.disabled&&k===M.path,disabled:M.disabled,onClick:()=>{M.disabled||(a(M.path),t(!1))},sx:$=>({borderRadius:1.5,mx:.5,my:.25,px:1.5,"&.Mui-selected":{backgroundColor:$.palette.action.selected,color:$.palette.primary.main,"& .MuiListItemIcon-root":{color:$.palette.primary.main}},"&:hover":{backgroundColor:$.palette.action.hover}}),children:[w.jsx(dS,{sx:{minWidth:36},children:M.icon}),w.jsx(pS,{primary:M.label})]},M.path))}),w.jsx(Kf,{sx:{opacity:.4,mx:1}}),w.jsx(Jm,{sx:{py:.5},children:w.jsxs(uS,{onClick:l,sx:M=>({borderRadius:1.5,mx:.5,my:.25,px:1.25,py:.25,minHeight:36,"&:hover":{backgroundColor:M.palette.action.hover}}),children:[w.jsx(dS,{sx:{minWidth:32,mr:.5,color:"text.secondary"},children:s==="light"?w.jsx(a_,{fontSize:"small"}):w.jsx(i_,{fontSize:"small"})}),w.jsx(pS,{primary:`Theme: ${s==="light"?"Light":"Dark"}`,primaryTypographyProps:{variant:"body2",fontWeight:500}})]})})]});return w.jsxs(me,{sx:{display:"flex"},children:[w.jsx(d2,{}),w.jsx(J3,{position:"fixed",elevation:0,sx:M=>({ml:{sm:`${ms}px`},width:{sm:`calc(100% - ${ms}px)`},background:M.palette.custom.glassBg,backdropFilter:"blur(18px) saturate(160%)",WebkitBackdropFilter:"blur(18px) saturate(160%)",borderBottom:`1px solid ${M.palette.divider}`,boxShadow:M.palette.custom.glassShadow}),children:w.jsxs(wS,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[w.jsxs(me,{sx:{display:"flex",alignItems:"center",gap:1.5,minWidth:0},children:[w.jsx(Sr,{color:"inherit",edge:"start",onClick:()=>t(!e),sx:{mr:1,display:{sm:"none"}},children:w.jsx(r_,{})}),w.jsxs(me,{sx:{display:"flex",flexDirection:"column",minWidth:0},children:[w.jsx(Ue,{variant:"h6",noWrap:!0,component:"div",fontWeight:700,color:"text.primary",children:"RN Inspector"}),w.jsx(Ue,{variant:"caption",color:"text.secondary",noWrap:!0,children:"DevTools for React Native"})]})]}),w.jsxs(me,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[w.jsxs(me,{onClick:D,sx:M=>({minWidth:220,maxWidth:260,px:1.5,py:.5,borderRadius:999,border:`1px solid ${M.palette.divider}`,display:"flex",alignItems:"center",gap:.75,cursor:"pointer",backgroundColor:M.palette.background.paper,"&:hover":{backgroundColor:M.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.03)"}}),children:[w.jsx(Ue,{variant:"caption",color:"text.secondary",children:"Device"}),w.jsx(Ue,{variant:"body2",noWrap:!0,sx:{flex:1,fontWeight:500},children:f==="all"?"All devices":u.find(M=>M.id===f)?.label??f})]}),w.jsx(oy,{open:R,anchorEl:T,placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}}],children:w.jsx(Z4,{onClickAway:()=>E(null),children:w.jsxs(me,{sx:M=>({minWidth:220,maxHeight:320,overflowY:"auto",borderRadius:1.5,border:`1px solid ${M.palette.divider}`,backgroundColor:M.palette.background.default,boxShadow:M.shadows[6],p:.5}),children:[w.jsx(vS,{selected:f==="all",onClick:()=>z("all"),children:"All devices"}),u.map(M=>w.jsx(vS,{selected:f===M.id,onClick:()=>z(M.id),children:M.label},M.id))]})})}),w.jsx(Fr,{title:h?"Pause capturing console logs":"Start capturing console logs",children:w.jsx(Ir,{size:"small",label:"Console",color:h?"success":"default",variant:h?"filled":"outlined",onClick:()=>g(!h),sx:{cursor:"pointer"}})}),w.jsx(Fr,{title:y?"Pause capturing network requests":"Start capturing network requests",children:w.jsx(Ir,{size:"small",label:"Network",color:y?"success":"default",variant:y?"filled":"outlined",onClick:()=>v(!y),sx:{cursor:"pointer"}})}),w.jsx(me,{sx:M=>({width:160,height:28,display:"flex",alignItems:"center",color:M.palette.success.main}),children:w.jsx(me,{component:"svg",viewBox:"0 0 120 24",sx:{width:"100%",height:"100%",color:"#4caf50","& .heartbeat-path":{strokeDasharray:150,strokeDashoffset:150,animation:"heartbeatMove 1.4s ease-in-out infinite"},"@keyframes heartbeatMove":{"0%":{strokeDashoffset:150,opacity:.4},"30%":{strokeDashoffset:90,opacity:1},"60%":{strokeDashoffset:40,opacity:.7},"100%":{strokeDashoffset:0,opacity:.4}},"@keyframes heartbeatColor":{"0%":{color:"#4caf50"},"25%":{color:"#ff9800"},"50%":{color:"#f44336"},"75%":{color:"#2196f3"},"100%":{color:"#4caf50"}},animation:"heartbeatColor 4s ease-in-out infinite"},children:w.jsx("polyline",{className:"heartbeat-path",points:O,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"})})}),w.jsx(me,{component:"img",src:"/Legend_moyai.png",sx:M=>({width:32,height:32,borderRadius:1,objectFit:"cover",ml:1,boxShadow:`0 6px 16px ${M.palette.mode==="dark"?M.palette.common.black+"55":M.palette.grey[500]+"55"}`})})]})]})}),w.jsxs(me,{component:"nav",sx:{width:{sm:ms},flexShrink:{sm:0}},"aria-label":"navigation",children:[w.jsx(Xf,{variant:"temporary",open:e,onClose:()=>t(!1),ModalProps:{keepMounted:!0},sx:M=>({display:{xs:"block",sm:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:ms,background:M.palette.custom.glassBg,backdropFilter:"blur(20px) saturate(160%)",WebkitBackdropFilter:"blur(20px) saturate(160%)",borderRight:`1px solid ${M.palette.divider}`,boxShadow:M.palette.custom.glassShadow}}),children:P}),w.jsx(Xf,{variant:"permanent",sx:M=>({display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:ms,background:M.palette.custom.glassBg,backdropFilter:"blur(20px) saturate(160%)",WebkitBackdropFilter:"blur(20px) saturate(160%)",borderRight:`1px solid ${M.palette.divider}`,boxShadow:M.palette.custom.glassShadow,borderRadius:0,overflow:"hidden"}}),open:!0,children:P})]}),w.jsxs(me,{component:"main",sx:{flexGrow:1,p:3,width:{sm:`calc(100% - ${ms}px)`}},children:[w.jsx(wS,{}),w.jsx(x9,{})]})]})}const hi=Xt(w.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),QE=Xt(w.jsx("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"})),ZE=Xt(w.jsx("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"})),c_=Xt(w.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"})),u_=Xt([w.jsx("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22z"},"0"),w.jsx("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")]),f_=Xt(w.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),d_=Xt(w.jsx("path",{d:"M3 18h12v-2H3zM3 6v2h18V6zm0 7h18v-2H3z"})),Is=({children:e,hover:t=!0,padding:o=2.5,radius:a=2,sx:s,...l})=>w.jsx(me,{sx:[u=>({background:u.palette?.custom?.glassBg??u.palette.background.paper,backdropFilter:"blur(18px) saturate(140%)",WebkitBackdropFilter:"blur(18px) saturate(140%)",border:`1px solid ${u.palette?.custom?.glassBorder??u.palette.divider}`,borderRadius:a,boxShadow:u.palette?.custom?.glassShadow??"0 24px 60px rgba(0,0,0,0.25)",transition:"background 150ms ease, border-color 150ms ease, box-shadow 150ms ease",p:o,...t&&{"&:hover":{background:u.palette?.custom?.glassBgHover??u.palette.background.paper}}}),s],...l,children:e}),xw={log:"default",info:"info",warn:"warning",error:"error"},p_=e=>{switch(e){case"error":return w.jsx(f_,{fontSize:"small"});case"warn":return w.jsx(u_,{fontSize:"small"});case"info":return w.jsx(c_,{fontSize:"small"});default:return w.jsx(d_,{fontSize:"small"})}};function Sw(e){try{return new Date(e).toLocaleTimeString()}catch{return e}}const h_=()=>{const{consoleEvents:e,status:t,stats:o,reconnect:a,activeDeviceId:s}=Wy(),[l,u]=b.useState("all"),[f,d]=b.useState(null),[h,g]=b.useState(!1),[y,v]=b.useState(!1),[x,S]=b.useState(!1),T=()=>{f?.msg&&(navigator.clipboard.writeText(f.msg),S(!0),setTimeout(()=>S(!1),2e3))},E=b.useMemo(()=>{const R=e.slice(-300).reverse(),k=l==="all"?R:R.filter(O=>O.level===l);return s&&s!=="all"?k.filter(O=>!O.deviceId||O.deviceId===s):k},[e,l,s]);return w.jsxs(me,{sx:{display:"flex",gap:2,flexDirection:"column"},children:[w.jsxs(me,{sx:{p:2,borderRadius:2,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",border:R=>`1px solid ${R.palette.divider}`,boxShadow:R=>`0 6px 18px ${R.palette.mode==="dark"?"rgba(0,0,0,0.35)":"rgba(0,0,0,0.08)"}`,display:"flex",flexDirection:"column",gap:1.5},children:[w.jsxs(me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5},children:[w.jsxs(me,{sx:{display:"flex",flexDirection:"column",minWidth:0},children:[w.jsx(Ue,{variant:"h5",fontWeight:600,children:"Console"}),w.jsx(Ue,{variant:"caption",color:"text.secondary",children:"Live logs from proxy"})]}),w.jsx(Fr,{title:t==="open"?"Proxy websocket connected":"Proxy disconnected. Click to try reconnecting.",children:w.jsx(Ir,{size:"small",label:`WS: ${t}${o.consoleCount?` • ${o.consoleCount} logs`:""}`,color:t==="open"?"success":t==="connecting"?"warning":"default",variant:t==="open"?"filled":"outlined",onClick:t==="open"?void 0:a,sx:{cursor:t==="open"?"default":"pointer"}})})]}),w.jsxs(q2,{value:l,onChange:(R,k)=>u(k),variant:"scrollable",scrollButtons:"auto",sx:{minHeight:40,"& .MuiTab-root":{minHeight:40,fontWeight:600,fontSize:13,textTransform:"none"}},children:[w.jsx(Aa,{value:"all",label:"All"}),w.jsx(Aa,{value:"log",label:"Log"}),w.jsx(Aa,{value:"info",label:"Info"}),w.jsx(Aa,{value:"warn",label:"Warn"}),w.jsx(Aa,{value:"error",label:"Error"})]})]}),w.jsx(Is,{sx:{overflow:"auto",p:{xs:1.5,md:2}},children:E.length===0?w.jsx(me,{sx:{py:4,textAlign:"center",color:"text.secondary"},children:"Waiting for console events from proxy…"}):w.jsx(Vs,{spacing:1,children:E.map((R,k)=>w.jsxs(me,{onClick:()=>{d(R),g(!0)},sx:{display:"flex",alignItems:"center",gap:1.5,px:1.5,py:1,borderRadius:2,border:O=>`1px solid ${O.palette.divider}`,cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:[w.jsxs(me,{sx:{minWidth:110},children:[w.jsx(Ue,{variant:"caption",color:"text.secondary",children:Sw(R.ts)}),w.jsx(Ue,{variant:"caption",color:"text.secondary",children:R.origin??"metro"})]}),w.jsx(me,{sx:{flex:1,minWidth:0},children:w.jsx(Ue,{variant:"body2",noWrap:!0,sx:{fontFamily:"monospace",fontSize:13},title:R.msg,children:R.msg})}),w.jsx(Ir,{size:"small",icon:p_(R.level),label:R.level,color:xw[R.level]??"default",variant:"filled",sx:{textTransform:"capitalize",borderRadius:2}})]},`${R.ts}-${k}`))})}),w.jsx(Xf,{anchor:"right",open:h&&!!f,onClose:()=>g(!1),PaperProps:{sx:{width:y?"100%":{xs:"100%",sm:520},background:R=>R.palette.background.paper,border:"none",borderRadius:0,boxShadow:"none",overflow:"hidden",m:0,height:"100%"}},children:w.jsxs(me,{sx:{p:0,height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[w.jsx(me,{"aria-hidden":!0,sx:R=>({position:"absolute",top:-80,right:-60,width:220,height:220,borderRadius:"50%",background:`linear-gradient(135deg, ${R.palette.primary.main}, ${R.palette.secondary.main})`,opacity:.15,filter:"blur(40px)",pointerEvents:"none"})}),w.jsxs(me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,m:2,mb:0,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",backdropFilter:"blur(14px) saturate(140%)",WebkitBackdropFilter:"blur(14px) saturate(140%)",border:R=>`1px solid ${R.palette.divider}`,borderRadius:2,boxShadow:R=>`0 6px 20px ${R.palette.mode==="dark"?"rgba(0,0,0,0.3)":"rgba(0,0,0,0.08)"}`},children:[w.jsx(me,{sx:{display:"flex",alignItems:"center",gap:1.5,minWidth:0},children:w.jsxs(me,{children:[w.jsx(Ue,{variant:"h6",sx:{fontWeight:700,letterSpacing:.2,lineHeight:1.2},children:"Log Details"}),f&&w.jsxs(Ue,{variant:"caption",color:"text.secondary",children:[Sw(f.ts)," • ",f.origin??"metro"]})]})}),w.jsxs(me,{sx:{display:"inline-flex",gap:.5,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.03)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:R=>`1px solid ${R.palette.divider}`,borderRadius:2,px:.5,py:.25},children:[w.jsx(Fr,{title:x?"Copied!":"Copy message",children:w.jsx(Sr,{onClick:T,size:"small",color:x?"success":"default",children:w.jsx(hi,{fontSize:"small"})})}),w.jsx(Sr,{onClick:()=>v(R=>!R),size:"small",children:y?w.jsx(ZE,{fontSize:"small"}):w.jsx(QE,{fontSize:"small"})}),w.jsx(Sr,{onClick:()=>g(!1),size:"small",children:w.jsx(Yy,{fontSize:"small"})})]})]}),f&&w.jsxs(me,{sx:{flex:1,overflow:"auto",p:2},children:[w.jsx(me,{sx:{mb:3,p:2,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.02)":"rgba(0,0,0,0.01)",border:R=>`1px solid ${R.palette.divider}`,borderRadius:2,transition:"all 0.2s ease","&:hover":{background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.02)",transform:"translateY(-1px)"}},children:w.jsxs(me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[w.jsx(Ue,{variant:"overline",color:"text.secondary",sx:{letterSpacing:.8},children:"Level"}),w.jsx(Ir,{size:"small",label:f.level.toUpperCase(),color:xw[f.level]??"default",variant:"filled",sx:{fontWeight:600,letterSpacing:.5,px:.75}})]})}),w.jsxs(me,{sx:{p:2,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.02)":"rgba(0,0,0,0.01)",border:R=>`1px solid ${R.palette.divider}`,borderRadius:2,transition:"all 0.2s ease","&:hover":{background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.02)",transform:"translateY(-1px)"}},children:[w.jsxs(me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1.5},children:[w.jsx(Ue,{variant:"overline",color:"text.secondary",children:"Message"}),w.jsx(Fr,{title:x?"Copied!":"Copy",children:w.jsx(Sr,{size:"small",onClick:T,children:w.jsx(hi,{sx:{fontSize:16}})})})]}),w.jsx(me,{component:"pre",sx:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:'"Fira Code", "JetBrains Mono", monospace',fontSize:13,lineHeight:1.6,m:0,p:2,background:R=>R.palette.mode==="dark"?"rgba(0,0,0,0.3)":"rgba(0,0,0,0.04)",borderRadius:1.5,maxHeight:400,overflow:"auto"},children:f.msg})]})]})]})})]})},m_=Xt(w.jsx("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"}));function Cw(e){try{return new Date(e).toLocaleTimeString()}catch{return e}}const g_=()=>{const{networkEvents:e,status:t,stats:o,reconnect:a,activeDeviceId:s}=Wy(),[l,u]=b.useState(null),[f,d]=b.useState(!1),[h,g]=b.useState("headers"),[y,v]=b.useState(!1),[x,S]=b.useState(!1),[T,E]=b.useState(!1),R=L=>{navigator.clipboard.writeText(L),S(!0),setTimeout(()=>S(!1),2e3)},k=L=>L?L>=200&&L<300?"success":L>=300&&L<400?"warning":L>=400?"error":"default":"default",O=()=>{if(!l)return"";if(h==="headers"){const L=l.requestHeaders?Object.entries(l.requestHeaders).map(([F,H])=>`${F}: ${H}`).join(`
156
+ Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let v=Ia(),x;x=v;let S=x.pathname||"/",T=S;if(g!=="/"){let k=g.replace(/^\//,"").split("/");T="/"+S.replace(/^\//,"").split("/").slice(k.length).join("/")}let E=Oa(e,{pathname:T});return yn(y||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),yn(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),o9(E&&E.map(k=>Object.assign({},k,{params:Object.assign({},d,k.params),pathname:Mo([g,l.encodeLocation?l.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?g:Mo([g,l.encodeLocation?l.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),u,o,a,s)}function e9(){let e=c9(),t=Dc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),o=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:l},"ErrorBoundary")," or"," ",b.createElement("code",{style:l},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),o?b.createElement("pre",{style:s},o):null,u)}var t9=b.createElement(e9,null),n9=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?b.createElement(Do.Provider,{value:this.props.routeContext},b.createElement(Jy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function r9({routeContext:e,match:t,children:o}){let a=b.useContext(Mi);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Do.Provider,{value:e},o)}function o9(e,t=[],o=null,a=null,s=null){if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let l=e,u=o?.errors;if(u!=null){let g=l.findIndex(y=>y.route.id&&u?.[y.route.id]!==void 0);lt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),l=l.slice(0,Math.min(l.length,g+1))}let f=!1,d=-1;if(o)for(let g=0;g<l.length;g++){let y=l[g];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(d=g),y.route.id){let{loaderData:v,errors:x}=o,S=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!x||x[y.route.id]===void 0);if(y.route.lazy||S){f=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}let h=o&&a?(g,y)=>{a(g,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:qc(o.matches),errorInfo:y})}:void 0;return l.reduceRight((g,y,v)=>{let x,S=!1,T=null,E=null;o&&(x=u&&y.route.id?u[y.route.id]:void 0,T=y.route.errorElement||t9,f&&(d<0&&v===0?(FE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,E=null):d===v&&(S=!0,E=y.route.hydrateFallbackElement||null)));let R=t.concat(l.slice(0,v+1)),k=()=>{let O;return x?O=T:S?O=E:y.route.Component?O=b.createElement(y.route.Component,null):y.route.element?O=y.route.element:O=g,b.createElement(r9,{match:y,routeContext:{outlet:g,matches:R,isDataRoute:o!=null},children:O})};return o&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?b.createElement(n9,{location:o.location,revalidation:o.revalidation,component:T,error:x,children:k(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:h}):k()},null)}function tv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function a9(e){let t=b.useContext(Mi);return lt(t,tv(e)),t}function i9(e){let t=b.useContext(Yc);return lt(t,tv(e)),t}function s9(e){let t=b.useContext(Do);return lt(t,tv(e)),t}function nv(e){let t=s9(e),o=t.matches[t.matches.length-1];return lt(o.route.id,`${e} can only be used on routes that contain a unique "id"`),o.route.id}function l9(){return nv("useRouteId")}function c9(){let e=b.useContext(Jy),t=i9("useRouteError"),o=nv("useRouteError");return e!==void 0?e:t.errors?.[o]}function u9(){let{router:e}=a9("useNavigate"),t=nv("useNavigate"),o=b.useRef(!1);return IE(()=>{o.current=!0}),b.useCallback(async(s,l={})=>{yn(o.current,HE),o.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var uw={};function FE(e,t,o){!t&&!uw[e]&&(uw[e]=!0,yn(!1,o))}var fw={};function dw(e,t){!e&&!fw[t]&&(fw[t]=!0,console.warn(t))}var f9="useOptimistic",pw=$f[f9],d9=()=>{};function p9(e){return pw?pw(e):[e,d9]}function h9(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&yn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:b.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&yn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&yn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var m9=["HydrateFallback","hydrateFallbackElement"],g9=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=o=>{this.status==="pending"&&(this.status="resolved",e(o))},this.reject=o=>{this.status==="pending"&&(this.status="rejected",t(o))}})}};function y9({router:e,flushSync:t,unstable_onError:o,unstable_useTransitions:a}){let[s,l]=b.useState(e.state),[u,f]=p9(s),[d,h]=b.useState(),[g,y]=b.useState({isTransitioning:!1}),[v,x]=b.useState(),[S,T]=b.useState(),[E,R]=b.useState(),k=b.useRef(new Map),O=b.useCallback((M,{deletedFetchers:$,newErrors:V,flushSync:I,viewTransitionOpts:L})=>{V&&o&&Object.values(V).forEach(F=>o(F,{location:M.location,params:M.matches[0]?.params??{},unstable_pattern:qc(M.matches)})),M.fetchers.forEach((F,H)=>{F.data!==void 0&&k.current.set(H,F.data)}),$.forEach(F=>k.current.delete(F)),dw(I===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let A=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(dw(L==null||A,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!L||!A){t&&I?t(()=>l(M)):a===!1?l(M):b.startTransition(()=>{a===!0&&f(F=>hw(F,M)),l(M)});return}if(t&&I){t(()=>{S&&(v?.resolve(),S.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let F=e.window.document.startViewTransition(()=>{t(()=>l(M))});F.finished.finally(()=>{t(()=>{x(void 0),T(void 0),h(void 0),y({isTransitioning:!1})})}),t(()=>T(F));return}S?(v?.resolve(),S.skipTransition(),R({state:M,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(h(M),y({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[e.window,t,S,v,a,f,o]);b.useLayoutEffect(()=>e.subscribe(O),[e,O]),b.useEffect(()=>{g.isTransitioning&&!g.flushSync&&x(new g9)},[g]),b.useEffect(()=>{if(v&&d&&e.window){let M=d,$=v.promise,V=e.window.document.startViewTransition(async()=>{a===!1?l(M):b.startTransition(()=>{a===!0&&f(I=>hw(I,M)),l(M)}),await $});V.finished.finally(()=>{x(void 0),T(void 0),h(void 0),y({isTransitioning:!1})}),T(V)}},[d,v,e.window,a,f]),b.useEffect(()=>{v&&d&&u.location.key===d.location.key&&v.resolve()},[v,S,u.location,d]),b.useEffect(()=>{!g.isTransitioning&&E&&(h(E.state),y({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),R(void 0))},[g.isTransitioning,E]);let D=b.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:M=>e.navigate(M),push:(M,$,V)=>e.navigate(M,{state:$,preventScrollReset:V?.preventScrollReset}),replace:(M,$,V)=>e.navigate(M,{replace:!0,state:$,preventScrollReset:V?.preventScrollReset})}),[e]),z=e.basename||"/",P=b.useMemo(()=>({router:e,navigator:D,static:!1,basename:z,unstable_onError:o}),[e,D,z,o]);return b.createElement(b.Fragment,null,b.createElement(Mi.Provider,{value:P},b.createElement(Yc.Provider,{value:u},b.createElement(UE.Provider,{value:k.current},b.createElement(Zy.Provider,{value:g},b.createElement(S9,{basename:z,location:u.location,navigationType:u.historyAction,navigator:D,unstable_useTransitions:a===!0},b.createElement(v9,{routes:e.routes,future:e.future,state:u,unstable_onError:o})))))),null)}function hw(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var v9=b.memo(b9);function b9({routes:e,future:t,state:o,unstable_onError:a}){return J8(e,void 0,o,a,t)}function x9(e){return Z8(e.context)}function S9({basename:e="/",children:t=null,location:o,navigationType:a="POP",navigator:s,static:l=!1,unstable_useTransitions:u}){lt(!Wc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=b.useMemo(()=>({basename:f,navigator:s,static:l,unstable_useTransitions:u,future:{}}),[f,s,l,u]);typeof o=="string"&&(o=Ha(o));let{pathname:h="/",search:g="",hash:y="",state:v=null,key:x="default"}=o,S=b.useMemo(()=>{let T=Qr(h,f);return T==null?null:{location:{pathname:T,search:g,hash:y,state:v,key:x},navigationType:a}},[f,h,g,y,v,x,a]);return yn(S!=null,`<Router basename="${f}"> is not able to match the URL "${h}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:b.createElement(uo.Provider,{value:d},b.createElement(Pd.Provider,{children:t,value:S}))}var Lf="get",Nf="application/x-www-form-urlencoded";function Bd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function C9(e){return Bd(e)&&e.tagName.toLowerCase()==="button"}function w9(e){return Bd(e)&&e.tagName.toLowerCase()==="form"}function T9(e){return Bd(e)&&e.tagName.toLowerCase()==="input"}function E9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R9(e,t){return e.button===0&&(!t||t==="_self")&&!E9(e)}var Tf=null;function M9(){if(Tf===null)try{new FormData(document.createElement("form"),0),Tf=!1}catch{Tf=!0}return Tf}var A9=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function km(e){return e!=null&&!A9.has(e)?(yn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nf}"`),null):e}function O9(e,t){let o,a,s,l,u;if(w9(e)){let f=e.getAttribute("action");a=f?Qr(f,t):null,o=e.getAttribute("method")||Lf,s=km(e.getAttribute("enctype"))||Nf,l=new FormData(e)}else if(C9(e)||T9(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(a=d?Qr(d,t):null,o=e.getAttribute("formmethod")||f.getAttribute("method")||Lf,s=km(e.getAttribute("formenctype"))||km(f.getAttribute("enctype"))||Nf,l=new FormData(f,e),!M9()){let{name:h,type:g,value:y}=e;if(g==="image"){let v=h?`${h}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else h&&l.append(h,y)}}else{if(Bd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Lf,a=null,s=Nf,u=e}return l&&s==="text/plain"&&(u=l,l=void 0),{action:a,method:o.toLowerCase(),encType:s,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function D9(e,t,o){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a.pathname==="/"?a.pathname=`_root.${o}`:t&&Qr(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${o}`,a}async function k9(e,t){if(e.id in t)return t[e.id];try{let o=await import(e.module);return t[e.id]=o,o}catch(o){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function z9(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function j9(e,t,o){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let u=await k9(l,o);return u.links?u.links():[]}return[]}));return N9(a.flat(1).filter(z9).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function mw(e,t,o,a,s,l){let u=(d,h)=>o[h]?d.route.id!==o[h].route.id:!0,f=(d,h)=>o[h].pathname!==d.pathname||o[h].route.path?.endsWith("*")&&o[h].params["*"]!==d.params["*"];return l==="assets"?t.filter((d,h)=>u(d,h)||f(d,h)):l==="data"?t.filter((d,h)=>{let g=a.routes[d.route.id];if(!g||!g.hasLoader)return!1;if(u(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function P9(e,t,{includeHydrateFallback:o}={}){return B9(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),o&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function B9(e){return[...new Set(e)]}function L9(e){let t={},o=Object.keys(e).sort();for(let a of o)t[a]=e[a];return t}function N9(e,t){let o=new Set;return new Set(t),e.reduce((a,s)=>{let l=JSON.stringify(L9(s));return o.has(l)||(o.add(l),a.push({key:l,link:s})),a},[])}function qE(){let e=b.useContext(Mi);return rv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function $9(){let e=b.useContext(Yc);return rv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ov=b.createContext(void 0);ov.displayName="FrameworkContext";function YE(){let e=b.useContext(ov);return rv(e,"You must render this element inside a <HydratedRouter> element"),e}function _9(e,t){let o=b.useContext(ov),[a,s]=b.useState(!1),[l,u]=b.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:g,onTouchStart:y}=t,v=b.useRef(null);b.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let T=R=>{R.forEach(k=>{u(k.isIntersecting)})},E=new IntersectionObserver(T,{threshold:.5});return v.current&&E.observe(v.current),()=>{E.disconnect()}}},[e]),b.useEffect(()=>{if(a){let T=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(T)}}},[a]);let x=()=>{s(!0)},S=()=>{s(!1),u(!1)};return o?e!=="intent"?[l,v,{}]:[l,v,{onFocus:Zl(f,x),onBlur:Zl(d,S),onMouseEnter:Zl(h,x),onMouseLeave:Zl(g,S),onTouchStart:Zl(y,x)}]:[!1,v,{}]}function Zl(e,t){return o=>{e&&e(o),o.defaultPrevented||t(o)}}function V9({page:e,...t}){let{router:o}=qE(),a=b.useMemo(()=>Oa(o.routes,e,o.basename),[o.routes,e,o.basename]);return a?b.createElement(H9,{page:e,matches:a,...t}):null}function U9(e){let{manifest:t,routeModules:o}=YE(),[a,s]=b.useState([]);return b.useEffect(()=>{let l=!1;return j9(e,t,o).then(u=>{l||s(u)}),()=>{l=!0}},[e,t,o]),a}function H9({page:e,matches:t,...o}){let a=Ia(),{manifest:s,routeModules:l}=YE(),{basename:u}=qE(),{loaderData:f,matches:d}=$9(),h=b.useMemo(()=>mw(e,t,d,s,a,"data"),[e,t,d,s,a]),g=b.useMemo(()=>mw(e,t,d,s,a,"assets"),[e,t,d,s,a]),y=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let S=new Set,T=!1;if(t.forEach(R=>{let k=s.routes[R.route.id];!k||!k.hasLoader||(!h.some(O=>O.route.id===R.route.id)&&R.route.id in f&&l[R.route.id]?.shouldRevalidate||k.hasClientLoader?T=!0:S.add(R.route.id))}),S.size===0)return[];let E=D9(e,u,"data");return T&&S.size>0&&E.searchParams.set("_routes",t.filter(R=>S.has(R.route.id)).map(R=>R.route.id).join(",")),[E.pathname+E.search]},[u,f,a,s,h,t,e,l]),v=b.useMemo(()=>P9(g,s),[g,s]),x=U9(g);return b.createElement(b.Fragment,null,y.map(S=>b.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...o})),v.map(S=>b.createElement("link",{key:S,rel:"modulepreload",href:S,...o})),x.map(({key:S,link:T})=>b.createElement("link",{key:S,nonce:o.nonce,...T})))}function I9(...e){return t=>{e.forEach(o=>{typeof o=="function"?o(t):o!=null&&(o.current=t)})}}var WE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{WE&&(window.__reactRouterVersion="7.10.1")}catch{}function F9(e,t){return E8({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:_$({window:t?.window}),hydrationData:q9(),routes:e,mapRouteProperties:h9,hydrationRouteProperties:m9,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function q9(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Y9(e.errors)}),e}function Y9(e){if(!e)return null;let t=Object.entries(e),o={};for(let[a,s]of t)if(s&&s.__type==="RouteErrorResponse")o[a]=new jd(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let l=window[s.__subType];if(typeof l=="function")try{let u=new l(s.message);u.stack="",o[a]=u}catch{}}if(o[a]==null){let l=new Error(s.message);l.stack="",o[a]=l}}else o[a]=s;return o}var GE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KE=b.forwardRef(function({onClick:t,discover:o="render",prefetch:a="none",relative:s,reloadDocument:l,replace:u,state:f,target:d,to:h,preventScrollReset:g,viewTransition:y,...v},x){let{basename:S,unstable_useTransitions:T}=b.useContext(uo),E=typeof h=="string"&&GE.test(h),R,k=!1;if(typeof h=="string"&&E&&(R=h,WE))try{let I=new URL(window.location.href),L=h.startsWith("//")?new URL(I.protocol+h):new URL(h),A=Qr(L.pathname,S);L.origin===I.origin&&A!=null?h=A+L.search+L.hash:k=!0}catch{yn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let O=K8(h,{relative:s}),[D,z,P]=_9(a,v),M=X9(h,{replace:u,state:f,target:d,preventScrollReset:g,relative:s,viewTransition:y,unstable_useTransitions:T});function $(I){t&&t(I),I.defaultPrevented||M(I)}let V=b.createElement("a",{...v,...P,href:R||O,onClick:k||l?t:$,ref:I9(x,z),target:d,"data-discover":!E&&o==="render"?"true":void 0});return D&&!E?b.createElement(b.Fragment,null,V,b.createElement(V9,{page:O})):V});KE.displayName="Link";var W9=b.forwardRef(function({"aria-current":t="page",caseSensitive:o=!1,className:a="",end:s=!1,style:l,to:u,viewTransition:f,children:d,...h},g){let y=Gc(u,{relative:h.relative}),v=Ia(),x=b.useContext(Yc),{navigator:S,basename:T}=b.useContext(uo),E=x!=null&&t_(y)&&f===!0,R=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,k=v.pathname,O=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;o||(k=k.toLowerCase(),O=O?O.toLowerCase():null,R=R.toLowerCase()),O&&T&&(O=Qr(O,T)||O);const D=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let z=k===R||!s&&k.startsWith(R)&&k.charAt(D)==="/",P=O!=null&&(O===R||!s&&O.startsWith(R)&&O.charAt(R.length)==="/"),M={isActive:z,isPending:P,isTransitioning:E},$=z?t:void 0,V;typeof a=="function"?V=a(M):V=[a,z?"active":null,P?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let I=typeof l=="function"?l(M):l;return b.createElement(KE,{...h,"aria-current":$,className:V,ref:g,style:I,to:u,viewTransition:f},typeof d=="function"?d(M):d)});W9.displayName="NavLink";var G9=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:o,reloadDocument:a,replace:s,state:l,method:u=Lf,action:f,onSubmit:d,relative:h,preventScrollReset:g,viewTransition:y,...v},x)=>{let{unstable_useTransitions:S}=b.useContext(uo),T=J9(),E=e_(f,{relative:h}),R=u.toLowerCase()==="get"?"get":"post",k=typeof f=="string"&&GE.test(f),O=D=>{if(d&&d(D),D.defaultPrevented)return;D.preventDefault();let z=D.nativeEvent.submitter,P=z?.getAttribute("formmethod")||u,M=()=>T(z||D.currentTarget,{fetcherKey:t,method:P,navigate:o,replace:s,state:l,relative:h,preventScrollReset:g,viewTransition:y});S&&o!==!1?b.startTransition(()=>M()):M()};return b.createElement("form",{ref:x,method:R,action:E,onSubmit:a?d:O,...v,"data-discover":!k&&e==="render"?"true":void 0})});G9.displayName="Form";function K9(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function XE(e){let t=b.useContext(Mi);return lt(t,K9(e)),t}function X9(e,{target:t,replace:o,state:a,preventScrollReset:s,relative:l,viewTransition:u,unstable_useTransitions:f}={}){let d=ev(),h=Ia(),g=Gc(e,{relative:l});return b.useCallback(y=>{if(R9(y,t)){y.preventDefault();let v=o!==void 0?o:Oo(h)===Oo(g),x=()=>d(e,{replace:v,state:a,preventScrollReset:s,relative:l,viewTransition:u});f?b.startTransition(()=>x()):x()}},[h,d,g,o,a,t,e,s,l,u,f])}var Q9=0,Z9=()=>`__${String(++Q9)}__`;function J9(){let{router:e}=XE("useSubmit"),{basename:t}=b.useContext(uo),o=l9(),a=e.fetch,s=e.navigate;return b.useCallback(async(l,u={})=>{let{action:f,method:d,encType:h,formData:g,body:y}=O9(l,t);if(u.navigate===!1){let v=u.fetcherKey||Z9();await a(v,o,u.action||f,{preventScrollReset:u.preventScrollReset,formData:g,body:y,formMethod:u.method||d,formEncType:u.encType||h,flushSync:u.flushSync})}else await s(u.action||f,{preventScrollReset:u.preventScrollReset,formData:g,body:y,formMethod:u.method||d,formEncType:u.encType||h,replace:u.replace,state:u.state,fromRouteId:o,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,s,t,o])}function e_(e,{relative:t}={}){let{basename:o}=b.useContext(uo),a=b.useContext(Do);lt(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),l={...Gc(e||".",{relative:t})},u=Ia();if(e==null){l.search=u.search;let f=new URLSearchParams(l.search),d=f.getAll("index");if(d.some(g=>g==="")){f.delete("index"),d.filter(y=>y).forEach(y=>f.append("index",y));let g=f.toString();l.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(l.pathname=l.pathname==="/"?o:Mo([o,l.pathname])),Oo(l)}function t_(e,{relative:t}={}){let o=b.useContext(Zy);lt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=XE("useViewTransitionState"),s=Gc(e,{relative:t});if(!o.isTransitioning)return!1;let l=Qr(o.currentLocation.pathname,a)||o.currentLocation.pathname,u=Qr(o.nextLocation.pathname,a)||o.nextLocation.pathname;return od(s.pathname,u)!=null||od(s.pathname,l)!=null}function n_(e){return b.createElement(y9,{flushSync:Yg.flushSync,...e})}const r_=Xt(w.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"})),gw=Xt(w.jsx("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m0 14H4V8h16zm-2-1h-6v-2h6zM7.5 17l-1.41-1.41L8.67 13l-2.59-2.59L7.5 9l4 4z"})),yw=Xt(w.jsx("path",{d:"M13 22h8v-7h-3v-4h-5V9h3V2H8v7h3v2H6v4H3v7h8v-7H8v-2h8v2h-3z"})),vw=Xt(w.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"})),o_=Xt(w.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"})),a_=Xt(w.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"})),i_=Xt(w.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),s_=Xt(w.jsx("path",{d:"M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 5.5c0-.28-.22-.5-.5-.5M1 9l2 2c2.88-2.88 6.79-4.08 10.53-3.62l1.19-2.68C9.89 3.84 4.74 5.27 1 9m20 2 2-2c-1.64-1.64-3.55-2.82-5.59-3.57l-.53 2.82c1.5.62 2.9 1.53 4.12 2.75m-4 4 2-2c-.8-.8-1.7-1.42-2.66-1.89l-.55 2.92c.42.27.83.59 1.21.97M5 13l2 2c1.13-1.13 2.56-1.79 4.03-2l1.28-2.88c-2.63-.08-5.3.87-7.31 2.88"})),ms=220,bw=[{label:"Console",icon:w.jsx(gw,{fontSize:"small"}),path:"/",disabled:!1},{label:"Network",icon:w.jsx(s_,{fontSize:"small"}),path:"/network",disabled:!1},{label:"Sessions",icon:w.jsx(vw,{fontSize:"small"}),path:"/sessions",disabled:!0},{label:"Settings",icon:w.jsx(o_,{fontSize:"small"}),path:"/settings",disabled:!0},{label:"Storage",icon:w.jsx(vw,{fontSize:"small"}),path:"/storage",disabled:!0},{label:"Application",icon:w.jsx(yw,{fontSize:"small"}),path:"/application",disabled:!0},{label:"Components",icon:w.jsx(gw,{fontSize:"small"}),path:"/components",disabled:!0},{label:"Preview",icon:w.jsx(yw,{fontSize:"small"}),path:"/preview",disabled:!0}],zm=["0,12 12,12 22,12 32,2 44,22 56,6 70,18 84,10 100,12 120,12","0,12 10,12 20,4 30,20 40,8 50,18 60,6 72,20 84,8 100,12 120,12","0,12 12,10 24,6 36,16 48,8 60,18 72,10 88,14 104,12 120,12"];function l_(){const[e,t]=b.useState(!1),o=Ia(),a=ev(),{mode:s,toggleTheme:l}=h2(),{devices:u,activeDeviceId:f,setActiveDeviceId:d,captureConsole:h,setCaptureConsole:g,captureNetwork:y,setCaptureNetwork:v}=Wy(),[x,S]=b.useState(0),[T,E]=b.useState(null),R=!!T;b.useEffect(()=>{const $=setInterval(()=>{S(V=>{if(zm.length<=1)return 0;let I=V;for(;I===V;)I=Math.floor(Math.random()*zm.length);return I})},1400);return()=>clearInterval($)},[]);const k=b.useMemo(()=>bw.find($=>$.path==="/"?o.pathname==="/":o.pathname.startsWith($.path))?.path??"/",[o.pathname]),O=zm[x],D=M=>{E(R?null:M.currentTarget)},z=M=>{d(M),E(null)},P=w.jsxs(me,{sx:{display:"flex",flexDirection:"column",height:"100%",gap:1,py:1.5,px:1},children:[w.jsx(me,{sx:M=>({px:2,borderRadius:2,background:M.palette.custom.glassBg,border:`1px solid ${M.palette.custom.glassBorder}`,display:"flex",alignItems:"center",justifyContent:"center"}),children:w.jsx(me,{component:"img",src:"/banner.png",sx:{width:"100%",height:"auto",display:"block"}})}),w.jsx(Kf,{sx:{opacity:.4,mx:1}}),w.jsx(Jm,{sx:{flex:1,py:0,overflowY:"auto",overflowX:"hidden",pr:.5},children:bw.map(M=>w.jsxs(uS,{selected:!M.disabled&&k===M.path,disabled:M.disabled,onClick:()=>{M.disabled||(a(M.path),t(!1))},sx:$=>({borderRadius:1.5,mx:.5,my:.25,px:1.5,"&.Mui-selected":{backgroundColor:$.palette.action.selected,color:$.palette.primary.main,"& .MuiListItemIcon-root":{color:$.palette.primary.main}},"&:hover":{backgroundColor:$.palette.action.hover}}),children:[w.jsx(dS,{sx:{minWidth:36},children:M.icon}),w.jsx(pS,{primary:M.label})]},M.path))}),w.jsx(Kf,{sx:{opacity:.4,mx:1}}),w.jsx(Jm,{sx:{py:.5},children:w.jsxs(uS,{onClick:l,sx:M=>({borderRadius:1.5,mx:.5,my:.25,px:1.25,py:.25,minHeight:36,"&:hover":{backgroundColor:M.palette.action.hover}}),children:[w.jsx(dS,{sx:{minWidth:32,mr:.5,color:"text.secondary"},children:s==="light"?w.jsx(a_,{fontSize:"small"}):w.jsx(i_,{fontSize:"small"})}),w.jsx(pS,{primary:`Theme: ${s==="light"?"Light":"Dark"}`,primaryTypographyProps:{variant:"body2",fontWeight:500}})]})})]});return w.jsxs(me,{sx:{display:"flex"},children:[w.jsx(d2,{}),w.jsx(J3,{position:"fixed",elevation:0,sx:M=>({ml:{sm:`${ms}px`},width:{sm:`calc(100% - ${ms}px)`},background:M.palette.custom.glassBg,backdropFilter:"blur(18px) saturate(160%)",WebkitBackdropFilter:"blur(18px) saturate(160%)",borderBottom:`1px solid ${M.palette.divider}`,boxShadow:M.palette.custom.glassShadow}),children:w.jsxs(wS,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[w.jsxs(me,{sx:{display:"flex",alignItems:"center",gap:1.5,minWidth:0},children:[w.jsx(Sr,{color:"inherit",edge:"start",onClick:()=>t(!e),sx:{mr:1,display:{sm:"none"}},children:w.jsx(r_,{})}),w.jsxs(me,{sx:{display:"flex",flexDirection:"column",minWidth:0},children:[w.jsx(Ue,{variant:"h6",noWrap:!0,component:"div",fontWeight:700,color:"text.primary",children:"RN Inspector"}),w.jsx(Ue,{variant:"caption",color:"text.secondary",noWrap:!0,children:"DevTools for React Native"})]})]}),w.jsxs(me,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[w.jsxs(me,{onClick:D,sx:M=>({minWidth:220,maxWidth:260,px:1.5,py:.5,borderRadius:999,border:`1px solid ${M.palette.divider}`,display:"flex",alignItems:"center",gap:.75,cursor:"pointer",backgroundColor:M.palette.background.paper,"&:hover":{backgroundColor:M.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.03)"}}),children:[w.jsx(Ue,{variant:"caption",color:"text.secondary",children:"Device"}),w.jsx(Ue,{variant:"body2",noWrap:!0,sx:{flex:1,fontWeight:500},children:f==="all"?"All devices":u.find(M=>M.id===f)?.label??f})]}),w.jsx(oy,{open:R,anchorEl:T,placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}}],sx:M=>({zIndex:M.zIndex.tooltip}),children:w.jsx(Z4,{onClickAway:()=>E(null),children:w.jsxs(me,{sx:M=>({minWidth:220,maxHeight:320,overflowY:"auto",borderRadius:1.5,border:`1px solid ${M.palette.divider}`,backgroundColor:M.palette.background.default,boxShadow:M.shadows[6],p:.5}),children:[w.jsx(vS,{selected:f==="all",onClick:()=>z("all"),children:"All devices"}),u.map(M=>w.jsx(vS,{selected:f===M.id,onClick:()=>z(M.id),children:M.label},M.id))]})})}),w.jsx(Fr,{title:h?"Pause capturing console logs":"Start capturing console logs",children:w.jsx(Ir,{size:"small",label:"Console",color:h?"success":"default",variant:h?"filled":"outlined",onClick:()=>g(!h),sx:{cursor:"pointer"}})}),w.jsx(Fr,{title:y?"Pause capturing network requests":"Start capturing network requests",children:w.jsx(Ir,{size:"small",label:"Network",color:y?"success":"default",variant:y?"filled":"outlined",onClick:()=>v(!y),sx:{cursor:"pointer"}})}),w.jsx(me,{sx:M=>({width:160,height:28,display:"flex",alignItems:"center",color:M.palette.success.main}),children:w.jsx(me,{component:"svg",viewBox:"0 0 120 24",sx:{width:"100%",height:"100%",color:"#4caf50","& .heartbeat-path":{strokeDasharray:150,strokeDashoffset:150,animation:"heartbeatMove 1.4s ease-in-out infinite"},"@keyframes heartbeatMove":{"0%":{strokeDashoffset:150,opacity:.4},"30%":{strokeDashoffset:90,opacity:1},"60%":{strokeDashoffset:40,opacity:.7},"100%":{strokeDashoffset:0,opacity:.4}},"@keyframes heartbeatColor":{"0%":{color:"#4caf50"},"25%":{color:"#ff9800"},"50%":{color:"#f44336"},"75%":{color:"#2196f3"},"100%":{color:"#4caf50"}},animation:"heartbeatColor 4s ease-in-out infinite"},children:w.jsx("polyline",{className:"heartbeat-path",points:O,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"})})}),w.jsx(me,{component:"img",src:"/Legend_moyai.png",sx:M=>({width:32,height:32,borderRadius:1,objectFit:"cover",ml:1,boxShadow:`0 6px 16px ${M.palette.mode==="dark"?M.palette.common.black+"55":M.palette.grey[500]+"55"}`})})]})]})}),w.jsxs(me,{component:"nav",sx:{width:{sm:ms},flexShrink:{sm:0}},"aria-label":"navigation",children:[w.jsx(Xf,{variant:"temporary",open:e,onClose:()=>t(!1),ModalProps:{keepMounted:!0},sx:M=>({display:{xs:"block",sm:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:ms,background:M.palette.custom.glassBg,backdropFilter:"blur(20px) saturate(160%)",WebkitBackdropFilter:"blur(20px) saturate(160%)",borderRight:`1px solid ${M.palette.divider}`,boxShadow:M.palette.custom.glassShadow}}),children:P}),w.jsx(Xf,{variant:"permanent",sx:M=>({display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:ms,background:M.palette.custom.glassBg,backdropFilter:"blur(20px) saturate(160%)",WebkitBackdropFilter:"blur(20px) saturate(160%)",borderRight:`1px solid ${M.palette.divider}`,boxShadow:M.palette.custom.glassShadow,borderRadius:0,overflow:"hidden"}}),open:!0,children:P})]}),w.jsxs(me,{component:"main",sx:{flexGrow:1,p:3,width:{sm:`calc(100% - ${ms}px)`}},children:[w.jsx(wS,{}),w.jsx(x9,{})]})]})}const hi=Xt(w.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),QE=Xt(w.jsx("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"})),ZE=Xt(w.jsx("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"})),c_=Xt(w.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"})),u_=Xt([w.jsx("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22z"},"0"),w.jsx("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")]),f_=Xt(w.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),d_=Xt(w.jsx("path",{d:"M3 18h12v-2H3zM3 6v2h18V6zm0 7h18v-2H3z"})),Is=({children:e,hover:t=!0,padding:o=2.5,radius:a=2,sx:s,...l})=>w.jsx(me,{sx:[u=>({background:u.palette?.custom?.glassBg??u.palette.background.paper,backdropFilter:"blur(18px) saturate(140%)",WebkitBackdropFilter:"blur(18px) saturate(140%)",border:`1px solid ${u.palette?.custom?.glassBorder??u.palette.divider}`,borderRadius:a,boxShadow:u.palette?.custom?.glassShadow??"0 24px 60px rgba(0,0,0,0.25)",transition:"background 150ms ease, border-color 150ms ease, box-shadow 150ms ease",p:o,...t&&{"&:hover":{background:u.palette?.custom?.glassBgHover??u.palette.background.paper}}}),s],...l,children:e}),xw={log:"default",info:"info",warn:"warning",error:"error"},p_=e=>{switch(e){case"error":return w.jsx(f_,{fontSize:"small"});case"warn":return w.jsx(u_,{fontSize:"small"});case"info":return w.jsx(c_,{fontSize:"small"});default:return w.jsx(d_,{fontSize:"small"})}};function Sw(e){try{return new Date(e).toLocaleTimeString()}catch{return e}}const h_=()=>{const{consoleEvents:e,status:t,stats:o,reconnect:a,activeDeviceId:s}=Wy(),[l,u]=b.useState("all"),[f,d]=b.useState(null),[h,g]=b.useState(!1),[y,v]=b.useState(!1),[x,S]=b.useState(!1),T=()=>{f?.msg&&(navigator.clipboard.writeText(f.msg),S(!0),setTimeout(()=>S(!1),2e3))},E=b.useMemo(()=>{const R=e.slice(-300).reverse(),k=l==="all"?R:R.filter(O=>O.level===l);return s&&s!=="all"?k.filter(O=>!O.deviceId||O.deviceId===s):k},[e,l,s]);return w.jsxs(me,{sx:{display:"flex",gap:2,flexDirection:"column"},children:[w.jsxs(me,{sx:{p:2,borderRadius:2,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",border:R=>`1px solid ${R.palette.divider}`,boxShadow:R=>`0 6px 18px ${R.palette.mode==="dark"?"rgba(0,0,0,0.35)":"rgba(0,0,0,0.08)"}`,display:"flex",flexDirection:"column",gap:1.5},children:[w.jsxs(me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5},children:[w.jsxs(me,{sx:{display:"flex",flexDirection:"column",minWidth:0},children:[w.jsx(Ue,{variant:"h5",fontWeight:600,children:"Console"}),w.jsx(Ue,{variant:"caption",color:"text.secondary",children:"Live logs from proxy"})]}),w.jsx(Fr,{title:t==="open"?"Proxy websocket connected":"Proxy disconnected. Click to try reconnecting.",children:w.jsx(Ir,{size:"small",label:`WS: ${t}${o.consoleCount?` • ${o.consoleCount} logs`:""}`,color:t==="open"?"success":t==="connecting"?"warning":"default",variant:t==="open"?"filled":"outlined",onClick:t==="open"?void 0:a,sx:{cursor:t==="open"?"default":"pointer"}})})]}),w.jsxs(q2,{value:l,onChange:(R,k)=>u(k),variant:"scrollable",scrollButtons:"auto",sx:{minHeight:40,"& .MuiTab-root":{minHeight:40,fontWeight:600,fontSize:13,textTransform:"none"}},children:[w.jsx(Aa,{value:"all",label:"All"}),w.jsx(Aa,{value:"log",label:"Log"}),w.jsx(Aa,{value:"info",label:"Info"}),w.jsx(Aa,{value:"warn",label:"Warn"}),w.jsx(Aa,{value:"error",label:"Error"})]})]}),w.jsx(Is,{sx:{overflow:"auto",p:{xs:1.5,md:2}},children:E.length===0?w.jsx(me,{sx:{py:4,textAlign:"center",color:"text.secondary"},children:"Waiting for console events from proxy…"}):w.jsx(Vs,{spacing:1,children:E.map((R,k)=>w.jsxs(me,{onClick:()=>{d(R),g(!0)},sx:{display:"flex",alignItems:"center",gap:1.5,px:1.5,py:1,borderRadius:2,border:O=>`1px solid ${O.palette.divider}`,cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:[w.jsxs(me,{sx:{minWidth:110},children:[w.jsx(Ue,{variant:"caption",color:"text.secondary",children:Sw(R.ts)}),w.jsx(Ue,{variant:"caption",color:"text.secondary",children:R.origin??"metro"})]}),w.jsx(me,{sx:{flex:1,minWidth:0},children:w.jsx(Ue,{variant:"body2",noWrap:!0,sx:{fontFamily:"monospace",fontSize:13},title:R.msg,children:R.msg})}),w.jsx(Ir,{size:"small",icon:p_(R.level),label:R.level,color:xw[R.level]??"default",variant:"filled",sx:{textTransform:"capitalize",borderRadius:2}})]},`${R.ts}-${k}`))})}),w.jsx(Xf,{anchor:"right",open:h&&!!f,onClose:()=>g(!1),PaperProps:{sx:{width:y?"100%":{xs:"100%",sm:520},background:R=>R.palette.background.paper,border:"none",borderRadius:0,boxShadow:"none",overflow:"hidden",m:0,height:"100%"}},children:w.jsxs(me,{sx:{p:0,height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[w.jsx(me,{"aria-hidden":!0,sx:R=>({position:"absolute",top:-80,right:-60,width:220,height:220,borderRadius:"50%",background:`linear-gradient(135deg, ${R.palette.primary.main}, ${R.palette.secondary.main})`,opacity:.15,filter:"blur(40px)",pointerEvents:"none"})}),w.jsxs(me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,m:2,mb:0,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.02)",backdropFilter:"blur(14px) saturate(140%)",WebkitBackdropFilter:"blur(14px) saturate(140%)",border:R=>`1px solid ${R.palette.divider}`,borderRadius:2,boxShadow:R=>`0 6px 20px ${R.palette.mode==="dark"?"rgba(0,0,0,0.3)":"rgba(0,0,0,0.08)"}`},children:[w.jsx(me,{sx:{display:"flex",alignItems:"center",gap:1.5,minWidth:0},children:w.jsxs(me,{children:[w.jsx(Ue,{variant:"h6",sx:{fontWeight:700,letterSpacing:.2,lineHeight:1.2},children:"Log Details"}),f&&w.jsxs(Ue,{variant:"caption",color:"text.secondary",children:[Sw(f.ts)," • ",f.origin??"metro"]})]})}),w.jsxs(me,{sx:{display:"inline-flex",gap:.5,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.03)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:R=>`1px solid ${R.palette.divider}`,borderRadius:2,px:.5,py:.25},children:[w.jsx(Fr,{title:x?"Copied!":"Copy message",children:w.jsx(Sr,{onClick:T,size:"small",color:x?"success":"default",children:w.jsx(hi,{fontSize:"small"})})}),w.jsx(Sr,{onClick:()=>v(R=>!R),size:"small",children:y?w.jsx(ZE,{fontSize:"small"}):w.jsx(QE,{fontSize:"small"})}),w.jsx(Sr,{onClick:()=>g(!1),size:"small",children:w.jsx(Yy,{fontSize:"small"})})]})]}),f&&w.jsxs(me,{sx:{flex:1,overflow:"auto",p:2},children:[w.jsx(me,{sx:{mb:3,p:2,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.02)":"rgba(0,0,0,0.01)",border:R=>`1px solid ${R.palette.divider}`,borderRadius:2,transition:"all 0.2s ease","&:hover":{background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.02)",transform:"translateY(-1px)"}},children:w.jsxs(me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[w.jsx(Ue,{variant:"overline",color:"text.secondary",sx:{letterSpacing:.8},children:"Level"}),w.jsx(Ir,{size:"small",label:f.level.toUpperCase(),color:xw[f.level]??"default",variant:"filled",sx:{fontWeight:600,letterSpacing:.5,px:.75}})]})}),w.jsxs(me,{sx:{p:2,background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.02)":"rgba(0,0,0,0.01)",border:R=>`1px solid ${R.palette.divider}`,borderRadius:2,transition:"all 0.2s ease","&:hover":{background:R=>R.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.02)",transform:"translateY(-1px)"}},children:[w.jsxs(me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1.5},children:[w.jsx(Ue,{variant:"overline",color:"text.secondary",children:"Message"}),w.jsx(Fr,{title:x?"Copied!":"Copy",children:w.jsx(Sr,{size:"small",onClick:T,children:w.jsx(hi,{sx:{fontSize:16}})})})]}),w.jsx(me,{component:"pre",sx:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:'"Fira Code", "JetBrains Mono", monospace',fontSize:13,lineHeight:1.6,m:0,p:2,background:R=>R.palette.mode==="dark"?"rgba(0,0,0,0.3)":"rgba(0,0,0,0.04)",borderRadius:1.5,maxHeight:400,overflow:"auto"},children:f.msg})]})]})]})})]})},m_=Xt(w.jsx("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"}));function Cw(e){try{return new Date(e).toLocaleTimeString()}catch{return e}}const g_=()=>{const{networkEvents:e,status:t,stats:o,reconnect:a,activeDeviceId:s}=Wy(),[l,u]=b.useState(null),[f,d]=b.useState(!1),[h,g]=b.useState("headers"),[y,v]=b.useState(!1),[x,S]=b.useState(!1),[T,E]=b.useState(!1),R=L=>{navigator.clipboard.writeText(L),S(!0),setTimeout(()=>S(!1),2e3)},k=L=>L?L>=200&&L<300?"success":L>=300&&L<400?"warning":L>=400?"error":"default":"default",O=()=>{if(!l)return"";if(h==="headers"){const L=l.requestHeaders?Object.entries(l.requestHeaders).map(([F,H])=>`${F}: ${H}`).join(`
157
157
  `):"",A=l.responseHeaders?Object.entries(l.responseHeaders).map(([F,H])=>`${F}: ${H}`).join(`
158
158
  `):"";return`Request Headers:
159
159
  ${L}
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/png" href="/icon.png" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>rn-inspector</title>
8
- <script type="module" crossorigin src="/assets/index-9Swzwsh7.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-DcrAH1Mf.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-1KQqYNq3.css">
10
10
  </head>
11
11
  <body>