diff --git a/apps/fabro-web/app/routes/run-detail.test.ts b/apps/fabro-web/app/routes/run-detail.test.ts index fc9f3cc73..e5e03f62e 100644 --- a/apps/fabro-web/app/routes/run-detail.test.ts +++ b/apps/fabro-web/app/routes/run-detail.test.ts @@ -1,6 +1,13 @@ import { afterEach, describe, expect, test } from "bun:test"; -import { action, lifecycleActionVisibility, loader } from "./run-detail"; +import { + action, + handleLifecycleToastResult, + lifecycleActionVisibility, + loader, + type LifecycleToastState, + type RunDetailActionResult, +} from "./run-detail"; type StubFetchEntry = { status: number; @@ -196,3 +203,117 @@ describe("lifecycleActionVisibility", () => { expect(lifecycleActionVisibility("blocked").showBlockedNotice).toBe(true); }); }); + +describe("handleLifecycleToastResult", () => { + type PushedToast = { message: string; action?: { label: string; onClick: () => void } }; + + function makeToastApi() { + const pushed: PushedToast[] = []; + const dismissed: string[] = []; + return { + pushed, + dismissed, + api: { + push: (toast: PushedToast) => { + pushed.push(toast); + return `toast-${pushed.length}`; + }, + dismiss: (id: string) => { + dismissed.push(id); + }, + }, + }; + } + + const initialState: LifecycleToastState = { + activeArchiveToastId: null, + lastProcessed: { cancel: null, archive: null, unarchive: null }, + }; + + test("replaying the same cancel success result does not enqueue a duplicate toast", () => { + const { pushed, dismissed, api } = makeToastApi(); + const result: RunDetailActionResult = { + intent: "cancel", + ok: true, + run: { id: "run-1", status: "failed", status_reason: "cancelled", created_at: "2026-04-20T12:00:00Z" }, + }; + + const firstState = handleLifecycleToastResult("cancel", result, initialState, api); + + expect(pushed).toEqual([{ message: "Run cancelled." }]); + expect(firstState.lastProcessed.cancel).toBe(result); + + const replayedState = handleLifecycleToastResult("cancel", result, firstState, api); + + expect(pushed).toHaveLength(1); + expect(dismissed).toEqual([]); + expect(replayedState).toBe(firstState); + }); + + test("cancel for non-terminal state reports cancellation as requested", () => { + const { pushed, api } = makeToastApi(); + const result: RunDetailActionResult = { + intent: "cancel", + ok: true, + run: { id: "run-1", status: "running", created_at: "2026-04-20T12:00:00Z" }, + }; + + handleLifecycleToastResult("cancel", result, initialState, api); + + expect(pushed).toEqual([{ message: "Cancellation requested." }]); + }); + + test("replaying the same archive success result does not enqueue a duplicate toast", () => { + const { pushed, dismissed, api } = makeToastApi(); + let unarchiveClicks = 0; + const result: RunDetailActionResult = { + intent: "archive", + ok: true, + run: { id: "run-1", status: "archived", created_at: "2026-04-20T12:00:00Z" }, + }; + + const firstState = handleLifecycleToastResult("archive", result, initialState, api, () => { + unarchiveClicks += 1; + }); + + expect(pushed).toHaveLength(1); + expect(pushed[0]?.message).toBe("Run archived."); + expect(pushed[0]?.action?.label).toBe("Unarchive"); + pushed[0]?.action?.onClick(); + expect(unarchiveClicks).toBe(1); + expect(firstState.activeArchiveToastId).toBe("toast-1"); + + const replayedState = handleLifecycleToastResult("archive", result, firstState, api, () => { + unarchiveClicks += 1; + }); + + expect(pushed).toHaveLength(1); + expect(replayedState).toBe(firstState); + expect(dismissed).toEqual([]); + }); + + test("successful unarchive dismisses the active archive toast before showing restore feedback", () => { + const { pushed, dismissed, api } = makeToastApi(); + const result: RunDetailActionResult = { + intent: "unarchive", + ok: true, + run: { id: "run-1", status: "succeeded", created_at: "2026-04-20T12:00:00Z" }, + }; + const stateWithActiveToast: LifecycleToastState = { + activeArchiveToastId: "toast-9", + lastProcessed: { cancel: null, archive: null, unarchive: null }, + }; + + const nextState = handleLifecycleToastResult("unarchive", result, stateWithActiveToast, api); + + expect(dismissed).toEqual(["toast-9"]); + expect(pushed).toEqual([{ message: "Run restored." }]); + expect(nextState.activeArchiveToastId).toBeNull(); + + const replayedState = handleLifecycleToastResult("unarchive", result, nextState, api); + + expect(dismissed).toEqual(["toast-9"]); + expect(pushed).toEqual([{ message: "Run restored." }]); + expect(replayedState).toBe(nextState); + }); +}); diff --git a/apps/fabro-web/app/routes/run-detail.tsx b/apps/fabro-web/app/routes/run-detail.tsx index c5f9f87e2..4bde02602 100644 --- a/apps/fabro-web/app/routes/run-detail.tsx +++ b/apps/fabro-web/app/routes/run-detail.tsx @@ -1,4 +1,4 @@ -import { useEffect } from "react"; +import { useEffect, useRef } from "react"; import { ArrowPathIcon, ChevronRightIcon } from "@heroicons/react/20/solid"; import { Link, Outlet, useFetcher, useLocation } from "react-router"; import type { @@ -95,6 +95,18 @@ type LifecycleActionResult = export type RunDetailActionResult = PreviewActionResult | LifecycleActionResult; +export interface LifecycleToastState { + activeArchiveToastId: string | null; + lastProcessed: Record; +} + +type ToastApi = Pick, "push" | "dismiss">; + +const INITIAL_LIFECYCLE_TOAST_STATE: LifecycleToastState = { + activeArchiveToastId: null, + lastProcessed: { cancel: null, archive: null, unarchive: null }, +}; + export function lifecycleActionVisibility(status: string | null | undefined) { return { showPrimaryCancel: canCancel(status), @@ -175,9 +187,10 @@ export default function RunDetail({ loaderData, params }: { loaderData: RunDetai const cancelFetcher = useFetcher(); const archiveFetcher = useFetcher(); const unarchiveFetcher = useFetcher(); - const { push } = useToast(); + const { push, dismiss } = useToast(); const demoMode = useDemoMode(); const tabs = allTabs.filter((t) => !t.demoOnly || demoMode); + const lifecycleToastStateRef = useRef(INITIAL_LIFECYCLE_TOAST_STATE); useRunEventSource(run?.id ?? undefined, { allowlist: RUN_DETAIL_EVENTS, @@ -191,44 +204,32 @@ export default function RunDetail({ loaderData, params }: { loaderData: RunDetai }, [previewFetcher.data]); useEffect(() => { - const result = cancelFetcher.data; - if (!result || result.intent !== "cancel") return; - if (isLifecycleActionFailure(result)) { - push({ message: mapError(result.error, "cancel"), tone: "error" }); - return; - } - push({ - message: isTerminalCancelledRun(result.run) - ? "Run cancelled." - : "Cancellation requested.", - }); - }, [cancelFetcher.data, push]); + lifecycleToastStateRef.current = handleLifecycleToastResult( + "cancel", + cancelFetcher.data, + lifecycleToastStateRef.current, + { push, dismiss }, + ); + }, [cancelFetcher.data, dismiss, push]); useEffect(() => { - const result = archiveFetcher.data; - if (!result || result.intent !== "archive") return; - if (isLifecycleActionFailure(result)) { - push({ message: mapError(result.error, "archive"), tone: "error" }); - return; - } - push({ - message: "Run archived.", - action: { - label: "Unarchive", - onClick: () => submitIntent(unarchiveFetcher, "unarchive"), - }, - }); - }, [archiveFetcher, archiveFetcher.data, push, unarchiveFetcher]); + lifecycleToastStateRef.current = handleLifecycleToastResult( + "archive", + archiveFetcher.data, + lifecycleToastStateRef.current, + { push, dismiss }, + () => submitIntent(unarchiveFetcher, "unarchive"), + ); + }, [archiveFetcher.data, dismiss, push, unarchiveFetcher]); useEffect(() => { - const result = unarchiveFetcher.data; - if (!result || result.intent !== "unarchive") return; - if (isLifecycleActionFailure(result)) { - push({ message: mapError(result.error, "unarchive"), tone: "error" }); - return; - } - push({ message: "Run restored." }); - }, [push, unarchiveFetcher.data]); + lifecycleToastStateRef.current = handleLifecycleToastResult( + "unarchive", + unarchiveFetcher.data, + lifecycleToastStateRef.current, + { push, dismiss }, + ); + }, [dismiss, push, unarchiveFetcher.data]); if (!run) { return ( @@ -458,6 +459,51 @@ function isLifecycleActionFailure( return value.ok === false; } +export function handleLifecycleToastResult( + intent: LifecycleAction, + result: RunDetailActionResult | undefined, + state: LifecycleToastState, + toastApi: ToastApi, + onUnarchive?: () => void, +): LifecycleToastState { + if (!result || result.intent !== intent) return state; + if (state.lastProcessed[intent] === result) return state; + + const nextState: LifecycleToastState = { + ...state, + lastProcessed: { ...state.lastProcessed, [intent]: result }, + }; + + if (isLifecycleActionFailure(result)) { + toastApi.push({ message: mapError(result.error, intent), tone: "error" }); + return nextState; + } + + if (intent === "cancel") { + toastApi.push({ + message: isTerminalCancelledRun(result.run) ? "Run cancelled." : "Cancellation requested.", + }); + return nextState; + } + + if (state.activeArchiveToastId) { + toastApi.dismiss(state.activeArchiveToastId); + } + + if (intent === "archive") { + return { + ...nextState, + activeArchiveToastId: toastApi.push({ + message: "Run archived.", + action: onUnarchive ? { label: "Unarchive", onClick: onUnarchive } : undefined, + }), + }; + } + + toastApi.push({ message: "Run restored." }); + return { ...nextState, activeArchiveToastId: null }; +} + function submitIntent( fetcher: { submit: (target: FormData, options: { method: "post" }) => void }, intent: LifecycleAction, diff --git a/lib/crates/fabro-proc/src/signal.rs b/lib/crates/fabro-proc/src/signal.rs index 04f650030..a418b6dca 100644 --- a/lib/crates/fabro-proc/src/signal.rs +++ b/lib/crates/fabro-proc/src/signal.rs @@ -146,12 +146,17 @@ pub fn sigusr2(pid: u32) { } #[cfg(test)] +#[expect( + clippy::disallowed_types, + reason = "Tests use sync std::io::BufReader to read a short-lived helper's stdout synchronously." +)] mod tests { use std::io::{BufRead, BufReader}; use std::process::{Command, Stdio}; use std::time::Duration; use super::{process_exists, process_group_alive, process_running}; + use crate::pre_exec::pre_exec_setpgid; #[test] fn process_running_returns_true_for_current_process() { @@ -199,7 +204,7 @@ mod tests { .stdin(Stdio::null()) .stdout(Stdio::null()) .stderr(Stdio::null()); - crate::pre_exec::pre_exec_setpgid(&mut child); + pre_exec_setpgid(&mut child); let mut child = child.spawn().expect("group leader should spawn"); let pgid = child.id(); diff --git a/lib/crates/fabro-spa/assets/assets/entry-znhdzrrr.js b/lib/crates/fabro-spa/assets/assets/entry-b79sap7r.js similarity index 82% rename from lib/crates/fabro-spa/assets/assets/entry-znhdzrrr.js rename to lib/crates/fabro-spa/assets/assets/entry-b79sap7r.js index 453251c94..4d5c799c8 100644 --- a/lib/crates/fabro-spa/assets/assets/entry-znhdzrrr.js +++ b/lib/crates/fabro-spa/assets/assets/entry-b79sap7r.js @@ -10,16 +10,16 @@ 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.`),j}function s(){$1.asyncTransitions--}function z0(j){if(H4===null)try{var Y0=("require"+Math.random()).slice(0,7);H4=(YU&&YU[Y0]).call(YU,"timers").setImmediate}catch(A0){H4=function(v0){W2===!1&&(W2=!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 x0=new MessageChannel;x0.port1.onmessage=v0,x0.port2.postMessage(void 0)}}return H4(j)}function $0(j){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(I0,O5){x0=!0,k0.then(function(K5){if(e(Y0,A0),A0===0){try{Z0(v0),z0(function(){return c(K5,I0,O5)})}catch(e5){$1.thrownErrors.push(e5)}if(0<$1.thrownErrors.length){var _5=$0($1.thrownErrors);$1.thrownErrors.length=0,O5(_5)}}else I0(K5)},function(K5){e(Y0,A0),0<$1.thrownErrors.length?(K5=$0($1.thrownErrors),$1.thrownErrors.length=0,O5(K5)):O5(K5)})}}}var J1=Y1;if(e(Y0,A0),A0===0&&(Z0(v0),v0.length!==0&&Y7(function(){x0||Z4||(Z4=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),$1.actQueue=null),0<$1.thrownErrors.length)throw j=$0($1.thrownErrors),$1.thrownErrors.length=0,j;return{then:function(I0,O5){x0=!0,A0===0?($1.actQueue=v0,z0(function(){return c(J1,I0,O5)})):I0(J1)}}},Ar.cache=function(j){return function(){return j.apply(null,arguments)}},Ar.cacheSignal=function(){return null},Ar.captureOwnerStack=function(){var j=$1.getCurrentStack;return j===null?null:j()},Ar.cloneElement=function(j,Y0,A0){if(j===null||j===void 0)throw Error("The argument must be a React element, but you passed "+j+".");var v0=J5({},j.props),x0=j.key,Y1=j._owner;if(Y0!=null){var k0;Z:{if(N4.call(Y0,"ref")&&(k0=Object.getOwnPropertyDescriptor(Y0,"ref").get)&&k0.isReactWarning){k0=!1;break Z}k0=Y0.ref!==void 0}k0&&(Y1=O()),A(Y0)&&(U(Y0.key),x0=""+Y0.key);for(J1 in Y0)!N4.call(Y0,J1)||J1==="key"||J1==="__self"||J1==="__source"||J1==="ref"&&Y0.ref===void 0||(v0[J1]=Y0[J1])}var J1=arguments.length-2;if(J1===1)v0.children=A0;else if(1$1.recentlyCreatedOwnerStacks++;return T(j,x0,v0,O(),I0?Error("react-stack-top-frame"):k2,I0?S1(N(j)):V6)},Ar.createRef=function(){var j={current:null};return Object.seal(j),j},Ar.forwardRef=function(j){j!=null&&j.$$typeof===l0?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof j!=="function"?console.error("forwardRef requires a render function but was given %s.",j===null?"null":typeof j):j.length!==0&&j.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",j.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),j!=null&&j.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Y0={$$typeof:y0,render:j},A0;return Object.defineProperty(Y0,"displayName",{enumerable:!1,configurable:!0,get:function(){return A0},set:function(v0){A0=v0,j.name||j.displayName||(Object.defineProperty(j,"name",{value:v0}),j.displayName=v0)}}),Y0},Ar.isValidElement=C,Ar.lazy=function(j){j={_status:-1,_result:j};var Y0={$$typeof:t0,_payload:j,_init:i},A0={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return j._ioInfo=A0,Y0._debugInfo=[{awaited:A0}],Y0},Ar.memo=function(j,Y0){j==null&&console.error("memo: The first argument must be a component. Instead received: %s",j===null?"null":typeof j),Y0={$$typeof:l0,type:j,compare:Y0===void 0?null:Y0};var A0;return Object.defineProperty(Y0,"displayName",{enumerable:!1,configurable:!0,get:function(){return A0},set:function(v0){A0=v0,j.name||j.displayName||(Object.defineProperty(j,"name",{value:v0}),j.displayName=v0)}}),Y0},Ar.startTransition=function(j){var Y0=$1.T,A0={};A0._updatedFibers=new Set,$1.T=A0;try{var v0=j(),x0=$1.S;x0!==null&&x0(A0,v0),typeof v0==="object"&&v0!==null&&typeof v0.then==="function"&&($1.asyncTransitions++,v0.then(s,s),v0.then($,T5))}catch(Y1){T5(Y1)}finally{Y0===null&&A0._updatedFibers&&(j=A0._updatedFibers.size,A0._updatedFibers.clear(),10{(function(){function Z(){if(D=!1,h){var c=Fr.unstable_now();s=c;var Z0=!0;try{Z:{L=!1,C&&(C=!1,S(i),i=-1),v=!0;var W0=T;try{Y:{B(c);for(R=J(_);R!==null&&!(R.expirationTime>c&&W());){var n=R.callback;if(typeof n==="function"){R.callback=null,T=R.priorityLevel;var X0=n(R.expirationTime<=c);if(c=Fr.unstable_now(),typeof X0==="function"){R.callback=X0,B(c),Z0=!0;break Y}R===J(_)&&z(_),B(c)}else z(_);R=J(_)}if(R!==null)Z0=!0;else{var f=J(A);f!==null&&U($,f.startTime-c),Z0=!1}}break Z}finally{R=null,T=W0,v=!1}Z0=void 0}}finally{Z0?z0():h=!1}}}function Y(c,Z0){var W0=c.length;c.push(Z0);Z:for(;0>>1,X0=c[n];if(0>>1;nq(H0,W0))M0q(y0,H0)?(c[n]=y0,c[M0]=W0,n=M0):(c[n]=H0,c[q0]=W0,n=q0);else if(M0q(y0,W0))c[n]=y0,c[M0]=W0,n=M0;else break Z}}return Z0}function q(c,Z0){var W0=c.sortIndex-Z0.sortIndex;return W0!==0?W0:c.id-Z0.id}function B(c){for(var Z0=J(A);Z0!==null;){if(Z0.callback===null)z(A);else if(Z0.startTime<=c)z(A),Z0.sortIndex=Z0.expirationTime,Y(_,Z0);else break;Z0=J(A)}}function $(c){if(C=!1,B(c),!L)if(J(_)!==null)L=!0,h||(h=!0,z0());else{var Z0=J(A);Z0!==null&&U($,Z0.startTime-c)}}function W(){return D?!0:Fr.unstable_now()-sc||125n?(c.sortIndex=W0,Y(A,c),J(_)===null&&c===J(A)&&(C?(S(i),i=-1):C=!0,U($,W0-n))):(c.sortIndex=X0,Y(_,c),L||v||(L=!0,h||(h=!0,z0()))),c},Fr.unstable_shouldYield=W,Fr.unstable_wrapCallback=function(c){var Z0=T;return function(){var W0=T;T=Z0;try{return c.apply(this,arguments)}finally{T=W0}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var my=b3((Pr)=>{var hA=g(Q0());(function(){function Z(){}function Y(N){return""+N}function J(N,O,_){var A=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 x0=new MessageChannel;x0.port1.onmessage=v0,x0.port2.postMessage(void 0)}}return H4(j)}function $0(j){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(I0,O5){x0=!0,k0.then(function(K5){if(e(Y0,A0),A0===0){try{Z0(v0),z0(function(){return c(K5,I0,O5)})}catch(e5){$1.thrownErrors.push(e5)}if(0<$1.thrownErrors.length){var _5=$0($1.thrownErrors);$1.thrownErrors.length=0,O5(_5)}}else I0(K5)},function(K5){e(Y0,A0),0<$1.thrownErrors.length?(K5=$0($1.thrownErrors),$1.thrownErrors.length=0,O5(K5)):O5(K5)})}}}var J1=Y1;if(e(Y0,A0),A0===0&&(Z0(v0),v0.length!==0&&Y7(function(){x0||Z4||(Z4=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),$1.actQueue=null),0<$1.thrownErrors.length)throw j=$0($1.thrownErrors),$1.thrownErrors.length=0,j;return{then:function(I0,O5){x0=!0,A0===0?($1.actQueue=v0,z0(function(){return c(J1,I0,O5)})):I0(J1)}}},Ar.cache=function(j){return function(){return j.apply(null,arguments)}},Ar.cacheSignal=function(){return null},Ar.captureOwnerStack=function(){var j=$1.getCurrentStack;return j===null?null:j()},Ar.cloneElement=function(j,Y0,A0){if(j===null||j===void 0)throw Error("The argument must be a React element, but you passed "+j+".");var v0=J5({},j.props),x0=j.key,Y1=j._owner;if(Y0!=null){var k0;Z:{if(N4.call(Y0,"ref")&&(k0=Object.getOwnPropertyDescriptor(Y0,"ref").get)&&k0.isReactWarning){k0=!1;break Z}k0=Y0.ref!==void 0}k0&&(Y1=O()),A(Y0)&&(U(Y0.key),x0=""+Y0.key);for(J1 in Y0)!N4.call(Y0,J1)||J1==="key"||J1==="__self"||J1==="__source"||J1==="ref"&&Y0.ref===void 0||(v0[J1]=Y0[J1])}var J1=arguments.length-2;if(J1===1)v0.children=A0;else if(1$1.recentlyCreatedOwnerStacks++;return T(j,x0,v0,O(),I0?Error("react-stack-top-frame"):k2,I0?S1(N(j)):V6)},Ar.createRef=function(){var j={current:null};return Object.seal(j),j},Ar.forwardRef=function(j){j!=null&&j.$$typeof===l0?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof j!=="function"?console.error("forwardRef requires a render function but was given %s.",j===null?"null":typeof j):j.length!==0&&j.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",j.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),j!=null&&j.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Y0={$$typeof:y0,render:j},A0;return Object.defineProperty(Y0,"displayName",{enumerable:!1,configurable:!0,get:function(){return A0},set:function(v0){A0=v0,j.name||j.displayName||(Object.defineProperty(j,"name",{value:v0}),j.displayName=v0)}}),Y0},Ar.isValidElement=C,Ar.lazy=function(j){j={_status:-1,_result:j};var Y0={$$typeof:t0,_payload:j,_init:i},A0={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return j._ioInfo=A0,Y0._debugInfo=[{awaited:A0}],Y0},Ar.memo=function(j,Y0){j==null&&console.error("memo: The first argument must be a component. Instead received: %s",j===null?"null":typeof j),Y0={$$typeof:l0,type:j,compare:Y0===void 0?null:Y0};var A0;return Object.defineProperty(Y0,"displayName",{enumerable:!1,configurable:!0,get:function(){return A0},set:function(v0){A0=v0,j.name||j.displayName||(Object.defineProperty(j,"name",{value:v0}),j.displayName=v0)}}),Y0},Ar.startTransition=function(j){var Y0=$1.T,A0={};A0._updatedFibers=new Set,$1.T=A0;try{var v0=j(),x0=$1.S;x0!==null&&x0(A0,v0),typeof v0==="object"&&v0!==null&&typeof v0.then==="function"&&($1.asyncTransitions++,v0.then(s,s),v0.then($,T5))}catch(Y1){T5(Y1)}finally{Y0===null&&A0._updatedFibers&&(j=A0._updatedFibers.size,A0._updatedFibers.clear(),10{(function(){function Z(){if(D=!1,h){var c=Fr.unstable_now();s=c;var Z0=!0;try{Z:{L=!1,C&&(C=!1,S(i),i=-1),v=!0;var W0=T;try{Y:{B(c);for(R=J(_);R!==null&&!(R.expirationTime>c&&W());){var n=R.callback;if(typeof n==="function"){R.callback=null,T=R.priorityLevel;var X0=n(R.expirationTime<=c);if(c=Fr.unstable_now(),typeof X0==="function"){R.callback=X0,B(c),Z0=!0;break Y}R===J(_)&&z(_),B(c)}else z(_);R=J(_)}if(R!==null)Z0=!0;else{var f=J(A);f!==null&&U($,f.startTime-c),Z0=!1}}break Z}finally{R=null,T=W0,v=!1}Z0=void 0}}finally{Z0?z0():h=!1}}}function Y(c,Z0){var W0=c.length;c.push(Z0);Z:for(;0>>1,X0=c[n];if(0>>1;nq(H0,W0))M0q(y0,H0)?(c[n]=y0,c[M0]=W0,n=M0):(c[n]=H0,c[q0]=W0,n=q0);else if(M0q(y0,W0))c[n]=y0,c[M0]=W0,n=M0;else break Z}}return Z0}function q(c,Z0){var W0=c.sortIndex-Z0.sortIndex;return W0!==0?W0:c.id-Z0.id}function B(c){for(var Z0=J(A);Z0!==null;){if(Z0.callback===null)z(A);else if(Z0.startTime<=c)z(A),Z0.sortIndex=Z0.expirationTime,Y(_,Z0);else break;Z0=J(A)}}function $(c){if(C=!1,B(c),!L)if(J(_)!==null)L=!0,h||(h=!0,z0());else{var Z0=J(A);Z0!==null&&U($,Z0.startTime-c)}}function W(){return D?!0:Fr.unstable_now()-sc||125n?(c.sortIndex=W0,Y(A,c),J(_)===null&&c===J(A)&&(C?(S(i),i=-1):C=!0,U($,W0-n))):(c.sortIndex=X0,Y(_,c),L||v||(L=!0,h||(h=!0,z0()))),c},Fr.unstable_shouldYield=W,Fr.unstable_wrapCallback=function(c){var Z0=T;return function(){var W0=T;T=Z0;try{return c.apply(this,arguments)}finally{T=W0}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var hy=b3((Pr)=>{var hA=g(Q0());(function(){function Z(){}function Y(N){return""+N}function J(N,O,_){var A=3` tag.%s',_),typeof N==="string"&&typeof O==="object"&&O!==null&&typeof O.as==="string"){_=O.as;var A=z(_,O.crossOrigin);W.d.L(N,_,{crossOrigin:A,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})}},Pr.preloadModule=function(N,O){var _="";typeof N==="string"&&N||(_+=" The `href` argument encountered was "+q(N)+"."),O!==void 0&&typeof O!=="object"?_+=" The `options` argument encountered was "+q(O)+".":O&&("as"in O)&&typeof O.as!=="string"&&(_+=" The `as` option encountered was "+q(O.as)+"."),_&&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',_),typeof N==="string"&&(O?(_=z(O.as,O.crossOrigin),W.d.m(N,{as:typeof O.as==="string"&&O.as!=="script"?O.as:void 0,crossOrigin:_,integrity:typeof O.integrity==="string"?O.integrity:void 0})):W.d.m(N))},Pr.requestFormReset=function(N){W.d.r(N)},Pr.unstable_batchedUpdates=function(N,O){return N(O)},Pr.useFormState=function(N,O,_){return $().useFormState(N,O,_)},Pr.useFormStatus=function(){return $().useHostTransitionStatus()},Pr.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var D3=b3((PJ0,uy)=>{var Vr=g(my());uy.exports=Vr});var py=b3((Rr)=>{var r1=g(hy()),aJ=g(Q0()),mA=g(D3());(function(){function Z(Q,X){for(Q=Q.memoizedState;Q!==null&&0=X.length)return G;var w=X[K],H=L2(Q)?Q.slice():E1({},Q);return H[w]=Y(Q[w],X,K+1,G),H}function J(Q,X,K){if(X.length!==K.length)console.warn("copyWithRename() expects paths of the same length");else{for(var G=0;G_8?console.error("Unexpected pop."):(X!==O_[_8]&&console.error("Unexpected Fiber popped."),Q.current=H_[_8],H_[_8]=null,O_[_8]=null,_8--)}function $0(Q,X,K){_8++,H_[_8]=Q.current,O_[_8]=K,Q.current=X}function e(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 c(Q,X){$0(y9,X,Q),$0(aq,Q,Q),$0(E9,null,Q);var K=X.nodeType;switch(K){case 9:case 11:K=K===9?"#document":"#fragment",X=(X=X.documentElement)?(X=X.namespaceURI)?Vb(X):I8:I8;break;default:if(K=X.tagName,X=X.namespaceURI)X=Vb(X),X=Rb(X,K);else switch(K){case"svg":X=dJ;break;case"math":X=sG;break;default:X=I8}}K=K.toLowerCase(),K=HL(null,K),K={context:X,ancestorInfo:K},z0(E9,Q),$0(E9,K,Q)}function Z0(Q){z0(E9,Q),z0(aq,Q),z0(y9,Q)}function W0(){return e(E9.current)}function n(Q){Q.memoizedState!==null&&$0(tW,Q,Q);var X=e(E9.current),K=Q.type,G=Rb(X.context,K);K=HL(X.ancestorInfo,K),G={context:G,ancestorInfo:K},X!==G&&($0(aq,Q,Q),$0(E9,G,Q))}function X0(Q){aq.current===Q&&(z0(E9,Q),z0(aq,Q)),tW.current===Q&&(z0(tW,Q),fK._currentValue=yY)}function f(){}function q0(){if(rq===0){eb=console.log,ZD=console.info,YD=console.warn,QD=console.error,JD=console.group,XD=console.groupCollapsed,zD=console.groupEnd;var Q={configurable:!0,enumerable:!0,value:f,writable:!0};Object.defineProperties(console,{info:Q,log:Q,warn:Q,error:Q,group:Q,groupCollapsed:Q,groupEnd:Q})}rq++}function H0(){if(rq--,rq===0){var Q={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:E1({},Q,{value:eb}),info:E1({},Q,{value:ZD}),warn:E1({},Q,{value:YD}),error:E1({},Q,{value:QD}),group:E1({},Q,{value:JD}),groupCollapsed:E1({},Q,{value:XD}),groupEnd:E1({},Q,{value:zD})})}0>rq&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function M0(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.`),N}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var W={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},U=Symbol.for("react.portal"),M=hA.__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"),Pr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,Pr.createPortal=function(N,O){var _=2` tag.%s',_),typeof N==="string"&&typeof O==="object"&&O!==null&&typeof O.as==="string"){_=O.as;var A=z(_,O.crossOrigin);W.d.L(N,_,{crossOrigin:A,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})}},Pr.preloadModule=function(N,O){var _="";typeof N==="string"&&N||(_+=" The `href` argument encountered was "+q(N)+"."),O!==void 0&&typeof O!=="object"?_+=" The `options` argument encountered was "+q(O)+".":O&&("as"in O)&&typeof O.as!=="string"&&(_+=" The `as` option encountered was "+q(O.as)+"."),_&&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',_),typeof N==="string"&&(O?(_=z(O.as,O.crossOrigin),W.d.m(N,{as:typeof O.as==="string"&&O.as!=="script"?O.as:void 0,crossOrigin:_,integrity:typeof O.integrity==="string"?O.integrity:void 0})):W.d.m(N))},Pr.requestFormReset=function(N){W.d.r(N)},Pr.unstable_batchedUpdates=function(N,O){return N(O)},Pr.useFormState=function(N,O,_){return $().useFormState(N,O,_)},Pr.useFormStatus=function(){return $().useHostTransitionStatus()},Pr.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var D3=b3((RJ0,my)=>{var Vr=g(hy());my.exports=Vr});var uy=b3((Rr)=>{var r1=g(gy()),rJ=g(Q0()),mA=g(D3());(function(){function Z(Q,X){for(Q=Q.memoizedState;Q!==null&&0=X.length)return G;var w=X[K],H=L2(Q)?Q.slice():E1({},Q);return H[w]=Y(Q[w],X,K+1,G),H}function J(Q,X,K){if(X.length!==K.length)console.warn("copyWithRename() expects paths of the same length");else{for(var G=0;G_8?console.error("Unexpected pop."):(X!==O_[_8]&&console.error("Unexpected Fiber popped."),Q.current=H_[_8],H_[_8]=null,O_[_8]=null,_8--)}function $0(Q,X,K){_8++,H_[_8]=Q.current,O_[_8]=K,Q.current=X}function e(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 c(Q,X){$0(y9,X,Q),$0(rq,Q,Q),$0(E9,null,Q);var K=X.nodeType;switch(K){case 9:case 11:K=K===9?"#document":"#fragment",X=(X=X.documentElement)?(X=X.namespaceURI)?Pb(X):I8:I8;break;default:if(K=X.tagName,X=X.namespaceURI)X=Pb(X),X=Vb(X,K);else switch(K){case"svg":X=lJ;break;case"math":X=sG;break;default:X=I8}}K=K.toLowerCase(),K=NL(null,K),K={context:X,ancestorInfo:K},z0(E9,Q),$0(E9,K,Q)}function Z0(Q){z0(E9,Q),z0(rq,Q),z0(y9,Q)}function W0(){return e(E9.current)}function n(Q){Q.memoizedState!==null&&$0(tW,Q,Q);var X=e(E9.current),K=Q.type,G=Vb(X.context,K);K=NL(X.ancestorInfo,K),G={context:G,ancestorInfo:K},X!==G&&($0(rq,Q,Q),$0(E9,G,Q))}function X0(Q){rq.current===Q&&(z0(E9,Q),z0(rq,Q)),tW.current===Q&&(z0(tW,Q),gK._currentValue=yY)}function f(){}function q0(){if(sq===0){nb=console.log,eb=console.info,ZD=console.warn,YD=console.error,QD=console.group,JD=console.groupCollapsed,XD=console.groupEnd;var Q={configurable:!0,enumerable:!0,value:f,writable:!0};Object.defineProperties(console,{info:Q,log:Q,warn:Q,error:Q,group:Q,groupCollapsed:Q,groupEnd:Q})}sq++}function H0(){if(sq--,sq===0){var Q={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:E1({},Q,{value:nb}),info:E1({},Q,{value:eb}),warn:E1({},Q,{value:ZD}),error:E1({},Q,{value:YD}),group:E1({},Q,{value:QD}),groupCollapsed:E1({},Q,{value:JD}),groupEnd:E1({},Q,{value:XD})})}0>sq&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function M0(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 y0(Q){if(__===void 0)try{throw Error()}catch(K){var X=K.stack.trim().match(/\n( *(at )?)/);__=X&&X[1]||"",qD=-1)":-1F||E[H]!==r[F]){var o=` `+E[H].replace(" at new "," at ");return Q.displayName&&o.includes("")&&(o=o.replace("",Q.displayName)),typeof Q==="function"&&F_.set(Q,o),o}while(1<=H&&0<=F);break}}}finally{A_=!1,U0.H=G,H0(),Error.prepareStackTrace=K}return E=(E=Q?Q.displayName||Q.name:"")?y0(E):"",typeof Q==="function"&&F_.set(Q,E),E}function w0(Q,X){switch(Q.tag){case 26:case 27:case 5:return y0(Q.type);case 16:return y0("Lazy");case 13:return Q.child!==X&&X!==null?y0("Suspense Fallback"):y0("Suspense");case 19:return y0("SuspenseList");case 0:case 15:return i0(Q.type,!1);case 11:return i0(Q.type.render,!1);case 1:return i0(Q.type,!0);case 31:return y0("Activity");default:return""}}function l0(Q){try{var X="",K=null;do{X+=w0(Q,K);var G=Q._debugInfo;if(G)for(var w=G.length-1;0<=w;w--){var H=G[w];if(typeof H.name==="string"){var F=X;Z:{var{name:V,env:b,debugLocation:E}=H;if(E!=null){var r=M0(E),o=r.lastIndexOf(` @@ -30,13 +30,13 @@ Error generating stack: `+L0.message+` `+w)}}else if(Q.debugStack!=null){var H=Q.debugStack;(Q=Q.owner)&&H&&(X+=` `+M0(H))}else break;var F=X}catch(V){F=` Error generating stack: `+V.message+` -`+V.stack}return F}function R0(Q,X,K,G,w,H,F){var V=L4;C1(Q);try{return Q!==null&&Q._debugTask?Q._debugTask.run(X.bind(null,K,G,w,H,F)):X(K,G,w,H,F)}finally{C1(V)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function C1(Q){U0.getCurrentStack=Q===null?null:B1,_3=!1,L4=Q}function J5(Q){return typeof Symbol==="function"&&Symbol.toStringTag&&Q[Symbol.toStringTag]||Q.constructor.name||"Object"}function n5(Q){try{return H5(Q),!1}catch(X){return!0}}function H5(Q){return""+Q}function N1(Q,X){if(n5(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,J5(Q)),H5(Q)}function t6(Q,X){if(n5(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,J5(Q)),H5(Q)}function $1(Q){if(n5(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.",J5(Q)),H5(Q)}function N4(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{UJ=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 kl==="function"&&fl(Q),A7&&typeof A7.setStrictMode==="function")try{A7.setStrictMode(UJ,Q)}catch(X){A3||(A3=!0,console.error("React instrumentation encountered an error: %o",X))}}function P6(Q){return Q>>>=0,Q===0?32:31-(gl(Q)/hl|0)|0}function e2(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 c4(Q,X,K){var G=Q.pendingLanes;if(G===0)return 0;var w=0,H=Q.suspendedLanes,F=Q.pingedLanes;Q=Q.warmLanes;var V=G&134217727;return V!==0?(G=V&~H,G!==0?w=e2(G):(F&=V,F!==0?w=e2(F):K||(K=V&~Q,K!==0&&(w=e2(K))))):(V=G&~H,V!==0?w=e2(V):F!==0?w=e2(F):K||(K=G&~Q,K!==0&&(w=e2(K)))),w===0?0:X!==0&&X!==w&&(X&H)===0&&(H=w&-w,K=X&-X,H>=K||H===32&&(K&4194048)!==0)?X:w}function k2(Q,X){return(Q.pendingLanes&~(Q.suspendedLanes&~Q.pingedLanes)&X)===0}function V6(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 R6(){var Q=ZG;return ZG<<=1,(ZG&62914560)===0&&(ZG=4194304),Q}function Z7(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 W2(Q,X,K,G,w,H){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:E}=Q;for(K=F&~K;0"u")return null;try{return Q.activeElement||Q.body}catch(X){return Q.body}}function S0(Q){return Q.replace(dl,function(X){return"\\"+X.charCodeAt(0).toString(16)+" "})}function c0(Q,X){X.checked===void 0||X.defaultChecked===void 0||UD||(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",v1()||"A component",X.type),UD=!0),X.value===void 0||X.defaultValue===void 0||GD||(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",v1()||"A component",X.type),GD=!0)}function a0(Q,X,K,G,w,H,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?d0(Q,F,t(X)):K!=null?d0(Q,F,t(K)):G!=null&&Q.removeAttribute("value"),w==null&&H!=null&&(Q.defaultChecked=!!H),w!=null&&(Q.checked=w&&typeof w!=="function"&&typeof w!=="symbol"),V!=null&&typeof V!=="function"&&typeof V!=="symbol"&&typeof V!=="boolean"?(N1(V,"name"),Q.name=""+t(V)):Q.removeAttribute("name")}function Q1(Q,X,K,G,w,H,F,V){if(H!=null&&typeof H!=="function"&&typeof H!=="symbol"&&typeof H!=="boolean"&&(N1(H,"type"),Q.type=H),X!=null||K!=null){if(!(H!=="submit"&&H!=="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}G=G!=null?G:w,G=typeof G!=="function"&&typeof G!=="symbol"&&!!G,Q.checked=V?Q.checked:!!G,Q.defaultChecked=!!G,F!=null&&typeof F!=="function"&&typeof F!=="symbol"&&typeof F!=="boolean"&&(N1(F,"name"),Q.name=F),P0(Q)}function d0(Q,X,K){X==="number"&&j0(Q.ownerDocument)===Q||Q.defaultValue===""+K||(Q.defaultValue=""+K)}function p1(Q,X){X.value==null&&(typeof X.children==="object"&&X.children!==null?aJ.Children.forEach(X.children,function(K){K==null||typeof K==="string"||typeof K==="number"||typeof K==="bigint"||wD||(wD=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to