cncjs-handwheel 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -128,6 +128,7 @@ Start from `cncjs-handwheel.config.example.json`.
|
|
|
128
128
|
| `device.baudRate`, `device.settleMs` | pendant baud rate; pendant input is ignored this long after opening |
|
|
129
129
|
| `device.send` | `false` (or `--no-pendant-send`): never write anything to the pendant, no status, `PONG` or `ERR`. Pendant to CNCjs keeps working. Useful when the firmware does not read from the serial port yet, or to rule the status stream out when debugging |
|
|
130
130
|
| `device.hupcl`, `dtr`, `rts` | modem control line handling (the defaults are fine with the udev rule) |
|
|
131
|
+
| `device.power` | `{line, poweredWhen, pollMs, debounceMs}`: detect that the handwheel is switched off while the USB cable is still plugged in, see "Detecting a switched-off handwheel". Off unless `line` is set |
|
|
131
132
|
| `status.intervalMs`, `status.minGapMs` | status line at least every 400 ms (the heartbeat), and never more often than every 350 ms (about 3 per second); a burst of commands or position changes costs one line per gap, always carrying the latest values. Explicit `?` / `STATUS?` requests are answered at once |
|
|
132
133
|
| `status.pollAfterCommand` | ask Grbl for a fresh report after pendant commands (at most one per `status.minGapMs`) |
|
|
133
134
|
| `status.format` | `grbl` or `json` |
|
|
@@ -139,6 +140,105 @@ Start from `cncjs-handwheel.config.example.json`.
|
|
|
139
140
|
| `http` | health endpoint (`enabled`, `host`, `port`) |
|
|
140
141
|
| `log.max` | pendant log lines kept for the widget |
|
|
141
142
|
|
|
143
|
+
## Detecting a switched-off handwheel
|
|
144
|
+
|
|
145
|
+
A USB serial chip such as the CH340 is powered by the cable, so when the handwheel's own power switch only cuts the
|
|
146
|
+
ESP32 (and display) the port stays open and the bridge cannot tell that nobody is listening. The way around is one
|
|
147
|
+
wire: the firmware drives a spare GPIO high once it is running, and that GPIO is connected to a **modem input of the
|
|
148
|
+
USB chip** (CTS#, DSR# or DCD#, whichever pin your chip has). The bridge reads that input; when the ESP32 has no power
|
|
149
|
+
the pin is not driven and a pull-down resistor holds it low.
|
|
150
|
+
|
|
151
|
+
Those inputs are active low, so a pin driven HIGH reads as *clear* and a pin pulled LOW reads as *set*. With the
|
|
152
|
+
wiring above the default `poweredWhen: "clear"` is right. Config:
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
"device": { "power": { "line": "cts" } }
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
| Key | Meaning |
|
|
159
|
+
|---|---|
|
|
160
|
+
| `line` | `cts`, `dsr` or `dcd`: the input that is wired to the handwheel (`null` = off, the default) |
|
|
161
|
+
| `poweredWhen` | `clear` (default: pin high = switched on) or `set` (pin low = switched on, if you wired it the other way round) |
|
|
162
|
+
| `pollMs`, `debounceMs` | read the line every 250 ms; a change must last 1000 ms to count (opening the port can reset the ESP32 and make the pin dip) |
|
|
163
|
+
|
|
164
|
+
While the handwheel is off the bridge reports `pendant.powered: false` in `/status` (`null` = unknown, or not
|
|
165
|
+
configured), ignores whatever the adapter's RX line picks up, writes nothing to it, drops the stored battery state and
|
|
166
|
+
discards a jog that was being held back. The widget shows **Handwheel switched off** (grey) and `Off` in the glyph row.
|
|
167
|
+
After switch-on the bridge ignores the ESP32's boot output for `device.settleMs`, as it does after opening the port.
|
|
168
|
+
|
|
169
|
+
**Check the wiring first.** Stop the bridge (it holds the port) and run `node tools/probe-modem-lines.js /dev/pendant`
|
|
170
|
+
from the repository. It prints CTS, DSR and DCD twice a second and marks changes; switch the handwheel off and on and
|
|
171
|
+
the wired line must change and stay changed (`1` = pin low, `0` = pin high). A line that never moves is not wired or is
|
|
172
|
+
not a pin of your chip; one that flickers is floating. USB only: a Bluetooth link has no modem lines, and the bridge
|
|
173
|
+
turns the feature off with a message if the port cannot report them. GPIO2 is a strapping pin: low or floating at reset
|
|
174
|
+
is what the ESP32 wants, so the pull-down is the right resistor, and the firmware should only drive it high once it has
|
|
175
|
+
started.
|
|
176
|
+
|
|
177
|
+
## CNCjs widget
|
|
178
|
+
|
|
179
|
+
The package ships a small [custom widget](https://github.com/cncjs/cncjs-widget-boilerplate) for CNCjs (source in
|
|
180
|
+
`widget/`, built output in `widget/dist`). Collapsed, it is one row: a handwheel icon coloured by the link state and a
|
|
181
|
+
short status line. Expanded (fullscreen, or the button in the widget) it adds machine position, handwheel, CNCjs and
|
|
182
|
+
jog statistics and a live tail of the handwheel log.
|
|
183
|
+
|
|
184
|
+
| Icon colour | Meaning |
|
|
185
|
+
|---|---|
|
|
186
|
+
| green | handwheel connected, CNCjs socket up and machine port open |
|
|
187
|
+
| amber | handwheel connected, but CNCjs is unreachable or the machine port is closed |
|
|
188
|
+
| red | handwheel not connected |
|
|
189
|
+
| grey | the widget cannot reach the bridge at all, or the handwheel is plugged in but switched off (needs `device.power`) |
|
|
190
|
+
|
|
191
|
+
The widget runs in your browser, not on the Pi, so it cannot use the bridge's `127.0.0.1:8001` directly. Two pieces
|
|
192
|
+
are needed, both on the machine that runs CNCjs.
|
|
193
|
+
|
|
194
|
+
**1. Serve the widget from CNCjs** with its `--mount` option. `cncjs-handwheel --widget-path` prints the directory:
|
|
195
|
+
|
|
196
|
+
cncjs --mount /handwheel:"$(cncjs-handwheel --widget-path)"
|
|
197
|
+
|
|
198
|
+
(Add it to the arguments of your CNCjs service. The path changes when npm updates the package, so keep the
|
|
199
|
+
`$(...)` form or restart CNCjs after an update.)
|
|
200
|
+
|
|
201
|
+
**2. Forward the API through your reverse proxy**, under the same host as CNCjs so there is no CORS or mixed
|
|
202
|
+
content. With Caddy:
|
|
203
|
+
|
|
204
|
+
handle_path /handwheel-api/* {
|
|
205
|
+
reverse_proxy 127.0.0.1:8001
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
The bridge stays on loopback. Anything that reaches that route can read `/status` and `/log` (no secrets, but
|
|
209
|
+
pendant log lines and the machine state), so put it behind the same access control as CNCjs.
|
|
210
|
+
|
|
211
|
+
Then in CNCjs choose *Manage Widgets*, add a *Custom* widget and set its URL to `/handwheel/`.
|
|
212
|
+
|
|
213
|
+
URL parameters (append them to the widget URL, e.g. `/handwheel/?theme=dark`):
|
|
214
|
+
|
|
215
|
+
| Parameter | Default | |
|
|
216
|
+
|---|---|---|
|
|
217
|
+
| `api` | `/handwheel-api` | URL path of the proxied bridge |
|
|
218
|
+
| `theme` | auto | `light` or `dark`; forces the widget's own light or dark colours and stops it from following CNCjs. By default (see below) it follows CNCjs |
|
|
219
|
+
| `mode` | | `full` starts expanded |
|
|
220
|
+
| `debug` | | `1` adds an expand/collapse button (normally the details show only while CNCjs shows the widget fullscreen) |
|
|
221
|
+
| `poll` | `400` | how often the widget asks the bridge, in ms (at least 200) |
|
|
222
|
+
|
|
223
|
+
**Colours.** Served from the same origin as CNCjs, the widget takes its light/dark mode (`data-color-mode` on
|
|
224
|
+
`<html>`) and its colours from CNCjs's own theme tokens (`--color-surface`, `--color-widget-header-bg`,
|
|
225
|
+
`--color-status-danger-text`, ... see `widget/src/hostTheme.js` for the mapping) and follows a mode change live. CNCjs has no green
|
|
226
|
+
token, so the OK green is the widget's own. Where it cannot read the page (cross-origin, such as the Vite dev server) or
|
|
227
|
+
CNCjs lacks a token, the widget's own light and dark stylesheet applies.
|
|
228
|
+
|
|
229
|
+
**Fullscreen.** When the widget is served from the same origin as CNCjs (the setups above), it watches CNCjs's
|
|
230
|
+
widget container and expands and collapses with CNCjs's own fullscreen button; its own expand button then hides.
|
|
231
|
+
Fullscreen, the log pane takes the height that is left, so the CNCjs widget only scrolls when the screen is too short for the cards. This relies on the CSS class CNCjs puts on a fullscreen widget, so a CNCjs refactor can break it; the widget then
|
|
232
|
+
just keeps its own expand button. Where the widget is cross-origin (the Vite dev server) it cannot look at the
|
|
233
|
+
page, so use the expand button or `?mode=full`. A sturdier alternative is `tools/cncjs-custom-widget-fullscreen.diff`
|
|
234
|
+
(11 lines in the CNCjs `Custom` widget): the patched CNCjs posts the fullscreen state to the widget, which listens
|
|
235
|
+
for it in every setup. It is optional.
|
|
236
|
+
|
|
237
|
+
**Developing the widget.** `npm run dev:widget` starts a Vite dev server that forwards `/handwheel-api` to a bridge
|
|
238
|
+
on `127.0.0.1:8001` (override with `HANDWHEEL_BRIDGE=http://host:port`). `npm run build:widget` builds `widget/dist`;
|
|
239
|
+
`npm publish` does that first (`prepublishOnly`), so the published package contains the built widget and the Pi
|
|
240
|
+
needs no build tools.
|
|
241
|
+
|
|
142
242
|
## Pendant protocol
|
|
143
243
|
|
|
144
244
|
Newline-terminated text. Everything except log lines must be printable ASCII.
|
|
@@ -153,6 +253,7 @@ Pendant to bridge:
|
|
|
153
253
|
| `?` or `STATUS?` | immediate status line |
|
|
154
254
|
| `PING` | answered with `PONG` |
|
|
155
255
|
| `; text` | console log entry for the widget; never sent to the controller |
|
|
256
|
+
| `[HW:bat=74,chg=0,eta=13200,st=ok]` | the pendant's own state for the widget, never sent to the controller. `bat` battery 0-100 %, `chg` 1 while charging, `eta` seconds until full (charging) or empty, `st` `ok`, `warn` or `err` (the widget then says "Check log"). Every key is optional (a key left out counts as unknown), unknown keys are ignored. Send it when something changes and at least every 30 s; it is dropped when the pendant disconnects |
|
|
156
257
|
|
|
157
258
|
Bridge to pendant:
|
|
158
259
|
|
|
@@ -187,6 +288,12 @@ the machine moves) tracks the move. If no line arrives for about 1 second, treat
|
|
|
187
288
|
EN to GND on the board removes the problem at its source.
|
|
188
289
|
- **Nothing from the pendant.** Run with `-v`. Lines rejected as non-text are reported as `dropped non-text line`
|
|
189
290
|
and counted in `/status` (`pendant.garbageLines`); wrong baud rate and a rebooting ESP32 look like that.
|
|
291
|
+
- **The widget's log pane stays empty.** The pane shows the pendant's *log lines* only: lines that start with a
|
|
292
|
+
semicolon (`; text`). It also says how many lines the bridge has received and how many of them were log lines
|
|
293
|
+
(`/status` has the same numbers as `pendant.rxLines` and `pendant.logLines`; `/log` has the entries). Lines
|
|
294
|
+
without the semicolon are not log lines: the bridge sends them to the controller as gcode, so a firmware that
|
|
295
|
+
prints debug text on the same serial port must prefix it with `;`. Output from before the port settled
|
|
296
|
+
(`device.settleMs`) is discarded.
|
|
190
297
|
- **`$$` and `$I` output at start.** Normal: CNCjs queries the controller when a client opens the CNC port.
|
|
191
298
|
- **No WPos.** Grbl reports the work offset only every 10-30 status reports; the first WPos can take a few seconds.
|
|
192
299
|
|
package/bin/cncjs-handwheel
CHANGED
|
@@ -50,7 +50,17 @@ const DEFAULTS = {
|
|
|
50
50
|
// the DTR/RTS toggling around open/close can reset the ESP32 or drop it into download mode.
|
|
51
51
|
hupcl: false, // do NOT drop DTR/RTS when the port is closed
|
|
52
52
|
dtr: null, // true/false = force DTR right after open, null = leave alone
|
|
53
|
-
rts: null
|
|
53
|
+
rts: null, // true/false = force RTS right after open, null = leave alone
|
|
54
|
+
|
|
55
|
+
// "Is the handwheel switched on?" for a USB-powered adapter that stays alive when the handwheel is
|
|
56
|
+
// switched off. The handwheel drives one modem INPUT of the USB serial chip (CTS#, DSR# or DCD#),
|
|
57
|
+
// and the bridge reads it. Off by default (line: null). USB only; there is no such line over Bluetooth.
|
|
58
|
+
// line: 'cts' | 'dsr' | 'dcd' which input is wired to the handwheel
|
|
59
|
+
// poweredWhen: 'clear' | 'set' the line state that means "switched on". The inputs are active low:
|
|
60
|
+
// a pin driven HIGH reads as clear, a pin pulled LOW reads as set. 'clear' = high means on
|
|
61
|
+
// pollMs: how often the line is read
|
|
62
|
+
// debounceMs: a change must last this long before it counts (opening the port can reset the ESP32)
|
|
63
|
+
power: { line: null, poweredWhen: 'clear', pollMs: 250, debounceMs: 1000 }
|
|
54
64
|
},
|
|
55
65
|
status: {
|
|
56
66
|
format: 'grbl', // 'grbl' -> <Idle|MPos:..|WPos:..|FS:..> 'json' -> {"t":"status",...}
|
|
@@ -83,6 +93,7 @@ program
|
|
|
83
93
|
.name('cncjs-handwheel')
|
|
84
94
|
.version(pkg.version)
|
|
85
95
|
.option('-l, --list', 'list available serial ports then exit')
|
|
96
|
+
.option('--widget-path', 'print the directory of the built CNCjs widget (for cncjs --mount) then exit')
|
|
86
97
|
.option('-c, --config <file>', 'config file (default: ' + DEFAULT_CONFIG_FILE + ' if present)')
|
|
87
98
|
.option('-s, --secret <secret>', 'CNCjs secret (default: $CNCJS_SECRET or ~/.cncrc)')
|
|
88
99
|
.option('-p, --port <port>', 'CNC controller port as known to CNCjs, e.g. /dev/ttyUSB0')
|
|
@@ -99,6 +110,16 @@ program
|
|
|
99
110
|
program.parse(process.argv);
|
|
100
111
|
const cli = program.opts();
|
|
101
112
|
|
|
113
|
+
if (cli.widgetPath) {
|
|
114
|
+
const dir = path.join(__dirname, '..', 'widget', 'dist');
|
|
115
|
+
if (!fs.existsSync(path.join(dir, 'index.html'))) {
|
|
116
|
+
console.error('The widget is not built: ' + dir + ' has no index.html. Run `npm run build:widget` in the package directory.');
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
119
|
+
console.log(dir);
|
|
120
|
+
process.exit(0);
|
|
121
|
+
}
|
|
122
|
+
|
|
102
123
|
/**
|
|
103
124
|
* Tells whether a value is a plain object (not null, not an array).
|
|
104
125
|
*
|
|
@@ -155,6 +176,17 @@ if (cli.jogTranslate === false) cfg.jog.translate = false;
|
|
|
155
176
|
|
|
156
177
|
if (!cfg.cncjs.port) { console.error('Missing CNC controller port (cncjs.port / --port)'); process.exit(1); }
|
|
157
178
|
if (!cfg.device.path) { console.error('Missing pendant port (device.path / --pendant-port). Try --list'); process.exit(1); }
|
|
179
|
+
if (cfg.device.power.line) {
|
|
180
|
+
cfg.device.power.line = String(cfg.device.power.line).toLowerCase();
|
|
181
|
+
if (!['cts', 'dsr', 'dcd'].includes(cfg.device.power.line)) {
|
|
182
|
+
console.error('device.power.line must be "cts", "dsr", "dcd" or null, not "' + cfg.device.power.line + '"');
|
|
183
|
+
process.exit(1);
|
|
184
|
+
}
|
|
185
|
+
if (!['clear', 'set'].includes(cfg.device.power.poweredWhen)) {
|
|
186
|
+
console.error('device.power.poweredWhen must be "clear" or "set", not "' + cfg.device.power.poweredWhen + '"');
|
|
187
|
+
process.exit(1);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
158
190
|
|
|
159
191
|
// ---------------------------------------------------------------- state
|
|
160
192
|
const store = { controller: { state: {}, settings: {} }, sender: { status: {} } };
|
|
@@ -162,10 +194,11 @@ const store = { controller: { state: {}, settings: {} }, sender: { status: {} }
|
|
|
162
194
|
const health = {
|
|
163
195
|
startedAt: Date.now(),
|
|
164
196
|
pendant: { path: cfg.device.path, connected: false, lastRx: null, lastTx: null, rxLines: 0, txLines: 0,
|
|
165
|
-
reconnects: 0, errors: 0, lastError: null, logLines: 0, garbageLines: 0
|
|
197
|
+
reconnects: 0, errors: 0, lastError: null, logLines: 0, garbageLines: 0, link: null, info: null,
|
|
198
|
+
powered: null, powerError: null }, // powered: null = unknown or not configured, true / false = switched on / off
|
|
166
199
|
cncjs: { socketConnected: false, portOpen: false, port: cfg.cncjs.port, controllerType: cfg.cncjs.controllerType,
|
|
167
200
|
lastError: null, droppedCommands: 0 },
|
|
168
|
-
jog: { sent: 0, merged: 0, discarded: 0, stalls: 0, cancels: 0, inFlight: 0, held: false },
|
|
201
|
+
jog: { sent: 0, merged: 0, discarded: 0, stalls: 0, cancels: 0, inFlight: 0, held: false, lastAt: null },
|
|
169
202
|
lastCommand: null
|
|
170
203
|
};
|
|
171
204
|
|
|
@@ -330,6 +363,11 @@ let lastReset = 0;
|
|
|
330
363
|
*/
|
|
331
364
|
function onPendantData(buf) {
|
|
332
365
|
const now = Date.now();
|
|
366
|
+
if (health.pendant.powered === false) { // switched off: whatever the adapter's RX line picks up is noise
|
|
367
|
+
rxBuf = '';
|
|
368
|
+
skipLine = false;
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
333
371
|
health.pendant.lastRx = now;
|
|
334
372
|
if (now < ignoreUntil) {
|
|
335
373
|
rxBuf = '';
|
|
@@ -387,6 +425,46 @@ function dropLine(raw) {
|
|
|
387
425
|
}
|
|
388
426
|
}
|
|
389
427
|
|
|
428
|
+
/**
|
|
429
|
+
* Parses the pendant's own status report `[HW:bat=74,chg=0,eta=13200,st=ok]` and stores it for /status.
|
|
430
|
+
* Keys: bat 0-100 (%), chg 1 while charging, eta seconds to full (charging) or empty, st ok|warn|err.
|
|
431
|
+
* All are optional and unknown keys are ignored, so the firmware can grow. Never sent to the controller.
|
|
432
|
+
*
|
|
433
|
+
* @param {string} line - trimmed line from the pendant
|
|
434
|
+
* @returns {boolean} true if the line was a pendant status report (valid or not)
|
|
435
|
+
*/
|
|
436
|
+
function parsePendantReport(line) {
|
|
437
|
+
const m = /^\[HW:([^\]]*)\]$/.exec(line);
|
|
438
|
+
if (!m) return false;
|
|
439
|
+
const info = {}; // each report replaces the last one: a key that is left out is unknown, not unchanged
|
|
440
|
+
m[1].split(',').forEach((pair) => {
|
|
441
|
+
const [k, v] = pair.split('=').map((x) => x.trim());
|
|
442
|
+
const num = /^\d+$/.test(v) ? Number(v) : null;
|
|
443
|
+
if (k === 'bat' && num !== null && num <= 100) info.bat = num;
|
|
444
|
+
else if (k === 'chg' && (v === '0' || v === '1')) info.chg = v === '1';
|
|
445
|
+
else if (k === 'eta' && num !== null) info.eta = num;
|
|
446
|
+
else if (k === 'st' && /^(ok|warn|err)$/.test(v)) info.st = v;
|
|
447
|
+
});
|
|
448
|
+
info.at = Date.now();
|
|
449
|
+
health.pendant.info = info;
|
|
450
|
+
return true;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Works out whether the pendant port is USB or Bluetooth (rfcomm), looking through the udev symlink
|
|
455
|
+
* (/dev/pendant) at the real device node.
|
|
456
|
+
*
|
|
457
|
+
* @param {string} devPath - configured pendant port
|
|
458
|
+
* @returns {?string} 'bluetooth', 'usb' or null if it cannot be told
|
|
459
|
+
*/
|
|
460
|
+
function detectLink(devPath) {
|
|
461
|
+
let real = devPath;
|
|
462
|
+
try { real = fs.realpathSync(devPath); } catch (err) { /* keep the configured path */ }
|
|
463
|
+
if (/rfcomm/i.test(real)) return 'bluetooth';
|
|
464
|
+
if (/tty(USB|ACM)/i.test(real) || /usb/i.test(real)) return 'usb';
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
|
|
390
468
|
/**
|
|
391
469
|
* Handles one complete line from the pendant: realtime commands (! ~ ^X ?), console log entries
|
|
392
470
|
* (; ...), PING / STATUS?, and otherwise gcode (jogs are translated to $J= for Grbl).
|
|
@@ -422,6 +500,7 @@ function onPendantLine(raw) {
|
|
|
422
500
|
dropLine(raw);
|
|
423
501
|
return;
|
|
424
502
|
}
|
|
503
|
+
if (parsePendantReport(line)) return;
|
|
425
504
|
const upper = line.toUpperCase();
|
|
426
505
|
if (upper === 'PING') return sendToPendant('PONG');
|
|
427
506
|
if (upper === 'STATUS?') return sendStatus(true);
|
|
@@ -508,6 +587,7 @@ function sendGcodeLine(line) {
|
|
|
508
587
|
* @returns {boolean} true
|
|
509
588
|
*/
|
|
510
589
|
function queueJog(j) {
|
|
590
|
+
health.jog.lastAt = Date.now(); // the wheel is being turned (the widget shows "Jog" for a moment)
|
|
511
591
|
const p = jog.pending;
|
|
512
592
|
if (p && p.prefix === j.prefix && p.axis === j.axis && p.feed === j.feed) {
|
|
513
593
|
p.dist += j.dist;
|
|
@@ -759,7 +839,7 @@ function queueStatus() {
|
|
|
759
839
|
function sendToPendant(text, should_log=false) {
|
|
760
840
|
if (!cfg.device.send) return false;
|
|
761
841
|
const port = pendantPort;
|
|
762
|
-
if (!port || !port.isOpen) return false;
|
|
842
|
+
if (!port || !port.isOpen || health.pendant.powered === false) return false;
|
|
763
843
|
if(should_log) log('cncjs -> ', 'pendant', text);
|
|
764
844
|
port.write(text + '\n', (err) => {
|
|
765
845
|
if (err) noteError(err);
|
|
@@ -801,6 +881,89 @@ function scheduleReconnect() {
|
|
|
801
881
|
}, cfg.device.reconnectMs);
|
|
802
882
|
}
|
|
803
883
|
|
|
884
|
+
// ---------------------------------------------------------------- handwheel power (modem line)
|
|
885
|
+
let powerTimer = null;
|
|
886
|
+
let powerBusy = false;
|
|
887
|
+
let powerRaw = null; // last reading (true = on), not yet debounced
|
|
888
|
+
let powerSince = 0; // when powerRaw last changed
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Stops reading the power line and forgets what it said (the state is unknown while the port is closed).
|
|
892
|
+
*
|
|
893
|
+
* @returns {void}
|
|
894
|
+
*/
|
|
895
|
+
function stopPowerWatch() {
|
|
896
|
+
clearInterval(powerTimer);
|
|
897
|
+
powerTimer = null;
|
|
898
|
+
powerBusy = false;
|
|
899
|
+
powerRaw = null;
|
|
900
|
+
health.pendant.powered = null;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Records a debounced change of the handwheel's power state.
|
|
905
|
+
*
|
|
906
|
+
* @param {boolean} on - true if the handwheel is switched on
|
|
907
|
+
* @returns {void}
|
|
908
|
+
*/
|
|
909
|
+
function setPowered(on) {
|
|
910
|
+
health.pendant.powered = on;
|
|
911
|
+
rxBuf = '';
|
|
912
|
+
skipLine = false;
|
|
913
|
+
if (on) {
|
|
914
|
+
// the ESP32 is booting: ignore its output like after opening the port
|
|
915
|
+
ignoreUntil = Date.now() + Number(cfg.device.settleMs || 0);
|
|
916
|
+
} else {
|
|
917
|
+
health.pendant.info = null; // a stale battery level is worse than none
|
|
918
|
+
discardHeldJog(); // switching the handwheel off must not let a held jog fire afterwards
|
|
919
|
+
}
|
|
920
|
+
console.log('Handwheel switched ' + (on ? 'on' : 'off'));
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Reads the modem line once and applies the debounce.
|
|
925
|
+
*
|
|
926
|
+
* @param {SerialPort} port - the open pendant port
|
|
927
|
+
* @returns {void}
|
|
928
|
+
*/
|
|
929
|
+
function pollPower(port) {
|
|
930
|
+
if (powerBusy || !port.isOpen) return;
|
|
931
|
+
powerBusy = true;
|
|
932
|
+
port.get((err, signals) => {
|
|
933
|
+
powerBusy = false;
|
|
934
|
+
if (port !== pendantPort || !port.isOpen) return;
|
|
935
|
+
if (err) {
|
|
936
|
+
// e.g. Bluetooth (rfcomm) has no modem lines: say so once and stop asking
|
|
937
|
+
health.pendant.powerError = err.message;
|
|
938
|
+
console.error('Pendant power line cannot be read, power detection is off:', err.message);
|
|
939
|
+
stopPowerWatch();
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
const set = !!(signals && signals[cfg.device.power.line]);
|
|
943
|
+
const on = cfg.device.power.poweredWhen === 'set' ? set : !set;
|
|
944
|
+
const now = Date.now();
|
|
945
|
+
if (on !== powerRaw) {
|
|
946
|
+
powerRaw = on;
|
|
947
|
+
powerSince = now;
|
|
948
|
+
}
|
|
949
|
+
if (health.pendant.powered !== on && now - powerSince >= Number(cfg.device.power.debounceMs || 0)) setPowered(on);
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Starts polling the configured modem line of the pendant's port (nothing happens if device.power.line is null).
|
|
955
|
+
*
|
|
956
|
+
* @param {SerialPort} port - the open pendant port
|
|
957
|
+
* @returns {void}
|
|
958
|
+
*/
|
|
959
|
+
function startPowerWatch(port) {
|
|
960
|
+
stopPowerWatch();
|
|
961
|
+
health.pendant.powerError = null;
|
|
962
|
+
if (!cfg.device.power.line) return;
|
|
963
|
+
powerTimer = setInterval(() => pollPower(port), Math.max(50, Number(cfg.device.power.pollMs) || 250));
|
|
964
|
+
pollPower(port);
|
|
965
|
+
}
|
|
966
|
+
|
|
804
967
|
/**
|
|
805
968
|
* Opens the pendant's serial port and wires up its events. Failures and closes schedule a reconnect.
|
|
806
969
|
* After a successful open, pendant input is ignored for device.settleMs and a status line is sent.
|
|
@@ -826,6 +989,8 @@ function openPendant() {
|
|
|
826
989
|
port.on('error', noteError);
|
|
827
990
|
port.on('close', () => {
|
|
828
991
|
health.pendant.connected = false;
|
|
992
|
+
health.pendant.info = null; // a stale battery level is worse than none
|
|
993
|
+
stopPowerWatch();
|
|
829
994
|
if (!shuttingDown) console.log('Pendant port closed');
|
|
830
995
|
scheduleReconnect();
|
|
831
996
|
});
|
|
@@ -845,8 +1010,10 @@ function openPendant() {
|
|
|
845
1010
|
port.set(lines, (setErr) => { if (setErr) noteError(setErr); });
|
|
846
1011
|
}
|
|
847
1012
|
health.pendant.connected = true;
|
|
1013
|
+
health.pendant.link = detectLink(cfg.device.path);
|
|
848
1014
|
health.pendant.lastError = null;
|
|
849
1015
|
console.log('Pendant connected on ' + cfg.device.path);
|
|
1016
|
+
startPowerWatch(port);
|
|
850
1017
|
sendStatus(true);
|
|
851
1018
|
});
|
|
852
1019
|
}
|
|
@@ -862,13 +1029,15 @@ function healthReport() {
|
|
|
862
1029
|
const now = Date.now();
|
|
863
1030
|
const age = (t) => (t ? now - t : null);
|
|
864
1031
|
return {
|
|
865
|
-
ok: health.pendant.connected && cncReady(),
|
|
1032
|
+
ok: health.pendant.connected && health.pendant.powered !== false && cncReady(),
|
|
866
1033
|
version: pkg.version,
|
|
867
1034
|
uptimeMs: now - health.startedAt,
|
|
868
|
-
pendant: Object.assign({}, health.pendant, { sendEnabled: !!cfg.device.send,
|
|
869
|
-
|
|
1035
|
+
pendant: Object.assign({}, health.pendant, { sendEnabled: !!cfg.device.send, powerDetect: !!cfg.device.power.line,
|
|
1036
|
+
lastRxAgeMs: age(health.pendant.lastRx),
|
|
1037
|
+
lastTxAgeMs: age(health.pendant.lastTx),
|
|
1038
|
+
info: health.pendant.info && Object.assign({}, health.pendant.info, { ageMs: age(health.pendant.info.at) }) }),
|
|
870
1039
|
cncjs: health.cncjs,
|
|
871
|
-
jog: health.jog,
|
|
1040
|
+
jog: Object.assign({}, health.jog, { lastAgeMs: age(health.jog.lastAt) }),
|
|
872
1041
|
lastCommand: health.lastCommand,
|
|
873
1042
|
status: snapshot()
|
|
874
1043
|
};
|
|
@@ -908,6 +1077,7 @@ function shutdown() {
|
|
|
908
1077
|
if (shuttingDown) return;
|
|
909
1078
|
shuttingDown = true;
|
|
910
1079
|
clearInterval(statusTimer);
|
|
1080
|
+
clearInterval(powerTimer);
|
|
911
1081
|
clearInterval(jogTimer);
|
|
912
1082
|
clearTimeout(cancelTimer);
|
|
913
1083
|
clearTimeout(reconnectTimer);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cncjs-handwheel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "CNCjs pendant bridge for a serial (USB/Bluetooth) ESP32 CNC handwheel",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cncjs",
|
|
@@ -24,12 +24,15 @@
|
|
|
24
24
|
"bin",
|
|
25
25
|
"lib",
|
|
26
26
|
"index.js",
|
|
27
|
-
"cncjs-handwheel.config.example.json"
|
|
27
|
+
"cncjs-handwheel.config.example.json",
|
|
28
|
+
"widget/dist"
|
|
28
29
|
],
|
|
29
30
|
"scripts": {
|
|
30
31
|
"start": "node bin/cncjs-handwheel",
|
|
31
32
|
"check": "node --check index.js && node --check bin/cncjs-handwheel && node --check lib/service.js",
|
|
32
|
-
"prepublishOnly": "npm run check"
|
|
33
|
+
"prepublishOnly": "npm run check && npm run build:widget",
|
|
34
|
+
"build:widget": "npm install --prefix widget && npm run build --prefix widget",
|
|
35
|
+
"dev:widget": "npm run dev --prefix widget"
|
|
33
36
|
},
|
|
34
37
|
"engines": {
|
|
35
38
|
"node": ">=20"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--bg: #fff;--fg: #333;--muted: #777;--card: #fafafa;--border: #ddd;--ok: #2e8b3d;--warn: #c77c00;--down: #c9302c;--offline: #8a8a8a;--unknown: #8a8a8a;--accent: #337ab7;--head-bg: #f6f7f8;--head-fg: #222;--head-border: #ccc;color-scheme:light}:root[data-theme=dark]{--bg: #1e1f22;--fg: #dcdcdc;--muted: #9a9a9a;--card: #26282c;--border: #3a3d42;--ok: #52c262;--warn: #e0a030;--down: #ef6a64;--offline: #8f8f8f;--unknown: #8f8f8f;--accent: #6aaee6;--head-bg: #2b2e33;--head-fg: #dcdcdc;--head-border: #3a3d42;color-scheme:dark}*{box-sizing:border-box}html,body{margin:0}body{background:var(--bg);color:var(--fg);font:14px/1.35 Segoe UI,-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Arial,sans-serif}code,.mono{font-family:Segoe UI Mono,SFMono-Medium,SF Mono,Menlo,Consolas,Courier,monospace}.widget{padding:8px 10px}.widget.level-ok{--level: var(--ok)}.widget.level-warn{--level: var(--warn)}.widget.level-down{--level: var(--down)}.widget.level-offline{--level: var(--offline)}.widget.level-unknown{--level: var(--unknown)}.head{display:flex;align-items:center;gap:10px;min-height:44px}.icon{color:var(--level);display:flex;flex:none}.title{flex:1;min-width:0;display:flex;flex-direction:column}.title strong{color:var(--level);font-size:15px}.title small{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toggle{flex:none;width:44px;height:44px;border:1px solid var(--border);border-radius:4px;background:var(--btn-bg, var(--card));color:var(--fg);font-size:16px;cursor:pointer}.toggle:focus-visible{outline:2px solid var(--focus, var(--accent));outline-offset:1px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;margin-top:8px}.card{background:var(--bg);border:1px solid var(--head-border)}.card h3{margin:0;padding:0 10px;font-size:14px;font-weight:400;line-height:32px;background:var(--head-bg);color:var(--head-fg);border-bottom:1px solid var(--head-border)}.card .body{padding:6px 10px 8px}.logcard{margin-top:8px}.value b{font-weight:inherit}.bad{color:var(--down)}.good{color:var(--ok)}.row{display:flex;justify-content:space-between;gap:10px;padding:1px 0}.label{color:var(--muted)}.value{text-align:right;overflow-wrap:anywhere}.log{height:260px;overflow-y:auto;background:var(--card);padding:4px 8px;font-family:Segoe UI Mono,SFMono-Medium,SF Mono,Menlo,Consolas,Courier,monospace;font-size:12px}.logline{white-space:pre-wrap;overflow-wrap:anywhere}.logline .time,.empty,.hint{color:var(--muted)}.hint{margin:8px 0 0}.title small{white-space:normal;overflow:visible}.counts{display:flex;flex-wrap:wrap;gap:2px 16px;margin-top:2px}.counts em{font-style:normal;color:var(--muted);margin-right:2px}.counts b{font-weight:600;font-variant-numeric:tabular-nums}.counts i{font-style:normal;color:var(--muted);margin:0 2px}.counts .good{color:var(--ok)}.counts .bad{color:var(--down)}.mstate{font-weight:600}.mstate.busy{color:var(--accent)}.mstate.warn{color:var(--warn)}.mstate.bad{color:var(--down)}.pend{display:flex;align-items:center;flex-wrap:wrap;gap:6px 18px;margin-top:8px;padding-top:8px;border-top:1px solid var(--border)}.g{display:inline-flex;align-items:center;gap:6px}.g small{color:var(--muted);font-size:12px}.g.muted{color:var(--muted)}.bat .pct{font-weight:600;font-variant-numeric:tabular-nums}.bat.ok svg{color:var(--ok)}.bat.mid svg{color:var(--warn)}.bat.low svg,.bat.low .pct{color:var(--down)}.st{margin-left:auto}.st.s-ok{color:var(--ok)}.st.s-warn{color:var(--warn)}.st.s-err{color:var(--down)}.st.s-unk{color:var(--muted)}.st.s-warn small{color:var(--warn);font-weight:600}.st.s-err small{color:var(--down);font-weight:600}html.embedded,html.embedded body{overflow-y:hidden}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var wc=Object.defineProperty;var kc=(e,t,n)=>t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Bu=(e,t,n)=>kc(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();var ts={exports:{}},sl={},ns={exports:{}},z={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var bn=Symbol.for("react.element"),Sc=Symbol.for("react.portal"),xc=Symbol.for("react.fragment"),Ec=Symbol.for("react.strict_mode"),Cc=Symbol.for("react.profiler"),_c=Symbol.for("react.provider"),Nc=Symbol.for("react.context"),jc=Symbol.for("react.forward_ref"),Pc=Symbol.for("react.suspense"),Lc=Symbol.for("react.memo"),zc=Symbol.for("react.lazy"),Vu=Symbol.iterator;function Tc(e){return e===null||typeof e!="object"?null:(e=Vu&&e[Vu]||e["@@iterator"],typeof e=="function"?e:null)}var rs={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ls=Object.assign,os={};function an(e,t,n){this.props=e,this.context=t,this.refs=os,this.updater=n||rs}an.prototype.isReactComponent={};an.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};an.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function us(){}us.prototype=an.prototype;function Yo(e,t,n){this.props=e,this.context=t,this.refs=os,this.updater=n||rs}var Xo=Yo.prototype=new us;Xo.constructor=Yo;ls(Xo,an.prototype);Xo.isPureReactComponent=!0;var Wu=Array.isArray,is=Object.prototype.hasOwnProperty,Go={current:null},ss={key:!0,ref:!0,__self:!0,__source:!0};function as(e,t,n){var r,l={},o=null,u=null;if(t!=null)for(r in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(o=""+t.key),t)is.call(t,r)&&!ss.hasOwnProperty(r)&&(l[r]=t[r]);var i=arguments.length-2;if(i===1)l.children=n;else if(1<i){for(var s=Array(i),f=0;f<i;f++)s[f]=arguments[f+2];l.children=s}if(e&&e.defaultProps)for(r in i=e.defaultProps,i)l[r]===void 0&&(l[r]=i[r]);return{$$typeof:bn,type:e,key:o,ref:u,props:l,_owner:Go.current}}function Mc(e,t){return{$$typeof:bn,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zo(e){return typeof e=="object"&&e!==null&&e.$$typeof===bn}function Rc(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Qu=/\/+/g;function jl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Rc(""+e.key):t.toString(36)}function Cr(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var u=!1;if(e===null)u=!0;else switch(o){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case bn:case Sc:u=!0}}if(u)return u=e,l=l(u),e=r===""?"."+jl(u,0):r,Wu(l)?(n="",e!=null&&(n=e.replace(Qu,"$&/")+"/"),Cr(l,t,n,"",function(f){return f})):l!=null&&(Zo(l)&&(l=Mc(l,n+(!l.key||u&&u.key===l.key?"":(""+l.key).replace(Qu,"$&/")+"/")+e)),t.push(l)),1;if(u=0,r=r===""?".":r+":",Wu(e))for(var i=0;i<e.length;i++){o=e[i];var s=r+jl(o,i);u+=Cr(o,t,n,s,l)}else if(s=Tc(e),typeof s=="function")for(e=s.call(e),i=0;!(o=e.next()).done;)o=o.value,s=r+jl(o,i++),u+=Cr(o,t,n,s,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function ur(e,t,n){if(e==null)return e;var r=[],l=0;return Cr(e,r,"","",function(o){return t.call(n,o,l++)}),r}function Oc(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ae={current:null},_r={transition:null},Dc={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:_r,ReactCurrentOwner:Go};function cs(){throw Error("act(...) is not supported in production builds of React.")}z.Children={map:ur,forEach:function(e,t,n){ur(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ur(e,function(){t++}),t},toArray:function(e){return ur(e,function(t){return t})||[]},only:function(e){if(!Zo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};z.Component=an;z.Fragment=xc;z.Profiler=Cc;z.PureComponent=Yo;z.StrictMode=Ec;z.Suspense=Pc;z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dc;z.act=cs;z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ls({},e.props),l=e.key,o=e.ref,u=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,u=Go.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(s in t)is.call(t,s)&&!ss.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&i!==void 0?i[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){i=Array(s);for(var f=0;f<s;f++)i[f]=arguments[f+2];r.children=i}return{$$typeof:bn,type:e.type,key:l,ref:o,props:r,_owner:u}};z.createContext=function(e){return e={$$typeof:Nc,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:_c,_context:e},e.Consumer=e};z.createElement=as;z.createFactory=function(e){var t=as.bind(null,e);return t.type=e,t};z.createRef=function(){return{current:null}};z.forwardRef=function(e){return{$$typeof:jc,render:e}};z.isValidElement=Zo;z.lazy=function(e){return{$$typeof:zc,_payload:{_status:-1,_result:e},_init:Oc}};z.memo=function(e,t){return{$$typeof:Lc,type:e,compare:t===void 0?null:t}};z.startTransition=function(e){var t=_r.transition;_r.transition={};try{e()}finally{_r.transition=t}};z.unstable_act=cs;z.useCallback=function(e,t){return ae.current.useCallback(e,t)};z.useContext=function(e){return ae.current.useContext(e)};z.useDebugValue=function(){};z.useDeferredValue=function(e){return ae.current.useDeferredValue(e)};z.useEffect=function(e,t){return ae.current.useEffect(e,t)};z.useId=function(){return ae.current.useId()};z.useImperativeHandle=function(e,t,n){return ae.current.useImperativeHandle(e,t,n)};z.useInsertionEffect=function(e,t){return ae.current.useInsertionEffect(e,t)};z.useLayoutEffect=function(e,t){return ae.current.useLayoutEffect(e,t)};z.useMemo=function(e,t){return ae.current.useMemo(e,t)};z.useReducer=function(e,t,n){return ae.current.useReducer(e,t,n)};z.useRef=function(e){return ae.current.useRef(e)};z.useState=function(e){return ae.current.useState(e)};z.useSyncExternalStore=function(e,t,n){return ae.current.useSyncExternalStore(e,t,n)};z.useTransition=function(){return ae.current.useTransition()};z.version="18.3.1";ns.exports=z;var W=ns.exports;/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ic=W,Fc=Symbol.for("react.element"),Uc=Symbol.for("react.fragment"),Hc=Object.prototype.hasOwnProperty,Ac=Ic.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$c={key:!0,ref:!0,__self:!0,__source:!0};function fs(e,t,n){var r,l={},o=null,u=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(u=t.ref);for(r in t)Hc.call(t,r)&&!$c.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Fc,type:e,key:o,ref:u,props:l,_owner:Ac.current}}sl.Fragment=Uc;sl.jsx=fs;sl.jsxs=fs;ts.exports=sl;var h=ts.exports,ds={exports:{}},ke={},ps={exports:{}},hs={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(C,P){var L=C.length;C.push(P);e:for(;0<L;){var K=L-1>>>1,J=C[K];if(0<l(J,P))C[K]=P,C[L]=J,L=K;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var P=C[0],L=C.pop();if(L!==P){C[0]=L;e:for(var K=0,J=C.length,lr=J>>>1;K<lr;){var gt=2*(K+1)-1,Nl=C[gt],yt=gt+1,or=C[yt];if(0>l(Nl,L))yt<J&&0>l(or,Nl)?(C[K]=or,C[yt]=L,K=yt):(C[K]=Nl,C[gt]=L,K=gt);else if(yt<J&&0>l(or,L))C[K]=or,C[yt]=L,K=yt;else break e}}return P}function l(C,P){var L=C.sortIndex-P.sortIndex;return L!==0?L:C.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,i=u.now();e.unstable_now=function(){return u.now()-i}}var s=[],f=[],v=1,m=null,p=3,w=!1,k=!1,S=!1,M=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var P=n(f);P!==null;){if(P.callback===null)r(f);else if(P.startTime<=C)r(f),P.sortIndex=P.expirationTime,t(s,P);else break;P=n(f)}}function g(C){if(S=!1,d(C),!k)if(n(s)!==null)k=!0,Cl(E);else{var P=n(f);P!==null&&_l(g,P.startTime-C)}}function E(C,P){k=!1,S&&(S=!1,c(j),j=-1),w=!0;var L=p;try{for(d(P),m=n(s);m!==null&&(!(m.expirationTime>P)||C&&!Pe());){var K=m.callback;if(typeof K=="function"){m.callback=null,p=m.priorityLevel;var J=K(m.expirationTime<=P);P=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(s)&&r(s),d(P)}else r(s);m=n(s)}if(m!==null)var lr=!0;else{var gt=n(f);gt!==null&&_l(g,gt.startTime-P),lr=!1}return lr}finally{m=null,p=L,w=!1}}var _=!1,N=null,j=-1,Q=5,T=-1;function Pe(){return!(e.unstable_now()-T<Q)}function dn(){if(N!==null){var C=e.unstable_now();T=C;var P=!0;try{P=N(!0,C)}finally{P?pn():(_=!1,N=null)}}else _=!1}var pn;if(typeof a=="function")pn=function(){a(dn)};else if(typeof MessageChannel<"u"){var $u=new MessageChannel,yc=$u.port2;$u.port1.onmessage=dn,pn=function(){yc.postMessage(null)}}else pn=function(){M(dn,0)};function Cl(C){N=C,_||(_=!0,pn())}function _l(C,P){j=M(function(){C(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){k||w||(k=!0,Cl(E))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(C){switch(p){case 1:case 2:case 3:var P=3;break;default:P=p}var L=p;p=P;try{return C()}finally{p=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,P){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var L=p;p=C;try{return P()}finally{p=L}},e.unstable_scheduleCallback=function(C,P,L){var K=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?K+L:K):L=K,C){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=L+J,C={id:v++,callback:P,priorityLevel:C,startTime:L,expirationTime:J,sortIndex:-1},L>K?(C.sortIndex=L,t(f,C),n(s)===null&&C===n(f)&&(S?(c(j),j=-1):S=!0,_l(g,L-K))):(C.sortIndex=J,t(s,C),k||w||(k=!0,Cl(E))),C},e.unstable_shouldYield=Pe,e.unstable_wrapCallback=function(C){var P=p;return function(){var L=p;p=P;try{return C.apply(this,arguments)}finally{p=L}}}})(hs);ps.exports=hs;var Bc=ps.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Vc=W,we=Bc;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ms=new Set,In={};function Mt(e,t){en(e,t),en(e+"Capture",t)}function en(e,t){for(In[e]=t,e=0;e<t.length;e++)ms.add(t[e])}var Ke=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bl=Object.prototype.hasOwnProperty,Wc=/^[: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]*$/,Ku={},Yu={};function Qc(e){return bl.call(Yu,e)?!0:bl.call(Ku,e)?!1:Wc.test(e)?Yu[e]=!0:(Ku[e]=!0,!1)}function Kc(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Yc(e,t,n,r){if(t===null||typeof t>"u"||Kc(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ce(e,t,n,r,l,o,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=u}var ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ne[e]=new ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ne[t]=new ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ne[e]=new ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ne[e]=new ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ne[e]=new ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ne[e]=new ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ne[e]=new ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ne[e]=new ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ne[e]=new ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var Jo=/[\-:]([a-z])/g;function qo(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Jo,qo);ne[t]=new ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Jo,qo);ne[t]=new ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Jo,qo);ne[t]=new ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ne[e]=new ce(e,1,!1,e.toLowerCase(),null,!1,!1)});ne.xlinkHref=new ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ne[e]=new ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function bo(e,t,n,r){var l=ne.hasOwnProperty(t)?ne[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Yc(t,n,l,r)&&(n=null),r||l===null?Qc(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ze=Vc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ir=Symbol.for("react.element"),It=Symbol.for("react.portal"),Ft=Symbol.for("react.fragment"),eu=Symbol.for("react.strict_mode"),eo=Symbol.for("react.profiler"),vs=Symbol.for("react.provider"),gs=Symbol.for("react.context"),tu=Symbol.for("react.forward_ref"),to=Symbol.for("react.suspense"),no=Symbol.for("react.suspense_list"),nu=Symbol.for("react.memo"),qe=Symbol.for("react.lazy"),ys=Symbol.for("react.offscreen"),Xu=Symbol.iterator;function hn(e){return e===null||typeof e!="object"?null:(e=Xu&&e[Xu]||e["@@iterator"],typeof e=="function"?e:null)}var B=Object.assign,Pl;function xn(e){if(Pl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Pl=t&&t[1]||""}return`
|
|
34
|
+
`+Pl+e}var Ll=!1;function zl(e,t){if(!e||Ll)return"";Ll=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var l=f.stack.split(`
|
|
35
|
+
`),o=r.stack.split(`
|
|
36
|
+
`),u=l.length-1,i=o.length-1;1<=u&&0<=i&&l[u]!==o[i];)i--;for(;1<=u&&0<=i;u--,i--)if(l[u]!==o[i]){if(u!==1||i!==1)do if(u--,i--,0>i||l[u]!==o[i]){var s=`
|
|
37
|
+
`+l[u].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=u&&0<=i);break}}}finally{Ll=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xn(e):""}function Xc(e){switch(e.tag){case 5:return xn(e.type);case 16:return xn("Lazy");case 13:return xn("Suspense");case 19:return xn("SuspenseList");case 0:case 2:case 15:return e=zl(e.type,!1),e;case 11:return e=zl(e.type.render,!1),e;case 1:return e=zl(e.type,!0),e;default:return""}}function ro(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ft:return"Fragment";case It:return"Portal";case eo:return"Profiler";case eu:return"StrictMode";case to:return"Suspense";case no:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gs:return(e.displayName||"Context")+".Consumer";case vs:return(e._context.displayName||"Context")+".Provider";case tu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nu:return t=e.displayName||null,t!==null?t:ro(e.type)||"Memo";case qe:t=e._payload,e=e._init;try{return ro(e(t))}catch{}}return null}function Gc(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ro(t);case 8:return t===eu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function dt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ws(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zc(e){var t=ws(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,o.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sr(e){e._valueTracker||(e._valueTracker=Zc(e))}function ks(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ws(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Fr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function lo(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=dt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ss(e,t){t=t.checked,t!=null&&bo(e,"checked",t,!1)}function oo(e,t){Ss(e,t);var n=dt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?uo(e,t.type,n):t.hasOwnProperty("defaultValue")&&uo(e,t.type,dt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function uo(e,t,n){(t!=="number"||Fr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var En=Array.isArray;function Xt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function io(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(y(91));return B({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ju(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(y(92));if(En(n)){if(1<n.length)throw Error(y(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:dt(n)}}function xs(e,t){var n=dt(t.value),r=dt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function qu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Es(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function so(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Es(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ar,Cs=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ar=ar||document.createElement("div"),ar.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ar.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Nn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jc=["Webkit","ms","Moz","O"];Object.keys(Nn).forEach(function(e){Jc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nn[t]=Nn[e]})});function _s(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Nn.hasOwnProperty(e)&&Nn[e]?(""+t).trim():t+"px"}function Ns(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=_s(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var qc=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ao(e,t){if(t){if(qc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(y(62))}}function co(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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!1;default:return!0}}var fo=null;function ru(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var po=null,Gt=null,Zt=null;function bu(e){if(e=nr(e)){if(typeof po!="function")throw Error(y(280));var t=e.stateNode;t&&(t=pl(t),po(e.stateNode,e.type,t))}}function js(e){Gt?Zt?Zt.push(e):Zt=[e]:Gt=e}function Ps(){if(Gt){var e=Gt,t=Zt;if(Zt=Gt=null,bu(e),t)for(e=0;e<t.length;e++)bu(t[e])}}function Ls(e,t){return e(t)}function zs(){}var Tl=!1;function Ts(e,t,n){if(Tl)return e(t,n);Tl=!0;try{return Ls(e,t,n)}finally{Tl=!1,(Gt!==null||Zt!==null)&&(zs(),Ps())}}function Un(e,t){var n=e.stateNode;if(n===null)return null;var r=pl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(y(231,t,typeof n));return n}var ho=!1;if(Ke)try{var mn={};Object.defineProperty(mn,"passive",{get:function(){ho=!0}}),window.addEventListener("test",mn,mn),window.removeEventListener("test",mn,mn)}catch{ho=!1}function bc(e,t,n,r,l,o,u,i,s){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(v){this.onError(v)}}var jn=!1,Ur=null,Hr=!1,mo=null,ef={onError:function(e){jn=!0,Ur=e}};function tf(e,t,n,r,l,o,u,i,s){jn=!1,Ur=null,bc.apply(ef,arguments)}function nf(e,t,n,r,l,o,u,i,s){if(tf.apply(this,arguments),jn){if(jn){var f=Ur;jn=!1,Ur=null}else throw Error(y(198));Hr||(Hr=!0,mo=f)}}function Rt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Ms(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ei(e){if(Rt(e)!==e)throw Error(y(188))}function rf(e){var t=e.alternate;if(!t){if(t=Rt(e),t===null)throw Error(y(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return ei(l),e;if(o===r)return ei(l),t;o=o.sibling}throw Error(y(188))}if(n.return!==r.return)n=l,r=o;else{for(var u=!1,i=l.child;i;){if(i===n){u=!0,n=l,r=o;break}if(i===r){u=!0,r=l,n=o;break}i=i.sibling}if(!u){for(i=o.child;i;){if(i===n){u=!0,n=o,r=l;break}if(i===r){u=!0,r=o,n=l;break}i=i.sibling}if(!u)throw Error(y(189))}}if(n.alternate!==r)throw Error(y(190))}if(n.tag!==3)throw Error(y(188));return n.stateNode.current===n?e:t}function Rs(e){return e=rf(e),e!==null?Os(e):null}function Os(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Os(e);if(t!==null)return t;e=e.sibling}return null}var Ds=we.unstable_scheduleCallback,ti=we.unstable_cancelCallback,lf=we.unstable_shouldYield,of=we.unstable_requestPaint,Y=we.unstable_now,uf=we.unstable_getCurrentPriorityLevel,lu=we.unstable_ImmediatePriority,Is=we.unstable_UserBlockingPriority,Ar=we.unstable_NormalPriority,sf=we.unstable_LowPriority,Fs=we.unstable_IdlePriority,al=null,He=null;function af(e){if(He&&typeof He.onCommitFiberRoot=="function")try{He.onCommitFiberRoot(al,e,void 0,(e.current.flags&128)===128)}catch{}}var Re=Math.clz32?Math.clz32:df,cf=Math.log,ff=Math.LN2;function df(e){return e>>>=0,e===0?32:31-(cf(e)/ff|0)|0}var cr=64,fr=4194304;function Cn(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function $r(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,u=n&268435455;if(u!==0){var i=u&~l;i!==0?r=Cn(i):(o&=u,o!==0&&(r=Cn(o)))}else u=n&~l,u!==0?r=Cn(u):o!==0&&(r=Cn(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Re(t),l=1<<n,r|=e[n],t&=~l;return r}function pf(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var u=31-Re(o),i=1<<u,s=l[u];s===-1?(!(i&n)||i&r)&&(l[u]=pf(i,t)):s<=t&&(e.expiredLanes|=i),o&=~i}}function vo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Us(){var e=cr;return cr<<=1,!(cr&4194240)&&(cr=64),e}function Ml(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function er(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Re(t),e[t]=n}function mf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Re(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}function ou(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var O=0;function Hs(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var As,uu,$s,Bs,Vs,go=!1,dr=[],lt=null,ot=null,ut=null,Hn=new Map,An=new Map,et=[],vf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ni(e,t){switch(e){case"focusin":case"focusout":lt=null;break;case"dragenter":case"dragleave":ot=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":Hn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":An.delete(t.pointerId)}}function vn(e,t,n,r,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[l]},t!==null&&(t=nr(t),t!==null&&uu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function gf(e,t,n,r,l){switch(t){case"focusin":return lt=vn(lt,e,t,n,r,l),!0;case"dragenter":return ot=vn(ot,e,t,n,r,l),!0;case"mouseover":return ut=vn(ut,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return Hn.set(o,vn(Hn.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,An.set(o,vn(An.get(o)||null,e,t,n,r,l)),!0}return!1}function Ws(e){var t=St(e.target);if(t!==null){var n=Rt(t);if(n!==null){if(t=n.tag,t===13){if(t=Ms(n),t!==null){e.blockedOn=t,Vs(e.priority,function(){$s(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Nr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=yo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fo=r,n.target.dispatchEvent(r),fo=null}else return t=nr(n),t!==null&&uu(t),e.blockedOn=n,!1;t.shift()}return!0}function ri(e,t,n){Nr(e)&&n.delete(t)}function yf(){go=!1,lt!==null&&Nr(lt)&&(lt=null),ot!==null&&Nr(ot)&&(ot=null),ut!==null&&Nr(ut)&&(ut=null),Hn.forEach(ri),An.forEach(ri)}function gn(e,t){e.blockedOn===t&&(e.blockedOn=null,go||(go=!0,we.unstable_scheduleCallback(we.unstable_NormalPriority,yf)))}function $n(e){function t(l){return gn(l,e)}if(0<dr.length){gn(dr[0],e);for(var n=1;n<dr.length;n++){var r=dr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(lt!==null&&gn(lt,e),ot!==null&&gn(ot,e),ut!==null&&gn(ut,e),Hn.forEach(t),An.forEach(t),n=0;n<et.length;n++)r=et[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<et.length&&(n=et[0],n.blockedOn===null);)Ws(n),n.blockedOn===null&&et.shift()}var Jt=Ze.ReactCurrentBatchConfig,Br=!0;function wf(e,t,n,r){var l=O,o=Jt.transition;Jt.transition=null;try{O=1,iu(e,t,n,r)}finally{O=l,Jt.transition=o}}function kf(e,t,n,r){var l=O,o=Jt.transition;Jt.transition=null;try{O=4,iu(e,t,n,r)}finally{O=l,Jt.transition=o}}function iu(e,t,n,r){if(Br){var l=yo(e,t,n,r);if(l===null)Bl(e,t,r,Vr,n),ni(e,r);else if(gf(l,e,t,n,r))r.stopPropagation();else if(ni(e,r),t&4&&-1<vf.indexOf(e)){for(;l!==null;){var o=nr(l);if(o!==null&&As(o),o=yo(e,t,n,r),o===null&&Bl(e,t,r,Vr,n),o===l)break;l=o}l!==null&&r.stopPropagation()}else Bl(e,t,r,null,n)}}var Vr=null;function yo(e,t,n,r){if(Vr=null,e=ru(r),e=St(e),e!==null)if(t=Rt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ms(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Vr=e,null}function Qs(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(uf()){case lu:return 1;case Is:return 4;case Ar:case sf:return 16;case Fs:return 536870912;default:return 16}default:return 16}}var nt=null,su=null,jr=null;function Ks(){if(jr)return jr;var e,t=su,n=t.length,r,l="value"in nt?nt.value:nt.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var u=n-e;for(r=1;r<=u&&t[n-r]===l[o-r];r++);return jr=l.slice(e,1<r?1-r:void 0)}function Pr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function pr(){return!0}function li(){return!1}function Se(e){function t(n,r,l,o,u){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=o,this.target=u,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],this[i]=n?n(o):o[i]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?pr:li,this.isPropagationStopped=li,this}return B(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=pr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pr)},persist:function(){},isPersistent:pr}),t}var cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},au=Se(cn),tr=B({},cn,{view:0,detail:0}),Sf=Se(tr),Rl,Ol,yn,cl=B({},tr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yn&&(yn&&e.type==="mousemove"?(Rl=e.screenX-yn.screenX,Ol=e.screenY-yn.screenY):Ol=Rl=0,yn=e),Rl)},movementY:function(e){return"movementY"in e?e.movementY:Ol}}),oi=Se(cl),xf=B({},cl,{dataTransfer:0}),Ef=Se(xf),Cf=B({},tr,{relatedTarget:0}),Dl=Se(Cf),_f=B({},cn,{animationName:0,elapsedTime:0,pseudoElement:0}),Nf=Se(_f),jf=B({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pf=Se(jf),Lf=B({},cn,{data:0}),ui=Se(Lf),zf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tf={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"},Mf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mf[e])?!!t[e]:!1}function cu(){return Rf}var Of=B({},tr,{key:function(e){if(e.key){var t=zf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cu,charCode:function(e){return e.type==="keypress"?Pr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Df=Se(Of),If=B({},cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ii=Se(If),Ff=B({},tr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cu}),Uf=Se(Ff),Hf=B({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Af=Se(Hf),$f=B({},cl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Bf=Se($f),Vf=[9,13,27,32],fu=Ke&&"CompositionEvent"in window,Pn=null;Ke&&"documentMode"in document&&(Pn=document.documentMode);var Wf=Ke&&"TextEvent"in window&&!Pn,Ys=Ke&&(!fu||Pn&&8<Pn&&11>=Pn),si=" ",ai=!1;function Xs(e,t){switch(e){case"keyup":return Vf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ut=!1;function Qf(e,t){switch(e){case"compositionend":return Gs(t);case"keypress":return t.which!==32?null:(ai=!0,si);case"textInput":return e=t.data,e===si&&ai?null:e;default:return null}}function Kf(e,t){if(Ut)return e==="compositionend"||!fu&&Xs(e,t)?(e=Ks(),jr=su=nt=null,Ut=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ys&&t.locale!=="ko"?null:t.data;default:return null}}var Yf={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ci(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yf[e.type]:t==="textarea"}function Zs(e,t,n,r){js(r),t=Wr(t,"onChange"),0<t.length&&(n=new au("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ln=null,Bn=null;function Xf(e){ia(e,0)}function fl(e){var t=$t(e);if(ks(t))return e}function Gf(e,t){if(e==="change")return t}var Js=!1;if(Ke){var Il;if(Ke){var Fl="oninput"in document;if(!Fl){var fi=document.createElement("div");fi.setAttribute("oninput","return;"),Fl=typeof fi.oninput=="function"}Il=Fl}else Il=!1;Js=Il&&(!document.documentMode||9<document.documentMode)}function di(){Ln&&(Ln.detachEvent("onpropertychange",qs),Bn=Ln=null)}function qs(e){if(e.propertyName==="value"&&fl(Bn)){var t=[];Zs(t,Bn,e,ru(e)),Ts(Xf,t)}}function Zf(e,t,n){e==="focusin"?(di(),Ln=t,Bn=n,Ln.attachEvent("onpropertychange",qs)):e==="focusout"&&di()}function Jf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fl(Bn)}function qf(e,t){if(e==="click")return fl(t)}function bf(e,t){if(e==="input"||e==="change")return fl(t)}function ed(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var De=typeof Object.is=="function"?Object.is:ed;function Vn(e,t){if(De(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!bl.call(t,l)||!De(e[l],t[l]))return!1}return!0}function pi(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hi(e,t){var n=pi(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=pi(n)}}function bs(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bs(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ea(){for(var e=window,t=Fr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Fr(e.document)}return t}function du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function td(e){var t=ea(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bs(n.ownerDocument.documentElement,n)){if(r!==null&&du(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=hi(n,o);var u=hi(n,r);l&&u&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var nd=Ke&&"documentMode"in document&&11>=document.documentMode,Ht=null,wo=null,zn=null,ko=!1;function mi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ko||Ht==null||Ht!==Fr(r)||(r=Ht,"selectionStart"in r&&du(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zn&&Vn(zn,r)||(zn=r,r=Wr(wo,"onSelect"),0<r.length&&(t=new au("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ht)))}function hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var At={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionend:hr("Transition","TransitionEnd")},Ul={},ta={};Ke&&(ta=document.createElement("div").style,"AnimationEvent"in window||(delete At.animationend.animation,delete At.animationiteration.animation,delete At.animationstart.animation),"TransitionEvent"in window||delete At.transitionend.transition);function dl(e){if(Ul[e])return Ul[e];if(!At[e])return e;var t=At[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ta)return Ul[e]=t[n];return e}var na=dl("animationend"),ra=dl("animationiteration"),la=dl("animationstart"),oa=dl("transitionend"),ua=new Map,vi="abort auxClick 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(" ");function ht(e,t){ua.set(e,t),Mt(t,[e])}for(var Hl=0;Hl<vi.length;Hl++){var Al=vi[Hl],rd=Al.toLowerCase(),ld=Al[0].toUpperCase()+Al.slice(1);ht(rd,"on"+ld)}ht(na,"onAnimationEnd");ht(ra,"onAnimationIteration");ht(la,"onAnimationStart");ht("dblclick","onDoubleClick");ht("focusin","onFocus");ht("focusout","onBlur");ht(oa,"onTransitionEnd");en("onMouseEnter",["mouseout","mouseover"]);en("onMouseLeave",["mouseout","mouseover"]);en("onPointerEnter",["pointerout","pointerover"]);en("onPointerLeave",["pointerout","pointerover"]);Mt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Mt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Mt("onBeforeInput",["compositionend","keypress","textInput","paste"]);Mt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Mt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Mt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _n="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),od=new Set("cancel close invalid load scroll toggle".split(" ").concat(_n));function gi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,nf(r,t,void 0,e),e.currentTarget=null}function ia(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var u=r.length-1;0<=u;u--){var i=r[u],s=i.instance,f=i.currentTarget;if(i=i.listener,s!==o&&l.isPropagationStopped())break e;gi(l,i,f),o=s}else for(u=0;u<r.length;u++){if(i=r[u],s=i.instance,f=i.currentTarget,i=i.listener,s!==o&&l.isPropagationStopped())break e;gi(l,i,f),o=s}}}if(Hr)throw e=mo,Hr=!1,mo=null,e}function F(e,t){var n=t[_o];n===void 0&&(n=t[_o]=new Set);var r=e+"__bubble";n.has(r)||(sa(t,e,2,!1),n.add(r))}function $l(e,t,n){var r=0;t&&(r|=4),sa(n,e,r,t)}var mr="_reactListening"+Math.random().toString(36).slice(2);function Wn(e){if(!e[mr]){e[mr]=!0,ms.forEach(function(n){n!=="selectionchange"&&(od.has(n)||$l(n,!1,e),$l(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mr]||(t[mr]=!0,$l("selectionchange",!1,t))}}function sa(e,t,n,r){switch(Qs(t)){case 1:var l=wf;break;case 4:l=kf;break;default:l=iu}n=l.bind(null,t,n,e),l=void 0,!ho||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Bl(e,t,n,r,l){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var u=r.tag;if(u===3||u===4){var i=r.stateNode.containerInfo;if(i===l||i.nodeType===8&&i.parentNode===l)break;if(u===4)for(u=r.return;u!==null;){var s=u.tag;if((s===3||s===4)&&(s=u.stateNode.containerInfo,s===l||s.nodeType===8&&s.parentNode===l))return;u=u.return}for(;i!==null;){if(u=St(i),u===null)return;if(s=u.tag,s===5||s===6){r=o=u;continue e}i=i.parentNode}}r=r.return}Ts(function(){var f=o,v=ru(n),m=[];e:{var p=ua.get(e);if(p!==void 0){var w=au,k=e;switch(e){case"keypress":if(Pr(n)===0)break e;case"keydown":case"keyup":w=Df;break;case"focusin":k="focus",w=Dl;break;case"focusout":k="blur",w=Dl;break;case"beforeblur":case"afterblur":w=Dl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":w=oi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=Ef;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=Uf;break;case na:case ra:case la:w=Nf;break;case oa:w=Af;break;case"scroll":w=Sf;break;case"wheel":w=Bf;break;case"copy":case"cut":case"paste":w=Pf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=ii}var S=(t&4)!==0,M=!S&&e==="scroll",c=S?p!==null?p+"Capture":null:p;S=[];for(var a=f,d;a!==null;){d=a;var g=d.stateNode;if(d.tag===5&&g!==null&&(d=g,c!==null&&(g=Un(a,c),g!=null&&S.push(Qn(a,g,d)))),M)break;a=a.return}0<S.length&&(p=new w(p,k,null,n,v),m.push({event:p,listeners:S}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",p&&n!==fo&&(k=n.relatedTarget||n.fromElement)&&(St(k)||k[Ye]))break e;if((w||p)&&(p=v.window===v?v:(p=v.ownerDocument)?p.defaultView||p.parentWindow:window,w?(k=n.relatedTarget||n.toElement,w=f,k=k?St(k):null,k!==null&&(M=Rt(k),k!==M||k.tag!==5&&k.tag!==6)&&(k=null)):(w=null,k=f),w!==k)){if(S=oi,g="onMouseLeave",c="onMouseEnter",a="mouse",(e==="pointerout"||e==="pointerover")&&(S=ii,g="onPointerLeave",c="onPointerEnter",a="pointer"),M=w==null?p:$t(w),d=k==null?p:$t(k),p=new S(g,a+"leave",w,n,v),p.target=M,p.relatedTarget=d,g=null,St(v)===f&&(S=new S(c,a+"enter",k,n,v),S.target=d,S.relatedTarget=M,g=S),M=g,w&&k)t:{for(S=w,c=k,a=0,d=S;d;d=Ot(d))a++;for(d=0,g=c;g;g=Ot(g))d++;for(;0<a-d;)S=Ot(S),a--;for(;0<d-a;)c=Ot(c),d--;for(;a--;){if(S===c||c!==null&&S===c.alternate)break t;S=Ot(S),c=Ot(c)}S=null}else S=null;w!==null&&yi(m,p,w,S,!1),k!==null&&M!==null&&yi(m,M,k,S,!0)}}e:{if(p=f?$t(f):window,w=p.nodeName&&p.nodeName.toLowerCase(),w==="select"||w==="input"&&p.type==="file")var E=Gf;else if(ci(p))if(Js)E=bf;else{E=Jf;var _=Zf}else(w=p.nodeName)&&w.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=qf);if(E&&(E=E(e,f))){Zs(m,E,n,v);break e}_&&_(e,p,f),e==="focusout"&&(_=p._wrapperState)&&_.controlled&&p.type==="number"&&uo(p,"number",p.value)}switch(_=f?$t(f):window,e){case"focusin":(ci(_)||_.contentEditable==="true")&&(Ht=_,wo=f,zn=null);break;case"focusout":zn=wo=Ht=null;break;case"mousedown":ko=!0;break;case"contextmenu":case"mouseup":case"dragend":ko=!1,mi(m,n,v);break;case"selectionchange":if(nd)break;case"keydown":case"keyup":mi(m,n,v)}var N;if(fu)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Ut?Xs(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Ys&&n.locale!=="ko"&&(Ut||j!=="onCompositionStart"?j==="onCompositionEnd"&&Ut&&(N=Ks()):(nt=v,su="value"in nt?nt.value:nt.textContent,Ut=!0)),_=Wr(f,j),0<_.length&&(j=new ui(j,e,null,n,v),m.push({event:j,listeners:_}),N?j.data=N:(N=Gs(n),N!==null&&(j.data=N)))),(N=Wf?Qf(e,n):Kf(e,n))&&(f=Wr(f,"onBeforeInput"),0<f.length&&(v=new ui("onBeforeInput","beforeinput",null,n,v),m.push({event:v,listeners:f}),v.data=N))}ia(m,t)})}function Qn(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,o=l.stateNode;l.tag===5&&o!==null&&(l=o,o=Un(e,n),o!=null&&r.unshift(Qn(e,o,l)),o=Un(e,t),o!=null&&r.push(Qn(e,o,l))),e=e.return}return r}function Ot(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function yi(e,t,n,r,l){for(var o=t._reactName,u=[];n!==null&&n!==r;){var i=n,s=i.alternate,f=i.stateNode;if(s!==null&&s===r)break;i.tag===5&&f!==null&&(i=f,l?(s=Un(n,o),s!=null&&u.unshift(Qn(n,s,i))):l||(s=Un(n,o),s!=null&&u.push(Qn(n,s,i)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var ud=/\r\n?/g,id=/\u0000|\uFFFD/g;function wi(e){return(typeof e=="string"?e:""+e).replace(ud,`
|
|
38
|
+
`).replace(id,"")}function vr(e,t,n){if(t=wi(t),wi(e)!==t&&n)throw Error(y(425))}function Qr(){}var So=null,xo=null;function Eo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Co=typeof setTimeout=="function"?setTimeout:void 0,sd=typeof clearTimeout=="function"?clearTimeout:void 0,ki=typeof Promise=="function"?Promise:void 0,ad=typeof queueMicrotask=="function"?queueMicrotask:typeof ki<"u"?function(e){return ki.resolve(null).then(e).catch(cd)}:Co;function cd(e){setTimeout(function(){throw e})}function Vl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),$n(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);$n(t)}function it(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Si(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var fn=Math.random().toString(36).slice(2),Ue="__reactFiber$"+fn,Kn="__reactProps$"+fn,Ye="__reactContainer$"+fn,_o="__reactEvents$"+fn,fd="__reactListeners$"+fn,dd="__reactHandles$"+fn;function St(e){var t=e[Ue];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ye]||n[Ue]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Si(e);e!==null;){if(n=e[Ue])return n;e=Si(e)}return t}e=n,n=e.parentNode}return null}function nr(e){return e=e[Ue]||e[Ye],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function $t(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(y(33))}function pl(e){return e[Kn]||null}var No=[],Bt=-1;function mt(e){return{current:e}}function U(e){0>Bt||(e.current=No[Bt],No[Bt]=null,Bt--)}function D(e,t){Bt++,No[Bt]=e.current,e.current=t}var pt={},ue=mt(pt),pe=mt(!1),jt=pt;function tn(e,t){var n=e.type.contextTypes;if(!n)return pt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function he(e){return e=e.childContextTypes,e!=null}function Kr(){U(pe),U(ue)}function xi(e,t,n){if(ue.current!==pt)throw Error(y(168));D(ue,t),D(pe,n)}function aa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(y(108,Gc(e)||"Unknown",l));return B({},n,r)}function Yr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pt,jt=ue.current,D(ue,e),D(pe,pe.current),!0}function Ei(e,t,n){var r=e.stateNode;if(!r)throw Error(y(169));n?(e=aa(e,t,jt),r.__reactInternalMemoizedMergedChildContext=e,U(pe),U(ue),D(ue,e)):U(pe),D(pe,n)}var Be=null,hl=!1,Wl=!1;function ca(e){Be===null?Be=[e]:Be.push(e)}function pd(e){hl=!0,ca(e)}function vt(){if(!Wl&&Be!==null){Wl=!0;var e=0,t=O;try{var n=Be;for(O=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Be=null,hl=!1}catch(l){throw Be!==null&&(Be=Be.slice(e+1)),Ds(lu,vt),l}finally{O=t,Wl=!1}}return null}var Vt=[],Wt=0,Xr=null,Gr=0,xe=[],Ee=0,Pt=null,Ve=1,We="";function wt(e,t){Vt[Wt++]=Gr,Vt[Wt++]=Xr,Xr=e,Gr=t}function fa(e,t,n){xe[Ee++]=Ve,xe[Ee++]=We,xe[Ee++]=Pt,Pt=e;var r=Ve;e=We;var l=32-Re(r)-1;r&=~(1<<l),n+=1;var o=32-Re(t)+l;if(30<o){var u=l-l%5;o=(r&(1<<u)-1).toString(32),r>>=u,l-=u,Ve=1<<32-Re(t)+l|n<<l|r,We=o+e}else Ve=1<<o|n<<l|r,We=e}function pu(e){e.return!==null&&(wt(e,1),fa(e,1,0))}function hu(e){for(;e===Xr;)Xr=Vt[--Wt],Vt[Wt]=null,Gr=Vt[--Wt],Vt[Wt]=null;for(;e===Pt;)Pt=xe[--Ee],xe[Ee]=null,We=xe[--Ee],xe[Ee]=null,Ve=xe[--Ee],xe[Ee]=null}var ye=null,ge=null,H=!1,Me=null;function da(e,t){var n=Ce(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ci(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ye=e,ge=it(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ye=e,ge=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Pt!==null?{id:Ve,overflow:We}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ce(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ye=e,ge=null,!0):!1;default:return!1}}function jo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Po(e){if(H){var t=ge;if(t){var n=t;if(!Ci(e,t)){if(jo(e))throw Error(y(418));t=it(n.nextSibling);var r=ye;t&&Ci(e,t)?da(r,n):(e.flags=e.flags&-4097|2,H=!1,ye=e)}}else{if(jo(e))throw Error(y(418));e.flags=e.flags&-4097|2,H=!1,ye=e}}}function _i(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ye=e}function gr(e){if(e!==ye)return!1;if(!H)return _i(e),H=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Eo(e.type,e.memoizedProps)),t&&(t=ge)){if(jo(e))throw pa(),Error(y(418));for(;t;)da(e,t),t=it(t.nextSibling)}if(_i(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(y(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ge=it(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ge=null}}else ge=ye?it(e.stateNode.nextSibling):null;return!0}function pa(){for(var e=ge;e;)e=it(e.nextSibling)}function nn(){ge=ye=null,H=!1}function mu(e){Me===null?Me=[e]:Me.push(e)}var hd=Ze.ReactCurrentBatchConfig;function wn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(y(309));var r=n.stateNode}if(!r)throw Error(y(147,e));var l=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(u){var i=l.refs;u===null?delete i[o]:i[o]=u},t._stringRef=o,t)}if(typeof e!="string")throw Error(y(284));if(!n._owner)throw Error(y(290,e))}return e}function yr(e,t){throw e=Object.prototype.toString.call(t),Error(y(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ni(e){var t=e._init;return t(e._payload)}function ha(e){function t(c,a){if(e){var d=c.deletions;d===null?(c.deletions=[a],c.flags|=16):d.push(a)}}function n(c,a){if(!e)return null;for(;a!==null;)t(c,a),a=a.sibling;return null}function r(c,a){for(c=new Map;a!==null;)a.key!==null?c.set(a.key,a):c.set(a.index,a),a=a.sibling;return c}function l(c,a){return c=ft(c,a),c.index=0,c.sibling=null,c}function o(c,a,d){return c.index=d,e?(d=c.alternate,d!==null?(d=d.index,d<a?(c.flags|=2,a):d):(c.flags|=2,a)):(c.flags|=1048576,a)}function u(c){return e&&c.alternate===null&&(c.flags|=2),c}function i(c,a,d,g){return a===null||a.tag!==6?(a=Jl(d,c.mode,g),a.return=c,a):(a=l(a,d),a.return=c,a)}function s(c,a,d,g){var E=d.type;return E===Ft?v(c,a,d.props.children,g,d.key):a!==null&&(a.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===qe&&Ni(E)===a.type)?(g=l(a,d.props),g.ref=wn(c,a,d),g.return=c,g):(g=Dr(d.type,d.key,d.props,null,c.mode,g),g.ref=wn(c,a,d),g.return=c,g)}function f(c,a,d,g){return a===null||a.tag!==4||a.stateNode.containerInfo!==d.containerInfo||a.stateNode.implementation!==d.implementation?(a=ql(d,c.mode,g),a.return=c,a):(a=l(a,d.children||[]),a.return=c,a)}function v(c,a,d,g,E){return a===null||a.tag!==7?(a=_t(d,c.mode,g,E),a.return=c,a):(a=l(a,d),a.return=c,a)}function m(c,a,d){if(typeof a=="string"&&a!==""||typeof a=="number")return a=Jl(""+a,c.mode,d),a.return=c,a;if(typeof a=="object"&&a!==null){switch(a.$$typeof){case ir:return d=Dr(a.type,a.key,a.props,null,c.mode,d),d.ref=wn(c,null,a),d.return=c,d;case It:return a=ql(a,c.mode,d),a.return=c,a;case qe:var g=a._init;return m(c,g(a._payload),d)}if(En(a)||hn(a))return a=_t(a,c.mode,d,null),a.return=c,a;yr(c,a)}return null}function p(c,a,d,g){var E=a!==null?a.key:null;if(typeof d=="string"&&d!==""||typeof d=="number")return E!==null?null:i(c,a,""+d,g);if(typeof d=="object"&&d!==null){switch(d.$$typeof){case ir:return d.key===E?s(c,a,d,g):null;case It:return d.key===E?f(c,a,d,g):null;case qe:return E=d._init,p(c,a,E(d._payload),g)}if(En(d)||hn(d))return E!==null?null:v(c,a,d,g,null);yr(c,d)}return null}function w(c,a,d,g,E){if(typeof g=="string"&&g!==""||typeof g=="number")return c=c.get(d)||null,i(a,c,""+g,E);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ir:return c=c.get(g.key===null?d:g.key)||null,s(a,c,g,E);case It:return c=c.get(g.key===null?d:g.key)||null,f(a,c,g,E);case qe:var _=g._init;return w(c,a,d,_(g._payload),E)}if(En(g)||hn(g))return c=c.get(d)||null,v(a,c,g,E,null);yr(a,g)}return null}function k(c,a,d,g){for(var E=null,_=null,N=a,j=a=0,Q=null;N!==null&&j<d.length;j++){N.index>j?(Q=N,N=null):Q=N.sibling;var T=p(c,N,d[j],g);if(T===null){N===null&&(N=Q);break}e&&N&&T.alternate===null&&t(c,N),a=o(T,a,j),_===null?E=T:_.sibling=T,_=T,N=Q}if(j===d.length)return n(c,N),H&&wt(c,j),E;if(N===null){for(;j<d.length;j++)N=m(c,d[j],g),N!==null&&(a=o(N,a,j),_===null?E=N:_.sibling=N,_=N);return H&&wt(c,j),E}for(N=r(c,N);j<d.length;j++)Q=w(N,c,j,d[j],g),Q!==null&&(e&&Q.alternate!==null&&N.delete(Q.key===null?j:Q.key),a=o(Q,a,j),_===null?E=Q:_.sibling=Q,_=Q);return e&&N.forEach(function(Pe){return t(c,Pe)}),H&&wt(c,j),E}function S(c,a,d,g){var E=hn(d);if(typeof E!="function")throw Error(y(150));if(d=E.call(d),d==null)throw Error(y(151));for(var _=E=null,N=a,j=a=0,Q=null,T=d.next();N!==null&&!T.done;j++,T=d.next()){N.index>j?(Q=N,N=null):Q=N.sibling;var Pe=p(c,N,T.value,g);if(Pe===null){N===null&&(N=Q);break}e&&N&&Pe.alternate===null&&t(c,N),a=o(Pe,a,j),_===null?E=Pe:_.sibling=Pe,_=Pe,N=Q}if(T.done)return n(c,N),H&&wt(c,j),E;if(N===null){for(;!T.done;j++,T=d.next())T=m(c,T.value,g),T!==null&&(a=o(T,a,j),_===null?E=T:_.sibling=T,_=T);return H&&wt(c,j),E}for(N=r(c,N);!T.done;j++,T=d.next())T=w(N,c,j,T.value,g),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?j:T.key),a=o(T,a,j),_===null?E=T:_.sibling=T,_=T);return e&&N.forEach(function(dn){return t(c,dn)}),H&&wt(c,j),E}function M(c,a,d,g){if(typeof d=="object"&&d!==null&&d.type===Ft&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case ir:e:{for(var E=d.key,_=a;_!==null;){if(_.key===E){if(E=d.type,E===Ft){if(_.tag===7){n(c,_.sibling),a=l(_,d.props.children),a.return=c,c=a;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===qe&&Ni(E)===_.type){n(c,_.sibling),a=l(_,d.props),a.ref=wn(c,_,d),a.return=c,c=a;break e}n(c,_);break}else t(c,_);_=_.sibling}d.type===Ft?(a=_t(d.props.children,c.mode,g,d.key),a.return=c,c=a):(g=Dr(d.type,d.key,d.props,null,c.mode,g),g.ref=wn(c,a,d),g.return=c,c=g)}return u(c);case It:e:{for(_=d.key;a!==null;){if(a.key===_)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(c,a.sibling),a=l(a,d.children||[]),a.return=c,c=a;break e}else{n(c,a);break}else t(c,a);a=a.sibling}a=ql(d,c.mode,g),a.return=c,c=a}return u(c);case qe:return _=d._init,M(c,a,_(d._payload),g)}if(En(d))return k(c,a,d,g);if(hn(d))return S(c,a,d,g);yr(c,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(c,a.sibling),a=l(a,d),a.return=c,c=a):(n(c,a),a=Jl(d,c.mode,g),a.return=c,c=a),u(c)):n(c,a)}return M}var rn=ha(!0),ma=ha(!1),Zr=mt(null),Jr=null,Qt=null,vu=null;function gu(){vu=Qt=Jr=null}function yu(e){var t=Zr.current;U(Zr),e._currentValue=t}function Lo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qt(e,t){Jr=e,vu=Qt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(de=!0),e.firstContext=null)}function Ne(e){var t=e._currentValue;if(vu!==e)if(e={context:e,memoizedValue:t,next:null},Qt===null){if(Jr===null)throw Error(y(308));Qt=e,Jr.dependencies={lanes:0,firstContext:e}}else Qt=Qt.next=e;return t}var xt=null;function wu(e){xt===null?xt=[e]:xt.push(e)}function va(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,wu(t)):(n.next=l.next,l.next=n),t.interleaved=n,Xe(e,r)}function Xe(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var be=!1;function ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qe(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function st(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,R&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Xe(e,n)}return l=r.interleaved,l===null?(t.next=t,wu(r)):(t.next=l.next,l.next=t),r.interleaved=t,Xe(e,n)}function Lr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ou(e,n)}}function ji(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var u={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=u:o=o.next=u,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function qr(e,t,n,r){var l=e.updateQueue;be=!1;var o=l.firstBaseUpdate,u=l.lastBaseUpdate,i=l.shared.pending;if(i!==null){l.shared.pending=null;var s=i,f=s.next;s.next=null,u===null?o=f:u.next=f,u=s;var v=e.alternate;v!==null&&(v=v.updateQueue,i=v.lastBaseUpdate,i!==u&&(i===null?v.firstBaseUpdate=f:i.next=f,v.lastBaseUpdate=s))}if(o!==null){var m=l.baseState;u=0,v=f=s=null,i=o;do{var p=i.lane,w=i.eventTime;if((r&p)===p){v!==null&&(v=v.next={eventTime:w,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var k=e,S=i;switch(p=t,w=n,S.tag){case 1:if(k=S.payload,typeof k=="function"){m=k.call(w,m,p);break e}m=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=S.payload,p=typeof k=="function"?k.call(w,m,p):k,p==null)break e;m=B({},m,p);break e;case 2:be=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[i]:p.push(i))}else w={eventTime:w,lane:p,tag:i.tag,payload:i.payload,callback:i.callback,next:null},v===null?(f=v=w,s=m):v=v.next=w,u|=p;if(i=i.next,i===null){if(i=l.shared.pending,i===null)break;p=i,i=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(v===null&&(s=m),l.baseState=s,l.firstBaseUpdate=f,l.lastBaseUpdate=v,t=l.shared.interleaved,t!==null){l=t;do u|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);zt|=u,e.lanes=u,e.memoizedState=m}}function Pi(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(y(191,l));l.call(r)}}}var rr={},Ae=mt(rr),Yn=mt(rr),Xn=mt(rr);function Et(e){if(e===rr)throw Error(y(174));return e}function Su(e,t){switch(D(Xn,t),D(Yn,e),D(Ae,rr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:so(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=so(t,e)}U(Ae),D(Ae,t)}function ln(){U(Ae),U(Yn),U(Xn)}function ya(e){Et(Xn.current);var t=Et(Ae.current),n=so(t,e.type);t!==n&&(D(Yn,e),D(Ae,n))}function xu(e){Yn.current===e&&(U(Ae),U(Yn))}var A=mt(0);function br(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ql=[];function Eu(){for(var e=0;e<Ql.length;e++)Ql[e]._workInProgressVersionPrimary=null;Ql.length=0}var zr=Ze.ReactCurrentDispatcher,Kl=Ze.ReactCurrentBatchConfig,Lt=0,$=null,G=null,q=null,el=!1,Tn=!1,Gn=0,md=0;function re(){throw Error(y(321))}function Cu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!De(e[n],t[n]))return!1;return!0}function _u(e,t,n,r,l,o){if(Lt=o,$=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,zr.current=e===null||e.memoizedState===null?wd:kd,e=n(r,l),Tn){o=0;do{if(Tn=!1,Gn=0,25<=o)throw Error(y(301));o+=1,q=G=null,t.updateQueue=null,zr.current=Sd,e=n(r,l)}while(Tn)}if(zr.current=tl,t=G!==null&&G.next!==null,Lt=0,q=G=$=null,el=!1,t)throw Error(y(300));return e}function Nu(){var e=Gn!==0;return Gn=0,e}function Fe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return q===null?$.memoizedState=q=e:q=q.next=e,q}function je(){if(G===null){var e=$.alternate;e=e!==null?e.memoizedState:null}else e=G.next;var t=q===null?$.memoizedState:q.next;if(t!==null)q=t,G=e;else{if(e===null)throw Error(y(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},q===null?$.memoizedState=q=e:q=q.next=e}return q}function Zn(e,t){return typeof t=="function"?t(e):t}function Yl(e){var t=je(),n=t.queue;if(n===null)throw Error(y(311));n.lastRenderedReducer=e;var r=G,l=r.baseQueue,o=n.pending;if(o!==null){if(l!==null){var u=l.next;l.next=o.next,o.next=u}r.baseQueue=l=o,n.pending=null}if(l!==null){o=l.next,r=r.baseState;var i=u=null,s=null,f=o;do{var v=f.lane;if((Lt&v)===v)s!==null&&(s=s.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var m={lane:v,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};s===null?(i=s=m,u=r):s=s.next=m,$.lanes|=v,zt|=v}f=f.next}while(f!==null&&f!==o);s===null?u=r:s.next=i,De(r,t.memoizedState)||(de=!0),t.memoizedState=r,t.baseState=u,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do o=l.lane,$.lanes|=o,zt|=o,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Xl(e){var t=je(),n=t.queue;if(n===null)throw Error(y(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var u=l=l.next;do o=e(o,u.action),u=u.next;while(u!==l);De(o,t.memoizedState)||(de=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function wa(){}function ka(e,t){var n=$,r=je(),l=t(),o=!De(r.memoizedState,l);if(o&&(r.memoizedState=l,de=!0),r=r.queue,ju(Ea.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||q!==null&&q.memoizedState.tag&1){if(n.flags|=2048,Jn(9,xa.bind(null,n,r,l,t),void 0,null),b===null)throw Error(y(349));Lt&30||Sa(n,t,l)}return l}function Sa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$.updateQueue,t===null?(t={lastEffect:null,stores:null},$.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xa(e,t,n,r){t.value=n,t.getSnapshot=r,Ca(t)&&_a(e)}function Ea(e,t,n){return n(function(){Ca(t)&&_a(e)})}function Ca(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!De(e,n)}catch{return!0}}function _a(e){var t=Xe(e,1);t!==null&&Oe(t,e,1,-1)}function Li(e){var t=Fe();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:e},t.queue=e,e=e.dispatch=yd.bind(null,$,e),[t.memoizedState,e]}function Jn(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=$.updateQueue,t===null?(t={lastEffect:null,stores:null},$.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Na(){return je().memoizedState}function Tr(e,t,n,r){var l=Fe();$.flags|=e,l.memoizedState=Jn(1|t,n,void 0,r===void 0?null:r)}function ml(e,t,n,r){var l=je();r=r===void 0?null:r;var o=void 0;if(G!==null){var u=G.memoizedState;if(o=u.destroy,r!==null&&Cu(r,u.deps)){l.memoizedState=Jn(t,n,o,r);return}}$.flags|=e,l.memoizedState=Jn(1|t,n,o,r)}function zi(e,t){return Tr(8390656,8,e,t)}function ju(e,t){return ml(2048,8,e,t)}function ja(e,t){return ml(4,2,e,t)}function Pa(e,t){return ml(4,4,e,t)}function La(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function za(e,t,n){return n=n!=null?n.concat([e]):null,ml(4,4,La.bind(null,t,e),n)}function Pu(){}function Ta(e,t){var n=je();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Cu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ma(e,t){var n=je();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Cu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ra(e,t,n){return Lt&21?(De(n,t)||(n=Us(),$.lanes|=n,zt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,de=!0),e.memoizedState=n)}function vd(e,t){var n=O;O=n!==0&&4>n?n:4,e(!0);var r=Kl.transition;Kl.transition={};try{e(!1),t()}finally{O=n,Kl.transition=r}}function Oa(){return je().memoizedState}function gd(e,t,n){var r=ct(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Da(e))Ia(t,n);else if(n=va(e,t,n,r),n!==null){var l=se();Oe(n,e,r,l),Fa(n,t,r)}}function yd(e,t,n){var r=ct(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Da(e))Ia(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var u=t.lastRenderedState,i=o(u,n);if(l.hasEagerState=!0,l.eagerState=i,De(i,u)){var s=t.interleaved;s===null?(l.next=l,wu(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=va(e,t,l,r),n!==null&&(l=se(),Oe(n,e,r,l),Fa(n,t,r))}}function Da(e){var t=e.alternate;return e===$||t!==null&&t===$}function Ia(e,t){Tn=el=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fa(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ou(e,n)}}var tl={readContext:Ne,useCallback:re,useContext:re,useEffect:re,useImperativeHandle:re,useInsertionEffect:re,useLayoutEffect:re,useMemo:re,useReducer:re,useRef:re,useState:re,useDebugValue:re,useDeferredValue:re,useTransition:re,useMutableSource:re,useSyncExternalStore:re,useId:re,unstable_isNewReconciler:!1},wd={readContext:Ne,useCallback:function(e,t){return Fe().memoizedState=[e,t===void 0?null:t],e},useContext:Ne,useEffect:zi,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Tr(4194308,4,La.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tr(4,2,e,t)},useMemo:function(e,t){var n=Fe();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Fe();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gd.bind(null,$,e),[r.memoizedState,e]},useRef:function(e){var t=Fe();return e={current:e},t.memoizedState=e},useState:Li,useDebugValue:Pu,useDeferredValue:function(e){return Fe().memoizedState=e},useTransition:function(){var e=Li(!1),t=e[0];return e=vd.bind(null,e[1]),Fe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$,l=Fe();if(H){if(n===void 0)throw Error(y(407));n=n()}else{if(n=t(),b===null)throw Error(y(349));Lt&30||Sa(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,zi(Ea.bind(null,r,o,e),[e]),r.flags|=2048,Jn(9,xa.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Fe(),t=b.identifierPrefix;if(H){var n=We,r=Ve;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Gn++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=md++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},kd={readContext:Ne,useCallback:Ta,useContext:Ne,useEffect:ju,useImperativeHandle:za,useInsertionEffect:ja,useLayoutEffect:Pa,useMemo:Ma,useReducer:Yl,useRef:Na,useState:function(){return Yl(Zn)},useDebugValue:Pu,useDeferredValue:function(e){var t=je();return Ra(t,G.memoizedState,e)},useTransition:function(){var e=Yl(Zn)[0],t=je().memoizedState;return[e,t]},useMutableSource:wa,useSyncExternalStore:ka,useId:Oa,unstable_isNewReconciler:!1},Sd={readContext:Ne,useCallback:Ta,useContext:Ne,useEffect:ju,useImperativeHandle:za,useInsertionEffect:ja,useLayoutEffect:Pa,useMemo:Ma,useReducer:Xl,useRef:Na,useState:function(){return Xl(Zn)},useDebugValue:Pu,useDeferredValue:function(e){var t=je();return G===null?t.memoizedState=e:Ra(t,G.memoizedState,e)},useTransition:function(){var e=Xl(Zn)[0],t=je().memoizedState;return[e,t]},useMutableSource:wa,useSyncExternalStore:ka,useId:Oa,unstable_isNewReconciler:!1};function ze(e,t){if(e&&e.defaultProps){t=B({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:B({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vl={isMounted:function(e){return(e=e._reactInternals)?Rt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=se(),l=ct(e),o=Qe(r,l);o.payload=t,n!=null&&(o.callback=n),t=st(e,o,l),t!==null&&(Oe(t,e,l,r),Lr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=se(),l=ct(e),o=Qe(r,l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=st(e,o,l),t!==null&&(Oe(t,e,l,r),Lr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=se(),r=ct(e),l=Qe(n,r);l.tag=2,t!=null&&(l.callback=t),t=st(e,l,r),t!==null&&(Oe(t,e,r,n),Lr(t,e,r))}};function Ti(e,t,n,r,l,o,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,u):t.prototype&&t.prototype.isPureReactComponent?!Vn(n,r)||!Vn(l,o):!0}function Ua(e,t,n){var r=!1,l=pt,o=t.contextType;return typeof o=="object"&&o!==null?o=Ne(o):(l=he(t)?jt:ue.current,r=t.contextTypes,o=(r=r!=null)?tn(e,l):pt),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function Mi(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vl.enqueueReplaceState(t,t.state,null)}function To(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},ku(e);var o=t.contextType;typeof o=="object"&&o!==null?l.context=Ne(o):(o=he(t)?jt:ue.current,l.context=tn(e,o)),l.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(zo(e,t,o,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&vl.enqueueReplaceState(l,l.state,null),qr(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function on(e,t){try{var n="",r=t;do n+=Xc(r),r=r.return;while(r);var l=n}catch(o){l=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Gl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Mo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var xd=typeof WeakMap=="function"?WeakMap:Map;function Ha(e,t,n){n=Qe(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rl||(rl=!0,Bo=r),Mo(e,t)},n}function Aa(e,t,n){n=Qe(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Mo(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Mo(e,t),typeof r!="function"&&(at===null?at=new Set([this]):at.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),n}function Ri(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new xd;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Id.bind(null,e,t,n),t.then(e,e))}function Oi(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Di(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Qe(-1,1),t.tag=2,st(n,t,1))),n.lanes|=1),e)}var Ed=Ze.ReactCurrentOwner,de=!1;function ie(e,t,n,r){t.child=e===null?ma(t,null,n,r):rn(t,e.child,n,r)}function Ii(e,t,n,r,l){n=n.render;var o=t.ref;return qt(t,l),r=_u(e,t,n,r,o,l),n=Nu(),e!==null&&!de?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ge(e,t,l)):(H&&n&&pu(t),t.flags|=1,ie(e,t,r,l),t.child)}function Fi(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Iu(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,$a(e,t,o,r,l)):(e=Dr(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:Vn,n(u,r)&&e.ref===t.ref)return Ge(e,t,l)}return t.flags|=1,e=ft(o,r),e.ref=t.ref,e.return=t,t.child=e}function $a(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(Vn(o,r)&&e.ref===t.ref)if(de=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(de=!0);else return t.lanes=e.lanes,Ge(e,t,l)}return Ro(e,t,n,r,l)}function Ba(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},D(Yt,ve),ve|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,D(Yt,ve),ve|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,D(Yt,ve),ve|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,D(Yt,ve),ve|=r;return ie(e,t,l,n),t.child}function Va(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ro(e,t,n,r,l){var o=he(n)?jt:ue.current;return o=tn(t,o),qt(t,l),n=_u(e,t,n,r,o,l),r=Nu(),e!==null&&!de?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ge(e,t,l)):(H&&r&&pu(t),t.flags|=1,ie(e,t,n,l),t.child)}function Ui(e,t,n,r,l){if(he(n)){var o=!0;Yr(t)}else o=!1;if(qt(t,l),t.stateNode===null)Mr(e,t),Ua(t,n,r),To(t,n,r,l),r=!0;else if(e===null){var u=t.stateNode,i=t.memoizedProps;u.props=i;var s=u.context,f=n.contextType;typeof f=="object"&&f!==null?f=Ne(f):(f=he(n)?jt:ue.current,f=tn(t,f));var v=n.getDerivedStateFromProps,m=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function";m||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==r||s!==f)&&Mi(t,u,r,f),be=!1;var p=t.memoizedState;u.state=p,qr(t,r,u,l),s=t.memoizedState,i!==r||p!==s||pe.current||be?(typeof v=="function"&&(zo(t,n,v,r),s=t.memoizedState),(i=be||Ti(t,n,i,r,p,s,f))?(m||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),u.props=r,u.state=s,u.context=f,r=i):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,ga(e,t),i=t.memoizedProps,f=t.type===t.elementType?i:ze(t.type,i),u.props=f,m=t.pendingProps,p=u.context,s=n.contextType,typeof s=="object"&&s!==null?s=Ne(s):(s=he(n)?jt:ue.current,s=tn(t,s));var w=n.getDerivedStateFromProps;(v=typeof w=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==m||p!==s)&&Mi(t,u,r,s),be=!1,p=t.memoizedState,u.state=p,qr(t,r,u,l);var k=t.memoizedState;i!==m||p!==k||pe.current||be?(typeof w=="function"&&(zo(t,n,w,r),k=t.memoizedState),(f=be||Ti(t,n,f,r,p,k,s)||!1)?(v||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,k,s),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,k,s)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),u.props=r,u.state=k,u.context=s,r=f):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Oo(e,t,n,r,o,l)}function Oo(e,t,n,r,l,o){Va(e,t);var u=(t.flags&128)!==0;if(!r&&!u)return l&&Ei(t,n,!1),Ge(e,t,o);r=t.stateNode,Ed.current=t;var i=u&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&u?(t.child=rn(t,e.child,null,o),t.child=rn(t,null,i,o)):ie(e,t,i,o),t.memoizedState=r.state,l&&Ei(t,n,!0),t.child}function Wa(e){var t=e.stateNode;t.pendingContext?xi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&xi(e,t.context,!1),Su(e,t.containerInfo)}function Hi(e,t,n,r,l){return nn(),mu(l),t.flags|=256,ie(e,t,n,r),t.child}var Do={dehydrated:null,treeContext:null,retryLane:0};function Io(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qa(e,t,n){var r=t.pendingProps,l=A.current,o=!1,u=(t.flags&128)!==0,i;if((i=u)||(i=e!==null&&e.memoizedState===null?!1:(l&2)!==0),i?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),D(A,l&1),e===null)return Po(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(u=r.children,e=r.fallback,o?(r=t.mode,o=t.child,u={mode:"hidden",children:u},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=u):o=wl(u,r,0,null),e=_t(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Io(n),t.memoizedState=Do,e):Lu(t,u));if(l=e.memoizedState,l!==null&&(i=l.dehydrated,i!==null))return Cd(e,t,u,r,i,l,n);if(o){o=r.fallback,u=t.mode,l=e.child,i=l.sibling;var s={mode:"hidden",children:r.children};return!(u&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=ft(l,s),r.subtreeFlags=l.subtreeFlags&14680064),i!==null?o=ft(i,o):(o=_t(o,u,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,u=e.child.memoizedState,u=u===null?Io(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},o.memoizedState=u,o.childLanes=e.childLanes&~n,t.memoizedState=Do,r}return o=e.child,e=o.sibling,r=ft(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Lu(e,t){return t=wl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wr(e,t,n,r){return r!==null&&mu(r),rn(t,e.child,null,n),e=Lu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cd(e,t,n,r,l,o,u){if(n)return t.flags&256?(t.flags&=-257,r=Gl(Error(y(422))),wr(e,t,u,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=wl({mode:"visible",children:r.children},l,0,null),o=_t(o,l,u,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&rn(t,e.child,null,u),t.child.memoizedState=Io(u),t.memoizedState=Do,o);if(!(t.mode&1))return wr(e,t,u,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var i=r.dgst;return r=i,o=Error(y(419)),r=Gl(o,r,void 0),wr(e,t,u,r)}if(i=(u&e.childLanes)!==0,de||i){if(r=b,r!==null){switch(u&-u){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|u)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Xe(e,l),Oe(r,e,l,-1))}return Du(),r=Gl(Error(y(421))),wr(e,t,u,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Fd.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,ge=it(l.nextSibling),ye=t,H=!0,Me=null,e!==null&&(xe[Ee++]=Ve,xe[Ee++]=We,xe[Ee++]=Pt,Ve=e.id,We=e.overflow,Pt=t),t=Lu(t,r.children),t.flags|=4096,t)}function Ai(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lo(e.return,t,n)}function Zl(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function Ka(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(ie(e,t,r.children,n),r=A.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ai(e,n,t);else if(e.tag===19)Ai(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(D(A,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&br(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Zl(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&br(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Zl(t,!0,n,null,o);break;case"together":Zl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Mr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ge(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(y(153));if(t.child!==null){for(e=t.child,n=ft(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ft(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _d(e,t,n){switch(t.tag){case 3:Wa(t),nn();break;case 5:ya(t);break;case 1:he(t.type)&&Yr(t);break;case 4:Su(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;D(Zr,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(D(A,A.current&1),t.flags|=128,null):n&t.child.childLanes?Qa(e,t,n):(D(A,A.current&1),e=Ge(e,t,n),e!==null?e.sibling:null);D(A,A.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ka(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),D(A,A.current),r)break;return null;case 22:case 23:return t.lanes=0,Ba(e,t,n)}return Ge(e,t,n)}var Ya,Fo,Xa,Ga;Ya=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fo=function(){};Xa=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Et(Ae.current);var o=null;switch(n){case"input":l=lo(e,l),r=lo(e,r),o=[];break;case"select":l=B({},l,{value:void 0}),r=B({},r,{value:void 0}),o=[];break;case"textarea":l=io(e,l),r=io(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Qr)}ao(n,r);var u;n=null;for(f in l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&l[f]!=null)if(f==="style"){var i=l[f];for(u in i)i.hasOwnProperty(u)&&(n||(n={}),n[u]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(In.hasOwnProperty(f)?o||(o=[]):(o=o||[]).push(f,null));for(f in r){var s=r[f];if(i=l!=null?l[f]:void 0,r.hasOwnProperty(f)&&s!==i&&(s!=null||i!=null))if(f==="style")if(i){for(u in i)!i.hasOwnProperty(u)||s&&s.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in s)s.hasOwnProperty(u)&&i[u]!==s[u]&&(n||(n={}),n[u]=s[u])}else n||(o||(o=[]),o.push(f,n)),n=s;else f==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,i=i?i.__html:void 0,s!=null&&i!==s&&(o=o||[]).push(f,s)):f==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(f,""+s):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(In.hasOwnProperty(f)?(s!=null&&f==="onScroll"&&F("scroll",e),o||i===s||(o=[])):(o=o||[]).push(f,s))}n&&(o=o||[]).push("style",n);var f=o;(t.updateQueue=f)&&(t.flags|=4)}};Ga=function(e,t,n,r){n!==r&&(t.flags|=4)};function kn(e,t){if(!H)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function le(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Nd(e,t,n){var r=t.pendingProps;switch(hu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return le(t),null;case 1:return he(t.type)&&Kr(),le(t),null;case 3:return r=t.stateNode,ln(),U(pe),U(ue),Eu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(gr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Me!==null&&(Qo(Me),Me=null))),Fo(e,t),le(t),null;case 5:xu(t);var l=Et(Xn.current);if(n=t.type,e!==null&&t.stateNode!=null)Xa(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(y(166));return le(t),null}if(e=Et(Ae.current),gr(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ue]=t,r[Kn]=o,e=(t.mode&1)!==0,n){case"dialog":F("cancel",r),F("close",r);break;case"iframe":case"object":case"embed":F("load",r);break;case"video":case"audio":for(l=0;l<_n.length;l++)F(_n[l],r);break;case"source":F("error",r);break;case"img":case"image":case"link":F("error",r),F("load",r);break;case"details":F("toggle",r);break;case"input":Gu(r,o),F("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},F("invalid",r);break;case"textarea":Ju(r,o),F("invalid",r)}ao(n,o),l=null;for(var u in o)if(o.hasOwnProperty(u)){var i=o[u];u==="children"?typeof i=="string"?r.textContent!==i&&(o.suppressHydrationWarning!==!0&&vr(r.textContent,i,e),l=["children",i]):typeof i=="number"&&r.textContent!==""+i&&(o.suppressHydrationWarning!==!0&&vr(r.textContent,i,e),l=["children",""+i]):In.hasOwnProperty(u)&&i!=null&&u==="onScroll"&&F("scroll",r)}switch(n){case"input":sr(r),Zu(r,o,!0);break;case"textarea":sr(r),qu(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Qr)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{u=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Es(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Ue]=t,e[Kn]=r,Ya(e,t,!1,!1),t.stateNode=e;e:{switch(u=co(n,r),n){case"dialog":F("cancel",e),F("close",e),l=r;break;case"iframe":case"object":case"embed":F("load",e),l=r;break;case"video":case"audio":for(l=0;l<_n.length;l++)F(_n[l],e);l=r;break;case"source":F("error",e),l=r;break;case"img":case"image":case"link":F("error",e),F("load",e),l=r;break;case"details":F("toggle",e),l=r;break;case"input":Gu(e,r),l=lo(e,r),F("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=B({},r,{value:void 0}),F("invalid",e);break;case"textarea":Ju(e,r),l=io(e,r),F("invalid",e);break;default:l=r}ao(n,l),i=l;for(o in i)if(i.hasOwnProperty(o)){var s=i[o];o==="style"?Ns(e,s):o==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Cs(e,s)):o==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&Fn(e,s):typeof s=="number"&&Fn(e,""+s):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(In.hasOwnProperty(o)?s!=null&&o==="onScroll"&&F("scroll",e):s!=null&&bo(e,o,s,u))}switch(n){case"input":sr(e),Zu(e,r,!1);break;case"textarea":sr(e),qu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+dt(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Xt(e,!!r.multiple,o,!1):r.defaultValue!=null&&Xt(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Qr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return le(t),null;case 6:if(e&&t.stateNode!=null)Ga(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(y(166));if(n=Et(Xn.current),Et(Ae.current),gr(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ue]=t,(o=r.nodeValue!==n)&&(e=ye,e!==null))switch(e.tag){case 3:vr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vr(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ue]=t,t.stateNode=r}return le(t),null;case 13:if(U(A),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(H&&ge!==null&&t.mode&1&&!(t.flags&128))pa(),nn(),t.flags|=98560,o=!1;else if(o=gr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(y(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(y(317));o[Ue]=t}else nn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;le(t),o=!1}else Me!==null&&(Qo(Me),Me=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||A.current&1?Z===0&&(Z=3):Du())),t.updateQueue!==null&&(t.flags|=4),le(t),null);case 4:return ln(),Fo(e,t),e===null&&Wn(t.stateNode.containerInfo),le(t),null;case 10:return yu(t.type._context),le(t),null;case 17:return he(t.type)&&Kr(),le(t),null;case 19:if(U(A),o=t.memoizedState,o===null)return le(t),null;if(r=(t.flags&128)!==0,u=o.rendering,u===null)if(r)kn(o,!1);else{if(Z!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(u=br(e),u!==null){for(t.flags|=128,kn(o,!1),r=u.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,u=o.alternate,u===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,e=u.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return D(A,A.current&1|2),t.child}e=e.sibling}o.tail!==null&&Y()>un&&(t.flags|=128,r=!0,kn(o,!1),t.lanes=4194304)}else{if(!r)if(e=br(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!H)return le(t),null}else 2*Y()-o.renderingStartTime>un&&n!==1073741824&&(t.flags|=128,r=!0,kn(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(n=o.last,n!==null?n.sibling=u:t.child=u,o.last=u)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Y(),t.sibling=null,n=A.current,D(A,r?n&1|2:n&1),t):(le(t),null);case 22:case 23:return Ou(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ve&1073741824&&(le(t),t.subtreeFlags&6&&(t.flags|=8192)):le(t),null;case 24:return null;case 25:return null}throw Error(y(156,t.tag))}function jd(e,t){switch(hu(t),t.tag){case 1:return he(t.type)&&Kr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ln(),U(pe),U(ue),Eu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xu(t),null;case 13:if(U(A),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));nn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(A),null;case 4:return ln(),null;case 10:return yu(t.type._context),null;case 22:case 23:return Ou(),null;case 24:return null;default:return null}}var kr=!1,oe=!1,Pd=typeof WeakSet=="function"?WeakSet:Set,x=null;function Kt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){V(e,t,r)}else n.current=null}function Uo(e,t,n){try{n()}catch(r){V(e,t,r)}}var $i=!1;function Ld(e,t){if(So=Br,e=ea(),du(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var u=0,i=-1,s=-1,f=0,v=0,m=e,p=null;t:for(;;){for(var w;m!==n||l!==0&&m.nodeType!==3||(i=u+l),m!==o||r!==0&&m.nodeType!==3||(s=u+r),m.nodeType===3&&(u+=m.nodeValue.length),(w=m.firstChild)!==null;)p=m,m=w;for(;;){if(m===e)break t;if(p===n&&++f===l&&(i=u),p===o&&++v===r&&(s=u),(w=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=w}n=i===-1||s===-1?null:{start:i,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(xo={focusedElem:e,selectionRange:n},Br=!1,x=t;x!==null;)if(t=x,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,x=e;else for(;x!==null;){t=x;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var S=k.memoizedProps,M=k.memoizedState,c=t.stateNode,a=c.getSnapshotBeforeUpdate(t.elementType===t.type?S:ze(t.type,S),M);c.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(g){V(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,x=e;break}x=t.return}return k=$i,$i=!1,k}function Mn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Uo(t,n,o)}l=l.next}while(l!==r)}}function gl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ho(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Za(e){var t=e.alternate;t!==null&&(e.alternate=null,Za(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ue],delete t[Kn],delete t[_o],delete t[fd],delete t[dd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ja(e){return e.tag===5||e.tag===3||e.tag===4}function Bi(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ja(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ao(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qr));else if(r!==4&&(e=e.child,e!==null))for(Ao(e,t,n),e=e.sibling;e!==null;)Ao(e,t,n),e=e.sibling}function $o(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($o(e,t,n),e=e.sibling;e!==null;)$o(e,t,n),e=e.sibling}var ee=null,Te=!1;function Je(e,t,n){for(n=n.child;n!==null;)qa(e,t,n),n=n.sibling}function qa(e,t,n){if(He&&typeof He.onCommitFiberUnmount=="function")try{He.onCommitFiberUnmount(al,n)}catch{}switch(n.tag){case 5:oe||Kt(n,t);case 6:var r=ee,l=Te;ee=null,Je(e,t,n),ee=r,Te=l,ee!==null&&(Te?(e=ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ee.removeChild(n.stateNode));break;case 18:ee!==null&&(Te?(e=ee,n=n.stateNode,e.nodeType===8?Vl(e.parentNode,n):e.nodeType===1&&Vl(e,n),$n(e)):Vl(ee,n.stateNode));break;case 4:r=ee,l=Te,ee=n.stateNode.containerInfo,Te=!0,Je(e,t,n),ee=r,Te=l;break;case 0:case 11:case 14:case 15:if(!oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,u=o.destroy;o=o.tag,u!==void 0&&(o&2||o&4)&&Uo(n,t,u),l=l.next}while(l!==r)}Je(e,t,n);break;case 1:if(!oe&&(Kt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){V(n,t,i)}Je(e,t,n);break;case 21:Je(e,t,n);break;case 22:n.mode&1?(oe=(r=oe)||n.memoizedState!==null,Je(e,t,n),oe=r):Je(e,t,n);break;default:Je(e,t,n)}}function Vi(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Pd),t.forEach(function(r){var l=Ud.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Le(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var o=e,u=t,i=u;e:for(;i!==null;){switch(i.tag){case 5:ee=i.stateNode,Te=!1;break e;case 3:ee=i.stateNode.containerInfo,Te=!0;break e;case 4:ee=i.stateNode.containerInfo,Te=!0;break e}i=i.return}if(ee===null)throw Error(y(160));qa(o,u,l),ee=null,Te=!1;var s=l.alternate;s!==null&&(s.return=null),l.return=null}catch(f){V(l,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ba(t,e),t=t.sibling}function ba(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Le(t,e),Ie(e),r&4){try{Mn(3,e,e.return),gl(3,e)}catch(S){V(e,e.return,S)}try{Mn(5,e,e.return)}catch(S){V(e,e.return,S)}}break;case 1:Le(t,e),Ie(e),r&512&&n!==null&&Kt(n,n.return);break;case 5:if(Le(t,e),Ie(e),r&512&&n!==null&&Kt(n,n.return),e.flags&32){var l=e.stateNode;try{Fn(l,"")}catch(S){V(e,e.return,S)}}if(r&4&&(l=e.stateNode,l!=null)){var o=e.memoizedProps,u=n!==null?n.memoizedProps:o,i=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{i==="input"&&o.type==="radio"&&o.name!=null&&Ss(l,o),co(i,u);var f=co(i,o);for(u=0;u<s.length;u+=2){var v=s[u],m=s[u+1];v==="style"?Ns(l,m):v==="dangerouslySetInnerHTML"?Cs(l,m):v==="children"?Fn(l,m):bo(l,v,m,f)}switch(i){case"input":oo(l,o);break;case"textarea":xs(l,o);break;case"select":var p=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!o.multiple;var w=o.value;w!=null?Xt(l,!!o.multiple,w,!1):p!==!!o.multiple&&(o.defaultValue!=null?Xt(l,!!o.multiple,o.defaultValue,!0):Xt(l,!!o.multiple,o.multiple?[]:"",!1))}l[Kn]=o}catch(S){V(e,e.return,S)}}break;case 6:if(Le(t,e),Ie(e),r&4){if(e.stateNode===null)throw Error(y(162));l=e.stateNode,o=e.memoizedProps;try{l.nodeValue=o}catch(S){V(e,e.return,S)}}break;case 3:if(Le(t,e),Ie(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$n(t.containerInfo)}catch(S){V(e,e.return,S)}break;case 4:Le(t,e),Ie(e);break;case 13:Le(t,e),Ie(e),l=e.child,l.flags&8192&&(o=l.memoizedState!==null,l.stateNode.isHidden=o,!o||l.alternate!==null&&l.alternate.memoizedState!==null||(Mu=Y())),r&4&&Vi(e);break;case 22:if(v=n!==null&&n.memoizedState!==null,e.mode&1?(oe=(f=oe)||v,Le(t,e),oe=f):Le(t,e),Ie(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!v&&e.mode&1)for(x=e,v=e.child;v!==null;){for(m=x=v;x!==null;){switch(p=x,w=p.child,p.tag){case 0:case 11:case 14:case 15:Mn(4,p,p.return);break;case 1:Kt(p,p.return);var k=p.stateNode;if(typeof k.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(S){V(r,n,S)}}break;case 5:Kt(p,p.return);break;case 22:if(p.memoizedState!==null){Qi(m);continue}}w!==null?(w.return=p,x=w):Qi(m)}v=v.sibling}e:for(v=null,m=e;;){if(m.tag===5){if(v===null){v=m;try{l=m.stateNode,f?(o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(i=m.stateNode,s=m.memoizedProps.style,u=s!=null&&s.hasOwnProperty("display")?s.display:null,i.style.display=_s("display",u))}catch(S){V(e,e.return,S)}}}else if(m.tag===6){if(v===null)try{m.stateNode.nodeValue=f?"":m.memoizedProps}catch(S){V(e,e.return,S)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;v===m&&(v=null),m=m.return}v===m&&(v=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Le(t,e),Ie(e),r&4&&Vi(e);break;case 21:break;default:Le(t,e),Ie(e)}}function Ie(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ja(n)){var r=n;break e}n=n.return}throw Error(y(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Fn(l,""),r.flags&=-33);var o=Bi(e);$o(e,o,l);break;case 3:case 4:var u=r.stateNode.containerInfo,i=Bi(e);Ao(e,i,u);break;default:throw Error(y(161))}}catch(s){V(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zd(e,t,n){x=e,ec(e)}function ec(e,t,n){for(var r=(e.mode&1)!==0;x!==null;){var l=x,o=l.child;if(l.tag===22&&r){var u=l.memoizedState!==null||kr;if(!u){var i=l.alternate,s=i!==null&&i.memoizedState!==null||oe;i=kr;var f=oe;if(kr=u,(oe=s)&&!f)for(x=l;x!==null;)u=x,s=u.child,u.tag===22&&u.memoizedState!==null?Ki(l):s!==null?(s.return=u,x=s):Ki(l);for(;o!==null;)x=o,ec(o),o=o.sibling;x=l,kr=i,oe=f}Wi(e)}else l.subtreeFlags&8772&&o!==null?(o.return=l,x=o):Wi(e)}}function Wi(e){for(;x!==null;){var t=x;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:oe||gl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!oe)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:ze(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Pi(t,o,r);break;case 3:var u=t.updateQueue;if(u!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Pi(t,u,n)}break;case 5:var i=t.stateNode;if(n===null&&t.flags&4){n=i;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var v=f.memoizedState;if(v!==null){var m=v.dehydrated;m!==null&&$n(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(y(163))}oe||t.flags&512&&Ho(t)}catch(p){V(t,t.return,p)}}if(t===e){x=null;break}if(n=t.sibling,n!==null){n.return=t.return,x=n;break}x=t.return}}function Qi(e){for(;x!==null;){var t=x;if(t===e){x=null;break}var n=t.sibling;if(n!==null){n.return=t.return,x=n;break}x=t.return}}function Ki(e){for(;x!==null;){var t=x;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gl(4,t)}catch(s){V(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(s){V(t,l,s)}}var o=t.return;try{Ho(t)}catch(s){V(t,o,s)}break;case 5:var u=t.return;try{Ho(t)}catch(s){V(t,u,s)}}}catch(s){V(t,t.return,s)}if(t===e){x=null;break}var i=t.sibling;if(i!==null){i.return=t.return,x=i;break}x=t.return}}var Td=Math.ceil,nl=Ze.ReactCurrentDispatcher,zu=Ze.ReactCurrentOwner,_e=Ze.ReactCurrentBatchConfig,R=0,b=null,X=null,te=0,ve=0,Yt=mt(0),Z=0,qn=null,zt=0,yl=0,Tu=0,Rn=null,fe=null,Mu=0,un=1/0,$e=null,rl=!1,Bo=null,at=null,Sr=!1,rt=null,ll=0,On=0,Vo=null,Rr=-1,Or=0;function se(){return R&6?Y():Rr!==-1?Rr:Rr=Y()}function ct(e){return e.mode&1?R&2&&te!==0?te&-te:hd.transition!==null?(Or===0&&(Or=Us()),Or):(e=O,e!==0||(e=window.event,e=e===void 0?16:Qs(e.type)),e):1}function Oe(e,t,n,r){if(50<On)throw On=0,Vo=null,Error(y(185));er(e,n,r),(!(R&2)||e!==b)&&(e===b&&(!(R&2)&&(yl|=n),Z===4&&tt(e,te)),me(e,r),n===1&&R===0&&!(t.mode&1)&&(un=Y()+500,hl&&vt()))}function me(e,t){var n=e.callbackNode;hf(e,t);var r=$r(e,e===b?te:0);if(r===0)n!==null&&ti(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ti(n),t===1)e.tag===0?pd(Yi.bind(null,e)):ca(Yi.bind(null,e)),ad(function(){!(R&6)&&vt()}),n=null;else{switch(Hs(r)){case 1:n=lu;break;case 4:n=Is;break;case 16:n=Ar;break;case 536870912:n=Fs;break;default:n=Ar}n=sc(n,tc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function tc(e,t){if(Rr=-1,Or=0,R&6)throw Error(y(327));var n=e.callbackNode;if(bt()&&e.callbackNode!==n)return null;var r=$r(e,e===b?te:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ol(e,r);else{t=r;var l=R;R|=2;var o=rc();(b!==e||te!==t)&&($e=null,un=Y()+500,Ct(e,t));do try{Od();break}catch(i){nc(e,i)}while(!0);gu(),nl.current=o,R=l,X!==null?t=0:(b=null,te=0,t=Z)}if(t!==0){if(t===2&&(l=vo(e),l!==0&&(r=l,t=Wo(e,l))),t===1)throw n=qn,Ct(e,0),tt(e,r),me(e,Y()),n;if(t===6)tt(e,r);else{if(l=e.current.alternate,!(r&30)&&!Md(l)&&(t=ol(e,r),t===2&&(o=vo(e),o!==0&&(r=o,t=Wo(e,o))),t===1))throw n=qn,Ct(e,0),tt(e,r),me(e,Y()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(y(345));case 2:kt(e,fe,$e);break;case 3:if(tt(e,r),(r&130023424)===r&&(t=Mu+500-Y(),10<t)){if($r(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){se(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Co(kt.bind(null,e,fe,$e),t);break}kt(e,fe,$e);break;case 4:if(tt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var u=31-Re(r);o=1<<u,u=t[u],u>l&&(l=u),r&=~o}if(r=l,r=Y()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Td(r/1960))-r,10<r){e.timeoutHandle=Co(kt.bind(null,e,fe,$e),r);break}kt(e,fe,$e);break;case 5:kt(e,fe,$e);break;default:throw Error(y(329))}}}return me(e,Y()),e.callbackNode===n?tc.bind(null,e):null}function Wo(e,t){var n=Rn;return e.current.memoizedState.isDehydrated&&(Ct(e,t).flags|=256),e=ol(e,t),e!==2&&(t=fe,fe=n,t!==null&&Qo(t)),e}function Qo(e){fe===null?fe=e:fe.push.apply(fe,e)}function Md(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],o=l.getSnapshot;l=l.value;try{if(!De(o(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function tt(e,t){for(t&=~Tu,t&=~yl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Re(t),r=1<<n;e[n]=-1,t&=~r}}function Yi(e){if(R&6)throw Error(y(327));bt();var t=$r(e,0);if(!(t&1))return me(e,Y()),null;var n=ol(e,t);if(e.tag!==0&&n===2){var r=vo(e);r!==0&&(t=r,n=Wo(e,r))}if(n===1)throw n=qn,Ct(e,0),tt(e,t),me(e,Y()),n;if(n===6)throw Error(y(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,kt(e,fe,$e),me(e,Y()),null}function Ru(e,t){var n=R;R|=1;try{return e(t)}finally{R=n,R===0&&(un=Y()+500,hl&&vt())}}function Tt(e){rt!==null&&rt.tag===0&&!(R&6)&&bt();var t=R;R|=1;var n=_e.transition,r=O;try{if(_e.transition=null,O=1,e)return e()}finally{O=r,_e.transition=n,R=t,!(R&6)&&vt()}}function Ou(){ve=Yt.current,U(Yt)}function Ct(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,sd(n)),X!==null)for(n=X.return;n!==null;){var r=n;switch(hu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Kr();break;case 3:ln(),U(pe),U(ue),Eu();break;case 5:xu(r);break;case 4:ln();break;case 13:U(A);break;case 19:U(A);break;case 10:yu(r.type._context);break;case 22:case 23:Ou()}n=n.return}if(b=e,X=e=ft(e.current,null),te=ve=t,Z=0,qn=null,Tu=yl=zt=0,fe=Rn=null,xt!==null){for(t=0;t<xt.length;t++)if(n=xt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,o=n.pending;if(o!==null){var u=o.next;o.next=l,r.next=u}n.pending=r}xt=null}return e}function nc(e,t){do{var n=X;try{if(gu(),zr.current=tl,el){for(var r=$.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}el=!1}if(Lt=0,q=G=$=null,Tn=!1,Gn=0,zu.current=null,n===null||n.return===null){Z=1,qn=t,X=null;break}e:{var o=e,u=n.return,i=n,s=t;if(t=te,i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var f=s,v=i,m=v.tag;if(!(v.mode&1)&&(m===0||m===11||m===15)){var p=v.alternate;p?(v.updateQueue=p.updateQueue,v.memoizedState=p.memoizedState,v.lanes=p.lanes):(v.updateQueue=null,v.memoizedState=null)}var w=Oi(u);if(w!==null){w.flags&=-257,Di(w,u,i,o,t),w.mode&1&&Ri(o,f,t),t=w,s=f;var k=t.updateQueue;if(k===null){var S=new Set;S.add(s),t.updateQueue=S}else k.add(s);break e}else{if(!(t&1)){Ri(o,f,t),Du();break e}s=Error(y(426))}}else if(H&&i.mode&1){var M=Oi(u);if(M!==null){!(M.flags&65536)&&(M.flags|=256),Di(M,u,i,o,t),mu(on(s,i));break e}}o=s=on(s,i),Z!==4&&(Z=2),Rn===null?Rn=[o]:Rn.push(o),o=u;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var c=Ha(o,s,t);ji(o,c);break e;case 1:i=s;var a=o.type,d=o.stateNode;if(!(o.flags&128)&&(typeof a.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(at===null||!at.has(d)))){o.flags|=65536,t&=-t,o.lanes|=t;var g=Aa(o,i,t);ji(o,g);break e}}o=o.return}while(o!==null)}oc(n)}catch(E){t=E,X===n&&n!==null&&(X=n=n.return);continue}break}while(!0)}function rc(){var e=nl.current;return nl.current=tl,e===null?tl:e}function Du(){(Z===0||Z===3||Z===2)&&(Z=4),b===null||!(zt&268435455)&&!(yl&268435455)||tt(b,te)}function ol(e,t){var n=R;R|=2;var r=rc();(b!==e||te!==t)&&($e=null,Ct(e,t));do try{Rd();break}catch(l){nc(e,l)}while(!0);if(gu(),R=n,nl.current=r,X!==null)throw Error(y(261));return b=null,te=0,Z}function Rd(){for(;X!==null;)lc(X)}function Od(){for(;X!==null&&!lf();)lc(X)}function lc(e){var t=ic(e.alternate,e,ve);e.memoizedProps=e.pendingProps,t===null?oc(e):X=t,zu.current=null}function oc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=jd(n,t),n!==null){n.flags&=32767,X=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Z=6,X=null;return}}else if(n=Nd(n,t,ve),n!==null){X=n;return}if(t=t.sibling,t!==null){X=t;return}X=t=e}while(t!==null);Z===0&&(Z=5)}function kt(e,t,n){var r=O,l=_e.transition;try{_e.transition=null,O=1,Dd(e,t,n,r)}finally{_e.transition=l,O=r}return null}function Dd(e,t,n,r){do bt();while(rt!==null);if(R&6)throw Error(y(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(y(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(mf(e,o),e===b&&(X=b=null,te=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Sr||(Sr=!0,sc(Ar,function(){return bt(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=_e.transition,_e.transition=null;var u=O;O=1;var i=R;R|=4,zu.current=null,Ld(e,n),ba(n,e),td(xo),Br=!!So,xo=So=null,e.current=n,zd(n),of(),R=i,O=u,_e.transition=o}else e.current=n;if(Sr&&(Sr=!1,rt=e,ll=l),o=e.pendingLanes,o===0&&(at=null),af(n.stateNode),me(e,Y()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(rl)throw rl=!1,e=Bo,Bo=null,e;return ll&1&&e.tag!==0&&bt(),o=e.pendingLanes,o&1?e===Vo?On++:(On=0,Vo=e):On=0,vt(),null}function bt(){if(rt!==null){var e=Hs(ll),t=_e.transition,n=O;try{if(_e.transition=null,O=16>e?16:e,rt===null)var r=!1;else{if(e=rt,rt=null,ll=0,R&6)throw Error(y(331));var l=R;for(R|=4,x=e.current;x!==null;){var o=x,u=o.child;if(x.flags&16){var i=o.deletions;if(i!==null){for(var s=0;s<i.length;s++){var f=i[s];for(x=f;x!==null;){var v=x;switch(v.tag){case 0:case 11:case 15:Mn(8,v,o)}var m=v.child;if(m!==null)m.return=v,x=m;else for(;x!==null;){v=x;var p=v.sibling,w=v.return;if(Za(v),v===f){x=null;break}if(p!==null){p.return=w,x=p;break}x=w}}}var k=o.alternate;if(k!==null){var S=k.child;if(S!==null){k.child=null;do{var M=S.sibling;S.sibling=null,S=M}while(S!==null)}}x=o}}if(o.subtreeFlags&2064&&u!==null)u.return=o,x=u;else e:for(;x!==null;){if(o=x,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Mn(9,o,o.return)}var c=o.sibling;if(c!==null){c.return=o.return,x=c;break e}x=o.return}}var a=e.current;for(x=a;x!==null;){u=x;var d=u.child;if(u.subtreeFlags&2064&&d!==null)d.return=u,x=d;else e:for(u=a;x!==null;){if(i=x,i.flags&2048)try{switch(i.tag){case 0:case 11:case 15:gl(9,i)}}catch(E){V(i,i.return,E)}if(i===u){x=null;break e}var g=i.sibling;if(g!==null){g.return=i.return,x=g;break e}x=i.return}}if(R=l,vt(),He&&typeof He.onPostCommitFiberRoot=="function")try{He.onPostCommitFiberRoot(al,e)}catch{}r=!0}return r}finally{O=n,_e.transition=t}}return!1}function Xi(e,t,n){t=on(n,t),t=Ha(e,t,1),e=st(e,t,1),t=se(),e!==null&&(er(e,1,t),me(e,t))}function V(e,t,n){if(e.tag===3)Xi(e,e,n);else for(;t!==null;){if(t.tag===3){Xi(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(at===null||!at.has(r))){e=on(n,e),e=Aa(t,e,1),t=st(t,e,1),e=se(),t!==null&&(er(t,1,e),me(t,e));break}}t=t.return}}function Id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=se(),e.pingedLanes|=e.suspendedLanes&n,b===e&&(te&n)===n&&(Z===4||Z===3&&(te&130023424)===te&&500>Y()-Mu?Ct(e,0):Tu|=n),me(e,t)}function uc(e,t){t===0&&(e.mode&1?(t=fr,fr<<=1,!(fr&130023424)&&(fr=4194304)):t=1);var n=se();e=Xe(e,t),e!==null&&(er(e,t,n),me(e,n))}function Fd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uc(e,n)}function Ud(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(t),uc(e,n)}var ic;ic=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||pe.current)de=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return de=!1,_d(e,t,n);de=!!(e.flags&131072)}else de=!1,H&&t.flags&1048576&&fa(t,Gr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Mr(e,t),e=t.pendingProps;var l=tn(t,ue.current);qt(t,n),l=_u(null,t,r,e,l,n);var o=Nu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,he(r)?(o=!0,Yr(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ku(t),l.updater=vl,t.stateNode=l,l._reactInternals=t,To(t,r,e,n),t=Oo(null,t,r,!0,o,n)):(t.tag=0,H&&o&&pu(t),ie(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Mr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Ad(r),e=ze(r,e),l){case 0:t=Ro(null,t,r,e,n);break e;case 1:t=Ui(null,t,r,e,n);break e;case 11:t=Ii(null,t,r,e,n);break e;case 14:t=Fi(null,t,r,ze(r.type,e),n);break e}throw Error(y(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Ro(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Ui(e,t,r,l,n);case 3:e:{if(Wa(t),e===null)throw Error(y(387));r=t.pendingProps,o=t.memoizedState,l=o.element,ga(e,t),qr(t,r,null,n);var u=t.memoizedState;if(r=u.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=on(Error(y(423)),t),t=Hi(e,t,r,n,l);break e}else if(r!==l){l=on(Error(y(424)),t),t=Hi(e,t,r,n,l);break e}else for(ge=it(t.stateNode.containerInfo.firstChild),ye=t,H=!0,Me=null,n=ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(nn(),r===l){t=Ge(e,t,n);break e}ie(e,t,r,n)}t=t.child}return t;case 5:return ya(t),e===null&&Po(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,u=l.children,Eo(r,l)?u=null:o!==null&&Eo(r,o)&&(t.flags|=32),Va(e,t),ie(e,t,u,n),t.child;case 6:return e===null&&Po(t),null;case 13:return Qa(e,t,n);case 4:return Su(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=rn(t,null,r,n):ie(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Ii(e,t,r,l,n);case 7:return ie(e,t,t.pendingProps,n),t.child;case 8:return ie(e,t,t.pendingProps.children,n),t.child;case 12:return ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,u=l.value,D(Zr,r._currentValue),r._currentValue=u,o!==null)if(De(o.value,u)){if(o.children===l.children&&!pe.current){t=Ge(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var i=o.dependencies;if(i!==null){u=o.child;for(var s=i.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Qe(-1,n&-n),s.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var v=f.pending;v===null?s.next=s:(s.next=v.next,v.next=s),f.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Lo(o.return,n,t),i.lanes|=n;break}s=s.next}}else if(o.tag===10)u=o.type===t.type?null:o.child;else if(o.tag===18){if(u=o.return,u===null)throw Error(y(341));u.lanes|=n,i=u.alternate,i!==null&&(i.lanes|=n),Lo(u,n,t),u=o.sibling}else u=o.child;if(u!==null)u.return=o;else for(u=o;u!==null;){if(u===t){u=null;break}if(o=u.sibling,o!==null){o.return=u.return,u=o;break}u=u.return}o=u}ie(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,qt(t,n),l=Ne(l),r=r(l),t.flags|=1,ie(e,t,r,n),t.child;case 14:return r=t.type,l=ze(r,t.pendingProps),l=ze(r.type,l),Fi(e,t,r,l,n);case 15:return $a(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Mr(e,t),t.tag=1,he(r)?(e=!0,Yr(t)):e=!1,qt(t,n),Ua(t,r,l),To(t,r,l,n),Oo(null,t,r,!0,e,n);case 19:return Ka(e,t,n);case 22:return Ba(e,t,n)}throw Error(y(156,t.tag))};function sc(e,t){return Ds(e,t)}function Hd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ce(e,t,n,r){return new Hd(e,t,n,r)}function Iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ad(e){if(typeof e=="function")return Iu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tu)return 11;if(e===nu)return 14}return 2}function ft(e,t){var n=e.alternate;return n===null?(n=Ce(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dr(e,t,n,r,l,o){var u=2;if(r=e,typeof e=="function")Iu(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Ft:return _t(n.children,l,o,t);case eu:u=8,l|=8;break;case eo:return e=Ce(12,n,t,l|2),e.elementType=eo,e.lanes=o,e;case to:return e=Ce(13,n,t,l),e.elementType=to,e.lanes=o,e;case no:return e=Ce(19,n,t,l),e.elementType=no,e.lanes=o,e;case ys:return wl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vs:u=10;break e;case gs:u=9;break e;case tu:u=11;break e;case nu:u=14;break e;case qe:u=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return t=Ce(u,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function _t(e,t,n,r){return e=Ce(7,e,r,t),e.lanes=n,e}function wl(e,t,n,r){return e=Ce(22,e,r,t),e.elementType=ys,e.lanes=n,e.stateNode={isHidden:!1},e}function Jl(e,t,n){return e=Ce(6,e,null,t),e.lanes=n,e}function ql(e,t,n){return t=Ce(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $d(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ml(0),this.expirationTimes=Ml(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ml(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,l,o,u,i,s){return e=new $d(e,t,n,i,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ce(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ku(o),e}function Bd(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:It,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ac(e){if(!e)return pt;e=e._reactInternals;e:{if(Rt(e)!==e||e.tag!==1)throw Error(y(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(he(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(y(171))}if(e.tag===1){var n=e.type;if(he(n))return aa(e,n,t)}return t}function cc(e,t,n,r,l,o,u,i,s){return e=Fu(n,r,!0,e,l,o,u,i,s),e.context=ac(null),n=e.current,r=se(),l=ct(n),o=Qe(r,l),o.callback=t??null,st(n,o,l),e.current.lanes=l,er(e,l,r),me(e,r),e}function kl(e,t,n,r){var l=t.current,o=se(),u=ct(l);return n=ac(n),t.context===null?t.context=n:t.pendingContext=n,t=Qe(o,u),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=st(l,t,u),e!==null&&(Oe(e,l,u,o),Lr(e,l,u)),u}function ul(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Gi(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Uu(e,t){Gi(e,t),(e=e.alternate)&&Gi(e,t)}function Vd(){return null}var fc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Hu(e){this._internalRoot=e}Sl.prototype.render=Hu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(y(409));kl(e,t,null,null)};Sl.prototype.unmount=Hu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Tt(function(){kl(null,e,null,null)}),t[Ye]=null}};function Sl(e){this._internalRoot=e}Sl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bs();e={blockedOn:null,target:e,priority:t};for(var n=0;n<et.length&&t!==0&&t<et[n].priority;n++);et.splice(n,0,e),n===0&&Ws(e)}};function Au(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function xl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zi(){}function Wd(e,t,n,r,l){if(l){if(typeof r=="function"){var o=r;r=function(){var f=ul(u);o.call(f)}}var u=cc(t,r,e,0,null,!1,!1,"",Zi);return e._reactRootContainer=u,e[Ye]=u.current,Wn(e.nodeType===8?e.parentNode:e),Tt(),u}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var i=r;r=function(){var f=ul(s);i.call(f)}}var s=Fu(e,0,!1,null,null,!1,!1,"",Zi);return e._reactRootContainer=s,e[Ye]=s.current,Wn(e.nodeType===8?e.parentNode:e),Tt(function(){kl(t,s,n,r)}),s}function El(e,t,n,r,l){var o=n._reactRootContainer;if(o){var u=o;if(typeof l=="function"){var i=l;l=function(){var s=ul(u);i.call(s)}}kl(t,u,e,l)}else u=Wd(n,t,e,l,r);return ul(u)}As=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Cn(t.pendingLanes);n!==0&&(ou(t,n|1),me(t,Y()),!(R&6)&&(un=Y()+500,vt()))}break;case 13:Tt(function(){var r=Xe(e,1);if(r!==null){var l=se();Oe(r,e,1,l)}}),Uu(e,1)}};uu=function(e){if(e.tag===13){var t=Xe(e,134217728);if(t!==null){var n=se();Oe(t,e,134217728,n)}Uu(e,134217728)}};$s=function(e){if(e.tag===13){var t=ct(e),n=Xe(e,t);if(n!==null){var r=se();Oe(n,e,t,r)}Uu(e,t)}};Bs=function(){return O};Vs=function(e,t){var n=O;try{return O=e,t()}finally{O=n}};po=function(e,t,n){switch(t){case"input":if(oo(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=pl(r);if(!l)throw Error(y(90));ks(r),oo(r,l)}}}break;case"textarea":xs(e,n);break;case"select":t=n.value,t!=null&&Xt(e,!!n.multiple,t,!1)}};Ls=Ru;zs=Tt;var Qd={usingClientEntryPoint:!1,Events:[nr,$t,pl,js,Ps,Ru]},Sn={findFiberByHostInstance:St,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Kd={bundleType:Sn.bundleType,version:Sn.version,rendererPackageName:Sn.rendererPackageName,rendererConfig:Sn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ze.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Rs(e),e===null?null:e.stateNode},findFiberByHostInstance:Sn.findFiberByHostInstance||Vd,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xr.isDisabled&&xr.supportsFiber)try{al=xr.inject(Kd),He=xr}catch{}}ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qd;ke.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Au(t))throw Error(y(200));return Bd(e,t,null,n)};ke.createRoot=function(e,t){if(!Au(e))throw Error(y(299));var n=!1,r="",l=fc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Fu(e,1,!1,null,null,n,!1,r,l),e[Ye]=t.current,Wn(e.nodeType===8?e.parentNode:e),new Hu(t)};ke.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(y(188)):(e=Object.keys(e).join(","),Error(y(268,e)));return e=Rs(t),e=e===null?null:e.stateNode,e};ke.flushSync=function(e){return Tt(e)};ke.hydrate=function(e,t,n){if(!xl(t))throw Error(y(200));return El(null,e,t,!0,n)};ke.hydrateRoot=function(e,t,n){if(!Au(e))throw Error(y(405));var r=n!=null&&n.hydratedSources||null,l=!1,o="",u=fc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),t=cc(t,null,e,1,n??null,l,!1,o,u),e[Ye]=t.current,Wn(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Sl(t)};ke.render=function(e,t,n){if(!xl(t))throw Error(y(200));return El(null,e,t,!1,n)};ke.unmountComponentAtNode=function(e){if(!xl(e))throw Error(y(40));return e._reactRootContainer?(Tt(function(){El(null,null,e,!1,function(){e._reactRootContainer=null,e[Ye]=null})}),!0):!1};ke.unstable_batchedUpdates=Ru;ke.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!xl(n))throw Error(y(200));if(e==null||e._reactInternals===void 0)throw Error(y(38));return El(e,t,n,!1,r)};ke.version="18.3.1-next-f1338f8080-20240426";function dc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dc)}catch(e){console.error(e)}}dc(),ds.exports=ke;var Yd=ds.exports,pc,Ji=Yd;pc=Ji.createRoot,Ji.hydrateRoot;function Xd({size:e=36}){const t=[];for(let n=0;n<24;n++){const r=n*Math.PI*2/24,l=n%6===0,o=l?13:14.5;t.push(h.jsx("line",{x1:20+Math.sin(r)*o,y1:20-Math.cos(r)*o,x2:20+Math.sin(r)*17.5,y2:20-Math.cos(r)*17.5,strokeWidth:l?2:1.2},n))}return h.jsxs("svg",{className:"dial",width:e,height:e,viewBox:"0 0 40 40",fill:"none",stroke:"currentColor",strokeLinecap:"round","aria-hidden":"true",children:[t,h.jsx("circle",{cx:"20",cy:"20",r:"10",strokeWidth:"2"}),h.jsx("circle",{cx:"20",cy:"13",r:"2.2",fill:"currentColor",stroke:"none"})]})}const Nt={fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function Gd(){return h.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",...Nt,strokeWidth:"1.8",children:[h.jsx("path",{d:"M12 18V4"}),h.jsx("path",{d:"M12 14l-5-3V8.5M12 12l5-3V7.5"}),h.jsx("circle",{cx:"12",cy:"20",r:"1.7",fill:"currentColor"}),h.jsx("rect",{x:"5.6",y:"6",width:"2.8",height:"2.8",fill:"currentColor"}),h.jsx("circle",{cx:"17",cy:"6.6",r:"1.6",fill:"currentColor"}),h.jsx("path",{d:"M12 2l-2 3h4z",fill:"currentColor"})]})}function Zd(){return h.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",...Nt,strokeWidth:"1.8",children:h.jsx("path",{d:"M6.5 7.5l11 9-5.5 4.5V3l5.5 4.5-11 9"})})}function hc({size:e=20}){return h.jsx("svg",{viewBox:"0 0 24 24",width:e,height:e,...Nt,strokeWidth:"1.8",children:h.jsx("circle",{cx:"12",cy:"12",r:"8",strokeDasharray:"3 3"})})}function Jd({pct:e,charging:t}){const n=e!=null,r=n?Math.max(0,Math.min(100,e))*.19:0;return h.jsxs("svg",{viewBox:"0 0 28 16",width:"34",height:"19",...Nt,children:[h.jsx("rect",{x:"1",y:"1.5",width:"23",height:"13",rx:"2.5",strokeWidth:"1.6",strokeDasharray:n?void 0:"3 2.4"}),h.jsx("rect",{x:"25",y:"5.5",width:"2",height:"5",rx:"1",fill:"currentColor",stroke:"none"}),n&&h.jsx("rect",{x:"3",y:"3.5",width:r,height:"9",rx:"1",fill:"currentColor",stroke:"none"}),t&&h.jsx("path",{d:"M12.5 4.5L8 11h3l-1 4.5 4.5-6.5h-3z",fill:"var(--bg)",stroke:"none"})]})}function qd({kind:e}){return e==="ok"?h.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",...Nt,strokeWidth:"2.2",children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"M8 12.5l3 3 5-6"})]}):e==="warn"?h.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",...Nt,strokeWidth:"2.2",children:[h.jsx("path",{d:"M12 3.5L21.5 20h-19z"}),h.jsx("path",{d:"M12 10v4.5"}),h.jsx("circle",{cx:"12",cy:"17.3",r:".6",fill:"currentColor"})]}):e==="err"?h.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",...Nt,strokeWidth:"2.2",children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"M8.5 8.5l7 7M15.5 8.5l-7 7"})]}):h.jsx(hc,{size:18})}function Ir(e){if(e==null)return"never";const t=Math.round(e/1e3);if(t<2)return"just now";if(t<90)return t+"s ago";const n=Math.round(t/60);return n<90?n+"m ago":Math.round(n/60)+"h ago"}function bd(e){const t=Math.floor(e/1e3),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),l=Math.floor(t%3600/60);return n?n+"d "+r+"h":r?r+"h "+l+"m":l?l+"m "+t%60+"s":t+"s"}function ep(e){const t=Number(e);return Number.isFinite(t)?t.toFixed(3):"–"}function tp(e){return new Date(e).toLocaleTimeString([],{hour12:!1})}function np(e){const t=Math.round(e/60);return t<1?"<1m":t<60?t+"m":Math.floor(t/60)+"h "+String(t%60).padStart(2,"0")+"m"}const qi={usb:"USB",bluetooth:"Bluetooth"},rp=e=>e<=15?"low":e<=30?"mid":"ok",lp={ok:"OK",warn:"Check log",err:"Check log"};function op({pendant:e}){const t=!!(e&&e.connected),n=t&&e.powered===!1,r=t&&!n&&e.info?e.info:null,l=t?e.link:null,o=!!r&&r.bat!==void 0,u=r&&r.st?r.st:null;return h.jsxs("div",{className:"pend",children:[h.jsxs("span",{className:"g"+(l?"":" muted"),title:l?qi[l]:"Connection type unknown",children:[l==="usb"?h.jsx(Gd,{}):l==="bluetooth"?h.jsx(Zd,{}):h.jsx(hc,{}),h.jsx("small",{children:l?qi[l]:"–"})]}),h.jsxs("span",{className:"g bat "+(o?rp(r.bat):"muted"),children:[h.jsx(Jd,{pct:o?r.bat:null,charging:o&&!!r.chg}),h.jsx("span",{className:"pct",children:o?r.bat+"%":"–"}),o&&r.eta!==void 0&&h.jsxs("small",{children:[np(r.eta)," ",r.chg?"to full":"left"]})]}),h.jsxs("span",{className:"g st s-"+(u||"unk"),children:[h.jsx(qd,{kind:u}),h.jsx("small",{children:u?lp[u]:n?"Off":t?"No status":"No data"})]})]})}const mc=new URLSearchParams(window.location.search),vc=(mc.get("api")||"/handwheel-api").replace(/\/+$/,""),up=3e3,ip=Math.max(200,Number(mc.get("poll"))||400);async function bi(e,t){const n=new AbortController,r=setTimeout(()=>n.abort(),up),l=()=>n.abort();t&&t.addEventListener("abort",l);try{const o=await fetch(vc+e,{cache:"no-store",signal:n.signal});if(!o.ok)throw new Error("HTTP "+o.status);return await o.json()}finally{clearTimeout(r),t&&t.removeEventListener("abort",l)}}function sp({withLog:e,intervalMs:t=ip,logMax:n=300}){const[r,l]=W.useState(null),[o,u]=W.useState(null),[i,s]=W.useState(null),[f,v]=W.useState([]),m=W.useRef(0);return W.useEffect(()=>{let p=!1,w=null;const k=new AbortController,S=async()=>{if(!document.hidden)try{const M=await bi("/status",k.signal);if(p)return;if(l(M),u(null),s(Date.now()),e){const c=await bi("/log?since="+m.current,k.signal);if(p)return;c.last<m.current?(m.current=0,v([])):c.entries.length&&(m.current=c.last,v(a=>a.concat(c.entries).slice(-n)))}}catch(M){if(p)return;u(M&&M.name==="AbortError"?"timeout":String(M&&M.message||M))}p||(w=setTimeout(S,t))};return S(),()=>{p=!0,k.abort(),clearTimeout(w)}},[e,t,n]),{status:r,error:o,lastOkAt:i,log:f}}function ap(e,t){return t?{level:"offline",text:"Bridge unreachable"}:e?e.pendant&&e.pendant.connected?e.pendant.powered===!1?{level:"offline",text:"Handwheel switched off"}:e.cncjs&&e.cncjs.socketConnected?e.cncjs.portOpen?{level:"ok",text:"Handwheel connected"}:{level:"warn",text:"Machine port closed"}:{level:"warn",text:"CNCjs not reachable"}:{level:"down",text:"Handwheel disconnected"}:{level:"unknown",text:"Connecting…"}}const sn=new URLSearchParams(window.location.search),il=sn.get("token"),cp=sn.get("debug")==="1";function fp(){window.parent.postMessage({token:il,action:{type:"connect"}},"*")}function dp(){const e=()=>{const n=document.body;window.parent.postMessage({token:il,action:{type:"resize",payload:{clientHeight:n.clientHeight,clientWidth:n.clientWidth,offsetHeight:n.offsetHeight,offsetWidth:n.offsetWidth,scrollHeight:n.scrollHeight,scrollWidth:n.scrollWidth}}},"*")},t=new ResizeObserver(e);return t.observe(document.body),()=>t.disconnect()}function pp(e){try{const t=window.frameElement&&window.frameElement.closest('[role="region"]');if(!t)return null;const n=()=>/widget-fullscreen/.test(t.className);e(n());const r=new MutationObserver(()=>e(n()));return r.observe(t,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()}catch{return null}}function hp(){const[e,t]=W.useState(sn.get("mode")==="full");return W.useEffect(()=>{const n=l=>{const{token:o,action:u}={...l.data};il&&o!==il||u&&u.type==="fullscreen"&&t(!!(u.payload&&u.payload.fullscreen))};window.addEventListener("message",n);const r=sn.get("mode")==="full"?null:pp(t);return()=>{window.removeEventListener("message",n),r&&r()}},[]),e}function mp(e){const[t,n]=W.useState(null);return W.useEffect(()=>{if(!e){n(null);return}try{const r=window.frameElement&&window.frameElement.closest('[role="region"]');if(!r)return;const l=r.querySelector('[class*="widget-header"]'),o=()=>n(r.clientHeight-(l?l.offsetHeight:34));o();const u=new ResizeObserver(o);return u.observe(r),()=>u.disconnect()}catch{return}},[e]),t}const Ko=["light","dark"].includes(sn.get("theme"))?sn.get("theme"):null;function vp(){if(Ko)return Ko;try{const e=window.parent.document.documentElement,t=e.getAttribute("data-color-mode");if(t==="light"||t==="dark")return t;const n=[e.className,...Array.from(e.attributes).map(r=>r.name+"="+r.value)].join(" ");if(/dark/i.test(n))return"dark";if(/light/i.test(n))return"light"}catch{}return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function I({label:e,children:t}){return h.jsxs("div",{className:"row",children:[h.jsx("span",{className:"label",children:e}),h.jsx("span",{className:"value",children:t})]})}function Er({title:e,children:t}){return h.jsxs("section",{className:"card",children:[h.jsx("h3",{children:e}),h.jsx("div",{className:"body",children:t})]})}function Dt({value:e,kind:t="plain"}){const n=Number(e)||0,r=t==="bad"?n>0?"bad":"":t==="good"&&n===0?"good":"";return h.jsx("b",{className:r,children:e??"–"})}function Dn({items:e}){return e.map(([t,n],r)=>h.jsxs("span",{children:[r>0&&h.jsx("i",{children:"|"}),h.jsx(Dt,{value:t,kind:n})]},r))}const gp=120,yp=6,wp=700,gc=e=>/^(Run|Jog|Home)/i.test(e)?"busy":/^(Hold|Door)/i.test(e)?"warn":/^Alarm/i.test(e)?"bad":"";function kp({entries:e,height:t,boxRef:n,emptyNote:r}){const l=W.useRef(null),o=n||l,u=W.useRef(!0);W.useEffect(()=>{const s=o.current;s&&u.current&&(s.scrollTop=s.scrollHeight)},[e]);const i=()=>{const s=o.current;u.current=s.scrollHeight-s.scrollTop-s.clientHeight<8};return h.jsx("div",{className:"log",ref:o,style:t?{height:t}:void 0,onScroll:i,role:"log","aria-label":"Handwheel log",children:e.length===0?h.jsxs("div",{className:"empty",children:["No log lines from the handwheel yet.",r?" "+r:""]}):e.map(s=>h.jsxs("div",{className:"logline",children:[h.jsx("span",{className:"time",children:tp(s.t)})," ",s.text]},s.id))})}function Sp({status:e,log:t,age:n,machineState:r,logHeight:l,logRef:o}){const{pendant:u={},cncjs:i={},jog:s,lastCommand:f}=e,v=e.status||{},m=v.sender||{},p=v.wpos;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"cards",children:[h.jsxs(Er,{title:"Machine",children:[h.jsx(I,{label:"State",children:h.jsx("span",{className:"mstate "+gc(r),children:r})}),p&&["x","y","z"].map(w=>h.jsx(I,{label:"Work "+w.toUpperCase(),children:h.jsx("span",{className:"mono",children:ep(p[w])})},w)),v.feed!==null&&v.feed!==void 0&&h.jsxs(I,{label:"Feed / spindle",children:[v.feed," / ",v.spindle===null||v.spindle===void 0?"–":v.spindle]}),m.name&&h.jsxs(I,{label:"Job",children:[m.name," ",m.sent,"/",m.total,m.hold?" (hold)":""]})]}),h.jsxs(Er,{title:"Handwheel",children:[h.jsx(I,{label:"Port",children:u.path||"–"}),u.powerDetect&&h.jsx(I,{label:"Power",children:u.powered===!0?"on":u.powered===!1?"switched off":u.powerError?"unreadable":"checking…"}),e.version&&h.jsxs(I,{label:"Bridge",children:["v",e.version,e.uptimeMs!==void 0?", up "+bd(e.uptimeMs):""]}),h.jsx(I,{label:"Last line in",children:Ir(n(u.lastRxAgeMs))}),h.jsx(I,{label:"Last line out",children:Ir(n(u.lastTxAgeMs))}),h.jsxs(I,{label:"Lines in / out",children:[u.rxLines," / ",u.txLines]}),h.jsx(I,{label:"Reconnects",children:h.jsx(Dt,{value:u.reconnects,kind:"bad"})}),h.jsxs(I,{label:"Errors",children:[h.jsx(Dt,{value:u.errors,kind:"bad"}),u.lastError?h.jsxs("span",{className:"bad",children:[" – ",u.lastError]}):null]}),h.jsx(I,{label:"Dropped lines",children:h.jsx(Dt,{value:u.garbageLines,kind:"bad"})}),u.sendEnabled!==void 0&&h.jsx(I,{label:"Status to pendant",children:u.sendEnabled?"on":"off"})]}),h.jsxs(Er,{title:"CNCjs",children:[h.jsx(I,{label:"Socket",children:i.socketConnected?"connected":"down"}),h.jsx(I,{label:"Machine port",children:i.portOpen?"open":"closed"}),h.jsx(I,{label:"Device",children:i.port||"–"}),h.jsx(I,{label:"Controller",children:i.controllerType||"–"}),h.jsx(I,{label:"Dropped commands",children:h.jsx(Dt,{value:i.droppedCommands,kind:"bad"})}),i.lastError&&h.jsx(I,{label:"Last error",children:h.jsx("span",{className:"bad",children:i.lastError})})]}),(s||f)&&h.jsxs(Er,{title:"Jogging",children:[s&&h.jsxs(h.Fragment,{children:[h.jsx(I,{label:"Sent | merged",children:h.jsx(Dn,{items:[[s.sent],[s.merged]]})}),h.jsx(I,{label:"Discarded",children:h.jsx(Dt,{value:s.discarded})}),h.jsx(I,{label:"In flight | held",children:h.jsx(Dn,{items:[[s.inFlight||0,"good"],[s.held?1:0,"good"]]})}),h.jsx(I,{label:"Cancels | stalls",children:h.jsx(Dn,{items:[[s.cancels],[s.stalls,"bad"]]})})]}),f&&h.jsxs(I,{label:"Last command",children:[h.jsx("span",{className:"mono",children:f.name})," ",Ir(Date.now()-f.at)]})]})]}),h.jsxs("section",{className:"card logcard",children:[h.jsx("h3",{children:"Handwheel log"}),h.jsx(kp,{entries:t,height:l,boxRef:o,emptyNote:"The bridge has received "+(u.rxLines||0)+" lines from it, "+(u.logLines||0)+" of them log lines (log lines start with a semicolon)."})]})]})}function xp(){const e=hp(),[t,n]=W.useState(!1),r=e||t,{status:l,error:o,lastOkAt:u,log:i}=sp({withLog:r}),s=ap(l,o),f=c=>c==null?null:c+(Date.now()-u);let v=(l&&l.status&&l.status.state||"–").replace(/:\d+$/,"");v==="Idle"&&l&&l.jog&&(l.jog.inFlight>0||l.jog.lastAgeMs!==null&&l.jog.lastAgeMs!==void 0&&f(l.jog.lastAgeMs)<wp)&&(v="Jog");const m=l&&l.pendant?[l.pendant.reconnects||0,l.pendant.errors||0,(l.pendant.garbageLines||0)+(l.cncjs&&l.cncjs.droppedCommands||0)]:null,p=W.useRef(null),w=W.useRef(null),k=mp(e),[S,M]=W.useState(null);return W.useLayoutEffect(()=>{const a=e&&k!==null&&p.current&&w.current?Math.max(gp,Math.floor(k-(p.current.offsetHeight-w.current.offsetHeight)-yp)):null;a!==S&&M(a)}),h.jsxs("div",{ref:p,className:"widget level-"+s.level+(r?" expanded":""),children:[h.jsxs("header",{className:"head",children:[h.jsx("span",{className:"icon",children:h.jsx(Xd,{size:36})}),h.jsxs("span",{className:"title",children:[h.jsx("strong",{children:s.text}),h.jsx("small",{className:"counts",children:l&&!o?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"mstate "+gc(v),children:v}),m&&h.jsxs("span",{children:[h.jsx("em",{children:"Reconn|Err|Drop"})," ",h.jsx(Dn,{items:m.map(c=>[c,"bad"])})]}),l.jog&&h.jsxs("span",{children:[h.jsx("em",{children:"In flight|Held"})," ",h.jsx(Dn,{items:[[l.jog.inFlight||0,"good"],[l.jog.held?1:0,"good"]]})]})]}):o&&u?"last seen "+Ir(Date.now()-u):""})]}),cp&&!e&&h.jsx("button",{type:"button",className:"toggle",onClick:()=>n(!t),"aria-label":r?"Show less":"Show details","aria-expanded":r,title:r?"Show less":"Show details",children:r?"▴":"▾"})]}),l&&!o&&h.jsx(op,{pendant:l.pendant}),r&&l&&!o&&h.jsx(Sp,{status:l,log:i,age:f,machineState:v,logHeight:S,logRef:w}),r&&o&&h.jsxs("p",{className:"hint",children:["Cannot reach the bridge at ",h.jsx("code",{children:vc})," (",o,"). Is the service running and the proxy route in place?"]})]})}const es={"--bg":"--color-surface","--fg":"--color-text","--muted":"--color-text-subtle","--card":"--color-surface-alt","--border":"--color-border","--head-bg":"--color-widget-header-bg","--head-fg":"--color-text","--head-border":"--color-border-strong","--accent":"--color-status-info-text","--down":"--color-status-danger-text","--warn":"--color-warning-text","--btn-bg":"--btn-default-top","--focus":"--color-focus-ring"};function Ep(){try{if(!window.frameElement)return null;const e=window.parent.document.documentElement,t=document.documentElement,n=()=>{const l=e.getAttribute("data-color-mode");(l==="light"||l==="dark")&&(t.dataset.theme=l);const o=window.parent.getComputedStyle(e);Object.keys(es).forEach(u=>{const i=o.getPropertyValue(es[u]).trim();i?t.style.setProperty(u,i):t.style.removeProperty(u)})};n();const r=new MutationObserver(n);return r.observe(e,{attributes:!0,attributeFilter:["data-color-mode","class","style"]}),()=>r.disconnect()}catch{return null}}class Cp extends W.Component{constructor(){super(...arguments);Bu(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){const{error:n}=this.state;return n?h.jsxs("p",{className:"hint",style:{padding:10},children:["Widget error: ",String(n.message||n)]}):this.props.children}}document.documentElement.dataset.theme=vp();Ko||Ep();window.parent!==window&&document.documentElement.classList.add("embedded");dp();fp();pc(document.getElementById("root")).render(h.jsx(W.StrictMode,{children:h.jsx(Cp,{children:h.jsx(xp,{})})}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Handwheel</title>
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-bZH022uk.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DjeoyRHc.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|