@devness/useai 0.4.20 → 0.4.22

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.
Files changed (2) hide show
  1. package/dist/index.js +823 -1179
  2. package/package.json +2 -3
package/dist/index.js CHANGED
@@ -112,7 +112,7 @@ var VERSION;
112
112
  var init_version = __esm({
113
113
  "../shared/dist/constants/version.js"() {
114
114
  "use strict";
115
- VERSION = "0.4.20";
115
+ VERSION = "0.4.22";
116
116
  }
117
117
  });
118
118
 
@@ -135,10 +135,15 @@ var init_clients = __esm({
135
135
  });
136
136
 
137
137
  // ../shared/dist/constants/defaults.js
138
- var GENESIS_HASH;
138
+ var DEFAULT_CONFIG, DEFAULT_SYNC_INTERVAL_HOURS, GENESIS_HASH;
139
139
  var init_defaults = __esm({
140
140
  "../shared/dist/constants/defaults.js"() {
141
141
  "use strict";
142
+ DEFAULT_CONFIG = {
143
+ milestone_tracking: true,
144
+ auto_sync: true
145
+ };
146
+ DEFAULT_SYNC_INTERVAL_HOURS = 24;
142
147
  GENESIS_HASH = "GENESIS";
143
148
  }
144
149
  });
@@ -246,6 +251,41 @@ var init_chain2 = __esm({
246
251
 
247
252
  // ../shared/dist/crypto/verify.js
248
253
  import { createHash as createHash2, createPublicKey, verify as cryptoVerify } from "crypto";
254
+ function verifyChainRecord(record, prevHash) {
255
+ const recordCore = JSON.stringify({
256
+ id: record.id,
257
+ type: record.type,
258
+ session_id: record.session_id,
259
+ timestamp: record.timestamp,
260
+ data: record.data
261
+ });
262
+ const expectedHash = createHash2("sha256").update(recordCore + prevHash).digest("hex");
263
+ return record.hash === expectedHash;
264
+ }
265
+ function verifySignature(hash, signature, publicKeyPem) {
266
+ if (signature === "unsigned")
267
+ return false;
268
+ try {
269
+ const publicKey = createPublicKey(publicKeyPem);
270
+ return cryptoVerify(null, Buffer.from(hash), publicKey, Buffer.from(signature, "hex"));
271
+ } catch {
272
+ return false;
273
+ }
274
+ }
275
+ function verifyChain(records, publicKeyPem) {
276
+ let prevHash = "GENESIS";
277
+ for (let i = 0; i < records.length; i++) {
278
+ const record = records[i];
279
+ if (!verifyChainRecord(record, prevHash)) {
280
+ return { valid: false, signatureValid: false, brokenAt: i };
281
+ }
282
+ if (publicKeyPem && !verifySignature(record.hash, record.signature, publicKeyPem)) {
283
+ return { valid: true, signatureValid: false, brokenAt: i };
284
+ }
285
+ prevHash = record.hash;
286
+ }
287
+ return { valid: true, signatureValid: publicKeyPem ? true : false };
288
+ }
249
289
  var init_verify = __esm({
250
290
  "../shared/dist/crypto/verify.js"() {
251
291
  "use strict";
@@ -334,9 +374,29 @@ var init_schemas = __esm({
334
374
  });
335
375
 
336
376
  // ../shared/dist/validation/guards.js
377
+ function exceedsMaxDailyHours(totalSeconds) {
378
+ return totalSeconds > MAX_DAILY_HOURS * 3600;
379
+ }
380
+ function exceedsMaxContinuous(durationSeconds) {
381
+ return durationSeconds > MAX_CONTINUOUS_HOURS * 3600;
382
+ }
383
+ function isSpikeFromAverage(current, average) {
384
+ return average > 0 && current > average * SPIKE_MULTIPLIER;
385
+ }
386
+ function hasTimeOverlap(a, b) {
387
+ const aStart = new Date(a.started_at).getTime();
388
+ const aEnd = new Date(a.ended_at).getTime();
389
+ const bStart = new Date(b.started_at).getTime();
390
+ const bEnd = new Date(b.ended_at).getTime();
391
+ return aStart < bEnd && bStart < aEnd;
392
+ }
393
+ var MAX_DAILY_HOURS, MAX_CONTINUOUS_HOURS, SPIKE_MULTIPLIER;
337
394
  var init_guards = __esm({
338
395
  "../shared/dist/validation/guards.js"() {
339
396
  "use strict";
397
+ MAX_DAILY_HOURS = 18;
398
+ MAX_CONTINUOUS_HOURS = 6;
399
+ SPIKE_MULTIPLIER = 10;
340
400
  }
341
401
  });
342
402
 
@@ -449,6 +509,12 @@ import { randomUUID as randomUUID2 } from "crypto";
449
509
  function generateSessionId() {
450
510
  return randomUUID2();
451
511
  }
512
+ function generateRecordId() {
513
+ return `r_${randomUUID2().slice(0, 12)}`;
514
+ }
515
+ function generateMilestoneId() {
516
+ return `m_${randomUUID2().slice(0, 8)}`;
517
+ }
452
518
  var init_id = __esm({
453
519
  "../shared/dist/utils/id.js"() {
454
520
  "use strict";
@@ -534,7 +600,7 @@ var init_resolve_npx = __esm({
534
600
 
535
601
  // ../shared/dist/daemon/ensure.js
536
602
  import { existsSync as existsSync3, readFileSync as readFileSync2, unlinkSync } from "fs";
537
- import { spawn } from "child_process";
603
+ import { execSync as execSync2, spawn } from "child_process";
538
604
  function readPidFile() {
539
605
  if (!existsSync3(DAEMON_PID_FILE))
540
606
  return null;
@@ -572,33 +638,55 @@ async function fetchDaemonHealth(port) {
572
638
  return null;
573
639
  }
574
640
  }
575
- async function killDaemon() {
576
- const pid = readPidFile();
577
- if (!pid)
578
- return;
579
- if (!isProcessRunning(pid.pid)) {
580
- try {
581
- unlinkSync(DAEMON_PID_FILE);
582
- } catch {
583
- }
584
- return;
641
+ function findPidsByPort(port) {
642
+ try {
643
+ const output = execSync2(`lsof -ti :${port}`, { encoding: "utf-8", timeout: 3e3 });
644
+ return output.trim().split("\n").map((s) => parseInt(s, 10)).filter((n) => !isNaN(n) && n > 0);
645
+ } catch {
646
+ return [];
585
647
  }
648
+ }
649
+ async function killPid(pid) {
650
+ if (!isProcessRunning(pid))
651
+ return;
586
652
  try {
587
- process.kill(pid.pid, "SIGTERM");
653
+ process.kill(pid, "SIGTERM");
588
654
  } catch {
589
655
  return;
590
656
  }
591
657
  const start = Date.now();
592
658
  while (Date.now() - start < 5e3) {
593
- if (!isProcessRunning(pid.pid)) {
659
+ if (!isProcessRunning(pid))
594
660
  return;
595
- }
596
661
  await new Promise((r) => setTimeout(r, 200));
597
662
  }
598
663
  try {
599
- process.kill(pid.pid, "SIGKILL");
664
+ process.kill(pid, "SIGKILL");
600
665
  } catch {
601
666
  }
667
+ }
668
+ async function killDaemon() {
669
+ const pidData = readPidFile();
670
+ const port = pidData?.port ?? DAEMON_PORT;
671
+ if (pidData && isProcessRunning(pidData.pid)) {
672
+ await killPid(pidData.pid);
673
+ try {
674
+ if (existsSync3(DAEMON_PID_FILE))
675
+ unlinkSync(DAEMON_PID_FILE);
676
+ } catch {
677
+ }
678
+ return;
679
+ }
680
+ if (pidData) {
681
+ try {
682
+ unlinkSync(DAEMON_PID_FILE);
683
+ } catch {
684
+ }
685
+ }
686
+ const pids = findPidsByPort(port);
687
+ if (pids.length > 0) {
688
+ await Promise.all(pids.map((p) => killPid(p)));
689
+ }
602
690
  try {
603
691
  if (existsSync3(DAEMON_PID_FILE))
604
692
  unlinkSync(DAEMON_PID_FILE);
@@ -653,7 +741,7 @@ var init_ensure = __esm({
653
741
 
654
742
  // ../shared/dist/daemon/autostart.js
655
743
  import { existsSync as existsSync4, mkdirSync as mkdirSync2, writeFileSync as writeFileSync2, unlinkSync as unlinkSync2 } from "fs";
656
- import { execSync as execSync2 } from "child_process";
744
+ import { execSync as execSync3 } from "child_process";
657
745
  import { dirname } from "path";
658
746
  function detectPlatform() {
659
747
  switch (process.platform) {
@@ -711,14 +799,14 @@ function installMacos() {
711
799
  mkdirSync2(dirname(LAUNCHD_PLIST_PATH), { recursive: true });
712
800
  writeFileSync2(LAUNCHD_PLIST_PATH, buildPlist(npxPath, nodePath));
713
801
  try {
714
- execSync2(`launchctl unload "${LAUNCHD_PLIST_PATH}" 2>/dev/null`, { stdio: "ignore" });
802
+ execSync3(`launchctl unload "${LAUNCHD_PLIST_PATH}" 2>/dev/null`, { stdio: "ignore" });
715
803
  } catch {
716
804
  }
717
- execSync2(`launchctl load "${LAUNCHD_PLIST_PATH}"`, { stdio: "ignore" });
805
+ execSync3(`launchctl load "${LAUNCHD_PLIST_PATH}"`, { stdio: "ignore" });
718
806
  }
719
807
  function removeMacos() {
720
808
  try {
721
- execSync2(`launchctl unload "${LAUNCHD_PLIST_PATH}" 2>/dev/null`, { stdio: "ignore" });
809
+ execSync3(`launchctl unload "${LAUNCHD_PLIST_PATH}" 2>/dev/null`, { stdio: "ignore" });
722
810
  } catch {
723
811
  }
724
812
  try {
@@ -751,12 +839,12 @@ function installLinux() {
751
839
  const nodePath = buildNodePath();
752
840
  mkdirSync2(dirname(SYSTEMD_SERVICE_PATH), { recursive: true });
753
841
  writeFileSync2(SYSTEMD_SERVICE_PATH, buildSystemdUnit(npxPath, nodePath));
754
- execSync2("systemctl --user daemon-reload", { stdio: "ignore" });
755
- execSync2("systemctl --user enable --now useai-daemon.service", { stdio: "ignore" });
842
+ execSync3("systemctl --user daemon-reload", { stdio: "ignore" });
843
+ execSync3("systemctl --user enable --now useai-daemon.service", { stdio: "ignore" });
756
844
  }
757
845
  function removeLinux() {
758
846
  try {
759
- execSync2("systemctl --user disable --now useai-daemon.service", { stdio: "ignore" });
847
+ execSync3("systemctl --user disable --now useai-daemon.service", { stdio: "ignore" });
760
848
  } catch {
761
849
  }
762
850
  try {
@@ -765,7 +853,7 @@ function removeLinux() {
765
853
  } catch {
766
854
  }
767
855
  try {
768
- execSync2("systemctl --user daemon-reload", { stdio: "ignore" });
856
+ execSync3("systemctl --user daemon-reload", { stdio: "ignore" });
769
857
  } catch {
770
858
  }
771
859
  }
@@ -975,6 +1063,16 @@ function removeClaudeCodeHooks() {
975
1063
  } catch {
976
1064
  }
977
1065
  }
1066
+ function isClaudeCodeHooksInstalled() {
1067
+ const settings = readSettings();
1068
+ const hooks = settings["hooks"];
1069
+ if (!hooks?.["Stop"])
1070
+ return false;
1071
+ return hooks["Stop"].some((g) => {
1072
+ const inner = g["hooks"];
1073
+ return inner?.some((h) => h["command"]?.includes("stop-guard"));
1074
+ });
1075
+ }
978
1076
  var STOP_GUARD_PATH, PROMPT_GUARD_PATH, CLAUDE_SETTINGS_PATH, STOP_GUARD_SCRIPT, PROMPT_GUARD_SCRIPT;
979
1077
  var init_claude_code = __esm({
980
1078
  "../shared/dist/hooks/claude-code.js"() {
@@ -1043,6 +1141,78 @@ var init_hooks = __esm({
1043
1141
  });
1044
1142
 
1045
1143
  // ../shared/dist/index.js
1144
+ var dist_exports = {};
1145
+ __export(dist_exports, {
1146
+ ACTIVE_DIR: () => ACTIVE_DIR,
1147
+ AI_CLIENT_ENV_VARS: () => AI_CLIENT_ENV_VARS,
1148
+ CONFIG_FILE: () => CONFIG_FILE,
1149
+ DAEMON_HEALTH_URL: () => DAEMON_HEALTH_URL,
1150
+ DAEMON_LOG_FILE: () => DAEMON_LOG_FILE,
1151
+ DAEMON_MCP_URL: () => DAEMON_MCP_URL,
1152
+ DAEMON_PID_FILE: () => DAEMON_PID_FILE,
1153
+ DAEMON_PORT: () => DAEMON_PORT,
1154
+ DATA_DIR: () => DATA_DIR,
1155
+ DEFAULT_CONFIG: () => DEFAULT_CONFIG,
1156
+ DEFAULT_SYNC_INTERVAL_HOURS: () => DEFAULT_SYNC_INTERVAL_HOURS,
1157
+ GENESIS_HASH: () => GENESIS_HASH,
1158
+ KEYSTORE_FILE: () => KEYSTORE_FILE,
1159
+ LAUNCHD_PLIST_PATH: () => LAUNCHD_PLIST_PATH,
1160
+ MAX_CONTINUOUS_HOURS: () => MAX_CONTINUOUS_HOURS,
1161
+ MAX_DAILY_HOURS: () => MAX_DAILY_HOURS,
1162
+ MILESTONES_FILE: () => MILESTONES_FILE,
1163
+ SEALED_DIR: () => SEALED_DIR,
1164
+ SESSIONS_FILE: () => SESSIONS_FILE,
1165
+ SPIKE_MULTIPLIER: () => SPIKE_MULTIPLIER,
1166
+ SYSTEMD_SERVICE_PATH: () => SYSTEMD_SERVICE_PATH,
1167
+ USEAI_DIR: () => USEAI_DIR,
1168
+ USEAI_HOOKS_DIR: () => USEAI_HOOKS_DIR,
1169
+ VERSION: () => VERSION,
1170
+ WINDOWS_STARTUP_SCRIPT_PATH: () => WINDOWS_STARTUP_SCRIPT_PATH,
1171
+ buildChainRecord: () => buildChainRecord,
1172
+ buildNodePath: () => buildNodePath,
1173
+ checkDaemonHealth: () => checkDaemonHealth,
1174
+ complexitySchema: () => complexitySchema,
1175
+ computeHash: () => computeHash,
1176
+ decryptKeystore: () => decryptKeystore,
1177
+ deriveEncryptionKey: () => deriveEncryptionKey,
1178
+ detectClient: () => detectClient,
1179
+ detectPlatform: () => detectPlatform,
1180
+ ensureDaemon: () => ensureDaemon,
1181
+ ensureDir: () => ensureDir,
1182
+ exceedsMaxContinuous: () => exceedsMaxContinuous,
1183
+ exceedsMaxDailyHours: () => exceedsMaxDailyHours,
1184
+ fetchDaemonHealth: () => fetchDaemonHealth,
1185
+ findPidsByPort: () => findPidsByPort,
1186
+ formatDuration: () => formatDuration,
1187
+ generateKeystore: () => generateKeystore,
1188
+ generateMilestoneId: () => generateMilestoneId,
1189
+ generateRecordId: () => generateRecordId,
1190
+ generateSessionId: () => generateSessionId,
1191
+ hasTimeOverlap: () => hasTimeOverlap,
1192
+ installAutostart: () => installAutostart,
1193
+ installClaudeCodeHooks: () => installClaudeCodeHooks,
1194
+ isAutostartInstalled: () => isAutostartInstalled,
1195
+ isClaudeCodeHooksInstalled: () => isClaudeCodeHooksInstalled,
1196
+ isProcessRunning: () => isProcessRunning,
1197
+ isSpikeFromAverage: () => isSpikeFromAverage,
1198
+ killDaemon: () => killDaemon,
1199
+ milestoneCategorySchema: () => milestoneCategorySchema,
1200
+ milestoneInputSchema: () => milestoneInputSchema,
1201
+ normalizeMcpClientName: () => normalizeMcpClientName,
1202
+ publishPayloadSchema: () => publishPayloadSchema,
1203
+ readJson: () => readJson,
1204
+ readPidFile: () => readPidFile,
1205
+ removeAutostart: () => removeAutostart,
1206
+ removeClaudeCodeHooks: () => removeClaudeCodeHooks,
1207
+ resolveNpxPath: () => resolveNpxPath,
1208
+ signHash: () => signHash,
1209
+ syncPayloadSchema: () => syncPayloadSchema,
1210
+ taskTypeSchema: () => taskTypeSchema,
1211
+ verifyChain: () => verifyChain,
1212
+ verifyChainRecord: () => verifyChainRecord,
1213
+ verifySignature: () => verifySignature,
1214
+ writeJson: () => writeJson
1215
+ });
1046
1216
  var init_dist = __esm({
1047
1217
  "../shared/dist/index.js"() {
1048
1218
  "use strict";
@@ -1056,1174 +1226,645 @@ var init_dist = __esm({
1056
1226
  }
1057
1227
  });
1058
1228
 
1059
- // src/session-state.ts
1060
- import { appendFileSync, existsSync as existsSync6 } from "fs";
1061
- import { basename, join as join4 } from "path";
1062
- var SessionState;
1063
- var init_session_state = __esm({
1064
- "src/session-state.ts"() {
1229
+ // src/tools.ts
1230
+ import {
1231
+ createToolRegistry,
1232
+ readJsonFile,
1233
+ writeJsonFile,
1234
+ injectInstructions
1235
+ } from "@devness/mcp-setup";
1236
+ import { join as join4 } from "path";
1237
+ import { homedir as homedir4 } from "os";
1238
+ function installStandardHttp(configPath) {
1239
+ const config = readJsonFile(configPath);
1240
+ const servers = config["mcpServers"] ?? {};
1241
+ delete servers["useai"];
1242
+ servers["UseAI"] = { ...MCP_HTTP_ENTRY };
1243
+ config["mcpServers"] = servers;
1244
+ writeJsonFile(configPath, config);
1245
+ }
1246
+ function installVscodeHttp(configPath) {
1247
+ const config = readJsonFile(configPath);
1248
+ const servers = config["servers"] ?? {};
1249
+ delete servers["useai"];
1250
+ servers["UseAI"] = { type: "http", url: MCP_HTTP_URL };
1251
+ config["servers"] = servers;
1252
+ writeJsonFile(configPath, config);
1253
+ }
1254
+ function resolveTools(names) {
1255
+ const { matched: baseMatched, unmatched } = registry.resolveTools(names);
1256
+ const matched = baseMatched.map((bt) => AI_TOOLS.find((t) => t.id === bt.id));
1257
+ return { matched, unmatched };
1258
+ }
1259
+ var USEAI_INSTRUCTIONS_TEXT, MCP_HTTP_URL, MCP_HTTP_ENTRY, INSTRUCTIONS, registry, home, appSupport, toolInstructions, URL_SUPPORTED_TOOLS, AI_TOOLS;
1260
+ var init_tools = __esm({
1261
+ "src/tools.ts"() {
1065
1262
  "use strict";
1066
1263
  init_dist();
1067
- SessionState = class {
1068
- sessionId;
1069
- sessionStartTime;
1070
- heartbeatCount;
1071
- sessionRecordCount;
1072
- clientName;
1073
- sessionTaskType;
1074
- project;
1075
- chainTipHash;
1076
- signingKey;
1077
- signingAvailable;
1078
- constructor() {
1079
- this.sessionId = generateSessionId();
1080
- this.sessionStartTime = Date.now();
1081
- this.heartbeatCount = 0;
1082
- this.sessionRecordCount = 0;
1083
- this.clientName = "unknown";
1084
- this.sessionTaskType = "coding";
1085
- this.project = null;
1086
- this.chainTipHash = GENESIS_HASH;
1087
- this.signingKey = null;
1088
- this.signingAvailable = false;
1089
- }
1090
- reset() {
1091
- this.sessionStartTime = Date.now();
1092
- this.sessionId = generateSessionId();
1093
- this.heartbeatCount = 0;
1094
- this.sessionRecordCount = 0;
1095
- this.chainTipHash = GENESIS_HASH;
1096
- this.sessionTaskType = "coding";
1097
- this.detectProject();
1098
- }
1099
- detectProject() {
1100
- this.project = basename(process.cwd());
1101
- }
1102
- setClient(name) {
1103
- this.clientName = name;
1104
- }
1105
- setTaskType(type) {
1106
- this.sessionTaskType = type;
1107
- }
1108
- incrementHeartbeat() {
1109
- this.heartbeatCount++;
1110
- }
1111
- getSessionDuration() {
1112
- return Math.round((Date.now() - this.sessionStartTime) / 1e3);
1113
- }
1114
- initializeKeystore() {
1115
- ensureDir();
1116
- if (existsSync6(KEYSTORE_FILE)) {
1117
- const ks = readJson(KEYSTORE_FILE, null);
1118
- if (ks) {
1119
- try {
1120
- this.signingKey = decryptKeystore(ks);
1121
- this.signingAvailable = true;
1122
- return;
1123
- } catch {
1124
- }
1264
+ USEAI_INSTRUCTIONS_TEXT = [
1265
+ "## UseAI Session Tracking",
1266
+ "- At the START of every response, call `useai_start` with the appropriate task_type.",
1267
+ "- For LONG sessions (15+ min), call `useai_heartbeat` periodically.",
1268
+ "- At the END of every response, call `useai_end` with languages used, files_touched_count, and milestones (generic descriptions only \u2014 no project names, file paths, or company names)."
1269
+ ].join("\n");
1270
+ MCP_HTTP_URL = DAEMON_MCP_URL;
1271
+ MCP_HTTP_ENTRY = { type: "http", url: MCP_HTTP_URL };
1272
+ INSTRUCTIONS = {
1273
+ text: USEAI_INSTRUCTIONS_TEXT,
1274
+ startMarker: "<!-- useai:start -->",
1275
+ endMarker: "<!-- useai:end -->"
1276
+ };
1277
+ registry = createToolRegistry({
1278
+ serverName: "UseAI",
1279
+ legacyName: "useai",
1280
+ mcpEntry: { command: "npx", args: ["-y", "@devness/useai"] },
1281
+ instructions: INSTRUCTIONS,
1282
+ instructionFileName: "useai"
1283
+ });
1284
+ home = homedir4();
1285
+ appSupport = join4(home, "Library", "Application Support");
1286
+ toolInstructions = {
1287
+ "claude-code": { method: "append", path: join4(home, ".claude", "CLAUDE.md") },
1288
+ "windsurf": { method: "append", path: join4(home, ".codeium", "windsurf", "memories", "global_rules.md") },
1289
+ "vscode": { method: "create", path: join4(appSupport, "Code", "User", "prompts", "useai.instructions.md") },
1290
+ "vscode-insiders": { method: "create", path: join4(appSupport, "Code - Insiders", "User", "prompts", "useai.instructions.md") },
1291
+ "gemini-cli": { method: "append", path: join4(home, ".gemini", "GEMINI.md") },
1292
+ "cline": { method: "create", path: join4(home, "Documents", "Cline", "Rules", "useai.md") },
1293
+ "roo-code": { method: "create", path: join4(home, ".roo", "rules", "useai.md") },
1294
+ "codex": { method: "append", path: join4(home, ".codex", "AGENTS.md") },
1295
+ "goose": { method: "append", path: join4(home, ".config", "goose", ".goosehints") },
1296
+ "opencode": { method: "append", path: join4(home, ".config", "opencode", "AGENTS.md") }
1297
+ };
1298
+ URL_SUPPORTED_TOOLS = /* @__PURE__ */ new Set([
1299
+ "claude-code",
1300
+ "cursor",
1301
+ "windsurf",
1302
+ "vscode",
1303
+ "vscode-insiders",
1304
+ "gemini-cli",
1305
+ "cline",
1306
+ "roo-code",
1307
+ "opencode"
1308
+ ]);
1309
+ AI_TOOLS = registry.tools.map((baseTool) => {
1310
+ const supportsUrl = URL_SUPPORTED_TOOLS.has(baseTool.id);
1311
+ return {
1312
+ ...baseTool,
1313
+ supportsUrl,
1314
+ installHttp() {
1315
+ if (baseTool.configFormat === "vscode") {
1316
+ installVscodeHttp(baseTool.getConfigPath());
1317
+ } else if (baseTool.configFormat === "standard") {
1318
+ installStandardHttp(baseTool.getConfigPath());
1319
+ } else {
1320
+ baseTool.install();
1321
+ return;
1322
+ }
1323
+ const placement = toolInstructions[baseTool.id];
1324
+ if (placement) {
1325
+ injectInstructions(INSTRUCTIONS, placement);
1125
1326
  }
1126
1327
  }
1127
- const result = generateKeystore();
1128
- writeJson(KEYSTORE_FILE, result.keystore);
1129
- this.signingKey = result.signingKey;
1130
- this.signingAvailable = true;
1131
- }
1132
- /** Path to this session's chain file in the active directory */
1133
- sessionChainPath() {
1134
- return join4(ACTIVE_DIR, `${this.sessionId}.jsonl`);
1135
- }
1136
- appendToChain(type, data) {
1137
- const record = buildChainRecord(type, this.sessionId, data, this.chainTipHash, this.signingKey);
1138
- ensureDir();
1139
- appendFileSync(this.sessionChainPath(), JSON.stringify(record) + "\n", "utf-8");
1140
- this.chainTipHash = record.hash;
1141
- this.sessionRecordCount++;
1142
- return record;
1143
- }
1144
- };
1328
+ };
1329
+ });
1145
1330
  }
1146
1331
  });
1147
1332
 
1148
- // src/register-tools.ts
1149
- import { z as z2 } from "zod";
1150
- import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
1151
- import { existsSync as existsSync7, renameSync as renameSync2 } from "fs";
1152
- import { join as join5 } from "path";
1153
- function getConfig() {
1154
- return readJson(CONFIG_FILE, {
1155
- milestone_tracking: true,
1156
- auto_sync: true
1157
- });
1158
- }
1159
- function getSessions() {
1160
- return readJson(SESSIONS_FILE, []);
1161
- }
1162
- function getMilestones() {
1163
- return readJson(MILESTONES_FILE, []);
1164
- }
1165
- function resolveClient(server2, session2) {
1166
- if (session2.clientName !== "unknown") return;
1167
- const clientInfo = server2.server.getClientVersion();
1168
- if (clientInfo?.name) {
1169
- session2.setClient(normalizeMcpClientName(clientInfo.name));
1333
+ // src/setup.ts
1334
+ var setup_exports = {};
1335
+ __export(setup_exports, {
1336
+ runSetup: () => runSetup
1337
+ });
1338
+ import { checkbox } from "@inquirer/prompts";
1339
+ import chalk from "chalk";
1340
+ import { createSetupRunner } from "@devness/mcp-setup";
1341
+ async function daemonInstallFlow(tools, explicit) {
1342
+ console.log(chalk.dim(" Ensuring UseAI daemon is running..."));
1343
+ const daemonOk = await ensureDaemon();
1344
+ let useDaemon = true;
1345
+ if (daemonOk) {
1346
+ console.log(chalk.green(` \u2713 Daemon running on port ${DAEMON_PORT}`));
1347
+ } else {
1348
+ useDaemon = false;
1349
+ console.log(chalk.red(` \u2717 Could not start daemon \u2014 falling back to stdio config`));
1350
+ console.log(chalk.dim(` (Run with --foreground to debug: npx @devness/useai daemon --port ${DAEMON_PORT})`));
1351
+ }
1352
+ if (useDaemon) {
1353
+ const platform = detectPlatform();
1354
+ if (platform !== "unsupported") {
1355
+ try {
1356
+ installAutostart();
1357
+ console.log(chalk.green(` \u2713 Auto-start service installed (${platform})`));
1358
+ } catch {
1359
+ console.log(chalk.yellow(` \u26A0 Could not install auto-start service`));
1360
+ }
1361
+ }
1362
+ }
1363
+ const targetTools = explicit ? tools : tools.filter((t) => t.detect());
1364
+ if (targetTools.length === 0) {
1365
+ console.log(chalk.red("\n No AI tools detected on this machine."));
1170
1366
  return;
1171
1367
  }
1172
- session2.setClient(detectClient());
1368
+ let configuredCount = 0;
1369
+ console.log();
1370
+ for (const tool of targetTools) {
1371
+ try {
1372
+ if (useDaemon && tool.supportsUrl) {
1373
+ tool.installHttp();
1374
+ console.log(chalk.green(` \u2713 ${tool.name.padEnd(18)} \u2192 ${chalk.dim("HTTP (daemon)")}`));
1375
+ } else if (useDaemon && !tool.supportsUrl) {
1376
+ tool.install();
1377
+ console.log(chalk.green(` \u2713 ${tool.name.padEnd(18)} \u2192 ${chalk.dim("stdio (no URL support)")}`));
1378
+ } else {
1379
+ tool.install();
1380
+ console.log(chalk.green(` \u2713 ${tool.name.padEnd(18)} \u2192 ${chalk.dim("stdio")}`));
1381
+ }
1382
+ configuredCount++;
1383
+ } catch (e) {
1384
+ console.log(chalk.red(` \u2717 ${tool.name.padEnd(18)} \u2014 ${e.message}`));
1385
+ }
1386
+ }
1387
+ try {
1388
+ const hooksInstalled = installClaudeCodeHooks();
1389
+ if (hooksInstalled) {
1390
+ console.log(chalk.green(" \u2713 Claude Code hooks installed (UserPromptSubmit + Stop + SessionEnd)"));
1391
+ }
1392
+ } catch {
1393
+ console.log(chalk.yellow(" \u26A0 Could not install Claude Code hooks"));
1394
+ }
1395
+ const mode = useDaemon ? "daemon mode" : "stdio mode";
1396
+ console.log(`
1397
+ Done! UseAI configured in ${chalk.bold(String(configuredCount))} tool${configuredCount === 1 ? "" : "s"} (${mode}).
1398
+ `);
1173
1399
  }
1174
- function registerTools(server2, session2) {
1175
- server2.tool(
1176
- "useai_start",
1177
- "Start tracking an AI coding session. Call this at the beginning of every response.",
1178
- {
1179
- task_type: z2.enum(["coding", "debugging", "testing", "planning", "reviewing", "documenting", "learning", "other"]).optional().describe("What kind of task is the developer working on?")
1180
- },
1181
- async ({ task_type }) => {
1182
- session2.reset();
1183
- resolveClient(server2, session2);
1184
- session2.setTaskType(task_type ?? "coding");
1185
- const record = session2.appendToChain("session_start", {
1186
- client: session2.clientName,
1187
- task_type: session2.sessionTaskType,
1188
- project: session2.project,
1189
- version: VERSION
1190
- });
1191
- return {
1192
- content: [
1193
- {
1194
- type: "text",
1195
- text: `useai session started \u2014 ${session2.sessionTaskType} on ${session2.clientName} \xB7 ${session2.sessionId.slice(0, 8)} \xB7 ${session2.signingAvailable ? "signed" : "unsigned"}`
1196
- }
1197
- ]
1198
- };
1199
- }
1200
- );
1201
- server2.tool(
1202
- "useai_heartbeat",
1203
- "Record a heartbeat for the current AI coding session. Call this periodically during long conversations (every 10-15 minutes).",
1204
- {},
1205
- async () => {
1206
- session2.incrementHeartbeat();
1207
- session2.appendToChain("heartbeat", {
1208
- heartbeat_number: session2.heartbeatCount,
1209
- cumulative_seconds: session2.getSessionDuration()
1210
- });
1211
- return {
1212
- content: [
1213
- {
1214
- type: "text",
1215
- text: `Heartbeat recorded. Session active for ${formatDuration(session2.getSessionDuration())}.`
1216
- }
1217
- ]
1218
- };
1219
- }
1220
- );
1221
- server2.tool(
1222
- "useai_end",
1223
- `End the current AI coding session and record milestones. Each milestone needs TWO titles: (1) a generic public "title" safe for public display (NEVER include project names, file names, class names, or any identifying details), and (2) an optional detailed "private_title" for the user's own records that CAN include project names, file names, and specific details. GOOD title: "Implemented user authentication". GOOD private_title: "Added JWT auth to UseAI API server". BAD title: "Fixed bug in Acme auth service".`,
1224
- {
1225
- task_type: z2.enum(["coding", "debugging", "testing", "planning", "reviewing", "documenting", "learning", "other"]).optional().describe("What kind of task was the developer working on?"),
1226
- languages: z2.array(z2.string()).optional().describe("Programming languages used (e.g. ['typescript', 'python'])"),
1227
- files_touched_count: z2.number().optional().describe("Approximate number of files created or modified (count only, no names)"),
1228
- milestones: z2.array(z2.object({
1229
- title: z2.string().describe("PRIVACY-CRITICAL: Generic description of what was accomplished. NEVER include project names, repo names, product names, package names, file names, file paths, class names, API endpoints, database names, company names, or ANY identifier that could reveal which codebase this work was done in. Write as if describing the work to a stranger. GOOD: 'Implemented user authentication', 'Fixed race condition in background worker', 'Added unit tests for data validation', 'Refactored state management layer'. BAD: 'Fixed bug in Acme auth', 'Investigated ProjectX pipeline', 'Updated UserService.ts in src/services/', 'Added tests for coverit MCP tool'"),
1230
- private_title: z2.string().optional().describe("Detailed description for the user's private records. CAN include project names, file names, and specific details. Example: 'Added private/public milestone support to UseAI MCP server'"),
1231
- category: z2.enum(["feature", "bugfix", "refactor", "test", "docs", "setup", "deployment", "other"]).describe("Type of work completed"),
1232
- complexity: z2.enum(["simple", "medium", "complex"]).optional().describe("How complex was this task?")
1233
- })).optional().describe("What was accomplished this session? List each distinct piece of work completed. Provide both a generic public title and an optional detailed private_title.")
1234
- },
1235
- async ({ task_type, languages, files_touched_count, milestones: milestonesInput }) => {
1236
- const duration = session2.getSessionDuration();
1237
- const now = (/* @__PURE__ */ new Date()).toISOString();
1238
- const finalTaskType = task_type ?? session2.sessionTaskType;
1239
- const chainStartHash = session2.chainTipHash === "GENESIS" ? "GENESIS" : session2.chainTipHash;
1240
- const endRecord = session2.appendToChain("session_end", {
1241
- duration_seconds: duration,
1242
- task_type: finalTaskType,
1243
- languages: languages ?? [],
1244
- files_touched: files_touched_count ?? 0,
1245
- heartbeat_count: session2.heartbeatCount
1246
- });
1247
- const sealData = JSON.stringify({
1248
- session_id: session2.sessionId,
1249
- client: session2.clientName,
1250
- task_type: finalTaskType,
1251
- languages: languages ?? [],
1252
- files_touched: files_touched_count ?? 0,
1253
- project: session2.project,
1254
- started_at: new Date(session2.sessionStartTime).toISOString(),
1255
- ended_at: now,
1256
- duration_seconds: duration,
1257
- heartbeat_count: session2.heartbeatCount,
1258
- record_count: session2.sessionRecordCount,
1259
- chain_end_hash: endRecord.hash
1260
- });
1261
- const sealSignature = signHash(
1262
- createHash3("sha256").update(sealData).digest("hex"),
1263
- session2.signingKey
1264
- );
1265
- session2.appendToChain("session_seal", {
1266
- seal: sealData,
1267
- seal_signature: sealSignature
1268
- });
1269
- const activePath = join5(ACTIVE_DIR, `${session2.sessionId}.jsonl`);
1270
- const sealedPath = join5(SEALED_DIR, `${session2.sessionId}.jsonl`);
1400
+ async function fullRemoveFlow(tools, autoYes, explicit) {
1401
+ if (explicit) {
1402
+ const toRemove = tools.filter((t) => {
1271
1403
  try {
1272
- if (existsSync7(activePath)) {
1273
- renameSync2(activePath, sealedPath);
1274
- }
1404
+ return t.isConfigured();
1275
1405
  } catch {
1406
+ return false;
1276
1407
  }
1277
- const seal = {
1278
- session_id: session2.sessionId,
1279
- client: session2.clientName,
1280
- task_type: finalTaskType,
1281
- languages: languages ?? [],
1282
- files_touched: files_touched_count ?? 0,
1283
- project: session2.project ?? void 0,
1284
- started_at: new Date(session2.sessionStartTime).toISOString(),
1285
- ended_at: now,
1286
- duration_seconds: duration,
1287
- heartbeat_count: session2.heartbeatCount,
1288
- record_count: session2.sessionRecordCount,
1289
- chain_start_hash: chainStartHash,
1290
- chain_end_hash: endRecord.hash,
1291
- seal_signature: sealSignature
1292
- };
1293
- const sessions2 = getSessions();
1294
- sessions2.push(seal);
1295
- writeJson(SESSIONS_FILE, sessions2);
1296
- let milestoneCount = 0;
1297
- if (milestonesInput && milestonesInput.length > 0) {
1298
- const config = getConfig();
1299
- if (config.milestone_tracking) {
1300
- const durationMinutes = Math.round(duration / 60);
1301
- const allMilestones = getMilestones();
1302
- for (const m of milestonesInput) {
1303
- const record = session2.appendToChain("milestone", {
1304
- title: m.title,
1305
- private_title: m.private_title,
1306
- category: m.category,
1307
- complexity: m.complexity ?? "medium",
1308
- duration_minutes: durationMinutes,
1309
- languages: languages ?? []
1310
- });
1311
- const milestone = {
1312
- id: `m_${randomUUID3().slice(0, 8)}`,
1313
- session_id: session2.sessionId,
1314
- title: m.title,
1315
- private_title: m.private_title,
1316
- project: session2.project ?? void 0,
1317
- category: m.category,
1318
- complexity: m.complexity ?? "medium",
1319
- duration_minutes: durationMinutes,
1320
- languages: languages ?? [],
1321
- client: session2.clientName,
1322
- created_at: (/* @__PURE__ */ new Date()).toISOString(),
1323
- published: false,
1324
- published_at: null,
1325
- chain_hash: record.hash
1326
- };
1327
- allMilestones.push(milestone);
1328
- milestoneCount++;
1329
- }
1330
- writeJson(MILESTONES_FILE, allMilestones);
1331
- }
1332
- }
1333
- const durationStr = formatDuration(duration);
1334
- const langStr = languages && languages.length > 0 ? ` using ${languages.join(", ")}` : "";
1335
- const milestoneStr = milestoneCount > 0 ? ` \xB7 ${milestoneCount} milestone${milestoneCount > 1 ? "s" : ""} recorded` : "";
1336
- return {
1337
- content: [
1338
- {
1339
- type: "text",
1340
- text: `Session ended: ${durationStr} ${finalTaskType}${langStr}${milestoneStr}`
1341
- }
1342
- ]
1343
- };
1344
- }
1345
- );
1346
- }
1347
- var init_register_tools = __esm({
1348
- "src/register-tools.ts"() {
1349
- "use strict";
1350
- init_dist();
1351
- }
1352
- });
1353
-
1354
- // src/tools.ts
1355
- import { execSync as execSync3 } from "child_process";
1356
- import { existsSync as existsSync8, readFileSync as readFileSync4, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4, unlinkSync as unlinkSync4 } from "fs";
1357
- import { dirname as dirname2, join as join6 } from "path";
1358
- import { homedir as homedir4 } from "os";
1359
- import { parse as parseToml, stringify as stringifyToml } from "smol-toml";
1360
- import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
1361
- function installStandardHttp(configPath) {
1362
- const config = readJsonFile(configPath);
1363
- const servers = config["mcpServers"] ?? {};
1364
- delete servers["useai"];
1365
- servers["UseAI"] = { ...MCP_HTTP_ENTRY };
1366
- config["mcpServers"] = servers;
1367
- writeJsonFile(configPath, config);
1368
- }
1369
- function installVscodeHttp(configPath) {
1370
- const config = readJsonFile(configPath);
1371
- const servers = config["servers"] ?? {};
1372
- delete servers["useai"];
1373
- servers["UseAI"] = { type: "http", url: MCP_HTTP_URL };
1374
- config["servers"] = servers;
1375
- writeJsonFile(configPath, config);
1376
- }
1377
- function hasBinary(name) {
1378
- try {
1379
- execSync3(`which ${name}`, { stdio: "ignore" });
1380
- return true;
1381
- } catch {
1382
- return false;
1383
- }
1384
- }
1385
- function readJsonFile(path) {
1386
- if (!existsSync8(path)) return {};
1387
- try {
1388
- const raw = readFileSync4(path, "utf-8").trim();
1389
- if (!raw) return {};
1390
- return JSON.parse(raw);
1391
- } catch {
1392
- return {};
1393
- }
1394
- }
1395
- function writeJsonFile(path, data) {
1396
- mkdirSync4(dirname2(path), { recursive: true });
1397
- writeFileSync4(path, JSON.stringify(data, null, 2) + "\n");
1398
- }
1399
- function isConfiguredStandard(configPath) {
1400
- const config = readJsonFile(configPath);
1401
- const servers = config["mcpServers"];
1402
- return !!servers?.["UseAI"] || !!servers?.["useai"];
1403
- }
1404
- function installStandard(configPath) {
1405
- const config = readJsonFile(configPath);
1406
- const servers = config["mcpServers"] ?? {};
1407
- delete servers["useai"];
1408
- servers["UseAI"] = { ...MCP_ENTRY };
1409
- config["mcpServers"] = servers;
1410
- writeJsonFile(configPath, config);
1411
- }
1412
- function removeStandard(configPath) {
1413
- const config = readJsonFile(configPath);
1414
- const servers = config["mcpServers"];
1415
- if (servers) {
1416
- delete servers["UseAI"];
1417
- delete servers["useai"];
1418
- if (Object.keys(servers).length === 0) {
1419
- delete config["mcpServers"];
1420
- }
1421
- writeJsonFile(configPath, config);
1422
- }
1423
- }
1424
- function isConfiguredVscode(configPath) {
1425
- const config = readJsonFile(configPath);
1426
- const servers = config["servers"];
1427
- return !!servers?.["UseAI"] || !!servers?.["useai"];
1428
- }
1429
- function installVscode(configPath) {
1430
- const config = readJsonFile(configPath);
1431
- const servers = config["servers"] ?? {};
1432
- delete servers["useai"];
1433
- servers["UseAI"] = { command: MCP_ENTRY.command, args: MCP_ENTRY.args };
1434
- config["servers"] = servers;
1435
- writeJsonFile(configPath, config);
1436
- }
1437
- function removeVscode(configPath) {
1438
- const config = readJsonFile(configPath);
1439
- const servers = config["servers"];
1440
- if (servers) {
1441
- delete servers["UseAI"];
1442
- delete servers["useai"];
1443
- if (Object.keys(servers).length === 0) {
1444
- delete config["servers"];
1445
- }
1446
- writeJsonFile(configPath, config);
1447
- }
1448
- }
1449
- function isConfiguredZed(configPath) {
1450
- const config = readJsonFile(configPath);
1451
- const servers = config["context_servers"];
1452
- return !!servers?.["UseAI"] || !!servers?.["useai"];
1453
- }
1454
- function installZed(configPath) {
1455
- const config = readJsonFile(configPath);
1456
- const servers = config["context_servers"] ?? {};
1457
- delete servers["useai"];
1458
- servers["UseAI"] = {
1459
- command: { path: MCP_ENTRY.command, args: MCP_ENTRY.args },
1460
- settings: {}
1461
- };
1462
- config["context_servers"] = servers;
1463
- writeJsonFile(configPath, config);
1464
- }
1465
- function removeZed(configPath) {
1466
- const config = readJsonFile(configPath);
1467
- const servers = config["context_servers"];
1468
- if (servers) {
1469
- delete servers["UseAI"];
1470
- delete servers["useai"];
1471
- if (Object.keys(servers).length === 0) {
1472
- delete config["context_servers"];
1473
- }
1474
- writeJsonFile(configPath, config);
1475
- }
1476
- }
1477
- function readTomlFile(path) {
1478
- if (!existsSync8(path)) return {};
1479
- try {
1480
- const raw = readFileSync4(path, "utf-8").trim();
1481
- if (!raw) return {};
1482
- return parseToml(raw);
1483
- } catch {
1484
- return {};
1485
- }
1486
- }
1487
- function writeTomlFile(path, data) {
1488
- mkdirSync4(dirname2(path), { recursive: true });
1489
- writeFileSync4(path, stringifyToml(data) + "\n");
1490
- }
1491
- function isConfiguredToml(configPath) {
1492
- const config = readTomlFile(configPath);
1493
- const servers = config["mcp_servers"];
1494
- return !!servers?.["UseAI"] || !!servers?.["useai"];
1495
- }
1496
- function installToml(configPath) {
1497
- const config = readTomlFile(configPath);
1498
- const servers = config["mcp_servers"] ?? {};
1499
- delete servers["useai"];
1500
- servers["UseAI"] = { command: MCP_ENTRY.command, args: MCP_ENTRY.args };
1501
- config["mcp_servers"] = servers;
1502
- writeTomlFile(configPath, config);
1503
- }
1504
- function removeToml(configPath) {
1505
- const config = readTomlFile(configPath);
1506
- const servers = config["mcp_servers"];
1507
- if (servers) {
1508
- delete servers["UseAI"];
1509
- delete servers["useai"];
1510
- if (Object.keys(servers).length === 0) {
1511
- delete config["mcp_servers"];
1512
- }
1513
- writeTomlFile(configPath, config);
1514
- }
1515
- }
1516
- function readYamlFile(path) {
1517
- if (!existsSync8(path)) return {};
1518
- try {
1519
- const raw = readFileSync4(path, "utf-8").trim();
1520
- if (!raw) return {};
1521
- return parseYaml(raw) ?? {};
1522
- } catch {
1523
- return {};
1524
- }
1525
- }
1526
- function writeYamlFile(path, data) {
1527
- mkdirSync4(dirname2(path), { recursive: true });
1528
- writeFileSync4(path, stringifyYaml(data));
1529
- }
1530
- function isConfiguredYaml(configPath) {
1531
- const config = readYamlFile(configPath);
1532
- const extensions = config["extensions"];
1533
- return !!extensions?.["UseAI"] || !!extensions?.["useai"];
1534
- }
1535
- function installYaml(configPath) {
1536
- const config = readYamlFile(configPath);
1537
- const extensions = config["extensions"] ?? {};
1538
- delete extensions["useai"];
1539
- extensions["UseAI"] = {
1540
- name: "UseAI",
1541
- cmd: MCP_ENTRY.command,
1542
- args: MCP_ENTRY.args,
1543
- enabled: true,
1544
- type: "stdio"
1545
- };
1546
- config["extensions"] = extensions;
1547
- writeYamlFile(configPath, config);
1548
- }
1549
- function removeYaml(configPath) {
1550
- const config = readYamlFile(configPath);
1551
- const extensions = config["extensions"];
1552
- if (extensions) {
1553
- delete extensions["UseAI"];
1554
- delete extensions["useai"];
1555
- if (Object.keys(extensions).length === 0) {
1556
- delete config["extensions"];
1557
- }
1558
- writeYamlFile(configPath, config);
1559
- }
1560
- }
1561
- function hasInstructionsBlock(filePath) {
1562
- if (!existsSync8(filePath)) return false;
1563
- try {
1564
- return readFileSync4(filePath, "utf-8").includes(INSTRUCTIONS_START);
1565
- } catch {
1566
- return false;
1567
- }
1568
- }
1569
- function injectInstructions(config) {
1570
- mkdirSync4(dirname2(config.path), { recursive: true });
1571
- if (config.method === "create") {
1572
- writeFileSync4(config.path, USEAI_INSTRUCTIONS + "\n");
1573
- return;
1574
- }
1575
- let existing = "";
1576
- if (existsSync8(config.path)) {
1577
- existing = readFileSync4(config.path, "utf-8");
1578
- }
1579
- if (hasInstructionsBlock(config.path)) {
1580
- const pattern = new RegExp(
1581
- `${INSTRUCTIONS_START}[\\s\\S]*?${INSTRUCTIONS_END}`
1582
- );
1583
- writeFileSync4(config.path, existing.replace(pattern, USEAI_INSTRUCTIONS_BLOCK));
1584
- return;
1585
- }
1586
- const separator = existing && !existing.endsWith("\n") ? "\n\n" : existing ? "\n" : "";
1587
- writeFileSync4(config.path, existing + separator + USEAI_INSTRUCTIONS_BLOCK + "\n");
1588
- }
1589
- function removeInstructions(config) {
1590
- if (config.method === "create") {
1591
- if (existsSync8(config.path)) {
1408
+ });
1409
+ const notConfigured = tools.filter((t) => {
1592
1410
  try {
1593
- unlinkSync4(config.path);
1411
+ return !t.isConfigured();
1594
1412
  } catch {
1413
+ return true;
1595
1414
  }
1415
+ });
1416
+ for (const tool of notConfigured) {
1417
+ console.log(chalk.dim(` ${tool.name} is not configured \u2014 skipping.`));
1596
1418
  }
1597
- return;
1598
- }
1599
- if (!existsSync8(config.path)) return;
1600
- try {
1601
- const content = readFileSync4(config.path, "utf-8");
1602
- const escaped = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1603
- const regex = new RegExp(
1604
- `\\n?${escaped(INSTRUCTIONS_START)}[\\s\\S]*?${escaped(INSTRUCTIONS_END)}\\n?`
1605
- );
1606
- const cleaned = content.replace(regex, "").trim();
1607
- if (cleaned) {
1608
- writeFileSync4(config.path, cleaned + "\n");
1609
- } else {
1610
- unlinkSync4(config.path);
1611
- }
1612
- } catch {
1613
- }
1614
- }
1615
- function createTool(def) {
1616
- const handler = formatHandlers[def.configFormat];
1617
- const urlSupported = def.supportsUrl ?? false;
1618
- return {
1619
- id: def.id,
1620
- name: def.name,
1621
- configFormat: def.configFormat,
1622
- supportsUrl: urlSupported,
1623
- getConfigPath: () => def.configPath,
1624
- detect: def.detect,
1625
- isConfigured: () => handler.isConfigured(def.configPath),
1626
- install: () => {
1627
- handler.install(def.configPath);
1628
- if (def.instructions) injectInstructions(def.instructions);
1629
- },
1630
- installHttp: () => {
1631
- if (def.configFormat === "vscode") {
1632
- installVscodeHttp(def.configPath);
1633
- } else if (def.configFormat === "standard") {
1634
- installStandardHttp(def.configPath);
1635
- } else {
1636
- handler.install(def.configPath);
1637
- }
1638
- if (def.instructions) injectInstructions(def.instructions);
1639
- },
1640
- remove: () => {
1641
- handler.remove(def.configPath);
1642
- if (def.instructions) removeInstructions(def.instructions);
1643
- },
1644
- getManualHint: () => def.instructions ? null : def.manualHint ?? null
1645
- };
1646
- }
1647
- function matchesTool(tool, query) {
1648
- const q = query.toLowerCase().replace(/[\s-_]+/g, "");
1649
- const id = tool.id.toLowerCase().replace(/[\s-_]+/g, "");
1650
- const name = tool.name.toLowerCase().replace(/[\s-_]+/g, "");
1651
- return id === q || name === q || id.includes(q) || name.includes(q);
1652
- }
1653
- function resolveTools(names) {
1654
- const matched = [];
1655
- const unmatched = [];
1656
- for (const name of names) {
1657
- const found = AI_TOOLS.filter((t) => matchesTool(t, name));
1658
- if (found.length > 0) {
1659
- for (const f of found) {
1660
- if (!matched.includes(f)) matched.push(f);
1419
+ if (toRemove.length > 0) {
1420
+ console.log();
1421
+ for (const tool of toRemove) {
1422
+ try {
1423
+ tool.remove();
1424
+ console.log(chalk.green(` \u2713 Removed from ${tool.name}`));
1425
+ } catch (e) {
1426
+ console.log(chalk.red(` \u2717 ${tool.name} \u2014 ${e.message}`));
1427
+ }
1661
1428
  }
1662
- } else {
1663
- unmatched.push(name);
1664
1429
  }
1665
- }
1666
- return { matched, unmatched };
1667
- }
1668
- var USEAI_INSTRUCTIONS_TEXT, MCP_ENTRY, MCP_HTTP_URL, MCP_HTTP_ENTRY, home, INSTRUCTIONS_START, INSTRUCTIONS_END, USEAI_INSTRUCTIONS, USEAI_INSTRUCTIONS_BLOCK, formatHandlers, appSupport, AI_TOOLS;
1669
- var init_tools = __esm({
1670
- "src/tools.ts"() {
1671
- "use strict";
1672
- init_dist();
1673
- USEAI_INSTRUCTIONS_TEXT = [
1674
- "## UseAI Session Tracking",
1675
- "- At the START of every response, call `useai_start` with the appropriate task_type.",
1676
- "- For LONG sessions (15+ min), call `useai_heartbeat` periodically.",
1677
- "- At the END of every response, call `useai_end` with languages used, files_touched_count, and milestones (generic descriptions only \u2014 no project names, file paths, or company names)."
1678
- ].join("\n");
1679
- MCP_ENTRY = {
1680
- command: "npx",
1681
- args: ["-y", "@devness/useai"]
1682
- };
1683
- MCP_HTTP_URL = DAEMON_MCP_URL;
1684
- MCP_HTTP_ENTRY = { type: "http", url: MCP_HTTP_URL };
1685
- home = homedir4();
1686
- INSTRUCTIONS_START = "<!-- useai:start -->";
1687
- INSTRUCTIONS_END = "<!-- useai:end -->";
1688
- USEAI_INSTRUCTIONS = [
1689
- "## UseAI Session Tracking",
1690
- "- At the START of every response, call `useai_start` with the appropriate task_type.",
1691
- "- For LONG sessions (15+ min), call `useai_heartbeat` periodically.",
1692
- "- At the END of every response, call `useai_end` with languages used, files_touched_count, and milestones (generic descriptions only \u2014 no project names, file paths, or company names)."
1693
- ].join("\n");
1694
- USEAI_INSTRUCTIONS_BLOCK = `${INSTRUCTIONS_START}
1695
- ${USEAI_INSTRUCTIONS}
1696
- ${INSTRUCTIONS_END}`;
1697
- formatHandlers = {
1698
- standard: { isConfigured: isConfiguredStandard, install: installStandard, remove: removeStandard },
1699
- vscode: { isConfigured: isConfiguredVscode, install: installVscode, remove: removeVscode },
1700
- zed: { isConfigured: isConfiguredZed, install: installZed, remove: removeZed },
1701
- toml: { isConfigured: isConfiguredToml, install: installToml, remove: removeToml },
1702
- yaml: { isConfigured: isConfiguredYaml, install: installYaml, remove: removeYaml }
1703
- };
1704
- appSupport = join6(home, "Library", "Application Support");
1705
- AI_TOOLS = [
1706
- createTool({
1707
- id: "claude-code",
1708
- name: "Claude Code",
1709
- configFormat: "standard",
1710
- configPath: join6(home, ".claude.json"),
1711
- detect: () => hasBinary("claude") || existsSync8(join6(home, ".claude.json")),
1712
- instructions: { method: "append", path: join6(home, ".claude", "CLAUDE.md") },
1713
- supportsUrl: true
1714
- }),
1715
- createTool({
1716
- id: "cursor",
1717
- name: "Cursor",
1718
- configFormat: "standard",
1719
- configPath: join6(home, ".cursor", "mcp.json"),
1720
- detect: () => existsSync8(join6(home, ".cursor")),
1721
- manualHint: "Open Cursor Settings \u2192 Rules \u2192 User Rules and paste the instructions below.",
1722
- supportsUrl: true
1723
- }),
1724
- createTool({
1725
- id: "windsurf",
1726
- name: "Windsurf",
1727
- configFormat: "standard",
1728
- configPath: join6(home, ".codeium", "windsurf", "mcp_config.json"),
1729
- detect: () => existsSync8(join6(home, ".codeium", "windsurf")),
1730
- instructions: { method: "append", path: join6(home, ".codeium", "windsurf", "memories", "global_rules.md") },
1731
- supportsUrl: true
1732
- }),
1733
- createTool({
1734
- id: "vscode",
1735
- name: "VS Code",
1736
- configFormat: "vscode",
1737
- configPath: join6(appSupport, "Code", "User", "mcp.json"),
1738
- detect: () => existsSync8(join6(appSupport, "Code")),
1739
- instructions: { method: "create", path: join6(appSupport, "Code", "User", "prompts", "useai.instructions.md") },
1740
- supportsUrl: true
1741
- }),
1742
- createTool({
1743
- id: "vscode-insiders",
1744
- name: "VS Code Insiders",
1745
- configFormat: "vscode",
1746
- configPath: join6(appSupport, "Code - Insiders", "User", "mcp.json"),
1747
- detect: () => existsSync8(join6(appSupport, "Code - Insiders")),
1748
- instructions: { method: "create", path: join6(appSupport, "Code - Insiders", "User", "prompts", "useai.instructions.md") },
1749
- supportsUrl: true
1750
- }),
1751
- createTool({
1752
- id: "gemini-cli",
1753
- name: "Gemini CLI",
1754
- configFormat: "standard",
1755
- configPath: join6(home, ".gemini", "settings.json"),
1756
- detect: () => hasBinary("gemini"),
1757
- instructions: { method: "append", path: join6(home, ".gemini", "GEMINI.md") },
1758
- supportsUrl: true
1759
- }),
1760
- createTool({
1761
- id: "zed",
1762
- name: "Zed",
1763
- configFormat: "zed",
1764
- configPath: join6(appSupport, "Zed", "settings.json"),
1765
- detect: () => existsSync8(join6(appSupport, "Zed")),
1766
- manualHint: "Open Rules Library (\u2318\u2325L) \u2192 click + \u2192 paste the instructions below."
1767
- }),
1768
- createTool({
1769
- id: "cline",
1770
- name: "Cline",
1771
- configFormat: "standard",
1772
- configPath: join6(
1773
- appSupport,
1774
- "Code",
1775
- "User",
1776
- "globalStorage",
1777
- "saoudrizwan.claude-dev",
1778
- "settings",
1779
- "cline_mcp_settings.json"
1780
- ),
1781
- detect: () => existsSync8(
1782
- join6(appSupport, "Code", "User", "globalStorage", "saoudrizwan.claude-dev")
1783
- ),
1784
- instructions: { method: "create", path: join6(home, "Documents", "Cline", "Rules", "useai.md") },
1785
- supportsUrl: true
1786
- }),
1787
- createTool({
1788
- id: "roo-code",
1789
- name: "Roo Code",
1790
- configFormat: "standard",
1791
- configPath: join6(
1792
- appSupport,
1793
- "Code",
1794
- "User",
1795
- "globalStorage",
1796
- "rooveterinaryinc.roo-cline",
1797
- "settings",
1798
- "cline_mcp_settings.json"
1799
- ),
1800
- detect: () => existsSync8(
1801
- join6(appSupport, "Code", "User", "globalStorage", "rooveterinaryinc.roo-cline")
1802
- ),
1803
- instructions: { method: "create", path: join6(home, ".roo", "rules", "useai.md") },
1804
- supportsUrl: true
1805
- }),
1806
- createTool({
1807
- id: "amazon-q-cli",
1808
- name: "Amazon Q CLI",
1809
- configFormat: "standard",
1810
- configPath: join6(home, ".aws", "amazonq", "mcp.json"),
1811
- detect: () => hasBinary("q") || existsSync8(join6(home, ".aws", "amazonq")),
1812
- manualHint: "Create .amazonq/rules/useai.md in your project root with the instructions below."
1813
- }),
1814
- createTool({
1815
- id: "amazon-q-ide",
1816
- name: "Amazon Q IDE",
1817
- configFormat: "standard",
1818
- configPath: join6(home, ".aws", "amazonq", "default.json"),
1819
- detect: () => existsSync8(join6(home, ".amazonq")) || existsSync8(join6(home, ".aws", "amazonq")),
1820
- manualHint: "Create .amazonq/rules/useai.md in your project root with the instructions below."
1821
- }),
1822
- createTool({
1823
- id: "codex",
1824
- name: "Codex",
1825
- configFormat: "toml",
1826
- configPath: join6(home, ".codex", "config.toml"),
1827
- detect: () => hasBinary("codex") || existsSync8(join6(home, ".codex")) || existsSync8("/Applications/Codex.app"),
1828
- instructions: { method: "append", path: join6(home, ".codex", "AGENTS.md") }
1829
- }),
1830
- createTool({
1831
- id: "goose",
1832
- name: "Goose",
1833
- configFormat: "yaml",
1834
- configPath: join6(home, ".config", "goose", "config.yaml"),
1835
- detect: () => existsSync8(join6(home, ".config", "goose")),
1836
- instructions: { method: "append", path: join6(home, ".config", "goose", ".goosehints") }
1837
- }),
1838
- createTool({
1839
- id: "opencode",
1840
- name: "OpenCode",
1841
- configFormat: "standard",
1842
- configPath: join6(home, ".config", "opencode", "opencode.json"),
1843
- detect: () => hasBinary("opencode") || existsSync8(join6(home, ".config", "opencode")),
1844
- instructions: { method: "append", path: join6(home, ".config", "opencode", "AGENTS.md") },
1845
- supportsUrl: true
1846
- }),
1847
- createTool({
1848
- id: "junie",
1849
- name: "Junie",
1850
- configFormat: "standard",
1851
- configPath: join6(home, ".junie", "mcp", "mcp.json"),
1852
- detect: () => existsSync8(join6(home, ".junie")),
1853
- manualHint: "Add the instructions below to .junie/guidelines.md in your project root."
1854
- })
1855
- ];
1856
- }
1857
- });
1858
-
1859
- // src/setup.ts
1860
- var setup_exports = {};
1861
- __export(setup_exports, {
1862
- runSetup: () => runSetup
1863
- });
1864
- import { checkbox } from "@inquirer/prompts";
1865
- import chalk from "chalk";
1866
- function shortenPath(p) {
1867
- const home2 = process.env["HOME"] ?? "";
1868
- return home2 && p.startsWith(home2) ? p.replace(home2, "~") : p;
1869
- }
1870
- function header(text) {
1871
- return chalk.bold.cyan(`
1872
- ${text}
1873
- ${"\u2500".repeat(text.length)}`);
1874
- }
1875
- function ok(text) {
1876
- return chalk.green(` ${text}`);
1877
- }
1878
- function err(text) {
1879
- return chalk.red(` ${text}`);
1880
- }
1881
- function dim(text) {
1882
- return chalk.dim(` ${text}`);
1883
- }
1884
- function showManualHints(installedTools) {
1885
- const hints = installedTools.map((t) => ({ name: t.name, hint: t.getManualHint() })).filter((h) => h.hint !== null);
1886
- if (hints.length === 0) return;
1887
- console.log(chalk.yellow(`
1888
- \u26A0 Manual setup needed for ${hints.length} tool${hints.length === 1 ? "" : "s"}:
1889
- `));
1890
- for (const { name, hint } of hints) {
1891
- console.log(` ${chalk.bold(name)}: ${hint}`);
1892
- }
1893
- console.log(chalk.dim("\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
1894
- for (const line of USEAI_INSTRUCTIONS_TEXT.split("\n")) {
1895
- console.log(chalk.dim(" \u2502 ") + line);
1896
- }
1897
- console.log(chalk.dim(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"));
1898
- }
1899
- function showStatus(tools) {
1900
- console.log(header("AI Tool MCP Status"));
1901
- const rows = [];
1902
- const nameWidth = Math.max(...tools.map((t) => t.name.length));
1903
- const statusWidth = 16;
1904
- for (const tool of tools) {
1905
- const detected = tool.detect();
1906
- const name = tool.name.padEnd(nameWidth);
1907
- if (!detected) {
1908
- rows.push(` ${chalk.dim(name)} ${chalk.dim("\u2014 Not found".padEnd(statusWidth))}`);
1909
- } else if (tool.isConfigured()) {
1910
- rows.push(
1911
- ` ${name} ${chalk.green("\u2713 Configured".padEnd(statusWidth))} ${chalk.dim(shortenPath(tool.getConfigPath()))}`
1912
- );
1913
- } else {
1914
- rows.push(
1915
- ` ${name} ${chalk.yellow("\u2717 Not set up".padEnd(statusWidth))} ${chalk.dim(shortenPath(tool.getConfigPath()))}`
1916
- );
1917
- }
1918
- }
1919
- console.log(rows.join("\n"));
1920
- console.log();
1921
- }
1922
- async function daemonInstallFlow(tools, explicit) {
1923
- console.log(dim("Ensuring UseAI daemon is running..."));
1924
- const daemonOk = await ensureDaemon();
1925
- let useDaemon = true;
1926
- if (daemonOk) {
1927
- console.log(ok(`\u2713 Daemon running on port ${DAEMON_PORT}`));
1928
1430
  } else {
1929
- useDaemon = false;
1930
- console.log(err("\u2717 Could not start daemon \u2014 falling back to stdio config"));
1931
- console.log(dim(`(Run with --foreground to debug: npx @devness/useai daemon --port ${DAEMON_PORT})`));
1932
- }
1933
- if (useDaemon) {
1934
- const platform = detectPlatform();
1935
- if (platform !== "unsupported") {
1431
+ const configured = tools.filter((t) => {
1936
1432
  try {
1937
- installAutostart();
1938
- console.log(ok(`\u2713 Auto-start service installed (${platform})`));
1433
+ return t.isConfigured();
1939
1434
  } catch {
1940
- console.log(chalk.yellow(` \u26A0 Could not install auto-start service`));
1435
+ return false;
1941
1436
  }
1942
- }
1943
- }
1944
- const targetTools = explicit ? tools : tools.filter((t) => t.detect());
1945
- if (targetTools.length === 0) {
1946
- console.log(err("\n No AI tools detected on this machine."));
1947
- return;
1948
- }
1949
- let configuredCount = 0;
1950
- console.log();
1951
- for (const tool of targetTools) {
1952
- try {
1953
- if (useDaemon && tool.supportsUrl) {
1954
- tool.installHttp();
1955
- console.log(ok(`\u2713 ${tool.name.padEnd(18)} \u2192 ${chalk.dim("HTTP (daemon)")}`));
1956
- } else if (useDaemon && !tool.supportsUrl) {
1957
- tool.install();
1958
- console.log(ok(`\u2713 ${tool.name.padEnd(18)} \u2192 ${chalk.dim("stdio (no URL support)")}`));
1437
+ });
1438
+ if (configured.length === 0) {
1439
+ console.log(chalk.dim(" UseAI is not configured in any AI tools."));
1440
+ } else {
1441
+ console.log(`
1442
+ Found UseAI configured in ${chalk.bold(String(configured.length))} tool${configured.length === 1 ? "" : "s"}:
1443
+ `);
1444
+ let toRemove;
1445
+ if (autoYes) {
1446
+ toRemove = configured;
1959
1447
  } else {
1960
- tool.install();
1961
- console.log(ok(`\u2713 ${tool.name.padEnd(18)} \u2192 ${chalk.dim("stdio")}`));
1448
+ let selected;
1449
+ try {
1450
+ selected = await checkbox({
1451
+ message: "Select tools to remove UseAI from:",
1452
+ choices: configured.map((t) => ({
1453
+ name: t.name,
1454
+ value: t.id,
1455
+ checked: true
1456
+ }))
1457
+ });
1458
+ } catch {
1459
+ console.log("\n");
1460
+ return;
1461
+ }
1462
+ toRemove = configured.filter((t) => selected.includes(t.id));
1962
1463
  }
1963
- configuredCount++;
1964
- } catch (e) {
1965
- console.log(err(`\u2717 ${tool.name.padEnd(18)} \u2014 ${e.message}`));
1966
- }
1967
- }
1968
- try {
1969
- const hooksInstalled = installClaudeCodeHooks();
1970
- if (hooksInstalled) {
1971
- console.log(ok("\u2713 Claude Code hooks installed (UserPromptSubmit + Stop + SessionEnd)"));
1972
- }
1973
- } catch {
1974
- console.log(chalk.yellow(" \u26A0 Could not install Claude Code hooks"));
1975
- }
1976
- showManualHints(targetTools);
1977
- const mode = useDaemon ? "daemon mode" : "stdio mode";
1978
- console.log(`
1979
- Done! UseAI configured in ${chalk.bold(String(configuredCount))} tool${configuredCount === 1 ? "" : "s"} (${mode}).
1464
+ if (toRemove.length === 0) {
1465
+ console.log(chalk.dim(" No tools selected."));
1466
+ } else {
1467
+ console.log(`
1468
+ Removing from ${toRemove.length} tool${toRemove.length === 1 ? "" : "s"}...
1980
1469
  `);
1981
- }
1982
- async function stdioInstallFlow(tools, autoYes, explicit) {
1983
- if (explicit) {
1984
- console.log();
1985
- for (const tool of tools) {
1986
- try {
1987
- const wasConfigured = tool.isConfigured();
1988
- tool.install();
1989
- if (wasConfigured) {
1990
- console.log(ok(`\u2713 ${tool.name.padEnd(18)} ${chalk.dim("(updated)")}`));
1991
- } else {
1992
- console.log(ok(`\u2713 ${tool.name.padEnd(18)} \u2192 ${chalk.dim(shortenPath(tool.getConfigPath()))}`));
1470
+ for (const tool of toRemove) {
1471
+ try {
1472
+ tool.remove();
1473
+ console.log(chalk.green(` \u2713 Removed from ${tool.name}`));
1474
+ } catch (e) {
1475
+ console.log(chalk.red(` \u2717 ${tool.name} \u2014 ${e.message}`));
1476
+ }
1993
1477
  }
1994
- } catch (e) {
1995
- console.log(err(`\u2717 ${tool.name.padEnd(18)} \u2014 ${e.message}`));
1996
1478
  }
1997
1479
  }
1998
- showManualHints(tools);
1999
- console.log();
2000
- return;
2001
- }
2002
- console.log(dim("Scanning for AI tools...\n"));
2003
- const detected = tools.filter((t) => t.detect());
2004
- if (detected.length === 0) {
2005
- console.log(err("No AI tools detected on this machine."));
2006
- return;
2007
- }
2008
- const alreadyConfigured = detected.filter((t) => t.isConfigured());
2009
- const unconfigured = detected.filter((t) => !t.isConfigured());
2010
- console.log(` Found ${chalk.bold(String(detected.length))} AI tool${detected.length === 1 ? "" : "s"} on this machine:
2011
- `);
2012
- for (const tool of alreadyConfigured) {
2013
- console.log(chalk.green(` \u2705 ${tool.name}`) + chalk.dim(" (already configured)"));
2014
1480
  }
2015
- for (const tool of unconfigured) {
2016
- console.log(chalk.dim(` \u2610 ${tool.name}`));
1481
+ try {
1482
+ removeClaudeCodeHooks();
1483
+ console.log(chalk.green(" \u2713 Claude Code hooks removed"));
1484
+ } catch {
2017
1485
  }
2018
1486
  console.log();
2019
- if (unconfigured.length === 0) {
2020
- console.log(ok("All detected tools are already configured."));
2021
- return;
1487
+ try {
1488
+ await killDaemon();
1489
+ console.log(chalk.green(" \u2713 Daemon stopped"));
1490
+ } catch {
1491
+ console.log(chalk.dim(" Daemon was not running"));
2022
1492
  }
2023
- let toInstall;
2024
- if (autoYes) {
2025
- toInstall = unconfigured;
2026
- } else {
2027
- let selected;
1493
+ if (isAutostartInstalled()) {
2028
1494
  try {
2029
- selected = await checkbox({
2030
- message: "Select tools to configure:",
2031
- choices: unconfigured.map((t) => ({
2032
- name: t.name,
2033
- value: t.id,
2034
- checked: true
2035
- }))
2036
- });
1495
+ removeAutostart();
1496
+ console.log(chalk.green(" \u2713 Auto-start service removed"));
2037
1497
  } catch {
2038
- console.log("\n");
2039
- return;
1498
+ console.log(chalk.red(" \u2717 Failed to remove auto-start service"));
2040
1499
  }
2041
- toInstall = unconfigured.filter((t) => selected.includes(t.id));
2042
- }
2043
- if (toInstall.length === 0) {
2044
- console.log(dim("No tools selected."));
2045
- return;
2046
1500
  }
1501
+ console.log(chalk.dim("\nDone! UseAI fully removed.\n"));
1502
+ }
1503
+ function showHelp() {
2047
1504
  console.log(`
2048
- Configuring ${toInstall.length} tool${toInstall.length === 1 ? "" : "s"}...
1505
+ ${chalk.bold("Usage:")} npx @devness/useai mcp [tools...] [options]
1506
+
1507
+ Configure UseAI MCP server in your AI tools.
1508
+ Default: starts daemon, installs auto-start, configures tools with HTTP.
1509
+
1510
+ ${chalk.bold("Arguments:")}
1511
+ tools Specific tool names (e.g. codex cursor vscode)
1512
+
1513
+ ${chalk.bold("Options:")}
1514
+ --stdio Use stdio config (legacy mode for containers/CI)
1515
+ --remove Remove UseAI from configured tools, stop daemon, remove auto-start
1516
+ --status Show configuration status without modifying
1517
+ -y, --yes Skip confirmation, auto-select all detected tools
1518
+ -h, --help Show this help message
2049
1519
  `);
2050
- for (const tool of toInstall) {
2051
- try {
2052
- tool.install();
2053
- console.log(ok(`\u2713 ${tool.name.padEnd(18)} \u2192 ${chalk.dim(shortenPath(tool.getConfigPath()))}`));
2054
- } catch (e) {
2055
- console.log(err(`\u2717 ${tool.name.padEnd(18)} \u2014 ${e.message}`));
2056
- }
1520
+ }
1521
+ async function runSetup(args) {
1522
+ const flags = new Set(args.filter((a) => a.startsWith("-")));
1523
+ const toolNames = args.filter((a) => !a.startsWith("-"));
1524
+ if (flags.has("-h") || flags.has("--help")) {
1525
+ showHelp();
1526
+ return;
2057
1527
  }
2058
- for (const tool of alreadyConfigured) {
2059
- try {
2060
- tool.install();
2061
- } catch {
1528
+ const isRemove = flags.has("--remove");
1529
+ const isStatus = flags.has("--status");
1530
+ const isStdio = flags.has("--stdio");
1531
+ const autoYes = flags.has("-y") || flags.has("--yes");
1532
+ const explicit = toolNames.length > 0;
1533
+ let tools = AI_TOOLS;
1534
+ if (explicit) {
1535
+ const { matched, unmatched } = resolveTools(toolNames);
1536
+ if (unmatched.length > 0) {
1537
+ console.log(chalk.red(` Unknown tool${unmatched.length === 1 ? "" : "s"}: ${unmatched.join(", ")}`));
1538
+ console.log(chalk.dim(` Available: ${AI_TOOLS.map((t) => t.id).join(", ")}`));
1539
+ return;
2062
1540
  }
1541
+ tools = matched;
1542
+ }
1543
+ if (isStatus) {
1544
+ shared.showStatus(tools);
1545
+ } else if (isRemove) {
1546
+ await fullRemoveFlow(tools, autoYes, explicit);
1547
+ } else if (isStdio) {
1548
+ await shared.installFlow(tools, autoYes, explicit);
1549
+ } else {
1550
+ await daemonInstallFlow(tools, explicit);
2063
1551
  }
2064
- showManualHints([...toInstall, ...alreadyConfigured]);
2065
- console.log(`
2066
- Done! UseAI MCP server configured in ${chalk.bold(String(toInstall.length))} tool${toInstall.length === 1 ? "" : "s"}.
2067
- `);
2068
1552
  }
2069
- async function fullRemoveFlow(tools, autoYes, explicit) {
2070
- if (explicit) {
2071
- const toRemove = tools.filter((t) => {
2072
- try {
2073
- return t.isConfigured();
2074
- } catch {
2075
- return false;
2076
- }
1553
+ var shared;
1554
+ var init_setup = __esm({
1555
+ "src/setup.ts"() {
1556
+ "use strict";
1557
+ init_dist();
1558
+ init_tools();
1559
+ shared = createSetupRunner({
1560
+ productName: "UseAI",
1561
+ tools: AI_TOOLS,
1562
+ resolveTools,
1563
+ instructionsText: USEAI_INSTRUCTIONS_TEXT
2077
1564
  });
2078
- const notConfigured = tools.filter((t) => {
2079
- try {
2080
- return !t.isConfigured();
2081
- } catch {
2082
- return true;
1565
+ }
1566
+ });
1567
+
1568
+ // src/session-state.ts
1569
+ var session_state_exports = {};
1570
+ __export(session_state_exports, {
1571
+ SessionState: () => SessionState
1572
+ });
1573
+ import { appendFileSync, existsSync as existsSync6 } from "fs";
1574
+ import { basename, join as join5 } from "path";
1575
+ var SessionState;
1576
+ var init_session_state = __esm({
1577
+ "src/session-state.ts"() {
1578
+ "use strict";
1579
+ init_dist();
1580
+ SessionState = class {
1581
+ sessionId;
1582
+ sessionStartTime;
1583
+ heartbeatCount;
1584
+ sessionRecordCount;
1585
+ clientName;
1586
+ sessionTaskType;
1587
+ project;
1588
+ chainTipHash;
1589
+ signingKey;
1590
+ signingAvailable;
1591
+ constructor() {
1592
+ this.sessionId = generateSessionId();
1593
+ this.sessionStartTime = Date.now();
1594
+ this.heartbeatCount = 0;
1595
+ this.sessionRecordCount = 0;
1596
+ this.clientName = "unknown";
1597
+ this.sessionTaskType = "coding";
1598
+ this.project = null;
1599
+ this.chainTipHash = GENESIS_HASH;
1600
+ this.signingKey = null;
1601
+ this.signingAvailable = false;
2083
1602
  }
2084
- });
2085
- for (const tool of notConfigured) {
2086
- console.log(dim(`${tool.name} is not configured \u2014 skipping.`));
1603
+ reset() {
1604
+ this.sessionStartTime = Date.now();
1605
+ this.sessionId = generateSessionId();
1606
+ this.heartbeatCount = 0;
1607
+ this.sessionRecordCount = 0;
1608
+ this.chainTipHash = GENESIS_HASH;
1609
+ this.sessionTaskType = "coding";
1610
+ this.detectProject();
1611
+ }
1612
+ detectProject() {
1613
+ this.project = basename(process.cwd());
1614
+ }
1615
+ setClient(name) {
1616
+ this.clientName = name;
1617
+ }
1618
+ setTaskType(type) {
1619
+ this.sessionTaskType = type;
1620
+ }
1621
+ incrementHeartbeat() {
1622
+ this.heartbeatCount++;
1623
+ }
1624
+ getSessionDuration() {
1625
+ return Math.round((Date.now() - this.sessionStartTime) / 1e3);
1626
+ }
1627
+ initializeKeystore() {
1628
+ ensureDir();
1629
+ if (existsSync6(KEYSTORE_FILE)) {
1630
+ const ks = readJson(KEYSTORE_FILE, null);
1631
+ if (ks) {
1632
+ try {
1633
+ this.signingKey = decryptKeystore(ks);
1634
+ this.signingAvailable = true;
1635
+ return;
1636
+ } catch {
1637
+ }
1638
+ }
1639
+ }
1640
+ const result = generateKeystore();
1641
+ writeJson(KEYSTORE_FILE, result.keystore);
1642
+ this.signingKey = result.signingKey;
1643
+ this.signingAvailable = true;
1644
+ }
1645
+ /** Path to this session's chain file in the active directory */
1646
+ sessionChainPath() {
1647
+ return join5(ACTIVE_DIR, `${this.sessionId}.jsonl`);
1648
+ }
1649
+ appendToChain(type, data) {
1650
+ const record = buildChainRecord(type, this.sessionId, data, this.chainTipHash, this.signingKey);
1651
+ ensureDir();
1652
+ appendFileSync(this.sessionChainPath(), JSON.stringify(record) + "\n", "utf-8");
1653
+ this.chainTipHash = record.hash;
1654
+ this.sessionRecordCount++;
1655
+ return record;
1656
+ }
1657
+ };
1658
+ }
1659
+ });
1660
+
1661
+ // src/register-tools.ts
1662
+ var register_tools_exports = {};
1663
+ __export(register_tools_exports, {
1664
+ registerTools: () => registerTools
1665
+ });
1666
+ import { z as z2 } from "zod";
1667
+ import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
1668
+ import { existsSync as existsSync7, renameSync as renameSync2 } from "fs";
1669
+ import { join as join6 } from "path";
1670
+ function getConfig() {
1671
+ return readJson(CONFIG_FILE, {
1672
+ milestone_tracking: true,
1673
+ auto_sync: true
1674
+ });
1675
+ }
1676
+ function getSessions() {
1677
+ return readJson(SESSIONS_FILE, []);
1678
+ }
1679
+ function getMilestones() {
1680
+ return readJson(MILESTONES_FILE, []);
1681
+ }
1682
+ function resolveClient(server2, session2) {
1683
+ if (session2.clientName !== "unknown") return;
1684
+ const clientInfo = server2.server.getClientVersion();
1685
+ if (clientInfo?.name) {
1686
+ session2.setClient(normalizeMcpClientName(clientInfo.name));
1687
+ return;
1688
+ }
1689
+ session2.setClient(detectClient());
1690
+ }
1691
+ function registerTools(server2, session2) {
1692
+ server2.tool(
1693
+ "useai_start",
1694
+ "Start tracking an AI coding session. Call this at the beginning of every response.",
1695
+ {
1696
+ task_type: z2.enum(["coding", "debugging", "testing", "planning", "reviewing", "documenting", "learning", "other"]).optional().describe("What kind of task is the developer working on?")
1697
+ },
1698
+ async ({ task_type }) => {
1699
+ session2.reset();
1700
+ resolveClient(server2, session2);
1701
+ session2.setTaskType(task_type ?? "coding");
1702
+ const record = session2.appendToChain("session_start", {
1703
+ client: session2.clientName,
1704
+ task_type: session2.sessionTaskType,
1705
+ project: session2.project,
1706
+ version: VERSION
1707
+ });
1708
+ return {
1709
+ content: [
1710
+ {
1711
+ type: "text",
1712
+ text: `useai session started \u2014 ${session2.sessionTaskType} on ${session2.clientName} \xB7 ${session2.sessionId.slice(0, 8)} \xB7 ${session2.signingAvailable ? "signed" : "unsigned"}`
1713
+ }
1714
+ ]
1715
+ };
2087
1716
  }
2088
- if (toRemove.length > 0) {
2089
- console.log();
2090
- for (const tool of toRemove) {
2091
- try {
2092
- tool.remove();
2093
- console.log(ok(`\u2713 Removed from ${tool.name}`));
2094
- } catch (e) {
2095
- console.log(err(`\u2717 ${tool.name} \u2014 ${e.message}`));
2096
- }
2097
- }
1717
+ );
1718
+ server2.tool(
1719
+ "useai_heartbeat",
1720
+ "Record a heartbeat for the current AI coding session. Call this periodically during long conversations (every 10-15 minutes).",
1721
+ {},
1722
+ async () => {
1723
+ session2.incrementHeartbeat();
1724
+ session2.appendToChain("heartbeat", {
1725
+ heartbeat_number: session2.heartbeatCount,
1726
+ cumulative_seconds: session2.getSessionDuration()
1727
+ });
1728
+ return {
1729
+ content: [
1730
+ {
1731
+ type: "text",
1732
+ text: `Heartbeat recorded. Session active for ${formatDuration(session2.getSessionDuration())}.`
1733
+ }
1734
+ ]
1735
+ };
2098
1736
  }
2099
- } else {
2100
- const configured = tools.filter((t) => {
1737
+ );
1738
+ server2.tool(
1739
+ "useai_end",
1740
+ `End the current AI coding session and record milestones. Each milestone needs TWO titles: (1) a generic public "title" safe for public display (NEVER include project names, file names, class names, or any identifying details), and (2) an optional detailed "private_title" for the user's own records that CAN include project names, file names, and specific details. GOOD title: "Implemented user authentication". GOOD private_title: "Added JWT auth to UseAI API server". BAD title: "Fixed bug in Acme auth service".`,
1741
+ {
1742
+ task_type: z2.enum(["coding", "debugging", "testing", "planning", "reviewing", "documenting", "learning", "other"]).optional().describe("What kind of task was the developer working on?"),
1743
+ languages: z2.array(z2.string()).optional().describe("Programming languages used (e.g. ['typescript', 'python'])"),
1744
+ files_touched_count: z2.number().optional().describe("Approximate number of files created or modified (count only, no names)"),
1745
+ milestones: z2.array(z2.object({
1746
+ title: z2.string().describe("PRIVACY-CRITICAL: Generic description of what was accomplished. NEVER include project names, repo names, product names, package names, file names, file paths, class names, API endpoints, database names, company names, or ANY identifier that could reveal which codebase this work was done in. Write as if describing the work to a stranger. GOOD: 'Implemented user authentication', 'Fixed race condition in background worker', 'Added unit tests for data validation', 'Refactored state management layer'. BAD: 'Fixed bug in Acme auth', 'Investigated ProjectX pipeline', 'Updated UserService.ts in src/services/', 'Added tests for coverit MCP tool'"),
1747
+ private_title: z2.string().optional().describe("Detailed description for the user's private records. CAN include project names, file names, and specific details. Example: 'Added private/public milestone support to UseAI MCP server'"),
1748
+ category: z2.enum(["feature", "bugfix", "refactor", "test", "docs", "setup", "deployment", "other"]).describe("Type of work completed"),
1749
+ complexity: z2.enum(["simple", "medium", "complex"]).optional().describe("How complex was this task?")
1750
+ })).optional().describe("What was accomplished this session? List each distinct piece of work completed. Provide both a generic public title and an optional detailed private_title.")
1751
+ },
1752
+ async ({ task_type, languages, files_touched_count, milestones: milestonesInput }) => {
1753
+ const duration = session2.getSessionDuration();
1754
+ const now = (/* @__PURE__ */ new Date()).toISOString();
1755
+ const finalTaskType = task_type ?? session2.sessionTaskType;
1756
+ const chainStartHash = session2.chainTipHash === "GENESIS" ? "GENESIS" : session2.chainTipHash;
1757
+ const endRecord = session2.appendToChain("session_end", {
1758
+ duration_seconds: duration,
1759
+ task_type: finalTaskType,
1760
+ languages: languages ?? [],
1761
+ files_touched: files_touched_count ?? 0,
1762
+ heartbeat_count: session2.heartbeatCount
1763
+ });
1764
+ const sealData = JSON.stringify({
1765
+ session_id: session2.sessionId,
1766
+ client: session2.clientName,
1767
+ task_type: finalTaskType,
1768
+ languages: languages ?? [],
1769
+ files_touched: files_touched_count ?? 0,
1770
+ project: session2.project,
1771
+ started_at: new Date(session2.sessionStartTime).toISOString(),
1772
+ ended_at: now,
1773
+ duration_seconds: duration,
1774
+ heartbeat_count: session2.heartbeatCount,
1775
+ record_count: session2.sessionRecordCount,
1776
+ chain_end_hash: endRecord.hash
1777
+ });
1778
+ const sealSignature = signHash(
1779
+ createHash3("sha256").update(sealData).digest("hex"),
1780
+ session2.signingKey
1781
+ );
1782
+ session2.appendToChain("session_seal", {
1783
+ seal: sealData,
1784
+ seal_signature: sealSignature
1785
+ });
1786
+ const activePath = join6(ACTIVE_DIR, `${session2.sessionId}.jsonl`);
1787
+ const sealedPath = join6(SEALED_DIR, `${session2.sessionId}.jsonl`);
2101
1788
  try {
2102
- return t.isConfigured();
2103
- } catch {
2104
- return false;
2105
- }
2106
- });
2107
- if (configured.length === 0) {
2108
- console.log(dim("UseAI is not configured in any AI tools."));
2109
- } else {
2110
- console.log(`
2111
- Found UseAI configured in ${chalk.bold(String(configured.length))} tool${configured.length === 1 ? "" : "s"}:
2112
- `);
2113
- let toRemove;
2114
- if (autoYes) {
2115
- toRemove = configured;
2116
- } else {
2117
- let selected;
2118
- try {
2119
- selected = await checkbox({
2120
- message: "Select tools to remove UseAI from:",
2121
- choices: configured.map((t) => ({
2122
- name: t.name,
2123
- value: t.id,
2124
- checked: true
2125
- }))
2126
- });
2127
- } catch {
2128
- console.log("\n");
2129
- return;
1789
+ if (existsSync7(activePath)) {
1790
+ renameSync2(activePath, sealedPath);
2130
1791
  }
2131
- toRemove = configured.filter((t) => selected.includes(t.id));
1792
+ } catch {
2132
1793
  }
2133
- if (toRemove.length === 0) {
2134
- console.log(dim("No tools selected."));
2135
- } else {
2136
- console.log(`
2137
- Removing from ${toRemove.length} tool${toRemove.length === 1 ? "" : "s"}...
2138
- `);
2139
- for (const tool of toRemove) {
2140
- try {
2141
- tool.remove();
2142
- console.log(ok(`\u2713 Removed from ${tool.name}`));
2143
- } catch (e) {
2144
- console.log(err(`\u2717 ${tool.name} \u2014 ${e.message}`));
1794
+ const seal = {
1795
+ session_id: session2.sessionId,
1796
+ client: session2.clientName,
1797
+ task_type: finalTaskType,
1798
+ languages: languages ?? [],
1799
+ files_touched: files_touched_count ?? 0,
1800
+ project: session2.project ?? void 0,
1801
+ started_at: new Date(session2.sessionStartTime).toISOString(),
1802
+ ended_at: now,
1803
+ duration_seconds: duration,
1804
+ heartbeat_count: session2.heartbeatCount,
1805
+ record_count: session2.sessionRecordCount,
1806
+ chain_start_hash: chainStartHash,
1807
+ chain_end_hash: endRecord.hash,
1808
+ seal_signature: sealSignature
1809
+ };
1810
+ const sessions2 = getSessions();
1811
+ sessions2.push(seal);
1812
+ writeJson(SESSIONS_FILE, sessions2);
1813
+ let milestoneCount = 0;
1814
+ if (milestonesInput && milestonesInput.length > 0) {
1815
+ const config = getConfig();
1816
+ if (config.milestone_tracking) {
1817
+ const durationMinutes = Math.round(duration / 60);
1818
+ const allMilestones = getMilestones();
1819
+ for (const m of milestonesInput) {
1820
+ const record = session2.appendToChain("milestone", {
1821
+ title: m.title,
1822
+ private_title: m.private_title,
1823
+ category: m.category,
1824
+ complexity: m.complexity ?? "medium",
1825
+ duration_minutes: durationMinutes,
1826
+ languages: languages ?? []
1827
+ });
1828
+ const milestone = {
1829
+ id: `m_${randomUUID3().slice(0, 8)}`,
1830
+ session_id: session2.sessionId,
1831
+ title: m.title,
1832
+ private_title: m.private_title,
1833
+ project: session2.project ?? void 0,
1834
+ category: m.category,
1835
+ complexity: m.complexity ?? "medium",
1836
+ duration_minutes: durationMinutes,
1837
+ languages: languages ?? [],
1838
+ client: session2.clientName,
1839
+ created_at: (/* @__PURE__ */ new Date()).toISOString(),
1840
+ published: false,
1841
+ published_at: null,
1842
+ chain_hash: record.hash
1843
+ };
1844
+ allMilestones.push(milestone);
1845
+ milestoneCount++;
2145
1846
  }
1847
+ writeJson(MILESTONES_FILE, allMilestones);
2146
1848
  }
2147
1849
  }
1850
+ const durationStr = formatDuration(duration);
1851
+ const langStr = languages && languages.length > 0 ? ` using ${languages.join(", ")}` : "";
1852
+ const milestoneStr = milestoneCount > 0 ? ` \xB7 ${milestoneCount} milestone${milestoneCount > 1 ? "s" : ""} recorded` : "";
1853
+ return {
1854
+ content: [
1855
+ {
1856
+ type: "text",
1857
+ text: `Session ended: ${durationStr} ${finalTaskType}${langStr}${milestoneStr}`
1858
+ }
1859
+ ]
1860
+ };
2148
1861
  }
2149
- }
2150
- try {
2151
- removeClaudeCodeHooks();
2152
- console.log(ok("\u2713 Claude Code hooks removed"));
2153
- } catch {
2154
- }
2155
- console.log();
2156
- try {
2157
- await killDaemon();
2158
- console.log(ok("\u2713 Daemon stopped"));
2159
- } catch {
2160
- console.log(dim("Daemon was not running"));
2161
- }
2162
- if (isAutostartInstalled()) {
2163
- try {
2164
- removeAutostart();
2165
- console.log(ok("\u2713 Auto-start service removed"));
2166
- } catch {
2167
- console.log(err("\u2717 Failed to remove auto-start service"));
2168
- }
2169
- }
2170
- console.log(dim("\nDone! UseAI fully removed.\n"));
2171
- }
2172
- function showHelp() {
2173
- console.log(`
2174
- ${chalk.bold("Usage:")} npx @devness/useai mcp [tools...] [options]
2175
-
2176
- Configure UseAI MCP server in your AI tools.
2177
- Default: starts daemon, installs auto-start, configures tools with HTTP.
2178
-
2179
- ${chalk.bold("Arguments:")}
2180
- tools Specific tool names (e.g. codex cursor vscode)
2181
-
2182
- ${chalk.bold("Options:")}
2183
- --stdio Use stdio config (legacy mode for containers/CI)
2184
- --remove Remove UseAI from configured tools, stop daemon, remove auto-start
2185
- --status Show configuration status without modifying
2186
- -y, --yes Skip confirmation, auto-select all detected tools
2187
- -h, --help Show this help message
2188
- `);
2189
- }
2190
- async function runSetup(args) {
2191
- const flags = new Set(args.filter((a) => a.startsWith("-")));
2192
- const toolNames = args.filter((a) => !a.startsWith("-"));
2193
- if (flags.has("-h") || flags.has("--help")) {
2194
- showHelp();
2195
- return;
2196
- }
2197
- const isRemove = flags.has("--remove");
2198
- const isStatus = flags.has("--status");
2199
- const isStdio = flags.has("--stdio");
2200
- const autoYes = flags.has("-y") || flags.has("--yes");
2201
- const explicit = toolNames.length > 0;
2202
- let tools = AI_TOOLS;
2203
- if (explicit) {
2204
- const { matched, unmatched } = resolveTools(toolNames);
2205
- if (unmatched.length > 0) {
2206
- console.log(err(`Unknown tool${unmatched.length === 1 ? "" : "s"}: ${unmatched.join(", ")}`));
2207
- console.log(dim(`Available: ${AI_TOOLS.map((t) => t.id).join(", ")}`));
2208
- return;
2209
- }
2210
- tools = matched;
2211
- }
2212
- if (isStatus) {
2213
- showStatus(tools);
2214
- } else if (isRemove) {
2215
- await fullRemoveFlow(tools, autoYes, explicit);
2216
- } else if (isStdio) {
2217
- await stdioInstallFlow(tools, autoYes, explicit);
2218
- } else {
2219
- await daemonInstallFlow(tools, explicit);
2220
- }
1862
+ );
2221
1863
  }
2222
- var init_setup = __esm({
2223
- "src/setup.ts"() {
1864
+ var init_register_tools = __esm({
1865
+ "src/register-tools.ts"() {
2224
1866
  "use strict";
2225
1867
  init_dist();
2226
- init_tools();
2227
1868
  }
2228
1869
  });
2229
1870
 
@@ -2235,7 +1876,7 @@ function getDashboardHtml() {
2235
1876
  <meta charset="UTF-8" />
2236
1877
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
2237
1878
  <title>UseAI \u2014 Local Dashboard</title>
2238
- <script type="module" crossorigin>function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var t,n,r={exports:{}},l={};var a,o,i=(n||(n=1,r.exports=function(){if(t)return l;t=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(t,n,r){var l=null;if(void 0!==r&&(l=""+r),void 0!==n.key&&(l=""+n.key),"key"in n)for(var a in r={},n)"key"!==a&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:l,ref:void 0!==n?n:null,props:r}}return l.Fragment=n,l.jsx=r,l.jsxs=r,l}()),r.exports),u={exports:{}},s={};function c(){if(a)return s;a=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||h}function b(){}function k(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("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")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var x=k.prototype=new b;x.constructor=k,g(x,v.prototype),x.isPureReactComponent=!0;var w=Array.isArray;function S(){}var E={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function N(t,n,r){var l=r.ref;return{$$typeof:e,type:t,key:n,ref:void 0!==l?l:null,props:r}}function _(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var T=/\\/+/g;function z(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function P(n,r,l,a,o){var i=typeof n;"undefined"!==i&&"boolean"!==i||(n=null);var u,s,c=!1;if(null===n)c=!0;else switch(i){case"bigint":case"string":case"number":c=!0;break;case"object":switch(n.$$typeof){case e:case t:c=!0;break;case d:return P((c=n._init)(n._payload),r,l,a,o)}}if(c)return o=o(n),c=""===a?"."+z(n,0):a,w(o)?(l="",null!=c&&(l=c.replace(T,"$&/")+"/"),P(o,r,l,"",function(e){return e})):null!=o&&(_(o)&&(u=o,s=l+(null==o.key||n&&n.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+c,o=N(u.type,s,u.props)),r.push(o)),1;c=0;var f,p=""===a?".":a+":";if(w(n))for(var h=0;h<n.length;h++)c+=P(a=n[h],r,l,i=p+z(a,h),o);else if("function"==typeof(h=null===(f=n)||"object"!=typeof f?null:"function"==typeof(f=m&&f[m]||f["@@iterator"])?f:null))for(n=h.call(n),h=0;!(a=n.next()).done;)c+=P(a=a.value,r,l,i=p+z(a,h++),o);else if("object"===i){if("function"==typeof n.then)return P(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(n),r,l,a,o);throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return c}function j(e,t,n){if(null==e)return e;var r=[],l=0;return P(e,r,"","",function(e){return t.call(n,e,l++)}),r}function L(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var D="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},O={map:j,forEach:function(e,t,n){j(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(e,function(e){return e})||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};return s.Activity=p,s.Children=O,s.Component=v,s.Fragment=n,s.Profiler=l,s.PureComponent=k,s.StrictMode=r,s.Suspense=c,s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,s.__COMPILER_RUNTIME={__proto__:null,c:function(e){return E.H.useMemoCache(e)}},s.cache=function(e){return function(){return e.apply(null,arguments)}},s.cacheSignal=function(){return null},s.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),l=e.key;if(null!=t)for(a in void 0!==t.key&&(l=""+t.key),t)!C.call(t,a)||"key"===a||"__self"===a||"__source"===a||"ref"===a&&void 0===t.ref||(r[a]=t[a]);var a=arguments.length-2;if(1===a)r.children=n;else if(1<a){for(var o=Array(a),i=0;i<a;i++)o[i]=arguments[i+2];r.children=o}return N(e.type,l,r)},s.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:o,_context:e},e},s.createElement=function(e,t,n){var r,l={},a=null;if(null!=t)for(r in void 0!==t.key&&(a=""+t.key),t)C.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(l[r]=t[r]);var o=arguments.length-2;if(1===o)l.children=n;else if(1<o){for(var i=Array(o),u=0;u<o;u++)i[u]=arguments[u+2];l.children=i}if(e&&e.defaultProps)for(r in o=e.defaultProps)void 0===l[r]&&(l[r]=o[r]);return N(e,a,l)},s.createRef=function(){return{current:null}},s.forwardRef=function(e){return{$$typeof:u,render:e}},s.isValidElement=_,s.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:L}},s.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},s.startTransition=function(e){var t=E.T,n={};E.T=n;try{var r=e(),l=E.S;null!==l&&l(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(S,D)}catch(a){D(a)}finally{null!==t&&null!==n.types&&(t.types=n.types),E.T=t}},s.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},s.use=function(e){return E.H.use(e)},s.useActionState=function(e,t,n){return E.H.useActionState(e,t,n)},s.useCallback=function(e,t){return E.H.useCallback(e,t)},s.useContext=function(e){return E.H.useContext(e)},s.useDebugValue=function(){},s.useDeferredValue=function(e,t){return E.H.useDeferredValue(e,t)},s.useEffect=function(e,t){return E.H.useEffect(e,t)},s.useEffectEvent=function(e){return E.H.useEffectEvent(e)},s.useId=function(){return E.H.useId()},s.useImperativeHandle=function(e,t,n){return E.H.useImperativeHandle(e,t,n)},s.useInsertionEffect=function(e,t){return E.H.useInsertionEffect(e,t)},s.useLayoutEffect=function(e,t){return E.H.useLayoutEffect(e,t)},s.useMemo=function(e,t){return E.H.useMemo(e,t)},s.useOptimistic=function(e,t){return E.H.useOptimistic(e,t)},s.useReducer=function(e,t,n){return E.H.useReducer(e,t,n)},s.useRef=function(e){return E.H.useRef(e)},s.useState=function(e){return E.H.useState(e)},s.useSyncExternalStore=function(e,t,n){return E.H.useSyncExternalStore(e,t,n)},s.useTransition=function(){return E.H.useTransition()},s.version="19.2.4",s}function f(){return o||(o=1,u.exports=c()),u.exports}var d=f();const p=e(d);var m,h,g={exports:{}},y={},v={exports:{}},b={};function k(){return h||(h=1,v.exports=(m||(m=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<l(a,t)))break e;e[r]=t,e[n]=a,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,o=a>>>1;r<o;){var i=2*(r+1)-1,u=e[i],s=i+1,c=e[s];if(0>l(u,n))s<a&&0>l(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[i]=n,r=i);else{if(!(s<a&&0>l(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}function l(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,i=o.now();e.unstable_now=function(){return o.now()-i}}var u=[],s=[],c=1,f=null,d=3,p=!1,m=!1,h=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var l=n(s);null!==l;){if(null===l.callback)r(s);else{if(!(l.startTime<=e))break;r(s),l.sortIndex=l.expirationTime,t(u,l)}l=n(s)}}function x(e){if(h=!1,k(e),!m)if(null!==n(u))m=!0,S||(S=!0,w());else{var t=n(s);null!==t&&j(x,t.startTime-e)}}var w,S=!1,E=-1,C=5,N=-1;function _(){return!(!g&&e.unstable_now()-N<C)}function T(){if(g=!1,S){var t=e.unstable_now();N=t;var l=!0;try{e:{m=!1,h&&(h=!1,v(E),E=-1),p=!0;var a=d;try{t:{for(k(t),f=n(u);null!==f&&!(f.expirationTime>t&&_());){var o=f.callback;if("function"==typeof o){f.callback=null,d=f.priorityLevel;var i=o(f.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof i){f.callback=i,k(t),l=!0;break t}f===n(u)&&r(u),k(t)}else r(u);f=n(u)}if(null!==f)l=!0;else{var c=n(s);null!==c&&j(x,c.startTime-t),l=!1}}break e}finally{f=null,d=a,p=!1}l=void 0}}finally{l?w():S=!1}}}if("function"==typeof b)w=function(){b(T)};else if("undefined"!=typeof MessageChannel){var z=new MessageChannel,P=z.port2;z.port1.onmessage=T,w=function(){P.postMessage(null)}}else w=function(){y(T,0)};function j(t,n){E=y(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},e.unstable_scheduleCallback=function(r,l,a){var o=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,r){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return r={id:c++,callback:l,priorityLevel:r,startTime:a,expirationTime:i=a+i,sortIndex:-1},a>o?(r.sortIndex=a,t(s,r),null===n(u)&&r===n(s)&&(h?(v(E),E=-1):h=!0,j(x,a-o))):(r.sortIndex=i,t(u,r),m||p||(m=!0,S||(S=!0,w()))),r},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}}(b)),b)),v.exports}var x,w,S,E,C={exports:{}},N={};function _(){if(x)return N;x=1;var e=f();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},l=Symbol.for("react.portal");var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return N.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,N.createPortal=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:l,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,n,null,r)},N.flushSync=function(e){var t=a.T,n=r.p;try{if(a.T=null,r.p=2,e)return e()}finally{a.T=t,r.p=n,r.d.f()}},N.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,r.d.C(e,t))},N.prefetchDNS=function(e){"string"==typeof e&&r.d.D(e)},N.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,l=o(n,t.crossOrigin),a="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?r.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:l,integrity:a,fetchPriority:i}):"script"===n&&r.d.X(e,{crossOrigin:l,integrity:a,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},N.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=o(t.as,t.crossOrigin);r.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&r.d.M(e)},N.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,l=o(n,t.crossOrigin);r.d.L(e,n,{crossOrigin:l,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},N.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=o(t.as,t.crossOrigin);r.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else r.d.m(e)},N.requestFormReset=function(e){r.d.r(e)},N.unstable_batchedUpdates=function(e,t){return e(t)},N.useFormState=function(e,t,n){return a.H.useFormState(e,t,n)},N.useFormStatus=function(){return a.H.useHostTransitionStatus()},N.version="19.2.4",N}function T(){if(w)return C.exports;return w=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),C.exports=_(),C.exports}
1879
+ <script type="module" crossorigin>function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var t,n,r={exports:{}},i={};var a,o,s=(n||(n=1,r.exports=function(){if(t)return i;t=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(t,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var a in r={},n)"key"!==a&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:i,ref:void 0!==n?n:null,props:r}}return i.Fragment=n,i.jsx=r,i.jsxs=r,i}()),r.exports),l={exports:{}},u={};function c(){if(a)return u;a=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}function b(){}function x(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("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")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var w=x.prototype=new b;w.constructor=x,g(w,v.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function S(){}var E={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function C(t,n,r){var i=r.ref;return{$$typeof:e,type:t,key:n,ref:void 0!==i?i:null,props:r}}function P(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var N=/\\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function M(n,r,i,a,o){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l,u,c=!1;if(null===n)c=!0;else switch(s){case"bigint":case"string":case"number":c=!0;break;case"object":switch(n.$$typeof){case e:case t:c=!0;break;case f:return M((c=n._init)(n._payload),r,i,a,o)}}if(c)return o=o(n),c=""===a?"."+j(n,0):a,k(o)?(i="",null!=c&&(i=c.replace(N,"$&/")+"/"),M(o,r,i,"",function(e){return e})):null!=o&&(P(o)&&(l=o,u=i+(null==o.key||n&&n.key===o.key?"":(""+o.key).replace(N,"$&/")+"/")+c,o=C(l.type,u,l.props)),r.push(o)),1;c=0;var d,h=""===a?".":a+":";if(k(n))for(var m=0;m<n.length;m++)c+=M(a=n[m],r,i,s=h+j(a,m),o);else if("function"==typeof(m=null===(d=n)||"object"!=typeof d?null:"function"==typeof(d=p&&d[p]||d["@@iterator"])?d:null))for(n=m.call(n),m=0;!(a=n.next()).done;)c+=M(a=a.value,r,i,s=h+j(a,m++),o);else if("object"===s){if("function"==typeof n.then)return M(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(n),r,i,a,o);throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return c}function L(e,t,n){if(null==e)return e;var r=[],i=0;return M(e,r,"","",function(e){return t.call(n,e,i++)}),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var D="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},R={map:L,forEach:function(e,t,n){L(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return L(e,function(){t++}),t},toArray:function(e){return L(e,function(e){return e})||[]},only:function(e){if(!P(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};return u.Activity=h,u.Children=R,u.Component=v,u.Fragment=n,u.Profiler=i,u.PureComponent=x,u.StrictMode=r,u.Suspense=c,u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,u.__COMPILER_RUNTIME={__proto__:null,c:function(e){return E.H.useMemoCache(e)}},u.cache=function(e){return function(){return e.apply(null,arguments)}},u.cacheSignal=function(){return null},u.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),i=e.key;if(null!=t)for(a in void 0!==t.key&&(i=""+t.key),t)!T.call(t,a)||"key"===a||"__self"===a||"__source"===a||"ref"===a&&void 0===t.ref||(r[a]=t[a]);var a=arguments.length-2;if(1===a)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return C(e.type,i,r)},u.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:o,_context:e},e},u.createElement=function(e,t,n){var r,i={},a=null;if(null!=t)for(r in void 0!==t.key&&(a=""+t.key),t)T.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var o=arguments.length-2;if(1===o)i.children=n;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps)void 0===i[r]&&(i[r]=o[r]);return C(e,a,i)},u.createRef=function(){return{current:null}},u.forwardRef=function(e){return{$$typeof:l,render:e}},u.isValidElement=P,u.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:A}},u.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},u.startTransition=function(e){var t=E.T,n={};E.T=n;try{var r=e(),i=E.S;null!==i&&i(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(S,D)}catch(a){D(a)}finally{null!==t&&null!==n.types&&(t.types=n.types),E.T=t}},u.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},u.use=function(e){return E.H.use(e)},u.useActionState=function(e,t,n){return E.H.useActionState(e,t,n)},u.useCallback=function(e,t){return E.H.useCallback(e,t)},u.useContext=function(e){return E.H.useContext(e)},u.useDebugValue=function(){},u.useDeferredValue=function(e,t){return E.H.useDeferredValue(e,t)},u.useEffect=function(e,t){return E.H.useEffect(e,t)},u.useEffectEvent=function(e){return E.H.useEffectEvent(e)},u.useId=function(){return E.H.useId()},u.useImperativeHandle=function(e,t,n){return E.H.useImperativeHandle(e,t,n)},u.useInsertionEffect=function(e,t){return E.H.useInsertionEffect(e,t)},u.useLayoutEffect=function(e,t){return E.H.useLayoutEffect(e,t)},u.useMemo=function(e,t){return E.H.useMemo(e,t)},u.useOptimistic=function(e,t){return E.H.useOptimistic(e,t)},u.useReducer=function(e,t,n){return E.H.useReducer(e,t,n)},u.useRef=function(e){return E.H.useRef(e)},u.useState=function(e){return E.H.useState(e)},u.useSyncExternalStore=function(e,t,n){return E.H.useSyncExternalStore(e,t,n)},u.useTransition=function(){return E.H.useTransition()},u.version="19.2.4",u}function d(){return o||(o=1,l.exports=c()),l.exports}var f=d();const h=e(f);var p,m,g={exports:{}},y={},v={exports:{}},b={};function x(){return m||(m=1,v.exports=(p||(p=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<i(a,t)))break e;e[r]=t,e[n]=a,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>i(l,n))u<a&&0>i(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<a&&0>i(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,m=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function x(e){for(var i=n(u);null!==i;){if(null===i.callback)r(u);else{if(!(i.startTime<=e))break;r(u),i.sortIndex=i.expirationTime,t(l,i)}i=n(u)}}function w(e){if(m=!1,x(e),!p)if(null!==n(l))p=!0,S||(S=!0,k());else{var t=n(u);null!==t&&L(w,t.startTime-e)}}var k,S=!1,E=-1,T=5,C=-1;function P(){return!(!g&&e.unstable_now()-C<T)}function N(){if(g=!1,S){var t=e.unstable_now();C=t;var i=!0;try{e:{p=!1,m&&(m=!1,v(E),E=-1),h=!0;var a=f;try{t:{for(x(t),d=n(l);null!==d&&!(d.expirationTime>t&&P());){var o=d.callback;if("function"==typeof o){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof s){d.callback=s,x(t),i=!0;break t}d===n(l)&&r(l),x(t)}else r(l);d=n(l)}if(null!==d)i=!0;else{var c=n(u);null!==c&&L(w,c.startTime-t),i=!1}}break e}finally{d=null,f=a,h=!1}i=void 0}}finally{i?k():S=!1}}}if("function"==typeof b)k=function(){b(N)};else if("undefined"!=typeof MessageChannel){var j=new MessageChannel,M=j.port2;j.port1.onmessage=N,k=function(){M.postMessage(null)}}else k=function(){y(N,0)};function L(t,n){E=y(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:c++,callback:i,priorityLevel:r,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(r.sortIndex=a,t(u,r),null===n(l)&&r===n(u)&&(m?(v(E),E=-1):m=!0,L(w,a-o))):(r.sortIndex=s,t(l,r),p||h||(p=!0,S||(S=!0,k()))),r},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(b)),b)),v.exports}var w,k,S,E,T={exports:{}},C={};function P(){if(w)return C;w=1;var e=d();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return C.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,C.createPortal=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(t(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:i,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,n,null,r)},C.flushSync=function(e){var t=a.T,n=r.p;try{if(a.T=null,r.p=2,e)return e()}finally{a.T=t,r.p=n,r.d.f()}},C.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,r.d.C(e,t))},C.prefetchDNS=function(e){"string"==typeof e&&r.d.D(e)},C.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,i=o(n,t.crossOrigin),a="string"==typeof t.integrity?t.integrity:void 0,s="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?r.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:i,integrity:a,fetchPriority:s}):"script"===n&&r.d.X(e,{crossOrigin:i,integrity:a,fetchPriority:s,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},C.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=o(t.as,t.crossOrigin);r.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&r.d.M(e)},C.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,i=o(n,t.crossOrigin);r.d.L(e,n,{crossOrigin:i,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},C.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=o(t.as,t.crossOrigin);r.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else r.d.m(e)},C.requestFormReset=function(e){r.d.r(e)},C.unstable_batchedUpdates=function(e,t){return e(t)},C.useFormState=function(e,t,n){return a.H.useFormState(e,t,n)},C.useFormStatus=function(){return a.H.useHostTransitionStatus()},C.version="19.2.4",C}function N(){if(k)return T.exports;return k=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),T.exports=P(),T.exports}
2239
1880
  /**
2240
1881
  * @license React
2241
1882
  * react-dom-client.production.js
@@ -2244,33 +1885,34 @@ function getDashboardHtml() {
2244
1885
  *
2245
1886
  * This source code is licensed under the MIT license found in the
2246
1887
  * LICENSE file in the root directory of this source tree.
2247
- */function z(){if(S)return y;S=1;var e=k(),t=f(),n=T();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function l(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function a(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function o(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function i(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function u(e){if(a(e)!==e)throw Error(r(188))}function s(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=s(e)))return t;e=e.sibling}return null}var c=Object.assign,d=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),x=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function L(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var D=Symbol.for("react.client.reference");function O(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===D?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case h:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case E:return"Suspense";case C:return"SuspenseList";case z:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case m:return"Portal";case x:return e.displayName||"Context";case b:return(e._context.displayName||"Context")+".Consumer";case w:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:O(e.type)||"Memo";case _:t=e._payload,e=e._init;try{return O(e(t))}catch(n){}}return null}var M=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A={pending:!1,data:null,method:null,action:null},I=[],$=-1;function H(e){return{current:e}}function U(e){0>$||(e.current=I[$],I[$]=null,$--)}function V(e,t){$++,I[$]=e.current,e.current=t}var B,q,Q=H(null),W=H(null),K=H(null),X=H(null);function Y(e,t){switch(V(K,t),V(W,e),V(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=xf(t=kf(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(Q),V(Q,e)}function G(){U(Q),U(W),U(K)}function Z(e){null!==e.memoizedState&&V(X,e);var t=Q.current,n=xf(t,e.type);t!==n&&(V(W,e),V(Q,n))}function J(e){W.current===e&&(U(Q),U(W)),X.current===e&&(U(X),pd._currentValue=A)}function ee(e){if(void 0===B)try{throw Error()}catch(n){var t=n.stack.trim().match(/\\n( *(at )?)/);B=t&&t[1]||"",q=-1<n.stack.indexOf("\\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\\n"+B+e+q}var te=!1;function ne(e,t){if(!e||te)return"";te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(l){var r=l}Reflect.construct(e,[],n)}else{try{n.call()}catch(a){r=a}e.call(n.prototype)}}else{try{throw Error()}catch(o){r=o}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(i){if(i&&r&&"string"==typeof i.stack)return[i.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],i=a[1];if(o&&i){var u=o.split("\\n"),s=i.split("\\n");for(l=r=0;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;for(;l<s.length&&!s[l].includes("DetermineComponentFrameRoot");)l++;if(r===u.length||l===s.length)for(r=u.length-1,l=s.length-1;1<=r&&0<=l&&u[r]!==s[l];)l--;for(;1<=r&&0<=l;r--,l--)if(u[r]!==s[l]){if(1!==r||1!==l)do{if(r--,0>--l||u[r]!==s[l]){var c="\\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=l);break}}}finally{te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ee(n):""}function re(e,t){switch(e.tag){case 26:case 27:case 5:return ee(e.type);case 16:return ee("Lazy");case 13:return e.child!==t&&null!==t?ee("Suspense Fallback"):ee("Suspense");case 19:return ee("SuspenseList");case 0:case 15:return ne(e.type,!1);case 11:return ne(e.type.render,!1);case 1:return ne(e.type,!0);case 31:return ee("Activity");default:return""}}function le(e){try{var t="",n=null;do{t+=re(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\\nError generating stack: "+r.message+"\\n"+r.stack}}var ae=Object.prototype.hasOwnProperty,oe=e.unstable_scheduleCallback,ie=e.unstable_cancelCallback,ue=e.unstable_shouldYield,se=e.unstable_requestPaint,ce=e.unstable_now,fe=e.unstable_getCurrentPriorityLevel,de=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,me=e.unstable_NormalPriority,he=e.unstable_LowPriority,ge=e.unstable_IdlePriority,ye=e.log,ve=e.unstable_setDisableYieldValue,be=null,ke=null;function xe(e){if("function"==typeof ye&&ve(e),ke&&"function"==typeof ke.setStrictMode)try{ke.setStrictMode(be,e)}catch(t){}}var we=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Se(e)/Ee|0)|0},Se=Math.log,Ee=Math.LN2;var Ce=256,Ne=262144,_e=4194304;function Te(e){var t=42&e;if(0!==t)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ze(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var l=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var i=134217727&r;return 0!==i?0!==(r=i&~a)?l=Te(r):0!==(o&=i)?l=Te(o):n||0!==(n=i&~e)&&(l=Te(n)):0!==(i=r&~a)?l=Te(i):0!==o?l=Te(o):n||0!==(n=r&~e)&&(l=Te(n)),0===l?0:0!==t&&t!==l&&0===(t&a)&&((a=l&-l)>=(n=t&-t)||32===a&&4194048&n)?t:l}function Pe(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Le(){var e=_e;return!(62914560&(_e<<=1))&&(_e=4194304),e}function De(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Oe(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Me(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Fe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-we(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}function Re(e,t){var n=t&-t;return 0!==((n=42&n?1:Ae(n))&(e.suspendedLanes|t))?0:n}function Ae(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ie(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function $e(){var e=R.p;return 0!==e?e:void 0===(e=window.event)?32:zd(e.type)}function He(e,t){var n=R.p;try{return R.p=e,t()}finally{R.p=n}}var Ue=Math.random().toString(36).slice(2),Ve="__reactFiber$"+Ue,Be="__reactProps$"+Ue,qe="__reactContainer$"+Ue,Qe="__reactEvents$"+Ue,We="__reactListeners$"+Ue,Ke="__reactHandles$"+Ue,Xe="__reactResources$"+Ue,Ye="__reactMarker$"+Ue;function Ge(e){delete e[Ve],delete e[Be],delete e[Qe],delete e[We],delete e[Ke]}function Ze(e){var t=e[Ve];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qe]||n[Ve]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=If(e);null!==e;){if(n=e[Ve])return n;e=If(e)}return t}n=(e=n).parentNode}return null}function Je(e){if(e=e[Ve]||e[qe]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function et(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(r(33))}function tt(e){var t=e[Xe];return t||(t=e[Xe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[Ye]=!0}var rt=new Set,lt={};function at(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(lt[e]=t,e=0;e<t.length;e++)rt.add(t[e])}var it=RegExp("^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$"),ut={},st={};function ct(e,t,n){if(l=t,ae.call(st,l)||!ae.call(ut,l)&&(it.test(l)?st[l]=!0:(ut[l]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var l}function ft(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function dt(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function mt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ht(e){if(!e._valueTracker){var t=mt(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var l=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){n=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=mt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function yt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var vt=/[\\n"\\\\]/g;function bt(e){return e.replace(vt,function(e){return"\\\\"+e.charCodeAt(0).toString(16)+" "})}function kt(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+pt(t)):e.value!==""+pt(t)&&(e.value=""+pt(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?wt(e,o,pt(t)):null!=n?wt(e,o,pt(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+pt(i):e.removeAttribute("name")}function xt(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return void ht(e);n=null!=n?""+pt(n):"",t=null!=t?""+pt(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=i?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o),ht(e)}function wt(e,t,n){"number"===t&&yt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function St(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=""+pt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==t||e[l].disabled||(t=e[l])}null!==t&&(t.selected=!0)}}function Et(e,t,n){null==t||((t=""+pt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+pt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Ct(e,t,n,l){if(null==t){if(null!=l){if(null!=n)throw Error(r(92));if(M(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}null==n&&(n=""),t=n}n=pt(t),e.defaultValue=n,(l=e.textContent)===n&&""!==l&&null!==l&&(e.value=l),ht(e)}function Nt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var _t=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Tt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||_t.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function zt(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(r(62));if(e=e.style,null!=n){for(var l in n)!n.hasOwnProperty(l)||null!=t&&t.hasOwnProperty(l)||(0===l.indexOf("--")?e.setProperty(l,""):"float"===l?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&Tt(e,a,l)}else for(var o in t)t.hasOwnProperty(o)&&Tt(e,o,t[o])}function Pt(e){if(-1===e.indexOf("-"))return!1;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 jt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Lt=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function Dt(e){return Lt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ot(){}var Mt=null;function Ft(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Rt=null,At=null;function It(e){var t=Je(e);if(t&&(e=t.stateNode)){var n=e[Be]||null;e:switch(e=t.stateNode,t.type){case"input":if(kt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+bt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[Be]||null;if(!a)throw Error(r(90));kt(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)(l=n[t]).form===e.form&&gt(l)}break e;case"textarea":Et(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&St(e,!!n.multiple,t,!1)}}}var $t=!1;function Ht(e,t,n){if($t)return e(t,n);$t=!0;try{return e(t)}finally{if($t=!1,(null!==Rt||null!==At)&&(tc(),Rt&&(t=Rt,e=At,At=Rt=null,It(t),e)))for(t=0;t<e.length;t++)It(e[t])}}function Ut(e,t){var n=e.stateNode;if(null===n)return null;var l=n[Be]||null;if(null===l)return null;n=l[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":(l=!l.disabled)||(l=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!l;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var Vt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Bt=!1;if(Vt)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Bt=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch(ep){Bt=!1}var Qt=null,Wt=null,Kt=null;function Xt(){if(Kt)return Kt;var e,t,n=Wt,r=n.length,l="value"in Qt?Qt.value:Qt.textContent,a=l.length;for(e=0;e<r&&n[e]===l[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===l[a-t];t++);return Kt=l.slice(e,1<t?1-t:void 0)}function Yt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Gt(){return!0}function Zt(){return!1}function Jt(e){function t(t,n,r,l,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=l,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(l):l[o]);return this.isDefaultPrevented=(null!=l.defaultPrevented?l.defaultPrevented:!1===l.returnValue)?Gt:Zt,this.isPropagationStopped=Zt,this}return c(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Gt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Gt)},persist:function(){},isPersistent:Gt}),t}var en,tn,nn,rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ln=Jt(rn),an=c({},rn,{view:0,detail:0}),on=Jt(an),un=c({},an,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nn&&(nn&&"mousemove"===e.type?(en=e.screenX-nn.screenX,tn=e.screenY-nn.screenY):tn=en=0,nn=e),en)},movementY:function(e){return"movementY"in e?e.movementY:tn}}),sn=Jt(un),cn=Jt(c({},un,{dataTransfer:0})),fn=Jt(c({},an,{relatedTarget:0})),dn=Jt(c({},rn,{animationName:0,elapsedTime:0,pseudoElement:0})),pn=Jt(c({},rn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),mn=Jt(c({},rn,{data:0})),hn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gn={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"},yn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=yn[e])&&!!t[e]}function bn(){return vn}var kn=Jt(c({},an,{key:function(e){if(e.key){var t=hn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?gn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bn,charCode:function(e){return"keypress"===e.type?Yt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),xn=Jt(c({},un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),wn=Jt(c({},an,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bn})),Sn=Jt(c({},rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),En=Jt(c({},un,{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})),Cn=Jt(c({},rn,{newState:0,oldState:0})),Nn=[9,13,27,32],_n=Vt&&"CompositionEvent"in window,Tn=null;Vt&&"documentMode"in document&&(Tn=document.documentMode);var zn=Vt&&"TextEvent"in window&&!Tn,Pn=Vt&&(!_n||Tn&&8<Tn&&11>=Tn),jn=String.fromCharCode(32),Ln=!1;function Dn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function On(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Mn=!1;var Fn={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 Rn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Fn[e.type]:"textarea"===t}function An(e,t,n,r){Rt?At?At.push(r):At=[r]:Rt=r,0<(t=af(t,"onChange")).length&&(n=new ln("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var In=null,$n=null;function Hn(e){Gc(e,0)}function Un(e){if(gt(et(e)))return e}function Vn(e,t){if("change"===e)return t}var Bn=!1;if(Vt){var qn;if(Vt){var Qn="oninput"in document;if(!Qn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Qn="function"==typeof Wn.oninput}qn=Qn}else qn=!1;Bn=qn&&(!document.documentMode||9<document.documentMode)}function Kn(){In&&(In.detachEvent("onpropertychange",Xn),$n=In=null)}function Xn(e){if("value"===e.propertyName&&Un($n)){var t=[];An(t,$n,e,Ft(e)),Ht(Hn,t)}}function Yn(e,t,n){"focusin"===e?(Kn(),$n=n,(In=t).attachEvent("onpropertychange",Xn)):"focusout"===e&&Kn()}function Gn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Un($n)}function Zn(e,t){if("click"===e)return Un(t)}function Jn(e,t){if("input"===e||"change"===e)return Un(t)}var er="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function tr(e,t){if(er(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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(!ae.call(t,l)||!er(e[l],t[l]))return!1}return!0}function nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rr(e,t){var n,r=nr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nr(r)}}function lr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?lr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ar(e){for(var t=yt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=yt((e=t.contentWindow).document)}return t}function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ir=Vt&&"documentMode"in document&&11>=document.documentMode,ur=null,sr=null,cr=null,fr=!1;function dr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;fr||null==ur||ur!==yt(r)||("selectionStart"in(r=ur)&&or(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},cr&&tr(cr,r)||(cr=r,0<(r=af(sr,"onSelect")).length&&(t=new ln("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ur)))}function pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var mr={animationend:pr("Animation","AnimationEnd"),animationiteration:pr("Animation","AnimationIteration"),animationstart:pr("Animation","AnimationStart"),transitionrun:pr("Transition","TransitionRun"),transitionstart:pr("Transition","TransitionStart"),transitioncancel:pr("Transition","TransitionCancel"),transitionend:pr("Transition","TransitionEnd")},hr={},gr={};function yr(e){if(hr[e])return hr[e];if(!mr[e])return e;var t,n=mr[e];for(t in n)if(n.hasOwnProperty(t)&&t in gr)return hr[e]=n[t];return e}Vt&&(gr=document.createElement("div").style,"AnimationEvent"in window||(delete mr.animationend.animation,delete mr.animationiteration.animation,delete mr.animationstart.animation),"TransitionEvent"in window||delete mr.transitionend.transition);var vr=yr("animationend"),br=yr("animationiteration"),kr=yr("animationstart"),xr=yr("transitionrun"),wr=yr("transitionstart"),Sr=yr("transitioncancel"),Er=yr("transitionend"),Cr=new Map,Nr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Cr.set(e,t),at(t,[e])}Nr.push("scrollEnd");var Tr="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},zr=[],Pr=0,jr=0;function Lr(){for(var e=Pr,t=jr=Pr=0;t<e;){var n=zr[t];zr[t++]=null;var r=zr[t];zr[t++]=null;var l=zr[t];zr[t++]=null;var a=zr[t];if(zr[t++]=null,null!==r&&null!==l){var o=r.pending;null===o?l.next=l:(l.next=o.next,o.next=l),r.pending=l}0!==a&&Fr(n,l,a)}}function Dr(e,t,n,r){zr[Pr++]=e,zr[Pr++]=t,zr[Pr++]=n,zr[Pr++]=r,jr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Or(e,t,n,r){return Dr(e,t,n,r),Rr(e)}function Mr(e,t){return Dr(e,null,null,t),Rr(e)}function Fr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var l=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(l=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,l&&null!==t&&(l=31-we(n),null===(r=(e=a.hiddenUpdates)[l])?e[l]=[t]:r.push(t),t.lane=536870912|n),a):null}function Rr(e){if(50<Qs)throw Qs=0,Ws=null,Error(r(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Ar={};function Ir(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.refCleanup=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 $r(e,t,n,r){return new Ir(e,t,n,r)}function Hr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ur(e,t){var n=e.alternate;return null===n?((n=$r(e.tag,t,e.key,e.mode)).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=65011712&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Vr(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Br(e,t,n,l,a,o){var i=0;if(l=e,"function"==typeof e)Hr(e)&&(i=1);else if("string"==typeof e)i=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,Q.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case z:return(e=$r(31,n,t,a)).elementType=z,e.lanes=o,e;case h:return qr(n.children,a,o,t);case g:i=8,a|=24;break;case v:return(e=$r(12,n,t,2|a)).elementType=v,e.lanes=o,e;case E:return(e=$r(13,n,t,a)).elementType=E,e.lanes=o,e;case C:return(e=$r(19,n,t,a)).elementType=C,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case x:i=10;break e;case b:i=9;break e;case w:i=11;break e;case N:i=14;break e;case _:i=16,l=null;break e}i=29,n=Error(r(130,null===e?"null":typeof e,"")),l=null}return(t=$r(i,n,t,a)).elementType=e,t.type=l,t.lanes=o,t}function qr(e,t,n,r){return(e=$r(7,e,r,t)).lanes=n,e}function Qr(e,t,n){return(e=$r(6,e,null,t)).lanes=n,e}function Wr(e){var t=$r(18,null,null,0);return t.stateNode=e,t}function Kr(e,t,n){return(t=$r(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xr=new WeakMap;function Yr(e,t){if("object"==typeof e&&null!==e){var n=Xr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:le(t)},Xr.set(e,t),t)}return{value:e,source:t,stack:le(t)}}var Gr=[],Zr=0,Jr=null,el=0,tl=[],nl=0,rl=null,ll=1,al="";function ol(e,t){Gr[Zr++]=el,Gr[Zr++]=Jr,Jr=e,el=t}function il(e,t,n){tl[nl++]=ll,tl[nl++]=al,tl[nl++]=rl,rl=e;var r=ll;e=al;var l=32-we(r)-1;r&=~(1<<l),n+=1;var a=32-we(t)+l;if(30<a){var o=l-l%5;a=(r&(1<<o)-1).toString(32),r>>=o,l-=o,ll=1<<32-we(t)+l|n<<l|r,al=a+e}else ll=1<<a|n<<l|r,al=e}function ul(e){null!==e.return&&(ol(e,1),il(e,1,0))}function sl(e){for(;e===Jr;)Jr=Gr[--Zr],Gr[Zr]=null,el=Gr[--Zr],Gr[Zr]=null;for(;e===rl;)rl=tl[--nl],tl[nl]=null,al=tl[--nl],tl[nl]=null,ll=tl[--nl],tl[nl]=null}function cl(e,t){tl[nl++]=ll,tl[nl++]=al,tl[nl++]=rl,ll=t.id,al=t.overflow,rl=e}var fl=null,dl=null,pl=!1,ml=null,hl=!1,gl=Error(r(519));function yl(e){throw Sl(Yr(Error(r(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),gl}function vl(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ve]=e,t[Be]=r,n){case"dialog":Zc("cancel",t),Zc("close",t);break;case"iframe":case"object":case"embed":Zc("load",t);break;case"video":case"audio":for(n=0;n<Xc.length;n++)Zc(Xc[n],t);break;case"source":Zc("error",t);break;case"img":case"image":case"link":Zc("error",t),Zc("load",t);break;case"details":Zc("toggle",t);break;case"input":Zc("invalid",t),xt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Zc("invalid",t);break;case"textarea":Zc("invalid",t),Ct(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||df(t.textContent,n)?(null!=r.popover&&(Zc("beforetoggle",t),Zc("toggle",t)),null!=r.onScroll&&Zc("scroll",t),null!=r.onScrollEnd&&Zc("scrollend",t),null!=r.onClick&&(t.onclick=Ot),t=!0):t=!1,t||yl(e,!0)}function bl(e){for(fl=e.return;fl;)switch(fl.tag){case 5:case 31:case 13:return void(hl=!1);case 27:case 3:return void(hl=!0);default:fl=fl.return}}function kl(e){if(e!==fl)return!1;if(!pl)return bl(e),pl=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||wf(e.type,e.memoizedProps)),t=!t),t&&dl&&yl(e),bl(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));dl=Af(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));dl=Af(e)}else 27===n?(n=dl,zf(e.type)?(e=Rf,Rf=null,dl=e):dl=n):dl=fl?Ff(e.stateNode.nextSibling):null;return!0}function xl(){dl=fl=null,pl=!1}function wl(){var e=ml;return null!==e&&(null===Ls?Ls=e:Ls.push.apply(Ls,e),ml=null),e}function Sl(e){null===ml?ml=[e]:ml.push(e)}var El=H(null),Cl=null,Nl=null;function _l(e,t,n){V(El,t._currentValue),t._currentValue=n}function Tl(e){e._currentValue=El.current,U(El)}function zl(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Pl(e,t,n,l){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var o=a.dependencies;if(null!==o){var i=a.child;o=o.firstContext;e:for(;null!==o;){var u=o;o=a;for(var s=0;s<t.length;s++)if(u.context===t[s]){o.lanes|=n,null!==(u=o.alternate)&&(u.lanes|=n),zl(o.return,n,e),l||(i=null);break e}o=u.next}}else if(18===a.tag){if(null===(i=a.return))throw Error(r(341));i.lanes|=n,null!==(o=i.alternate)&&(o.lanes|=n),zl(i,n,e),i=null}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===e){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}}function jl(e,t,n,l){e=null;for(var a=t,o=!1;null!==a;){if(!o)if(524288&a.flags)o=!0;else if(262144&a.flags)break;if(10===a.tag){var i=a.alternate;if(null===i)throw Error(r(387));if(null!==(i=i.memoizedProps)){var u=a.type;er(a.pendingProps.value,i.value)||(null!==e?e.push(u):e=[u])}}else if(a===X.current){if(null===(i=a.alternate))throw Error(r(387));i.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(pd):e=[pd])}a=a.return}null!==e&&Pl(t,e,n,l),t.flags|=262144}function Ll(e){for(e=e.firstContext;null!==e;){if(!er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Dl(e){Cl=e,Nl=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ol(e){return Fl(Cl,e)}function Ml(e,t){return null===Cl&&Dl(e),Fl(e,t)}function Fl(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Nl){if(null===e)throw Error(r(308));Nl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Nl=Nl.next=t;return n}var Rl="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Al=e.unstable_scheduleCallback,Il=e.unstable_NormalPriority,$l={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hl(){return{controller:new Rl,data:new Map,refCount:0}}function Ul(e){e.refCount--,0===e.refCount&&Al(Il,function(){e.controller.abort()})}var Vl=null,Bl=0,ql=0,Ql=null;function Wl(){if(0===--Bl&&null!==Vl){null!==Ql&&(Ql.status="fulfilled");var e=Vl;Vl=null,ql=0,Ql=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Kl=F.S;F.S=function(e,t){Ms=ce(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Vl){var n=Vl=[];Bl=0,ql=Bc(),Ql={status:"pending",value:void 0,then:function(e){n.push(e)}}}Bl++,t.then(Wl,Wl)}(0,t),null!==Kl&&Kl(e,t)};var Xl=H(null);function Yl(){var e=Xl.current;return null!==e?e:gs.pooledCache}function Gl(e,t){V(Xl,null===t?Xl.current:t.pool)}function Zl(){var e=Yl();return null===e?null:{parent:$l._currentValue,pool:e}}var Jl=Error(r(460)),ea=Error(r(474)),ta=Error(r(542)),na={then:function(){}};function ra(e){return"fulfilled"===(e=e.status)||"rejected"===e}function la(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Ot,Ot),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw ua(e=t.reason),e;default:if("string"==typeof t.status)t.then(Ot,Ot);else{if(null!==(e=gs)&&100<e.shellSuspendCounter)throw Error(r(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw ua(e=t.reason),e}throw oa=t,Jl}}function aa(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"==typeof t&&"function"==typeof t.then)throw oa=t,Jl;throw t}}var oa=null;function ia(){if(null===oa)throw Error(r(459));var e=oa;return oa=null,e}function ua(e){if(e===Jl||e===ta)throw Error(r(483))}var sa=null,ca=0;function fa(e){var t=ca;return ca+=1,null===sa&&(sa=[]),la(sa,e,t)}function da(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function pa(e,t){if(t.$$typeof===d)throw Error(r(525));throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ma(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function l(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function a(e,t){return(e=Ur(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Qr(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function s(e,t,n,r){var l=n.type;return l===h?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===_&&aa(l)===t.type)?(da(t=a(t,n.props),n),t.return=e,t):(da(t=Br(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Kr(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=qr(n,e.mode,r,l)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Qr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case p:return da(n=Br(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case m:return(t=Kr(t,e.mode,n)).return=e,t;case _:return d(e,t=aa(t),n)}if(M(t)||L(t))return(t=qr(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return d(e,fa(t),n);if(t.$$typeof===x)return d(e,Ml(e,t),n);pa(e,t)}return null}function g(e,t,n,r){var l=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==l?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case p:return n.key===l?s(e,t,n,r):null;case m:return n.key===l?c(e,t,n,r):null;case _:return g(e,t,n=aa(n),r)}if(M(n)||L(n))return null!==l?null:f(e,t,n,r,null);if("function"==typeof n.then)return g(e,t,fa(n),r);if(n.$$typeof===x)return g(e,t,Ml(e,n),r);pa(e,n)}return null}function y(e,t,n,r,l){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return u(t,e=e.get(n)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case p:return s(t,e=e.get(null===r.key?n:r.key)||null,r,l);case m:return c(t,e=e.get(null===r.key?n:r.key)||null,r,l);case _:return y(e,t,n,r=aa(r),l)}if(M(r)||L(r))return f(t,e=e.get(n)||null,r,l,null);if("function"==typeof r.then)return y(e,t,n,fa(r),l);if(r.$$typeof===x)return y(e,t,n,Ml(t,r),l);pa(t,r)}return null}function v(u,s,c,f){if("object"==typeof c&&null!==c&&c.type===h&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case p:e:{for(var b=c.key;null!==s;){if(s.key===b){if((b=c.type)===h){if(7===s.tag){n(u,s.sibling),(f=a(s,c.props.children)).return=u,u=f;break e}}else if(s.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===_&&aa(b)===s.type){n(u,s.sibling),da(f=a(s,c.props),c),f.return=u,u=f;break e}n(u,s);break}t(u,s),s=s.sibling}c.type===h?((f=qr(c.props.children,u.mode,f,c.key)).return=u,u=f):(da(f=Br(c.type,c.key,c.props,null,u.mode,f),c),f.return=u,u=f)}return i(u);case m:e:{for(b=c.key;null!==s;){if(s.key===b){if(4===s.tag&&s.stateNode.containerInfo===c.containerInfo&&s.stateNode.implementation===c.implementation){n(u,s.sibling),(f=a(s,c.children||[])).return=u,u=f;break e}n(u,s);break}t(u,s),s=s.sibling}(f=Kr(c,u.mode,f)).return=u,u=f}return i(u);case _:return v(u,s,c=aa(c),f)}if(M(c))return function(r,a,i,u){for(var s=null,c=null,f=a,p=a=0,m=null;null!==f&&p<i.length;p++){f.index>p?(m=f,f=null):m=f.sibling;var h=g(r,f,i[p],u);if(null===h){null===f&&(f=m);break}e&&f&&null===h.alternate&&t(r,f),a=o(h,a,p),null===c?s=h:c.sibling=h,c=h,f=m}if(p===i.length)return n(r,f),pl&&ol(r,p),s;if(null===f){for(;p<i.length;p++)null!==(f=d(r,i[p],u))&&(a=o(f,a,p),null===c?s=f:c.sibling=f,c=f);return pl&&ol(r,p),s}for(f=l(f);p<i.length;p++)null!==(m=y(f,r,p,i[p],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?p:m.key),a=o(m,a,p),null===c?s=m:c.sibling=m,c=m);return e&&f.forEach(function(e){return t(r,e)}),pl&&ol(r,p),s}(u,s,c,f);if(L(c)){if("function"!=typeof(b=L(c)))throw Error(r(150));return function(a,i,u,s){if(null==u)throw Error(r(151));for(var c=null,f=null,p=i,m=i=0,h=null,v=u.next();null!==p&&!v.done;m++,v=u.next()){p.index>m?(h=p,p=null):h=p.sibling;var b=g(a,p,v.value,s);if(null===b){null===p&&(p=h);break}e&&p&&null===b.alternate&&t(a,p),i=o(b,i,m),null===f?c=b:f.sibling=b,f=b,p=h}if(v.done)return n(a,p),pl&&ol(a,m),c;if(null===p){for(;!v.done;m++,v=u.next())null!==(v=d(a,v.value,s))&&(i=o(v,i,m),null===f?c=v:f.sibling=v,f=v);return pl&&ol(a,m),c}for(p=l(p);!v.done;m++,v=u.next())null!==(v=y(p,a,m,v.value,s))&&(e&&null!==v.alternate&&p.delete(null===v.key?m:v.key),i=o(v,i,m),null===f?c=v:f.sibling=v,f=v);return e&&p.forEach(function(e){return t(a,e)}),pl&&ol(a,m),c}(u,s,c=b.call(c),f)}if("function"==typeof c.then)return v(u,s,fa(c),f);if(c.$$typeof===x)return v(u,s,Ml(u,c),f);pa(u,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==s&&6===s.tag?(n(u,s.sibling),(f=a(s,c)).return=u,u=f):(n(u,s),(f=Qr(c,u.mode,f)).return=u,u=f),i(u)):n(u,s)}return function(e,t,n,r){try{ca=0;var l=v(e,t,n,r);return sa=null,l}catch(o){if(o===Jl||o===ta)throw o;var a=$r(29,o,null,e.mode);return a.lanes=r,a.return=e,a}}}var ha=ma(!0),ga=ma(!1),ya=!1;function va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ba(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xa(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&hs){var l=r.pending;return null===l?t.next=t:(t.next=l.next,l.next=t),r.pending=t,t=Rr(e),Fr(e,null,n),t}return Dr(e,r,t,n),Rr(e)}function wa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Fe(e,n)}}function Sa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var l=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?l=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?l=a=t:a=a.next=t}else l=a=t;return n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ea=!1;function Ca(){if(Ea){if(null!==Ql)throw Ql}}function Na(e,t,n,r){Ea=!1;var l=e.updateQueue;ya=!1;var a=l.firstBaseUpdate,o=l.lastBaseUpdate,i=l.shared.pending;if(null!==i){l.shared.pending=null;var u=i,s=u.next;u.next=null,null===o?a=s:o.next=s,o=u;var f=e.alternate;null!==f&&((i=(f=f.updateQueue).lastBaseUpdate)!==o&&(null===i?f.firstBaseUpdate=s:i.next=s,f.lastBaseUpdate=u))}if(null!==a){var d=l.baseState;for(o=0,f=s=u=null,i=a;;){var p=-536870913&i.lane,m=p!==i.lane;if(m?(vs&p)===p:(r&p)===p){0!==p&&p===ql&&(Ea=!0),null!==f&&(f=f.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var h=e,g=i;p=t;var y=n;switch(g.tag){case 1:if("function"==typeof(h=g.payload)){d=h.call(y,d,p);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(p="function"==typeof(h=g.payload)?h.call(y,d,p):h))break e;d=c({},d,p);break e;case 2:ya=!0}}null!==(p=i.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=l.callbacks)?l.callbacks=[p]:m.push(p))}else m={lane:p,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===f?(s=f=m,u=d):f=f.next=m,o|=p;if(null===(i=i.next)){if(null===(i=l.shared.pending))break;i=(m=i).next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}null===f&&(u=d),l.baseState=u,l.firstBaseUpdate=s,l.lastBaseUpdate=f,null===a&&(l.shared.lanes=0),Ns|=o,e.lanes=o,e.memoizedState=d}}function _a(e,t){if("function"!=typeof e)throw Error(r(191,e));e.call(t)}function Ta(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)_a(n[e],t)}var za=H(null),Pa=H(0);function ja(e,t){V(Pa,e=Es),V(za,t),Es=e|t.baseLanes}function La(){V(Pa,Es),V(za,za.current)}function Da(){Es=Pa.current,U(za),U(Pa)}var Oa=H(null),Ma=null;function Fa(e){var t=e.alternate;V(Ha,1&Ha.current),V(Oa,e),null===Ma&&(null===t||null!==za.current||null!==t.memoizedState)&&(Ma=e)}function Ra(e){V(Ha,Ha.current),V(Oa,e),null===Ma&&(Ma=e)}function Aa(e){22===e.tag?(V(Ha,Ha.current),V(Oa,e),null===Ma&&(Ma=e)):Ia()}function Ia(){V(Ha,Ha.current),V(Oa,Oa.current)}function $a(e){U(Oa),Ma===e&&(Ma=null),U(Ha)}var Ha=H(0);function Ua(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Of(n)||Mf(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Va=0,Ba=null,qa=null,Qa=null,Wa=!1,Ka=!1,Xa=!1,Ya=0,Ga=0,Za=null,Ja=0;function eo(){throw Error(r(321))}function to(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function no(e,t,n,r,l,a){return Va=a,Ba=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=null===e||null===e.memoizedState?vi:bi,Xa=!1,a=n(r,l),Xa=!1,Ka&&(a=lo(t,n,r,l)),ro(e),a}function ro(e){F.H=yi;var t=null!==qa&&null!==qa.next;if(Va=0,Qa=qa=Ba=null,Wa=!1,Ga=0,Za=null,t)throw Error(r(300));null===e||Mi||null!==(e=e.dependencies)&&Ll(e)&&(Mi=!0)}function lo(e,t,n,l){Ba=e;var a=0;do{if(Ka&&(Za=null),Ga=0,Ka=!1,25<=a)throw Error(r(301));if(a+=1,Qa=qa=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}F.H=ki,o=t(n,l)}while(Ka);return o}function ao(){var e=F.H,t=e.useState()[0];return t="function"==typeof t.then?fo(t):t,e=e.useState()[0],(null!==qa?qa.memoizedState:null)!==e&&(Ba.flags|=1024),t}function oo(){var e=0!==Ya;return Ya=0,e}function io(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function uo(e){if(Wa){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Wa=!1}Va=0,Qa=qa=Ba=null,Ka=!1,Ga=Ya=0,Za=null}function so(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Qa?Ba.memoizedState=Qa=e:Qa=Qa.next=e,Qa}function co(){if(null===qa){var e=Ba.alternate;e=null!==e?e.memoizedState:null}else e=qa.next;var t=null===Qa?Ba.memoizedState:Qa.next;if(null!==t)Qa=t,qa=e;else{if(null===e){if(null===Ba.alternate)throw Error(r(467));throw Error(r(310))}e={memoizedState:(qa=e).memoizedState,baseState:qa.baseState,baseQueue:qa.baseQueue,queue:qa.queue,next:null},null===Qa?Ba.memoizedState=Qa=e:Qa=Qa.next=e}return Qa}function fo(e){var t=Ga;return Ga+=1,null===Za&&(Za=[]),e=la(Za,e,t),t=Ba,null===(null===Qa?t.memoizedState:Qa.next)&&(t=t.alternate,F.H=null===t||null===t.memoizedState?vi:bi),e}function po(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return fo(e);if(e.$$typeof===x)return Ol(e)}throw Error(r(438,String(e)))}function mo(e){var t=null,n=Ba.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Ba.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ba.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=P;return t.index++,n}function ho(e,t){return"function"==typeof t?t(e):t}function go(e){return yo(co(),qa,e)}function yo(e,t,n){var l=e.queue;if(null===l)throw Error(r(311));l.lastRenderedReducer=n;var a=e.baseQueue,o=l.pending;if(null!==o){if(null!==a){var i=a.next;a.next=o.next,o.next=i}t.baseQueue=a=o,l.pending=null}if(o=e.baseState,null===a)e.memoizedState=o;else{var u=i=null,s=null,c=t=a.next,f=!1;do{var d=-536870913&c.lane;if(d!==c.lane?(vs&d)===d:(Va&d)===d){var p=c.revertLane;if(0===p)null!==s&&(s=s.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),d===ql&&(f=!0);else{if((Va&p)===p){c=c.next,p===ql&&(f=!0);continue}d={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===s?(u=s=d,i=o):s=s.next=d,Ba.lanes|=p,Ns|=p}d=c.action,Xa&&n(o,d),o=c.hasEagerState?c.eagerState:n(o,d)}else p={lane:d,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===s?(u=s=p,i=o):s=s.next=p,Ba.lanes|=d,Ns|=d;c=c.next}while(null!==c&&c!==t);if(null===s?i=o:s.next=u,!er(o,e.memoizedState)&&(Mi=!0,f&&null!==(n=Ql)))throw n;e.memoizedState=o,e.baseState=i,e.baseQueue=s,l.lastRenderedState=o}return null===a&&(l.lanes=0),[e.memoizedState,l.dispatch]}function vo(e){var t=co(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var i=a=a.next;do{o=e(o,i.action),i=i.next}while(i!==a);er(o,t.memoizedState)||(Mi=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,l]}function bo(e,t,n){var l=Ba,a=co(),o=pl;if(o){if(void 0===n)throw Error(r(407));n=n()}else n=t();var i=!er((qa||a).memoizedState,n);if(i&&(a.memoizedState=n,Mi=!0),a=a.queue,Bo(wo.bind(null,l,a,e),[e]),a.getSnapshot!==t||i||null!==Qa&&1&Qa.memoizedState.tag){if(l.flags|=2048,Io(9,{destroy:void 0},xo.bind(null,l,a,n,t),null),null===gs)throw Error(r(349));o||127&Va||ko(l,t,n)}return n}function ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ba.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ba.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function xo(e,t,n,r){t.value=n,t.getSnapshot=r,So(t)&&Eo(e)}function wo(e,t,n){return n(function(){So(t)&&Eo(e)})}function So(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch(r){return!0}}function Eo(e){var t=Mr(e,2);null!==t&&Ys(t,e,2)}function Co(e){var t=so();if("function"==typeof e){var n=e;if(e=n(),Xa){xe(!0);try{n()}finally{xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ho,lastRenderedState:e},t}function No(e,t,n,r){return e.baseState=n,yo(e,qa,"function"==typeof r?r:ho)}function _o(e,t,n,l,a){if(mi(e))throw Error(r(485));if(null!==(e=t.action)){var o={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==F.T?n(!0):o.isTransition=!1,l(o),null===(n=t.pending)?(o.next=t.pending=o,To(t,o)):(o.next=n.next,t.pending=n.next=o)}}function To(e,t){var n=t.action,r=t.payload,l=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var i=n(l,r),u=F.S;null!==u&&u(o,i),zo(e,t,i)}catch(s){jo(e,t,s)}finally{null!==a&&null!==o.types&&(a.types=o.types),F.T=a}}else try{zo(e,t,a=n(l,r))}catch(c){jo(e,t,c)}}function zo(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Po(e,t,n)},function(n){return jo(e,t,n)}):Po(e,t,n)}function Po(e,t,n){t.status="fulfilled",t.value=n,Lo(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,To(e,n)))}function jo(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Lo(t),t=t.next}while(t!==r)}e.action=null}function Lo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Do(e,t){return t}function Oo(e,t){if(pl){var n=gs.formState;if(null!==n){e:{var r=Ba;if(pl){if(dl){t:{for(var l=dl,a=hl;8!==l.nodeType;){if(!a){l=null;break t}if(null===(l=Ff(l.nextSibling))){l=null;break t}}l="F!"===(a=l.data)||"F"===a?l:null}if(l){dl=Ff(l.nextSibling),r="F!"===l.data;break e}}yl(r)}r=!1}r&&(t=n[0])}}return(n=so()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:t},n.queue=r,n=fi.bind(null,Ba,r),r.dispatch=n,r=Co(!1),a=pi.bind(null,Ba,!1,r.queue),l={state:t,dispatch:null,action:e,pending:null},(r=so()).queue=l,n=_o.bind(null,Ba,l,a,n),l.dispatch=n,r.memoizedState=e,[t,n,!1]}function Mo(e){return Fo(co(),qa,e)}function Fo(e,t,n){if(t=yo(e,t,Do)[0],e=go(ho)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=fo(t)}catch(o){if(o===Jl)throw ta;throw o}else r=t;var l=(t=co()).queue,a=l.dispatch;return n!==t.memoizedState&&(Ba.flags|=2048,Io(9,{destroy:void 0},Ro.bind(null,l,n),null)),[r,a,e]}function Ro(e,t){e.action=t}function Ao(e){var t=co(),n=qa;if(null!==n)return Fo(t,n,e);co(),t=t.memoizedState;var r=(n=co()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Io(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Ba.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ba.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function $o(){return co().memoizedState}function Ho(e,t,n,r){var l=so();Ba.flags|=e,l.memoizedState=Io(1|t,{destroy:void 0},n,void 0===r?null:r)}function Uo(e,t,n,r){var l=co();r=void 0===r?null:r;var a=l.memoizedState.inst;null!==qa&&null!==r&&to(r,qa.memoizedState.deps)?l.memoizedState=Io(t,a,n,r):(Ba.flags|=e,l.memoizedState=Io(1|t,a,n,r))}function Vo(e,t){Ho(8390656,8,e,t)}function Bo(e,t){Uo(2048,8,e,t)}function qo(e){var t=co().memoizedState;return function(e){Ba.flags|=4;var t=Ba.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ba.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&hs)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Qo(e,t){return Uo(4,2,e,t)}function Wo(e,t){return Uo(4,4,e,t)}function Ko(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Xo(e,t,n){n=null!=n?n.concat([e]):null,Uo(4,4,Ko.bind(null,t,e),n)}function Yo(){}function Go(e,t){var n=co();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&to(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zo(e,t){var n=co();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&to(t,r[1]))return r[0];if(r=e(),Xa){xe(!0);try{e()}finally{xe(!1)}}return n.memoizedState=[r,t],r}function Jo(e,t,n){return void 0===n||1073741824&Va&&!(261930&vs)?e.memoizedState=t:(e.memoizedState=n,e=Xs(),Ba.lanes|=e,Ns|=e,n)}function ei(e,t,n,r){return er(n,t)?n:null!==za.current?(e=Jo(e,n,r),er(e,t)||(Mi=!0),e):42&Va&&(!(1073741824&Va)||261930&vs)?(e=Xs(),Ba.lanes|=e,Ns|=e,t):(Mi=!0,e.memoizedState=n)}function ti(e,t,n,r,l){var a=R.p;R.p=0!==a&&8>a?a:8;var o,i,u,s=F.T,c={};F.T=c,pi(e,!1,t,n);try{var f=l(),d=F.S;if(null!==d&&d(c,f),null!==f&&"object"==typeof f&&"function"==typeof f.then)di(e,t,(o=r,i=[],u={status:"pending",value:null,reason:null,then:function(e){i.push(e)}},f.then(function(){u.status="fulfilled",u.value=o;for(var e=0;e<i.length;e++)(0,i[e])(o)},function(e){for(u.status="rejected",u.reason=e,e=0;e<i.length;e++)(0,i[e])(void 0)}),u),Ks());else di(e,t,r,Ks())}catch(p){di(e,t,{then:function(){},status:"rejected",reason:p},Ks())}finally{R.p=a,null!==s&&null!==c.types&&(s.types=c.types),F.T=s}}function ni(){}function ri(e,t,n,l){if(5!==e.tag)throw Error(r(476));var a=li(e).queue;ti(e,a,t,A,null===n?ni:function(){return ai(e),n(l)})}function li(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:A,baseState:A,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ho,lastRenderedState:A},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ho,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function ai(e){var t=li(e);null===t.next&&(t=e.alternate.memoizedState),di(e,t.next.queue,{},Ks())}function oi(){return Ol(pd)}function ii(){return co().memoizedState}function ui(){return co().memoizedState}function si(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Ks(),r=xa(t,e=ka(n),n);return null!==r&&(Ys(r,t,n),wa(r,t,n)),t={cache:Hl()},void(e.payload=t)}t=t.return}}function ci(e,t,n){var r=Ks();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mi(e)?hi(t,n):null!==(n=Or(e,t,n,r))&&(Ys(n,e,r),gi(n,t,r))}function fi(e,t,n){di(e,t,n,Ks())}function di(e,t,n,r){var l={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mi(e))hi(t,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,i=a(o,n);if(l.hasEagerState=!0,l.eagerState=i,er(i,o))return Dr(e,t,l,0),null===gs&&Lr(),!1}catch(u){}if(null!==(n=Or(e,t,l,r)))return Ys(n,e,r),gi(n,t,r),!0}return!1}function pi(e,t,n,l){if(l={lane:2,revertLane:Bc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},mi(e)){if(t)throw Error(r(479))}else null!==(t=Or(e,n,l,2))&&Ys(t,e,2)}function mi(e){var t=e.alternate;return e===Ba||null!==t&&t===Ba}function hi(e,t){Ka=Wa=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gi(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Fe(e,n)}}var yi={readContext:Ol,use:po,useCallback:eo,useContext:eo,useEffect:eo,useImperativeHandle:eo,useLayoutEffect:eo,useInsertionEffect:eo,useMemo:eo,useReducer:eo,useRef:eo,useState:eo,useDebugValue:eo,useDeferredValue:eo,useTransition:eo,useSyncExternalStore:eo,useId:eo,useHostTransitionStatus:eo,useFormState:eo,useActionState:eo,useOptimistic:eo,useMemoCache:eo,useCacheRefresh:eo};yi.useEffectEvent=eo;var vi={readContext:Ol,use:po,useCallback:function(e,t){return so().memoizedState=[e,void 0===t?null:t],e},useContext:Ol,useEffect:Vo,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Ho(4194308,4,Ko.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ho(4194308,4,e,t)},useInsertionEffect:function(e,t){Ho(4,2,e,t)},useMemo:function(e,t){var n=so();t=void 0===t?null:t;var r=e();if(Xa){xe(!0);try{e()}finally{xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=so();if(void 0!==n){var l=n(t);if(Xa){xe(!0);try{n(t)}finally{xe(!1)}}}else l=t;return r.memoizedState=r.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},r.queue=e,e=e.dispatch=ci.bind(null,Ba,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},so().memoizedState=e},useState:function(e){var t=(e=Co(e)).queue,n=fi.bind(null,Ba,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yo,useDeferredValue:function(e,t){return Jo(so(),e,t)},useTransition:function(){var e=Co(!1);return e=ti.bind(null,Ba,e.queue,!0,!1),so().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Ba,a=so();if(pl){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===gs)throw Error(r(349));127&vs||ko(l,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Vo(wo.bind(null,l,o,e),[e]),l.flags|=2048,Io(9,{destroy:void 0},xo.bind(null,l,o,n,t),null),n},useId:function(){var e=so(),t=gs.identifierPrefix;if(pl){var n=al;t="_"+t+"R_"+(n=(ll&~(1<<32-we(ll)-1)).toString(32)+n),0<(n=Ya++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Ja++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:oi,useFormState:Oo,useActionState:Oo,useOptimistic:function(e){var t=so();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=pi.bind(null,Ba,!0,n),n.dispatch=t,[e,t]},useMemoCache:mo,useCacheRefresh:function(){return so().memoizedState=si.bind(null,Ba)},useEffectEvent:function(e){var t=so(),n={impl:e};return t.memoizedState=n,function(){if(2&hs)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},bi={readContext:Ol,use:po,useCallback:Go,useContext:Ol,useEffect:Bo,useImperativeHandle:Xo,useInsertionEffect:Qo,useLayoutEffect:Wo,useMemo:Zo,useReducer:go,useRef:$o,useState:function(){return go(ho)},useDebugValue:Yo,useDeferredValue:function(e,t){return ei(co(),qa.memoizedState,e,t)},useTransition:function(){var e=go(ho)[0],t=co().memoizedState;return["boolean"==typeof e?e:fo(e),t]},useSyncExternalStore:bo,useId:ii,useHostTransitionStatus:oi,useFormState:Mo,useActionState:Mo,useOptimistic:function(e,t){return No(co(),0,e,t)},useMemoCache:mo,useCacheRefresh:ui};bi.useEffectEvent=qo;var ki={readContext:Ol,use:po,useCallback:Go,useContext:Ol,useEffect:Bo,useImperativeHandle:Xo,useInsertionEffect:Qo,useLayoutEffect:Wo,useMemo:Zo,useReducer:vo,useRef:$o,useState:function(){return vo(ho)},useDebugValue:Yo,useDeferredValue:function(e,t){var n=co();return null===qa?Jo(n,e,t):ei(n,qa.memoizedState,e,t)},useTransition:function(){var e=vo(ho)[0],t=co().memoizedState;return["boolean"==typeof e?e:fo(e),t]},useSyncExternalStore:bo,useId:ii,useHostTransitionStatus:oi,useFormState:Ao,useActionState:Ao,useOptimistic:function(e,t){var n=co();return null!==qa?No(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:mo,useCacheRefresh:ui};function xi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:c({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}ki.useEffectEvent=qo;var wi={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ks(),l=ka(r);l.payload=t,null!=n&&(l.callback=n),null!==(t=xa(e,l,r))&&(Ys(t,e,r),wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ks(),l=ka(r);l.tag=1,l.payload=t,null!=n&&(l.callback=n),null!==(t=xa(e,l,r))&&(Ys(t,e,r),wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ks(),r=ka(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=xa(e,r,n))&&(Ys(t,e,n),wa(t,e,n))}};function Si(e,t,n,r,l,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!tr(n,r)||!tr(l,a))}function Ei(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wi.enqueueReplaceState(t,t.state,null)}function Ci(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var l in n===t&&(n=c({},n)),e)void 0===n[l]&&(n[l]=e[l]);return n}function Ni(e){Tr(e)}function _i(e){console.error(e)}function Ti(e){Tr(e)}function zi(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Pi(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function ji(e,t,n){return(n=ka(n)).tag=3,n.payload={element:null},n.callback=function(){zi(e,t)},n}function Li(e){return(e=ka(e)).tag=3,e}function Di(e,t,n,r){var l=n.type.getDerivedStateFromError;if("function"==typeof l){var a=r.value;e.payload=function(){return l(a)},e.callback=function(){Pi(t,n,r)}}var o=n.stateNode;null!==o&&"function"==typeof o.componentDidCatch&&(e.callback=function(){Pi(t,n,r),"function"!=typeof l&&(null===As?As=new Set([this]):As.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Oi=Error(r(461)),Mi=!1;function Fi(e,t,n,r){t.child=null===e?ga(t,null,n,r):ha(t,e.child,n,r)}function Ri(e,t,n,r,l){n=n.render;var a=t.ref;if("ref"in r){var o={};for(var i in r)"ref"!==i&&(o[i]=r[i])}else o=r;return Dl(t),r=no(e,t,n,o,a,l),i=oo(),null===e||Mi?(pl&&i&&ul(t),t.flags|=1,Fi(e,t,r,l),t.child):(io(e,t,l),ou(e,t,l))}function Ai(e,t,n,r,l){if(null===e){var a=n.type;return"function"!=typeof a||Hr(a)||void 0!==a.defaultProps||null!==n.compare?((e=Br(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ii(e,t,a,r,l))}if(a=e.child,!iu(e,l)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:tr)(o,r)&&e.ref===t.ref)return ou(e,t,l)}return t.flags|=1,(e=Ur(a,r)).ref=t.ref,e.return=t,t.child=e}function Ii(e,t,n,r,l){if(null!==e){var a=e.memoizedProps;if(tr(a,r)&&e.ref===t.ref){if(Mi=!1,t.pendingProps=r=a,!iu(e,l))return t.lanes=e.lanes,ou(e,t,l);131072&e.flags&&(Mi=!0)}}return Qi(e,t,n,r,l)}function $i(e,t,n,r){var l=r.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(a=null!==a?a.baseLanes|n:n,null!==e){for(r=t.child=e.child,l=0;null!==r;)l=l|r.lanes|r.childLanes,r=r.sibling;r=l&~a}else r=0,t.child=null;return Ui(e,t,a,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Ui(e,t,null!==a?a.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Gl(0,null!==a?a.cachePool:null),null!==a?ja(t,a):La(),Aa(t)}else null!==a?(Gl(0,a.cachePool),ja(t,a),Ia(),t.memoizedState=null):(null!==e&&Gl(0,null),La(),Ia());return Fi(e,t,l,n),t.child}function Hi(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ui(e,t,n,r,l){var a=Yl();return a=null===a?null:{parent:$l._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},null!==e&&Gl(0,null),La(),Aa(t),null!==e&&jl(e,t,r,!0),t.childLanes=l,null}function Vi(e,t){return(t=tu({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Bi(e,t,n){return ha(t,e.child,null,n),(e=Vi(t,t.pendingProps)).flags|=2,$a(t),t.memoizedState=null,e}function qi(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(r(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Qi(e,t,n,r,l){return Dl(t),n=no(e,t,n,r,void 0,l),r=oo(),null===e||Mi?(pl&&r&&ul(t),t.flags|=1,Fi(e,t,n,l),t.child):(io(e,t,l),ou(e,t,l))}function Wi(e,t,n,r,l,a){return Dl(t),t.updateQueue=null,n=lo(t,r,n,l),ro(e),r=oo(),null===e||Mi?(pl&&r&&ul(t),t.flags|=1,Fi(e,t,n,a),t.child):(io(e,t,a),ou(e,t,a))}function Ki(e,t,n,r,l){if(Dl(t),null===t.stateNode){var a=Ar,o=n.contextType;"object"==typeof o&&null!==o&&(a=Ol(o)),a=new n(r,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=wi,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={},va(t),o=n.contextType,a.context="object"==typeof o&&null!==o?Ol(o):Ar,a.state=t.memoizedState,"function"==typeof(o=n.getDerivedStateFromProps)&&(xi(t,n,o,r),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(o=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),o!==a.state&&wi.enqueueReplaceState(a,a.state,null),Na(t,r,a,l),Ca(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var i=t.memoizedProps,u=Ci(n,i);a.props=u;var s=a.context,c=n.contextType;o=Ar,"object"==typeof c&&null!==c&&(o=Ol(c));var f=n.getDerivedStateFromProps;c="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate,i=t.pendingProps!==i,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(i||s!==o)&&Ei(t,a,r,o),ya=!1;var d=t.memoizedState;a.state=d,Na(t,r,a,l),Ca(),s=t.memoizedState,i||d!==s||ya?("function"==typeof f&&(xi(t,n,f,r),s=t.memoizedState),(u=ya||Si(t,n,u,r,d,s,o))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=o,r=u):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ba(e,t),c=Ci(n,o=t.memoizedProps),a.props=c,f=t.pendingProps,d=a.context,s=n.contextType,u=Ar,"object"==typeof s&&null!==s&&(u=Ol(s)),(s="function"==typeof(i=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==f||d!==u)&&Ei(t,a,r,u),ya=!1,d=t.memoizedState,a.state=d,Na(t,r,a,l),Ca();var p=t.memoizedState;o!==f||d!==p||ya||null!==e&&null!==e.dependencies&&Ll(e.dependencies)?("function"==typeof i&&(xi(t,n,i,r),p=t.memoizedState),(c=ya||Si(t,n,c,r,d,p,u)||null!==e&&null!==e.dependencies&&Ll(e.dependencies))?(s||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=c):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,qi(e,t),r=!!(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=ha(t,e.child,null,l),t.child=ha(t,null,n,l)):Fi(e,t,n,l),t.memoizedState=a.state,e=t.child):e=ou(e,t,l),e}function Xi(e,t,n,r){return xl(),t.flags|=256,Fi(e,t,n,r),t.child}var Yi={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gi(e){return{baseLanes:e,cachePool:Zl()}}function Zi(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=zs),e}function Ji(e,t,n){var l,a=t.pendingProps,o=!1,i=!!(128&t.flags);if((l=i)||(l=(null===e||null!==e.memoizedState)&&!!(2&Ha.current)),l&&(o=!0,t.flags&=-129),l=!!(32&t.flags),t.flags&=-33,null===e){if(pl){if(o?Fa(t):Ia(),(e=dl)?null!==(e=null!==(e=Df(e,hl))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==rl?{id:ll,overflow:al}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,fl=t,dl=null):e=null,null===e)throw yl(t);return Mf(e)?t.lanes=32:t.lanes=536870912,null}var u=a.children;return a=a.fallback,o?(Ia(),u=tu({mode:"hidden",children:u},o=t.mode),a=qr(a,o,n,null),u.return=t,a.return=t,u.sibling=a,t.child=u,(a=t.child).memoizedState=Gi(n),a.childLanes=Zi(e,l,n),t.memoizedState=Yi,Hi(null,a)):(Fa(t),eu(t,u))}var s=e.memoizedState;if(null!==s&&null!==(u=s.dehydrated)){if(i)256&t.flags?(Fa(t),t.flags&=-257,t=nu(e,t,n)):null!==t.memoizedState?(Ia(),t.child=e.child,t.flags|=128,t=null):(Ia(),u=a.fallback,o=t.mode,a=tu({mode:"visible",children:a.children},o),(u=qr(u,o,n,null)).flags|=2,a.return=t,u.return=t,a.sibling=u,t.child=a,ha(t,e.child,null,n),(a=t.child).memoizedState=Gi(n),a.childLanes=Zi(e,l,n),t.memoizedState=Yi,t=Hi(null,a));else if(Fa(t),Mf(u)){if(l=u.nextSibling&&u.nextSibling.dataset)var c=l.dgst;l=c,(a=Error(r(419))).stack="",a.digest=l,Sl({value:a,source:null,stack:null}),t=nu(e,t,n)}else if(Mi||jl(e,t,n,!1),l=0!==(n&e.childLanes),Mi||l){if(null!==(l=gs)&&(0!==(a=Re(l,n))&&a!==s.retryLane))throw s.retryLane=a,Mr(e,a),Ys(l,e,a),Oi;Of(u)||uc(),t=nu(e,t,n)}else Of(u)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,dl=Ff(u.nextSibling),fl=t,pl=!0,ml=null,hl=!1,null!==e&&cl(t,e),(t=eu(t,a.children)).flags|=4096);return t}return o?(Ia(),u=a.fallback,o=t.mode,c=(s=e.child).sibling,(a=Ur(s,{mode:"hidden",children:a.children})).subtreeFlags=65011712&s.subtreeFlags,null!==c?u=Ur(c,u):(u=qr(u,o,n,null)).flags|=2,u.return=t,a.return=t,a.sibling=u,t.child=a,Hi(null,a),a=t.child,null===(u=e.child.memoizedState)?u=Gi(n):(null!==(o=u.cachePool)?(s=$l._currentValue,o=o.parent!==s?{parent:s,pool:s}:o):o=Zl(),u={baseLanes:u.baseLanes|n,cachePool:o}),a.memoizedState=u,a.childLanes=Zi(e,l,n),t.memoizedState=Yi,Hi(e.child,a)):(Fa(t),e=(n=e.child).sibling,(n=Ur(n,{mode:"visible",children:a.children})).return=t,n.sibling=null,null!==e&&(null===(l=t.deletions)?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function eu(e,t){return(t=tu({mode:"visible",children:t},e.mode)).return=e,e.child=t}function tu(e,t){return(e=$r(22,e,null,t)).lanes=0,e}function nu(e,t,n){return ha(t,e.child,null,n),(e=eu(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ru(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),zl(e.return,t,n)}function lu(e,t,n,r,l,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l,o.treeForkCount=a)}function au(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;r=r.children;var o=Ha.current,i=!!(2&o);if(i?(o=1&o|2,t.flags|=128):o&=1,V(Ha,o),Fi(e,t,r,n),r=pl?el:0,!i&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ru(e,n,t);else if(19===e.tag)ru(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;null!==n;)null!==(e=n.alternate)&&null===Ua(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),lu(t,!1,l,n,a,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===Ua(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}lu(t,!0,n,null,a,r);break;case"together":lu(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ou(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ns|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(jl(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Ur(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ur(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function iu(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Ll(e))}function uu(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Mi=!0;else{if(!(iu(e,n)||128&t.flags))return Mi=!1,function(e,t,n){switch(t.tag){case 3:Y(t,t.stateNode.containerInfo),_l(0,$l,e.memoizedState.cache),xl();break;case 27:case 5:Z(t);break;case 4:Y(t,t.stateNode.containerInfo);break;case 10:_l(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Ra(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Fa(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Ji(e,t,n):(Fa(t),null!==(e=ou(e,t,n))?e.sibling:null);Fa(t);break;case 19:var l=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(jl(e,t,n,!1),r=0!==(n&t.childLanes)),l){if(r)return au(e,t,n);t.flags|=128}if(null!==(l=t.memoizedState)&&(l.rendering=null,l.tail=null,l.lastEffect=null),V(Ha,Ha.current),r)break;return null;case 22:return t.lanes=0,$i(e,t,n,t.pendingProps);case 24:_l(0,$l,e.memoizedState.cache)}return ou(e,t,n)}(e,t,n);Mi=!!(131072&e.flags)}else Mi=!1,pl&&1048576&t.flags&&il(t,el,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=aa(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var a=e.$$typeof;if(a===w){t.tag=11,t=Ri(null,t,e,l,n);break e}if(a===N){t.tag=14,t=Ai(null,t,e,l,n);break e}}throw t=O(e)||e,Error(r(306,t,""))}Hr(e)?(l=Ci(e,l),t.tag=1,t=Ki(null,t,e,l,n)):(t.tag=0,t=Qi(null,t,e,l,n))}return t;case 0:return Qi(e,t,t.type,t.pendingProps,n);case 1:return Ki(e,t,l=t.type,a=Ci(l,t.pendingProps),n);case 3:e:{if(Y(t,t.stateNode.containerInfo),null===e)throw Error(r(387));l=t.pendingProps;var o=t.memoizedState;a=o.element,ba(e,t),Na(t,l,null,n);var i=t.memoizedState;if(l=i.cache,_l(0,$l,l),l!==o.cache&&Pl(t,[$l],n,!0),Ca(),l=i.element,o.isDehydrated){if(o={element:l,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Xi(e,t,l,n);break e}if(l!==a){Sl(a=Yr(Error(r(424)),t)),t=Xi(e,t,l,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(dl=Ff(e.firstChild),fl=t,pl=!0,ml=null,hl=!0,n=ga(t,null,l,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(xl(),l===a){t=ou(e,t,n);break e}Fi(e,t,l,n)}t=t.child}return t;case 26:return qi(e,t),null===e?(n=Kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:pl||(n=t.type,e=t.pendingProps,(l=bf(K.current).createElement(n))[Ve]=t,l[Be]=e,hf(l,n,e),nt(l),t.stateNode=l):t.memoizedState=Kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),null===e&&pl&&(l=t.stateNode=$f(t.type,t.pendingProps,K.current),fl=t,hl=!0,a=dl,zf(t.type)?(Rf=a,dl=Ff(l.firstChild)):dl=a),Fi(e,t,t.pendingProps.children,n),qi(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&pl&&((a=l=dl)&&(null!==(l=function(e,t,n,r){for(;1===e.nodeType;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ye])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==l.rel||e.getAttribute("href")!==(null==l.href||""===l.href?null:l.href)||e.getAttribute("crossorigin")!==(null==l.crossOrigin?null:l.crossOrigin)||e.getAttribute("title")!==(null==l.title?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==l.src?null:l.src)||e.getAttribute("type")!==(null==l.type?null:l.type)||e.getAttribute("crossorigin")!==(null==l.crossOrigin?null:l.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==l.name?null:""+l.name;if("hidden"===l.type&&e.getAttribute("name")===a)return e}if(null===(e=Ff(e.nextSibling)))break}return null}(l,t.type,t.pendingProps,hl))?(t.stateNode=l,fl=t,dl=Ff(l.firstChild),hl=!1,a=!0):a=!1),a||yl(t)),Z(t),a=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,l=o.children,wf(a,o)?l=null:null!==i&&wf(a,i)&&(t.flags|=32),null!==t.memoizedState&&(a=no(e,t,ao,null,null,n),pd._currentValue=a),qi(e,t),Fi(e,t,l,n),t.child;case 6:return null===e&&pl&&((e=n=dl)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Ff(e.nextSibling)))return null}return e}(n,t.pendingProps,hl))?(t.stateNode=n,fl=t,dl=null,e=!0):e=!1),e||yl(t)),null;case 13:return Ji(e,t,n);case 4:return Y(t,t.stateNode.containerInfo),l=t.pendingProps,null===e?t.child=ha(t,null,l,n):Fi(e,t,l,n),t.child;case 11:return Ri(e,t,t.type,t.pendingProps,n);case 7:return Fi(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fi(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,_l(0,t.type,l.value),Fi(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,Dl(t),l=l(a=Ol(a)),t.flags|=1,Fi(e,t,l,n),t.child;case 14:return Ai(e,t,t.type,t.pendingProps,n);case 15:return Ii(e,t,t.type,t.pendingProps,n);case 19:return au(e,t,n);case 31:return function(e,t,n){var l=t.pendingProps,a=!!(128&t.flags);if(t.flags&=-129,null===e){if(pl){if("hidden"===l.mode)return e=Vi(t,l),t.lanes=536870912,Hi(null,e);if(Ra(t),(e=dl)?null!==(e=null!==(e=Df(e,hl))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==rl?{id:ll,overflow:al}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,fl=t,dl=null):e=null,null===e)throw yl(t);return t.lanes=536870912,null}return Vi(t,l)}var o=e.memoizedState;if(null!==o){var i=o.dehydrated;if(Ra(t),a)if(256&t.flags)t.flags&=-257,t=Bi(e,t,n);else{if(null===t.memoizedState)throw Error(r(558));t.child=e.child,t.flags|=128,t=null}else if(Mi||jl(e,t,n,!1),a=0!==(n&e.childLanes),Mi||a){if(null!==(l=gs)&&0!==(i=Re(l,n))&&i!==o.retryLane)throw o.retryLane=i,Mr(e,i),Ys(l,e,i),Oi;uc(),t=Bi(e,t,n)}else e=o.treeContext,dl=Ff(i.nextSibling),fl=t,pl=!0,ml=null,hl=!1,null!==e&&cl(t,e),(t=Vi(t,l)).flags|=4096;return t}return(e=Ur(e.child,{mode:l.mode,children:l.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return $i(e,t,n,t.pendingProps);case 24:return Dl(t),l=Ol($l),null===e?(null===(a=Yl())&&(a=gs,o=Hl(),a.pooledCache=o,o.refCount++,null!==o&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:l,cache:a},va(t),_l(0,$l,a)):(0!==(e.lanes&n)&&(ba(e,t),Na(t,null,null,n),Ca()),a=e.memoizedState,o=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),_l(0,$l,l)):(l=o.cache,_l(0,$l,l),l!==a.cache&&Pl(t,[$l],n,!0))),Fi(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function su(e){e.flags|=4}function cu(e,t,n,r,l){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&l)===l)if(e.stateNode.complete)e.flags|=8192;else{if(!ac())throw oa=na,ea;e.flags|=8192}}else e.flags&=-16777217}function fu(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!id(t)){if(!ac())throw oa=na,ea;e.flags|=8192}}function du(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Le():536870912,e.lanes|=t,Ps|=t)}function pu(e,t){if(!pl)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mu(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=65011712&l.subtreeFlags,r|=65011712&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)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 hu(e,t,n){var l=t.pendingProps;switch(sl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return mu(t),null;case 3:return n=t.stateNode,l=null,null!==e&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Tl($l),G(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(kl(t)?su(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,wl())),mu(t),null;case 26:var a=t.type,o=t.memoizedState;return null===e?(su(t),null!==o?(mu(t),fu(t,o)):(mu(t),cu(t,a,0,0,n))):o?o!==e.memoizedState?(su(t),mu(t),fu(t,o)):(mu(t),t.flags&=-16777217):((e=e.memoizedProps)!==l&&su(t),mu(t),cu(t,a,0,0,n)),null;case 27:if(J(t),n=K.current,a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==l&&su(t);else{if(!l){if(null===t.stateNode)throw Error(r(166));return mu(t),null}e=Q.current,kl(t)?vl(t):(e=$f(a,l,n),t.stateNode=e,su(t))}return mu(t),null;case 5:if(J(t),a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==l&&su(t);else{if(!l){if(null===t.stateNode)throw Error(r(166));return mu(t),null}if(o=Q.current,kl(t))vl(t);else{var i=bf(K.current);switch(o){case 1:o=i.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:o=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":o=i.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":o=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":(o=i.createElement("div")).innerHTML="<script><\\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof l.is?i.createElement("select",{is:l.is}):i.createElement("select"),l.multiple?o.multiple=!0:l.size&&(o.size=l.size);break;default:o="string"==typeof l.is?i.createElement(a,{is:l.is}):i.createElement(a)}}o[Ve]=t,o[Be]=l;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)o.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=o;e:switch(hf(o,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&su(t)}}return mu(t),cu(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==l&&su(t);else{if("string"!=typeof l&&null===t.stateNode)throw Error(r(166));if(e=K.current,kl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,null!==(a=fl))switch(a.tag){case 27:case 5:l=a.memoizedProps}e[Ve]=t,(e=!!(e.nodeValue===n||null!==l&&!0===l.suppressHydrationWarning||df(e.nodeValue,n)))||yl(t,!0)}else(e=bf(e).createTextNode(l))[Ve]=t,t.stateNode=e}return mu(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(l=kl(t),null!==n){if(null===e){if(!l)throw Error(r(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(r(557));e[Ve]=t}else xl(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;mu(t),e=!1}else n=wl(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?($a(t),t):($a(t),null);if(128&t.flags)throw Error(r(558))}return mu(t),null;case 13:if(l=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=kl(t),null!==l&&null!==l.dehydrated){if(null===e){if(!a)throw Error(r(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(r(317));a[Ve]=t}else xl(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;mu(t),a=!1}else a=wl(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?($a(t),t):($a(t),null)}return $a(t),128&t.flags?(t.lanes=n,t):(n=null!==l,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(l=t.child).alternate&&null!==l.alternate.memoizedState&&null!==l.alternate.memoizedState.cachePool&&(a=l.alternate.memoizedState.cachePool.pool),o=null,null!==l.memoizedState&&null!==l.memoizedState.cachePool&&(o=l.memoizedState.cachePool.pool),o!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),du(t,t.updateQueue),mu(t),null);case 4:return G(),null===e&&tf(t.stateNode.containerInfo),mu(t),null;case 10:return Tl(t.type),mu(t),null;case 19:if(U(Ha),null===(l=t.memoizedState))return mu(t),null;if(a=!!(128&t.flags),null===(o=l.rendering))if(a)pu(l,!1);else{if(0!==Cs||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Ua(e))){for(t.flags|=128,pu(l,!1),e=o.updateQueue,t.updateQueue=e,du(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Vr(n,e),n=n.sibling;return V(Ha,1&Ha.current|2),pl&&ol(t,l.treeForkCount),t.child}e=e.sibling}null!==l.tail&&ce()>Fs&&(t.flags|=128,a=!0,pu(l,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Ua(o))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,du(t,e),pu(l,!0),null===l.tail&&"hidden"===l.tailMode&&!o.alternate&&!pl)return mu(t),null}else 2*ce()-l.renderingStartTime>Fs&&536870912!==n&&(t.flags|=128,a=!0,pu(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=l.last)?e.sibling=o:t.child=o,l.last=o)}return null!==l.tail?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ce(),e.sibling=null,n=Ha.current,V(Ha,a?1&n|2:1&n),pl&&ol(t,l.treeForkCount),e):(mu(t),null);case 22:case 23:return $a(t),Da(),l=null!==t.memoizedState,null!==e?null!==e.memoizedState!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?!!(536870912&n)&&!(128&t.flags)&&(mu(t),6&t.subtreeFlags&&(t.flags|=8192)):mu(t),null!==(n=t.updateQueue)&&du(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),l=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),null!==e&&U(Xl),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Tl($l),mu(t),null;case 25:case 30:return null}throw Error(r(156,t.tag))}function gu(e,t){switch(sl(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Tl($l),G(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return J(t),null;case 31:if(null!==t.memoizedState){if($a(t),null===t.alternate)throw Error(r(340));xl()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if($a(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));xl()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return U(Ha),null;case 4:return G(),null;case 10:return Tl(t.type),null;case 22:case 23:return $a(t),Da(),null!==e&&U(Xl),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Tl($l),null;default:return null}}function yu(e,t){switch(sl(t),t.tag){case 3:Tl($l),G();break;case 26:case 27:case 5:J(t);break;case 4:G();break;case 31:null!==t.memoizedState&&$a(t);break;case 13:$a(t);break;case 19:U(Ha);break;case 10:Tl(t.type);break;case 22:case 23:$a(t),Da(),null!==e&&U(Xl);break;case 24:Tl($l)}}function vu(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var l=r.next;n=l;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==l)}}catch(i){Cc(t,t.return,i)}}function bu(e,t,n){try{var r=t.updateQueue,l=null!==r?r.lastEffect:null;if(null!==l){var a=l.next;r=a;do{if((r.tag&e)===e){var o=r.inst,i=o.destroy;if(void 0!==i){o.destroy=void 0,l=t;var u=n,s=i;try{s()}catch(c){Cc(l,u,c)}}}r=r.next}while(r!==a)}}catch(c){Cc(t,t.return,c)}}function ku(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ta(t,n)}catch(r){Cc(e,e.return,r)}}}function xu(e,t,n){n.props=Ci(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Cc(e,t,r)}}function wu(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(l){Cc(e,t,l)}}function Su(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(l){Cc(e,t,l)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(a){Cc(e,t,a)}else n.current=null}function Eu(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(l){Cc(e,e.return,l)}}function Cu(e,t,n){try{var l=e.stateNode;!function(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,o=null,i=null,u=null,s=null,c=null,f=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&null!=d)switch(m){case"checked":case"value":break;case"defaultValue":s=d;default:l.hasOwnProperty(m)||pf(e,t,m,null,l,d)}}for(var p in l){var m=l[p];if(d=n[p],l.hasOwnProperty(p)&&(null!=m||null!=d))switch(p){case"type":o=m;break;case"name":a=m;break;case"checked":c=m;break;case"defaultChecked":f=m;break;case"value":i=m;break;case"defaultValue":u=m;break;case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(r(137,t));break;default:m!==d&&pf(e,t,p,m,l,d)}}return void kt(e,i,u,s,c,f,o,a);case"select":for(o in m=i=u=p=null,n)if(s=n[o],n.hasOwnProperty(o)&&null!=s)switch(o){case"value":break;case"multiple":m=s;default:l.hasOwnProperty(o)||pf(e,t,o,null,l,s)}for(a in l)if(o=l[a],s=n[a],l.hasOwnProperty(a)&&(null!=o||null!=s))switch(a){case"value":p=o;break;case"defaultValue":u=o;break;case"multiple":i=o;default:o!==s&&pf(e,t,a,o,l,s)}return t=u,n=i,l=m,void(null!=p?St(e,!!n,p,!1):!!l!=!!n&&(null!=t?St(e,!!n,t,!0):St(e,!!n,n?[]:"",!1)));case"textarea":for(u in m=p=null,n)if(a=n[u],n.hasOwnProperty(u)&&null!=a&&!l.hasOwnProperty(u))switch(u){case"value":case"children":break;default:pf(e,t,u,null,l,a)}for(i in l)if(a=l[i],o=n[i],l.hasOwnProperty(i)&&(null!=a||null!=o))switch(i){case"value":p=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(r(91));break;default:a!==o&&pf(e,t,i,a,l,o)}return void Et(e,p,m);case"option":for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&null!=p&&!l.hasOwnProperty(h))if("selected"===h)e.selected=!1;else pf(e,t,h,null,l,p);for(s in l)if(p=l[s],m=n[s],l.hasOwnProperty(s)&&p!==m&&(null!=p||null!=m))if("selected"===s)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else pf(e,t,s,p,l,m);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!l.hasOwnProperty(g)&&pf(e,t,g,null,l,p);for(c in l)if(p=l[c],m=n[c],l.hasOwnProperty(c)&&p!==m&&(null!=p||null!=m))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(r(137,t));break;default:pf(e,t,c,p,l,m)}return;default:if(Pt(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!l.hasOwnProperty(y)&&mf(e,t,y,void 0,l,p);for(f in l)p=l[f],m=n[f],!l.hasOwnProperty(f)||p===m||void 0===p&&void 0===m||mf(e,t,f,p,l,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!l.hasOwnProperty(v)&&pf(e,t,v,null,l,p);for(d in l)p=l[d],m=n[d],!l.hasOwnProperty(d)||p===m||null==p&&null==m||pf(e,t,d,p,l,m)}(l,e.type,n,t),l[Be]=t}catch(a){Cc(e,e.return,a)}}function Nu(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&zf(e.type)||4===e.tag}function _u(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Nu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&zf(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Tu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Ot));else if(4!==r&&(27===r&&zf(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Tu(e,t,n),e=e.sibling;null!==e;)Tu(e,t,n),e=e.sibling}function zu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&zf(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(zu(e,t,n),e=e.sibling;null!==e;)zu(e,t,n),e=e.sibling}function Pu(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);hf(t,r,n),t[Ve]=e,t[Be]=n}catch(a){Cc(e,e.return,a)}}var ju=!1,Lu=!1,Du=!1,Ou="function"==typeof WeakSet?WeakSet:Set,Mu=null;function Fu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Yu(e,n),4&r&&vu(5,n);break;case 1:if(Yu(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(o){Cc(n,n.return,o)}else{var l=Ci(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){Cc(n,n.return,i)}}64&r&&ku(n),512&r&&wu(n,n.return);break;case 3:if(Yu(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ta(e,t)}catch(o){Cc(n,n.return,o)}}break;case 27:null===t&&4&r&&Pu(n);case 26:case 5:Yu(e,n),null===t&&4&r&&Eu(n),512&r&&wu(n,n.return);break;case 12:Yu(e,n);break;case 31:Yu(e,n),4&r&&Uu(e,n);break;case 13:Yu(e,n),4&r&&Vu(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=zc.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||ju)){t=null!==t&&null!==t.memoizedState||Lu,l=ju;var a=Lu;ju=r,(Lu=t)&&!a?Zu(e,n,!!(8772&n.subtreeFlags)):Yu(e,n),ju=l,Lu=a}break;case 30:break;default:Yu(e,n)}}function Ru(e){var t=e.alternate;null!==t&&(e.alternate=null,Ru(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ge(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Au=null,Iu=!1;function $u(e,t,n){for(n=n.child;null!==n;)Hu(e,t,n),n=n.sibling}function Hu(e,t,n){if(ke&&"function"==typeof ke.onCommitFiberUnmount)try{ke.onCommitFiberUnmount(be,n)}catch(a){}switch(n.tag){case 26:Lu||Su(n,t),$u(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Lu||Su(n,t);var r=Au,l=Iu;zf(n.type)&&(Au=n.stateNode,Iu=!1),$u(e,t,n),Hf(n.stateNode),Au=r,Iu=l;break;case 5:Lu||Su(n,t);case 6:if(r=Au,l=Iu,Au=null,$u(e,t,n),Iu=l,null!==(Au=r))if(Iu)try{(9===Au.nodeType?Au.body:"HTML"===Au.nodeName?Au.ownerDocument.body:Au).removeChild(n.stateNode)}catch(o){Cc(n,t,o)}else try{Au.removeChild(n.stateNode)}catch(o){Cc(n,t,o)}break;case 18:null!==Au&&(Iu?(Pf(9===(e=Au).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Wd(e)):Pf(Au,n.stateNode));break;case 4:r=Au,l=Iu,Au=n.stateNode.containerInfo,Iu=!0,$u(e,t,n),Au=r,Iu=l;break;case 0:case 11:case 14:case 15:bu(2,n,t),Lu||bu(4,n,t),$u(e,t,n);break;case 1:Lu||(Su(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&xu(n,t,r)),$u(e,t,n);break;case 21:$u(e,t,n);break;case 22:Lu=(r=Lu)||null!==n.memoizedState,$u(e,t,n),Lu=r;break;default:$u(e,t,n)}}function Uu(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Wd(e)}catch(n){Cc(t,t.return,n)}}}function Vu(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Wd(e)}catch(n){Cc(t,t.return,n)}}function Bu(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ou),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ou),t;default:throw Error(r(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Pc.bind(null,e,t);t.then(r,r)}})}function qu(e,t){var n=t.deletions;if(null!==n)for(var l=0;l<n.length;l++){var a=n[l],o=e,i=t,u=i;e:for(;null!==u;){switch(u.tag){case 27:if(zf(u.type)){Au=u.stateNode,Iu=!1;break e}break;case 5:Au=u.stateNode,Iu=!1;break e;case 3:case 4:Au=u.stateNode.containerInfo,Iu=!0;break e}u=u.return}if(null===Au)throw Error(r(160));Hu(o,i,a),Au=null,Iu=!1,null!==(o=a.alternate)&&(o.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Wu(t,e),t=t.sibling}var Qu=null;function Wu(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qu(t,e),Ku(e),4&l&&(bu(3,e,e.return),vu(3,e),bu(5,e,e.return));break;case 1:qu(t,e),Ku(e),512&l&&(Lu||null===n||Su(n,n.return)),64&l&&ju&&(null!==(e=e.updateQueue)&&(null!==(l=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?l:n.concat(l))));break;case 26:var a=Qu;if(qu(t,e),Ku(e),512&l&&(Lu||null===n||Su(n,n.return)),4&l){var o=null!==n?n.memoizedState:null;if(l=e.memoizedState,null===n)if(null===l)if(null===e.stateNode){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":(!(o=a.getElementsByTagName("title")[0])||o[Ye]||o[Ve]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=a.createElement(l),a.head.insertBefore(o,a.querySelector("head > title"))),hf(o,l,n),o[Ve]=e,nt(o),l=o;break e;case"link":var i=ad("link","href",a).get(l+(n.href||""));if(i)for(var u=0;u<i.length;u++)if((o=i[u]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){i.splice(u,1);break t}hf(o=a.createElement(l),l,n),a.head.appendChild(o);break;case"meta":if(i=ad("meta","content",a).get(l+(n.content||"")))for(u=0;u<i.length;u++)if((o=i[u]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){i.splice(u,1);break t}hf(o=a.createElement(l),l,n),a.head.appendChild(o);break;default:throw Error(r(468,l))}o[Ve]=e,nt(o),l=o}e.stateNode=l}else od(a,e.type,e.stateNode);else e.stateNode=ed(a,l,e.memoizedProps);else o!==l?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===l?od(a,e.type,e.stateNode):ed(a,l,e.memoizedProps)):null===l&&null!==e.stateNode&&Cu(e,e.memoizedProps,n.memoizedProps)}break;case 27:qu(t,e),Ku(e),512&l&&(Lu||null===n||Su(n,n.return)),null!==n&&4&l&&Cu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(qu(t,e),Ku(e),512&l&&(Lu||null===n||Su(n,n.return)),32&e.flags){a=e.stateNode;try{Nt(a,"")}catch(h){Cc(e,e.return,h)}}4&l&&null!=e.stateNode&&Cu(e,a=e.memoizedProps,null!==n?n.memoizedProps:a),1024&l&&(Du=!0);break;case 6:if(qu(t,e),Ku(e),4&l){if(null===e.stateNode)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(h){Cc(e,e.return,h)}}break;case 3:if(ld=null,a=Qu,Qu=Bf(t.containerInfo),qu(t,e),Qu=a,Ku(e),4&l&&null!==n&&n.memoizedState.isDehydrated)try{Wd(t.containerInfo)}catch(h){Cc(e,e.return,h)}Du&&(Du=!1,Xu(e));break;case 4:l=Qu,Qu=Bf(e.stateNode.containerInfo),qu(t,e),Ku(e),Qu=l;break;case 12:default:qu(t,e),Ku(e);break;case 31:case 19:qu(t,e),Ku(e),4&l&&(null!==(l=e.updateQueue)&&(e.updateQueue=null,Bu(e,l)));break;case 13:qu(t,e),Ku(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Os=ce()),4&l&&(null!==(l=e.updateQueue)&&(e.updateQueue=null,Bu(e,l)));break;case 22:a=null!==e.memoizedState;var s=null!==n&&null!==n.memoizedState,c=ju,f=Lu;if(ju=c||a,Lu=f||s,qu(t,e),Lu=f,ju=c,Ku(e),8192&l)e:for(t=e.stateNode,t._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===n||s||ju||Lu||Gu(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){s=n=t;try{if(o=s.stateNode,a)"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none";else{u=s.stateNode;var d=s.memoizedProps.style,p=null!=d&&d.hasOwnProperty("display")?d.display:null;u.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(h){Cc(s,s.return,h)}}}else if(6===t.tag){if(null===n){s=t;try{s.stateNode.nodeValue=a?"":s.memoizedProps}catch(h){Cc(s,s.return,h)}}}else if(18===t.tag){if(null===n){s=t;try{var m=s.stateNode;a?jf(m,!0):jf(s.stateNode,!1)}catch(h){Cc(s,s.return,h)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&l&&(null!==(l=e.updateQueue)&&(null!==(n=l.retryQueue)&&(l.retryQueue=null,Bu(e,n))));case 30:case 21:}}function Ku(e){var t=e.flags;if(2&t){try{for(var n,l=e.return;null!==l;){if(Nu(l)){n=l;break}l=l.return}if(null==n)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode;zu(e,_u(e),a);break;case 5:var o=n.stateNode;32&n.flags&&(Nt(o,""),n.flags&=-33),zu(e,_u(e),o);break;case 3:case 4:var i=n.stateNode.containerInfo;Tu(e,_u(e),i);break;default:throw Error(r(161))}}catch(u){Cc(e,e.return,u)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Xu(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Xu(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Yu(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Fu(e,t.alternate,t),t=t.sibling}function Gu(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bu(4,t,t.return),Gu(t);break;case 1:Su(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&xu(t,t.return,n),Gu(t);break;case 27:Hf(t.stateNode);case 26:case 5:Su(t,t.return),Gu(t);break;case 22:null===t.memoizedState&&Gu(t);break;default:Gu(t)}e=e.sibling}}function Zu(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,l=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Zu(l,a,n),vu(4,a);break;case 1:if(Zu(l,a,n),"function"==typeof(l=(r=a).stateNode).componentDidMount)try{l.componentDidMount()}catch(s){Cc(r,r.return,s)}if(null!==(l=(r=a).updateQueue)){var i=r.stateNode;try{var u=l.shared.hiddenCallbacks;if(null!==u)for(l.shared.hiddenCallbacks=null,l=0;l<u.length;l++)_a(u[l],i)}catch(s){Cc(r,r.return,s)}}n&&64&o&&ku(a),wu(a,a.return);break;case 27:Pu(a);case 26:case 5:Zu(l,a,n),n&&null===r&&4&o&&Eu(a),wu(a,a.return);break;case 12:Zu(l,a,n);break;case 31:Zu(l,a,n),n&&4&o&&Uu(l,a);break;case 13:Zu(l,a,n),n&&4&o&&Vu(l,a);break;case 22:null===a.memoizedState&&Zu(l,a,n),wu(a,a.return);break;case 30:break;default:Zu(l,a,n)}t=t.sibling}}function Ju(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ul(n))}function es(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ul(e))}function ts(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ns(e,t,n,r),t=t.sibling}function ns(e,t,n,r){var l=t.flags;switch(t.tag){case 0:case 11:case 15:ts(e,t,n,r),2048&l&&vu(9,t);break;case 1:case 31:case 13:default:ts(e,t,n,r);break;case 3:ts(e,t,n,r),2048&l&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ul(e)));break;case 12:if(2048&l){ts(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,i=a.onPostCommit;"function"==typeof i&&i(o,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(u){Cc(t,t.return,u)}}else ts(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,null!==t.memoizedState?2&a._visibility?ts(e,t,n,r):ls(e,t):2&a._visibility?ts(e,t,n,r):(a._visibility|=2,rs(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&l&&Ju(o,t);break;case 24:ts(e,t,n,r),2048&l&&es(t.alternate,t)}}function rs(e,t,n,r,l){for(l=l&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var a=e,o=t,i=n,u=r,s=o.flags;switch(o.tag){case 0:case 11:case 15:rs(a,o,i,u,l),vu(8,o);break;case 23:break;case 22:var c=o.stateNode;null!==o.memoizedState?2&c._visibility?rs(a,o,i,u,l):ls(a,o):(c._visibility|=2,rs(a,o,i,u,l)),l&&2048&s&&Ju(o.alternate,o);break;case 24:rs(a,o,i,u,l),l&&2048&s&&es(o.alternate,o);break;default:rs(a,o,i,u,l)}t=t.sibling}}function ls(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,l=r.flags;switch(r.tag){case 22:ls(n,r),2048&l&&Ju(r.alternate,r);break;case 24:ls(n,r),2048&l&&es(r.alternate,r);break;default:ls(n,r)}t=t.sibling}}var as=8192;function os(e,t,n){if(e.subtreeFlags&as)for(e=e.child;null!==e;)is(e,t,n),e=e.sibling}function is(e,t,n){switch(e.tag){case 26:os(e,t,n),e.flags&as&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var l=Xf(r.href),a=t.querySelector(Yf(l));if(a)return null!==(t=a._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=sd.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,void nt(a);a=t.ownerDocument||t,r=Gf(r),(l=Uf.get(l))&&nd(r,l),nt(a=a.createElement("link"));var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),hf(a,"link",r),n.instance=a}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=sd.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Qu,e.memoizedState,e.memoizedProps);break;case 5:default:os(e,t,n);break;case 3:case 4:var r=Qu;Qu=Bf(e.stateNode.containerInfo),os(e,t,n),Qu=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=as,as=16777216,os(e,t,n),as=r):os(e,t,n))}}function us(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function ss(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Mu=r,ds(r,e)}us(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)cs(e),e=e.sibling}function cs(e){switch(e.tag){case 0:case 11:case 15:ss(e),2048&e.flags&&bu(9,e,e.return);break;case 3:case 12:default:ss(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,fs(e)):ss(e)}}function fs(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Mu=r,ds(r,e)}us(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:bu(8,t,t.return),fs(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,fs(t));break;default:fs(t)}e=e.sibling}}function ds(e,t){for(;null!==Mu;){var n=Mu;switch(n.tag){case 0:case 11:case 15:bu(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Ul(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Mu=r;else e:for(n=e;null!==Mu;){var l=(r=Mu).sibling,a=r.return;if(Ru(r),r===n){Mu=null;break e}if(null!==l){l.return=a,Mu=l;break e}Mu=a}}}var ps={getCacheForType:function(e){var t=Ol($l),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ol($l).controller.signal}},ms="function"==typeof WeakMap?WeakMap:Map,hs=0,gs=null,ys=null,vs=0,bs=0,ks=null,xs=!1,ws=!1,Ss=!1,Es=0,Cs=0,Ns=0,_s=0,Ts=0,zs=0,Ps=0,js=null,Ls=null,Ds=!1,Os=0,Ms=0,Fs=1/0,Rs=null,As=null,Is=0,$s=null,Hs=null,Us=0,Vs=0,Bs=null,qs=null,Qs=0,Ws=null;function Ks(){return 2&hs&&0!==vs?vs&-vs:null!==F.T?Bc():$e()}function Xs(){if(0===zs)if(536870912&vs&&!pl)zs=536870912;else{var e=Ne;!(3932160&(Ne<<=1))&&(Ne=262144),zs=e}return null!==(e=Oa.current)&&(e.flags|=32),zs}function Ys(e,t,n){(e!==gs||2!==bs&&9!==bs)&&null===e.cancelPendingCommit||(rc(e,0),ec(e,vs,zs,!1)),Oe(e,n),2&hs&&e===gs||(e===gs&&(!(2&hs)&&(_s|=n),4===Cs&&ec(e,vs,zs,!1)),Rc(e))}function Gs(e,t,n){if(6&hs)throw Error(r(327));for(var l=!n&&!(127&t)&&0===(t&e.expiredLanes)||Pe(e,t),a=l?function(e,t){var n=hs;hs|=2;var l=oc(),a=ic();gs!==e||vs!==t?(Rs=null,Fs=ce()+500,rc(e,t)):ws=Pe(e,t);e:for(;;)try{if(0!==bs&&null!==ys){t=ys;var o=ks;t:switch(bs){case 1:bs=0,ks=null,mc(e,t,o,1);break;case 2:case 9:if(ra(o)){bs=0,ks=null,pc(t);break}t=function(){2!==bs&&9!==bs||gs!==e||(bs=7),Rc(e)},o.then(t,t);break e;case 3:bs=7;break e;case 4:bs=5;break e;case 7:ra(o)?(bs=0,ks=null,pc(t)):(bs=0,ks=null,mc(e,t,o,7));break;case 5:var i=null;switch(ys.tag){case 26:i=ys.memoizedState;case 5:case 27:var u=ys;if(i?id(i):u.stateNode.complete){bs=0,ks=null;var s=u.sibling;if(null!==s)ys=s;else{var c=u.return;null!==c?(ys=c,hc(c)):ys=null}break t}}bs=0,ks=null,mc(e,t,o,5);break;case 6:bs=0,ks=null,mc(e,t,o,6);break;case 8:nc(),Cs=6;break e;default:throw Error(r(462))}}fc();break}catch(f){lc(e,f)}return Nl=Cl=null,F.H=l,F.A=a,hs=n,null!==ys?0:(gs=null,vs=0,Lr(),Cs)}(e,t):sc(e,t,!0),o=l;;){if(0===a){ws&&!l&&ec(e,t,0,!1);break}if(n=e.current.alternate,!o||Js(n)){if(2===a){if(o=t,e.errorRecoveryDisabledLanes&o)var i=0;else i=0!==(i=-536870913&e.pendingLanes)?i:536870912&i?536870912:0;if(0!==i){t=i;e:{var u=e;a=js;var s=u.current.memoizedState.isDehydrated;if(s&&(rc(u,i).flags|=256),2!==(i=sc(u,i,!1))){if(Ss&&!s){u.errorRecoveryDisabledLanes|=o,_s|=o,a=4;break e}o=Ls,Ls=a,null!==o&&(null===Ls?Ls=o:Ls.push.apply(Ls,o))}a=i}if(o=!1,2!==a)continue}}if(1===a){rc(e,0),ec(e,t,0,!0);break}e:{switch(l=e,o=a){case 0:case 1:throw Error(r(345));case 4:if((4194048&t)!==t)break;case 6:ec(l,t,zs,!xs);break e;case 2:Ls=null;break;case 3:case 5:break;default:throw Error(r(329))}if((62914560&t)===t&&10<(a=Os+300-ce())){if(ec(l,t,zs,!xs),0!==ze(l,0,!0))break e;Us=t,l.timeoutHandle=Ef(Zs.bind(null,l,n,Ls,Rs,Ds,t,zs,_s,Ps,xs,o,"Throttled",-0,0),a)}else Zs(l,n,Ls,Rs,Ds,t,zs,_s,Ps,xs,o,null,-0,0)}break}a=sc(e,t,!1),o=!1}Rc(e)}function Zs(e,t,n,r,l,a,o,i,u,s,c,f,d,p){if(e.timeoutHandle=-1,8192&(f=t.subtreeFlags)||!(16785408&~f)){is(t,a,f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ot});var m=(62914560&a)===a?Os-ce():(4194048&a)===a?Ms-ce():0;if(null!==(m=function(e,t){return e.stylesheets&&0===e.count&&fd(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&fd(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===ud&&(ud=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var l=n[r],a=l.transferSize,o=l.initiatorType,i=l.duration;if(a&&i&&gf(o)){for(o=0,i=l.responseEnd,r+=1;r<n.length;r++){var u=n[r],s=u.startTime;if(s>i)break;var c=u.transferSize,f=u.initiatorType;c&&gf(f)&&(o+=c*((u=u.responseEnd)<i?1:(i-s)/(u-s)))}if(--r,t+=8*(a+o)/(l.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var l=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&fd(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ud?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(l)}}:null}(f,m)))return Us=a,e.cancelPendingCommit=m(yc.bind(null,e,t,a,n,r,l,o,i,u,c,f,null,d,p)),void ec(e,a,o,!s)}yc(e,t,a,n,r,l,o,i,u)}function Js(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var l=n[r],a=l.getSnapshot;l=l.value;try{if(!er(a(),l))return!1}catch(o){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ec(e,t,n,r){t&=~Ts,t&=~_s,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var l=t;0<l;){var a=31-we(l),o=1<<a;r[a]=-1,l&=~o}0!==n&&Me(e,n,t)}function tc(){return!!(6&hs)||(Ac(0),!1)}function nc(){if(null!==ys){if(0===bs)var e=ys.return;else Nl=Cl=null,uo(e=ys),sa=null,ca=0,e=ys;for(;null!==e;)yu(e.alternate,e),e=e.return;ys=null}}function rc(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,Cf(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Us=0,nc(),gs=e,ys=n=Ur(e.current,null),vs=t,bs=0,ks=null,xs=!1,ws=Pe(e,t),Ss=!1,Ps=zs=Ts=_s=Ns=Cs=0,Ls=js=null,Ds=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var l=31-we(r),a=1<<l;t|=e[l],r&=~a}return Es=t,Lr(),n}function lc(e,t){Ba=null,F.H=yi,t===Jl||t===ta?(t=ia(),bs=3):t===ea?(t=ia(),bs=4):bs=t===Oi?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,ks=t,null===ys&&(Cs=1,zi(e,Yr(t,e.current)))}function ac(){var e=Oa.current;return null===e||((4194048&vs)===vs?null===Ma:!!((62914560&vs)===vs||536870912&vs)&&e===Ma)}function oc(){var e=F.H;return F.H=yi,null===e?yi:e}function ic(){var e=F.A;return F.A=ps,e}function uc(){Cs=4,xs||(4194048&vs)!==vs&&null!==Oa.current||(ws=!0),!(134217727&Ns)&&!(134217727&_s)||null===gs||ec(gs,vs,zs,!1)}function sc(e,t,n){var r=hs;hs|=2;var l=oc(),a=ic();gs===e&&vs===t||(Rs=null,rc(e,t)),t=!1;var o=Cs;e:for(;;)try{if(0!==bs&&null!==ys){var i=ys,u=ks;switch(bs){case 8:nc(),o=6;break e;case 3:case 2:case 9:case 6:null===Oa.current&&(t=!0);var s=bs;if(bs=0,ks=null,mc(e,i,u,s),n&&ws){o=0;break e}break;default:s=bs,bs=0,ks=null,mc(e,i,u,s)}}cc(),o=Cs;break}catch(c){lc(e,c)}return t&&e.shellSuspendCounter++,Nl=Cl=null,hs=r,F.H=l,F.A=a,null===ys&&(gs=null,vs=0,Lr()),o}function cc(){for(;null!==ys;)dc(ys)}function fc(){for(;null!==ys&&!ue();)dc(ys)}function dc(e){var t=uu(e.alternate,e,Es);e.memoizedProps=e.pendingProps,null===t?hc(e):ys=t}function pc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wi(n,t,t.pendingProps,t.type,void 0,vs);break;case 11:t=Wi(n,t,t.pendingProps,t.type.render,t.ref,vs);break;case 5:uo(t);default:yu(n,t),t=uu(n,t=ys=Vr(t,Es),Es)}e.memoizedProps=e.pendingProps,null===t?hc(e):ys=t}function mc(e,t,n,l){Nl=Cl=null,uo(t),sa=null,ca=0;var a=t.return;try{if(function(e,t,n,l,a){if(n.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){if(null!==(t=n.alternate)&&jl(t,n,a,!0),null!==(n=Oa.current)){switch(n.tag){case 31:case 13:return null===Ma?uc():null===n.alternate&&0===Cs&&(Cs=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===na?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([l]):t.add(l),Nc(e,l,a)),!1;case 22:return n.flags|=65536,l===na?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([l]):n.add(l),Nc(e,l,a)),!1}throw Error(r(435,n.tag))}return Nc(e,l,a),uc(),!1}if(pl)return null!==(t=Oa.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==gl&&Sl(Yr(e=Error(r(422),{cause:l}),n))):(l!==gl&&Sl(Yr(t=Error(r(423),{cause:l}),n)),(e=e.current.alternate).flags|=65536,a&=-a,e.lanes|=a,l=Yr(l,n),Sa(e,a=ji(e.stateNode,l,a)),4!==Cs&&(Cs=2)),!1;var o=Error(r(520),{cause:l});if(o=Yr(o,n),null===js?js=[o]:js.push(o),4!==Cs&&(Cs=2),null===t)return!0;l=Yr(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,Sa(n,e=ji(n.stateNode,l,e)),!1;case 1:if(t=n.type,o=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===o||"function"!=typeof o.componentDidCatch||null!==As&&As.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,Di(a=Li(a),e,n,l),Sa(n,a),!1}n=n.return}while(null!==n);return!1}(e,a,t,n,vs))return Cs=1,zi(e,Yr(n,e.current)),void(ys=null)}catch(o){if(null!==a)throw ys=a,o;return Cs=1,zi(e,Yr(n,e.current)),void(ys=null)}32768&t.flags?(pl||1===l?e=!0:ws||536870912&vs?e=!1:(xs=e=!0,(2===l||9===l||3===l||6===l)&&(null!==(l=Oa.current)&&13===l.tag&&(l.flags|=16384))),gc(t,e)):hc(t)}function hc(e){var t=e;do{if(32768&t.flags)return void gc(t,xs);e=t.return;var n=hu(t.alternate,t,Es);if(null!==n)return void(ys=n);if(null!==(t=t.sibling))return void(ys=t);ys=t=e}while(null!==t);0===Cs&&(Cs=5)}function gc(e,t){do{var n=gu(e.alternate,e);if(null!==n)return n.flags&=32767,void(ys=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(ys=e);ys=e=n}while(null!==e);Cs=6,ys=null}function yc(e,t,n,l,a,o,i,u,s){e.cancelPendingCommit=null;do{wc()}while(0!==Is);if(6&hs)throw Error(r(327));if(null!==t){if(t===e.current)throw Error(r(177));if(o=t.lanes|t.childLanes,function(e,t,n,r,l,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var i=e.entanglements,u=e.expirationTimes,s=e.hiddenUpdates;for(n=o&~n;0<n;){var c=31-we(n),f=1<<c;i[c]=0,u[c]=-1;var d=s[c];if(null!==d)for(s[c]=null,c=0;c<d.length;c++){var p=d[c];null!==p&&(p.lane&=-536870913)}n&=~f}0!==r&&Me(e,r,0),0!==a&&0===l&&0!==e.tag&&(e.suspendedLanes|=a&~(o&~t))}(e,n,o|=jr,i,u,s),e===gs&&(ys=gs=null,vs=0),Hs=t,$s=e,Us=n,Vs=o,Bs=a,qs=l,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,oe(me,function(){return Sc(),null})):(e.callbackNode=null,e.callbackPriority=0),l=!!(13878&t.flags),13878&t.subtreeFlags||l){l=F.T,F.T=null,a=R.p,R.p=2,i=hs,hs|=4;try{!function(e,t){if(e=e.containerInfo,yf=wd,or(e=ar(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var l=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(l&&0!==l.rangeCount){n=l.anchorNode;var a=l.anchorOffset,o=l.focusNode;l=l.focusOffset;try{n.nodeType,o.nodeType}catch(g){n=null;break e}var i=0,u=-1,s=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var m;d!==n||0!==a&&3!==d.nodeType||(u=i+a),d!==o||0!==l&&3!==d.nodeType||(s=i+l),3===d.nodeType&&(i+=d.nodeValue.length),null!==(m=d.firstChild);)p=d,d=m;for(;;){if(d===e)break t;if(p===n&&++c===a&&(u=i),p===o&&++f===l&&(s=i),null!==(m=d.nextSibling))break;p=(d=p).parentNode}d=m}n=-1===u||-1===s?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(vf={focusedElem:e,selectionRange:n},wd=!1,Mu=t;null!==Mu;)if(e=(t=Mu).child,1028&t.subtreeFlags&&null!==e)e.return=t,Mu=e;else for(;null!==Mu;){switch(o=(t=Mu).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(a=e[n]).ref.impl=a.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==o){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,l=n.stateNode;try{var h=Ci(n.type,a);e=l.getSnapshotBeforeUpdate(h,o),l.__reactInternalSnapshotBeforeUpdate=e}catch(y){Cc(n,n.return,y)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Lf(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lf(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(r(163))}if(null!==(e=t.sibling)){e.return=t.return,Mu=e;break}Mu=t.return}}(e,t)}finally{hs=i,R.p=a,F.T=l}}Is=1,vc(),bc(),kc()}}function vc(){if(1===Is){Is=0;var e=$s,t=Hs,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=F.T,F.T=null;var r=R.p;R.p=2;var l=hs;hs|=4;try{Wu(t,e);var a=vf,o=ar(e.containerInfo),i=a.focusedElem,u=a.selectionRange;if(o!==i&&i&&i.ownerDocument&&lr(i.ownerDocument.documentElement,i)){if(null!==u&&or(i)){var s=u.start,c=u.end;if(void 0===c&&(c=s),"selectionStart"in i)i.selectionStart=s,i.selectionEnd=Math.min(c,i.value.length);else{var f=i.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var p=d.getSelection(),m=i.textContent.length,h=Math.min(u.start,m),g=void 0===u.end?h:Math.min(u.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var y=rr(i,h),v=rr(i,g);if(y&&v&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var b=f.createRange();b.setStart(y.node,y.offset),p.removeAllRanges(),h>g?(p.addRange(b),p.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),p.addRange(b))}}}}for(f=[],p=i;p=p.parentNode;)1===p.nodeType&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof i.focus&&i.focus(),i=0;i<f.length;i++){var k=f[i];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}wd=!!yf,vf=yf=null}finally{hs=l,R.p=r,F.T=n}}e.current=t,Is=2}}function bc(){if(2===Is){Is=0;var e=$s,t=Hs,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=F.T,F.T=null;var r=R.p;R.p=2;var l=hs;hs|=4;try{Fu(e,t.alternate,t)}finally{hs=l,R.p=r,F.T=n}}Is=3}}function kc(){if(4===Is||3===Is){Is=0,se();var e=$s,t=Hs,n=Us,r=qs;10256&t.subtreeFlags||10256&t.flags?Is=5:(Is=0,Hs=$s=null,xc(e,e.pendingLanes));var l=e.pendingLanes;if(0===l&&(As=null),Ie(n),t=t.stateNode,ke&&"function"==typeof ke.onCommitFiberRoot)try{ke.onCommitFiberRoot(be,t,void 0,!(128&~t.current.flags))}catch(u){}if(null!==r){t=F.T,l=R.p,R.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var i=r[o];a(i.value,{componentStack:i.stack})}}finally{F.T=t,R.p=l}}3&Us&&wc(),Rc(e),l=e.pendingLanes,261930&n&&42&l?e===Ws?Qs++:(Qs=0,Ws=e):Qs=0,Ac(0)}}function xc(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Ul(t)))}function wc(){return vc(),bc(),kc(),Sc()}function Sc(){if(5!==Is)return!1;var e=$s,t=Vs;Vs=0;var n=Ie(Us),l=F.T,a=R.p;try{R.p=32>n?32:n,F.T=null,n=Bs,Bs=null;var o=$s,i=Us;if(Is=0,Hs=$s=null,Us=0,6&hs)throw Error(r(331));var u=hs;if(hs|=4,cs(o.current),ns(o,o.current,i,n),hs=u,Ac(0,!1),ke&&"function"==typeof ke.onPostCommitFiberRoot)try{ke.onPostCommitFiberRoot(be,o)}catch(s){}return!0}finally{R.p=a,F.T=l,xc(e,t)}}function Ec(e,t,n){t=Yr(n,t),null!==(e=xa(e,t=ji(e.stateNode,t,2),2))&&(Oe(e,2),Rc(e))}function Cc(e,t,n){if(3===e.tag)Ec(e,e,n);else for(;null!==t;){if(3===t.tag){Ec(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===As||!As.has(r))){e=Yr(n,e),null!==(r=xa(t,n=Li(2),2))&&(Di(n,r,t,e),Oe(r,2),Rc(r));break}}t=t.return}}function Nc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ms;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(Ss=!0,l.add(n),e=_c.bind(null,e,t,n),t.then(e,e))}function _c(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gs===e&&(vs&n)===n&&(4===Cs||3===Cs&&(62914560&vs)===vs&&300>ce()-Os?!(2&hs)&&rc(e,0):Ts|=n,Ps===vs&&(Ps=0)),Rc(e)}function Tc(e,t){0===t&&(t=Le()),null!==(e=Mr(e,t))&&(Oe(e,t),Rc(e))}function zc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Tc(e,n)}function Pc(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==l&&l.delete(t),Tc(e,n)}var jc=null,Lc=null,Dc=!1,Oc=!1,Mc=!1,Fc=0;function Rc(e){e!==Lc&&null===e.next&&(null===Lc?jc=Lc=e:Lc=Lc.next=e),Oc=!0,Dc||(Dc=!0,_f(function(){6&hs?oe(de,Ic):$c()}))}function Ac(e,t){if(!Mc&&Oc){Mc=!0;do{for(var n=!1,r=jc;null!==r;){if(0!==e){var l=r.pendingLanes;if(0===l)var a=0;else{var o=r.suspendedLanes,i=r.pingedLanes;a=(1<<31-we(42|e)+1)-1,a=201326741&(a&=l&~(o&~i))?201326741&a|1:a?2|a:0}0!==a&&(n=!0,Vc(r,a))}else a=vs,!(3&(a=ze(r,r===gs?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Pe(r,a)||(n=!0,Vc(r,a));r=r.next}}while(n);Mc=!1}}function Ic(){$c()}function $c(){Oc=Dc=!1;var e=0;0!==Fc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==Sf&&(Sf=e,!0);return Sf=null,!1}()&&(e=Fc);for(var t=ce(),n=null,r=jc;null!==r;){var l=r.next,a=Hc(r,t);0===a?(r.next=null,null===n?jc=l:n.next=l,null===l&&(Lc=n)):(n=r,(0!==e||3&a)&&(Oc=!0)),r=l}0!==Is&&5!==Is||Ac(e),0!==Fc&&(Fc=0)}function Hc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var o=31-we(a),i=1<<o,u=l[o];-1===u?0!==(i&n)&&0===(i&r)||(l[o]=je(i,t)):u<=t&&(e.expiredLanes|=i),a&=~i}if(n=vs,n=ze(e,e===(t=gs)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===bs||9===bs)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Pe(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ie(r),Ie(n)){case 2:case 8:n=pe;break;case 32:default:n=me;break;case 268435456:n=ge}return r=Uc.bind(null,e),n=oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Uc(e,t){if(0!==Is&&5!==Is)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var r=vs;return 0===(r=ze(e,e===gs?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Gs(e,r,t),Hc(e,ce()),null!=e.callbackNode&&e.callbackNode===n?Uc.bind(null,e):null)}function Vc(e,t){if(wc())return null;Gs(e,t,!0)}function Bc(){if(0===Fc){var e=ql;0===e&&(e=Ce,!(261888&(Ce<<=1))&&(Ce=256)),Fc=e}return Fc}function qc(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Dt(""+e)}function Qc(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Wc=0;Wc<Nr.length;Wc++){var Kc=Nr[Wc];_r(Kc.toLowerCase(),"on"+(Kc[0].toUpperCase()+Kc.slice(1)))}_r(vr,"onAnimationEnd"),_r(br,"onAnimationIteration"),_r(kr,"onAnimationStart"),_r("dblclick","onDoubleClick"),_r("focusin","onFocus"),_r("focusout","onBlur"),_r(xr,"onTransitionRun"),_r(wr,"onTransitionStart"),_r(Sr,"onTransitionCancel"),_r(Er,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),at("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),at("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),at("onBeforeInput",["compositionend","keypress","textInput","paste"]),at("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),at("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),at("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xc="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(" "),Yc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xc));function Gc(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var i=r[o],u=i.instance,s=i.currentTarget;if(i=i.listener,u!==a&&l.isPropagationStopped())break e;a=i,l.currentTarget=s;try{a(l)}catch(c){Tr(c)}l.currentTarget=null,a=u}else for(o=0;o<r.length;o++){if(u=(i=r[o]).instance,s=i.currentTarget,i=i.listener,u!==a&&l.isPropagationStopped())break e;a=i,l.currentTarget=s;try{a(l)}catch(c){Tr(c)}l.currentTarget=null,a=u}}}}function Zc(e,t){var n=t[Qe];void 0===n&&(n=t[Qe]=new Set);var r=e+"__bubble";n.has(r)||(nf(t,e,2,!1),n.add(r))}function Jc(e,t,n){var r=0;t&&(r|=4),nf(n,e,r,t)}var ef="_reactListening"+Math.random().toString(36).slice(2);function tf(e){if(!e[ef]){e[ef]=!0,rt.forEach(function(t){"selectionchange"!==t&&(Yc.has(t)||Jc(t,!1,e),Jc(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ef]||(t[ef]=!0,Jc("selectionchange",!1,t))}}function nf(e,t,n,r){switch(zd(t)){case 2:var l=Sd;break;case 8:l=Ed;break;default:l=Cd}n=l.bind(null,t,n,e),l=void 0,!Bt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(l=!0),r?void 0!==l?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):void 0!==l?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function rf(e,t,n,r,l){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var u=r.stateNode.containerInfo;if(u===l)break;if(4===i)for(i=r.return;null!==i;){var s=i.tag;if((3===s||4===s)&&i.stateNode.containerInfo===l)return;i=i.return}for(;null!==u;){if(null===(i=Ze(u)))return;if(5===(s=i.tag)||6===s||26===s||27===s){r=o=i;continue e}u=u.parentNode}}r=r.return}Ht(function(){var r=o,l=Ft(n),i=[];e:{var u=Cr.get(e);if(void 0!==u){var s=ln,c=e;switch(e){case"keypress":if(0===Yt(n))break e;case"keydown":case"keyup":s=kn;break;case"focusin":c="focus",s=fn;break;case"focusout":c="blur",s=fn;break;case"beforeblur":case"afterblur":s=fn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=cn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=wn;break;case vr:case br:case kr:s=dn;break;case Er:s=Sn;break;case"scroll":case"scrollend":s=on;break;case"wheel":s=En;break;case"copy":case"cut":case"paste":s=pn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=xn;break;case"toggle":case"beforetoggle":s=Cn}var f=!!(4&t),d=!f&&("scroll"===e||"scrollend"===e),p=f?null!==u?u+"Capture":null:u;f=[];for(var m,h=r;null!==h;){var g=h;if(m=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===m||null===p||null!=(g=Ut(h,p))&&f.push(lf(h,g,m)),d)break;h=h.return}0<f.length&&(u=new s(u,c,null,n,l),i.push({event:u,listeners:f}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||n===Mt||!(c=n.relatedTarget||n.fromElement)||!Ze(c)&&!c[qe])&&(s||u)&&(u=l.window===l?l:(u=l.ownerDocument)?u.defaultView||u.parentWindow:window,s?(s=r,null!==(c=(c=n.relatedTarget||n.toElement)?Ze(c):null)&&(d=a(c),f=c.tag,c!==d||5!==f&&27!==f&&6!==f)&&(c=null)):(s=null,c=r),s!==c)){if(f=sn,g="onMouseLeave",p="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(f=xn,g="onPointerLeave",p="onPointerEnter",h="pointer"),d=null==s?u:et(s),m=null==c?u:et(c),(u=new f(g,h+"leave",s,n,l)).target=d,u.relatedTarget=m,g=null,Ze(l)===r&&((f=new f(p,h+"enter",c,n,l)).target=m,f.relatedTarget=d,g=f),d=g,s&&c)e:{for(f=of,h=c,m=0,g=p=s;g;g=f(g))m++;g=0;for(var y=h;y;y=f(y))g++;for(;0<m-g;)p=f(p),m--;for(;0<g-m;)h=f(h),g--;for(;m--;){if(p===h||null!==h&&p===h.alternate){f=p;break e}p=f(p),h=f(h)}f=null}else f=null;null!==s&&uf(i,u,s,f,!1),null!==c&&null!==d&&uf(i,d,c,f,!0)}if("select"===(s=(u=r?et(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var v=Vn;else if(Rn(u))if(Bn)v=Jn;else{v=Gn;var b=Yn}else!(s=u.nodeName)||"input"!==s.toLowerCase()||"checkbox"!==u.type&&"radio"!==u.type?r&&Pt(r.elementType)&&(v=Vn):v=Zn;switch(v&&(v=v(e,r))?An(i,v,n,l):(b&&b(e,u,r),"focusout"===e&&r&&"number"===u.type&&null!=r.memoizedProps.value&&wt(u,"number",u.value)),b=r?et(r):window,e){case"focusin":(Rn(b)||"true"===b.contentEditable)&&(ur=b,sr=r,cr=null);break;case"focusout":cr=sr=ur=null;break;case"mousedown":fr=!0;break;case"contextmenu":case"mouseup":case"dragend":fr=!1,dr(i,n,l);break;case"selectionchange":if(ir)break;case"keydown":case"keyup":dr(i,n,l)}var k;if(_n)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Mn?Dn(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(Pn&&"ko"!==n.locale&&(Mn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Mn&&(k=Xt()):(Wt="value"in(Qt=l)?Qt.value:Qt.textContent,Mn=!0)),0<(b=af(r,x)).length&&(x=new mn(x,e,null,n,l),i.push({event:x,listeners:b}),k?x.data=k:null!==(k=On(n))&&(x.data=k))),(k=zn?function(e,t){switch(e){case"compositionend":return On(t);case"keypress":return 32!==t.which?null:(Ln=!0,jn);case"textInput":return(e=t.data)===jn&&Ln?null:e;default:return null}}(e,n):function(e,t){if(Mn)return"compositionend"===e||!_n&&Dn(e,t)?(e=Xt(),Kt=Wt=Qt=null,Mn=!1,e):null;switch(e){case"paste":default: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 Pn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(x=af(r,"onBeforeInput")).length&&(b=new mn("onBeforeInput","beforeinput",null,n,l),i.push({event:b,listeners:x}),b.data=k)),function(e,t,n,r,l){if("submit"===t&&n&&n.stateNode===l){var a=qc((l[Be]||null).action),o=r.submitter;o&&null!==(t=(t=o[Be]||null)?qc(t.formAction):o.getAttribute("formAction"))&&(a=t,o=null);var i=new ln("action","action",null,r,l);e.push({event:i,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Fc){var e=o?Qc(l,o):new FormData(l);ri(n,{pending:!0,data:e,method:l.method,action:a},null,e)}}else"function"==typeof a&&(i.preventDefault(),e=o?Qc(l,o):new FormData(l),ri(n,{pending:!0,data:e,method:l.method,action:a},a,e))},currentTarget:l}]})}}(i,e,r,n,l)}Gc(i,t)})}function lf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function af(e,t){for(var n=t+"Capture",r=[];null!==e;){var l=e,a=l.stateNode;if(5!==(l=l.tag)&&26!==l&&27!==l||null===a||(null!=(l=Ut(e,n))&&r.unshift(lf(e,l,a)),null!=(l=Ut(e,t))&&r.push(lf(e,l,a))),3===e.tag)return r;e=e.return}return[]}function of(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function uf(e,t,n,r,l){for(var a=t._reactName,o=[];null!==n&&n!==r;){var i=n,u=i.alternate,s=i.stateNode;if(i=i.tag,null!==u&&u===r)break;5!==i&&26!==i&&27!==i||null===s||(u=s,l?null!=(s=Ut(n,a))&&o.unshift(lf(n,s,u)):l||null!=(s=Ut(n,a))&&o.push(lf(n,s,u))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var sf=/\\r\\n?/g,cf=/\\u0000|\\uFFFD/g;function ff(e){return("string"==typeof e?e:""+e).replace(sf,"\\n").replace(cf,"")}function df(e,t){return t=ff(t),ff(e)===t}function pf(e,t,n,l,a,o){switch(n){case"children":"string"==typeof l?"body"===t||"textarea"===t&&""===l||Nt(e,l):("number"==typeof l||"bigint"==typeof l)&&"body"!==t&&Nt(e,""+l);break;case"className":ft(e,"class",l);break;case"tabIndex":ft(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ft(e,n,l);break;case"style":zt(e,l,o);break;case"data":if("object"!==t){ft(e,"data",l);break}case"src":case"href":if(""===l&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==l||"function"==typeof l||"symbol"==typeof l||"boolean"==typeof l){e.removeAttribute(n);break}l=Dt(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if("function"==typeof l){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof o&&("formAction"===n?("input"!==t&&pf(e,t,"name",a.name,a,null),pf(e,t,"formEncType",a.formEncType,a,null),pf(e,t,"formMethod",a.formMethod,a,null),pf(e,t,"formTarget",a.formTarget,a,null)):(pf(e,t,"encType",a.encType,a,null),pf(e,t,"method",a.method,a,null),pf(e,t,"target",a.target,a,null))),null==l||"symbol"==typeof l||"boolean"==typeof l){e.removeAttribute(n);break}l=Dt(""+l),e.setAttribute(n,l);break;case"onClick":null!=l&&(e.onclick=Ot);break;case"onScroll":null!=l&&Zc("scroll",e);break;case"onScrollEnd":null!=l&&Zc("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=l){if("object"!=typeof l||!("__html"in l))throw Error(r(61));if(null!=(n=l.__html)){if(null!=a.children)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&"function"!=typeof l&&"symbol"!=typeof l;break;case"muted":e.muted=l&&"function"!=typeof l&&"symbol"!=typeof l;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==l||"function"==typeof l||"boolean"==typeof l||"symbol"==typeof l){e.removeAttribute("xlink:href");break}n=Dt(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=l&&"function"!=typeof l&&"symbol"!=typeof l?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&"function"!=typeof l&&"symbol"!=typeof l?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===l?e.setAttribute(n,""):!1!==l&&null!=l&&"function"!=typeof l&&"symbol"!=typeof l?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=l&&"function"!=typeof l&&"symbol"!=typeof l&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":null==l||"function"==typeof l||"symbol"==typeof l||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Zc("beforetoggle",e),Zc("toggle",e),ct(e,"popover",l);break;case"xlinkActuate":dt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":dt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":dt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":dt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":dt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":dt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":dt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":dt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":dt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ct(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ct(e,n=jt.get(n)||n,l)}}function mf(e,t,n,l,a,o){switch(n){case"style":zt(e,l,o);break;case"dangerouslySetInnerHTML":if(null!=l){if("object"!=typeof l||!("__html"in l))throw Error(r(61));if(null!=(n=l.__html)){if(null!=a.children)throw Error(r(60));e.innerHTML=n}}break;case"children":"string"==typeof l?Nt(e,l):("number"==typeof l||"bigint"==typeof l)&&Nt(e,""+l);break;case"onScroll":null!=l&&Zc("scroll",e);break;case"onScrollEnd":null!=l&&Zc("scrollend",e);break;case"onClick":null!=l&&(e.onclick=Ot);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:lt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),"function"==typeof(o=null!=(o=e[Be]||null)?o[n]:null)&&e.removeEventListener(t,o,a),"function"!=typeof l)?n in e?e[n]=l:!0===l?e.setAttribute(n,""):ct(e,n,l):("function"!=typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a)))}}function hf(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Zc("error",e),Zc("load",e);var l,a=!1,o=!1;for(l in n)if(n.hasOwnProperty(l)){var i=n[l];if(null!=i)switch(l){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:pf(e,t,l,i,n,null)}}return o&&pf(e,t,"srcSet",n.srcSet,n,null),void(a&&pf(e,t,"src",n.src,n,null));case"input":Zc("invalid",e);var u=l=i=o=null,s=null,c=null;for(a in n)if(n.hasOwnProperty(a)){var f=n[a];if(null!=f)switch(a){case"name":o=f;break;case"type":i=f;break;case"checked":s=f;break;case"defaultChecked":c=f;break;case"value":l=f;break;case"defaultValue":u=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(r(137,t));break;default:pf(e,t,a,f,n,null)}}return void xt(e,l,u,s,c,i,o,!1);case"select":for(o in Zc("invalid",e),a=i=l=null,n)if(n.hasOwnProperty(o)&&null!=(u=n[o]))switch(o){case"value":l=u;break;case"defaultValue":i=u;break;case"multiple":a=u;default:pf(e,t,o,u,n,null)}return t=l,n=i,e.multiple=!!a,void(null!=t?St(e,!!a,t,!1):null!=n&&St(e,!!a,n,!0));case"textarea":for(i in Zc("invalid",e),l=o=a=null,n)if(n.hasOwnProperty(i)&&null!=(u=n[i]))switch(i){case"value":a=u;break;case"defaultValue":o=u;break;case"children":l=u;break;case"dangerouslySetInnerHTML":if(null!=u)throw Error(r(91));break;default:pf(e,t,i,u,n,null)}return void Ct(e,a,o,l);case"option":for(s in n)if(n.hasOwnProperty(s)&&null!=(a=n[s]))if("selected"===s)e.selected=a&&"function"!=typeof a&&"symbol"!=typeof a;else pf(e,t,s,a,n,null);return;case"dialog":Zc("beforetoggle",e),Zc("toggle",e),Zc("cancel",e),Zc("close",e);break;case"iframe":case"object":Zc("load",e);break;case"video":case"audio":for(a=0;a<Xc.length;a++)Zc(Xc[a],e);break;case"image":Zc("error",e),Zc("load",e);break;case"details":Zc("toggle",e);break;case"embed":case"source":case"link":Zc("error",e),Zc("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(a=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:pf(e,t,c,a,n,null)}return;default:if(Pt(t)){for(f in n)n.hasOwnProperty(f)&&(void 0!==(a=n[f])&&mf(e,t,f,a,n,void 0));return}}for(u in n)n.hasOwnProperty(u)&&(null!=(a=n[u])&&pf(e,t,u,a,n,null))}function gf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var yf=null,vf=null;function bf(e){return 9===e.nodeType?e:e.ownerDocument}function kf(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xf(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function wf(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Sf=null;var Ef="function"==typeof setTimeout?setTimeout:void 0,Cf="function"==typeof clearTimeout?clearTimeout:void 0,Nf="function"==typeof Promise?Promise:void 0,_f="function"==typeof queueMicrotask?queueMicrotask:void 0!==Nf?function(e){return Nf.resolve(null).then(e).catch(Tf)}:Ef;function Tf(e){setTimeout(function(){throw e})}function zf(e){return"head"===e}function Pf(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&8===l.nodeType)if("/$"===(n=l.data)||"/&"===n){if(0===r)return e.removeChild(l),void Wd(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Hf(e.ownerDocument.documentElement);else if("head"===n){Hf(n=e.ownerDocument.head);for(var a=n.firstChild;a;){var o=a.nextSibling,i=a.nodeName;a[Ye]||"SCRIPT"===i||"STYLE"===i||"LINK"===i&&"stylesheet"===a.rel.toLowerCase()||n.removeChild(a),a=o}}else"body"===n&&Hf(e.ownerDocument.body);n=l}while(n);Wd(t)}function jf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Lf(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Lf(n),Ge(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Df(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Ff(e.nextSibling)))return null}return e}function Of(e){return"$?"===e.data||"$~"===e.data}function Mf(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Ff(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Rf=null;function Af(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Ff(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function If(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function $f(e,t,n){switch(t=bf(n),e){case"html":if(!(e=t.documentElement))throw Error(r(452));return e;case"head":if(!(e=t.head))throw Error(r(453));return e;case"body":if(!(e=t.body))throw Error(r(454));return e;default:throw Error(r(451))}}function Hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ge(e)}var Uf=new Map,Vf=new Set;function Bf(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var qf=R.d;R.d={f:function(){var e=qf.f(),t=tc();return e||t},r:function(e){var t=Je(e);null!==t&&5===t.tag&&"form"===t.type?ai(t):qf.r(e)},D:function(e){qf.D(e),Wf("dns-prefetch",e,null)},C:function(e,t){qf.C(e,t),Wf("preconnect",e,t)},L:function(e,t,n){qf.L(e,t,n);var r=Qf;if(r&&e&&t){var l='link[rel="preload"][as="'+bt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(l+='[imagesrcset="'+bt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(l+='[imagesizes="'+bt(n.imageSizes)+'"]')):l+='[href="'+bt(e)+'"]';var a=l;switch(t){case"style":a=Xf(e);break;case"script":a=Zf(e)}Uf.has(a)||(e=c({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Uf.set(a,e),null!==r.querySelector(l)||"style"===t&&r.querySelector(Yf(a))||"script"===t&&r.querySelector(Jf(a))||(hf(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}},m:function(e,t){qf.m(e,t);var n=Qf;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",l='link[rel="modulepreload"][as="'+bt(r)+'"][href="'+bt(e)+'"]',a=l;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Zf(e)}if(!Uf.has(a)&&(e=c({rel:"modulepreload",href:e},t),Uf.set(a,e),null===n.querySelector(l))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Jf(a)))return}hf(r=n.createElement("link"),"link",e),nt(r),n.head.appendChild(r)}}},X:function(e,t){qf.X(e,t);var n=Qf;if(n&&e){var r=tt(n).hoistableScripts,l=Zf(e),a=r.get(l);a||((a=n.querySelector(Jf(l)))||(e=c({src:e,async:!0},t),(t=Uf.get(l))&&rd(e,t),nt(a=n.createElement("script")),hf(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(l,a))}},S:function(e,t,n){qf.S(e,t,n);var r=Qf;if(r&&e){var l=tt(r).hoistableStyles,a=Xf(e);t=t||"default";var o=l.get(a);if(!o){var i={loading:0,preload:null};if(o=r.querySelector(Yf(a)))i.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Uf.get(a))&&nd(e,n);var u=o=r.createElement("link");nt(u),hf(u,"link",e),u._p=new Promise(function(e,t){u.onload=e,u.onerror=t}),u.addEventListener("load",function(){i.loading|=1}),u.addEventListener("error",function(){i.loading|=2}),i.loading|=4,td(o,t,r)}o={type:"stylesheet",instance:o,count:1,state:i},l.set(a,o)}}},M:function(e,t){qf.M(e,t);var n=Qf;if(n&&e){var r=tt(n).hoistableScripts,l=Zf(e),a=r.get(l);a||((a=n.querySelector(Jf(l)))||(e=c({src:e,async:!0,type:"module"},t),(t=Uf.get(l))&&rd(e,t),nt(a=n.createElement("script")),hf(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(l,a))}}};var Qf="undefined"==typeof document?null:document;function Wf(e,t,n){var r=Qf;if(r&&"string"==typeof t&&t){var l=bt(t);l='link[rel="'+e+'"][href="'+l+'"]',"string"==typeof n&&(l+='[crossorigin="'+n+'"]'),Vf.has(l)||(Vf.add(l),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(l)&&(hf(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}}function Kf(e,t,n,l){var a,o,i,u,s=(s=K.current)?Bf(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Xf(n.href),(l=(n=tt(s).hoistableStyles).get(t))||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Xf(n.href);var c=tt(s).hoistableStyles,f=c.get(e);if(f||(s=s.ownerDocument||s,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,f),(c=s.querySelector(Yf(e)))&&!c._p&&(f.instance=c,f.state.loading=5),Uf.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Uf.set(e,n),c||(a=s,o=e,i=n,u=f.state,a.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=a.createElement("link"),u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2}),hf(o,"link",i),nt(o),a.head.appendChild(o))))),t&&null===l)throw Error(r(528,""));return f}if(t&&null!==l)throw Error(r(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Zf(n),(l=(n=tt(s).hoistableScripts).get(t))||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Xf(e){return'href="'+bt(e)+'"'}function Yf(e){return'link[rel="stylesheet"]['+e+"]"}function Gf(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function Zf(e){return'[src="'+bt(e)+'"]'}function Jf(e){return"script[async]"+e}function ed(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+bt(n.href)+'"]');if(l)return t.instance=l,nt(l),l;var a=c({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return nt(l=(e.ownerDocument||e).createElement("style")),hf(l,"style",a),td(l,n.precedence,e),t.instance=l;case"stylesheet":a=Xf(n.href);var o=e.querySelector(Yf(a));if(o)return t.state.loading|=4,t.instance=o,nt(o),o;l=Gf(n),(a=Uf.get(a))&&nd(l,a),nt(o=(e.ownerDocument||e).createElement("link"));var i=o;return i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),hf(o,"link",l),t.state.loading|=4,td(o,n.precedence,e),t.instance=o;case"script":return o=Zf(n.src),(a=e.querySelector(Jf(o)))?(t.instance=a,nt(a),a):(l=n,(a=Uf.get(o))&&rd(l=c({},n),a),nt(a=(e=e.ownerDocument||e).createElement("script")),hf(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(l=t.instance,t.state.loading|=4,td(l,n.precedence,e));return t.instance}function td(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=r.length?r[r.length-1]:null,a=l,o=0;o<r.length;o++){var i=r[o];if(i.dataset.precedence===t)a=i;else if(a!==l)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function nd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function rd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var ld=null;function ad(e,t,n){if(null===ld){var r=new Map,l=ld=new Map;l.set(n,r)}else(r=(l=ld).get(n))||(r=new Map,l.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var a=n[l];if(!(a[Ye]||a[Ve]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var o=a.getAttribute(t)||"";o=e+o;var i=r.get(o);i?i.push(a):r.set(o,[a])}}return r}function od(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function id(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var ud=0;function sd(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)fd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var cd=null;function fd(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,cd=new Map,t.forEach(dd,e),cd=null,sd.call(e))}function dd(e,t){if(!(4&t.state.loading)){var n=cd.get(e);if(n)var r=n.get(null);else{n=new Map,cd.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<l.length;a++){var o=l[a];"LINK"!==o.nodeName&&"not all"===o.getAttribute("media")||(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}o=(l=t.instance).getAttribute("data-precedence"),(a=n.get(o)||r)===r&&n.set(null,l),n.set(o,l),this.count++,r=sd.bind(this),l.addEventListener("load",r),l.addEventListener("error",r),a?a.parentNode.insertBefore(l,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(l,e.firstChild),t.state.loading|=4}}var pd={$$typeof:x,Provider:null,Consumer:null,_currentValue:A,_currentValue2:A,_threadCount:0};function md(e,t,n,r,l,a,o,i,u){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=De(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=De(0),this.hiddenUpdates=De(null),this.identifierPrefix=r,this.onUncaughtError=l,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function hd(e,t,n,r,l,a,o,i,u,s,c,f){return e=new md(e,t,n,o,u,s,c,f,i),t=1,!0===a&&(t|=24),a=$r(3,null,null,t),e.current=a,a.stateNode=e,(t=Hl()).refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},va(a),e}function gd(e){return e?e=Ar:Ar}function yd(e,t,n,r,l,a){l=gd(l),null===r.context?r.context=l:r.pendingContext=l,(r=ka(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=xa(e,r,t))&&(Ys(n,0,t),wa(n,e,t))}function vd(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function bd(e,t){vd(e,t),(e=e.alternate)&&vd(e,t)}function kd(e){if(13===e.tag||31===e.tag){var t=Mr(e,67108864);null!==t&&Ys(t,0,67108864),bd(e,67108864)}}function xd(e){if(13===e.tag||31===e.tag){var t=Ks(),n=Mr(e,t=Ae(t));null!==n&&Ys(n,0,t),bd(e,t)}}var wd=!0;function Sd(e,t,n,r){var l=F.T;F.T=null;var a=R.p;try{R.p=2,Cd(e,t,n,r)}finally{R.p=a,F.T=l}}function Ed(e,t,n,r){var l=F.T;F.T=null;var a=R.p;try{R.p=8,Cd(e,t,n,r)}finally{R.p=a,F.T=l}}function Cd(e,t,n,r){if(wd){var l=Nd(r);if(null===l)rf(e,t,r,_d,n),Ad(e,r);else if(function(e,t,n,r,l){switch(t){case"focusin":return jd=Id(jd,e,t,n,r,l),!0;case"dragenter":return Ld=Id(Ld,e,t,n,r,l),!0;case"mouseover":return Dd=Id(Dd,e,t,n,r,l),!0;case"pointerover":var a=l.pointerId;return Od.set(a,Id(Od.get(a)||null,e,t,n,r,l)),!0;case"gotpointercapture":return a=l.pointerId,Md.set(a,Id(Md.get(a)||null,e,t,n,r,l)),!0}return!1}(l,e,t,n,r))r.stopPropagation();else if(Ad(e,r),4&t&&-1<Rd.indexOf(e)){for(;null!==l;){var a=Je(l);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var o=Te(a.pendingLanes);if(0!==o){var i=a;for(i.pendingLanes|=2,i.entangledLanes|=2;o;){var u=1<<31-we(o);i.entanglements[1]|=u,o&=~u}Rc(a),!(6&hs)&&(Fs=ce()+500,Ac(0))}}break;case 31:case 13:null!==(i=Mr(a,2))&&Ys(i,0,2),tc(),bd(a,2)}if(null===(a=Nd(r))&&rf(e,t,r,_d,n),a===l)break;l=a}null!==l&&r.stopPropagation()}else rf(e,t,r,null,n)}}function Nd(e){return Td(e=Ft(e))}var _d=null;function Td(e){if(_d=null,null!==(e=Ze(e))){var t=a(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=o(t)))return e;e=null}else if(31===n){if(null!==(e=i(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _d=e,null}function zd(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(fe()){case de:return 2;case pe:return 8;case me:case he:return 32;case ge:return 268435456;default:return 32}default:return 32}}var Pd=!1,jd=null,Ld=null,Dd=null,Od=new Map,Md=new Map,Fd=[],Rd="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".split(" ");function Ad(e,t){switch(e){case"focusin":case"focusout":jd=null;break;case"dragenter":case"dragleave":Ld=null;break;case"mouseover":case"mouseout":Dd=null;break;case"pointerover":case"pointerout":Od.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Md.delete(t.pointerId)}}function Id(e,t,n,r,l,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[l]},null!==t&&(null!==(t=Je(t))&&kd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==l&&-1===t.indexOf(l)&&t.push(l),e)}function $d(e){var t=Ze(e.target);if(null!==t){var n=a(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=o(n)))return e.blockedOn=t,void He(e.priority,function(){xd(n)})}else if(31===t){if(null!==(t=i(n)))return e.blockedOn=t,void He(e.priority,function(){xd(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Hd(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Nd(e.nativeEvent);if(null!==n)return null!==(t=Je(n))&&kd(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Mt=r,n.target.dispatchEvent(r),Mt=null,t.shift()}return!0}function Ud(e,t,n){Hd(e)&&n.delete(t)}function Vd(){Pd=!1,null!==jd&&Hd(jd)&&(jd=null),null!==Ld&&Hd(Ld)&&(Ld=null),null!==Dd&&Hd(Dd)&&(Dd=null),Od.forEach(Ud),Md.forEach(Ud)}function Bd(t,n){t.blockedOn===n&&(t.blockedOn=null,Pd||(Pd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Vd)))}var qd=null;function Qd(t){qd!==t&&(qd=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qd===t&&(qd=null);for(var e=0;e<t.length;e+=3){var n=t[e],r=t[e+1],l=t[e+2];if("function"!=typeof r){if(null===Td(r||n))continue;break}var a=Je(n);null!==a&&(t.splice(e,3),e-=3,ri(a,{pending:!0,data:l,method:n.method,action:r},r,l))}}))}function Wd(e){function t(t){return Bd(t,e)}null!==jd&&Bd(jd,e),null!==Ld&&Bd(Ld,e),null!==Dd&&Bd(Dd,e),Od.forEach(t),Md.forEach(t);for(var n=0;n<Fd.length;n++){var r=Fd[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Fd.length&&null===(n=Fd[0]).blockedOn;)$d(n),null===n.blockedOn&&Fd.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var l=n[r],a=n[r+1],o=l[Be]||null;if("function"==typeof a)o||Qd(n);else if(o){var i=null;if(a&&a.hasAttribute("formAction")){if(l=a,o=a[Be]||null)i=o.formAction;else if(null!==Td(l))continue}else i=o.action;"function"==typeof i?n[r+1]=i:(n.splice(r,3),r-=3),Qd(n)}}}function Kd(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return l=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==l&&(l(),l=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==l&&(l(),l=null)}}}function Xd(e){this._internalRoot=e}function Yd(e){this._internalRoot=e}Yd.prototype.render=Xd.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));yd(t.current,Ks(),e,t,null,null)},Yd.prototype.unmount=Xd.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;yd(e.current,2,null,e,null,null),tc(),t[qe]=null}},Yd.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fd.length&&0!==t&&t<Fd[n].priority;n++);Fd.splice(n,0,e),0===n&&$d(e)}};var Gd=t.version;if("19.2.4"!==Gd)throw Error(r(527,Gd,"19.2.4"));R.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=a(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(l=o.return)){n=l;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return u(o),e;if(i===l)return u(o),t;i=i.sibling}throw Error(r(188))}if(n.return!==l.return)n=o,l=i;else{for(var s=!1,c=o.child;c;){if(c===n){s=!0,n=o,l=i;break}if(c===l){s=!0,l=o,n=i;break}c=c.sibling}if(!s){for(c=i.child;c;){if(c===n){s=!0,n=i,l=o;break}if(c===l){s=!0,l=i,n=o;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?s(e):null)?null:e.stateNode};var Zd={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Jd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jd.isDisabled&&Jd.supportsFiber)try{be=Jd.inject(Zd),ke=Jd}catch(tp){}}return y.createRoot=function(e,t){if(!l(e))throw Error(r(299));var n=!1,a="",o=Ni,i=_i,u=Ti;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onUncaughtError&&(o=t.onUncaughtError),void 0!==t.onCaughtError&&(i=t.onCaughtError),void 0!==t.onRecoverableError&&(u=t.onRecoverableError)),t=hd(e,1,!1,null,0,n,a,null,o,i,u,Kd),e[qe]=t.current,tf(e),new Xd(t)},y.hydrateRoot=function(e,t,n){if(!l(e))throw Error(r(299));var a=!1,o="",i=Ni,u=_i,s=Ti,c=null;return null!=n&&(!0===n.unstable_strictMode&&(a=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onUncaughtError&&(i=n.onUncaughtError),void 0!==n.onCaughtError&&(u=n.onCaughtError),void 0!==n.onRecoverableError&&(s=n.onRecoverableError),void 0!==n.formState&&(c=n.formState)),(t=hd(e,1,!0,t,0,a,o,c,i,u,s,Kd)).context=gd(null),n=t.current,(o=ka(a=Ae(a=Ks()))).callback=null,xa(n,o,a),n=a,t.current.lanes=n,Oe(t,n),Rc(t),e[qe]=t.current,tf(e),new Yd(t)},y.version="19.2.4",y}var P=(E||(E=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),g.exports=z()),g.exports);const j=e=>{let t;const n=new Set,r=(e,r)=>{const l="function"==typeof e?e(t):e;if(!Object.is(l,t)){const e=t;t=(null!=r?r:"object"!=typeof l||null===l)?l:Object.assign({},t,l),n.forEach(n=>n(t,e))}},l=()=>t,a={setState:r,getState:l,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,l,a);return a},L=e=>e;const D=e=>{const t=(e=>e?j(e):j)(e),n=e=>function(e,t=L){const n=p.useSyncExternalStore(e.subscribe,p.useCallback(()=>t(e.getState()),[e,t]),p.useCallback(()=>t(e.getInitialState()),[e,t]));return p.useDebugValue(n),n}(t,e);return Object.assign(n,t),n};async function O(e){const t=await fetch(\`\${e}\`);if(!t.ok)throw new Error(\`\${t.status} \${t.statusText}\`);return t.json()}async function M(e,t){const n=await fetch(\`\${e}\`,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const e=await n.json().catch(()=>({}));throw new Error(e.message??\`\${n.status} \${n.statusText}\`)}return n.json()}const F={"15m":9e5,"30m":18e5,"1h":36e5,"12h":432e5,"24h":864e5},R=(A=e=>({sessions:[],milestones:[],config:null,loading:!0,timeTravelTime:null,timeScale:(()=>{try{const e=localStorage.getItem("useai-time-scale");if(e&&["15m","30m","1h","12h","24h"].includes(e))return e}catch{}return"1h"})(),filters:{category:"all",client:"all",project:"all"},loadAll:async()=>{try{const[t,n,r]=await Promise.all([O("/api/local/sessions"),O("/api/local/milestones"),O("/api/local/config")]);e({sessions:t,milestones:n,config:r,loading:!1})}catch{e({loading:!1})}},setTimeTravelTime:t=>e({timeTravelTime:t}),setTimeScale:t=>{try{localStorage.setItem("useai-time-scale",t)}catch{}e({timeScale:t})},setFilter:(t,n)=>e(e=>({filters:{...e.filters,[t]:n}}))}))?D(A):D;var A;function I(e){if(0===e.length)return 0;const t=new Set;for(const o of e)t.add(o.started_at.slice(0,10));const n=[...t].sort().reverse();if(0===n.length)return 0;const r=(new Date).toISOString().slice(0,10),l=new Date(Date.now()-864e5).toISOString().slice(0,10);if(n[0]!==r&&n[0]!==l)return 0;let a=1;for(let o=1;o<n.length;o++){const e=new Date(n[o-1]),t=new Date(n[o]);if(1!==(e.getTime()-t.getTime())/864e5)break;a++}return a}const $={"claude-code":"Claude Code",cursor:"Cursor",copilot:"GitHub Copilot",windsurf:"Windsurf","github-copilot":"GitHub Copilot",aider:"Aider",continue:"Continue",cody:"Sourcegraph Cody",tabby:"TabbyML",roo:"Roo Code"},H={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"};function U({label:e,value:t,decimals:n=0,unit:r}){const l=d.useRef(null),a=d.useRef(0);return d.useEffect(()=>{l.current&&t!==a.current&&(!function(e,t,n){let r=null;requestAnimationFrame(function l(a){r||(r=a);const o=Math.min((a-r)/600,1),i=1-Math.pow(1-o,3),u=0+(t-0)*i;e.textContent=n>0?u.toFixed(n):String(Math.round(u)),o<1&&requestAnimationFrame(l)})}(l.current,t,n),a.current=t)},[t,n]),i.jsxs("div",{className:"bg-bg-surface-1 border border-border rounded-lg p-4",children:[i.jsx("div",{className:"text-xs text-text-muted uppercase tracking-wider mb-1",children:e}),i.jsxs("div",{className:"font-mono text-2xl font-bold text-accent",children:[i.jsx("span",{ref:l,children:n>0?t.toFixed(n):t}),r&&i.jsx("span",{className:"text-sm text-text-muted font-normal ml-1",children:r})]})]})}function V({totalHours:e,totalSessions:t,currentStreak:n,filesTouched:r}){return i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:[i.jsx(U,{label:"Total Hours",value:e,decimals:1}),i.jsx(U,{label:"Sessions",value:t}),i.jsx(U,{label:"Current Streak",value:n,unit:"days"}),i.jsx(U,{label:"Files Touched",value:r})]})}function B({title:e,data:t,formatValue:n=e=>\`\${function(e){const t=e/3600;return t<.1?t.toFixed(2):t.toFixed(1)}(e)}h\`,color:r="var(--color-accent)"}){const l=Object.entries(t).sort((e,t)=>t[1]-e[1]);if(0===l.length)return null;const a=l[0][1];return i.jsxs("div",{className:"bg-bg-surface-1 border border-border rounded-lg p-5 mb-4",children:[i.jsx("h2",{className:"text-xs text-text-muted uppercase tracking-wider font-semibold mb-4",children:e}),i.jsx("div",{className:"space-y-2.5",children:l.map(([e,t])=>{const l=a>0?t/a*100:0;return i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[i.jsx("span",{className:"font-mono text-text-primary",children:e}),i.jsx("span",{className:"font-mono text-text-secondary",children:n(t)})]}),i.jsx("div",{className:"h-2 bg-bg-base rounded-full overflow-hidden",children:i.jsx("div",{className:"h-full rounded-full transition-all duration-600",style:{width:\`\${l}%\`,backgroundColor:r}})})]},e)})})]})}function q({data:e,onDayClick:t,highlightDate:n}){const r=d.useMemo(()=>Math.max(...e.map(e=>e.hours),.1),[e]);return 0===e.length?null:i.jsxs("div",{className:"bg-bg-surface-1 border border-border rounded-lg p-5 mb-4",children:[i.jsx("h2",{className:"text-xs text-text-muted uppercase tracking-wider font-semibold mb-4",children:"Daily Activity (Last 30 Days)"}),i.jsx("div",{className:"flex items-end gap-[3px] h-24",children:e.map(e=>{const l=r>0?e.hours/r*100:0,a=e.date===n,o=new Date(e.date+"T12:00:00").toLocaleDateString([],{weekday:"short"});return i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[i.jsx("div",{className:"absolute -top-8 left-1/2 -translate-x-1/2 hidden group-hover:block z-10",children:i.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1 rounded shadow-lg whitespace-nowrap border border-border",children:[e.date," \u2014 ",e.hours.toFixed(1),"h"]})}),i.jsx("div",{className:"w-full rounded-t cursor-pointer transition-all duration-200 hover:opacity-80",style:{height:\`\${Math.max(l,e.hours>0?4:0)}%\`,minHeight:e.hours>0?"2px":"0px",backgroundColor:a?"var(--color-accent-bright)":e.hours>0?\`rgba(212, 160, 74, \${.3+e.hours/r*.7})\`:"var(--color-bg-surface-2)"},onClick:()=>t?.(e.date),title:\`\${o} \${e.date}: \${e.hours.toFixed(1)}h\`})]},e.date)})}),i.jsx("div",{className:"flex gap-[3px] mt-1",children:e.map((e,t)=>i.jsx("div",{className:"flex-1 text-center",children:t%7==0&&i.jsx("span",{className:"text-[9px] text-text-muted font-mono",children:e.date.slice(5)})},e.date))})]})}function Q({label:e,value:t,options:n,onChange:r}){return i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("label",{className:"text-xs text-text-muted uppercase tracking-wider",children:e}),i.jsxs("select",{value:t,onChange:e=>r(e.target.value),className:"bg-bg-surface-2 border border-border rounded px-2 py-1 text-sm text-text-primary font-mono outline-none focus:border-accent cursor-pointer",children:[i.jsx("option",{value:"all",children:"All"}),n.map(e=>i.jsx("option",{value:e,children:e},e))]})]})}function W({filters:e,onFilterChange:t,categories:n,clients:r,projects:l}){return i.jsxs("div",{className:"flex flex-wrap items-center gap-4 mb-4",children:[i.jsx(Q,{label:"Category",value:e.category,options:n,onChange:e=>t("category",e)}),i.jsx(Q,{label:"Client",value:e.client,options:r,onChange:e=>t("client",e)}),l.length>0&&i.jsx(Q,{label:"Project",value:e.project,options:l,onChange:e=>t("project",e)})]})}
1888
+ */function j(){if(S)return y;S=1;var e=x(),t=d(),n=N();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function i(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function a(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function o(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function s(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function l(e){if(a(e)!==e)throw Error(r(188))}function u(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=u(e)))return t;e=e.sibling}return null}var c=Object.assign,f=Symbol.for("react.element"),h=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var D=Symbol.for("react.client.reference");function R(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===D?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case m:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case E:return"Suspense";case T:return"SuspenseList";case j:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case p:return"Portal";case w:return e.displayName||"Context";case b:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case C:return null!==(t=e.displayName||null)?t:R(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return R(e(t))}catch(n){}}return null}var _=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},V=[],I=-1;function B(e){return{current:e}}function U(e){0>I||(e.current=V[I],V[I]=null,I--)}function $(e,t){I++,V[I]=e.current,e.current=t}var H,W,q=B(null),Y=B(null),X=B(null),K=B(null);function Q(e,t){switch($(X,t),$(Y,e),$(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=xd(t=bd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(q),$(q,e)}function G(){U(q),U(Y),U(X)}function Z(e){null!==e.memoizedState&&$(K,e);var t=q.current,n=xd(t,e.type);t!==n&&($(Y,e),$(q,n))}function J(e){Y.current===e&&(U(q),U(Y)),K.current===e&&(U(K),hf._currentValue=F)}function ee(e){if(void 0===H)try{throw Error()}catch(n){var t=n.stack.trim().match(/\\n( *(at )?)/);H=t&&t[1]||"",W=-1<n.stack.indexOf("\\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\\n"+H+e+W}var te=!1;function ne(e,t){if(!e||te)return"";te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(i){var r=i}Reflect.construct(e,[],n)}else{try{n.call()}catch(a){r=a}e.call(n.prototype)}}else{try{throw Error()}catch(o){r=o}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(s){if(s&&r&&"string"==typeof s.stack)return[s.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var l=o.split("\\n"),u=s.split("\\n");for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===u.length)for(r=l.length-1,i=u.length-1;1<=r&&0<=i&&l[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==u[i]){if(1!==r||1!==i)do{if(r--,0>--i||l[r]!==u[i]){var c="\\n"+l[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=i);break}}}finally{te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ee(n):""}function re(e,t){switch(e.tag){case 26:case 27:case 5:return ee(e.type);case 16:return ee("Lazy");case 13:return e.child!==t&&null!==t?ee("Suspense Fallback"):ee("Suspense");case 19:return ee("SuspenseList");case 0:case 15:return ne(e.type,!1);case 11:return ne(e.type.render,!1);case 1:return ne(e.type,!0);case 31:return ee("Activity");default:return""}}function ie(e){try{var t="",n=null;do{t+=re(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\\nError generating stack: "+r.message+"\\n"+r.stack}}var ae=Object.prototype.hasOwnProperty,oe=e.unstable_scheduleCallback,se=e.unstable_cancelCallback,le=e.unstable_shouldYield,ue=e.unstable_requestPaint,ce=e.unstable_now,de=e.unstable_getCurrentPriorityLevel,fe=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,pe=e.unstable_NormalPriority,me=e.unstable_LowPriority,ge=e.unstable_IdlePriority,ye=e.log,ve=e.unstable_setDisableYieldValue,be=null,xe=null;function we(e){if("function"==typeof ye&&ve(e),xe&&"function"==typeof xe.setStrictMode)try{xe.setStrictMode(be,e)}catch(t){}}var ke=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(Se(e)/Ee|0)|0},Se=Math.log,Ee=Math.LN2;var Te=256,Ce=262144,Pe=4194304;function Ne(e){var t=42&e;if(0!==t)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function je(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~a)?i=Ne(r):0!==(o&=s)?i=Ne(o):n||0!==(n=s&~e)&&(i=Ne(n)):0!==(s=r&~a)?i=Ne(s):0!==o?i=Ne(o):n||0!==(n=r&~e)&&(i=Ne(n)),0===i?0:0!==t&&t!==i&&0===(t&a)&&((a=i&-i)>=(n=t&-t)||32===a&&4194048&n)?t:i}function Me(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Le(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ae(){var e=Pe;return!(62914560&(Pe<<=1))&&(Pe=4194304),e}function De(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Re(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ke(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ke(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Oe(e,t){var n=t&-t;return 0!==((n=42&n?1:Fe(n))&(e.suspendedLanes|t))?0:n}function Fe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ve(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Ie(){var e=O.p;return 0!==e?e:void 0===(e=window.event)?32:jf(e.type)}function Be(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var Ue=Math.random().toString(36).slice(2),$e="__reactFiber$"+Ue,He="__reactProps$"+Ue,We="__reactContainer$"+Ue,qe="__reactEvents$"+Ue,Ye="__reactListeners$"+Ue,Xe="__reactHandles$"+Ue,Ke="__reactResources$"+Ue,Qe="__reactMarker$"+Ue;function Ge(e){delete e[$e],delete e[He],delete e[qe],delete e[Ye],delete e[Xe]}function Ze(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[We]||n[$e]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Fd(e);null!==e;){if(n=e[$e])return n;e=Fd(e)}return t}n=(e=n).parentNode}return null}function Je(e){if(e=e[$e]||e[We]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function et(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(r(33))}function tt(e){var t=e[Ke];return t||(t=e[Ke]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[Qe]=!0}var rt=new Set,it={};function at(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(it[e]=t,e=0;e<t.length;e++)rt.add(t[e])}var st=RegExp("^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$"),lt={},ut={};function ct(e,t,n){if(i=t,ae.call(ut,i)||!ae.call(lt,i)&&(st.test(i)?ut[i]=!0:(lt[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function dt(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ft(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function ht(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function pt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function mt(e){if(!e._valueTracker){var t=pt(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function yt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var vt=/[\\n"\\\\]/g;function bt(e){return e.replace(vt,function(e){return"\\\\"+e.charCodeAt(0).toString(16)+" "})}function xt(e,t,n,r,i,a,o,s){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+ht(t)):e.value!==""+ht(t)&&(e.value=""+ht(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?kt(e,o,ht(t)):null!=n?kt(e,o,ht(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=a&&(e.defaultChecked=!!a),null!=i&&(e.checked=i&&"function"!=typeof i&&"symbol"!=typeof i),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+ht(s):e.removeAttribute("name")}function wt(e,t,n,r,i,a,o,s){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return void mt(e);n=null!=n?""+ht(n):"",t=null!=t?""+ht(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:i)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o),mt(e)}function kt(e,t,n){"number"===t&&yt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function St(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ht(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Et(e,t,n){null==t||((t=""+ht(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+ht(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Tt(e,t,n,i){if(null==t){if(null!=i){if(null!=n)throw Error(r(92));if(_(i)){if(1<i.length)throw Error(r(93));i=i[0]}n=i}null==n&&(n=""),t=n}n=ht(t),e.defaultValue=n,(i=e.textContent)===n&&""!==i&&null!==i&&(e.value=i),mt(e)}function Ct(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Pt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Nt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||Pt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function jt(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(r(62));if(e=e.style,null!=n){for(var i in n)!n.hasOwnProperty(i)||null!=t&&t.hasOwnProperty(i)||(0===i.indexOf("--")?e.setProperty(i,""):"float"===i?e.cssFloat="":e[i]="");for(var a in t)i=t[a],t.hasOwnProperty(a)&&n[a]!==i&&Nt(e,a,i)}else for(var o in t)t.hasOwnProperty(o)&&Nt(e,o,t[o])}function Mt(e){if(-1===e.indexOf("-"))return!1;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 Lt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),At=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function Dt(e){return At.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Rt(){}var _t=null;function zt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ot=null,Ft=null;function Vt(e){var t=Je(e);if(t&&(e=t.stateNode)){var n=e[He]||null;e:switch(e=t.stateNode,t.type){case"input":if(xt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+bt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=i[He]||null;if(!a)throw Error(r(90));xt(i,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)(i=n[t]).form===e.form&&gt(i)}break e;case"textarea":Et(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&St(e,!!n.multiple,t,!1)}}}var It=!1;function Bt(e,t,n){if(It)return e(t,n);It=!0;try{return e(t)}finally{if(It=!1,(null!==Ot||null!==Ft)&&(tc(),Ot&&(t=Ot,e=Ft,Ft=Ot=null,Vt(t),e)))for(t=0;t<e.length;t++)Vt(e[t])}}function Ut(e,t){var n=e.stateNode;if(null===n)return null;var i=n[He]||null;if(null===i)return null;n=i[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":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var $t=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Ht=!1;if($t)try{var Wt={};Object.defineProperty(Wt,"passive",{get:function(){Ht=!0}}),window.addEventListener("test",Wt,Wt),window.removeEventListener("test",Wt,Wt)}catch(eh){Ht=!1}var qt=null,Yt=null,Xt=null;function Kt(){if(Xt)return Xt;var e,t,n=Yt,r=n.length,i="value"in qt?qt.value:qt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Xt=i.slice(e,1<t?1-t:void 0)}function Qt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Gt(){return!0}function Zt(){return!1}function Jt(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Gt:Zt,this.isPropagationStopped=Zt,this}return c(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Gt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Gt)},persist:function(){},isPersistent:Gt}),t}var en,tn,nn,rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=Jt(rn),on=c({},rn,{view:0,detail:0}),sn=Jt(on),ln=c({},on,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nn&&(nn&&"mousemove"===e.type?(en=e.screenX-nn.screenX,tn=e.screenY-nn.screenY):tn=en=0,nn=e),en)},movementY:function(e){return"movementY"in e?e.movementY:tn}}),un=Jt(ln),cn=Jt(c({},ln,{dataTransfer:0})),dn=Jt(c({},on,{relatedTarget:0})),fn=Jt(c({},rn,{animationName:0,elapsedTime:0,pseudoElement:0})),hn=Jt(c({},rn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),pn=Jt(c({},rn,{data:0})),mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gn={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"},yn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=yn[e])&&!!t[e]}function bn(){return vn}var xn=Jt(c({},on,{key:function(e){if(e.key){var t=mn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Qt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?gn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bn,charCode:function(e){return"keypress"===e.type?Qt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Qt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),wn=Jt(c({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=Jt(c({},on,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bn})),Sn=Jt(c({},rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),En=Jt(c({},ln,{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})),Tn=Jt(c({},rn,{newState:0,oldState:0})),Cn=[9,13,27,32],Pn=$t&&"CompositionEvent"in window,Nn=null;$t&&"documentMode"in document&&(Nn=document.documentMode);var jn=$t&&"TextEvent"in window&&!Nn,Mn=$t&&(!Pn||Nn&&8<Nn&&11>=Nn),Ln=String.fromCharCode(32),An=!1;function Dn(e,t){switch(e){case"keyup":return-1!==Cn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var _n=!1;var zn={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 On(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zn[e.type]:"textarea"===t}function Fn(e,t,n,r){Ot?Ft?Ft.push(r):Ft=[r]:Ot=r,0<(t=ad(t,"onChange")).length&&(n=new an("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,In=null;function Bn(e){Gc(e,0)}function Un(e){if(gt(et(e)))return e}function $n(e,t){if("change"===e)return t}var Hn=!1;if($t){var Wn;if($t){var qn="oninput"in document;if(!qn){var Yn=document.createElement("div");Yn.setAttribute("oninput","return;"),qn="function"==typeof Yn.oninput}Wn=qn}else Wn=!1;Hn=Wn&&(!document.documentMode||9<document.documentMode)}function Xn(){Vn&&(Vn.detachEvent("onpropertychange",Kn),In=Vn=null)}function Kn(e){if("value"===e.propertyName&&Un(In)){var t=[];Fn(t,In,e,zt(e)),Bt(Bn,t)}}function Qn(e,t,n){"focusin"===e?(Xn(),In=n,(Vn=t).attachEvent("onpropertychange",Kn)):"focusout"===e&&Xn()}function Gn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Un(In)}function Zn(e,t){if("click"===e)return Un(t)}function Jn(e,t){if("input"===e||"change"===e)return Un(t)}var er="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function tr(e,t){if(er(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 i=n[r];if(!ae.call(t,i)||!er(e[i],t[i]))return!1}return!0}function nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rr(e,t){var n,r=nr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nr(r)}}function ir(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ir(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ar(e){for(var t=yt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=yt((e=t.contentWindow).document)}return t}function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var sr=$t&&"documentMode"in document&&11>=document.documentMode,lr=null,ur=null,cr=null,dr=!1;function fr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;dr||null==lr||lr!==yt(r)||("selectionStart"in(r=lr)&&or(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},cr&&tr(cr,r)||(cr=r,0<(r=ad(ur,"onSelect")).length&&(t=new an("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lr)))}function hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pr={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionrun:hr("Transition","TransitionRun"),transitionstart:hr("Transition","TransitionStart"),transitioncancel:hr("Transition","TransitionCancel"),transitionend:hr("Transition","TransitionEnd")},mr={},gr={};function yr(e){if(mr[e])return mr[e];if(!pr[e])return e;var t,n=pr[e];for(t in n)if(n.hasOwnProperty(t)&&t in gr)return mr[e]=n[t];return e}$t&&(gr=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);var vr=yr("animationend"),br=yr("animationiteration"),xr=yr("animationstart"),wr=yr("transitionrun"),kr=yr("transitionstart"),Sr=yr("transitioncancel"),Er=yr("transitionend"),Tr=new Map,Cr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){Tr.set(e,t),at(t,[e])}Cr.push("scrollEnd");var Nr="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},jr=[],Mr=0,Lr=0;function Ar(){for(var e=Mr,t=Lr=Mr=0;t<e;){var n=jr[t];jr[t++]=null;var r=jr[t];jr[t++]=null;var i=jr[t];jr[t++]=null;var a=jr[t];if(jr[t++]=null,null!==r&&null!==i){var o=r.pending;null===o?i.next=i:(i.next=o.next,o.next=i),r.pending=i}0!==a&&zr(n,i,a)}}function Dr(e,t,n,r){jr[Mr++]=e,jr[Mr++]=t,jr[Mr++]=n,jr[Mr++]=r,Lr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Rr(e,t,n,r){return Dr(e,t,n,r),Or(e)}function _r(e,t){return Dr(e,null,null,t),Or(e)}function zr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(i=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,i&&null!==t&&(i=31-ke(n),null===(r=(e=a.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),a):null}function Or(e){if(50<qu)throw qu=0,Yu=null,Error(r(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Fr={};function Vr(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.refCleanup=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 Ir(e,t,n,r){return new Vr(e,t,n,r)}function Br(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ur(e,t){var n=e.alternate;return null===n?((n=Ir(e.tag,t,e.key,e.mode)).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=65011712&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function $r(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hr(e,t,n,i,a,o){var s=0;if(i=e,"function"==typeof e)Br(e)&&(s=1);else if("string"==typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,q.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case j:return(e=Ir(31,n,t,a)).elementType=j,e.lanes=o,e;case m:return Wr(n.children,a,o,t);case g:s=8,a|=24;break;case v:return(e=Ir(12,n,t,2|a)).elementType=v,e.lanes=o,e;case E:return(e=Ir(13,n,t,a)).elementType=E,e.lanes=o,e;case T:return(e=Ir(19,n,t,a)).elementType=T,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:s=10;break e;case b:s=9;break e;case k:s=11;break e;case C:s=14;break e;case P:s=16,i=null;break e}s=29,n=Error(r(130,null===e?"null":typeof e,"")),i=null}return(t=Ir(s,n,t,a)).elementType=e,t.type=i,t.lanes=o,t}function Wr(e,t,n,r){return(e=Ir(7,e,r,t)).lanes=n,e}function qr(e,t,n){return(e=Ir(6,e,null,t)).lanes=n,e}function Yr(e){var t=Ir(18,null,null,0);return t.stateNode=e,t}function Xr(e,t,n){return(t=Ir(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kr=new WeakMap;function Qr(e,t){if("object"==typeof e&&null!==e){var n=Kr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ie(t)},Kr.set(e,t),t)}return{value:e,source:t,stack:ie(t)}}var Gr=[],Zr=0,Jr=null,ei=0,ti=[],ni=0,ri=null,ii=1,ai="";function oi(e,t){Gr[Zr++]=ei,Gr[Zr++]=Jr,Jr=e,ei=t}function si(e,t,n){ti[ni++]=ii,ti[ni++]=ai,ti[ni++]=ri,ri=e;var r=ii;e=ai;var i=32-ke(r)-1;r&=~(1<<i),n+=1;var a=32-ke(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ii=1<<32-ke(t)+i|n<<i|r,ai=a+e}else ii=1<<a|n<<i|r,ai=e}function li(e){null!==e.return&&(oi(e,1),si(e,1,0))}function ui(e){for(;e===Jr;)Jr=Gr[--Zr],Gr[Zr]=null,ei=Gr[--Zr],Gr[Zr]=null;for(;e===ri;)ri=ti[--ni],ti[ni]=null,ai=ti[--ni],ti[ni]=null,ii=ti[--ni],ti[ni]=null}function ci(e,t){ti[ni++]=ii,ti[ni++]=ai,ti[ni++]=ri,ii=t.id,ai=t.overflow,ri=e}var di=null,fi=null,hi=!1,pi=null,mi=!1,gi=Error(r(519));function yi(e){throw Si(Qr(Error(r(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),gi}function vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[$e]=e,t[He]=r,n){case"dialog":Zc("cancel",t),Zc("close",t);break;case"iframe":case"object":case"embed":Zc("load",t);break;case"video":case"audio":for(n=0;n<Kc.length;n++)Zc(Kc[n],t);break;case"source":Zc("error",t);break;case"img":case"image":case"link":Zc("error",t),Zc("load",t);break;case"details":Zc("toggle",t);break;case"input":Zc("invalid",t),wt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Zc("invalid",t);break;case"textarea":Zc("invalid",t),Tt(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||dd(t.textContent,n)?(null!=r.popover&&(Zc("beforetoggle",t),Zc("toggle",t)),null!=r.onScroll&&Zc("scroll",t),null!=r.onScrollEnd&&Zc("scrollend",t),null!=r.onClick&&(t.onclick=Rt),t=!0):t=!1,t||yi(e,!0)}function bi(e){for(di=e.return;di;)switch(di.tag){case 5:case 31:case 13:return void(mi=!1);case 27:case 3:return void(mi=!0);default:di=di.return}}function xi(e){if(e!==di)return!1;if(!hi)return bi(e),hi=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||wd(e.type,e.memoizedProps)),t=!t),t&&fi&&yi(e),bi(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));fi=Od(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));fi=Od(e)}else 27===n?(n=fi,Nd(e.type)?(e=zd,zd=null,fi=e):fi=n):fi=di?_d(e.stateNode.nextSibling):null;return!0}function wi(){fi=di=null,hi=!1}function ki(){var e=pi;return null!==e&&(null===Au?Au=e:Au.push.apply(Au,e),pi=null),e}function Si(e){null===pi?pi=[e]:pi.push(e)}var Ei=B(null),Ti=null,Ci=null;function Pi(e,t,n){$(Ei,t._currentValue),t._currentValue=n}function Ni(e){e._currentValue=Ei.current,U(Ei)}function ji(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mi(e,t,n,i){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var o=a.dependencies;if(null!==o){var s=a.child;o=o.firstContext;e:for(;null!==o;){var l=o;o=a;for(var u=0;u<t.length;u++)if(l.context===t[u]){o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),ji(o.return,n,e),i||(s=null);break e}o=l.next}}else if(18===a.tag){if(null===(s=a.return))throw Error(r(341));s.lanes|=n,null!==(o=s.alternate)&&(o.lanes|=n),ji(s,n,e),s=null}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===e){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}}function Li(e,t,n,i){e=null;for(var a=t,o=!1;null!==a;){if(!o)if(524288&a.flags)o=!0;else if(262144&a.flags)break;if(10===a.tag){var s=a.alternate;if(null===s)throw Error(r(387));if(null!==(s=s.memoizedProps)){var l=a.type;er(a.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(a===K.current){if(null===(s=a.alternate))throw Error(r(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(hf):e=[hf])}a=a.return}null!==e&&Mi(t,e,n,i),t.flags|=262144}function Ai(e){for(e=e.firstContext;null!==e;){if(!er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Di(e){Ti=e,Ci=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ri(e){return zi(Ti,e)}function _i(e,t){return null===Ti&&Di(e),zi(e,t)}function zi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Ci){if(null===e)throw Error(r(308));Ci=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ci=Ci.next=t;return n}var Oi="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Fi=e.unstable_scheduleCallback,Vi=e.unstable_NormalPriority,Ii={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bi(){return{controller:new Oi,data:new Map,refCount:0}}function Ui(e){e.refCount--,0===e.refCount&&Fi(Vi,function(){e.controller.abort()})}var $i=null,Hi=0,Wi=0,qi=null;function Yi(){if(0===--Hi&&null!==$i){null!==qi&&(qi.status="fulfilled");var e=$i;$i=null,Wi=0,qi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Xi=z.S;z.S=function(e,t){_u=ce(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===$i){var n=$i=[];Hi=0,Wi=Hc(),qi={status:"pending",value:void 0,then:function(e){n.push(e)}}}Hi++,t.then(Yi,Yi)}(0,t),null!==Xi&&Xi(e,t)};var Ki=B(null);function Qi(){var e=Ki.current;return null!==e?e:gu.pooledCache}function Gi(e,t){$(Ki,null===t?Ki.current:t.pool)}function Zi(){var e=Qi();return null===e?null:{parent:Ii._currentValue,pool:e}}var Ji=Error(r(460)),ea=Error(r(474)),ta=Error(r(542)),na={then:function(){}};function ra(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ia(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Rt,Rt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw la(e=t.reason),e;default:if("string"==typeof t.status)t.then(Rt,Rt);else{if(null!==(e=gu)&&100<e.shellSuspendCounter)throw Error(r(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw la(e=t.reason),e}throw oa=t,Ji}}function aa(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"==typeof t&&"function"==typeof t.then)throw oa=t,Ji;throw t}}var oa=null;function sa(){if(null===oa)throw Error(r(459));var e=oa;return oa=null,e}function la(e){if(e===Ji||e===ta)throw Error(r(483))}var ua=null,ca=0;function da(e){var t=ca;return ca+=1,null===ua&&(ua=[]),ia(ua,e,t)}function fa(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function ha(e,t){if(t.$$typeof===f)throw Error(r(525));throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function pa(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function a(e,t){return(e=Ur(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=qr(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function u(e,t,n,r){var i=n.type;return i===m?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===P&&aa(i)===t.type)?(fa(t=a(t,n.props),n),t.return=e,t):(fa(t=Hr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Xr(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Wr(n,e.mode,r,i)).return=e,t):((t=a(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=qr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case h:return fa(n=Hr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case p:return(t=Xr(t,e.mode,n)).return=e,t;case P:return f(e,t=aa(t),n)}if(_(t)||A(t))return(t=Wr(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,da(t),n);if(t.$$typeof===w)return f(e,_i(e,t),n);ha(e,t)}return null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case h:return n.key===i?u(e,t,n,r):null;case p:return n.key===i?c(e,t,n,r):null;case P:return g(e,t,n=aa(n),r)}if(_(n)||A(n))return null!==i?null:d(e,t,n,r,null);if("function"==typeof n.then)return g(e,t,da(n),r);if(n.$$typeof===w)return g(e,t,_i(e,n),r);ha(e,n)}return null}function y(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case h:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case p:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return y(e,t,n,r=aa(r),i)}if(_(r)||A(r))return d(t,e=e.get(n)||null,r,i,null);if("function"==typeof r.then)return y(e,t,n,da(r),i);if(r.$$typeof===w)return y(e,t,n,_i(t,r),i);ha(t,r)}return null}function v(l,u,c,d){if("object"==typeof c&&null!==c&&c.type===m&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case h:e:{for(var b=c.key;null!==u;){if(u.key===b){if((b=c.type)===m){if(7===u.tag){n(l,u.sibling),(d=a(u,c.props.children)).return=l,l=d;break e}}else if(u.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===P&&aa(b)===u.type){n(l,u.sibling),fa(d=a(u,c.props),c),d.return=l,l=d;break e}n(l,u);break}t(l,u),u=u.sibling}c.type===m?((d=Wr(c.props.children,l.mode,d,c.key)).return=l,l=d):(fa(d=Hr(c.type,c.key,c.props,null,l.mode,d),c),d.return=l,l=d)}return s(l);case p:e:{for(b=c.key;null!==u;){if(u.key===b){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(d=a(u,c.children||[])).return=l,l=d;break e}n(l,u);break}t(l,u),u=u.sibling}(d=Xr(c,l.mode,d)).return=l,l=d}return s(l);case P:return v(l,u,c=aa(c),d)}if(_(c))return function(r,a,s,l){for(var u=null,c=null,d=a,h=a=0,p=null;null!==d&&h<s.length;h++){d.index>h?(p=d,d=null):p=d.sibling;var m=g(r,d,s[h],l);if(null===m){null===d&&(d=p);break}e&&d&&null===m.alternate&&t(r,d),a=o(m,a,h),null===c?u=m:c.sibling=m,c=m,d=p}if(h===s.length)return n(r,d),hi&&oi(r,h),u;if(null===d){for(;h<s.length;h++)null!==(d=f(r,s[h],l))&&(a=o(d,a,h),null===c?u=d:c.sibling=d,c=d);return hi&&oi(r,h),u}for(d=i(d);h<s.length;h++)null!==(p=y(d,r,h,s[h],l))&&(e&&null!==p.alternate&&d.delete(null===p.key?h:p.key),a=o(p,a,h),null===c?u=p:c.sibling=p,c=p);return e&&d.forEach(function(e){return t(r,e)}),hi&&oi(r,h),u}(l,u,c,d);if(A(c)){if("function"!=typeof(b=A(c)))throw Error(r(150));return function(a,s,l,u){if(null==l)throw Error(r(151));for(var c=null,d=null,h=s,p=s=0,m=null,v=l.next();null!==h&&!v.done;p++,v=l.next()){h.index>p?(m=h,h=null):m=h.sibling;var b=g(a,h,v.value,u);if(null===b){null===h&&(h=m);break}e&&h&&null===b.alternate&&t(a,h),s=o(b,s,p),null===d?c=b:d.sibling=b,d=b,h=m}if(v.done)return n(a,h),hi&&oi(a,p),c;if(null===h){for(;!v.done;p++,v=l.next())null!==(v=f(a,v.value,u))&&(s=o(v,s,p),null===d?c=v:d.sibling=v,d=v);return hi&&oi(a,p),c}for(h=i(h);!v.done;p++,v=l.next())null!==(v=y(h,a,p,v.value,u))&&(e&&null!==v.alternate&&h.delete(null===v.key?p:v.key),s=o(v,s,p),null===d?c=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),hi&&oi(a,p),c}(l,u,c=b.call(c),d)}if("function"==typeof c.then)return v(l,u,da(c),d);if(c.$$typeof===w)return v(l,u,_i(l,c),d);ha(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(d=a(u,c)).return=l,l=d):(n(l,u),(d=qr(c,l.mode,d)).return=l,l=d),s(l)):n(l,u)}return function(e,t,n,r){try{ca=0;var i=v(e,t,n,r);return ua=null,i}catch(o){if(o===Ji||o===ta)throw o;var a=Ir(29,o,null,e.mode);return a.lanes=r,a.return=e,a}}}var ma=pa(!0),ga=pa(!1),ya=!1;function va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ba(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wa(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&mu){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Or(e),zr(e,null,n),t}return Dr(e,r,t,n),Or(e)}function ka(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,ze(e,n)}}function Sa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ea=!1;function Ta(){if(Ea){if(null!==qi)throw qi}}function Ca(e,t,n,r){Ea=!1;var i=e.updateQueue;ya=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===o?a=u:o.next=u,o=l;var d=e.alternate;null!==d&&((s=(d=d.updateQueue).lastBaseUpdate)!==o&&(null===s?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=l))}if(null!==a){var f=i.baseState;for(o=0,d=u=l=null,s=a;;){var h=-536870913&s.lane,p=h!==s.lane;if(p?(vu&h)===h:(r&h)===h){0!==h&&h===Wi&&(Ea=!0),null!==d&&(d=d.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var m=e,g=s;h=t;var y=n;switch(g.tag){case 1:if("function"==typeof(m=g.payload)){f=m.call(y,f,h);break e}f=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(h="function"==typeof(m=g.payload)?m.call(y,f,h):m))break e;f=c({},f,h);break e;case 2:ya=!0}}null!==(h=s.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=i.callbacks)?i.callbacks=[h]:p.push(h))}else p={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(u=d=p,l=f):d=d.next=p,o|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}null===d&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,null===a&&(i.shared.lanes=0),Cu|=o,e.lanes=o,e.memoizedState=f}}function Pa(e,t){if("function"!=typeof e)throw Error(r(191,e));e.call(t)}function Na(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Pa(n[e],t)}var ja=B(null),Ma=B(0);function La(e,t){$(Ma,e=Eu),$(ja,t),Eu=e|t.baseLanes}function Aa(){$(Ma,Eu),$(ja,ja.current)}function Da(){Eu=Ma.current,U(ja),U(Ma)}var Ra=B(null),_a=null;function za(e){var t=e.alternate;$(Ba,1&Ba.current),$(Ra,e),null===_a&&(null===t||null!==ja.current||null!==t.memoizedState)&&(_a=e)}function Oa(e){$(Ba,Ba.current),$(Ra,e),null===_a&&(_a=e)}function Fa(e){22===e.tag?($(Ba,Ba.current),$(Ra,e),null===_a&&(_a=e)):Va()}function Va(){$(Ba,Ba.current),$(Ra,Ra.current)}function Ia(e){U(Ra),_a===e&&(_a=null),U(Ba)}var Ba=B(0);function Ua(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Dd(n)||Rd(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $a=0,Ha=null,Wa=null,qa=null,Ya=!1,Xa=!1,Ka=!1,Qa=0,Ga=0,Za=null,Ja=0;function eo(){throw Error(r(321))}function to(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function no(e,t,n,r,i,a){return $a=a,Ha=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=null===e||null===e.memoizedState?vs:bs,Ka=!1,a=n(r,i),Ka=!1,Xa&&(a=io(t,n,r,i)),ro(e),a}function ro(e){z.H=ys;var t=null!==Wa&&null!==Wa.next;if($a=0,qa=Wa=Ha=null,Ya=!1,Ga=0,Za=null,t)throw Error(r(300));null===e||_s||null!==(e=e.dependencies)&&Ai(e)&&(_s=!0)}function io(e,t,n,i){Ha=e;var a=0;do{if(Xa&&(Za=null),Ga=0,Xa=!1,25<=a)throw Error(r(301));if(a+=1,qa=Wa=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}z.H=xs,o=t(n,i)}while(Xa);return o}function ao(){var e=z.H,t=e.useState()[0];return t="function"==typeof t.then?fo(t):t,e=e.useState()[0],(null!==Wa?Wa.memoizedState:null)!==e&&(Ha.flags|=1024),t}function oo(){var e=0!==Qa;return Qa=0,e}function so(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function lo(e){if(Ya){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Ya=!1}$a=0,qa=Wa=Ha=null,Xa=!1,Ga=Qa=0,Za=null}function uo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qa?Ha.memoizedState=qa=e:qa=qa.next=e,qa}function co(){if(null===Wa){var e=Ha.alternate;e=null!==e?e.memoizedState:null}else e=Wa.next;var t=null===qa?Ha.memoizedState:qa.next;if(null!==t)qa=t,Wa=e;else{if(null===e){if(null===Ha.alternate)throw Error(r(467));throw Error(r(310))}e={memoizedState:(Wa=e).memoizedState,baseState:Wa.baseState,baseQueue:Wa.baseQueue,queue:Wa.queue,next:null},null===qa?Ha.memoizedState=qa=e:qa=qa.next=e}return qa}function fo(e){var t=Ga;return Ga+=1,null===Za&&(Za=[]),e=ia(Za,e,t),t=Ha,null===(null===qa?t.memoizedState:qa.next)&&(t=t.alternate,z.H=null===t||null===t.memoizedState?vs:bs),e}function ho(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return fo(e);if(e.$$typeof===w)return Ri(e)}throw Error(r(438,String(e)))}function po(e){var t=null,n=Ha.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Ha.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=M;return t.index++,n}function mo(e,t){return"function"==typeof t?t(e):t}function go(e){return yo(co(),Wa,e)}function yo(e,t,n){var i=e.queue;if(null===i)throw Error(r(311));i.lastRenderedReducer=n;var a=e.baseQueue,o=i.pending;if(null!==o){if(null!==a){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,i.pending=null}if(o=e.baseState,null===a)e.memoizedState=o;else{var l=s=null,u=null,c=t=a.next,d=!1;do{var f=-536870913&c.lane;if(f!==c.lane?(vu&f)===f:($a&f)===f){var h=c.revertLane;if(0===h)null!==u&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),f===Wi&&(d=!0);else{if(($a&h)===h){c=c.next,h===Wi&&(d=!0);continue}f={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=f,s=o):u=u.next=f,Ha.lanes|=h,Cu|=h}f=c.action,Ka&&n(o,f),o=c.hasEagerState?c.eagerState:n(o,f)}else h={lane:f,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=h,s=o):u=u.next=h,Ha.lanes|=f,Cu|=f;c=c.next}while(null!==c&&c!==t);if(null===u?s=o:u.next=l,!er(o,e.memoizedState)&&(_s=!0,d&&null!==(n=qi)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=u,i.lastRenderedState=o}return null===a&&(i.lanes=0),[e.memoizedState,i.dispatch]}function vo(e){var t=co(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var s=a=a.next;do{o=e(o,s.action),s=s.next}while(s!==a);er(o,t.memoizedState)||(_s=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function bo(e,t,n){var i=Ha,a=co(),o=hi;if(o){if(void 0===n)throw Error(r(407));n=n()}else n=t();var s=!er((Wa||a).memoizedState,n);if(s&&(a.memoizedState=n,_s=!0),a=a.queue,Ho(ko.bind(null,i,a,e),[e]),a.getSnapshot!==t||s||null!==qa&&1&qa.memoizedState.tag){if(i.flags|=2048,Vo(9,{destroy:void 0},wo.bind(null,i,a,n,t),null),null===gu)throw Error(r(349));o||127&$a||xo(i,t,n)}return n}function xo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ha.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function wo(e,t,n,r){t.value=n,t.getSnapshot=r,So(t)&&Eo(e)}function ko(e,t,n){return n(function(){So(t)&&Eo(e)})}function So(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch(r){return!0}}function Eo(e){var t=_r(e,2);null!==t&&Qu(t,e,2)}function To(e){var t=uo();if("function"==typeof e){var n=e;if(e=n(),Ka){we(!0);try{n()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:e},t}function Co(e,t,n,r){return e.baseState=n,yo(e,Wa,"function"==typeof r?r:mo)}function Po(e,t,n,i,a){if(ps(e))throw Error(r(485));if(null!==(e=t.action)){var o={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==z.T?n(!0):o.isTransition=!1,i(o),null===(n=t.pending)?(o.next=t.pending=o,No(t,o)):(o.next=n.next,t.pending=n.next=o)}}function No(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=z.T,o={};z.T=o;try{var s=n(i,r),l=z.S;null!==l&&l(o,s),jo(e,t,s)}catch(u){Lo(e,t,u)}finally{null!==a&&null!==o.types&&(a.types=o.types),z.T=a}}else try{jo(e,t,a=n(i,r))}catch(c){Lo(e,t,c)}}function jo(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Mo(e,t,n)},function(n){return Lo(e,t,n)}):Mo(e,t,n)}function Mo(e,t,n){t.status="fulfilled",t.value=n,Ao(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,No(e,n)))}function Lo(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ao(t),t=t.next}while(t!==r)}e.action=null}function Ao(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Do(e,t){return t}function Ro(e,t){if(hi){var n=gu.formState;if(null!==n){e:{var r=Ha;if(hi){if(fi){t:{for(var i=fi,a=mi;8!==i.nodeType;){if(!a){i=null;break t}if(null===(i=_d(i.nextSibling))){i=null;break t}}i="F!"===(a=i.data)||"F"===a?i:null}if(i){fi=_d(i.nextSibling),r="F!"===i.data;break e}}yi(r)}r=!1}r&&(t=n[0])}}return(n=uo()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:t},n.queue=r,n=ds.bind(null,Ha,r),r.dispatch=n,r=To(!1),a=hs.bind(null,Ha,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=uo()).queue=i,n=Po.bind(null,Ha,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function _o(e){return zo(co(),Wa,e)}function zo(e,t,n){if(t=yo(e,t,Do)[0],e=go(mo)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=fo(t)}catch(o){if(o===Ji)throw ta;throw o}else r=t;var i=(t=co()).queue,a=i.dispatch;return n!==t.memoizedState&&(Ha.flags|=2048,Vo(9,{destroy:void 0},Oo.bind(null,i,n),null)),[r,a,e]}function Oo(e,t){e.action=t}function Fo(e){var t=co(),n=Wa;if(null!==n)return zo(t,n,e);co(),t=t.memoizedState;var r=(n=co()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Vo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Ha.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Io(){return co().memoizedState}function Bo(e,t,n,r){var i=uo();Ha.flags|=e,i.memoizedState=Vo(1|t,{destroy:void 0},n,void 0===r?null:r)}function Uo(e,t,n,r){var i=co();r=void 0===r?null:r;var a=i.memoizedState.inst;null!==Wa&&null!==r&&to(r,Wa.memoizedState.deps)?i.memoizedState=Vo(t,a,n,r):(Ha.flags|=e,i.memoizedState=Vo(1|t,a,n,r))}function $o(e,t){Bo(8390656,8,e,t)}function Ho(e,t){Uo(2048,8,e,t)}function Wo(e){var t=co().memoizedState;return function(e){Ha.flags|=4;var t=Ha.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Ha.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&mu)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function qo(e,t){return Uo(4,2,e,t)}function Yo(e,t){return Uo(4,4,e,t)}function Xo(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Ko(e,t,n){n=null!=n?n.concat([e]):null,Uo(4,4,Xo.bind(null,t,e),n)}function Qo(){}function Go(e,t){var n=co();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&to(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zo(e,t){var n=co();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&to(t,r[1]))return r[0];if(r=e(),Ka){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r}function Jo(e,t,n){return void 0===n||1073741824&$a&&!(261930&vu)?e.memoizedState=t:(e.memoizedState=n,e=Ku(),Ha.lanes|=e,Cu|=e,n)}function es(e,t,n,r){return er(n,t)?n:null!==ja.current?(e=Jo(e,n,r),er(e,t)||(_s=!0),e):42&$a&&(!(1073741824&$a)||261930&vu)?(e=Ku(),Ha.lanes|=e,Cu|=e,t):(_s=!0,e.memoizedState=n)}function ts(e,t,n,r,i){var a=O.p;O.p=0!==a&&8>a?a:8;var o,s,l,u=z.T,c={};z.T=c,hs(e,!1,t,n);try{var d=i(),f=z.S;if(null!==f&&f(c,d),null!==d&&"object"==typeof d&&"function"==typeof d.then)fs(e,t,(o=r,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},d.then(function(){l.status="fulfilled",l.value=o;for(var e=0;e<s.length;e++)(0,s[e])(o)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Xu());else fs(e,t,r,Xu())}catch(h){fs(e,t,{then:function(){},status:"rejected",reason:h},Xu())}finally{O.p=a,null!==u&&null!==c.types&&(u.types=c.types),z.T=u}}function ns(){}function rs(e,t,n,i){if(5!==e.tag)throw Error(r(476));var a=is(e).queue;ts(e,a,t,F,null===n?ns:function(){return as(e),n(i)})}function is(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:F},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function as(e){var t=is(e);null===t.next&&(t=e.alternate.memoizedState),fs(e,t.next.queue,{},Xu())}function os(){return Ri(hf)}function ss(){return co().memoizedState}function ls(){return co().memoizedState}function us(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Xu(),r=wa(t,e=xa(n),n);return null!==r&&(Qu(r,t,n),ka(r,t,n)),t={cache:Bi()},void(e.payload=t)}t=t.return}}function cs(e,t,n){var r=Xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ps(e)?ms(t,n):null!==(n=Rr(e,t,n,r))&&(Qu(n,e,r),gs(n,t,r))}function ds(e,t,n){fs(e,t,n,Xu())}function fs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ps(e))ms(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,er(s,o))return Dr(e,t,i,0),null===gu&&Ar(),!1}catch(l){}if(null!==(n=Rr(e,t,i,r)))return Qu(n,e,r),gs(n,t,r),!0}return!1}function hs(e,t,n,i){if(i={lane:2,revertLane:Hc(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},ps(e)){if(t)throw Error(r(479))}else null!==(t=Rr(e,n,i,2))&&Qu(t,e,2)}function ps(e){var t=e.alternate;return e===Ha||null!==t&&t===Ha}function ms(e,t){Xa=Ya=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gs(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,ze(e,n)}}var ys={readContext:Ri,use:ho,useCallback:eo,useContext:eo,useEffect:eo,useImperativeHandle:eo,useLayoutEffect:eo,useInsertionEffect:eo,useMemo:eo,useReducer:eo,useRef:eo,useState:eo,useDebugValue:eo,useDeferredValue:eo,useTransition:eo,useSyncExternalStore:eo,useId:eo,useHostTransitionStatus:eo,useFormState:eo,useActionState:eo,useOptimistic:eo,useMemoCache:eo,useCacheRefresh:eo};ys.useEffectEvent=eo;var vs={readContext:Ri,use:ho,useCallback:function(e,t){return uo().memoizedState=[e,void 0===t?null:t],e},useContext:Ri,useEffect:$o,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Bo(4194308,4,Xo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bo(4194308,4,e,t)},useInsertionEffect:function(e,t){Bo(4,2,e,t)},useMemo:function(e,t){var n=uo();t=void 0===t?null:t;var r=e();if(Ka){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=uo();if(void 0!==n){var i=n(t);if(Ka){we(!0);try{n(t)}finally{we(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=cs.bind(null,Ha,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},uo().memoizedState=e},useState:function(e){var t=(e=To(e)).queue,n=ds.bind(null,Ha,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qo,useDeferredValue:function(e,t){return Jo(uo(),e,t)},useTransition:function(){var e=To(!1);return e=ts.bind(null,Ha,e.queue,!0,!1),uo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Ha,a=uo();if(hi){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===gu)throw Error(r(349));127&vu||xo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,$o(ko.bind(null,i,o,e),[e]),i.flags|=2048,Vo(9,{destroy:void 0},wo.bind(null,i,o,n,t),null),n},useId:function(){var e=uo(),t=gu.identifierPrefix;if(hi){var n=ai;t="_"+t+"R_"+(n=(ii&~(1<<32-ke(ii)-1)).toString(32)+n),0<(n=Qa++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Ja++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:os,useFormState:Ro,useActionState:Ro,useOptimistic:function(e){var t=uo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=hs.bind(null,Ha,!0,n),n.dispatch=t,[e,t]},useMemoCache:po,useCacheRefresh:function(){return uo().memoizedState=us.bind(null,Ha)},useEffectEvent:function(e){var t=uo(),n={impl:e};return t.memoizedState=n,function(){if(2&mu)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},bs={readContext:Ri,use:ho,useCallback:Go,useContext:Ri,useEffect:Ho,useImperativeHandle:Ko,useInsertionEffect:qo,useLayoutEffect:Yo,useMemo:Zo,useReducer:go,useRef:Io,useState:function(){return go(mo)},useDebugValue:Qo,useDeferredValue:function(e,t){return es(co(),Wa.memoizedState,e,t)},useTransition:function(){var e=go(mo)[0],t=co().memoizedState;return["boolean"==typeof e?e:fo(e),t]},useSyncExternalStore:bo,useId:ss,useHostTransitionStatus:os,useFormState:_o,useActionState:_o,useOptimistic:function(e,t){return Co(co(),0,e,t)},useMemoCache:po,useCacheRefresh:ls};bs.useEffectEvent=Wo;var xs={readContext:Ri,use:ho,useCallback:Go,useContext:Ri,useEffect:Ho,useImperativeHandle:Ko,useInsertionEffect:qo,useLayoutEffect:Yo,useMemo:Zo,useReducer:vo,useRef:Io,useState:function(){return vo(mo)},useDebugValue:Qo,useDeferredValue:function(e,t){var n=co();return null===Wa?Jo(n,e,t):es(n,Wa.memoizedState,e,t)},useTransition:function(){var e=vo(mo)[0],t=co().memoizedState;return["boolean"==typeof e?e:fo(e),t]},useSyncExternalStore:bo,useId:ss,useHostTransitionStatus:os,useFormState:Fo,useActionState:Fo,useOptimistic:function(e,t){var n=co();return null!==Wa?Co(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:po,useCacheRefresh:ls};function ws(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:c({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}xs.useEffectEvent=Wo;var ks={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xu(),i=xa(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=wa(e,i,r))&&(Qu(t,e,r),ka(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xu(),i=xa(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=wa(e,i,r))&&(Qu(t,e,r),ka(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xu(),r=xa(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=wa(e,r,n))&&(Qu(t,e,n),ka(t,e,n))}};function Ss(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!tr(n,r)||!tr(i,a))}function Es(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ks.enqueueReplaceState(t,t.state,null)}function Ts(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=c({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}function Cs(e){Nr(e)}function Ps(e){console.error(e)}function Ns(e){Nr(e)}function js(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Ms(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Ls(e,t,n){return(n=xa(n)).tag=3,n.payload={element:null},n.callback=function(){js(e,t)},n}function As(e){return(e=xa(e)).tag=3,e}function Ds(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"==typeof i){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ms(t,n,r)}}var o=n.stateNode;null!==o&&"function"==typeof o.componentDidCatch&&(e.callback=function(){Ms(t,n,r),"function"!=typeof i&&(null===Fu?Fu=new Set([this]):Fu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Rs=Error(r(461)),_s=!1;function zs(e,t,n,r){t.child=null===e?ga(t,null,n,r):ma(t,e.child,n,r)}function Os(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var o={};for(var s in r)"ref"!==s&&(o[s]=r[s])}else o=r;return Di(t),r=no(e,t,n,o,a,i),s=oo(),null===e||_s?(hi&&s&&li(t),t.flags|=1,zs(e,t,r,i),t.child):(so(e,t,i),ol(e,t,i))}function Fs(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Br(a)||void 0!==a.defaultProps||null!==n.compare?((e=Hr(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Vs(e,t,a,r,i))}if(a=e.child,!sl(e,i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:tr)(o,r)&&e.ref===t.ref)return ol(e,t,i)}return t.flags|=1,(e=Ur(a,r)).ref=t.ref,e.return=t,t.child=e}function Vs(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(tr(a,r)&&e.ref===t.ref){if(_s=!1,t.pendingProps=r=a,!sl(e,i))return t.lanes=e.lanes,ol(e,t,i);131072&e.flags&&(_s=!0)}}return qs(e,t,n,r,i)}function Is(e,t,n,r){var i=r.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(a=null!==a?a.baseLanes|n:n,null!==e){for(r=t.child=e.child,i=0;null!==r;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Us(e,t,a,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Us(e,t,null!==a?a.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Gi(0,null!==a?a.cachePool:null),null!==a?La(t,a):Aa(),Fa(t)}else null!==a?(Gi(0,a.cachePool),La(t,a),Va(),t.memoizedState=null):(null!==e&&Gi(0,null),Aa(),Va());return zs(e,t,i,n),t.child}function Bs(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Us(e,t,n,r,i){var a=Qi();return a=null===a?null:{parent:Ii._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},null!==e&&Gi(0,null),Aa(),Fa(t),null!==e&&Li(e,t,r,!0),t.childLanes=i,null}function $s(e,t){return(t=tl({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Hs(e,t,n){return ma(t,e.child,null,n),(e=$s(t,t.pendingProps)).flags|=2,Ia(t),t.memoizedState=null,e}function Ws(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(r(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function qs(e,t,n,r,i){return Di(t),n=no(e,t,n,r,void 0,i),r=oo(),null===e||_s?(hi&&r&&li(t),t.flags|=1,zs(e,t,n,i),t.child):(so(e,t,i),ol(e,t,i))}function Ys(e,t,n,r,i,a){return Di(t),t.updateQueue=null,n=io(t,r,n,i),ro(e),r=oo(),null===e||_s?(hi&&r&&li(t),t.flags|=1,zs(e,t,n,a),t.child):(so(e,t,a),ol(e,t,a))}function Xs(e,t,n,r,i){if(Di(t),null===t.stateNode){var a=Fr,o=n.contextType;"object"==typeof o&&null!==o&&(a=Ri(o)),a=new n(r,a),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=ks,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={},va(t),o=n.contextType,a.context="object"==typeof o&&null!==o?Ri(o):Fr,a.state=t.memoizedState,"function"==typeof(o=n.getDerivedStateFromProps)&&(ws(t,n,o,r),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(o=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),o!==a.state&&ks.enqueueReplaceState(a,a.state,null),Ca(t,r,a,i),Ta(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var s=t.memoizedProps,l=Ts(n,s);a.props=l;var u=a.context,c=n.contextType;o=Fr,"object"==typeof c&&null!==c&&(o=Ri(c));var d=n.getDerivedStateFromProps;c="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,s=t.pendingProps!==s,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s||u!==o)&&Es(t,a,r,o),ya=!1;var f=t.memoizedState;a.state=f,Ca(t,r,a,i),Ta(),u=t.memoizedState,s||f!==u||ya?("function"==typeof d&&(ws(t,n,d,r),u=t.memoizedState),(l=ya||Ss(t,n,l,r,f,u,o))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=o,r=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ba(e,t),c=Ts(n,o=t.memoizedProps),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,l=Fr,"object"==typeof u&&null!==u&&(l=Ri(u)),(u="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==d||f!==l)&&Es(t,a,r,l),ya=!1,f=t.memoizedState,a.state=f,Ca(t,r,a,i),Ta();var h=t.memoizedState;o!==d||f!==h||ya||null!==e&&null!==e.dependencies&&Ai(e.dependencies)?("function"==typeof s&&(ws(t,n,s,r),h=t.memoizedState),(c=ya||Ss(t,n,c,r,f,h,l)||null!==e&&null!==e.dependencies&&Ai(e.dependencies))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Ws(e,t),r=!!(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=ma(t,e.child,null,i),t.child=ma(t,null,n,i)):zs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ol(e,t,i),e}function Ks(e,t,n,r){return wi(),t.flags|=256,zs(e,t,n,r),t.child}var Qs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gs(e){return{baseLanes:e,cachePool:Zi()}}function Zs(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=ju),e}function Js(e,t,n){var i,a=t.pendingProps,o=!1,s=!!(128&t.flags);if((i=s)||(i=(null===e||null!==e.memoizedState)&&!!(2&Ba.current)),i&&(o=!0,t.flags&=-129),i=!!(32&t.flags),t.flags&=-33,null===e){if(hi){if(o?za(t):Va(),(e=fi)?null!==(e=null!==(e=Ad(e,mi))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ri?{id:ii,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},(n=Yr(e)).return=t,t.child=n,di=t,fi=null):e=null,null===e)throw yi(t);return Rd(e)?t.lanes=32:t.lanes=536870912,null}var l=a.children;return a=a.fallback,o?(Va(),l=tl({mode:"hidden",children:l},o=t.mode),a=Wr(a,o,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,(a=t.child).memoizedState=Gs(n),a.childLanes=Zs(e,i,n),t.memoizedState=Qs,Bs(null,a)):(za(t),el(t,l))}var u=e.memoizedState;if(null!==u&&null!==(l=u.dehydrated)){if(s)256&t.flags?(za(t),t.flags&=-257,t=nl(e,t,n)):null!==t.memoizedState?(Va(),t.child=e.child,t.flags|=128,t=null):(Va(),l=a.fallback,o=t.mode,a=tl({mode:"visible",children:a.children},o),(l=Wr(l,o,n,null)).flags|=2,a.return=t,l.return=t,a.sibling=l,t.child=a,ma(t,e.child,null,n),(a=t.child).memoizedState=Gs(n),a.childLanes=Zs(e,i,n),t.memoizedState=Qs,t=Bs(null,a));else if(za(t),Rd(l)){if(i=l.nextSibling&&l.nextSibling.dataset)var c=i.dgst;i=c,(a=Error(r(419))).stack="",a.digest=i,Si({value:a,source:null,stack:null}),t=nl(e,t,n)}else if(_s||Li(e,t,n,!1),i=0!==(n&e.childLanes),_s||i){if(null!==(i=gu)&&(0!==(a=Oe(i,n))&&a!==u.retryLane))throw u.retryLane=a,_r(e,a),Qu(i,e,a),Rs;Dd(l)||lc(),t=nl(e,t,n)}else Dd(l)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,fi=_d(l.nextSibling),di=t,hi=!0,pi=null,mi=!1,null!==e&&ci(t,e),(t=el(t,a.children)).flags|=4096);return t}return o?(Va(),l=a.fallback,o=t.mode,c=(u=e.child).sibling,(a=Ur(u,{mode:"hidden",children:a.children})).subtreeFlags=65011712&u.subtreeFlags,null!==c?l=Ur(c,l):(l=Wr(l,o,n,null)).flags|=2,l.return=t,a.return=t,a.sibling=l,t.child=a,Bs(null,a),a=t.child,null===(l=e.child.memoizedState)?l=Gs(n):(null!==(o=l.cachePool)?(u=Ii._currentValue,o=o.parent!==u?{parent:u,pool:u}:o):o=Zi(),l={baseLanes:l.baseLanes|n,cachePool:o}),a.memoizedState=l,a.childLanes=Zs(e,i,n),t.memoizedState=Qs,Bs(e.child,a)):(za(t),e=(n=e.child).sibling,(n=Ur(n,{mode:"visible",children:a.children})).return=t,n.sibling=null,null!==e&&(null===(i=t.deletions)?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n)}function el(e,t){return(t=tl({mode:"visible",children:t},e.mode)).return=e,e.child=t}function tl(e,t){return(e=Ir(22,e,null,t)).lanes=0,e}function nl(e,t,n){return ma(t,e.child,null,n),(e=el(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function rl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ji(e.return,t,n)}function il(e,t,n,r,i,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Ba.current,s=!!(2&o);if(s?(o=1&o|2,t.flags|=128):o&=1,$(Ba,o),zs(e,t,r,n),r=hi?ei:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&rl(e,n,t);else if(19===e.tag)rl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Ua(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),il(t,!1,i,n,a,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Ua(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}il(t,!0,n,null,a,r);break;case"together":il(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Cu|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Li(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Ur(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ur(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function sl(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Ai(e))}function ll(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)_s=!0;else{if(!(sl(e,n)||128&t.flags))return _s=!1,function(e,t,n){switch(t.tag){case 3:Q(t,t.stateNode.containerInfo),Pi(0,Ii,e.memoizedState.cache),wi();break;case 27:case 5:Z(t);break;case 4:Q(t,t.stateNode.containerInfo);break;case 10:Pi(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Oa(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(za(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Js(e,t,n):(za(t),null!==(e=ol(e,t,n))?e.sibling:null);za(t);break;case 19:var i=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Li(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return al(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),$(Ba,Ba.current),r)break;return null;case 22:return t.lanes=0,Is(e,t,n,t.pendingProps);case 24:Pi(0,Ii,e.memoizedState.cache)}return ol(e,t,n)}(e,t,n);_s=!!(131072&e.flags)}else _s=!1,hi&&1048576&t.flags&&si(t,ei,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=aa(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var a=e.$$typeof;if(a===k){t.tag=11,t=Os(null,t,e,i,n);break e}if(a===C){t.tag=14,t=Fs(null,t,e,i,n);break e}}throw t=R(e)||e,Error(r(306,t,""))}Br(e)?(i=Ts(e,i),t.tag=1,t=Xs(null,t,e,i,n)):(t.tag=0,t=qs(null,t,e,i,n))}return t;case 0:return qs(e,t,t.type,t.pendingProps,n);case 1:return Xs(e,t,i=t.type,a=Ts(i,t.pendingProps),n);case 3:e:{if(Q(t,t.stateNode.containerInfo),null===e)throw Error(r(387));i=t.pendingProps;var o=t.memoizedState;a=o.element,ba(e,t),Ca(t,i,null,n);var s=t.memoizedState;if(i=s.cache,Pi(0,Ii,i),i!==o.cache&&Mi(t,[Ii],n,!0),Ta(),i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ks(e,t,i,n);break e}if(i!==a){Si(a=Qr(Error(r(424)),t)),t=Ks(e,t,i,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(fi=_d(e.firstChild),di=t,hi=!0,pi=null,mi=!0,n=ga(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(wi(),i===a){t=ol(e,t,n);break e}zs(e,t,i,n)}t=t.child}return t;case 26:return Ws(e,t),null===e?(n=Yd(t.type,null,t.pendingProps,null))?t.memoizedState=n:hi||(n=t.type,e=t.pendingProps,(i=vd(X.current).createElement(n))[$e]=t,i[He]=e,pd(i,n,e),nt(i),t.stateNode=i):t.memoizedState=Yd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),null===e&&hi&&(i=t.stateNode=Vd(t.type,t.pendingProps,X.current),di=t,mi=!0,a=fi,Nd(t.type)?(zd=a,fi=_d(i.firstChild)):fi=a),zs(e,t,t.pendingProps.children,n),Ws(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&hi&&((a=i=fi)&&(null!==(i=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Qe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(null==i.href||""===i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var a=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===a)return e}if(null===(e=_d(e.nextSibling)))break}return null}(i,t.type,t.pendingProps,mi))?(t.stateNode=i,di=t,fi=_d(i.firstChild),mi=!1,a=!0):a=!1),a||yi(t)),Z(t),a=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,i=o.children,wd(a,o)?i=null:null!==s&&wd(a,s)&&(t.flags|=32),null!==t.memoizedState&&(a=no(e,t,ao,null,null,n),hf._currentValue=a),Ws(e,t),zs(e,t,i,n),t.child;case 6:return null===e&&hi&&((e=n=fi)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=_d(e.nextSibling)))return null}return e}(n,t.pendingProps,mi))?(t.stateNode=n,di=t,fi=null,e=!0):e=!1),e||yi(t)),null;case 13:return Js(e,t,n);case 4:return Q(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=ma(t,null,i,n):zs(e,t,i,n),t.child;case 11:return Os(e,t,t.type,t.pendingProps,n);case 7:return zs(e,t,t.pendingProps,n),t.child;case 8:case 12:return zs(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,Pi(0,t.type,i.value),zs(e,t,i.children,n),t.child;case 9:return a=t.type._context,i=t.pendingProps.children,Di(t),i=i(a=Ri(a)),t.flags|=1,zs(e,t,i,n),t.child;case 14:return Fs(e,t,t.type,t.pendingProps,n);case 15:return Vs(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return function(e,t,n){var i=t.pendingProps,a=!!(128&t.flags);if(t.flags&=-129,null===e){if(hi){if("hidden"===i.mode)return e=$s(t,i),t.lanes=536870912,Bs(null,e);if(Oa(t),(e=fi)?null!==(e=null!==(e=Ad(e,mi))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ri?{id:ii,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},(n=Yr(e)).return=t,t.child=n,di=t,fi=null):e=null,null===e)throw yi(t);return t.lanes=536870912,null}return $s(t,i)}var o=e.memoizedState;if(null!==o){var s=o.dehydrated;if(Oa(t),a)if(256&t.flags)t.flags&=-257,t=Hs(e,t,n);else{if(null===t.memoizedState)throw Error(r(558));t.child=e.child,t.flags|=128,t=null}else if(_s||Li(e,t,n,!1),a=0!==(n&e.childLanes),_s||a){if(null!==(i=gu)&&0!==(s=Oe(i,n))&&s!==o.retryLane)throw o.retryLane=s,_r(e,s),Qu(i,e,s),Rs;lc(),t=Hs(e,t,n)}else e=o.treeContext,fi=_d(s.nextSibling),di=t,hi=!0,pi=null,mi=!1,null!==e&&ci(t,e),(t=$s(t,i)).flags|=4096;return t}return(e=Ur(e.child,{mode:i.mode,children:i.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Is(e,t,n,t.pendingProps);case 24:return Di(t),i=Ri(Ii),null===e?(null===(a=Qi())&&(a=gu,o=Bi(),a.pooledCache=o,o.refCount++,null!==o&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:i,cache:a},va(t),Pi(0,Ii,a)):(0!==(e.lanes&n)&&(ba(e,t),Ca(t,null,null,n),Ta()),a=e.memoizedState,o=t.memoizedState,a.parent!==i?(a={parent:i,cache:i},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),Pi(0,Ii,i)):(i=o.cache,Pi(0,Ii,i),i!==a.cache&&Mi(t,[Ii],n,!0))),zs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function ul(e){e.flags|=4}function cl(e,t,n,r,i){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&i)===i)if(e.stateNode.complete)e.flags|=8192;else{if(!ac())throw oa=na,ea;e.flags|=8192}}else e.flags&=-16777217}function dl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!sf(t)){if(!ac())throw oa=na,ea;e.flags|=8192}}function fl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Ae():536870912,e.lanes|=t,Mu|=t)}function hl(e,t){if(!hi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=65011712&i.subtreeFlags,r|=65011712&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ml(e,t,n){var i=t.pendingProps;switch(ui(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return pl(t),null;case 3:return n=t.stateNode,i=null,null!==e&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ni(Ii),G(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(xi(t)?ul(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,ki())),pl(t),null;case 26:var a=t.type,o=t.memoizedState;return null===e?(ul(t),null!==o?(pl(t),dl(t,o)):(pl(t),cl(t,a,0,0,n))):o?o!==e.memoizedState?(ul(t),pl(t),dl(t,o)):(pl(t),t.flags&=-16777217):((e=e.memoizedProps)!==i&&ul(t),pl(t),cl(t,a,0,0,n)),null;case 27:if(J(t),n=X.current,a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==i&&ul(t);else{if(!i){if(null===t.stateNode)throw Error(r(166));return pl(t),null}e=q.current,xi(t)?vi(t):(e=Vd(a,i,n),t.stateNode=e,ul(t))}return pl(t),null;case 5:if(J(t),a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==i&&ul(t);else{if(!i){if(null===t.stateNode)throw Error(r(166));return pl(t),null}if(o=q.current,xi(t))vi(t);else{var s=vd(X.current);switch(o){case 1:o=s.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:o=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":o=s.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":o=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":(o=s.createElement("div")).innerHTML="<script><\\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof i.is?s.createElement("select",{is:i.is}):s.createElement("select"),i.multiple?o.multiple=!0:i.size&&(o.size=i.size);break;default:o="string"==typeof i.is?s.createElement(a,{is:i.is}):s.createElement(a)}}o[$e]=t,o[He]=i;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)o.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;e:switch(pd(o,a,i),a){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ul(t)}}return pl(t),cl(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==i&&ul(t);else{if("string"!=typeof i&&null===t.stateNode)throw Error(r(166));if(e=X.current,xi(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,null!==(a=di))switch(a.tag){case 27:case 5:i=a.memoizedProps}e[$e]=t,(e=!!(e.nodeValue===n||null!==i&&!0===i.suppressHydrationWarning||dd(e.nodeValue,n)))||yi(t,!0)}else(e=vd(e).createTextNode(i))[$e]=t,t.stateNode=e}return pl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(i=xi(t),null!==n){if(null===e){if(!i)throw Error(r(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(r(557));e[$e]=t}else wi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;pl(t),e=!1}else n=ki(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Ia(t),t):(Ia(t),null);if(128&t.flags)throw Error(r(558))}return pl(t),null;case 13:if(i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=xi(t),null!==i&&null!==i.dehydrated){if(null===e){if(!a)throw Error(r(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(r(317));a[$e]=t}else wi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;pl(t),a=!1}else a=ki(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(Ia(t),t):(Ia(t),null)}return Ia(t),128&t.flags?(t.lanes=n,t):(n=null!==i,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(i=t.child).alternate&&null!==i.alternate.memoizedState&&null!==i.alternate.memoizedState.cachePool&&(a=i.alternate.memoizedState.cachePool.pool),o=null,null!==i.memoizedState&&null!==i.memoizedState.cachePool&&(o=i.memoizedState.cachePool.pool),o!==a&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fl(t,t.updateQueue),pl(t),null);case 4:return G(),null===e&&td(t.stateNode.containerInfo),pl(t),null;case 10:return Ni(t.type),pl(t),null;case 19:if(U(Ba),null===(i=t.memoizedState))return pl(t),null;if(a=!!(128&t.flags),null===(o=i.rendering))if(a)hl(i,!1);else{if(0!==Tu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Ua(e))){for(t.flags|=128,hl(i,!1),e=o.updateQueue,t.updateQueue=e,fl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)$r(n,e),n=n.sibling;return $(Ba,1&Ba.current|2),hi&&oi(t,i.treeForkCount),t.child}e=e.sibling}null!==i.tail&&ce()>zu&&(t.flags|=128,a=!0,hl(i,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Ua(o))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,fl(t,e),hl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!hi)return pl(t),null}else 2*ce()-i.renderingStartTime>zu&&536870912!==n&&(t.flags|=128,a=!0,hl(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=i.last)?e.sibling=o:t.child=o,i.last=o)}return null!==i.tail?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=ce(),e.sibling=null,n=Ba.current,$(Ba,a?1&n|2:1&n),hi&&oi(t,i.treeForkCount),e):(pl(t),null);case 22:case 23:return Ia(t),Da(),i=null!==t.memoizedState,null!==e?null!==e.memoizedState!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?!!(536870912&n)&&!(128&t.flags)&&(pl(t),6&t.subtreeFlags&&(t.flags|=8192)):pl(t),null!==(n=t.updateQueue)&&fl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),i=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),null!==e&&U(Ki),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ni(Ii),pl(t),null;case 25:case 30:return null}throw Error(r(156,t.tag))}function gl(e,t){switch(ui(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ni(Ii),G(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return J(t),null;case 31:if(null!==t.memoizedState){if(Ia(t),null===t.alternate)throw Error(r(340));wi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Ia(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));wi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return U(Ba),null;case 4:return G(),null;case 10:return Ni(t.type),null;case 22:case 23:return Ia(t),Da(),null!==e&&U(Ki),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Ni(Ii),null;default:return null}}function yl(e,t){switch(ui(t),t.tag){case 3:Ni(Ii),G();break;case 26:case 27:case 5:J(t);break;case 4:G();break;case 31:null!==t.memoizedState&&Ia(t);break;case 13:Ia(t);break;case 19:U(Ba);break;case 10:Ni(t.type);break;case 22:case 23:Ia(t),Da(),null!==e&&U(Ki);break;case 24:Ni(Ii)}}function vl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(s){Tc(t,t.return,s)}}function bl(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(void 0!==s){o.destroy=void 0,i=t;var l=n,u=s;try{u()}catch(c){Tc(i,l,c)}}}r=r.next}while(r!==a)}}catch(c){Tc(t,t.return,c)}}function xl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Na(t,n)}catch(r){Tc(e,e.return,r)}}}function wl(e,t,n){n.props=Ts(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Tc(e,t,r)}}function kl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(i){Tc(e,t,i)}}function Sl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(i){Tc(e,t,i)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(a){Tc(e,t,a)}else n.current=null}function El(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){Tc(e,e.return,i)}}function Tl(e,t,n){try{var i=e.stateNode;!function(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,o=null,s=null,l=null,u=null,c=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&null!=f)switch(p){case"checked":case"value":break;case"defaultValue":u=f;default:i.hasOwnProperty(p)||fd(e,t,p,null,i,f)}}for(var h in i){var p=i[h];if(f=n[h],i.hasOwnProperty(h)&&(null!=p||null!=f))switch(h){case"type":o=p;break;case"name":a=p;break;case"checked":c=p;break;case"defaultChecked":d=p;break;case"value":s=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(r(137,t));break;default:p!==f&&fd(e,t,h,p,i,f)}}return void xt(e,s,l,u,c,d,o,a);case"select":for(o in p=s=l=h=null,n)if(u=n[o],n.hasOwnProperty(o)&&null!=u)switch(o){case"value":break;case"multiple":p=u;default:i.hasOwnProperty(o)||fd(e,t,o,null,i,u)}for(a in i)if(o=i[a],u=n[a],i.hasOwnProperty(a)&&(null!=o||null!=u))switch(a){case"value":h=o;break;case"defaultValue":l=o;break;case"multiple":s=o;default:o!==u&&fd(e,t,a,o,i,u)}return t=l,n=s,i=p,void(null!=h?St(e,!!n,h,!1):!!i!=!!n&&(null!=t?St(e,!!n,t,!0):St(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=h=null,n)if(a=n[l],n.hasOwnProperty(l)&&null!=a&&!i.hasOwnProperty(l))switch(l){case"value":case"children":break;default:fd(e,t,l,null,i,a)}for(s in i)if(a=i[s],o=n[s],i.hasOwnProperty(s)&&(null!=a||null!=o))switch(s){case"value":h=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(r(91));break;default:a!==o&&fd(e,t,s,a,i,o)}return void Et(e,h,p);case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&null!=h&&!i.hasOwnProperty(m))if("selected"===m)e.selected=!1;else fd(e,t,m,null,i,h);for(u in i)if(h=i[u],p=n[u],i.hasOwnProperty(u)&&h!==p&&(null!=h||null!=p))if("selected"===u)e.selected=h&&"function"!=typeof h&&"symbol"!=typeof h;else fd(e,t,u,h,i,p);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)h=n[g],n.hasOwnProperty(g)&&null!=h&&!i.hasOwnProperty(g)&&fd(e,t,g,null,i,h);for(c in i)if(h=i[c],p=n[c],i.hasOwnProperty(c)&&h!==p&&(null!=h||null!=p))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(r(137,t));break;default:fd(e,t,c,h,i,p)}return;default:if(Mt(t)){for(var y in n)h=n[y],n.hasOwnProperty(y)&&void 0!==h&&!i.hasOwnProperty(y)&&hd(e,t,y,void 0,i,h);for(d in i)h=i[d],p=n[d],!i.hasOwnProperty(d)||h===p||void 0===h&&void 0===p||hd(e,t,d,h,i,p);return}}for(var v in n)h=n[v],n.hasOwnProperty(v)&&null!=h&&!i.hasOwnProperty(v)&&fd(e,t,v,null,i,h);for(f in i)h=i[f],p=n[f],!i.hasOwnProperty(f)||h===p||null==h&&null==p||fd(e,t,f,h,i,p)}(i,e.type,n,t),i[He]=t}catch(a){Tc(e,e.return,a)}}function Cl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Nd(e.type)||4===e.tag}function Pl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Cl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Nd(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Nl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Rt));else if(4!==r&&(27===r&&Nd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Nl(e,t,n),e=e.sibling;null!==e;)Nl(e,t,n),e=e.sibling}function jl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Nd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(jl(e,t,n),e=e.sibling;null!==e;)jl(e,t,n),e=e.sibling}function Ml(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);pd(t,r,n),t[$e]=e,t[He]=n}catch(a){Tc(e,e.return,a)}}var Ll=!1,Al=!1,Dl=!1,Rl="function"==typeof WeakSet?WeakSet:Set,_l=null;function zl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ql(e,n),4&r&&vl(5,n);break;case 1:if(Ql(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(o){Tc(n,n.return,o)}else{var i=Ts(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Tc(n,n.return,s)}}64&r&&xl(n),512&r&&kl(n,n.return);break;case 3:if(Ql(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Na(e,t)}catch(o){Tc(n,n.return,o)}}break;case 27:null===t&&4&r&&Ml(n);case 26:case 5:Ql(e,n),null===t&&4&r&&El(n),512&r&&kl(n,n.return);break;case 12:Ql(e,n);break;case 31:Ql(e,n),4&r&&Ul(e,n);break;case 13:Ql(e,n),4&r&&$l(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=jc.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Ll)){t=null!==t&&null!==t.memoizedState||Al,i=Ll;var a=Al;Ll=r,(Al=t)&&!a?Zl(e,n,!!(8772&n.subtreeFlags)):Ql(e,n),Ll=i,Al=a}break;case 30:break;default:Ql(e,n)}}function Ol(e){var t=e.alternate;null!==t&&(e.alternate=null,Ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ge(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fl=null,Vl=!1;function Il(e,t,n){for(n=n.child;null!==n;)Bl(e,t,n),n=n.sibling}function Bl(e,t,n){if(xe&&"function"==typeof xe.onCommitFiberUnmount)try{xe.onCommitFiberUnmount(be,n)}catch(a){}switch(n.tag){case 26:Al||Sl(n,t),Il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Al||Sl(n,t);var r=Fl,i=Vl;Nd(n.type)&&(Fl=n.stateNode,Vl=!1),Il(e,t,n),Id(n.stateNode),Fl=r,Vl=i;break;case 5:Al||Sl(n,t);case 6:if(r=Fl,i=Vl,Fl=null,Il(e,t,n),Vl=i,null!==(Fl=r))if(Vl)try{(9===Fl.nodeType?Fl.body:"HTML"===Fl.nodeName?Fl.ownerDocument.body:Fl).removeChild(n.stateNode)}catch(o){Tc(n,t,o)}else try{Fl.removeChild(n.stateNode)}catch(o){Tc(n,t,o)}break;case 18:null!==Fl&&(Vl?(jd(9===(e=Fl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Yf(e)):jd(Fl,n.stateNode));break;case 4:r=Fl,i=Vl,Fl=n.stateNode.containerInfo,Vl=!0,Il(e,t,n),Fl=r,Vl=i;break;case 0:case 11:case 14:case 15:bl(2,n,t),Al||bl(4,n,t),Il(e,t,n);break;case 1:Al||(Sl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&wl(n,t,r)),Il(e,t,n);break;case 21:Il(e,t,n);break;case 22:Al=(r=Al)||null!==n.memoizedState,Il(e,t,n),Al=r;break;default:Il(e,t,n)}}function Ul(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Yf(e)}catch(n){Tc(t,t.return,n)}}}function $l(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Yf(e)}catch(n){Tc(t,t.return,n)}}function Hl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Rl),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Rl),t;default:throw Error(r(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Mc.bind(null,e,t);t.then(r,r)}})}function Wl(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var a=n[i],o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(Nd(l.type)){Fl=l.stateNode,Vl=!1;break e}break;case 5:Fl=l.stateNode,Vl=!1;break e;case 3:case 4:Fl=l.stateNode.containerInfo,Vl=!0;break e}l=l.return}if(null===Fl)throw Error(r(160));Bl(o,s,a),Fl=null,Vl=!1,null!==(o=a.alternate)&&(o.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Yl(t,e),t=t.sibling}var ql=null;function Yl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wl(t,e),Xl(e),4&i&&(bl(3,e,e.return),vl(3,e),bl(5,e,e.return));break;case 1:Wl(t,e),Xl(e),512&i&&(Al||null===n||Sl(n,n.return)),64&i&&Ll&&(null!==(e=e.updateQueue)&&(null!==(i=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?i:n.concat(i))));break;case 26:var a=ql;if(Wl(t,e),Xl(e),512&i&&(Al||null===n||Sl(n,n.return)),4&i){var o=null!==n?n.memoizedState:null;if(i=e.memoizedState,null===n)if(null===i)if(null===e.stateNode){e:{i=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(i){case"title":(!(o=a.getElementsByTagName("title")[0])||o[Qe]||o[$e]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=a.createElement(i),a.head.insertBefore(o,a.querySelector("head > title"))),pd(o,i,n),o[$e]=e,nt(o),i=o;break e;case"link":var s=af("link","href",a).get(i+(n.href||""));if(s)for(var l=0;l<s.length;l++)if((o=s[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(l,1);break t}pd(o=a.createElement(i),i,n),a.head.appendChild(o);break;case"meta":if(s=af("meta","content",a).get(i+(n.content||"")))for(l=0;l<s.length;l++)if((o=s[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(l,1);break t}pd(o=a.createElement(i),i,n),a.head.appendChild(o);break;default:throw Error(r(468,i))}o[$e]=e,nt(o),i=o}e.stateNode=i}else of(a,e.type,e.stateNode);else e.stateNode=Jd(a,i,e.memoizedProps);else o!==i?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===i?of(a,e.type,e.stateNode):Jd(a,i,e.memoizedProps)):null===i&&null!==e.stateNode&&Tl(e,e.memoizedProps,n.memoizedProps)}break;case 27:Wl(t,e),Xl(e),512&i&&(Al||null===n||Sl(n,n.return)),null!==n&&4&i&&Tl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Wl(t,e),Xl(e),512&i&&(Al||null===n||Sl(n,n.return)),32&e.flags){a=e.stateNode;try{Ct(a,"")}catch(m){Tc(e,e.return,m)}}4&i&&null!=e.stateNode&&Tl(e,a=e.memoizedProps,null!==n?n.memoizedProps:a),1024&i&&(Dl=!0);break;case 6:if(Wl(t,e),Xl(e),4&i){if(null===e.stateNode)throw Error(r(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(m){Tc(e,e.return,m)}}break;case 3:if(rf=null,a=ql,ql=$d(t.containerInfo),Wl(t,e),ql=a,Xl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Yf(t.containerInfo)}catch(m){Tc(e,e.return,m)}Dl&&(Dl=!1,Kl(e));break;case 4:i=ql,ql=$d(e.stateNode.containerInfo),Wl(t,e),Xl(e),ql=i;break;case 12:default:Wl(t,e),Xl(e);break;case 31:case 19:Wl(t,e),Xl(e),4&i&&(null!==(i=e.updateQueue)&&(e.updateQueue=null,Hl(e,i)));break;case 13:Wl(t,e),Xl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Ru=ce()),4&i&&(null!==(i=e.updateQueue)&&(e.updateQueue=null,Hl(e,i)));break;case 22:a=null!==e.memoizedState;var u=null!==n&&null!==n.memoizedState,c=Ll,d=Al;if(Ll=c||a,Al=d||u,Wl(t,e),Al=d,Ll=c,Xl(e),8192&i)e:for(t=e.stateNode,t._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===n||u||Ll||Al||Gl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){u=n=t;try{if(o=u.stateNode,a)"function"==typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{l=u.stateNode;var f=u.memoizedProps.style,h=null!=f&&f.hasOwnProperty("display")?f.display:null;l.style.display=null==h||"boolean"==typeof h?"":(""+h).trim()}}catch(m){Tc(u,u.return,m)}}}else if(6===t.tag){if(null===n){u=t;try{u.stateNode.nodeValue=a?"":u.memoizedProps}catch(m){Tc(u,u.return,m)}}}else if(18===t.tag){if(null===n){u=t;try{var p=u.stateNode;a?Md(p,!0):Md(u.stateNode,!1)}catch(m){Tc(u,u.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&i&&(null!==(i=e.updateQueue)&&(null!==(n=i.retryQueue)&&(i.retryQueue=null,Hl(e,n))));case 30:case 21:}}function Xl(e){var t=e.flags;if(2&t){try{for(var n,i=e.return;null!==i;){if(Cl(i)){n=i;break}i=i.return}if(null==n)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode;jl(e,Pl(e),a);break;case 5:var o=n.stateNode;32&n.flags&&(Ct(o,""),n.flags&=-33),jl(e,Pl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Nl(e,Pl(e),s);break;default:throw Error(r(161))}}catch(l){Tc(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Kl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Kl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Ql(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)zl(e,t.alternate,t),t=t.sibling}function Gl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bl(4,t,t.return),Gl(t);break;case 1:Sl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&wl(t,t.return,n),Gl(t);break;case 27:Id(t.stateNode);case 26:case 5:Sl(t,t.return),Gl(t);break;case 22:null===t.memoizedState&&Gl(t);break;default:Gl(t)}e=e.sibling}}function Zl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Zl(i,a,n),vl(4,a);break;case 1:if(Zl(i,a,n),"function"==typeof(i=(r=a).stateNode).componentDidMount)try{i.componentDidMount()}catch(u){Tc(r,r.return,u)}if(null!==(i=(r=a).updateQueue)){var s=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(null!==l)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Pa(l[i],s)}catch(u){Tc(r,r.return,u)}}n&&64&o&&xl(a),kl(a,a.return);break;case 27:Ml(a);case 26:case 5:Zl(i,a,n),n&&null===r&&4&o&&El(a),kl(a,a.return);break;case 12:Zl(i,a,n);break;case 31:Zl(i,a,n),n&&4&o&&Ul(i,a);break;case 13:Zl(i,a,n),n&&4&o&&$l(i,a);break;case 22:null===a.memoizedState&&Zl(i,a,n),kl(a,a.return);break;case 30:break;default:Zl(i,a,n)}t=t.sibling}}function Jl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ui(n))}function eu(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ui(e))}function tu(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)nu(e,t,n,r),t=t.sibling}function nu(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:tu(e,t,n,r),2048&i&&vl(9,t);break;case 1:case 31:case 13:default:tu(e,t,n,r);break;case 3:tu(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ui(e)));break;case 12:if(2048&i){tu(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;"function"==typeof s&&s(o,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Tc(t,t.return,l)}}else tu(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,null!==t.memoizedState?2&a._visibility?tu(e,t,n,r):iu(e,t):2&a._visibility?tu(e,t,n,r):(a._visibility|=2,ru(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&i&&Jl(o,t);break;case 24:tu(e,t,n,r),2048&i&&eu(t.alternate,t)}}function ru(e,t,n,r,i){for(i=i&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var a=e,o=t,s=n,l=r,u=o.flags;switch(o.tag){case 0:case 11:case 15:ru(a,o,s,l,i),vl(8,o);break;case 23:break;case 22:var c=o.stateNode;null!==o.memoizedState?2&c._visibility?ru(a,o,s,l,i):iu(a,o):(c._visibility|=2,ru(a,o,s,l,i)),i&&2048&u&&Jl(o.alternate,o);break;case 24:ru(a,o,s,l,i),i&&2048&u&&eu(o.alternate,o);break;default:ru(a,o,s,l,i)}t=t.sibling}}function iu(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:iu(n,r),2048&i&&Jl(r.alternate,r);break;case 24:iu(n,r),2048&i&&eu(r.alternate,r);break;default:iu(n,r)}t=t.sibling}}var au=8192;function ou(e,t,n){if(e.subtreeFlags&au)for(e=e.child;null!==e;)su(e,t,n),e=e.sibling}function su(e,t,n){switch(e.tag){case 26:ou(e,t,n),e.flags&au&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var i=Xd(r.href),a=t.querySelector(Kd(i));if(a)return null!==(t=a._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=uf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,void nt(a);a=t.ownerDocument||t,r=Qd(r),(i=Bd.get(i))&&tf(r,i),nt(a=a.createElement("link"));var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),pd(a,"link",r),n.instance=a}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=uf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,ql,e.memoizedState,e.memoizedProps);break;case 5:default:ou(e,t,n);break;case 3:case 4:var r=ql;ql=$d(e.stateNode.containerInfo),ou(e,t,n),ql=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=au,au=16777216,ou(e,t,n),au=r):ou(e,t,n))}}function lu(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function uu(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];_l=r,fu(r,e)}lu(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)cu(e),e=e.sibling}function cu(e){switch(e.tag){case 0:case 11:case 15:uu(e),2048&e.flags&&bl(9,e,e.return);break;case 3:case 12:default:uu(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,du(e)):uu(e)}}function du(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];_l=r,fu(r,e)}lu(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:bl(8,t,t.return),du(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,du(t));break;default:du(t)}e=e.sibling}}function fu(e,t){for(;null!==_l;){var n=_l;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Ui(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,_l=r;else e:for(n=e;null!==_l;){var i=(r=_l).sibling,a=r.return;if(Ol(r),r===n){_l=null;break e}if(null!==i){i.return=a,_l=i;break e}_l=a}}}var hu={getCacheForType:function(e){var t=Ri(Ii),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ri(Ii).controller.signal}},pu="function"==typeof WeakMap?WeakMap:Map,mu=0,gu=null,yu=null,vu=0,bu=0,xu=null,wu=!1,ku=!1,Su=!1,Eu=0,Tu=0,Cu=0,Pu=0,Nu=0,ju=0,Mu=0,Lu=null,Au=null,Du=!1,Ru=0,_u=0,zu=1/0,Ou=null,Fu=null,Vu=0,Iu=null,Bu=null,Uu=0,$u=0,Hu=null,Wu=null,qu=0,Yu=null;function Xu(){return 2&mu&&0!==vu?vu&-vu:null!==z.T?Hc():Ie()}function Ku(){if(0===ju)if(536870912&vu&&!hi)ju=536870912;else{var e=Ce;!(3932160&(Ce<<=1))&&(Ce=262144),ju=e}return null!==(e=Ra.current)&&(e.flags|=32),ju}function Qu(e,t,n){(e!==gu||2!==bu&&9!==bu)&&null===e.cancelPendingCommit||(rc(e,0),ec(e,vu,ju,!1)),Re(e,n),2&mu&&e===gu||(e===gu&&(!(2&mu)&&(Pu|=n),4===Tu&&ec(e,vu,ju,!1)),Oc(e))}function Gu(e,t,n){if(6&mu)throw Error(r(327));for(var i=!n&&!(127&t)&&0===(t&e.expiredLanes)||Me(e,t),a=i?function(e,t){var n=mu;mu|=2;var i=oc(),a=sc();gu!==e||vu!==t?(Ou=null,zu=ce()+500,rc(e,t)):ku=Me(e,t);e:for(;;)try{if(0!==bu&&null!==yu){t=yu;var o=xu;t:switch(bu){case 1:bu=0,xu=null,pc(e,t,o,1);break;case 2:case 9:if(ra(o)){bu=0,xu=null,hc(t);break}t=function(){2!==bu&&9!==bu||gu!==e||(bu=7),Oc(e)},o.then(t,t);break e;case 3:bu=7;break e;case 4:bu=5;break e;case 7:ra(o)?(bu=0,xu=null,hc(t)):(bu=0,xu=null,pc(e,t,o,7));break;case 5:var s=null;switch(yu.tag){case 26:s=yu.memoizedState;case 5:case 27:var l=yu;if(s?sf(s):l.stateNode.complete){bu=0,xu=null;var u=l.sibling;if(null!==u)yu=u;else{var c=l.return;null!==c?(yu=c,mc(c)):yu=null}break t}}bu=0,xu=null,pc(e,t,o,5);break;case 6:bu=0,xu=null,pc(e,t,o,6);break;case 8:nc(),Tu=6;break e;default:throw Error(r(462))}}dc();break}catch(d){ic(e,d)}return Ci=Ti=null,z.H=i,z.A=a,mu=n,null!==yu?0:(gu=null,vu=0,Ar(),Tu)}(e,t):uc(e,t,!0),o=i;;){if(0===a){ku&&!i&&ec(e,t,0,!1);break}if(n=e.current.alternate,!o||Ju(n)){if(2===a){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=0!==(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;a=Lu;var u=l.current.memoizedState.isDehydrated;if(u&&(rc(l,s).flags|=256),2!==(s=uc(l,s,!1))){if(Su&&!u){l.errorRecoveryDisabledLanes|=o,Pu|=o,a=4;break e}o=Au,Au=a,null!==o&&(null===Au?Au=o:Au.push.apply(Au,o))}a=s}if(o=!1,2!==a)continue}}if(1===a){rc(e,0),ec(e,t,0,!0);break}e:{switch(i=e,o=a){case 0:case 1:throw Error(r(345));case 4:if((4194048&t)!==t)break;case 6:ec(i,t,ju,!wu);break e;case 2:Au=null;break;case 3:case 5:break;default:throw Error(r(329))}if((62914560&t)===t&&10<(a=Ru+300-ce())){if(ec(i,t,ju,!wu),0!==je(i,0,!0))break e;Uu=t,i.timeoutHandle=Sd(Zu.bind(null,i,n,Au,Ou,Du,t,ju,Pu,Mu,wu,o,"Throttled",-0,0),a)}else Zu(i,n,Au,Ou,Du,t,ju,Pu,Mu,wu,o,null,-0,0)}break}a=uc(e,t,!1),o=!1}Oc(e)}function Zu(e,t,n,r,i,a,o,s,l,u,c,d,f,h){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){su(t,a,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Rt});var p=(62914560&a)===a?Ru-ce():(4194048&a)===a?_u-ce():0;if(null!==(p=function(e,t){return e.stylesheets&&0===e.count&&df(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&df(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===lf&&(lf=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&md(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],u=l.startTime;if(u>s)break;var c=l.transferSize,d=l.initiatorType;c&&md(d)&&(o+=c*((l=l.responseEnd)<s?1:(s-u)/(l-u)))}if(--r,t+=8*(a+o)/(i.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var i=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&df(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>lf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}(d,p)))return Uu=a,e.cancelPendingCommit=p(yc.bind(null,e,t,a,n,r,i,o,s,l,c,d,null,f,h)),void ec(e,a,o,!u)}yc(e,t,a,n,r,i,o,s,l)}function Ju(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!er(a(),i))return!1}catch(o){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ec(e,t,n,r){t&=~Nu,t&=~Pu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ke(i),o=1<<a;r[a]=-1,i&=~o}0!==n&&_e(e,n,t)}function tc(){return!!(6&mu)||(Fc(0),!1)}function nc(){if(null!==yu){if(0===bu)var e=yu.return;else Ci=Ti=null,lo(e=yu),ua=null,ca=0,e=yu;for(;null!==e;)yl(e.alternate,e),e=e.return;yu=null}}function rc(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,Ed(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Uu=0,nc(),gu=e,yu=n=Ur(e.current,null),vu=t,bu=0,xu=null,wu=!1,ku=Me(e,t),Su=!1,Mu=ju=Nu=Pu=Cu=Tu=0,Au=Lu=null,Du=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-ke(r),a=1<<i;t|=e[i],r&=~a}return Eu=t,Ar(),n}function ic(e,t){Ha=null,z.H=ys,t===Ji||t===ta?(t=sa(),bu=3):t===ea?(t=sa(),bu=4):bu=t===Rs?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,xu=t,null===yu&&(Tu=1,js(e,Qr(t,e.current)))}function ac(){var e=Ra.current;return null===e||((4194048&vu)===vu?null===_a:!!((62914560&vu)===vu||536870912&vu)&&e===_a)}function oc(){var e=z.H;return z.H=ys,null===e?ys:e}function sc(){var e=z.A;return z.A=hu,e}function lc(){Tu=4,wu||(4194048&vu)!==vu&&null!==Ra.current||(ku=!0),!(134217727&Cu)&&!(134217727&Pu)||null===gu||ec(gu,vu,ju,!1)}function uc(e,t,n){var r=mu;mu|=2;var i=oc(),a=sc();gu===e&&vu===t||(Ou=null,rc(e,t)),t=!1;var o=Tu;e:for(;;)try{if(0!==bu&&null!==yu){var s=yu,l=xu;switch(bu){case 8:nc(),o=6;break e;case 3:case 2:case 9:case 6:null===Ra.current&&(t=!0);var u=bu;if(bu=0,xu=null,pc(e,s,l,u),n&&ku){o=0;break e}break;default:u=bu,bu=0,xu=null,pc(e,s,l,u)}}cc(),o=Tu;break}catch(c){ic(e,c)}return t&&e.shellSuspendCounter++,Ci=Ti=null,mu=r,z.H=i,z.A=a,null===yu&&(gu=null,vu=0,Ar()),o}function cc(){for(;null!==yu;)fc(yu)}function dc(){for(;null!==yu&&!le();)fc(yu)}function fc(e){var t=ll(e.alternate,e,Eu);e.memoizedProps=e.pendingProps,null===t?mc(e):yu=t}function hc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ys(n,t,t.pendingProps,t.type,void 0,vu);break;case 11:t=Ys(n,t,t.pendingProps,t.type.render,t.ref,vu);break;case 5:lo(t);default:yl(n,t),t=ll(n,t=yu=$r(t,Eu),Eu)}e.memoizedProps=e.pendingProps,null===t?mc(e):yu=t}function pc(e,t,n,i){Ci=Ti=null,lo(t),ua=null,ca=0;var a=t.return;try{if(function(e,t,n,i,a){if(n.flags|=32768,null!==i&&"object"==typeof i&&"function"==typeof i.then){if(null!==(t=n.alternate)&&Li(t,n,a,!0),null!==(n=Ra.current)){switch(n.tag){case 31:case 13:return null===_a?lc():null===n.alternate&&0===Tu&&(Tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,i===na?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([i]):t.add(i),Cc(e,i,a)),!1;case 22:return n.flags|=65536,i===na?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([i]):n.add(i),Cc(e,i,a)),!1}throw Error(r(435,n.tag))}return Cc(e,i,a),lc(),!1}if(hi)return null!==(t=Ra.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==gi&&Si(Qr(e=Error(r(422),{cause:i}),n))):(i!==gi&&Si(Qr(t=Error(r(423),{cause:i}),n)),(e=e.current.alternate).flags|=65536,a&=-a,e.lanes|=a,i=Qr(i,n),Sa(e,a=Ls(e.stateNode,i,a)),4!==Tu&&(Tu=2)),!1;var o=Error(r(520),{cause:i});if(o=Qr(o,n),null===Lu?Lu=[o]:Lu.push(o),4!==Tu&&(Tu=2),null===t)return!0;i=Qr(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,Sa(n,e=Ls(n.stateNode,i,e)),!1;case 1:if(t=n.type,o=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===o||"function"!=typeof o.componentDidCatch||null!==Fu&&Fu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,Ds(a=As(a),e,n,i),Sa(n,a),!1}n=n.return}while(null!==n);return!1}(e,a,t,n,vu))return Tu=1,js(e,Qr(n,e.current)),void(yu=null)}catch(o){if(null!==a)throw yu=a,o;return Tu=1,js(e,Qr(n,e.current)),void(yu=null)}32768&t.flags?(hi||1===i?e=!0:ku||536870912&vu?e=!1:(wu=e=!0,(2===i||9===i||3===i||6===i)&&(null!==(i=Ra.current)&&13===i.tag&&(i.flags|=16384))),gc(t,e)):mc(t)}function mc(e){var t=e;do{if(32768&t.flags)return void gc(t,wu);e=t.return;var n=ml(t.alternate,t,Eu);if(null!==n)return void(yu=n);if(null!==(t=t.sibling))return void(yu=t);yu=t=e}while(null!==t);0===Tu&&(Tu=5)}function gc(e,t){do{var n=gl(e.alternate,e);if(null!==n)return n.flags&=32767,void(yu=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(yu=e);yu=e=n}while(null!==e);Tu=6,yu=null}function yc(e,t,n,i,a,o,s,l,u){e.cancelPendingCommit=null;do{kc()}while(0!==Vu);if(6&mu)throw Error(r(327));if(null!==t){if(t===e.current)throw Error(r(177));if(o=t.lanes|t.childLanes,function(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var c=31-ke(n),d=1<<c;s[c]=0,l[c]=-1;var f=u[c];if(null!==f)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];null!==h&&(h.lane&=-536870913)}n&=~d}0!==r&&_e(e,r,0),0!==a&&0===i&&0!==e.tag&&(e.suspendedLanes|=a&~(o&~t))}(e,n,o|=Lr,s,l,u),e===gu&&(yu=gu=null,vu=0),Bu=t,Iu=e,Uu=n,$u=o,Hu=a,Wu=i,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,oe(pe,function(){return Sc(),null})):(e.callbackNode=null,e.callbackPriority=0),i=!!(13878&t.flags),13878&t.subtreeFlags||i){i=z.T,z.T=null,a=O.p,O.p=2,s=mu,mu|=4;try{!function(e,t){if(e=e.containerInfo,gd=kf,or(e=ar(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch(g){n=null;break e}var s=0,l=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==a&&3!==f.nodeType||(l=s+a),f!==o||0!==i&&3!==f.nodeType||(u=s+i),3===f.nodeType&&(s+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===a&&(l=s),h===o&&++d===i&&(u=s),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(yd={focusedElem:e,selectionRange:n},kf=!1,_l=t;null!==_l;)if(e=(t=_l).child,1028&t.subtreeFlags&&null!==e)e.return=t,_l=e;else for(;null!==_l;){switch(o=(t=_l).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(a=e[n]).ref.impl=a.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==o){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,i=n.stateNode;try{var m=Ts(n.type,a);e=i.getSnapshotBeforeUpdate(m,o),i.__reactInternalSnapshotBeforeUpdate=e}catch(y){Tc(n,n.return,y)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Ld(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ld(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(r(163))}if(null!==(e=t.sibling)){e.return=t.return,_l=e;break}_l=t.return}}(e,t)}finally{mu=s,O.p=a,z.T=i}}Vu=1,vc(),bc(),xc()}}function vc(){if(1===Vu){Vu=0;var e=Iu,t=Bu,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=z.T,z.T=null;var r=O.p;O.p=2;var i=mu;mu|=4;try{Yl(t,e);var a=yd,o=ar(e.containerInfo),s=a.focusedElem,l=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&ir(s.ownerDocument.documentElement,s)){if(null!==l&&or(s)){var u=l.start,c=l.end;if(void 0===c&&(c=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(c,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),p=s.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!h.extend&&m>g&&(o=g,g=m,m=o);var y=rr(s,m),v=rr(s,g);if(y&&v&&(1!==h.rangeCount||h.anchorNode!==y.node||h.anchorOffset!==y.offset||h.focusNode!==v.node||h.focusOffset!==v.offset)){var b=d.createRange();b.setStart(y.node,y.offset),h.removeAllRanges(),m>g?(h.addRange(b),h.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),h.addRange(b))}}}}for(d=[],h=s;h=h.parentNode;)1===h.nodeType&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<d.length;s++){var x=d[s];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}kf=!!gd,yd=gd=null}finally{mu=i,O.p=r,z.T=n}}e.current=t,Vu=2}}function bc(){if(2===Vu){Vu=0;var e=Iu,t=Bu,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=z.T,z.T=null;var r=O.p;O.p=2;var i=mu;mu|=4;try{zl(e,t.alternate,t)}finally{mu=i,O.p=r,z.T=n}}Vu=3}}function xc(){if(4===Vu||3===Vu){Vu=0,ue();var e=Iu,t=Bu,n=Uu,r=Wu;10256&t.subtreeFlags||10256&t.flags?Vu=5:(Vu=0,Bu=Iu=null,wc(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(Fu=null),Ve(n),t=t.stateNode,xe&&"function"==typeof xe.onCommitFiberRoot)try{xe.onCommitFiberRoot(be,t,void 0,!(128&~t.current.flags))}catch(l){}if(null!==r){t=z.T,i=O.p,O.p=2,z.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{z.T=t,O.p=i}}3&Uu&&kc(),Oc(e),i=e.pendingLanes,261930&n&&42&i?e===Yu?qu++:(qu=0,Yu=e):qu=0,Fc(0)}}function wc(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Ui(t)))}function kc(){return vc(),bc(),xc(),Sc()}function Sc(){if(5!==Vu)return!1;var e=Iu,t=$u;$u=0;var n=Ve(Uu),i=z.T,a=O.p;try{O.p=32>n?32:n,z.T=null,n=Hu,Hu=null;var o=Iu,s=Uu;if(Vu=0,Bu=Iu=null,Uu=0,6&mu)throw Error(r(331));var l=mu;if(mu|=4,cu(o.current),nu(o,o.current,s,n),mu=l,Fc(0,!1),xe&&"function"==typeof xe.onPostCommitFiberRoot)try{xe.onPostCommitFiberRoot(be,o)}catch(u){}return!0}finally{O.p=a,z.T=i,wc(e,t)}}function Ec(e,t,n){t=Qr(n,t),null!==(e=wa(e,t=Ls(e.stateNode,t,2),2))&&(Re(e,2),Oc(e))}function Tc(e,t,n){if(3===e.tag)Ec(e,e,n);else for(;null!==t;){if(3===t.tag){Ec(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Fu||!Fu.has(r))){e=Qr(n,e),null!==(r=wa(t,n=As(2),2))&&(Ds(n,r,t,e),Re(r,2),Oc(r));break}}t=t.return}}function Cc(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pu;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(Su=!0,i.add(n),e=Pc.bind(null,e,t,n),t.then(e,e))}function Pc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gu===e&&(vu&n)===n&&(4===Tu||3===Tu&&(62914560&vu)===vu&&300>ce()-Ru?!(2&mu)&&rc(e,0):Nu|=n,Mu===vu&&(Mu=0)),Oc(e)}function Nc(e,t){0===t&&(t=Ae()),null!==(e=_r(e,t))&&(Re(e,t),Oc(e))}function jc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Nc(e,n)}function Mc(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==i&&i.delete(t),Nc(e,n)}var Lc=null,Ac=null,Dc=!1,Rc=!1,_c=!1,zc=0;function Oc(e){e!==Ac&&null===e.next&&(null===Ac?Lc=Ac=e:Ac=Ac.next=e),Rc=!0,Dc||(Dc=!0,Cd(function(){6&mu?oe(fe,Vc):Ic()}))}function Fc(e,t){if(!_c&&Rc){_c=!0;do{for(var n=!1,r=Lc;null!==r;){if(0!==e){var i=r.pendingLanes;if(0===i)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ke(42|e)+1)-1,a=201326741&(a&=i&~(o&~s))?201326741&a|1:a?2|a:0}0!==a&&(n=!0,$c(r,a))}else a=vu,!(3&(a=je(r,r===gu?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Me(r,a)||(n=!0,$c(r,a));r=r.next}}while(n);_c=!1}}function Vc(){Ic()}function Ic(){Rc=Dc=!1;var e=0;0!==zc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==kd&&(kd=e,!0);return kd=null,!1}()&&(e=zc);for(var t=ce(),n=null,r=Lc;null!==r;){var i=r.next,a=Bc(r,t);0===a?(r.next=null,null===n?Lc=i:n.next=i,null===i&&(Ac=n)):(n=r,(0!==e||3&a)&&(Rc=!0)),r=i}0!==Vu&&5!==Vu||Fc(e),0!==zc&&(zc=0)}function Bc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var o=31-ke(a),s=1<<o,l=i[o];-1===l?0!==(s&n)&&0===(s&r)||(i[o]=Le(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}if(n=vu,n=je(e,e===(t=gu)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===bu||9===bu)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&se(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Me(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&se(r),Ve(n)){case 2:case 8:n=he;break;case 32:default:n=pe;break;case 268435456:n=ge}return r=Uc.bind(null,e),n=oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&se(r),e.callbackPriority=2,e.callbackNode=null,2}function Uc(e,t){if(0!==Vu&&5!==Vu)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(kc()&&e.callbackNode!==n)return null;var r=vu;return 0===(r=je(e,e===gu?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Gu(e,r,t),Bc(e,ce()),null!=e.callbackNode&&e.callbackNode===n?Uc.bind(null,e):null)}function $c(e,t){if(kc())return null;Gu(e,t,!0)}function Hc(){if(0===zc){var e=Wi;0===e&&(e=Te,!(261888&(Te<<=1))&&(Te=256)),zc=e}return zc}function Wc(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Dt(""+e)}function qc(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Yc=0;Yc<Cr.length;Yc++){var Xc=Cr[Yc];Pr(Xc.toLowerCase(),"on"+(Xc[0].toUpperCase()+Xc.slice(1)))}Pr(vr,"onAnimationEnd"),Pr(br,"onAnimationIteration"),Pr(xr,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(wr,"onTransitionRun"),Pr(kr,"onTransitionStart"),Pr(Sr,"onTransitionCancel"),Pr(Er,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),at("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),at("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),at("onBeforeInput",["compositionend","keypress","textInput","paste"]),at("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),at("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),at("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kc="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(" "),Qc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kc));function Gc(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;a=s,i.currentTarget=u;try{a(i)}catch(c){Nr(c)}i.currentTarget=null,a=l}else for(o=0;o<r.length;o++){if(l=(s=r[o]).instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;a=s,i.currentTarget=u;try{a(i)}catch(c){Nr(c)}i.currentTarget=null,a=l}}}}function Zc(e,t){var n=t[qe];void 0===n&&(n=t[qe]=new Set);var r=e+"__bubble";n.has(r)||(nd(t,e,2,!1),n.add(r))}function Jc(e,t,n){var r=0;t&&(r|=4),nd(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[ed]){e[ed]=!0,rt.forEach(function(t){"selectionchange"!==t&&(Qc.has(t)||Jc(t,!1,e),Jc(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ed]||(t[ed]=!0,Jc("selectionchange",!1,t))}}function nd(e,t,n,r){switch(jf(t)){case 2:var i=Sf;break;case 8:i=Ef;break;default:i=Tf}n=i.bind(null,t,n,e),i=void 0,!Ht||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function rd(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var l=r.stateNode.containerInfo;if(l===i)break;if(4===s)for(s=r.return;null!==s;){var u=s.tag;if((3===u||4===u)&&s.stateNode.containerInfo===i)return;s=s.return}for(;null!==l;){if(null===(s=Ze(l)))return;if(5===(u=s.tag)||6===u||26===u||27===u){r=o=s;continue e}l=l.parentNode}}r=r.return}Bt(function(){var r=o,i=zt(n),s=[];e:{var l=Tr.get(e);if(void 0!==l){var u=an,c=e;switch(e){case"keypress":if(0===Qt(n))break e;case"keydown":case"keyup":u=xn;break;case"focusin":c="focus",u=dn;break;case"focusout":c="blur",u=dn;break;case"beforeblur":case"afterblur":u=dn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=un;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=cn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=kn;break;case vr:case br:case xr:u=fn;break;case Er:u=Sn;break;case"scroll":case"scrollend":u=sn;break;case"wheel":u=En;break;case"copy":case"cut":case"paste":u=hn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=wn;break;case"toggle":case"beforetoggle":u=Tn}var d=!!(4&t),f=!d&&("scroll"===e||"scrollend"===e),h=d?null!==l?l+"Capture":null:l;d=[];for(var p,m=r;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===h||null!=(g=Ut(m,h))&&d.push(id(m,g,p)),f)break;m=m.return}0<d.length&&(l=new u(l,c,null,n,i),s.push({event:l,listeners:d}))}}if(!(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===_t||!(c=n.relatedTarget||n.fromElement)||!Ze(c)&&!c[We])&&(u||l)&&(l=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?Ze(c):null)&&(f=a(c),d=c.tag,c!==f||5!==d&&27!==d&&6!==d)&&(c=null)):(u=null,c=r),u!==c)){if(d=un,g="onMouseLeave",h="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=wn,g="onPointerLeave",h="onPointerEnter",m="pointer"),f=null==u?l:et(u),p=null==c?l:et(c),(l=new d(g,m+"leave",u,n,i)).target=f,l.relatedTarget=p,g=null,Ze(i)===r&&((d=new d(h,m+"enter",c,n,i)).target=p,d.relatedTarget=f,g=d),f=g,u&&c)e:{for(d=od,m=c,p=0,g=h=u;g;g=d(g))p++;g=0;for(var y=m;y;y=d(y))g++;for(;0<p-g;)h=d(h),p--;for(;0<g-p;)m=d(m),g--;for(;p--;){if(h===m||null!==m&&h===m.alternate){d=h;break e}h=d(h),m=d(m)}d=null}else d=null;null!==u&&sd(s,l,u,d,!1),null!==c&&null!==f&&sd(s,f,c,d,!0)}if("select"===(u=(l=r?et(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===u&&"file"===l.type)var v=$n;else if(On(l))if(Hn)v=Jn;else{v=Gn;var b=Qn}else!(u=l.nodeName)||"input"!==u.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Mt(r.elementType)&&(v=$n):v=Zn;switch(v&&(v=v(e,r))?Fn(s,v,n,i):(b&&b(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&kt(l,"number",l.value)),b=r?et(r):window,e){case"focusin":(On(b)||"true"===b.contentEditable)&&(lr=b,ur=r,cr=null);break;case"focusout":cr=ur=lr=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,fr(s,n,i);break;case"selectionchange":if(sr)break;case"keydown":case"keyup":fr(s,n,i)}var x;if(Pn)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else _n?Dn(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Mn&&"ko"!==n.locale&&(_n||"onCompositionStart"!==w?"onCompositionEnd"===w&&_n&&(x=Kt()):(Yt="value"in(qt=i)?qt.value:qt.textContent,_n=!0)),0<(b=ad(r,w)).length&&(w=new pn(w,e,null,n,i),s.push({event:w,listeners:b}),x?w.data=x:null!==(x=Rn(n))&&(w.data=x))),(x=jn?function(e,t){switch(e){case"compositionend":return Rn(t);case"keypress":return 32!==t.which?null:(An=!0,Ln);case"textInput":return(e=t.data)===Ln&&An?null:e;default:return null}}(e,n):function(e,t){if(_n)return"compositionend"===e||!Pn&&Dn(e,t)?(e=Kt(),Xt=Yt=qt=null,_n=!1,e):null;switch(e){case"paste":default: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 Mn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(w=ad(r,"onBeforeInput")).length&&(b=new pn("onBeforeInput","beforeinput",null,n,i),s.push({event:b,listeners:w}),b.data=x)),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var a=Wc((i[He]||null).action),o=r.submitter;o&&null!==(t=(t=o[He]||null)?Wc(t.formAction):o.getAttribute("formAction"))&&(a=t,o=null);var s=new an("action","action",null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==zc){var e=o?qc(i,o):new FormData(i);rs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else"function"==typeof a&&(s.preventDefault(),e=o?qc(i,o):new FormData(i),rs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}(s,e,r,n,i)}Gc(s,t)})}function id(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ad(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===a||(null!=(i=Ut(e,n))&&r.unshift(id(e,i,a)),null!=(i=Ut(e,t))&&r.push(id(e,i,a))),3===e.tag)return r;e=e.return}return[]}function od(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function sd(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===u||(l=u,i?null!=(u=Ut(n,a))&&o.unshift(id(n,u,l)):i||null!=(u=Ut(n,a))&&o.push(id(n,u,l))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var ld=/\\r\\n?/g,ud=/\\u0000|\\uFFFD/g;function cd(e){return("string"==typeof e?e:""+e).replace(ld,"\\n").replace(ud,"")}function dd(e,t){return t=cd(t),cd(e)===t}function fd(e,t,n,i,a,o){switch(n){case"children":"string"==typeof i?"body"===t||"textarea"===t&&""===i||Ct(e,i):("number"==typeof i||"bigint"==typeof i)&&"body"!==t&&Ct(e,""+i);break;case"className":dt(e,"class",i);break;case"tabIndex":dt(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":dt(e,n,i);break;case"style":jt(e,i,o);break;case"data":if("object"!==t){dt(e,"data",i);break}case"src":case"href":if(""===i&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==i||"function"==typeof i||"symbol"==typeof i||"boolean"==typeof i){e.removeAttribute(n);break}i=Dt(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if("function"==typeof i){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof o&&("formAction"===n?("input"!==t&&fd(e,t,"name",a.name,a,null),fd(e,t,"formEncType",a.formEncType,a,null),fd(e,t,"formMethod",a.formMethod,a,null),fd(e,t,"formTarget",a.formTarget,a,null)):(fd(e,t,"encType",a.encType,a,null),fd(e,t,"method",a.method,a,null),fd(e,t,"target",a.target,a,null))),null==i||"symbol"==typeof i||"boolean"==typeof i){e.removeAttribute(n);break}i=Dt(""+i),e.setAttribute(n,i);break;case"onClick":null!=i&&(e.onclick=Rt);break;case"onScroll":null!=i&&Zc("scroll",e);break;case"onScrollEnd":null!=i&&Zc("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=i){if("object"!=typeof i||!("__html"in i))throw Error(r(61));if(null!=(n=i.__html)){if(null!=a.children)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&"function"!=typeof i&&"symbol"!=typeof i;break;case"muted":e.muted=i&&"function"!=typeof i&&"symbol"!=typeof i;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==i||"function"==typeof i||"boolean"==typeof i||"symbol"==typeof i){e.removeAttribute("xlink:href");break}n=Dt(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===i?e.setAttribute(n,""):!1!==i&&null!=i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":null==i||"function"==typeof i||"symbol"==typeof i||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":Zc("beforetoggle",e),Zc("toggle",e),ct(e,"popover",i);break;case"xlinkActuate":ft(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ft(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ft(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ft(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ft(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ft(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ft(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ft(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ft(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":ct(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ct(e,n=Lt.get(n)||n,i)}}function hd(e,t,n,i,a,o){switch(n){case"style":jt(e,i,o);break;case"dangerouslySetInnerHTML":if(null!=i){if("object"!=typeof i||!("__html"in i))throw Error(r(61));if(null!=(n=i.__html)){if(null!=a.children)throw Error(r(60));e.innerHTML=n}}break;case"children":"string"==typeof i?Ct(e,i):("number"==typeof i||"bigint"==typeof i)&&Ct(e,""+i);break;case"onScroll":null!=i&&Zc("scroll",e);break;case"onScrollEnd":null!=i&&Zc("scrollend",e);break;case"onClick":null!=i&&(e.onclick=Rt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:it.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),"function"==typeof(o=null!=(o=e[He]||null)?o[n]:null)&&e.removeEventListener(t,o,a),"function"!=typeof i)?n in e?e[n]=i:!0===i?e.setAttribute(n,""):ct(e,n,i):("function"!=typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,a)))}}function pd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Zc("error",e),Zc("load",e);var i,a=!1,o=!1;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(null!=s)switch(i){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:fd(e,t,i,s,n,null)}}return o&&fd(e,t,"srcSet",n.srcSet,n,null),void(a&&fd(e,t,"src",n.src,n,null));case"input":Zc("invalid",e);var l=i=s=o=null,u=null,c=null;for(a in n)if(n.hasOwnProperty(a)){var d=n[a];if(null!=d)switch(a){case"name":o=d;break;case"type":s=d;break;case"checked":u=d;break;case"defaultChecked":c=d;break;case"value":i=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(r(137,t));break;default:fd(e,t,a,d,n,null)}}return void wt(e,i,l,u,c,s,o,!1);case"select":for(o in Zc("invalid",e),a=s=i=null,n)if(n.hasOwnProperty(o)&&null!=(l=n[o]))switch(o){case"value":i=l;break;case"defaultValue":s=l;break;case"multiple":a=l;default:fd(e,t,o,l,n,null)}return t=i,n=s,e.multiple=!!a,void(null!=t?St(e,!!a,t,!1):null!=n&&St(e,!!a,n,!0));case"textarea":for(s in Zc("invalid",e),i=o=a=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":a=l;break;case"defaultValue":o=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(r(91));break;default:fd(e,t,s,l,n,null)}return void Tt(e,a,o,i);case"option":for(u in n)if(n.hasOwnProperty(u)&&null!=(a=n[u]))if("selected"===u)e.selected=a&&"function"!=typeof a&&"symbol"!=typeof a;else fd(e,t,u,a,n,null);return;case"dialog":Zc("beforetoggle",e),Zc("toggle",e),Zc("cancel",e),Zc("close",e);break;case"iframe":case"object":Zc("load",e);break;case"video":case"audio":for(a=0;a<Kc.length;a++)Zc(Kc[a],e);break;case"image":Zc("error",e),Zc("load",e);break;case"details":Zc("toggle",e);break;case"embed":case"source":case"link":Zc("error",e),Zc("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(a=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:fd(e,t,c,a,n,null)}return;default:if(Mt(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(a=n[d])&&hd(e,t,d,a,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(a=n[l])&&fd(e,t,l,a,n,null))}function md(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var gd=null,yd=null;function vd(e){return 9===e.nodeType?e:e.ownerDocument}function bd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function wd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var kd=null;var Sd="function"==typeof setTimeout?setTimeout:void 0,Ed="function"==typeof clearTimeout?clearTimeout:void 0,Td="function"==typeof Promise?Promise:void 0,Cd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Td?function(e){return Td.resolve(null).then(e).catch(Pd)}:Sd;function Pd(e){setTimeout(function(){throw e})}function Nd(e){return"head"===e}function jd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)||"/&"===n){if(0===r)return e.removeChild(i),void Yf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Id(e.ownerDocument.documentElement);else if("head"===n){Id(n=e.ownerDocument.head);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Qe]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===a.rel.toLowerCase()||n.removeChild(a),a=o}}else"body"===n&&Id(e.ownerDocument.body);n=i}while(n);Yf(t)}function Md(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Ld(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Ld(n),Ge(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Ad(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=_d(e.nextSibling)))return null}return e}function Dd(e){return"$?"===e.data||"$~"===e.data}function Rd(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function _d(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var zd=null;function Od(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return _d(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Fd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Vd(e,t,n){switch(t=vd(n),e){case"html":if(!(e=t.documentElement))throw Error(r(452));return e;case"head":if(!(e=t.head))throw Error(r(453));return e;case"body":if(!(e=t.body))throw Error(r(454));return e;default:throw Error(r(451))}}function Id(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ge(e)}var Bd=new Map,Ud=new Set;function $d(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Hd=O.d;O.d={f:function(){var e=Hd.f(),t=tc();return e||t},r:function(e){var t=Je(e);null!==t&&5===t.tag&&"form"===t.type?as(t):Hd.r(e)},D:function(e){Hd.D(e),qd("dns-prefetch",e,null)},C:function(e,t){Hd.C(e,t),qd("preconnect",e,t)},L:function(e,t,n){Hd.L(e,t,n);var r=Wd;if(r&&e&&t){var i='link[rel="preload"][as="'+bt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+bt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(i+='[imagesizes="'+bt(n.imageSizes)+'"]')):i+='[href="'+bt(e)+'"]';var a=i;switch(t){case"style":a=Xd(e);break;case"script":a=Gd(e)}Bd.has(a)||(e=c({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Bd.set(a,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(Kd(a))||"script"===t&&r.querySelector(Zd(a))||(pd(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}},m:function(e,t){Hd.m(e,t);var n=Wd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+bt(r)+'"][href="'+bt(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Gd(e)}if(!Bd.has(a)&&(e=c({rel:"modulepreload",href:e},t),Bd.set(a,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Zd(a)))return}pd(r=n.createElement("link"),"link",e),nt(r),n.head.appendChild(r)}}},X:function(e,t){Hd.X(e,t);var n=Wd;if(n&&e){var r=tt(n).hoistableScripts,i=Gd(e),a=r.get(i);a||((a=n.querySelector(Zd(i)))||(e=c({src:e,async:!0},t),(t=Bd.get(i))&&nf(e,t),nt(a=n.createElement("script")),pd(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}},S:function(e,t,n){Hd.S(e,t,n);var r=Wd;if(r&&e){var i=tt(r).hoistableStyles,a=Xd(e);t=t||"default";var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Kd(a)))s.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Bd.get(a))&&tf(e,n);var l=o=r.createElement("link");nt(l),pd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,ef(o,t,r)}o={type:"stylesheet",instance:o,count:1,state:s},i.set(a,o)}}},M:function(e,t){Hd.M(e,t);var n=Wd;if(n&&e){var r=tt(n).hoistableScripts,i=Gd(e),a=r.get(i);a||((a=n.querySelector(Zd(i)))||(e=c({src:e,async:!0,type:"module"},t),(t=Bd.get(i))&&nf(e,t),nt(a=n.createElement("script")),pd(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}};var Wd="undefined"==typeof document?null:document;function qd(e,t,n){var r=Wd;if(r&&"string"==typeof t&&t){var i=bt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"==typeof n&&(i+='[crossorigin="'+n+'"]'),Ud.has(i)||(Ud.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(pd(t=r.createElement("link"),"link",e),nt(t),r.head.appendChild(t)))}}function Yd(e,t,n,i){var a,o,s,l,u=(u=X.current)?$d(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Xd(n.href),(i=(n=tt(u).hoistableStyles).get(t))||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Xd(n.href);var c=tt(u).hoistableStyles,d=c.get(e);if(d||(u=u.ownerDocument||u,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=u.querySelector(Kd(e)))&&!c._p&&(d.instance=c,d.state.loading=5),Bd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Bd.set(e,n),c||(a=u,o=e,s=n,l=d.state,a.querySelector('link[rel="preload"][as="style"]['+o+"]")?l.loading=1:(o=a.createElement("link"),l.preload=o,o.addEventListener("load",function(){return l.loading|=1}),o.addEventListener("error",function(){return l.loading|=2}),pd(o,"link",s),nt(o),a.head.appendChild(o))))),t&&null===i)throw Error(r(528,""));return d}if(t&&null!==i)throw Error(r(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Gd(n),(i=(n=tt(u).hoistableScripts).get(t))||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Xd(e){return'href="'+bt(e)+'"'}function Kd(e){return'link[rel="stylesheet"]['+e+"]"}function Qd(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function Gd(e){return'[src="'+bt(e)+'"]'}function Zd(e){return"script[async]"+e}function Jd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+bt(n.href)+'"]');if(i)return t.instance=i,nt(i),i;var a=c({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return nt(i=(e.ownerDocument||e).createElement("style")),pd(i,"style",a),ef(i,n.precedence,e),t.instance=i;case"stylesheet":a=Xd(n.href);var o=e.querySelector(Kd(a));if(o)return t.state.loading|=4,t.instance=o,nt(o),o;i=Qd(n),(a=Bd.get(a))&&tf(i,a),nt(o=(e.ownerDocument||e).createElement("link"));var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),pd(o,"link",i),t.state.loading|=4,ef(o,n.precedence,e),t.instance=o;case"script":return o=Gd(n.src),(a=e.querySelector(Zd(o)))?(t.instance=a,nt(a),a):(i=n,(a=Bd.get(o))&&nf(i=c({},n),a),nt(a=(e=e.ownerDocument||e).createElement("script")),pd(a,"link",i),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(i=t.instance,t.state.loading|=4,ef(i,n.precedence,e));return t.instance}function ef(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function tf(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function nf(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var rf=null;function af(e,t,n){if(null===rf){var r=new Map,i=rf=new Map;i.set(n,r)}else(r=(i=rf).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Qe]||a[$e]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var o=a.getAttribute(t)||"";o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function of(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function sf(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var lf=0;function uf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)df(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var cf=null;function df(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,cf=new Map,t.forEach(ff,e),cf=null,uf.call(e))}function ff(e,t){if(!(4&t.state.loading)){var n=cf.get(e);if(n)var r=n.get(null);else{n=new Map,cf.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var o=i[a];"LINK"!==o.nodeName&&"not all"===o.getAttribute("media")||(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}o=(i=t.instance).getAttribute("data-precedence"),(a=n.get(o)||r)===r&&n.set(null,i),n.set(o,i),this.count++,r=uf.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var hf={$$typeof:w,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function pf(e,t,n,r,i,a,o,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=De(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=De(0),this.hiddenUpdates=De(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function mf(e,t,n,r,i,a,o,s,l,u,c,d){return e=new pf(e,t,n,o,l,u,c,d,s),t=1,!0===a&&(t|=24),a=Ir(3,null,null,t),e.current=a,a.stateNode=e,(t=Bi()).refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},va(a),e}function gf(e){return e?e=Fr:Fr}function yf(e,t,n,r,i,a){i=gf(i),null===r.context?r.context=i:r.pendingContext=i,(r=xa(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(n=wa(e,r,t))&&(Qu(n,0,t),ka(n,e,t))}function vf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function bf(e,t){vf(e,t),(e=e.alternate)&&vf(e,t)}function xf(e){if(13===e.tag||31===e.tag){var t=_r(e,67108864);null!==t&&Qu(t,0,67108864),bf(e,67108864)}}function wf(e){if(13===e.tag||31===e.tag){var t=Xu(),n=_r(e,t=Fe(t));null!==n&&Qu(n,0,t),bf(e,t)}}var kf=!0;function Sf(e,t,n,r){var i=z.T;z.T=null;var a=O.p;try{O.p=2,Tf(e,t,n,r)}finally{O.p=a,z.T=i}}function Ef(e,t,n,r){var i=z.T;z.T=null;var a=O.p;try{O.p=8,Tf(e,t,n,r)}finally{O.p=a,z.T=i}}function Tf(e,t,n,r){if(kf){var i=Cf(r);if(null===i)rd(e,t,r,Pf,n),Ff(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Lf=Vf(Lf,e,t,n,r,i),!0;case"dragenter":return Af=Vf(Af,e,t,n,r,i),!0;case"mouseover":return Df=Vf(Df,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Rf.set(a,Vf(Rf.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,_f.set(a,Vf(_f.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Ff(e,r),4&t&&-1<Of.indexOf(e)){for(;null!==i;){var a=Je(i);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var o=Ne(a.pendingLanes);if(0!==o){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-ke(o);s.entanglements[1]|=l,o&=~l}Oc(a),!(6&mu)&&(zu=ce()+500,Fc(0))}}break;case 31:case 13:null!==(s=_r(a,2))&&Qu(s,0,2),tc(),bf(a,2)}if(null===(a=Cf(r))&&rd(e,t,r,Pf,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else rd(e,t,r,null,n)}}function Cf(e){return Nf(e=zt(e))}var Pf=null;function Nf(e){if(Pf=null,null!==(e=Ze(e))){var t=a(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=o(t)))return e;e=null}else if(31===n){if(null!==(e=s(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Pf=e,null}function jf(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(de()){case fe:return 2;case he:return 8;case pe:case me:return 32;case ge:return 268435456;default:return 32}default:return 32}}var Mf=!1,Lf=null,Af=null,Df=null,Rf=new Map,_f=new Map,zf=[],Of="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".split(" ");function Ff(e,t){switch(e){case"focusin":case"focusout":Lf=null;break;case"dragenter":case"dragleave":Af=null;break;case"mouseover":case"mouseout":Df=null;break;case"pointerover":case"pointerout":Rf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_f.delete(t.pointerId)}}function Vf(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=Je(t))&&xf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function If(e){var t=Ze(e.target);if(null!==t){var n=a(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=o(n)))return e.blockedOn=t,void Be(e.priority,function(){wf(n)})}else if(31===t){if(null!==(t=s(n)))return e.blockedOn=t,void Be(e.priority,function(){wf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cf(e.nativeEvent);if(null!==n)return null!==(t=Je(n))&&xf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);_t=r,n.target.dispatchEvent(r),_t=null,t.shift()}return!0}function Uf(e,t,n){Bf(e)&&n.delete(t)}function $f(){Mf=!1,null!==Lf&&Bf(Lf)&&(Lf=null),null!==Af&&Bf(Af)&&(Af=null),null!==Df&&Bf(Df)&&(Df=null),Rf.forEach(Uf),_f.forEach(Uf)}function Hf(t,n){t.blockedOn===n&&(t.blockedOn=null,Mf||(Mf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$f)))}var Wf=null;function qf(t){Wf!==t&&(Wf=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wf===t&&(Wf=null);for(var e=0;e<t.length;e+=3){var n=t[e],r=t[e+1],i=t[e+2];if("function"!=typeof r){if(null===Nf(r||n))continue;break}var a=Je(n);null!==a&&(t.splice(e,3),e-=3,rs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Yf(e){function t(t){return Hf(t,e)}null!==Lf&&Hf(Lf,e),null!==Af&&Hf(Af,e),null!==Df&&Hf(Df,e),Rf.forEach(t),_f.forEach(t);for(var n=0;n<zf.length;n++){var r=zf[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<zf.length&&null===(n=zf[0]).blockedOn;)If(n),null===n.blockedOn&&zf.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[He]||null;if("function"==typeof a)o||qf(n);else if(o){var s=null;if(a&&a.hasAttribute("formAction")){if(i=a,o=a[He]||null)s=o.formAction;else if(null!==Nf(i))continue}else s=o.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),qf(n)}}}function Xf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==i&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==i&&(i(),i=null)}}}function Kf(e){this._internalRoot=e}function Qf(e){this._internalRoot=e}Qf.prototype.render=Kf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));yf(t.current,Xu(),e,t,null,null)},Qf.prototype.unmount=Kf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;yf(e.current,2,null,e,null,null),tc(),t[We]=null}},Qf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ie();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zf.length&&0!==t&&t<zf[n].priority;n++);zf.splice(n,0,e),0===n&&If(e)}};var Gf=t.version;if("19.2.4"!==Gf)throw Error(r(527,Gf,"19.2.4"));O.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=a(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,i=t;;){var o=n.return;if(null===o)break;var s=o.alternate;if(null===s){if(null!==(i=o.return)){n=i;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return l(o),e;if(s===i)return l(o),t;s=s.sibling}throw Error(r(188))}if(n.return!==i.return)n=o,i=s;else{for(var u=!1,c=o.child;c;){if(c===n){u=!0,n=o,i=s;break}if(c===i){u=!0,i=o,n=s;break}c=c.sibling}if(!u){for(c=s.child;c;){if(c===n){u=!0,n=s,i=o;break}if(c===i){u=!0,i=s,n=o;break}c=c.sibling}if(!u)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?u(e):null)?null:e.stateNode};var Zf={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Jf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jf.isDisabled&&Jf.supportsFiber)try{be=Jf.inject(Zf),xe=Jf}catch(th){}}return y.createRoot=function(e,t){if(!i(e))throw Error(r(299));var n=!1,a="",o=Cs,s=Ps,l=Ns;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onUncaughtError&&(o=t.onUncaughtError),void 0!==t.onCaughtError&&(s=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=mf(e,1,!1,null,0,n,a,null,o,s,l,Xf),e[We]=t.current,td(e),new Kf(t)},y.hydrateRoot=function(e,t,n){if(!i(e))throw Error(r(299));var a=!1,o="",s=Cs,l=Ps,u=Ns,c=null;return null!=n&&(!0===n.unstable_strictMode&&(a=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onUncaughtError&&(s=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(u=n.onRecoverableError),void 0!==n.formState&&(c=n.formState)),(t=mf(e,1,!0,t,0,a,o,c,s,l,u,Xf)).context=gf(null),n=t.current,(o=xa(a=Fe(a=Xu()))).callback=null,wa(n,o,a),n=a,t.current.lanes=n,Re(t,n),Oc(t),e[We]=t.current,td(e),new Qf(t)},y.version="19.2.4",y}var M=(E||(E=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),g.exports=j()),g.exports);const L=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},A=e=>e;const D=e=>{const t=(e=>e?L(e):L)(e),n=e=>function(e,t=A){const n=h.useSyncExternalStore(e.subscribe,h.useCallback(()=>t(e.getState()),[e,t]),h.useCallback(()=>t(e.getInitialState()),[e,t]));return h.useDebugValue(n),n}(t,e);return Object.assign(n,t),n};async function R(e){const t=await fetch(\`\${e}\`);if(!t.ok)throw new Error(\`\${t.status} \${t.statusText}\`);return t.json()}async function _(e,t){const n=await fetch(\`\${e}\`,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const e=await n.json().catch(()=>({}));throw new Error(e.message??\`\${n.status} \${n.statusText}\`)}return n.json()}const z={"15m":9e5,"30m":18e5,"1h":36e5,"12h":432e5,"24h":864e5},O=(F=e=>({sessions:[],milestones:[],config:null,health:null,loading:!0,timeTravelTime:null,timeScale:(()=>{try{const e=localStorage.getItem("useai-time-scale");if(e&&["15m","30m","1h","12h","24h"].includes(e))return e}catch{}return"1h"})(),filters:{category:"all",client:"all",project:"all",language:"all"},loadAll:async()=>{try{const[t,n,r]=await Promise.all([R("/api/local/sessions"),R("/api/local/milestones"),R("/api/local/config")]);e({sessions:t,milestones:n,config:r,loading:!1})}catch{e({loading:!1})}},loadHealth:async()=>{try{const t=await R("/health");e({health:t})}catch{}},setTimeTravelTime:t=>e({timeTravelTime:t}),setTimeScale:t=>{try{localStorage.setItem("useai-time-scale",t)}catch{}e({timeScale:t})},setFilter:(t,n)=>e(e=>({filters:{...e.filters,[t]:n}}))}))?D(F):D;var F;function V(e){if(0===e.length)return 0;const t=new Set;for(const o of e)t.add(o.started_at.slice(0,10));const n=[...t].sort().reverse();if(0===n.length)return 0;const r=(new Date).toISOString().slice(0,10),i=new Date(Date.now()-864e5).toISOString().slice(0,10);if(n[0]!==r&&n[0]!==i)return 0;let a=1;for(let o=1;o<n.length;o++){const e=new Date(n[o-1]),t=new Date(n[o]);if(1!==(e.getTime()-t.getTime())/864e5)break;a++}return a}
2248
1889
  /**
2249
1890
  * @license lucide-react v0.468.0 - ISC
2250
1891
  *
2251
1892
  * This source code is licensed under the ISC license.
2252
1893
  * See the LICENSE file in the root directory of this source tree.
2253
- */const K=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();
1894
+ */
1895
+ const I=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();
2254
1896
  /**
2255
1897
  * @license lucide-react v0.468.0 - ISC
2256
1898
  *
2257
1899
  * This source code is licensed under the ISC license.
2258
1900
  * See the LICENSE file in the root directory of this source tree.
2259
1901
  */
2260
- var X={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
1902
+ var B={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
2261
1903
  /**
2262
1904
  * @license lucide-react v0.468.0 - ISC
2263
1905
  *
2264
1906
  * This source code is licensed under the ISC license.
2265
1907
  * See the LICENSE file in the root directory of this source tree.
2266
- */const Y=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:a,iconNode:o,...i},u)=>d.createElement("svg",{ref:u,...X,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:K("lucide",l),...i},[...o.map(([e,t])=>d.createElement(e,t)),...Array.isArray(a)?a:[a]])),G=(e,t)=>{const n=d.forwardRef(({className:n,...r},l)=>{return d.createElement(Y,{ref:l,iconNode:t,className:K(\`lucide-\${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}\`,n),...r});var a});return n.displayName=\`\${e}\`,n},Z=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),J=G("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),ee=G("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),te=G("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),ne=G("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);
1908
+ */const U=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},l)=>f.createElement("svg",{ref:l,...B,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:I("lucide",i),...s},[...o.map(([e,t])=>f.createElement(e,t)),...Array.isArray(a)?a:[a]])),$=(e,t)=>{const n=f.forwardRef(({className:n,...r},i)=>{return f.createElement(U,{ref:i,iconNode:t,className:I(\`lucide-\${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}\`,n),...r});var a});return n.displayName=\`\${e}\`,n},H=$("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),W=$("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),q=$("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Y=$("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),X=$("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),K=$("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Q=$("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),G=$("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),Z=$("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]),J=$("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),ee=$("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),te=$("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),ne=$("MousePointer2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]),re=$("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),ie=$("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),ae=$("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),oe=$("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),se=$("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),le=$("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);
2267
1909
  /**
2268
1910
  * @license lucide-react v0.468.0 - ISC
2269
1911
  *
2270
1912
  * This source code is licensed under the ISC license.
2271
1913
  * See the LICENSE file in the root directory of this source tree.
2272
- */function re(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function le(e){const t=new Date(e);return isNaN(t.getTime())?e.slice(0,10):\`\${t.getFullYear()}-\${String(t.getMonth()+1).padStart(2,"0")}-\${String(t.getDate()).padStart(2,"0")} \${String(t.getHours()).padStart(2,"0")}:\${String(t.getMinutes()).padStart(2,"0")}\`}const ae={feature:"bg-[#2a3520] text-[#4ade80]",bugfix:"bg-[#3a2020] text-[#f87171]",refactor:"bg-[#202a3a] text-[#a78bfa]",test:"bg-[#202535] text-[#38bdf8]",docs:"bg-[#2a2820] text-[#c4a854]",setup:"bg-[#252520] text-[#b0a070]",deployment:"bg-[#202525] text-[#70b0a0]"};function oe({category:e}){const t=ae[e]??"bg-[#252525] text-[#9c9588]";return i.jsx("span",{className:\`text-[0.7rem] px-2 py-0.5 rounded font-mono uppercase tracking-wide font-semibold \${t}\`,children:e})}function ie({session:e,milestones:t,defaultExpanded:n=!1}){const[r,l]=d.useState(n),a=$[e.client]??e.client;return i.jsxs("div",{className:"border-b border-border last:border-b-0",children:[i.jsxs("button",{className:"w-full flex items-center gap-3 px-3 py-3 hover:bg-bg-surface-2/50 transition-colors text-left",onClick:()=>l(!r),children:[r?i.jsx(Z,{className:"w-4 h-4 text-text-muted flex-shrink-0"}):i.jsx(ee,{className:"w-4 h-4 text-text-muted flex-shrink-0"}),i.jsx("div",{className:"flex-1 min-w-0",children:i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("span",{className:"text-sm font-medium text-text-primary",children:a}),i.jsx("span",{className:"text-xs font-mono text-text-muted",children:e.task_type}),e.project&&i.jsx("span",{className:"text-[0.68rem] px-1.5 py-0.5 rounded bg-bg-surface-2 text-accent-dim font-mono",children:e.project}),e.languages.length>0&&i.jsx("span",{className:"text-xs text-text-muted font-mono",children:e.languages.join(", ")})]})}),i.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[i.jsxs("span",{className:"text-xs font-mono text-text-muted",children:[t.length," milestone",1!==t.length?"s":""]}),i.jsx("span",{className:"text-xs font-mono text-text-muted",children:re(e.duration_seconds)}),i.jsx("span",{className:"text-xs font-mono text-text-muted",children:le(e.started_at)})]})]}),r&&i.jsx("div",{className:"pl-10 pr-3 pb-2",children:t.map(e=>{const t=!!e.private_title,n=t?e.private_title:e.title,r=function(e){if(!e||e<=0)return"";if(e<60)return\`\${e}m\`;const t=Math.floor(e/60),n=e%60;return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}(e.duration_minutes);return i.jsxs("div",{className:"flex items-start gap-3 py-2 border-t border-border/50",children:[i.jsx("div",{className:"w-2 h-2 rounded-full mt-1.5 flex-shrink-0",style:{backgroundColor:H[e.category]??"#9c9588"}}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[t&&i.jsx("svg",{className:"w-3 h-3 text-accent-dim opacity-70 flex-shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:i.jsx("path",{d:"M4 7V5a4 4 0 118 0v2h1a1 1 0 011 1v6a1 1 0 01-1 1H3a1 1 0 01-1-1V8a1 1 0 011-1h1zm2-2v2h4V5a2 2 0 10-4 0z"})}),i.jsx("span",{className:"text-sm text-text-primary truncate",children:n}),e.project&&i.jsx("span",{className:"text-[0.68rem] px-1.5 py-0.5 rounded bg-bg-surface-2 text-accent-dim font-mono flex-shrink-0",children:e.project})]}),t&&i.jsxs("div",{className:"flex items-center gap-1 mt-0.5 text-xs text-text-muted",children:[i.jsx("svg",{className:"w-2.5 h-2.5 opacity-50",viewBox:"0 0 16 16",fill:"currentColor",children:i.jsx("path",{d:"M8 0a8 8 0 100 16A8 8 0 008 0zm5.3 5H11a13 13 0 00-1-3.2A6 6 0 0113.3 5zM8 1.5c.7.9 1.2 2.1 1.5 3.5h-3C6.8 3.6 7.3 2.4 8 1.5zM1.5 9a6 6 0 010-2h2.6a14 14 0 000 2H1.5zM2.7 11H5a13 13 0 001 3.2A6 6 0 012.7 11zM5 11h6a11 11 0 01-1.5 3.5c-.3.4-.7.7-1.1.9a6 6 0 01-1.9-1c-.4-.5-.7-1-.9-1.5-.2-.5-.4-1.2-.6-1.9zm6.9 0h2.4a6 6 0 01-3.3 3.2c.5-.9.8-2 1-3.2zm2.6-2h-2.6a14 14 0 000-2h2.6a6 6 0 010 2zM5.1 7a12 12 0 000 2H11a12 12 0 000-2H5.1zM6 1.8A6 6 0 012.7 5H5a13 13 0 011-3.2z"})}),e.title]})]}),i.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[i.jsx(oe,{category:e.category}),e.complexity&&i.jsx("span",{className:"text-[0.7rem] text-text-muted font-mono",children:e.complexity}),r&&i.jsx("span",{className:"text-[0.7rem] text-text-muted font-mono whitespace-nowrap",children:r}),i.jsx("span",{className:"text-[0.72rem] text-text-muted font-mono whitespace-nowrap",children:le(e.created_at)})]})]},e.id)})})]})}function ue({sessions:e,milestones:t,filters:n,onFilterChange:r}){const l=d.useMemo(()=>[...new Set(t.map(e=>e.category))].sort(),[t]),a=d.useMemo(()=>[...new Set(t.map(e=>e.client))].sort(),[t]),o=d.useMemo(()=>[...new Set(t.map(e=>e.project).filter(Boolean))].sort(),[t]),u=d.useMemo(()=>t.filter(e=>("all"===n.category||e.category===n.category)&&(("all"===n.client||e.client===n.client)&&("all"===n.project||(e.project??"")===n.project))),[t,n]),s=d.useMemo(()=>function(e,t){const n=new Map;for(const a of t)n.set(a.session_id,a);const r=new Map;for(const a of e){const e=r.get(a.session_id);e?e.push(a):r.set(a.session_id,[a])}const l=[];for(const[a,o]of r){const e=n.get(a);e&&l.push({session:e,milestones:o})}return l.sort((e,t)=>new Date(t.session.started_at).getTime()-new Date(e.session.started_at).getTime()),l}(u,e),[u,e]);return i.jsxs("div",{className:"bg-bg-surface-1 border border-border rounded-lg mb-4 overflow-hidden",children:[i.jsxs("div",{className:"px-5 pt-5 pb-3",children:[i.jsx("h2",{className:"text-xs text-text-muted uppercase tracking-wider font-semibold mb-4",children:"Milestones"}),i.jsx(W,{filters:n,onFilterChange:r,categories:l,clients:a,projects:o})]}),0===s.length?i.jsx("div",{className:"text-center text-text-muted py-8 text-sm",children:"No milestones recorded yet"}):i.jsx("div",{children:s.map((e,t)=>i.jsx(ie,{session:e.session,milestones:e.milestones,defaultExpanded:0===t},e.session.session_id))})]})}function se({config:e,onRefresh:t}){const[n,r]=d.useState(""),[l,a]=d.useState("email"),[o,u]=d.useState(!1),[s,c]=d.useState(null),[f,p]=d.useState(null);if(!e)return null;if(e.authenticated){const n=async()=>{u(!0),p(null);try{const e=await M("/api/local/sync");e.success?(p({text:"Synced successfully",type:"success"}),t()):p({text:\`Sync failed: \${e.error??"Unknown error"}\`,type:"error"})}catch(e){p({text:\`Sync failed: \${e.message}\`,type:"error"})}finally{u(!1)}};return i.jsxs("div",{className:"bg-bg-surface-1 border border-border rounded-lg p-6 text-center",children:[i.jsx("h2",{className:"text-xs text-text-muted uppercase tracking-wider font-semibold mb-3",children:"Sync"}),i.jsxs("div",{className:"text-sm text-text-secondary mb-3",children:["Logged in as ",i.jsx("strong",{className:"text-text-primary",children:e.email})]}),i.jsx("button",{onClick:n,disabled:o,className:"bg-accent text-bg-base px-7 py-2.5 rounded-lg font-semibold text-sm cursor-pointer transition-opacity hover:opacity-85 disabled:opacity-50 disabled:cursor-not-allowed",children:o?"Syncing...":"Sync to useai.dev"}),i.jsx("div",{className:"text-sm text-text-muted mt-2",children:e.last_sync_at?\`Last sync: \${e.last_sync_at}\`:"Never synced"}),f&&i.jsx("div",{className:"text-sm mt-2 "+("success"===f.type?"text-success":"text-error"),children:f.text})]})}const m=d.useCallback(async()=>{if(n&&n.includes("@")){u(!0),c(null);try{await(e=n,M("/api/local/auth/send-otp",{email:e})),a("otp")}catch(t){c({text:t.message,type:"error"})}finally{u(!1)}var e}else c({text:"Please enter a valid email",type:"error"})},[n]),h=d.useCallback(async e=>{if(/^\\d{6}$/.test(e)){u(!0),c(null);try{await function(e,t){return M("/api/local/auth/verify-otp",{email:e,code:t})}(n,e),c({text:"Logged in!",type:"success"}),setTimeout(t,500)}catch(r){c({text:r.message,type:"error"})}finally{u(!1)}}else c({text:"Please enter the 6-digit code",type:"error"})},[n,t]);return"otp"===l?i.jsx("div",{className:"bg-bg-surface-1 border border-border rounded-lg p-6",children:i.jsx(ce,{email:n,loading:o,msg:s,onVerify:h,onResend:m})}):i.jsx("div",{className:"bg-bg-surface-1 border border-border rounded-lg p-6",children:i.jsxs("div",{className:"max-w-xs mx-auto text-center",children:[i.jsx("h3",{className:"text-base font-semibold text-text-primary mb-1",children:"Sign in to sync"}),i.jsx("div",{className:"text-sm text-text-muted mb-4",children:"Sync sessions & milestones to useai.dev"}),i.jsx("input",{type:"email",placeholder:"you@email.com",value:n,onChange:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&m(),className:"w-full px-3 py-2.5 bg-bg-base border border-border rounded-lg text-text-primary text-sm outline-none focus:border-accent placeholder:text-text-muted/50 mb-2.5"}),i.jsx("button",{onClick:m,disabled:o,className:"w-full bg-accent text-bg-base py-2.5 rounded-lg font-semibold text-sm cursor-pointer transition-opacity hover:opacity-85 disabled:opacity-50 disabled:cursor-not-allowed",children:o?"Sending code...":"Send verification code"}),s&&i.jsx("div",{className:"text-sm mt-2 "+("error"===s.type?"text-error":"success"===s.type?"text-success":"text-text-muted"),children:s.text})]})})}function ce({email:e,loading:t,msg:n,onVerify:r,onResend:l}){const[a,o]=d.useState("");return i.jsxs("div",{className:"max-w-xs mx-auto text-center",children:[i.jsx("h3",{className:"text-base font-semibold text-text-primary mb-1",children:"Check your email"}),i.jsxs("div",{className:"text-sm text-text-muted mb-4",children:["Enter the 6-digit code sent to ",e]}),i.jsx("input",{type:"text",maxLength:6,placeholder:"000000",inputMode:"numeric",autoComplete:"one-time-code",value:a,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&r(a),autoFocus:!0,className:"w-full px-3 py-2.5 bg-bg-base border border-border rounded-lg text-text-primary text-center text-xl font-mono tracking-[6px] outline-none focus:border-accent placeholder:text-text-muted/50 mb-2.5"}),i.jsx("button",{onClick:()=>r(a),disabled:t,className:"w-full bg-accent text-bg-base py-2.5 rounded-lg font-semibold text-sm cursor-pointer transition-opacity hover:opacity-85 disabled:opacity-50 disabled:cursor-not-allowed",children:t?"Verifying...":"Verify"}),n&&i.jsx("div",{className:"text-sm mt-2 "+("error"===n.type?"text-error":"success"===n.type?"text-success":"text-text-muted"),children:n.text}),i.jsx("button",{onClick:l,className:"text-accent text-sm underline mt-2 bg-transparent border-none cursor-pointer",children:"Resend code"})]})}var fe=T();const de={"15m":{visibleDuration:9e5,majorTickInterval:3e5,minorTickInterval:6e4,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"30m":{visibleDuration:18e5,majorTickInterval:6e5,minorTickInterval:12e4,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"1h":{visibleDuration:36e5,majorTickInterval:9e5,minorTickInterval:3e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"12h":{visibleDuration:432e5,majorTickInterval:72e5,minorTickInterval:18e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"24h":{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}};function pe(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function me({value:e,onChange:t,scale:n,sessions:r=[],milestones:l=[]}){const a=d.useRef(null),[o,u]=d.useState(0);d.useEffect(()=>{if(!a.current)return;const e=new ResizeObserver(e=>{for(const t of e)u(t.contentRect.width)});return e.observe(a.current),u(a.current.getBoundingClientRect().width),()=>e.disconnect()},[]);const s=de[n],c=o>0?o/s.visibleDuration:0,[f,p]=d.useState(!1),m=d.useRef(0),h=d.useCallback(e=>{p(!0),m.current=e.clientX,e.currentTarget.setPointerCapture(e.pointerId)},[]),g=d.useCallback(n=>{if(!f||0===c)return;const r=n.clientX-m.current;m.current=n.clientX,t(e+-r/c)},[f,c,e,t]),y=d.useCallback(()=>{p(!1)},[]),v=d.useMemo(()=>{if(!o||0===c)return[];const t=s.visibleDuration/2,n=e+t,r=e-t-s.majorTickInterval,l=n+s.majorTickInterval,a=[];for(let o=Math.ceil(r/s.majorTickInterval)*s.majorTickInterval;o<=l;o+=s.majorTickInterval)a.push({type:"major",time:o,position:(o-e)*c,label:s.labelFormat(new Date(o))});for(let o=Math.ceil(r/s.minorTickInterval)*s.minorTickInterval;o<=l;o+=s.minorTickInterval)o%s.majorTickInterval!==0&&a.push({type:"minor",time:o,position:(o-e)*c});return a},[e,o,c,s]),b=d.useMemo(()=>r.map(e=>({session:e,start:new Date(e.started_at).getTime(),end:new Date(e.ended_at).getTime()})),[r]),k=d.useMemo(()=>{if(!o||0===c)return[];const t=s.visibleDuration/2,n=e-t,r=e+t;return b.filter(e=>e.start<=r&&e.end>=n).map(t=>({session:t.session,leftOffset:(Math.max(t.start,n)-e)*c,width:(Math.min(t.end,r)-Math.max(t.start,n))*c}))},[b,e,o,c,s]),x=d.useMemo(()=>l.map(e=>({milestone:e,time:new Date(e.created_at).getTime()})).sort((e,t)=>e.time-t.time),[l]),w=d.useMemo(()=>{if(!o||0===c||!x.length)return[];const t=s.visibleDuration/2,n=e-t,r=e+t;let l=0,a=x.length;for(;l<a;){const e=l+a>>1;x[e].time<n?l=e+1:a=e}const i=l;for(a=x.length;l<a;){const e=l+a>>1;x[e].time<=r?l=e+1:a=e}const u=l,f=[];for(let o=i;o<u;o++){const t=x[o];f.push({...t,offset:(t.time-e)*c})}return f},[x,e,o,c,s]),[S,E]=d.useState(null),C=d.useRef(e);return d.useEffect(()=>{S&&Math.abs(e-C.current)>1e3&&E(null),C.current=e},[e,S]),i.jsxs("div",{className:"relative h-16",children:[i.jsxs("div",{className:"absolute inset-0 bg-transparent border-t border-border overflow-hidden select-none touch-none cursor-grab active:cursor-grabbing",ref:a,onPointerDown:h,onPointerMove:g,onPointerUp:y,style:{touchAction:"none"},children:[i.jsxs("div",{className:"absolute left-1/2 top-0 bottom-0 w-0.5 bg-accent z-10 -translate-x-1/2",children:[i.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-2 h-2 bg-accent rounded-b-sm"}),i.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-2 h-2 bg-accent rounded-t-sm"})]}),i.jsxs("div",{className:"absolute inset-0 left-1/2 top-0 bottom-0 pointer-events-none",children:[v.map(e=>i.jsx("div",{className:"absolute top-0 border-l border-border",style:{left:e.position,height:"major"===e.type?"100%":"25%",bottom:0,opacity:"major"===e.type?.7:.3},children:"major"===e.type&&e.label&&i.jsx("span",{className:"absolute top-2 left-1 text-[10px] font-medium text-text-muted whitespace-nowrap",children:e.label})},e.time)),k.map(e=>i.jsx("div",{className:"absolute bottom-0 rounded-t-sm pointer-events-auto cursor-pointer",style:{left:e.leftOffset,width:Math.max(e.width,2),height:"40%",backgroundColor:"rgba(212, 160, 74, 0.15)",borderTop:"2px solid rgba(212, 160, 74, 0.4)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();E({type:"session",data:e.session,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>E(null)},e.session.session_id)),w.map((e,n)=>i.jsx("div",{className:"absolute bottom-2 pointer-events-auto cursor-pointer z-20",style:{left:e.offset,transform:"translateX(-50%)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();E({type:"milestone",data:e.milestone,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>E(null),onClick:n=>{n.stopPropagation(),t(e.time)},children:i.jsx("div",{className:"w-2.5 h-2.5 rounded-full border border-bg-surface-1",style:{backgroundColor:H[e.milestone.category]??"#9c9588"}})},n))]})]}),S&&fe.createPortal(i.jsx("div",{className:"fixed z-[9999] pointer-events-none",style:{left:S.x,top:S.y,transform:"translate(-50%, -100%)"},children:i.jsx("div",{className:"mb-1.5 bg-bg-surface-3 text-text-primary rounded-lg shadow-lg px-2.5 py-2 text-[11px] max-w-[220px] border border-border",children:"session"===S.type?i.jsx(he,{session:S.data}):i.jsx(ge,{milestone:S.data})})}),document.body)]})}function he({session:e}){const t=$[e.client]??e.client;return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"font-semibold text-xs text-accent",children:t}),i.jsx("div",{className:"text-text-secondary capitalize",children:e.task_type}),i.jsx("div",{className:"text-text-muted",children:pe(e.duration_seconds)}),e.project&&i.jsx("div",{className:"text-text-muted font-mono mt-0.5",children:e.project})]})}function ge({milestone:e}){const t=e.private_title??e.title;return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"font-semibold text-xs break-words",children:t}),i.jsx("div",{className:"capitalize",style:{color:H[e.category]??"#9c9588"},children:e.category}),e.complexity&&i.jsx("div",{className:"text-text-muted",children:e.complexity})]})}const ye={"15m":9e5,"30m":18e5,"1h":36e5,"12h":432e5,"24h":864e5},ve={"15m":"15 Minutes","30m":"30 Minutes","1h":"1 Hour","12h":"12 Hours","24h":"24 Hours"};function be(e,t){const n=e.trim();if(!n)return null;const r=new Date(t),l=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*(AM|PM)$/i);if(l){let e=parseInt(l[1],10);const t=parseInt(l[2],10),n=l[3]?parseInt(l[3],10):0,a=l[4].toUpperCase();return e<1||e>12||t>59||n>59?null:("AM"===a&&12===e&&(e=0),"PM"===a&&12!==e&&(e+=12),r.setHours(e,t,n,0),r.getTime())}const a=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/);if(a){const e=parseInt(a[1],10),t=parseInt(a[2],10),n=a[3]?parseInt(a[3],10):0;return e>23||t>59||n>59?null:(r.setHours(e,t,n,0),r.getTime())}return null}const ke=["15m","30m","1h","12h","24h"];function xe({value:e,onChange:t,scale:n,onScaleChange:r,sessions:l,milestones:a}){const o=null===e,[u,s]=d.useState(Date.now());d.useEffect(()=>{if(!o)return;const e=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(e)},[o]);const c=o?u:e,[f,p]=d.useState(!1),[m,h]=d.useState(""),g=d.useRef(null),y=d.useRef(!1),v=d.useRef(""),b=d.useRef(!1),k=d.useRef(0),x=d.useCallback(e=>{const n=Date.now();if(e>=n-2e3)return b.current=!0,k.current=n,void t(null);b.current&&n-k.current<300||b.current&&e>=n-1e4?t(null):(b.current=!1,t(e))},[t]),w=e=>{const n=c,r=Math.min(n+e,Date.now());t(r)},S=()=>{y.current=o,t(c);const e=new Date(c).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});v.current=e,h(e),p(!0),requestAnimationFrame(()=>g.current?.select())},E=()=>{if(p(!1),y.current&&m===v.current)return void t(null);const e=be(m,c);null!==e&&t(Math.min(e,Date.now()))};return i.jsxs("div",{className:"flex flex-col bg-bg-surface-1 border border-border rounded-xl overflow-hidden mb-6",children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[i.jsxs("div",{className:"flex flex-col items-start gap-1",children:[i.jsxs("div",{className:"flex items-center gap-2 h-7",children:[f?i.jsx("input",{ref:g,type:"text",value:m,onChange:e=>h(e.target.value),onBlur:E,onKeyDown:e=>{if("Enter"===e.key)return void E();if("Escape"===e.key)return e.preventDefault(),p(!1),void(y.current&&t(null));if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const n=g.current;if(!n)return;const r=n.selectionStart??0,l="ArrowUp"===e.key?1:-1,a=be(m,c);if(null===a)return;const o=m.indexOf(":"),i=m.indexOf(":",o+1),u=m.lastIndexOf(" ");let s;s=r<=o?36e5*l:i>-1&&r<=i?6e4*l:u>-1&&r<=u?1e3*l:12*l*36e5;const f=Math.min(a+s,Date.now()),d=new Date(f).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});h(d),t(f),requestAnimationFrame(()=>{n&&n.setSelectionRange(r,r)})},className:"text-lg font-mono font-semibold tracking-tight bg-bg-surface-2 border border-accent rounded px-1 -ml-1.5 w-[140px] outline-none text-text-primary"}):i.jsx("button",{onClick:S,className:"group flex items-center gap-2 hover:bg-bg-surface-2 rounded px-1 -ml-1.5 w-[140px] transition-colors cursor-text",title:"Click to edit time",children:i.jsx("span",{className:"text-lg font-mono font-semibold tracking-tight tabular-nums "+(o?"text-text-primary":"text-accent"),children:new Date(c).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"})})}),i.jsx("button",{onClick:f?E:S,className:"p-0.5 rounded transition-colors flex-shrink-0 "+(f?"text-accent hover:text-accent-bright":"text-text-muted hover:text-text-primary"),title:f?"Confirm time":"Edit time",children:i.jsx(te,{className:"w-3 h-3"})}),o?i.jsx("span",{className:"px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider bg-[#1a2e1a] text-success rounded-full animate-pulse select-none",children:"Live"}):i.jsx("span",{className:"px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider bg-[#2e2a1a] text-accent rounded-full select-none",children:"History"})]}),i.jsx("div",{className:"text-xs text-text-muted font-medium px-1 -ml-0.5",children:new Date(c).toLocaleDateString([],{weekday:"long",month:"long",day:"numeric",year:"numeric"})})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"flex items-center bg-bg-surface-2 rounded-lg p-0.5 mr-2",children:ke.map(e=>i.jsx("button",{onClick:()=>r(e),className:"px-2 py-1 text-xs font-medium rounded-md transition-all "+(n===e?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary"),title:ve[e],children:e.toUpperCase()},e))}),i.jsxs("div",{className:"flex items-center gap-1",children:[!o&&i.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 px-3 py-1.5 mr-1 text-xs font-medium bg-[#2e2a1a] hover:bg-[#3e3520] text-accent rounded-md transition-colors",children:[i.jsx(ne,{className:"w-3.5 h-3.5"}),"Return to Now"]}),i.jsx("button",{onClick:()=>w(-ye[n]),className:"p-1.5 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-md transition-colors",title:\`Back \${ve[n]}\`,children:i.jsx(J,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>w(ye[n]),className:"p-1.5 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-md transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:\`Forward \${ve[n]}\`,disabled:o||c>=Date.now()-1e3,children:i.jsx(ee,{className:"w-4 h-4"})})]})]})]}),i.jsx(me,{value:c,onChange:x,scale:n,sessions:l,milestones:a})]})}function we(){const{sessions:e,milestones:t,config:n,loading:r,timeTravelTime:l,timeScale:a,filters:o,loadAll:u,setTimeTravelTime:s,setTimeScale:c,setFilter:f}=R();d.useEffect(()=>{u()},[u]),d.useEffect(()=>{if(null!==l)return;const e=setInterval(u,3e4);return()=>clearInterval(e)},[l,u]);const p=null===l,m=l??Date.now(),h=F[a]/2,g=m-h,y=m+h,v=d.useMemo(()=>p?e:function(e,t,n){return e.filter(e=>{const r=new Date(e.started_at).getTime(),l=new Date(e.ended_at).getTime();return r<=n&&l>=t})}(e,g,y),[e,p,g,y]),b=d.useMemo(()=>p?t:function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(t,g,y),[t,p,g,y]),k=d.useMemo(()=>function(e){let t=0,n=0;const r={},l={},a={},o={};for(const i of e){t+=i.duration_seconds,n+=i.files_touched,r[i.client]=(r[i.client]??0)+i.duration_seconds;for(const e of i.languages)l[e]=(l[e]??0)+i.duration_seconds;a[i.task_type]=(a[i.task_type]??0)+i.duration_seconds,i.project&&(o[i.project]=(o[i.project]??0)+i.duration_seconds)}return{totalHours:t/3600,totalSessions:e.length,currentStreak:I(e),filesTouched:n,byClient:r,byLanguage:l,byTaskType:a,byProject:o}}(v),[v]),x=d.useMemo(()=>function(e,t){const n=new Date,r=[];for(let l=t-1;l>=0;l--){const t=new Date(n);t.setDate(t.getDate()-l);const a=t.toISOString().slice(0,10);let o=0;for(const n of e)n.started_at.slice(0,10)===a&&(o+=n.duration_seconds);r.push({date:a,hours:o/3600})}return r}(e,30),[e]),w=d.useMemo(()=>{if(!p)return new Date(m).toISOString().slice(0,10)},[p,m]),S=d.useMemo(()=>{const e={};for(const[t,n]of Object.entries(k.byClient)){const r=$[t]??t;e[r]=(e[r]??0)+n}return e},[k.byClient]);return r?i.jsx("div",{className:"min-h-screen flex items-center justify-center",children:i.jsx("div",{className:"text-text-muted text-sm",children:"Loading..."})}):i.jsxs("div",{className:"max-w-[960px] mx-auto px-4 py-6",children:[i.jsxs("div",{className:"mb-6",children:[i.jsx("h1",{className:"font-mono text-2xl font-bold text-accent tracking-tight",children:"UseAI"}),i.jsx("div",{className:"text-text-muted text-sm mt-0.5",children:"Local Dashboard"})]}),i.jsx(xe,{value:l,onChange:s,scale:a,onScaleChange:c,sessions:e,milestones:t}),i.jsx(V,{totalHours:k.totalHours,totalSessions:k.totalSessions,currentStreak:k.currentStreak,filesTouched:k.filesTouched}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-2",children:[Object.keys(S).length>0&&i.jsx(B,{title:"Tools / Clients",data:S}),Object.keys(k.byLanguage).length>0&&i.jsx(B,{title:"Languages",data:k.byLanguage,color:"#5a9fd4"}),Object.keys(k.byTaskType).length>0&&i.jsx(B,{title:"Task Types",data:k.byTaskType,color:"#a78bfa"}),Object.keys(k.byProject).length>0&&i.jsx(B,{title:"Projects",data:k.byProject,color:"#4ade80"})]}),i.jsx(q,{data:x,onDayClick:e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();s(t),c("24h")},highlightDate:w}),i.jsx(ue,{sessions:v,milestones:b,filters:o,onFilterChange:f}),i.jsx(se,{config:n,onRefresh:u})]})}P.createRoot(document.getElementById("root")).render(i.jsx(d.StrictMode,{children:i.jsx(we,{})}));</script>
2273
- <style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:"SF Mono","Fira Code","Cascadia Code",ui-monospace,monospace;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-body:system-ui,-apple-system,sans-serif;--color-bg-base:#0f0e0c;--color-bg-surface-1:#1a1816;--color-bg-surface-2:#252220;--color-bg-surface-3:#302d2a;--color-text-primary:#e8e2d9;--color-text-secondary:#9c9588;--color-text-muted:#6b655c;--color-accent:#d4a04a;--color-accent-bright:#e8b94a;--color-accent-dim:#8a6a2f;--color-border:#2a2724;--color-success:#4ade80;--color-error:#f87171}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.-top-8{top:calc(var(--spacing)*-8)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-1{left:calc(var(--spacing)*1)}.left-1\\/2{left:50%}.z-10{z-index:10}.z-20{z-index:20}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.-ml-0\\.5{margin-left:calc(var(--spacing)*-.5)}.-ml-1\\.5{margin-left:calc(var(--spacing)*-1.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-7{height:calc(var(--spacing)*7)}.h-16{height:calc(var(--spacing)*16)}.h-24{height:calc(var(--spacing)*24)}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-0\\.5{width:calc(var(--spacing)*.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-\\[140px\\]{width:140px}.w-full{width:100%}.max-w-\\[220px\\]{max-width:220px}.max-w-\\[960px\\]{max-width:960px}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-\\[3px\\]{gap:3px}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.rounded-b-sm{border-bottom-right-radius:var(--radius-sm);border-bottom-left-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-accent{border-color:var(--color-accent)}.border-bg-surface-1{border-color:var(--color-bg-surface-1)}.border-border{border-color:var(--color-border)}.border-border\\/50{border-color:#2a272480}@supports (color:color-mix(in lab,red,red)){.border-border\\/50{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.bg-\\[\\#1a2e1a\\]{background-color:#1a2e1a}.bg-\\[\\#2a2820\\]{background-color:#2a2820}.bg-\\[\\#2a3520\\]{background-color:#2a3520}.bg-\\[\\#2e2a1a\\]{background-color:#2e2a1a}.bg-\\[\\#3a2020\\]{background-color:#3a2020}.bg-\\[\\#202a3a\\]{background-color:#202a3a}.bg-\\[\\#202525\\]{background-color:#202525}.bg-\\[\\#202535\\]{background-color:#202535}.bg-\\[\\#252520\\]{background-color:#252520}.bg-\\[\\#252525\\]{background-color:#252525}.bg-accent{background-color:var(--color-accent)}.bg-bg-base{background-color:var(--color-bg-base)}.bg-bg-surface-1{background-color:var(--color-bg-surface-1)}.bg-bg-surface-2{background-color:var(--color-bg-surface-2)}.bg-bg-surface-3{background-color:var(--color-bg-surface-3)}.bg-transparent{background-color:#0000}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-7{padding-inline:calc(var(--spacing)*7)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-5{padding-top:calc(var(--spacing)*5)}.pr-3{padding-right:calc(var(--spacing)*3)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.7rem\\]{font-size:.7rem}.text-\\[0\\.68rem\\]{font-size:.68rem}.text-\\[0\\.72rem\\]{font-size:.72rem}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[6px\\]{--tw-tracking:6px;letter-spacing:6px}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#4ade80\\]{color:#4ade80}.text-\\[\\#9c9588\\]{color:#9c9588}.text-\\[\\#38bdf8\\]{color:#38bdf8}.text-\\[\\#70b0a0\\]{color:#70b0a0}.text-\\[\\#a78bfa\\]{color:#a78bfa}.text-\\[\\#b0a070\\]{color:#b0a070}.text-\\[\\#c4a854\\]{color:#c4a854}.text-\\[\\#f87171\\]{color:#f87171}.text-accent{color:var(--color-accent)}.text-accent-dim{color:var(--color-accent-dim)}.text-bg-base{color:var(--color-bg-base)}.text-error{color:var(--color-error)}.text-success{color:var(--color-success)}.text-text-muted{color:var(--color-text-muted)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-600{--tw-duration:.6s;transition-duration:.6s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}}.placeholder\\:text-text-muted\\/50::placeholder{color:#6b655c80}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media(hover:hover){.hover\\:bg-\\[\\#3e3520\\]:hover{background-color:#3e3520}.hover\\:bg-bg-surface-2:hover{background-color:var(--color-bg-surface-2)}.hover\\:bg-bg-surface-2\\/50:hover{background-color:#25222080}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/50:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.hover\\:text-accent-bright:hover{color:var(--color-accent-bright)}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-85:hover{opacity:.85}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}::selection{color:var(--color-text-primary);background:#d4a04a4d}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-bg-surface-3);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}body{font-family:var(--font-body);background:var(--color-bg-base);color:var(--color-text-primary);min-height:100vh;margin:0;line-height:1.5}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}</style>
1914
+ */function ue({health:e,timeContextLabel:t}){return s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-accent flex items-center justify-center shadow-[0_0_15px_rgba(99,102,241,0.4)]",children:s.jsx("span",{className:"font-mono text-white font-bold text-lg",children:"U"})}),s.jsx("div",{children:s.jsxs("h1",{className:"text-xl font-bold tracking-tight text-text-primary flex items-center gap-2",children:["UseAI",s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-bg-surface-2 text-text-muted font-mono uppercase tracking-widest border border-border/50",children:"Dashboard"})]})})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[e&&e.active_sessions>0&&s.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-success/10 border border-success/20",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-success animate-ping absolute inset-0"}),s.jsx("div",{className:"w-2 h-2 rounded-full bg-success relative"})]}),s.jsxs("span",{className:"text-xs font-medium text-success",children:[e.active_sessions," active session",1!==e.active_sessions?"s":""]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-muted font-mono bg-bg-surface-1 px-3 py-1.5 rounded-md border border-border",children:[s.jsx(H,{className:"w-3 h-3"}),t]})]})]})}const ce=f.createContext({});function de(e){const t=f.useRef(null);return null===t.current&&(t.current=e()),t.current}const fe="undefined"!=typeof window,he=fe?f.useLayoutEffect:f.useEffect,pe=f.createContext(null);function me(e,t){-1===e.indexOf(t)&&e.push(t)}function ge(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ye=(e,t,n)=>n>t?t:n<e?e:n;const ve={},be=e=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(e);function xe(e){return"object"==typeof e&&null!==e}const we=e=>/^0[^.\\s]+$/u.test(e);function ke(e){let t;return()=>(void 0===t&&(t=e()),t)}const Se=e=>e,Ee=(e,t)=>n=>t(e(n)),Te=(...e)=>e.reduce(Ee),Ce=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Pe{constructor(){this.subscriptions=[]}add(e){return me(this.subscriptions,e),()=>ge(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ne=e=>1e3*e,je=e=>e/1e3;function Me(e,t){return t?e*(1e3/t):0}const Le=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Ae(e,t,n,r){if(e===t&&n===r)return Se;const i=t=>function(e,t,n,r,i){let a,o,s=0;do{o=t+(n-t)/2,a=Le(o,r,i)-e,a>0?n=o:t=o}while(Math.abs(a)>1e-7&&++s<12);return o}(t,0,1,e,n);return e=>0===e||1===e?e:Le(i(e),t,r)}const De=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Re=e=>t=>1-e(1-t),_e=Ae(.33,1.53,.69,.99),ze=Re(_e),Oe=De(ze),Fe=e=>(e*=2)<1?.5*ze(e):.5*(2-Math.pow(2,-10*(e-1))),Ve=e=>1-Math.sin(Math.acos(e)),Ie=Re(Ve),Be=De(Ve),Ue=Ae(.42,0,1,1),$e=Ae(0,0,.58,1),He=Ae(.42,0,.58,1),We=e=>Array.isArray(e)&&"number"==typeof e[0],qe={linear:Se,easeIn:Ue,easeInOut:He,easeOut:$e,circIn:Ve,circInOut:Be,circOut:Ie,backIn:ze,backInOut:Oe,backOut:_e,anticipate:Fe},Ye=e=>{if(We(e)){e.length;const[t,n,r,i]=e;return Ae(t,n,r,i)}return"string"==typeof e?qe[e]:e},Xe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ke(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Xe.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(l.schedule(t),e()),t(o)}const l={schedule:(e,i=!1,o=!1)=>{const s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{o=e,r?i=!0:(r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,l.process(e)))}};return l}(a),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=o,m=()=>{const a=ve.useManualTiming?i.timestamp:performance.now();n=!1,ve.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:Xe.reduce((t,a)=>{const s=o[a];return t[a]=(t,a=!1,o=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(m)),s.schedule(t,a,o)),t},{}),cancel:e=>{for(let t=0;t<Xe.length;t++)o[Xe[t]].cancel(e)},state:i,steps:o}}const{schedule:Qe,cancel:Ge,state:Ze,steps:Je}=Ke("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Se,!0);let et;function tt(){et=void 0}const nt={now:()=>(void 0===et&&nt.set(Ze.isProcessing||ve.useManualTiming?Ze.timestamp:performance.now()),et),set:e=>{et=e,queueMicrotask(tt)}},rt=e=>t=>"string"==typeof t&&t.startsWith(e),it=rt("--"),at=rt("var(--"),ot=e=>!!at(e)&&st.test(e.split("/*")[0].trim()),st=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;function lt(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const ut={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ct={...ut,transform:e=>ye(0,1,e)},dt={...ut,default:1},ft=e=>Math.round(1e5*e)/1e5,ht=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;const pt=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu,mt=(e,t)=>n=>Boolean("string"==typeof n&&pt.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),gt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,a,o,s]=r.match(ht);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},yt={...ut,transform:e=>Math.round((e=>ye(0,255,e))(e))},vt={test:mt("rgb","red"),parse:gt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+yt.transform(e)+", "+yt.transform(t)+", "+yt.transform(n)+", "+ft(ct.transform(r))+")"};const bt={test:mt("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:vt.transform},xt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>\`\${t}\${e}\`}),wt=xt("deg"),kt=xt("%"),St=xt("px"),Et=xt("vh"),Tt=xt("vw"),Ct=(()=>({...kt,parse:e=>kt.parse(e)/100,transform:e=>kt.transform(100*e)}))(),Pt={test:mt("hsl","hue"),parse:gt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+kt.transform(ft(t))+", "+kt.transform(ft(n))+", "+ft(ct.transform(r))+")"},Nt={test:e=>vt.test(e)||bt.test(e)||Pt.test(e),parse:e=>vt.test(e)?vt.parse(e):Pt.test(e)?Pt.parse(e):bt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?vt.transform(e):Pt.transform(e),getAnimatableNone:e=>{const t=Nt.parse(e);return t.alpha=0,Nt.transform(t)}},jt=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;const Mt="number",Lt="color",At=/var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;function Dt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(At,e=>(Nt.test(e)?(r.color.push(a),i.push(Lt),n.push(Nt.parse(e))):e.startsWith("var(")?(r.var.push(a),i.push("var"),n.push(e)):(r.number.push(a),i.push(Mt),n.push(parseFloat(e))),++a,"\${}")).split("\${}");return{values:n,split:o,indexes:r,types:i}}function Rt(e){return Dt(e).values}function _t(e){const{split:t,types:n}=Dt(e),r=t.length;return e=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],void 0!==e[a]){const t=n[a];i+=t===Mt?ft(e[a]):t===Lt?Nt.transform(e[a]):e[a]}return i}}const zt=e=>"number"==typeof e?0:Nt.test(e)?Nt.getAnimatableNone(e):e;const Ot={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(ht)?.length||0)+(e.match(jt)?.length||0)>0},parse:Rt,createTransformer:_t,getAnimatableNone:function(e){const t=Rt(e);return _t(e)(t.map(zt))}};function Ft(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Vt(e,t){return n=>n>0?t:e}const It=(e,t,n)=>e+(t-e)*n,Bt=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Ut=[bt,vt,Pt];function $t(e){const t=(n=e,Ut.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Pt&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,a=0,o=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Ft(s,r,e+1/3),a=Ft(s,r,e),o=Ft(s,r,e-1/3)}else i=a=o=n;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:r}}(r)),r}const Ht=(e,t)=>{const n=$t(e),r=$t(t);if(!n||!r)return Vt(e,t);const i={...n};return e=>(i.red=Bt(n.red,r.red,e),i.green=Bt(n.green,r.green,e),i.blue=Bt(n.blue,r.blue,e),i.alpha=It(n.alpha,r.alpha,e),vt.transform(i))},Wt=new Set(["none","hidden"]);function qt(e,t){return n=>It(e,t,n)}function Yt(e){return"number"==typeof e?qt:"string"==typeof e?ot(e)?Vt:Nt.test(e)?Ht:Qt:Array.isArray(e)?Xt:"object"==typeof e?Nt.test(e)?Ht:Kt:Vt}function Xt(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>Yt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Kt(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=Yt(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Qt=(e,t)=>{const n=Ot.createTransformer(t),r=Dt(e),i=Dt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Wt.has(e)&&!i.values.length||Wt.has(t)&&!r.values.length?function(e,t){return Wt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Te(Xt(function(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}(r,i),i.values),n):Vt(e,t)};function Gt(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return It(e,t,n);return Yt(e)(e,t)}const Zt=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Qe.update(t,e),stop:()=>Ge(t),now:()=>Ze.isProcessing?Ze.timestamp:nt.now()}},Jt=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(1e4*e(a/(i-1)))/1e4+", ";return\`linear(\${r.substring(0,r.length-2)})\`},en=2e4;function tn(e){let t=0;let n=e.next(t);for(;!n.done&&t<en;)t+=50,n=e.next(t);return t>=en?1/0:t}function nn(e,t,n){const r=Math.max(t-5,0);return Me(n-e(r),t-r)}const rn=100,an=10,on=1,sn=0,ln=800,un=.3,cn=.3,dn={granular:.01,default:2},fn={granular:.005,default:.5},hn=.01,pn=10,mn=.05,gn=1,yn=.001;function vn({duration:e=ln,bounce:t=un,velocity:n=sn,mass:r=on}){let i,a,o=1-t;o=ye(mn,gn,o),e=ye(hn,pn,je(e)),o<1?(i=t=>{const r=t*o,i=r*e,a=r-n,s=xn(t,o),l=Math.exp(-i);return yn-a/s*l},a=t=>{const r=t*o*e,a=r*n+n,s=Math.pow(o,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=xn(Math.pow(t,2),o);return(-i(t)+yn>0?-1:1)*((a-s)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let i=1;i<bn;i++)r-=e(r)/t(r);return r}(i,a,5/e);if(e=Ne(e),isNaN(s))return{stiffness:rn,damping:an,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*o*Math.sqrt(r*t),duration:e}}}const bn=12;function xn(e,t){return e*Math.sqrt(1-t*t)}const wn=["duration","bounce"],kn=["stiffness","damping","mass"];function Sn(e,t){return t.some(t=>void 0!==e[t])}function En(e=cn,t=un){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=function(e){let t={velocity:sn,stiffness:rn,damping:an,mass:on,isResolvedFromDuration:!1,...e};if(!Sn(e,kn)&&Sn(e,wn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,a=2*ye(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:on,stiffness:i,damping:a}}else{const n=vn(e);t={...t,...n,mass:on},t.isResolvedFromDuration=!0}return t}({...n,velocity:-je(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),g=o-a,y=je(Math.sqrt(l/c)),v=Math.abs(g)<5;let b;if(r||(r=v?dn.granular:dn.default),i||(i=v?fn.granular:fn.default),m<1){const e=xn(y,m);b=t=>{const n=Math.exp(-m*y*t);return o-n*((p+m*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>o-Math.exp(-y*e)*(g+(p+y*g)*e);else{const e=y*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return o-n*((p+m*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:h&&d||null,next:e=>{const t=b(e);if(h)s.done=e>=d;else{let n=0===e?p:0;m<1&&(n=0===e?Ne(p):nn(b,e,t));const a=Math.abs(n)<=r,l=Math.abs(o-t)<=i;s.done=a&&l}return s.value=s.done?o:t,s},toString:()=>{const e=Math.min(tn(x),en),t=Jt(t=>x.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return x}function Tn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let p=n*t;const m=d+p,g=void 0===o?m:o(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=u,f.value=f.done?g:n};let x,w;const k=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=En({keyframes:[f.value,h(f.value)],velocity:nn(v,e,f.value),damping:i,stiffness:a,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function Cn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(t.length,1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||ve.mix||Gt,a=e.length-1;for(let o=0;o<a;o++){let n=i(e[o],e[o+1]);if(t){const e=Array.isArray(t)?t[o]||Se:t;n=Te(e,n)}r.push(n)}return r}(t,r,i),l=s.length,u=n=>{if(o&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=Ce(e[r],e[r+1],n);return s[r](i)};return n?t=>u(ye(e[0],e[a-1],t)):u}function Pn(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ce(0,t,r);e.push(It(n,1,i))}}(t,e.length-1),t}function Nn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ye):Ye(r),a={done:!1,value:t[0]},o=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Pn(t),e),s=Cn(o,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map(()=>u||He).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}En.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(tn(r),en);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:je(i)}}(e,100,En);return e.ease=t.ease,e.duration=Ne(t.duration),e.type="keyframes",e};const jn=e=>null!==e;function Mn(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(jn),o=i<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return o&&void 0!==r?r:a[o]}const Ln={decay:Tn,inertia:Tn,tween:Nn,keyframes:Nn,spring:En};function An(e){"string"==typeof e.type&&(e.type=Ln[e.type])}class Dn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Rn=e=>e/100;class _n extends Dn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==nt.now()&&this.tick(nt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;An(e);const{type:t=Nn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Nn;s!==Nn&&"number"!=typeof o[0]&&(this.mixKeyframes=Te(Rn,Gt(o[0],o[1])),o=[0,100]);const l=s({...e,keyframes:o});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=tn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:f,type:h,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,b=n;if(c){const e=Math.min(this.currentTime,r)/o;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/o)):"mirror"===d&&(b=a)),v=ye(0,1,n)*o}const x=y?{done:!1,value:u[0]}:b.next(v);i&&(x.value=i(x.value));let{done:w}=x;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&h!==Tn&&(x.value=Mn(u,this.options,m,this.speed)),p&&p(x.value),k&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return je(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+je(e)}get time(){return je(this.currentTime)}set time(e){e=Ne(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(nt.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=je(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Zt,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(nt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const zn=e=>180*e/Math.PI,On=e=>{const t=zn(Math.atan2(e[1],e[0]));return Vn(t)},Fn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:On,rotateZ:On,skewX:e=>zn(Math.atan(e[1])),skewY:e=>zn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Vn=e=>((e%=360)<0&&(e+=360),e),In=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Bn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Un={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:In,scaleY:Bn,scale:e=>(In(e)+Bn(e))/2,rotateX:e=>Vn(zn(Math.atan2(e[6],e[5]))),rotateY:e=>Vn(zn(Math.atan2(-e[2],e[0]))),rotateZ:On,rotate:On,skewX:e=>zn(Math.atan(e[4])),skewY:e=>zn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $n(e){return e.includes("scale")?1:0}function Hn(e,t){if(!e||"none"===e)return $n(t);const n=e.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);let r,i;if(n)r=Un,i=n;else{const t=e.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);r=Fn,i=t}if(!i)return $n(t);const a=r[t],o=i[1].split(",").map(Wn);return"function"==typeof a?a(o):o[a]}function Wn(e){return parseFloat(e.trim())}const qn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=(()=>new Set(qn))(),Xn=e=>e===ut||e===St,Kn=new Set(["x","y","z"]),Qn=qn.filter(e=>!Kn.has(e));const Gn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Hn(t,"x"),y:(e,{transform:t})=>Hn(t,"y")};Gn.translateX=Gn.x,Gn.translateY=Gn.y;const Zn=new Set;let Jn=!1,er=!1,tr=!1;function nr(){if(er){const e=Array.from(Zn).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Qn.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}er=!1,Jn=!1,Zn.forEach(e=>e.complete(tr)),Zn.clear()}function rr(){Zn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(er=!0)})}class ir{constructor(e,t,n,r,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Zn.add(this),Jn||(Jn=!0,Qe.read(rr),Qe.resolveKeyframes(nr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const i=r?.get(),a=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Zn.delete(this)}cancel(){"scheduled"===this.state&&(Zn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const ar=ke(()=>void 0!==window.ScrollTimeline),or={};function sr(e,t){const n=ke(e);return()=>or[t]??n()}const lr=sr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),ur=([e,t,n,r])=>\`cubic-bezier(\${e}, \${t}, \${n}, \${r})\`,cr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ur([0,.65,.55,1]),circOut:ur([.55,0,1,.45]),backIn:ur([.31,.01,.66,-.59]),backOut:ur([.33,1.53,.69,.99])};function dr(e,t){return e?"function"==typeof e?lr()?Jt(e,t):"ease-out":We(e)?ur(e):Array.isArray(e)?e.map(e=>dr(e,t)||cr.easeOut):cr[e]:void 0}function fr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=dr(s,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};u&&(f.pseudoElement=u);return e.animate(c,f)}function hr(e){return"function"==typeof e&&"applyToOptions"in e}class pr extends Dn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=e,e.type;const l=function({type:e,...t}){return hr(e)&&lr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=fr(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=Mn(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return je(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+je(e)}get time(){return je(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ne(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&ar()?(this.animation.timeline=e,Se):t(this)}}const mr={anticipate:Fe,backInOut:Oe,circInOut:Be};function gr(e){"string"==typeof e.ease&&e.ease in mr&&(e.ease=mr[e.ease])}class yr extends pr{constructor(e){gr(e),An(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const o=new _n({...a,autoplay:!1}),s=Math.max(10,nt.now()-this.startTime),l=ye(0,10,s-10);t.setWithVelocity(o.sample(Math.max(0,s-l)).value,o.sample(s).value,l),o.stop()}}const vr=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ot.test(e)&&"0"!==e||e.startsWith("url(")));function br(e){e.duration=0,e.type="keyframes"}const xr=new Set(["opacity","clipPath","filter","transform"]),wr=ke(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class kr extends Dn{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=nt.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:l,element:u,...c},f=u?.KeyframeResolver||ir;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:s,isHandoff:l,onUpdate:u}=n;this.resolvedAt=nt.now(),function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],o=vr(i,t),s=vr(a,t);return!(!o||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||hr(n))&&r)}(e,i,a,o)||(!ve.instantAnimations&&s||u?.(Mn(e,n,t)),e[0]=e[e.length-1],br(n),n.repeat=0);const c={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e,s=t?.owner?.current;if(!(s instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return wr()&&n&&xr.has(n)&&("transform"!==n||!u)&&!l&&!r&&"mirror"!==i&&0!==a&&"inertia"!==o}(c),f=c.motionValue?.owner?.current,h=d?new yr({...c,element:f}):new _n(c);h.finished.then(()=>{this.notifyFinished()}).catch(Se),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tr=!0,rr(),nr(),tr=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Sr(e,t,n,r=0,i=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return"function"==typeof n?n(a,o):1===i?a*r:s-a*r}const Er=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function Tr(e,t,n=1){const[r,i]=function(e){const t=Er.exec(e);if(!t)return[,];const[,n,r,i]=t;return[\`--\${n??r}\`,i]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return be(e)?parseFloat(e):e}return ot(i)?Tr(i,t,n+1):i}const Cr={type:"spring",stiffness:500,damping:25,restSpeed:10},Pr={type:"keyframes",duration:.8},Nr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jr=(e,{keyframes:t})=>t.length>2?Pr:Yn.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Cr:Nr,Mr=e=>null!==e;function Lr(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Ar(e,t){const n=e?.[t]??e?.default??e;return n!==e?Lr(n,e):n}const Dr=(e,t,n,r={},i,a)=>o=>{const s=Ar(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u-=Ne(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(s)||Object.assign(c,jr(e,c)),c.duration&&(c.duration=Ne(c.duration)),c.repeatDelay&&(c.repeatDelay=Ne(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(br(c),0===c.delay&&(d=!0)),(ve.instantAnimations||ve.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,br(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"}){const r=e.filter(Mr);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(c.keyframes,s);if(void 0!==e)return void Qe.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new _n(c):new kr(c)};function Rr(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function _r(e,t,n,r){if("function"==typeof t){const[i,a]=Rr(r);t=t(void 0!==n?n:e.custom,i,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,a]=Rr(r);t=t(void 0!==n?n:e.custom,i,a)}return t}function zr(e,t,n){const r=e.getProps();return _r(r,t,void 0!==n?n:r.custom,e)}const Or=new Set(["width","height","top","left","right","bottom",...qn]);class Fr{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=nt.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=nt.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Pe);const n=this.events[e].add(t);return"change"===e?()=>{n(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=nt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Me(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vr(e,t){return new Fr(e,t)}const Ir=e=>Array.isArray(e);function Br(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vr(n))}function Ur(e){return Ir(e)?e[e.length-1]||0:e}const $r=e=>Boolean(e&&e.getVelocity);function Hr(e,t){const n=e.getValue("willChange");if(r=n,Boolean($r(r)&&r.add))return n.add(t);if(!n&&ve.WillChange){const n=new ve.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function Wr(e){return e.replace(/([A-Z])/g,e=>\`-\${e.toLowerCase()}\`)}const qr="data-"+Wr("framerAppearId");function Yr(e){return e.props[qr]}function Xr({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Kr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const l=e.getDefaultTransition();a=a?Lr(a,l):l;const u=a?.reduceMotion;r&&(a=r);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in s){const t=e.getValue(f,e.latestValues[f]??null),r=s[f];if(void 0===r||d&&Xr(d,f))continue;const i={delay:n,...Ar(a||{},f)},o=t.get();if(void 0!==o&&!t.isAnimating&&!Array.isArray(r)&&r===o&&!i.velocity)continue;let l=!1;if(window.MotionHandoffAnimation){const t=Yr(e);if(t){const e=window.MotionHandoffAnimation(t,f,Qe);null!==e&&(i.startTime=e,l=!0)}}Hr(e,f);const h=u??e.shouldReduceMotion;t.start(Dr(f,t,r,h&&Or.has(f)?{type:!1}:i,e,l));const p=t.animation;p&&c.push(p)}if(o){const t=()=>Qe.update(()=>{o&&function(e,t){const n=zr(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a)Br(e,o,Ur(a[o]))}(e,o)});c.length?Promise.all(c).then(t):t()}return c}function Qr(e,t,n={}){const r=zr(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(Kr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=0,a=1,o){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Qr(l,t,{...o,delay:n+("function"==typeof r?0:r)+Sr(e.variantChildren,l,r,i,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[e,t]="beforeChildren"===s?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}const Gr=e=>t=>t.test(e),Zr=[ut,St,kt,wt,Tt,Et,{test:e=>"auto"===e,parse:e=>e}],Jr=e=>Zr.find(Gr(e));function ei(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||we(e))}const ti=new Set(["brightness","contrast","saturate","opacity"]);function ni(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ht)||[];if(!r)return e;const i=n.replace(r,"");let a=ti.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const ri=/\\b([a-z-]*)\\(.*?\\)/gu,ii={...Ot,getAnimatableNone:e=>{const t=e.match(ri);return t?t.map(ni).join(" "):e}},ai={...ut,transform:Math.round},oi={borderWidth:St,borderTopWidth:St,borderRightWidth:St,borderBottomWidth:St,borderLeftWidth:St,borderRadius:St,borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomRightRadius:St,borderBottomLeftRadius:St,width:St,maxWidth:St,height:St,maxHeight:St,top:St,right:St,bottom:St,left:St,inset:St,insetBlock:St,insetBlockStart:St,insetBlockEnd:St,insetInline:St,insetInlineStart:St,insetInlineEnd:St,padding:St,paddingTop:St,paddingRight:St,paddingBottom:St,paddingLeft:St,paddingBlock:St,paddingBlockStart:St,paddingBlockEnd:St,paddingInline:St,paddingInlineStart:St,paddingInlineEnd:St,margin:St,marginTop:St,marginRight:St,marginBottom:St,marginLeft:St,marginBlock:St,marginBlockStart:St,marginBlockEnd:St,marginInline:St,marginInlineStart:St,marginInlineEnd:St,fontSize:St,backgroundPositionX:St,backgroundPositionY:St,...{rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:dt,scaleX:dt,scaleY:dt,scaleZ:dt,skew:wt,skewX:wt,skewY:wt,distance:St,translateX:St,translateY:St,translateZ:St,x:St,y:St,z:St,perspective:St,transformPerspective:St,opacity:ct,originX:Ct,originY:Ct,originZ:St},zIndex:ai,fillOpacity:ct,strokeOpacity:ct,numOctaves:ai},si={...oi,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:ii,WebkitFilter:ii},li=e=>si[e];function ui(e,t){let n=li(e);return n!==ii&&(n=Ot),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ci=new Set(["auto","none","0"]);class di extends ir{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),ot(n))){const r=Tr(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Or.has(n)||2!==e.length)return;const[r,i]=e,a=Jr(r),o=Jr(i);if(lt(r)!==lt(i)&&Gn[n])this.needsMeasurement=!0;else if(a!==o)if(Xn(a)&&Xn(o))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else Gn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||ei(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!ci.has(t)&&Dt(t).values.length&&(r=e[i]),i++}if(r&&n)for(const a of t)e[a]=ui(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const i=n.length-1,a=n[i];n[i]=Gn[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const fi=new Set(["opacity","clipPath","filter","transform"]);function hi(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const pi=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function mi(e){return xe(e)&&"offsetHeight"in e}const{schedule:gi}=Ke(queueMicrotask,!1),yi={x:!1,y:!1};function vi(){return yi.x||yi.y}function bi(e,t){const n=hi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function xi(e,t,n={}){const[r,i,a]=bi(e,n);return r.forEach(e=>{let n,r=!1,a=!1;const o=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),a&&(a=!1,o(e))},l=e=>{"touch"!==e.pointerType&&(r?a=!0:o(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||vi())return;a=!1;const o=t(e,r);"function"==typeof o&&(n=o,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",s,i)},i)}),a}const wi=(e,t)=>!!t&&(e===t||wi(e,t.parentElement)),ki=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Si=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Ei=new Set(["INPUT","SELECT","TEXTAREA"]);const Ti=new WeakSet;function Ci(e){return t=>{"Enter"===t.key&&e(t)}}function Pi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Ni(e){return ki(e)&&!vi()}const ji=new WeakSet;function Mi(e,t,n={}){const[r,i,a]=bi(e,n),o=e=>{const r=e.currentTarget;if(!Ni(e))return;if(ji.has(e))return;Ti.add(r),n.stopPropagation&&ji.add(e);const a=t(r,e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Ti.has(r)&&Ti.delete(r),Ni(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||wi(r,e.target))},l=e=>{o(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",o,i),mi(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ci(()=>{if(Ti.has(n))return;Pi(n,"down");const e=Ci(()=>{Pi(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Pi(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,Si.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function Li(e){return xe(e)&&"ownerSVGElement"in e}const Ai=new WeakMap;let Di;const Ri=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Li(r)&&"getBBox"in r?r.getBBox()[t]:r[n],_i=Ri("inline","width","offsetWidth"),zi=Ri("block","height","offsetHeight");function Oi({target:e,borderBoxSize:t}){Ai.get(e)?.forEach(n=>{n(e,{get width(){return _i(e,t)},get height(){return zi(e,t)}})})}function Fi(e){e.forEach(Oi)}function Vi(e,t){Di||"undefined"!=typeof ResizeObserver&&(Di=new ResizeObserver(Fi));const n=hi(e);return n.forEach(e=>{let n=Ai.get(e);n||(n=new Set,Ai.set(e,n)),n.add(t),Di?.observe(e)}),()=>{n.forEach(e=>{const n=Ai.get(e);n?.delete(t),n?.size||Di?.unobserve(e)})}}const Ii=new Set;let Bi;function Ui(e){return Ii.add(e),Bi||(Bi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ii.forEach(t=>t(e))},window.addEventListener("resize",Bi)),()=>{Ii.delete(e),Ii.size||"function"!=typeof Bi||(window.removeEventListener("resize",Bi),Bi=void 0)}}function $i(e,t){return"function"==typeof e?Ui(e):Vi(e,t)}const Hi=[...Zr,Nt,Ot],Wi=()=>({x:{min:0,max:0},y:{min:0,max:0}}),qi=new WeakMap;function Yi(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Xi(e){return"string"==typeof e||Array.isArray(e)}const Ki=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qi=["initial",...Ki];function Gi(e){return Yi(e.animate)||Qi.some(t=>Xi(e[t]))}function Zi(e){return Boolean(Gi(e)||e.variants)}const Ji={current:null},ea={current:!1},ta="undefined"!=typeof window;const na=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ra={};function ia(e){ra=e}class aa{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ir,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=nt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Qe.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=Gi(t),this.isVariantNode=Zi(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&$r(e)&&e.set(l[f])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,qi.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ea.current||function(){if(ea.current=!0,ta)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ji.current=e.matches;e.addEventListener("change",t),t()}else Ji.current=!1}(),this.shouldReduceMotion=Ji.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ge(this.notifyUpdate),Ge(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&fi.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new pr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Ne(o)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=Yn.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Qe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ra){const t=ra[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<na.length;n++){const t=na[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],a=n[r];if($r(i))e.addValue(r,i);else if($r(a))e.addValue(r,Vr(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,Vr(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Vr(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(be(n)||we(n))?n=parseFloat(n):(r=n,!Hi.find(Gr(r))&&Ot.test(t)&&(n=ui(e,t))),this.setBaseTarget(e,$r(n)?n.get():n)),$r(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=_r(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||$r(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new Pe),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){gi.render(this.render)}}class oa extends aa{constructor(){super(...arguments),this.KeyframeResolver=di}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;$r(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=\`\${e}\`)}))}}class sa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function la({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ua(e){return void 0===e||1===e}function ca({scale:e,scaleX:t,scaleY:n}){return!ua(e)||!ua(t)||!ua(n)}function da(e){return ca(e)||fa(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fa(e){return ha(e.x)||ha(e.y)}function ha(e){return e&&"0%"!==e}function pa(e,t,n){return n+t*(e-n)}function ma(e,t,n,r,i){return void 0!==i&&(e=pa(e,i,r)),pa(e,n,r)+t}function ga(e,t=0,n=1,r,i){e.min=ma(e.min,t,n,r,i),e.max=ma(e.max,t,n,r,i)}function ya(e,{x:t,y:n}){ga(e.x,t.translate,t.scale,t.originPoint),ga(e.y,n.translate,n.scale,n.originPoint)}const va=.999999999999,ba=1.0000000000001;function xa(e,t){e.min=e.min+t,e.max=e.max+t}function wa(e,t,n,r,i=.5){ga(e,t,n,It(e.min,e.max,i),r)}function ka(e,t){wa(e.x,t.x,t.scaleX,t.scale,t.originX),wa(e.y,t.y,t.scaleY,t.scale,t.originY)}function Sa(e,t){return la(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Ea={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ta=qn.length;function Ca(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const l in t){const e=t[l];if(Yn.has(l))o=!0;else if(it(l))i[l]=e;else{const t=pi(e,oi[l]);l.startsWith("origin")?(s=!0,a[l]=t):r[l]=t}}if(t.transform||(o||n?r.transform=function(e,t,n){let r="",i=!0;for(let a=0;a<Ta;a++){const o=qn[a],s=e[o];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(o.startsWith("scale")?1:0);else{const e=parseFloat(s);l=o.startsWith("scale")?1===e:0===e}if(!l||n){const e=pi(s,oi[o]);l||(i=!1,r+=\`\${Ea[o]||o}(\${e}) \`),n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=\`\${e} \${t} \${n}\`}}function Pa(e,{style:t,vars:n},r,i){const a=e.style;let o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Na(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ja={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!St.test(e))return e;e=parseFloat(e)}return\`\${Na(e,t.target.x)}% \${Na(e,t.target.y)}%\`}},Ma={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ot.parse(e);if(i.length>5)return r;const a=Ot.createTransformer(e),o="number"!=typeof i[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const u=It(s,l,.5);return"number"==typeof i[2+o]&&(i[2+o]/=u),"number"==typeof i[3+o]&&(i[3+o]/=u),a(i)}},La={borderRadius:{...ja,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ja,borderTopRightRadius:ja,borderBottomLeftRadius:ja,borderBottomRightRadius:ja,boxShadow:Ma};function Aa(e,{layout:t,layoutId:n}){return Yn.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!La[e]||"opacity"===e)}function Da(e,t,n){const r=e.style,i=t?.style,a={};if(!r)return a;for(const o in r)($r(r[o])||i&&$r(i[o])||Aa(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}class Ra extends oa{constructor(){super(...arguments),this.type="html",this.renderInstance=Pa}readValueFromInstance(e,t){if(Yn.has(t))return this.projection?.isProjecting?$n(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hn(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(it(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Sa(e,t)}build(e,t,n){Ca(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Da(e,t,n)}}const _a={offset:"stroke-dashoffset",array:"stroke-dasharray"},za={offset:"strokeDashoffset",array:"strokeDasharray"};const Oa=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Fa(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},l,u,c){if(Ca(e,s,u),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox);for(const h of Oa)void 0!==d[h]&&(f[h]=d[h],delete d[h]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?_a:za;e[a.offset]=""+-r,e[a.array]=\`\${t} \${n}\`}(d,i,a,o,!1)}const Va=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ia=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Ba(e,t,n){const r=Da(e,t,n);for(const i in e)if($r(e[i])||$r(t[i])){r[-1!==qn.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}class Ua extends oa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wi}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Yn.has(t)){const e=li(t);return e&&e.default||0}return t=Va.has(t)?t:Wr(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ba(e,t,n)}build(e,t,n){Fa(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Pa(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Va.has(i)?i:Wr(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=Ia(e.tagName),super.mount(e)}}const $a=Qi.length;function Ha(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Ha(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<$a;n++){const r=Qi[n],i=e.props[r];(Xi(i)||!1===i)&&(t[r]=i)}return t}function Wa(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const qa=[...Ki].reverse(),Ya=Ki.length;function Xa(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map(t=>Qr(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=Qr(e,t,n);else{const i="function"==typeof t?zr(e,t,n.custom):t;r=Promise.all(Kr(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function Ka(e){let t=Xa(e),n=Za(),r=!0;const i=t=>(n,r)=>{const i=zr(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(a){const{props:o}=e,s=Ha(e.parent)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<Ya;t++){const f=qa[t],h=n[f],p=void 0!==o[f]?o[f]:s[f],m=Xi(p),g=f===a?h.isActive:null;!1===g&&(d=t);let y=p===s[f]&&p!==o[f]&&m;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...c},!h.isActive&&null===g||!p&&!h.prevProp||Yi(p)||"boolean"==typeof p)continue;if("exit"===f&&h.isActive&&!0!==g){h.prevResolvedValues&&(c={...c,...h.prevResolvedValues});continue}const v=Qa(h.prevProp,p);let b=v||f===a&&h.isActive&&!y&&m||t>d&&m,x=!1;const w=Array.isArray(p)?p:[p];let k=w.reduce(i(f),{});!1===g&&(k={});const{prevResolvedValues:S={}}=h,E={...S,...k},T=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=k[e],n=S[e];if(c.hasOwnProperty(e))continue;let r=!1;r=Ir(t)&&Ir(n)?!Wa(t,n):t!==n,r?null!=t?T(e):u.add(e):void 0!==t&&u.has(e)?T(e):h.protectedKeys[e]=!0}h.prevProp=p,h.prevResolvedValues=k,h.isActive&&(c={...c,...k}),r&&e.blockInitialAnimation&&(b=!1);const C=y&&v;b&&(!C||x)&&l.push(...w.map(t=>{const n={type:f};if("string"==typeof t&&r&&!C&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=zr(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=Sr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof o.initial){const n=zr(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==o.initial&&o.initial!==o.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const i=a(t);for(const e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Za()}}}function Qa(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Wa(t,e)}function Ga(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Za(){return{animate:Ga(!0),whileInView:Ga(),whileHover:Ga(),whileTap:Ga(),whileDrag:Ga(),whileFocus:Ga(),exit:Ga()}}function Ja(e,t){e.min=t.min,e.max=t.max}function eo(e,t){Ja(e.x,t.x),Ja(e.y,t.y)}function to(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function no(e){return e.max-e.min}function ro(e,t,n,r=.5){e.origin=r,e.originPoint=It(t.min,t.max,e.origin),e.scale=no(n)/no(t),e.translate=It(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function io(e,t,n,r){ro(e.x,t.x,n.x,r?r.originX:void 0),ro(e.y,t.y,n.y,r?r.originY:void 0)}function ao(e,t,n){e.min=n.min+t.min,e.max=e.min+no(t)}function oo(e,t,n){e.min=t.min-n.min,e.max=e.min+no(t)}function so(e,t,n){oo(e.x,t.x,n.x),oo(e.y,t.y,n.y)}function lo(e,t,n,r,i){return e=pa(e-=t,1/n,r),void 0!==i&&(e=pa(e,1/i,r)),e}function uo(e,t,[n,r,i],a,o){!function(e,t=0,n=1,r=.5,i,a=e,o=e){kt.test(t)&&(t=parseFloat(t),t=It(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=It(a.min,a.max,r);e===a&&(s-=t),e.min=lo(e.min,t,n,s,i),e.max=lo(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,a,o)}const co=["x","scaleX","originX"],fo=["y","scaleY","originY"];function ho(e,t,n,r){uo(e.x,t,co,n?n.x:void 0,r?r.x:void 0),uo(e.y,t,fo,n?n.y:void 0,r?r.y:void 0)}function po(e){return 0===e.translate&&1===e.scale}function mo(e){return po(e.x)&&po(e.y)}function go(e,t){return e.min===t.min&&e.max===t.max}function yo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function vo(e,t){return yo(e.x,t.x)&&yo(e.y,t.y)}function bo(e){return no(e.x)/no(e.y)}function xo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function wo(e){return[e("x"),e("y")]}const ko=["TopLeft","TopRight","BottomLeft","BottomRight"],So=ko.length,Eo=e=>"string"==typeof e?parseFloat(e):e,To=e=>"number"==typeof e||St.test(e);function Co(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Po=jo(0,.5,Ie),No=jo(.5,.95,Se);function jo(e,t,n){return r=>r<e?0:r>t?1:n(Ce(e,t,r))}function Mo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Lo=(e,t)=>e.depth-t.depth;class Ao{constructor(){this.children=[],this.isDirty=!1}add(e){me(this.children,e),this.isDirty=!0}remove(e){ge(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Lo),this.isDirty=!1,this.children.forEach(e)}}function Do(e){return $r(e)?e.get():e}class Ro{constructor(){this.members=[]}add(e){me(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1===r.isConnected&&!1!==n.isPresent&&!n.snapshot&&ge(this.members,n)}e.scheduleRender()}remove(e){if(ge(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r],t=e.instance;if(!1!==e.isPresent&&(!t||!1!==t.isConnected)){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();const r=n.options.layoutDependency,i=e.options.layoutDependency;if(!(void 0!==r&&void 0!==i&&r===i)){const r=n.instance;r&&!1===r.isConnected&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:a}=e.options;!1===a&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const _o={hasAnimatedSinceResize:!0,hasEverUpdated:!1},zo=["","X","Y","Z"];let Oo=0;function Fo(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Vo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Yr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qe,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Vo(r)}function Io({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Oo++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach($o),this.nodes.forEach(Qo),this.nodes.forEach(Go),this.nodes.forEach(Ho)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ao)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Pe),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=Li(t)&&!(Li(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const i=()=>this.root.updateBlockedByResize=!1;Qe.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=nt.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Ge(r),e(a-t))};return Qe.setup(r,!0),()=>Ge(r)}(i,250),_o.hasAnimatedSinceResize&&(_o.hasAnimatedSinceResize=!1,this.nodes.forEach(Ko)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||a.getDefaultTransition()||rs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!vo(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Ar(i,"layout"),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||Ko(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ge(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Zo),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(qo);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Yo);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Xo),this.nodes.forEach(Bo),this.nodes.forEach(Uo)):this.nodes.forEach(Yo),this.clearAllSnapshots();const e=nt.now();Ze.delta=ye(0,1e3/60,e-Ze.timestamp),Ze.timestamp=e,Ze.isProcessing=!0,Je.update.process(Ze),Je.preRender.process(Ze),Je.render.process(Ze),Ze.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Wo),this.sharedNodes.forEach(Jo)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||no(this.snapshot.measuredBox.x)||no(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!mo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||da(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),os((r=n).x),os(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ls))){const{scroll:e}=this.root;e&&(xa(t.x,e.offset.x),xa(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(eo(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&eo(t,e),xa(t.x,i.offset.x),xa(t.y,i.offset.y))}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};eo(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&ka(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),da(e.latestValues)&&ka(n,e.latestValues)}return da(this.latestValues)&&ka(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};eo(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!da(e.latestValues))continue;ca(e.latestValues)&&e.updateSnapshot();const r=Wi();eo(r,e.measurePageBox()),ho(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return da(this.latestValues)&&ho(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ze.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:i}=this.options;if(!this.layout||!r&&!i)return;this.resolvedRelativeTargetAt=Ze.timestamp;const a=this.getClosestProjectingParent();var o,s,l;(a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,s=this.relativeTarget,l=this.relativeParent.target,ao(o.x,s.x,l.x),ao(o.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):eo(this.target,this.layout.layoutBox),ya(this.target,this.targetDelta)):eo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&Boolean(a.resumingFrom)===Boolean(this.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!ca(this.parent.latestValues)&&!fa(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},so(this.relativeTargetOrigin,t,n),eo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ze.timestamp&&(n=!1),n)return;const{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!i)return;eo(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,o=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let a,o;t.x=t.y=1;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:i}=a.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&ka(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ya(e,o)),r&&da(a.latestValues)&&ka(e,a.latestValues))}t.x<ba&&t.x>va&&(t.x=1),t.y<ba&&t.y>va&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(to(this.prevProjectionDelta.x,this.projectionDelta.x),to(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),io(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&xo(this.projectionDelta.x,this.prevProjectionDelta.x)&&xo(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(s&&!u&&!0===this.options.crossfade&&!this.path.some(ns));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,h,p,m,g;es(a.x,e.x,n),es(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(so(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,m=o,g=n,ts(h.x,p.x,m.x,g),ts(h.y,p.y,m.y,g),d&&(l=this.relativeTarget,f=d,go(l.x,f.x)&&go(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),eo(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=It(0,n.opacity??1,Po(r)),e.opacityExit=It(t.opacity??1,0,No(r))):a&&(e.opacity=It(t.opacity??1,n.opacity??1,r));for(let o=0;o<So;o++){const i=\`border\${ko[o]}Radius\`;let a=Co(t,i),s=Co(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||To(a)===To(s)?(e[i]=Math.max(It(Eo(a),Eo(s),r),0),(kt.test(s)||kt.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=It(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ge(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{_o.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Vr(0)),this.currentAnimation=function(e,t,n){const r=$r(e)?e:Vr(e);return r.start(Dr("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ss(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=no(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=no(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}eo(t,n),ka(t,i),io(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ro);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Fo("z",e,r,this.animationValues);for(let i=0;i<zo.length;i++)Fo(\`rotate\${zo[i]}\`,e,r,this.animationValues),Fo(\`skew\${zo[i]}\`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Do(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Do(t?.pointerEvents)||""),void(this.hasProjected&&!da(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=\`translate3d(\${i}px, \${a}px, \${o}px) \`),1===t.x&&1===t.y||(r+=\`scale(\${1/t.x}, \${1/t.y}) \`),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=\`perspective(\${e}px) \${r}\`),t&&(r+=\`rotate(\${t}deg) \`),i&&(r+=\`rotateX(\${i}deg) \`),a&&(r+=\`rotateY(\${a}deg) \`),o&&(r+=\`skewX(\${o}deg) \`),s&&(r+=\`skewY(\${s}deg) \`)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=\`scale(\${s}, \${l})\`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;const{x:o,y:s}=this.projectionDelta;e.transformOrigin=\`\${100*o.origin}% \${100*s.origin}% 0\`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const l in La){if(void 0===i[l])continue;const{correct:t,applyTo:n,isCSSVariable:o}=La[l],s="none"===a?i[l]:t(i[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else o?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?Do(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(qo),this.root.sharedNodes.clear()}}}function Bo(e){e.updateLayout()}function Uo(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;"size"===i?wo(e=>{const r=a?t.measuredBox[e]:t.layoutBox[e],i=no(r);r.min=n[e].min,r.max=r.min+i}):ss(i,t.layoutBox,n)&&wo(r=>{const i=a?t.measuredBox[r]:t.layoutBox[r],o=no(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};io(o,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?io(s,e.applyTransform(r,!0),t.measuredBox):io(s,n,t.layoutBox);const l=!mo(o);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:a}=r;if(i&&a){const o={x:{min:0,max:0},y:{min:0,max:0}};so(o,t.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};so(s,n,a.layoutBox),vo(o,s)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function $o(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ho(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Wo(e){e.clearSnapshot()}function qo(e){e.clearMeasurements()}function Yo(e){e.isLayoutDirty=!1}function Xo(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ko(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Qo(e){e.resolveTargetDelta()}function Go(e){e.calcProjection()}function Zo(e){e.resetSkewAndRotation()}function Jo(e){e.removeLeadSnapshot()}function es(e,t,n){e.translate=It(t.translate,0,n),e.scale=It(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ts(e,t,n,r){e.min=It(t.min,n.min,r),e.max=It(t.max,n.max,r)}function ns(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const rs={duration:.45,ease:[.4,0,.1,1]},is=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),as=is("applewebkit/")&&!is("chrome/")?Math.round:Se;function os(e){e.min=as(e.min),e.max=as(e.max)}function ss(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=bo(t),i=bo(n),a=.2,!(Math.abs(r-i)<=a));var r,i,a}function ls(e){return e!==e.root&&e.scroll?.wasRoot}const us=Io({attachResizeListener:(e,t)=>Mo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),cs={current:void 0},ds=Io({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cs.current){const e=new us({});e.mount(window),e.setOptions({layoutScroll:!0}),cs.current=e}return cs.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),fs=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function hs(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ps(...e){return f.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=hs(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():hs(e[t],null)}}}}(...e),e)}class ms extends f.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=mi(e)&&e.offsetWidth||0,r=mi(e)&&e.offsetHeight||0,i=this.props.sizeRef.current;i.height=t.offsetHeight||0,i.width=t.offsetWidth||0,i.top=t.offsetTop,i.left=t.offsetLeft,i.right=n-i.width-i.left,i.bottom=r-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function gs({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){const o=f.useId(),l=f.useRef(null),u=f.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=f.useContext(fs),d=e.props?.ref??e?.ref,h=ps(l,d);return f.useInsertionEffect(()=>{const{width:e,height:s,top:d,left:f,right:h,bottom:p}=u.current;if(t||!1===a||!l.current||!e||!s)return;const m="left"===n?\`left: \${f}\`:\`right: \${h}\`,g="bottom"===r?\`bottom: \${p}\`:\`top: \${d}\`;l.current.dataset.motionPopId=o;const y=document.createElement("style");c&&(y.nonce=c);const v=i??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(\`\\n [data-motion-pop-id="\${o}"] {\\n position: absolute !important;\\n width: \${e}px !important;\\n height: \${s}px !important;\\n \${m}px !important;\\n \${g}px !important;\\n }\\n \`),()=>{v.contains(y)&&v.removeChild(y)}},[t]),s.jsx(ms,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:!1===a?e:f.cloneElement(e,{ref:h})})}const ys=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:u,root:c})=>{const d=de(vs),h=f.useId();let p=!0,m=f.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:e=>{d.set(e,!0);for(const t of d.values())if(!t)return;r&&r()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[n,d,r]);return a&&p&&(m={...m}),f.useMemo(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),f.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=s.jsx(gs,{pop:"popLayout"===o,isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),s.jsx(pe.Provider,{value:m,children:e})};function vs(){return new Map}function bs(e=!0){const t=f.useContext(pe);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=f.useId();f.useEffect(()=>{if(e)return i(a)},[e]);const o=f.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const xs=e=>e.key||"";function ws(e){const t=[];return f.Children.forEach(e,e=>{f.isValidElement(e)&&t.push(e)}),t}const ks=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[d,h]=bs(o),p=f.useMemo(()=>ws(e),[e]),m=o&&!d?[]:p.map(xs),g=f.useRef(!0),y=f.useRef(p),v=de(()=>new Map),b=f.useRef(new Set),[x,w]=f.useState(p),[k,S]=f.useState(p);he(()=>{g.current=!1,y.current=p;for(let e=0;e<k.length;e++){const t=xs(k[e]);m.includes(t)?(v.delete(t),b.current.delete(t)):!0!==v.get(t)&&v.set(t,!1)}},[k,m.length,m.join("-")]);const E=[];if(p!==x){let e=[...p];for(let t=0;t<k.length;t++){const n=k[t],r=xs(n);m.includes(r)||(e.splice(t,0,n),E.push(n))}return"wait"===a&&E.length&&(e=E),S(ws(e)),w(p),null}const{forceRender:T}=f.useContext(ce);return s.jsx(s.Fragment,{children:k.map(e=>{const f=xs(e),x=!(o&&!d)&&(p===k||m.includes(f));return s.jsx(ys,{isPresent:x,initial:!(g.current&&!n)&&void 0,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:x?void 0:()=>{if(b.current.has(f))return;if(b.current.add(f),!v.has(f))return;v.set(f,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(T?.(),S(y.current),o&&h?.(),r&&r())},anchorX:l,anchorY:u,children:e},f)})})},Ss=f.createContext({strict:!1}),Es={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ts=!1;function Cs(){return function(){if(Ts)return;const e={};for(const t in Es)e[t]={isEnabled:e=>Es[t].some(t=>!!e[t])};ia(e),Ts=!0}(),ra}const Ps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Ns(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ps.has(e)}let js=e=>!Ns(e);try{"function"==typeof(Ms=require("@emotion/is-prop-valid").default)&&(js=e=>e.startsWith("on")?!Ns(e):Ms(e))}catch{}var Ms;const Ls=f.createContext({});function As(e){const{initial:t,animate:n}=function(e,t){if(Gi(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Xi(t)?t:void 0,animate:Xi(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,f.useContext(Ls));return f.useMemo(()=>({initial:t,animate:n}),[Ds(t),Ds(n)])}function Ds(e){return Array.isArray(e)?e.join(" "):e}const Rs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _s(e,t,n){for(const r in t)$r(t[r])||Aa(r,n)||(e[r]=t[r])}function zs(e,t){const n={};return _s(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Ca(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Os(e,t){const n={},r=zs(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Fs=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Vs(e,t,n,r){const i=f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Fa(n,t,Ia(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};_s(t,e.style,e),i.style={...t,...i.style}}return i}const Is=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Bs(e){return"string"==typeof e&&!e.includes("-")&&!!(Is.indexOf(e)>-1||/[A-Z]/u.test(e))}function Us(e,t,n,{latestValues:r},i,a=!1,o){const s=(o??Bs(e)?Vs:Os)(t,r,i,e),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(js(i)||!0===n&&Ns(i)||!t&&!Ns(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),u=e!==f.Fragment?{...l,...s,ref:n}:{},{children:c}=t,d=f.useMemo(()=>$r(c)?c.get():c,[c]);return f.createElement(e,{...u,children:d})}function $s(e,t,n,r){const i={},a=r(e,{});for(const f in a)i[f]=Do(a[f]);let{initial:o,animate:s}=e;const l=Gi(e),u=Zi(e);t&&u&&!l&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===o;const d=c?s:o;if(d&&"boolean"!=typeof d&&!Yi(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=_r(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[r]=e)}for(const r in e)i[r]=e[r]}}}return i}const Hs=e=>(t,n)=>{const r=f.useContext(Ls),i=f.useContext(pe),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:$s(n,r,i,e),renderState:t()}}(e,t,r,i);return n?a():de(a)},Ws=Hs({scrapeMotionValuesFromProps:Da,createRenderState:Rs}),qs=Hs({scrapeMotionValuesFromProps:Ba,createRenderState:Fs}),Ys=Symbol.for("motionComponentSymbol");function Xs(e,t,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n});const i=f.useRef(null);return f.useCallback(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const a=r.current;if("function"==typeof a)if(n){const e=a(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}const Ks=f.createContext({});function Qs(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Gs(e,t,n,r,i,a){const{visualElement:o}=f.useContext(Ls),s=f.useContext(Ss),l=f.useContext(pe),u=f.useContext(fs),c=u.reducedMotion,d=u.skipAnimations,h=f.useRef(null),p=f.useRef(!1);r=r||s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,g=f.useContext(Ks);!m||m.projection||!i||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zs(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:Boolean(o)||s&&Qs(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}(h.current,n,i,g);const y=f.useRef(!1);f.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const v=n[qr],b=f.useRef(Boolean(v)&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return he(()=>{p.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),f.useEffect(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),b.current=!1),m.enteringChildren=void 0)}),m}function Zs(e){if(e)return!1!==e.options.allowProjection?e.projection:Zs(e.parent)}function Js(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&function(e){const t=Cs();for(const n in e)t[n]={...t[n],...e[n]};ia(t)}(r);const a=n?"svg"===n:Bs(e),o=a?qs:Ws;function l(n,r){let l;const u={...f.useContext(fs),...n,layoutId:el(n)},{isStatic:c}=u,d=As(n),h=o(n,c);if(!c&&fe){f.useContext(Ss).strict;const t=function(e){const t=Cs(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);l=t.MeasureLayout,d.visualElement=Gs(e,h,u,i,t.ProjectionNode,a)}return s.jsxs(Ls.Provider,{value:d,children:[l&&d.visualElement?s.jsx(l,{visualElement:d.visualElement,...u}):null,Us(e,n,Xs(h,d.visualElement,r),h,c,t,a)]})}l.displayName=\`motion.\${"string"==typeof e?e:\`create(\${e.displayName??e.name??""})\`}\`;const u=f.forwardRef(l);return u[Ys]=e,u}function el({layoutId:e}){const t=f.useContext(ce).id;return t&&void 0!==e?t+"-"+e:e}function tl(e,t){if("undefined"==typeof Proxy)return Js;const n=new Map,r=(n,r)=>Js(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>"create"===a?r:(n.has(a)||n.set(a,Js(a,void 0,e,t)),n.get(a))})}const nl=(e,t)=>t.isSVG??Bs(e)?new Ua(t):new Ra(t,{allowProjection:e!==f.Fragment});let rl=0;const il={animation:{Feature:class extends sa{constructor(e){super(e),e.animationState||(e.animationState=Ka(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Yi(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends sa{constructor(){super(...arguments),this.id=rl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function al(e){return{point:{x:e.pageX,y:e.pageY}}}function ol(e,t,n,r){return Mo(e,t,(e=>t=>ki(t)&&e(t,al(t)))(n),r)}const sl=({current:e})=>e?e.ownerDocument.defaultView:null,ll=(e,t)=>Math.abs(e-t);const ul=new Set(["auto","scroll"]);class cl{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=hl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=ll(e.x,t.x),r=ll(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=Ze;this.history.push({...r,timestamp:i});const{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=dl(t,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=hl("pointercancel"===e.type?this.lastMoveEventInfo:dl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ki(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=dl(al(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=Ze;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,hl(s,this.history)),this.removeListeners=Te(ol(this.contextWindow,"pointermove",this.handlePointerMove),ol(this.contextWindow,"pointerup",this.handlePointerUp),ol(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(ul.has(e.overflowX)||ul.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i=r.x-t.x,a=r.y-t.y;0===i&&0===a||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i,this.lastMoveEventInfo.point.y+=a):this.history.length>0&&(this.history[0].x-=i,this.history[0].y-=a),this.scrollPositions.set(e,r),Qe.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ge(this.updatePoint)}}function dl(e,t){return t?{point:t(e.point)}:e}function fl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function hl({point:e},t){return{point:e,delta:fl(e,ml(t)),offset:fl(e,pl(t)),velocity:gl(t,.1)}}function pl(e){return e[0]}function ml(e){return e[e.length-1]}function gl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ml(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ne(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*Ne(t)&&(r=e[1]);const a=je(i.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function yl(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function vl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const bl=.35;function xl(e,t,n){return{min:wl(e,t),max:wl(e,n)}}function wl(e,t){return"number"==typeof e?e:e[t]||0}const kl=new WeakMap;class Sl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new cl(e,{onSessionStart:e=>{t&&this.snapToCursor(al(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?yi[a]?null:(yi[a]=!0,()=>{yi[a]=!1}):yi.x||yi.y?null:(yi.x=yi.y=!0,()=>{yi.x=yi.y=!1}),!this.openDragLock))return;var a;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wo(e=>{let t=this.getAxisMotionValue(e).get()||0;if(kt.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=no(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&Qe.update(()=>i(e,t),!1,!0),Hr(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(o),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&Qe.update(()=>a(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:sl(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&Qe.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Tl(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?It(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?It(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Qs(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:yl(e.x,n,i),y:yl(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=bl){return!1===e?e=0:!0===e&&(e=bl),{x:xl(e,"left","right"),y:xl(e,"top","bottom")}}(t),r!==this.constraints&&!Qs(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&wo(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Qs(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Sa(e,n),{scroll:i}=t;return i&&(xa(r.x,i.offset.x),xa(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:vl(e.x,t.x),y:vl(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=la(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},l=wo(o=>{if(!Tl(o,t,this.currentDirection))return;let l=s&&s[o]||{};a&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[o]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(o,d)});return Promise.all(l).then(o)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Hr(this.visualElement,e),n.start(Dr(e,n,0,t,this.visualElement,!1))}stopAnimation(){wo(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=\`_drag\${e.toUpperCase()}\`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){wo(t=>{const{drag:n}=this.getProps();if(!Tl(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-It(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Qs(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};wo(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=no(e),i=no(t);return i>r?n=Ce(t.min,t.max-r,e.min):r>i&&(n=Ce(e.min,e.max-i,t.min)),ye(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),wo(t=>{if(!Tl(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(It(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;kl.set(this.visualElement,this);const e=this.visualElement.current,t=ol(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&function(e){return Ei.has(e.tagName)||!0===e.isContentEditable}(i);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Qs(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=$i(e,El(n)),i=$i(t,El(n));return()=>{r(),i()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Qe.read(r);const o=Mo(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(wo(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=bl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function El(e){let t=!0;return()=>{t?t=!1:e()}}function Tl(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Cl=e=>(t,n)=>{e&&Qe.update(()=>e(t,n),!1,!0)};let Pl=!1;class Nl extends f.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Pl&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),_o.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Pl=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Qe.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),gi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Pl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function jl(e){const[t,n]=bs(),r=f.useContext(ce);return s.jsx(Nl,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(Ks),isPresent:t,safeToRemove:n})}const Ml={pan:{Feature:class extends sa{constructor(){super(...arguments),this.removePointerDownListener=Se}onPointerDown(e){this.session=new cl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sl(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Cl(e),onStart:Cl(t),onMove:Cl(n),onEnd:(e,t)=>{delete this.session,r&&Qe.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ol(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends sa{constructor(e){super(e),this.removeGroupControls=Se,this.removeListeners=Se,this.controls=new Sl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Se}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:ds,MeasureLayout:jl}};function Ll(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&Qe.postRender(()=>i(t,al(t)))}function Al(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&Qe.postRender(()=>i(t,al(t)))}const Dl=new WeakMap,Rl=new WeakMap,_l=e=>{const t=Dl.get(e.target);t&&t(e)},zl=e=>{e.forEach(_l)};function Ol(e,t,n){const r=function({root:e,...t}){const n=e||document;Rl.has(n)||Rl.set(n,{});const r=Rl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(zl,{root:e,...t})),r[i]}(t);return Dl.set(e,n),r.observe(e),()=>{Dl.delete(e),r.unobserve(e)}}const Fl={some:0,all:1};const Vl=tl({...il,...{inView:{Feature:class extends sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Fl[r]};return Ol(this.node.current,a,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends sa{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Mi(e,(e,t)=>(Al(this.node,t,"Start"),(e,{success:t})=>Al(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Te(Mo(this.node.current,"focus",()=>this.onFocus()),Mo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends sa{mount(){const{current:e}=this.node;e&&(this.unmount=xi(e,(e,t)=>(Ll(this.node,t,"Start"),e=>Ll(this.node,e,"End"))))}unmount(){}}}},...Ml,...{layout:{ProjectionNode:ds,MeasureLayout:jl}}},nl);function Il({label:e,value:t,suffix:n,decimals:r=0,icon:i,delay:a=0}){const o=f.useRef(null),l=f.useRef(0);return f.useEffect(()=>{o.current&&t!==l.current&&(!function(e,t,n){let r=null;requestAnimationFrame(function i(a){r||(r=a);const o=Math.min((a-r)/800,1),s=1-Math.pow(1-o,4),l=t*s;e.textContent=n>0?l.toFixed(n):String(Math.round(l)),o<1&&requestAnimationFrame(i)})}(o.current,t,r),l.current=t)},[t,r]),s.jsxs(Vl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:a},className:"flex-1 min-w-[140px] p-4 rounded-xl bg-bg-surface-1 border border-border/50 flex flex-col gap-2 group hover:border-accent/30 transition-all duration-300",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"p-2 rounded-lg bg-bg-surface-2 group-hover:bg-accent/10 transition-colors",children:s.jsx(i,{className:"w-4 h-4 text-text-muted group-hover:text-accent transition-colors"})}),s.jsx("span",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider",children:e})]}),s.jsxs("div",{className:"flex items-baseline gap-1 mt-1",children:[s.jsx("span",{ref:o,className:"text-2xl font-bold text-text-primary tracking-tight",children:r>0?t.toFixed(r):t}),n&&s.jsx("span",{className:"text-xs text-text-muted font-medium",children:n})]})]})}function Bl({totalHours:e,totalSessions:t,currentStreak:n,filesTouched:r}){return s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[s.jsx(Il,{label:"Total Time",value:e,suffix:"hrs",decimals:1,icon:Q,delay:.1}),s.jsx(Il,{label:"Sessions",value:t,icon:ne,delay:.2}),s.jsx(Il,{label:"Streak",value:n,suffix:"days",icon:le,delay:.3}),s.jsx(Il,{label:"Files",value:r,icon:Z,delay:.4})]})}const Ul={"claude-code":"#d4a04a",cursor:"#00b4d8",copilot:"#6e40c9",windsurf:"#38bdf8","github-copilot":"#6e40c9",aider:"#4ade80",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6"},$l={"claude-code":"Claude Code",cursor:"Cursor",copilot:"GitHub Copilot",windsurf:"Windsurf","github-copilot":"GitHub Copilot",aider:"Aider",continue:"Continue",cody:"Sourcegraph Cody",tabby:"TabbyML",roo:"Roo Code"},Hl={"claude-code":"CC",cursor:"Cu",copilot:"CP",windsurf:"WS","github-copilot":"CP",aider:"Ai",continue:"Co",cody:"Cy",tabby:"Tb",roo:"Ro"},Wl={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"};function ql(e){const t=e/3600;return t<.1?\`\${t.toFixed(2)}h\`:\`\${t.toFixed(1)}h\`}function Yl(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function Xl({label:e,children:t}){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-[10px] text-text-muted uppercase tracking-widest font-bold whitespace-nowrap",children:e}),s.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto pb-1 no-scrollbar",children:t})]})}function Kl({stats:e}){const t=Yl(e.byClient,4),n=Yl(e.byLanguage,4);return 0===t.length&&0===n.length?null:s.jsxs("div",{className:"flex flex-col gap-4 mb-8 p-4 rounded-xl bg-bg-surface-1/30 border border-border/50",children:[t.length>0&&s.jsx(Xl,{label:"Top Clients",children:t.map(([e,t])=>{const n=Ul[e];return s.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",style:n?{borderLeftWidth:"3px",borderLeftColor:n}:void 0,title:ql(t),children:[$l[e]??e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:ql(t)})]},e)})}),n.length>0&&s.jsx(Xl,{label:"Languages",children:n.map(([e,t])=>s.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",title:ql(t),children:[e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:ql(t)})]},e))})]})}function Ql({label:e,active:t,onClick:n}){return s.jsx("button",{onClick:n,className:"text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-full transition-all duration-200 cursor-pointer border "+(t?"bg-accent text-white border-accent shadow-[0_2px_10px_rgba(99,102,241,0.4)] scale-105":"bg-bg-surface-1 border-border text-text-muted hover:text-text-primary hover:border-text-muted/50"),children:e})}function Gl({sessions:e,filters:t,onFilterChange:n}){const r=f.useMemo(()=>[...new Set(e.map(e=>e.client))].sort(),[e]),i=f.useMemo(()=>[...new Set(e.flatMap(e=>e.languages))].sort(),[e]),a=f.useMemo(()=>[...new Set(e.map(e=>e.project).filter(Boolean))].sort(),[e]);return r.length>0||i.length>0||a.length>0?s.jsxs("div",{className:"flex flex-col gap-3 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 px-1",children:[s.jsx(J,{className:"w-3.5 h-3.5 text-text-muted"}),s.jsx("span",{className:"text-[10px] font-bold text-text-muted uppercase tracking-widest",children:"Filters"})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[s.jsx(Ql,{label:"All",active:"all"===t.client&&"all"===t.language&&"all"===t.project,onClick:()=>{n("client","all"),n("language","all"),n("project","all")}}),r.map(e=>s.jsx(Ql,{label:$l[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),i.map(e=>s.jsx(Ql,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),a.map(e=>s.jsx(Ql,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]})]}):null}function Zl(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function Jl(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}const eu={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function tu({category:e}){const t=eu[e]??"bg-bg-surface-2 text-text-secondary border-border";return s.jsx("span",{className:\`text-[10px] px-2 py-0.5 rounded-full border font-medium uppercase tracking-wider \${t}\`,children:e})}function nu({session:e,milestones:t,defaultExpanded:n=!1}){const[r,i]=f.useState(n),a=Ul[e.client]??"#91919a",o=Hl[e.client]??e.client.slice(0,2).toUpperCase(),l=t.length>0;return s.jsxs("div",{className:"mb-3 rounded-xl border transition-all duration-300 "+(r?"bg-bg-surface-1 border-border-accent shadow-[0_4px_20px_rgba(0,0,0,0.2)]":"bg-bg-surface-1/40 border-border hover:border-border-accent hover:bg-bg-surface-1/60"),children:[s.jsxs("button",{className:"w-full flex items-center gap-4 px-4 py-4 text-left",onClick:()=>l&&i(!r),style:{cursor:l?"pointer":"default"},children:[s.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center text-xs font-bold font-mono flex-shrink-0 shadow-inner",style:{backgroundColor:\`\${a}15\`,color:a,border:\`1px solid \${a}30\`},children:o}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-semibold text-text-primary",children:e.project||"Untitled Project"}),s.jsx("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-1.5 py-0.5 rounded",children:e.client})]}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-text-secondary font-medium",children:[s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(Q,{className:"w-3.5 h-3.5 text-text-muted"}),Zl(e.started_at,e.ended_at)]}),s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(W,{className:"w-3.5 h-3.5 text-text-muted"}),Jl(e.duration_seconds)]})]})]}),s.jsxs("div",{className:"hidden sm:flex flex-col items-end gap-1.5 text-right mr-2",children:[e.languages.length>0&&s.jsx("div",{className:"flex gap-1",children:e.languages.slice(0,3).map(e=>s.jsx("span",{className:"text-[10px] font-mono text-text-muted bg-bg-surface-2 px-1.5 py-0.5 rounded border border-border/50",children:e},e))}),l&&s.jsxs("span",{className:"text-[10px] font-bold text-accent uppercase tracking-tighter bg-accent/5 px-2 py-0.5 rounded-full border border-accent/10",children:[t.length," Event",1!==t.length?"s":""]})]}),l&&s.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2 transition-transform duration-300 "+(r?"rotate-180 text-accent":"text-text-muted"),children:s.jsx(Y,{className:"w-4 h-4"})})]}),s.jsx(ks,{children:r&&l&&s.jsx(Vl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"overflow-hidden",children:s.jsxs("div",{className:"px-4 pb-4 space-y-2",children:[s.jsx("div",{className:"h-px bg-border/50 mb-4 mx-2"}),t.map(e=>{const t=!!e.private_title,n=t?e.private_title:e.title,r=function(e){if(!e||e<=0)return"";if(e<60)return\`\${e}m\`;const t=Math.floor(e/60),n=e%60;return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}(e.duration_minutes);return s.jsxs("div",{className:"group flex items-start gap-4 p-3 rounded-lg hover:bg-bg-surface-2/50 transition-colors border border-transparent hover:border-border/50",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full mt-2 flex-shrink-0 shadow-[0_0_8px_currentColor]",style:{color:Wl[e.category]??"#9c9588",backgroundColor:"currentColor"}}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[t&&s.jsx(ee,{className:"w-3.5 h-3.5 text-accent-dim opacity-70 flex-shrink-0"}),s.jsx("span",{className:"text-sm font-medium text-text-primary group-hover:text-accent transition-colors",children:n})]}),t&&s.jsxs("div",{className:"flex items-center gap-1.5 mt-1 text-xs text-text-muted font-mono italic",children:[s.jsx(G,{className:"w-3 h-3 opacity-50"}),e.title]})]}),s.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[s.jsx(tu,{category:e.category}),s.jsxs("div",{className:"flex flex-col items-end gap-0.5 min-w-[45px]",children:[e.complexity&&s.jsx("span",{className:"text-[10px] text-text-muted font-mono font-bold uppercase",children:e.complexity}),r&&s.jsx("span",{className:"text-[10px] text-text-secondary font-mono",children:r})]})]})]},e.id)})]})})})]})}function ru({sessions:e,milestones:t,filters:n}){const r=f.useMemo(()=>e.filter(e=>("all"===n.client||e.client===n.client)&&(!("all"!==n.language&&!e.languages.includes(n.language))&&("all"===n.project||(e.project??"")===n.project))),[e,n]),i=f.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),a=f.useMemo(()=>function(e,t){const n=new Map;for(const i of t){const e=n.get(i.session_id);e?e.push(i):n.set(i.session_id,[i])}const r=e.map(e=>({session:e,milestones:n.get(e.session_id)??[]}));return r.sort((e,t)=>new Date(t.session.started_at).getTime()-new Date(e.session.started_at).getTime()),r}(r,i),[r,i]);return 0===a.length?s.jsx("div",{className:"text-center text-text-muted py-8 text-sm mb-4",children:"No sessions in this window"}):s.jsx("div",{className:"border border-border rounded-lg mb-4 overflow-hidden",children:a.map((e,t)=>s.jsx(nu,{session:e.session,milestones:e.milestones,defaultExpanded:0===t&&e.milestones.length>0},e.session.session_id))})}function iu({sessions:e,timeScale:t,effectiveTime:n,isLive:r,onDayClick:i,highlightDate:a}){const o="24h"===t||"12h"===t,l=new Date(n).toISOString().slice(0,10),u=f.useMemo(()=>o?function(e,t){const n=new Date(\`\${t}T00:00:00\`).getTime(),r=n+864e5,i=[];for(let a=0;a<24;a++)i.push({hour:a,minutes:0});for(const a of e){const e=new Date(a.started_at).getTime(),t=new Date(a.ended_at).getTime();if(t<n||e>r)continue;const o=Math.max(e,n),s=Math.min(t,r);for(let r=0;r<24;r++){const e=n+36e5*r,t=e+36e5,a=Math.max(o,e),l=Math.min(s,t);l>a&&(i[r].minutes+=(l-a)/6e4)}}return i}(e,l):[],[e,l,o]),c=f.useMemo(()=>o?[]:function(e,t){const n=new Date,r=[];for(let i=t-1;i>=0;i--){const t=new Date(n);t.setDate(t.getDate()-i);const a=t.toISOString().slice(0,10);let o=0;for(const n of e)n.started_at.slice(0,10)===a&&(o+=n.duration_seconds);r.push({date:a,hours:o/3600})}return r}(e,7),[e,o]),d=o?\`Hourly \u2014 \${new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}\`:"Last 7 Days";if(o){const e=Math.max(...u.map(e=>e.minutes),1);return s.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[s.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),s.jsxs("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.toFixed(0),"m peak"]})]}),s.jsx("div",{className:"flex items-end gap-[3px] h-16",children:u.map((t,n)=>{const r=e>0?t.minutes/e*100:0;return s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[s.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:s.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[s.jsxs("span",{className:"font-bold",children:[t.hour,":00"]}),s.jsxs("span",{className:"text-accent",children:[t.minutes.toFixed(0),"m active"]}),s.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),s.jsx(Vl.div,{initial:{height:0},animate:{height:\`\${Math.max(r,t.minutes>0?8:0)}%\`},transition:{delay:.01*n,duration:.5},className:"w-full rounded-t-sm transition-all duration-300 group-hover:bg-accent relative overflow-hidden",style:{minHeight:t.minutes>0?"4px":"0px",backgroundColor:t.minutes>0?\`rgba(99, 102, 241, \${.4+t.minutes/e*.6})\`:"var(--color-bg-surface-2)"},children:t.minutes>.5*e&&s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-transparent to-white/10"})})]},t.hour)})}),s.jsx("div",{className:"flex gap-[3px] mt-2 border-t border-border/30 pt-2",children:u.map(e=>s.jsx("div",{className:"flex-1 text-center",children:e.hour%6==0&&s.jsx("span",{className:"text-[9px] text-text-muted font-bold font-mono uppercase",children:0===e.hour?"12a":e.hour<12?\`\${e.hour}a\`:12===e.hour?"12p":e.hour-12+"p"})},e.hour))})]})}const h=Math.max(...c.map(e=>e.hours),.1);return s.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[s.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),s.jsx("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:"Last 7 days"})]}),s.jsx("div",{className:"flex items-end gap-2 h-16",children:c.map((e,t)=>{const n=h>0?e.hours/h*100:0,r=e.date===a;return s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[s.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:s.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[s.jsx("span",{className:"font-bold",children:e.date}),s.jsxs("span",{className:"text-accent",children:[e.hours.toFixed(1),"h active"]}),s.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),s.jsx(Vl.div,{initial:{height:0},animate:{height:\`\${Math.max(n,e.hours>0?8:0)}%\`},transition:{delay:.05*t,duration:.5},className:"w-full rounded-t-md cursor-pointer transition-all duration-300 group-hover:scale-x-110 origin-bottom "+(r?"ring-2 ring-accent ring-offset-2 ring-offset-bg-base":""),style:{minHeight:e.hours>0?"4px":"0px",backgroundColor:r?"var(--color-accent-bright)":e.hours>0?\`rgba(99, 102, 241, \${.4+e.hours/h*.6})\`:"var(--color-bg-surface-2)"},onClick:()=>i?.(e.date)})]},e.date)})}),s.jsx("div",{className:"flex gap-2 mt-2 border-t border-border/30 pt-2",children:c.map(e=>s.jsx("div",{className:"flex-1 text-center",children:s.jsx("span",{className:"text-[10px] text-text-muted font-bold uppercase tracking-tighter",children:new Date(e.date+"T12:00:00").toLocaleDateString([],{weekday:"short"})})},e.date))})]})}function au(e){if(!e)return"Never synced";const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"Just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;return\`\${Math.floor(r/24)}d ago\`}function ou({config:e,onRefresh:t}){const[n,r]=f.useState(""),[i,a]=f.useState(""),[o,l]=f.useState("email"),[u,c]=f.useState(!1),[d,h]=f.useState(null);if(!e)return null;if(e.authenticated){const n=async()=>{c(!0),h(null);try{const e=await _("/api/local/sync");e.success?(h("Synced!"),t(),setTimeout(()=>h(null),3e3)):h(e.error??"Sync failed")}catch(e){h(e.message)}finally{c(!1)}};return s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 p-4 mt-12 bg-bg-surface-1/50 rounded-2xl border border-border/50 backdrop-blur-sm",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/10 flex items-center justify-center border border-accent/20",children:s.jsx(se,{className:"w-4 h-4 text-accent"})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-xs font-bold text-text-primary",children:e.email}),s.jsxs("span",{className:"text-[10px] text-text-muted font-mono uppercase tracking-tighter",children:["Last sync: ",au(e.last_sync_at)]})]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[d&&s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest "+("Synced!"===d?"text-success":"text-error"),children:d}),s.jsxs("button",{onClick:n,disabled:u,className:"group flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent-bright text-white text-xs font-bold rounded-lg transition-all duration-300 shadow-lg shadow-accent/20 disabled:opacity-50 cursor-pointer overflow-hidden relative",children:[s.jsx(ie,{className:"w-3.5 h-3.5 "+(u?"animate-spin":"group-hover:rotate-180 transition-transform duration-500")}),u?"Syncing...":"Sync Now"]})]})]})}const p=f.useCallback(async()=>{if(n.includes("@")){c(!0),h(null);try{await function(e){return _("/api/local/auth/send-otp",{email:e})}(n),l("otp")}catch(e){h(e.message)}finally{c(!1)}}},[n]),m=f.useCallback(async()=>{if(/^\\d{6}$/.test(i)){c(!0),h(null);try{await function(e,t){return _("/api/local/auth/verify-otp",{email:e,code:t})}(n,i),t()}catch(e){h(e.message)}finally{c(!1)}}},[n,i,t]);return s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 p-4 mt-12 bg-bg-surface-1/50 rounded-2xl border border-border/50 backdrop-blur-sm",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-bg-surface-2 flex items-center justify-center border border-border",children:s.jsx(oe,{className:"w-4 h-4 text-text-muted"})}),s.jsx("span",{className:"text-xs font-bold text-text-secondary uppercase tracking-widest",children:"Sign in to sync"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[d&&s.jsx("span",{className:"text-[10px] font-bold text-error uppercase tracking-widest mr-2",children:d}),"email"===o?s.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[s.jsx("div",{className:"pl-3 py-2",children:s.jsx(te,{className:"w-3.5 h-3.5 text-text-muted"})}),s.jsx("input",{type:"email",placeholder:"you@email.com",value:n,onChange:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&p(),className:"px-3 py-2 text-xs bg-transparent text-text-primary outline-none w-40 placeholder:text-text-muted/50"}),s.jsx("button",{onClick:p,disabled:u||!n.includes("@"),className:"px-4 py-2 bg-bg-surface-2 hover:bg-bg-surface-3 text-text-primary text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer border-l border-border",children:u?"...":"Send"})]}):s.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[s.jsx("input",{type:"text",maxLength:6,placeholder:"000000",inputMode:"numeric",autoComplete:"one-time-code",value:i,onChange:e=>a(e.target.value),onKeyDown:e=>"Enter"===e.key&&m(),autoFocus:!0,className:"px-4 py-2 text-xs bg-transparent text-text-primary text-center font-mono tracking-widest outline-none w-32 placeholder:text-text-muted/50"}),s.jsx("button",{onClick:m,disabled:u||6!==i.length,className:"px-4 py-2 bg-accent hover:bg-accent-bright text-white text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer",children:u?"...":"Verify"})]})]})]})}var su=N();const lu={"15m":{visibleDuration:9e5,majorTickInterval:3e5,minorTickInterval:6e4,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"30m":{visibleDuration:18e5,majorTickInterval:6e5,minorTickInterval:12e4,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"1h":{visibleDuration:36e5,majorTickInterval:9e5,minorTickInterval:3e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"12h":{visibleDuration:432e5,majorTickInterval:72e5,minorTickInterval:18e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"24h":{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}};function uu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function cu({value:e,onChange:t,scale:n,sessions:r=[],milestones:i=[]}){const a=f.useRef(null),[o,l]=f.useState(0);f.useEffect(()=>{if(!a.current)return;const e=new ResizeObserver(e=>{for(const t of e)l(t.contentRect.width)});return e.observe(a.current),l(a.current.getBoundingClientRect().width),()=>e.disconnect()},[]);const u=lu[n],c=o>0?o/u.visibleDuration:0,[d,h]=f.useState(!1),p=f.useRef(0),m=f.useCallback(e=>{h(!0),p.current=e.clientX,e.currentTarget.setPointerCapture(e.pointerId)},[]),g=f.useCallback(n=>{if(!d||0===c)return;const r=n.clientX-p.current;p.current=n.clientX,t(e+-r/c)},[d,c,e,t]),y=f.useCallback(()=>{h(!1)},[]),v=f.useMemo(()=>{if(!o||0===c)return[];const t=u.visibleDuration/2,n=e+t,r=e-t-u.majorTickInterval,i=n+u.majorTickInterval,a=[];for(let o=Math.ceil(r/u.majorTickInterval)*u.majorTickInterval;o<=i;o+=u.majorTickInterval)a.push({type:"major",time:o,position:(o-e)*c,label:u.labelFormat(new Date(o))});for(let o=Math.ceil(r/u.minorTickInterval)*u.minorTickInterval;o<=i;o+=u.minorTickInterval)o%u.majorTickInterval!==0&&a.push({type:"minor",time:o,position:(o-e)*c});return a},[e,o,c,u]),b=f.useMemo(()=>r.map(e=>({session:e,start:new Date(e.started_at).getTime(),end:new Date(e.ended_at).getTime()})),[r]),x=f.useMemo(()=>{if(!o||0===c)return[];const t=u.visibleDuration/2,n=e-t,r=e+t;return b.filter(e=>e.start<=r&&e.end>=n).map(t=>({session:t.session,leftOffset:(Math.max(t.start,n)-e)*c,width:(Math.min(t.end,r)-Math.max(t.start,n))*c}))},[b,e,o,c,u]),w=f.useMemo(()=>i.map(e=>({milestone:e,time:new Date(e.created_at).getTime()})).sort((e,t)=>e.time-t.time),[i]),k=f.useMemo(()=>{if(!o||0===c||!w.length)return[];const t=u.visibleDuration/2,n=e-t,r=e+t;let i=0,a=w.length;for(;i<a;){const e=i+a>>1;w[e].time<n?i=e+1:a=e}const s=i;for(a=w.length;i<a;){const e=i+a>>1;w[e].time<=r?i=e+1:a=e}const l=i,d=[];for(let o=s;o<l;o++){const t=w[o];d.push({...t,offset:(t.time-e)*c})}return d},[w,e,o,c,u]),[S,E]=f.useState(null),T=f.useRef(e);return f.useEffect(()=>{S&&Math.abs(e-T.current)>1e3&&E(null),T.current=e},[e,S]),s.jsxs("div",{className:"relative h-20",children:[s.jsxs("div",{className:"absolute inset-0 bg-transparent border-t border-border/50 overflow-hidden select-none touch-none cursor-grab active:cursor-grabbing",ref:a,onPointerDown:m,onPointerMove:g,onPointerUp:y,style:{touchAction:"none"},children:[s.jsxs("div",{className:"absolute left-1/2 top-0 bottom-0 w-[2px] bg-accent z-30 -translate-x-1/2 shadow-[0_0_15px_rgba(99,102,241,0.5)]",children:[s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-3 h-3 bg-accent rounded-b-full"}),s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-3 h-3 bg-accent rounded-t-full"})]}),s.jsxs("div",{className:"absolute inset-0 left-1/2 top-0 bottom-0 pointer-events-none",children:[v.map(e=>s.jsx("div",{className:"absolute top-0 border-l "+("major"===e.type?"border-border/60":"border-border/30"),style:{left:e.position,height:"major"===e.type?"100%":"35%",bottom:0},children:"major"===e.type&&e.label&&s.jsx("span",{className:"absolute top-3 left-2 text-[9px] font-bold text-text-muted uppercase tracking-wider whitespace-nowrap bg-bg-surface-1/80 px-1 py-0.5 rounded",children:e.label})},e.time)),x.map(e=>s.jsx("div",{className:"absolute bottom-0 rounded-t-md pointer-events-auto cursor-pointer transition-opacity hover:opacity-80",style:{left:e.leftOffset,width:Math.max(e.width,3),height:"45%",backgroundColor:"rgba(99, 102, 241, 0.15)",borderTop:"2px solid rgba(99, 102, 241, 0.5)",boxShadow:"inset 0 1px 10px rgba(99, 102, 241, 0.05)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();E({type:"session",data:e.session,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>E(null)},e.session.session_id)),k.map((e,n)=>s.jsx("div",{className:"absolute bottom-3 pointer-events-auto cursor-pointer z-40 transition-transform hover:scale-125",style:{left:e.offset,transform:"translateX(-50%)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();E({type:"milestone",data:e.milestone,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>E(null),onClick:n=>{n.stopPropagation(),t(e.time)},children:s.jsx("div",{className:"w-3.5 h-3.5 rounded-full border-2 border-bg-surface-1 shadow-lg",style:{backgroundColor:Wl[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${Wl[e.milestone.category]}50\`}})},n))]})]}),S&&su.createPortal(s.jsx("div",{className:"fixed z-[9999] pointer-events-none",style:{left:S.x,top:S.y,transform:"translate(-50%, -100%)"},children:s.jsxs("div",{className:"mb-3 bg-bg-surface-3/95 backdrop-blur-md text-text-primary rounded-xl shadow-2xl px-3 py-2.5 text-[11px] min-w-[180px] max-w-[280px] border border-border/50 animate-in fade-in zoom-in-95 duration-200",children:["session"===S.type?s.jsx(du,{session:S.data}):s.jsx(fu,{milestone:S.data}),s.jsx("div",{className:"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-bg-surface-3/95 border-r border-b border-border/50 rotate-45"})]})}),document.body)]})}function du({session:e}){const t=$l[e.client]??e.client;return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-bold text-xs text-accent uppercase tracking-widest",children:t}),s.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:uu(e.duration_seconds)})]}),s.jsx("div",{className:"h-px bg-border/50 my-0.5"}),s.jsx("div",{className:"text-text-primary font-medium",children:e.project||"Untitled Project"}),s.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function fu({milestone:e}){const t=e.private_title??e.title;return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-bold text-[10px] uppercase tracking-widest",style:{color:Wl[e.category]??"#9c9588"},children:e.category}),e.complexity&&s.jsx("span",{className:"text-[9px] font-mono text-text-muted font-bold border border-border/50 px-1 rounded uppercase",children:e.complexity})]}),s.jsx("div",{className:"h-px bg-border/50 my-0.5"}),s.jsx("div",{className:"font-bold text-xs break-words text-text-primary",children:t}),e.private_title&&s.jsxs("div",{className:"text-[10px] text-text-muted italic opacity-70",children:["Public: ",e.title]})]})}const hu={"15m":9e5,"30m":18e5,"1h":36e5,"12h":432e5,"24h":864e5},pu={"15m":"15 Minutes","30m":"30 Minutes","1h":"1 Hour","12h":"12 Hours","24h":"24 Hours"};function mu(e,t){const n=e.trim();if(!n)return null;const r=new Date(t),i=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*(AM|PM)$/i);if(i){let e=parseInt(i[1],10);const t=parseInt(i[2],10),n=i[3]?parseInt(i[3],10):0,a=i[4].toUpperCase();return e<1||e>12||t>59||n>59?null:("AM"===a&&12===e&&(e=0),"PM"===a&&12!==e&&(e+=12),r.setHours(e,t,n,0),r.getTime())}const a=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/);if(a){const e=parseInt(a[1],10),t=parseInt(a[2],10),n=a[3]?parseInt(a[3],10):0;return e>23||t>59||n>59?null:(r.setHours(e,t,n,0),r.getTime())}return null}const gu=["15m","30m","1h","12h","24h"];function yu({value:e,onChange:t,scale:n,onScaleChange:r,sessions:i,milestones:a}){const o=null===e,[l,u]=f.useState(Date.now());f.useEffect(()=>{if(!o)return;const e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[o]);const c=o?l:e,[d,h]=f.useState(!1),[p,m]=f.useState(""),g=f.useRef(null),y=f.useRef(!1),v=f.useRef(""),b=f.useRef(!1),x=f.useRef(0),w=f.useCallback(e=>{const n=Date.now();if(e>=n-2e3)return b.current=!0,x.current=n,void t(null);b.current&&n-x.current<300||b.current&&e>=n-1e4?t(null):(b.current=!1,t(e))},[t]),k=e=>{const n=c,r=Math.min(n+e,Date.now());t(r)},S=()=>{y.current=o,t(c);const e=new Date(c).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});v.current=e,m(e),h(!0),requestAnimationFrame(()=>g.current?.select())},E=()=>{if(h(!1),y.current&&p===v.current)return void t(null);const e=mu(p,c);null!==e&&t(Math.min(e,Date.now()))};return s.jsxs("div",{className:"flex flex-col bg-bg-surface-1/40 border border-border/50 rounded-2xl overflow-hidden mb-8 shadow-xl backdrop-blur-md",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between px-6 py-5 border-b border-border/50 gap-6",children:[s.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2 h-8",children:[d?s.jsx("input",{ref:g,type:"text",value:p,onChange:e=>m(e.target.value),onBlur:E,onKeyDown:e=>{if("Enter"===e.key)return void E();if("Escape"===e.key)return e.preventDefault(),h(!1),void(y.current&&t(null));if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const n=g.current;if(!n)return;const r=n.selectionStart??0,i="ArrowUp"===e.key?1:-1,a=mu(p,c);if(null===a)return;const o=p.indexOf(":"),s=p.indexOf(":",o+1),l=p.lastIndexOf(" ");let u;u=r<=o?36e5*i:s>-1&&r<=s?6e4*i:l>-1&&r<=l?1e3*i:12*i*36e5;const d=Math.min(a+u,Date.now()),f=new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});m(f),t(d),requestAnimationFrame(()=>{n&&n.setSelectionRange(r,r)})},className:"text-2xl font-mono font-bold tracking-tight bg-bg-surface-2 border border-accent rounded-lg px-2 -ml-2 w-[165px] outline-none text-text-primary shadow-[0_0_10px_rgba(99,102,241,0.2)]"}):s.jsxs("button",{onClick:S,className:"group flex items-center gap-2 hover:bg-bg-surface-2/50 rounded-lg px-2 -ml-2 py-1 transition-all cursor-text",title:"Click to edit time",children:[s.jsx(Q,{className:"w-5 h-5 "+(o?"text-text-muted":"text-accent")}),s.jsx("span",{className:"text-2xl font-mono font-bold tracking-tight tabular-nums "+(o?"text-text-primary":"text-accent"),children:new Date(c).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),s.jsx("button",{onClick:d?E:S,className:"p-1.5 rounded-lg transition-colors flex-shrink-0 "+(d?"bg-accent text-white hover:bg-accent-bright":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:d?"Confirm time":"Edit time",children:s.jsx(re,{className:"w-3.5 h-3.5"})})]}),o?s.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 text-[10px] font-bold uppercase tracking-widest bg-success/10 text-success rounded-full border border-success/20 shadow-[0_0_10px_rgba(16,185,129,0.1)]",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-success animate-pulse"}),"Live"]}):s.jsx("div",{className:"flex items-center gap-1.5 px-2.5 py-1 text-[10px] font-bold uppercase tracking-widest bg-accent/10 text-accent rounded-full border border-accent/20",children:"History"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary font-medium px-0.5",children:[s.jsx(q,{className:"w-3.5 h-3.5 text-text-muted"}),new Date(c).toLocaleDateString([],{weekday:"short",month:"long",day:"numeric",year:"numeric"})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[s.jsx("div",{className:"flex items-center bg-bg-surface-2/50 border border-border/50 rounded-xl p-1 shadow-inner",children:gu.map(e=>s.jsx("button",{onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(n===e?"bg-accent text-white shadow-lg shadow-accent/20":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:pu[e],children:e},e))}),s.jsxs("div",{className:"flex items-center gap-2",children:[!o&&s.jsxs("button",{onClick:()=>t(null),className:"group flex items-center gap-2 px-4 py-2 text-[10px] font-bold uppercase tracking-widest bg-accent/10 hover:bg-accent text-accent hover:text-white rounded-xl transition-all border border-accent/20",children:[s.jsx(ae,{className:"w-3.5 h-3.5 group-hover:-rotate-90 transition-transform duration-500"}),"Live"]}),s.jsxs("div",{className:"flex items-center gap-1 bg-bg-surface-2/50 border border-border/50 rounded-xl p-1",children:[s.jsx("button",{onClick:()=>k(-hu[n]),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:\`Back \${pu[n]}\`,children:s.jsx(X,{className:"w-4 h-4"})}),s.jsx("button",{onClick:()=>k(hu[n]),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors disabled:opacity-20 disabled:cursor-not-allowed",title:\`Forward \${pu[n]}\`,disabled:o||c>=Date.now()-1e3,children:s.jsx(K,{className:"w-4 h-4"})})]})]})]})]}),s.jsx(cu,{value:c,onChange:w,scale:n,sessions:i,milestones:a})]})}function vu(){const{sessions:e,milestones:t,config:n,health:r,loading:i,timeTravelTime:a,timeScale:o,filters:l,loadAll:u,loadHealth:c,setTimeTravelTime:d,setTimeScale:h,setFilter:p}=O();f.useEffect(()=>{u(),c()},[u,c]),f.useEffect(()=>{const e=setInterval(c,3e4);if(null!==a)return()=>clearInterval(e);const t=setInterval(u,3e4);return()=>{clearInterval(e),clearInterval(t)}},[a,u,c]);const m=null===a,g=a??Date.now(),y=z[o]/2,v=g-y,b=g+y,x=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=new Date(e.started_at).getTime(),i=new Date(e.ended_at).getTime();return r<=n&&i>=t})}(e,v,b),[e,v,b]),w=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(t,v,b),[t,v,b]),k=f.useMemo(()=>function(e){let t=0,n=0;const r={},i={},a={},o={};for(const s of e){t+=s.duration_seconds,n+=s.files_touched,r[s.client]=(r[s.client]??0)+s.duration_seconds;for(const e of s.languages)i[e]=(i[e]??0)+s.duration_seconds;a[s.task_type]=(a[s.task_type]??0)+s.duration_seconds,s.project&&(o[s.project]=(o[s.project]??0)+s.duration_seconds)}return{totalHours:t/3600,totalSessions:e.length,currentStreak:V(e),filesTouched:n,byClient:r,byLanguage:i,byTaskType:a,byProject:o}}(x),[x]),S=f.useMemo(()=>function(e,t,n){if(n)return"Live";const r=new Date((e+t)/2),i=new Date,a=new Date(Date.now()-864e5);return r.toDateString()===i.toDateString()?"Today":r.toDateString()===a.toDateString()?"Yesterday":r.toLocaleDateString([],{month:"short",day:"numeric"})}(v,b,m),[v,b,m]),E=f.useMemo(()=>{if(!m)return new Date(g).toISOString().slice(0,10)},[m,g]);return i?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"text-text-muted text-sm",children:"Loading..."})}):s.jsx("div",{className:"min-h-screen bg-bg-base selection:bg-accent/30 selection:text-text-primary",children:s.jsxs("div",{className:"max-w-[1000px] mx-auto px-6 py-10",children:[s.jsx(ue,{health:r,timeContextLabel:S}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(yu,{value:a,onChange:d,scale:o,onScaleChange:h,sessions:e,milestones:t}),s.jsx(Bl,{totalHours:k.totalHours,totalSessions:k.totalSessions,currentStreak:k.currentStreak,filesTouched:k.filesTouched}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-8",children:s.jsxs("div",{children:[s.jsx(Kl,{stats:k}),s.jsx(Gl,{sessions:x,filters:l,onFilterChange:p}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between px-1",children:[s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Activity Feed"}),s.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[x.length," Sessions"]})]}),s.jsx(ru,{sessions:x,milestones:w,filters:l})]})]})}),s.jsx("div",{className:"mt-12",children:s.jsx(iu,{sessions:e,timeScale:o,effectiveTime:g,isLive:m,onDayClick:e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();d(t),h("24h")},highlightDate:E})}),s.jsx(ou,{config:n,onRefresh:u})]})]})})}M.createRoot(document.getElementById("root")).render(s.jsx(f.StrictMode,{children:s.jsx(vu,{})}));</script>
1915
+ <style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:"Geist Mono","JetBrains Mono","SF Mono","Fira Code",ui-monospace,monospace;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-body:"Inter",system-ui,-apple-system,sans-serif;--color-bg-base:#09090b;--color-bg-surface-1:#18181b;--color-bg-surface-2:#27272a;--color-bg-surface-3:#3f3f46;--color-text-primary:#fafafa;--color-text-secondary:#a1a1aa;--color-text-muted:#71717a;--color-accent:#6366f1;--color-accent-bright:#818cf8;--color-accent-dim:#3730a3;--color-border:#27272a;--color-border-accent:#6366f133;--color-success:#10b981;--color-error:#ef4444;--color-blue:#3b82f6;--color-purple:#8b5cf6}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.-top-10{top:calc(var(--spacing)*-10)}.top-0{top:calc(var(--spacing)*0)}.top-3{top:calc(var(--spacing)*3)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-3{bottom:calc(var(--spacing)*3)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-12{margin-top:calc(var(--spacing)*12)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-32{width:calc(var(--spacing)*32)}.w-40{width:calc(var(--spacing)*40)}.w-\\[2px\\]{width:2px}.w-\\[165px\\]{width:165px}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1000px\\]{max-width:1000px}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[45px\\]{min-width:45px}.min-w-\\[140px\\]{min-width:140px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.origin-bottom{transform-origin:bottom}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-\\[3px\\]{gap:3px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-full{border-top-left-radius:3.40282e38px;border-top-right-radius:3.40282e38px}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.rounded-b-full{border-bottom-right-radius:3.40282e38px;border-bottom-left-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent{border-color:var(--color-accent)}.border-accent\\/10{border-color:#6366f11a}@supports (color:color-mix(in lab,red,red)){.border-accent\\/10{border-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.border-accent\\/20{border-color:#6366f133}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,transparent)}}.border-bg-surface-1{border-color:var(--color-bg-surface-1)}.border-blue\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-blue\\/20{border-color:color-mix(in oklab,var(--color-blue)20%,transparent)}}.border-border{border-color:var(--color-border)}.border-border-accent{border-color:var(--color-border-accent)}.border-border\\/30{border-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.border-border\\/30{border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.border-border\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-border\\/50{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.border-border\\/60{border-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.border-border\\/60{border-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.border-error\\/20{border-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.border-error\\/20{border-color:color-mix(in oklab,var(--color-error)20%,transparent)}}.border-purple\\/20{border-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.border-purple\\/20{border-color:color-mix(in oklab,var(--color-purple)20%,transparent)}}.border-success\\/20{border-color:#10b98133}@supports (color:color-mix(in lab,red,red)){.border-success\\/20{border-color:color-mix(in oklab,var(--color-success)20%,transparent)}}.border-text-muted\\/20{border-color:#71717a33}@supports (color:color-mix(in lab,red,red)){.border-text-muted\\/20{border-color:color-mix(in oklab,var(--color-text-muted)20%,transparent)}}.border-transparent{border-color:#0000}.bg-accent{background-color:var(--color-accent)}.bg-accent\\/5{background-color:#6366f10d}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/5{background-color:color-mix(in oklab,var(--color-accent)5%,transparent)}}.bg-accent\\/10{background-color:#6366f11a}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-bg-base{background-color:var(--color-bg-base)}.bg-bg-surface-1{background-color:var(--color-bg-surface-1)}.bg-bg-surface-1\\/30{background-color:#18181b4d}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-1)30%,transparent)}}.bg-bg-surface-1\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/40{background-color:color-mix(in oklab,var(--color-bg-surface-1)40%,transparent)}}.bg-bg-surface-1\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-1)50%,transparent)}}.bg-bg-surface-1\\/80{background-color:#18181bcc}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/80{background-color:color-mix(in oklab,var(--color-bg-surface-1)80%,transparent)}}.bg-bg-surface-2{background-color:var(--color-bg-surface-2)}.bg-bg-surface-2\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.bg-bg-surface-3{background-color:var(--color-bg-surface-3)}.bg-bg-surface-3\\/95{background-color:#3f3f46f2}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-3\\/95{background-color:color-mix(in oklab,var(--color-bg-surface-3)95%,transparent)}}.bg-blue\\/10{background-color:#3b82f61a}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/10{background-color:color-mix(in oklab,var(--color-blue)10%,transparent)}}.bg-border\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.bg-error\\/10{background-color:#ef44441a}@supports (color:color-mix(in lab,red,red)){.bg-error\\/10{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.bg-purple\\/10{background-color:#8b5cf61a}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/10{background-color:color-mix(in oklab,var(--color-purple)10%,transparent)}}.bg-success{background-color:var(--color-success)}.bg-success\\/10{background-color:#10b9811a}@supports (color:color-mix(in lab,red,red)){.bg-success\\/10{background-color:color-mix(in oklab,var(--color-success)10%,transparent)}}.bg-text-muted\\/10{background-color:#71717a1a}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/10{background-color:color-mix(in oklab,var(--color-text-muted)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white\\/10{--tw-gradient-to:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.to-white\\/10{--tw-gradient-to:color-mix(in oklab,var(--color-white)10%,transparent)}}.to-white\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-3{padding-left:calc(var(--spacing)*3)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-accent{color:var(--color-accent)}.text-accent-dim{color:var(--color-accent-dim)}.text-blue{color:var(--color-blue)}.text-error{color:var(--color-error)}.text-purple{color:var(--color-purple)}.text-success{color:var(--color-success)}.text-text-muted{color:var(--color-text-muted)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_currentColor\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_10px_rgba\\(16\\,185\\,129\\,0\\.1\\)\\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#10b9811a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_10px_rgba\\(99\\,102\\,241\\,0\\.2\\)\\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#6366f133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_15px_rgba\\(99\\,102\\,241\\,0\\.4\\)\\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#6366f166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_15px_rgba\\(99\\,102\\,241\\,0\\.5\\)\\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#6366f180);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_10px_rgba\\(99\\,102\\,241\\,0\\.4\\)\\]{--tw-shadow:0 2px 10px var(--tw-shadow-color,#6366f166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_4px_20px_rgba\\(0\\,0\\,0\\,0\\.2\\)\\]{--tw-shadow:0 4px 20px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-accent\\/20{--tw-shadow-color:#6366f133}@supports (color:color-mix(in lab,red,red)){.shadow-accent\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-accent)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-accent{--tw-ring-color:var(--color-accent)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bg-base{--tw-ring-offset-color:var(--color-bg-base)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:scale-x-110:is(:where(.group):hover *){--tw-scale-x:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:-rotate-90:is(:where(.group):hover *){rotate:-90deg}.group-hover\\:rotate-180:is(:where(.group):hover *){rotate:180deg}.group-hover\\:bg-accent:is(:where(.group):hover *){background-color:var(--color-accent)}.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:#6366f11a}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.group-hover\\:text-accent:is(:where(.group):hover *){color:var(--color-accent)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:#6366f14d}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30 ::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:bg-accent\\/30::selection{background-color:#6366f14d}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:text-text-primary ::selection{color:var(--color-text-primary)}.selection\\:text-text-primary::selection{color:var(--color-text-primary)}.placeholder\\:text-text-muted\\/50::placeholder{color:#71717a80}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.focus-within\\:border-accent\\/50:focus-within{border-color:#6366f180}@supports (color:color-mix(in lab,red,red)){.focus-within\\:border-accent\\/50:focus-within{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:#6366f180}@supports (color:color-mix(in lab,red,red)){.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}@media(hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-accent\\/30:hover{border-color:#6366f14d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/30:hover{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.hover\\:border-accent\\/40:hover{border-color:#6366f166}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/40:hover{border-color:color-mix(in oklab,var(--color-accent)40%,transparent)}}.hover\\:border-border-accent:hover{border-color:var(--color-border-accent)}.hover\\:border-border\\/50:hover{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:border-border\\/50:hover{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.hover\\:border-text-muted\\/50:hover{border-color:#71717a80}@supports (color:color-mix(in lab,red,red)){.hover\\:border-text-muted\\/50:hover{border-color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.hover\\:bg-accent:hover{background-color:var(--color-accent)}.hover\\:bg-accent-bright:hover{background-color:var(--color-accent-bright)}.hover\\:bg-bg-surface-1\\/60:hover{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-1\\/60:hover{background-color:color-mix(in oklab,var(--color-bg-surface-1)60%,transparent)}}.hover\\:bg-bg-surface-2:hover{background-color:var(--color-bg-surface-2)}.hover\\:bg-bg-surface-2\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/50:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.hover\\:bg-bg-surface-3:hover{background-color:var(--color-bg-surface-3)}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:flex{display:flex}.sm\\:flex-row{flex-direction:row}}@media(min-width:48rem){.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}}::selection{color:var(--color-text-primary);background:#6366f14d}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-bg-surface-3);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}body{font-family:var(--font-body);background:var(--color-bg-base);color:var(--color-text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-height:100vh;margin:0;line-height:1.6}.glass-card{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#18181bb3;border:1px solid #ffffff0d;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.subtle-glow{position:relative}.subtle-glow:after{content:"";border-radius:inherit;z-index:-1;pointer-events:none;background:linear-gradient(45deg,#0000,#6366f11a,#0000);position:absolute;inset:-1px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}</style>
2274
1916
  </head>
2275
1917
  <body>
2276
1918
  <div id="root"></div>
@@ -2331,8 +1973,8 @@ function handleLocalSessions(_req, res) {
2331
1973
  try {
2332
1974
  const sessions2 = readJson(SESSIONS_FILE, []);
2333
1975
  json(res, 200, sessions2);
2334
- } catch (err2) {
2335
- json(res, 500, { error: err2.message });
1976
+ } catch (err) {
1977
+ json(res, 500, { error: err.message });
2336
1978
  }
2337
1979
  }
2338
1980
  function handleLocalStats(_req, res) {
@@ -2361,16 +2003,16 @@ function handleLocalStats(_req, res) {
2361
2003
  byLanguage,
2362
2004
  byTaskType
2363
2005
  });
2364
- } catch (err2) {
2365
- json(res, 500, { error: err2.message });
2006
+ } catch (err) {
2007
+ json(res, 500, { error: err.message });
2366
2008
  }
2367
2009
  }
2368
2010
  function handleLocalMilestones(_req, res) {
2369
2011
  try {
2370
2012
  const milestones = readJson(MILESTONES_FILE, []);
2371
2013
  json(res, 200, milestones);
2372
- } catch (err2) {
2373
- json(res, 500, { error: err2.message });
2014
+ } catch (err) {
2015
+ json(res, 500, { error: err.message });
2374
2016
  }
2375
2017
  }
2376
2018
  function handleLocalConfig(_req, res) {
@@ -2387,8 +2029,8 @@ function handleLocalConfig(_req, res) {
2387
2029
  last_sync_at: config.last_sync_at ?? null,
2388
2030
  auto_sync: config.auto_sync
2389
2031
  });
2390
- } catch (err2) {
2391
- json(res, 500, { error: err2.message });
2032
+ } catch (err) {
2033
+ json(res, 500, { error: err.message });
2392
2034
  }
2393
2035
  }
2394
2036
  async function handleLocalSync(req, res) {
@@ -2434,8 +2076,8 @@ async function handleLocalSync(req, res) {
2434
2076
  config.last_sync_at = now;
2435
2077
  writeJson(CONFIG_FILE, config);
2436
2078
  json(res, 200, { success: true, last_sync_at: now });
2437
- } catch (err2) {
2438
- json(res, 500, { success: false, error: err2.message });
2079
+ } catch (err) {
2080
+ json(res, 500, { success: false, error: err.message });
2439
2081
  }
2440
2082
  }
2441
2083
  async function handleLocalSendOtp(req, res) {
@@ -2453,8 +2095,8 @@ async function handleLocalSendOtp(req, res) {
2453
2095
  return;
2454
2096
  }
2455
2097
  json(res, 200, data);
2456
- } catch (err2) {
2457
- json(res, 500, { error: err2.message });
2098
+ } catch (err) {
2099
+ json(res, 500, { error: err.message });
2458
2100
  }
2459
2101
  }
2460
2102
  async function handleLocalVerifyOtp(req, res) {
@@ -2488,8 +2130,8 @@ async function handleLocalVerifyOtp(req, res) {
2488
2130
  writeJson(CONFIG_FILE, config);
2489
2131
  }
2490
2132
  json(res, 200, { success: true, email: data.user?.email, username: data.user?.username });
2491
- } catch (err2) {
2492
- json(res, 500, { error: err2.message });
2133
+ } catch (err) {
2134
+ json(res, 500, { error: err.message });
2493
2135
  }
2494
2136
  }
2495
2137
  var USEAI_API;
@@ -2508,7 +2150,7 @@ __export(daemon_exports, {
2508
2150
  });
2509
2151
  import { createServer } from "http";
2510
2152
  import { createHash as createHash4, randomUUID as randomUUID4 } from "crypto";
2511
- import { existsSync as existsSync9, readdirSync, readFileSync as readFileSync5, appendFileSync as appendFileSync2, renameSync as renameSync3, writeFileSync as writeFileSync5, unlinkSync as unlinkSync5 } from "fs";
2153
+ import { existsSync as existsSync8, readdirSync, readFileSync as readFileSync4, appendFileSync as appendFileSync2, renameSync as renameSync3, writeFileSync as writeFileSync4, unlinkSync as unlinkSync4 } from "fs";
2512
2154
  import { join as join7 } from "path";
2513
2155
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2514
2156
  import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
@@ -2522,9 +2164,9 @@ function getActiveUseaiSessionIds() {
2522
2164
  }
2523
2165
  function sealOrphanFile(sessionId) {
2524
2166
  const filePath = join7(ACTIVE_DIR, `${sessionId}.jsonl`);
2525
- if (!existsSync9(filePath)) return;
2167
+ if (!existsSync8(filePath)) return;
2526
2168
  try {
2527
- const content = readFileSync5(filePath, "utf-8").trim();
2169
+ const content = readFileSync4(filePath, "utf-8").trim();
2528
2170
  if (!content) return;
2529
2171
  const lines = content.split("\n").filter(Boolean);
2530
2172
  if (lines.length === 0) return;
@@ -2610,7 +2252,7 @@ function sealOrphanFile(sessionId) {
2610
2252
  }
2611
2253
  }
2612
2254
  function sealOrphanedSessions() {
2613
- if (!existsSync9(ACTIVE_DIR)) return;
2255
+ if (!existsSync8(ACTIVE_DIR)) return;
2614
2256
  const activeIds = getActiveUseaiSessionIds();
2615
2257
  let sealed = 0;
2616
2258
  try {
@@ -2629,7 +2271,7 @@ function sealOrphanedSessions() {
2629
2271
  }
2630
2272
  function isSessionAlreadySealed(session2) {
2631
2273
  const activePath = join7(ACTIVE_DIR, `${session2.sessionId}.jsonl`);
2632
- return !existsSync9(activePath);
2274
+ return !existsSync8(activePath);
2633
2275
  }
2634
2276
  function autoSealSession(active) {
2635
2277
  const { session: session2 } = active;
@@ -2670,7 +2312,7 @@ function autoSealSession(active) {
2670
2312
  const activePath = join7(ACTIVE_DIR, `${session2.sessionId}.jsonl`);
2671
2313
  const sealedPath = join7(SEALED_DIR, `${session2.sessionId}.jsonl`);
2672
2314
  try {
2673
- if (existsSync9(activePath)) {
2315
+ if (existsSync8(activePath)) {
2674
2316
  renameSync3(activePath, sealedPath);
2675
2317
  }
2676
2318
  } catch {
@@ -2752,7 +2394,7 @@ async function startDaemon(port) {
2752
2394
  const listenPort = port ?? DAEMON_PORT;
2753
2395
  ensureDir();
2754
2396
  try {
2755
- if (existsSync9(KEYSTORE_FILE)) {
2397
+ if (existsSync8(KEYSTORE_FILE)) {
2756
2398
  const ks = readJson(KEYSTORE_FILE, null);
2757
2399
  if (ks) daemonSigningKey = decryptKeystore(ks);
2758
2400
  }
@@ -2931,14 +2573,14 @@ async function startDaemon(port) {
2931
2573
  port: listenPort,
2932
2574
  started_at: (/* @__PURE__ */ new Date()).toISOString()
2933
2575
  });
2934
- writeFileSync5(DAEMON_PID_FILE, pidData + "\n");
2576
+ writeFileSync4(DAEMON_PID_FILE, pidData + "\n");
2935
2577
  const shutdown = async (signal) => {
2936
2578
  for (const [sid] of sessions) {
2937
2579
  await cleanupSession(sid);
2938
2580
  }
2939
2581
  try {
2940
- if (existsSync9(DAEMON_PID_FILE)) {
2941
- unlinkSync5(DAEMON_PID_FILE);
2582
+ if (existsSync8(DAEMON_PID_FILE)) {
2583
+ unlinkSync4(DAEMON_PID_FILE);
2942
2584
  }
2943
2585
  } catch {
2944
2586
  }
@@ -2972,17 +2614,14 @@ var init_daemon2 = __esm({
2972
2614
  });
2973
2615
 
2974
2616
  // src/index.ts
2975
- init_dist();
2976
- init_session_state();
2977
- init_register_tools();
2978
- import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
2979
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
2980
- if (process.argv[2] === "mcp") {
2617
+ var subcommand = process.argv[2];
2618
+ if (subcommand === "mcp" || subcommand?.startsWith("--") || !subcommand && process.stdin.isTTY) {
2619
+ const args = subcommand === "mcp" ? process.argv.slice(3) : process.argv.slice(2);
2981
2620
  const { runSetup: runSetup2 } = await Promise.resolve().then(() => (init_setup(), setup_exports));
2982
- await runSetup2(process.argv.slice(3));
2621
+ await runSetup2(args);
2983
2622
  process.exit(0);
2984
2623
  }
2985
- if (process.argv[2] === "daemon") {
2624
+ if (subcommand === "daemon") {
2986
2625
  const { startDaemon: startDaemon2 } = await Promise.resolve().then(() => (init_daemon2(), daemon_exports));
2987
2626
  const portArg = process.argv.indexOf("--port");
2988
2627
  const port = portArg !== -1 ? parseInt(process.argv[portArg + 1], 10) : void 0;
@@ -2990,14 +2629,19 @@ if (process.argv[2] === "daemon") {
2990
2629
  await new Promise(() => {
2991
2630
  });
2992
2631
  }
2993
- var session = new SessionState();
2632
+ var { McpServer: McpServer2 } = await import("@modelcontextprotocol/sdk/server/mcp.js");
2633
+ var { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
2634
+ var { VERSION: VERSION2, ensureDir: ensureDir2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
2635
+ var { SessionState: SessionState2 } = await Promise.resolve().then(() => (init_session_state(), session_state_exports));
2636
+ var { registerTools: registerTools2 } = await Promise.resolve().then(() => (init_register_tools(), register_tools_exports));
2637
+ var session = new SessionState2();
2994
2638
  var server = new McpServer2({
2995
2639
  name: "UseAI",
2996
- version: VERSION
2640
+ version: VERSION2
2997
2641
  });
2998
- registerTools(server, session);
2642
+ registerTools2(server, session);
2999
2643
  async function main() {
3000
- ensureDir();
2644
+ ensureDir2();
3001
2645
  try {
3002
2646
  session.initializeKeystore();
3003
2647
  } catch {