From da2d76800220d3b0e345c5ecaeb2ac11c2af931a Mon Sep 17 00:00:00 2001 From: maziggy Date: Sun, 11 Jan 2026 13:49:03 +0100 Subject: [PATCH] Fix time format setting not applied to UI date/time displays (#75) - Add time format utilities to date.ts (applyTimeFormat, formatDateTime, formatTimeOnly, TimeFormat type) - PrintersPage: Pass timeFormat to formatETA for printer card ETA display - ArchivesPage: Add timeFormat prop to ArchiveCard for archive timestamps - AMSHistoryModal: Apply timeFormat to chart labels, axis ticks, and tooltip - ProjectDetailPage: Use formatDateTime for timeline dates - QueuePage: Pass timeFormat to formatRelativeTime for scheduled prints - SystemInfoPage: Use formatDateTime for boot time display - NotificationLogViewer: Apply timeFormat to notification timestamps - Bump service worker cache version to v17 Closes #75 --- CHANGELOG.md | 6 + frontend/public/sw.js | 4 +- frontend/src/components/AMSHistoryModal.tsx | 30 +- .../src/components/NotificationLogViewer.tsx | 16 +- frontend/src/pages/ArchivesPage.tsx | 16 +- frontend/src/pages/PrintersPage.tsx | 19 +- frontend/src/pages/ProjectDetailPage.tsx | 5 +- frontend/src/pages/QueuePage.tsx | 20 +- frontend/src/pages/SystemInfoPage.tsx | 10 +- frontend/src/utils/date.ts | 69 + static/assets/index-B03CK04P.js | 8663 +++++++++++++++++ static/assets/index-CMSE_lmd.js | 8663 ----------------- static/index.html | 2 +- static/sw.js | 4 +- 14 files changed, 8835 insertions(+), 8692 deletions(-) create mode 100644 static/assets/index-B03CK04P.js delete mode 100644 static/assets/index-CMSE_lmd.js diff --git a/CHANGELOG.md b/CHANGELOG.md index b7c58899d..90a2e1d8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,12 @@ All notable changes to Bambuddy will be documented in this file. - Updates Projects page and Project Detail page instantly ### Fixed +- **Time format setting not applied** - Fixed 24-hour time format not being respected across the UI: + - ETA display on printer cards now uses configured time format + - Archive cards and timelapse file lists respect the setting + - AMS history charts use the configured format + - Project timeline, queue page, notification logs, and system info all updated + - Settings > General > Time Format now works consistently everywhere - **QR code endpoint** - Fixed 500 error on archive QR code generation: - Added `qrcode[pil]` to requirements.txt - Improved error handling for missing dependencies diff --git a/frontend/public/sw.js b/frontend/public/sw.js index b0d9bbb5d..12d5fe8fc 100644 --- a/frontend/public/sw.js +++ b/frontend/public/sw.js @@ -1,6 +1,6 @@ // Bambuddy Service Worker -const CACHE_NAME = 'bambuddy-v15'; -const STATIC_CACHE = 'bambuddy-static-v15'; +const CACHE_NAME = 'bambuddy-v17'; +const STATIC_CACHE = 'bambuddy-static-v17'; // Static assets to cache on install const STATIC_ASSETS = [ diff --git a/frontend/src/components/AMSHistoryModal.tsx b/frontend/src/components/AMSHistoryModal.tsx index a6f95578a..68319fc81 100644 --- a/frontend/src/components/AMSHistoryModal.tsx +++ b/frontend/src/components/AMSHistoryModal.tsx @@ -13,7 +13,7 @@ import { ReferenceLine, } from 'recharts'; import { api, type AMSHistoryResponse } from '../api/client'; -import { parseUTCDate } from '../utils/date'; +import { parseUTCDate, applyTimeFormat, type TimeFormat } from '../utils/date'; import { useTranslation } from 'react-i18next'; import { useTheme } from '../contexts/ThemeContext'; @@ -58,6 +58,13 @@ export function AMSHistoryModal({ const [mode, setMode] = useState<'humidity' | 'temperature'>(initialMode); const isDark = themeMode === 'dark'; + const { data: settings } = useQuery({ + queryKey: ['settings'], + queryFn: api.getSettings, + }); + + const timeFormat: TimeFormat = settings?.time_format || 'system'; + // Close on Escape key useEffect(() => { if (!isOpen) return; @@ -82,15 +89,16 @@ export function AMSHistoryModal({ // Format data for chart const chartData = data?.data.map(point => { const date = parseUTCDate(point.recorded_at) || new Date(); + const timeOptions: Intl.DateTimeFormatOptions = { + hour: '2-digit', + minute: '2-digit', + ...(hours > 24 ? { day: 'numeric', month: 'short' } : {}), + }; return { time: date.getTime(), humidity: point.humidity, temperature: point.temperature, - timeLabel: date.toLocaleTimeString([], { - hour: '2-digit', - minute: '2-digit', - ...(hours > 24 ? { day: 'numeric', month: 'short' } : {}), - }), + timeLabel: date.toLocaleTimeString([], applyTimeFormat(timeOptions, timeFormat)), }; }) || []; @@ -311,7 +319,7 @@ export function AMSHistoryModal({ if (hours > 24) { return date.toLocaleDateString([], { day: 'numeric', month: 'short' }); } - return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); + return date.toLocaleTimeString([], applyTimeFormat({ hour: '2-digit', minute: '2-digit' }, timeFormat)); }} stroke={isDark ? '#9ca3af' : '#6b7280'} tick={{ fontSize: 12 }} @@ -329,7 +337,13 @@ export function AMSHistoryModal({ borderRadius: '8px', color: isDark ? '#fff' : '#000', }} - labelFormatter={(ts) => new Date(ts).toLocaleString()} + labelFormatter={(ts) => new Date(ts).toLocaleString(undefined, applyTimeFormat({ + year: 'numeric', + month: 'short', + day: 'numeric', + hour: '2-digit', + minute: '2-digit', + }, timeFormat))} formatter={(value: number) => [ mode === 'humidity' ? `${value}%` : `${value}°C`, mode === 'humidity' ? 'Humidity' : 'Temperature' diff --git a/frontend/src/components/NotificationLogViewer.tsx b/frontend/src/components/NotificationLogViewer.tsx index d48a17764..fcc9d8e20 100644 --- a/frontend/src/components/NotificationLogViewer.tsx +++ b/frontend/src/components/NotificationLogViewer.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { History, CheckCircle, XCircle, Loader2, Trash2, RefreshCw, ChevronDown, ChevronUp } from 'lucide-react'; import { api } from '../api/client'; -import { parseUTCDate, formatDate as formatDateUtil } from '../utils/date'; +import { parseUTCDate, formatTimeOnly, formatDateTime, type TimeFormat } from '../utils/date'; import type { NotificationLogEntry } from '../api/client'; import { Button } from './Button'; import { useToast } from '../contexts/ToastContext'; @@ -44,6 +44,13 @@ export function NotificationLogViewer({ onClose }: NotificationLogViewerProps) { const [expandedId, setExpandedId] = useState(null); const [showFailedOnly, setShowFailedOnly] = useState(false); + const { data: settings } = useQuery({ + queryKey: ['settings'], + queryFn: api.getSettings, + }); + + const timeFormat: TimeFormat = settings?.time_format || 'system'; + const { data: logs, isLoading, refetch, isRefetching } = useQuery({ queryKey: ['notification-logs', days, showFailedOnly], queryFn: () => api.getNotificationLogs({ @@ -80,7 +87,7 @@ export function NotificationLogViewer({ onClose }: NotificationLogViewerProps) { if (diff < 3600000) return `${Math.floor(diff / 60000)}m ago`; if (diff < 86400000) return `${Math.floor(diff / 3600000)}h ago`; - return date.toLocaleDateString() + ' ' + date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); + return date.toLocaleDateString() + ' ' + formatTimeOnly(date, timeFormat); }; return ( @@ -191,6 +198,7 @@ export function NotificationLogViewer({ onClose }: NotificationLogViewerProps) { isExpanded={expandedId === log.id} onToggle={() => setExpandedId(expandedId === log.id ? null : log.id)} formatDate={formatDate} + formatFullDate={(dateStr) => formatDateTime(dateStr, timeFormat)} /> ))} @@ -213,11 +221,13 @@ function LogEntry({ isExpanded, onToggle, formatDate, + formatFullDate, }: { log: NotificationLogEntry; isExpanded: boolean; onToggle: () => void; formatDate: (date: string) => string; + formatFullDate: (date: string) => string; }) { return (
Provider: {log.provider_type} - Time: {formatDateUtil(log.created_at)} + Time: {formatFullDate(log.created_at)}
)} diff --git a/frontend/src/pages/ArchivesPage.tsx b/frontend/src/pages/ArchivesPage.tsx index 0b68b4fb1..240f65a1b 100644 --- a/frontend/src/pages/ArchivesPage.tsx +++ b/frontend/src/pages/ArchivesPage.tsx @@ -43,7 +43,7 @@ import { } from 'lucide-react'; import { api } from '../api/client'; import { openInSlicer } from '../utils/slicer'; -import { formatDate, formatDateOnly, parseUTCDate } from '../utils/date'; +import { formatDateTime, formatDateOnly, parseUTCDate, type TimeFormat } from '../utils/date'; import { useIsMobile } from '../hooks/useIsMobile'; import type { Archive, ProjectListItem } from '../api/client'; import { Card, CardContent } from '../components/Card'; @@ -89,6 +89,7 @@ function ArchiveCard({ selectionMode, projects, isHighlighted, + timeFormat = 'system', }: { archive: Archive; printerName: string; @@ -97,6 +98,7 @@ function ArchiveCard({ selectionMode: boolean; projects: ProjectListItem[] | undefined; isHighlighted?: boolean; + timeFormat?: TimeFormat; }) { // Debug: log when card is highlighted if (isHighlighted) { @@ -669,7 +671,7 @@ function ArchiveCard({ {/* Date & Size */}
- {formatDate(archive.created_at)} + {formatDateTime(archive.created_at, timeFormat)} {formatFileSize(archive.file_size)}
@@ -890,7 +892,7 @@ function ArchiveCard({

{file.name}

{formatFileSize(file.size)} - {file.mtime && ` • ${formatDate(file.mtime)}`} + {file.mtime && ` • ${formatDateTime(file.mtime, timeFormat)}`}

@@ -1721,6 +1723,13 @@ export function ArchivesPage() { queryFn: () => api.getProjects(), }); + const { data: settings } = useQuery({ + queryKey: ['settings'], + queryFn: api.getSettings, + }); + + const timeFormat: TimeFormat = settings?.time_format || 'system'; + const bulkDeleteMutation = useMutation({ mutationFn: async (ids: number[]) => { await Promise.all(ids.map((id) => api.deleteArchive(id))); @@ -2449,6 +2458,7 @@ export function ArchivesPage() { selectionMode={selectionMode} projects={projects} isHighlighted={archive.id === highlightedArchiveId} + timeFormat={timeFormat} /> ))} diff --git a/frontend/src/pages/PrintersPage.tsx b/frontend/src/pages/PrintersPage.tsx index 5dcdd444e..11e52d8b4 100644 --- a/frontend/src/pages/PrintersPage.tsx +++ b/frontend/src/pages/PrintersPage.tsx @@ -644,7 +644,7 @@ function formatTime(seconds: number): string { return hours > 0 ? `${hours}h ${minutes}m` : `${minutes}m`; } -function formatETA(remainingMinutes: number): string { +function formatETA(remainingMinutes: number, timeFormat: 'system' | '12h' | '24h' = 'system'): string { const now = new Date(); const eta = new Date(now.getTime() + remainingMinutes * 60 * 1000); const today = new Date(); @@ -652,7 +652,16 @@ function formatETA(remainingMinutes: number): string { const etaDay = new Date(eta); etaDay.setHours(0, 0, 0, 0); - const timeStr = eta.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); + // Build time format options based on setting + const timeOptions: Intl.DateTimeFormatOptions = { hour: '2-digit', minute: '2-digit' }; + if (timeFormat === '12h') { + timeOptions.hour12 = true; + } else if (timeFormat === '24h') { + timeOptions.hour12 = false; + } + // 'system' leaves hour12 undefined, letting the browser decide + + const timeStr = eta.toLocaleTimeString([], timeOptions); // Check if it's tomorrow or later const dayDiff = Math.floor((etaDay.getTime() - today.getTime()) / (1000 * 60 * 60 * 24)); @@ -865,6 +874,7 @@ function PrinterCard({ amsThresholds, spoolmanEnabled = false, hasUnlinkedSpools = false, + timeFormat = 'system', }: { printer: Printer; hideIfDisconnected?: boolean; @@ -879,6 +889,7 @@ function PrinterCard({ }; spoolmanEnabled?: boolean; hasUnlinkedSpools?: boolean; + timeFormat?: 'system' | '12h' | '24h'; }) { const queryClient = useQueryClient(); const navigate = useNavigate(); @@ -1617,7 +1628,7 @@ function PrinterCard({ {formatTime(status.remaining_time * 60)} - ETA {formatETA(status.remaining_time)} + ETA {formatETA(status.remaining_time, timeFormat)} )} @@ -3986,6 +3997,7 @@ export function PrintersPage() { } : undefined} spoolmanEnabled={spoolmanEnabled} hasUnlinkedSpools={hasUnlinkedSpools} + timeFormat={settings?.time_format || 'system'} /> ))} @@ -4011,6 +4023,7 @@ export function PrintersPage() { tempGood: Number(settings.ams_temp_good) || 28, tempFair: Number(settings.ams_temp_fair) || 35, } : undefined} + timeFormat={settings?.time_format || 'system'} /> ))} diff --git a/frontend/src/pages/ProjectDetailPage.tsx b/frontend/src/pages/ProjectDetailPage.tsx index 913cade4e..8a94f84ba 100644 --- a/frontend/src/pages/ProjectDetailPage.tsx +++ b/frontend/src/pages/ProjectDetailPage.tsx @@ -32,7 +32,7 @@ import { ShoppingCart, } from 'lucide-react'; import { api } from '../api/client'; -import { parseUTCDate, formatDateOnly, formatDate as formatDateUtil } from '../utils/date'; +import { parseUTCDate, formatDateOnly, formatDateTime, type TimeFormat } from '../utils/date'; import type { Archive, ProjectUpdate, BOMItem, BOMItemCreate } from '../api/client'; import { Card, CardContent } from '../components/Card'; import { Button } from '../components/Button'; @@ -235,6 +235,7 @@ export function ProjectDetailPage() { }); const currency = settings?.currency || '$'; + const timeFormat: TimeFormat = settings?.time_format || 'system'; const updateMutation = useMutation({ mutationFn: (data: ProjectUpdate) => api.updateProject(projectId, data), @@ -403,7 +404,7 @@ export function ProjectDetailPage() { }); const formatTimelineDate = (timestamp: string) => { - return formatDateUtil(timestamp, { + return formatDateTime(timestamp, timeFormat, { month: 'short', day: 'numeric', hour: '2-digit', diff --git a/frontend/src/pages/QueuePage.tsx b/frontend/src/pages/QueuePage.tsx index 5185d5767..666569fd6 100644 --- a/frontend/src/pages/QueuePage.tsx +++ b/frontend/src/pages/QueuePage.tsx @@ -43,7 +43,7 @@ import { Hand, } from 'lucide-react'; import { api } from '../api/client'; -import { parseUTCDate } from '../utils/date'; +import { parseUTCDate, formatDateTime, type TimeFormat } from '../utils/date'; import type { PrintQueueItem } from '../api/client'; import { Card, CardContent } from '../components/Card'; import { Button } from '../components/Button'; @@ -60,7 +60,7 @@ function formatDuration(seconds: number | null | undefined): string { return `${minutes}m`; } -function formatRelativeTime(dateString: string | null): string { +function formatRelativeTime(dateString: string | null, timeFormat: TimeFormat = 'system'): string { if (!dateString) return 'ASAP'; const date = parseUTCDate(dateString); if (!date) return 'ASAP'; @@ -72,7 +72,7 @@ function formatRelativeTime(dateString: string | null): string { if (diff < 60000) return 'In less than a minute'; if (diff < 3600000) return `In ${Math.round(diff / 60000)} min`; if (diff < 86400000) return `In ${Math.round(diff / 3600000)} hours`; - return date.toLocaleString(); + return formatDateTime(dateString, timeFormat); } function StatusBadge({ status }: { status: PrintQueueItem['status'] }) { @@ -105,6 +105,7 @@ function SortableQueueItem({ onStop, onRequeue, onStart, + timeFormat = 'system', }: { item: PrintQueueItem; position?: number; @@ -114,6 +115,7 @@ function SortableQueueItem({ onStop: () => void; onRequeue: () => void; onStart: () => void; + timeFormat?: TimeFormat; }) { const { attributes, @@ -206,7 +208,7 @@ function SortableQueueItem({ {isPending && !item.manual_start && ( - {formatRelativeTime(item.scheduled_time)} + {formatRelativeTime(item.scheduled_time, timeFormat)} )} @@ -377,6 +379,13 @@ export function QueuePage() { useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }) ); + const { data: settings } = useQuery({ + queryKey: ['settings'], + queryFn: api.getSettings, + }); + + const timeFormat: TimeFormat = settings?.time_format || 'system'; + const { data: queue, isLoading } = useQuery({ queryKey: ['queue', filterPrinter, filterStatus], queryFn: () => api.getQueue(filterPrinter || undefined, filterStatus || undefined), @@ -659,6 +668,7 @@ export function QueuePage() { onStop={() => setConfirmAction({ type: 'stop', item })} onRequeue={() => {}} onStart={() => {}} + timeFormat={timeFormat} /> ))} @@ -722,6 +732,7 @@ export function QueuePage() { onStop={() => {}} onRequeue={() => {}} onStart={() => startMutation.mutate(item.id)} + timeFormat={timeFormat} /> ))} @@ -774,6 +785,7 @@ export function QueuePage() { onStop={() => {}} onRequeue={() => setRequeueItem(item)} onStart={() => {}} + timeFormat={timeFormat} /> ))} diff --git a/frontend/src/pages/SystemInfoPage.tsx b/frontend/src/pages/SystemInfoPage.tsx index 3633a0030..b3598bc55 100644 --- a/frontend/src/pages/SystemInfoPage.tsx +++ b/frontend/src/pages/SystemInfoPage.tsx @@ -23,6 +23,7 @@ import { } from 'lucide-react'; import { api, supportApi } from '../api/client'; import { Card } from '../components/Card'; +import { formatDateTime, type TimeFormat } from '../utils/date'; function StatCard({ icon: Icon, @@ -102,6 +103,13 @@ export function SystemInfoPage() { refetchInterval: 10 * 1000, }); + const { data: settings } = useQuery({ + queryKey: ['settings'], + queryFn: api.getSettings, + }); + + const timeFormat: TimeFormat = settings?.time_format || 'system'; + const handleToggleDebugLogging = async () => { setDebugToggling(true); try { @@ -525,7 +533,7 @@ export function SystemInfoPage() { diff --git a/frontend/src/utils/date.ts b/frontend/src/utils/date.ts index 395044da5..f98ed541d 100644 --- a/frontend/src/utils/date.ts +++ b/frontend/src/utils/date.ts @@ -6,6 +6,25 @@ * displayed in the user's local timezone. */ +export type TimeFormat = 'system' | '12h' | '24h'; + +/** + * Apply time format setting to Intl.DateTimeFormatOptions. + * This modifies the options object in place and returns it. + */ +export function applyTimeFormat( + options: Intl.DateTimeFormatOptions, + timeFormat: TimeFormat = 'system' +): Intl.DateTimeFormatOptions { + if (timeFormat === '12h') { + options.hour12 = true; + } else if (timeFormat === '24h') { + options.hour12 = false; + } + // 'system' leaves hour12 undefined, letting the browser decide + return options; +} + /** * Parse a date string from the backend as UTC. * Handles ISO 8601 strings with or without timezone indicators. @@ -72,3 +91,53 @@ export function formatDateOnly( return date.toLocaleDateString(undefined, options ?? defaultOptions); } + +/** + * Format a UTC date string to a localized date/time string with time format support. + * + * @param dateStr - Date string from backend + * @param timeFormat - Time format setting ('system', '12h', '24h') + * @param options - Intl.DateTimeFormat options (defaults to showing date and time) + * @returns Formatted date string in user's locale and timezone + */ +export function formatDateTime( + dateStr: string | null | undefined, + timeFormat: TimeFormat = 'system', + options?: Intl.DateTimeFormatOptions +): string { + const date = parseUTCDate(dateStr); + if (!date) return ''; + + const defaultOptions: Intl.DateTimeFormatOptions = { + year: 'numeric', + month: 'short', + day: 'numeric', + hour: '2-digit', + minute: '2-digit', + }; + + const finalOptions = applyTimeFormat(options ?? defaultOptions, timeFormat); + return date.toLocaleString(undefined, finalOptions); +} + +/** + * Format a Date object to a localized time string with time format support. + * + * @param date - Date object + * @param timeFormat - Time format setting ('system', '12h', '24h') + * @param options - Additional Intl.DateTimeFormat options + * @returns Formatted time string + */ +export function formatTimeOnly( + date: Date, + timeFormat: TimeFormat = 'system', + options?: Intl.DateTimeFormatOptions +): string { + const defaultOptions: Intl.DateTimeFormatOptions = { + hour: '2-digit', + minute: '2-digit', + }; + + const finalOptions = applyTimeFormat({ ...defaultOptions, ...options }, timeFormat); + return date.toLocaleTimeString([], finalOptions); +} diff --git a/static/assets/index-B03CK04P.js b/static/assets/index-B03CK04P.js new file mode 100644 index 000000000..4c1f79b0c --- /dev/null +++ b/static/assets/index-B03CK04P.js @@ -0,0 +1,8663 @@ +function yie(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Cv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var VA={exports:{}},_x={};var RF;function vie(){if(RF)return _x;RF=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:a}}return _x.Fragment=e,_x.jsx=n,_x.jsxs=n,_x}var DF;function _ie(){return DF||(DF=1,VA.exports=vie()),VA.exports}var s=_ie(),GA={exports:{}},ln={};var OF;function wie(){if(OF)return ln;OF=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),g=Symbol.iterator;function p(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,x={};function v(U,G,J){this.props=U,this.context=G,this.refs=x,this.updater=J||b}v.prototype.isReactComponent={},v.prototype.setState=function(U,G){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,G,"setState")},v.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function E(){}E.prototype=v.prototype;function w(U,G,J){this.props=U,this.context=G,this.refs=x,this.updater=J||b}var N=w.prototype=new E;N.constructor=w,y(N,v.prototype),N.isPureReactComponent=!0;var A=Array.isArray;function C(){}var T={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function k(U,G,J){var ie=J.ref;return{$$typeof:t,type:U,key:G,ref:ie!==void 0?ie:null,props:J}}function j(U,G){return k(U.type,G,U.props)}function F(U){return typeof U=="object"&&U!==null&&U.$$typeof===t}function I(U){var G={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(J){return G[J]})}var W=/\/+/g;function D(U,G){return typeof U=="object"&&U!==null&&U.key!=null?I(""+U.key):G.toString(36)}function q(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(C,C):(U.status="pending",U.then(function(G){U.status==="pending"&&(U.status="fulfilled",U.value=G)},function(G){U.status==="pending"&&(U.status="rejected",U.reason=G)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function K(U,G,J,ie,ae){var he=typeof U;(he==="undefined"||he==="boolean")&&(U=null);var ue=!1;if(U===null)ue=!0;else switch(he){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(U.$$typeof){case t:case e:ue=!0;break;case d:return ue=U._init,K(ue(U._payload),G,J,ie,ae)}}if(ue)return ae=ae(U),ue=ie===""?"."+D(U,0):ie,A(ae)?(J="",ue!=null&&(J=ue.replace(W,"$&/")+"/"),K(ae,G,J,"",function(ge){return ge})):ae!=null&&(F(ae)&&(ae=j(ae,J+(ae.key==null||U&&U.key===ae.key?"":(""+ae.key).replace(W,"$&/")+"/")+ue)),G.push(ae)),1;ue=0;var le=ie===""?".":ie+":";if(A(U))for(var fe=0;fe>>1,X=K[ee];if(0>>1;eei(J,Q))iei(ae,J)?(K[ee]=ae,K[ie]=Q,ee=ie):(K[ee]=J,K[G]=Q,ee=G);else if(iei(ae,Q))K[ee]=ae,K[ie]=Q,ee=ie;else break e}}return V}function i(K,V){var Q=K.sortIndex-V.sortIndex;return Q!==0?Q:K.id-V.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,g=3,p=!1,b=!1,y=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function N(K){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=K)r(u),V.sortIndex=V.expirationTime,e(c,V);else break;V=n(u)}}function A(K){if(y=!1,N(K),!b)if(n(c)!==null)b=!0,C||(C=!0,I());else{var V=n(u);V!==null&&q(A,V.startTime-K)}}var C=!1,T=-1,L=5,k=-1;function j(){return x?!0:!(t.unstable_now()-kK&&j());){var ee=f.callback;if(typeof ee=="function"){f.callback=null,g=f.priorityLevel;var X=ee(f.expirationTime<=K);if(K=t.unstable_now(),typeof X=="function"){f.callback=X,N(K),V=!0;break t}f===n(c)&&r(c),N(K)}else r(c);f=n(c)}if(f!==null)V=!0;else{var U=n(u);U!==null&&q(A,U.startTime-K),V=!1}}break e}finally{f=null,g=Q,p=!1}V=void 0}}finally{V?I():C=!1}}}var I;if(typeof w=="function")I=function(){w(F)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,D=W.port2;W.port1.onmessage=F,I=function(){D.postMessage(null)}}else I=function(){v(F,0)};function q(K,V){T=v(function(){K(t.unstable_now())},V)}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(K){K.callback=null},t.unstable_forceFrameRate=function(K){0>K||125ee?(K.sortIndex=Q,e(u,K),n(c)===null&&K===n(u)&&(y?(E(T),T=-1):y=!0,q(A,Q-ee))):(K.sortIndex=X,e(c,K),b||p||(b=!0,C||(C=!0,I()))),K},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(K){var V=g;return function(){var Q=g;g=V;try{return K.apply(this,arguments)}finally{g=Q}}}})(KA)),KA}var FF;function Eie(){return FF||(FF=1,qA.exports=Mie()),qA.exports}var XA={exports:{}},ma={};var UF;function Aie(){if(UF)return ma;UF=1;var t=sg();function e(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),XA.exports=Aie(),XA.exports}var BF;function Nie(){if(BF)return wx;BF=1;var t=Eie(),e=sg(),n=s9();function r(h){var m="https://react.dev/errors/"+h;if(1X||(h.current=ee[X],ee[X]=null,X--)}function J(h,m){X++,ee[X]=h.current,h.current=m}var ie=U(null),ae=U(null),he=U(null),ue=U(null);function le(h,m){switch(J(he,m),J(ae,h),J(ie,null),m.nodeType){case 9:case 11:h=(h=m.documentElement)&&(h=h.namespaceURI)?nF(h):0;break;default:if(h=m.tagName,m=m.namespaceURI)m=nF(m),h=rF(m,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}G(ie),J(ie,h)}function fe(){G(ie),G(ae),G(he)}function ge(h){h.memoizedState!==null&&J(ue,h);var m=ie.current,_=rF(m,h.type);m!==_&&(J(ae,h),J(ie,_))}function Ee(h){ae.current===h&&(G(ie),G(ae)),ue.current===h&&(G(ue),xx._currentValue=Q)}var re,Xe;function z(h){if(re===void 0)try{throw Error()}catch(_){var m=_.stack.trim().match(/\n( *(at )?)/);re=m&&m[1]||"",Xe=-1<_.stack.indexOf(` + at`)?" ()":-1<_.stack.indexOf("@")?"@unknown:0:0":""}return` +`+re+h+Xe}var $=!1;function se(h,m){if(!h||$)return"";$=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var M={DetermineComponentFrameRoot:function(){try{if(m){var mt=function(){throw Error()};if(Object.defineProperty(mt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(mt,[])}catch(ot){var it=ot}Reflect.construct(h,[],mt)}else{try{mt.call()}catch(ot){it=ot}h.call(mt.prototype)}}else{try{throw Error()}catch(ot){it=ot}(mt=h())&&typeof mt.catch=="function"&&mt.catch(function(){})}}catch(ot){if(ot&&it&&typeof ot.stack=="string")return[ot.stack,it.stack]}return[null,null]}};M.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var P=Object.getOwnPropertyDescriptor(M.DetermineComponentFrameRoot,"name");P&&P.configurable&&Object.defineProperty(M.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=M.DetermineComponentFrameRoot(),Y=O[0],de=O[1];if(Y&&de){var Te=Y.split(` +`),nt=de.split(` +`);for(P=M=0;MP||Te[M]!==nt[P]){var lt=` +`+Te[M].replace(" at new "," at ");return h.displayName&<.includes("")&&(lt=lt.replace("",h.displayName)),lt}while(1<=M&&0<=P);break}}}finally{$=!1,Error.prepareStackTrace=_}return(_=h?h.displayName||h.name:"")?z(_):""}function B(h,m){switch(h.tag){case 26:case 27:case 5:return z(h.type);case 16:return z("Lazy");case 13:return h.child!==m&&m!==null?z("Suspense Fallback"):z("Suspense");case 19:return z("SuspenseList");case 0:case 15:return se(h.type,!1);case 11:return se(h.type.render,!1);case 1:return se(h.type,!0);case 31:return z("Activity");default:return""}}function Z(h){try{var m="",_=null;do m+=B(h,_),_=h,h=h.return;while(h);return m}catch(M){return` +Error generating stack: `+M.message+` +`+M.stack}}var ce=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,_e=t.unstable_cancelCallback,Me=t.unstable_shouldYield,H=t.unstable_requestPaint,R=t.unstable_now,ne=t.unstable_getCurrentPriorityLevel,be=t.unstable_ImmediatePriority,we=t.unstable_UserBlockingPriority,ve=t.unstable_NormalPriority,$e=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,ut=t.unstable_setDisableYieldValue,He=null,me=null;function Je(h){if(typeof Ke=="function"&&ut(h),me&&typeof me.setStrictMode=="function")try{me.setStrictMode(He,h)}catch{}}var qe=Math.clz32?Math.clz32:te,Ze=Math.log,ct=Math.LN2;function te(h){return h>>>=0,h===0?32:31-(Ze(h)/ct|0)|0}var Fe=256,xe=262144,ze=4194304;function Pe(h){var m=h&42;if(m!==0)return m;switch(h&-h){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 h&261888;case 262144:case 524288:case 1048576:case 2097152:return h&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return h&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return h}}function Se(h,m,_){var M=h.pendingLanes;if(M===0)return 0;var P=0,O=h.suspendedLanes,Y=h.pingedLanes;h=h.warmLanes;var de=M&134217727;return de!==0?(M=de&~O,M!==0?P=Pe(M):(Y&=de,Y!==0?P=Pe(Y):_||(_=de&~h,_!==0&&(P=Pe(_))))):(de=M&~O,de!==0?P=Pe(de):Y!==0?P=Pe(Y):_||(_=M&~h,_!==0&&(P=Pe(_)))),P===0?0:m!==0&&m!==P&&(m&O)===0&&(O=P&-P,_=m&-m,O>=_||O===32&&(_&4194048)!==0)?m:P}function Ye(h,m){return(h.pendingLanes&~(h.suspendedLanes&~h.pingedLanes)&m)===0}function dt(h,m){switch(h){case 1:case 2:case 4:case 8:case 64:return m+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 m+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 Tt(){var h=ze;return ze<<=1,(ze&62914560)===0&&(ze=4194304),h}function Et(h){for(var m=[],_=0;31>_;_++)m.push(h);return m}function Zt(h,m){h.pendingLanes|=m,m!==268435456&&(h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0)}function Rt(h,m,_,M,P,O){var Y=h.pendingLanes;h.pendingLanes=_,h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0,h.expiredLanes&=_,h.entangledLanes&=_,h.errorRecoveryDisabledLanes&=_,h.shellSuspendCounter=0;var de=h.entanglements,Te=h.expirationTimes,nt=h.hiddenUpdates;for(_=Y&~_;0<_;){var lt=31-qe(_),mt=1<"u")return null;try{return h.activeElement||h.body}catch{return h.body}}var Xr=/[\n"\\]/g;function Vn(h){return h.replace(Xr,function(m){return"\\"+m.charCodeAt(0).toString(16)+" "})}function Mo(h,m,_,M,P,O,Y,de){h.name="",Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?h.type=Y:h.removeAttribute("type"),m!=null?Y==="number"?(m===0&&h.value===""||h.value!=m)&&(h.value=""+wn(m)):h.value!==""+wn(m)&&(h.value=""+wn(m)):Y!=="submit"&&Y!=="reset"||h.removeAttribute("value"),m!=null?Li(h,Y,wn(m)):_!=null?Li(h,Y,wn(_)):M!=null&&h.removeAttribute("value"),P==null&&O!=null&&(h.defaultChecked=!!O),P!=null&&(h.checked=P&&typeof P!="function"&&typeof P!="symbol"),de!=null&&typeof de!="function"&&typeof de!="symbol"&&typeof de!="boolean"?h.name=""+wn(de):h.removeAttribute("name")}function qn(h,m,_,M,P,O,Y,de){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(h.type=O),m!=null||_!=null){if(!(O!=="submit"&&O!=="reset"||m!=null)){on(h);return}_=_!=null?""+wn(_):"",m=m!=null?""+wn(m):_,de||m===h.value||(h.value=m),h.defaultValue=m}M=M??P,M=typeof M!="function"&&typeof M!="symbol"&&!!M,h.checked=de?h.checked:!!M,h.defaultChecked=!!M,Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"&&(h.name=Y),on(h)}function Li(h,m,_){m==="number"&&Ur(h.ownerDocument)===h||h.defaultValue===""+_||(h.defaultValue=""+_)}function xi(h,m,_,M){if(h=h.options,m){m={};for(var P=0;P<_.length;P++)m["$"+_[P]]=!0;for(_=0;_"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),V2=!1;if(Hl)try{var Og={};Object.defineProperty(Og,"passive",{get:function(){V2=!0}}),window.addEventListener("test",Og,Og),window.removeEventListener("test",Og,Og)}catch{V2=!1}var su=null,G2=null,_y=null;function rL(){if(_y)return _y;var h,m=G2,_=m.length,M,P="value"in su?su.value:su.textContent,O=P.length;for(h=0;h<_&&m[h]===P[h];h++);var Y=_-h;for(M=1;M<=Y&&m[_-M]===P[O-M];M++);return _y=P.slice(h,1=Fg),cL=" ",uL=!1;function dL(h,m){switch(h){case"keyup":return Bne.indexOf(m.keyCode)!==-1;case"keydown":return m.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hL(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var Lf=!1;function $ne(h,m){switch(h){case"compositionend":return hL(m);case"keypress":return m.which!==32?null:(uL=!0,cL);case"textInput":return h=m.data,h===cL&&uL?null:h;default:return null}}function Vne(h,m){if(Lf)return h==="compositionend"||!Y2&&dL(h,m)?(h=rL(),_y=G2=su=null,Lf=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(m.ctrlKey||m.altKey||m.metaKey)||m.ctrlKey&&m.altKey){if(m.char&&1=m)return{node:_,offset:m-h};h=M}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=vL(_)}}function wL(h,m){return h&&m?h===m?!0:h&&h.nodeType===3?!1:m&&m.nodeType===3?wL(h,m.parentNode):"contains"in h?h.contains(m):h.compareDocumentPosition?!!(h.compareDocumentPosition(m)&16):!1:!1}function SL(h){h=h!=null&&h.ownerDocument!=null&&h.ownerDocument.defaultView!=null?h.ownerDocument.defaultView:window;for(var m=Ur(h.document);m instanceof h.HTMLIFrameElement;){try{var _=typeof m.contentWindow.location.href=="string"}catch{_=!1}if(_)h=m.contentWindow;else break;m=Ur(h.document)}return m}function J2(h){var m=h&&h.nodeName&&h.nodeName.toLowerCase();return m&&(m==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||m==="textarea"||h.contentEditable==="true")}var Qne=Hl&&"documentMode"in document&&11>=document.documentMode,If=null,eE=null,Hg=null,tE=!1;function ML(h,m,_){var M=_.window===_?_.document:_.nodeType===9?_:_.ownerDocument;tE||If==null||If!==Ur(M)||(M=If,"selectionStart"in M&&J2(M)?M={start:M.selectionStart,end:M.selectionEnd}:(M=(M.ownerDocument&&M.ownerDocument.defaultView||window).getSelection(),M={anchorNode:M.anchorNode,anchorOffset:M.anchorOffset,focusNode:M.focusNode,focusOffset:M.focusOffset}),Hg&&Bg(Hg,M)||(Hg=M,M=mv(eE,"onSelect"),0>=Y,P-=Y,tl=1<<32-qe(m)+P|_<fn?(Pn=zt,zt=null):Pn=zt.sibling;var Fn=it(Ve,zt,et[fn],ht);if(Fn===null){zt===null&&(zt=Pn);break}h&&zt&&Fn.alternate===null&&m(Ve,zt),Le=O(Fn,Le,fn),In===null?Wt=Fn:In.sibling=Fn,In=Fn,zt=Pn}if(fn===et.length)return _(Ve,zt),jn&&Vl(Ve,fn),Wt;if(zt===null){for(;fnfn?(Pn=zt,zt=null):Pn=zt.sibling;var Tu=it(Ve,zt,Fn.value,ht);if(Tu===null){zt===null&&(zt=Pn);break}h&&zt&&Tu.alternate===null&&m(Ve,zt),Le=O(Tu,Le,fn),In===null?Wt=Tu:In.sibling=Tu,In=Tu,zt=Pn}if(Fn.done)return _(Ve,zt),jn&&Vl(Ve,fn),Wt;if(zt===null){for(;!Fn.done;fn++,Fn=et.next())Fn=mt(Ve,Fn.value,ht),Fn!==null&&(Le=O(Fn,Le,fn),In===null?Wt=Fn:In.sibling=Fn,In=Fn);return jn&&Vl(Ve,fn),Wt}for(zt=M(zt);!Fn.done;fn++,Fn=et.next())Fn=ot(zt,Ve,fn,Fn.value,ht),Fn!==null&&(h&&Fn.alternate!==null&&zt.delete(Fn.key===null?fn:Fn.key),Le=O(Fn,Le,fn),In===null?Wt=Fn:In.sibling=Fn,In=Fn);return h&&zt.forEach(function(bie){return m(Ve,bie)}),jn&&Vl(Ve,fn),Wt}function ir(Ve,Le,et,ht){if(typeof et=="object"&&et!==null&&et.type===y&&et.key===null&&(et=et.props.children),typeof et=="object"&&et!==null){switch(et.$$typeof){case p:e:{for(var Wt=et.key;Le!==null;){if(Le.key===Wt){if(Wt=et.type,Wt===y){if(Le.tag===7){_(Ve,Le.sibling),ht=P(Le,et.props.children),ht.return=Ve,Ve=ht;break e}}else if(Le.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===L&&th(Wt)===Le.type){_(Ve,Le.sibling),ht=P(Le,et.props),Kg(ht,et),ht.return=Ve,Ve=ht;break e}_(Ve,Le);break}else m(Ve,Le);Le=Le.sibling}et.type===y?(ht=Yd(et.props.children,Ve.mode,ht,et.key),ht.return=Ve,Ve=ht):(ht=Py(et.type,et.key,et.props,null,Ve.mode,ht),Kg(ht,et),ht.return=Ve,Ve=ht)}return Y(Ve);case b:e:{for(Wt=et.key;Le!==null;){if(Le.key===Wt)if(Le.tag===4&&Le.stateNode.containerInfo===et.containerInfo&&Le.stateNode.implementation===et.implementation){_(Ve,Le.sibling),ht=P(Le,et.children||[]),ht.return=Ve,Ve=ht;break e}else{_(Ve,Le);break}else m(Ve,Le);Le=Le.sibling}ht=lE(et,Ve.mode,ht),ht.return=Ve,Ve=ht}return Y(Ve);case L:return et=th(et),ir(Ve,Le,et,ht)}if(q(et))return Ft(Ve,Le,et,ht);if(I(et)){if(Wt=I(et),typeof Wt!="function")throw Error(r(150));return et=Wt.call(et),Jt(Ve,Le,et,ht)}if(typeof et.then=="function")return ir(Ve,Le,Fy(et),ht);if(et.$$typeof===w)return ir(Ve,Le,Dy(Ve,et),ht);Uy(Ve,et)}return typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint"?(et=""+et,Le!==null&&Le.tag===6?(_(Ve,Le.sibling),ht=P(Le,et),ht.return=Ve,Ve=ht):(_(Ve,Le),ht=oE(et,Ve.mode,ht),ht.return=Ve,Ve=ht),Y(Ve)):_(Ve,Le)}return function(Ve,Le,et,ht){try{qg=0;var Wt=ir(Ve,Le,et,ht);return Kf=null,Wt}catch(zt){if(zt===qf||zt===Ly)throw zt;var In=gs(29,zt,null,Ve.mode);return In.lanes=ht,In.return=Ve,In}finally{}}}var rh=qL(!0),KL=qL(!1),du=!1;function vE(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _E(h,m){h=h.updateQueue,m.updateQueue===h&&(m.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,callbacks:null})}function hu(h){return{lane:h,tag:0,payload:null,callback:null,next:null}}function fu(h,m,_){var M=h.updateQueue;if(M===null)return null;if(M=M.shared,(Bn&2)!==0){var P=M.pending;return P===null?m.next=m:(m.next=P.next,P.next=m),M.pending=m,m=ky(h),PL(h,null,_),m}return Cy(h,M,m,_),ky(h)}function Xg(h,m,_){if(m=m.updateQueue,m!==null&&(m=m.shared,(_&4194048)!==0)){var M=m.lanes;M&=h.pendingLanes,_|=M,m.lanes=_,Ln(h,_)}}function wE(h,m){var _=h.updateQueue,M=h.alternate;if(M!==null&&(M=M.updateQueue,_===M)){var P=null,O=null;if(_=_.firstBaseUpdate,_!==null){do{var Y={lane:_.lane,tag:_.tag,payload:_.payload,callback:null,next:null};O===null?P=O=Y:O=O.next=Y,_=_.next}while(_!==null);O===null?P=O=m:O=O.next=m}else P=O=m;_={baseState:M.baseState,firstBaseUpdate:P,lastBaseUpdate:O,shared:M.shared,callbacks:M.callbacks},h.updateQueue=_;return}h=_.lastBaseUpdate,h===null?_.firstBaseUpdate=m:h.next=m,_.lastBaseUpdate=m}var SE=!1;function Yg(){if(SE){var h=Wf;if(h!==null)throw h}}function Zg(h,m,_,M){SE=!1;var P=h.updateQueue;du=!1;var O=P.firstBaseUpdate,Y=P.lastBaseUpdate,de=P.shared.pending;if(de!==null){P.shared.pending=null;var Te=de,nt=Te.next;Te.next=null,Y===null?O=nt:Y.next=nt,Y=Te;var lt=h.alternate;lt!==null&&(lt=lt.updateQueue,de=lt.lastBaseUpdate,de!==Y&&(de===null?lt.firstBaseUpdate=nt:de.next=nt,lt.lastBaseUpdate=Te))}if(O!==null){var mt=P.baseState;Y=0,lt=nt=Te=null,de=O;do{var it=de.lane&-536870913,ot=it!==de.lane;if(ot?(kn&it)===it:(M&it)===it){it!==0&&it===Gf&&(SE=!0),lt!==null&&(lt=lt.next={lane:0,tag:de.tag,payload:de.payload,callback:null,next:null});e:{var Ft=h,Jt=de;it=m;var ir=_;switch(Jt.tag){case 1:if(Ft=Jt.payload,typeof Ft=="function"){mt=Ft.call(ir,mt,it);break e}mt=Ft;break e;case 3:Ft.flags=Ft.flags&-65537|128;case 0:if(Ft=Jt.payload,it=typeof Ft=="function"?Ft.call(ir,mt,it):Ft,it==null)break e;mt=f({},mt,it);break e;case 2:du=!0}}it=de.callback,it!==null&&(h.flags|=64,ot&&(h.flags|=8192),ot=P.callbacks,ot===null?P.callbacks=[it]:ot.push(it))}else ot={lane:it,tag:de.tag,payload:de.payload,callback:de.callback,next:null},lt===null?(nt=lt=ot,Te=mt):lt=lt.next=ot,Y|=it;if(de=de.next,de===null){if(de=P.shared.pending,de===null)break;ot=de,de=ot.next,ot.next=null,P.lastBaseUpdate=ot,P.shared.pending=null}}while(!0);lt===null&&(Te=mt),P.baseState=Te,P.firstBaseUpdate=nt,P.lastBaseUpdate=lt,O===null&&(P.shared.lanes=0),bu|=Y,h.lanes=Y,h.memoizedState=mt}}function XL(h,m){if(typeof h!="function")throw Error(r(191,h));h.call(m)}function YL(h,m){var _=h.callbacks;if(_!==null)for(h.callbacks=null,h=0;h<_.length;h++)XL(_[h],m)}var Xf=U(null),zy=U(0);function ZL(h,m){h=tc,J(zy,h),J(Xf,m),tc=h|m.baseLanes}function ME(){J(zy,tc),J(Xf,Xf.current)}function EE(){tc=zy.current,G(Xf),G(zy)}var xs=U(null),$s=null;function mu(h){var m=h.alternate;J(Yr,Yr.current&1),J(xs,h),$s===null&&(m===null||Xf.current!==null||m.memoizedState!==null)&&($s=h)}function AE(h){J(Yr,Yr.current),J(xs,h),$s===null&&($s=h)}function QL(h){h.tag===22?(J(Yr,Yr.current),J(xs,h),$s===null&&($s=h)):pu()}function pu(){J(Yr,Yr.current),J(xs,xs.current)}function bs(h){G(xs),$s===h&&($s=null),G(Yr)}var Yr=U(0);function By(h){for(var m=h;m!==null;){if(m.tag===13){var _=m.memoizedState;if(_!==null&&(_=_.dehydrated,_===null||jA(_)||RA(_)))return m}else if(m.tag===19&&(m.memoizedProps.revealOrder==="forwards"||m.memoizedProps.revealOrder==="backwards"||m.memoizedProps.revealOrder==="unstable_legacy-backwards"||m.memoizedProps.revealOrder==="together")){if((m.flags&128)!==0)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===h)break;for(;m.sibling===null;){if(m.return===null||m.return===h)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var ql=0,hn=null,nr=null,ii=null,Hy=!1,Yf=!1,ih=!1,$y=0,Qg=0,Zf=null,lre=0;function zr(){throw Error(r(321))}function NE(h,m){if(m===null)return!1;for(var _=0;_O?O:8;var Y=K.T,de={};K.T=de,HE(h,!1,m,_);try{var Te=P(),nt=K.S;if(nt!==null&&nt(de,Te),Te!==null&&typeof Te=="object"&&typeof Te.then=="function"){var lt=ore(Te,M);ex(h,m,lt,_s(h))}else ex(h,m,M,_s(h))}catch(mt){ex(h,m,{then:function(){},status:"rejected",reason:mt},_s())}finally{V.p=O,Y!==null&&de.types!==null&&(Y.types=de.types),K.T=Y}}function fre(){}function zE(h,m,_,M){if(h.tag!==5)throw Error(r(476));var P=TI(h).queue;NI(h,P,m,Q,_===null?fre:function(){return CI(h),_(M)})}function TI(h){var m=h.memoizedState;if(m!==null)return m;m={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kl,lastRenderedState:Q},next:null};var _={};return m.next={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kl,lastRenderedState:_},next:null},h.memoizedState=m,h=h.alternate,h!==null&&(h.memoizedState=m),m}function CI(h){var m=TI(h);m.next===null&&(m=h.alternate.memoizedState),ex(h,m.next.queue,{},_s())}function BE(){return Ji(xx)}function kI(){return Zr().memoizedState}function PI(){return Zr().memoizedState}function mre(h){for(var m=h.return;m!==null;){switch(m.tag){case 24:case 3:var _=_s();h=hu(_);var M=fu(m,h,_);M!==null&&(Ya(M,m,_),Xg(M,m,_)),m={cache:gE()},h.payload=m;return}m=m.return}}function pre(h,m,_){var M=_s();_={lane:M,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},Xy(h)?RI(m,_):(_=aE(h,m,_,M),_!==null&&(Ya(_,h,M),DI(_,m,M)))}function jI(h,m,_){var M=_s();ex(h,m,_,M)}function ex(h,m,_,M){var P={lane:M,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null};if(Xy(h))RI(m,P);else{var O=h.alternate;if(h.lanes===0&&(O===null||O.lanes===0)&&(O=m.lastRenderedReducer,O!==null))try{var Y=m.lastRenderedState,de=O(Y,_);if(P.hasEagerState=!0,P.eagerState=de,ps(de,Y))return Cy(h,m,P,0),mr===null&&Ty(),!1}catch{}finally{}if(_=aE(h,m,P,M),_!==null)return Ya(_,h,M),DI(_,m,M),!0}return!1}function HE(h,m,_,M){if(M={lane:2,revertLane:vA(),gesture:null,action:M,hasEagerState:!1,eagerState:null,next:null},Xy(h)){if(m)throw Error(r(479))}else m=aE(h,_,M,2),m!==null&&Ya(m,h,2)}function Xy(h){var m=h.alternate;return h===hn||m!==null&&m===hn}function RI(h,m){Yf=Hy=!0;var _=h.pending;_===null?m.next=m:(m.next=_.next,_.next=m),h.pending=m}function DI(h,m,_){if((_&4194048)!==0){var M=m.lanes;M&=h.pendingLanes,_|=M,m.lanes=_,Ln(h,_)}}var tx={readContext:Ji,use:Gy,useCallback:zr,useContext:zr,useEffect:zr,useImperativeHandle:zr,useLayoutEffect:zr,useInsertionEffect:zr,useMemo:zr,useReducer:zr,useRef:zr,useState:zr,useDebugValue:zr,useDeferredValue:zr,useTransition:zr,useSyncExternalStore:zr,useId:zr,useHostTransitionStatus:zr,useFormState:zr,useActionState:zr,useOptimistic:zr,useMemoCache:zr,useCacheRefresh:zr};tx.useEffectEvent=zr;var OI={readContext:Ji,use:Gy,useCallback:function(h,m){return ka().memoizedState=[h,m===void 0?null:m],h},useContext:Ji,useEffect:bI,useImperativeHandle:function(h,m,_){_=_!=null?_.concat([h]):null,qy(4194308,4,wI.bind(null,m,h),_)},useLayoutEffect:function(h,m){return qy(4194308,4,h,m)},useInsertionEffect:function(h,m){qy(4,2,h,m)},useMemo:function(h,m){var _=ka();m=m===void 0?null:m;var M=h();if(ih){Je(!0);try{h()}finally{Je(!1)}}return _.memoizedState=[M,m],M},useReducer:function(h,m,_){var M=ka();if(_!==void 0){var P=_(m);if(ih){Je(!0);try{_(m)}finally{Je(!1)}}}else P=m;return M.memoizedState=M.baseState=P,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:P},M.queue=h,h=h.dispatch=pre.bind(null,hn,h),[M.memoizedState,h]},useRef:function(h){var m=ka();return h={current:h},m.memoizedState=h},useState:function(h){h=OE(h);var m=h.queue,_=jI.bind(null,hn,m);return m.dispatch=_,[h.memoizedState,_]},useDebugValue:FE,useDeferredValue:function(h,m){var _=ka();return UE(_,h,m)},useTransition:function(){var h=OE(!1);return h=NI.bind(null,hn,h.queue,!0,!1),ka().memoizedState=h,[!1,h]},useSyncExternalStore:function(h,m,_){var M=hn,P=ka();if(jn){if(_===void 0)throw Error(r(407));_=_()}else{if(_=m(),mr===null)throw Error(r(349));(kn&127)!==0||nI(M,m,_)}P.memoizedState=_;var O={value:_,getSnapshot:m};return P.queue=O,bI(iI.bind(null,M,O,h),[h]),M.flags|=2048,Qf(9,{destroy:void 0},rI.bind(null,M,O,_,m),null),_},useId:function(){var h=ka(),m=mr.identifierPrefix;if(jn){var _=nl,M=tl;_=(M&~(1<<32-qe(M)-1)).toString(32)+_,m="_"+m+"R_"+_,_=$y++,0<_&&(m+="H"+_.toString(32)),m+="_"}else _=lre++,m="_"+m+"r_"+_.toString(32)+"_";return h.memoizedState=m},useHostTransitionStatus:BE,useFormState:fI,useActionState:fI,useOptimistic:function(h){var m=ka();m.memoizedState=m.baseState=h;var _={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return m.queue=_,m=HE.bind(null,hn,!0,_),_.dispatch=m,[h,m]},useMemoCache:jE,useCacheRefresh:function(){return ka().memoizedState=mre.bind(null,hn)},useEffectEvent:function(h){var m=ka(),_={impl:h};return m.memoizedState=_,function(){if((Bn&2)!==0)throw Error(r(440));return _.impl.apply(void 0,arguments)}}},$E={readContext:Ji,use:Gy,useCallback:MI,useContext:Ji,useEffect:IE,useImperativeHandle:SI,useInsertionEffect:vI,useLayoutEffect:_I,useMemo:EI,useReducer:Wy,useRef:xI,useState:function(){return Wy(Kl)},useDebugValue:FE,useDeferredValue:function(h,m){var _=Zr();return AI(_,nr.memoizedState,h,m)},useTransition:function(){var h=Wy(Kl)[0],m=Zr().memoizedState;return[typeof h=="boolean"?h:Jg(h),m]},useSyncExternalStore:tI,useId:kI,useHostTransitionStatus:BE,useFormState:mI,useActionState:mI,useOptimistic:function(h,m){var _=Zr();return oI(_,nr,h,m)},useMemoCache:jE,useCacheRefresh:PI};$E.useEffectEvent=yI;var LI={readContext:Ji,use:Gy,useCallback:MI,useContext:Ji,useEffect:IE,useImperativeHandle:SI,useInsertionEffect:vI,useLayoutEffect:_I,useMemo:EI,useReducer:DE,useRef:xI,useState:function(){return DE(Kl)},useDebugValue:FE,useDeferredValue:function(h,m){var _=Zr();return nr===null?UE(_,h,m):AI(_,nr.memoizedState,h,m)},useTransition:function(){var h=DE(Kl)[0],m=Zr().memoizedState;return[typeof h=="boolean"?h:Jg(h),m]},useSyncExternalStore:tI,useId:kI,useHostTransitionStatus:BE,useFormState:gI,useActionState:gI,useOptimistic:function(h,m){var _=Zr();return nr!==null?oI(_,nr,h,m):(_.baseState=h,[h,_.queue.dispatch])},useMemoCache:jE,useCacheRefresh:PI};LI.useEffectEvent=yI;function VE(h,m,_,M){m=h.memoizedState,_=_(M,m),_=_==null?m:f({},m,_),h.memoizedState=_,h.lanes===0&&(h.updateQueue.baseState=_)}var GE={enqueueSetState:function(h,m,_){h=h._reactInternals;var M=_s(),P=hu(M);P.payload=m,_!=null&&(P.callback=_),m=fu(h,P,M),m!==null&&(Ya(m,h,M),Xg(m,h,M))},enqueueReplaceState:function(h,m,_){h=h._reactInternals;var M=_s(),P=hu(M);P.tag=1,P.payload=m,_!=null&&(P.callback=_),m=fu(h,P,M),m!==null&&(Ya(m,h,M),Xg(m,h,M))},enqueueForceUpdate:function(h,m){h=h._reactInternals;var _=_s(),M=hu(_);M.tag=2,m!=null&&(M.callback=m),m=fu(h,M,_),m!==null&&(Ya(m,h,_),Xg(m,h,_))}};function II(h,m,_,M,P,O,Y){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(M,O,Y):m.prototype&&m.prototype.isPureReactComponent?!Bg(_,M)||!Bg(P,O):!0}function FI(h,m,_,M){h=m.state,typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps(_,M),typeof m.UNSAFE_componentWillReceiveProps=="function"&&m.UNSAFE_componentWillReceiveProps(_,M),m.state!==h&&GE.enqueueReplaceState(m,m.state,null)}function ah(h,m){var _=m;if("ref"in m){_={};for(var M in m)M!=="ref"&&(_[M]=m[M])}if(h=h.defaultProps){_===m&&(_=f({},_));for(var P in h)_[P]===void 0&&(_[P]=h[P])}return _}function UI(h){Ny(h)}function zI(h){console.error(h)}function BI(h){Ny(h)}function Yy(h,m){try{var _=h.onUncaughtError;_(m.value,{componentStack:m.stack})}catch(M){setTimeout(function(){throw M})}}function HI(h,m,_){try{var M=h.onCaughtError;M(_.value,{componentStack:_.stack,errorBoundary:m.tag===1?m.stateNode:null})}catch(P){setTimeout(function(){throw P})}}function WE(h,m,_){return _=hu(_),_.tag=3,_.payload={element:null},_.callback=function(){Yy(h,m)},_}function $I(h){return h=hu(h),h.tag=3,h}function VI(h,m,_,M){var P=_.type.getDerivedStateFromError;if(typeof P=="function"){var O=M.value;h.payload=function(){return P(O)},h.callback=function(){HI(m,_,M)}}var Y=_.stateNode;Y!==null&&typeof Y.componentDidCatch=="function"&&(h.callback=function(){HI(m,_,M),typeof P!="function"&&(yu===null?yu=new Set([this]):yu.add(this));var de=M.stack;this.componentDidCatch(M.value,{componentStack:de!==null?de:""})})}function gre(h,m,_,M,P){if(_.flags|=32768,M!==null&&typeof M=="object"&&typeof M.then=="function"){if(m=_.alternate,m!==null&&Vf(m,_,P,!0),_=xs.current,_!==null){switch(_.tag){case 31:case 13:return $s===null?lv():_.alternate===null&&Br===0&&(Br=3),_.flags&=-257,_.flags|=65536,_.lanes=P,M===Iy?_.flags|=16384:(m=_.updateQueue,m===null?_.updateQueue=new Set([M]):m.add(M),xA(h,M,P)),!1;case 22:return _.flags|=65536,M===Iy?_.flags|=16384:(m=_.updateQueue,m===null?(m={transitions:null,markerInstances:null,retryQueue:new Set([M])},_.updateQueue=m):(_=m.retryQueue,_===null?m.retryQueue=new Set([M]):_.add(M)),xA(h,M,P)),!1}throw Error(r(435,_.tag))}return xA(h,M,P),lv(),!1}if(jn)return m=xs.current,m!==null?((m.flags&65536)===0&&(m.flags|=256),m.flags|=65536,m.lanes=P,M!==dE&&(h=Error(r(422),{cause:M}),Vg(Us(h,_)))):(M!==dE&&(m=Error(r(423),{cause:M}),Vg(Us(m,_))),h=h.current.alternate,h.flags|=65536,P&=-P,h.lanes|=P,M=Us(M,_),P=WE(h.stateNode,M,P),wE(h,P),Br!==4&&(Br=2)),!1;var O=Error(r(520),{cause:M});if(O=Us(O,_),cx===null?cx=[O]:cx.push(O),Br!==4&&(Br=2),m===null)return!0;M=Us(M,_),_=m;do{switch(_.tag){case 3:return _.flags|=65536,h=P&-P,_.lanes|=h,h=WE(_.stateNode,M,h),wE(_,h),!1;case 1:if(m=_.type,O=_.stateNode,(_.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(yu===null||!yu.has(O))))return _.flags|=65536,P&=-P,_.lanes|=P,P=$I(P),VI(P,h,_,M),wE(_,P),!1}_=_.return}while(_!==null);return!1}var qE=Error(r(461)),ai=!1;function ea(h,m,_,M){m.child=h===null?KL(m,null,_,M):rh(m,h.child,_,M)}function GI(h,m,_,M,P){_=_.render;var O=m.ref;if("ref"in M){var Y={};for(var de in M)de!=="ref"&&(Y[de]=M[de])}else Y=M;return Jd(m),M=TE(h,m,_,Y,O,P),de=CE(),h!==null&&!ai?(kE(h,m,P),Xl(h,m,P)):(jn&&de&&cE(m),m.flags|=1,ea(h,m,M,P),m.child)}function WI(h,m,_,M,P){if(h===null){var O=_.type;return typeof O=="function"&&!sE(O)&&O.defaultProps===void 0&&_.compare===null?(m.tag=15,m.type=O,qI(h,m,O,M,P)):(h=Py(_.type,null,M,m,m.mode,P),h.ref=m.ref,h.return=m,m.child=h)}if(O=h.child,!tA(h,P)){var Y=O.memoizedProps;if(_=_.compare,_=_!==null?_:Bg,_(Y,M)&&h.ref===m.ref)return Xl(h,m,P)}return m.flags|=1,h=$l(O,M),h.ref=m.ref,h.return=m,m.child=h}function qI(h,m,_,M,P){if(h!==null){var O=h.memoizedProps;if(Bg(O,M)&&h.ref===m.ref)if(ai=!1,m.pendingProps=M=O,tA(h,P))(h.flags&131072)!==0&&(ai=!0);else return m.lanes=h.lanes,Xl(h,m,P)}return KE(h,m,_,M,P)}function KI(h,m,_,M){var P=M.children,O=h!==null?h.memoizedState:null;if(h===null&&m.stateNode===null&&(m.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),M.mode==="hidden"){if((m.flags&128)!==0){if(O=O!==null?O.baseLanes|_:_,h!==null){for(M=m.child=h.child,P=0;M!==null;)P=P|M.lanes|M.childLanes,M=M.sibling;M=P&~O}else M=0,m.child=null;return XI(h,m,O,_,M)}if((_&536870912)!==0)m.memoizedState={baseLanes:0,cachePool:null},h!==null&&Oy(m,O!==null?O.cachePool:null),O!==null?ZL(m,O):ME(),QL(m);else return M=m.lanes=536870912,XI(h,m,O!==null?O.baseLanes|_:_,_,M)}else O!==null?(Oy(m,O.cachePool),ZL(m,O),pu(),m.memoizedState=null):(h!==null&&Oy(m,null),ME(),pu());return ea(h,m,P,_),m.child}function nx(h,m){return h!==null&&h.tag===22||m.stateNode!==null||(m.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.sibling}function XI(h,m,_,M,P){var O=bE();return O=O===null?null:{parent:ri._currentValue,pool:O},m.memoizedState={baseLanes:_,cachePool:O},h!==null&&Oy(m,null),ME(),QL(m),h!==null&&Vf(h,m,M,!0),m.childLanes=P,null}function Zy(h,m){return m=Jy({mode:m.mode,children:m.children},h.mode),m.ref=h.ref,h.child=m,m.return=h,m}function YI(h,m,_){return rh(m,h.child,null,_),h=Zy(m,m.pendingProps),h.flags|=2,bs(m),m.memoizedState=null,h}function xre(h,m,_){var M=m.pendingProps,P=(m.flags&128)!==0;if(m.flags&=-129,h===null){if(jn){if(M.mode==="hidden")return h=Zy(m,M),m.lanes=536870912,nx(null,h);if(AE(m),(h=_r)?(h=lF(h,Hs),h=h!==null&&h.data==="&"?h:null,h!==null&&(m.memoizedState={dehydrated:h,treeContext:ou!==null?{id:tl,overflow:nl}:null,retryLane:536870912,hydrationErrors:null},_=RL(h),_.return=m,m.child=_,Qi=m,_r=null)):h=null,h===null)throw cu(m);return m.lanes=536870912,null}return Zy(m,M)}var O=h.memoizedState;if(O!==null){var Y=O.dehydrated;if(AE(m),P)if(m.flags&256)m.flags&=-257,m=YI(h,m,_);else if(m.memoizedState!==null)m.child=h.child,m.flags|=128,m=null;else throw Error(r(558));else if(ai||Vf(h,m,_,!1),P=(_&h.childLanes)!==0,ai||P){if(M=mr,M!==null&&(Y=$n(M,_),Y!==0&&Y!==O.retryLane))throw O.retryLane=Y,Xd(h,Y),Ya(M,h,Y),qE;lv(),m=YI(h,m,_)}else h=O.treeContext,_r=Vs(Y.nextSibling),Qi=m,jn=!0,lu=null,Hs=!1,h!==null&&LL(m,h),m=Zy(m,M),m.flags|=4096;return m}return h=$l(h.child,{mode:M.mode,children:M.children}),h.ref=m.ref,m.child=h,h.return=m,h}function Qy(h,m){var _=m.ref;if(_===null)h!==null&&h.ref!==null&&(m.flags|=4194816);else{if(typeof _!="function"&&typeof _!="object")throw Error(r(284));(h===null||h.ref!==_)&&(m.flags|=4194816)}}function KE(h,m,_,M,P){return Jd(m),_=TE(h,m,_,M,void 0,P),M=CE(),h!==null&&!ai?(kE(h,m,P),Xl(h,m,P)):(jn&&M&&cE(m),m.flags|=1,ea(h,m,_,P),m.child)}function ZI(h,m,_,M,P,O){return Jd(m),m.updateQueue=null,_=eI(m,M,_,P),JL(h),M=CE(),h!==null&&!ai?(kE(h,m,O),Xl(h,m,O)):(jn&&M&&cE(m),m.flags|=1,ea(h,m,_,O),m.child)}function QI(h,m,_,M,P){if(Jd(m),m.stateNode===null){var O=zf,Y=_.contextType;typeof Y=="object"&&Y!==null&&(O=Ji(Y)),O=new _(M,O),m.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=GE,m.stateNode=O,O._reactInternals=m,O=m.stateNode,O.props=M,O.state=m.memoizedState,O.refs={},vE(m),Y=_.contextType,O.context=typeof Y=="object"&&Y!==null?Ji(Y):zf,O.state=m.memoizedState,Y=_.getDerivedStateFromProps,typeof Y=="function"&&(VE(m,_,Y,M),O.state=m.memoizedState),typeof _.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(Y=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),Y!==O.state&&GE.enqueueReplaceState(O,O.state,null),Zg(m,M,O,P),Yg(),O.state=m.memoizedState),typeof O.componentDidMount=="function"&&(m.flags|=4194308),M=!0}else if(h===null){O=m.stateNode;var de=m.memoizedProps,Te=ah(_,de);O.props=Te;var nt=O.context,lt=_.contextType;Y=zf,typeof lt=="object"&<!==null&&(Y=Ji(lt));var mt=_.getDerivedStateFromProps;lt=typeof mt=="function"||typeof O.getSnapshotBeforeUpdate=="function",de=m.pendingProps!==de,lt||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(de||nt!==Y)&&FI(m,O,M,Y),du=!1;var it=m.memoizedState;O.state=it,Zg(m,M,O,P),Yg(),nt=m.memoizedState,de||it!==nt||du?(typeof mt=="function"&&(VE(m,_,mt,M),nt=m.memoizedState),(Te=du||II(m,_,Te,M,it,nt,Y))?(lt||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(m.flags|=4194308)):(typeof O.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=M,m.memoizedState=nt),O.props=M,O.state=nt,O.context=Y,M=Te):(typeof O.componentDidMount=="function"&&(m.flags|=4194308),M=!1)}else{O=m.stateNode,_E(h,m),Y=m.memoizedProps,lt=ah(_,Y),O.props=lt,mt=m.pendingProps,it=O.context,nt=_.contextType,Te=zf,typeof nt=="object"&&nt!==null&&(Te=Ji(nt)),de=_.getDerivedStateFromProps,(nt=typeof de=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(Y!==mt||it!==Te)&&FI(m,O,M,Te),du=!1,it=m.memoizedState,O.state=it,Zg(m,M,O,P),Yg();var ot=m.memoizedState;Y!==mt||it!==ot||du||h!==null&&h.dependencies!==null&&Ry(h.dependencies)?(typeof de=="function"&&(VE(m,_,de,M),ot=m.memoizedState),(lt=du||II(m,_,lt,M,it,ot,Te)||h!==null&&h.dependencies!==null&&Ry(h.dependencies))?(nt||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(M,ot,Te),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(M,ot,Te)),typeof O.componentDidUpdate=="function"&&(m.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof O.componentDidUpdate!="function"||Y===h.memoizedProps&&it===h.memoizedState||(m.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||Y===h.memoizedProps&&it===h.memoizedState||(m.flags|=1024),m.memoizedProps=M,m.memoizedState=ot),O.props=M,O.state=ot,O.context=Te,M=lt):(typeof O.componentDidUpdate!="function"||Y===h.memoizedProps&&it===h.memoizedState||(m.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||Y===h.memoizedProps&&it===h.memoizedState||(m.flags|=1024),M=!1)}return O=M,Qy(h,m),M=(m.flags&128)!==0,O||M?(O=m.stateNode,_=M&&typeof _.getDerivedStateFromError!="function"?null:O.render(),m.flags|=1,h!==null&&M?(m.child=rh(m,h.child,null,P),m.child=rh(m,null,_,P)):ea(h,m,_,P),m.memoizedState=O.state,h=m.child):h=Xl(h,m,P),h}function JI(h,m,_,M){return Zd(),m.flags|=256,ea(h,m,_,M),m.child}var XE={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function YE(h){return{baseLanes:h,cachePool:HL()}}function ZE(h,m,_){return h=h!==null?h.childLanes&~_:0,m&&(h|=vs),h}function e5(h,m,_){var M=m.pendingProps,P=!1,O=(m.flags&128)!==0,Y;if((Y=O)||(Y=h!==null&&h.memoizedState===null?!1:(Yr.current&2)!==0),Y&&(P=!0,m.flags&=-129),Y=(m.flags&32)!==0,m.flags&=-33,h===null){if(jn){if(P?mu(m):pu(),(h=_r)?(h=lF(h,Hs),h=h!==null&&h.data!=="&"?h:null,h!==null&&(m.memoizedState={dehydrated:h,treeContext:ou!==null?{id:tl,overflow:nl}:null,retryLane:536870912,hydrationErrors:null},_=RL(h),_.return=m,m.child=_,Qi=m,_r=null)):h=null,h===null)throw cu(m);return RA(h)?m.lanes=32:m.lanes=536870912,null}var de=M.children;return M=M.fallback,P?(pu(),P=m.mode,de=Jy({mode:"hidden",children:de},P),M=Yd(M,P,_,null),de.return=m,M.return=m,de.sibling=M,m.child=de,M=m.child,M.memoizedState=YE(_),M.childLanes=ZE(h,Y,_),m.memoizedState=XE,nx(null,M)):(mu(m),QE(m,de))}var Te=h.memoizedState;if(Te!==null&&(de=Te.dehydrated,de!==null)){if(O)m.flags&256?(mu(m),m.flags&=-257,m=JE(h,m,_)):m.memoizedState!==null?(pu(),m.child=h.child,m.flags|=128,m=null):(pu(),de=M.fallback,P=m.mode,M=Jy({mode:"visible",children:M.children},P),de=Yd(de,P,_,null),de.flags|=2,M.return=m,de.return=m,M.sibling=de,m.child=M,rh(m,h.child,null,_),M=m.child,M.memoizedState=YE(_),M.childLanes=ZE(h,Y,_),m.memoizedState=XE,m=nx(null,M));else if(mu(m),RA(de)){if(Y=de.nextSibling&&de.nextSibling.dataset,Y)var nt=Y.dgst;Y=nt,M=Error(r(419)),M.stack="",M.digest=Y,Vg({value:M,source:null,stack:null}),m=JE(h,m,_)}else if(ai||Vf(h,m,_,!1),Y=(_&h.childLanes)!==0,ai||Y){if(Y=mr,Y!==null&&(M=$n(Y,_),M!==0&&M!==Te.retryLane))throw Te.retryLane=M,Xd(h,M),Ya(Y,h,M),qE;jA(de)||lv(),m=JE(h,m,_)}else jA(de)?(m.flags|=192,m.child=h.child,m=null):(h=Te.treeContext,_r=Vs(de.nextSibling),Qi=m,jn=!0,lu=null,Hs=!1,h!==null&&LL(m,h),m=QE(m,M.children),m.flags|=4096);return m}return P?(pu(),de=M.fallback,P=m.mode,Te=h.child,nt=Te.sibling,M=$l(Te,{mode:"hidden",children:M.children}),M.subtreeFlags=Te.subtreeFlags&65011712,nt!==null?de=$l(nt,de):(de=Yd(de,P,_,null),de.flags|=2),de.return=m,M.return=m,M.sibling=de,m.child=M,nx(null,M),M=m.child,de=h.child.memoizedState,de===null?de=YE(_):(P=de.cachePool,P!==null?(Te=ri._currentValue,P=P.parent!==Te?{parent:Te,pool:Te}:P):P=HL(),de={baseLanes:de.baseLanes|_,cachePool:P}),M.memoizedState=de,M.childLanes=ZE(h,Y,_),m.memoizedState=XE,nx(h.child,M)):(mu(m),_=h.child,h=_.sibling,_=$l(_,{mode:"visible",children:M.children}),_.return=m,_.sibling=null,h!==null&&(Y=m.deletions,Y===null?(m.deletions=[h],m.flags|=16):Y.push(h)),m.child=_,m.memoizedState=null,_)}function QE(h,m){return m=Jy({mode:"visible",children:m},h.mode),m.return=h,h.child=m}function Jy(h,m){return h=gs(22,h,null,m),h.lanes=0,h}function JE(h,m,_){return rh(m,h.child,null,_),h=QE(m,m.pendingProps.children),h.flags|=2,m.memoizedState=null,h}function t5(h,m,_){h.lanes|=m;var M=h.alternate;M!==null&&(M.lanes|=m),mE(h.return,m,_)}function eA(h,m,_,M,P,O){var Y=h.memoizedState;Y===null?h.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:M,tail:_,tailMode:P,treeForkCount:O}:(Y.isBackwards=m,Y.rendering=null,Y.renderingStartTime=0,Y.last=M,Y.tail=_,Y.tailMode=P,Y.treeForkCount=O)}function n5(h,m,_){var M=m.pendingProps,P=M.revealOrder,O=M.tail;M=M.children;var Y=Yr.current,de=(Y&2)!==0;if(de?(Y=Y&1|2,m.flags|=128):Y&=1,J(Yr,Y),ea(h,m,M,_),M=jn?$g:0,!de&&h!==null&&(h.flags&128)!==0)e:for(h=m.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&t5(h,_,m);else if(h.tag===19)t5(h,_,m);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===m)break e;for(;h.sibling===null;){if(h.return===null||h.return===m)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}switch(P){case"forwards":for(_=m.child,P=null;_!==null;)h=_.alternate,h!==null&&By(h)===null&&(P=_),_=_.sibling;_=P,_===null?(P=m.child,m.child=null):(P=_.sibling,_.sibling=null),eA(m,!1,P,_,O,M);break;case"backwards":case"unstable_legacy-backwards":for(_=null,P=m.child,m.child=null;P!==null;){if(h=P.alternate,h!==null&&By(h)===null){m.child=P;break}h=P.sibling,P.sibling=_,_=P,P=h}eA(m,!0,_,null,O,M);break;case"together":eA(m,!1,null,null,void 0,M);break;default:m.memoizedState=null}return m.child}function Xl(h,m,_){if(h!==null&&(m.dependencies=h.dependencies),bu|=m.lanes,(_&m.childLanes)===0)if(h!==null){if(Vf(h,m,_,!1),(_&m.childLanes)===0)return null}else return null;if(h!==null&&m.child!==h.child)throw Error(r(153));if(m.child!==null){for(h=m.child,_=$l(h,h.pendingProps),m.child=_,_.return=m;h.sibling!==null;)h=h.sibling,_=_.sibling=$l(h,h.pendingProps),_.return=m;_.sibling=null}return m.child}function tA(h,m){return(h.lanes&m)!==0?!0:(h=h.dependencies,!!(h!==null&&Ry(h)))}function bre(h,m,_){switch(m.tag){case 3:le(m,m.stateNode.containerInfo),uu(m,ri,h.memoizedState.cache),Zd();break;case 27:case 5:ge(m);break;case 4:le(m,m.stateNode.containerInfo);break;case 10:uu(m,m.type,m.memoizedProps.value);break;case 31:if(m.memoizedState!==null)return m.flags|=128,AE(m),null;break;case 13:var M=m.memoizedState;if(M!==null)return M.dehydrated!==null?(mu(m),m.flags|=128,null):(_&m.child.childLanes)!==0?e5(h,m,_):(mu(m),h=Xl(h,m,_),h!==null?h.sibling:null);mu(m);break;case 19:var P=(h.flags&128)!==0;if(M=(_&m.childLanes)!==0,M||(Vf(h,m,_,!1),M=(_&m.childLanes)!==0),P){if(M)return n5(h,m,_);m.flags|=128}if(P=m.memoizedState,P!==null&&(P.rendering=null,P.tail=null,P.lastEffect=null),J(Yr,Yr.current),M)break;return null;case 22:return m.lanes=0,KI(h,m,_,m.pendingProps);case 24:uu(m,ri,h.memoizedState.cache)}return Xl(h,m,_)}function r5(h,m,_){if(h!==null)if(h.memoizedProps!==m.pendingProps)ai=!0;else{if(!tA(h,_)&&(m.flags&128)===0)return ai=!1,bre(h,m,_);ai=(h.flags&131072)!==0}else ai=!1,jn&&(m.flags&1048576)!==0&&OL(m,$g,m.index);switch(m.lanes=0,m.tag){case 16:e:{var M=m.pendingProps;if(h=th(m.elementType),m.type=h,typeof h=="function")sE(h)?(M=ah(h,M),m.tag=1,m=QI(null,m,h,M,_)):(m.tag=0,m=KE(null,m,h,M,_));else{if(h!=null){var P=h.$$typeof;if(P===N){m.tag=11,m=GI(null,m,h,M,_);break e}else if(P===T){m.tag=14,m=WI(null,m,h,M,_);break e}}throw m=D(h)||h,Error(r(306,m,""))}}return m;case 0:return KE(h,m,m.type,m.pendingProps,_);case 1:return M=m.type,P=ah(M,m.pendingProps),QI(h,m,M,P,_);case 3:e:{if(le(m,m.stateNode.containerInfo),h===null)throw Error(r(387));M=m.pendingProps;var O=m.memoizedState;P=O.element,_E(h,m),Zg(m,M,null,_);var Y=m.memoizedState;if(M=Y.cache,uu(m,ri,M),M!==O.cache&&pE(m,[ri],_,!0),Yg(),M=Y.element,O.isDehydrated)if(O={element:M,isDehydrated:!1,cache:Y.cache},m.updateQueue.baseState=O,m.memoizedState=O,m.flags&256){m=JI(h,m,M,_);break e}else if(M!==P){P=Us(Error(r(424)),m),Vg(P),m=JI(h,m,M,_);break e}else{switch(h=m.stateNode.containerInfo,h.nodeType){case 9:h=h.body;break;default:h=h.nodeName==="HTML"?h.ownerDocument.body:h}for(_r=Vs(h.firstChild),Qi=m,jn=!0,lu=null,Hs=!0,_=KL(m,null,M,_),m.child=_;_;)_.flags=_.flags&-3|4096,_=_.sibling}else{if(Zd(),M===P){m=Xl(h,m,_);break e}ea(h,m,M,_)}m=m.child}return m;case 26:return Qy(h,m),h===null?(_=mF(m.type,null,m.pendingProps,null))?m.memoizedState=_:jn||(_=m.type,h=m.pendingProps,M=pv(he.current).createElement(_),M[Kt]=m,M[dn]=h,ta(M,_,h),Oe(M),m.stateNode=M):m.memoizedState=mF(m.type,h.memoizedProps,m.pendingProps,h.memoizedState),null;case 27:return ge(m),h===null&&jn&&(M=m.stateNode=dF(m.type,m.pendingProps,he.current),Qi=m,Hs=!0,P=_r,Su(m.type)?(DA=P,_r=Vs(M.firstChild)):_r=P),ea(h,m,m.pendingProps.children,_),Qy(h,m),h===null&&(m.flags|=4194304),m.child;case 5:return h===null&&jn&&((P=M=_r)&&(M=Kre(M,m.type,m.pendingProps,Hs),M!==null?(m.stateNode=M,Qi=m,_r=Vs(M.firstChild),Hs=!1,P=!0):P=!1),P||cu(m)),ge(m),P=m.type,O=m.pendingProps,Y=h!==null?h.memoizedProps:null,M=O.children,CA(P,O)?M=null:Y!==null&&CA(P,Y)&&(m.flags|=32),m.memoizedState!==null&&(P=TE(h,m,cre,null,null,_),xx._currentValue=P),Qy(h,m),ea(h,m,M,_),m.child;case 6:return h===null&&jn&&((h=_=_r)&&(_=Xre(_,m.pendingProps,Hs),_!==null?(m.stateNode=_,Qi=m,_r=null,h=!0):h=!1),h||cu(m)),null;case 13:return e5(h,m,_);case 4:return le(m,m.stateNode.containerInfo),M=m.pendingProps,h===null?m.child=rh(m,null,M,_):ea(h,m,M,_),m.child;case 11:return GI(h,m,m.type,m.pendingProps,_);case 7:return ea(h,m,m.pendingProps,_),m.child;case 8:return ea(h,m,m.pendingProps.children,_),m.child;case 12:return ea(h,m,m.pendingProps.children,_),m.child;case 10:return M=m.pendingProps,uu(m,m.type,M.value),ea(h,m,M.children,_),m.child;case 9:return P=m.type._context,M=m.pendingProps.children,Jd(m),P=Ji(P),M=M(P),m.flags|=1,ea(h,m,M,_),m.child;case 14:return WI(h,m,m.type,m.pendingProps,_);case 15:return qI(h,m,m.type,m.pendingProps,_);case 19:return n5(h,m,_);case 31:return xre(h,m,_);case 22:return KI(h,m,_,m.pendingProps);case 24:return Jd(m),M=Ji(ri),h===null?(P=bE(),P===null&&(P=mr,O=gE(),P.pooledCache=O,O.refCount++,O!==null&&(P.pooledCacheLanes|=_),P=O),m.memoizedState={parent:M,cache:P},vE(m),uu(m,ri,P)):((h.lanes&_)!==0&&(_E(h,m),Zg(m,null,null,_),Yg()),P=h.memoizedState,O=m.memoizedState,P.parent!==M?(P={parent:M,cache:M},m.memoizedState=P,m.lanes===0&&(m.memoizedState=m.updateQueue.baseState=P),uu(m,ri,M)):(M=O.cache,uu(m,ri,M),M!==P.cache&&pE(m,[ri],_,!0))),ea(h,m,m.pendingProps.children,_),m.child;case 29:throw m.pendingProps}throw Error(r(156,m.tag))}function Yl(h){h.flags|=4}function nA(h,m,_,M,P){if((m=(h.mode&32)!==0)&&(m=!1),m){if(h.flags|=16777216,(P&335544128)===P)if(h.stateNode.complete)h.flags|=8192;else if(k5())h.flags|=8192;else throw nh=Iy,yE}else h.flags&=-16777217}function i5(h,m){if(m.type!=="stylesheet"||(m.state.loading&4)!==0)h.flags&=-16777217;else if(h.flags|=16777216,!yF(m))if(k5())h.flags|=8192;else throw nh=Iy,yE}function ev(h,m){m!==null&&(h.flags|=4),h.flags&16384&&(m=h.tag!==22?Tt():536870912,h.lanes|=m,nm|=m)}function rx(h,m){if(!jn)switch(h.tailMode){case"hidden":m=h.tail;for(var _=null;m!==null;)m.alternate!==null&&(_=m),m=m.sibling;_===null?h.tail=null:_.sibling=null;break;case"collapsed":_=h.tail;for(var M=null;_!==null;)_.alternate!==null&&(M=_),_=_.sibling;M===null?m||h.tail===null?h.tail=null:h.tail.sibling=null:M.sibling=null}}function wr(h){var m=h.alternate!==null&&h.alternate.child===h.child,_=0,M=0;if(m)for(var P=h.child;P!==null;)_|=P.lanes|P.childLanes,M|=P.subtreeFlags&65011712,M|=P.flags&65011712,P.return=h,P=P.sibling;else for(P=h.child;P!==null;)_|=P.lanes|P.childLanes,M|=P.subtreeFlags,M|=P.flags,P.return=h,P=P.sibling;return h.subtreeFlags|=M,h.childLanes=_,m}function yre(h,m,_){var M=m.pendingProps;switch(uE(m),m.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wr(m),null;case 1:return wr(m),null;case 3:return _=m.stateNode,M=null,h!==null&&(M=h.memoizedState.cache),m.memoizedState.cache!==M&&(m.flags|=2048),Wl(ri),fe(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),(h===null||h.child===null)&&($f(m)?Yl(m):h===null||h.memoizedState.isDehydrated&&(m.flags&256)===0||(m.flags|=1024,hE())),wr(m),null;case 26:var P=m.type,O=m.memoizedState;return h===null?(Yl(m),O!==null?(wr(m),i5(m,O)):(wr(m),nA(m,P,null,M,_))):O?O!==h.memoizedState?(Yl(m),wr(m),i5(m,O)):(wr(m),m.flags&=-16777217):(h=h.memoizedProps,h!==M&&Yl(m),wr(m),nA(m,P,h,M,_)),null;case 27:if(Ee(m),_=he.current,P=m.type,h!==null&&m.stateNode!=null)h.memoizedProps!==M&&Yl(m);else{if(!M){if(m.stateNode===null)throw Error(r(166));return wr(m),null}h=ie.current,$f(m)?IL(m):(h=dF(P,M,_),m.stateNode=h,Yl(m))}return wr(m),null;case 5:if(Ee(m),P=m.type,h!==null&&m.stateNode!=null)h.memoizedProps!==M&&Yl(m);else{if(!M){if(m.stateNode===null)throw Error(r(166));return wr(m),null}if(O=ie.current,$f(m))IL(m);else{var Y=pv(he.current);switch(O){case 1:O=Y.createElementNS("http://www.w3.org/2000/svg",P);break;case 2:O=Y.createElementNS("http://www.w3.org/1998/Math/MathML",P);break;default:switch(P){case"svg":O=Y.createElementNS("http://www.w3.org/2000/svg",P);break;case"math":O=Y.createElementNS("http://www.w3.org/1998/Math/MathML",P);break;case"script":O=Y.createElement("div"),O.innerHTML=" + diff --git a/static/sw.js b/static/sw.js index b0d9bbb5d..2cc272b2f 100644 --- a/static/sw.js +++ b/static/sw.js @@ -1,6 +1,6 @@ // Bambuddy Service Worker -const CACHE_NAME = 'bambuddy-v15'; -const STATIC_CACHE = 'bambuddy-static-v15'; +const CACHE_NAME = 'bambuddy-v16'; +const STATIC_CACHE = 'bambuddy-static-v16'; // Static assets to cache on install const STATIC_ASSETS = [