updates
This commit is contained in:
1 parent
7e22831d08
commit
6320296f0f
20 files changed
+1048
-240
No files matched your search
+109
-4
@@ -11,6 +11,7 @@ const configStore = require('../Structures/ConfigStore.js');
|
||||
const { reloadBot, restartDiscordBot } = require('../Structures/BotReload.js');
|
||||
const { LOG_TYPES, fetchLogs, getLogMeta } = require('../Structures/LogReader.js');
|
||||
const { evaluateAllModules } = require('../Structures/ModuleStatus.js');
|
||||
const { evaluateDashboardAlerts } = require('../Structures/DashboardAlerts.js');
|
||||
const { getBotInviteUrl } = require('../Structures/BotInvite.js');
|
||||
const notificationStore = require('../Structures/NotificationStore.js');
|
||||
const {
|
||||
@@ -70,6 +71,13 @@ const {
|
||||
const { withTimeout } = require('../Structures/asyncTimeout.js');
|
||||
const transcriptTemplate = require('../Structures/TranscriptTemplate.js');
|
||||
const transcriptStore = require('../Structures/TranscriptStore.js');
|
||||
const { refreshSlashCommands } = require('../Structures/BotReload.js');
|
||||
const {
|
||||
isSetupComplete,
|
||||
getSetupStatus,
|
||||
validateSetupPayload,
|
||||
applySetup,
|
||||
} = require('../Structures/DashboardSetup.js');
|
||||
const dashboardBranding = require('../Structures/DashboardBranding.js');
|
||||
const {
|
||||
listCatalogAddons,
|
||||
@@ -147,10 +155,12 @@ class APIServer {
|
||||
botReady: Boolean(this.client?.user) && !this.client?.__restarting,
|
||||
botRestarting: Boolean(this.client?.__restarting),
|
||||
oauthEnabled: isOAuthConfigured(this.oauth),
|
||||
setupComplete: isSetupComplete(),
|
||||
guild,
|
||||
});
|
||||
});
|
||||
|
||||
this.setupOnboardingRoutes();
|
||||
this.setupAuthRoutes();
|
||||
|
||||
this.app.get('/transcripts/:id', (req, res) => {
|
||||
@@ -242,14 +252,83 @@ class APIServer {
|
||||
});
|
||||
}
|
||||
|
||||
setupOnboardingRoutes() {
|
||||
this.app.get('/api/setup/status', (req, res) => {
|
||||
try {
|
||||
res.json({ success: true, data: getSetupStatus(req) });
|
||||
} catch (err) {
|
||||
res.status(500).json({ success: false, error: err.message });
|
||||
}
|
||||
});
|
||||
|
||||
this.app.post('/api/setup/validate', async (req, res) => {
|
||||
if (isSetupComplete()) {
|
||||
return res.status(403).json({
|
||||
success: false,
|
||||
error: 'Setup is already complete.',
|
||||
});
|
||||
}
|
||||
try {
|
||||
const data = await validateSetupPayload(req.body || {});
|
||||
res.json({ success: true, data });
|
||||
} catch (err) {
|
||||
res.status(500).json({ success: false, error: err.message });
|
||||
}
|
||||
});
|
||||
|
||||
this.app.post('/api/setup/complete', async (req, res) => {
|
||||
if (isSetupComplete()) {
|
||||
return res.status(403).json({
|
||||
success: false,
|
||||
error: 'Setup is already complete.',
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
const body = req.body || {};
|
||||
const validation = await validateSetupPayload(body);
|
||||
if (!validation.ok) {
|
||||
return res.status(400).json({
|
||||
success: false,
|
||||
error: 'Fix validation errors before saving.',
|
||||
data: validation,
|
||||
});
|
||||
}
|
||||
|
||||
applySetup(body);
|
||||
this.config = configStore.api?.API || configStore.api;
|
||||
this.oauth = this.config.OAuth || {};
|
||||
bootstrapFromOAuth(this.oauth);
|
||||
|
||||
let botRestart = { success: false, error: 'Bot client not available' };
|
||||
if (this.client) {
|
||||
try {
|
||||
botRestart = await restartDiscordBot(this.client);
|
||||
} catch (restartErr) {
|
||||
botRestart = { success: false, error: restartErr.message };
|
||||
}
|
||||
}
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
message: 'Setup saved. Restart the server for changes to take effect, then sign in with Discord.',
|
||||
data: { setupComplete: true, botRestart },
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('[API] Setup failed:', err);
|
||||
res.status(400).json({ success: false, error: err.message });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setupAuthRoutes() {
|
||||
const secret = this.config.SecretKey;
|
||||
const oauth = this.oauth;
|
||||
const apiConfig = this.config;
|
||||
|
||||
this.app.get('/api/auth/discord', (req, res) => {
|
||||
if (!isOAuthConfigured(oauth)) {
|
||||
return res.redirect('/login?error=oauth_not_configured');
|
||||
if (!isSetupComplete() || !isOAuthConfigured(oauth)) {
|
||||
return res.redirect('/setup');
|
||||
}
|
||||
|
||||
const redirectUri = resolveOAuthRedirectUri(req, oauth, apiConfig);
|
||||
@@ -262,8 +341,8 @@ class APIServer {
|
||||
});
|
||||
|
||||
this.app.get('/api/auth/discord/callback', async (req, res) => {
|
||||
if (!isOAuthConfigured(oauth)) {
|
||||
return res.redirect('/login?error=oauth_not_configured');
|
||||
if (!isSetupComplete() || !isOAuthConfigured(oauth)) {
|
||||
return res.redirect('/setup');
|
||||
}
|
||||
|
||||
const { code, state, error } = req.query;
|
||||
@@ -586,6 +665,29 @@ h1{font-size:1.25rem}a{color:#a78bfa}</style></head><body>
|
||||
}
|
||||
});
|
||||
|
||||
app.get('/alerts', p('overview'), async (req, res) => {
|
||||
try {
|
||||
const transcriptDir = path.join(__dirname, '../Data/Transcripts');
|
||||
let transcriptCount = 0;
|
||||
if (fs.existsSync(transcriptDir)) {
|
||||
transcriptCount = fs
|
||||
.readdirSync(transcriptDir)
|
||||
.filter((f) => f.endsWith('-transcript.html')).length;
|
||||
}
|
||||
|
||||
const data = await evaluateDashboardAlerts({
|
||||
client: this.client,
|
||||
configStore,
|
||||
transcriptCount,
|
||||
});
|
||||
|
||||
res.json({ success: true, data });
|
||||
} catch (err) {
|
||||
console.error('[API] Error fetching alerts:', err);
|
||||
res.status(500).json({ success: false, error: err.message });
|
||||
}
|
||||
});
|
||||
|
||||
app.get('/guild/resources', (req, res, next) => {
|
||||
if (req.dashboardService) return next();
|
||||
const canAny = CONFIG_FILES.some((f) =>
|
||||
@@ -609,6 +711,9 @@ h1{font-size:1.25rem}a{color:#a78bfa}</style></head><body>
|
||||
error: 'Bot is not connected.',
|
||||
});
|
||||
}
|
||||
if (req.query.refresh === '1') {
|
||||
clearGuildResourcesCache();
|
||||
}
|
||||
const data = await fetchGuildResources(this.client);
|
||||
if (!data) {
|
||||
return res.status(400).json({
|
||||
|
||||
@@ -54,7 +54,7 @@ module.exports = new Command({
|
||||
iconURL: interaction.user.displayAvatarURL(),
|
||||
});
|
||||
|
||||
interaction.reply({
|
||||
await interaction.reply({
|
||||
flags: Discord.MessageFlags.Ephemeral,
|
||||
embeds: [HelpEmbed1],
|
||||
});
|
||||
|
||||
@@ -17,15 +17,13 @@ module.exports = new Command({
|
||||
permissions: cmdconfig.Ping.Permission,
|
||||
|
||||
async run(interaction) {
|
||||
let disableCommand = true;
|
||||
|
||||
const PingEmbed = new Discord.EmbedBuilder()
|
||||
.setDescription(
|
||||
`:ping_pong: **Ping:** \`${interaction.client.ws.ping} ms\``
|
||||
`:ping_pong: **Ping:** \`${interaction.client.ws.ping} ms\``,
|
||||
)
|
||||
.setColor(supportbot.Embed.Colours.General);
|
||||
|
||||
interaction.reply({
|
||||
await interaction.reply({
|
||||
embeds: [PingEmbed],
|
||||
});
|
||||
},
|
||||
|
||||
+16
-10
@@ -1,23 +1,29 @@
|
||||
# -------------------------------
|
||||
# API Server Configuration
|
||||
# -------------------------------
|
||||
# Copy to api.yml and fill in your values (api.yml is not committed with real secrets).
|
||||
|
||||
API:
|
||||
Enabled: true
|
||||
Port: 3000 # PORT NUMBER FOR YOUR BOT
|
||||
Port: 3000
|
||||
|
||||
# Used to sign dashboard login sessions (keep random; do not share)
|
||||
SecretKey: "fuiesdfioewefioesfioiosnd"
|
||||
SecretKey: "CHANGE_ME"
|
||||
# Set to 1 when the dashboard is behind nginx, Cloudflare, Pterodactyl proxy, etc.
|
||||
# so http/https is detected from X-Forwarded-Proto.
|
||||
TrustProxy: false
|
||||
|
||||
# Discord OAuth2 — create an app at https://discord.com/developers/applications
|
||||
# Add redirect URL exactly matching RedirectUri below (OAuth2 → Redirects)
|
||||
OAuth:
|
||||
Enabled: true
|
||||
ClientId: "1289713673123922032"
|
||||
ClientSecret: "KwSoar0SLeHXWl5oePGNTb9J5q5NVKAV"
|
||||
ClientId: "DISCORD_CLIENT_ID"
|
||||
ClientSecret: "DISCORD_CLIENT_SECRET"
|
||||
# Canonical callback URL (host + path). Protocol (http/https) can follow the
|
||||
# browser when UseRequestOrigin is true (default).
|
||||
RedirectUri: "http://localhost:3000/api/auth/discord/callback"
|
||||
# Permanent owners (full access, manage users). Add more dashboard users in the Users page.
|
||||
# Optional: register extra callback URLs in Discord and list them here.
|
||||
# RedirectUris:
|
||||
# - "https://bot.example.com/api/auth/discord/callback"
|
||||
# UseRequestOrigin: true
|
||||
# CookieSecure: false
|
||||
OwnerUserIds:
|
||||
- "829112572816130058"
|
||||
# Legacy alias for OwnerUserIds (optional)
|
||||
- "YOUR_DISCORD_USER_ID"
|
||||
AllowedUserIds: []
|
||||
@@ -38,7 +38,7 @@ Welcome:
|
||||
Embed:
|
||||
Colour: "#45b463"
|
||||
Title: "Welcome to ServerName"
|
||||
Message: ":smile: %joined_user% has just landed!\n\n🔨 **Server Rules:** <#1202667199853232129>"
|
||||
Message: ":smile: %joined_user% has just landed!\n\n🔨 **Server Rules:** <#CHANNEL_ID>"
|
||||
Icon:
|
||||
Mode: "USER" # USER | BOT | CUSTOM
|
||||
CustomURL: "https://example.com/custom.png"
|
||||
@@ -64,7 +64,7 @@ Welcome:
|
||||
Modern:
|
||||
Colour: "#45b463"
|
||||
Title: "**Welcome to ServerName**"
|
||||
Body: ":smile: %joined_user% has just landed!\n\n🔨 **Server Rules:** <#1202667199853232129>"
|
||||
Body: ":smile: %joined_user% has just landed!\n\n🔨 **Server Rules:** <#CHANNEL_ID>"
|
||||
Icon:
|
||||
Mode: "BOT" # USER | BOT | CUSTOM
|
||||
CustomURL: "https://example.com/custom-icon.png"
|
||||
|
||||
@@ -35,7 +35,7 @@ Features:
|
||||
SuggestTickets: true # Should SupportBot AI suggest creating a ticket if the user needs more help?
|
||||
|
||||
Channels:
|
||||
AIChannel: "1469028791312715902"
|
||||
AIChannel: "CHANNEL_ID"
|
||||
|
||||
Embed:
|
||||
Color: "#45b463"
|
||||
|
||||
+14
-14
@@ -23,7 +23,7 @@ General:
|
||||
Token: "BOT_TOKEN"
|
||||
Addons:
|
||||
Enabled: true
|
||||
GuildId: "1198017820093599856"
|
||||
GuildId: ""
|
||||
|
||||
# -------------------------
|
||||
# Activity
|
||||
@@ -63,12 +63,12 @@ Embed:
|
||||
Roles:
|
||||
AutoRole:
|
||||
Enabled: true
|
||||
Role: "1491881628065337404"
|
||||
Role: "ROLE_ID"
|
||||
|
||||
StaffMember:
|
||||
Staff: "1198299671576195213"
|
||||
Admin: "1198295676128329799"
|
||||
Moderator: "1198299671576195213"
|
||||
Staff: "ROLE_ID"
|
||||
Admin: "ROLE_ID"
|
||||
Moderator: "ROLE_ID"
|
||||
|
||||
Mod:
|
||||
AllowSupportStaff: false
|
||||
@@ -150,16 +150,16 @@ Ticket:
|
||||
DMOnRemove: true # DM the user when they are removed from the ticket
|
||||
DMTranscript: true # DM the user a transcript of the ticket when it is closed
|
||||
|
||||
TicketHome: "1290752269880660079"
|
||||
TicketHome: "CHANNEL_ID"
|
||||
|
||||
# What is TicketHome?
|
||||
# - Channel where the Ticket creation panel is sent.
|
||||
# - Channel where ticket threads are made. (only if ticket threads is enabled above.)
|
||||
|
||||
# For TicketType: channels
|
||||
TicketChannelsCategory: "1505240336736452809"
|
||||
TicketChannelsCategory: "CATEGORY_ID"
|
||||
TicketChannelsCategory2: "CATEGORY_ID" # This will be used if the first category has reached the max channel limit.
|
||||
TicketArchiveCategory: "1505240336736452809"
|
||||
TicketArchiveCategory: "CATEGORY_ID"
|
||||
# ---
|
||||
|
||||
Channel: "ticket-" # The prefix for ticket channel names
|
||||
@@ -186,7 +186,7 @@ Ticket:
|
||||
|
||||
ClaimTickets:
|
||||
Enabled: false
|
||||
Channel: "1290752269880660079"
|
||||
Channel: "CHANNEL_ID"
|
||||
# Channel where the ticket assignments are sent for staff to claim.
|
||||
|
||||
ClaimAcceptTime: 120000
|
||||
@@ -220,9 +220,9 @@ Ticket:
|
||||
- "Have you tried resolving the issue yourself?"
|
||||
|
||||
Log:
|
||||
TicketDataLog: "1290752269880660079"
|
||||
TicketDataLog: "CHANNEL_ID"
|
||||
TickeDataTitle: "Ticket Data"
|
||||
TicketBlacklistLog: "1290752269880660079"
|
||||
TicketBlacklistLog: "CHANNEL_ID"
|
||||
|
||||
AIMode:
|
||||
Enabled: false
|
||||
@@ -358,12 +358,12 @@ SelectMenus:
|
||||
# -------------------------
|
||||
|
||||
MessageDelete:
|
||||
Channel: "1290752269880660079"
|
||||
Channel: "CHANNEL_ID"
|
||||
Colour: "#d92525"
|
||||
|
||||
MessageUpdate:
|
||||
Channel: "1290752269880660079"
|
||||
Channel: "CHANNEL_ID"
|
||||
Colour: "#f2a024"
|
||||
|
||||
Translate:
|
||||
TranslateLog: "1290752269880660079"
|
||||
TranslateLog: "CHANNEL_ID"
|
||||
@@ -3,14 +3,26 @@
|
||||
"users": {
|
||||
"829112572816130058": {
|
||||
"id": "829112572816130058",
|
||||
"username": "Char",
|
||||
"username": "ch_ar.",
|
||||
"globalName": "Char",
|
||||
"avatar": "823630e777efe85c7fe71402f00ab0c1",
|
||||
"role": "owner",
|
||||
"permissions": null,
|
||||
"enabled": true,
|
||||
"createdAt": 1779820911269,
|
||||
"updatedAt": 1779822114501,
|
||||
"createdBy": "system"
|
||||
},
|
||||
"YOUR_DISCORD_USER_ID": {
|
||||
"id": "YOUR_DISCORD_USER_ID",
|
||||
"username": null,
|
||||
"globalName": null,
|
||||
"avatar": null,
|
||||
"role": "owner",
|
||||
"permissions": null,
|
||||
"enabled": true,
|
||||
"createdAt": 1778938759443,
|
||||
"updatedAt": 1778939228361,
|
||||
"createdAt": 1779822020405,
|
||||
"updatedAt": 1779822020405,
|
||||
"createdBy": "system"
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -65,6 +65,7 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
|
||||
"\u001b[37;1m",
|
||||
`${interaction.user.username} has executed ${command.name}`,
|
||||
);
|
||||
|
||||
await command.run(interaction);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -51,6 +51,7 @@ class Client extends Discord.Client {
|
||||
GatewayIntentBits.GuildMembers,
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.GuildMessageReactions,
|
||||
GatewayIntentBits.GuildEmojisAndStickers,
|
||||
GatewayIntentBits.MessageContent,
|
||||
],
|
||||
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
/**
|
||||
* Dashboard alert registry — server-side providers for actionable banners.
|
||||
*
|
||||
* Register a provider to surface new alerts anywhere in the dashboard:
|
||||
*
|
||||
* const { dashboardAlerts } = require("./DashboardAlerts.js");
|
||||
* dashboardAlerts.register("my-addon", (ctx) => {
|
||||
* if (!ctx.configStore.myAddon?.Configured) {
|
||||
* return [{
|
||||
* id: "my-addon:setup",
|
||||
* severity: "warning",
|
||||
* category: "my-addon",
|
||||
* title: "My addon needs setup",
|
||||
* message: "Finish configuration to enable this feature.",
|
||||
* action: { label: "Configure", href: "/configs?file=my-addon" },
|
||||
* }];
|
||||
* }
|
||||
* return [];
|
||||
* });
|
||||
*/
|
||||
const { evaluateGuildHealth } = require("./GuildManager.js");
|
||||
const { evaluateAllModules } = require("./ModuleStatus.js");
|
||||
|
||||
const SEVERITY_ORDER = { error: 0, warning: 1, info: 2 };
|
||||
|
||||
const MODULE_LINKS = {
|
||||
tickets: {
|
||||
title: "Ticket system",
|
||||
href: "/configs?file=ticket-panel",
|
||||
},
|
||||
supportbot: {
|
||||
title: "Core bot settings",
|
||||
href: "/configs?file=supportbot",
|
||||
},
|
||||
transcripts: {
|
||||
title: "Ticket transcripts",
|
||||
href: "/transcripts",
|
||||
},
|
||||
suggestions: {
|
||||
title: "Suggestions",
|
||||
href: "/configs?file=messages",
|
||||
},
|
||||
ai: {
|
||||
title: "AI assistant",
|
||||
href: "/configs?file=supportbot-ai",
|
||||
},
|
||||
commands: {
|
||||
title: "Commands",
|
||||
href: "/configs?file=commands",
|
||||
},
|
||||
};
|
||||
|
||||
class DashboardAlertRegistry {
|
||||
constructor() {
|
||||
/** @type {Map<string, (ctx: DashboardAlertContext) => DashboardAlert[] | Promise<DashboardAlert[]>>} */
|
||||
this.providers = new Map();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} id Unique provider id (used for debugging / overrides)
|
||||
* @param {(ctx: DashboardAlertContext) => DashboardAlert[] | Promise<DashboardAlert[]>} fn
|
||||
*/
|
||||
register(id, fn) {
|
||||
this.providers.set(id, fn);
|
||||
return this;
|
||||
}
|
||||
|
||||
unregister(id) {
|
||||
this.providers.delete(id);
|
||||
}
|
||||
|
||||
/** @param {DashboardAlertContext} ctx */
|
||||
async evaluate(ctx) {
|
||||
const alerts = [];
|
||||
for (const fn of this.providers.values()) {
|
||||
const result = await fn(ctx);
|
||||
if (Array.isArray(result) && result.length) {
|
||||
alerts.push(...result);
|
||||
}
|
||||
}
|
||||
return sortAlerts(alerts);
|
||||
}
|
||||
}
|
||||
|
||||
function sortAlerts(alerts) {
|
||||
return [...alerts].sort((a, b) => {
|
||||
const sa = SEVERITY_ORDER[a.severity] ?? 9;
|
||||
const sb = SEVERITY_ORDER[b.severity] ?? 9;
|
||||
if (sa !== sb) return sa - sb;
|
||||
return a.title.localeCompare(b.title);
|
||||
});
|
||||
}
|
||||
|
||||
function guildSeverity(status) {
|
||||
if (status === "offline") return "error";
|
||||
return "warning";
|
||||
}
|
||||
|
||||
function shouldSkipModuleAlert(moduleId, info) {
|
||||
if (info.status === "done") return true;
|
||||
if (moduleId === "ai" && info.subtitle === "AI is disabled in config") return true;
|
||||
// Transcripts are automatic — empty archive is normal, not a setup step.
|
||||
if (moduleId === "transcripts") return true;
|
||||
// Partially configured modules are tracked on Overview — only banner when nothing is done yet.
|
||||
if (info.status === "progress" && (info.passed ?? 0) > 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function moduleSeverity(moduleId, info) {
|
||||
if (info.status === "todo") {
|
||||
return moduleId === "tickets" || moduleId === "supportbot" ? "warning" : "info";
|
||||
}
|
||||
return "info";
|
||||
}
|
||||
|
||||
function evaluateGuildAlerts(ctx) {
|
||||
const { client } = ctx;
|
||||
if (!client?.user) {
|
||||
return [
|
||||
{
|
||||
id: "guild:offline",
|
||||
severity: "error",
|
||||
category: "guild",
|
||||
title: "Bot offline",
|
||||
message: "The bot is not connected to Discord. Check your token and restart the server.",
|
||||
action: { label: "Bot config", href: "/configs?file=supportbot" },
|
||||
meta: { status: "offline" },
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
const health = evaluateGuildHealth(client);
|
||||
if (health.status === "ok") return [];
|
||||
|
||||
return [
|
||||
{
|
||||
id: "guild:health",
|
||||
severity: guildSeverity(health.status),
|
||||
category: "guild",
|
||||
title: "Server setup required",
|
||||
message: health.message,
|
||||
action: { label: "Bot config", href: "/configs?file=supportbot" },
|
||||
meta: {
|
||||
status: health.status,
|
||||
configuredGuildId: health.configuredGuildId,
|
||||
configuredGuild: health.configuredGuild,
|
||||
extraGuilds: health.extraGuilds,
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function evaluateModuleAlerts(ctx) {
|
||||
const { configStore, transcriptCount = 0 } = ctx;
|
||||
const modules = evaluateAllModules(configStore, { transcriptCount });
|
||||
const alerts = [];
|
||||
|
||||
for (const [moduleId, info] of Object.entries(modules)) {
|
||||
if (shouldSkipModuleAlert(moduleId, info)) continue;
|
||||
|
||||
const link = MODULE_LINKS[moduleId] || {
|
||||
title: moduleId,
|
||||
href: "/configs",
|
||||
};
|
||||
|
||||
const progress =
|
||||
info.total > 0 ? `${info.passed ?? 0} of ${info.total} checks complete` : null;
|
||||
|
||||
alerts.push({
|
||||
id: `module:${moduleId}`,
|
||||
severity: moduleSeverity(moduleId, info),
|
||||
category: "modules",
|
||||
title:
|
||||
info.status === "todo"
|
||||
? `${link.title} — setup required`
|
||||
: `${link.title} — in progress`,
|
||||
message: info.subtitle,
|
||||
action: { label: "Open module", href: link.href },
|
||||
meta: {
|
||||
moduleId,
|
||||
status: info.status,
|
||||
passed: info.passed,
|
||||
total: info.total,
|
||||
progress,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return alerts;
|
||||
}
|
||||
|
||||
const dashboardAlerts = new DashboardAlertRegistry();
|
||||
dashboardAlerts.register("guild", evaluateGuildAlerts);
|
||||
dashboardAlerts.register("modules", evaluateModuleAlerts);
|
||||
|
||||
/**
|
||||
* @typedef {Object} DashboardAlertAction
|
||||
* @property {string} label
|
||||
* @property {string} href
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} DashboardAlert
|
||||
* @property {string} id
|
||||
* @property {"error"|"warning"|"info"} severity
|
||||
* @property {string} category
|
||||
* @property {string} title
|
||||
* @property {string} message
|
||||
* @property {DashboardAlertAction} [action]
|
||||
* @property {Record<string, unknown>} [meta]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} DashboardAlertContext
|
||||
* @property {import("discord.js").Client} [client]
|
||||
* @property {import("./ConfigStore.js")} configStore
|
||||
* @property {number} [transcriptCount]
|
||||
*/
|
||||
|
||||
async function evaluateDashboardAlerts(ctx) {
|
||||
return dashboardAlerts.evaluate(ctx);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
dashboardAlerts,
|
||||
evaluateDashboardAlerts,
|
||||
sortAlerts,
|
||||
MODULE_LINKS,
|
||||
};
|
||||
@@ -0,0 +1,421 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const axios = require("axios");
|
||||
const YAML = require("yaml");
|
||||
const configStore = require("./ConfigStore.js");
|
||||
const { CALLBACK_PATH } = require("./DiscordOAuth.js");
|
||||
|
||||
const DISCORD_API = "https://discord.com/api/v10";
|
||||
const CONFIG_DIR = path.join(__dirname, "../Configs");
|
||||
const API_FILE = path.join(CONFIG_DIR, "api.yml");
|
||||
const SUPPORTBOT_FILE = path.join(CONFIG_DIR, "supportbot.yml");
|
||||
|
||||
const PLACEHOLDER_PATTERNS = [
|
||||
/DISCORD_CLIENT_ID/i,
|
||||
/DISCORD_CLIENT_SECRET/i,
|
||||
/YOUR_DISCORD_USER_ID/i,
|
||||
/CHANGE_ME/i,
|
||||
/BOT_TOKEN/i,
|
||||
/PUT_RANDOM_STRING/i,
|
||||
];
|
||||
|
||||
function isEmpty(value) {
|
||||
if (value == null) return true;
|
||||
if (typeof value === "boolean") return false;
|
||||
if (typeof value === "number") return false;
|
||||
return String(value).trim() === "";
|
||||
}
|
||||
|
||||
function isPlaceholder(value) {
|
||||
if (isEmpty(value)) return true;
|
||||
const s = String(value).trim();
|
||||
return PLACEHOLDER_PATTERNS.some((p) => p.test(s));
|
||||
}
|
||||
|
||||
function isDiscordSnowflake(value) {
|
||||
return /^\d{17,20}$/.test(String(value).trim());
|
||||
}
|
||||
|
||||
function isValidBotToken(value) {
|
||||
if (isPlaceholder(value)) return false;
|
||||
const s = String(value).trim();
|
||||
return s.length >= 50 && s.includes(".");
|
||||
}
|
||||
|
||||
function isValidSecretKey(value) {
|
||||
if (isPlaceholder(value)) return false;
|
||||
return String(value).trim().length >= 16;
|
||||
}
|
||||
|
||||
function readApiRoot() {
|
||||
if (!fs.existsSync(API_FILE)) return null;
|
||||
try {
|
||||
const raw = YAML.parse(fs.readFileSync(API_FILE, "utf8"));
|
||||
return raw?.API ?? raw ?? null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function readSupportbotRoot() {
|
||||
if (!fs.existsSync(SUPPORTBOT_FILE)) return {};
|
||||
try {
|
||||
return YAML.parse(fs.readFileSync(SUPPORTBOT_FILE, "utf8")) || {};
|
||||
} catch {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
function getOwnerIds(oauth) {
|
||||
const ids = [];
|
||||
for (const id of oauth?.OwnerUserIds || []) {
|
||||
const s = String(id).trim();
|
||||
if (s) ids.push(s);
|
||||
}
|
||||
if (ids.length === 0) {
|
||||
for (const id of oauth?.AllowedUserIds || []) {
|
||||
const s = String(id).trim();
|
||||
if (s) ids.push(s);
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
function buildSteps(apiRoot, supportbot) {
|
||||
const oauth = apiRoot?.OAuth || {};
|
||||
const token = supportbot?.General?.Token;
|
||||
|
||||
return [
|
||||
{
|
||||
id: "botToken",
|
||||
title: "Bot token",
|
||||
description: "From the Discord Developer Portal → your application → Bot → Reset Token.",
|
||||
complete: isValidBotToken(token),
|
||||
},
|
||||
{
|
||||
id: "secretKey",
|
||||
title: "Dashboard session secret",
|
||||
description: "Random string used to sign login cookies. Keep it private.",
|
||||
complete: isValidSecretKey(apiRoot?.SecretKey),
|
||||
},
|
||||
{
|
||||
id: "oauth",
|
||||
title: "Discord OAuth app",
|
||||
description: "Same application as your bot — Client ID and Client Secret from OAuth2.",
|
||||
complete:
|
||||
!isPlaceholder(oauth.ClientId) &&
|
||||
!isPlaceholder(oauth.ClientSecret) &&
|
||||
isDiscordSnowflake(oauth.ClientId),
|
||||
},
|
||||
{
|
||||
id: "redirectUri",
|
||||
title: "OAuth redirect URL",
|
||||
description: `Add this exact URL under OAuth2 → Redirects in the Discord portal.`,
|
||||
complete: isValidRedirectUriConfigured(oauth.RedirectUri),
|
||||
},
|
||||
{
|
||||
id: "owners",
|
||||
title: "Dashboard owners",
|
||||
description: "Discord user IDs that can sign in and manage the dashboard (at least one).",
|
||||
complete: getOwnerIds(oauth).length > 0 && getOwnerIds(oauth).every(isDiscordSnowflake),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function isValidRedirectUriConfigured(uri) {
|
||||
if (isPlaceholder(uri)) return false;
|
||||
try {
|
||||
const u = new URL(String(uri).trim());
|
||||
if (!["http:", "https:"].includes(u.protocol)) return false;
|
||||
return u.pathname.replace(/\/$/, "") === CALLBACK_PATH.replace(/\/$/, "");
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isSetupComplete() {
|
||||
const apiRoot = readApiRoot();
|
||||
if (!apiRoot?.Enabled) return false;
|
||||
const oauth = apiRoot.OAuth || {};
|
||||
if (!oauth.Enabled) return false;
|
||||
const steps = buildSteps(apiRoot, readSupportbotRoot());
|
||||
return steps.every((s) => s.complete);
|
||||
}
|
||||
|
||||
function getSetupStatus(req) {
|
||||
const apiRoot = readApiRoot() || {};
|
||||
const steps = buildSteps(apiRoot, readSupportbotRoot());
|
||||
const complete = steps.every((s) => s.complete);
|
||||
|
||||
let suggestedRedirectUri = null;
|
||||
if (req) {
|
||||
const proto =
|
||||
req.get("x-forwarded-proto")?.split(",")[0]?.trim() ||
|
||||
req.protocol ||
|
||||
"http";
|
||||
const host = req.get("x-forwarded-host")?.split(",")[0]?.trim() || req.get("host");
|
||||
if (host) {
|
||||
suggestedRedirectUri = `${proto}://${host}${CALLBACK_PATH}`;
|
||||
}
|
||||
}
|
||||
if (!suggestedRedirectUri) {
|
||||
suggestedRedirectUri = `http://localhost:${apiRoot.Port || 3000}${CALLBACK_PATH}`;
|
||||
}
|
||||
|
||||
return {
|
||||
complete,
|
||||
steps,
|
||||
suggestedRedirectUri,
|
||||
oauthCallbackPath: CALLBACK_PATH,
|
||||
};
|
||||
}
|
||||
|
||||
async function validateBotToken(token) {
|
||||
const trimmed = String(token || "").trim();
|
||||
if (!isValidBotToken(trimmed)) {
|
||||
return { ok: false, error: "Enter a valid bot token from the Discord Developer Portal." };
|
||||
}
|
||||
|
||||
try {
|
||||
const [userRes, appRes] = await Promise.all([
|
||||
axios.get(`${DISCORD_API}/users/@me`, {
|
||||
headers: { Authorization: `Bot ${trimmed}` },
|
||||
timeout: 12_000,
|
||||
}),
|
||||
axios.get(`${DISCORD_API}/oauth2/applications/@me`, {
|
||||
headers: { Authorization: `Bot ${trimmed}` },
|
||||
timeout: 12_000,
|
||||
}),
|
||||
]);
|
||||
|
||||
return {
|
||||
ok: true,
|
||||
bot: {
|
||||
id: userRes.data.id,
|
||||
username: userRes.data.username,
|
||||
discriminator: userRes.data.discriminator,
|
||||
},
|
||||
applicationId: String(appRes.data.id),
|
||||
};
|
||||
} catch (err) {
|
||||
const status = err.response?.status;
|
||||
if (status === 401) {
|
||||
return { ok: false, error: "Discord rejected this bot token (401 Unauthorized)." };
|
||||
}
|
||||
return {
|
||||
ok: false,
|
||||
error: err.response?.data?.message || err.message || "Could not verify bot token.",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
async function validateOAuthCredentials(clientId, clientSecret, botToken) {
|
||||
const id = String(clientId || "").trim();
|
||||
const secret = String(clientSecret || "").trim();
|
||||
|
||||
if (!isDiscordSnowflake(id)) {
|
||||
return { ok: false, error: "Client ID must be a numeric Discord application ID." };
|
||||
}
|
||||
if (isPlaceholder(secret) || secret.length < 20) {
|
||||
return { ok: false, error: "Enter the OAuth Client Secret from the Discord portal." };
|
||||
}
|
||||
|
||||
if (botToken) {
|
||||
const botCheck = await validateBotToken(botToken);
|
||||
if (botCheck.ok && botCheck.applicationId && botCheck.applicationId !== id) {
|
||||
return {
|
||||
ok: false,
|
||||
error: `Client ID does not match the bot application (${botCheck.applicationId}). Use the same app's credentials.`,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await axios.post(
|
||||
`${DISCORD_API}/oauth2/token`,
|
||||
new URLSearchParams({ grant_type: "client_credentials", scope: "identify" }),
|
||||
{
|
||||
auth: { username: id, password: secret },
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
timeout: 12_000,
|
||||
},
|
||||
);
|
||||
return { ok: true, clientId: id };
|
||||
} catch (err) {
|
||||
const status = err.response?.status;
|
||||
if (botToken) {
|
||||
const botCheck = await validateBotToken(botToken);
|
||||
if (botCheck.ok && botCheck.applicationId === id) {
|
||||
return {
|
||||
ok: true,
|
||||
clientId: id,
|
||||
warning:
|
||||
"Could not verify the client secret with Discord (token endpoint). ID matches your bot — double-check the secret in the portal.",
|
||||
};
|
||||
}
|
||||
}
|
||||
if (status === 401 || status === 400) {
|
||||
return { ok: false, error: "Invalid Client ID or Client Secret." };
|
||||
}
|
||||
return {
|
||||
ok: false,
|
||||
error: err.response?.data?.error_description || err.message || "OAuth validation failed.",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function validateRedirectUri(uri) {
|
||||
const trimmed = String(uri || "").trim();
|
||||
if (!isValidRedirectUriConfigured(trimmed)) {
|
||||
return {
|
||||
ok: false,
|
||||
error: `Redirect URL must end with ${CALLBACK_PATH} and use http or https.`,
|
||||
};
|
||||
}
|
||||
return { ok: true, redirectUri: trimmed };
|
||||
}
|
||||
|
||||
async function validateOwnerUserIds(ownerIds, botToken) {
|
||||
const ids = (Array.isArray(ownerIds) ? ownerIds : [ownerIds])
|
||||
.map((id) => String(id).trim())
|
||||
.filter(Boolean);
|
||||
|
||||
if (ids.length === 0) {
|
||||
return { ok: false, error: "Add at least one Discord user ID." };
|
||||
}
|
||||
|
||||
const invalid = ids.filter((id) => !isDiscordSnowflake(id));
|
||||
if (invalid.length) {
|
||||
return { ok: false, error: `Invalid user ID: ${invalid[0]}` };
|
||||
}
|
||||
|
||||
if (!botToken || !isValidBotToken(botToken)) {
|
||||
return { ok: true, ownerUserIds: ids, warning: "User IDs format OK (bot token not verified yet)." };
|
||||
}
|
||||
|
||||
const users = [];
|
||||
try {
|
||||
for (const id of ids) {
|
||||
const res = await axios.get(`${DISCORD_API}/users/${id}`, {
|
||||
headers: { Authorization: `Bot ${String(botToken).trim()}` },
|
||||
timeout: 12_000,
|
||||
});
|
||||
users.push({
|
||||
id: res.data.id,
|
||||
username: res.data.username,
|
||||
globalName: res.data.global_name || null,
|
||||
});
|
||||
}
|
||||
return { ok: true, ownerUserIds: ids, users };
|
||||
} catch (err) {
|
||||
if (err.response?.status === 404) {
|
||||
return { ok: false, error: "One or more user IDs were not found. Check Developer Mode → Copy User ID." };
|
||||
}
|
||||
if (err.response?.status === 403) {
|
||||
return {
|
||||
ok: false,
|
||||
error: "Bot could not look up users. Ensure the bot is in a server with those users, or verify IDs manually.",
|
||||
};
|
||||
}
|
||||
return { ok: false, error: err.message || "Failed to verify owner user IDs." };
|
||||
}
|
||||
}
|
||||
|
||||
function validateSecretKey(secretKey) {
|
||||
if (!isValidSecretKey(secretKey)) {
|
||||
return { ok: false, error: "Use at least 16 characters (not CHANGE_ME)." };
|
||||
}
|
||||
return { ok: true };
|
||||
}
|
||||
|
||||
async function validateSetupPayload(payload) {
|
||||
const results = {};
|
||||
|
||||
if (payload.botToken != null) {
|
||||
results.botToken = await validateBotToken(payload.botToken);
|
||||
}
|
||||
if (payload.secretKey != null) {
|
||||
results.secretKey = validateSecretKey(payload.secretKey);
|
||||
}
|
||||
if (payload.clientId != null && payload.clientSecret != null) {
|
||||
results.oauth = await validateOAuthCredentials(
|
||||
payload.clientId,
|
||||
payload.clientSecret,
|
||||
payload.botToken,
|
||||
);
|
||||
}
|
||||
if (payload.redirectUri != null) {
|
||||
results.redirectUri = validateRedirectUri(payload.redirectUri);
|
||||
}
|
||||
if (payload.ownerUserIds != null) {
|
||||
results.owners = await validateOwnerUserIds(payload.ownerUserIds, payload.botToken);
|
||||
}
|
||||
|
||||
const allOk = Object.values(results).every((r) => r?.ok);
|
||||
return { ok: allOk, results };
|
||||
}
|
||||
|
||||
function ensureApiFile() {
|
||||
if (fs.existsSync(API_FILE)) return;
|
||||
const example = path.join(CONFIG_DIR, "api.yml.example");
|
||||
if (fs.existsSync(example)) {
|
||||
fs.copyFileSync(example, API_FILE);
|
||||
configStore.reloadFile("api");
|
||||
} else {
|
||||
throw new Error("Configs/api.yml is missing. Copy Configs/api.yml.example to api.yml.");
|
||||
}
|
||||
}
|
||||
|
||||
function applySetup(payload) {
|
||||
ensureApiFile();
|
||||
|
||||
const ownerIds = (Array.isArray(payload.ownerUserIds)
|
||||
? payload.ownerUserIds
|
||||
: String(payload.ownerUserIds || "").split(/[\s,]+/)
|
||||
)
|
||||
.map((id) => String(id).trim())
|
||||
.filter(Boolean);
|
||||
|
||||
const apiDoc = YAML.parseDocument(fs.readFileSync(API_FILE, "utf8"));
|
||||
if (!apiDoc.get("API")) apiDoc.set("API", {});
|
||||
|
||||
apiDoc.setIn(["API", "Enabled"], true);
|
||||
apiDoc.setIn(["API", "SecretKey"], String(payload.secretKey).trim());
|
||||
if (payload.port != null && payload.port !== "") {
|
||||
apiDoc.setIn(["API", "Port"], Number(payload.port) || 3000);
|
||||
}
|
||||
if (!apiDoc.getIn(["API", "OAuth"])) apiDoc.setIn(["API", "OAuth"], {});
|
||||
|
||||
apiDoc.setIn(["API", "OAuth", "Enabled"], true);
|
||||
apiDoc.setIn(["API", "OAuth", "ClientId"], String(payload.clientId).trim());
|
||||
apiDoc.setIn(["API", "OAuth", "ClientSecret"], String(payload.clientSecret).trim());
|
||||
apiDoc.setIn(["API", "OAuth", "RedirectUri"], String(payload.redirectUri).trim());
|
||||
apiDoc.setIn(["API", "OAuth", "OwnerUserIds"], ownerIds);
|
||||
apiDoc.setIn(["API", "OAuth", "AllowedUserIds"], []);
|
||||
|
||||
fs.writeFileSync(API_FILE, apiDoc.toString());
|
||||
|
||||
const sbDoc = YAML.parseDocument(fs.readFileSync(SUPPORTBOT_FILE, "utf8"));
|
||||
sbDoc.setIn(["General", "Token"], String(payload.botToken).trim());
|
||||
fs.writeFileSync(SUPPORTBOT_FILE, sbDoc.toString());
|
||||
|
||||
configStore.reloadFile("api");
|
||||
configStore.reloadFile("supportbot");
|
||||
|
||||
return {
|
||||
ownerUserIds: ownerIds,
|
||||
api: configStore.api?.API || configStore.api,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isSetupComplete,
|
||||
getSetupStatus,
|
||||
validateBotToken,
|
||||
validateOAuthCredentials,
|
||||
validateRedirectUri,
|
||||
validateOwnerUserIds,
|
||||
validateSecretKey,
|
||||
validateSetupPayload,
|
||||
applySetup,
|
||||
};
|
||||
@@ -3,7 +3,9 @@ const configStore = require("./ConfigStore.js");
|
||||
const { withTimeout } = require("./asyncTimeout.js");
|
||||
|
||||
const RESOURCES_CACHE_MS = 90 * 1000;
|
||||
let resourcesCache = { guildId: null, data: null, at: 0 };
|
||||
/** Bump when resource payload shape changes (e.g. added emojis). */
|
||||
const RESOURCES_CACHE_VERSION = 2;
|
||||
let resourcesCache = { guildId: null, data: null, at: 0, version: 0 };
|
||||
let resourcesInflight = null;
|
||||
|
||||
function getConfiguredGuildId() {
|
||||
@@ -160,12 +162,28 @@ function buildResourcesFromGuild(guild) {
|
||||
name: c.name,
|
||||
}));
|
||||
|
||||
const emojis = [...guild.emojis.cache.values()]
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map((e) => {
|
||||
const animated = Boolean(e.animated);
|
||||
const ext = animated ? "gif" : "png";
|
||||
return {
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
animated,
|
||||
url:
|
||||
e.imageURL({ extension: ext, size: 64 }) ||
|
||||
`https://cdn.discordapp.com/emojis/${e.id}.${ext}?size=64`,
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
guildId: guild.id,
|
||||
guildName: guild.name,
|
||||
roles,
|
||||
channels,
|
||||
categories,
|
||||
emojis,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -189,6 +207,12 @@ async function fetchGuildResourcesFromDiscord(client, guildId) {
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await withTimeout(guild.emojis.fetch(), 12_000, "Discord emoji fetch timed out");
|
||||
} catch (err) {
|
||||
console.warn("[Guild] Failed to fetch guild emojis:", err.message);
|
||||
}
|
||||
|
||||
return buildResourcesFromGuild(guild);
|
||||
}
|
||||
|
||||
@@ -199,6 +223,7 @@ async function fetchGuildResources(client, guildId) {
|
||||
const now = Date.now();
|
||||
if (
|
||||
resourcesCache.data &&
|
||||
resourcesCache.version === RESOURCES_CACHE_VERSION &&
|
||||
resourcesCache.guildId === id &&
|
||||
now - resourcesCache.at < RESOURCES_CACHE_MS
|
||||
) {
|
||||
@@ -216,7 +241,12 @@ async function fetchGuildResources(client, guildId) {
|
||||
resourcesInflight = (async () => {
|
||||
const data = await fetchGuildResourcesFromDiscord(client, id);
|
||||
if (data) {
|
||||
resourcesCache = { guildId: id, data, at: Date.now() };
|
||||
resourcesCache = {
|
||||
guildId: id,
|
||||
data,
|
||||
at: Date.now(),
|
||||
version: RESOURCES_CACHE_VERSION,
|
||||
};
|
||||
}
|
||||
return data;
|
||||
})();
|
||||
@@ -229,7 +259,7 @@ async function fetchGuildResources(client, guildId) {
|
||||
}
|
||||
|
||||
function clearGuildResourcesCache() {
|
||||
resourcesCache = { guildId: null, data: null, at: 0 };
|
||||
resourcesCache = { guildId: null, data: null, at: 0, version: 0 };
|
||||
resourcesInflight = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,11 +122,12 @@ function evaluateTranscripts(supportbot, transcriptCount) {
|
||||
const ticketReady = isConfiguredId(supportbot?.Ticket?.TicketHome);
|
||||
|
||||
if (!ticketReady) {
|
||||
// Ticket setup is tracked by the tickets module — avoid a misleading transcripts alert.
|
||||
return {
|
||||
status: "todo",
|
||||
subtitle: "Set up tickets first",
|
||||
status: "done",
|
||||
subtitle: "Available after ticket channels are configured",
|
||||
passed: 0,
|
||||
total: 2,
|
||||
total: 0,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -134,16 +135,16 @@ function evaluateTranscripts(supportbot, transcriptCount) {
|
||||
return {
|
||||
status: "done",
|
||||
subtitle: `${transcriptCount} transcript${transcriptCount === 1 ? "" : "s"} saved`,
|
||||
passed: 2,
|
||||
total: 2,
|
||||
passed: 1,
|
||||
total: 1,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
status: "progress",
|
||||
subtitle: "Close tickets to generate transcripts",
|
||||
status: "done",
|
||||
subtitle: "No transcripts yet — they are created when tickets close",
|
||||
passed: 1,
|
||||
total: 2,
|
||||
total: 1,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
var RN=Object.defineProperty;var AN=(e,n,a)=>n in e?RN(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;var m1=(e,n,a)=>AN(e,typeof n!="symbol"?n+"":n,a);function _N(e,n){for(var a=0;a<n.length;a++){const o=n[a];if(typeof o!="string"&&!Array.isArray(o)){for(const l in o)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(o,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>o[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const d of i.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function a(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(l){if(l.ep)return;l.ep=!0;const i=a(l);fetch(l.href,i)}})();function Xx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rm={exports:{}},Nl={};/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var p1;function MN(){if(p1)return Nl;p1=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(o,l,i){var d=null;if(i!==void 0&&(d=""+i),l.key!==void 0&&(d=""+l.key),"key"in l){i={};for(var m in l)m!=="key"&&(i[m]=l[m])}else i=l;return l=i.ref,{$$typeof:e,type:o,key:d,ref:l!==void 0?l:null,props:i}}return Nl.Fragment=n,Nl.jsx=a,Nl.jsxs=a,Nl}var h1;function ON(){return h1||(h1=1,Rm.exports=MN()),Rm.exports}var c=ON(),Am={exports:{}},_e={};/**
|
||||
* @license React
|
||||
* react.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var g1;function DN(){if(g1)return _e;g1=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function S(_){return _===null||typeof _!="object"?null:(_=x&&_[x]||_["@@iterator"],typeof _=="function"?_:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,N={};function E(_,O,H){this.props=_,this.context=O,this.refs=N,this.updater=H||j}E.prototype.isReactComponent={},E.prototype.setState=function(_,O){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,O,"setState")},E.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function k(){}k.prototype=E.prototype;function A(_,O,H){this.props=_,this.context=O,this.refs=N,this.updater=H||j}var R=A.prototype=new k;R.constructor=A,C(R,E.prototype),R.isPureReactComponent=!0;var L=Array.isArray;function z(){}var B={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function q(_,O,H){var I=H.ref;return{$$typeof:e,type:_,key:O,ref:I!==void 0?I:null,props:H}}function Z(_,O){return q(_.type,O,_.props)}function Q(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function fe(_){var O={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(H){return O[H]})}var de=/\/+/g;function ce(_,O){return typeof _=="object"&&_!==null&&_.key!=null?fe(""+_.key):O.toString(36)}function he(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(z,z):(_.status="pending",_.then(function(O){_.status==="pending"&&(_.status="fulfilled",_.value=O)},function(O){_.status==="pending"&&(_.status="rejected",_.reason=O)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,O,H,I,V){var ne=typeof _;(ne==="undefined"||ne==="boolean")&&(_=null);var J=!1;if(_===null)J=!0;else switch(ne){case"bigint":case"string":case"number":J=!0;break;case"object":switch(_.$$typeof){case e:case n:J=!0;break;case y:return J=_._init,M(J(_._payload),O,H,I,V)}}if(J)return V=V(_),J=I===""?"."+ce(_,0):I,L(V)?(H="",J!=null&&(H=J.replace(de,"$&/")+"/"),M(V,O,H,"",function(G){return G})):V!=null&&(Q(V)&&(V=Z(V,H+(V.key==null||_&&_.key===V.key?"":(""+V.key).replace(de,"$&/")+"/")+J)),O.push(V)),1;J=0;var me=I===""?".":I+":";if(L(_))for(var pe=0;pe<_.length;pe++)I=_[pe],ne=me+ce(I,pe),J+=M(I,O,H,ne,V);else if(pe=S(_),typeof pe=="function")for(_=pe.call(_),pe=0;!(I=_.next()).done;)I=I.value,ne=me+ce(I,pe++),J+=M(I,O,H,ne,V);else if(ne==="object"){if(typeof _.then=="function")return M(he(_),O,H,I,V);throw O=String(_),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return J}function K(_,O,H){if(_==null)return _;var I=[],V=0;return M(_,I,"","",function(ne){return O.call(H,ne,V++)}),I}function re(_){if(_._status===-1){var O=_._result;O=O(),O.then(function(H){(_._status===0||_._status===-1)&&(_._status=1,_._result=H)},function(H){(_._status===0||_._status===-1)&&(_._status=2,_._result=H)}),_._status===-1&&(_._status=0,_._result=O)}if(_._status===1)return _._result.default;throw _._result}var oe=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ee={map:K,forEach:function(_,O,H){K(_,function(){O.apply(this,arguments)},H)},count:function(_){var O=0;return K(_,function(){O++}),O},toArray:function(_){return K(_,function(O){return O})||[]},only:function(_){if(!Q(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return _e.Activity=v,_e.Children=ee,_e.Component=E,_e.Fragment=a,_e.Profiler=l,_e.PureComponent=A,_e.StrictMode=o,_e.Suspense=h,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,_e.__COMPILER_RUNTIME={__proto__:null,c:function(_){return B.H.useMemoCache(_)}},_e.cache=function(_){return function(){return _.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(_,O,H){if(_==null)throw Error("The argument must be a React element, bLine truncated
|
||||
* @license React
|
||||
* scheduler.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var b1;function LN(){return b1||(b1=1,(function(e){function n(M,K){var re=M.length;M.push(K);e:for(;0<re;){var oe=re-1>>>1,ee=M[oe];if(0<l(ee,K))M[oe]=K,M[re]=ee,re=oe;else break e}}function a(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var K=M[0],re=M.pop();if(re!==K){M[0]=re;e:for(var oe=0,ee=M.length,_=ee>>>1;oe<_;){var O=2*(oe+1)-1,H=M[O],I=O+1,V=M[I];if(0>l(H,re))I<ee&&0>l(V,H)?(M[oe]=V,M[I]=re,oe=I):(M[oe]=H,M[O]=re,oe=O);else if(I<ee&&0>l(V,re))M[oe]=V,M[I]=re,oe=I;else break e}}return K}function l(M,K){var re=M.sortIndex-K.sortIndex;return re!==0?re:M.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var d=Date,m=d.now();e.unstable_now=function(){return d.now()-m}}var h=[],p=[],y=1,v=null,x=3,S=!1,j=!1,C=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function R(M){for(var K=a(p);K!==null;){if(K.callback===null)o(p);else if(K.startTime<=M)o(p),K.sortIndex=K.expirationTime,n(h,K);else break;K=a(p)}}function L(M){if(C=!1,R(M),!j)if(a(h)!==null)j=!0,z||(z=!0,fe());else{var K=a(p);K!==null&&he(L,K.startTime-M)}}var z=!1,B=-1,U=5,q=-1;function Z(){return N?!0:!(e.unstable_now()-q<U)}function Q(){if(N=!1,z){var M=e.unstable_now();q=M;var K=!0;try{e:{j=!1,C&&(C=!1,k(B),B=-1),S=!0;var re=x;try{t:{for(R(M),v=a(h);v!==null&&!(v.expirationTime>M&&Z());){var oe=v.callback;if(typeof oe=="function"){v.callback=null,x=v.priorityLevel;var ee=oe(v.expirationTime<=M);if(M=e.unstable_now(),typeof ee=="function"){v.callback=ee,R(M),K=!0;break t}v===a(h)&&o(h),R(M)}else o(h);v=a(h)}if(v!==null)K=!0;else{var _=a(p);_!==null&&he(L,_.startTime-M),K=!1}}break e}finally{v=null,x=re,S=!1}K=void 0}}finally{K?fe():z=!1}}}var fe;if(typeof A=="function")fe=function(){A(Q)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ce=de.port2;de.port1.onmessage=Q,fe=function(){ce.postMessage(null)}}else fe=function(){E(Q,0)};function he(M,K){B=E(function(){M(e.unstable_now())},K)}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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(M){switch(x){case 1:case 2:case 3:var K=3;break;default:K=x}var re=x;x=K;try{return M()}finally{x=re}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(M,K){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var re=x;x=M;try{return K()}finally{x=re}},e.unstable_scheduleCallback=function(M,K,re){var oe=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?oe+re:oe):re=oe,M){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=re+ee,M={id:y++,callback:K,priorityLevel:M,startTime:re,expirationTime:ee,sortIndex:-1},re>oe?(M.sortIndex=re,n(p,M),a(h)===null&&M===a(p)&&(C?(k(B),B=-1):C=!0,he(L,re-oe))):(M.sortIndex=ee,n(h,M),j||S||(j=!0,z||(z=!0,fe()))),M},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(M){var K=x;return function(){var re=x;x=K;try{return M.apply(this,arguments)}finally{x=re}}}})(Om)),Om}var y1;function zN(){return y1||(y1=1,Mm.exports=LN()),Mm.exports}var Dm={exports:{}},Gt={};/**
|
||||
* @license React
|
||||
* react-dom.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var x1;function PN(){if(x1)return Gt;x1=1;var e=Cu();function n(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},l=Symbol.for("react.portal");function i(h,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:h,containerInfo:p,implementation:y}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Gt.createPortal=function(h,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return i(h,p,null,y)},Gt.flushSync=function(h){var p=d.T,y=o.p;try{if(d.T=null,o.p=2,h)return h()}finally{d.T=p,o.p=y,o.d.f()}},Gt.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(h,p))},Gt.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},Gt.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var y=p.as,v=m(y,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?o.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:S}):y==="script"&&o.d.X(h,{crossOrigin:v,integrity:x,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Gt.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=m(p.as,p.crossOrigin);o.d.M(h,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(h)},Gt.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=m(y,p.crossOrigin);o.d.L(h,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Gt.preloadModule=function(h,p){if(typeof h=="string")if(p){var y=m(p.as,p.crossOrigin);o.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(h)},Gt.requestFormReset=function(h){o.d.r(h)},Gt.unstable_batchedUpdates=function(h,p){return h(p)},Gt.useFormState=function(h,p,y){return d.H.useFormState(h,p,y)},Gt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Gt.version="19.2.6",Gt}var S1;function Zx(){if(S1)return Dm.exports;S1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Dm.exports=PN(),Dm.exports}/**
|
||||
* @license React
|
||||
* react-dom-client.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var w1;function BN(){if(w1)return kl;w1=1;var e=zN(),n=Cu(),a=Zx();function o(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function i(t){var r=t,s=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(s=r.return),t=r.return;while(t)}return r.tag===3?s:null}function d(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function m(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function h(t){if(i(t)!==t)throw Error(o(188))}function p(t){var r=t.alternate;if(!r){if(r=i(t),r===null)throw Error(o(188));return r!==t?null:t}for(var s=t,u=r;;){var g=s.return;if(g===null)break;var b=g.alternate;if(b===null){if(u=g.return,u!==null){s=u;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===s)return h(g),t;if(b===u)return h(g),r;b=b.sibling}throw Error(o(188))}if(s.return!==u.return)s=g,u=b;else{for(var w=!1,T=g.child;T;){if(T===s){w=!0,s=g,u=b;break}if(T===u){w=!0,u=g,s=b;break}T=T.sibling}if(!w){for(T=b.child;T;){if(T===s){w=!0,s=b,u=g;break}if(T===u){w=!0,u=b,s=g;break}T=T.sibling}if(!w)throw Error(o(189))}}if(s.alternate!==u)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),A=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function fe(t){return t===null||typeof t!="object"?null:(t=Q&&t[Q]||t["@@iterator"],typeof t=="function"?t:null)}var de=Symbol.for("react.client.reference");function ce(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===de?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case E:return"Profiler";case N:return"StrictMode";case L:return"Suspense";case z:return"SuspenseList";case q:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case j:return"Portal";case A:return t.displayName||"Context";case k:return(t._context.displayName||"Context")+".Consumer";case R:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case B:return r=t.displayName||null,r!==null?r:ce(t.type)||"Memo";case U:r=t._payload,t=t._init;try{return ce(t(r))}catch{}}return null}var he=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},oe=[],ee=-1;function _(t){return{current:t}}function O(t){0>ee||(t.current=oe[ee],oe[ee]=null,ee--)}function H(t,r){ee++,oe[ee]=t.current,t.current=r}var I=_(null),V=_(null),ne=_(null),J=_(null);function me(t,r){switch(H(ne,r),H(V,t),H(I,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?zy(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=zy(r),t=Py(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}O(I),H(I,t)}function pe(){O(I),O(V),O(ne)}function G(t){t.memoizedState!==null&&H(J,t);var r=I.current,s=Py(r,t.type);r!==s&&(H(V,t),H(I,s))}function se(t){V.current===t&&(O(I),O(V)),J.current===t&&(O(J),wl._currentValue=re)}var ge,je;function Ae(t){if(ge===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);ge=r&&r[1]||"",je=-1<s.stack.indexOf(`
|
||||
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||||
`+ge+t+je}var Qe=!1;function ct(t,r){if(!t||Qe)return"";Qe=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(X){var W=X}Reflect.construct(t,[],le)}else{try{le.call()}catch(X){W=X}t.call(le.prototype)}}else{try{throw Error()}catch(X){W=X}(le=t())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(X){if(X&&W&&typeof X.stack=="string")return[X.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),w=b[0],T=b[1];if(w&&T){var D=w.split(`
|
||||
`),Y=T.split(`
|
||||
`);for(g=u=0;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;for(;g<Y.length&&!Y[g].includes("DetermineComponentFrameRoot");)g++;if(u===D.length||g===Y.length)for(u=D.length-1,g=Y.length-1;1<=u&&0<=g&&D[u]!==Y[g];)g--;for(;1<=u&&0<=g;u--,g--)if(D[u]!==Y[g]){if(u!==1||g!==1)do if(u--,g--,0>g||D[u]!==Y[g]){var te=`
|
||||
`+D[u].replace(" at new "," at ");return t.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",t.displayName)),te}while(1<=u&&0<=g);break}}}finally{Qe=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Ae(s):""}function Tt(t,r){switch(t.tag){case 26:case 27:case 5:return Ae(t.type);case 16:return Ae("Lazy");case 13:return t.child!==r&&r!==null?Ae("Suspense Fallback"):Ae("Suspense");case 19:return Ae("SuspenseList");case 0:case 15:return ct(t.type,!1);case 11:return ct(t.type.render,!1);case 1:return ct(t.type,!0);case 31:return Ae("Activity");default:return""}}function Ca(t){try{var r="",s=null;do r+=Tt(t,s),s=t,t=t.return;while(t);return r}catch(u){return`
|
||||
Error generating stack: `+u.message+`
|
||||
`+u.stack}}var Rt=Object.prototype.hasOwnProperty,Os=e.unstable_scheduleCallback,Ds=e.unstable_cancelCallback,Yt=e.unstable_shouldYield,$r=e.unstable_requestPaint,Wt=e.unstable_now,gd=e.unstable_getCurrentPriorityLevel,ja=e.unstable_ImmediatePriority,xi=e.unstable_UserBlockingPriority,Ea=e.unstable_NormalPriority,Ls=e.unstable_LowPriority,dr=e.unstable_IdlePriority,Si=e.log,Ir=e.unstable_setDisableYieldValue,Na=null,qt=null;function $n(t){if(typeof Si=="function"&&Ir(t),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(Na,t)}catch{}}var Ht=Math.clz32?Math.clz32:Xn,vd=Math.log,zs=Math.LN2;function Xn(t){return t>>>=0,t===0?32:31-(vd(t)/zs|0)|0}var fo=256,mo=262144,ka=4194304;function Zn(t){var r=t&42;if(r!==0)return r;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Te(t,r,s){var u=t.pendingLanes;if(u===0)return 0;var g=0,b=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var T=u&134217727;return T!==0?(u=T&~b,u!==0?g=Zn(u):(w&=T,w!==0?g=Zn(w):s||(s=T&~t,s!==0&&(g=Zn(s))))):(T=u&~b,T!==0?g=Zn(T):w!==0?g=Zn(w):s||(s=u&~t,s!==0&&(g=Zn(s)))),g===0?0:r!==0&&r!==g&&(r&b)===0&&(b=g&-g,s=r&-r,b>=s||b===32&&(s&4194048)!==0)?r:g}function ut(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function At(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vt(){var t=ka;return ka<<=1,(ka&62914560)===0&&(ka=4194304),t}function Ur(t){for(var r=[],s=0;31>s;s++)r.push(t);return r}function mt(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Zt(t,r,s,u,g,b){var w=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var T=t.entanglements,D=t.expirationTimes,Y=t.hiddenUpdates;for(s=w&~s;0<s;){var te=31-Ht(s),le=1<<te;T[te]=0,D[te]=-1;var W=Y[te];if(W!==null)for(Y[te]=null,te=0;te<W.length;te++){var X=W[te];X!==null&&(X.lane&=-536870913)}s&=~le}u!==0&&Ta(t,u,0),b!==0&&g===0&&t.tag!==0&&(t.suspendedLanes|=b&~(w&~r))}function Ta(t,r,s){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-Ht(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|s&261930}function Qt(t,r){var s=t.entangledLanes|=r;for(t=t.entanglements;s;){var u=31-Ht(s),g=1<<u;g&r|t[u]&r&&(t[u]|=r),s&=~g}}function Jt(t,r){var s=r&-r;return s=(s&42)!==0?1:po(s),(s&(t.suspendedLanes|r))!==0?0:s}function po(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function In(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function bd(){var t=K.p;return t!==0?t:(t=window.event,t===void 0?32:s1(t.type))}function wg(t,r){var s=K.p;try{return K.p=t,r()}finally{K.p=s}}var Hr=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Hr,en="__reactProps$"+Hr,ho="__reactContainer$"+Hr,yd="__reactEvents$"+Hr,b5="__reactListeners$"+Hr,y5="__reactHandles$"+Hr,Cg="__reactResources$"+Hr,Ps="__reactMarker$"+Hr;function xd(t){delete t[Lt],delete t[en],delete t[yd],delete t[b5],delete t[y5]}function go(t){var r=t[Lt];if(r)return r;for(var s=t.parentNode;s;){if(r=s[ho]||s[Lt]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(t=Gy(t);t!==null;){if(s=t[Lt])return s;t=Gy(t)}return r}t=s,s=t.parentNode}return null}function vo(t){if(t=t[Lt]||t[ho]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function Bs(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(o(33))}function bo(t){var r=t[Cg];return r||(r=t[Cg]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function _t(t){t[Ps]=!0}var jg=new Set,Eg={};function Ra(t,r){yo(t,r),yo(t+"Capture",r)}function yo(t,r){for(Eg[t]=r,t=0;t<r.length;t++)jg.add(r[t])}var x5=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\
Line truncated
|
||||
`).replace(ZE,"")}function Dy(t,r){return r=Oy(r),Oy(t)===r}function et(t,r,s,u,g,b){switch(s){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||So(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&So(t,""+u);break;case"className":Ci(t,"class",u);break;case"tabIndex":Ci(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ci(t,s,u);break;case"style":Dg(t,u,b);break;case"data":if(r!=="object"){Ci(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||s!=="href")){t.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(s);break}u=Ei(""+u),t.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(s,"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}else typeof b=="function"&&(s==="formAction"?(r!=="input"&&et(t,r,"name",g.name,g,null),et(t,r,"formEncType",g.formEncType,g,null),et(t,r,"formMethod",g.formMethod,g,null),et(t,r,"formTarget",g.formTarget,g,null)):(et(t,r,"encType",g.encType,g,null),et(t,r,"method",g.method,g,null),et(t,r,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(s);break}u=Ei(""+u),t.setAttribute(s,u);break;case"onClick":u!=null&&(t.onclick=mr);break;case"onScroll":u!=null&&Pe("scroll",t);break;case"onScrollEnd":u!=null&&Pe("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(g.children!=null)throw Error(o(60));t.innerHTML=s}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}s=Ei(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,""+u):t.removeAttribute(s);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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":u===!0?t.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,u):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(s,u):t.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(s):t.setAttribute(s,u);break;case"popover":Pe("beforetoggle",t),Pe("toggle",t),wi(t,"popover",u);break;case"xlinkActuate":fr(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":fr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":fr(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":fr(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":fr(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":fr(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":fr(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":fr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":fr(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":wi(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=E5.get(s)||s,wi(t,s,u))}}function dm(t,r,s,u,g,b){switch(s){case"style":Dg(t,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(g.children!=null)throw Error(o(60));t.innerHTML=s}}break;case"children":typeof u=="string"?So(t,u):(typeof u=="number"||typeof u=="bigint")&&So(t,""+u);break;case"onScroll":u!=null&&Pe("scroll",t);break;case"onScrollEnd":u!=null&&Pe("scrollend",t);break;case"onClick":u!=null&&(t.onclick=mr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
||||
* react-router v7.15.1
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/var j1="popstate";function E1(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function UN(e={}){function n(o,l){var p;let i=(p=l.state)==null?void 0:p.masked,{pathname:d,search:m,hash:h}=i||o.location;return pp("",{pathname:d,search:m,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default",i?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function a(o,l){return typeof l=="string"?l:Il(l)}return VN(n,a,null,e)}function ft(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Pn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function HN(){return Math.random().toString(36).substring(2,10)}function N1(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function pp(e,n,a=null,o,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?ws(n):n,state:a,key:n&&n.key||o||HN(),mask:l}}function Il({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function ws(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let o=e.indexOf("?");o>=0&&(n.search=e.substring(o),e=e.substring(0,o)),e&&(n.pathname=e)}return n}function VN(e,n,a,o={}){let{window:l=document.defaultView,v5Compat:i=!1}=o,d=l.history,m="POP",h=null,p=y();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function y(){return(d.state||{idx:null}).idx}function v(){m="POP";let N=y(),E=N==null?null:N-p;p=N,h&&h({action:m,location:C.location,delta:E})}function x(N,E){m="PUSH";let k=E1(N)?N:pp(C.location,N,E);p=y()+1;let A=N1(k,p),R=C.createHref(k.mask||k);try{d.pushState(A,"",R)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(R)}i&&h&&h({action:m,location:C.location,delta:1})}function S(N,E){m="REPLACE";let k=E1(N)?N:pp(C.location,N,E);p=y();let A=N1(k,p),R=C.createHref(k.mask||k);d.replaceState(A,"",R),i&&h&&h({action:m,location:C.location,delta:0})}function j(N){return GN(N)}let C={get action(){return m},get location(){return e(l,d)},listen(N){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(j1,v),h=N,()=>{l.removeEventListener(j1,v),h=null}},createHref(N){return n(l,N)},createURL:j,encodeLocation(N){let E=j(N);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:S,go(N){return d.go(N)}};return C}function GN(e,n=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),ft(a,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Il(e);return o=o.replace(/ $/,"%20"),!n&&o.startsWith("//")&&(o=a+o),new URL(o,a)}function Qx(e,n,a="/"){return FN(e,n,a,!1)}function FN(e,n,a,o,l){let i=typeof n=="string"?ws(n):n,d=Or(i.pathname||"/",a);if(d==null)return null;let m=YN(e),h=null,p=a3(d);for(let y=0;h==null&&y<m.length;++y)h=n3(m[y],p,o);return h}function YN(e){let n=Jx(e);return WN(n),n}function Jx(e,n=[],a=[],o="",l=!1){let i=(d,m,h=l,p)=>{let y={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&h)return;ft(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let v=Fn([o,y.relativePath]),x=a.concat(y);d.children&&d.children.length>0&&(ft(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Jx(d.children,n,x,v,h)),!(d.path==null&&!d.index)&&n.push({path:v,score:e3(v,d.index),routesMeta:x})};return e.forEach((d,m)=>{var h;if(d.path===""||!((h=d.path)!=null&&h.includes("?")))i(d,m);else for(let p of e0(d.path))i(d,m,!0,p)}),n}function e0(e){let n=e.split("/");if(n.length===0)return[];let[a,...o]=n,l=a.endsWith("?"),i=a.replace(/\?$/,"");if(o.length===0)return l?[i,""]:[i];let d=e0(o.join("/")),m=[];return m.push(...d.map(h=>h===""?i:[i,h].join("/"))),l&&m.push(...d),m.map(h=>e.startsWith("/")&&h===""?"/":h)}function WN(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:t3(n.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var qN=/^:[\w-]+$/,KN=3,XN=2,ZN=1,QN=10,JN=-2,k1=e=>e==="*";function e3(e,n){let a=e.split("/"),o=a.length;return a.some(k1)&&(o+=JN),n&&(o+=XN),a.filter(l=>!k1(l)).reduce((l,i)=>l+(qN.test(i)?KN:i===""?ZN:QN),o)}function t3(e,n){return e.length===n.length&&e.slice(0,-1).every((o,l)=>o===n[l])?e[e.length-1]-n[n.length-1]:0}function n3(e,n,a=!1){let{routesMeta:o}=e,l={},i="/",d=[];for(let m=0;m<o.length;++m){let h=o[m],p=m===o.length-1,y=i==="/"?n:n.slice(i.length)||"/",v=au({path:h.relativePath,caseSensit
Line truncated
|
||||
|
||||
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let y=Sn(),v;if(n){let E=typeof n=="string"?ws(n):n;ft(h==="/"||((N=E.pathname)==null?void 0:N.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${E.pathname}" was given in the \`location\` prop.`),v=E}else v=y;let x=v.pathname||"/",S=x;if(h!=="/"){let E=h.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let j=a&&a.state.matches.length?a.state.matches.map(E=>Object.assign(E,{route:a.manifest[E.route.id]||E.route})):Qx(e,{pathname:S});Pn(p||j!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Pn(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=_3(j&&j.map(E=>Object.assign({},E,{params:Object.assign({},d,E.params),pathname:Fn([h,o.encodeLocation?o.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?h:Fn([h,o.encodeLocation?o.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),l,a);return n&&C?f.createElement(Zl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},C):C}function k3(){let e=z3(),n=f3(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},i={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:i},"ErrorBoundary")," or"," ",f.createElement("code",{style:i},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},n),a?f.createElement("pre",{style:l},a):null,d)}var T3=f.createElement(k3,null),d0=class extends f.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=S3(e.digest);a&&(e=a)}let n=e!==void 0?f.createElement(qn.Provider,{value:this.props.routeContext},f.createElement(ah.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?f.createElement(R3,{error:e},n):n}};d0.contextType=o0;var zm=new WeakMap;function R3({children:e,error:n}){let{basename:a}=f.useContext(xn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let o=x3(n.digest);if(o){let l=zm.get(n);if(l)throw l;let i=r0(o.location,a);if(n0&&!zm.get(n))if(i.isExternal||o.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:o.replace}));throw zm.set(n,d),d}return f.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function A3({routeContext:e,match:n,children:a}){let o=f.useContext(Cs);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(qn.Provider,{value:e},a)}function _3(e,n=[],a){let o=a==null?void 0:a.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let l=e,i=o==null?void 0:o.errors;if(i!=null){let y=l.findIndex(v=>v.route.id&&(i==null?void 0:i[v.route.id])!==void 0);ft(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),l=l.slice(0,Math.min(l.length,y+1))}let d=!1,m=-1;if(a&&o){d=o.renderFallback;for(let y=0;y<l.length;y++){let v=l[y];if((v.route.HyLine truncated
|
||||
.`.concat(c6,` {
|
||||
overflow: hidden `).concat(o,`;
|
||||
padding-right: `).concat(m,"px ").concat(o,`;
|
||||
}
|
||||
body[`).concat(us,`] {
|
||||
overflow: hidden `).concat(o,`;
|
||||
overscroll-behavior: contain;
|
||||
`).concat([n&&"position: relative ".concat(o,";"),a==="margin"&&`
|
||||
padding-left: `.concat(l,`px;
|
||||
padding-top: `).concat(i,`px;
|
||||
padding-right: `).concat(d,`px;
|
||||
margin-left:0;
|
||||
margin-top:0;
|
||||
margin-right: `).concat(m,"px ").concat(o,`;
|
||||
`),a==="padding"&&"padding-right: ".concat(m,"px ").concat(o,";")].filter(Boolean).join(""),`
|
||||
}
|
||||
|
||||
.`).concat(Qc,` {
|
||||
right: `).concat(m,"px ").concat(o,`;
|
||||
}
|
||||
|
||||
.`).concat(Jc,` {
|
||||
margin-right: `).concat(m,"px ").concat(o,`;
|
||||
}
|
||||
|
||||
.`).concat(Qc," .").concat(Qc,` {
|
||||
right: 0 `).concat(o,`;
|
||||
}
|
||||
|
||||
.`).concat(Jc," .").concat(Jc,` {
|
||||
margin-right: 0 `).concat(o,`;
|
||||
}
|
||||
|
||||
body[`).concat(us,`] {
|
||||
`).concat(u6,": ").concat(m,`px;
|
||||
}
|
||||
`)},cx=function(){var e=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(e)?e:0},R6=function(){f.useEffect(function(){return document.body.setAttribute(us,(cx()+1).toString()),function(){var e=cx()-1;e<=0?document.body.removeAttribute(us):document.body.setAttribute(us,e.toString())}},[])},A6=function(e){var n=e.noRelative,a=e.noImportant,o=e.gapMode,l=o===void 0?"margin":o;R6();var i=f.useMemo(function(){return N6(l)},[l]);return f.createElement(k6,{styles:T6(i,!n,l,a?"":"!important")})},Ep=!1;if(typeof window<"u")try{var Uc=Object.defineProperty({},"passive",{get:function(){return Ep=!0,!0}});window.addEventListener("test",Uc,Uc),window.removeEventListener("test",Uc,Uc)}catch{Ep=!1}var es=Ep?{passive:!1}:!1,_6=function(e){return e.tagName==="TEXTAREA"},P2=function(e,n){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!_6(e)&&a[n]==="visible")},M6=function(e){return P2(e,"overflowY")},O6=function(e){return P2(e,"overflowX")},ux=function(e,n){var a=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var l=B2(e,o);if(l){var i=$2(e,o),d=i[1],m=i[2];if(d>m)return!0}o=o.parentNode}while(o&&o!==a.body);return!1},D6=function(e){var n=e.scrollTop,a=e.scrollHeight,o=e.clientHeight;return[n,a,o]},L6=function(e){var n=e.scrollLeft,a=e.scrollWidth,o=e.clientWidth;return[n,a,o]},B2=function(e,n){return e==="v"?M6(n):O6(n)},$2=function(e,n){return e==="v"?D6(n):L6(n)},z6=function(e,n){return e==="h"&&n==="rtl"?-1:1},P6=function(e,n,a,o,l){var i=z6(e,window.getComputedStyle(n).direction),d=i*o,m=a.target,h=n.contains(m),p=!1,y=d>0,v=0,x=0;do{if(!m)break;var S=$2(e,m),j=S[0],C=S[1],N=S[2],E=C-N-i*j;(j||E)&&B2(e,m)&&(v+=E,x+=j);var k=m.parentNode;m=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!h&&m!==document.body||h&&(n.contains(m)||n===m));return(y&&Math.abs(v)<1||!y&&Math.abs(x)<1)&&(p=!0),p},Hc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dx=function(e){return[e.deltaX,e.deltaY]},fx=function(e){return e&&"current"in e?e.current:e},B6=function(e,n){return e[0]===n[0]&&e[1]===n[1]},$6=function(e){return`
|
||||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||||
`)},I6=0,ts=[];function U6(e){var n=f.useRef([]),a=f.useRef([0,0]),o=f.useRef(),l=f.useState(I6++)[0],i=f.useState(z2)[0],d=f.useRef(e);f.useEffect(function(){d.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var C=i6([e.lockRef.current],(e.shards||[]).map(fx),!0).filter(Boolean);return C.forEach(function(N){return N.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),C.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var m=f.useCallback(function(C,N){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!d.current.allowPinchZoom;var E=Hc(C),k=a.current,A="deltaX"in C?C.deltaX:k[0]-E[0],R="deltaY"in C?C.deltaY:k[1]-E[1],L,z=C.target,B=Math.abs(A)>Math.abs(R)?"h":"v";if("touches"in C&&B==="h"&&z.type==="range")return!1;var U=window.getSelection(),q=U&&U.anchorNode,Z=q?q===z||q.contains(z):!1;if(Z)return!1;var Q=ux(B,z);if(!Q)return!0;if(Q?L=B:(L=B==="v"?"h":"v",Q=ux(B,z)),!Q)return!1;if(!o.current&&"changedTouches"in C&&(A||R)&&(o.current=L),!L)return!0;var fe=o.current||L;return P6(fe,N,C,fe==="h"?A:R)},[]),h=f.useCallback(function(C){var N=C;if(!(!ts.length||ts[ts.length-1]!==i)){var E="deltaY"in N?dx(N):Hc(N),k=n.current.filter(function(L){return L.name===N.type&&(L.target===N.target||N.target===L.shadowParent)&&B6(L.delta,E)})[0];if(k&&k.should){N.cancelable&&N.preventDefault();return}if(!k){var A=(d.current.shards||[]).map(fx).filter(Boolean).filter(function(L){return L.contains(N.target)}),R=A.length>0?m(N,A[0]):!d.current.noIsolation;R&&N.cancelable&&N.preventDefault()}}},[]),p=f.useCallback(function(C,N,E,k){var A={name:C,delta:N,target:E,should:k,shadowParent:H6(E)};n.current.push(A),setTimeout(function(){n.current=n.current.filter(function(R){return R!==A})},1)},[]),y=f.useCallback(function(C){a.current=Hc(C),o.current=void 0},[]),v=f.useCallback(function(C){p(C.type,dx(C),C.target,m(C,e.lockRef.current))},[]),x=f.useCallback(function(C){p(C.type,Hc(C),C.target,m(C,e.lockRef.current))},[]);f.useEffect(function(){return ts.push(i),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",h,es),document.addEventListener("touchmove",h,es),document.addEventListener("touchstart",y,es),function(){ts=ts.filter(function(C){return C!==i}),document.removeEventListener("wheel",h,es),document.removeEventListener("touchmove",h,es),document.removeEventListener("touchstart",y,es)}},[]);var S=e.removeScrollBar,j=e.inert;return f.createElement(f.Fragment,null,j?f.createElement(i,{styles:$6(l)}):null,S?f.createElement(A6,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function H6(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const V6=v6(L2,U6);var si=f.forwardRef(function(e,n){return f.createElement(Fu,or({},e,{ref:n,sideCar:V6}))});si.classNames=Fu.classNames;var Np=["Enter"," "],G6=["ArrowDown","PageUp","Home"],I2=["ArrowUp","PageDown","End"],F6=[...G6,...I2],Y6={ltr:[...Np,"ArrowRight"],rtl:[...Np,"ArrowLeft"]},W6={ltr:["ArrowLeft"],rtl:["ArrowRight"]},li="Menu",[Gl,q6,K6]=jh(li),[io,U2]=uk(li,[K6,ba,Vu]),Yu=ba(),H2=Vu(),[X6,co]=io(li),[Z6,ii]=io(li),V2=e=>{const{__scopeMenu:n,open:a=!1,children:o,dir:l,onOpenChange:i,modal:d=!0}=e,m=Yu(n),[h,p]=f.useState(null),y=f.useRef(!1),v=Ot(i),x=ei(l);return f.useEffect(()=>{const S=()=>{y.current=!0,document.addEventListener("pointerdown",j,{capture:!0,once:!0}),document.addEventListener("pointermove",j,{capture:!0,once:!0})},j=()=>y.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",j,{capture:!0}),document.removeEventListener("pointermove",j,{capture:!0})}},[]),c.jsx(Iu,{...m,children:c.jsx(X6,{scope:n,open:a,onOpenChange:v,content:h,onContentChange:p,children:c.jsx(Z6,{scope:n,onClose:f.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:y,dir:x,modal:d,children:o})})})};V2.displayName=li;var Q6="MenuAnchor",Oh=f.forwardRef((e,n)=>{const{__scopeMenu:a,...o}=e,l=Yu(a);return c.jsx(ri,{...l,...o,ref:n})});Oh.displayName=Q6;var Dh="MenuPortal",[J6,G2]=io(Dh,{forceMount:void 0}),F2=e=>{const{__scopeMenu:n,forceMount:a,children:o,container:l}=e,i=co(Dh,n);return c.jsx(J6,{scope:n,forceMount:a,children:c.jsx(Ut,{present:a||i.open,children:c.jsx(As,{asChild:!0,container:l,children:o})})})};F2.displayName=Dh;var zn="MenuContent",[eR,Lh]=io(zn),Y2=f.forwardRef((e,n)=>{const a=G2(zn,e.__scopeMenu),{forceMount:o=a.forceMount,...l}=e,i=co(zn,e.__scopeMenu),d=ii(zn,e.__scopeMenu);return c.jsx(Gl.Provider,{scope:e.__scopeMenu,children:c.jsx(Ut,{present:o||i.open,children:c.jsx(Gl.Slot,{scope:e.__scopeMenu,children:d.modal?c.jsx(tR,{...l,ref:n}):c.jsx(nR,{...l,ref:n})})})})}),tR=f.forwardRef((e,n)=>{const a=co(zn,e.__scopeMenu),o=f.useRe
Line truncated
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const OS=(...e)=>e.filter((n,a,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===a).join(" ").trim();/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const JR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const eA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,o)=>o?o.toUpperCase():a.toLowerCase());/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const px=e=>{const n=eA(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var Qm={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"};/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const tA=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},nA=f.createContext({}),rA=()=>f.useContext(nA),aA=f.forwardRef(({color:e,size:n,strokeWidth:a,absoluteStrokeWidth:o,className:l="",children:i,iconNode:d,...m},h)=>{const{size:p=24,strokeWidth:y=2,absoluteStrokeWidth:v=!1,color:x="currentColor",className:S=""}=rA()??{},j=o??v?Number(a??y)*24/Number(n??p):a??y;return f.createElement("svg",{ref:h,...Qm,width:n??p??Qm.width,height:n??p??Qm.height,stroke:e??x,strokeWidth:j,className:OS("lucide",S,l),...!i&&!tA(m)&&{"aria-hidden":"true"},...m},[...d.map(([C,N])=>f.createElement(C,N)),...Array.isArray(i)?i:[i]])});/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ya=(e,n)=>{const a=f.forwardRef(({className:o,...l},i)=>f.createElement(aA,{ref:i,iconNode:n,className:OS(`lucide-${JR(px(e))}`,`lucide-${e}`,o),...l}));return a.displayName=px(e),a};/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const oA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],DS=ya("check",oA);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const sA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],LS=ya("chevron-down",sA);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const lA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],iA=ya("chevron-right",lA);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const cA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],uA=ya("chevron-up",cA);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const dA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fA=ya("circle",dA);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const mA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],pA=ya("panel-left",mA);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const hA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],gA=ya("search",hA);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const vA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zS=ya("x",vA),Ih=XR,Uh=ZR,bA=f.forwardRef(({className:e,inset:n,children:a,...o},l)=>c.jsxs(_S,{ref:l,className:ie("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8",e),...o,children:[a,c.jsx(iA,{className:"ml-auto"})]}));bA.displayName=_S.displayName;const yA=f.forwardRef(({className:e,...n},a)=>c.jsx(MS,{ref:a,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n}));yA.displayName=MS.displayName;const Ku=f.forwardRef(({className:e,sideOffset:n=4,...a},o)=>c.jsx(QR,{children:c.jsx(jS,{ref:o,sideOffset:n,className:ie("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...a})}));Ku.displayName=jS.displayName;const Yl=f.forwardRef(({className:e,inset:n,...a},o)=>c.jsx(NS,{ref:o,className:ie("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",e),...a}));Yl.displayName=NS.displayName;const xA=f.forwardRef(({className:e,children:n,checked:a,...o},l)=>c.jsxs(kS,{ref:l,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(RS,{children:c.jsx(DS,{className:"h-4 w-4"})})}),n]}));xA.displayName=kS.displayName;const SA=f.forwardRef(({className:e,children:n,...a},o)=>c.jsxs(TS,{ref:o,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(RS,{children:c.jsx(fA,{className:"h-2 w-2 fill-current"})})}),n]}));SA.displayName=TS.displayName;const Hh=f.forwardRef(({className:e,inset:n,...a},o)=>c.jsx(ES,{ref:o,className:ie("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...a}));Hh.displayName=ES.displayName;const hu=f.forwardRef(({className:e,...n},a)=>c.jsx(AS,{ref:a,className:ie("-mx-1 my-1 h-px bg-muted",e),...n}));hu.displayName=AS.displayName;const Jm=768;function wA(){const[e,n]=f.useState(void 0);return f.useEffect(()=>{const a=window.matchMedia(`(max-width: ${Jm-1}px)`),o=()=>{n(window.innerWidth<Jm)};return a.addEventListener("change",o),n(window.innerWidth<Jm),()=>a.removeEventListener("change",o)},[]),!!e}const rt=f.forwardRef(({className:e,type:n,...a},o)=>c.jsx("input",{type:n,className:ie("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...a}));rt.displayName="Input";var CA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wn=CA.reduce((e,n)=>{const a=K0(`Primitive.${n}`),o=f.forwardRef((l,i)=>{const{asChild:d,...m}=l,h=d?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(h,{...m,ref:i})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),jA="Separator",hx="horizontal",EA=["horizontal","vertical"],PS=f.forwardRef((e,n)=>{const{decorative:a,orientation:o=hx,...l}=e,i=NA(o)?o:hx,m=a?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};returnLine truncated
|
||||
|
||||
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},GA="DialogDescriptionWarning",FA=({contentRef:e,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tw(GA).contentName}}.`;return f.useEffect(()=>{var i;const l=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");n&&l&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null},Yh=HS,Wh=FS,ui=YS,di=WS,Zu=KS,Qu=ZS,nw=JS;const YA=Yh,WA=Wh,rw=f.forwardRef(({className:e,...n},a)=>c.jsx(ui,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:a}));rw.displayName=ui.displayName;const qA=Ns("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),aw=f.forwardRef(({side:e="right",className:n,children:a,...o},l)=>c.jsxs(WA,{children:[c.jsx(rw,{}),c.jsxs(di,{ref:l,className:ie(qA({side:e}),n),...o,children:[c.jsxs(nw,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(zS,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));aw.displayName=di.displayName;const ow=({className:e,...n})=>c.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",e),...n});ow.displayName="SheetHeader";const sw=f.forwardRef(({className:e,...n},a)=>c.jsx(Zu,{ref:a,className:ie("text-lg font-semibold text-foreground",e),...n}));sw.displayName=Zu.displayName;const lw=f.forwardRef(({className:e,...n},a)=>c.jsx(Qu,{ref:a,className:ie("text-sm text-muted-foreground",e),...n}));lw.displayName=Qu.displayName;function Fe({className:e,...n}){return c.jsx("div",{className:ie("animate-pulse rounded-md bg-primary/10",e),...n})}function KA(e,n=[]){let a=[];function o(i,d){const m=f.createContext(d),h=a.length;a=[...a,d];const p=v=>{var E;const{scope:x,children:S,...j}=v,C=((E=x==null?void 0:x[e])==null?void 0:E[h])||m,N=f.useMemo(()=>j,Object.values(j));return c.jsx(C.Provider,{value:N,children:S})};p.displayName=i+"Provider";function y(v,x){var C;const S=((C=x==null?void 0:x[e])==null?void 0:C[h])||m,j=f.useContext(S);if(j)return j;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${i}\``)}return[p,y]}const l=()=>{const i=a.map(d=>f.createContext(d));return function(m){const h=(m==null?void 0:m[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...m,[e]:h}}),[m,h])}};return l.scopeName=e,[o,XA(l,...n)]}function XA(...e){const n=e[0];if(e.length===1)return n;const a=()=>{const o=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(i){const d=o.reduce((m,{useScope:h,scopeName:p})=>{const v=h(i)[`__scope${p}`];return{...m,...v}},{});return f.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])}};return a.scopeName=n.scopeName,a}function ZA(e){const n=QA(e),a=f.forwardRef((o,l)=>{const{children:i,...d}=o,m=f.Children.toArray(i),h=m.find(e_);if(h){const p=h.props.children,y=m.map(v=>v===h?f.Children.count(p)>1?f.Children.only(null):f.isValidElement(p)?p.props.children:null:v);return c.jsx(n,{...d,ref:l,children:f.isValidElement(p)?f.cloneElement(p,void 0,y):null})}return c.jsx(n,{...d,ref:l,children:i})});return a.displayName=`${e}.Slot`,a}function QA(e){const n=f.forwardRef((a,o)=>{const{children:l,...i}=a;if(f.isValidElement(l)){const d=n_(l),m=t_(i,l.props);return l.type!==f.Fragment&&(m.ref=o?st(o,d):d),f.cloneElement(l,m)}return f.Children.count(l)>1?f.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var iw=Symbol("radix.slottable");function JA(e){const n=({children:a})=>c.jsx(c.Fragment,{children:a});return n.displayName=`${e}.Slottable`,n.__radixId=iw,n}function e_(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iw}function t_(e,n){const a={...n};for(const o in n){const l=e[o],i=n[o];/^on[A-Z]/.test(o)?l&&i?a[o]=(...m)=>{const h=i(...m);return l(...m),h}:l&&(a[o]=l):o==="style"?a[o]={...l,...i}:o==="className"&&(a[o]=[l,i].filter(Boolean).join(" "))}return{...e,...a}}funct
Line truncated
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var xx;function rM(){if(xx)return ap;xx=1;var e=Cu();function n(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var a=typeof Object.is=="function"?Object.is:n,o=e.useState,l=e.useEffect,i=e.useLayoutEffect,d=e.useDebugValue;function m(v,x){var S=x(),j=o({inst:{value:S,getSnapshot:x}}),C=j[0].inst,N=j[1];return i(function(){C.value=S,C.getSnapshot=x,h(C)&&N({inst:C})},[v,S,x]),l(function(){return h(C)&&N({inst:C}),v(function(){h(C)&&N({inst:C})})},[v]),d(S),S}function h(v){var x=v.getSnapshot;v=v.value;try{var S=x();return!a(v,S)}catch{return!0}}function p(v,x){return x()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return ap.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,ap}var Sx;function aM(){return Sx||(Sx=1,rp.exports=rM()),rp.exports}var oM=aM();function sM(){return oM.useSyncExternalStore(lM,()=>!0,()=>!1)}function lM(){return()=>{}}var tg="Avatar",[iM]=tM(tg),[cM,Ww]=iM(tg),qw=f.forwardRef((e,n)=>{const{__scopeAvatar:a,...o}=e,[l,i]=f.useState("idle");return c.jsx(cM,{scope:a,imageLoadingStatus:l,onImageLoadingStatusChange:i,children:c.jsx(wn.span,{...o,ref:n})})});qw.displayName=tg;var Kw="AvatarImage",Xw=f.forwardRef((e,n)=>{const{__scopeAvatar:a,src:o,onLoadingStatusChange:l=()=>{},...i}=e,d=Ww(Kw,a),m=uM(o,i),h=Ot(p=>{l(p),d.onImageLoadingStatusChange(p)});return Ct(()=>{m!=="idle"&&h(m)},[m,h]),m==="loaded"?c.jsx(wn.img,{...i,ref:n,src:o}):null});Xw.displayName=Kw;var Zw="AvatarFallback",Qw=f.forwardRef((e,n)=>{const{__scopeAvatar:a,delayMs:o,...l}=e,i=Ww(Zw,a),[d,m]=f.useState(o===void 0);return f.useEffect(()=>{if(o!==void 0){const h=window.setTimeout(()=>m(!0),o);return()=>window.clearTimeout(h)}},[o]),d&&i.imageLoadingStatus!=="loaded"?c.jsx(wn.span,{...l,ref:n}):null});Qw.displayName=Zw;function wx(e,n){return e?n?(e.src!==n&&(e.src=n),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function uM(e,{referrerPolicy:n,crossOrigin:a}){const o=sM(),l=f.useRef(null),i=o?(l.current||(l.current=new window.Image),l.current):null,[d,m]=f.useState(()=>wx(i,e));return Ct(()=>{m(wx(i,e))},[i,e]),Ct(()=>{const h=v=>()=>{m(v)};if(!i)return;const p=h("loaded"),y=h("error");return i.addEventListener("load",p),i.addEventListener("error",y),n&&(i.referrerPolicy=n),typeof a=="string"&&(i.crossOrigin=a),()=>{i.removeEventListener("load",p),i.removeEventListener("error",y)}},[i,a,n]),d}var Jw=qw,eC=Xw,tC=Qw;const gs=f.forwardRef(({className:e,...n},a)=>c.jsx(Jw,{ref:a,className:ie("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));gs.displayName=Jw.displayName;const vs=f.forwardRef(({className:e,...n},a)=>c.jsx(eC,{ref:a,className:ie("aspect-square h-full w-full",e),...n}));vs.displayName=eC.displayName;const bs=f.forwardRef(({className:e,...n},a)=>c.jsx(tC,{ref:a,className:ie("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...n}));bs.displayName=tC.displayName;const nC=f.createContext(null);function dM({children:e}){const[n,a]=f.useState([]),[o,l]=f.useState(0),[i,d]=f.useState(!0),m=f.useCallback(async()=>{try{const v=await ke.getNotifications();v.data&&(a(v.data.items),l(v.data.unreadCount))}catch{}finally{d(!1)}},[]),h=f.useCallback(async()=>{var v;try{const x=await ke.markNotificationsRead("all");a(S=>S.map(j=>({...j,read:!0}))),l(((v=x.data)==null?void 0:v.unreadCount)??0)}catch{}},[]),p=f.useCallback(async v=>{var x;try{const S=await ke.dismissNotification(v);a(j=>j.filter(C=>C.id!==v)),l(((x=S.data)==null?void 0:x.unreadCount)??0)}catch{}},[]);f.useEffect(()=>{m();const v=setInterval(m,3e4);return()=>clearInterval(v)},[m]);const y=f.useMemo(()=>({items:n,unreadCount:o,loading:i,refresh:m,markAllRead:h,dismiss:p}),[n,o,i,m,h,p]);return c.jsx(nC.Provider,{value:y,children:e})}function fM(){const e=f.useContext(nC);if(!e)throw new Error("useNotifications must be used within NotificationsProvider");return e}const mM=Ns("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ll({className:e,variant:n,...a}){return c.jsx("div",{className:ie(mM({variant:n}),e),...a})}function pM(e){const n=hM(e),a=f.forwardRef((o,l)=>{const{children:i,...d}=o,m=f.Children.toArray(i),h=m.find(vM);if(h){const p=h.props.children,y=m.map(v=>v===h?f.Children.count(p)>1?f.Children.only(null):f.isValidElement(p)?p.props.children:null:v);return c.jsx(n,{...d,ref:l,children:f.isValidElement(p)?f.cloneElement(p,void 0,y):null})}return c.jsx(n,{...d,ref:l,children:i})});return a.displayName=`${e}.SLine truncated
|
||||
--num-groups: ${i.groups.length};
|
||||
--indicator-opacity: ${i.searchMode?0:1};
|
||||
--num-skintones: ${Mx};`}),d(()=>{i.customEmoji&&i.database&&B()}),d(()=>{i.customEmoji&&i.customEmoji.length?i.groups!==Zp&&(i.groups=Zp):i.groups!==lp&&(i.currentGroupIndex&&i.currentGroupIndex--,i.groups=lp)}),d(()=>{async function G(){i.databaseLoaded&&(i.currentSkinTone=await i.database.getPreferredSkinTone())}G()}),d(()=>{i.skinTones=Array(Mx).fill().map((G,se)=>rz(i.skinToneEmoji,se))}),d(()=>{i.skinToneButtonText=i.skinTones[i.currentSkinTone]}),d(()=>{i.skinToneButtonLabel=i.i18n.skinToneLabel.replace("{skinTone}",i.i18n.skinTones[i.currentSkinTone])}),d(()=>{async function G(){const{database:se}=i,ge=(await Promise.all(WL.map(je=>se.getEmojiByUnicodeOrName(je)))).filter(Boolean);i.defaultFavoriteEmojis=ge}i.databaseLoaded&&G()});function B(){const{customEmoji:G,database:se}=i,ge=G||mp;se.customEmoji!==ge&&(se.customEmoji=ge)}d(()=>{async function G(){B();const{database:se,defaultFavoriteEmojis:ge,numColumns:je}=i,Ae=await se.getTopFavoriteEmoji(je),Qe=await ce(c5([...Ae,...ge],ct=>ct.unicode||ct.name).slice(0,je));i.currentFavorites=Qe}i.databaseLoaded&&i.defaultFavoriteEmojis&&G()});function U(G){sz(G,l,()=>{{const se=getComputedStyle(a.rootElement),ge=parseInt(se.getPropertyValue("--num-columns"),10),je=se.getPropertyValue("direction")==="rtl";i.numColumns=ge,i.isRtl=je}})}function q(G){Nz(G,l,se=>{for(const{target:ge,isIntersecting:je}of se)ge.classList.toggle("onscreen",je)})}d(()=>{async function G(){const{searchText:se,currentGroup:ge,databaseLoaded:je,customEmoji:Ae}=i;if(!je)i.currentEmojis=[],i.searchMode=!1;else if(se.length>=HL){const Qe=await M(se);i.searchText===se&&(S(Qe),j(!0))}else{const{id:Qe}=ge;if(Qe!==-1||Ae&&Ae.length){const ct=await he(Qe);i.currentGroup.id===Qe&&(S(ct),j(!1))}}}G()});const Z=()=>{tu(()=>uz(a.tabpanelElement))};d(()=>{const{currentEmojis:G,emojiVersion:se}=i,ge=G.filter(je=>je.unicode).filter(je=>Ox(je)&&!Qp.has(je.unicode));if(!se&&ge.length)S(G),tu(()=>Q(ge));else{const je=se?G:G.filter(fe);S(je),Z()}});function Q(G){iz(G,a.baselineEmoji,p)?Z():i.currentEmojis=[...i.currentEmojis]}function fe(G){return!G.unicode||!Ox(G)||Qp.get(G.unicode)}async function de(G){const se=i.emojiVersion||await cp();return G.filter(({version:ge})=>!ge||ge<=se)}async function ce(G){return az(G,i.emojiVersion||await cp())}async function he(G){const se=G===-1?i.customEmoji:await i.database.getEmojiByGroup(G);return ce(await de(se))}async function M(G){return ce(await de(await i.database.getEmojiBySearchQuery(G)))}d(()=>{}),d(()=>{function G(){const{searchMode:ge,currentEmojis:je}=i;if(ge)return[{category:"",emojis:je}];const Ae=new Map;for(const Qe of je){const ct=Qe.category||"";let Tt=Ae.get(ct);Tt||(Tt=[],Ae.set(ct,Tt)),Tt.push(Qe)}return[...Ae.entries()].map(([Qe,ct])=>({category:Qe,emojis:ct})).sort((Qe,ct)=>i.customCategorySorting(Qe.category,ct.category))}const se=G();C(se)}),d(()=>{i.activeSearchItemId=i.activeSearchItem!==-1&&i.currentEmojis[i.activeSearchItem].id}),d(()=>{const{rawSearchText:G}=i;l5(()=>{i.searchText=(G||"").trim(),i.activeSearchItem=-1})});function K(G){if(!i.searchMode||!i.currentEmojis.length)return;const se=ge=>{rr(G),i.activeSearchItem=up(ge,i.activeSearchItem,i.currentEmojis)};switch(G.key){case"ArrowDown":return se(!1);case"ArrowUp":return se(!0);case"Enter":if(i.activeSearchItem===-1)i.activeSearchItem=0;else return rr(G),_(i.currentEmojis[i.activeSearchItem].id)}}function re(G){const{target:se}=G,ge=se.closest(".nav-button");if(!ge)return;const je=parseInt(ge.dataset.groupId,10);a.searchElement.value="",i.rawSearchText="",i.searchText="",i.activeSearchItem=-1,i.currentGroupIndex=i.groups.findIndex(Ae=>Ae.id===je)}function oe(G){const{target:se,key:ge}=G,je=Ae=>{Ae&&(rr(G),Ae.focus())};switch(ge){case"ArrowLeft":return je(se.previousElementSibling);case"ArrowRight":return je(se.nextElementSibling);case"Home":return je(se.parentElement.firstElementChild);case"End":return je(se.parentElement.lastElementChild)}}async function ee(G){const se=await i.database.getEmojiByUnicodeOrName(G),ge=[...i.currentEmojis,...i.currentFavorites].find(Ae=>Ae.id===G),je=ge.unicode&&N(ge,i.currentSkinTone);return await i.database.incrementFavoriteEmojiCount(G),{emoji:se,skinTone:i.currentSkinTone,...je&&{unicode:je},...ge.name&&{name:ge.name}}}async function _(G){const se=ee(G);y("emoji-click-sync",se),y("emoji-click",await se)}function O(G){const{target:se}=G;if(!se.classList.contains("emoji"))return;rr(G);const ge=se.id.substring(4);_(ge)}function H(G){i.currentSkinTone=G,i.skinTonePickerExpanded=!1,h("skintone-button"),y("skin-tone-change",{skinTone:G}),i.database.setPreferredSkinTone(G)}function I(G){const{target:{id:se}}=G,ge=se&&se.match(/^skintone-(\d)/);if(!ge)return;rr(G);const je=parseInt(ge[1],10);H(je)}function V(G){i.skinTonePickerExpanded=!i.skinTonePickerExpanded,i.activeSkinTone=i.currentSkinTone,i.skinTonePickerExpanded&&(rr(G),tu(()=>h("skintone-list")))}d(()=>{i.skinTonePickerExpanded?a.skinToneDropdown.addEventListener("transitionend",()=>{i.s
Line truncated
|
||||
987654321098765432`,className:"min-h-[120px] font-mono text-sm"})]}),c.jsx(yi,{result:a.owners}),c.jsx("div",{className:"mt-auto",children:c.jsx(be,{type:"button",variant:"secondary",disabled:o||!e.ownerUserIds.trim(),onClick:l,children:o?"Checking with Discord…":"Verify owner IDs"})})]})}function BP({onContinue:e}){return c.jsx("div",{className:"mx-auto flex w-full max-w-lg flex-1 flex-col justify-center py-8",children:c.jsxs("div",{className:"rounded-2xl border border-border bg-card px-6 py-10 text-center md:px-10",children:[c.jsx("div",{className:"mx-auto mb-6 flex size-16 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:c.jsx(ye,{icon:Tu,size:40})}),c.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Setup complete"}),c.jsxs("p",{className:"mx-auto mt-3 max-w-sm text-sm leading-relaxed text-muted-foreground",children:["Your configuration has been saved. Restart the server for changes to take effect — stop the running process, then start it again (for example"," ",c.jsx("code",{className:"rounded-md bg-muted px-1.5 py-0.5 font-mono text-xs",children:"npm start"}),")."]}),c.jsx(Ue,{className:"mt-6 text-left",children:c.jsx(He,{children:"After restarting, sign in with Discord to open the dashboard."})}),c.jsx(be,{type:"button",size:"lg",className:"mt-8 min-w-[220px]",onClick:e,children:"Continue to sign in"})]})})}function $P({currentIndex:e,validating:n,saving:a,onBack:o,onNext:l,onFinish:i}){const d=e===fs.length-1;return c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsxs(be,{type:"button",variant:"ghost",disabled:e===0||a,onClick:o,children:[c.jsx(ye,{icon:b0,size:18,className:"mr-1"}),"Back"]}),c.jsx("div",{className:"flex flex-1 justify-end gap-2",children:d?c.jsx(be,{type:"button",size:"lg",disabled:a||n,onClick:i,className:"min-w-[200px]",children:a?"Saving…":"Finish setup"}):c.jsxs(be,{type:"button",size:"lg",disabled:n||a,onClick:l,children:["Continue",c.jsx(ye,{icon:ph,size:18,className:"ml-1"})]})})]})}function IP(){const e=crypto.randomUUID().replace(/-/g,""),n=crypto.randomUUID().replace(/-/g,"");return e+n}function UP(e){return e.split(/[\s,]+/).map(n=>n.trim()).filter(Boolean)}function Fx(e){return e==="oauth"?"oauth":e==="owners"?"owners":e}function HP(){const e=oo(),{branding:n}=Ou(),{loading:a,error:o,refresh:l,status:i}=yC(),[d,m]=f.useState(0),[h,p]=f.useState({botToken:"",secretKey:"",clientId:"",clientSecret:"",redirectUri:"",ownerUserIds:""}),[y,v]=f.useState({}),[x,S]=f.useState(!1),[j,C]=f.useState(!1),[N,E]=f.useState(""),[k,A]=f.useState(!1),R=fs[d];f.useEffect(()=>{i!=null&&i.suggestedRedirectUri&&!h.redirectUri&&p(Q=>({...Q,redirectUri:i.suggestedRedirectUri}))},[i==null?void 0:i.suggestedRedirectUri,h.redirectUri]);const L=f.useMemo(()=>({botToken:h.botToken,secretKey:h.secretKey,clientId:h.clientId,clientSecret:h.clientSecret,redirectUri:h.redirectUri,ownerUserIds:UP(h.ownerUserIds)}),[h]);async function z(){S(!0),E("");try{const Q=await ke.validateSetup(L);return v(fe=>{var de;return{...fe,...(de=Q.data)==null?void 0:de.results}}),Q.data}catch(Q){return E(Q instanceof Error?Q.message:"Validation failed"),null}finally{S(!1)}}async function B(){var de,ce;const Q=Fx(R.id),fe=await z();return!!((ce=(de=fe==null?void 0:fe.results)==null?void 0:de[Q])!=null&&ce.ok)}async function U(){const Q=Fx(R.id),fe=y[Q];!(fe!=null&&fe.ok)&&!await B()||m(de=>Math.min(de+1,fs.length-1))}async function q(){C(!0),E("");try{const Q=await z();if(!(Q!=null&&Q.ok)){E("Fix the steps marked with errors before finishing.");return}await ke.completeSetup(L),A(!0)}catch(Q){E(Q instanceof Error?Q.message:"Could not save setup")}finally{C(!1)}}function Z(){const Q={values:h,setValues:p,validation:y,validating:x};switch(R.id){case"botToken":return c.jsx(OP,{...Q,onValidate:()=>void B()});case"secretKey":return c.jsx(DP,{...Q,onGenerate:()=>p(fe=>({...fe,secretKey:IP()})),onValidate:()=>void B()});case"oauth":return c.jsx(LP,{...Q,onValidate:()=>void B()});case"redirectUri":return c.jsx(zP,{values:h,setValues:p,validation:y});case"owners":return c.jsx(PP,{...Q,onValidate:()=>void B()})}}return a?c.jsx("div",{className:"min-h-svh bg-background px-4 py-10",children:c.jsxs("div",{className:"mx-auto max-w-6xl space-y-8",children:[c.jsx(Fe,{className:"h-14 w-64"}),c.jsxs("div",{className:"grid gap-8 lg:grid-cols-[280px_1fr]",children:[c.jsx(Fe,{className:"hidden h-80 lg:block"}),c.jsx(Fe,{className:"h-[520px] rounded-2xl"})]})]})}):c.jsxs(AP,{brandingTitle:n.title,faviconUrl:n.faviconUrl,faviconVersion:n.updatedAt,hasFavicon:n.hasFavicon,children:[o?c.jsx(Ue,{variant:"destructive",className:"mb-6",children:c.jsx(He,{children:o})}):null,N?c.jsx(Ue,{variant:"destructive",className:"mb-6",children:c.jsx(He,{children:N})}):null,k?c.jsx(BP,{onContinue:async()=>{await l(),e("/login",{replace:!0})}}):c.jsxs("div",{className:"grid flex-1 gap-8 lg:grid-cols-[minmax(0,280px)_1fr]",children:[c.jsx(_P,{currentIndex:d,validation:y})
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Poppins,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 240 10% 4%;--foreground: 0 0% 98%;--card: 240 7% 11%;--card-foreground: 0 0% 98%;--popover: 240 8% 10%;--popover-foreground: 0 0% 98%;--primary: 263 70% 58%;--primary-foreground: 0 0% 100%;--secondary: 240 6% 14%;--secondary-foreground: 0 0% 90%;--muted: 240 6% 14%;--muted-foreground: 240 5%Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Poppins,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 240 10% 4%;--foreground: 0 0% 98%;--card: 240 8% 8%;--card-foreground: 0 0% 98%;--popover: 240 8% 10%;--popover-foreground: 0 0% 98%;--primary: 263 70% 58%;--primary-foreground: 0 0% 100%;--secondary: 240 6% 14%;--secondary-foreground: 0 0% 90%;--muted: 240 6% 14%;--muted-foreground: 240 5% Line truncated
|
||||
@@ -1,187 +0,0 @@
|
||||
function XE(t,r){for(var a=0;a<r.length;a++){const o=r[a];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in t)){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(t,s,c.get?c:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function a(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=a(s);fetch(s.href,c)}})();function zb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var tm={exports:{}},us={};/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var p1;function KE(){if(p1)return us;p1=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(o,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var m in s)m!=="key"&&(c[m]=s[m])}else c=s;return s=c.ref,{$$typeof:t,type:o,key:f,ref:s!==void 0?s:null,props:c}}return us.Fragment=r,us.jsx=a,us.jsxs=a,us}var h1;function ZE(){return h1||(h1=1,tm.exports=KE()),tm.exports}var u=ZE(),nm={exports:{}},je={};/**
|
||||
* @license React
|
||||
* react.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var g1;function QE(){if(g1)return je;g1=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function C(M){return M===null||typeof M!="object"?null:(M=x&&M[x]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,j={};function N(M,D,H){this.props=M,this.context=D,this.refs=j,this.updater=H||E}N.prototype.isReactComponent={},N.prototype.setState=function(M,D){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,D,"setState")},N.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=N.prototype;function k(M,D,H){this.props=M,this.context=D,this.refs=j,this.updater=H||E}var T=k.prototype=new A;T.constructor=k,w(T,N.prototype),T.isPureReactComponent=!0;var z=Array.isArray;function P(){}var B={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function W(M,D,H){var U=H.ref;return{$$typeof:t,type:M,key:D,ref:U!==void 0?U:null,props:H}}function oe(M,D){return W(M.type,D,M.props)}function ie(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function me(M){var D={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(H){return D[H]})}var de=/\/+/g;function se(M,D){return typeof M=="object"&&M!==null&&M.key!=null?me(""+M.key):D.toString(36)}function fe(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(P,P):(M.status="pending",M.then(function(D){M.status==="pending"&&(M.status="fulfilled",M.value=D)},function(D){M.status==="pending"&&(M.status="rejected",M.reason=D)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function _(M,D,H,U,I){var J=typeof M;(J==="undefined"||J==="boolean")&&(M=null);var K=!1;if(M===null)K=!0;else switch(J){case"bigint":case"string":case"number":K=!0;break;case"object":switch(M.$$typeof){case t:case r:K=!0;break;case b:return K=M._init,_(K(M._payload),D,H,U,I)}}if(K)return I=I(M),K=U===""?"."+se(M,0):U,z(I)?(H="",K!=null&&(H=K.replace(de,"$&/")+"/"),_(I,D,H,"",function(we){return we})):I!=null&&(ie(I)&&(I=oe(I,H+(I.key==null||M&&M.key===I.key?"":(""+I.key).replace(de,"$&/")+"/")+K)),D.push(I)),1;K=0;var ce=U===""?".":U+":";if(z(M))for(var ue=0;ue<M.length;ue++)U=M[ue],J=ce+se(U,ue),K+=_(U,D,H,J,I);else if(ue=C(M),typeof ue=="function")for(M=ue.call(M),ue=0;!(U=M.next()).done;)U=U.value,J=ce+se(U,ue++),K+=_(U,D,H,J,I);else if(J==="object"){if(typeof M.then=="function")return _(fe(M),D,H,U,I);throw D=String(M),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return K}function q(M,D,H){if(M==null)return M;var U=[],I=0;return _(M,U,"","",function(J){return D.call(H,J,I++)}),U}function ee(M){if(M._status===-1){var D=M._result;D=D(),D.then(function(H){(M._status===0||M._status===-1)&&(M._status=1,M._result=H)},function(H){(M._status===0||M._status===-1)&&(M._status=2,M._result=H)}),M._status===-1&&(M._status=0,M._result=D)}if(M._status===1)return M._result.default;throw M._result}var ne=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},Q={map:q,forEach:function(M,D,H){q(M,function(){D.apply(this,arguments)},H)},count:function(M){var D=0;return q(M,function(){D++}),D},toArray:function(M){return q(M,function(D){return D})||[]},only:function(M){if(!ie(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return je.Activity=v,je.Children=Q,je.Component=N,je.Fragment=a,je.Profiler=s,je.PureComponent=k,je.StrictMode=o,je.Suspense=g,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,je.__COMPILER_RUNTIME={__proto__:null,c:function(M){return B.H.useMemoCache(M)}},je.cache=function(M){return function(){return M.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(M,D,H){if(M==null)throw Error("The argument must be a React element, but youLine truncated
|
||||
* @license React
|
||||
* scheduler.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var y1;function JE(){return y1||(y1=1,(function(t){function r(_,q){var ee=_.length;_.push(q);e:for(;0<ee;){var ne=ee-1>>>1,Q=_[ne];if(0<s(Q,q))_[ne]=q,_[ee]=Q,ee=ne;else break e}}function a(_){return _.length===0?null:_[0]}function o(_){if(_.length===0)return null;var q=_[0],ee=_.pop();if(ee!==q){_[0]=ee;e:for(var ne=0,Q=_.length,M=Q>>>1;ne<M;){var D=2*(ne+1)-1,H=_[D],U=D+1,I=_[U];if(0>s(H,ee))U<Q&&0>s(I,H)?(_[ne]=I,_[U]=ee,ne=U):(_[ne]=H,_[D]=ee,ne=D);else if(U<Q&&0>s(I,ee))_[ne]=I,_[U]=ee,ne=U;else break e}}return q}function s(_,q){var ee=_.sortIndex-q.sortIndex;return ee!==0?ee:_.id-q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,m=f.now();t.unstable_now=function(){return f.now()-m}}var g=[],h=[],b=1,v=null,x=3,C=!1,E=!1,w=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function T(_){for(var q=a(h);q!==null;){if(q.callback===null)o(h);else if(q.startTime<=_)o(h),q.sortIndex=q.expirationTime,r(g,q);else break;q=a(h)}}function z(_){if(w=!1,T(_),!E)if(a(g)!==null)E=!0,P||(P=!0,me());else{var q=a(h);q!==null&&fe(z,q.startTime-_)}}var P=!1,B=-1,V=5,W=-1;function oe(){return j?!0:!(t.unstable_now()-W<V)}function ie(){if(j=!1,P){var _=t.unstable_now();W=_;var q=!0;try{e:{E=!1,w&&(w=!1,A(B),B=-1),C=!0;var ee=x;try{t:{for(T(_),v=a(g);v!==null&&!(v.expirationTime>_&&oe());){var ne=v.callback;if(typeof ne=="function"){v.callback=null,x=v.priorityLevel;var Q=ne(v.expirationTime<=_);if(_=t.unstable_now(),typeof Q=="function"){v.callback=Q,T(_),q=!0;break t}v===a(g)&&o(g),T(_)}else o(g);v=a(g)}if(v!==null)q=!0;else{var M=a(h);M!==null&&fe(z,M.startTime-_),q=!1}}break e}finally{v=null,x=ee,C=!1}q=void 0}}finally{q?me():P=!1}}}var me;if(typeof k=="function")me=function(){k(ie)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,se=de.port2;de.port1.onmessage=ie,me=function(){se.postMessage(null)}}else me=function(){N(ie,0)};function fe(_,q){B=N(function(){_(t.unstable_now())},q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(_){_.callback=null},t.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(_){switch(x){case 1:case 2:case 3:var q=3;break;default:q=x}var ee=x;x=q;try{return _()}finally{x=ee}},t.unstable_requestPaint=function(){j=!0},t.unstable_runWithPriority=function(_,q){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var ee=x;x=_;try{return q()}finally{x=ee}},t.unstable_scheduleCallback=function(_,q,ee){var ne=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ne+ee:ne):ee=ne,_){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=ee+Q,_={id:b++,callback:q,priorityLevel:_,startTime:ee,expirationTime:Q,sortIndex:-1},ee>ne?(_.sortIndex=ee,r(h,_),a(g)===null&&_===a(h)&&(w?(A(B),B=-1):w=!0,fe(z,ee-ne))):(_.sortIndex=Q,r(g,_),E||C||(E=!0,P||(P=!0,me()))),_},t.unstable_shouldYield=oe,t.unstable_wrapCallback=function(_){var q=x;return function(){var ee=x;x=q;try{return _.apply(this,arguments)}finally{x=ee}}}})(om)),om}var b1;function e3(){return b1||(b1=1,am.exports=JE()),am.exports}var lm={exports:{}},Bt={};/**
|
||||
* @license React
|
||||
* react-dom.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var x1;function t3(){if(x1)return Bt;x1=1;var t=Jc();function r(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(r(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(g,h,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:v==null?null:""+v,children:g,containerInfo:h,implementation:b}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Bt.createPortal=function(g,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return c(g,h,null,b)},Bt.flushSync=function(g){var h=f.T,b=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=h,o.p=b,o.d.f()}},Bt.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(g,h))},Bt.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},Bt.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var b=h.as,v=m(b,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?o.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:C}):b==="script"&&o.d.X(g,{crossOrigin:v,integrity:x,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Bt.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=m(h.as,h.crossOrigin);o.d.M(g,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(g)},Bt.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,v=m(b,h.crossOrigin);o.d.L(g,b,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Bt.preloadModule=function(g,h){if(typeof g=="string")if(h){var b=m(h.as,h.crossOrigin);o.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(g)},Bt.requestFormReset=function(g){o.d.r(g)},Bt.unstable_batchedUpdates=function(g,h){return g(h)},Bt.useFormState=function(g,h,b){return f.H.useFormState(g,h,b)},Bt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Bt.version="19.2.6",Bt}var S1;function Pb(){if(S1)return lm.exports;S1=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),lm.exports=t3(),lm.exports}/**
|
||||
* @license React
|
||||
* react-dom-client.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var C1;function n3(){if(C1)return ds;C1=1;var t=e3(),r=Jc(),a=Pb();function o(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(o(188))}function h(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(o(188));return n!==e?null:e}for(var l=e,i=n;;){var p=l.return;if(p===null)break;var y=p.alternate;if(y===null){if(i=p.return,i!==null){l=i;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===l)return g(p),e;if(y===i)return g(p),n;y=y.sibling}throw Error(o(188))}if(l.return!==i.return)l=p,i=y;else{for(var S=!1,R=p.child;R;){if(R===l){S=!0,l=p,i=y;break}if(R===i){S=!0,i=p,l=y;break}R=R.sibling}if(!S){for(R=y.child;R;){if(R===l){S=!0,l=y,i=p;break}if(R===i){S=!0,i=y,l=p;break}R=R.sibling}if(!S)throw Error(o(189))}}if(l.alternate!==i)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:n}function b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case N:return"Profiler";case j:return"StrictMode";case z:return"Suspense";case P:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case k:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case T:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return n=e.displayName||null,n!==null?n:se(e.type)||"Memo";case V:n=e._payload,e=e._init;try{return se(e(n))}catch{}}return null}var fe=Array.isArray,_=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ne=[],Q=-1;function M(e){return{current:e}}function D(e){0>Q||(e.current=ne[Q],ne[Q]=null,Q--)}function H(e,n){Q++,ne[Q]=e.current,e.current=n}var U=M(null),I=M(null),J=M(null),K=M(null);function ce(e,n){switch(H(J,n),H(I,e),H(U,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Py(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Py(n),e=By(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D(U),H(U,e)}function ue(){D(U),D(I),D(J)}function we(e){e.memoizedState!==null&&H(K,e);var n=U.current,l=By(n,e.type);n!==l&&(H(I,e),H(U,l))}function Re(e){I.current===e&&(D(U),D(I)),K.current===e&&(D(K),ls._currentValue=ee)}var Ne,st;function We(e){if(Ne===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Ne=n&&n[1]||"",st=-1<l.stack.indexOf(`
|
||||
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||||
`+Ne+e+st}var zn=!1;function bn(e,n){if(!e||zn)return"";zn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(n){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(X){var F=X}Reflect.construct(e,[],re)}else{try{re.call()}catch(X){F=X}e.call(re.prototype)}}else{try{throw Error()}catch(X){F=X}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(X){if(X&&F&&typeof X.stack=="string")return[X.stack,F.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=i.DetermineComponentFrameRoot(),S=y[0],R=y[1];if(S&&R){var O=S.split(`
|
||||
`),Y=R.split(`
|
||||
`);for(p=i=0;i<O.length&&!O[i].includes("DetermineComponentFrameRoot");)i++;for(;p<Y.length&&!Y[p].includes("DetermineComponentFrameRoot");)p++;if(i===O.length||p===Y.length)for(i=O.length-1,p=Y.length-1;1<=i&&0<=p&&O[i]!==Y[p];)p--;for(;1<=i&&0<=p;i--,p--)if(O[i]!==Y[p]){if(i!==1||p!==1)do if(i--,p--,0>p||O[i]!==Y[p]){var Z=`
|
||||
`+O[i].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),Z}while(1<=i&&0<=p);break}}}finally{zn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?We(l):""}function rn(e,n){switch(e.tag){case 26:case 27:case 5:return We(e.type);case 16:return We("Lazy");case 13:return e.child!==n&&n!==null?We("Suspense Fallback"):We("Suspense");case 19:return We("SuspenseList");case 0:case 15:return bn(e.type,!1);case 11:return bn(e.type.render,!1);case 1:return bn(e.type,!0);case 31:return We("Activity");default:return""}}function ba(e){try{var n="",l=null;do n+=rn(e,l),l=e,e=e.return;while(e);return n}catch(i){return`
|
||||
Error generating stack: `+i.message+`
|
||||
`+i.stack}}var wt=Object.prototype.hasOwnProperty,vl=t.unstable_scheduleCallback,yl=t.unstable_cancelCallback,Ut=t.unstable_shouldYield,Lr=t.unstable_requestPaint,Ht=t.unstable_now,Iu=t.unstable_getCurrentPriorityLevel,xa=t.unstable_ImmediatePriority,ai=t.unstable_UserBlockingPriority,Sa=t.unstable_NormalPriority,bl=t.unstable_LowPriority,cr=t.unstable_IdlePriority,oi=t.log,zr=t.unstable_setDisableYieldValue,Ca=null,It=null;function Pn(e){if(typeof oi=="function"&&zr(e),It&&typeof It.setStrictMode=="function")try{It.setStrictMode(Ca,e)}catch{}}var zt=Math.clz32?Math.clz32:Xn,Vu=Math.log,xl=Math.LN2;function Xn(e){return e>>>=0,e===0?32:31-(Vu(e)/xl|0)|0}var ro=256,ao=262144,wa=4194304;function Kn(e){var n=e&42;if(n!==0)return n;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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,n,l){var i=e.pendingLanes;if(i===0)return 0;var p=0,y=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var R=i&134217727;return R!==0?(i=R&~y,i!==0?p=Kn(i):(S&=R,S!==0?p=Kn(S):l||(l=R&~e,l!==0&&(p=Kn(l))))):(R=i&~y,R!==0?p=Kn(R):S!==0?p=Kn(S):l||(l=i&~e,l!==0&&(p=Kn(l)))),p===0?0:n!==0&&n!==p&&(n&y)===0&&(y=p&-p,l=n&-n,y>=l||y===32&&(l&4194048)!==0)?n:p}function et(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Et(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pt(){var e=wa;return wa<<=1,(wa&62914560)===0&&(wa=4194304),e}function Pr(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function ot(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Yt(e,n,l,i,p,y){var S=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var R=e.entanglements,O=e.expirationTimes,Y=e.hiddenUpdates;for(l=S&~l;0<l;){var Z=31-zt(l),re=1<<Z;R[Z]=0,O[Z]=-1;var F=Y[Z];if(F!==null)for(Y[Z]=null,Z=0;Z<F.length;Z++){var X=F[Z];X!==null&&(X.lane&=-536870913)}l&=~re}i!==0&&Ea(e,i,0),y!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=y&~(S&~n))}function Ea(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var i=31-zt(n);e.entangledLanes|=n,e.entanglements[i]=e.entanglements[i]|1073741824|l&261930}function Ft(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var i=31-zt(l),p=1<<i;p&n|e[i]&n&&(e[i]|=n),l&=~p}}function Wt(e,n){var l=n&-n;return l=(l&42)!==0?1:oo(l),(l&(e.suspendedLanes|n))!==0?0:l}function oo(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 Bn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Gu(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:s1(e.type))}function wh(e,n){var l=q.p;try{return q.p=e,n()}finally{q.p=l}}var Br=Math.random().toString(36).slice(2),At="__reactFiber$"+Br,qt="__reactProps$"+Br,lo="__reactContainer$"+Br,Yu="__reactEvents$"+Br,Bw="__reactListeners$"+Br,$w="__reactHandles$"+Br,Eh="__reactResources$"+Br,Sl="__reactMarker$"+Br;function Fu(e){delete e[At],delete e[qt],delete e[Yu],delete e[Bw],delete e[$w]}function so(e){var n=e[At];if(n)return n;for(var l=e.parentNode;l;){if(n=l[lo]||l[At]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=Yy(e);e!==null;){if(l=e[At])return l;e=Yy(e)}return n}e=l,l=e.parentNode}return null}function io(e){if(e=e[At]||e[lo]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Cl(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(o(33))}function co(e){var n=e[Eh];return n||(n=e[Eh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Nt(e){e[Sl]=!0}var Nh=new Set,jh={};function Na(e,n){uo(e,n),uo(e+"Capture",n)}function uo(e,n){for(jh[e]=n,e=0;e<n.length;e++)Nh.add(n[e])}var Uw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u
Line truncated
|
||||
`).replace(vE,"")}function Ly(e,n){return n=Dy(n),Dy(e)===n}function Ye(e,n,l,i,p,y){switch(l){case"children":typeof i=="string"?n==="body"||n==="textarea"&&i===""||mo(e,i):(typeof i=="number"||typeof i=="bigint")&&n!=="body"&&mo(e,""+i);break;case"className":si(e,"class",i);break;case"tabIndex":si(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":si(e,l,i);break;case"style":Lh(e,i,y);break;case"data":if(n!=="object"){si(e,"data",i);break}case"src":case"href":if(i===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(l);break}i=ci(""+i),e.setAttribute(l,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(l,"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}else typeof y=="function"&&(l==="formAction"?(n!=="input"&&Ye(e,n,"name",p.name,p,null),Ye(e,n,"formEncType",p.formEncType,p,null),Ye(e,n,"formMethod",p.formMethod,p,null),Ye(e,n,"formTarget",p.formTarget,p,null)):(Ye(e,n,"encType",p.encType,p,null),Ye(e,n,"method",p.method,p,null),Ye(e,n,"target",p.target,p,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(l);break}i=ci(""+i),e.setAttribute(l,i);break;case"onClick":i!=null&&(e.onclick=dr);break;case"onScroll":i!=null&&Le("scroll",e);break;case"onScrollEnd":i!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(l=i.__html,l!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}l=ci(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(l,""+i):e.removeAttribute(l);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&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":i===!0?e.setAttribute(l,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(l,i):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(l,i):e.removeAttribute(l);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(l):e.setAttribute(l,i);break;case"popover":Le("beforetoggle",e),Le("toggle",e),li(e,"popover",i);break;case"xlinkActuate":ur(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ur(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ur(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ur(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ur(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ur(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ur(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ur(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ur(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":li(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Yw.get(l)||l,li(e,l,i))}}function Pf(e,n,l,i,p,y){switch(l){case"style":Lh(e,i,y);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(l=i.__html,l!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof i=="string"?mo(e,i):(typeof i=="number"||typeof i=="bigint")&&mo(e,""+i);break;case"onScroll":i!=null&&Le("scroll",e);break;case"onScrollEnd":i!=null&&Le("scrollend",e);break;case"onClick":i!=null&&(e.onclick=dr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
||||
* react-router v7.15.1
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/var E1="popstate";function N1(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function o3(t={}){function r(o,s){var h;let c=(h=s.state)==null?void 0:h.masked,{pathname:f,search:m,hash:g}=c||o.location;return _m("",{pathname:f,search:m,hash:g},s.state&&s.state.usr||null,s.state&&s.state.key||"default",c?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function a(o,s){return typeof s=="string"?s:Es(s)}return s3(r,a,null,t)}function at(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}function On(t,r){if(!t){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function l3(){return Math.random().toString(36).substring(2,10)}function j1(t,r){return{usr:t.state,key:t.key,idx:r,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function _m(t,r,a=null,o,s){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof r=="string"?ll(r):r,state:a,key:r&&r.key||o||l3(),mask:s}}function Es({pathname:t="/",search:r="",hash:a=""}){return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function ll(t){let r={};if(t){let a=t.indexOf("#");a>=0&&(r.hash=t.substring(a),t=t.substring(0,a));let o=t.indexOf("?");o>=0&&(r.search=t.substring(o),t=t.substring(0,o)),t&&(r.pathname=t)}return r}function s3(t,r,a,o={}){let{window:s=document.defaultView,v5Compat:c=!1}=o,f=s.history,m="POP",g=null,h=b();h==null&&(h=0,f.replaceState({...f.state,idx:h},""));function b(){return(f.state||{idx:null}).idx}function v(){m="POP";let j=b(),N=j==null?null:j-h;h=j,g&&g({action:m,location:w.location,delta:N})}function x(j,N){m="PUSH";let A=N1(j)?j:_m(w.location,j,N);h=b()+1;let k=j1(A,h),T=w.createHref(A.mask||A);try{f.pushState(k,"",T)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;s.location.assign(T)}c&&g&&g({action:m,location:w.location,delta:1})}function C(j,N){m="REPLACE";let A=N1(j)?j:_m(w.location,j,N);h=b();let k=j1(A,h),T=w.createHref(A.mask||A);f.replaceState(k,"",T),c&&g&&g({action:m,location:w.location,delta:0})}function E(j){return i3(j)}let w={get action(){return m},get location(){return t(s,f)},listen(j){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener(E1,v),g=j,()=>{s.removeEventListener(E1,v),g=null}},createHref(j){return r(s,j)},createURL:E,encodeLocation(j){let N=E(j);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:x,replace:C,go(j){return f.go(j)}};return w}function i3(t,r=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),at(a,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Es(t);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=a+o),new URL(o,a)}function Bb(t,r,a="/"){return c3(t,r,a,!1)}function c3(t,r,a,o,s){let c=typeof r=="string"?ll(r):r,f=kr(c.pathname||"/",a);if(f==null)return null;let m=u3(t),g=null,h=C3(f);for(let b=0;g==null&&b<m.length;++b)g=x3(m[b],h,o);return g}function u3(t){let r=$b(t);return d3(r),r}function $b(t,r=[],a=[],o="",s=!1){let c=(f,m,g=s,h)=>{let b={relativePath:h===void 0?f.path||"":h,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(o)&&g)return;at(b.relativePath.startsWith(o),`Absolute route path "${b.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(o.length)}let v=Gn([o,b.relativePath]),x=a.concat(b);f.children&&f.children.length>0&&(at(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),$b(f.children,r,x,v,g)),!(f.path==null&&!f.index)&&r.push({path:v,score:y3(v,f.index),routesMeta:x})};return t.forEach((f,m)=>{var g;if(f.path===""||!((g=f.path)!=null&&g.includes("?")))c(f,m);else for(let h of Ub(f.path))c(f,m,!0,h)}),r}function Ub(t){let r=t.split("/");if(r.length===0)return[];let[a,...o]=r,s=a.endsWith("?"),c=a.replace(/\?$/,"");if(o.length===0)return s?[c,""]:[c];let f=Ub(o.join("/")),m=[];return m.push(...f.map(g=>g===""?c:[c,g].join("/"))),s&&m.push(...f),m.map(g=>t.startsWith("/")&&g===""?"/":g)}function d3(t){t.sort((r,a)=>r.score!==a.score?a.score-r.score:b3(r.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var f3=/^:[\w-]+$/,m3=3,p3=2,h3=1,g3=10,v3=-2,R1=t=>t==="*";function y3(t,r){let a=t.split("/"),o=a.length;return a.some(R1)&&(o+=v3),r&&(o+=p3),a.filter(s=>!R1(s)).reduce((s,c)=>s+(f3.test(c)?m3:c===""?h3:g3),o)}function b3(t,r){return t.length===r.length&&t.slice(0,-1).every((o,s)=>o===r[s])?t[t.length-1]-r[r.length-1]:0}function x3(t,r,a=!1){let{routesMeta:o}=t,s={},c="/",f=[];for(let m=0;m<o.length;++m){let g=o[m],h=m===o.length-1,b=c==="/"?r:r.slice(c.length)||"/",v=zc({path:g.relativePath,caseSensit
Line truncated
|
||||
|
||||
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let b=Dn(),v;if(r){let N=typeof r=="string"?ll(r):r;at(g==="/"||((j=N.pathname)==null?void 0:j.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${N.pathname}" was given in the \`location\` prop.`),v=N}else v=b;let x=v.pathname||"/",C=x;if(g!=="/"){let N=g.replace(/^\//,"").split("/");C="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let E=a&&a.state.matches.length?a.state.matches.map(N=>Object.assign(N,{route:a.manifest[N.route.id]||N.route})):Bb(t,{pathname:C});On(h||E!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),On(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=X3(E&&E.map(N=>Object.assign({},N,{params:Object.assign({},f,N.params),pathname:Gn([g,o.encodeLocation?o.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?g:Gn([g,o.encodeLocation?o.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),s,a);return r&&w?d.createElement(Bs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},w):w}function Y3(){let t=e4(),r=k3(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},c={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:c},"ErrorBoundary")," or"," ",d.createElement("code",{style:c},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},r),a?d.createElement("pre",{style:s},a):null,f)}var F3=d.createElement(Y3,null),Zb=class extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){this.props.onError?this.props.onError(t,r):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const a=$3(t.digest);a&&(t=a)}let r=t!==void 0?d.createElement(Wn.Provider,{value:this.props.routeContext},d.createElement(hp.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?d.createElement(W3,{error:t},r):r}};Zb.contextType=Yb;var im=new WeakMap;function W3({children:t,error:r}){let{basename:a}=d.useContext(gn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=B3(r.digest);if(o){let s=im.get(r);if(s)throw s;let c=Vb(o.location,a);if(Ib&&!im.get(r))if(c.isExternal||o.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:o.replace}));throw im.set(r,f),f}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return t}function q3({routeContext:t,match:r,children:a}){let o=d.useContext(sl);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),d.createElement(Wn.Provider,{value:t},a)}function X3(t,r=[],a){let o=a==null?void 0:a.state;if(t==null){if(!o)return null;if(o.errors)t=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)t=o.matches;else return null}let s=t,c=o==null?void 0:o.errors;if(c!=null){let b=s.findIndex(v=>v.route.id&&(c==null?void 0:c[v.route.id])!==void 0);at(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,b+1))}let f=!1,m=-1;if(a&&o){f=o.renderFallback;for(let b=0;b<s.length;b++){let v=s[b];if((v.route.HyLine truncated
|
||||
.`.concat(T9,` {
|
||||
overflow: hidden `).concat(o,`;
|
||||
padding-right: `).concat(m,"px ").concat(o,`;
|
||||
}
|
||||
body[`).concat(el,`] {
|
||||
overflow: hidden `).concat(o,`;
|
||||
overscroll-behavior: contain;
|
||||
`).concat([r&&"position: relative ".concat(o,";"),a==="margin"&&`
|
||||
padding-left: `.concat(s,`px;
|
||||
padding-top: `).concat(c,`px;
|
||||
padding-right: `).concat(f,`px;
|
||||
margin-left:0;
|
||||
margin-top:0;
|
||||
margin-right: `).concat(m,"px ").concat(o,`;
|
||||
`),a==="padding"&&"padding-right: ".concat(m,"px ").concat(o,";")].filter(Boolean).join(""),`
|
||||
}
|
||||
|
||||
.`).concat(Oc,` {
|
||||
right: `).concat(m,"px ").concat(o,`;
|
||||
}
|
||||
|
||||
.`).concat(Dc,` {
|
||||
margin-right: `).concat(m,"px ").concat(o,`;
|
||||
}
|
||||
|
||||
.`).concat(Oc," .").concat(Oc,` {
|
||||
right: 0 `).concat(o,`;
|
||||
}
|
||||
|
||||
.`).concat(Dc," .").concat(Dc,` {
|
||||
margin-right: 0 `).concat(o,`;
|
||||
}
|
||||
|
||||
body[`).concat(el,`] {
|
||||
`).concat(A9,": ").concat(m,`px;
|
||||
}
|
||||
`)},ib=function(){var t=parseInt(document.body.getAttribute(el)||"0",10);return isFinite(t)?t:0},q9=function(){d.useEffect(function(){return document.body.setAttribute(el,(ib()+1).toString()),function(){var t=ib()-1;t<=0?document.body.removeAttribute(el):document.body.setAttribute(el,t.toString())}},[])},X9=function(t){var r=t.noRelative,a=t.noImportant,o=t.gapMode,s=o===void 0?"margin":o;q9();var c=d.useMemo(function(){return Y9(s)},[s]);return d.createElement(F9,{styles:W9(c,!r,s,a?"":"!important")})},Vm=!1;if(typeof window<"u")try{var Nc=Object.defineProperty({},"passive",{get:function(){return Vm=!0,!0}});window.addEventListener("test",Nc,Nc),window.removeEventListener("test",Nc,Nc)}catch{Vm=!1}var Fo=Vm?{passive:!1}:!1,K9=function(t){return t.tagName==="TEXTAREA"},Ex=function(t,r){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[r]!=="hidden"&&!(a.overflowY===a.overflowX&&!K9(t)&&a[r]==="visible")},Z9=function(t){return Ex(t,"overflowY")},Q9=function(t){return Ex(t,"overflowX")},cb=function(t,r){var a=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var s=Nx(t,o);if(s){var c=jx(t,o),f=c[1],m=c[2];if(f>m)return!0}o=o.parentNode}while(o&&o!==a.body);return!1},J9=function(t){var r=t.scrollTop,a=t.scrollHeight,o=t.clientHeight;return[r,a,o]},eR=function(t){var r=t.scrollLeft,a=t.scrollWidth,o=t.clientWidth;return[r,a,o]},Nx=function(t,r){return t==="v"?Z9(r):Q9(r)},jx=function(t,r){return t==="v"?J9(r):eR(r)},tR=function(t,r){return t==="h"&&r==="rtl"?-1:1},nR=function(t,r,a,o,s){var c=tR(t,window.getComputedStyle(r).direction),f=c*o,m=a.target,g=r.contains(m),h=!1,b=f>0,v=0,x=0;do{if(!m)break;var C=jx(t,m),E=C[0],w=C[1],j=C[2],N=w-j-c*E;(E||N)&&Nx(t,m)&&(v+=N,x+=E);var A=m.parentNode;m=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!g&&m!==document.body||g&&(r.contains(m)||r===m));return(b&&Math.abs(v)<1||!b&&Math.abs(x)<1)&&(h=!0),h},jc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ub=function(t){return[t.deltaX,t.deltaY]},db=function(t){return t&&"current"in t?t.current:t},rR=function(t,r){return t[0]===r[0]&&t[1]===r[1]},aR=function(t){return`
|
||||
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
||||
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
||||
`)},oR=0,Wo=[];function lR(t){var r=d.useRef([]),a=d.useRef([0,0]),o=d.useRef(),s=d.useState(oR++)[0],c=d.useState(wx)[0],f=d.useRef(t);d.useEffect(function(){f.current=t},[t]),d.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var w=R9([t.lockRef.current],(t.shards||[]).map(db),!0).filter(Boolean);return w.forEach(function(j){return j.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),w.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var m=d.useCallback(function(w,j){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!f.current.allowPinchZoom;var N=jc(w),A=a.current,k="deltaX"in w?w.deltaX:A[0]-N[0],T="deltaY"in w?w.deltaY:A[1]-N[1],z,P=w.target,B=Math.abs(k)>Math.abs(T)?"h":"v";if("touches"in w&&B==="h"&&P.type==="range")return!1;var V=window.getSelection(),W=V&&V.anchorNode,oe=W?W===P||W.contains(P):!1;if(oe)return!1;var ie=cb(B,P);if(!ie)return!0;if(ie?z=B:(z=B==="v"?"h":"v",ie=cb(B,P)),!ie)return!1;if(!o.current&&"changedTouches"in w&&(k||T)&&(o.current=z),!z)return!0;var me=o.current||z;return nR(me,j,w,me==="h"?k:T)},[]),g=d.useCallback(function(w){var j=w;if(!(!Wo.length||Wo[Wo.length-1]!==c)){var N="deltaY"in j?ub(j):jc(j),A=r.current.filter(function(z){return z.name===j.type&&(z.target===j.target||j.target===z.shadowParent)&&rR(z.delta,N)})[0];if(A&&A.should){j.cancelable&&j.preventDefault();return}if(!A){var k=(f.current.shards||[]).map(db).filter(Boolean).filter(function(z){return z.contains(j.target)}),T=k.length>0?m(j,k[0]):!f.current.noIsolation;T&&j.cancelable&&j.preventDefault()}}},[]),h=d.useCallback(function(w,j,N,A){var k={name:w,delta:j,target:N,should:A,shadowParent:sR(N)};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(T){return T!==k})},1)},[]),b=d.useCallback(function(w){a.current=jc(w),o.current=void 0},[]),v=d.useCallback(function(w){h(w.type,ub(w),w.target,m(w,t.lockRef.current))},[]),x=d.useCallback(function(w){h(w.type,jc(w),w.target,m(w,t.lockRef.current))},[]);d.useEffect(function(){return Wo.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",g,Fo),document.addEventListener("touchmove",g,Fo),document.addEventListener("touchstart",b,Fo),function(){Wo=Wo.filter(function(w){return w!==c}),document.removeEventListener("wheel",g,Fo),document.removeEventListener("touchmove",g,Fo),document.removeEventListener("touchstart",b,Fo)}},[]);var C=t.removeScrollBar,E=t.inert;return d.createElement(d.Fragment,null,E?d.createElement(c,{styles:aR(s)}):null,C?d.createElement(X9,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function sR(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const iR=z9(Cx,lR);var Fs=d.forwardRef(function(t,r){return d.createElement(vu,rr({},t,{ref:r,sideCar:iR}))});Fs.classNames=vu.classNames;var Gm=["Enter"," "],cR=["ArrowDown","PageUp","Home"],Rx=["ArrowUp","PageDown","End"],uR=[...cR,...Rx],dR={ltr:[...Gm,"ArrowRight"],rtl:[...Gm,"ArrowLeft"]},fR={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ws="Menu",[Ts,mR,pR]=Lp(Ws),[to,Tx]=Aj(Ws,[pR,pa,hu]),yu=pa(),Ax=hu(),[hR,no]=to(Ws),[gR,qs]=to(Ws),kx=t=>{const{__scopeMenu:r,open:a=!1,children:o,dir:s,onOpenChange:c,modal:f=!0}=t,m=yu(r),[g,h]=d.useState(null),b=d.useRef(!1),v=Rt(c),x=Us(s);return d.useEffect(()=>{const C=()=>{b.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>b.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),u.jsx(fu,{...m,children:u.jsx(hR,{scope:r,open:a,onOpenChange:v,content:g,onContentChange:h,children:u.jsx(gR,{scope:r,onClose:d.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:b,dir:x,modal:f,children:o})})})};kx.displayName=Ws;var vR="MenuAnchor",Gp=d.forwardRef((t,r)=>{const{__scopeMenu:a,...o}=t,s=yu(a);return u.jsx(Vs,{...s,...o,ref:r})});Gp.displayName=vR;var Yp="MenuPortal",[yR,Mx]=to(Yp,{forceMount:void 0}),_x=t=>{const{__scopeMenu:r,forceMount:a,children:o,container:s}=t,c=no(Yp,r);return u.jsx(yR,{scope:r,forceMount:a,children:u.jsx(Lt,{present:a||c.open,children:u.jsx(hl,{asChild:!0,container:s,children:o})})})};_x.displayName=Yp;var _n="MenuContent",[bR,Fp]=to(_n),Ox=d.forwardRef((t,r)=>{const a=Mx(_n,t.__scopeMenu),{forceMount:o=a.forceMount,...s}=t,c=no(_n,t.__scopeMenu),f=qs(_n,t.__scopeMenu);return u.jsx(Ts.Provider,{scope:t.__scopeMenu,children:u.jsx(Lt,{present:o||c.open,children:u.jsx(Ts.Slot,{scope:t.__scopeMenu,children:f.modal?u.jsx(xR,{...s,ref:r}):u.jsx(SR,{...s,ref:r})})})})}),xR=d.forwardRef((t,r)=>{const a=no(_n,t.__scopeMenu),o=
Line truncated
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const x2=(...t)=>t.filter((r,a,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===a).join(" ").trim();/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const yT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const bT=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,a,o)=>o?o.toUpperCase():a.toLowerCase());/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const mb=t=>{const r=bT(t);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var Em={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"};/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const xT=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},ST=d.createContext({}),CT=()=>d.useContext(ST),wT=d.forwardRef(({color:t,size:r,strokeWidth:a,absoluteStrokeWidth:o,className:s="",children:c,iconNode:f,...m},g)=>{const{size:h=24,strokeWidth:b=2,absoluteStrokeWidth:v=!1,color:x="currentColor",className:C=""}=CT()??{},E=o??v?Number(a??b)*24/Number(r??h):a??b;return d.createElement("svg",{ref:g,...Em,width:r??h??Em.width,height:r??h??Em.height,stroke:t??x,strokeWidth:E,className:x2("lucide",C,s),...!c&&!xT(m)&&{"aria-hidden":"true"},...m},[...f.map(([w,j])=>d.createElement(w,j)),...Array.isArray(c)?c:[c]])});/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ha=(t,r)=>{const a=d.forwardRef(({className:o,...s},c)=>d.createElement(wT,{ref:c,iconNode:r,className:x2(`lucide-${yT(mb(t))}`,`lucide-${t}`,o),...s}));return a.displayName=mb(t),a};/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ET=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],S2=ha("check",ET);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const NT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],C2=ha("chevron-down",NT);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const jT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],RT=ha("chevron-right",jT);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const TT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],AT=ha("chevron-up",TT);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const kT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],MT=ha("circle",kT);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const _T=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],OT=ha("panel-left",_T);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const DT=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],LT=ha("search",DT);/**
|
||||
* @license lucide-react v1.16.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const zT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],w2=ha("x",zT),Zp=hT,Qp=gT,PT=d.forwardRef(({className:t,inset:r,children:a,...o},s)=>u.jsxs(y2,{ref:s,className:ae("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",t),...o,children:[a,u.jsx(RT,{className:"ml-auto"})]}));PT.displayName=y2.displayName;const BT=d.forwardRef(({className:t,...r},a)=>u.jsx(b2,{ref:a,className:ae("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",t),...r}));BT.displayName=b2.displayName;const Su=d.forwardRef(({className:t,sideOffset:r=4,...a},o)=>u.jsx(vT,{children:u.jsx(d2,{ref:o,sideOffset:r,className:ae("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",t),...a})}));Su.displayName=d2.displayName;const ks=d.forwardRef(({className:t,inset:r,...a},o)=>u.jsx(m2,{ref:o,className:ae("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",r&&"pl-8",t),...a}));ks.displayName=m2.displayName;const $T=d.forwardRef(({className:t,children:r,checked:a,...o},s)=>u.jsxs(p2,{ref:s,className:ae("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:a,...o,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(g2,{children:u.jsx(S2,{className:"h-4 w-4"})})}),r]}));$T.displayName=p2.displayName;const UT=d.forwardRef(({className:t,children:r,...a},o)=>u.jsxs(h2,{ref:o,className:ae("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(g2,{children:u.jsx(MT,{className:"h-2 w-2 fill-current"})})}),r]}));UT.displayName=h2.displayName;const Jp=d.forwardRef(({className:t,inset:r,...a},o)=>u.jsx(f2,{ref:o,className:ae("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",t),...a}));Jp.displayName=f2.displayName;const qc=d.forwardRef(({className:t,...r},a)=>u.jsx(v2,{ref:a,className:ae("-mx-1 my-1 h-px bg-muted",t),...r}));qc.displayName=v2.displayName;const Nm=768;function HT(){const[t,r]=d.useState(void 0);return d.useEffect(()=>{const a=window.matchMedia(`(max-width: ${Nm-1}px)`),o=()=>{r(window.innerWidth<Nm)};return a.addEventListener("change",o),r(window.innerWidth<Nm),()=>a.removeEventListener("change",o)},[]),!!t}const vt=d.forwardRef(({className:t,type:r,...a},o)=>u.jsx("input",{type:r,className:ae("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:o,...a}));vt.displayName="Input";var IT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vn=IT.reduce((t,r)=>{const a=z0(`Primitive.${r}`),o=d.forwardRef((s,c)=>{const{asChild:f,...m}=s,g=f?a:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(g,{...m,ref:c})});return o.displayName=`Primitive.${r}`,{...t,[r]:o}},{}),VT="Separator",pb="horizontal",GT=["horizontal","vertical"],E2=d.forwardRef((t,r)=>{const{decorative:a,orientation:o=pb,...s}=t,c=YT(o)?o:pb,m=a?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};returnLine truncated
|
||||
|
||||
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return d.useEffect(()=>{t&&(document.getElementById(t)||console.error(a))},[a,t]),null},c7="DialogDescriptionWarning",u7=({contentRef:t,descriptionId:r})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${I2(c7).contentName}}.`;return d.useEffect(()=>{var c;const s=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");r&&s&&(document.getElementById(r)||console.warn(o))},[o,t,r]),null},rh=A2,ah=_2,Ks=O2,Zs=D2,wu=z2,Eu=B2,V2=U2;const d7=rh,f7=ah,G2=d.forwardRef(({className:t,...r},a)=>u.jsx(Ks,{className:ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r,ref:a}));G2.displayName=Ks.displayName;const m7=dl("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Y2=d.forwardRef(({side:t="right",className:r,children:a,...o},s)=>u.jsxs(f7,{children:[u.jsx(G2,{}),u.jsxs(Zs,{ref:s,className:ae(m7({side:t}),r),...o,children:[u.jsxs(V2,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[u.jsx(w2,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));Y2.displayName=Zs.displayName;const F2=({className:t,...r})=>u.jsx("div",{className:ae("flex flex-col space-y-2 text-center sm:text-left",t),...r});F2.displayName="SheetHeader";const W2=d.forwardRef(({className:t,...r},a)=>u.jsx(wu,{ref:a,className:ae("text-lg font-semibold text-foreground",t),...r}));W2.displayName=wu.displayName;const q2=d.forwardRef(({className:t,...r},a)=>u.jsx(Eu,{ref:a,className:ae("text-sm text-muted-foreground",t),...r}));q2.displayName=Eu.displayName;function lt({className:t,...r}){return u.jsx("div",{className:ae("animate-pulse rounded-md bg-primary/10",t),...r})}function p7(t,r=[]){let a=[];function o(c,f){const m=d.createContext(f),g=a.length;a=[...a,f];const h=v=>{var N;const{scope:x,children:C,...E}=v,w=((N=x==null?void 0:x[t])==null?void 0:N[g])||m,j=d.useMemo(()=>E,Object.values(E));return u.jsx(w.Provider,{value:j,children:C})};h.displayName=c+"Provider";function b(v,x){var w;const C=((w=x==null?void 0:x[t])==null?void 0:w[g])||m,E=d.useContext(C);if(E)return E;if(f!==void 0)return f;throw new Error(`\`${v}\` must be used within \`${c}\``)}return[h,b]}const s=()=>{const c=a.map(f=>d.createContext(f));return function(m){const g=(m==null?void 0:m[t])||c;return d.useMemo(()=>({[`__scope${t}`]:{...m,[t]:g}}),[m,g])}};return s.scopeName=t,[o,h7(s,...r)]}function h7(...t){const r=t[0];if(t.length===1)return r;const a=()=>{const o=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const f=o.reduce((m,{useScope:g,scopeName:h})=>{const v=g(c)[`__scope${h}`];return{...m,...v}},{});return d.useMemo(()=>({[`__scope${r.scopeName}`]:f}),[f])}};return a.scopeName=r.scopeName,a}function g7(t){const r=v7(t),a=d.forwardRef((o,s)=>{const{children:c,...f}=o,m=d.Children.toArray(c),g=m.find(b7);if(g){const h=g.props.children,b=m.map(v=>v===g?d.Children.count(h)>1?d.Children.only(null):d.isValidElement(h)?h.props.children:null:v);return u.jsx(r,{...f,ref:s,children:d.isValidElement(h)?d.cloneElement(h,void 0,b):null})}return u.jsx(r,{...f,ref:s,children:c})});return a.displayName=`${t}.Slot`,a}function v7(t){const r=d.forwardRef((a,o)=>{const{children:s,...c}=a;if(d.isValidElement(s)){const f=S7(s),m=x7(c,s.props);return s.type!==d.Fragment&&(m.ref=o?Ze(o,f):f),d.cloneElement(s,m)}return d.Children.count(s)>1?d.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var X2=Symbol("radix.slottable");function y7(t){const r=({children:a})=>u.jsx(u.Fragment,{children:a});return r.displayName=`${t}.Slottable`,r.__radixId=X2,r}function b7(t){return d.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===X2}function x7(t,r){const a={...r};for(const o in r){const s=t[o],c=r[o];/^on[A-Z]/.test(o)?s&&c?a[o]=(...m)=>{const g=c(...m);return s(...m),g}:s&&(a[o]=s):o==="style"?a[o]={...s,...c}:o==="className"&&(a[o]=[s,c].filter(Boolean).join(" "))}return{...t,...a}}funct
Line truncated
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var bb;function wk(){if(bb)return km;bb=1;var t=Jc();function r(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var a=typeof Object.is=="function"?Object.is:r,o=t.useState,s=t.useEffect,c=t.useLayoutEffect,f=t.useDebugValue;function m(v,x){var C=x(),E=o({inst:{value:C,getSnapshot:x}}),w=E[0].inst,j=E[1];return c(function(){w.value=C,w.getSnapshot=x,g(w)&&j({inst:w})},[v,C,x]),s(function(){return g(w)&&j({inst:w}),v(function(){g(w)&&j({inst:w})})},[v]),f(C),C}function g(v){var x=v.getSnapshot;v=v.value;try{var C=x();return!a(v,C)}catch{return!0}}function h(v,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:m;return km.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:b,km}var xb;function Ek(){return xb||(xb=1,Am.exports=wk()),Am.exports}var Nk=Ek();function jk(){return Nk.useSyncExternalStore(Rk,()=>!0,()=>!1)}function Rk(){return()=>{}}var ih="Avatar",[Tk]=Sk(ih),[Ak,PS]=Tk(ih),BS=d.forwardRef((t,r)=>{const{__scopeAvatar:a,...o}=t,[s,c]=d.useState("idle");return u.jsx(Ak,{scope:a,imageLoadingStatus:s,onImageLoadingStatusChange:c,children:u.jsx(vn.span,{...o,ref:r})})});BS.displayName=ih;var $S="AvatarImage",US=d.forwardRef((t,r)=>{const{__scopeAvatar:a,src:o,onLoadingStatusChange:s=()=>{},...c}=t,f=PS($S,a),m=kk(o,c),g=Rt(h=>{s(h),f.onImageLoadingStatusChange(h)});return yt(()=>{m!=="idle"&&g(m)},[m,g]),m==="loaded"?u.jsx(vn.img,{...c,ref:r,src:o}):null});US.displayName=$S;var HS="AvatarFallback",IS=d.forwardRef((t,r)=>{const{__scopeAvatar:a,delayMs:o,...s}=t,c=PS(HS,a),[f,m]=d.useState(o===void 0);return d.useEffect(()=>{if(o!==void 0){const g=window.setTimeout(()=>m(!0),o);return()=>window.clearTimeout(g)}},[o]),f&&c.imageLoadingStatus!=="loaded"?u.jsx(vn.span,{...s,ref:r}):null});IS.displayName=HS;function Sb(t,r){return t?r?(t.src!==r&&(t.src=r),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function kk(t,{referrerPolicy:r,crossOrigin:a}){const o=jk(),s=d.useRef(null),c=o?(s.current||(s.current=new window.Image),s.current):null,[f,m]=d.useState(()=>Sb(c,t));return yt(()=>{m(Sb(c,t))},[c,t]),yt(()=>{const g=v=>()=>{m(v)};if(!c)return;const h=g("loaded"),b=g("error");return c.addEventListener("load",h),c.addEventListener("error",b),r&&(c.referrerPolicy=r),typeof a=="string"&&(c.crossOrigin=a),()=>{c.removeEventListener("load",h),c.removeEventListener("error",b)}},[c,a,r]),f}var VS=BS,GS=US,YS=IS;const _s=d.forwardRef(({className:t,...r},a)=>u.jsx(VS,{ref:a,className:ae("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...r}));_s.displayName=VS.displayName;const Os=d.forwardRef(({className:t,...r},a)=>u.jsx(GS,{ref:a,className:ae("aspect-square h-full w-full",t),...r}));Os.displayName=GS.displayName;const Ds=d.forwardRef(({className:t,...r},a)=>u.jsx(YS,{ref:a,className:ae("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...r}));Ds.displayName=YS.displayName;const FS=d.createContext(null);function Mk({children:t}){const[r,a]=d.useState([]),[o,s]=d.useState(0),[c,f]=d.useState(!0),m=d.useCallback(async()=>{try{const v=await ke.getNotifications();v.data&&(a(v.data.items),s(v.data.unreadCount))}catch{}finally{f(!1)}},[]),g=d.useCallback(async()=>{var v;try{const x=await ke.markNotificationsRead("all");a(C=>C.map(E=>({...E,read:!0}))),s(((v=x.data)==null?void 0:v.unreadCount)??0)}catch{}},[]),h=d.useCallback(async v=>{var x;try{const C=await ke.dismissNotification(v);a(E=>E.filter(w=>w.id!==v)),s(((x=C.data)==null?void 0:x.unreadCount)??0)}catch{}},[]);d.useEffect(()=>{m();const v=setInterval(m,3e4);return()=>clearInterval(v)},[m]);const b=d.useMemo(()=>({items:r,unreadCount:o,loading:c,refresh:m,markAllRead:g,dismiss:h}),[r,o,c,m,g,h]);return u.jsx(FS.Provider,{value:b,children:t})}function _k(){const t=d.useContext(FS);if(!t)throw new Error("useNotifications must be used within NotificationsProvider");return t}const Ok=dl("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function xs({className:t,variant:r,...a}){return u.jsx("div",{className:ae(Ok({variant:r}),t),...a})}function Dk(t){const r=Lk(t),a=d.forwardRef((o,s)=>{const{children:c,...f}=o,m=d.Children.toArray(c),g=m.find(Pk);if(g){const h=g.props.children,b=m.map(v=>v===g?d.Children.count(h)>1?d.Children.only(null):d.isValidElement(h)?h.props.children:null:v);return u.jsx(r,{...f,ref:s,children:d.isValidElement(h)?d.cloneElement(h,void 0,b):null})}return u.jsx(r,{...f,ref:s,children:c})});return a.displayName=`${t}.SLine truncated
|
||||
@@ -10,8 +10,8 @@
|
||||
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<script type="module" crossorigin src="/assets/index-WkaLPu9d.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DUq0PrN_.css">
|
||||
<script type="module" crossorigin src="/assets/index-B9Fqpx9K.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DOri9ZTI.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>␍
|
||||
|
||||
Reference in new issue
Block a user