diff --git a/bin/explore-cmd b/bin/explore-cmd deleted file mode 100755 index 0f26d70182..0000000000 --- a/bin/explore-cmd +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python - -""" -Simple command line tool to trigger robot exploration. - -Usage: - explore_cmd.py start # Start exploration - explore_cmd.py stop # Stop exploration -""" - -import sys -from dimos.protocol.pubsub.lcmpubsub import LCM, Topic -from dimos_lcm.std_msgs import Bool - - -def main(): - if len(sys.argv) != 2 or sys.argv[1] not in ["start", "stop"]: - print("Usage: bin/explore-cmd [start|stop]") - sys.exit(1) - - command = sys.argv[1] - - lcm = LCM() - - msg = Bool() - msg.data = True - - if command == "start": - topic = Topic("/explore_cmd", Bool) - lcm.publish(topic, msg) - print("✓ Sent start exploration command") - elif command == "stop": - topic = Topic("/stop_explore_cmd", Bool) - lcm.publish(topic, msg) - print("✓ Sent stop exploration command") - - -if __name__ == "__main__": - main() diff --git a/dimos/robot/unitree_webrtc/unitree_go2.py b/dimos/robot/unitree_webrtc/unitree_go2.py index c45bbd6fde..e129504ba4 100644 --- a/dimos/robot/unitree_webrtc/unitree_go2.py +++ b/dimos/robot/unitree_webrtc/unitree_go2.py @@ -372,6 +372,8 @@ def _deploy_visualization(self): """Deploy and configure visualization modules.""" self.websocket_vis = self.dimos.deploy(WebsocketVisModule, port=self.websocket_port) self.websocket_vis.click_goal.transport = core.LCMTransport("/goal_request", PoseStamped) + self.websocket_vis.explore_cmd.transport = core.LCMTransport("/explore_cmd", Bool) + self.websocket_vis.stop_explore_cmd.transport = core.LCMTransport("/stop_explore_cmd", Bool) self.websocket_vis.robot_pose.connect(self.connection.odom) self.websocket_vis.path.connect(self.global_planner.path) diff --git a/dimos/web/command-center-extension/.gitignore b/dimos/web/command-center-extension/.gitignore new file mode 100644 index 0000000000..239a363164 --- /dev/null +++ b/dimos/web/command-center-extension/.gitignore @@ -0,0 +1,3 @@ +*.foxe +/dist +/node_modules diff --git a/dimos/web/command-center-extension/.prettierrc.yaml b/dimos/web/command-center-extension/.prettierrc.yaml new file mode 100644 index 0000000000..e57cc20758 --- /dev/null +++ b/dimos/web/command-center-extension/.prettierrc.yaml @@ -0,0 +1,5 @@ +arrowParens: always +printWidth: 100 +trailingComma: "all" +tabWidth: 2 +semi: true diff --git a/dimos/web/command-center-extension/CHANGELOG.md b/dimos/web/command-center-extension/CHANGELOG.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dimos/web/command-center-extension/README.md b/dimos/web/command-center-extension/README.md new file mode 100644 index 0000000000..b81b27a6e5 --- /dev/null +++ b/dimos/web/command-center-extension/README.md @@ -0,0 +1,15 @@ +# command-center-extension + +## Usage + +Install the Foxglove Studio desktop application. + +Install the Node dependencies: + + npm install + +Build the package and install it into Foxglove: + + npm run build && npm run local-install + +To add the panel, go to Foxglove Studio, click on the "Add panel" icon on the top right and select "command-center [local]". diff --git a/dimos/web/command-center-extension/eslint.config.js b/dimos/web/command-center-extension/eslint.config.js new file mode 100644 index 0000000000..63cc3a243a --- /dev/null +++ b/dimos/web/command-center-extension/eslint.config.js @@ -0,0 +1,23 @@ +// @ts-check + +const foxglove = require("@foxglove/eslint-plugin"); +const globals = require("globals"); +const tseslint = require("typescript-eslint"); + +module.exports = tseslint.config({ + files: ["src/**/*.ts", "src/**/*.tsx"], + extends: [foxglove.configs.base, foxglove.configs.react, foxglove.configs.typescript], + languageOptions: { + globals: { + ...globals.es2020, + ...globals.browser, + }, + parserOptions: { + project: "tsconfig.json", + tsconfigRootDir: __dirname, + }, + }, + rules: { + "react-hooks/exhaustive-deps": "error", + }, +}); diff --git a/dimos/web/command-center-extension/src/App.tsx b/dimos/web/command-center-extension/src/App.tsx new file mode 100644 index 0000000000..82fb39a574 --- /dev/null +++ b/dimos/web/command-center-extension/src/App.tsx @@ -0,0 +1,63 @@ +import * as React from "react"; + +import Connection from "./Connection"; +import ControlPanel from "./ControlPanel"; +import VisualizerWrapper from "./components/VisualizerWrapper"; +import { AppAction, AppState } from "./types"; + +function appReducer(state: AppState, action: AppAction): AppState { + switch (action.type) { + case "SET_COSTMAP": + return { ...state, costmap: action.payload }; + case "SET_ROBOT_POSE": + return { ...state, robotPose: action.payload }; + case "SET_PATH": + return { ...state, path: action.payload }; + case "SET_FULL_STATE": + return { ...state, ...action.payload }; + default: + return state; + } +} + +const initialState: AppState = { + costmap: null, + robotPose: null, + path: null, +}; + +export default function App(): React.ReactElement { + const [state, dispatch] = React.useReducer(appReducer, initialState); + const connectionRef = React.useRef(null); + + React.useEffect(() => { + connectionRef.current = new Connection(dispatch); + + return () => { + if (connectionRef.current) { + connectionRef.current.disconnect(); + } + }; + }, []); + + const handleWorldClick = React.useCallback((worldX: number, worldY: number) => { + connectionRef.current?.worldClick(worldX, worldY); + }, []); + + const handleStartExplore = React.useCallback(() => { + connectionRef.current?.startExplore(); + }, []); + + const handleStopExplore = React.useCallback(() => { + connectionRef.current?.stopExplore(); + }, []); + + return ( +
+ +
+ +
+
+ ); +} diff --git a/dimos/web/command-center-extension/src/Connection.ts b/dimos/web/command-center-extension/src/Connection.ts new file mode 100644 index 0000000000..c08a48fbde --- /dev/null +++ b/dimos/web/command-center-extension/src/Connection.ts @@ -0,0 +1,69 @@ +import { io, Socket } from "socket.io-client"; + +import { + AppAction, + Costmap, + EncodedCostmap, + EncodedPath, + EncodedVector, + FullStateData, + Path, + Vector, +} from "./types"; + +export default class Connection { + socket: Socket; + dispatch: React.Dispatch; + + constructor(dispatch: React.Dispatch) { + this.dispatch = dispatch; + this.socket = io("ws://localhost:7779"); + + this.socket.on("costmap", (data: EncodedCostmap) => { + const costmap = Costmap.decode(data); + this.dispatch({ type: "SET_COSTMAP", payload: costmap }); + }); + + this.socket.on("robot_pose", (data: EncodedVector) => { + const robotPose = Vector.decode(data); + this.dispatch({ type: "SET_ROBOT_POSE", payload: robotPose }); + }); + + this.socket.on("path", (data: EncodedPath) => { + const path = Path.decode(data); + this.dispatch({ type: "SET_PATH", payload: path }); + }); + + this.socket.on("full_state", (data: FullStateData) => { + const state: Partial<{ costmap: Costmap; robotPose: Vector; path: Path }> = {}; + + if (data.costmap != undefined) { + state.costmap = Costmap.decode(data.costmap); + } + if (data.robot_pose != undefined) { + state.robotPose = Vector.decode(data.robot_pose); + } + if (data.path != undefined) { + state.path = Path.decode(data.path); + } + + this.dispatch({ type: "SET_FULL_STATE", payload: state }); + }); + } + + worldClick(worldX: number, worldY: number): void { + this.socket.emit("click", [worldX, worldY]); + } + + startExplore(): void { + this.socket.emit("start_explore"); + } + + stopExplore(): void { + this.socket.emit("stop_explore"); + } + + disconnect(): void { + this.socket.disconnect(); + } +} diff --git a/dimos/web/command-center-extension/src/ControlPanel.tsx b/dimos/web/command-center-extension/src/ControlPanel.tsx new file mode 100644 index 0000000000..c239d86415 --- /dev/null +++ b/dimos/web/command-center-extension/src/ControlPanel.tsx @@ -0,0 +1,37 @@ +import * as React from "react"; + +interface ControlPanelProps { + onStartExplore: () => void; + onStopExplore: () => void; +} + +export default function ControlPanel({ + onStartExplore, + onStopExplore, +}: ControlPanelProps): React.ReactElement { + const [exploring, setExploring] = React.useState(false); + + return ( +
+ {exploring ? ( + + ) : ( + + )} +
+ ); +} diff --git a/dimos/web/command-center-extension/src/components/CostmapLayer.tsx b/dimos/web/command-center-extension/src/components/CostmapLayer.tsx new file mode 100644 index 0000000000..0c07d73c85 --- /dev/null +++ b/dimos/web/command-center-extension/src/components/CostmapLayer.tsx @@ -0,0 +1,121 @@ +import * as d3 from "d3"; +import * as React from "react"; + +import { Costmap } from "../types"; +import GridLayer from "./GridLayer"; + +interface CostmapLayerProps { + costmap: Costmap; + width: number; + height: number; +} + +const CostmapLayer = React.memo(({ costmap, width, height }) => { + const canvasRef = React.useRef(null); + const { grid, origin, resolution } = costmap; + const rows = grid.shape[0]!; + const cols = grid.shape[1]!; + + const axisMargin = { left: 60, bottom: 40 }; + const availableWidth = width - axisMargin.left; + const availableHeight = height - axisMargin.bottom; + + const cell = Math.min(availableWidth / cols, availableHeight / rows); + const gridW = cols * cell; + const gridH = rows * cell; + const offsetX = axisMargin.left + (availableWidth - gridW) / 2; + const offsetY = (availableHeight - gridH) / 2; + + React.useEffect(() => { + const canvas = canvasRef.current; + if (!canvas) { + return; + } + + canvas.width = cols; + canvas.height = rows; + const ctx = canvas.getContext("2d"); + if (!ctx) { + return; + } + + const customColorScale = (t: number) => { + if (t === 0) { + return "black"; + } + if (t < 0) { + return "#2d2136"; + } + if (t > 0.95) { + return "#000000"; + } + + const color = d3.interpolateTurbo(t * 2 - 1); + const hsl = d3.hsl(color); + hsl.s *= 0.75; + return hsl.toString(); + }; + + const colour = d3.scaleSequential(customColorScale).domain([-1, 100]); + const img = ctx.createImageData(cols, rows); + const data = grid.data; + + for (let i = 0; i < data.length; i++) { + const row = Math.floor(i / cols); + const col = i % cols; + const invertedRow = rows - 1 - row; + const srcIdx = invertedRow * cols + col; + const value = data[i]!; + const c = d3.color(colour(value)); + if (!c) { + continue; + } + + const o = srcIdx * 4; + const rgb = c as d3.RGBColor; + img.data[o] = rgb.r; + img.data[o + 1] = rgb.g; + img.data[o + 2] = rgb.b; + img.data[o + 3] = 255; + } + ctx.putImageData(img, 0, 0); + }, [grid.data, cols, rows]); + + return ( + + +
+ +
+
+ +
+ ); +}); + +CostmapLayer.displayName = "CostmapLayer"; + +export default CostmapLayer; diff --git a/dimos/web/command-center-extension/src/components/GridLayer.tsx b/dimos/web/command-center-extension/src/components/GridLayer.tsx new file mode 100644 index 0000000000..87018cd3af --- /dev/null +++ b/dimos/web/command-center-extension/src/components/GridLayer.tsx @@ -0,0 +1,105 @@ +import * as d3 from "d3"; +import * as React from "react"; + +import { Vector } from "../types"; + +interface GridLayerProps { + width: number; + height: number; + origin: Vector; + resolution: number; + rows: number; + cols: number; +} + +const GridLayer = React.memo( + ({ width, height, origin, resolution, rows, cols }) => { + const minX = origin.coords[0]!; + const minY = origin.coords[1]!; + const maxX = minX + cols * resolution; + const maxY = minY + rows * resolution; + + const xScale = d3.scaleLinear().domain([minX, maxX]).range([0, width]); + const yScale = d3.scaleLinear().domain([minY, maxY]).range([height, 0]); + + const gridSize = 1 / resolution; + const gridLines = React.useMemo(() => { + const lines = []; + for (const x of d3.range(Math.ceil(minX / gridSize) * gridSize, maxX, gridSize)) { + lines.push( + , + ); + } + for (const y of d3.range(Math.ceil(minY / gridSize) * gridSize, maxY, gridSize)) { + lines.push( + , + ); + } + return lines; + }, [minX, minY, maxX, maxY, gridSize, xScale, yScale, width, height]); + + const xAxisRef = React.useRef(null); + const yAxisRef = React.useRef(null); + + React.useEffect(() => { + if (xAxisRef.current) { + const xAxis = d3.axisBottom(xScale).ticks(7); + d3.select(xAxisRef.current).call(xAxis); + d3.select(xAxisRef.current) + .selectAll("line,path") + .attr("stroke", "#ffffff") + .attr("stroke-width", 1); + d3.select(xAxisRef.current).selectAll("text").attr("fill", "#ffffff"); + } + if (yAxisRef.current) { + const yAxis = d3.axisLeft(yScale).ticks(7); + d3.select(yAxisRef.current).call(yAxis); + d3.select(yAxisRef.current) + .selectAll("line,path") + .attr("stroke", "#ffffff") + .attr("stroke-width", 1); + d3.select(yAxisRef.current).selectAll("text").attr("fill", "#ffffff"); + } + }, [xScale, yScale]); + + const showOrigin = minX <= 0 && 0 <= maxX && minY <= 0 && 0 <= maxY; + + return ( + <> + {gridLines} + + + {showOrigin && ( + + + + World Origin (0,0) + + + )} + + ); + }, +); + +GridLayer.displayName = "GridLayer"; + +export default GridLayer; diff --git a/dimos/web/command-center-extension/src/components/PathLayer.tsx b/dimos/web/command-center-extension/src/components/PathLayer.tsx new file mode 100644 index 0000000000..969c9cf7dc --- /dev/null +++ b/dimos/web/command-center-extension/src/components/PathLayer.tsx @@ -0,0 +1,57 @@ +import * as d3 from "d3"; +import * as React from "react"; + +import { Path } from "../types"; + +interface PathLayerProps { + path: Path; + worldToPx: (x: number, y: number) => [number, number]; +} + +const PathLayer = React.memo(({ path, worldToPx }) => { + const points = React.useMemo( + () => path.coords.map(([x, y]) => worldToPx(x, y)), + [path.coords, worldToPx], + ); + + const pathData = React.useMemo(() => { + const line = d3.line(); + return line(points); + }, [points]); + + const gradientId = React.useMemo(() => `path-gradient-${Date.now()}`, []); + + if (path.coords.length < 2) { + return null; + } + + return ( + <> + + + + + + + + + ); +}); + +PathLayer.displayName = "PathLayer"; + +export default PathLayer; diff --git a/dimos/web/command-center-extension/src/components/VectorLayer.tsx b/dimos/web/command-center-extension/src/components/VectorLayer.tsx new file mode 100644 index 0000000000..87b932d0a4 --- /dev/null +++ b/dimos/web/command-center-extension/src/components/VectorLayer.tsx @@ -0,0 +1,41 @@ +import * as React from "react"; + +import { Vector } from "../types"; + +interface VectorLayerProps { + vector: Vector; + label: string; + worldToPx: (x: number, y: number) => [number, number]; +} + +const VectorLayer = React.memo(({ vector, label, worldToPx }) => { + const [cx, cy] = worldToPx(vector.coords[0]!, vector.coords[1]!); + const text = `${label} (${vector.coords[0]!.toFixed(2)}, ${vector.coords[1]!.toFixed(2)})`; + + return ( + <> + + + + + + + + {text} + + + + ); +}); + +VectorLayer.displayName = "VectorLayer"; + +export default VectorLayer; diff --git a/dimos/web/command-center-extension/src/components/VisualizerComponent.tsx b/dimos/web/command-center-extension/src/components/VisualizerComponent.tsx new file mode 100644 index 0000000000..e5bdb7f58e --- /dev/null +++ b/dimos/web/command-center-extension/src/components/VisualizerComponent.tsx @@ -0,0 +1,102 @@ +import * as d3 from "d3"; +import * as React from "react"; + +import { Costmap, Path, Vector } from "../types"; +import CostmapLayer from "./CostmapLayer"; +import PathLayer from "./PathLayer"; +import VectorLayer from "./VectorLayer"; + +interface VisualizerComponentProps { + costmap: Costmap | null; + robotPose: Vector | null; + path: Path | null; +} + +const VisualizerComponent: React.FC = ({ costmap, robotPose, path }) => { + const svgRef = React.useRef(null); + const [dimensions, setDimensions] = React.useState({ width: 800, height: 600 }); + const { width, height } = dimensions; + + React.useEffect(() => { + if (!svgRef.current?.parentElement) { + return; + } + + const updateDimensions = () => { + const rect = svgRef.current?.parentElement?.getBoundingClientRect(); + if (rect) { + setDimensions({ width: rect.width, height: rect.height }); + } + }; + + updateDimensions(); + const observer = new ResizeObserver(updateDimensions); + observer.observe(svgRef.current.parentElement); + + return () => { + observer.disconnect(); + }; + }, []); + + const { worldToPx } = React.useMemo(() => { + if (!costmap) { + return { worldToPx: undefined }; + } + + const { + grid: { shape }, + origin, + resolution, + } = costmap; + const rows = shape[0]!; + const cols = shape[1]!; + + const axisMargin = { left: 60, bottom: 40 }; + const availableWidth = width - axisMargin.left; + const availableHeight = height - axisMargin.bottom; + + const cell = Math.min(availableWidth / cols, availableHeight / rows); + const gridW = cols * cell; + const gridH = rows * cell; + const offsetX = axisMargin.left + (availableWidth - gridW) / 2; + const offsetY = (availableHeight - gridH) / 2; + + const xScale = d3 + .scaleLinear() + .domain([origin.coords[0]!, origin.coords[0]! + cols * resolution]) + .range([offsetX, offsetX + gridW]); + + const yScale = d3 + .scaleLinear() + .domain([origin.coords[1]!, origin.coords[1]! + rows * resolution]) + .range([offsetY + gridH, offsetY]); + + const worldToPxFn = (x: number, y: number): [number, number] => [xScale(x), yScale(y)]; + + return { worldToPx: worldToPxFn }; + }, [costmap, width, height]); + + return ( +
+ + {costmap && } + {path && worldToPx && } + {robotPose && worldToPx && ( + + )} + +
+ ); +}; + +export default React.memo(VisualizerComponent); diff --git a/dimos/web/command-center-extension/src/components/VisualizerWrapper.tsx b/dimos/web/command-center-extension/src/components/VisualizerWrapper.tsx new file mode 100644 index 0000000000..e137019ae1 --- /dev/null +++ b/dimos/web/command-center-extension/src/components/VisualizerWrapper.tsx @@ -0,0 +1,86 @@ +import * as d3 from "d3"; +import * as React from "react"; + +import { AppState } from "../types"; +import VisualizerComponent from "./VisualizerComponent"; + +interface VisualizerWrapperProps { + data: AppState; + onWorldClick: (worldX: number, worldY: number) => void; +} + +const VisualizerWrapper: React.FC = ({ data, onWorldClick }) => { + const containerRef = React.useRef(null); + const lastClickTime = React.useRef(0); + const clickThrottleMs = 150; + + const handleClick = React.useCallback( + (event: React.MouseEvent) => { + if (!data.costmap || !containerRef.current) { + return; + } + + event.stopPropagation(); + + const now = Date.now(); + if (now - lastClickTime.current < clickThrottleMs) { + console.log("Click throttled"); + return; + } + lastClickTime.current = now; + + const svgElement = containerRef.current.querySelector("svg"); + if (!svgElement) { + return; + } + + const svgRect = svgElement.getBoundingClientRect(); + const clickX = event.clientX - svgRect.left; + const clickY = event.clientY - svgRect.top; + + const costmap = data.costmap; + const { + grid: { shape }, + origin, + resolution, + } = costmap; + const rows = shape[0]!; + const cols = shape[1]!; + const width = svgRect.width; + const height = svgRect.height; + + const axisMargin = { left: 60, bottom: 40 }; + const availableWidth = width - axisMargin.left; + const availableHeight = height - axisMargin.bottom; + + const cell = Math.min(availableWidth / cols, availableHeight / rows); + const gridW = cols * cell; + const gridH = rows * cell; + const offsetX = axisMargin.left + (availableWidth - gridW) / 2; + const offsetY = (availableHeight - gridH) / 2; + + const xScale = d3 + .scaleLinear() + .domain([origin.coords[0]!, origin.coords[0]! + cols * resolution]) + .range([offsetX, offsetX + gridW]); + const yScale = d3 + .scaleLinear() + .domain([origin.coords[1]!, origin.coords[1]! + rows * resolution]) + .range([offsetY + gridH, offsetY]); + + const worldX = xScale.invert(clickX); + const worldY = yScale.invert(clickY); + + onWorldClick(worldX, worldY); + }, + [data.costmap, onWorldClick], + ); + + return ( +
+ +
+ ); +}; + +export default VisualizerWrapper; diff --git a/dimos/web/command-center-extension/src/index.ts b/dimos/web/command-center-extension/src/index.ts new file mode 100644 index 0000000000..052f967e37 --- /dev/null +++ b/dimos/web/command-center-extension/src/index.ts @@ -0,0 +1,14 @@ +import { PanelExtensionContext, ExtensionContext } from "@foxglove/extension"; + +import { initializeApp } from "./init"; + +export function activate(extensionContext: ExtensionContext): void { + extensionContext.registerPanel({ name: "command-center", initPanel }); +} + +export function initPanel(context: PanelExtensionContext): () => void { + initializeApp(context.panelElement); + return () => { + // Cleanup function + }; +} diff --git a/dimos/web/command-center-extension/src/init.ts b/dimos/web/command-center-extension/src/init.ts new file mode 100644 index 0000000000..f57f3aa582 --- /dev/null +++ b/dimos/web/command-center-extension/src/init.ts @@ -0,0 +1,9 @@ +import * as React from "react"; +import * as ReactDOMClient from "react-dom/client"; + +import App from "./App"; + +export function initializeApp(element: HTMLElement): void { + const root = ReactDOMClient.createRoot(element); + root.render(React.createElement(App)); +} diff --git a/dimos/web/command-center-extension/src/types.ts b/dimos/web/command-center-extension/src/types.ts new file mode 100644 index 0000000000..de890aa1b2 --- /dev/null +++ b/dimos/web/command-center-extension/src/types.ts @@ -0,0 +1,108 @@ +export type EncodedVector = Encoded<"vector"> & { + c: number[]; +}; + +export class Vector { + coords: number[]; + constructor(...coords: number[]) { + this.coords = coords; + } + + static decode(data: EncodedVector): Vector { + return new Vector(...data.c); + } +} + +export type EncodedPath = Encoded<"path"> & { + points: Array<[number, number]>; +}; + +export class Path { + constructor(public coords: Array<[number, number]>) {} + + static decode(data: EncodedPath): Path { + return new Path(data.points); + } +} + +export type EncodedCostmap = Encoded<"costmap"> & { + grid: EncodedGrid; + origin: EncodedVector; + resolution: number; + origin_theta: number; +}; + +export class Costmap { + constructor( + public grid: Grid, + public origin: Vector, + public resolution: number, + public origin_theta: number, + ) { + this.grid = grid; + this.origin = origin; + this.resolution = resolution; + this.origin_theta = origin_theta; + } + + static decode(data: EncodedCostmap): Costmap { + return new Costmap( + Grid.decode(data.grid), + Vector.decode(data.origin), + data.resolution, + data.origin_theta, + ); + } +} + +const DTYPE = { + f32: Float32Array, + f64: Float64Array, + i32: Int32Array, + i8: Int8Array, +}; + +export type EncodedGrid = Encoded<"grid"> & { + shape: [number, number]; + dtype: keyof typeof DTYPE; + compressed: boolean; + data: string; +}; + +export class Grid { + constructor( + public data: Float32Array | Float64Array | Int32Array | Int8Array, + public shape: number[], + ) {} + + static decode(msg: EncodedGrid): Grid { + const bytes = Uint8Array.from(atob(msg.data), (c) => c.charCodeAt(0)); + const raw = bytes; + const Arr = DTYPE[msg.dtype]; + return new Grid(new Arr(raw.buffer), msg.shape); + } +} + +export type Drawable = Costmap | Vector | Path; + +export type Encoded = { + type: T; +}; + +export interface FullStateData { + costmap?: EncodedCostmap; + robot_pose?: EncodedVector; + path?: EncodedPath; +} + +export interface AppState { + costmap: Costmap | null; + robotPose: Vector | null; + path: Path | null; +} + +export type AppAction = + | { type: "SET_COSTMAP"; payload: Costmap } + | { type: "SET_ROBOT_POSE"; payload: Vector } + | { type: "SET_PATH"; payload: Path } + | { type: "SET_FULL_STATE"; payload: Partial }; diff --git a/dimos/web/command-center-extension/tsconfig.json b/dimos/web/command-center-extension/tsconfig.json new file mode 100644 index 0000000000..b4ead7c4a8 --- /dev/null +++ b/dimos/web/command-center-extension/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "create-foxglove-extension/tsconfig/tsconfig.json", + "include": [ + "./src/**/*" + ], + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "lib": [ + "dom" + ], + "composite": false, + "declaration": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/dimos/web/websocket_vis/build.ts b/dimos/web/websocket_vis/build.ts deleted file mode 100644 index 1464eac2c5..0000000000 --- a/dimos/web/websocket_vis/build.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as esbuild from "npm:esbuild" -import { denoPlugins } from "jsr:@luca/esbuild-deno-loader" -import type { BuildOptions } from "npm:esbuild" - -const args = Deno.args -const watchMode = args.includes("--watch") - -const buildOptions: BuildOptions = { - plugins: [...denoPlugins()], - conditions: ["browser", "deno", "node"], - entryPoints: [ - "./clientside/init.ts", - // vs2.tsx is imported by init.ts, so we don't need to add it here - ], - outfile: "./static/js/clientside.js", - bundle: true, - format: "esm", - target: ["es2020"], - define: { - "import.meta.url": '""', - "import.meta": "false", - "process.env.NODE_ENV": '"production"', - }, - loader: { - ".tsx": "tsx", - ".ts": "ts", - }, - jsx: "transform", // Use transform instead of automatic - jsxFactory: "React.createElement", - jsxFragment: "React.Fragment", - platform: "browser", - // Generate source maps - sourcemap: true, -} - -async function build() { - try { - const timestamp = new Date().toLocaleTimeString() - await esbuild.build(buildOptions) - console.log(`[${timestamp}] Build completed successfully`) - } catch (error) { - console.error(`Build failed:`, error) - } -} - -if (watchMode) { - // Use Deno's built-in watch functionality - const watcher = Deno.watchFs(["./clientside"], { recursive: true }) - - // Initial build - await build() - console.log("Watching for changes...") - - for await (const event of watcher) { - if (["create", "modify"].includes(event.kind)) { - console.log(`Changes detected in ${event.paths}`) - await build() - } - } -} else { - await build() - esbuild.stop() -} diff --git a/dimos/web/websocket_vis/clientside/decoder.ts b/dimos/web/websocket_vis/clientside/decoder.ts deleted file mode 100644 index ff4439d799..0000000000 --- a/dimos/web/websocket_vis/clientside/decoder.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Costmap, EncodedSomething, Grid, Path, Vector } from "./types.ts"; - -export function decode(data: EncodedSomething) { - // console.log("decoding", data) - if (data.type == "costmap") { - return Costmap.decode(data); - } - if (data.type == "vector") { - return Vector.decode(data); - } - if (data.type == "grid") { - return Grid.decode(data); - } - if (data.type == "path") { - return Path.decode(data); - } - - return "UNKNOWN"; -} diff --git a/dimos/web/websocket_vis/clientside/init.ts b/dimos/web/websocket_vis/clientside/init.ts deleted file mode 100644 index 4367d89819..0000000000 --- a/dimos/web/websocket_vis/clientside/init.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { io } from "npm:socket.io-client"; -import { decode } from "./decoder.ts"; -import { Drawable, EncodedSomething } from "./types.ts"; -import { Visualizer as ReactVisualizer } from "./vis2.tsx"; - -// Store server state locally -let serverState = { - status: "disconnected", - connected_clients: 0, - data: {}, - draw: {}, -}; - -let reactVisualizer: ReactVisualizer | null = null; - -const socket = io(); - -socket.on("connect", () => { - console.log("Connected to server"); - serverState.status = "connected"; -}); - -socket.on("disconnect", () => { - console.log("Disconnected from server"); - serverState.status = "disconnected"; -}); - -socket.on("message", (data) => { - //console.log("Received message:", data) -}); - -// Deep merge function for client-side state updates -function deepMerge(source: any, destination: any): any { - for (const key in source) { - // If both source and destination have the property and both are objects, merge them - if ( - key in destination && - typeof source[key] === "object" && - source[key] !== null && - typeof destination[key] === "object" && - destination[key] !== null && - !Array.isArray(source[key]) && - !Array.isArray(destination[key]) - ) { - deepMerge(source[key], destination[key]); - } else { - // Otherwise, just copy the value - destination[key] = source[key]; - } - } - return destination; -} - -type DrawConfig = { [key: string]: any }; - -type EncodedDrawable = EncodedSomething; -type EncodedDrawables = { - [key: string]: EncodedDrawable; -}; -type Drawables = { - [key: string]: Drawable; -}; - -function decodeDrawables(encoded: EncodedDrawables): Drawables { - const drawables: Drawables = {}; - for (const [key, value] of Object.entries(encoded)) { - // @ts-ignore - drawables[key] = decode(value); - } - return drawables; -} - -function state_update(state: { [key: string]: any }) { - //console.log("Received state update:", state) - // Use deep merge to update nested properties - - if (state.draw) { - state.draw = decodeDrawables(state.draw); - } - - // console.log("Decoded state update:", state); - // Create a fresh copy of the server state to trigger rerenders properly - serverState = { ...deepMerge(state, { ...serverState }) }; - - updateUI(); -} - -socket.on("state_update", state_update); -socket.on("full_state", state_update); - -// Function to send data to server -function emitMessage(data: any) { - socket.emit("message", data); -} - -// Function to update UI based on state -function updateUI() { - // console.log("Current state:", serverState); - - // Update both visualizers if they exist and there's data to display - if (serverState.draw && Object.keys(serverState.draw).length > 0) { - if (reactVisualizer) { - reactVisualizer.visualizeState(serverState.draw); - } - } -} - -// Initialize the application -function initializeApp() { - console.log("DOM loaded, initializing UI"); - reactVisualizer = new ReactVisualizer("#vis"); - - // Set up click handler to convert clicks to world coordinates and send to server - reactVisualizer.onWorldClick((worldX, worldY) => { - emitMessage({ type: "click", position: [worldX, worldY] }); - }); - - updateUI(); -} - -console.log("Socket.IO client initialized"); - -// Call initialization once when the DOM is loaded -document.addEventListener("DOMContentLoaded", initializeApp); diff --git a/dimos/web/websocket_vis/clientside/types.ts b/dimos/web/websocket_vis/clientside/types.ts deleted file mode 100644 index 8f7a03c3b9..0000000000 --- a/dimos/web/websocket_vis/clientside/types.ts +++ /dev/null @@ -1,97 +0,0 @@ -type EncodedVector = Encoded<"vector"> & { - c: number[] -} - -export class Vector { - coords: number[] - constructor(...coords: number[]) { - this.coords = coords - } - - static decode(data: EncodedVector): Vector { - return new Vector(...data.c) - } -} - -type EncodedPath = Encoded<"path"> & { - points: Array<[number, number]> -} - -export class Path { - constructor(public coords: Array<[number, number]>) { - } - - static decode(data: EncodedPath): Path { - return new Path(data.points) - } -} - -type EncodedCostmap = Encoded<"costmap"> & { - grid: EncodedGrid - origin: EncodedVector - resolution: number - origin_theta: number -} - -export class Costmap { - constructor( - public grid: Grid, - public origin: Vector, - public resolution: number, - public origin_theta: number, - ) { - this.grid = grid - this.origin = origin - this.resolution = resolution - this.origin_theta = origin_theta - } - - static decode(data: EncodedCostmap): Costmap { - return new Costmap( - Grid.decode(data.grid), - Vector.decode(data.origin), - data.resolution, - data.origin_theta, - ) - } -} - -const DTYPE = { - f32: Float32Array, - f64: Float64Array, - i32: Int32Array, - i8: Int8Array, -} - -type EncodedGrid = Encoded<"grid"> & { - shape: [number, number] - dtype: keyof typeof DTYPE - compressed: boolean - data: string -} - -export class Grid { - constructor( - public data: Float32Array | Float64Array | Int32Array | Int8Array, - public shape: number[], - ) {} - - static decode(msg: EncodedGrid): Grid { - const bytes = Uint8Array.from(atob(msg.data), (c) => c.charCodeAt(0)) - const raw = bytes - const Arr = DTYPE[msg.dtype] || Uint8Array // fallback - return new Grid(new Arr(raw.buffer), msg.shape) - } -} - -export type Drawable = Costmap | Vector | Path - -export type Encoded = { - type: T -} - -export type EncodedSomething = - | EncodedCostmap - | EncodedVector - | EncodedGrid - | EncodedPath diff --git a/dimos/web/websocket_vis/clientside/vis.ts b/dimos/web/websocket_vis/clientside/vis.ts deleted file mode 100644 index 29cb77563a..0000000000 --- a/dimos/web/websocket_vis/clientside/vis.ts +++ /dev/null @@ -1,309 +0,0 @@ -import * as d3 from "npm:d3" -import { Costmap, Drawable, Grid, Vector } from "./types.ts" - -export class CostmapVisualizer { - private svg: d3.Selection - private canvas: HTMLCanvasElement | null = null - private width: number - private height: number - private colorScale: d3.ScaleSequential - private cellSize: number = 4 // Default cell size - - constructor( - selector: string, - width: number = 800, - height: number = 600, - ) { - this.width = width - this.height = height - - // Create or select SVG element with responsive dimensions - this.svg = d3.select(selector) - .append("svg") - .attr("width", "100%") - .attr("height", "100%") - .attr("viewBox", `0 0 ${width} ${height}`) - .attr("preserveAspectRatio", "xMidYMid meet") - .style("background-color", "#f8f9fa") - - this.colorScale = d3.scaleSequential(d3.interpolateGreys) - } - - public visualize( - costmap: Costmap, - ): void { - const { grid, origin, resolution, origin_theta } = costmap - const [rows, cols] = grid.shape - - // Adjust cell size based on grid dimensions and container size - this.cellSize = Math.min( - this.width / cols, - this.height / rows, - ) - - // Calculate the required area for the grid - const gridWidth = cols * this.cellSize - const gridHeight = rows * this.cellSize - - // Clear previous visualization - this.svg.selectAll("*").remove() - - // Add transformation group for the entire costmap - const costmapGroup = this.svg - .append("g") - .attr( - "transform", - `translate(${(this.width - gridWidth) / 2}, ${ - (this.height - gridHeight) / 2 - })`, - ) - - // Determine value range for proper coloring - const minValue = 0 - const maxValue = 100 - - this.colorScale.domain([minValue, maxValue]) - - // Create a canvas element for fast rendering that fills the container - const foreignObject = costmapGroup.append("foreignObject") - .attr("width", gridWidth) - .attr("height", gridHeight) - - // Add a canvas element inside the foreignObject, ensuring it fills the container - const canvasDiv = foreignObject.append("xhtml:div") - .style("width", "100%") - .style("height", "100%") - .style("display", "flex") - .style("align-items", "center") - .style("justify-content", "center") - - // Create canvas element if not exists - if (!this.canvas) { - this.canvas = document.createElement("canvas") - canvasDiv.node()?.appendChild(this.canvas) - } else { - // Reuse existing canvas - canvasDiv.node()?.appendChild(this.canvas) - } - - // Set canvas size - physical pixel dimensions for rendering - this.canvas.width = cols - this.canvas.height = rows - - // Set canvas display size to fill the available space - this.canvas.style.width = "100%" - this.canvas.style.height = "100%" - this.canvas.style.objectFit = "contain" // Maintains aspect ratio - - // Get canvas context and render the grid - const ctx = this.canvas.getContext("2d") - if (ctx) { - // Create ImageData directly from the grid data - const imageData = ctx.createImageData(cols, rows) - const typedArray = grid.data - - // Fill the image data with colors based on the grid values - for (let i = 0; i < typedArray.length; i++) { - const value = typedArray[i] - // Get color from scale - const color = d3.color(this.colorScale(value)) - if (color) { - const idx = i * 4 - imageData.data[idx] = color.r || 0 // Red - imageData.data[idx + 1] = color.g || 0 // Green - imageData.data[idx + 2] = color.b || 0 // Blue - imageData.data[idx + 3] = 255 // Alpha (fully opaque) - } - } - - // Put the image data on the canvas - ctx.putImageData(imageData, 0, 0) - } - - // Add coordinates/scale - this.addCoordinateSystem( - costmapGroup, - gridWidth, - gridHeight, - origin, - resolution, - ) - } - - private addCoordinateSystem( - group: d3.Selection, - width: number, - height: number, - origin: Vector, - resolution: number, - ): void { - // Add axes at the bottom and left edge - const xScale = d3.scaleLinear() - .domain([origin.coords[0], origin.coords[0] + width * resolution]) - .range([0, width]) - - const yScale = d3.scaleLinear() - .domain([origin.coords[1], origin.coords[1] + height * resolution]) - .range([height, 0]) - - // Add x-axis at the bottom - const xAxis = d3.axisBottom(xScale).ticks(5) - group.append("g") - .attr("transform", `translate(0, ${height})`) - .call(xAxis) - .attr("class", "axis") - - // Add y-axis at the left - const yAxis = d3.axisLeft(yScale).ticks(5) - group.append("g") - .call(yAxis) - .attr("class", "axis") - } - - /** - * @deprecated Use visualize with interpolator parameter directly - */ - public setColorScale(interpolator: (t: number) => string): void { - console.warn( - "setColorScale is deprecated, pass the interpolator directly to visualize", - ) - } - - // Method to add a legend for the costmap values - public addLegend(minValue: number, maxValue: number): void { - // Create a gradient definition - const defs = this.svg.append("defs") - const gradient = defs.append("linearGradient") - .attr("id", "costmap-gradient") - .attr("x1", "0%") - .attr("y1", "0%") - .attr("x2", "100%") - .attr("y2", "0%") - - // Add color stops - const steps = 10 - for (let i = 0; i <= steps; i++) { - const t = i / steps - gradient.append("stop") - .attr("offset", `${t * 100}%`) - .attr( - "stop-color", - this.colorScale(minValue + t * (maxValue - minValue)), - ) - } - - // Add a rectangle with the gradient - const legendWidth = 200 - const legendHeight = 20 - - const legend = this.svg.append("g") - .attr("class", "legend") - .attr( - "transform", - `translate(${this.width - legendWidth - 20}, 20)`, - ) - - legend.append("rect") - .attr("width", legendWidth) - .attr("height", legendHeight) - .style("fill", "url(#costmap-gradient)") - - // Add labels - const legendScale = d3.scaleLinear() - .domain([minValue, maxValue]) - .range([0, legendWidth]) - - const legendAxis = d3.axisBottom(legendScale).ticks(5) - - legend.append("g") - .attr("transform", `translate(0, ${legendHeight})`) - .call(legendAxis) - } -} - -// Helper function to create and hook up visualization -export function createCostmapVis( - selector: string, - width: number = 800, - height: number = 600, -): CostmapVisualizer { - return new CostmapVisualizer(selector, width, height) -} - -// Extension to visualize multiple drawables -export class RobotStateVisualizer { - private costmapVis: CostmapVisualizer - private svg: d3.Selection - private containerSelector: string - private resizeObserver: ResizeObserver | null = null - - constructor( - selector: string, - width: number = 800, - height: number = 600, - ) { - this.containerSelector = selector - - // Create base SVG with responsive sizing - this.svg = d3.select(selector) - .append("svg") - .attr("width", "100%") - .attr("height", "100%") - .attr("viewBox", `0 0 ${width} ${height}`) - .attr("preserveAspectRatio", "xMidYMid meet") - .style("background-color", "#f8f9fa") - - // Create costmap visualizer that will render to the same SVG - this.costmapVis = new CostmapVisualizer(selector, width, height) - - // Set up resize observer to update when container size changes - const container = document.querySelector(selector) - if (container && window.ResizeObserver) { - this.resizeObserver = new ResizeObserver((entries) => { - for (const entry of entries) { - const { width, height } = entry.contentRect - if (width > 0 && height > 0) { - this.updateSize(width, height) - } - } - }) - this.resizeObserver.observe(container) - } - } - - private updateSize(width: number, height: number): void { - // Update viewBox to maintain aspect ratio - this.svg.attr("viewBox", `0 0 ${width} ${height}`) - } - - public visualizeState( - state: { [key: string]: Drawable }, - ): void { - // Clear previous visualization - this.svg.selectAll("*").remove() - - // Visualize each drawable based on its type - for (const [key, drawable] of Object.entries(state)) { - if (drawable instanceof Costmap) { - this.costmapVis.visualize(drawable) - } else if (drawable instanceof Vector) { - this.visualizeVector(drawable, key) - } - } - } - - private visualizeVector(vector: Vector, label: string): void { - // Implement vector visualization (arrows, points, etc.) - // This is a simple implementation showing vectors as points - const [x, y] = vector.coords - - console.log("VIS VECTOR", vector) - this.svg.append("circle") - .attr("cx", 200) - .attr("cy", 200) - .attr("r", 20) - .attr("fill", "red") - .append("title") - .text(`${label}: (${x}, ${y})`) - } -} diff --git a/dimos/web/websocket_vis/clientside/vis2.tsx b/dimos/web/websocket_vis/clientside/vis2.tsx deleted file mode 100644 index e0052a210d..0000000000 --- a/dimos/web/websocket_vis/clientside/vis2.tsx +++ /dev/null @@ -1,625 +0,0 @@ -import * as d3 from "npm:d3"; -import * as React from "npm:react"; -import * as ReactDOMClient from "npm:react-dom/client"; -import { Costmap, Drawable, Path, Vector } from "./types.ts"; - -// ─────────────────────────────────────────────────────────────────────────────── -// React component -// ─────────────────────────────────────────────────────────────────────────────── -const VisualizerComponent: React.FC<{ state: Record }> = ({ - state, -}) => { - const svgRef = React.useRef(null); - const [dimensions, setDimensions] = React.useState({ - width: 800, - height: 600, - }); - const { width, height } = dimensions; - - // Update dimensions when container size changes - React.useEffect(() => { - if (!svgRef.current) return; - - const updateDimensions = () => { - const rect = svgRef.current?.parentElement?.getBoundingClientRect(); - if (rect) { - setDimensions({ width: rect.width, height: rect.height }); - } - }; - - // Initial update - updateDimensions(); - - // Create resize observer - const observer = new ResizeObserver(updateDimensions); - observer.observe(svgRef.current.parentElement as Element); - - return () => observer.disconnect(); - }, []); - - /** Build a world→pixel transformer from the *first* cost‑map we see. */ - const { worldToPx, pxToWorld } = React.useMemo(() => { - const ref = Object.values(state).find( - (d): d is Costmap => d instanceof Costmap, - ); - if (!ref) return { worldToPx: undefined, pxToWorld: undefined }; - - const { - grid: { shape }, - origin, - resolution, - } = ref; - const [rows, cols] = shape; - - // Same sizing/centering logic used in visualiseCostmap - const cell = Math.min(width / cols, height / rows); - const gridW = cols * cell; - const gridH = rows * cell; - const offsetX = (width - gridW) / 2; - const offsetY = (height - gridH) / 2; - - const xScale = d3 - .scaleLinear() - .domain([origin.coords[0], origin.coords[0] + cols * resolution]) - .range([offsetX, offsetX + gridW]); - - const yScale = d3 - .scaleLinear() - .domain([origin.coords[1], origin.coords[1] + rows * resolution]) - .range([offsetY + gridH, offsetY]); // invert y (world ↑ => svg ↑) - - // World coordinates to pixel coordinates - const worldToPxFn = ( - x: number, - y: number, - ): [number, number] => [xScale(x), yScale(y)]; - - // Pixel coordinates to world coordinates (inverse transform) - const pxToWorldFn = ( - x: number, - y: number, - ): [number, number] => [ - xScale.invert(x), - yScale.invert(y), - ]; - - return { - worldToPx: worldToPxFn, - pxToWorld: pxToWorldFn, - }; - }, [state]); - - // Removed component-level click handler as we're using the global one in Visualizer class - - React.useEffect(() => { - if (!svgRef.current) return; - const svg = d3.select(svgRef.current); - svg.selectAll("*").remove(); - - // 1. maps (bottom layer) - Object.values(state).forEach((d) => { - if (d instanceof Costmap) visualiseCostmap(svg, d, width, height); - }); - - // 2. paths (middle layer) - Object.entries(state).forEach(([key, d]) => { - if (d instanceof Path) { - visualisePath(svg, d, key, worldToPx, width, height); - } - }); - - // 3. vectors (top layer) - Object.entries(state).forEach(([key, d]) => { - if (d instanceof Vector) { - visualiseVector(svg, d, key, worldToPx, width, height); - } - }); - - // Removed click handler as we're using the global one in Visualizer class - }, [state, worldToPx]); - - return ( -
- -
- ); -}; - -// ─────────────────────────────────────────────────────────────────────────────── -// Helper: costmap -// ─────────────────────────────────────────────────────────────────────────────── -function visualiseCostmap( - svg: d3.Selection, - costmap: Costmap, - width: number, - height: number, -): void { - const { grid, origin, resolution } = costmap; - const [rows, cols] = grid.shape; - - const cell = Math.min(width / cols, height / rows); - const gridW = cols * cell; - const gridH = rows * cell; - - const group = svg - .append("g") - .attr( - "transform", - `translate(${(width - gridW) / 2}, ${(height - gridH) / 2})`, - ); - - // Custom color interpolation function that maps 0 to white and other values to Inferno scale - const customColorScale = (t: number) => { - // If value is 0 (or very close to it), return dark bg color - // bluest #2d2136 - if (t == 0) return "white"; - if (t < 0) return "#2d2136"; - if (t > 0.95) return "#000000"; - - const color = d3.interpolateTurbo((t * 2) - 1); - const hsl = d3.hsl(color); - hsl.s *= 0.75; - return hsl.toString(); - }; - - const colour = d3.scaleSequential(customColorScale).domain([ - -1, - 100, - ]); - - const fo = group.append("foreignObject").attr("width", gridW).attr( - "height", - gridH, - ); - - const canvas = document.createElement("canvas"); - canvas.width = cols; - canvas.height = rows; - Object.assign(canvas.style, { - width: "100%", - height: "100%", - objectFit: "contain", - backgroundColor: "black", - }); - - fo.append("xhtml:div") - .style("width", "100%") - .style("height", "100%") - .style("display", "flex") - .style("alignItems", "center") - .style("justifyContent", "center") - .node() - ?.appendChild(canvas); - - const ctx = canvas.getContext("2d"); - if (ctx) { - const img = ctx.createImageData(cols, rows); - const data = grid.data; // row‑major, (0,0) = world south‑west - - // Flip vertically so world north appears at top of SVG - for (let i = 0; i < data.length; i++) { - const row = Math.floor(i / cols); - const col = i % cols; - - // Flip Y coordinate (invert row) to put origin at bottom-left - const invertedRow = rows - 1 - row; - const srcIdx = invertedRow * cols + col; - - const value = data[i]; // Get value from original index - const c = d3.color(colour(value)); - if (!c) continue; - const o = srcIdx * 4; // Write to flipped position - img.data[o] = c.r ?? 0; - img.data[o + 1] = c.g ?? 0; - img.data[o + 2] = c.b ?? 0; - img.data[o + 3] = 255; - } - ctx.putImageData(img, 0, 0); - } - - addCoordinateSystem(group, gridW, gridH, origin, resolution); -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Helper: coordinate system -// ─────────────────────────────────────────────────────────────────────────────── -function addCoordinateSystem( - group: d3.Selection, - width: number, - height: number, - origin: Vector, - resolution: number, -): void { - const minX = origin.coords[0]; - const minY = origin.coords[1]; - - const maxX = minX + (width * resolution); - const maxY = minY + (height * resolution); - //console.log(group, width, origin, maxX); - - const xScale = d3.scaleLinear().domain([ - minX, - maxX, - ]).range([0, width]); - const yScale = d3.scaleLinear().domain([ - minY, - maxY, - ]).range([height, 0]); - - const gridSize = 1 / resolution; - const gridColour = "#000"; - const gridGroup = group.append("g").attr("class", "grid"); - - for ( - const x of d3.range( - Math.ceil(minX / gridSize) * gridSize, - maxX, - gridSize, - ) - ) { - gridGroup - .append("line") - .attr("x1", xScale(x)) - .attr("y1", 0) - .attr("x2", xScale(x)) - .attr("y2", height) - .attr("stroke", gridColour) - .attr("stroke-width", 0.5) - .attr("opacity", 0.25); - } - - for ( - const y of d3.range( - Math.ceil(minY / gridSize) * gridSize, - maxY, - gridSize, - ) - ) { - gridGroup - .append("line") - .attr("x1", 0) - .attr("y1", yScale(y)) - .attr("x2", width) - .attr("y2", yScale(y)) - .attr("stroke", gridColour) - .attr("stroke-width", 0.5) - .attr("opacity", 0.25); - } - - const stylise = ( - sel: d3.Selection, - ) => { - sel.selectAll("line,path") - .attr("stroke", "#ffffff") - .attr("stroke-width", 1); - sel.selectAll("text") - .attr("fill", "#ffffff"); // Change the color here - }; - - group - .append("g") - .attr("transform", `translate(0, ${height})`) - .call(d3.axisBottom(xScale).ticks(7)) - .call(stylise); - group.append("g").call(d3.axisLeft(yScale).ticks(7)).call(stylise); - - if (minX <= 0 && 0 <= maxX && minY <= 0 && 0 <= maxY) { - const originPoint = group.append("g") - .attr("class", "origin-marker") - .attr("transform", `translate(${xScale(0)}, ${yScale(0)})`); - - // Add outer ring - originPoint.append("circle") - .attr("r", 8) - .attr("fill", "none") - .attr("stroke", "#00e676") - .attr("stroke-width", 1) - .attr("opacity", 0.5); - - // Add center point - originPoint.append("circle") - .attr("r", 4) - .attr("fill", "#00e676") - .attr("opacity", 0.9) - .append("title") - .text("World Origin (0,0)"); - } -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Helper: path -// ─────────────────────────────────────────────────────────────────────────────── -function visualisePath( - svg: d3.Selection, - path: Path, - label: string, - wp: ((x: number, y: number) => [number, number]) | undefined, - width: number, - height: number, -): void { - if (path.coords.length < 2) return; - - const points = path.coords.map(([x, y]) => { - return wp ? wp(x, y) : [width / 2 + x, height / 2 - y]; - }); - - // Create a path line - const line = d3.line(); - - // Create a gradient for the path - const pathId = `path-gradient-${label.replace(/\s+/g, "-")}`; - - svg.append("defs") - .append("linearGradient") - .attr("id", pathId) - .attr("gradientUnits", "userSpaceOnUse") - .attr("x1", points[0][0]) - .attr("y1", points[0][1]) - .attr("x2", points[points.length - 1][0]) - .attr("y2", points[points.length - 1][1]) - .selectAll("stop") - .data([ - //{ offset: "0%", color: "#4fc3f7" }, - //{ offset: "100%", color: "#f06292" }, - { offset: "0%", color: "#ff3333" }, - { offset: "100%", color: "#ff3333" }, - ]) - .enter().append("stop") - .attr("offset", (d) => d.offset) - .attr("stop-color", (d) => d.color); - - // Create the path with gradient and animation - svg.append("path") - .datum(points) - .attr("fill", "none") - .attr("stroke", `url(#${pathId})`) - .attr("stroke-width", 5) - .attr("stroke-linecap", "round") - .attr("filter", "url(#glow)") - .attr("opacity", 0.9) - .attr("d", line); -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Helper: vector -// ─────────────────────────────────────────────────────────────────────────────── -function visualiseVector( - svg: d3.Selection, - vector: Vector, - label: string, - wp: ((x: number, y: number) => [number, number]) | undefined, - width: number, - height: number, -): void { - const [cx, cy] = wp - ? wp(vector.coords[0], vector.coords[1]) - : [width / 2 + vector.coords[0], height / 2 - vector.coords[1]]; - - // Create a vector marker group - const vectorGroup = svg.append("g") - .attr("class", "vector-marker") - .attr("transform", `translate(${cx}, ${cy})`); - - // Add a glowing outer ring - vectorGroup.append("circle") - .attr("r", ".7em") - .attr("fill", "none") - // .attr("stroke", "#4fc3f7") - .attr("stroke", "red") - .attr("stroke-width", "1") - .attr("opacity", 0.9); - - // Add inner dot - vectorGroup.append("circle") - .attr("r", ".4em") - // .attr("fill", "#4fc3f7") - .attr("fill", "red"); - - // Add text with background - const text = `${label} (${vector.coords[0].toFixed(2)}, ${ - vector.coords[1].toFixed(2) - })`; - - // Create a group for the text and background - const textGroup = svg.append("g"); - - // Add text element - const textElement = textGroup - .append("text") - .attr("x", cx + 25) - .attr("y", cy + 25) - .attr("font-size", "1em") - .attr("fill", "white") - .text(text); - - // Add background rect - const bbox = textElement.node()?.getBBox(); - if (bbox) { - textGroup - .insert("rect", "text") - .attr("x", bbox.x - 1) - .attr("y", bbox.y - 1) - .attr("width", bbox.width + 2) - .attr("height", bbox.height + 2) - .attr("fill", "black") - .attr("stroke", "black") - .attr("opacity", 0.75); - } -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Wrapper class -// ─────────────────────────────────────────────────────────────────────────────── -export class Visualizer { - private container: HTMLElement | null; - private state: Record = {}; - private resizeObserver: ResizeObserver | null = null; - private root: ReactDOMClient.Root; - private onClickCallback: ((worldX: number, worldY: number) => void) | null = null; - private lastClickTime: number = 0; - private clickThrottleMs: number = 150; // Minimum ms between processed clicks - - constructor(selector: string) { - this.container = document.querySelector(selector); - if (!this.container) { - throw new Error(`Container not found: ${selector}`); - } - this.root = ReactDOMClient.createRoot(this.container); - - // First paint - this.render(); - - // Keep canvas responsive - if (window.ResizeObserver) { - this.resizeObserver = new ResizeObserver(() => this.render()); - this.resizeObserver.observe(this.container); - } - - // Bind the click handler once to preserve reference for cleanup - this.handleGlobalClick = this.handleGlobalClick.bind(this); - - // Set up click handler directly on the container with capture phase - // This ensures we get the event before any SVG elements - if (this.container) { - this.container.addEventListener("click", this.handleGlobalClick, true); - } - } - - /** Register a callback for when user clicks on the visualization */ - public onWorldClick( - callback: (worldX: number, worldY: number) => void, - ): void { - this.onClickCallback = callback; - } - - /** Handle global click events, filtering for clicks within our SVG */ - private handleGlobalClick(event: MouseEvent): void { - if (!this.onClickCallback || !this.container) return; - - // Stop propagation to prevent other handlers from interfering - event.stopPropagation(); - - // Throttle clicks to prevent issues with high refresh rates - const now = Date.now(); - if (now - this.lastClickTime < this.clickThrottleMs) { - console.log("Click throttled"); - return; - } - this.lastClickTime = now; - - // We don't need to check if click was inside container since we're attaching - // the event listener directly to the container - - console.log("Processing click at", event.clientX, event.clientY); - - // Find our SVG element - const svgElement = this.container.querySelector("svg"); - if (!svgElement) return; - - // Calculate click position relative to SVG viewport - const svgRect = svgElement.getBoundingClientRect(); - const viewportX = event.clientX - svgRect.left; - const viewportY = event.clientY - svgRect.top; - - // Convert to SVG coordinate space (accounting for viewBox) - const svgPoint = new DOMPoint(viewportX, viewportY); - const transformedPoint = svgPoint.matrixTransform( - svgElement.getScreenCTM()?.inverse() || new DOMMatrix(), - ); - - // Find a costmap to use for coordinate conversion - const costmap = Object.values(this.state).find( - (d): d is Costmap => d instanceof Costmap, - ); - - if (!costmap) return; - - const { - grid: { shape }, - origin, - resolution, - } = costmap; - const [rows, cols] = shape; - // Use the current SVG dimensions instead of hardcoded values - const width = svgRect.width; - const height = svgRect.height; - - // Calculate scales (same logic as in the component) - const cell = Math.min(width / cols, height / rows); - const gridW = cols * cell; - const gridH = rows * cell; - const offsetX = (width - gridW) / 2; - const offsetY = (height - gridH) / 2; - - const xScale = d3 - .scaleLinear() - .domain([offsetX, offsetX + gridW]) - .range([origin.coords[0], origin.coords[0] + cols * resolution]); - const yScale = d3 - .scaleLinear() - .domain([offsetY + gridH, offsetY]) - .range([origin.coords[1], origin.coords[1] + rows * resolution]); - - // Convert to world coordinates - const worldX = xScale(transformedPoint.x); - const worldY = yScale(transformedPoint.y); - - console.log("Calling callback with world coords:", worldX.toFixed(2), worldY.toFixed(2)); - - // Call the callback with the world coordinates - this.onClickCallback(worldX, worldY); - } - - /** Push a new application‑state snapshot to the visualiser */ - public visualizeState(state: Record): void { - // Store reference to current state before updating - const prevState = this.state; - this.state = { ...state }; - - // Don't re-render if we're currently processing a click - const timeSinceLastClick = Date.now() - this.lastClickTime; - if (timeSinceLastClick < this.clickThrottleMs) { - console.log("Skipping render during click processing"); - return; - } - - this.render(); - } - - /** React‑render the component tree */ - private render(): void { - this.root.render(); - } - - /** Tear down listeners and free resources */ - public cleanup(): void { - if (this.resizeObserver && this.container) { - this.resizeObserver.unobserve(this.container); - this.resizeObserver.disconnect(); - } - - if (this.container) { - this.container.removeEventListener("click", this.handleGlobalClick, true); - } - } -} - -// Convenience factory ---------------------------------------------------------- -export function createReactVis(selector: string): Visualizer { - return new Visualizer(selector); -} diff --git a/dimos/web/websocket_vis/clientside/vis3.tsx b/dimos/web/websocket_vis/clientside/vis3.tsx deleted file mode 100644 index d0e5b615c9..0000000000 --- a/dimos/web/websocket_vis/clientside/vis3.tsx +++ /dev/null @@ -1,640 +0,0 @@ -import * as React from "npm:react" -import * as ReactDOMClient from "npm:react-dom/client" -import * as THREE from "npm:three" -import { Canvas, extend, Object3DNode, useThree } from "npm:@react-three/fiber" -import { - Billboard, - Line, - OrbitControls, - Plane, - Text, -} from "npm:@react-three/drei" -import { Costmap, Drawable, Path, Vector } from "./types.ts" - -// ─────────────────────────────────────────────────────────────────────────────── -// Extend with OrbitControls -// ─────────────────────────────────────────────────────────────────────────────── -extend({ OrbitControls }) -declare global { - namespace JSX { - interface IntrinsicElements { - orbitControls: Object3DNode - } - } -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Camera Controls -// ─────────────────────────────────────────────────────────────────────────────── -function CameraControls() { - const { camera, gl } = useThree() - const controlsRef = React.useRef(null) - - React.useEffect(() => { - if (controlsRef.current) { - // Set initial camera position to better show the 3D effect - camera.position.set(5, 8, 5) - camera.lookAt(0, 0, 0) - - // Update controls with better settings for 3D viewing - controlsRef.current.minDistance = 2 - controlsRef.current.maxDistance = 50 - controlsRef.current.update() - } - }, [camera]) - - return ( - - ) -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Grid Component -// ─────────────────────────────────────────────────────────────────────────────── -interface GridProps { - size: number - divisions: number - color?: string -} - -function Grid({ size = 10, divisions = 10, color = "#666666" }: GridProps) { - return ( - - ) -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Costmap Component -// ─────────────────────────────────────────────────────────────────────────────── -interface CostmapMeshProps { - costmap: Costmap -} - -function CostmapMesh({ costmap }: CostmapMeshProps) { - const { grid, origin, resolution } = costmap - const [rows, cols] = grid.shape - - // Calculate dimensions - const width = cols * resolution - const height = rows * resolution - - // Position is at the center of the grid - const posX = origin.coords[0] + (width / 2) - const posY = 0 - const posZ = origin.coords[1] + (height / 2) - - // Generate a 3D mesh directly from the costmap data - const meshRef = React.useRef(null) - - // Create the mesh - const colorData = React.useMemo(() => { - const vertices: number[] = [] - const indices: number[] = [] - const colors: number[] = [] - - // Cell size - const cellWidth = width / cols - const cellHeight = height / rows - - // Create vertices and colors - for (let row = 0; row < rows; row++) { - for (let col = 0; col < cols; col++) { - const x = col * cellWidth - width / 2 - const z = row * cellHeight - height / 2 - - // Get cost value - const idx = row * cols + col - const value = grid.data[idx] - - // Map cost value to height (y) with minimal elevation - let y = 0 - if (value < 5) { - y = 0 // Flat for clear paths - } else if (value < 20) { - y = (value / 20) * 0.1 // Barely visible bumps - } else if (value > 80) { - y = 0.3 + ((value - 80) / 20) * 0.2 // Small obstacles - } else { - y = 0.1 + ((value - 20) / 60) * 0.2 // Very gentle elevation - } - - // Add the vertex - vertices.push(x, y, z) - - // Determine color based on cost - original monochromatic scheme - let r, g, b - if (value < 5) { - // Very low cost - light gray (easily passable) - r = 0.9 - g = 0.9 - b = 0.9 - } else if (value < 20) { - // Low cost - slightly darker gray - const t = value / 20 - const val = 0.9 - (t * 0.3) - r = val - g = val - b = val - } else if (value > 80) { - // High cost - dark gray to black (obstacle) - const t = (value - 80) / 20 - const val = 0.25 - (t * 0.25) - r = val - g = val - b = val - } else { - // Medium cost - medium grays - const t = (value - 20) / 60 - const val = 0.6 - (t * 0.35) - r = val - g = val - b = val - } - - colors.push(r, g, b) - } - } - - // Create indices for triangles - for (let row = 0; row < rows - 1; row++) { - for (let col = 0; col < cols - 1; col++) { - const a = row * cols + col - const b = row * cols + col + 1 - const c = (row + 1) * cols + col - const d = (row + 1) * cols + col + 1 - - // First triangle - indices.push(a, c, b) - // Second triangle - indices.push(b, c, d) - } - } - - return { vertices, indices, colors } - }, [grid, rows, cols, width, height]) - - return ( - - {/* Custom Mesh */} - - - - - - - - - - {/* Optional wireframe overlay */} - - - - - - - - - {/* Grid overlay - 10x coarser */} - - - ) -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Path Component -// ─────────────────────────────────────────────────────────────────────────────── -interface PathProps { - path: Path - color?: string - label: string -} - -function PathLine({ path, color = "#ff3333", label }: PathProps) { - if (path.coords.length < 2) return null - - // Path height offset to float above terrain (33% lower) - const pathHeight = 0.47 - - // Convert 2D path coordinates to 3D points - const points = path.coords.map(([x, y]) => - new THREE.Vector3(x, pathHeight, y) - ) - - // Calculate midpoint for label placement - const midIdx = Math.floor(points.length / 2) - const midPoint = points[midIdx] - - return ( - - {/* The path line */} - - - {/* Path label - always faces camera */} - - - - {`${label} (${path.coords.length})`} - - - - - {/* Start point marker */} - - - - - - {/* End point marker */} - - - - - - {/* Vertical connectors to terrain - thicker */} - {path.coords.map(([x, y], idx) => ( - - )).filter((_, idx) => - idx % 8 === 0 || idx === 0 || idx === path.coords.length - 1 - )} {/* Only show some connectors */} - - ) -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Vector Component -// ─────────────────────────────────────────────────────────────────────────────── -interface VectorProps { - vector: Vector - label: string - color?: string -} - -function VectorMarker({ vector, label, color = "#00aaff" }: VectorProps) { - const [x, y] = vector.coords - const markerHeight = 0.47 // Same height as paths (33% lower) - - return ( - - {/* Vector Marker - larger, no ring */} - - - - - - {/* Label - always faces camera */} - - - - {`${label} (${vector.coords[0].toFixed(2)}, ${ - vector.coords[1].toFixed(2) - })`} - - - - - {/* Vertical connector to terrain - thicker */} - - - ) -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Click Detector Component -// ─────────────────────────────────────────────────────────────────────────────── -interface ClickDetectorProps { - onWorldClick: (x: number, y: number) => void -} - -function ClickDetector({ onWorldClick }: ClickDetectorProps) { - const planeRef = React.useRef(null) - - const handleClick = (event: THREE.ThreeEvent) => { - if (planeRef.current && event.intersections.length > 0) { - // Get the intersection point with our invisible plane - const intersection = event.intersections.find( - (i) => i.object === planeRef.current, - ) - - if (intersection) { - const point = intersection.point - onWorldClick(point.x, point.z) - } - } - } - - return ( - - - - - ) -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Color Utilities -// ─────────────────────────────────────────────────────────────────────────────── -// Tron-inspired color palette -const tronColors = [ - "#00FFFF", // Cyan - "#00BFFF", // Deep Sky Blue - "#1E90FF", // Dodger Blue - "#40E0D0", // Turquoise - "#00FF7F", // Spring Green - "#7FFFD4", // Aquamarine - "#48D1CC", // Medium Turquoise - "#87CEFA", // Light Sky Blue - "#0000FF", // Blue - "#007FFF", // Azure - "#4169E1", // Royal Blue -] - -// Generate a consistent color based on the vector name -function getTronColor(name: string): string { - // Hash the string to get a consistent index - let hash = 0 - for (let i = 0; i < name.length; i++) { - hash = ((hash << 5) - hash) + name.charCodeAt(i) - hash |= 0 // Convert to 32bit integer - } - // Get positive index in the color array range - const index = Math.abs(hash) % tronColors.length - return tronColors[index] -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Main Scene Component -// ─────────────────────────────────────────────────────────────────────────────── -interface VisualizerSceneProps { - state: Record - onWorldClick: (x: number, y: number) => void -} - -function VisualizerScene({ state, onWorldClick }: VisualizerSceneProps) { - // Extract the costmaps, paths, and vectors from state - const costmaps = Object.values(state).filter( - (item): item is Costmap => item instanceof Costmap, - ) - - const pathEntries = Object.entries(state).filter( - ([_, item]): item is Path => item instanceof Path, - ) as [string, Path][] - - const vectorEntries = Object.entries(state).filter( - ([_, item]): item is Vector => item instanceof Vector, - ) as [string, Vector][] - - return ( - - {/* Ambient light for basic illumination */} - - - {/* Main directional light */} - - - {/* Additional lights for better 3D effect visibility */} - - - {/* Add a point light to highlight elevation differences */} - - - {/* Camera controls */} - - - {/* Click detector */} - - - {/* Render costmaps (bottom layer) */} - {costmaps.map((costmap, index) => ( - - ))} - - {/* Render paths (middle layer) */} - {pathEntries.map(([key, path]) => ( - - ))} - - {/* Render vectors (top layer) */} - {vectorEntries.map(([key, vector]) => ( - - ))} - - ) -} - -// ─────────────────────────────────────────────────────────────────────────────── -// React Component -// ─────────────────────────────────────────────────────────────────────────────── -const VisualizerComponent: React.FC<{ - state: Record - onWorldClick: (x: number, y: number) => void -}> = ({ - state, - onWorldClick, -}) => { - return ( -
- -
- ) -} - -// ─────────────────────────────────────────────────────────────────────────────── -// Wrapper class (maintains API compatibility with previous visualizer) -// ─────────────────────────────────────────────────────────────────────────────── -export class Visualizer { - private container: HTMLElement | null - private state: Record = {} - private resizeObserver: ResizeObserver | null = null - private root: ReactDOMClient.Root - private onClickCallback: ((worldX: number, worldY: number) => void) | null = - null - - constructor(selector: string) { - this.container = document.querySelector(selector) - if (!this.container) throw new Error(`Container not found: ${selector}`) - this.root = ReactDOMClient.createRoot(this.container) - - // First paint - this.render() - - // Keep canvas responsive - if (window.ResizeObserver) { - this.resizeObserver = new ResizeObserver(() => this.render()) - this.resizeObserver.observe(this.container) - } - } - - /** Register a callback for when user clicks on the visualization */ - public onWorldClick( - callback: (worldX: number, worldY: number) => void, - ): void { - this.onClickCallback = callback - this.render() // Re-render to apply the new callback - } - - /** Handle click event from the 3D scene */ - private handleWorldClick = (x: number, y: number): void => { - if (this.onClickCallback) { - this.onClickCallback(x, y) - } - } - - /** Push a new application‑state snapshot to the visualiser */ - public visualizeState(state: Record): void { - this.state = { ...state } - this.render() - } - - /** React‑render the component tree */ - private render(): void { - this.root.render( - , - ) - } - - /** Tear down listeners and free resources */ - public cleanup(): void { - if (this.resizeObserver && this.container) { - this.resizeObserver.unobserve(this.container) - this.resizeObserver.disconnect() - } - } -} - -// Convenience factory ---------------------------------------------------------- -export function createReactVis(selector: string): Visualizer { - return new Visualizer(selector) -} diff --git a/dimos/web/websocket_vis/deno.json b/dimos/web/websocket_vis/deno.json deleted file mode 100644 index 453c7a4a80..0000000000 --- a/dimos/web/websocket_vis/deno.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "nodeModulesDir": "auto", - "tasks": { - "build": "deno run -A build.ts", - "watch": "deno run -A build.ts --watch" - }, - "lint": { - "rules": { - "exclude": [ - "require-await", - "ban-ts-comment" - ] - } - }, - "fmt": { - "indentWidth": 4, - "useTabs": false, - "semiColons": false - }, - "compilerOptions": { - "lib": [ - "dom", - "deno.ns" - ] - } -} diff --git a/dimos/web/websocket_vis/deno.lock b/dimos/web/websocket_vis/deno.lock deleted file mode 100644 index 279c3fd6c3..0000000000 --- a/dimos/web/websocket_vis/deno.lock +++ /dev/null @@ -1,136 +0,0 @@ -{ - "version": "4", - "specifiers": { - "jsr:@luca/esbuild-deno-loader@*": "0.11.1", - "jsr:@std/bytes@^1.0.2": "1.0.5", - "jsr:@std/encoding@^1.0.5": "1.0.7", - "jsr:@std/path@^1.0.6": "1.0.8", - "npm:esbuild@*": "0.25.2" - }, - "jsr": { - "@luca/esbuild-deno-loader@0.11.1": { - "integrity": "dc020d16d75b591f679f6b9288b10f38bdb4f24345edb2f5732affa1d9885267", - "dependencies": [ - "jsr:@std/bytes", - "jsr:@std/encoding", - "jsr:@std/path" - ] - }, - "@std/bytes@1.0.5": { - "integrity": "4465dd739d7963d964c809202ebea6d5c6b8e3829ef25c6a224290fbb8a1021e" - }, - "@std/encoding@1.0.7": { - "integrity": "f631247c1698fef289f2de9e2a33d571e46133b38d042905e3eac3715030a82d" - }, - "@std/path@1.0.8": { - "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" - } - }, - "npm": { - "@esbuild/aix-ppc64@0.25.2": { - "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==" - }, - "@esbuild/android-arm64@0.25.2": { - "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==" - }, - "@esbuild/android-arm@0.25.2": { - "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==" - }, - "@esbuild/android-x64@0.25.2": { - "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==" - }, - "@esbuild/darwin-arm64@0.25.2": { - "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==" - }, - "@esbuild/darwin-x64@0.25.2": { - "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==" - }, - "@esbuild/freebsd-arm64@0.25.2": { - "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==" - }, - "@esbuild/freebsd-x64@0.25.2": { - "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==" - }, - "@esbuild/linux-arm64@0.25.2": { - "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==" - }, - "@esbuild/linux-arm@0.25.2": { - "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==" - }, - "@esbuild/linux-ia32@0.25.2": { - "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==" - }, - "@esbuild/linux-loong64@0.25.2": { - "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==" - }, - "@esbuild/linux-mips64el@0.25.2": { - "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==" - }, - "@esbuild/linux-ppc64@0.25.2": { - "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==" - }, - "@esbuild/linux-riscv64@0.25.2": { - "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==" - }, - "@esbuild/linux-s390x@0.25.2": { - "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==" - }, - "@esbuild/linux-x64@0.25.2": { - "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==" - }, - "@esbuild/netbsd-arm64@0.25.2": { - "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==" - }, - "@esbuild/netbsd-x64@0.25.2": { - "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==" - }, - "@esbuild/openbsd-arm64@0.25.2": { - "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==" - }, - "@esbuild/openbsd-x64@0.25.2": { - "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==" - }, - "@esbuild/sunos-x64@0.25.2": { - "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==" - }, - "@esbuild/win32-arm64@0.25.2": { - "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==" - }, - "@esbuild/win32-ia32@0.25.2": { - "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==" - }, - "@esbuild/win32-x64@0.25.2": { - "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==" - }, - "esbuild@0.25.2": { - "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", - "dependencies": [ - "@esbuild/aix-ppc64", - "@esbuild/android-arm", - "@esbuild/android-arm64", - "@esbuild/android-x64", - "@esbuild/darwin-arm64", - "@esbuild/darwin-x64", - "@esbuild/freebsd-arm64", - "@esbuild/freebsd-x64", - "@esbuild/linux-arm", - "@esbuild/linux-arm64", - "@esbuild/linux-ia32", - "@esbuild/linux-loong64", - "@esbuild/linux-mips64el", - "@esbuild/linux-ppc64", - "@esbuild/linux-riscv64", - "@esbuild/linux-s390x", - "@esbuild/linux-x64", - "@esbuild/netbsd-arm64", - "@esbuild/netbsd-x64", - "@esbuild/openbsd-arm64", - "@esbuild/openbsd-x64", - "@esbuild/sunos-x64", - "@esbuild/win32-arm64", - "@esbuild/win32-ia32", - "@esbuild/win32-x64" - ] - } - } -} diff --git a/dimos/web/websocket_vis/main.ts b/dimos/web/websocket_vis/main.ts deleted file mode 100644 index 292ce5f6dc..0000000000 --- a/dimos/web/websocket_vis/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function add(a: number, b: number): number { - return a + b; -} - -// Learn more at https://docs.deno.com/runtime/manual/examples/module_metadata#concepts -if (import.meta.main) { - console.log("Add 2 + 3 =", add(2, 3)); -} diff --git a/dimos/web/websocket_vis/main_test.ts b/dimos/web/websocket_vis/main_test.ts deleted file mode 100644 index 3d981e9bed..0000000000 --- a/dimos/web/websocket_vis/main_test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { assertEquals } from "@std/assert"; -import { add } from "./main.ts"; - -Deno.test(function addTest() { - assertEquals(add(2, 3), 5); -}); diff --git a/dimos/web/websocket_vis/static/index.css b/dimos/web/websocket_vis/static/index.css deleted file mode 100644 index fb9b901f06..0000000000 --- a/dimos/web/websocket_vis/static/index.css +++ /dev/null @@ -1,301 +0,0 @@ -:root, -svg { - --color-red: #fd5548; - --color-green: #73e3bb; - --color-blue: #555; - --color-lightblue: #adf7f6; - --color-orange: #ffa500; - --color-bgblue: #141d22; - - --text-color: #fff; - --text-color-alt: #aaa; - --text-color-p: #ccc; - --background-color: #000; - --background-color-alt: #111; - - --font-family: "JetBrains Mono", monospace; - --line-height: 1.2rem; - --border-thickness: 1px; - - --font-weight-normal: 500; - --font-weight-medium: 600; - --font-weight-bold: 800; - - fill: var(--text-color); - font-family: var(--font-family); - font-optical-sizing: auto; - font-weight: var(--font-weight-normal); - font-style: normal; - font-variant-numeric: tabular-nums lining-nums; - font-size: 16px; - width: 100%; -} - -body { - position: relative; - width: 100%; - margin: 0; - padding: 0; - max-width: calc(min(100ch, round(down, 100%, 1ch))); - line-height: var(--line-height); - background-color: black; -} - -canvas { - background-color: rgba(0, 0, 0, 1); - width: 100%; - height: auto; -} - -.left-section { - flex: 1; /* Takes up 50% of the container width */ -} - -.right-section { - flex: 1; /* Takes up 50% of the container width */ -} - -.skelesvg { - background-color: #000000; - width: 100%; - height: auto; - border: 1px solid white; -} - -video { - width: 100%; - height: auto; -} - -#plotly_container { - filter: invert(100%) hue-rotate(180deg); -} - -button { - font-family: var(--font-family); - white-space: nowrap; - border: none; - padding: 5px; - cursor: pointer; - margin: 0; - background-color: black; - color: white; - height: 2em; - border: 1px solid white; -} - -button:hover { - background-color: white; - color: black; -} - -button.selected { - background-color: white; - color: black; -} - -button.checkbox-button { - position: relative; - padding-left: 20px; - text-align: left; - margin: 2px; - width: auto; - min-width: 80px; -} - -button.checkbox-button::before { - content: ""; - position: absolute; - left: 5px; - top: 50%; - transform: translateY(-50%); - width: 10px; - height: 10px; - border: 1px solid white; - background-color: black; -} - -button.checkbox-button.checked::before { - background-color: white; -} - -button.checkbox-button:hover::before { - border-color: var(--color-green); -} - -/* Adjustments for grid layout */ -.controls.grid button.checkbox-button { - flex: 0 0 auto; -} - -.controls { - position: absolute; - bottom: 5px; - left: 5px; - width: calc(100% - 10px); - display: flex; - flex-wrap: wrap; - gap: 5px; - padding: 5px; - max-height: calc(100% - 30px); - overflow-y: auto; -} - -/* For grid layout (multiple items per row) */ -.controls.grid { - flex-direction: row; - justify-content: flex-start; - align-items: flex-start; -} - -/* For horizontal controls layout (default) */ -.controls.horizontal { - flex-direction: row; - align-items: center; - justify-content: flex-start; -} - -/* For vertical controls layout */ -.controls.vertical { - flex-direction: column; - align-items: flex-start; -} - -input[type="range"] { - -webkit-appearance: none; - width: 100%; - background: black; - outline: 1px solid white; - padding-left: 5px; - padding-right: 5px; - margin-right: 12px; -} - -input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - appearance: none; - width: 1.5em; - height: 1em; - background: black; - cursor: pointer; - border: 1px solid white; -} - -input[type="range"]::-moz-range-thumb { - width: 1.5em; - height: 1em; - background: black; - cursor: pointer; - border: 1px solid white; -} - -input[type="range"]::-webkit-slider-thumb:hover { - background: white; -} - -input[type="range"]::-moz-range-thumb:hover { - background: white; -} - -#window-container { - display: flex; - flex-wrap: wrap; - width: 100vw; -} - -.window { - position: relative; - border: 1px solid #ccc; - box-sizing: border-box; - min-width: 30vw; - flex: 1 1 30vh; - min-height: 33vh; - display: flex; - flex-direction: column; -} - -#vis { - min-height: 100vh; - min-width: 100vw; -} - -.window-title { - position: absolute; - top: 5px; - right: 5px; - background-color: black; - color: white; - padding: 5px; - border: 1px solid white; - z-index: 100; -} - -.window:has(.window) > .window-title { - top: 5px; - left: 5px; - width: fit-content; -} - -.window-content { - flex: 1; - overflow: hidden; - position: relative; - display: flex; - flex-wrap: wrap; -} - -svg { - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; -} - -/* Graph styling */ -.keypoint-path { - fill: none; - stroke-width: 1.5px; - vector-effect: non-scaling-stroke; -} - -.annotation-line { - stroke-width: 1px; - vector-effect: non-scaling-stroke; -} - -.annotation-line.vertical { - stroke-dasharray: none; -} - -.annotation-line.horizontal { - stroke-dasharray: none; -} - -.annotation-region { - opacity: 0.3; -} - -.annotation-point { - r: 4px; -} - -.annotation-text { - font-size: 12px; - font-weight: normal; -} - -.window:has(.window) { - border: 0px; -} - -.clickable-keypoint { - cursor: pointer; /* Indicates clickability */ - transition: stroke, r 0.5s; /* Smooth hover transition */ -} - -.clickable-keypoint:hover { - r: 10px; - stroke-width: 1; - stroke: white; -} diff --git a/dimos/web/websocket_vis/static/index.html b/dimos/web/websocket_vis/static/index.html deleted file mode 100644 index 2d5705ab1e..0000000000 --- a/dimos/web/websocket_vis/static/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - dimos websocket vis - - - - - - -
-
vis
-
- - - - diff --git a/dimos/web/websocket_vis/static/js/clientside.js b/dimos/web/websocket_vis/static/js/clientside.js deleted file mode 100644 index 6aaaa7089c..0000000000 --- a/dimos/web/websocket_vis/static/js/clientside.js +++ /dev/null @@ -1,20021 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value2); - -// node_modules/.deno/ms@2.1.3/node_modules/ms/index.js -var require_ms = __commonJS({ - "node_modules/.deno/ms@2.1.3/node_modules/ms/index.js"(exports, module) { - var s = 1e3; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y2 = d * 365.25; - module.exports = function(val, options) { - options = options || {}; - var type2 = typeof val; - if (type2 === "string" && val.length > 0) { - return parse2(val); - } else if (type2 === "number" && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) - ); - }; - function parse2(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type2 = (match[2] || "ms").toLowerCase(); - switch (type2) { - case "years": - case "year": - case "yrs": - case "yr": - case "y": - return n * y2; - case "weeks": - case "week": - case "w": - return n * w; - case "days": - case "day": - case "d": - return n * d; - case "hours": - case "hour": - case "hrs": - case "hr": - case "h": - return n * h; - case "minutes": - case "minute": - case "mins": - case "min": - case "m": - return n * m; - case "seconds": - case "second": - case "secs": - case "sec": - case "s": - return n * s; - case "milliseconds": - case "millisecond": - case "msecs": - case "msec": - case "ms": - return n; - default: - return void 0; - } - } - function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + "d"; - } - if (msAbs >= h) { - return Math.round(ms / h) + "h"; - } - if (msAbs >= m) { - return Math.round(ms / m) + "m"; - } - if (msAbs >= s) { - return Math.round(ms / s) + "s"; - } - return ms + "ms"; - } - function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, "day"); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, "hour"); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, "minute"); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, "second"); - } - return ms + " ms"; - } - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); - } - } -}); - -// node_modules/.deno/debug@4.3.7/node_modules/debug/src/common.js -var require_common = __commonJS({ - "node_modules/.deno/debug@4.3.7/node_modules/debug/src/common.js"(exports, module) { - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require_ms(); - createDebug.destroy = destroy; - Object.keys(env).forEach((key) => { - createDebug[key] = env[key]; - }); - createDebug.names = []; - createDebug.skips = []; - createDebug.formatters = {}; - function selectColor(namespace) { - let hash = 0; - for (let i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; - } - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - function debug12(...args) { - if (!debug12.enabled) { - return; - } - const self2 = debug12; - const curr = Number(/* @__PURE__ */ new Date()); - const ms = curr - (prevTime || curr); - self2.diff = ms; - self2.prev = prevTime; - self2.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - if (typeof args[0] !== "string") { - args.unshift("%O"); - } - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format2) => { - if (match === "%%") { - return "%"; - } - index++; - const formatter = createDebug.formatters[format2]; - if (typeof formatter === "function") { - const val = args[index]; - match = formatter.call(self2, val); - args.splice(index, 1); - index--; - } - return match; - }); - createDebug.formatArgs.call(self2, args); - const logFn = self2.log || createDebug.log; - logFn.apply(self2, args); - } - debug12.namespace = namespace; - debug12.useColors = createDebug.useColors(); - debug12.color = createDebug.selectColor(namespace); - debug12.extend = extend2; - debug12.destroy = createDebug.destroy; - Object.defineProperty(debug12, "enabled", { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - return enabledCache; - }, - set: (v) => { - enableOverride = v; - } - }); - if (typeof createDebug.init === "function") { - createDebug.init(debug12); - } - return debug12; - } - function extend2(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - createDebug.names = []; - createDebug.skips = []; - let i; - const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); - const len = split.length; - for (i = 0; i < len; i++) { - if (!split[i]) { - continue; - } - namespaces = split[i].replace(/\*/g, ".*?"); - if (namespaces[0] === "-") { - createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); - } else { - createDebug.names.push(new RegExp("^" + namespaces + "$")); - } - } - } - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) - ].join(","); - createDebug.enable(""); - return namespaces; - } - function enabled(name) { - if (name[name.length - 1] === "*") { - return true; - } - let i; - let len; - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - return false; - } - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); - } - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - function destroy() { - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - createDebug.enable(createDebug.load()); - return createDebug; - } - module.exports = setup; - } -}); - -// node_modules/.deno/debug@4.3.7/node_modules/debug/src/browser.js -var require_browser = __commonJS({ - "node_modules/.deno/debug@4.3.7/node_modules/debug/src/browser.js"(exports, module) { - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - exports.destroy = /* @__PURE__ */ (() => { - let warned = false; - return () => { - if (!warned) { - warned = true; - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - }; - })(); - exports.colors = [ - "#0000CC", - "#0000FF", - "#0033CC", - "#0033FF", - "#0066CC", - "#0066FF", - "#0099CC", - "#0099FF", - "#00CC00", - "#00CC33", - "#00CC66", - "#00CC99", - "#00CCCC", - "#00CCFF", - "#3300CC", - "#3300FF", - "#3333CC", - "#3333FF", - "#3366CC", - "#3366FF", - "#3399CC", - "#3399FF", - "#33CC00", - "#33CC33", - "#33CC66", - "#33CC99", - "#33CCCC", - "#33CCFF", - "#6600CC", - "#6600FF", - "#6633CC", - "#6633FF", - "#66CC00", - "#66CC33", - "#9900CC", - "#9900FF", - "#9933CC", - "#9933FF", - "#99CC00", - "#99CC33", - "#CC0000", - "#CC0033", - "#CC0066", - "#CC0099", - "#CC00CC", - "#CC00FF", - "#CC3300", - "#CC3333", - "#CC3366", - "#CC3399", - "#CC33CC", - "#CC33FF", - "#CC6600", - "#CC6633", - "#CC9900", - "#CC9933", - "#CCCC00", - "#CCCC33", - "#FF0000", - "#FF0033", - "#FF0066", - "#FF0099", - "#FF00CC", - "#FF00FF", - "#FF3300", - "#FF3333", - "#FF3366", - "#FF3399", - "#FF33CC", - "#FF33FF", - "#FF6600", - "#FF6633", - "#FF9900", - "#FF9933", - "#FFCC00", - "#FFCC33" - ]; - function useColors() { - if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { - return true; - } - if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - let m; - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - function formatArgs(args) { - args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff); - if (!this.useColors) { - return; - } - const c = "color: " + this.color; - args.splice(1, 0, c, "color: inherit"); - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, (match) => { - if (match === "%%") { - return; - } - index++; - if (match === "%c") { - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - exports.log = console.debug || console.log || (() => { - }); - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem("debug", namespaces); - } else { - exports.storage.removeItem("debug"); - } - } catch (error) { - } - } - function load() { - let r; - try { - r = exports.storage.getItem("debug"); - } catch (error) { - } - if (!r && typeof process !== "undefined" && "env" in process) { - r = process.env.DEBUG; - } - return r; - } - function localstorage() { - try { - return localStorage; - } catch (error) { - } - } - module.exports = require_common()(exports); - var { formatters } = module.exports; - formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (error) { - return "[UnexpectedJSONParseError]: " + error.message; - } - }; - } -}); - -// node_modules/.deno/react@19.1.0/node_modules/react/cjs/react.production.js -var require_react_production = __commonJS({ - "node_modules/.deno/react@19.1.0/node_modules/react/cjs/react.production.js"(exports) { - "use strict"; - var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"); - var REACT_PORTAL_TYPE = Symbol.for("react.portal"); - var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); - var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); - var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); - var REACT_CONTEXT_TYPE = Symbol.for("react.context"); - var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); - var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); - var REACT_MEMO_TYPE = Symbol.for("react.memo"); - var REACT_LAZY_TYPE = Symbol.for("react.lazy"); - var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; - function getIteratorFn(maybeIterable) { - if (null === maybeIterable || "object" !== typeof maybeIterable) return null; - maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; - return "function" === typeof maybeIterable ? maybeIterable : null; - } - var ReactNoopUpdateQueue = { - isMounted: function() { - return false; - }, - enqueueForceUpdate: function() { - }, - enqueueReplaceState: function() { - }, - enqueueSetState: function() { - } - }; - var assign = Object.assign; - var emptyObject = {}; - function Component(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - Component.prototype.isReactComponent = {}; - Component.prototype.setState = function(partialState, callback) { - if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) - throw Error( - "takes an object of state variables to update or a function which returns an object of state variables." - ); - this.updater.enqueueSetState(this, partialState, callback, "setState"); - }; - Component.prototype.forceUpdate = function(callback) { - this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); - }; - function ComponentDummy() { - } - ComponentDummy.prototype = Component.prototype; - function PureComponent(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); - pureComponentPrototype.constructor = PureComponent; - assign(pureComponentPrototype, Component.prototype); - pureComponentPrototype.isPureReactComponent = true; - var isArrayImpl = Array.isArray; - var ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null }; - var hasOwnProperty = Object.prototype.hasOwnProperty; - function ReactElement(type2, key, self2, source, owner, props) { - self2 = props.ref; - return { - $$typeof: REACT_ELEMENT_TYPE, - type: type2, - key, - ref: void 0 !== self2 ? self2 : null, - props - }; - } - function cloneAndReplaceKey(oldElement, newKey) { - return ReactElement( - oldElement.type, - newKey, - void 0, - void 0, - void 0, - oldElement.props - ); - } - function isValidElement(object) { - return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; - } - function escape(key) { - var escaperLookup = { "=": "=0", ":": "=2" }; - return "$" + key.replace(/[=:]/g, function(match) { - return escaperLookup[match]; - }); - } - var userProvidedKeyEscapeRegex = /\/+/g; - function getElementKey(element, index) { - return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36); - } - function noop$1() { - } - function resolveThenable(thenable) { - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw thenable.reason; - default: - switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then( - function(fulfilledValue) { - "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue); - }, - function(error) { - "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error); - } - )), thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw thenable.reason; - } - } - throw thenable; - } - function mapIntoArray(children2, array2, escapedPrefix, nameSoFar, callback) { - var type2 = typeof children2; - if ("undefined" === type2 || "boolean" === type2) children2 = null; - var invokeCallback = false; - if (null === children2) invokeCallback = true; - else - switch (type2) { - case "bigint": - case "string": - case "number": - invokeCallback = true; - break; - case "object": - switch (children2.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - invokeCallback = true; - break; - case REACT_LAZY_TYPE: - return invokeCallback = children2._init, mapIntoArray( - invokeCallback(children2._payload), - array2, - escapedPrefix, - nameSoFar, - callback - ); - } - } - if (invokeCallback) - return callback = callback(children2), invokeCallback = "" === nameSoFar ? "." + getElementKey(children2, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array2, escapedPrefix, "", function(c) { - return c; - })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey( - callback, - escapedPrefix + (null == callback.key || children2 && children2.key === callback.key ? "" : ("" + callback.key).replace( - userProvidedKeyEscapeRegex, - "$&/" - ) + "/") + invokeCallback - )), array2.push(callback)), 1; - invokeCallback = 0; - var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":"; - if (isArrayImpl(children2)) - for (var i = 0; i < children2.length; i++) - nameSoFar = children2[i], type2 = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray( - nameSoFar, - array2, - escapedPrefix, - type2, - callback - ); - else if (i = getIteratorFn(children2), "function" === typeof i) - for (children2 = i.call(children2), i = 0; !(nameSoFar = children2.next()).done; ) - nameSoFar = nameSoFar.value, type2 = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray( - nameSoFar, - array2, - escapedPrefix, - type2, - callback - ); - else if ("object" === type2) { - if ("function" === typeof children2.then) - return mapIntoArray( - resolveThenable(children2), - array2, - escapedPrefix, - nameSoFar, - callback - ); - array2 = String(children2); - throw Error( - "Objects are not valid as a React child (found: " + ("[object Object]" === array2 ? "object with keys {" + Object.keys(children2).join(", ") + "}" : array2) + "). If you meant to render a collection of children, use an array instead." - ); - } - return invokeCallback; - } - function mapChildren(children2, func, context) { - if (null == children2) return children2; - var result = [], count = 0; - mapIntoArray(children2, result, "", "", function(child) { - return func.call(context, child, count++); - }); - return result; - } - function lazyInitializer(payload) { - if (-1 === payload._status) { - var ctor = payload._result; - ctor = ctor(); - ctor.then( - function(moduleObject) { - if (0 === payload._status || -1 === payload._status) - payload._status = 1, payload._result = moduleObject; - }, - function(error) { - if (0 === payload._status || -1 === payload._status) - payload._status = 2, payload._result = error; - } - ); - -1 === payload._status && (payload._status = 0, payload._result = ctor); - } - if (1 === payload._status) return payload._result.default; - throw payload._result; - } - var reportGlobalError = "function" === typeof reportError ? reportError : function(error) { - if ("object" === typeof window && "function" === typeof window.ErrorEvent) { - var event = new window.ErrorEvent("error", { - bubbles: true, - cancelable: true, - message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error), - error - }); - if (!window.dispatchEvent(event)) return; - } else if ("object" === typeof process && "function" === typeof process.emit) { - process.emit("uncaughtException", error); - return; - } - console.error(error); - }; - function noop2() { - } - exports.Children = { - map: mapChildren, - forEach: function(children2, forEachFunc, forEachContext) { - mapChildren( - children2, - function() { - forEachFunc.apply(this, arguments); - }, - forEachContext - ); - }, - count: function(children2) { - var n = 0; - mapChildren(children2, function() { - n++; - }); - return n; - }, - toArray: function(children2) { - return mapChildren(children2, function(child) { - return child; - }) || []; - }, - only: function(children2) { - if (!isValidElement(children2)) - throw Error( - "React.Children.only expected to receive a single React element child." - ); - return children2; - } - }; - exports.Component = Component; - exports.Fragment = REACT_FRAGMENT_TYPE; - exports.Profiler = REACT_PROFILER_TYPE; - exports.PureComponent = PureComponent; - exports.StrictMode = REACT_STRICT_MODE_TYPE; - exports.Suspense = REACT_SUSPENSE_TYPE; - exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; - exports.__COMPILER_RUNTIME = { - __proto__: null, - c: function(size) { - return ReactSharedInternals.H.useMemoCache(size); - } - }; - exports.cache = function(fn) { - return function() { - return fn.apply(null, arguments); - }; - }; - exports.cloneElement = function(element, config, children2) { - if (null === element || void 0 === element) - throw Error( - "The argument must be a React element, but you passed " + element + "." - ); - var props = assign({}, element.props), key = element.key, owner = void 0; - if (null != config) - for (propName in void 0 !== config.ref && (owner = void 0), void 0 !== config.key && (key = "" + config.key), config) - !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]); - var propName = arguments.length - 2; - if (1 === propName) props.children = children2; - else if (1 < propName) { - for (var childArray = Array(propName), i = 0; i < propName; i++) - childArray[i] = arguments[i + 2]; - props.children = childArray; - } - return ReactElement(element.type, key, void 0, void 0, owner, props); - }; - exports.createContext = function(defaultValue) { - defaultValue = { - $$typeof: REACT_CONTEXT_TYPE, - _currentValue: defaultValue, - _currentValue2: defaultValue, - _threadCount: 0, - Provider: null, - Consumer: null - }; - defaultValue.Provider = defaultValue; - defaultValue.Consumer = { - $$typeof: REACT_CONSUMER_TYPE, - _context: defaultValue - }; - return defaultValue; - }; - exports.createElement = function(type2, config, children2) { - var propName, props = {}, key = null; - if (null != config) - for (propName in void 0 !== config.key && (key = "" + config.key), config) - hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]); - var childrenLength = arguments.length - 2; - if (1 === childrenLength) props.children = children2; - else if (1 < childrenLength) { - for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) - childArray[i] = arguments[i + 2]; - props.children = childArray; - } - if (type2 && type2.defaultProps) - for (propName in childrenLength = type2.defaultProps, childrenLength) - void 0 === props[propName] && (props[propName] = childrenLength[propName]); - return ReactElement(type2, key, void 0, void 0, null, props); - }; - exports.createRef = function() { - return { current: null }; - }; - exports.forwardRef = function(render) { - return { $$typeof: REACT_FORWARD_REF_TYPE, render }; - }; - exports.isValidElement = isValidElement; - exports.lazy = function(ctor) { - return { - $$typeof: REACT_LAZY_TYPE, - _payload: { _status: -1, _result: ctor }, - _init: lazyInitializer - }; - }; - exports.memo = function(type2, compare) { - return { - $$typeof: REACT_MEMO_TYPE, - type: type2, - compare: void 0 === compare ? null : compare - }; - }; - exports.startTransition = function(scope) { - var prevTransition = ReactSharedInternals.T, currentTransition = {}; - ReactSharedInternals.T = currentTransition; - try { - var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); - "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop2, reportGlobalError); - } catch (error) { - reportGlobalError(error); - } finally { - ReactSharedInternals.T = prevTransition; - } - }; - exports.unstable_useCacheRefresh = function() { - return ReactSharedInternals.H.useCacheRefresh(); - }; - exports.use = function(usable) { - return ReactSharedInternals.H.use(usable); - }; - exports.useActionState = function(action, initialState, permalink) { - return ReactSharedInternals.H.useActionState(action, initialState, permalink); - }; - exports.useCallback = function(callback, deps) { - return ReactSharedInternals.H.useCallback(callback, deps); - }; - exports.useContext = function(Context) { - return ReactSharedInternals.H.useContext(Context); - }; - exports.useDebugValue = function() { - }; - exports.useDeferredValue = function(value2, initialValue) { - return ReactSharedInternals.H.useDeferredValue(value2, initialValue); - }; - exports.useEffect = function(create2, createDeps, update) { - var dispatcher = ReactSharedInternals.H; - if ("function" === typeof update) - throw Error( - "useEffect CRUD overload is not enabled in this build of React." - ); - return dispatcher.useEffect(create2, createDeps); - }; - exports.useId = function() { - return ReactSharedInternals.H.useId(); - }; - exports.useImperativeHandle = function(ref, create2, deps) { - return ReactSharedInternals.H.useImperativeHandle(ref, create2, deps); - }; - exports.useInsertionEffect = function(create2, deps) { - return ReactSharedInternals.H.useInsertionEffect(create2, deps); - }; - exports.useLayoutEffect = function(create2, deps) { - return ReactSharedInternals.H.useLayoutEffect(create2, deps); - }; - exports.useMemo = function(create2, deps) { - return ReactSharedInternals.H.useMemo(create2, deps); - }; - exports.useOptimistic = function(passthrough, reducer) { - return ReactSharedInternals.H.useOptimistic(passthrough, reducer); - }; - exports.useReducer = function(reducer, initialArg, init2) { - return ReactSharedInternals.H.useReducer(reducer, initialArg, init2); - }; - exports.useRef = function(initialValue) { - return ReactSharedInternals.H.useRef(initialValue); - }; - exports.useState = function(initialState) { - return ReactSharedInternals.H.useState(initialState); - }; - exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) { - return ReactSharedInternals.H.useSyncExternalStore( - subscribe, - getSnapshot, - getServerSnapshot - ); - }; - exports.useTransition = function() { - return ReactSharedInternals.H.useTransition(); - }; - exports.version = "19.1.0"; - } -}); - -// node_modules/.deno/react@19.1.0/node_modules/react/index.js -var require_react = __commonJS({ - "node_modules/.deno/react@19.1.0/node_modules/react/index.js"(exports, module) { - "use strict"; - if (true) { - module.exports = require_react_production(); - } else { - module.exports = null; - } - } -}); - -// node_modules/.deno/scheduler@0.26.0/node_modules/scheduler/cjs/scheduler.production.js -var require_scheduler_production = __commonJS({ - "node_modules/.deno/scheduler@0.26.0/node_modules/scheduler/cjs/scheduler.production.js"(exports) { - "use strict"; - function push(heap, node) { - var index = heap.length; - heap.push(node); - a: for (; 0 < index; ) { - var parentIndex = index - 1 >>> 1, parent = heap[parentIndex]; - if (0 < compare(parent, node)) - heap[parentIndex] = node, heap[index] = parent, index = parentIndex; - else break a; - } - } - function peek(heap) { - return 0 === heap.length ? null : heap[0]; - } - function pop(heap) { - if (0 === heap.length) return null; - var first = heap[0], last = heap.pop(); - if (last !== first) { - heap[0] = last; - a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) { - var leftIndex = 2 * (index + 1) - 1, left2 = heap[leftIndex], rightIndex = leftIndex + 1, right2 = heap[rightIndex]; - if (0 > compare(left2, last)) - rightIndex < length && 0 > compare(right2, left2) ? (heap[index] = right2, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left2, heap[leftIndex] = last, index = leftIndex); - else if (rightIndex < length && 0 > compare(right2, last)) - heap[index] = right2, heap[rightIndex] = last, index = rightIndex; - else break a; - } - } - return first; - } - function compare(a, b) { - var diff = a.sortIndex - b.sortIndex; - return 0 !== diff ? diff : a.id - b.id; - } - exports.unstable_now = void 0; - if ("object" === typeof performance && "function" === typeof performance.now) { - localPerformance = performance; - exports.unstable_now = function() { - return localPerformance.now(); - }; - } else { - localDate = Date, initialTime = localDate.now(); - exports.unstable_now = function() { - return localDate.now() - initialTime; - }; - } - var localPerformance; - var localDate; - var initialTime; - var taskQueue = []; - var timerQueue = []; - var taskIdCounter = 1; - var currentTask = null; - var currentPriorityLevel = 3; - var isPerformingWork = false; - var isHostCallbackScheduled = false; - var isHostTimeoutScheduled = false; - var needsPaint = false; - var localSetTimeout = "function" === typeof setTimeout ? setTimeout : null; - var localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null; - var localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null; - function advanceTimers(currentTime) { - for (var timer2 = peek(timerQueue); null !== timer2; ) { - if (null === timer2.callback) pop(timerQueue); - else if (timer2.startTime <= currentTime) - pop(timerQueue), timer2.sortIndex = timer2.expirationTime, push(taskQueue, timer2); - else break; - timer2 = peek(timerQueue); - } - } - function handleTimeout(currentTime) { - isHostTimeoutScheduled = false; - advanceTimers(currentTime); - if (!isHostCallbackScheduled) - if (null !== peek(taskQueue)) - isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline()); - else { - var firstTimer = peek(timerQueue); - null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - } - var isMessageLoopRunning = false; - var taskTimeoutID = -1; - var frameInterval = 5; - var startTime = -1; - function shouldYieldToHost() { - return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true; - } - function performWorkUntilDeadline() { - needsPaint = false; - if (isMessageLoopRunning) { - var currentTime = exports.unstable_now(); - startTime = currentTime; - var hasMoreWork = true; - try { - a: { - isHostCallbackScheduled = false; - isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1); - isPerformingWork = true; - var previousPriorityLevel = currentPriorityLevel; - try { - b: { - advanceTimers(currentTime); - for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) { - var callback = currentTask.callback; - if ("function" === typeof callback) { - currentTask.callback = null; - currentPriorityLevel = currentTask.priorityLevel; - var continuationCallback = callback( - currentTask.expirationTime <= currentTime - ); - currentTime = exports.unstable_now(); - if ("function" === typeof continuationCallback) { - currentTask.callback = continuationCallback; - advanceTimers(currentTime); - hasMoreWork = true; - break b; - } - currentTask === peek(taskQueue) && pop(taskQueue); - advanceTimers(currentTime); - } else pop(taskQueue); - currentTask = peek(taskQueue); - } - if (null !== currentTask) hasMoreWork = true; - else { - var firstTimer = peek(timerQueue); - null !== firstTimer && requestHostTimeout( - handleTimeout, - firstTimer.startTime - currentTime - ); - hasMoreWork = false; - } - } - break a; - } finally { - currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false; - } - hasMoreWork = void 0; - } - } finally { - hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false; - } - } - } - var schedulePerformWorkUntilDeadline; - if ("function" === typeof localSetImmediate) - schedulePerformWorkUntilDeadline = function() { - localSetImmediate(performWorkUntilDeadline); - }; - else if ("undefined" !== typeof MessageChannel) { - channel = new MessageChannel(), port = channel.port2; - channel.port1.onmessage = performWorkUntilDeadline; - schedulePerformWorkUntilDeadline = function() { - port.postMessage(null); - }; - } else - schedulePerformWorkUntilDeadline = function() { - localSetTimeout(performWorkUntilDeadline, 0); - }; - var channel; - var port; - function requestHostTimeout(callback, ms) { - taskTimeoutID = localSetTimeout(function() { - callback(exports.unstable_now()); - }, ms); - } - exports.unstable_IdlePriority = 5; - exports.unstable_ImmediatePriority = 1; - exports.unstable_LowPriority = 4; - exports.unstable_NormalPriority = 3; - exports.unstable_Profiling = null; - exports.unstable_UserBlockingPriority = 2; - exports.unstable_cancelCallback = function(task) { - task.callback = null; - }; - exports.unstable_forceFrameRate = function(fps) { - 0 > fps || 125 < fps ? console.error( - "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" - ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5; - }; - exports.unstable_getCurrentPriorityLevel = function() { - return currentPriorityLevel; - }; - exports.unstable_next = function(eventHandler) { - switch (currentPriorityLevel) { - case 1: - case 2: - case 3: - var priorityLevel = 3; - break; - default: - priorityLevel = currentPriorityLevel; - } - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - }; - exports.unstable_requestPaint = function() { - needsPaint = true; - }; - exports.unstable_runWithPriority = function(priorityLevel, eventHandler) { - switch (priorityLevel) { - case 1: - case 2: - case 3: - case 4: - case 5: - break; - default: - priorityLevel = 3; - } - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - }; - exports.unstable_scheduleCallback = function(priorityLevel, callback, options) { - var currentTime = exports.unstable_now(); - "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime; - switch (priorityLevel) { - case 1: - var timeout2 = -1; - break; - case 2: - timeout2 = 250; - break; - case 5: - timeout2 = 1073741823; - break; - case 4: - timeout2 = 1e4; - break; - default: - timeout2 = 5e3; - } - timeout2 = options + timeout2; - priorityLevel = { - id: taskIdCounter++, - callback, - priorityLevel, - startTime: options, - expirationTime: timeout2, - sortIndex: -1 - }; - options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout2, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline()))); - return priorityLevel; - }; - exports.unstable_shouldYield = shouldYieldToHost; - exports.unstable_wrapCallback = function(callback) { - var parentPriorityLevel = currentPriorityLevel; - return function() { - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = parentPriorityLevel; - try { - return callback.apply(this, arguments); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - }; - }; - } -}); - -// node_modules/.deno/scheduler@0.26.0/node_modules/scheduler/index.js -var require_scheduler = __commonJS({ - "node_modules/.deno/scheduler@0.26.0/node_modules/scheduler/index.js"(exports, module) { - "use strict"; - if (true) { - module.exports = require_scheduler_production(); - } else { - module.exports = null; - } - } -}); - -// node_modules/.deno/react-dom@19.1.0/node_modules/react-dom/cjs/react-dom.production.js -var require_react_dom_production = __commonJS({ - "node_modules/.deno/react-dom@19.1.0/node_modules/react-dom/cjs/react-dom.production.js"(exports) { - "use strict"; - var React2 = require_react(); - function formatProdErrorMessage(code) { - var url2 = "https://react.dev/errors/" + code; - if (1 < arguments.length) { - url2 += "?args[]=" + encodeURIComponent(arguments[1]); - for (var i = 2; i < arguments.length; i++) - url2 += "&args[]=" + encodeURIComponent(arguments[i]); - } - return "Minified React error #" + code + "; visit " + url2 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; - } - function noop2() { - } - var Internals = { - d: { - f: noop2, - r: function() { - throw Error(formatProdErrorMessage(522)); - }, - D: noop2, - C: noop2, - L: noop2, - m: noop2, - X: noop2, - S: noop2, - M: noop2 - }, - p: 0, - findDOMNode: null - }; - var REACT_PORTAL_TYPE = Symbol.for("react.portal"); - function createPortal$1(children2, containerInfo, implementation) { - var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null; - return { - $$typeof: REACT_PORTAL_TYPE, - key: null == key ? null : "" + key, - children: children2, - containerInfo, - implementation - }; - } - var ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; - function getCrossOriginStringAs(as, input) { - if ("font" === as) return ""; - if ("string" === typeof input) - return "use-credentials" === input ? input : ""; - } - exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals; - exports.createPortal = function(children2, container) { - var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; - if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType) - throw Error(formatProdErrorMessage(299)); - return createPortal$1(children2, container, null, key); - }; - exports.flushSync = function(fn) { - var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p; - try { - if (ReactSharedInternals.T = null, Internals.p = 2, fn) return fn(); - } finally { - ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f(); - } - }; - exports.preconnect = function(href, options) { - "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options)); - }; - exports.prefetchDNS = function(href) { - "string" === typeof href && Internals.d.D(href); - }; - exports.preinit = function(href, options) { - if ("string" === typeof href && options && "string" === typeof options.as) { - var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0; - "style" === as ? Internals.d.S( - href, - "string" === typeof options.precedence ? options.precedence : void 0, - { - crossOrigin, - integrity, - fetchPriority - } - ) : "script" === as && Internals.d.X(href, { - crossOrigin, - integrity, - fetchPriority, - nonce: "string" === typeof options.nonce ? options.nonce : void 0 - }); - } - }; - exports.preinitModule = function(href, options) { - if ("string" === typeof href) - if ("object" === typeof options && null !== options) { - if (null == options.as || "script" === options.as) { - var crossOrigin = getCrossOriginStringAs( - options.as, - options.crossOrigin - ); - Internals.d.M(href, { - crossOrigin, - integrity: "string" === typeof options.integrity ? options.integrity : void 0, - nonce: "string" === typeof options.nonce ? options.nonce : void 0 - }); - } - } else null == options && Internals.d.M(href); - }; - exports.preload = function(href, options) { - if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) { - var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin); - Internals.d.L(href, as, { - crossOrigin, - integrity: "string" === typeof options.integrity ? options.integrity : void 0, - nonce: "string" === typeof options.nonce ? options.nonce : void 0, - type: "string" === typeof options.type ? options.type : void 0, - fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0, - referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0, - imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0, - imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0, - media: "string" === typeof options.media ? options.media : void 0 - }); - } - }; - exports.preloadModule = function(href, options) { - if ("string" === typeof href) - if (options) { - var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin); - Internals.d.m(href, { - as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0, - crossOrigin, - integrity: "string" === typeof options.integrity ? options.integrity : void 0 - }); - } else Internals.d.m(href); - }; - exports.requestFormReset = function(form) { - Internals.d.r(form); - }; - exports.unstable_batchedUpdates = function(fn, a) { - return fn(a); - }; - exports.useFormState = function(action, initialState, permalink) { - return ReactSharedInternals.H.useFormState(action, initialState, permalink); - }; - exports.useFormStatus = function() { - return ReactSharedInternals.H.useHostTransitionStatus(); - }; - exports.version = "19.1.0"; - } -}); - -// node_modules/.deno/react-dom@19.1.0/node_modules/react-dom/index.js -var require_react_dom = __commonJS({ - "node_modules/.deno/react-dom@19.1.0/node_modules/react-dom/index.js"(exports, module) { - "use strict"; - function checkDCE() { - if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") { - return; - } - if (false) { - throw new Error("^_^"); - } - try { - __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); - } catch (err) { - console.error(err); - } - } - if (true) { - checkDCE(); - module.exports = require_react_dom_production(); - } else { - module.exports = null; - } - } -}); - -// node_modules/.deno/react-dom@19.1.0/node_modules/react-dom/cjs/react-dom-client.production.js -var require_react_dom_client_production = __commonJS({ - "node_modules/.deno/react-dom@19.1.0/node_modules/react-dom/cjs/react-dom-client.production.js"(exports) { - "use strict"; - var Scheduler = require_scheduler(); - var React2 = require_react(); - var ReactDOM = require_react_dom(); - function formatProdErrorMessage(code) { - var url2 = "https://react.dev/errors/" + code; - if (1 < arguments.length) { - url2 += "?args[]=" + encodeURIComponent(arguments[1]); - for (var i = 2; i < arguments.length; i++) - url2 += "&args[]=" + encodeURIComponent(arguments[i]); - } - return "Minified React error #" + code + "; visit " + url2 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; - } - function isValidContainer(node) { - return !(!node || 1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType); - } - function getNearestMountedFiber(fiber) { - var node = fiber, nearestMounted = fiber; - if (fiber.alternate) for (; node.return; ) node = node.return; - else { - fiber = node; - do - node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return; - while (fiber); - } - return 3 === node.tag ? nearestMounted : null; - } - function getSuspenseInstanceFromFiber(fiber) { - if (13 === fiber.tag) { - var suspenseState = fiber.memoizedState; - null === suspenseState && (fiber = fiber.alternate, null !== fiber && (suspenseState = fiber.memoizedState)); - if (null !== suspenseState) return suspenseState.dehydrated; - } - return null; - } - function assertIsMounted(fiber) { - if (getNearestMountedFiber(fiber) !== fiber) - throw Error(formatProdErrorMessage(188)); - } - function findCurrentFiberUsingSlowPath(fiber) { - var alternate = fiber.alternate; - if (!alternate) { - alternate = getNearestMountedFiber(fiber); - if (null === alternate) throw Error(formatProdErrorMessage(188)); - return alternate !== fiber ? null : fiber; - } - for (var a = fiber, b = alternate; ; ) { - var parentA = a.return; - if (null === parentA) break; - var parentB = parentA.alternate; - if (null === parentB) { - b = parentA.return; - if (null !== b) { - a = b; - continue; - } - break; - } - if (parentA.child === parentB.child) { - for (parentB = parentA.child; parentB; ) { - if (parentB === a) return assertIsMounted(parentA), fiber; - if (parentB === b) return assertIsMounted(parentA), alternate; - parentB = parentB.sibling; - } - throw Error(formatProdErrorMessage(188)); - } - if (a.return !== b.return) a = parentA, b = parentB; - else { - for (var didFindChild = false, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { - didFindChild = true; - a = parentA; - b = parentB; - break; - } - if (child$0 === b) { - didFindChild = true; - b = parentA; - a = parentB; - break; - } - child$0 = child$0.sibling; - } - if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { - didFindChild = true; - a = parentB; - b = parentA; - break; - } - if (child$0 === b) { - didFindChild = true; - b = parentB; - a = parentA; - break; - } - child$0 = child$0.sibling; - } - if (!didFindChild) throw Error(formatProdErrorMessage(189)); - } - } - if (a.alternate !== b) throw Error(formatProdErrorMessage(190)); - } - if (3 !== a.tag) throw Error(formatProdErrorMessage(188)); - return a.stateNode.current === a ? fiber : alternate; - } - function findCurrentHostFiberImpl(node) { - var tag = node.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node; - for (node = node.child; null !== node; ) { - tag = findCurrentHostFiberImpl(node); - if (null !== tag) return tag; - node = node.sibling; - } - return null; - } - var assign = Object.assign; - var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"); - var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"); - var REACT_PORTAL_TYPE = Symbol.for("react.portal"); - var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); - var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); - var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); - var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); - var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"); - var REACT_CONTEXT_TYPE = Symbol.for("react.context"); - var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); - var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); - var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); - var REACT_MEMO_TYPE = Symbol.for("react.memo"); - var REACT_LAZY_TYPE = Symbol.for("react.lazy"); - Symbol.for("react.scope"); - var REACT_ACTIVITY_TYPE = Symbol.for("react.activity"); - Symbol.for("react.legacy_hidden"); - Symbol.for("react.tracing_marker"); - var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"); - Symbol.for("react.view_transition"); - var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; - function getIteratorFn(maybeIterable) { - if (null === maybeIterable || "object" !== typeof maybeIterable) return null; - maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; - return "function" === typeof maybeIterable ? maybeIterable : null; - } - var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); - function getComponentNameFromType(type2) { - if (null == type2) return null; - if ("function" === typeof type2) - return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null; - if ("string" === typeof type2) return type2; - switch (type2) { - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - case REACT_ACTIVITY_TYPE: - return "Activity"; - } - if ("object" === typeof type2) - switch (type2.$$typeof) { - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_CONTEXT_TYPE: - return (type2.displayName || "Context") + ".Provider"; - case REACT_CONSUMER_TYPE: - return (type2._context.displayName || "Context") + ".Consumer"; - case REACT_FORWARD_REF_TYPE: - var innerType = type2.render; - type2 = type2.displayName; - type2 || (type2 = innerType.displayName || innerType.name || "", type2 = "" !== type2 ? "ForwardRef(" + type2 + ")" : "ForwardRef"); - return type2; - case REACT_MEMO_TYPE: - return innerType = type2.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type2.type) || "Memo"; - case REACT_LAZY_TYPE: - innerType = type2._payload; - type2 = type2._init; - try { - return getComponentNameFromType(type2(innerType)); - } catch (x2) { - } - } - return null; - } - var isArrayImpl = Array.isArray; - var ReactSharedInternals = React2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; - var ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; - var sharedNotPendingObject = { - pending: false, - data: null, - method: null, - action: null - }; - var valueStack = []; - var index = -1; - function createCursor(defaultValue) { - return { current: defaultValue }; - } - function pop(cursor) { - 0 > index || (cursor.current = valueStack[index], valueStack[index] = null, index--); - } - function push(cursor, value2) { - index++; - valueStack[index] = cursor.current; - cursor.current = value2; - } - var contextStackCursor = createCursor(null); - var contextFiberStackCursor = createCursor(null); - var rootInstanceStackCursor = createCursor(null); - var hostTransitionProviderCursor = createCursor(null); - function pushHostContainer(fiber, nextRootInstance) { - push(rootInstanceStackCursor, nextRootInstance); - push(contextFiberStackCursor, fiber); - push(contextStackCursor, null); - switch (nextRootInstance.nodeType) { - case 9: - case 11: - fiber = (fiber = nextRootInstance.documentElement) ? (fiber = fiber.namespaceURI) ? getOwnHostContext(fiber) : 0 : 0; - break; - default: - if (fiber = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI) - nextRootInstance = getOwnHostContext(nextRootInstance), fiber = getChildHostContextProd(nextRootInstance, fiber); - else - switch (fiber) { - case "svg": - fiber = 1; - break; - case "math": - fiber = 2; - break; - default: - fiber = 0; - } - } - pop(contextStackCursor); - push(contextStackCursor, fiber); - } - function popHostContainer() { - pop(contextStackCursor); - pop(contextFiberStackCursor); - pop(rootInstanceStackCursor); - } - function pushHostContext(fiber) { - null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber); - var context = contextStackCursor.current; - var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type); - context !== JSCompiler_inline_result && (push(contextFiberStackCursor, fiber), push(contextStackCursor, JSCompiler_inline_result)); - } - function popHostContext(fiber) { - contextFiberStackCursor.current === fiber && (pop(contextStackCursor), pop(contextFiberStackCursor)); - hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor), HostTransitionContext._currentValue = sharedNotPendingObject); - } - var hasOwnProperty = Object.prototype.hasOwnProperty; - var scheduleCallback$3 = Scheduler.unstable_scheduleCallback; - var cancelCallback$1 = Scheduler.unstable_cancelCallback; - var shouldYield = Scheduler.unstable_shouldYield; - var requestPaint = Scheduler.unstable_requestPaint; - var now2 = Scheduler.unstable_now; - var getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel; - var ImmediatePriority = Scheduler.unstable_ImmediatePriority; - var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; - var NormalPriority$1 = Scheduler.unstable_NormalPriority; - var LowPriority = Scheduler.unstable_LowPriority; - var IdlePriority = Scheduler.unstable_IdlePriority; - var log$1 = Scheduler.log; - var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue; - var rendererID = null; - var injectedHook = null; - function setIsStrictModeForDevtools(newIsStrictMode) { - "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode); - if (injectedHook && "function" === typeof injectedHook.setStrictMode) - try { - injectedHook.setStrictMode(rendererID, newIsStrictMode); - } catch (err) { - } - } - var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; - var log = Math.log; - var LN2 = Math.LN2; - function clz32Fallback(x2) { - x2 >>>= 0; - return 0 === x2 ? 32 : 31 - (log(x2) / LN2 | 0) | 0; - } - var nextTransitionLane = 256; - var nextRetryLane = 4194304; - function getHighestPriorityLanes(lanes) { - var pendingSyncLanes = lanes & 42; - if (0 !== pendingSyncLanes) return pendingSyncLanes; - switch (lanes & -lanes) { - 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: - case 262144: - case 524288: - case 1048576: - case 2097152: - return lanes & 4194048; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return lanes & 62914560; - case 67108864: - return 67108864; - case 134217728: - return 134217728; - case 268435456: - return 268435456; - case 536870912: - return 536870912; - case 1073741824: - return 0; - default: - return lanes; - } - } - function getNextLanes(root3, wipLanes, rootHasPendingCommit) { - var pendingLanes = root3.pendingLanes; - if (0 === pendingLanes) return 0; - var nextLanes = 0, suspendedLanes = root3.suspendedLanes, pingedLanes = root3.pingedLanes; - root3 = root3.warmLanes; - var nonIdlePendingLanes = pendingLanes & 134217727; - 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root3, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root3, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); - return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes; - } - function checkIfRootIsPrerendering(root3, renderLanes2) { - return 0 === (root3.pendingLanes & ~(root3.suspendedLanes & ~root3.pingedLanes) & renderLanes2); - } - function computeExpirationTime(lane, currentTime) { - switch (lane) { - case 1: - case 2: - case 4: - case 8: - case 64: - return currentTime + 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 currentTime + 5e3; - case 4194304: - case 8388608: - case 16777216: - case 33554432: - return -1; - case 67108864: - case 134217728: - case 268435456: - case 536870912: - case 1073741824: - return -1; - default: - return -1; - } - } - function claimNextTransitionLane() { - var lane = nextTransitionLane; - nextTransitionLane <<= 1; - 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256); - return lane; - } - function claimNextRetryLane() { - var lane = nextRetryLane; - nextRetryLane <<= 1; - 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); - return lane; - } - function createLaneMap(initial) { - for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); - return laneMap; - } - function markRootUpdated$1(root3, updateLane) { - root3.pendingLanes |= updateLane; - 268435456 !== updateLane && (root3.suspendedLanes = 0, root3.pingedLanes = 0, root3.warmLanes = 0); - } - function markRootFinished(root3, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) { - var previouslyPendingLanes = root3.pendingLanes; - root3.pendingLanes = remainingLanes; - root3.suspendedLanes = 0; - root3.pingedLanes = 0; - root3.warmLanes = 0; - root3.expiredLanes &= remainingLanes; - root3.entangledLanes &= remainingLanes; - root3.errorRecoveryDisabledLanes &= remainingLanes; - root3.shellSuspendCounter = 0; - var entanglements = root3.entanglements, expirationTimes = root3.expirationTimes, hiddenUpdates = root3.hiddenUpdates; - for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$5 = 31 - clz32(remainingLanes), lane = 1 << index$5; - entanglements[index$5] = 0; - expirationTimes[index$5] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$5]; - if (null !== hiddenUpdatesForLane) - for (hiddenUpdates[index$5] = null, index$5 = 0; index$5 < hiddenUpdatesForLane.length; index$5++) { - var update = hiddenUpdatesForLane[index$5]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; - } - 0 !== spawnedLane && markSpawnedDeferredLane(root3, spawnedLane, 0); - 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root3.tag && (root3.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); - } - function markSpawnedDeferredLane(root3, spawnedLane, entangledLanes) { - root3.pendingLanes |= spawnedLane; - root3.suspendedLanes &= ~spawnedLane; - var spawnedLaneIndex = 31 - clz32(spawnedLane); - root3.entangledLanes |= spawnedLane; - root3.entanglements[spawnedLaneIndex] = root3.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 4194090; - } - function markRootEntangled(root3, entangledLanes) { - var rootEntangledLanes = root3.entangledLanes |= entangledLanes; - for (root3 = root3.entanglements; rootEntangledLanes; ) { - var index$6 = 31 - clz32(rootEntangledLanes), lane = 1 << index$6; - lane & entangledLanes | root3[index$6] & entangledLanes && (root3[index$6] |= entangledLanes); - rootEntangledLanes &= ~lane; - } - } - function getBumpedLaneForHydrationByLane(lane) { - switch (lane) { - case 2: - lane = 1; - break; - case 8: - lane = 4; - break; - case 32: - lane = 16; - break; - 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: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - lane = 128; - break; - case 268435456: - lane = 134217728; - break; - default: - lane = 0; - } - return lane; - } - function lanesToEventPriority(lanes) { - lanes &= -lanes; - return 2 < lanes ? 8 < lanes ? 0 !== (lanes & 134217727) ? 32 : 268435456 : 8 : 2; - } - function resolveUpdatePriority() { - var updatePriority = ReactDOMSharedInternals.p; - if (0 !== updatePriority) return updatePriority; - updatePriority = window.event; - return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type); - } - function runWithPriority(priority, fn) { - var previousPriority = ReactDOMSharedInternals.p; - try { - return ReactDOMSharedInternals.p = priority, fn(); - } finally { - ReactDOMSharedInternals.p = previousPriority; - } - } - var randomKey = Math.random().toString(36).slice(2); - var internalInstanceKey = "__reactFiber$" + randomKey; - var internalPropsKey = "__reactProps$" + randomKey; - var internalContainerInstanceKey = "__reactContainer$" + randomKey; - var internalEventHandlersKey = "__reactEvents$" + randomKey; - var internalEventHandlerListenersKey = "__reactListeners$" + randomKey; - var internalEventHandlesSetKey = "__reactHandles$" + randomKey; - var internalRootNodeResourcesKey = "__reactResources$" + randomKey; - var internalHoistableMarker = "__reactMarker$" + randomKey; - function detachDeletedInstance(node) { - delete node[internalInstanceKey]; - delete node[internalPropsKey]; - delete node[internalEventHandlersKey]; - delete node[internalEventHandlerListenersKey]; - delete node[internalEventHandlesSetKey]; - } - function getClosestInstanceFromNode(targetNode) { - var targetInst = targetNode[internalInstanceKey]; - if (targetInst) return targetInst; - for (var parentNode = targetNode.parentNode; parentNode; ) { - if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) { - parentNode = targetInst.alternate; - if (null !== targetInst.child || null !== parentNode && null !== parentNode.child) - for (targetNode = getParentSuspenseInstance(targetNode); null !== targetNode; ) { - if (parentNode = targetNode[internalInstanceKey]) return parentNode; - targetNode = getParentSuspenseInstance(targetNode); - } - return targetInst; - } - targetNode = parentNode; - parentNode = targetNode.parentNode; - } - return null; - } - function getInstanceFromNode(node) { - if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) { - var tag = node.tag; - if (5 === tag || 6 === tag || 13 === tag || 26 === tag || 27 === tag || 3 === tag) - return node; - } - return null; - } - function getNodeFromInstance(inst) { - var tag = inst.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode; - throw Error(formatProdErrorMessage(33)); - } - function getResourcesFromRoot(root3) { - var resources = root3[internalRootNodeResourcesKey]; - resources || (resources = root3[internalRootNodeResourcesKey] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() }); - return resources; - } - function markNodeAsHoistable(node) { - node[internalHoistableMarker] = true; - } - var allNativeEvents = /* @__PURE__ */ new Set(); - var registrationNameDependencies = {}; - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + "Capture", dependencies); - } - function registerDirectEvent(registrationName, dependencies) { - registrationNameDependencies[registrationName] = dependencies; - for (registrationName = 0; registrationName < dependencies.length; registrationName++) - allNativeEvents.add(dependencies[registrationName]); - } - var VALID_ATTRIBUTE_NAME_REGEX = RegExp( - "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$" - ); - var illegalAttributeNameCache = {}; - var validatedAttributeNameCache = {}; - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) - return true; - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return false; - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) - return validatedAttributeNameCache[attributeName] = true; - illegalAttributeNameCache[attributeName] = true; - return false; - } - function setValueForAttribute(node, name, value2) { - if (isAttributeNameSafe(name)) - if (null === value2) node.removeAttribute(name); - else { - switch (typeof value2) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix$8 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$8 && "aria-" !== prefix$8) { - node.removeAttribute(name); - return; - } - } - node.setAttribute(name, "" + value2); - } - } - function setValueForKnownAttribute(node, name, value2) { - if (null === value2) node.removeAttribute(name); - else { - switch (typeof value2) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - node.setAttribute(name, "" + value2); - } - } - function setValueForNamespacedAttribute(node, namespace, name, value2) { - if (null === value2) node.removeAttribute(name); - else { - switch (typeof value2) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - node.setAttributeNS(namespace, name, "" + value2); - } - } - var prefix; - var suffix; - function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) - try { - throw Error(); - } catch (x2) { - var match = x2.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ""; - suffix = -1 < x2.stack.indexOf("\n at") ? " ()" : -1 < x2.stack.indexOf("@") ? "@unknown:0:0" : ""; - } - return "\n" + prefix + name + suffix; - } - var reentry = false; - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - try { - var RunInRootFrame = { - DetermineComponentFrameRoot: function() { - try { - if (construct) { - var Fake = function() { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function() { - throw Error(); - } - }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x2) { - var control = x2; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$9) { - control = x$9; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x$10) { - control = x$10; - } - (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() { - }); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) - return [sample.stack, control.stack]; - } - return [null, null]; - } - }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor( - RunInRootFrame.DetermineComponentFrameRoot, - "name" - ); - namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty( - RunInRootFrame.DetermineComponentFrameRoot, - "name", - { value: "DetermineComponentFrameRoot" } - ); - var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n"); - for (namePropDescriptor = RunInRootFrame = 0; RunInRootFrame < sampleLines.length && !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot"); ) - RunInRootFrame++; - for (; namePropDescriptor < controlLines.length && !controlLines[namePropDescriptor].includes( - "DetermineComponentFrameRoot" - ); ) - namePropDescriptor++; - if (RunInRootFrame === sampleLines.length || namePropDescriptor === controlLines.length) - for (RunInRootFrame = sampleLines.length - 1, namePropDescriptor = controlLines.length - 1; 1 <= RunInRootFrame && 0 <= namePropDescriptor && sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]; ) - namePropDescriptor--; - for (; 1 <= RunInRootFrame && 0 <= namePropDescriptor; RunInRootFrame--, namePropDescriptor--) - if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { - if (1 !== RunInRootFrame || 1 !== namePropDescriptor) { - do - if (RunInRootFrame--, namePropDescriptor--, 0 > namePropDescriptor || sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) { - var frame2 = "\n" + sampleLines[RunInRootFrame].replace(" at new ", " at "); - fn.displayName && frame2.includes("") && (frame2 = frame2.replace("", fn.displayName)); - return frame2; - } - while (1 <= RunInRootFrame && 0 <= namePropDescriptor); - } - break; - } - } - } finally { - reentry = false, Error.prepareStackTrace = previousPrepareStackTrace; - } - return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(previousPrepareStackTrace) : ""; - } - function describeFiber(fiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: - return describeBuiltInComponentFrame(fiber.type); - case 16: - return describeBuiltInComponentFrame("Lazy"); - case 13: - return describeBuiltInComponentFrame("Suspense"); - case 19: - return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: - return describeNativeComponentFrame(fiber.type, false); - case 11: - return describeNativeComponentFrame(fiber.type.render, false); - case 1: - return describeNativeComponentFrame(fiber.type, true); - case 31: - return describeBuiltInComponentFrame("Activity"); - default: - return ""; - } - } - function getStackByFiberInDevAndProd(workInProgress2) { - try { - var info = ""; - do - info += describeFiber(workInProgress2), workInProgress2 = workInProgress2.return; - while (workInProgress2); - return info; - } catch (x2) { - return "\nError generating stack: " + x2.message + "\n" + x2.stack; - } - } - function getToStringValue(value2) { - switch (typeof value2) { - case "bigint": - case "boolean": - case "number": - case "string": - case "undefined": - return value2; - case "object": - return value2; - default: - return ""; - } - } - function isCheckable(elem) { - var type2 = elem.type; - return (elem = elem.nodeName) && "input" === elem.toLowerCase() && ("checkbox" === type2 || "radio" === type2); - } - function trackValueOnNode(node) { - var valueField = isCheckable(node) ? "checked" : "value", descriptor = Object.getOwnPropertyDescriptor( - node.constructor.prototype, - valueField - ), currentValue = "" + node[valueField]; - if (!node.hasOwnProperty(valueField) && "undefined" !== typeof descriptor && "function" === typeof descriptor.get && "function" === typeof descriptor.set) { - var get3 = descriptor.get, set3 = descriptor.set; - Object.defineProperty(node, valueField, { - configurable: true, - get: function() { - return get3.call(this); - }, - set: function(value2) { - currentValue = "" + value2; - set3.call(this, value2); - } - }); - Object.defineProperty(node, valueField, { - enumerable: descriptor.enumerable - }); - return { - getValue: function() { - return currentValue; - }, - setValue: function(value2) { - currentValue = "" + value2; - }, - stopTracking: function() { - node._valueTracker = null; - delete node[valueField]; - } - }; - } - } - function track(node) { - node._valueTracker || (node._valueTracker = trackValueOnNode(node)); - } - function updateValueIfChanged(node) { - if (!node) return false; - var tracker = node._valueTracker; - if (!tracker) return true; - var lastValue = tracker.getValue(); - var value2 = ""; - node && (value2 = isCheckable(node) ? node.checked ? "true" : "false" : node.value); - node = value2; - return node !== lastValue ? (tracker.setValue(node), true) : false; - } - function getActiveElement(doc) { - doc = doc || ("undefined" !== typeof document ? document : void 0); - if ("undefined" === typeof doc) return null; - try { - return doc.activeElement || doc.body; - } catch (e) { - return doc.body; - } - } - var escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g; - function escapeSelectorAttributeValueInsideDoubleQuotes(value2) { - return value2.replace( - escapeSelectorAttributeValueInsideDoubleQuotesRegex, - function(ch) { - return "\\" + ch.charCodeAt(0).toString(16) + " "; - } - ); - } - function updateInput(element, value2, defaultValue, lastDefaultValue, checked, defaultChecked, type2, name) { - element.name = ""; - null != type2 && "function" !== typeof type2 && "symbol" !== typeof type2 && "boolean" !== typeof type2 ? element.type = type2 : element.removeAttribute("type"); - if (null != value2) - if ("number" === type2) { - if (0 === value2 && "" === element.value || element.value != value2) - element.value = "" + getToStringValue(value2); - } else - element.value !== "" + getToStringValue(value2) && (element.value = "" + getToStringValue(value2)); - else - "submit" !== type2 && "reset" !== type2 || element.removeAttribute("value"); - null != value2 ? setDefaultValue(element, type2, getToStringValue(value2)) : null != defaultValue ? setDefaultValue(element, type2, getToStringValue(defaultValue)) : null != lastDefaultValue && element.removeAttribute("value"); - null == checked && null != defaultChecked && (element.defaultChecked = !!defaultChecked); - null != checked && (element.checked = checked && "function" !== typeof checked && "symbol" !== typeof checked); - null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name ? element.name = "" + getToStringValue(name) : element.removeAttribute("name"); - } - function initInput(element, value2, defaultValue, checked, defaultChecked, type2, name, isHydrating2) { - null != type2 && "function" !== typeof type2 && "symbol" !== typeof type2 && "boolean" !== typeof type2 && (element.type = type2); - if (null != value2 || null != defaultValue) { - if (!("submit" !== type2 && "reset" !== type2 || void 0 !== value2 && null !== value2)) - return; - defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : ""; - value2 = null != value2 ? "" + getToStringValue(value2) : defaultValue; - isHydrating2 || value2 === element.value || (element.value = value2); - element.defaultValue = value2; - } - checked = null != checked ? checked : defaultChecked; - checked = "function" !== typeof checked && "symbol" !== typeof checked && !!checked; - element.checked = isHydrating2 ? element.checked : !!checked; - element.defaultChecked = !!checked; - null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name && (element.name = name); - } - function setDefaultValue(node, type2, value2) { - "number" === type2 && getActiveElement(node.ownerDocument) === node || node.defaultValue === "" + value2 || (node.defaultValue = "" + value2); - } - function updateOptions(node, multiple, propValue, setDefaultSelected) { - node = node.options; - if (multiple) { - multiple = {}; - for (var i = 0; i < propValue.length; i++) - multiple["$" + propValue[i]] = true; - for (propValue = 0; propValue < node.length; propValue++) - i = multiple.hasOwnProperty("$" + node[propValue].value), node[propValue].selected !== i && (node[propValue].selected = i), i && setDefaultSelected && (node[propValue].defaultSelected = true); - } else { - propValue = "" + getToStringValue(propValue); - multiple = null; - for (i = 0; i < node.length; i++) { - if (node[i].value === propValue) { - node[i].selected = true; - setDefaultSelected && (node[i].defaultSelected = true); - return; - } - null !== multiple || node[i].disabled || (multiple = node[i]); - } - null !== multiple && (multiple.selected = true); - } - } - function updateTextarea(element, value2, defaultValue) { - if (null != value2 && (value2 = "" + getToStringValue(value2), value2 !== element.value && (element.value = value2), null == defaultValue)) { - element.defaultValue !== value2 && (element.defaultValue = value2); - return; - } - element.defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : ""; - } - function initTextarea(element, value2, defaultValue, children2) { - if (null == value2) { - if (null != children2) { - if (null != defaultValue) throw Error(formatProdErrorMessage(92)); - if (isArrayImpl(children2)) { - if (1 < children2.length) throw Error(formatProdErrorMessage(93)); - children2 = children2[0]; - } - defaultValue = children2; - } - null == defaultValue && (defaultValue = ""); - value2 = defaultValue; - } - defaultValue = getToStringValue(value2); - element.defaultValue = defaultValue; - children2 = element.textContent; - children2 === defaultValue && "" !== children2 && null !== children2 && (element.value = children2); - } - function setTextContent(node, text) { - if (text) { - var firstChild = node.firstChild; - if (firstChild && firstChild === node.lastChild && 3 === firstChild.nodeType) { - firstChild.nodeValue = text; - return; - } - } - node.textContent = text; - } - var unitlessNumbers = new Set( - "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split( - " " - ) - ); - function setValueForStyle(style2, styleName, value2) { - var isCustomProperty = 0 === styleName.indexOf("--"); - null == value2 || "boolean" === typeof value2 || "" === value2 ? isCustomProperty ? style2.setProperty(styleName, "") : "float" === styleName ? style2.cssFloat = "" : style2[styleName] = "" : isCustomProperty ? style2.setProperty(styleName, value2) : "number" !== typeof value2 || 0 === value2 || unitlessNumbers.has(styleName) ? "float" === styleName ? style2.cssFloat = value2 : style2[styleName] = ("" + value2).trim() : style2[styleName] = value2 + "px"; - } - function setValueForStyles(node, styles, prevStyles) { - if (null != styles && "object" !== typeof styles) - throw Error(formatProdErrorMessage(62)); - node = node.style; - if (null != prevStyles) { - for (var styleName in prevStyles) - !prevStyles.hasOwnProperty(styleName) || null != styles && styles.hasOwnProperty(styleName) || (0 === styleName.indexOf("--") ? node.setProperty(styleName, "") : "float" === styleName ? node.cssFloat = "" : node[styleName] = ""); - for (var styleName$16 in styles) - styleName = styles[styleName$16], styles.hasOwnProperty(styleName$16) && prevStyles[styleName$16] !== styleName && setValueForStyle(node, styleName$16, styleName); - } else - for (var styleName$17 in styles) - styles.hasOwnProperty(styleName$17) && setValueForStyle(node, styleName$17, styles[styleName$17]); - } - function isCustomElement(tagName) { - if (-1 === tagName.indexOf("-")) return false; - switch (tagName) { - case "annotation-xml": - case "color-profile": - case "font-face": - case "font-face-src": - case "font-face-uri": - case "font-face-format": - case "font-face-name": - case "missing-glyph": - return false; - default: - return true; - } - } - var aliases = /* @__PURE__ */ new Map([ - ["acceptCharset", "accept-charset"], - ["htmlFor", "for"], - ["httpEquiv", "http-equiv"], - ["crossOrigin", "crossorigin"], - ["accentHeight", "accent-height"], - ["alignmentBaseline", "alignment-baseline"], - ["arabicForm", "arabic-form"], - ["baselineShift", "baseline-shift"], - ["capHeight", "cap-height"], - ["clipPath", "clip-path"], - ["clipRule", "clip-rule"], - ["colorInterpolation", "color-interpolation"], - ["colorInterpolationFilters", "color-interpolation-filters"], - ["colorProfile", "color-profile"], - ["colorRendering", "color-rendering"], - ["dominantBaseline", "dominant-baseline"], - ["enableBackground", "enable-background"], - ["fillOpacity", "fill-opacity"], - ["fillRule", "fill-rule"], - ["floodColor", "flood-color"], - ["floodOpacity", "flood-opacity"], - ["fontFamily", "font-family"], - ["fontSize", "font-size"], - ["fontSizeAdjust", "font-size-adjust"], - ["fontStretch", "font-stretch"], - ["fontStyle", "font-style"], - ["fontVariant", "font-variant"], - ["fontWeight", "font-weight"], - ["glyphName", "glyph-name"], - ["glyphOrientationHorizontal", "glyph-orientation-horizontal"], - ["glyphOrientationVertical", "glyph-orientation-vertical"], - ["horizAdvX", "horiz-adv-x"], - ["horizOriginX", "horiz-origin-x"], - ["imageRendering", "image-rendering"], - ["letterSpacing", "letter-spacing"], - ["lightingColor", "lighting-color"], - ["markerEnd", "marker-end"], - ["markerMid", "marker-mid"], - ["markerStart", "marker-start"], - ["overlinePosition", "overline-position"], - ["overlineThickness", "overline-thickness"], - ["paintOrder", "paint-order"], - ["panose-1", "panose-1"], - ["pointerEvents", "pointer-events"], - ["renderingIntent", "rendering-intent"], - ["shapeRendering", "shape-rendering"], - ["stopColor", "stop-color"], - ["stopOpacity", "stop-opacity"], - ["strikethroughPosition", "strikethrough-position"], - ["strikethroughThickness", "strikethrough-thickness"], - ["strokeDasharray", "stroke-dasharray"], - ["strokeDashoffset", "stroke-dashoffset"], - ["strokeLinecap", "stroke-linecap"], - ["strokeLinejoin", "stroke-linejoin"], - ["strokeMiterlimit", "stroke-miterlimit"], - ["strokeOpacity", "stroke-opacity"], - ["strokeWidth", "stroke-width"], - ["textAnchor", "text-anchor"], - ["textDecoration", "text-decoration"], - ["textRendering", "text-rendering"], - ["transformOrigin", "transform-origin"], - ["underlinePosition", "underline-position"], - ["underlineThickness", "underline-thickness"], - ["unicodeBidi", "unicode-bidi"], - ["unicodeRange", "unicode-range"], - ["unitsPerEm", "units-per-em"], - ["vAlphabetic", "v-alphabetic"], - ["vHanging", "v-hanging"], - ["vIdeographic", "v-ideographic"], - ["vMathematical", "v-mathematical"], - ["vectorEffect", "vector-effect"], - ["vertAdvY", "vert-adv-y"], - ["vertOriginX", "vert-origin-x"], - ["vertOriginY", "vert-origin-y"], - ["wordSpacing", "word-spacing"], - ["writingMode", "writing-mode"], - ["xmlnsXlink", "xmlns:xlink"], - ["xHeight", "x-height"] - ]); - var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i; - function sanitizeURL(url2) { - return isJavaScriptProtocol.test("" + url2) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url2; - } - var currentReplayingEvent = null; - function getEventTarget(nativeEvent) { - nativeEvent = nativeEvent.target || nativeEvent.srcElement || window; - nativeEvent.correspondingUseElement && (nativeEvent = nativeEvent.correspondingUseElement); - return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent; - } - var restoreTarget = null; - var restoreQueue = null; - function restoreStateOfTarget(target) { - var internalInstance = getInstanceFromNode(target); - if (internalInstance && (target = internalInstance.stateNode)) { - var props = target[internalPropsKey] || null; - a: switch (target = internalInstance.stateNode, internalInstance.type) { - case "input": - updateInput( - target, - props.value, - props.defaultValue, - props.defaultValue, - props.checked, - props.defaultChecked, - props.type, - props.name - ); - internalInstance = props.name; - if ("radio" === props.type && null != internalInstance) { - for (props = target; props.parentNode; ) props = props.parentNode; - props = props.querySelectorAll( - 'input[name="' + escapeSelectorAttributeValueInsideDoubleQuotes( - "" + internalInstance - ) + '"][type="radio"]' - ); - for (internalInstance = 0; internalInstance < props.length; internalInstance++) { - var otherNode = props[internalInstance]; - if (otherNode !== target && otherNode.form === target.form) { - var otherProps = otherNode[internalPropsKey] || null; - if (!otherProps) throw Error(formatProdErrorMessage(90)); - updateInput( - otherNode, - otherProps.value, - otherProps.defaultValue, - otherProps.defaultValue, - otherProps.checked, - otherProps.defaultChecked, - otherProps.type, - otherProps.name - ); - } - } - for (internalInstance = 0; internalInstance < props.length; internalInstance++) - otherNode = props[internalInstance], otherNode.form === target.form && updateValueIfChanged(otherNode); - } - break a; - case "textarea": - updateTextarea(target, props.value, props.defaultValue); - break a; - case "select": - internalInstance = props.value, null != internalInstance && updateOptions(target, !!props.multiple, internalInstance, false); - } - } - } - var isInsideEventHandler = false; - function batchedUpdates$1(fn, a, b) { - if (isInsideEventHandler) return fn(a, b); - isInsideEventHandler = true; - try { - var JSCompiler_inline_result = fn(a); - return JSCompiler_inline_result; - } finally { - if (isInsideEventHandler = false, null !== restoreTarget || null !== restoreQueue) { - if (flushSyncWork$1(), restoreTarget && (a = restoreTarget, fn = restoreQueue, restoreQueue = restoreTarget = null, restoreStateOfTarget(a), fn)) - for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]); - } - } - } - function getListener(inst, registrationName) { - var stateNode = inst.stateNode; - if (null === stateNode) return null; - var props = stateNode[internalPropsKey] || null; - if (null === props) return null; - stateNode = props[registrationName]; - a: switch (registrationName) { - case "onClick": - case "onClickCapture": - case "onDoubleClick": - case "onDoubleClickCapture": - case "onMouseDown": - case "onMouseDownCapture": - case "onMouseMove": - case "onMouseMoveCapture": - case "onMouseUp": - case "onMouseUpCapture": - case "onMouseEnter": - (props = !props.disabled) || (inst = inst.type, props = !("button" === inst || "input" === inst || "select" === inst || "textarea" === inst)); - inst = !props; - break a; - default: - inst = false; - } - if (inst) return null; - if (stateNode && "function" !== typeof stateNode) - throw Error( - formatProdErrorMessage(231, registrationName, typeof stateNode) - ); - return stateNode; - } - var canUseDOM = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement); - var passiveBrowserEventsSupported = false; - if (canUseDOM) - try { - options = {}; - Object.defineProperty(options, "passive", { - get: function() { - passiveBrowserEventsSupported = true; - } - }); - window.addEventListener("test", options, options); - window.removeEventListener("test", options, options); - } catch (e) { - passiveBrowserEventsSupported = false; - } - var options; - var root2 = null; - var startText = null; - var fallbackText = null; - function getData() { - if (fallbackText) return fallbackText; - var start2, startValue = startText, startLength = startValue.length, end, endValue = "value" in root2 ? root2.value : root2.textContent, endLength = endValue.length; - for (start2 = 0; start2 < startLength && startValue[start2] === endValue[start2]; start2++) ; - var minEnd = startLength - start2; - for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ; - return fallbackText = endValue.slice(start2, 1 < end ? 1 - end : void 0); - } - function getEventCharCode(nativeEvent) { - var keyCode = nativeEvent.keyCode; - "charCode" in nativeEvent ? (nativeEvent = nativeEvent.charCode, 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13)) : nativeEvent = keyCode; - 10 === nativeEvent && (nativeEvent = 13); - return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0; - } - function functionThatReturnsTrue() { - return true; - } - function functionThatReturnsFalse() { - return false; - } - function createSyntheticEvent(Interface) { - function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) { - this._reactName = reactName; - this._targetInst = targetInst; - this.type = reactEventType; - this.nativeEvent = nativeEvent; - this.target = nativeEventTarget; - this.currentTarget = null; - for (var propName in Interface) - Interface.hasOwnProperty(propName) && (reactName = Interface[propName], this[propName] = reactName ? reactName(nativeEvent) : nativeEvent[propName]); - this.isDefaultPrevented = (null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : false === nativeEvent.returnValue) ? functionThatReturnsTrue : functionThatReturnsFalse; - this.isPropagationStopped = functionThatReturnsFalse; - return this; - } - assign(SyntheticBaseEvent.prototype, { - preventDefault: function() { - this.defaultPrevented = true; - var event = this.nativeEvent; - event && (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = false), this.isDefaultPrevented = functionThatReturnsTrue); - }, - stopPropagation: function() { - var event = this.nativeEvent; - event && (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = true), this.isPropagationStopped = functionThatReturnsTrue); - }, - persist: function() { - }, - isPersistent: functionThatReturnsTrue - }); - return SyntheticBaseEvent; - } - var EventInterface = { - eventPhase: 0, - bubbles: 0, - cancelable: 0, - timeStamp: function(event) { - return event.timeStamp || Date.now(); - }, - defaultPrevented: 0, - isTrusted: 0 - }; - var SyntheticEvent = createSyntheticEvent(EventInterface); - var UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }); - var SyntheticUIEvent = createSyntheticEvent(UIEventInterface); - var lastMovementX; - var lastMovementY; - var lastMouseEvent; - var MouseEventInterface = assign({}, UIEventInterface, { - screenX: 0, - screenY: 0, - clientX: 0, - clientY: 0, - pageX: 0, - pageY: 0, - ctrlKey: 0, - shiftKey: 0, - altKey: 0, - metaKey: 0, - getModifierState: getEventModifierState, - button: 0, - buttons: 0, - relatedTarget: function(event) { - return void 0 === event.relatedTarget ? event.fromElement === event.srcElement ? event.toElement : event.fromElement : event.relatedTarget; - }, - movementX: function(event) { - if ("movementX" in event) return event.movementX; - event !== lastMouseEvent && (lastMouseEvent && "mousemove" === event.type ? (lastMovementX = event.screenX - lastMouseEvent.screenX, lastMovementY = event.screenY - lastMouseEvent.screenY) : lastMovementY = lastMovementX = 0, lastMouseEvent = event); - return lastMovementX; - }, - movementY: function(event) { - return "movementY" in event ? event.movementY : lastMovementY; - } - }); - var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface); - var DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }); - var SyntheticDragEvent = createSyntheticEvent(DragEventInterface); - var FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }); - var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface); - var AnimationEventInterface = assign({}, EventInterface, { - animationName: 0, - elapsedTime: 0, - pseudoElement: 0 - }); - var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface); - var ClipboardEventInterface = assign({}, EventInterface, { - clipboardData: function(event) { - return "clipboardData" in event ? event.clipboardData : window.clipboardData; - } - }); - var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface); - var CompositionEventInterface = assign({}, EventInterface, { data: 0 }); - var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface); - var normalizeKey = { - Esc: "Escape", - Spacebar: " ", - Left: "ArrowLeft", - Up: "ArrowUp", - Right: "ArrowRight", - Down: "ArrowDown", - Del: "Delete", - Win: "OS", - Menu: "ContextMenu", - Apps: "ContextMenu", - Scroll: "ScrollLock", - MozPrintableKey: "Unidentified" - }; - var translateToKey = { - 8: "Backspace", - 9: "Tab", - 12: "Clear", - 13: "Enter", - 16: "Shift", - 17: "Control", - 18: "Alt", - 19: "Pause", - 20: "CapsLock", - 27: "Escape", - 32: " ", - 33: "PageUp", - 34: "PageDown", - 35: "End", - 36: "Home", - 37: "ArrowLeft", - 38: "ArrowUp", - 39: "ArrowRight", - 40: "ArrowDown", - 45: "Insert", - 46: "Delete", - 112: "F1", - 113: "F2", - 114: "F3", - 115: "F4", - 116: "F5", - 117: "F6", - 118: "F7", - 119: "F8", - 120: "F9", - 121: "F10", - 122: "F11", - 123: "F12", - 144: "NumLock", - 145: "ScrollLock", - 224: "Meta" - }; - var modifierKeyToProp = { - Alt: "altKey", - Control: "ctrlKey", - Meta: "metaKey", - Shift: "shiftKey" - }; - function modifierStateGetter(keyArg) { - var nativeEvent = this.nativeEvent; - return nativeEvent.getModifierState ? nativeEvent.getModifierState(keyArg) : (keyArg = modifierKeyToProp[keyArg]) ? !!nativeEvent[keyArg] : false; - } - function getEventModifierState() { - return modifierStateGetter; - } - var KeyboardEventInterface = assign({}, UIEventInterface, { - key: function(nativeEvent) { - if (nativeEvent.key) { - var key = normalizeKey[nativeEvent.key] || nativeEvent.key; - if ("Unidentified" !== key) return key; - } - return "keypress" === nativeEvent.type ? (nativeEvent = getEventCharCode(nativeEvent), 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent)) : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type ? translateToKey[nativeEvent.keyCode] || "Unidentified" : ""; - }, - code: 0, - location: 0, - ctrlKey: 0, - shiftKey: 0, - altKey: 0, - metaKey: 0, - repeat: 0, - locale: 0, - getModifierState: getEventModifierState, - charCode: function(event) { - return "keypress" === event.type ? getEventCharCode(event) : 0; - }, - keyCode: function(event) { - return "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0; - }, - which: function(event) { - return "keypress" === event.type ? getEventCharCode(event) : "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0; - } - }); - var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface); - var PointerEventInterface = assign({}, MouseEventInterface, { - pointerId: 0, - width: 0, - height: 0, - pressure: 0, - tangentialPressure: 0, - tiltX: 0, - tiltY: 0, - twist: 0, - pointerType: 0, - isPrimary: 0 - }); - var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface); - var TouchEventInterface = assign({}, UIEventInterface, { - touches: 0, - targetTouches: 0, - changedTouches: 0, - altKey: 0, - metaKey: 0, - ctrlKey: 0, - shiftKey: 0, - getModifierState: getEventModifierState - }); - var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface); - var TransitionEventInterface = assign({}, EventInterface, { - propertyName: 0, - elapsedTime: 0, - pseudoElement: 0 - }); - var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface); - var WheelEventInterface = assign({}, MouseEventInterface, { - deltaX: function(event) { - return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0; - }, - deltaY: function(event) { - return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0; - }, - deltaZ: 0, - deltaMode: 0 - }); - var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface); - var ToggleEventInterface = assign({}, EventInterface, { - newState: 0, - oldState: 0 - }); - var SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface); - var END_KEYCODES = [9, 13, 27, 32]; - var canUseCompositionEvent = canUseDOM && "CompositionEvent" in window; - var documentMode = null; - canUseDOM && "documentMode" in document && (documentMode = document.documentMode); - var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode; - var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && 8 < documentMode && 11 >= documentMode); - var SPACEBAR_CHAR = String.fromCharCode(32); - var hasSpaceKeypress = false; - function isFallbackCompositionEnd(domEventName, nativeEvent) { - switch (domEventName) { - case "keyup": - return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode); - case "keydown": - return 229 !== nativeEvent.keyCode; - case "keypress": - case "mousedown": - case "focusout": - return true; - default: - return false; - } - } - function getDataFromCustomEvent(nativeEvent) { - nativeEvent = nativeEvent.detail; - return "object" === typeof nativeEvent && "data" in nativeEvent ? nativeEvent.data : null; - } - var isComposing = false; - function getNativeBeforeInputChars(domEventName, nativeEvent) { - switch (domEventName) { - case "compositionend": - return getDataFromCustomEvent(nativeEvent); - case "keypress": - if (32 !== nativeEvent.which) return null; - hasSpaceKeypress = true; - return SPACEBAR_CHAR; - case "textInput": - return domEventName = nativeEvent.data, domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName; - default: - return null; - } - } - function getFallbackBeforeInputChars(domEventName, nativeEvent) { - if (isComposing) - return "compositionend" === domEventName || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root2 = null, isComposing = false, domEventName) : null; - switch (domEventName) { - case "paste": - return null; - case "keypress": - if (!(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) || nativeEvent.ctrlKey && nativeEvent.altKey) { - if (nativeEvent.char && 1 < nativeEvent.char.length) - return nativeEvent.char; - if (nativeEvent.which) return String.fromCharCode(nativeEvent.which); - } - return null; - case "compositionend": - return useFallbackCompositionData && "ko" !== nativeEvent.locale ? null : nativeEvent.data; - default: - return null; - } - } - var supportedInputTypes = { - color: true, - date: true, - datetime: true, - "datetime-local": true, - email: true, - month: true, - number: true, - password: true, - range: true, - search: true, - tel: true, - text: true, - time: true, - url: true, - week: true - }; - function isTextInputElement(elem) { - var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); - return "input" === nodeName ? !!supportedInputTypes[elem.type] : "textarea" === nodeName ? true : false; - } - function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) { - restoreTarget ? restoreQueue ? restoreQueue.push(target) : restoreQueue = [target] : restoreTarget = target; - inst = accumulateTwoPhaseListeners(inst, "onChange"); - 0 < inst.length && (nativeEvent = new SyntheticEvent( - "onChange", - "change", - null, - nativeEvent, - target - ), dispatchQueue.push({ event: nativeEvent, listeners: inst })); - } - var activeElement$1 = null; - var activeElementInst$1 = null; - function runEventInBatch(dispatchQueue) { - processDispatchQueue(dispatchQueue, 0); - } - function getInstIfValueChanged(targetInst) { - var targetNode = getNodeFromInstance(targetInst); - if (updateValueIfChanged(targetNode)) return targetInst; - } - function getTargetInstForChangeEvent(domEventName, targetInst) { - if ("change" === domEventName) return targetInst; - } - var isInputEventSupported = false; - if (canUseDOM) { - if (canUseDOM) { - isSupported$jscomp$inline_417 = "oninput" in document; - if (!isSupported$jscomp$inline_417) { - element$jscomp$inline_418 = document.createElement("div"); - element$jscomp$inline_418.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_417 = "function" === typeof element$jscomp$inline_418.oninput; - } - JSCompiler_inline_result$jscomp$282 = isSupported$jscomp$inline_417; - } else JSCompiler_inline_result$jscomp$282 = false; - isInputEventSupported = JSCompiler_inline_result$jscomp$282 && (!document.documentMode || 9 < document.documentMode); - } - var JSCompiler_inline_result$jscomp$282; - var isSupported$jscomp$inline_417; - var element$jscomp$inline_418; - function stopWatchingForValueChange() { - activeElement$1 && (activeElement$1.detachEvent("onpropertychange", handlePropertyChange), activeElementInst$1 = activeElement$1 = null); - } - function handlePropertyChange(nativeEvent) { - if ("value" === nativeEvent.propertyName && getInstIfValueChanged(activeElementInst$1)) { - var dispatchQueue = []; - createAndAccumulateChangeEvent( - dispatchQueue, - activeElementInst$1, - nativeEvent, - getEventTarget(nativeEvent) - ); - batchedUpdates$1(runEventInBatch, dispatchQueue); - } - } - function handleEventsForInputEventPolyfill(domEventName, target, targetInst) { - "focusin" === domEventName ? (stopWatchingForValueChange(), activeElement$1 = target, activeElementInst$1 = targetInst, activeElement$1.attachEvent("onpropertychange", handlePropertyChange)) : "focusout" === domEventName && stopWatchingForValueChange(); - } - function getTargetInstForInputEventPolyfill(domEventName) { - if ("selectionchange" === domEventName || "keyup" === domEventName || "keydown" === domEventName) - return getInstIfValueChanged(activeElementInst$1); - } - function getTargetInstForClickEvent(domEventName, targetInst) { - if ("click" === domEventName) return getInstIfValueChanged(targetInst); - } - function getTargetInstForInputOrChangeEvent(domEventName, targetInst) { - if ("input" === domEventName || "change" === domEventName) - return getInstIfValueChanged(targetInst); - } - function is(x2, y2) { - return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2; - } - var objectIs = "function" === typeof Object.is ? Object.is : is; - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return true; - if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB) - return false; - var keysA = Object.keys(objA), keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return false; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) - return false; - } - return true; - } - function getLeafNode(node) { - for (; node && node.firstChild; ) node = node.firstChild; - return node; - } - function getNodeForCharacterOffset(root3, offset) { - var node = getLeafNode(root3); - root3 = 0; - for (var nodeEnd; node; ) { - if (3 === node.nodeType) { - nodeEnd = root3 + node.textContent.length; - if (root3 <= offset && nodeEnd >= offset) - return { node, offset: offset - root3 }; - root3 = nodeEnd; - } - a: { - for (; node; ) { - if (node.nextSibling) { - node = node.nextSibling; - break a; - } - node = node.parentNode; - } - node = void 0; - } - node = getLeafNode(node); - } - } - function containsNode(outerNode, innerNode) { - return outerNode && innerNode ? outerNode === innerNode ? true : outerNode && 3 === outerNode.nodeType ? false : innerNode && 3 === innerNode.nodeType ? containsNode(outerNode, innerNode.parentNode) : "contains" in outerNode ? outerNode.contains(innerNode) : outerNode.compareDocumentPosition ? !!(outerNode.compareDocumentPosition(innerNode) & 16) : false : false; - } - function getActiveElementDeep(containerInfo) { - containerInfo = null != containerInfo && null != containerInfo.ownerDocument && null != containerInfo.ownerDocument.defaultView ? containerInfo.ownerDocument.defaultView : window; - for (var element = getActiveElement(containerInfo.document); element instanceof containerInfo.HTMLIFrameElement; ) { - try { - var JSCompiler_inline_result = "string" === typeof element.contentWindow.location.href; - } catch (err) { - JSCompiler_inline_result = false; - } - if (JSCompiler_inline_result) containerInfo = element.contentWindow; - else break; - element = getActiveElement(containerInfo.document); - } - return element; - } - function hasSelectionCapabilities(elem) { - var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); - return nodeName && ("input" === nodeName && ("text" === elem.type || "search" === elem.type || "tel" === elem.type || "url" === elem.type || "password" === elem.type) || "textarea" === nodeName || "true" === elem.contentEditable); - } - var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode; - var activeElement = null; - var activeElementInst = null; - var lastSelection = null; - var mouseDown = false; - function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) { - var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : 9 === nativeEventTarget.nodeType ? nativeEventTarget : nativeEventTarget.ownerDocument; - mouseDown || null == activeElement || activeElement !== getActiveElement(doc) || (doc = activeElement, "selectionStart" in doc && hasSelectionCapabilities(doc) ? doc = { start: doc.selectionStart, end: doc.selectionEnd } : (doc = (doc.ownerDocument && doc.ownerDocument.defaultView || window).getSelection(), doc = { - anchorNode: doc.anchorNode, - anchorOffset: doc.anchorOffset, - focusNode: doc.focusNode, - focusOffset: doc.focusOffset - }), lastSelection && shallowEqual(lastSelection, doc) || (lastSelection = doc, doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect"), 0 < doc.length && (nativeEvent = new SyntheticEvent( - "onSelect", - "select", - null, - nativeEvent, - nativeEventTarget - ), dispatchQueue.push({ event: nativeEvent, listeners: doc }), nativeEvent.target = activeElement))); - } - function makePrefixMap(styleProp, eventName) { - var prefixes2 = {}; - prefixes2[styleProp.toLowerCase()] = eventName.toLowerCase(); - prefixes2["Webkit" + styleProp] = "webkit" + eventName; - prefixes2["Moz" + styleProp] = "moz" + eventName; - return prefixes2; - } - var vendorPrefixes = { - animationend: makePrefixMap("Animation", "AnimationEnd"), - animationiteration: makePrefixMap("Animation", "AnimationIteration"), - animationstart: makePrefixMap("Animation", "AnimationStart"), - transitionrun: makePrefixMap("Transition", "TransitionRun"), - transitionstart: makePrefixMap("Transition", "TransitionStart"), - transitioncancel: makePrefixMap("Transition", "TransitionCancel"), - transitionend: makePrefixMap("Transition", "TransitionEnd") - }; - var prefixedEventNames = {}; - var style = {}; - canUseDOM && (style = document.createElement("div").style, "AnimationEvent" in window || (delete vendorPrefixes.animationend.animation, delete vendorPrefixes.animationiteration.animation, delete vendorPrefixes.animationstart.animation), "TransitionEvent" in window || delete vendorPrefixes.transitionend.transition); - function getVendorPrefixedEventName(eventName) { - if (prefixedEventNames[eventName]) return prefixedEventNames[eventName]; - if (!vendorPrefixes[eventName]) return eventName; - var prefixMap = vendorPrefixes[eventName], styleProp; - for (styleProp in prefixMap) - if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) - return prefixedEventNames[eventName] = prefixMap[styleProp]; - return eventName; - } - var ANIMATION_END = getVendorPrefixedEventName("animationend"); - var ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"); - var ANIMATION_START = getVendorPrefixedEventName("animationstart"); - var TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"); - var TRANSITION_START = getVendorPrefixedEventName("transitionstart"); - var TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"); - var TRANSITION_END = getVendorPrefixedEventName("transitionend"); - var topLevelEventsToReactNames = /* @__PURE__ */ new Map(); - var simpleEventPluginEvents = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split( - " " - ); - simpleEventPluginEvents.push("scrollEnd"); - function registerSimpleEvent(domEventName, reactName) { - topLevelEventsToReactNames.set(domEventName, reactName); - registerTwoPhaseEvent(reactName, [domEventName]); - } - var CapturedStacks = /* @__PURE__ */ new WeakMap(); - function createCapturedValueAtFiber(value2, source) { - if ("object" === typeof value2 && null !== value2) { - var existing = CapturedStacks.get(value2); - if (void 0 !== existing) return existing; - source = { - value: value2, - source, - stack: getStackByFiberInDevAndProd(source) - }; - CapturedStacks.set(value2, source); - return source; - } - return { - value: value2, - source, - stack: getStackByFiberInDevAndProd(source) - }; - } - var concurrentQueues = []; - var concurrentQueuesIndex = 0; - var concurrentlyUpdatedLanes = 0; - function finishQueueingConcurrentUpdates() { - for (var endIndex = concurrentQueuesIndex, i = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i < endIndex; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending ? update.next = update : (update.next = pending.next, pending.next = update); - queue.pending = update; - } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); - } - } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); - } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); - } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); - } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = false, parent = sourceFiber.return; null !== parent; ) - parent.childLanes |= lane, alternate = parent.alternate, null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && (sourceFiber = parent.stateNode, null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = true)), sourceFiber = parent, parent = parent.return; - return 3 === sourceFiber.tag ? (parent = sourceFiber.stateNode, isHidden && null !== update && (isHidden = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden], null === alternate ? sourceFiber[isHidden] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null; - } - function getRootForUpdatedFiber(sourceFiber) { - if (50 < nestedUpdateCount) - throw nestedUpdateCount = 0, rootWithNestedUpdates = null, Error(formatProdErrorMessage(185)); - for (var parent = sourceFiber.return; null !== parent; ) - sourceFiber = parent, parent = sourceFiber.return; - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; - } - var emptyContextObject = {}; - function FiberNode(tag, pendingProps, key, mode) { - this.tag = tag; - this.key = key; - this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null; - this.index = 0; - this.refCleanup = this.ref = null; - this.pendingProps = pendingProps; - this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null; - this.mode = mode; - this.subtreeFlags = this.flags = 0; - this.deletions = null; - this.childLanes = this.lanes = 0; - this.alternate = null; - } - function createFiberImplClass(tag, pendingProps, key, mode) { - return new FiberNode(tag, pendingProps, key, mode); - } - function shouldConstruct(Component) { - Component = Component.prototype; - return !(!Component || !Component.isReactComponent); - } - function createWorkInProgress(current, pendingProps) { - var workInProgress2 = current.alternate; - null === workInProgress2 ? (workInProgress2 = createFiberImplClass( - current.tag, - pendingProps, - current.key, - current.mode - ), workInProgress2.elementType = current.elementType, workInProgress2.type = current.type, workInProgress2.stateNode = current.stateNode, workInProgress2.alternate = current, current.alternate = workInProgress2) : (workInProgress2.pendingProps = pendingProps, workInProgress2.type = current.type, workInProgress2.flags = 0, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null); - workInProgress2.flags = current.flags & 65011712; - workInProgress2.childLanes = current.childLanes; - workInProgress2.lanes = current.lanes; - workInProgress2.child = current.child; - workInProgress2.memoizedProps = current.memoizedProps; - workInProgress2.memoizedState = current.memoizedState; - workInProgress2.updateQueue = current.updateQueue; - pendingProps = current.dependencies; - workInProgress2.dependencies = null === pendingProps ? null : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext }; - workInProgress2.sibling = current.sibling; - workInProgress2.index = current.index; - workInProgress2.ref = current.ref; - workInProgress2.refCleanup = current.refCleanup; - return workInProgress2; - } - function resetWorkInProgress(workInProgress2, renderLanes2) { - workInProgress2.flags &= 65011714; - var current = workInProgress2.alternate; - null === current ? (workInProgress2.childLanes = 0, workInProgress2.lanes = renderLanes2, workInProgress2.child = null, workInProgress2.subtreeFlags = 0, workInProgress2.memoizedProps = null, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.dependencies = null, workInProgress2.stateNode = null) : (workInProgress2.childLanes = current.childLanes, workInProgress2.lanes = current.lanes, workInProgress2.child = current.child, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.memoizedProps = current.memoizedProps, workInProgress2.memoizedState = current.memoizedState, workInProgress2.updateQueue = current.updateQueue, workInProgress2.type = current.type, renderLanes2 = current.dependencies, workInProgress2.dependencies = null === renderLanes2 ? null : { - lanes: renderLanes2.lanes, - firstContext: renderLanes2.firstContext - }); - return workInProgress2; - } - function createFiberFromTypeAndProps(type2, key, pendingProps, owner, mode, lanes) { - var fiberTag = 0; - owner = type2; - if ("function" === typeof type2) shouldConstruct(type2) && (fiberTag = 1); - else if ("string" === typeof type2) - fiberTag = isHostHoistableType( - type2, - pendingProps, - contextStackCursor.current - ) ? 26 : "html" === type2 || "head" === type2 || "body" === type2 ? 27 : 5; - else - a: switch (type2) { - case REACT_ACTIVITY_TYPE: - return type2 = createFiberImplClass(31, pendingProps, key, mode), type2.elementType = REACT_ACTIVITY_TYPE, type2.lanes = lanes, type2; - case REACT_FRAGMENT_TYPE: - return createFiberFromFragment(pendingProps.children, mode, lanes, key); - case REACT_STRICT_MODE_TYPE: - fiberTag = 8; - mode |= 24; - break; - case REACT_PROFILER_TYPE: - return type2 = createFiberImplClass(12, pendingProps, key, mode | 2), type2.elementType = REACT_PROFILER_TYPE, type2.lanes = lanes, type2; - case REACT_SUSPENSE_TYPE: - return type2 = createFiberImplClass(13, pendingProps, key, mode), type2.elementType = REACT_SUSPENSE_TYPE, type2.lanes = lanes, type2; - case REACT_SUSPENSE_LIST_TYPE: - return type2 = createFiberImplClass(19, pendingProps, key, mode), type2.elementType = REACT_SUSPENSE_LIST_TYPE, type2.lanes = lanes, type2; - default: - if ("object" === typeof type2 && null !== type2) - switch (type2.$$typeof) { - case REACT_PROVIDER_TYPE: - case REACT_CONTEXT_TYPE: - fiberTag = 10; - break a; - case REACT_CONSUMER_TYPE: - fiberTag = 9; - break a; - case REACT_FORWARD_REF_TYPE: - fiberTag = 11; - break a; - case REACT_MEMO_TYPE: - fiberTag = 14; - break a; - case REACT_LAZY_TYPE: - fiberTag = 16; - owner = null; - break a; - } - fiberTag = 29; - pendingProps = Error( - formatProdErrorMessage(130, null === type2 ? "null" : typeof type2, "") - ); - owner = null; - } - key = createFiberImplClass(fiberTag, pendingProps, key, mode); - key.elementType = type2; - key.type = owner; - key.lanes = lanes; - return key; - } - function createFiberFromFragment(elements, mode, lanes, key) { - elements = createFiberImplClass(7, elements, key, mode); - elements.lanes = lanes; - return elements; - } - function createFiberFromText(content, mode, lanes) { - content = createFiberImplClass(6, content, null, mode); - content.lanes = lanes; - return content; - } - function createFiberFromPortal(portal, mode, lanes) { - mode = createFiberImplClass( - 4, - null !== portal.children ? portal.children : [], - portal.key, - mode - ); - mode.lanes = lanes; - mode.stateNode = { - containerInfo: portal.containerInfo, - pendingChildren: null, - implementation: portal.implementation - }; - return mode; - } - var forkStack = []; - var forkStackIndex = 0; - var treeForkProvider = null; - var treeForkCount = 0; - var idStack = []; - var idStackIndex = 0; - var treeContextProvider = null; - var treeContextId = 1; - var treeContextOverflow = ""; - function pushTreeFork(workInProgress2, totalChildren) { - forkStack[forkStackIndex++] = treeForkCount; - forkStack[forkStackIndex++] = treeForkProvider; - treeForkProvider = workInProgress2; - treeForkCount = totalChildren; - } - function pushTreeId(workInProgress2, totalChildren, index2) { - idStack[idStackIndex++] = treeContextId; - idStack[idStackIndex++] = treeContextOverflow; - idStack[idStackIndex++] = treeContextProvider; - treeContextProvider = workInProgress2; - var baseIdWithLeadingBit = treeContextId; - workInProgress2 = treeContextOverflow; - var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1; - baseIdWithLeadingBit &= ~(1 << baseLength); - index2 += 1; - var length = 32 - clz32(totalChildren) + baseLength; - if (30 < length) { - var numberOfOverflowBits = baseLength - baseLength % 5; - length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32); - baseIdWithLeadingBit >>= numberOfOverflowBits; - baseLength -= numberOfOverflowBits; - treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index2 << baseLength | baseIdWithLeadingBit; - treeContextOverflow = length + workInProgress2; - } else - treeContextId = 1 << length | index2 << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2; - } - function pushMaterializedTreeId(workInProgress2) { - null !== workInProgress2.return && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0)); - } - function popTreeContext(workInProgress2) { - for (; workInProgress2 === treeForkProvider; ) - treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null; - for (; workInProgress2 === treeContextProvider; ) - treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null; - } - var hydrationParentFiber = null; - var nextHydratableInstance = null; - var isHydrating = false; - var hydrationErrors = null; - var rootOrSingletonContext = false; - var HydrationMismatchException = Error(formatProdErrorMessage(519)); - function throwOnHydrationMismatch(fiber) { - var error = Error(formatProdErrorMessage(418, "")); - queueHydrationError(createCapturedValueAtFiber(error, fiber)); - throw HydrationMismatchException; - } - function prepareToHydrateHostInstance(fiber) { - var instance = fiber.stateNode, type2 = fiber.type, props = fiber.memoizedProps; - instance[internalInstanceKey] = fiber; - instance[internalPropsKey] = props; - switch (type2) { - case "dialog": - listenToNonDelegatedEvent("cancel", instance); - listenToNonDelegatedEvent("close", instance); - break; - case "iframe": - case "object": - case "embed": - listenToNonDelegatedEvent("load", instance); - break; - case "video": - case "audio": - for (type2 = 0; type2 < mediaEventTypes.length; type2++) - listenToNonDelegatedEvent(mediaEventTypes[type2], instance); - break; - case "source": - listenToNonDelegatedEvent("error", instance); - break; - case "img": - case "image": - case "link": - listenToNonDelegatedEvent("error", instance); - listenToNonDelegatedEvent("load", instance); - break; - case "details": - listenToNonDelegatedEvent("toggle", instance); - break; - case "input": - listenToNonDelegatedEvent("invalid", instance); - initInput( - instance, - props.value, - props.defaultValue, - props.checked, - props.defaultChecked, - props.type, - props.name, - true - ); - track(instance); - break; - case "select": - listenToNonDelegatedEvent("invalid", instance); - break; - case "textarea": - listenToNonDelegatedEvent("invalid", instance), initTextarea(instance, props.value, props.defaultValue, props.children), track(instance); - } - type2 = props.children; - "string" !== typeof type2 && "number" !== typeof type2 && "bigint" !== typeof type2 || instance.textContent === "" + type2 || true === props.suppressHydrationWarning || checkForUnmatchedText(instance.textContent, type2) ? (null != props.popover && (listenToNonDelegatedEvent("beforetoggle", instance), listenToNonDelegatedEvent("toggle", instance)), null != props.onScroll && listenToNonDelegatedEvent("scroll", instance), null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", instance), null != props.onClick && (instance.onclick = noop$1), instance = true) : instance = false; - instance || throwOnHydrationMismatch(fiber); - } - function popToNextHostParent(fiber) { - for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) - switch (hydrationParentFiber.tag) { - case 5: - case 13: - rootOrSingletonContext = false; - return; - case 27: - case 3: - rootOrSingletonContext = true; - return; - default: - hydrationParentFiber = hydrationParentFiber.return; - } - } - function popHydrationState(fiber) { - if (fiber !== hydrationParentFiber) return false; - if (!isHydrating) return popToNextHostParent(fiber), isHydrating = true, false; - var tag = fiber.tag, JSCompiler_temp; - if (JSCompiler_temp = 3 !== tag && 27 !== tag) { - if (JSCompiler_temp = 5 === tag) - JSCompiler_temp = fiber.type, JSCompiler_temp = !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) || shouldSetTextContent(fiber.type, fiber.memoizedProps); - JSCompiler_temp = !JSCompiler_temp; - } - JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber); - popToNextHostParent(fiber); - if (13 === tag) { - fiber = fiber.memoizedState; - fiber = null !== fiber ? fiber.dehydrated : null; - if (!fiber) throw Error(formatProdErrorMessage(317)); - a: { - fiber = fiber.nextSibling; - for (tag = 0; fiber; ) { - if (8 === fiber.nodeType) - if (JSCompiler_temp = fiber.data, "/$" === JSCompiler_temp) { - if (0 === tag) { - nextHydratableInstance = getNextHydratable(fiber.nextSibling); - break a; - } - tag--; - } else - "$" !== JSCompiler_temp && "$!" !== JSCompiler_temp && "$?" !== JSCompiler_temp || tag++; - fiber = fiber.nextSibling; - } - nextHydratableInstance = null; - } - } else - 27 === tag ? (tag = nextHydratableInstance, isSingletonScope(fiber.type) ? (fiber = previousHydratableOnEnteringScopedSingleton, previousHydratableOnEnteringScopedSingleton = null, nextHydratableInstance = fiber) : nextHydratableInstance = tag) : nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null; - return true; - } - function resetHydrationState() { - nextHydratableInstance = hydrationParentFiber = null; - isHydrating = false; - } - function upgradeHydrationErrorsToRecoverable() { - var queuedErrors = hydrationErrors; - null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - queuedErrors - ), hydrationErrors = null); - return queuedErrors; - } - function queueHydrationError(error) { - null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error); - } - var valueCursor = createCursor(null); - var currentlyRenderingFiber$1 = null; - var lastContextDependency = null; - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue); - context._currentValue = nextValue; - } - function popProvider(context) { - context._currentValue = valueCursor.current; - pop(valueCursor); - } - function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2); - if (parent === propagationRoot) break; - parent = parent.return; - } - } - function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) { - var fiber = workInProgress2.child; - null !== fiber && (fiber.return = workInProgress2); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes2; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes2); - scheduleContextWorkOnParentPath( - list.return, - renderLanes2, - workInProgress2 - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes2; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes2); - scheduleContextWorkOnParentPath(nextFiber, renderLanes2, workInProgress2); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress2) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges(current, workInProgress2, renderLanes2, forcePropagateEntireTree) { - current = null; - for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) { - if (!isInsidePropagationBailout) { - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true; - else if (0 !== (parent.flags & 262144)) break; - } - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : current = [context]); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current ? current.push(HostTransitionContext) : current = [HostTransitionContext]); - } - parent = parent.return; - } - null !== current && propagateContextChanges( - workInProgress2, - current, - renderLanes2, - forcePropagateEntireTree - ); - workInProgress2.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - if (!objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - )) - return true; - currentDependencies = currentDependencies.next; - } - return false; - } - function prepareToReadContext(workInProgress2) { - currentlyRenderingFiber$1 = workInProgress2; - lastContextDependency = null; - workInProgress2 = workInProgress2.dependencies; - null !== workInProgress2 && (workInProgress2.firstContext = null); - } - function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber$1, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value2 = context._currentValue; - context = { context, memoizedValue: value2, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value2; - } - var AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() { - var listeners = [], signal = this.signal = { - aborted: false, - addEventListener: function(type2, listener) { - listeners.push(listener); - } - }; - this.abort = function() { - signal.aborted = true; - listeners.forEach(function(listener) { - return listener(); - }); - }; - }; - var scheduleCallback$2 = Scheduler.unstable_scheduleCallback; - var NormalPriority = Scheduler.unstable_NormalPriority; - var CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; - function createCache() { - return { - controller: new AbortControllerLocal(), - data: /* @__PURE__ */ new Map(), - refCount: 0 - }; - } - function releaseCache(cache2) { - cache2.refCount--; - 0 === cache2.refCount && scheduleCallback$2(NormalPriority, function() { - cache2.controller.abort(); - }); - } - var currentEntangledListeners = null; - var currentEntangledPendingCount = 0; - var currentEntangledLane = 0; - var currentEntangledActionThenable = null; - function entangleAsyncAction(transition2, thenable) { - if (null === currentEntangledListeners) { - var entangledListeners = currentEntangledListeners = []; - currentEntangledPendingCount = 0; - currentEntangledLane = requestTransitionLane(); - currentEntangledActionThenable = { - status: "pending", - value: void 0, - then: function(resolve) { - entangledListeners.push(resolve); - } - }; - } - currentEntangledPendingCount++; - thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); - return thenable; - } - function pingEngtangledActionScope() { - if (0 === --currentEntangledPendingCount && null !== currentEntangledListeners) { - null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); - } - } - function chainThenableValue(thenable, result) { - var listeners = [], thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function(resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function() { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function(error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; - } - var prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function(transition2, returnValue) { - "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && entangleAsyncAction(transition2, returnValue); - null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition2, returnValue); - }; - var resumedCache = createCursor(null); - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache; - } - function pushTransition(offscreenWorkInProgress, prevCachePool) { - null === prevCachePool ? push(resumedCache, resumedCache.current) : push(resumedCache, prevCachePool.pool); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool ? null : { parent: CacheContext._currentValue, pool: cacheFromPool }; - } - var SuspenseException = Error(formatProdErrorMessage(460)); - var SuspenseyCommitException = Error(formatProdErrorMessage(474)); - var SuspenseActionException = Error(formatProdErrorMessage(542)); - var noopSuspenseyCommitThenable = { then: function() { - } }; - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop$3() { - } - function trackUsedThenable(thenableState2, thenable, index2) { - index2 = thenableState2[index2]; - void 0 === index2 ? thenableState2.push(thenable) : index2 !== thenable && (thenable.then(noop$3, noop$3), thenable = index2); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2; - default: - if ("string" === typeof thenable.status) thenable.then(noop$3, noop$3); - else { - thenableState2 = workInProgressRoot; - if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter) - throw Error(formatProdErrorMessage(482)); - thenableState2 = thenable; - thenableState2.status = "pending"; - thenableState2.then( - function(fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function(error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2; - } - suspendedThenable = thenable; - throw SuspenseException; - } - } - var suspendedThenable = null; - function getSuspendedThenable() { - if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); - var thenable = suspendedThenable; - suspendedThenable = null; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException) - throw Error(formatProdErrorMessage(483)); - } - var hasForceUpdate = false; - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; - } - function cloneUpdateQueue(current, workInProgress2) { - current = current.updateQueue; - workInProgress2.updateQueue === current && (workInProgress2.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); - } - function createUpdate(lane) { - return { lane, tag: 0, payload: null, callback: null, next: null }; - } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if (0 !== (executionContext & 2)) { - var pending = updateQueue.pending; - null === pending ? update.next = update : (update.next = pending.next, pending.next = update); - updateQueue.pending = update; - update = getRootForUpdatedFiber(fiber); - markUpdateLaneFromFiberToRoot(fiber, null, lane); - return update; - } - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); - } - function entangleTransitions(root3, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) { - var queueLanes = fiber.lanes; - queueLanes &= root3.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root3, lane); - } - } - function enqueueCapturedUpdate(workInProgress2, capturedUpdate) { - var queue = workInProgress2.updateQueue, current = workInProgress2.alternate; - if (null !== current && (current = current.updateQueue, queue === current)) { - var newFirst = null, newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast ? newFirst = newLast = clone : newLast = newLast.next = clone; - queue = queue.next; - } while (null !== queue); - null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate; - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current.shared, - callbacks: current.callbacks - }; - workInProgress2.updateQueue = queue; - return; - } - workInProgress2 = queue.lastBaseUpdate; - null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate; - queue.lastBaseUpdate = capturedUpdate; - } - var didReadFromEntangledAsyncAction = false; - function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } - } - function processUpdateQueue(workInProgress$jscomp$0, props, instance$jscomp$0, renderLanes2) { - didReadFromEntangledAsyncAction = false; - var queue = workInProgress$jscomp$0.updateQueue; - hasForceUpdate = false; - var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate; - lastBaseUpdate = lastPendingUpdate; - var current = workInProgress$jscomp$0.alternate; - null !== current && (current = current.updateQueue, pendingQueue = current.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current.lastBaseUpdate = lastPendingUpdate)); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane; - if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) { - 0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true); - null !== current && (current = current.next = { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - var workInProgress2 = workInProgress$jscomp$0, update = pendingQueue; - updateLane = props; - var instance = instance$jscomp$0; - switch (update.tag) { - case 1: - workInProgress2 = update.payload; - if ("function" === typeof workInProgress2) { - newState = workInProgress2.call(instance, newState, updateLane); - break a; - } - newState = workInProgress2; - break a; - case 3: - workInProgress2.flags = workInProgress2.flags & -65537 | 128; - case 0: - workInProgress2 = update.payload; - updateLane = "function" === typeof workInProgress2 ? workInProgress2.call(instance, newState, updateLane) : workInProgress2; - if (null === updateLane || void 0 === updateLane) break a; - newState = assign({}, newState, updateLane); - break a; - case 2: - hasForceUpdate = true; - } - } - updateLane = pendingQueue.callback; - null !== updateLane && (workInProgress$jscomp$0.flags |= 64, isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane)); - } else - isHiddenUpdate = { - lane: updateLane, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: pendingQueue.callback, - next: null - }, null === current ? (firstPendingUpdate = current = isHiddenUpdate, lastPendingUpdate = newState) : current = current.next = isHiddenUpdate, lastBaseUpdate |= updateLane; - pendingQueue = pendingQueue.next; - if (null === pendingQueue) - if (pendingQueue = queue.shared.pending, null === pendingQueue) - break; - else - isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null; - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; - } - } - function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error(formatProdErrorMessage(191, callback)); - callback.call(context); - } - function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++) - callCallback(callbacks[updateQueue], context); - } - var currentTreeHiddenStackCursor = createCursor(null); - var prevEntangledRenderLanesCursor = createCursor(0); - function pushHiddenContext(fiber, context) { - fiber = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, fiber); - push(currentTreeHiddenStackCursor, context); - entangledRenderLanes = fiber | context.baseLanes; - } - function reuseHiddenContextOnStack() { - push(prevEntangledRenderLanesCursor, entangledRenderLanes); - push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); - } - function popHiddenContext() { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor); - pop(prevEntangledRenderLanesCursor); - } - var renderLanes = 0; - var currentlyRenderingFiber = null; - var currentHook = null; - var workInProgressHook = null; - var didScheduleRenderPhaseUpdate = false; - var didScheduleRenderPhaseUpdateDuringThisPass = false; - var shouldDoubleInvokeUserFnsInHooksDEV = false; - var localIdCounter = 0; - var thenableIndexCounter$1 = 0; - var thenableState$1 = null; - var globalClientIdCounter = 0; - function throwInvalidHookError() { - throw Error(formatProdErrorMessage(321)); - } - function areHookInputsEqual(nextDeps, prevDeps) { - if (null === prevDeps) return false; - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) - if (!objectIs(nextDeps[i], prevDeps[i])) return false; - return true; - } - function renderWithHooks(current, workInProgress2, Component, props, secondArg, nextRenderLanes) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber = workInProgress2; - workInProgress2.memoizedState = null; - workInProgress2.updateQueue = null; - workInProgress2.lanes = 0; - ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; - shouldDoubleInvokeUserFnsInHooksDEV = false; - nextRenderLanes = Component(props, secondArg); - shouldDoubleInvokeUserFnsInHooksDEV = false; - didScheduleRenderPhaseUpdateDuringThisPass && (nextRenderLanes = renderWithHooksAgain( - workInProgress2, - Component, - props, - secondArg - )); - finishRenderingHooks(current); - return nextRenderLanes; - } - function finishRenderingHooks(current) { - ReactSharedInternals.H = ContextOnlyDispatcher; - var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; - renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber = null; - didScheduleRenderPhaseUpdate = false; - thenableIndexCounter$1 = 0; - thenableState$1 = null; - if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300)); - null === current || didReceiveUpdate || (current = current.dependencies, null !== current && checkIfContextChanged(current) && (didReceiveUpdate = true)); - } - function renderWithHooksAgain(workInProgress2, Component, props, secondArg) { - currentlyRenderingFiber = workInProgress2; - var numberOfReRenders = 0; - do { - didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); - thenableIndexCounter$1 = 0; - didScheduleRenderPhaseUpdateDuringThisPass = false; - if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); - numberOfReRenders += 1; - workInProgressHook = currentHook = null; - if (null != workInProgress2.updateQueue) { - var children2 = workInProgress2.updateQueue; - children2.lastEffect = null; - children2.events = null; - children2.stores = null; - null != children2.memoCache && (children2.memoCache.index = 0); - } - ReactSharedInternals.H = HooksDispatcherOnRerender; - children2 = Component(props, secondArg); - } while (didScheduleRenderPhaseUpdateDuringThisPass); - return children2; - } - function TransitionAwareHostComponent() { - var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0]; - maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; - dispatcher = dispatcher.useState()[0]; - (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024); - return maybeThenable; - } - function checkDidRenderIdHook() { - var didRenderIdHook = 0 !== localIdCounter; - localIdCounter = 0; - return didRenderIdHook; - } - function bailoutHooks(current, workInProgress2, lanes) { - workInProgress2.updateQueue = current.updateQueue; - workInProgress2.flags &= -2053; - current.lanes &= ~lanes; - } - function resetHooksOnUnwind(workInProgress2) { - if (didScheduleRenderPhaseUpdate) { - for (workInProgress2 = workInProgress2.memoizedState; null !== workInProgress2; ) { - var queue = workInProgress2.queue; - null !== queue && (queue.pending = null); - workInProgress2 = workInProgress2.next; - } - didScheduleRenderPhaseUpdate = false; - } - renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber = null; - didScheduleRenderPhaseUpdateDuringThisPass = false; - thenableIndexCounter$1 = localIdCounter = 0; - thenableState$1 = null; - } - function mountWorkInProgressHook() { - var hook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook; - return workInProgressHook; - } - function updateWorkInProgressHook() { - if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber.alternate; - nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; - } else nextCurrentHook = currentHook.next; - var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; - if (null !== nextWorkInProgressHook) - workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook; - else { - if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber.alternate) - throw Error(formatProdErrorMessage(467)); - throw Error(formatProdErrorMessage(310)); - } - currentHook = nextCurrentHook; - nextCurrentHook = { - memoizedState: currentHook.memoizedState, - baseState: currentHook.baseState, - baseQueue: currentHook.baseQueue, - queue: currentHook.queue, - next: null - }; - null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook; - } - return workInProgressHook; - } - function createFunctionComponentUpdateQueue() { - return { lastEffect: null, events: null, stores: null, memoCache: null }; - } - function useThenable(thenable) { - var index2 = thenableIndexCounter$1; - thenableIndexCounter$1 += 1; - null === thenableState$1 && (thenableState$1 = []); - thenable = trackUsedThenable(thenableState$1, thenable, index2); - index2 = currentlyRenderingFiber; - null === (null === workInProgressHook ? index2.memoizedState : workInProgressHook.next) && (index2 = index2.alternate, ReactSharedInternals.H = null === index2 || null === index2.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate); - return thenable; - } - function use(usable) { - if (null !== usable && "object" === typeof usable) { - if ("function" === typeof usable.then) return useThenable(usable); - if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable); - } - throw Error(formatProdErrorMessage(438, String(usable))); - } - function useMemoCache(size) { - var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue; - null !== updateQueue && (memoCache = updateQueue.memoCache); - if (null == memoCache) { - var current = currentlyRenderingFiber.alternate; - null !== current && (current = current.updateQueue, null !== current && (current = current.memoCache, null != current && (memoCache = { - data: current.data.map(function(array2) { - return array2.slice(); - }), - index: 0 - }))); - } - null == memoCache && (memoCache = { data: [], index: 0 }); - null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue); - updateQueue.memoCache = memoCache; - updateQueue = memoCache.data[memoCache.index]; - if (void 0 === updateQueue) - for (updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0; current < size; current++) - updateQueue[current] = REACT_MEMO_CACHE_SENTINEL; - memoCache.index++; - return updateQueue; - } - function basicStateReducer(state, action) { - return "function" === typeof action ? action(state) : action; - } - function updateReducer(reducer) { - var hook = updateWorkInProgressHook(); - return updateReducerImpl(hook, currentHook, reducer); - } - function updateReducerImpl(hook, current, reducer) { - var queue = hook.queue; - if (null === queue) throw Error(formatProdErrorMessage(311)); - queue.lastRenderedReducer = reducer; - var baseQueue = hook.baseQueue, pendingQueue = queue.pending; - if (null !== pendingQueue) { - if (null !== baseQueue) { - var baseFirst = baseQueue.next; - baseQueue.next = pendingQueue.next; - pendingQueue.next = baseFirst; - } - current.baseQueue = baseQueue = pendingQueue; - queue.pending = null; - } - pendingQueue = hook.baseState; - if (null === baseQueue) hook.memoizedState = pendingQueue; - else { - current = baseQueue.next; - var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current, didReadFromEntangledAsyncAction$32 = false; - do { - var updateLane = update.lane & -536870913; - if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) { - var revertLane = update.revertLane; - if (0 === revertLane) - null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = { - lane: 0, - revertLane: 0, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction$32 = true); - else if ((renderLanes & revertLane) === revertLane) { - update = update.next; - revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction$32 = true); - continue; - } else - updateLane = { - lane: 0, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane; - updateLane = update.action; - shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane); - pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane); - } else - revertLane = { - lane: updateLane, - revertLane: update.revertLane, - action: update.action, - hasEagerState: update.hasEagerState, - eagerState: update.eagerState, - next: null - }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane; - update = update.next; - } while (null !== update && update !== current); - null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst; - if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction$32 && (reducer = currentEntangledActionThenable, null !== reducer))) - throw reducer; - hook.memoizedState = pendingQueue; - hook.baseState = baseFirst; - hook.baseQueue = newBaseQueueLast; - queue.lastRenderedState = pendingQueue; - } - null === baseQueue && (queue.lanes = 0); - return [hook.memoizedState, queue.dispatch]; - } - function rerenderReducer(reducer) { - var hook = updateWorkInProgressHook(), queue = hook.queue; - if (null === queue) throw Error(formatProdErrorMessage(311)); - queue.lastRenderedReducer = reducer; - var dispatch2 = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState; - if (null !== lastRenderPhaseUpdate) { - queue.pending = null; - var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next; - do - newState = reducer(newState, update.action), update = update.next; - while (update !== lastRenderPhaseUpdate); - objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true); - hook.memoizedState = newState; - null === hook.baseQueue && (hook.baseState = newState); - queue.lastRenderedState = newState; - } - return [newState, dispatch2]; - } - function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; - if (isHydrating$jscomp$0) { - if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407)); - getServerSnapshot = getServerSnapshot(); - } else getServerSnapshot = getSnapshot(); - var snapshotChanged = !objectIs( - (currentHook || hook).memoizedState, - getServerSnapshot - ); - snapshotChanged && (hook.memoizedState = getServerSnapshot, didReceiveUpdate = true); - hook = hook.queue; - var create2 = subscribeToStore.bind(null, fiber, hook, subscribe); - updateEffectImpl(2048, 8, create2, [subscribe]); - if (hook.getSnapshot !== getSnapshot || snapshotChanged || null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1) { - fiber.flags |= 2048; - pushSimpleEffect( - 9, - createEffectInstance(), - updateStoreInstance.bind( - null, - fiber, - hook, - getServerSnapshot, - getSnapshot - ), - null - ); - if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349)); - isHydrating$jscomp$0 || 0 !== (renderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); - } - return getServerSnapshot; - } - function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { - fiber.flags |= 16384; - fiber = { getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber.updateQueue; - null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber)); - } - function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) { - inst.value = nextSnapshot; - inst.getSnapshot = getSnapshot; - checkIfSnapshotChanged(inst) && forceStoreRerender(fiber); - } - function subscribeToStore(fiber, inst, subscribe) { - return subscribe(function() { - checkIfSnapshotChanged(inst) && forceStoreRerender(fiber); - }); - } - function checkIfSnapshotChanged(inst) { - var latestGetSnapshot = inst.getSnapshot; - inst = inst.value; - try { - var nextValue = latestGetSnapshot(); - return !objectIs(inst, nextValue); - } catch (error) { - return true; - } - } - function forceStoreRerender(fiber) { - var root3 = enqueueConcurrentRenderForLane(fiber, 2); - null !== root3 && scheduleUpdateOnFiber(root3, fiber, 2); - } - function mountStateImpl(initialState) { - var hook = mountWorkInProgressHook(); - if ("function" === typeof initialState) { - var initialStateInitializer = initialState; - initialState = initialStateInitializer(); - if (shouldDoubleInvokeUserFnsInHooksDEV) { - setIsStrictModeForDevtools(true); - try { - initialStateInitializer(); - } finally { - setIsStrictModeForDevtools(false); - } - } - } - hook.memoizedState = hook.baseState = initialState; - hook.queue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialState - }; - return hook; - } - function updateOptimisticImpl(hook, current, passthrough, reducer) { - hook.baseState = passthrough; - return updateReducerImpl( - hook, - currentHook, - "function" === typeof reducer ? reducer : basicStateReducer - ); - } - function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) { - if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485)); - fiber = actionQueue.action; - if (null !== fiber) { - var actionNode = { - payload, - action: fiber, - next: null, - isTransition: true, - status: "pending", - value: null, - reason: null, - listeners: [], - then: function(listener) { - actionNode.listeners.push(listener); - } - }; - null !== ReactSharedInternals.T ? setPendingState(true) : actionNode.isTransition = false; - setState(actionNode); - setPendingState = actionQueue.pending; - null === setPendingState ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode); - } - } - function runActionStateAction(actionQueue, node) { - var action = node.action, payload = node.payload, prevState = actionQueue.state; - if (node.isTransition) { - var prevTransition = ReactSharedInternals.T, currentTransition = {}; - ReactSharedInternals.T = currentTransition; - try { - var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); - handleActionReturnValue(actionQueue, node, returnValue); - } catch (error) { - onActionError(actionQueue, node, error); - } finally { - ReactSharedInternals.T = prevTransition; - } - } else - try { - prevTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$38) { - onActionError(actionQueue, node, error$38); - } - } - function handleActionReturnValue(actionQueue, node, returnValue) { - null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then ? returnValue.then( - function(nextState) { - onActionSuccess(actionQueue, node, nextState); - }, - function(error) { - return onActionError(actionQueue, node, error); - } - ) : onActionSuccess(actionQueue, node, returnValue); - } - function onActionSuccess(actionQueue, actionNode, nextState) { - actionNode.status = "fulfilled"; - actionNode.value = nextState; - notifyActionListeners(actionNode); - actionQueue.state = nextState; - actionNode = actionQueue.pending; - null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState))); - } - function onActionError(actionQueue, actionNode, error) { - var last = actionQueue.pending; - actionQueue.pending = null; - if (null !== last) { - last = last.next; - do - actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next; - while (actionNode !== last); - } - actionQueue.action = null; - } - function notifyActionListeners(actionNode) { - actionNode = actionNode.listeners; - for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); - } - function actionStateReducer(oldState, newState) { - return newState; - } - function mountActionState(action, initialStateProp) { - if (isHydrating) { - var ssrFormState = workInProgressRoot.formState; - if (null !== ssrFormState) { - a: { - var JSCompiler_inline_result = currentlyRenderingFiber; - if (isHydrating) { - if (nextHydratableInstance) { - b: { - var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance; - for (var inRootOrSingleton = rootOrSingletonContext; 8 !== JSCompiler_inline_result$jscomp$0.nodeType; ) { - if (!inRootOrSingleton) { - JSCompiler_inline_result$jscomp$0 = null; - break b; - } - JSCompiler_inline_result$jscomp$0 = getNextHydratable( - JSCompiler_inline_result$jscomp$0.nextSibling - ); - if (null === JSCompiler_inline_result$jscomp$0) { - JSCompiler_inline_result$jscomp$0 = null; - break b; - } - } - inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data; - JSCompiler_inline_result$jscomp$0 = "F!" === inRootOrSingleton || "F" === inRootOrSingleton ? JSCompiler_inline_result$jscomp$0 : null; - } - if (JSCompiler_inline_result$jscomp$0) { - nextHydratableInstance = getNextHydratable( - JSCompiler_inline_result$jscomp$0.nextSibling - ); - JSCompiler_inline_result = "F!" === JSCompiler_inline_result$jscomp$0.data; - break a; - } - } - throwOnHydrationMismatch(JSCompiler_inline_result); - } - JSCompiler_inline_result = false; - } - JSCompiler_inline_result && (initialStateProp = ssrFormState[0]); - } - } - ssrFormState = mountWorkInProgressHook(); - ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp; - JSCompiler_inline_result = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: actionStateReducer, - lastRenderedState: initialStateProp - }; - ssrFormState.queue = JSCompiler_inline_result; - ssrFormState = dispatchSetState.bind( - null, - currentlyRenderingFiber, - JSCompiler_inline_result - ); - JSCompiler_inline_result.dispatch = ssrFormState; - JSCompiler_inline_result = mountStateImpl(false); - inRootOrSingleton = dispatchOptimisticSetState.bind( - null, - currentlyRenderingFiber, - false, - JSCompiler_inline_result.queue - ); - JSCompiler_inline_result = mountWorkInProgressHook(); - JSCompiler_inline_result$jscomp$0 = { - state: initialStateProp, - dispatch: null, - action, - pending: null - }; - JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0; - ssrFormState = dispatchActionState.bind( - null, - currentlyRenderingFiber, - JSCompiler_inline_result$jscomp$0, - inRootOrSingleton, - ssrFormState - ); - JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState; - JSCompiler_inline_result.memoizedState = action; - return [initialStateProp, ssrFormState, false]; - } - function updateActionState(action) { - var stateHook = updateWorkInProgressHook(); - return updateActionStateImpl(stateHook, currentHook, action); - } - function updateActionStateImpl(stateHook, currentStateHook, action) { - currentStateHook = updateReducerImpl( - stateHook, - currentStateHook, - actionStateReducer - )[0]; - stateHook = updateReducer(basicStateReducer)[0]; - if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then) - try { - var state = useThenable(currentStateHook); - } catch (x2) { - if (x2 === SuspenseException) throw SuspenseActionException; - throw x2; - } - else state = currentStateHook; - currentStateHook = updateWorkInProgressHook(); - var actionQueue = currentStateHook.queue, dispatch2 = actionQueue.dispatch; - action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect( - 9, - createEffectInstance(), - actionStateActionEffect.bind(null, actionQueue, action), - null - )); - return [state, dispatch2, stateHook]; - } - function actionStateActionEffect(actionQueue, action) { - actionQueue.action = action; - } - function rerenderActionState(action) { - var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook; - if (null !== currentStateHook) - return updateActionStateImpl(stateHook, currentStateHook, action); - updateWorkInProgressHook(); - stateHook = stateHook.memoizedState; - currentStateHook = updateWorkInProgressHook(); - var dispatch2 = currentStateHook.queue.dispatch; - currentStateHook.memoizedState = action; - return [stateHook, dispatch2, false]; - } - function pushSimpleEffect(tag, inst, create2, createDeps) { - tag = { tag, create: create2, deps: createDeps, inst, next: null }; - inst = currentlyRenderingFiber.updateQueue; - null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst); - create2 = inst.lastEffect; - null === create2 ? inst.lastEffect = tag.next = tag : (createDeps = create2.next, create2.next = tag, tag.next = createDeps, inst.lastEffect = tag); - return tag; - } - function createEffectInstance() { - return { destroy: void 0, resource: void 0 }; - } - function updateRef() { - return updateWorkInProgressHook().memoizedState; - } - function mountEffectImpl(fiberFlags, hookFlags, create2, createDeps) { - var hook = mountWorkInProgressHook(); - createDeps = void 0 === createDeps ? null : createDeps; - currentlyRenderingFiber.flags |= fiberFlags; - hook.memoizedState = pushSimpleEffect( - 1 | hookFlags, - createEffectInstance(), - create2, - createDeps - ); - } - function updateEffectImpl(fiberFlags, hookFlags, create2, deps) { - var hook = updateWorkInProgressHook(); - deps = void 0 === deps ? null : deps; - var inst = hook.memoizedState.inst; - null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create2, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect( - 1 | hookFlags, - inst, - create2, - deps - )); - } - function mountEffect(create2, createDeps) { - mountEffectImpl(8390656, 8, create2, createDeps); - } - function updateEffect(create2, createDeps) { - updateEffectImpl(2048, 8, create2, createDeps); - } - function updateInsertionEffect(create2, deps) { - return updateEffectImpl(4, 2, create2, deps); - } - function updateLayoutEffect(create2, deps) { - return updateEffectImpl(4, 4, create2, deps); - } - function imperativeHandleEffect(create2, ref) { - if ("function" === typeof ref) { - create2 = create2(); - var refCleanup = ref(create2); - return function() { - "function" === typeof refCleanup ? refCleanup() : ref(null); - }; - } - if (null !== ref && void 0 !== ref) - return create2 = create2(), ref.current = create2, function() { - ref.current = null; - }; - } - function updateImperativeHandle(ref, create2, deps) { - deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; - updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create2, ref), deps); - } - function mountDebugValue() { - } - function updateCallback(callback, deps) { - var hook = updateWorkInProgressHook(); - deps = void 0 === deps ? null : deps; - var prevState = hook.memoizedState; - if (null !== deps && areHookInputsEqual(deps, prevState[1])) - return prevState[0]; - hook.memoizedState = [callback, deps]; - return callback; - } - function updateMemo(nextCreate, deps) { - var hook = updateWorkInProgressHook(); - deps = void 0 === deps ? null : deps; - var prevState = hook.memoizedState; - if (null !== deps && areHookInputsEqual(deps, prevState[1])) - return prevState[0]; - prevState = nextCreate(); - if (shouldDoubleInvokeUserFnsInHooksDEV) { - setIsStrictModeForDevtools(true); - try { - nextCreate(); - } finally { - setIsStrictModeForDevtools(false); - } - } - hook.memoizedState = [prevState, deps]; - return prevState; - } - function mountDeferredValueImpl(hook, value2, initialValue) { - if (void 0 === initialValue || 0 !== (renderLanes & 1073741824)) - return hook.memoizedState = value2; - hook.memoizedState = initialValue; - hook = requestDeferredLane(); - currentlyRenderingFiber.lanes |= hook; - workInProgressRootSkippedLanes |= hook; - return initialValue; - } - function updateDeferredValueImpl(hook, prevValue, value2, initialValue) { - if (objectIs(value2, prevValue)) return value2; - if (null !== currentTreeHiddenStackCursor.current) - return hook = mountDeferredValueImpl(hook, value2, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = true), hook; - if (0 === (renderLanes & 42)) - return didReceiveUpdate = true, hook.memoizedState = value2; - hook = requestDeferredLane(); - currentlyRenderingFiber.lanes |= hook; - workInProgressRootSkippedLanes |= hook; - return prevValue; - } - function startTransition(fiber, queue, pendingState, finishedState, callback) { - var previousPriority = ReactDOMSharedInternals.p; - ReactDOMSharedInternals.p = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactSharedInternals.T, currentTransition = {}; - ReactSharedInternals.T = currentTransition; - dispatchOptimisticSetState(fiber, false, queue, pendingState); - try { - var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); - if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) { - var thenableForFinishedState = chainThenableValue( - returnValue, - finishedState - ); - dispatchSetStateInternal( - fiber, - queue, - thenableForFinishedState, - requestUpdateLane(fiber) - ); - } else - dispatchSetStateInternal( - fiber, - queue, - finishedState, - requestUpdateLane(fiber) - ); - } catch (error) { - dispatchSetStateInternal( - fiber, - queue, - { then: function() { - }, status: "rejected", reason: error }, - requestUpdateLane() - ); - } finally { - ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition; - } - } - function noop$2() { - } - function startHostTransition(formFiber, pendingState, action, formData) { - if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476)); - var queue = ensureFormComponentIsStateful(formFiber).queue; - startTransition( - formFiber, - queue, - pendingState, - sharedNotPendingObject, - null === action ? noop$2 : function() { - requestFormReset$1(formFiber); - return action(formData); - } - ); - } - function ensureFormComponentIsStateful(formFiber) { - var existingStateHook = formFiber.memoizedState; - if (null !== existingStateHook) return existingStateHook; - existingStateHook = { - memoizedState: sharedNotPendingObject, - baseState: sharedNotPendingObject, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: sharedNotPendingObject - }, - next: null - }; - var initialResetState = {}; - existingStateHook.next = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }, - next: null - }; - formFiber.memoizedState = existingStateHook; - formFiber = formFiber.alternate; - null !== formFiber && (formFiber.memoizedState = existingStateHook); - return existingStateHook; - } - function requestFormReset$1(formFiber) { - var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; - dispatchSetStateInternal(formFiber, resetStateQueue, {}, requestUpdateLane()); - } - function useHostTransitionStatus() { - return readContext(HostTransitionContext); - } - function updateId() { - return updateWorkInProgressHook().memoizedState; - } - function updateRefresh() { - return updateWorkInProgressHook().memoizedState; - } - function refreshCache(fiber) { - for (var provider = fiber.return; null !== provider; ) { - switch (provider.tag) { - case 24: - case 3: - var lane = requestUpdateLane(); - fiber = createUpdate(lane); - var root$41 = enqueueUpdate(provider, fiber, lane); - null !== root$41 && (scheduleUpdateOnFiber(root$41, provider, lane), entangleTransitions(root$41, provider, lane)); - provider = { cache: createCache() }; - fiber.payload = provider; - return; - } - provider = provider.return; - } - } - function dispatchReducerAction(fiber, queue, action) { - var lane = requestUpdateLane(); - action = { - lane, - revertLane: 0, - action, - hasEagerState: false, - eagerState: null, - next: null - }; - isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, action) : (action = enqueueConcurrentHookUpdate(fiber, queue, action, lane), null !== action && (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane))); - } - function dispatchSetState(fiber, queue, action) { - var lane = requestUpdateLane(); - dispatchSetStateInternal(fiber, queue, action, lane); - } - function dispatchSetStateInternal(fiber, queue, action, lane) { - var update = { - lane, - revertLane: 0, - action, - hasEagerState: false, - eagerState: null, - next: null - }; - if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update); - else { - var alternate = fiber.alternate; - if (0 === fiber.lanes && (null === alternate || 0 === alternate.lanes) && (alternate = queue.lastRenderedReducer, null !== alternate)) - try { - var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action); - update.hasEagerState = true; - update.eagerState = eagerState; - if (objectIs(eagerState, currentState)) - return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false; - } catch (error) { - } finally { - } - action = enqueueConcurrentHookUpdate(fiber, queue, update, lane); - if (null !== action) - return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), true; - } - return false; - } - function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { - action = { - lane: 2, - revertLane: requestTransitionLane(), - action, - hasEagerState: false, - eagerState: null, - next: null - }; - if (isRenderPhaseUpdate(fiber)) { - if (throwIfDuringRender) throw Error(formatProdErrorMessage(479)); - } else - throwIfDuringRender = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - 2 - ), null !== throwIfDuringRender && scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2); - } - function isRenderPhaseUpdate(fiber) { - var alternate = fiber.alternate; - return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber; - } - function enqueueRenderPhaseUpdate(queue, update) { - didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true; - var pending = queue.pending; - null === pending ? update.next = update : (update.next = pending.next, pending.next = update); - queue.pending = update; - } - function entangleTransitionUpdate(root3, queue, lane) { - if (0 !== (lane & 4194048)) { - var queueLanes = queue.lanes; - queueLanes &= root3.pendingLanes; - lane |= queueLanes; - queue.lanes = lane; - markRootEntangled(root3, lane); - } - } - var ContextOnlyDispatcher = { - readContext, - use, - useCallback: throwInvalidHookError, - useContext: throwInvalidHookError, - useEffect: throwInvalidHookError, - useImperativeHandle: throwInvalidHookError, - useLayoutEffect: throwInvalidHookError, - useInsertionEffect: throwInvalidHookError, - useMemo: throwInvalidHookError, - useReducer: throwInvalidHookError, - useRef: throwInvalidHookError, - useState: throwInvalidHookError, - useDebugValue: throwInvalidHookError, - useDeferredValue: throwInvalidHookError, - useTransition: throwInvalidHookError, - useSyncExternalStore: throwInvalidHookError, - useId: throwInvalidHookError, - useHostTransitionStatus: throwInvalidHookError, - useFormState: throwInvalidHookError, - useActionState: throwInvalidHookError, - useOptimistic: throwInvalidHookError, - useMemoCache: throwInvalidHookError, - useCacheRefresh: throwInvalidHookError - }; - var HooksDispatcherOnMount = { - readContext, - use, - useCallback: function(callback, deps) { - mountWorkInProgressHook().memoizedState = [ - callback, - void 0 === deps ? null : deps - ]; - return callback; - }, - useContext: readContext, - useEffect: mountEffect, - useImperativeHandle: function(ref, create2, deps) { - deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; - mountEffectImpl( - 4194308, - 4, - imperativeHandleEffect.bind(null, create2, ref), - deps - ); - }, - useLayoutEffect: function(create2, deps) { - return mountEffectImpl(4194308, 4, create2, deps); - }, - useInsertionEffect: function(create2, deps) { - mountEffectImpl(4, 2, create2, deps); - }, - useMemo: function(nextCreate, deps) { - var hook = mountWorkInProgressHook(); - deps = void 0 === deps ? null : deps; - var nextValue = nextCreate(); - if (shouldDoubleInvokeUserFnsInHooksDEV) { - setIsStrictModeForDevtools(true); - try { - nextCreate(); - } finally { - setIsStrictModeForDevtools(false); - } - } - hook.memoizedState = [nextValue, deps]; - return nextValue; - }, - useReducer: function(reducer, initialArg, init2) { - var hook = mountWorkInProgressHook(); - if (void 0 !== init2) { - var initialState = init2(initialArg); - if (shouldDoubleInvokeUserFnsInHooksDEV) { - setIsStrictModeForDevtools(true); - try { - init2(initialArg); - } finally { - setIsStrictModeForDevtools(false); - } - } - } else initialState = initialArg; - hook.memoizedState = hook.baseState = initialState; - reducer = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: reducer, - lastRenderedState: initialState - }; - hook.queue = reducer; - reducer = reducer.dispatch = dispatchReducerAction.bind( - null, - currentlyRenderingFiber, - reducer - ); - return [hook.memoizedState, reducer]; - }, - useRef: function(initialValue) { - var hook = mountWorkInProgressHook(); - initialValue = { current: initialValue }; - return hook.memoizedState = initialValue; - }, - useState: function(initialState) { - initialState = mountStateImpl(initialState); - var queue = initialState.queue, dispatch2 = dispatchSetState.bind(null, currentlyRenderingFiber, queue); - queue.dispatch = dispatch2; - return [initialState.memoizedState, dispatch2]; - }, - useDebugValue: mountDebugValue, - useDeferredValue: function(value2, initialValue) { - var hook = mountWorkInProgressHook(); - return mountDeferredValueImpl(hook, value2, initialValue); - }, - useTransition: function() { - var stateHook = mountStateImpl(false); - stateHook = startTransition.bind( - null, - currentlyRenderingFiber, - stateHook.queue, - true, - false - ); - mountWorkInProgressHook().memoizedState = stateHook; - return [false, stateHook]; - }, - useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); - if (isHydrating) { - if (void 0 === getServerSnapshot) - throw Error(formatProdErrorMessage(407)); - getServerSnapshot = getServerSnapshot(); - } else { - getServerSnapshot = getSnapshot(); - if (null === workInProgressRoot) - throw Error(formatProdErrorMessage(349)); - 0 !== (workInProgressRootRenderLanes & 124) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); - } - hook.memoizedState = getServerSnapshot; - var inst = { value: getServerSnapshot, getSnapshot }; - hook.queue = inst; - mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [ - subscribe - ]); - fiber.flags |= 2048; - pushSimpleEffect( - 9, - createEffectInstance(), - updateStoreInstance.bind( - null, - fiber, - inst, - getServerSnapshot, - getSnapshot - ), - null - ); - return getServerSnapshot; - }, - useId: function() { - var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix; - if (isHydrating) { - var JSCompiler_inline_result = treeContextOverflow; - var idWithLeadingBit = treeContextId; - JSCompiler_inline_result = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + JSCompiler_inline_result; - identifierPrefix = "\xAB" + identifierPrefix + "R" + JSCompiler_inline_result; - JSCompiler_inline_result = localIdCounter++; - 0 < JSCompiler_inline_result && (identifierPrefix += "H" + JSCompiler_inline_result.toString(32)); - identifierPrefix += "\xBB"; - } else - JSCompiler_inline_result = globalClientIdCounter++, identifierPrefix = "\xAB" + identifierPrefix + "r" + JSCompiler_inline_result.toString(32) + "\xBB"; - return hook.memoizedState = identifierPrefix; - }, - useHostTransitionStatus, - useFormState: mountActionState, - useActionState: mountActionState, - useOptimistic: function(passthrough) { - var hook = mountWorkInProgressHook(); - hook.memoizedState = hook.baseState = passthrough; - var queue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: null, - lastRenderedState: null - }; - hook.queue = queue; - hook = dispatchOptimisticSetState.bind( - null, - currentlyRenderingFiber, - true, - queue - ); - queue.dispatch = hook; - return [passthrough, hook]; - }, - useMemoCache, - useCacheRefresh: function() { - return mountWorkInProgressHook().memoizedState = refreshCache.bind( - null, - currentlyRenderingFiber - ); - } - }; - var HooksDispatcherOnUpdate = { - readContext, - use, - useCallback: updateCallback, - useContext: readContext, - useEffect: updateEffect, - useImperativeHandle: updateImperativeHandle, - useInsertionEffect: updateInsertionEffect, - useLayoutEffect: updateLayoutEffect, - useMemo: updateMemo, - useReducer: updateReducer, - useRef: updateRef, - useState: function() { - return updateReducer(basicStateReducer); - }, - useDebugValue: mountDebugValue, - useDeferredValue: function(value2, initialValue) { - var hook = updateWorkInProgressHook(); - return updateDeferredValueImpl( - hook, - currentHook.memoizedState, - value2, - initialValue - ); - }, - useTransition: function() { - var booleanOrThenable = updateReducer(basicStateReducer)[0], start2 = updateWorkInProgressHook().memoizedState; - return [ - "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable), - start2 - ]; - }, - useSyncExternalStore: updateSyncExternalStore, - useId: updateId, - useHostTransitionStatus, - useFormState: updateActionState, - useActionState: updateActionState, - useOptimistic: function(passthrough, reducer) { - var hook = updateWorkInProgressHook(); - return updateOptimisticImpl(hook, currentHook, passthrough, reducer); - }, - useMemoCache, - useCacheRefresh: updateRefresh - }; - var HooksDispatcherOnRerender = { - readContext, - use, - useCallback: updateCallback, - useContext: readContext, - useEffect: updateEffect, - useImperativeHandle: updateImperativeHandle, - useInsertionEffect: updateInsertionEffect, - useLayoutEffect: updateLayoutEffect, - useMemo: updateMemo, - useReducer: rerenderReducer, - useRef: updateRef, - useState: function() { - return rerenderReducer(basicStateReducer); - }, - useDebugValue: mountDebugValue, - useDeferredValue: function(value2, initialValue) { - var hook = updateWorkInProgressHook(); - return null === currentHook ? mountDeferredValueImpl(hook, value2, initialValue) : updateDeferredValueImpl( - hook, - currentHook.memoizedState, - value2, - initialValue - ); - }, - useTransition: function() { - var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start2 = updateWorkInProgressHook().memoizedState; - return [ - "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable), - start2 - ]; - }, - useSyncExternalStore: updateSyncExternalStore, - useId: updateId, - useHostTransitionStatus, - useFormState: rerenderActionState, - useActionState: rerenderActionState, - useOptimistic: function(passthrough, reducer) { - var hook = updateWorkInProgressHook(); - if (null !== currentHook) - return updateOptimisticImpl(hook, currentHook, passthrough, reducer); - hook.baseState = passthrough; - return [passthrough, hook.queue.dispatch]; - }, - useMemoCache, - useCacheRefresh: updateRefresh - }; - var thenableState = null; - var thenableIndexCounter = 0; - function unwrapThenable(thenable) { - var index2 = thenableIndexCounter; - thenableIndexCounter += 1; - null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, thenable, index2); - } - function coerceRef(workInProgress2, element) { - element = element.props.ref; - workInProgress2.ref = void 0 !== element ? element : null; - } - function throwOnInvalidObjectType(returnFiber, newChild) { - if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) - throw Error(formatProdErrorMessage(525)); - returnFiber = Object.prototype.toString.call(newChild); - throw Error( - formatProdErrorMessage( - 31, - "[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber - ) - ); - } - function resolveLazy(lazyType) { - var init2 = lazyType._init; - return init2(lazyType._payload); - } - function createChildReconciler(shouldTrackSideEffects) { - function deleteChild(returnFiber, childToDelete) { - if (shouldTrackSideEffects) { - var deletions = returnFiber.deletions; - null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete); - } - } - function deleteRemainingChildren(returnFiber, currentFirstChild) { - if (!shouldTrackSideEffects) return null; - for (; null !== currentFirstChild; ) - deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling; - return null; - } - function mapRemainingChildren(currentFirstChild) { - for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; ) - null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling; - return existingChildren; - } - function useFiber(fiber, pendingProps) { - fiber = createWorkInProgress(fiber, pendingProps); - fiber.index = 0; - fiber.sibling = null; - return fiber; - } - function placeChild(newFiber, lastPlacedIndex, newIndex) { - newFiber.index = newIndex; - if (!shouldTrackSideEffects) - return newFiber.flags |= 1048576, lastPlacedIndex; - newIndex = newFiber.alternate; - if (null !== newIndex) - return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex; - newFiber.flags |= 67108866; - return lastPlacedIndex; - } - function placeSingleChild(newFiber) { - shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866); - return newFiber; - } - function updateTextNode(returnFiber, current, textContent, lanes) { - if (null === current || 6 !== current.tag) - return current = createFiberFromText(textContent, returnFiber.mode, lanes), current.return = returnFiber, current; - current = useFiber(current, textContent); - current.return = returnFiber; - return current; - } - function updateElement(returnFiber, current, element, lanes) { - var elementType = element.type; - if (elementType === REACT_FRAGMENT_TYPE) - return updateFragment( - returnFiber, - current, - element.props.children, - lanes, - element.key - ); - if (null !== current && (current.elementType === elementType || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type)) - return current = useFiber(current, element.props), coerceRef(current, element), current.return = returnFiber, current; - current = createFiberFromTypeAndProps( - element.type, - element.key, - element.props, - null, - returnFiber.mode, - lanes - ); - coerceRef(current, element); - current.return = returnFiber; - return current; - } - function updatePortal(returnFiber, current, portal, lanes) { - if (null === current || 4 !== current.tag || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) - return current = createFiberFromPortal(portal, returnFiber.mode, lanes), current.return = returnFiber, current; - current = useFiber(current, portal.children || []); - current.return = returnFiber; - return current; - } - function updateFragment(returnFiber, current, fragment, lanes, key) { - if (null === current || 7 !== current.tag) - return current = createFiberFromFragment( - fragment, - returnFiber.mode, - lanes, - key - ), current.return = returnFiber, current; - current = useFiber(current, fragment); - current.return = returnFiber; - return current; - } - function createChild(returnFiber, newChild, lanes) { - if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) - return newChild = createFiberFromText( - "" + newChild, - returnFiber.mode, - lanes - ), newChild.return = returnFiber, newChild; - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return lanes = createFiberFromTypeAndProps( - newChild.type, - newChild.key, - newChild.props, - null, - returnFiber.mode, - lanes - ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes; - case REACT_PORTAL_TYPE: - return newChild = createFiberFromPortal( - newChild, - returnFiber.mode, - lanes - ), newChild.return = returnFiber, newChild; - case REACT_LAZY_TYPE: - var init2 = newChild._init; - newChild = init2(newChild._payload); - return createChild(returnFiber, newChild, lanes); - } - if (isArrayImpl(newChild) || getIteratorFn(newChild)) - return newChild = createFiberFromFragment( - newChild, - returnFiber.mode, - lanes, - null - ), newChild.return = returnFiber, newChild; - if ("function" === typeof newChild.then) - return createChild(returnFiber, unwrapThenable(newChild), lanes); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return createChild( - returnFiber, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); - } - return null; - } - function updateSlot(returnFiber, oldFiber, newChild, lanes) { - var key = null !== oldFiber ? oldFiber.key : null; - if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) - return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; - case REACT_PORTAL_TYPE: - return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null; - case REACT_LAZY_TYPE: - return key = newChild._init, newChild = key(newChild._payload), updateSlot(returnFiber, oldFiber, newChild, lanes); - } - if (isArrayImpl(newChild) || getIteratorFn(newChild)) - return null !== key ? null : updateFragment(returnFiber, oldFiber, newChild, lanes, null); - if ("function" === typeof newChild.then) - return updateSlot( - returnFiber, - oldFiber, - unwrapThenable(newChild), - lanes - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return updateSlot( - returnFiber, - oldFiber, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); - } - return null; - } - function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) { - if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild) - return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return existingChildren = existingChildren.get( - null === newChild.key ? newIdx : newChild.key - ) || null, updateElement(returnFiber, existingChildren, newChild, lanes); - case REACT_PORTAL_TYPE: - return existingChildren = existingChildren.get( - null === newChild.key ? newIdx : newChild.key - ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes); - case REACT_LAZY_TYPE: - var init2 = newChild._init; - newChild = init2(newChild._payload); - return updateFromMap( - existingChildren, - returnFiber, - newIdx, - newChild, - lanes - ); - } - if (isArrayImpl(newChild) || getIteratorFn(newChild)) - return existingChildren = existingChildren.get(newIdx) || null, updateFragment(returnFiber, existingChildren, newChild, lanes, null); - if ("function" === typeof newChild.then) - return updateFromMap( - existingChildren, - returnFiber, - newIdx, - unwrapThenable(newChild), - lanes - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return updateFromMap( - existingChildren, - returnFiber, - newIdx, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); - } - return null; - } - function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) { - for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) { - oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling; - var newFiber = updateSlot( - returnFiber, - oldFiber, - newChildren[newIdx], - lanes - ); - if (null === newFiber) { - null === oldFiber && (oldFiber = nextOldFiber); - break; - } - shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber); - currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); - null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber; - previousNewFiber = newFiber; - oldFiber = nextOldFiber; - } - if (newIdx === newChildren.length) - return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild; - if (null === oldFiber) { - for (; newIdx < newChildren.length; newIdx++) - oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (currentFirstChild = placeChild( - oldFiber, - currentFirstChild, - newIdx - ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++) - nextOldFiber = updateFromMap( - oldFiber, - returnFiber, - newIdx, - newChildren[newIdx], - lanes - ), null !== nextOldFiber && (shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete( - null === nextOldFiber.key ? newIdx : nextOldFiber.key - ), currentFirstChild = placeChild( - nextOldFiber, - currentFirstChild, - newIdx - ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber); - shouldTrackSideEffects && oldFiber.forEach(function(child) { - return deleteChild(returnFiber, child); - }); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) { - if (null == newChildren) throw Error(formatProdErrorMessage(151)); - for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) { - oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling; - var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes); - if (null === newFiber) { - null === oldFiber && (oldFiber = nextOldFiber); - break; - } - shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber); - currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); - null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber; - previousNewFiber = newFiber; - oldFiber = nextOldFiber; - } - if (step.done) - return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild; - if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildren.next()) - step = createChild(returnFiber, step.value, lanes), null !== step && (currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next()) - step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes), null !== step && (shouldTrackSideEffects && null !== step.alternate && oldFiber.delete(null === step.key ? newIdx : step.key), currentFirstChild = placeChild(step, currentFirstChild, newIdx), null === previousNewFiber ? resultingFirstChild = step : previousNewFiber.sibling = step, previousNewFiber = step); - shouldTrackSideEffects && oldFiber.forEach(function(child) { - return deleteChild(returnFiber, child); - }); - isHydrating && pushTreeFork(returnFiber, newIdx); - return resultingFirstChild; - } - function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) { - "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (newChild = newChild.props.children); - if ("object" === typeof newChild && null !== newChild) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - a: { - for (var key = newChild.key; null !== currentFirstChild; ) { - if (currentFirstChild.key === key) { - key = newChild.type; - if (key === REACT_FRAGMENT_TYPE) { - if (7 === currentFirstChild.tag) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber( - currentFirstChild, - newChild.props.children - ); - lanes.return = returnFiber; - returnFiber = lanes; - break a; - } - } else if (currentFirstChild.elementType === key || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber(currentFirstChild, newChild.props); - coerceRef(lanes, newChild); - lanes.return = returnFiber; - returnFiber = lanes; - break a; - } - deleteRemainingChildren(returnFiber, currentFirstChild); - break; - } else deleteChild(returnFiber, currentFirstChild); - currentFirstChild = currentFirstChild.sibling; - } - newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment( - newChild.props.children, - returnFiber.mode, - lanes, - newChild.key - ), lanes.return = returnFiber, returnFiber = lanes) : (lanes = createFiberFromTypeAndProps( - newChild.type, - newChild.key, - newChild.props, - null, - returnFiber.mode, - lanes - ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = lanes); - } - return placeSingleChild(returnFiber); - case REACT_PORTAL_TYPE: - a: { - for (key = newChild.key; null !== currentFirstChild; ) { - if (currentFirstChild.key === key) - if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === newChild.containerInfo && currentFirstChild.stateNode.implementation === newChild.implementation) { - deleteRemainingChildren( - returnFiber, - currentFirstChild.sibling - ); - lanes = useFiber(currentFirstChild, newChild.children || []); - lanes.return = returnFiber; - returnFiber = lanes; - break a; - } else { - deleteRemainingChildren(returnFiber, currentFirstChild); - break; - } - else deleteChild(returnFiber, currentFirstChild); - currentFirstChild = currentFirstChild.sibling; - } - lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes); - lanes.return = returnFiber; - returnFiber = lanes; - } - return placeSingleChild(returnFiber); - case REACT_LAZY_TYPE: - return key = newChild._init, newChild = key(newChild._payload), reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - newChild, - lanes - ); - } - if (isArrayImpl(newChild)) - return reconcileChildrenArray( - returnFiber, - currentFirstChild, - newChild, - lanes - ); - if (getIteratorFn(newChild)) { - key = getIteratorFn(newChild); - if ("function" !== typeof key) throw Error(formatProdErrorMessage(150)); - newChild = key.call(newChild); - return reconcileChildrenIterator( - returnFiber, - currentFirstChild, - newChild, - lanes - ); - } - if ("function" === typeof newChild.then) - return reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - unwrapThenable(newChild), - lanes - ); - if (newChild.$$typeof === REACT_CONTEXT_TYPE) - return reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild), - lanes - ); - throwOnInvalidObjectType(returnFiber, newChild); - } - return "string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild ? (newChild = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling), lanes = useFiber(currentFirstChild, newChild), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(newChild, returnFiber.mode, lanes), lanes.return = returnFiber, returnFiber = lanes), placeSingleChild(returnFiber)) : deleteRemainingChildren(returnFiber, currentFirstChild); - } - return function(returnFiber, currentFirstChild, newChild, lanes) { - try { - thenableIndexCounter = 0; - var firstChildFiber = reconcileChildFibersImpl( - returnFiber, - currentFirstChild, - newChild, - lanes - ); - thenableState = null; - return firstChildFiber; - } catch (x2) { - if (x2 === SuspenseException || x2 === SuspenseActionException) throw x2; - var fiber = createFiberImplClass(29, x2, null, returnFiber.mode); - fiber.lanes = lanes; - fiber.return = returnFiber; - return fiber; - } finally { - } - }; - } - var reconcileChildFibers = createChildReconciler(true); - var mountChildFibers = createChildReconciler(false); - var suspenseHandlerStackCursor = createCursor(null); - var shellBoundary = null; - function pushPrimaryTreeSuspenseHandler(handler) { - var current = handler.alternate; - push(suspenseStackCursor, suspenseStackCursor.current & 1); - push(suspenseHandlerStackCursor, handler); - null === shellBoundary && (null === current || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current.memoizedState && (shellBoundary = handler)); - } - function pushOffscreenSuspenseHandler(fiber) { - if (22 === fiber.tag) { - if (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), null === shellBoundary) { - var current = fiber.alternate; - null !== current && null !== current.memoizedState && (shellBoundary = fiber); - } - } else reuseSuspenseHandlerOnStack(fiber); - } - function reuseSuspenseHandlerOnStack() { - push(suspenseStackCursor, suspenseStackCursor.current); - push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); - } - function popSuspenseHandler(fiber) { - pop(suspenseHandlerStackCursor); - shellBoundary === fiber && (shellBoundary = null); - pop(suspenseStackCursor); - } - var suspenseStackCursor = createCursor(0); - function findFirstSuspended(row) { - for (var node = row; null !== node; ) { - if (13 === node.tag) { - var state = node.memoizedState; - if (null !== state && (state = state.dehydrated, null === state || "$?" === state.data || isSuspenseInstanceFallback(state))) - return node; - } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) { - if (0 !== (node.flags & 128)) return node; - } else if (null !== node.child) { - node.child.return = node; - node = node.child; - continue; - } - if (node === row) break; - for (; null === node.sibling; ) { - if (null === node.return || node.return === row) return null; - node = node.return; - } - node.sibling.return = node.return; - node = node.sibling; - } - return null; - } - function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) { - ctor = workInProgress2.memoizedState; - getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor); - getDerivedStateFromProps = null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps ? ctor : assign({}, ctor, getDerivedStateFromProps); - workInProgress2.memoizedState = getDerivedStateFromProps; - 0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = getDerivedStateFromProps); - } - var classComponentUpdater = { - enqueueSetState: function(inst, payload, callback) { - inst = inst._reactInternals; - var lane = requestUpdateLane(), update = createUpdate(lane); - update.payload = payload; - void 0 !== callback && null !== callback && (update.callback = callback); - payload = enqueueUpdate(inst, update, lane); - null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); - }, - enqueueReplaceState: function(inst, payload, callback) { - inst = inst._reactInternals; - var lane = requestUpdateLane(), update = createUpdate(lane); - update.tag = 1; - update.payload = payload; - void 0 !== callback && null !== callback && (update.callback = callback); - payload = enqueueUpdate(inst, update, lane); - null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); - }, - enqueueForceUpdate: function(inst, callback) { - inst = inst._reactInternals; - var lane = requestUpdateLane(), update = createUpdate(lane); - update.tag = 2; - void 0 !== callback && null !== callback && (update.callback = callback); - callback = enqueueUpdate(inst, update, lane); - null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane)); - } - }; - function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) { - workInProgress2 = workInProgress2.stateNode; - return "function" === typeof workInProgress2.shouldComponentUpdate ? workInProgress2.shouldComponentUpdate(newProps, newState, nextContext) : ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true; - } - function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) { - workInProgress2 = instance.state; - "function" === typeof instance.componentWillReceiveProps && instance.componentWillReceiveProps(newProps, nextContext); - "function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); - instance.state !== workInProgress2 && classComponentUpdater.enqueueReplaceState(instance, instance.state, null); - } - function resolveClassComponentProps(Component, baseProps) { - var newProps = baseProps; - if ("ref" in baseProps) { - newProps = {}; - for (var propName in baseProps) - "ref" !== propName && (newProps[propName] = baseProps[propName]); - } - if (Component = Component.defaultProps) { - newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$73 in Component) - void 0 === newProps[propName$73] && (newProps[propName$73] = Component[propName$73]); - } - return newProps; - } - var reportGlobalError = "function" === typeof reportError ? reportError : function(error) { - if ("object" === typeof window && "function" === typeof window.ErrorEvent) { - var event = new window.ErrorEvent("error", { - bubbles: true, - cancelable: true, - message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error), - error - }); - if (!window.dispatchEvent(event)) return; - } else if ("object" === typeof process && "function" === typeof process.emit) { - process.emit("uncaughtException", error); - return; - } - console.error(error); - }; - function defaultOnUncaughtError(error) { - reportGlobalError(error); - } - function defaultOnCaughtError(error) { - console.error(error); - } - function defaultOnRecoverableError(error) { - reportGlobalError(error); - } - function logUncaughtError(root3, errorInfo) { - try { - var onUncaughtError = root3.onUncaughtError; - onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$74) { - setTimeout(function() { - throw e$74; - }); - } - } - function logCaughtError(root3, boundary, errorInfo) { - try { - var onCaughtError = root3.onCaughtError; - onCaughtError(errorInfo.value, { - componentStack: errorInfo.stack, - errorBoundary: 1 === boundary.tag ? boundary.stateNode : null - }); - } catch (e$75) { - setTimeout(function() { - throw e$75; - }); - } - } - function createRootErrorUpdate(root3, errorInfo, lane) { - lane = createUpdate(lane); - lane.tag = 3; - lane.payload = { element: null }; - lane.callback = function() { - logUncaughtError(root3, errorInfo); - }; - return lane; - } - function createClassErrorUpdate(lane) { - lane = createUpdate(lane); - lane.tag = 3; - return lane; - } - function initializeClassErrorUpdate(update, root3, fiber, errorInfo) { - var getDerivedStateFromError = fiber.type.getDerivedStateFromError; - if ("function" === typeof getDerivedStateFromError) { - var error = errorInfo.value; - update.payload = function() { - return getDerivedStateFromError(error); - }; - update.callback = function() { - logCaughtError(root3, fiber, errorInfo); - }; - } - var inst = fiber.stateNode; - null !== inst && "function" === typeof inst.componentDidCatch && (update.callback = function() { - logCaughtError(root3, fiber, errorInfo); - "function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this)); - var stack = errorInfo.stack; - this.componentDidCatch(errorInfo.value, { - componentStack: null !== stack ? stack : "" - }); - }); - } - function throwException(root3, returnFiber, sourceFiber, value2, rootRenderLanes) { - sourceFiber.flags |= 32768; - if (null !== value2 && "object" === typeof value2 && "function" === typeof value2.then) { - returnFiber = sourceFiber.alternate; - null !== returnFiber && propagateParentContextChanges( - returnFiber, - sourceFiber, - rootRenderLanes, - true - ); - sourceFiber = suspenseHandlerStackCursor.current; - if (null !== sourceFiber) { - switch (sourceFiber.tag) { - case 13: - return null === shellBoundary ? renderDidSuspendDelayIfPossible() : null === sourceFiber.alternate && 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 3), sourceFiber.flags &= -257, sourceFiber.flags |= 65536, sourceFiber.lanes = rootRenderLanes, value2 === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? sourceFiber.updateQueue = /* @__PURE__ */ new Set([value2]) : returnFiber.add(value2), attachPingListener(root3, value2, rootRenderLanes)), false; - case 22: - return sourceFiber.flags |= 65536, value2 === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? (returnFiber = { - transitions: null, - markerInstances: null, - retryQueue: /* @__PURE__ */ new Set([value2]) - }, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, null === sourceFiber ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value2]) : sourceFiber.add(value2)), attachPingListener(root3, value2, rootRenderLanes)), false; - } - throw Error(formatProdErrorMessage(435, sourceFiber.tag)); - } - attachPingListener(root3, value2, rootRenderLanes); - renderDidSuspendDelayIfPossible(); - return false; - } - if (isHydrating) - return returnFiber = suspenseHandlerStackCursor.current, null !== returnFiber ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value2 !== HydrationMismatchException && (root3 = Error(formatProdErrorMessage(422), { cause: value2 }), queueHydrationError(createCapturedValueAtFiber(root3, sourceFiber)))) : (value2 !== HydrationMismatchException && (returnFiber = Error(formatProdErrorMessage(423), { - cause: value2 - }), queueHydrationError( - createCapturedValueAtFiber(returnFiber, sourceFiber) - )), root3 = root3.current.alternate, root3.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root3.lanes |= rootRenderLanes, value2 = createCapturedValueAtFiber(value2, sourceFiber), rootRenderLanes = createRootErrorUpdate( - root3.stateNode, - value2, - rootRenderLanes - ), enqueueCapturedUpdate(root3, rootRenderLanes), 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2)), false; - var wrapperError = Error(formatProdErrorMessage(520), { cause: value2 }); - wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber); - null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [wrapperError] : workInProgressRootConcurrentErrors.push(wrapperError); - 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); - if (null === returnFiber) return true; - value2 = createCapturedValueAtFiber(value2, sourceFiber); - sourceFiber = returnFiber; - do { - switch (sourceFiber.tag) { - case 3: - return sourceFiber.flags |= 65536, root3 = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root3, root3 = createRootErrorUpdate(sourceFiber.stateNode, value2, root3), enqueueCapturedUpdate(sourceFiber, root3), false; - case 1: - if (returnFiber = sourceFiber.type, wrapperError = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== wrapperError && "function" === typeof wrapperError.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError)))) - return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate( - rootRenderLanes, - root3, - sourceFiber, - value2 - ), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), false; - } - sourceFiber = sourceFiber.return; - } while (null !== sourceFiber); - return false; - } - var SelectiveHydrationException = Error(formatProdErrorMessage(461)); - var didReceiveUpdate = false; - function reconcileChildren(current, workInProgress2, nextChildren, renderLanes2) { - workInProgress2.child = null === current ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers( - workInProgress2, - current.child, - nextChildren, - renderLanes2 - ); - } - function updateForwardRef(current, workInProgress2, Component, nextProps, renderLanes2) { - Component = Component.render; - var ref = workInProgress2.ref; - if ("ref" in nextProps) { - var propsWithoutRef = {}; - for (var key in nextProps) - "ref" !== key && (propsWithoutRef[key] = nextProps[key]); - } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress2); - nextProps = renderWithHooks( - current, - workInProgress2, - Component, - propsWithoutRef, - ref, - renderLanes2 - ); - key = checkDidRenderIdHook(); - if (null !== current && !didReceiveUpdate) - return bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2); - isHydrating && key && pushMaterializedTreeId(workInProgress2); - workInProgress2.flags |= 1; - reconcileChildren(current, workInProgress2, nextProps, renderLanes2); - return workInProgress2.child; - } - function updateMemoComponent(current, workInProgress2, Component, nextProps, renderLanes2) { - if (null === current) { - var type2 = Component.type; - if ("function" === typeof type2 && !shouldConstruct(type2) && void 0 === type2.defaultProps && null === Component.compare) - return workInProgress2.tag = 15, workInProgress2.type = type2, updateSimpleMemoComponent( - current, - workInProgress2, - type2, - nextProps, - renderLanes2 - ); - current = createFiberFromTypeAndProps( - Component.type, - null, - nextProps, - workInProgress2, - workInProgress2.mode, - renderLanes2 - ); - current.ref = workInProgress2.ref; - current.return = workInProgress2; - return workInProgress2.child = current; - } - type2 = current.child; - if (!checkScheduledUpdateOrContext(current, renderLanes2)) { - var prevProps = type2.memoizedProps; - Component = Component.compare; - Component = null !== Component ? Component : shallowEqual; - if (Component(prevProps, nextProps) && current.ref === workInProgress2.ref) - return bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2); - } - workInProgress2.flags |= 1; - current = createWorkInProgress(type2, nextProps); - current.ref = workInProgress2.ref; - current.return = workInProgress2; - return workInProgress2.child = current; - } - function updateSimpleMemoComponent(current, workInProgress2, Component, nextProps, renderLanes2) { - if (null !== current) { - var prevProps = current.memoizedProps; - if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress2.ref) - if (didReceiveUpdate = false, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current, renderLanes2)) - 0 !== (current.flags & 131072) && (didReceiveUpdate = true); - else - return workInProgress2.lanes = current.lanes, bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2); - } - return updateFunctionComponent( - current, - workInProgress2, - Component, - nextProps, - renderLanes2 - ); - } - function updateOffscreenComponent(current, workInProgress2, renderLanes2) { - var nextProps = workInProgress2.pendingProps, nextChildren = nextProps.children, prevState = null !== current ? current.memoizedState : null; - if ("hidden" === nextProps.mode) { - if (0 !== (workInProgress2.flags & 128)) { - nextProps = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2; - if (null !== current) { - nextChildren = workInProgress2.child = current.child; - for (prevState = 0; null !== nextChildren; ) - prevState = prevState | nextChildren.lanes | nextChildren.childLanes, nextChildren = nextChildren.sibling; - workInProgress2.childLanes = prevState & ~nextProps; - } else workInProgress2.childLanes = 0, workInProgress2.child = null; - return deferHiddenOffscreenComponent( - current, - workInProgress2, - nextProps, - renderLanes2 - ); - } - if (0 !== (renderLanes2 & 536870912)) - workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, null !== current && pushTransition( - workInProgress2, - null !== prevState ? prevState.cachePool : null - ), null !== prevState ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress2); - else - return workInProgress2.lanes = workInProgress2.childLanes = 536870912, deferHiddenOffscreenComponent( - current, - workInProgress2, - null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2, - renderLanes2 - ); - } else - null !== prevState ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (null !== current && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(), reuseSuspenseHandlerOnStack(workInProgress2)); - reconcileChildren(current, workInProgress2, nextChildren, renderLanes2); - return workInProgress2.child; - } - function deferHiddenOffscreenComponent(current, workInProgress2, nextBaseLanes, renderLanes2) { - var JSCompiler_inline_result = peekCacheFromPool(); - JSCompiler_inline_result = null === JSCompiler_inline_result ? null : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result }; - workInProgress2.memoizedState = { - baseLanes: nextBaseLanes, - cachePool: JSCompiler_inline_result - }; - null !== current && pushTransition(workInProgress2, null); - reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress2); - null !== current && propagateParentContextChanges(current, workInProgress2, renderLanes2, true); - return null; - } - function markRef(current, workInProgress2) { - var ref = workInProgress2.ref; - if (null === ref) - null !== current && null !== current.ref && (workInProgress2.flags |= 4194816); - else { - if ("function" !== typeof ref && "object" !== typeof ref) - throw Error(formatProdErrorMessage(284)); - if (null === current || current.ref !== ref) - workInProgress2.flags |= 4194816; - } - } - function updateFunctionComponent(current, workInProgress2, Component, nextProps, renderLanes2) { - prepareToReadContext(workInProgress2); - Component = renderWithHooks( - current, - workInProgress2, - Component, - nextProps, - void 0, - renderLanes2 - ); - nextProps = checkDidRenderIdHook(); - if (null !== current && !didReceiveUpdate) - return bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2); - isHydrating && nextProps && pushMaterializedTreeId(workInProgress2); - workInProgress2.flags |= 1; - reconcileChildren(current, workInProgress2, Component, renderLanes2); - return workInProgress2.child; - } - function replayFunctionComponent(current, workInProgress2, nextProps, Component, secondArg, renderLanes2) { - prepareToReadContext(workInProgress2); - workInProgress2.updateQueue = null; - nextProps = renderWithHooksAgain( - workInProgress2, - Component, - nextProps, - secondArg - ); - finishRenderingHooks(current); - Component = checkDidRenderIdHook(); - if (null !== current && !didReceiveUpdate) - return bailoutHooks(current, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2); - isHydrating && Component && pushMaterializedTreeId(workInProgress2); - workInProgress2.flags |= 1; - reconcileChildren(current, workInProgress2, nextProps, renderLanes2); - return workInProgress2.child; - } - function updateClassComponent(current, workInProgress2, Component, nextProps, renderLanes2) { - prepareToReadContext(workInProgress2); - if (null === workInProgress2.stateNode) { - var context = emptyContextObject, contextType = Component.contextType; - "object" === typeof contextType && null !== contextType && (context = readContext(contextType)); - context = new Component(nextProps, context); - workInProgress2.memoizedState = null !== context.state && void 0 !== context.state ? context.state : null; - context.updater = classComponentUpdater; - workInProgress2.stateNode = context; - context._reactInternals = workInProgress2; - context = workInProgress2.stateNode; - context.props = nextProps; - context.state = workInProgress2.memoizedState; - context.refs = {}; - initializeUpdateQueue(workInProgress2); - contextType = Component.contextType; - context.context = "object" === typeof contextType && null !== contextType ? readContext(contextType) : emptyContextObject; - context.state = workInProgress2.memoizedState; - contextType = Component.getDerivedStateFromProps; - "function" === typeof contextType && (applyDerivedStateFromProps( - workInProgress2, - Component, - contextType, - nextProps - ), context.state = workInProgress2.memoizedState); - "function" === typeof Component.getDerivedStateFromProps || "function" === typeof context.getSnapshotBeforeUpdate || "function" !== typeof context.UNSAFE_componentWillMount && "function" !== typeof context.componentWillMount || (contextType = context.state, "function" === typeof context.componentWillMount && context.componentWillMount(), "function" === typeof context.UNSAFE_componentWillMount && context.UNSAFE_componentWillMount(), contextType !== context.state && classComponentUpdater.enqueueReplaceState(context, context.state, null), processUpdateQueue(workInProgress2, nextProps, context, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), context.state = workInProgress2.memoizedState); - "function" === typeof context.componentDidMount && (workInProgress2.flags |= 4194308); - nextProps = true; - } else if (null === current) { - context = workInProgress2.stateNode; - var unresolvedOldProps = workInProgress2.memoizedProps, oldProps = resolveClassComponentProps(Component, unresolvedOldProps); - context.props = oldProps; - var oldContext = context.context, contextType$jscomp$0 = Component.contextType; - contextType = emptyContextObject; - "object" === typeof contextType$jscomp$0 && null !== contextType$jscomp$0 && (contextType = readContext(contextType$jscomp$0)); - var getDerivedStateFromProps = Component.getDerivedStateFromProps; - contextType$jscomp$0 = "function" === typeof getDerivedStateFromProps || "function" === typeof context.getSnapshotBeforeUpdate; - unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps; - contextType$jscomp$0 || "function" !== typeof context.UNSAFE_componentWillReceiveProps && "function" !== typeof context.componentWillReceiveProps || (unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps( - workInProgress2, - context, - nextProps, - contextType - ); - hasForceUpdate = false; - var oldState = workInProgress2.memoizedState; - context.state = oldState; - processUpdateQueue(workInProgress2, nextProps, context, renderLanes2); - suspendIfUpdateReadFromEntangledAsyncAction(); - oldContext = workInProgress2.memoizedState; - unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof getDerivedStateFromProps && (applyDerivedStateFromProps( - workInProgress2, - Component, - getDerivedStateFromProps, - nextProps - ), oldContext = workInProgress2.memoizedState), (oldProps = hasForceUpdate || checkShouldComponentUpdate( - workInProgress2, - Component, - oldProps, - nextProps, - oldState, - oldContext, - contextType - )) ? (contextType$jscomp$0 || "function" !== typeof context.UNSAFE_componentWillMount && "function" !== typeof context.componentWillMount || ("function" === typeof context.componentWillMount && context.componentWillMount(), "function" === typeof context.UNSAFE_componentWillMount && context.UNSAFE_componentWillMount()), "function" === typeof context.componentDidMount && (workInProgress2.flags |= 4194308)) : ("function" === typeof context.componentDidMount && (workInProgress2.flags |= 4194308), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = oldContext), context.props = nextProps, context.state = oldContext, context.context = contextType, nextProps = oldProps) : ("function" === typeof context.componentDidMount && (workInProgress2.flags |= 4194308), nextProps = false); - } else { - context = workInProgress2.stateNode; - cloneUpdateQueue(current, workInProgress2); - contextType = workInProgress2.memoizedProps; - contextType$jscomp$0 = resolveClassComponentProps(Component, contextType); - context.props = contextType$jscomp$0; - getDerivedStateFromProps = workInProgress2.pendingProps; - oldState = context.context; - oldContext = Component.contextType; - oldProps = emptyContextObject; - "object" === typeof oldContext && null !== oldContext && (oldProps = readContext(oldContext)); - unresolvedOldProps = Component.getDerivedStateFromProps; - (oldContext = "function" === typeof unresolvedOldProps || "function" === typeof context.getSnapshotBeforeUpdate) || "function" !== typeof context.UNSAFE_componentWillReceiveProps && "function" !== typeof context.componentWillReceiveProps || (contextType !== getDerivedStateFromProps || oldState !== oldProps) && callComponentWillReceiveProps( - workInProgress2, - context, - nextProps, - oldProps - ); - hasForceUpdate = false; - oldState = workInProgress2.memoizedState; - context.state = oldState; - processUpdateQueue(workInProgress2, nextProps, context, renderLanes2); - suspendIfUpdateReadFromEntangledAsyncAction(); - var newState = workInProgress2.memoizedState; - contextType !== getDerivedStateFromProps || oldState !== newState || hasForceUpdate || null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps( - workInProgress2, - Component, - unresolvedOldProps, - nextProps - ), newState = workInProgress2.memoizedState), (contextType$jscomp$0 = hasForceUpdate || checkShouldComponentUpdate( - workInProgress2, - Component, - contextType$jscomp$0, - nextProps, - oldState, - newState, - oldProps - ) || null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? (oldContext || "function" !== typeof context.UNSAFE_componentWillUpdate && "function" !== typeof context.componentWillUpdate || ("function" === typeof context.componentWillUpdate && context.componentWillUpdate(nextProps, newState, oldProps), "function" === typeof context.UNSAFE_componentWillUpdate && context.UNSAFE_componentWillUpdate( - nextProps, - newState, - oldProps - )), "function" === typeof context.componentDidUpdate && (workInProgress2.flags |= 4), "function" === typeof context.getSnapshotBeforeUpdate && (workInProgress2.flags |= 1024)) : ("function" !== typeof context.componentDidUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof context.getSnapshotBeforeUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 1024), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = newState), context.props = nextProps, context.state = newState, context.context = oldProps, nextProps = contextType$jscomp$0) : ("function" !== typeof context.componentDidUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof context.getSnapshotBeforeUpdate || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress2.flags |= 1024), nextProps = false); - } - context = nextProps; - markRef(current, workInProgress2); - nextProps = 0 !== (workInProgress2.flags & 128); - context || nextProps ? (context = workInProgress2.stateNode, Component = nextProps && "function" !== typeof Component.getDerivedStateFromError ? null : context.render(), workInProgress2.flags |= 1, null !== current && nextProps ? (workInProgress2.child = reconcileChildFibers( - workInProgress2, - current.child, - null, - renderLanes2 - ), workInProgress2.child = reconcileChildFibers( - workInProgress2, - null, - Component, - renderLanes2 - )) : reconcileChildren(current, workInProgress2, Component, renderLanes2), workInProgress2.memoizedState = context.state, current = workInProgress2.child) : current = bailoutOnAlreadyFinishedWork( - current, - workInProgress2, - renderLanes2 - ); - return current; - } - function mountHostRootWithoutHydrating(current, workInProgress2, nextChildren, renderLanes2) { - resetHydrationState(); - workInProgress2.flags |= 256; - reconcileChildren(current, workInProgress2, nextChildren, renderLanes2); - return workInProgress2.child; - } - var SUSPENDED_MARKER = { - dehydrated: null, - treeContext: null, - retryLane: 0, - hydrationErrors: null - }; - function mountSuspenseOffscreenState(renderLanes2) { - return { baseLanes: renderLanes2, cachePool: getSuspendedCache() }; - } - function getRemainingWorkInPrimaryTree(current, primaryTreeDidDefer, renderLanes2) { - current = null !== current ? current.childLanes & ~renderLanes2 : 0; - primaryTreeDidDefer && (current |= workInProgressDeferredLane); - return current; - } - function updateSuspenseComponent(current, workInProgress2, renderLanes2) { - var nextProps = workInProgress2.pendingProps, showFallback = false, didSuspend = 0 !== (workInProgress2.flags & 128), JSCompiler_temp; - (JSCompiler_temp = didSuspend) || (JSCompiler_temp = null !== current && null === current.memoizedState ? false : 0 !== (suspenseStackCursor.current & 2)); - JSCompiler_temp && (showFallback = true, workInProgress2.flags &= -129); - JSCompiler_temp = 0 !== (workInProgress2.flags & 32); - workInProgress2.flags &= -33; - if (null === current) { - if (isHydrating) { - showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2); - if (isHydrating) { - var nextInstance = nextHydratableInstance, JSCompiler_temp$jscomp$0; - if (JSCompiler_temp$jscomp$0 = nextInstance) { - c: { - JSCompiler_temp$jscomp$0 = nextInstance; - for (nextInstance = rootOrSingletonContext; 8 !== JSCompiler_temp$jscomp$0.nodeType; ) { - if (!nextInstance) { - nextInstance = null; - break c; - } - JSCompiler_temp$jscomp$0 = getNextHydratable( - JSCompiler_temp$jscomp$0.nextSibling - ); - if (null === JSCompiler_temp$jscomp$0) { - nextInstance = null; - break c; - } - } - nextInstance = JSCompiler_temp$jscomp$0; - } - null !== nextInstance ? (workInProgress2.memoizedState = { - dehydrated: nextInstance, - treeContext: null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912, - hydrationErrors: null - }, JSCompiler_temp$jscomp$0 = createFiberImplClass( - 18, - null, - null, - 0 - ), JSCompiler_temp$jscomp$0.stateNode = nextInstance, JSCompiler_temp$jscomp$0.return = workInProgress2, workInProgress2.child = JSCompiler_temp$jscomp$0, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, JSCompiler_temp$jscomp$0 = true) : JSCompiler_temp$jscomp$0 = false; - } - JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress2); - } - nextInstance = workInProgress2.memoizedState; - if (null !== nextInstance && (nextInstance = nextInstance.dehydrated, null !== nextInstance)) - return isSuspenseInstanceFallback(nextInstance) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912, null; - popSuspenseHandler(workInProgress2); - } - nextInstance = nextProps.children; - nextProps = nextProps.fallback; - if (showFallback) - return reuseSuspenseHandlerOnStack(workInProgress2), showFallback = workInProgress2.mode, nextInstance = mountWorkInProgressOffscreenFiber( - { mode: "hidden", children: nextInstance }, - showFallback - ), nextProps = createFiberFromFragment( - nextProps, - showFallback, - renderLanes2, - null - ), nextInstance.return = workInProgress2, nextProps.return = workInProgress2, nextInstance.sibling = nextProps, workInProgress2.child = nextInstance, showFallback = workInProgress2.child, showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes2), showFallback.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes2 - ), workInProgress2.memoizedState = SUSPENDED_MARKER, nextProps; - pushPrimaryTreeSuspenseHandler(workInProgress2); - return mountSuspensePrimaryChildren(workInProgress2, nextInstance); - } - JSCompiler_temp$jscomp$0 = current.memoizedState; - if (null !== JSCompiler_temp$jscomp$0 && (nextInstance = JSCompiler_temp$jscomp$0.dehydrated, null !== nextInstance)) { - if (didSuspend) - workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating( - current, - workInProgress2, - renderLanes2 - )) : null !== workInProgress2.memoizedState ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), showFallback = nextProps.fallback, nextInstance = workInProgress2.mode, nextProps = mountWorkInProgressOffscreenFiber( - { mode: "visible", children: nextProps.children }, - nextInstance - ), showFallback = createFiberFromFragment( - showFallback, - nextInstance, - renderLanes2, - null - ), showFallback.flags |= 2, nextProps.return = workInProgress2, showFallback.return = workInProgress2, nextProps.sibling = showFallback, workInProgress2.child = nextProps, reconcileChildFibers( - workInProgress2, - current.child, - null, - renderLanes2 - ), nextProps = workInProgress2.child, nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes2), nextProps.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes2 - ), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = showFallback); - else if (pushPrimaryTreeSuspenseHandler(workInProgress2), isSuspenseInstanceFallback(nextInstance)) { - JSCompiler_temp = nextInstance.nextSibling && nextInstance.nextSibling.dataset; - if (JSCompiler_temp) var digest = JSCompiler_temp.dgst; - JSCompiler_temp = digest; - nextProps = Error(formatProdErrorMessage(419)); - nextProps.stack = ""; - nextProps.digest = JSCompiler_temp; - queueHydrationError({ value: nextProps, source: null, stack: null }); - workInProgress2 = retrySuspenseComponentWithoutHydrating( - current, - workInProgress2, - renderLanes2 - ); - } else if (didReceiveUpdate || propagateParentContextChanges(current, workInProgress2, renderLanes2, false), JSCompiler_temp = 0 !== (renderLanes2 & current.childLanes), didReceiveUpdate || JSCompiler_temp) { - JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp && (nextProps = renderLanes2 & -renderLanes2, nextProps = 0 !== (nextProps & 42) ? 1 : getBumpedLaneForHydrationByLane(nextProps), nextProps = 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes2)) ? 0 : nextProps, 0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane)) - throw JSCompiler_temp$jscomp$0.retryLane = nextProps, enqueueConcurrentRenderForLane(current, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), SelectiveHydrationException; - "$?" === nextInstance.data || renderDidSuspendDelayIfPossible(); - workInProgress2 = retrySuspenseComponentWithoutHydrating( - current, - workInProgress2, - renderLanes2 - ); - } else - "$?" === nextInstance.data ? (workInProgress2.flags |= 192, workInProgress2.child = current.child, workInProgress2 = null) : (current = JSCompiler_temp$jscomp$0.treeContext, nextHydratableInstance = getNextHydratable( - nextInstance.nextSibling - ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, rootOrSingletonContext = false, null !== current && (idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextId = current.id, treeContextOverflow = current.overflow, treeContextProvider = workInProgress2), workInProgress2 = mountSuspensePrimaryChildren( - workInProgress2, - nextProps.children - ), workInProgress2.flags |= 4096); - return workInProgress2; - } - if (showFallback) - return reuseSuspenseHandlerOnStack(workInProgress2), showFallback = nextProps.fallback, nextInstance = workInProgress2.mode, JSCompiler_temp$jscomp$0 = current.child, digest = JSCompiler_temp$jscomp$0.sibling, nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, { - mode: "hidden", - children: nextProps.children - }), nextProps.subtreeFlags = JSCompiler_temp$jscomp$0.subtreeFlags & 65011712, null !== digest ? showFallback = createWorkInProgress(digest, showFallback) : (showFallback = createFiberFromFragment( - showFallback, - nextInstance, - renderLanes2, - null - ), showFallback.flags |= 2), showFallback.return = workInProgress2, nextProps.return = workInProgress2, nextProps.sibling = showFallback, workInProgress2.child = nextProps, nextProps = showFallback, showFallback = workInProgress2.child, nextInstance = current.child.memoizedState, null === nextInstance ? nextInstance = mountSuspenseOffscreenState(renderLanes2) : (JSCompiler_temp$jscomp$0 = nextInstance.cachePool, null !== JSCompiler_temp$jscomp$0 ? (digest = CacheContext._currentValue, JSCompiler_temp$jscomp$0 = JSCompiler_temp$jscomp$0.parent !== digest ? { parent: digest, pool: digest } : JSCompiler_temp$jscomp$0) : JSCompiler_temp$jscomp$0 = getSuspendedCache(), nextInstance = { - baseLanes: nextInstance.baseLanes | renderLanes2, - cachePool: JSCompiler_temp$jscomp$0 - }), showFallback.memoizedState = nextInstance, showFallback.childLanes = getRemainingWorkInPrimaryTree( - current, - JSCompiler_temp, - renderLanes2 - ), workInProgress2.memoizedState = SUSPENDED_MARKER, nextProps; - pushPrimaryTreeSuspenseHandler(workInProgress2); - renderLanes2 = current.child; - current = renderLanes2.sibling; - renderLanes2 = createWorkInProgress(renderLanes2, { - mode: "visible", - children: nextProps.children - }); - renderLanes2.return = workInProgress2; - renderLanes2.sibling = null; - null !== current && (JSCompiler_temp = workInProgress2.deletions, null === JSCompiler_temp ? (workInProgress2.deletions = [current], workInProgress2.flags |= 16) : JSCompiler_temp.push(current)); - workInProgress2.child = renderLanes2; - workInProgress2.memoizedState = null; - return renderLanes2; - } - function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) { - primaryChildren = mountWorkInProgressOffscreenFiber( - { mode: "visible", children: primaryChildren }, - workInProgress2.mode - ); - primaryChildren.return = workInProgress2; - return workInProgress2.child = primaryChildren; - } - function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { - offscreenProps = createFiberImplClass(22, offscreenProps, null, mode); - offscreenProps.lanes = 0; - offscreenProps.stateNode = { - _visibility: 1, - _pendingMarkers: null, - _retryCache: null, - _transitions: null - }; - return offscreenProps; - } - function retrySuspenseComponentWithoutHydrating(current, workInProgress2, renderLanes2) { - reconcileChildFibers(workInProgress2, current.child, null, renderLanes2); - current = mountSuspensePrimaryChildren( - workInProgress2, - workInProgress2.pendingProps.children - ); - current.flags |= 2; - workInProgress2.memoizedState = null; - return current; - } - function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) { - fiber.lanes |= renderLanes2; - var alternate = fiber.alternate; - null !== alternate && (alternate.lanes |= renderLanes2); - scheduleContextWorkOnParentPath(fiber.return, renderLanes2, propagationRoot); - } - function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode) { - var renderState = workInProgress2.memoizedState; - null === renderState ? workInProgress2.memoizedState = { - isBackwards, - rendering: null, - renderingStartTime: 0, - last: lastContentRow, - tail, - tailMode - } : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode); - } - function updateSuspenseListComponent(current, workInProgress2, renderLanes2) { - var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail; - reconcileChildren(current, workInProgress2, nextProps.children, renderLanes2); - nextProps = suspenseStackCursor.current; - if (0 !== (nextProps & 2)) - nextProps = nextProps & 1 | 2, workInProgress2.flags |= 128; - else { - if (null !== current && 0 !== (current.flags & 128)) - a: for (current = workInProgress2.child; null !== current; ) { - if (13 === current.tag) - null !== current.memoizedState && scheduleSuspenseWorkOnFiber(current, renderLanes2, workInProgress2); - else if (19 === current.tag) - scheduleSuspenseWorkOnFiber(current, renderLanes2, workInProgress2); - else if (null !== current.child) { - current.child.return = current; - current = current.child; - continue; - } - if (current === workInProgress2) break a; - for (; null === current.sibling; ) { - if (null === current.return || current.return === workInProgress2) - break a; - current = current.return; - } - current.sibling.return = current.return; - current = current.sibling; - } - nextProps &= 1; - } - push(suspenseStackCursor, nextProps); - switch (revealOrder) { - case "forwards": - renderLanes2 = workInProgress2.child; - for (revealOrder = null; null !== renderLanes2; ) - current = renderLanes2.alternate, null !== current && null === findFirstSuspended(current) && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling; - renderLanes2 = revealOrder; - null === renderLanes2 ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null); - initSuspenseListRenderState( - workInProgress2, - false, - revealOrder, - renderLanes2, - tailMode - ); - break; - case "backwards": - renderLanes2 = null; - revealOrder = workInProgress2.child; - for (workInProgress2.child = null; null !== revealOrder; ) { - current = revealOrder.alternate; - if (null !== current && null === findFirstSuspended(current)) { - workInProgress2.child = revealOrder; - break; - } - current = revealOrder.sibling; - revealOrder.sibling = renderLanes2; - renderLanes2 = revealOrder; - revealOrder = current; - } - initSuspenseListRenderState( - workInProgress2, - true, - renderLanes2, - null, - tailMode - ); - break; - case "together": - initSuspenseListRenderState(workInProgress2, false, null, null, void 0); - break; - default: - workInProgress2.memoizedState = null; - } - return workInProgress2.child; - } - function bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2) { - null !== current && (workInProgress2.dependencies = current.dependencies); - workInProgressRootSkippedLanes |= workInProgress2.lanes; - if (0 === (renderLanes2 & workInProgress2.childLanes)) - if (null !== current) { - if (propagateParentContextChanges( - current, - workInProgress2, - renderLanes2, - false - ), 0 === (renderLanes2 & workInProgress2.childLanes)) - return null; - } else return null; - if (null !== current && workInProgress2.child !== current.child) - throw Error(formatProdErrorMessage(153)); - if (null !== workInProgress2.child) { - current = workInProgress2.child; - renderLanes2 = createWorkInProgress(current, current.pendingProps); - workInProgress2.child = renderLanes2; - for (renderLanes2.return = workInProgress2; null !== current.sibling; ) - current = current.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current, current.pendingProps), renderLanes2.return = workInProgress2; - renderLanes2.sibling = null; - } - return workInProgress2.child; - } - function checkScheduledUpdateOrContext(current, renderLanes2) { - if (0 !== (current.lanes & renderLanes2)) return true; - current = current.dependencies; - return null !== current && checkIfContextChanged(current) ? true : false; - } - function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress2, renderLanes2) { - switch (workInProgress2.tag) { - case 3: - pushHostContainer(workInProgress2, workInProgress2.stateNode.containerInfo); - pushProvider(workInProgress2, CacheContext, current.memoizedState.cache); - resetHydrationState(); - break; - case 27: - case 5: - pushHostContext(workInProgress2); - break; - case 4: - pushHostContainer(workInProgress2, workInProgress2.stateNode.containerInfo); - break; - case 10: - pushProvider( - workInProgress2, - workInProgress2.type, - workInProgress2.memoizedProps.value - ); - break; - case 13: - var state = workInProgress2.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) - return pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null; - if (0 !== (renderLanes2 & workInProgress2.child.childLanes)) - return updateSuspenseComponent(current, workInProgress2, renderLanes2); - pushPrimaryTreeSuspenseHandler(workInProgress2); - current = bailoutOnAlreadyFinishedWork( - current, - workInProgress2, - renderLanes2 - ); - return null !== current ? current.sibling : null; - } - pushPrimaryTreeSuspenseHandler(workInProgress2); - break; - case 19: - var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes2 & workInProgress2.childLanes); - state || (propagateParentContextChanges( - current, - workInProgress2, - renderLanes2, - false - ), state = 0 !== (renderLanes2 & workInProgress2.childLanes)); - if (didSuspendBefore) { - if (state) - return updateSuspenseListComponent( - current, - workInProgress2, - renderLanes2 - ); - workInProgress2.flags |= 128; - } - didSuspendBefore = workInProgress2.memoizedState; - null !== didSuspendBefore && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null); - push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; - else return null; - case 22: - case 23: - return workInProgress2.lanes = 0, updateOffscreenComponent(current, workInProgress2, renderLanes2); - case 24: - pushProvider(workInProgress2, CacheContext, current.memoizedState.cache); - } - return bailoutOnAlreadyFinishedWork(current, workInProgress2, renderLanes2); - } - function beginWork(current, workInProgress2, renderLanes2) { - if (null !== current) - if (current.memoizedProps !== workInProgress2.pendingProps) - didReceiveUpdate = true; - else { - if (!checkScheduledUpdateOrContext(current, renderLanes2) && 0 === (workInProgress2.flags & 128)) - return didReceiveUpdate = false, attemptEarlyBailoutIfNoScheduledUpdate( - current, - workInProgress2, - renderLanes2 - ); - didReceiveUpdate = 0 !== (current.flags & 131072) ? true : false; - } - else - didReceiveUpdate = false, isHydrating && 0 !== (workInProgress2.flags & 1048576) && pushTreeId(workInProgress2, treeForkCount, workInProgress2.index); - workInProgress2.lanes = 0; - switch (workInProgress2.tag) { - case 16: - a: { - current = workInProgress2.pendingProps; - var lazyComponent = workInProgress2.elementType, init2 = lazyComponent._init; - lazyComponent = init2(lazyComponent._payload); - workInProgress2.type = lazyComponent; - if ("function" === typeof lazyComponent) - shouldConstruct(lazyComponent) ? (current = resolveClassComponentProps(lazyComponent, current), workInProgress2.tag = 1, workInProgress2 = updateClassComponent( - null, - workInProgress2, - lazyComponent, - current, - renderLanes2 - )) : (workInProgress2.tag = 0, workInProgress2 = updateFunctionComponent( - null, - workInProgress2, - lazyComponent, - current, - renderLanes2 - )); - else { - if (void 0 !== lazyComponent && null !== lazyComponent) { - if (init2 = lazyComponent.$$typeof, init2 === REACT_FORWARD_REF_TYPE) { - workInProgress2.tag = 11; - workInProgress2 = updateForwardRef( - null, - workInProgress2, - lazyComponent, - current, - renderLanes2 - ); - break a; - } else if (init2 === REACT_MEMO_TYPE) { - workInProgress2.tag = 14; - workInProgress2 = updateMemoComponent( - null, - workInProgress2, - lazyComponent, - current, - renderLanes2 - ); - break a; - } - } - workInProgress2 = getComponentNameFromType(lazyComponent) || lazyComponent; - throw Error(formatProdErrorMessage(306, workInProgress2, "")); - } - } - return workInProgress2; - case 0: - return updateFunctionComponent( - current, - workInProgress2, - workInProgress2.type, - workInProgress2.pendingProps, - renderLanes2 - ); - case 1: - return lazyComponent = workInProgress2.type, init2 = resolveClassComponentProps( - lazyComponent, - workInProgress2.pendingProps - ), updateClassComponent( - current, - workInProgress2, - lazyComponent, - init2, - renderLanes2 - ); - case 3: - a: { - pushHostContainer( - workInProgress2, - workInProgress2.stateNode.containerInfo - ); - if (null === current) throw Error(formatProdErrorMessage(387)); - lazyComponent = workInProgress2.pendingProps; - var prevState = workInProgress2.memoizedState; - init2 = prevState.element; - cloneUpdateQueue(current, workInProgress2); - processUpdateQueue(workInProgress2, lazyComponent, null, renderLanes2); - var nextState = workInProgress2.memoizedState; - lazyComponent = nextState.cache; - pushProvider(workInProgress2, CacheContext, lazyComponent); - lazyComponent !== prevState.cache && propagateContextChanges( - workInProgress2, - [CacheContext], - renderLanes2, - true - ); - suspendIfUpdateReadFromEntangledAsyncAction(); - lazyComponent = nextState.element; - if (prevState.isDehydrated) - if (prevState = { - element: lazyComponent, - isDehydrated: false, - cache: nextState.cache - }, workInProgress2.updateQueue.baseState = prevState, workInProgress2.memoizedState = prevState, workInProgress2.flags & 256) { - workInProgress2 = mountHostRootWithoutHydrating( - current, - workInProgress2, - lazyComponent, - renderLanes2 - ); - break a; - } else if (lazyComponent !== init2) { - init2 = createCapturedValueAtFiber( - Error(formatProdErrorMessage(424)), - workInProgress2 - ); - queueHydrationError(init2); - workInProgress2 = mountHostRootWithoutHydrating( - current, - workInProgress2, - lazyComponent, - renderLanes2 - ); - break a; - } else { - current = workInProgress2.stateNode.containerInfo; - switch (current.nodeType) { - case 9: - current = current.body; - break; - default: - current = "HTML" === current.nodeName ? current.ownerDocument.body : current; - } - nextHydratableInstance = getNextHydratable(current.firstChild); - hydrationParentFiber = workInProgress2; - isHydrating = true; - hydrationErrors = null; - rootOrSingletonContext = true; - renderLanes2 = mountChildFibers( - workInProgress2, - null, - lazyComponent, - renderLanes2 - ); - for (workInProgress2.child = renderLanes2; renderLanes2; ) - renderLanes2.flags = renderLanes2.flags & -3 | 4096, renderLanes2 = renderLanes2.sibling; - } - else { - resetHydrationState(); - if (lazyComponent === init2) { - workInProgress2 = bailoutOnAlreadyFinishedWork( - current, - workInProgress2, - renderLanes2 - ); - break a; - } - reconcileChildren( - current, - workInProgress2, - lazyComponent, - renderLanes2 - ); - } - workInProgress2 = workInProgress2.child; - } - return workInProgress2; - case 26: - return markRef(current, workInProgress2), null === current ? (renderLanes2 = getResource( - workInProgress2.type, - null, - workInProgress2.pendingProps, - null - )) ? workInProgress2.memoizedState = renderLanes2 : isHydrating || (renderLanes2 = workInProgress2.type, current = workInProgress2.pendingProps, lazyComponent = getOwnerDocumentFromRootContainer( - rootInstanceStackCursor.current - ).createElement(renderLanes2), lazyComponent[internalInstanceKey] = workInProgress2, lazyComponent[internalPropsKey] = current, setInitialProperties(lazyComponent, renderLanes2, current), markNodeAsHoistable(lazyComponent), workInProgress2.stateNode = lazyComponent) : workInProgress2.memoizedState = getResource( - workInProgress2.type, - current.memoizedProps, - workInProgress2.pendingProps, - current.memoizedState - ), null; - case 27: - return pushHostContext(workInProgress2), null === current && isHydrating && (lazyComponent = workInProgress2.stateNode = resolveSingletonInstance( - workInProgress2.type, - workInProgress2.pendingProps, - rootInstanceStackCursor.current - ), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, init2 = nextHydratableInstance, isSingletonScope(workInProgress2.type) ? (previousHydratableOnEnteringScopedSingleton = init2, nextHydratableInstance = getNextHydratable( - lazyComponent.firstChild - )) : nextHydratableInstance = init2), reconcileChildren( - current, - workInProgress2, - workInProgress2.pendingProps.children, - renderLanes2 - ), markRef(current, workInProgress2), null === current && (workInProgress2.flags |= 4194304), workInProgress2.child; - case 5: - if (null === current && isHydrating) { - if (init2 = lazyComponent = nextHydratableInstance) - lazyComponent = canHydrateInstance( - lazyComponent, - workInProgress2.type, - workInProgress2.pendingProps, - rootOrSingletonContext - ), null !== lazyComponent ? (workInProgress2.stateNode = lazyComponent, hydrationParentFiber = workInProgress2, nextHydratableInstance = getNextHydratable( - lazyComponent.firstChild - ), rootOrSingletonContext = false, init2 = true) : init2 = false; - init2 || throwOnHydrationMismatch(workInProgress2); - } - pushHostContext(workInProgress2); - init2 = workInProgress2.type; - prevState = workInProgress2.pendingProps; - nextState = null !== current ? current.memoizedProps : null; - lazyComponent = prevState.children; - shouldSetTextContent(init2, prevState) ? lazyComponent = null : null !== nextState && shouldSetTextContent(init2, nextState) && (workInProgress2.flags |= 32); - null !== workInProgress2.memoizedState && (init2 = renderWithHooks( - current, - workInProgress2, - TransitionAwareHostComponent, - null, - null, - renderLanes2 - ), HostTransitionContext._currentValue = init2); - markRef(current, workInProgress2); - reconcileChildren(current, workInProgress2, lazyComponent, renderLanes2); - return workInProgress2.child; - case 6: - if (null === current && isHydrating) { - if (current = renderLanes2 = nextHydratableInstance) - renderLanes2 = canHydrateTextInstance( - renderLanes2, - workInProgress2.pendingProps, - rootOrSingletonContext - ), null !== renderLanes2 ? (workInProgress2.stateNode = renderLanes2, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, current = true) : current = false; - current || throwOnHydrationMismatch(workInProgress2); - } - return null; - case 13: - return updateSuspenseComponent(current, workInProgress2, renderLanes2); - case 4: - return pushHostContainer( - workInProgress2, - workInProgress2.stateNode.containerInfo - ), lazyComponent = workInProgress2.pendingProps, null === current ? workInProgress2.child = reconcileChildFibers( - workInProgress2, - null, - lazyComponent, - renderLanes2 - ) : reconcileChildren( - current, - workInProgress2, - lazyComponent, - renderLanes2 - ), workInProgress2.child; - case 11: - return updateForwardRef( - current, - workInProgress2, - workInProgress2.type, - workInProgress2.pendingProps, - renderLanes2 - ); - case 7: - return reconcileChildren( - current, - workInProgress2, - workInProgress2.pendingProps, - renderLanes2 - ), workInProgress2.child; - case 8: - return reconcileChildren( - current, - workInProgress2, - workInProgress2.pendingProps.children, - renderLanes2 - ), workInProgress2.child; - case 12: - return reconcileChildren( - current, - workInProgress2, - workInProgress2.pendingProps.children, - renderLanes2 - ), workInProgress2.child; - case 10: - return lazyComponent = workInProgress2.pendingProps, pushProvider(workInProgress2, workInProgress2.type, lazyComponent.value), reconcileChildren( - current, - workInProgress2, - lazyComponent.children, - renderLanes2 - ), workInProgress2.child; - case 9: - return init2 = workInProgress2.type._context, lazyComponent = workInProgress2.pendingProps.children, prepareToReadContext(workInProgress2), init2 = readContext(init2), lazyComponent = lazyComponent(init2), workInProgress2.flags |= 1, reconcileChildren(current, workInProgress2, lazyComponent, renderLanes2), workInProgress2.child; - case 14: - return updateMemoComponent( - current, - workInProgress2, - workInProgress2.type, - workInProgress2.pendingProps, - renderLanes2 - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress2, - workInProgress2.type, - workInProgress2.pendingProps, - renderLanes2 - ); - case 19: - return updateSuspenseListComponent(current, workInProgress2, renderLanes2); - case 31: - return lazyComponent = workInProgress2.pendingProps, renderLanes2 = workInProgress2.mode, lazyComponent = { - mode: lazyComponent.mode, - children: lazyComponent.children - }, null === current ? (renderLanes2 = mountWorkInProgressOffscreenFiber( - lazyComponent, - renderLanes2 - ), renderLanes2.ref = workInProgress2.ref, workInProgress2.child = renderLanes2, renderLanes2.return = workInProgress2, workInProgress2 = renderLanes2) : (renderLanes2 = createWorkInProgress(current.child, lazyComponent), renderLanes2.ref = workInProgress2.ref, workInProgress2.child = renderLanes2, renderLanes2.return = workInProgress2, workInProgress2 = renderLanes2), workInProgress2; - case 22: - return updateOffscreenComponent(current, workInProgress2, renderLanes2); - case 24: - return prepareToReadContext(workInProgress2), lazyComponent = readContext(CacheContext), null === current ? (init2 = peekCacheFromPool(), null === init2 && (init2 = workInProgressRoot, prevState = createCache(), init2.pooledCache = prevState, prevState.refCount++, null !== prevState && (init2.pooledCacheLanes |= renderLanes2), init2 = prevState), workInProgress2.memoizedState = { - parent: lazyComponent, - cache: init2 - }, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, init2)) : (0 !== (current.lanes & renderLanes2) && (cloneUpdateQueue(current, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), init2 = current.memoizedState, prevState = workInProgress2.memoizedState, init2.parent !== lazyComponent ? (init2 = { parent: lazyComponent, cache: lazyComponent }, workInProgress2.memoizedState = init2, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = init2), pushProvider(workInProgress2, CacheContext, lazyComponent)) : (lazyComponent = prevState.cache, pushProvider(workInProgress2, CacheContext, lazyComponent), lazyComponent !== init2.cache && propagateContextChanges( - workInProgress2, - [CacheContext], - renderLanes2, - true - ))), reconcileChildren( - current, - workInProgress2, - workInProgress2.pendingProps.children, - renderLanes2 - ), workInProgress2.child; - case 29: - throw workInProgress2.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress2.tag)); - } - function markUpdate(workInProgress2) { - workInProgress2.flags |= 4; - } - function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) { - if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4)) - workInProgress2.flags &= -16777217; - else if (workInProgress2.flags |= 16777216, !preloadResource(resource)) { - resource = suspenseHandlerStackCursor.current; - if (null !== resource && ((workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? null !== shellBoundary : (workInProgressRootRenderLanes & 62914560) !== workInProgressRootRenderLanes && 0 === (workInProgressRootRenderLanes & 536870912) || resource !== shellBoundary)) - throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException; - workInProgress2.flags |= 8192; - } - } - function scheduleRetryEffect(workInProgress2, retryQueue) { - null !== retryQueue && (workInProgress2.flags |= 4); - workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue); - } - function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { - if (!isHydrating) - switch (renderState.tailMode) { - case "hidden": - hasRenderedATailFallback = renderState.tail; - for (var lastTailNode = null; null !== hasRenderedATailFallback; ) - null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling; - null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null; - break; - case "collapsed": - lastTailNode = renderState.tail; - for (var lastTailNode$113 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$113 = lastTailNode), lastTailNode = lastTailNode.sibling; - null === lastTailNode$113 ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : lastTailNode$113.sibling = null; - } - } - function bubbleProperties(completedWork) { - var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0; - if (didBailout) - for (var child$114 = completedWork.child; null !== child$114; ) - newChildLanes |= child$114.lanes | child$114.childLanes, subtreeFlags |= child$114.subtreeFlags & 65011712, subtreeFlags |= child$114.flags & 65011712, child$114.return = completedWork, child$114 = child$114.sibling; - else - for (child$114 = completedWork.child; null !== child$114; ) - newChildLanes |= child$114.lanes | child$114.childLanes, subtreeFlags |= child$114.subtreeFlags, subtreeFlags |= child$114.flags, child$114.return = completedWork, child$114 = child$114.sibling; - completedWork.subtreeFlags |= subtreeFlags; - completedWork.childLanes = newChildLanes; - return didBailout; - } - function completeWork(current, workInProgress2, renderLanes2) { - var newProps = workInProgress2.pendingProps; - popTreeContext(workInProgress2); - switch (workInProgress2.tag) { - case 31: - case 16: - case 15: - case 0: - case 11: - case 7: - case 8: - case 12: - case 9: - case 14: - return bubbleProperties(workInProgress2), null; - case 1: - return bubbleProperties(workInProgress2), null; - case 3: - renderLanes2 = workInProgress2.stateNode; - newProps = null; - null !== current && (newProps = current.memoizedState.cache); - workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048); - popProvider(CacheContext); - popHostContainer(); - renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null); - if (null === current || null === current.child) - popHydrationState(workInProgress2) ? markUpdate(workInProgress2) : null === current || current.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable()); - bubbleProperties(workInProgress2); - return null; - case 26: - return renderLanes2 = workInProgress2.memoizedState, null === current ? (markUpdate(workInProgress2), null !== renderLanes2 ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(workInProgress2, renderLanes2)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217)) : renderLanes2 ? renderLanes2 !== current.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(workInProgress2, renderLanes2)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (current.memoizedProps !== newProps && markUpdate(workInProgress2), bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217), null; - case 27: - popHostContext(workInProgress2); - renderLanes2 = rootInstanceStackCursor.current; - var type2 = workInProgress2.type; - if (null !== current && null != workInProgress2.stateNode) - current.memoizedProps !== newProps && markUpdate(workInProgress2); - else { - if (!newProps) { - if (null === workInProgress2.stateNode) - throw Error(formatProdErrorMessage(166)); - bubbleProperties(workInProgress2); - return null; - } - current = contextStackCursor.current; - popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current) : (current = resolveSingletonInstance(type2, newProps, renderLanes2), workInProgress2.stateNode = current, markUpdate(workInProgress2)); - } - bubbleProperties(workInProgress2); - return null; - case 5: - popHostContext(workInProgress2); - renderLanes2 = workInProgress2.type; - if (null !== current && null != workInProgress2.stateNode) - current.memoizedProps !== newProps && markUpdate(workInProgress2); - else { - if (!newProps) { - if (null === workInProgress2.stateNode) - throw Error(formatProdErrorMessage(166)); - bubbleProperties(workInProgress2); - return null; - } - current = contextStackCursor.current; - if (popHydrationState(workInProgress2)) - prepareToHydrateHostInstance(workInProgress2, current); - else { - type2 = getOwnerDocumentFromRootContainer( - rootInstanceStackCursor.current - ); - switch (current) { - case 1: - current = type2.createElementNS( - "http://www.w3.org/2000/svg", - renderLanes2 - ); - break; - case 2: - current = type2.createElementNS( - "http://www.w3.org/1998/Math/MathML", - renderLanes2 - ); - break; - default: - switch (renderLanes2) { - case "svg": - current = type2.createElementNS( - "http://www.w3.org/2000/svg", - renderLanes2 - ); - break; - case "math": - current = type2.createElementNS( - "http://www.w3.org/1998/Math/MathML", - renderLanes2 - ); - break; - case "script": - current = type2.createElement("div"); - current.innerHTML = "