From 23df53766f74aaff14c87879f763222b13dcf18a Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 19 Apr 2026 18:33:00 -0400 Subject: [PATCH] fix(web): restore R5 error taxonomy in initial-load path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Earlier refactor to a discriminated-union loader accidentally discarded the plan's R5 error taxonomy. `apiJsonOrNull` throws a body-less Response on non-ok statuses, so the loader's try/catch had no way to recover the server's error envelope or the request_id for 500s. The initial-error render then collapsed all statuses into either `` (401/403) or a generic InlineErrorBanner — losing the plan-specified copy for access denied, transient failures, and 500 with request ID. Fixes: - Loader now uses `fetch` directly against the API path so the response body is preserved on non-ok statuses. - 404/501 still collapse to `{data: null, error: null}` (the empty- envelope signal the UI maps to R4). - Any other non-ok parses the body as JSON, extracts request_id from either the top-level `request_id` field or the uniform error envelope (`errors[0].request_id` or parsed out of `errors[0].detail`), and threads it through `error.requestId`. - Component's `initialError` branch now applies the full R5 taxonomy: R5(c) access denied for 401/403 with the specific copy, R5(a) retry banner for 429/503, R5(d) "Something went wrong. Request ID: . Contact support." for 500s, and a generic retryable banner for any other 4xx. Adds run-files.test.ts covering extractRequestId across the three locations request_id can show up in a server error body (top-level, errors[0].request_id, errors[0].detail regex). The RunFilesErrorBoundary export stays in place as defense-in-depth for React render crashes — the loader no longer throws, but ensuring the route always has a fallback is cheap. Refs docs/plans/2026-04-19-002-feat-run-files-changed-tab-plan.md § Unit 11 R5 taxonomy. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/fabro-web/app/routes/run-files.test.ts | 53 +++++ apps/fabro-web/app/routes/run-files.tsx | 151 ++++++++++--- .../{entry-84st7geq.js => entry-qzbwmrbr.js} | 206 +++++++++--------- lib/crates/fabro-spa/assets/index.html | 2 +- 4 files changed, 276 insertions(+), 136 deletions(-) create mode 100644 apps/fabro-web/app/routes/run-files.test.ts rename lib/crates/fabro-spa/assets/assets/{entry-84st7geq.js => entry-qzbwmrbr.js} (75%) diff --git a/apps/fabro-web/app/routes/run-files.test.ts b/apps/fabro-web/app/routes/run-files.test.ts new file mode 100644 index 000000000..3f2c314f6 --- /dev/null +++ b/apps/fabro-web/app/routes/run-files.test.ts @@ -0,0 +1,53 @@ +import { describe, expect, test } from "bun:test"; + +import { extractRequestId } from "./run-files"; + +describe("extractRequestId", () => { + test("reads `request_id` from the top level of the error body", () => { + expect(extractRequestId({ request_id: "abc-123" })).toBe("abc-123"); + }); + + test("reads `request_id` from errors[0] under the uniform envelope", () => { + expect( + extractRequestId({ + errors: [ + { status: "500", title: "Internal", request_id: "evt_42" }, + ], + }), + ).toBe("evt_42"); + }); + + test("parses `Request ID: xyz` out of errors[0].detail", () => { + expect( + extractRequestId({ + errors: [ + { + status: "500", + title: "Internal Server Error", + detail: "Run files failed. Request ID: req_999 on shard 2.", + }, + ], + }), + ).toBe("req_999"); + }); + + test("returns null for bodies without any request_id", () => { + expect(extractRequestId(null)).toBe(null); + expect(extractRequestId(undefined)).toBe(null); + expect(extractRequestId("not an object")).toBe(null); + expect(extractRequestId({ errors: [] })).toBe(null); + expect(extractRequestId({ errors: [{ detail: "no id in here" }] })).toBe( + null, + ); + }); + + test("handles request_id values with hyphens and underscores", () => { + expect( + extractRequestId({ + errors: [ + { detail: "Something failed. request_id: RX-1A_2B-3C4D" }, + ], + }), + ).toBe("RX-1A_2B-3C4D"); + }); +}); diff --git a/apps/fabro-web/app/routes/run-files.tsx b/apps/fabro-web/app/routes/run-files.tsx index 18e4bdb38..cbea8bd60 100644 --- a/apps/fabro-web/app/routes/run-files.tsx +++ b/apps/fabro-web/app/routes/run-files.tsx @@ -13,7 +13,6 @@ import { } from "react-router"; import { MultiFileDiff, PatchDiff, Virtualizer } from "@pierre/diffs/react"; import { useTheme } from "../lib/theme"; -import { apiJsonOrNull } from "../api"; import type { FileDiff as ApiFileDiff, PaginatedRunFileList, @@ -42,34 +41,93 @@ export const handle = { wide: true }; * and the component keeps showing the last-good data with an inline banner. * This is the plan's "prior content stays mounted; inline banner with * Retry" behavior for mid-session refresh failures (§ Unit 11). + * + * `error.requestId` is extracted from the 500-response body per R5 so the + * UI can surface it verbatim in the copy ("Request ID: xyz. Contact + * support.") — not just the bare status code. */ export type RunFilesLoaderResult = { data: PaginatedRunFileList | null; - error: { status: number; message: string } | null; + error: { + status: number; + message: string; + requestId: string | null; + } | null; }; -export async function loader({ request, params }: any): Promise { - try { - const data = await apiJsonOrNull( - `/runs/${params.id}/files`, - { request }, - ); - return { data, error: null }; - } catch (e) { - if (e instanceof Response) { - return { - data: null, - error: { - status: e.status, - message: e.statusText || `HTTP ${e.status}`, - }, - }; - } - return { - data: null, - error: { status: 0, message: String(e) }, - }; +export async function loader({ + request, + params, +}: any): Promise { + // Avoid apiJsonOrNull's `throw new Response(null, ...)` pattern — it + // strips the response body, and we need the body to parse request_id + // out of 500s per R5. + const response = await fetch(`/api/v1/runs/${params.id}/files`, { + credentials: "include", + ...(request?.signal ? { signal: request.signal } : {}), + }); + + if (response.status === 404 || response.status === 501) { + return { data: null, error: null }; } + if (response.ok) { + const data = (await response.json()) as PaginatedRunFileList; + return { data, error: null }; + } + + // Parse the body once. 500 responses carry request_id per the server's + // uniform error envelope; other statuses may not. + let bodyText = ""; + try { + bodyText = await response.text(); + } catch { + // Body read failed — fall through with an empty string; the error + // surface still reports the status. + } + let bodyJson: unknown = null; + if (bodyText) { + try { + bodyJson = JSON.parse(bodyText); + } catch { + // non-JSON body is fine; we still got the status + } + } + + return { + data: null, + error: { + status: response.status, + message: response.statusText || `HTTP ${response.status}`, + requestId: extractRequestId(bodyJson), + }, + }; +} + +/** + * Pull request_id out of the server's uniform error envelope: + * { "errors": [{ "status": "500", "title": "...", "detail": "..." }] } + * Some deployments tag request_id at top level or within errors[].detail. + * + * Exported for unit testing; callers should prefer the already-extracted + * value on `RunFilesLoaderResult.error.requestId`. + */ +export function extractRequestId(body: unknown): string | null { + if (!body || typeof body !== "object") return null; + const b = body as Record; + if (typeof b.request_id === "string") return b.request_id; + const errors = b.errors; + if (Array.isArray(errors) && errors.length > 0) { + const first = errors[0]; + if (first && typeof first === "object") { + const rec = first as Record; + if (typeof rec.request_id === "string") return rec.request_id; + if (typeof rec.detail === "string") { + const m = rec.detail.match(/request[_ ]id[=:]?\s*([a-zA-Z0-9-_]+)/i); + if (m) return m[1]; + } + } + } + return null; } // Events that should trigger a revalidation. CheckpointCompleted is the @@ -411,22 +469,51 @@ export default function RunFiles({ loaderData }: any) { return ; } - // Initial load failed and we have no prior data to fall back on — - // render the status-specific error state inline (mirrors what the - // ErrorBoundary would show, but without unmounting the route). + // Initial load failed and we have no prior data to fall back on — render + // the status-specific error state inline per plan § R5. The route does + // not unmount; the RunFilesErrorBoundary is reserved for render-time + // errors that aren't surfaced by the loader at all. if (initialError) { + // R5(c): access denied. if (initialError.status === 401 || initialError.status === 403) { return ( - +
+ You don't have access to this run's files. +
); } + // R5(a): 4xx transient (429) / 503 — retry affordance. + if (initialError.status === 429 || initialError.status === 503) { + return ( + revalidator.revalidate()} + /> + ); + } + // R5(d): 500 — surface request ID if we have it. + if (initialError.status >= 500) { + const suffix = initialError.requestId + ? ` Request ID: ${initialError.requestId}.` + : ""; + return ( +
+ Something went wrong.{suffix} Please contact support if this + persists. +
+ ); + } + // Any other 4xx that isn't 401/403/404/429 — treat like a retryable + // transient failure. The banner keeps the user in context. return ( = 500 - ? `Something went wrong (${initialError.status}).` - : `Couldn't load files (${initialError.status}).` - } + message={`Couldn't load files (${initialError.status}).`} onRetry={() => revalidator.revalidate()} /> ); diff --git a/lib/crates/fabro-spa/assets/assets/entry-84st7geq.js b/lib/crates/fabro-spa/assets/assets/entry-qzbwmrbr.js similarity index 75% rename from lib/crates/fabro-spa/assets/assets/entry-84st7geq.js rename to lib/crates/fabro-spa/assets/assets/entry-qzbwmrbr.js index a6d6f0115..fc51c2345 100644 --- a/lib/crates/fabro-spa/assets/assets/entry-84st7geq.js +++ b/lib/crates/fabro-spa/assets/assets/entry-qzbwmrbr.js @@ -1,4 +1,4 @@ -import{X as u,Y as _8,Z as o5,_ as f}from"./chunk-q07bg6gn.js";var Q0=_8((Jl,MU)=>{(function(){function Z(I,Z0){Object.defineProperty(q.prototype,I,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Z0[0],Z0[1])}})}function Y(I){if(I===null||typeof I!=="object")return null;return I=X1&&I[X1]||I["@@iterator"],typeof I==="function"?I:null}function J(I,Z0){I=(I=I.constructor)&&(I.displayName||I.name)||"ReactClass";var _0=I+"."+Z0;L0[_0]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Z0,I),L0[_0]=!0)}function q(I,Z0,_0){this.props=I,this.context=Z0,this.refs=e5,this.updater=_0||C1}function z(){}function B(I,Z0,_0){this.props=I,this.context=Z0,this.refs=e5,this.updater=_0||C1}function W(){}function U(I){return""+I}function G(I){try{U(I);var Z0=!1}catch(S0){Z0=!0}if(Z0){Z0=console;var _0=Z0.error,v0=typeof Symbol==="function"&&Symbol.toStringTag&&I[Symbol.toStringTag]||I.constructor.name||"Object";return _0.call(Z0,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",v0),U(I)}}function w(I){if(I==null)return null;if(typeof I==="function")return I.$$typeof===m6?null:I.displayName||I.name||null;if(typeof I==="string")return I;switch(I){case G0:return"Fragment";case B0:return"Profiler";case k:return"StrictMode";case m0:return"Suspense";case W0:return"SuspenseList";case w1:return"Activity"}if(typeof I==="object")switch(typeof I.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),I.$$typeof){case i:return"Portal";case w0:return I.displayName||"Context";case H0:return(I._context.displayName||"Context")+".Consumer";case D0:var Z0=I.render;return I=I.displayName,I||(I=Z0.displayName||Z0.name||"",I=I!==""?"ForwardRef("+I+")":"ForwardRef"),I;case x0:return Z0=I.displayName||null,Z0!==null?Z0:w(I.type)||"Memo";case d0:Z0=I._payload,I=I._init;try{return w(I(Z0))}catch(_0){}}return null}function H(I){if(I===G0)return"<>";if(typeof I==="object"&&I!==null&&I.$$typeof===d0)return"<...>";try{var Z0=w(I);return Z0?"<"+Z0+">":"<...>"}catch(_0){return"<...>"}}function O(){var I=K1.A;return I===null?null:I.getOwner()}function A(){return Error("react-stack-top-frame")}function _(I){if(U4.call(I,"key")){var Z0=Object.getOwnPropertyDescriptor(I,"key").get;if(Z0&&Z0.isReactWarning)return!1}return I.key!==void 0}function P(I,Z0){function _0(){N6||(N6=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Z0))}_0.isReactWarning=!0,Object.defineProperty(I,"key",{get:_0,configurable:!0})}function L(){var I=w(this.type);return f4[I]||(f4[I]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),I=this.props.ref,I!==void 0?I:null}function R(I,Z0,_0,v0,S0,e0){var k0=_0.ref;return I={$$typeof:e,type:I,key:Z0,props:_0,_owner:v0},(k0!==void 0?k0:null)!==null?Object.defineProperty(I,"ref",{enumerable:!1,get:L}):Object.defineProperty(I,"ref",{enumerable:!1,value:null}),I._store={},Object.defineProperty(I._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(I,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(I,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:S0}),Object.defineProperty(I,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:e0}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I}function T(I,Z0){return Z0=R(I.type,Z0,I.props,I._owner,I._debugStack,I._debugTask),I._store&&(Z0._store.validated=I._store.validated),Z0}function C(I){v(I)?I._store&&(I._store.validated=1):typeof I==="object"&&I!==null&&I.$$typeof===d0&&(I._payload.status==="fulfilled"?v(I._payload.value)&&I._payload.value._store&&(I._payload.value._store.validated=1):I._store&&(I._store.validated=1))}function v(I){return typeof I==="object"&&I!==null&&I.$$typeof===e}function D(I){var Z0={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(_0){return Z0[_0]})}function S(I,Z0){return typeof I==="object"&&I!==null&&I.key!=null?(G(I.key),D(""+I.key)):Z0.toString(36)}function j(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status==="string"?I.then(W,W):(I.status="pending",I.then(function(Z0){I.status==="pending"&&(I.status="fulfilled",I.value=Z0)},function(Z0){I.status==="pending"&&(I.status="rejected",I.reason=Z0)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function E(I,Z0,_0,v0,S0){var e0=typeof I;if(e0==="undefined"||e0==="boolean")I=null;var k0=!1;if(I===null)k0=!0;else switch(e0){case"bigint":case"string":case"number":k0=!0;break;case"object":switch(I.$$typeof){case e:case i:k0=!0;break;case d0:return k0=I._init,E(k0(I._payload),Z0,_0,v0,S0)}}if(k0){k0=I,S0=S0(k0);var Q1=v0===""?"."+S(k0,0):v0;return N1(S0)?(_0="",Q1!=null&&(_0=Q1.replace(e2,"$&/")+"/"),E(S0,Z0,_0,"",function(N5){return N5})):S0!=null&&(v(S0)&&(S0.key!=null&&(k0&&k0.key===S0.key||G(S0.key)),_0=T(S0,_0+(S0.key==null||k0&&k0.key===S0.key?"":(""+S0.key).replace(e2,"$&/")+"/")+Q1),v0!==""&&k0!=null&&v(k0)&&k0.key==null&&k0._store&&!k0._store.validated&&(_0._store.validated=2),S0=_0),Z0.push(S0)),1}if(k0=0,Q1=v0===""?".":v0+":",N1(I))for(var y0=0;y0{(function(){function Z(I,Z0){Object.defineProperty(q.prototype,I,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Z0[0],Z0[1])}})}function Y(I){if(I===null||typeof I!=="object")return null;return I=X1&&I[X1]||I["@@iterator"],typeof I==="function"?I:null}function J(I,Z0){I=(I=I.constructor)&&(I.displayName||I.name)||"ReactClass";var _0=I+"."+Z0;L0[_0]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Z0,I),L0[_0]=!0)}function q(I,Z0,_0){this.props=I,this.context=Z0,this.refs=e5,this.updater=_0||C1}function z(){}function B(I,Z0,_0){this.props=I,this.context=Z0,this.refs=e5,this.updater=_0||C1}function W(){}function U(I){return""+I}function G(I){try{U(I);var Z0=!1}catch(S0){Z0=!0}if(Z0){Z0=console;var _0=Z0.error,v0=typeof Symbol==="function"&&Symbol.toStringTag&&I[Symbol.toStringTag]||I.constructor.name||"Object";return _0.call(Z0,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",v0),U(I)}}function w(I){if(I==null)return null;if(typeof I==="function")return I.$$typeof===m6?null:I.displayName||I.name||null;if(typeof I==="string")return I;switch(I){case G0:return"Fragment";case B0:return"Profiler";case k:return"StrictMode";case u0:return"Suspense";case W0:return"SuspenseList";case w1:return"Activity"}if(typeof I==="object")switch(typeof I.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),I.$$typeof){case i:return"Portal";case w0:return I.displayName||"Context";case H0:return(I._context.displayName||"Context")+".Consumer";case b0:var Z0=I.render;return I=I.displayName,I||(I=Z0.displayName||Z0.name||"",I=I!==""?"ForwardRef("+I+")":"ForwardRef"),I;case x0:return Z0=I.displayName||null,Z0!==null?Z0:w(I.type)||"Memo";case d0:Z0=I._payload,I=I._init;try{return w(I(Z0))}catch(_0){}}return null}function H(I){if(I===G0)return"<>";if(typeof I==="object"&&I!==null&&I.$$typeof===d0)return"<...>";try{var Z0=w(I);return Z0?"<"+Z0+">":"<...>"}catch(_0){return"<...>"}}function O(){var I=K1.A;return I===null?null:I.getOwner()}function A(){return Error("react-stack-top-frame")}function _(I){if(U4.call(I,"key")){var Z0=Object.getOwnPropertyDescriptor(I,"key").get;if(Z0&&Z0.isReactWarning)return!1}return I.key!==void 0}function P(I,Z0){function _0(){N6||(N6=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Z0))}_0.isReactWarning=!0,Object.defineProperty(I,"key",{get:_0,configurable:!0})}function L(){var I=w(this.type);return f4[I]||(f4[I]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),I=this.props.ref,I!==void 0?I:null}function R(I,Z0,_0,v0,S0,e0){var k0=_0.ref;return I={$$typeof:e,type:I,key:Z0,props:_0,_owner:v0},(k0!==void 0?k0:null)!==null?Object.defineProperty(I,"ref",{enumerable:!1,get:L}):Object.defineProperty(I,"ref",{enumerable:!1,value:null}),I._store={},Object.defineProperty(I._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(I,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(I,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:S0}),Object.defineProperty(I,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:e0}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I}function T(I,Z0){return Z0=R(I.type,Z0,I.props,I._owner,I._debugStack,I._debugTask),I._store&&(Z0._store.validated=I._store.validated),Z0}function C(I){v(I)?I._store&&(I._store.validated=1):typeof I==="object"&&I!==null&&I.$$typeof===d0&&(I._payload.status==="fulfilled"?v(I._payload.value)&&I._payload.value._store&&(I._payload.value._store.validated=1):I._store&&(I._store.validated=1))}function v(I){return typeof I==="object"&&I!==null&&I.$$typeof===e}function b(I){var Z0={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(_0){return Z0[_0]})}function S(I,Z0){return typeof I==="object"&&I!==null&&I.key!=null?(G(I.key),b(""+I.key)):Z0.toString(36)}function j(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status==="string"?I.then(W,W):(I.status="pending",I.then(function(Z0){I.status==="pending"&&(I.status="fulfilled",I.value=Z0)},function(Z0){I.status==="pending"&&(I.status="rejected",I.reason=Z0)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function E(I,Z0,_0,v0,S0){var e0=typeof I;if(e0==="undefined"||e0==="boolean")I=null;var k0=!1;if(I===null)k0=!0;else switch(e0){case"bigint":case"string":case"number":k0=!0;break;case"object":switch(I.$$typeof){case e:case i:k0=!0;break;case d0:return k0=I._init,E(k0(I._payload),Z0,_0,v0,S0)}}if(k0){k0=I,S0=S0(k0);var Q1=v0===""?"."+S(k0,0):v0;return N1(S0)?(_0="",Q1!=null&&(_0=Q1.replace(e2,"$&/")+"/"),E(S0,Z0,_0,"",function(H5){return H5})):S0!=null&&(v(S0)&&(S0.key!=null&&(k0&&k0.key===S0.key||G(S0.key)),_0=T(S0,_0+(S0.key==null||k0&&k0.key===S0.key?"":(""+S0.key).replace(e2,"$&/")+"/")+Q1),v0!==""&&k0!=null&&v(k0)&&k0.key==null&&k0._store&&!k0._store.validated&&(_0._store.validated=2),S0=_0),Z0.push(S0)),1}if(k0=0,Q1=v0===""?".":v0+":",N1(I))for(var y0=0;y0 import('./MyComponent')) @@ -10,67 +10,67 @@ Your code should look like: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app -See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),I}function l(){K1.asyncTransitions--}function X0(I){if(G4===null)try{var Z0=("require"+Math.random()).slice(0,7);G4=(MU&&MU[Z0]).call(MU,"timers").setImmediate}catch(_0){G4=function(v0){$2===!1&&($2=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var S0=new MessageChannel;S0.port1.onmessage=v0,S0.port2.postMessage(void 0)}}return G4(I)}function K0(I){return 1 ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(y0,N5){S0=!0,k0.then(function(q5){if(n(Z0,_0),_0===0){try{J0(v0),X0(function(){return p(q5,y0,N5)})}catch(Z2){K1.thrownErrors.push(Z2)}if(0 ...)"))}),K1.actQueue=null),0K1.recentlyCreatedOwnerStacks++;return R(I,S0,v0,O(),y0?Error("react-stack-top-frame"):k2,y0?S1(H(I)):H6)},Jl.createRef=function(){var I={current:null};return Object.seal(I),I},Jl.forwardRef=function(I){I!=null&&I.$$typeof===x0?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof I!=="function"?console.error("forwardRef requires a render function but was given %s.",I===null?"null":typeof I):I.length!==0&&I.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",I.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),I!=null&&I.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Z0={$$typeof:D0,render:I},_0;return Object.defineProperty(Z0,"displayName",{enumerable:!1,configurable:!0,get:function(){return _0},set:function(v0){_0=v0,I.name||I.displayName||(Object.defineProperty(I,"name",{value:v0}),I.displayName=v0)}}),Z0},Jl.isValidElement=v,Jl.lazy=function(I){I={_status:-1,_result:I};var Z0={$$typeof:d0,_payload:I,_init:s},_0={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return I._ioInfo=_0,Z0._debugInfo=[{awaited:_0}],Z0},Jl.memo=function(I,Z0){I==null&&console.error("memo: The first argument must be a component. Instead received: %s",I===null?"null":typeof I),Z0={$$typeof:x0,type:I,compare:Z0===void 0?null:Z0};var _0;return Object.defineProperty(Z0,"displayName",{enumerable:!1,configurable:!0,get:function(){return _0},set:function(v0){_0=v0,I.name||I.displayName||(Object.defineProperty(I,"name",{value:v0}),I.displayName=v0)}}),Z0},Jl.startTransition=function(I){var Z0=K1.T,_0={};_0._updatedFibers=new Set,K1.T=_0;try{var v0=I(),S0=K1.S;S0!==null&&S0(_0,v0),typeof v0==="object"&&v0!==null&&typeof v0.then==="function"&&(K1.asyncTransitions++,v0.then(l,l),v0.then(W,T5))}catch(e0){T5(e0)}finally{Z0===null&&_0._updatedFibers&&(I=_0._updatedFibers.size,_0._updatedFibers.clear(),10{(function(){function Z(){if(D=!1,g){var p=Xl.unstable_now();l=p;var J0=!0;try{Z:{C=!1,v&&(v=!1,j(s),s=-1),T=!0;var e=R;try{Y:{B(p);for(L=J(A);L!==null&&!(L.expirationTime>p&&U());){var i=L.callback;if(typeof i==="function"){L.callback=null,R=L.priorityLevel;var G0=i(L.expirationTime<=p);if(p=Xl.unstable_now(),typeof G0==="function"){L.callback=G0,B(p),J0=!0;break Y}L===J(A)&&q(A),B(p)}else q(A);L=J(A)}if(L!==null)J0=!0;else{var k=J(_);k!==null&&G(W,k.startTime-p),J0=!1}}break Z}finally{L=null,R=e,T=!1}J0=void 0}}finally{J0?X0():g=!1}}}function Y(p,J0){var e=p.length;p.push(J0);Z:for(;0>>1,G0=p[i];if(0>>1;iz(H0,e))w0z(D0,H0)?(p[i]=D0,p[w0]=e,i=w0):(p[i]=H0,p[B0]=e,i=B0);else if(w0z(D0,e))p[i]=D0,p[w0]=e,i=w0;else break Z}}return J0}function z(p,J0){var e=p.sortIndex-J0.sortIndex;return e!==0?e:p.id-J0.id}function B(p){for(var J0=J(_);J0!==null;){if(J0.callback===null)q(_);else if(J0.startTime<=p)q(_),J0.sortIndex=J0.expirationTime,Y(A,J0);else break;J0=J(_)}}function W(p){if(v=!1,B(p),!C)if(J(A)!==null)C=!0,g||(g=!0,X0());else{var J0=J(_);J0!==null&&G(W,J0.startTime-p)}}function U(){return D?!0:Xl.unstable_now()-lp||125i?(p.sortIndex=e,Y(_,p),J(A)===null&&p===J(_)&&(v?(j(s),s=-1):v=!0,G(W,e-i))):(p.sortIndex=G0,Y(A,p),C||T||(C=!0,g||(g=!0,X0()))),p},Xl.unstable_shouldYield=U,Xl.unstable_wrapCallback=function(p){var J0=R;return function(){var e=R;R=J0;try{return p.apply(this,arguments)}finally{R=e}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var NE=_8((ql)=>{var uA=u(Q0());(function(){function Z(){}function Y(H){return""+H}function J(H,O,A){var _=3"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var S0=new MessageChannel;S0.port1.onmessage=v0,S0.port2.postMessage(void 0)}}return G4(I)}function K0(I){return 1 ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(y0,H5){S0=!0,k0.then(function(q5){if(n(Z0,_0),_0===0){try{J0(v0),X0(function(){return p(q5,y0,H5)})}catch(Z2){K1.thrownErrors.push(Z2)}if(0 ...)"))}),K1.actQueue=null),0K1.recentlyCreatedOwnerStacks++;return R(I,S0,v0,O(),y0?Error("react-stack-top-frame"):k2,y0?S1(H(I)):H6)},Xl.createRef=function(){var I={current:null};return Object.seal(I),I},Xl.forwardRef=function(I){I!=null&&I.$$typeof===x0?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof I!=="function"?console.error("forwardRef requires a render function but was given %s.",I===null?"null":typeof I):I.length!==0&&I.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",I.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),I!=null&&I.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Z0={$$typeof:b0,render:I},_0;return Object.defineProperty(Z0,"displayName",{enumerable:!1,configurable:!0,get:function(){return _0},set:function(v0){_0=v0,I.name||I.displayName||(Object.defineProperty(I,"name",{value:v0}),I.displayName=v0)}}),Z0},Xl.isValidElement=v,Xl.lazy=function(I){I={_status:-1,_result:I};var Z0={$$typeof:d0,_payload:I,_init:s},_0={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return I._ioInfo=_0,Z0._debugInfo=[{awaited:_0}],Z0},Xl.memo=function(I,Z0){I==null&&console.error("memo: The first argument must be a component. Instead received: %s",I===null?"null":typeof I),Z0={$$typeof:x0,type:I,compare:Z0===void 0?null:Z0};var _0;return Object.defineProperty(Z0,"displayName",{enumerable:!1,configurable:!0,get:function(){return _0},set:function(v0){_0=v0,I.name||I.displayName||(Object.defineProperty(I,"name",{value:v0}),I.displayName=v0)}}),Z0},Xl.startTransition=function(I){var Z0=K1.T,_0={};_0._updatedFibers=new Set,K1.T=_0;try{var v0=I(),S0=K1.S;S0!==null&&S0(_0,v0),typeof v0==="object"&&v0!==null&&typeof v0.then==="function"&&(K1.asyncTransitions++,v0.then(l,l),v0.then(W,T5))}catch(e0){T5(e0)}finally{Z0===null&&_0._updatedFibers&&(I=_0._updatedFibers.size,_0._updatedFibers.clear(),10{(function(){function Z(){if(b=!1,g){var p=ql.unstable_now();l=p;var J0=!0;try{Z:{C=!1,v&&(v=!1,j(s),s=-1),T=!0;var e=R;try{Y:{B(p);for(L=J(A);L!==null&&!(L.expirationTime>p&&U());){var i=L.callback;if(typeof i==="function"){L.callback=null,R=L.priorityLevel;var G0=i(L.expirationTime<=p);if(p=ql.unstable_now(),typeof G0==="function"){L.callback=G0,B(p),J0=!0;break Y}L===J(A)&&q(A),B(p)}else q(A);L=J(A)}if(L!==null)J0=!0;else{var k=J(_);k!==null&&G(W,k.startTime-p),J0=!1}}break Z}finally{L=null,R=e,T=!1}J0=void 0}}finally{J0?X0():g=!1}}}function Y(p,J0){var e=p.length;p.push(J0);Z:for(;0>>1,G0=p[i];if(0>>1;iz(H0,e))w0z(b0,H0)?(p[i]=b0,p[w0]=e,i=w0):(p[i]=H0,p[B0]=e,i=B0);else if(w0z(b0,e))p[i]=b0,p[w0]=e,i=w0;else break Z}}return J0}function z(p,J0){var e=p.sortIndex-J0.sortIndex;return e!==0?e:p.id-J0.id}function B(p){for(var J0=J(_);J0!==null;){if(J0.callback===null)q(_);else if(J0.startTime<=p)q(_),J0.sortIndex=J0.expirationTime,Y(A,J0);else break;J0=J(_)}}function W(p){if(v=!1,B(p),!C)if(J(A)!==null)C=!0,g||(g=!0,X0());else{var J0=J(_);J0!==null&&G(W,J0.startTime-p)}}function U(){return b?!0:ql.unstable_now()-lp||125i?(p.sortIndex=e,Y(_,p),J(A)===null&&p===J(_)&&(v?(j(s),s=-1):v=!0,G(W,e-i))):(p.sortIndex=G0,Y(A,p),C||T||(C=!0,g||(g=!0,X0()))),p},ql.unstable_shouldYield=U,ql.unstable_wrapCallback=function(p){var J0=R;return function(){var e=R;R=J0;try{return p.apply(this,arguments)}finally{R=e}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var NE=_8((zl)=>{var gA=u(Q0());(function(){function Z(){}function Y(H){return""+H}function J(H,O,A){var _=3` tag.%s',A),typeof H==="string"&&typeof O==="object"&&O!==null&&typeof O.as==="string"){A=O.as;var _=q(A,O.crossOrigin);U.d.L(H,A,{crossOrigin:_,integrity:typeof O.integrity==="string"?O.integrity:void 0,nonce:typeof O.nonce==="string"?O.nonce:void 0,type:typeof O.type==="string"?O.type:void 0,fetchPriority:typeof O.fetchPriority==="string"?O.fetchPriority:void 0,referrerPolicy:typeof O.referrerPolicy==="string"?O.referrerPolicy:void 0,imageSrcSet:typeof O.imageSrcSet==="string"?O.imageSrcSet:void 0,imageSizes:typeof O.imageSizes==="string"?O.imageSizes:void 0,media:typeof O.media==="string"?O.media:void 0})}},ql.preloadModule=function(H,O){var A="";typeof H==="string"&&H||(A+=" The `href` argument encountered was "+z(H)+"."),O!==void 0&&typeof O!=="object"?A+=" The `options` argument encountered was "+z(O)+".":O&&("as"in O)&&typeof O.as!=="string"&&(A+=" The `as` option encountered was "+z(O.as)+"."),A&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s',A),typeof H==="string"&&(O?(A=q(O.as,O.crossOrigin),U.d.m(H,{as:typeof O.as==="string"&&O.as!=="script"?O.as:void 0,crossOrigin:A,integrity:typeof O.integrity==="string"?O.integrity:void 0})):U.d.m(H))},ql.requestFormReset=function(H){U.d.r(H)},ql.unstable_batchedUpdates=function(H,O){return H(O)},ql.useFormState=function(H,O,A){return W().useFormState(H,O,A)},ql.useFormStatus=function(){return W().useHostTransitionStatus()},ql.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var A3=_8((i90,HE)=>{var zl=u(NE());HE.exports=zl});var OE=_8((Kl)=>{var r1=u(wE()),PJ=u(Q0()),hA=u(A3());(function(){function Z(Q,X){for(Q=Q.memoizedState;Q!==null&&0=X.length)return $;var M=X[K],N=R2(Q)?Q.slice():E1({},Q);return N[M]=Y(Q[M],X,K+1,$),N}function J(Q,X,K){if(X.length!==K.length)console.warn("copyWithRename() expects paths of the same length");else{for(var $=0;$Q8?console.error("Unexpected pop."):(X!==OO[Q8]&&console.error("Unexpected Fiber popped."),Q.current=HO[Q8],HO[Q8]=null,OO[Q8]=null,Q8--)}function K0(Q,X,K){Q8++,HO[Q8]=Q.current,OO[Q8]=K,Q.current=X}function n(Q){return Q===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),Q}function p(Q,X){K0(w9,X,Q),K0(Bz,Q,Q),K0(M9,null,Q);var K=X.nodeType;switch(K){case 9:case 11:K=K===9?"#document":"#fragment",X=(X=X.documentElement)?(X=X.namespaceURI)?tT(X):H8:H8;break;default:if(K=X.tagName,X=X.namespaceURI)X=tT(X),X=nT(X,K);else switch(K){case"svg":X=_J;break;case"math":X=zU;break;default:X=H8}}K=K.toLowerCase(),K=lL(null,K),K={context:X,ancestorInfo:K},X0(M9,Q),K0(M9,K,Q)}function J0(Q){X0(M9,Q),X0(Bz,Q),X0(w9,Q)}function e(){return n(M9.current)}function i(Q){Q.memoizedState!==null&&K0(W$,Q,Q);var X=n(M9.current),K=Q.type,$=nT(X.context,K);K=lL(X.ancestorInfo,K),$={context:$,ancestorInfo:K},X!==$&&(K0(Bz,Q,Q),K0(M9,$,Q))}function G0(Q){Bz.current===Q&&(X0(M9,Q),X0(Bz,Q)),W$.current===Q&&(X0(W$,Q),ez._currentValue=UY)}function k(){}function B0(){if(Wz===0){bC=console.log,DC=console.info,EC=console.warn,yC=console.error,IC=console.group,jC=console.groupCollapsed,SC=console.groupEnd;var Q={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:Q,log:Q,warn:Q,error:Q,group:Q,groupCollapsed:Q,groupEnd:Q})}Wz++}function H0(){if(Wz--,Wz===0){var Q={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:E1({},Q,{value:bC}),info:E1({},Q,{value:DC}),warn:E1({},Q,{value:EC}),error:E1({},Q,{value:yC}),group:E1({},Q,{value:IC}),groupCollapsed:E1({},Q,{value:jC}),groupEnd:E1({},Q,{value:SC})})}0>Wz&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function w0(Q){var X=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,Q=Q.stack,Error.prepareStackTrace=X,Q.startsWith(`Error: react-stack-top-frame +See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),H}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var U={d:{f:Z,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:Z,C:Z,L:Z,m:Z,X:Z,S:Z,M:Z},p:0,findDOMNode:null},G=Symbol.for("react.portal"),w=gA.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),zl.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,zl.createPortal=function(H,O){var A=2` tag.%s',A),typeof H==="string"&&typeof O==="object"&&O!==null&&typeof O.as==="string"){A=O.as;var _=q(A,O.crossOrigin);U.d.L(H,A,{crossOrigin:_,integrity:typeof O.integrity==="string"?O.integrity:void 0,nonce:typeof O.nonce==="string"?O.nonce:void 0,type:typeof O.type==="string"?O.type:void 0,fetchPriority:typeof O.fetchPriority==="string"?O.fetchPriority:void 0,referrerPolicy:typeof O.referrerPolicy==="string"?O.referrerPolicy:void 0,imageSrcSet:typeof O.imageSrcSet==="string"?O.imageSrcSet:void 0,imageSizes:typeof O.imageSizes==="string"?O.imageSizes:void 0,media:typeof O.media==="string"?O.media:void 0})}},zl.preloadModule=function(H,O){var A="";typeof H==="string"&&H||(A+=" The `href` argument encountered was "+z(H)+"."),O!==void 0&&typeof O!=="object"?A+=" The `options` argument encountered was "+z(O)+".":O&&("as"in O)&&typeof O.as!=="string"&&(A+=" The `as` option encountered was "+z(O.as)+"."),A&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s',A),typeof H==="string"&&(O?(A=q(O.as,O.crossOrigin),U.d.m(H,{as:typeof O.as==="string"&&O.as!=="script"?O.as:void 0,crossOrigin:A,integrity:typeof O.integrity==="string"?O.integrity:void 0})):U.d.m(H))},zl.requestFormReset=function(H){U.d.r(H)},zl.unstable_batchedUpdates=function(H,O){return H(O)},zl.useFormState=function(H,O,A){return W().useFormState(H,O,A)},zl.useFormStatus=function(){return W().useHostTransitionStatus()},zl.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var A3=_8((t90,HE)=>{var Kl=u(NE());HE.exports=Kl});var OE=_8((Bl)=>{var r1=u(wE()),PJ=u(Q0()),uA=u(A3());(function(){function Z(Q,X){for(Q=Q.memoizedState;Q!==null&&0=X.length)return $;var M=X[K],N=R2(Q)?Q.slice():E1({},Q);return N[M]=Y(Q[M],X,K+1,$),N}function J(Q,X,K){if(X.length!==K.length)console.warn("copyWithRename() expects paths of the same length");else{for(var $=0;$Q8?console.error("Unexpected pop."):(X!==HO[Q8]&&console.error("Unexpected Fiber popped."),Q.current=NO[Q8],NO[Q8]=null,HO[Q8]=null,Q8--)}function K0(Q,X,K){Q8++,NO[Q8]=Q.current,HO[Q8]=K,Q.current=X}function n(Q){return Q===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),Q}function p(Q,X){K0(w9,X,Q),K0(Wz,Q,Q),K0(M9,null,Q);var K=X.nodeType;switch(K){case 9:case 11:K=K===9?"#document":"#fragment",X=(X=X.documentElement)?(X=X.namespaceURI)?tT(X):H8:H8;break;default:if(K=X.tagName,X=X.namespaceURI)X=tT(X),X=nT(X,K);else switch(K){case"svg":X=_J;break;case"math":X=zU;break;default:X=H8}}K=K.toLowerCase(),K=lL(null,K),K={context:X,ancestorInfo:K},X0(M9,Q),K0(M9,K,Q)}function J0(Q){X0(M9,Q),X0(Wz,Q),X0(w9,Q)}function e(){return n(M9.current)}function i(Q){Q.memoizedState!==null&&K0(W$,Q,Q);var X=n(M9.current),K=Q.type,$=nT(X.context,K);K=lL(X.ancestorInfo,K),$={context:$,ancestorInfo:K},X!==$&&(K0(Wz,Q,Q),K0(M9,$,Q))}function G0(Q){Wz.current===Q&&(X0(M9,Q),X0(Wz,Q)),W$.current===Q&&(X0(W$,Q),ZK._currentValue=UY)}function k(){}function B0(){if($z===0){DC=console.log,bC=console.info,EC=console.warn,yC=console.error,IC=console.group,jC=console.groupCollapsed,SC=console.groupEnd;var Q={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:Q,log:Q,warn:Q,error:Q,group:Q,groupCollapsed:Q,groupEnd:Q})}$z++}function H0(){if($z--,$z===0){var Q={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:E1({},Q,{value:DC}),info:E1({},Q,{value:bC}),warn:E1({},Q,{value:EC}),error:E1({},Q,{value:yC}),group:E1({},Q,{value:IC}),groupCollapsed:E1({},Q,{value:jC}),groupEnd:E1({},Q,{value:SC})})}0>$z&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function w0(Q){var X=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,Q=Q.stack,Error.prepareStackTrace=X,Q.startsWith(`Error: react-stack-top-frame `)&&(Q=Q.slice(29)),X=Q.indexOf(` `),X!==-1&&(Q=Q.slice(X+1)),X=Q.indexOf("react_stack_bottom_frame"),X!==-1&&(X=Q.lastIndexOf(` -`,X)),X!==-1)Q=Q.slice(0,X);else return"";return Q}function D0(Q){if(AO===void 0)try{throw Error()}catch(K){var X=K.stack.trim().match(/\n( *(at )?)/);AO=X&&X[1]||"",xC=-1)":-1F||y[N]!==a[F]){var o=` -`+y[N].replace(" at new "," at ");return Q.displayName&&o.includes("")&&(o=o.replace("",Q.displayName)),typeof Q==="function"&&FO.set(Q,o),o}while(1<=N&&0<=F);break}}}finally{_O=!1,M0.H=$,H0(),Error.prepareStackTrace=K}return y=(y=Q?Q.displayName||Q.name:"")?D0(y):"",typeof Q==="function"&&FO.set(Q,y),y}function W0(Q,X){switch(Q.tag){case 26:case 27:case 5:return D0(Q.type);case 16:return D0("Lazy");case 13:return Q.child!==X&&X!==null?D0("Suspense Fallback"):D0("Suspense");case 19:return D0("SuspenseList");case 0:case 15:return m0(Q.type,!1);case 11:return m0(Q.type.render,!1);case 1:return m0(Q.type,!0);case 31:return D0("Activity");default:return""}}function x0(Q){try{var X="",K=null;do{X+=W0(Q,K);var $=Q._debugInfo;if($)for(var M=$.length-1;0<=M;M--){var N=$[M];if(typeof N.name==="string"){var F=X;Z:{var{name:V,env:b,debugLocation:y}=N;if(y!=null){var a=w0(y),o=a.lastIndexOf(` +`+y[N].replace(" at new "," at ");return Q.displayName&&o.includes("")&&(o=o.replace("",Q.displayName)),typeof Q==="function"&&_O.set(Q,o),o}while(1<=N&&0<=F);break}}}finally{AO=!1,M0.H=$,H0(),Error.prepareStackTrace=K}return y=(y=Q?Q.displayName||Q.name:"")?b0(y):"",typeof Q==="function"&&_O.set(Q,y),y}function W0(Q,X){switch(Q.tag){case 26:case 27:case 5:return b0(Q.type);case 16:return b0("Lazy");case 13:return Q.child!==X&&X!==null?b0("Suspense Fallback"):b0("Suspense");case 19:return b0("SuspenseList");case 0:case 15:return u0(Q.type,!1);case 11:return u0(Q.type.render,!1);case 1:return u0(Q.type,!0);case 31:return b0("Activity");default:return""}}function x0(Q){try{var X="",K=null;do{X+=W0(Q,K);var $=Q._debugInfo;if($)for(var M=$.length-1;0<=M;M--){var N=$[M];if(typeof N.name==="string"){var F=X;Z:{var{name:V,env:D,debugLocation:y}=N;if(y!=null){var a=w0(y),o=a.lastIndexOf(` `),c=o===-1?a:a.slice(o+1);if(c.indexOf(V)!==-1){var q0=` -`+c;break Z}}q0=D0(V+(b?" ["+b+"]":""))}X=F+q0}}K=Q,Q=Q.return}while(Q);return X}catch(R0){return` +`+c;break Z}}q0=b0(V+(D?" ["+D+"]":""))}X=F+q0}}K=Q,Q=Q.return}while(Q);return X}catch(R0){return` Error generating stack: `+R0.message+` -`+R0.stack}}function d0(Q){return(Q=Q?Q.displayName||Q.name:"")?D0(Q):""}function w1(){if(P4===null)return null;var Q=P4._debugOwner;return Q!=null?s(Q):null}function X1(){if(P4===null)return"";var Q=P4;try{var X="";switch(Q.tag===6&&(Q=Q.return),Q.tag){case 26:case 27:case 5:X+=D0(Q.type);break;case 13:X+=D0("Suspense");break;case 19:X+=D0("SuspenseList");break;case 31:X+=D0("Activity");break;case 30:case 0:case 15:case 1:Q._debugOwner||X!==""||(X+=d0(Q.type));break;case 11:Q._debugOwner||X!==""||(X+=d0(Q.type.render))}for(;Q;)if(typeof Q.tag==="number"){var K=Q;Q=K._debugOwner;var $=K._debugStack;if(Q&&$){var M=w0($);M!==""&&(X+=` +`+R0.stack}}function d0(Q){return(Q=Q?Q.displayName||Q.name:"")?b0(Q):""}function w1(){if(P4===null)return null;var Q=P4._debugOwner;return Q!=null?s(Q):null}function X1(){if(P4===null)return"";var Q=P4;try{var X="";switch(Q.tag===6&&(Q=Q.return),Q.tag){case 26:case 27:case 5:X+=b0(Q.type);break;case 13:X+=b0("Suspense");break;case 19:X+=b0("SuspenseList");break;case 31:X+=b0("Activity");break;case 30:case 0:case 15:case 1:Q._debugOwner||X!==""||(X+=d0(Q.type));break;case 11:Q._debugOwner||X!==""||(X+=d0(Q.type.render))}for(;Q;)if(typeof Q.tag==="number"){var K=Q;Q=K._debugOwner;var $=K._debugStack;if(Q&&$){var M=w0($);M!==""&&(X+=` `+M)}}else if(Q.debugStack!=null){var N=Q.debugStack;(Q=Q.owner)&&N&&(X+=` `+w0(N))}else break;var F=X}catch(V){F=` Error generating stack: `+V.message+` -`+V.stack}return F}function L0(Q,X,K,$,M,N,F){var V=P4;C1(Q);try{return Q!==null&&Q._debugTask?Q._debugTask.run(X.bind(null,K,$,M,N,F)):X(K,$,M,N,F)}finally{C1(V)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function C1(Q){M0.getCurrentStack=Q===null?null:X1,B3=!1,P4=Q}function Y5(Q){return typeof Symbol==="function"&&Symbol.toStringTag&&Q[Symbol.toStringTag]||Q.constructor.name||"Object"}function e5(Q){try{return w5(Q),!1}catch(X){return!0}}function w5(Q){return""+Q}function N1(Q,X){if(e5(Q))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",X,Y5(Q)),w5(Q)}function m6(Q,X){if(e5(Q))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",X,Y5(Q)),w5(Q)}function K1(Q){if(e5(Q))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Y5(Q)),w5(Q)}function U4(Q){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var X=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(X.isDisabled)return!0;if(!X.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{mQ=X.inject(Q),A7=X}catch(K){console.error("React instrumentation encountered an error: %o.",K)}return X.checkDCE?!0:!1}function S1(Q){if(typeof Fc==="function"&&Pc(Q),A7&&typeof A7.setStrictMode==="function")try{A7.setStrictMode(mQ,Q)}catch(X){W3||(W3=!0,console.error("React instrumentation encountered an error: %o",X))}}function N6(Q){return Q>>>=0,Q===0?32:31-(Vc(Q)/Lc|0)|0}function n2(Q){var X=Q&42;if(X!==0)return X;switch(Q&-Q){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return Q&261888;case 262144:case 524288:case 1048576:case 2097152:return Q&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return Q&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),Q}}function f4(Q,X,K){var $=Q.pendingLanes;if($===0)return 0;var M=0,N=Q.suspendedLanes,F=Q.pingedLanes;Q=Q.warmLanes;var V=$&134217727;return V!==0?($=V&~N,$!==0?M=n2($):(F&=V,F!==0?M=n2(F):K||(K=V&~Q,K!==0&&(M=n2(K))))):(V=$&~N,V!==0?M=n2(V):F!==0?M=n2(F):K||(K=$&~Q,K!==0&&(M=n2(K)))),M===0?0:X!==0&&X!==M&&(X&N)===0&&(N=M&-M,K=X&-X,N>=K||N===32&&(K&4194048)!==0)?X:M}function k2(Q,X){return(Q.pendingLanes&~(Q.suspendedLanes&~Q.pingedLanes)&X)===0}function H6(Q,X){switch(Q){case 1:case 2:case 4:case 8:case 64:return X+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return X+5000;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function O6(){var Q=G$;return G$<<=1,(G$&62914560)===0&&(G$=4194304),Q}function e2(Q){for(var X=[],K=0;31>K;K++)X.push(Q);return X}function T5(Q,X){Q.pendingLanes|=X,X!==268435456&&(Q.suspendedLanes=0,Q.pingedLanes=0,Q.warmLanes=0)}function $2(Q,X,K,$,M,N){var F=Q.pendingLanes;Q.pendingLanes=K,Q.suspendedLanes=0,Q.pingedLanes=0,Q.warmLanes=0,Q.expiredLanes&=K,Q.entangledLanes&=K,Q.errorRecoveryDisabledLanes&=K,Q.shellSuspendCounter=0;var{entanglements:V,expirationTimes:b,hiddenUpdates:y}=Q;for(K=F&~K;0"u")return null;try{return Q.activeElement||Q.body}catch(X){return Q.body}}function j0(Q){return Q.replace(bc,function(X){return"\\"+X.charCodeAt(0).toString(16)+" "})}function l0(Q,X){X.checked===void 0||X.defaultChecked===void 0||mC||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",w1()||"A component",X.type),mC=!0),X.value===void 0||X.defaultValue===void 0||hC||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",w1()||"A component",X.type),hC=!0)}function a0(Q,X,K,$,M,N,F,V){if(Q.name="",F!=null&&typeof F!=="function"&&typeof F!=="symbol"&&typeof F!=="boolean"?(N1(F,"type"),Q.type=F):Q.removeAttribute("type"),X!=null)if(F==="number"){if(X===0&&Q.value===""||Q.value!=X)Q.value=""+t(X)}else Q.value!==""+t(X)&&(Q.value=""+t(X));else F!=="submit"&&F!=="reset"||Q.removeAttribute("value");X!=null?r0(Q,F,t(X)):K!=null?r0(Q,F,t(K)):$!=null&&Q.removeAttribute("value"),M==null&&N!=null&&(Q.defaultChecked=!!N),M!=null&&(Q.checked=M&&typeof M!=="function"&&typeof M!=="symbol"),V!=null&&typeof V!=="function"&&typeof V!=="symbol"&&typeof V!=="boolean"?(N1(V,"name"),Q.name=""+t(V)):Q.removeAttribute("name")}function Z1(Q,X,K,$,M,N,F,V){if(N!=null&&typeof N!=="function"&&typeof N!=="symbol"&&typeof N!=="boolean"&&(N1(N,"type"),Q.type=N),X!=null||K!=null){if(!(N!=="submit"&&N!=="reset"||X!==void 0&&X!==null)){P0(Q);return}K=K!=null?""+t(K):"",X=X!=null?""+t(X):K,V||X===Q.value||(Q.value=X),Q.defaultValue=X}$=$!=null?$:M,$=typeof $!=="function"&&typeof $!=="symbol"&&!!$,Q.checked=V?Q.checked:!!$,Q.defaultChecked=!!$,F!=null&&typeof F!=="function"&&typeof F!=="symbol"&&typeof F!=="boolean"&&(N1(F,"name"),Q.name=F),P0(Q)}function r0(Q,X,K){X==="number"&&I0(Q.ownerDocument)===Q||Q.defaultValue===""+K||(Q.defaultValue=""+K)}function p1(Q,X){X.value==null&&(typeof X.children==="object"&&X.children!==null?PJ.Children.forEach(X.children,function(K){K==null||typeof K==="string"||typeof K==="number"||typeof K==="bigint"||cC||(cC=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to