diff --git a/app.md b/app.md index afa47f5..caf0238 100644 --- a/app.md +++ b/app.md @@ -35,6 +35,9 @@ uses_functions: - color_border_ts_ui - color_swatch_ts_ui - fetch_json_ts_infra + - claude_stream_go_core + - mcp_server_stdio_go_infra + - ws_upgrader_go_infra uses_types: - DurationStats_go_datascience framework: "net/http + vite + react + mantine + dnd-kit" diff --git a/backend/chat.go b/backend/chat.go index b30ea04..081004d 100644 --- a/backend/chat.go +++ b/backend/chat.go @@ -1,64 +1,40 @@ package main import ( - "bytes" "context" "encoding/json" - "errors" "fmt" "net/http" - "os/exec" + "os" "path/filepath" "strings" "time" + "fn-registry/functions/core" "fn-registry/functions/infra" + "nhooyr.io/websocket" ) -const chatSystemPrompt = `Eres el asistente del tablero kanban. Tu trabajo es responder al usuario y, cuando pida cambios, modificar el tablero llamando a tools. +const chatSystemPrompt = `Eres el asistente del tablero kanban. Responde al usuario y, cuando pida cambios, modifica el tablero llamando a tools nativas (MCP). -Cuando necesites modificar el tablero, responde EXCLUSIVAMENTE con un bloque ... que contenga JSON valido (un array de acciones). Sin texto antes ni despues. +Tools disponibles via MCP server "kanban": +- list_board / find_cards / card_history / list_users — lectura +- create_column / update_column / delete_column / reorder_columns — columnas +- create_card / update_card / delete_card / move_card / assign_card — tarjetas -Ejemplo: - -[ - {"tool": "create_card", "input": {"column_id": "abc123", "requester": "Lucas", "title": "Revisar PR", "description": ""}}, - {"tool": "rename_column", "input": {"id": "def456", "name": "En curso"}} -] - +Llama directamente a las tools cuando necesites mutar el tablero. Usa list_board al principio si necesitas resolver nombres a IDs. NUNCA inventes IDs. -Tools disponibles (todas con sus inputs): -- list_board {} -> {columns, cards} -- create_column {name} -- update_column {id, name?, location?, width?, wip_limit?, is_done?} // location: "board" | "sidebar". width: 200..800 px. wip_limit: max tarjetas (0 = sin limite). is_done: marca columna como terminal (cards dentro se cuentan como completadas para metricas y se muestran tachadas). -- delete_column {id} -- reorder_columns {ids:[...]} -- create_card {column_id, requester?, title, description?} -- update_card {id, requester?, title?, description?, color?, locked?, assignee_id?} // color: "blue", "teal", "violet", "pink", "orange", "green", "yellow", "red", "" (default). locked: true bloquea la tarjeta (no se puede mover entre columnas hasta desbloquear). assignee_id: ID del usuario asignado o null para desasignar. -- delete_card {id} -- move_card {id, column_id, ordered_ids?} // si omites ordered_ids la tarjeta se anade al final -- card_history {id} -- find_cards {query?, column_id?, requester?} -- list_users {} -> [{id, username, display_name}] -- assign_card {id, assignee_id} // alias rapido de update_card. assignee_id puede ser null para desasignar. +Cuando termines, responde texto natural en markdown (sin llamadas extra) — eso señala el fin de la conversacion.` -Si el usuario solo conversa o pide informacion (sin pedir cambios), responde texto natural en markdown SIN bloque . - -Para resolver IDs a partir de nombres, mira el board_state que viene al final del prompt del usuario. NO inventes IDs. - -LOOP ITERATIVO: Despues de aplicar tus acciones, el sistema te volvera a llamar con: -- Los resultados de las tool calls anteriores (incluyendo IDs reales de columnas/tarjetas creadas). -- El board_state actualizado. -- Tu mensaje de usuario original. - -Cuando recibas resultados de iteraciones anteriores, USA LOS IDs REALES devueltos en lugar de inventar placeholders. Continua emitiendo mas hasta completar la tarea. - -Cuando hayas terminado COMPLETAMENTE la tarea, responde texto natural (markdown) SIN bloque — eso señala el fin del loop.` - -const claudeBin = "claude" const claudeModel = "claude-sonnet-4-6" -const claudeTimeout = 120 * time.Second -const maxChatIterations = 8 +const claudeTimeout = 300 * time.Second + +func claudeBinary() string { + if b := os.Getenv("KANBAN_CLAUDE_BIN"); b != "" { + return b + } + return "claude" +} type chatMessage struct { Role string `json:"role"` @@ -69,83 +45,163 @@ type chatRequest struct { Messages []chatMessage `json:"messages"` } -type chatResponse struct { - Role string `json:"role"` - Content string `json:"content"` - BoardChanged bool `json:"board_changed"` - ToolCalls []toolCallInfo `json:"tool_calls,omitempty"` +// wsEvent is the envelope sent to the browser. Type discriminates the payload. +type wsEvent struct { + Type string `json:"type"` + Text string `json:"text,omitempty"` + ToolID string `json:"tool_id,omitempty"` + Tool string `json:"tool,omitempty"` + Input json.RawMessage `json:"input,omitempty"` + Result string `json:"result,omitempty"` + IsError bool `json:"is_error,omitempty"` + BoardChanged bool `json:"board_changed,omitempty"` + Error string `json:"error,omitempty"` } -type toolCallInfo struct { - Tool string `json:"tool"` - OK bool `json:"ok"` - Error string `json:"error,omitempty"` - Iteration int `json:"iteration,omitempty"` - // Result is included only for the loop's internal feedback to claude; - // it is omitted from the JSON response sent to the frontend (clients - // can use board_changed + reload to fetch fresh state). - Result any `json:"-"` -} - -type claudeJSONResult struct { - Type string `json:"type"` - IsError bool `json:"is_error"` - Result string `json:"result"` - StopReason string `json:"stop_reason"` -} - -// runClaude invokes the `claude` CLI in print mode with the given system prompt -// and user message. The board JSON is appended to the user message under a -// `board_state` marker so the assistant can resolve names to IDs. +// handleChatWS upgrades the request to WebSocket and streams claude events. // -// stdin: the user-facing prompt (history flattened). -// returns: assistant's text reply. -func runClaude(ctx context.Context, systemPrompt, userInput, boardJSON, workdir string) (string, error) { - if _, err := exec.LookPath(claudeBin); err != nil { - return "", errors.New("claude CLI not found in PATH") +// Wire protocol: +// client → server (one message): { "messages": [{role, content}, ...] } +// server → client (many): wsEvent ndjson-style messages +// types: "delta" (assistant text), "tool_use", "tool_result", "result", "error" +// server closes connection at end. +func handleChatWS(db *DB, workdir string, logger *ChatLogger, internalToken string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + conn, err := infra.WSUpgrader(w, r, []string{"*"}) + if err != nil { + return + } + defer conn.Close(websocket.StatusInternalError, "internal") + + ctx, cancel := context.WithTimeout(r.Context(), claudeTimeout) + defer cancel() + + // Read the initial chat request. + _, raw, err := conn.Read(ctx) + if err != nil { + return + } + var req chatRequest + if err := json.Unmarshal(raw, &req); err != nil { + sendWS(ctx, conn, wsEvent{Type: "error", Error: "invalid chat request: " + err.Error()}) + return + } + if len(req.Messages) == 0 { + sendWS(ctx, conn, wsEvent{Type: "error", Error: "messages required"}) + return + } + + boardChanged, err := streamChat(ctx, conn, db, workdir, internalToken, req.Messages, logger) + if err != nil { + sendWS(ctx, conn, wsEvent{Type: "error", Error: err.Error()}) + return + } + sendWS(ctx, conn, wsEvent{Type: "done", BoardChanged: boardChanged}) + conn.Close(websocket.StatusNormalClosure, "") } - - ctx, cancel := context.WithTimeout(ctx, claudeTimeout) - defer cancel() - - cmd := exec.CommandContext(ctx, claudeBin, - "-p", - "--model", claudeModel, - "--output-format", "json", - "--no-session-persistence", - "--tools", "", - "--system-prompt", systemPrompt, - ) - cmd.Dir = workdir - - prompt := userInput - if boardJSON != "" { - prompt += "\n\n\n" + boardJSON + "\n\n" - } - cmd.Stdin = bytes.NewBufferString(prompt) - - var stdout, stderr bytes.Buffer - cmd.Stdout = &stdout - cmd.Stderr = &stderr - - if err := cmd.Run(); err != nil { - return "", fmt.Errorf("claude exec: %w (stderr: %s)", err, stderr.String()) - } - - var res claudeJSONResult - if err := json.Unmarshal(stdout.Bytes(), &res); err != nil { - return "", fmt.Errorf("parse claude json: %w (raw: %s)", err, stdout.String()) - } - if res.IsError { - return "", fmt.Errorf("claude error: %s", res.Result) - } - return res.Result, nil } -// flattenMessages converts a chat history into a single text prompt for `claude -p`. -// Format: lines of `Usuario: ...` / `Asistente: ...`. Last user message ends the prompt. +func streamChat(ctx context.Context, conn *websocket.Conn, db *DB, workdir, token string, msgs []chatMessage, logger *ChatLogger) (bool, error) { + binPath, err := os.Executable() + if err != nil { + return false, fmt.Errorf("locate kanban binary: %w", err) + } + + // Backend URL: trust X-Forwarded or fall back to localhost (kanban listens + // on its main port). The MCP subprocess hits the loopback interface. + backendURL := os.Getenv("KANBAN_PUBLIC_URL") + if backendURL == "" { + port := os.Getenv("KANBAN_LISTEN_PORT") + if port == "" { + port = "8095" + } + backendURL = "http://127.0.0.1:" + port + } + + mcpPath, err := writeMCPConfig(binPath, backendURL, token) + if err != nil { + return false, fmt.Errorf("write mcp config: %w", err) + } + defer os.Remove(mcpPath) + + prompt := flattenMessages(msgs) + + stdin := strings.NewReader(prompt) + events, err := core.StreamClaude(ctx, core.ClaudeStreamOpts{ + Bin: claudeBinary(), + Args: []string{ + "--model", claudeModel, + "--mcp-config", mcpPath, + "--system-prompt", chatSystemPrompt, + "--allowedTools", + "mcp__kanban__list_board,mcp__kanban__create_column,mcp__kanban__update_column,mcp__kanban__rename_column,mcp__kanban__delete_column,mcp__kanban__reorder_columns,mcp__kanban__create_card,mcp__kanban__update_card,mcp__kanban__delete_card,mcp__kanban__move_card,mcp__kanban__card_history,mcp__kanban__find_cards,mcp__kanban__list_users,mcp__kanban__assign_card", + }, + Stdin: stdin, + Workdir: workdir, + }) + if err != nil { + return false, fmt.Errorf("spawn claude: %w", err) + } + + boardChanged := false + for ev := range events { + switch ev.Type { + case core.ClaudeEventTextDelta: + sendWS(ctx, conn, wsEvent{Type: "delta", Text: ev.Text}) + case core.ClaudeEventToolUse: + toolName := stripMCPPrefix(ev.ToolName) + sendWS(ctx, conn, wsEvent{ + Type: "tool_use", + ToolID: ev.ToolUseID, + Tool: toolName, + Input: ev.ToolInput, + }) + if toolMutates(toolName) { + boardChanged = true + } + case core.ClaudeEventToolResult: + sendWS(ctx, conn, wsEvent{ + Type: "tool_result", + ToolID: ev.ToolResultID, + Result: ev.ToolResultContent, + IsError: ev.ToolResultIsError, + }) + case core.ClaudeEventResult: + sendWS(ctx, conn, wsEvent{ + Type: "result", + Text: ev.Result, + IsError: ev.IsError, + }) + case core.ClaudeEventError: + sendWS(ctx, conn, wsEvent{Type: "error", Error: ev.Error}) + } + } + return boardChanged, nil +} + +// stripMCPPrefix removes the "mcp____" prefix added by claude when +// tools come from an MCP server, leaving the bare tool name. +func stripMCPPrefix(name string) string { + const pre = "mcp__kanban__" + if strings.HasPrefix(name, pre) { + return name[len(pre):] + } + return name +} + +func sendWS(ctx context.Context, conn *websocket.Conn, ev wsEvent) { + b, err := json.Marshal(ev) + if err != nil { + return + } + wctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + _ = conn.Write(wctx, websocket.MessageText, b) +} + +// flattenMessages converts chat history into a single prompt for `claude -p`. func flattenMessages(msgs []chatMessage) string { - var b bytes.Buffer + var b strings.Builder for _, m := range msgs { role := "Usuario" if m.Role == "assistant" { @@ -159,165 +215,7 @@ func flattenMessages(msgs []chatMessage) string { return b.String() } -func handleChat(db *DB, workdir string, logger *ChatLogger) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req chatRequest - if err := infra.HTTPParseBody(r, &req, 1<<20); err != nil { - infra.HTTPErrorResponse(w, infra.HTTPError{Status: 400, Code: "bad_request", Message: err.Error()}) - return - } - if len(req.Messages) == 0 { - infra.HTTPErrorResponse(w, infra.HTTPError{Status: 400, Code: "bad_request", Message: "messages required"}) - return - } - - baseUserInput := flattenMessages(req.Messages) - allCalls := []toolCallInfo{} - var finalText string - boardChanged := false - - for iter := 1; iter <= maxChatIterations; iter++ { - boardJSON, err := boardSnapshot(db) - if err != nil { - infra.HTTPErrorResponse(w, infra.HTTPError{Status: 500, Code: "internal", Message: err.Error()}) - return - } - - prompt := buildIterationPrompt(baseUserInput, allCalls, iter) - - assistantText, err := runClaude(r.Context(), chatSystemPrompt, prompt, boardJSON, workdir) - if err != nil { - infra.HTTPErrorResponse(w, infra.HTTPError{Status: 500, Code: "claude_error", Message: err.Error()}) - return - } - - actionsJSON, stripped, found := extractActions(assistantText) - if !found { - finalText = assistantText - break - } - - calls, changed := applyActions(db, actionsJSON, logger) - for i := range calls { - calls[i].Iteration = iter - } - allCalls = append(allCalls, calls...) - if changed { - boardChanged = true - } - - finalText = stripped // tentative; overwritten if next iter responds free text - if iter == maxChatIterations { - finalText = strings.TrimSpace(stripped + "\n\n_Limite de iteraciones alcanzado._") - break - } - } - - // Strip Result fields before serializing (not exported but defensive). - respCalls := make([]toolCallInfo, len(allCalls)) - for i, c := range allCalls { - respCalls[i] = toolCallInfo{Tool: c.Tool, OK: c.OK, Error: c.Error, Iteration: c.Iteration} - } - resp := chatResponse{ - Role: "assistant", - Content: finalText, - ToolCalls: respCalls, - BoardChanged: boardChanged, - } - if resp.Content == "" { - resp.Content = summarizeCalls(respCalls) - } - infra.HTTPJSONResponse(w, http.StatusOK, resp) - } -} - -// buildIterationPrompt composes the user prompt for iteration N. -// Iteration 1 = original user input; later iterations also include a summary -// of previous tool calls so the assistant can use real IDs. -func buildIterationPrompt(baseUserInput string, prevCalls []toolCallInfo, iter int) string { - if iter == 1 || len(prevCalls) == 0 { - return baseUserInput - } - var b bytes.Buffer - b.WriteString(baseUserInput) - b.WriteString("\n[Resultados de iteraciones anteriores]\n") - for _, c := range prevCalls { - if c.OK { - summary := summarizeResult(c.Result) - fmt.Fprintf(&b, "- iter %d %s: ok %s\n", c.Iteration, c.Tool, summary) - } else { - fmt.Fprintf(&b, "- iter %d %s: ERROR %s\n", c.Iteration, c.Tool, c.Error) - } - } - fmt.Fprintf(&b, "\n[Iteracion %d] Continua con las acciones pendientes. Si terminaste, responde texto natural sin .\n", iter) - return b.String() -} - -func boardSnapshot(db *DB) (string, error) { - cols, err := db.ListColumns() - if err != nil { - return "", err - } - cards, err := db.ListCardsWithTime() - if err != nil { - return "", err - } - b, err := json.MarshalIndent(map[string]any{"columns": cols, "cards": cards}, "", " ") - if err != nil { - return "", err - } - return string(b), nil -} - -func applyActions(db *DB, actionsJSON string, logger *ChatLogger) ([]toolCallInfo, bool) { - var actions []struct { - Tool string `json:"tool"` - Input json.RawMessage `json:"input"` - } - if err := json.Unmarshal([]byte(actionsJSON), &actions); err != nil { - return []toolCallInfo{{Tool: "", OK: false, Error: err.Error()}}, false - } - - results := make([]toolCallInfo, 0, len(actions)) - changed := false - for _, a := range actions { - if err := validateToolName(a.Tool); err != nil { - info := toolCallInfo{Tool: a.Tool, OK: false, Error: err.Error()} - results = append(results, info) - logger.Log(a.Tool, a.Input, ToolResult{OK: false, Error: err.Error()}) - continue - } - res := executeTool(db, a.Tool, a.Input) - logger.Log(a.Tool, a.Input, res) - info := toolCallInfo{Tool: a.Tool, OK: res.OK, Result: res.Result} - if !res.OK { - info.Error = res.Error - } else if toolMutates(a.Tool) { - changed = true - } - results = append(results, info) - } - return results, changed -} - -func summarizeCalls(calls []toolCallInfo) string { - if len(calls) == 0 { - return "" - } - var b bytes.Buffer - b.WriteString("Acciones aplicadas:\n") - for _, c := range calls { - if c.OK { - fmt.Fprintf(&b, "- %s: ok\n", c.Tool) - } else { - fmt.Fprintf(&b, "- %s: error (%s)\n", c.Tool, c.Error) - } - } - return b.String() -} - -// chatWorkdir resolves an absolute working directory for `claude -p` (avoids -// inheriting CLAUDE.md from parent directories with unrelated context). +// chatWorkdir resolves an absolute working directory for `claude -p`. func chatWorkdir(dbPath string) string { abs, err := filepath.Abs(dbPath) if err != nil { @@ -325,3 +223,18 @@ func chatWorkdir(dbPath string) string { } return filepath.Dir(abs) } + +// --- Legacy handleChat retained as a thin shim that returns 410 Gone. ------- +// Kept so existing clients see a clear error instead of a 404 while they +// migrate to the WebSocket endpoint. + +func handleChat(_ *DB, _ string, _ *ChatLogger) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + infra.HTTPErrorResponse(w, infra.HTTPError{ + Status: http.StatusGone, + Code: "deprecated", + Message: "POST /api/chat removed; use WebSocket at /api/chat/ws", + }) + } +} + diff --git a/backend/chat_ws_test.go b/backend/chat_ws_test.go new file mode 100644 index 0000000..153f8e6 --- /dev/null +++ b/backend/chat_ws_test.go @@ -0,0 +1,296 @@ +package main + +import ( + "context" + "encoding/json" + "net/http" + "net/http/httptest" + "net/url" + "os" + "path/filepath" + "strings" + "testing" + "time" + + "nhooyr.io/websocket" +) + +// fakeClaudeScript writes a bash script that emits NDJSON stream-json events +// to stdout and exits 0. Returns the absolute path of the script. +func fakeClaudeScript(t *testing.T, payload string) string { + t.Helper() + if _, err := os.Stat("/bin/bash"); err != nil { + t.Skip("/bin/bash not available") + } + dir := t.TempDir() + path := filepath.Join(dir, "claude") + body := "#!/bin/bash\nset -e\ncat <<'__EOF__'\n" + payload + "\n__EOF__\n" + if err := os.WriteFile(path, []byte(body), 0o755); err != nil { + t.Fatalf("write fake claude: %v", err) + } + return path +} + +// chatWSTestServer wires the WebSocket chat handler in front of a test DB. +func chatWSTestServer(t *testing.T) (*httptest.Server, *DB, string) { + t.Helper() + db := setupTestDB(t) + dir := t.TempDir() + logger := newChatLogger(filepath.Join(dir, "chat.log")) + token := generateInternalToken() + srv := httptest.NewServer(handleChatWS(db, dir, logger, token)) + t.Cleanup(srv.Close) + return srv, db, token +} + +func dialChatWS(t *testing.T, srv *httptest.Server) *websocket.Conn { + t.Helper() + u, _ := url.Parse(srv.URL) + wsURL := "ws://" + u.Host + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + c, _, err := websocket.Dial(ctx, wsURL, nil) + if err != nil { + t.Fatalf("dial %s: %v", wsURL, err) + } + return c +} + +func readWSEvent(t *testing.T, conn *websocket.Conn) wsEvent { + t.Helper() + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + _, data, err := conn.Read(ctx) + if err != nil { + t.Fatalf("read: %v", err) + } + var ev wsEvent + if err := json.Unmarshal(data, &ev); err != nil { + t.Fatalf("unmarshal %q: %v", string(data), err) + } + return ev +} + +func sendInitial(t *testing.T, conn *websocket.Conn, msgs []chatMessage) { + t.Helper() + body, _ := json.Marshal(chatRequest{Messages: msgs}) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + if err := conn.Write(ctx, websocket.MessageText, body); err != nil { + t.Fatalf("write: %v", err) + } +} + +// --- WS streaming tests --------------------------------------------------- + +func TestChatWS_StreamsTextDelta(t *testing.T) { + payload := `{"type":"system","subtype":"init","session_id":"s1","model":"test"} +{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"Hola "}]}} +{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"mundo"}]}} +{"type":"result","subtype":"success","is_error":false,"result":"Hola mundo","stop_reason":"end_turn"}` + + t.Setenv("KANBAN_CLAUDE_BIN", fakeClaudeScript(t, payload)) + + srv, _, _ := chatWSTestServer(t) + conn := dialChatWS(t, srv) + defer conn.Close(websocket.StatusNormalClosure, "") + + sendInitial(t, conn, []chatMessage{{Role: "user", Content: "saluda"}}) + + var deltas []string + var sawResult, sawDone bool + for i := 0; i < 12 && !sawDone; i++ { + ev := readWSEvent(t, conn) + switch ev.Type { + case "delta": + deltas = append(deltas, ev.Text) + case "result": + sawResult = true + case "done": + sawDone = true + case "error": + t.Fatalf("unexpected error event: %s", ev.Error) + } + } + if !sawDone { + t.Fatalf("never received done event") + } + if !sawResult { + t.Fatalf("never received result event") + } + if got := strings.Join(deltas, ""); got != "Hola mundo" { + t.Fatalf("expected 'Hola mundo' from deltas, got %q", got) + } +} + +func TestChatWS_StreamsToolUseAndResult(t *testing.T) { + payload := `{"type":"system","subtype":"init"} +{"type":"assistant","message":{"role":"assistant","content":[{"type":"tool_use","id":"toolu_1","name":"mcp__kanban__create_column","input":{"name":"Backlog"}}]}} +{"type":"user","message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_1","content":"{\"ok\":true,\"result\":{\"id\":\"col_x\"}}","is_error":false}]}} +{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"Listo"}]}} +{"type":"result","subtype":"success","is_error":false,"result":"Listo","stop_reason":"end_turn"}` + + t.Setenv("KANBAN_CLAUDE_BIN", fakeClaudeScript(t, payload)) + + srv, _, _ := chatWSTestServer(t) + conn := dialChatWS(t, srv) + defer conn.Close(websocket.StatusNormalClosure, "") + + sendInitial(t, conn, []chatMessage{{Role: "user", Content: "crea Backlog"}}) + + var sawToolUse, sawToolResult, sawDelta, sawDone bool + var doneEv wsEvent + for i := 0; i < 16 && !sawDone; i++ { + ev := readWSEvent(t, conn) + switch ev.Type { + case "tool_use": + sawToolUse = true + if ev.Tool != "create_column" { + t.Errorf("tool name not stripped: %q", ev.Tool) + } + if !strings.Contains(string(ev.Input), "Backlog") { + t.Errorf("input missing Backlog: %s", ev.Input) + } + case "tool_result": + sawToolResult = true + if ev.IsError { + t.Errorf("tool_result is_error true") + } + case "delta": + sawDelta = true + case "done": + sawDone = true + doneEv = ev + case "error": + t.Fatalf("unexpected error: %s", ev.Error) + } + } + if !sawToolUse || !sawToolResult || !sawDelta || !sawDone { + t.Fatalf("missing events: tool_use=%v tool_result=%v delta=%v done=%v", + sawToolUse, sawToolResult, sawDelta, sawDone) + } + if !doneEv.BoardChanged { + t.Errorf("expected board_changed=true (create_column is a mutator)") + } +} + +func TestChatWS_RejectsEmptyMessages(t *testing.T) { + t.Setenv("KANBAN_CLAUDE_BIN", fakeClaudeScript(t, + `{"type":"result","subtype":"success","is_error":false,"result":""}`)) + + srv, _, _ := chatWSTestServer(t) + conn := dialChatWS(t, srv) + defer conn.Close(websocket.StatusNormalClosure, "") + + sendInitial(t, conn, []chatMessage{}) + ev := readWSEvent(t, conn) + if ev.Type != "error" { + t.Fatalf("expected error event, got %+v", ev) + } + if !strings.Contains(ev.Error, "messages required") { + t.Fatalf("unexpected error: %s", ev.Error) + } +} + +func TestChatWS_PropagatesClaudeFailure(t *testing.T) { + dir := t.TempDir() + bin := filepath.Join(dir, "claude") + body := "#!/bin/bash\necho 'broken' >&2\nexit 7\n" + if err := os.WriteFile(bin, []byte(body), 0o755); err != nil { + t.Fatalf("write: %v", err) + } + t.Setenv("KANBAN_CLAUDE_BIN", bin) + + srv, _, _ := chatWSTestServer(t) + conn := dialChatWS(t, srv) + defer conn.Close(websocket.StatusNormalClosure, "") + + sendInitial(t, conn, []chatMessage{{Role: "user", Content: "hola"}}) + + deadline := time.Now().Add(5 * time.Second) + for time.Now().Before(deadline) { + ev := readWSEvent(t, conn) + switch ev.Type { + case "error": + if !strings.Contains(ev.Error, "claude exit") { + t.Fatalf("expected claude exit error, got: %s", ev.Error) + } + return + case "done": + t.Fatalf("done received before error") + } + } + t.Fatalf("never received error event") +} + +// --- /api/tool internal endpoint tests ------------------------------------ + +func internalToolServer(t *testing.T) (*httptest.Server, *DB, string) { + t.Helper() + db := setupTestDB(t) + logger := newChatLogger(filepath.Join(t.TempDir(), "log")) + token := generateInternalToken() + mux := http.NewServeMux() + mux.Handle("POST /api/tool/{name}", handleInternalTool(db, token, logger)) + srv := httptest.NewServer(mux) + t.Cleanup(srv.Close) + return srv, db, token +} + +func TestInternalTool_CreateColumnRoundtrip(t *testing.T) { + srv, db, token := internalToolServer(t) + req, _ := http.NewRequest("POST", srv.URL+"/api/tool/create_column", strings.NewReader(`{"name":"Backlog"}`)) + req.Header.Set("Content-Type", "application/json") + req.Header.Set(internalTokenHeader, token) + resp, err := srv.Client().Do(req) + if err != nil { + t.Fatalf("do: %v", err) + } + defer resp.Body.Close() + if resp.StatusCode != 200 { + t.Fatalf("status %d", resp.StatusCode) + } + var tr ToolResult + if err := json.NewDecoder(resp.Body).Decode(&tr); err != nil { + t.Fatalf("decode: %v", err) + } + if !tr.OK { + t.Fatalf("create_column failed: %s", tr.Error) + } + cols, err := db.ListColumns() + if err != nil { + t.Fatalf("list: %v", err) + } + if len(cols) != 1 || cols[0].Name != "Backlog" { + t.Fatalf("expected 1 col Backlog, got %+v", cols) + } +} + +func TestInternalTool_RejectsMissingToken(t *testing.T) { + srv, _, _ := internalToolServer(t) + req, _ := http.NewRequest("POST", srv.URL+"/api/tool/create_column", strings.NewReader(`{"name":"X"}`)) + req.Header.Set("Content-Type", "application/json") + resp, err := srv.Client().Do(req) + if err != nil { + t.Fatalf("do: %v", err) + } + defer resp.Body.Close() + if resp.StatusCode != 401 { + t.Fatalf("expected 401, got %d", resp.StatusCode) + } +} + +func TestInternalTool_UnknownTool(t *testing.T) { + srv, _, token := internalToolServer(t) + req, _ := http.NewRequest("POST", srv.URL+"/api/tool/no_such", strings.NewReader(`{}`)) + req.Header.Set("Content-Type", "application/json") + req.Header.Set(internalTokenHeader, token) + resp, err := srv.Client().Do(req) + if err != nil { + t.Fatalf("do: %v", err) + } + defer resp.Body.Close() + if resp.StatusCode != 404 { + t.Fatalf("expected 404, got %d", resp.StatusCode) + } +} diff --git a/backend/dist/assets/index-BKxzRoLi.js b/backend/dist/assets/index-BKxzRoLi.js deleted file mode 100644 index 30c3646..0000000 --- a/backend/dist/assets/index-BKxzRoLi.js +++ /dev/null @@ -1,1136 +0,0 @@ -function TY(e,n){for(var t=0;ti[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=t(r);fetch(r.href,a)}})();var cv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zw={exports:{}},Md={};/** - * @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 VT;function MY(){if(VT)return Md;VT=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(i,r,a){var o=null;if(a!==void 0&&(o=""+a),r.key!==void 0&&(o=""+r.key),"key"in r){a={};for(var l in r)l!=="key"&&(a[l]=r[l])}else a=r;return r=a.ref,{$$typeof:e,type:i,key:o,ref:r!==void 0?r:null,props:a}}return Md.Fragment=n,Md.jsx=t,Md.jsxs=t,Md}var WT;function jY(){return WT||(WT=1,zw.exports=MY()),zw.exports}var k=jY();function xt(e){return Object.keys(e)}function Lw(e){return e&&typeof e=="object"&&!Array.isArray(e)}function r6(e,n){const t={...e},i=n;return Lw(e)&&Lw(n)&&Object.keys(n).forEach(r=>{Lw(i[r])&&r in e?t[r]=r6(t[r],i[r]):t[r]=i[r]}),t}function DY(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function RY(e){var n;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(n=e.match(/^calc\((.*?)\)$/))==null?void 0:n[1].split("*")[0].trim()}function _h(e){const n=RY(e);return typeof n=="number"?n:typeof n=="string"?n.includes("calc")||n.includes("var")?n:n.includes("px")?Number(n.replace("px","")):n.includes("rem")?Number(n.replace("rem",""))*16:n.includes("em")?Number(n.replace("em",""))*16:Number(n):NaN}function GT(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function L$(e,{shouldScale:n=!1}={}){function t(i){if(i===0||i==="0")return`0${e}`;if(typeof i=="number"){const r=`${i/16}${e}`;return n?GT(r):r}if(typeof i=="string"){if(i===""||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(a=>t(a)).join(",");if(i.includes(" "))return i.split(" ").map(a=>t(a)).join(" ");const r=i.replace("px","");if(!Number.isNaN(Number(r))){const a=`${Number(r)/16}${e}`;return n?GT(a):a}}return i}return t}const he=L$("rem",{shouldScale:!0}),ag=L$("em");function cu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function I$(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const n=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(t=>n.test(t))}return!1}var Iw={exports:{}},Cn={};/** - * @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 YT;function PY(){if(YT)return Cn;YT=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function v(V){return V===null||typeof V!="object"?null:(V=p&&V[p]||V["@@iterator"],typeof V=="function"?V:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function _(V,W,$){this.props=V,this.context=W,this.refs=w,this.updater=$||y}_.prototype.isReactComponent={},_.prototype.setState=function(V,W){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,W,"setState")},_.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function S(){}S.prototype=_.prototype;function C(V,W,$){this.props=V,this.context=W,this.refs=w,this.updater=$||y}var T=C.prototype=new S;T.constructor=C,b(T,_.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function M(){}var j={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function F(V,W,$){var X=$.ref;return{$$typeof:e,type:V,key:W,ref:X!==void 0?X:null,props:$}}function R(V,W){return F(V.type,W,V.props)}function L(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function B(V){var W={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function($){return W[$]})}var G=/\/+/g;function H(V,W){return typeof V=="object"&&V!==null&&V.key!=null?B(""+V.key):W.toString(36)}function U(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(M,M):(V.status="pending",V.then(function(W){V.status==="pending"&&(V.status="fulfilled",V.value=W)},function(W){V.status==="pending"&&(V.status="rejected",V.reason=W)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function P(V,W,$,X,ee){var oe=typeof V;(oe==="undefined"||oe==="boolean")&&(V=null);var ue=!1;if(V===null)ue=!0;else switch(oe){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(V.$$typeof){case e:case n:ue=!0;break;case h:return ue=V._init,P(ue(V._payload),W,$,X,ee)}}if(ue)return ee=ee(V),ue=X===""?"."+H(V,0):X,A(ee)?($="",ue!=null&&($=ue.replace(G,"$&/")+"/"),P(ee,W,$,"",function(le){return le})):ee!=null&&(L(ee)&&(ee=R(ee,$+(ee.key==null||V&&V.key===ee.key?"":(""+ee.key).replace(G,"$&/")+"/")+ue)),W.push(ee)),1;ue=0;var ye=X===""?".":X+":";if(A(V))for(var ae=0;ae{const i=O.use(n);if(i===null)throw new Error(e);return i}]}function XT(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function og(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function NY(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].disabled)return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].disabled)return i}return e}function $Y(e,n,t){for(let i=e+1;i{var y;t==null||t(l);const f=Array.from(((y=og(l.currentTarget,e))==null?void 0:y.querySelectorAll(n))||[]).filter(b=>zY(l.currentTarget,b,e)),c=f.findIndex(b=>l.currentTarget===b),h=$Y(c,f,i),d=NY(c,f,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[p].focus(),r&&f[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[v].focus(),r&&f[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[d].focus(),r&&f[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[h].focus(),r&&f[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!f[0].disabled&&f[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const b=f.length-1;!f[b].disabled&&f[b].focus();break}}}}const LY={app:100,modal:200,popover:300,overlay:400,max:9999};function ca(e){return LY[e]}const H3=()=>{};function IY(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||H3:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function On(e,n="size",t=!0){if(e!==void 0)return I$(e)?t?he(e):e:`var(--${n}-${e})`}function Ft(e){return On(e,"mantine-spacing")}function Vt(e){return e===void 0?"var(--mantine-radius-default)":On(e,"mantine-radius")}function Zt(e){return On(e,"mantine-font-size")}function BY(e){return On(e,"mantine-line-height",!1)}function l6(e){if(e)return On(e,"mantine-shadow",!1)}function hr(e,n){return t=>{e==null||e(t),n==null||n(t)}}function u6(e,n){return e in n?_h(n[e]):_h(e)}function xh(e,n){const t=e.map(i=>({value:i,px:u6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function Pr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function FY(e,n,t){var i;return t?Array.from(((i=og(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Io(e,n,t){return n===void 0&&t===void 0?e:n!==void 0&&t===void 0?Math.max(e,n):Math.min(n===void 0&&t!==void 0?e:Math.max(e,n),t)}function Xs(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function Zd(e){const n=O.useRef(e);return O.useEffect(()=>{n.current=e}),O.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function P1(e,n){const{delay:t,flushOnUnmount:i,leading:r,maxWait:a}=typeof n=="number"?{delay:n,flushOnUnmount:!1,leading:!1,maxWait:void 0}:n,o=Zd(e),l=O.useRef(0),f=O.useRef(0),c=O.useRef(null),h=O.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),c.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function y(){window.clearTimeout(l.current),window.clearTimeout(f.current),l.current=0,f.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function b(){a!==void 0&&f.current===0&&(f.current=window.setTimeout(()=>{if(l.current!==0){const S=c.current;y(),o(...S)}},a))}if(r&&v){o(...p);const S=()=>{y()},C=()=>{l.current!==0&&(y(),o(...p))},T=()=>{y()};d.flush=C,d.cancel=T,l.current=window.setTimeout(S,t),b();return}if(r&&!v){d._hasPendingCallback=!0;const S=()=>{l.current!==0&&(y(),o(...p))},C=()=>{y()};d.flush=S,d.cancel=C;const T=()=>{y()};l.current=window.setTimeout(T,t),b();return}d._hasPendingCallback=!0;const w=()=>{l.current!==0&&(y(),o(...p))},_=()=>{y()};d.flush=w,d.cancel=_,l.current=window.setTimeout(w,t),b()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return O.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const qY=["mousedown","touchstart"];function HY(e,n,t,i=!0){const r=O.useRef(null),a=n||qY,o=O.useEffectEvent(f=>{const{target:c}=f??{};if(!document.body.contains(c)&&(c==null?void 0:c.tagName)!=="HTML")return;const h=f.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(f):r.current&&!h.includes(r.current)&&e(f)}),l=a.join(",");return O.useEffect(()=>{if(!i)return;const f=l.split(",");return f.forEach(c=>document.addEventListener(c,o)),()=>{f.forEach(c=>document.removeEventListener(c,o))}},[l,i]),r}function UY(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function VY(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=O.useState(t?n:UY(e));return O.useEffect(()=>{try{if("matchMedia"in window){const a=window.matchMedia(e);r(a.matches);const o=l=>r(l.matches);return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}}catch{return}},[e]),i||!1}const es=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Wo(e,n){const t=O.useRef(!1);O.useEffect(()=>()=>{t.current=!1},[]),O.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function F$({opened:e,shouldReturnFocus:n=!0}){const t=O.useRef(null),i=()=>{var r;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((r=t.current)==null||r.focus({preventScroll:!0}))};return Wo(()=>{let r=-1;const a=o=>{o.key==="Tab"&&window.clearTimeout(r)};if(document.addEventListener("keydown",a),e)t.current=document.activeElement;else if(n){const o=document.activeElement;r=window.setTimeout(()=>{const l=document.activeElement;(l===null||l===document.body||l===o)&&i()},10)}return()=>{window.clearTimeout(r),document.removeEventListener("keydown",a)}},[e,n]),i}const WY=/input|select|textarea|button|object/,q$="a, input, select, textarea, button, object, [tabindex]";function GY(e){return e.style.display==="none"}function YY(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(GY(n))return!1;n=n.parentNode}return!0}function H$(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function U3(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(H$(e));return(WY.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&YY(e)}function U$(e){const n=H$(e);return(Number.isNaN(n)||n>=0)&&U3(e)}function KY(e){return Array.from(e.querySelectorAll(q$)).filter(U$)}function XY(e,n){const t=KY(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function ZY(e=!0){const n=O.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(q$));a=o.find(U$)||o.find(U3)||null,!a&&U3(r)&&(a=r)}a?a.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",r)},i=O.useCallback(r=>{if(e){if(r===null){n.current=null;return}n.current!==r&&(setTimeout(()=>{r.getRootNode()?t(r):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",r)}),n.current=r)}},[e]);return O.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&XY(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const QY=e=>(e+1)%1e6;function JY(){const[,e]=O.useReducer(QY,0);return e}function Gi(e){const[n,t]=O.useState(`mantine-${O.useId().replace(/:/g,"")}`);return es(()=>{t(Xs())},[]),typeof e=="string"?e:n}function V$(e,n,t){const i=O.useEffectEvent(n);O.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function sg(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function eK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=sg(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():sg(i,null)}),n.clear()}}}function Nt(...e){return O.useCallback(eK(...e),e)}function W$(e){return{x:Io(e.x,0,1),y:Io(e.y,0,1)}}function G$(e,n,t="ltr"){const i=O.useRef(!1),r=O.useRef(!1),a=O.useRef(0),o=O.useRef(null),[l,f]=O.useState(!1);return O.useEffect(()=>(i.current=!0,()=>{var c;(c=o.current)==null||c.call(o)}),[]),{ref:O.useCallback(c=>{const h=({x:C,y:T})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&c){c.style.userSelect="none";const A=c.getBoundingClientRect();if(A.width&&A.height){const M=Io((C-A.left)/A.width,0,1);e({x:t==="ltr"?M:1-M,y:Io((T-A.top)/A.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",w),document.addEventListener("mouseup",y),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",y)},p=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",y)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),f(!0),d())},y=()=>{r.current&&i.current&&(r.current=!1,f(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},b=C=>{v(),C.preventDefault(),w(C)},w=C=>h({x:C.clientX,y:C.clientY}),_=C=>{C.cancelable&&C.preventDefault(),v(),S(C)},S=C=>{C.cancelable&&C.preventDefault(),h({x:C.changedTouches[0].clientX,y:C.changedTouches[0].clientY})};return c==null||c.addEventListener("mousedown",b),c==null||c.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{c&&(c.removeEventListener("mousedown",b),c.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Ci({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=O.useState(n!==void 0?n:t),o=(l,...f)=>{a(l),i==null||i(l,...f)};return e!==void 0?[e,i,!0]:[r,o,!1]}function f6(e,n){return VY("(prefers-reduced-motion: reduce)",e,n)}function Y$(e=!1,n={}){const[t,i]=O.useState(e),r=O.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=O.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:O.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function nK(e){const n=O.useRef(void 0);return O.useEffect(()=>{n.current=e},[e]),n.current}var Bw={exports:{}},Bi={};/** - * @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 ZT;function tK(){if(ZT)return Bi;ZT=1;var e=a6();function n(f){var c="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Bw.exports=tK(),Bw.exports}var Vs=K$();const Qd=at(Vs);function iK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function rK(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});es(()=>(Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a]),window.addEventListener(a,r[a])}),()=>Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a])})),[r])}function t(i){return(...r)=>iK(`${e}:${String(i)}`,r[0])}return[n,t]}var aK={};function oK(){return"development"}function N1(e){var t;const n=Z.version;return typeof Z.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function Uv(e,n=document){const t=n.querySelector(e);if(t)return t;const i=n.querySelectorAll("*");for(let r=0;r{Object.entries(t).forEach(([i,r])=>{n[i]?n[i]=sn(n[i],r):n[i]=r})}),n}function Sh({theme:e,classNames:n,props:t,stylesCtx:i}){return lK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||sK))}function lg({theme:e,styles:n,props:t,stylesCtx:i}){const r=Array.isArray(n)?n:[n],a={};for(const o of r)typeof o=="function"?Object.assign(a,o(e,t,i)):o&&Object.assign(a,o);return a}function JT(e){return e==="auto"||e==="dark"||e==="light"}function uK({key:e="mantine-color-scheme-value"}={}){let n;return{get:t=>{if(typeof window>"u")return t;try{const i=window.localStorage.getItem(e);return JT(i)?i:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(i){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",i)}},subscribe:t=>{n=i=>{i.storageArea===window.localStorage&&i.key===e&&JT(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function Ch(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function fK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function cK(e){let n=e.replace("#","");if(n.length===3){const i=n.split("");n=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(n.length===8){const i=parseInt(n.slice(6,8),16)/255;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:i}}const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255,a:1}}function dK(e){const[n,t,i,r]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:n,g:t,b:i,a:r===void 0?1:r}}function hK(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,f=o*(1-Math.abs(l%2-1)),c=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=f,p=0):l>=1&&l<2?(h=f,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=f):l>=3&&l<4?(h=0,d=f,p=o):l>=4&&l<5?(h=f,d=0,p=o):(h=o,d=0,p=f),{r:Math.round((h+c)*255),g:Math.round((d+c)*255),b:Math.round((p+c)*255),a:a||1}}function c6(e){return fK(e)?cK(e):e.startsWith("rgb")?dK(e):e.startsWith("hsl")?hK(e):{r:0,g:0,b:0,a:1}}function Fw(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function mK(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function Z$(e){if(e.startsWith("oklch("))return(mK(e)||0)/100;const{r:n,g:t,b:i}=c6(e),r=n/255,a=t/255,o=i/255,l=Fw(r),f=Fw(a),c=Fw(o);return .2126*l+.7152*f+.0722*c}function jd(e,n=.179){return e.startsWith("var(")?!1:Z$(e)>n}function ns({color:e,theme:n,colorScheme:t}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:t==="dark"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:jd(t==="dark"?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:t==="dark"?n.colors.dark[2]:n.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:jd(t==="dark"?n.colors.dark[2]:n.colors.gray[6],n.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:jd(e==="white"?n.white:n.black,n.luminanceThreshold),variable:`--mantine-color-${e}`};const[i,r]=e.split("."),a=r?Number(r):void 0,o=i in n.colors;if(o){const l=a!==void 0?n.colors[i][a]:n.colors[i][Ch(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:jd(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:jd(e,n.luminanceThreshold),shade:a,variable:void 0}}function et(e,n){const t=ns({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function Bl(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=c6(e),o=1-n,l=f=>Math.round(f*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function V3(e,n){const t={from:(e==null?void 0:e.from)||n.defaultGradient.from,to:(e==null?void 0:e.to)||n.defaultGradient.to,deg:(e==null?void 0:e.deg)??n.defaultGradient.deg??0},i=et(t.from,n),r=et(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Is(e,n){if(typeof e!="string"||n>1||n<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${(1-n)*100}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${n})`):e.replace(")",` / ${n})`);const{r:t,g:i,b:r}=c6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const e5=Is,pK=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=ns({color:e,theme:n}),o=typeof r=="boolean"?r:n.autoContrast;if(t==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(t==="filled"){const l=o&&a.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:l,border:`${he(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:l,border:`${he(1)} solid transparent`}:{background:e,hover:Bl(e,.1),color:l,border:`${he(1)} solid transparent`}}if(t==="light"){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:Bl(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${he(1)} solid transparent`}}return{background:Is(e,.1),hover:Is(e,.12),color:e,border:`${he(1)} solid transparent`}}if(t==="outline")return a.isThemeColor?a.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${he(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Is(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${he(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Is(e,.05),color:e,border:`${he(1)} solid ${e}`};if(t==="subtle"){if(a.isThemeColor){if(a.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Is(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${he(1)} solid transparent`}}return{background:"transparent",hover:Is(e,.12),color:e,border:`${he(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${he(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${he(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:Bl(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${he(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Bl(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${he(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Bl(n.white,.01),color:e,border:`${he(1)} solid transparent`}:t==="gradient"?{background:V3(i,n),hover:V3(i,n),color:"var(--mantine-color-white)",border:"none"}:t==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${he(1)} solid var(--mantine-color-default-border)`}:{}};function wm({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&ns({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function n5(e,n){return wm({color:e.colors[e.primaryColor][Ch(e,n)],theme:e,autoContrast:null})}function $1(e,n){return typeof e=="boolean"?e:n.autoContrast}const Q$=O.createContext(null);function oo(){const e=O.use(Q$);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function vK(){return oo().cssVariablesResolver}function gK(){return oo().classNamesPrefix}function d6(){return oo().getStyleNonce}function yK(){return oo().withStaticClasses}function bK(){return oo().headless}function wK(){var e;return(e=oo().stylesTransform)==null?void 0:e.sx}function kK(){var e;return(e=oo().stylesTransform)==null?void 0:e.styles}function km(){return oo().env||"default"}function _K(){return oo().deduplicateInlineStyles}function uf(e,n){var r,a;const t=typeof window<"u"&&"matchMedia"in window&&((r=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:r.matches),i=e!=="auto"?e:t?"dark":"light";(a=n())==null||a.setAttribute("data-mantine-color-scheme",i)}function xK({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=O.useRef(null),[a,o]=O.useState(()=>e.get(n)),l=i||a,f=O.useCallback(h=>{i||(uf(h,t),o(h),e.set(h))},[e.set,l,i]),c=O.useCallback(()=>{o(n),uf(n,t),e.clear()},[e.clear,n]);return O.useEffect(()=>(e.subscribe(f),e.unsubscribe),[e.subscribe,e.unsubscribe]),es(()=>{uf(e.get(n),t)},[]),O.useEffect(()=>{var d;if(i)return uf(i,t),()=>{};i===void 0&&uf(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&uf(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:f,clearColorScheme:c}}const SK={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},t5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",h6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:SK,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:pK,autoContrast:!1,luminanceThreshold:.3,fontFamily:t5,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"md",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:t5,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:he(34),lineHeight:"1.3"},h2:{fontSize:he(26),lineHeight:"1.35"},h3:{fontSize:he(22),lineHeight:"1.4"},h4:{fontSize:he(18),lineHeight:"1.45"},h5:{fontSize:he(16),lineHeight:"1.5"},h6:{fontSize:he(14),lineHeight:"1.5"}}},fontSizes:{xs:he(12),sm:he(14),md:he(16),lg:he(18),xl:he(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},fontWeights:{regular:"400",medium:"600",bold:"700"},radius:{xs:he(2),sm:he(4),md:he(8),lg:he(16),xl:he(32)},spacing:{xs:he(10),sm:he(12),md:he(16),lg:he(20),xl:he(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), 0 ${he(1)} ${he(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(10)} ${he(15)} ${he(-5)}, rgba(0, 0, 0, 0.04) 0 ${he(7)} ${he(7)} ${he(-5)}`,md:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(20)} ${he(25)} ${he(-5)}, rgba(0, 0, 0, 0.04) 0 ${he(10)} ${he(10)} ${he(-5)}`,lg:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(28)} ${he(23)} ${he(-7)}, rgba(0, 0, 0, 0.04) 0 ${he(12)} ${he(12)} ${he(-7)}`,xl:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(36)} ${he(28)} ${he(-7)}, rgba(0, 0, 0, 0.04) 0 ${he(17)} ${he(17)} ${he(-7)}`},other:{},components:{}},CK="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",i5="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function qw(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function r5(e){if(!(e.primaryColor in e.colors))throw new Error(CK);if(typeof e.primaryShade=="object"&&(!qw(e.primaryShade.dark)||!qw(e.primaryShade.light)))throw new Error(i5);if(typeof e.primaryShade=="number"&&!qw(e.primaryShade))throw new Error(i5)}function AK(e,n){var i;if(!n)return r5(e),e;const t=r6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),r5(t),t}const m6=O.createContext(null),OK=()=>O.use(m6)||h6;function ti(){const e=O.use(m6);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function J$({theme:e,children:n,inherit:t=!0}){const i=OK();return k.jsx(m6,{value:O.useMemo(()=>AK(t?i:h6,e),[e,i,t]),children:n})}J$.displayName="@mantine/core/MantineThemeProvider";function Hw(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function ez(e,n){const t=n?[n]:[":root",":host"],i=Hw(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=Hw(e.dark),o=Hw(e.light),l=f=>t.map(c=>c===":host"?`${c}([data-mantine-color-scheme="${f}"])`:`${c}[data-mantine-color-scheme="${f}"]`).join(", ");return`${r} - -${a?`${l("dark")}{${a}}`:""} - -${o?`${l("light")}{${o}}`:""}`}function dv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=Ch(e,"light"),f={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:e5(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...f}:f}const a=Ch(e,"dark"),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${a===9?8:a+1})`,[`--mantine-color-${i}-light`]:Bl(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:Bl(e.colors[n][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(a-4,0)})`,[`--mantine-color-${i}-outline-hover`]:e5(e.colors[n][Math.max(a-4,0)],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...o}:o}function EK(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Dl(e,n,t){xt(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const nz=e=>{const n=Ch(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:he(e.defaultRadius),i={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":t,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":n5(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${n})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":n5(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Dl(i.variables,e.breakpoints,"breakpoint"),Dl(i.variables,e.spacing,"spacing"),Dl(i.variables,e.fontSizes,"font-size"),Dl(i.variables,e.lineHeights,"line-height"),Dl(i.variables,e.shadows,"shadow"),Dl(i.variables,e.radius,"radius"),Dl(i.variables,e.fontWeights,"font-weight"),e.colors[e.primaryColor].forEach((a,o)=>{i.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${e.primaryColor}-${o})`}),xt(e.colors).forEach(a=>{const o=e.colors[a];if(EK(o)){Object.assign(i.light,dv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,dv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,f)=>{i.variables[`--mantine-color-${a}-${f}`]=l}),Object.assign(i.light,dv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,dv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return xt(r).forEach(a=>{i.variables[`--mantine-${a}-font-size`]=r[a].fontSize,i.variables[`--mantine-${a}-line-height`]=r[a].lineHeight,i.variables[`--mantine-${a}-font-weight`]=r[a].fontWeight||e.headings.fontWeight}),i};function TK(){const e=ti(),n=d6(),t=xt(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=_h(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:ag(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:ag(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return k.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function MK({theme:e,generator:n}){const t=nz(e),i=n==null?void 0:n(e);return i?r6(t,i):t}const Uw=nz(h6);function jK(e){const n={variables:{},light:{},dark:{}};return xt(e.variables).forEach(t=>{Uw.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),xt(e.light).forEach(t=>{Uw.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),xt(e.dark).forEach(t=>{Uw.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function DK(e){return ez({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function tz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ti(),i=d6(),r=MK({theme:t,generator:vK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=ez(a?jK(r):r,e);return o?k.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":DK(e)}`}}):null}tz.displayName="@mantine/CssVariables";function RK({respectReducedMotion:e,getRootElement:n}){es(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function iz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:f="mantine",colorSchemeManager:c=uK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:y,env:b,deduplicateInlineStyles:w=!1}){const{colorScheme:_,setColorScheme:S,clearColorScheme:C}=xK({defaultColorScheme:h,forceColorScheme:v,manager:c,getRootElement:d});return RK({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),k.jsx(Q$,{value:{colorScheme:_,setColorScheme:S,clearColorScheme:C,getRootElement:d,classNamesPrefix:f,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:y,env:b,deduplicateInlineStyles:w},children:k.jsxs(J$,{theme:e,children:[o&&k.jsx(tz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&k.jsx(TK,{}),n]})})}iz.displayName="@mantine/core/MantineProvider";function be(e,n,t){var o;const i=ti(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...cu(t)}}function Ni({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ti();return{resolvedClassNames:e===void 0?void 0:Sh({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:lg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const PK={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function NK({theme:e,options:n,unstyled:t}){return sn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||PK[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function $K({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return Sh({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function zK({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Sh({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function LK({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function IK({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function BK({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function FK({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function qK({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:f,className:c,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:y,transformedStyles:b}){return sn(NK({theme:e,options:n,unstyled:f||y}),o.map(w=>w[i]),FK({options:n,classes:l,selector:i,unstyled:f||y}),a[i],zK({selector:i,stylesCtx:p,theme:e,classNames:b,props:d}),$K({selector:i,stylesCtx:p,options:n,props:d,theme:e}),LK({rootSelector:h,selector:i,className:c}),IK({selector:i,classes:l,unstyled:f||y}),v&&!y&&BK({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function p6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...p6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function HK({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:f,resolvedVars:c,resolvedRootStyle:h}){return{...f[n],...l[n],...!o&&lg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...c[n],...a===n?h:null,...p6({style:t==null?void 0:t.style,theme:e})}}function UK(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...cu(t[i])}}),n),{})}function VK({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=kK())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(f=>r(f,{props:e,theme:i,ctx:n})),...t.map(f=>{var c;return r((c=i.components[f])==null?void 0:c.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function We({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:f,styles:c,vars:h,varsResolver:d,attributes:p}){var R;const v=ti(),y=gK(),b=yK(),w=bK(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:S,getTransformedStyles:C}=VK({props:t,stylesCtx:i,themeName:_,theme:v}),T=Sh({theme:v,classNames:f,props:t,stylesCtx:i}),A=_.map(L=>{var B;return Sh({theme:v,classNames:(B=v.components[L])==null?void 0:B.classNames,props:t,stylesCtx:i})}),M=S?{}:lg({theme:v,styles:c,props:t,stylesCtx:i}),j={};if(!S)for(const L of _){const B=lg({theme:v,styles:(R=v.components[L])==null?void 0:R.styles,props:t,stylesCtx:i});for(const G of Object.keys(B))j[G]={...j[G],...B[G]}}const N=UK([w?{}:d==null?void 0:d(v,t,i),..._.map(L=>{var B,G,H;return(H=(G=(B=v.components)==null?void 0:B[L])==null?void 0:G.vars)==null?void 0:H.call(G,v,t,i)}),h==null?void 0:h(v,t,i)]),F=p6({style:a,theme:v});return(L,B)=>({...p==null?void 0:p[L],className:qK({theme:v,options:B,themeName:_,selector:L,classNamesPrefix:y,resolvedClassNames:T,resolvedThemeClassNames:A,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:b,headless:w,transformedStyles:C([B==null?void 0:B.styles,c])}),style:HK({theme:v,selector:L,options:B,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:S,resolvedStyles:M,resolvedThemeStyles:j,resolvedVars:N,resolvedRootStyle:F})})}function lh(e){return xt(e).reduce((n,t)=>e[t]!==void 0?`${n}${DY(t)}:${e[t]};`:n,"").trim()}function WK({selector:e,styles:n,media:t,container:i}){const r=n?lh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${lh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${lh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function GK(e){let n=5381;for(let t=0;t>>0).toString(36)}function mc({deduplicate:e,...n}){const t=d6(),i=WK(n);return e?k.jsx("style",{href:`mantine-${GK(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):k.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function YK(e){let n=5381;for(let t=0;t>>0).toString(36)}function KK(e,n){return`__mdi__-${YK(`${e?lh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${lh(t.styles)}`).join("|"):""}`)}`}function hu(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:y,pt:b,pb:w,pl:_,pr:S,pe:C,ps:T,pis:A,pie:M,bd:j,bdrs:N,bg:F,c:R,opacity:L,ff:B,fz:G,fw:H,lts:U,ta:P,lh:z,fs:q,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:ee,mah:oe,bgsz:ue,bgp:ye,bgr:ae,bga:le,pos:Se,top:ne,left:$e,bottom:ve,right:xe,inset:De,display:we,flex:re,hiddenFrom:ke,visibleFrom:Ie,lightHidden:qe,darkHidden:Ue,sx:Ve,...me}=e;return{styleProps:cu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:y,pt:b,pb:w,pl:_,pr:S,pis:A,pie:M,pe:C,ps:T,bd:j,bg:F,c:R,opacity:L,ff:B,fz:G,fw:H,lts:U,ta:P,lh:z,fs:q,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:ee,mah:oe,bgsz:ue,bgp:ye,bgr:ae,bga:le,pos:Se,top:ne,left:$e,bottom:ve,right:xe,inset:De,display:we,flex:re,bdrs:N,hiddenFrom:ke,visibleFrom:Ie,lightHidden:qe,darkHidden:Ue,sx:Ve}),rest:me}}const XK={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mis:{type:"spacing",property:"marginInlineStart"},mie:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},pis:{type:"spacing",property:"paddingInlineStart"},pie:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function v6(e,n){const t=ns({color:e,theme:n});return t.color==="dimmed"?"var(--mantine-color-dimmed)":t.color==="bright"?"var(--mantine-color-bright)":t.variable?`var(${t.variable})`:t.color}function ZK(e,n){const t=ns({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:v6(e,n)}function QK(e,n){if(typeof e=="number")return he(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${he(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${v6(r.join(" "),n)}`),a.trim()}return e}const a5={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function JK(e){return typeof e=="string"&&e in a5?a5[e]:e}const eX=["h1","h2","h3","h4","h5","h6"];function nX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&eX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?he(e):e}function tX(e){return e}const iX=["h1","h2","h3","h4","h5","h6"];function rX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&iX.includes(e)?`var(--mantine-${e}-line-height)`:e}function aX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?he(e):e}function oX(e){return typeof e=="number"?he(e):e}function sX(e,n){if(typeof e=="number")return he(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return he(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const Vw={color:v6,textColor:ZK,fontSize:nX,spacing:sX,radius:aX,identity:tX,size:oX,lineHeight:rX,fontFamily:JK,border:QK};function o5(e){return e.replace("(min-width: ","").replace("em)","")}function lX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(o5(i))-Number(o5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function uX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function fX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function cX(e){return typeof e=="object"&&e!==null?xt(e).filter(n=>n!=="base"):[]}function dX(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function hX({styleProps:e,data:n,theme:t}){return lX(xt(e).reduce((i,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return i;const a=n[r],o=Array.isArray(a.property)?a.property:[a.property],l=fX(e[r]);if(!uX(e[r]))return o.forEach(c=>{i.inlineStyles[c]=Vw[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const f=cX(e[r]);return o.forEach(c=>{l!=null&&(i.styles[c]=Vw[a.type](l,t)),f.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[c]:Vw[a.type](dX(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function z1(){return`__m__-${O.useId().replace(/[:«»]/g,"")}`}function rz(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...rz(i,n)}),{}):typeof e=="function"?e(n):e??{}}function mX(e){return e}const pX=mX;function az(e){return e}function je(e){const n=e;return n.extend=az,n.withProps=t=>{const i=r=>k.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function L1(e){return je(e)}function $i(e){const n=e;return n.withProps=t=>{const i=r=>k.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=az,n}function oz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function vX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[oz(t)]=e[t]),n},{})}function sz(e){return e?typeof e=="string"?{[oz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...sz(t)}),{}):vX(e):null}function W3(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...W3(i,n)}),{}):typeof e=="function"?e(n):e??{}}function gX({theme:e,style:n,vars:t,styleProps:i}){const r=W3(n,e),a=W3(t,e);return{...r,...a,...i}}function lz({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:f,lightHidden:c,darkHidden:h,renderRoot:d,__size:p,ref:v,...y}){var F,R;const b=ti(),w=e||"div",{styleProps:_,rest:S}=hu(y),C=(R=(F=wK())==null?void 0:F())==null?void 0:R(_.sx),T=z1(),A=hX({styleProps:_,theme:b,data:XK}),M=_K(),j=M&&A.hasResponsiveStyles?KK(A.styles,A.media):T,N={ref:v,style:gX({theme:b,style:n,vars:t,styleProps:A.inlineStyles}),className:sn(i,C,{[j]:A.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${f}`]:f}),"data-variant":r,"data-size":I$(o)?void 0:o||void 0,size:p,...sz(a),...S};return k.jsxs(k.Fragment,{children:[A.hasResponsiveStyles&&k.jsx(mc,{selector:`.${j}`,styles:A.styles,media:A.media,deduplicate:M}),typeof d=="function"?d(N):k.jsx(w,{...N})]})}lz.displayName="@mantine/core/Box";const _e=pX(lz),yX=O.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function mu(){return O.use(yX)}const[bX,da]=fa("ScrollArea.Root component was not found in tree");function Js(e,n){const t=O.useEffectEvent(n);es(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(t)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e])}function wX(e){const{style:n,...t}=e,i=da(),[r,a]=O.useState(0),[o,l]=O.useState(0),f=!!(r&&o);return Js(i.scrollbarX,()=>{var h;const c=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(c),l(c)}),Js(i.scrollbarY,()=>{var h;const c=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(c),a(c)}),f?k.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function kX(e){const n=da(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?k.jsx(wX,{...e}):null}const _X={scrollHideDelay:1e3,type:"hover"};function uz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=be("ScrollAreaRoot",_X,e),[l,f]=O.useState(null),[c,h]=O.useState(null),[d,p]=O.useState(null),[v,y]=O.useState(null),[b,w]=O.useState(null),[_,S]=O.useState(0),[C,T]=O.useState(0),[A,M]=O.useState(!1),[j,N]=O.useState(!1),F=Nt(a,R=>f(R));return k.jsx(bX,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:c,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:A,onScrollbarXEnabledChange:M,scrollbarY:b,onScrollbarYChange:w,scrollbarYEnabled:j,onScrollbarYEnabledChange:N,onCornerWidthChange:S,onCornerHeightChange:T,getStyles:r},children:k.jsx(_e,{...o,ref:F,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${C}px`}})})}uz.displayName="@mantine/core/ScrollAreaRoot";function fz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function I1(e){const n=fz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function cz(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(t-e[0])}}function xX(e,[n,t]){return Math.min(t,Math.max(n,e))}function s5(e,n,t="ltr"){const i=I1(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,f=xX(e,t==="ltr"?[0,o]:[o*-1,0]);return cz([0,o],[0,l])(f)}function SX(e,n,t,i="ltr"){const r=I1(t),a=r/2,o=n||a,l=r-o,f=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return cz([f,c],d)(e)}function dz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[CX,hz]=fa("ScrollAreaScrollbar was not found in tree");function mz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:f,onResize:c,ref:h,...d}=e,p=da(),[v,y]=O.useState(null),b=Nt(h,N=>y(N)),w=O.useRef(null),_=O.useRef(""),{viewport:S}=p,C=n.content-n.viewport,T=O.useEffectEvent(f),A=Zd(o),M=P1(c,10),j=N=>{w.current&&l({x:N.clientX-w.current.left,y:N.clientY-w.current.top})};return O.useEffect(()=>{const N=F=>{const R=F.target;v!=null&&v.contains(R)&&T(F,C)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[S,v,C]),O.useEffect(A,[n,A]),Js(v,M),Js(p.content,M),k.jsx(CX,{value:{scrollbar:v,hasThumb:t,onThumbChange:Zd(i),onThumbPointerUp:Zd(r),onThumbPositionChange:A,onThumbPointerDown:Zd(a)},children:k.jsx("div",{...d,ref:b,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:Zl(e.onPointerDown,N=>{N.preventDefault(),N.button===0&&(N.target.setPointerCapture(N.pointerId),w.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j(N))}),onPointerMove:Zl(e.onPointerMove,j),onPointerUp:Zl(e.onPointerUp,N=>{const F=N.target;F.hasPointerCapture(N.pointerId)&&(N.preventDefault(),F.releasePointerCapture(N.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,w.current=null}})})}const pz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=da(),[l,f]=O.useState(),c=O.useRef(null),h=Nt(r,c,o.onScrollbarXChange);return O.useEffect(()=>{c.current&&f(getComputedStyle(c.current))},[c]),k.jsx(mz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${I1(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),dz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:ug(l.paddingLeft),paddingEnd:ug(l.paddingRight)}})}})};pz.displayName="@mantine/core/ScrollAreaScrollbarX";function vz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=da(),[l,f]=O.useState(),c=O.useRef(null),h=Nt(r,c,o.onScrollbarYChange);return O.useEffect(()=>{c.current&&f(window.getComputedStyle(c.current))},[]),k.jsx(mz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${I1(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),dz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:ug(l.paddingTop),paddingEnd:ug(l.paddingBottom)}})}})}vz.displayName="@mantine/core/ScrollAreaScrollbarY";function B1(e){const{orientation:n="vertical",...t}=e,{dir:i}=mu(),r=da(),a=O.useRef(null),o=O.useRef(0),[l,f]=O.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=fz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>SX(p,o.current,l,v);return n==="horizontal"?k.jsx(pz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=s5(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?k.jsx(vz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=s5(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}B1.displayName="@mantine/core/ScrollAreaScrollbarVisible";function g6(e){const n=da(),{forceMount:t,...i}=e,[r,a]=O.useState(!1),o=e.orientation==="horizontal",l=P1(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const f=()=>{window.clearTimeout(l),a(!0)},c=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",f),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",f),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),n||r?k.jsx(g6,{"data-state":r?"visible":"hidden",...t}):null}gz.displayName="@mantine/core/ScrollAreaScrollbarHover";function AX(e){const{forceMount:n,...t}=e,i=da(),r=e.orientation==="horizontal",[a,o]=O.useState("hidden"),l=P1(()=>o("idle"),100);return O.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,i.scrollHideDelay]),O.useEffect(()=>{const{viewport:f}=i,c=r?"scrollLeft":"scrollTop";if(f){let h=f[c];const d=()=>{const p=f[c];h!==p&&(o("scrolling"),l()),h=p};return f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?k.jsx(B1,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:Zl(e.onPointerEnter,()=>o("interacting")),onPointerLeave:Zl(e.onPointerLeave,()=>o("idle"))}):null}function G3(e){const{forceMount:n,...t}=e,i=da(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return O.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?k.jsx(gz,{...t,forceMount:n}):i.type==="scroll"?k.jsx(AX,{...t,forceMount:n}):i.type==="auto"?k.jsx(g6,{...t,forceMount:n}):i.type==="always"?k.jsx(B1,{...t}):null}G3.displayName="@mantine/core/ScrollAreaScrollbar";function OX(e,n=()=>{}){let t={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=t.left!==a.left,l=t.top!==a.top;(o||l)&&n(),t=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)}function yz(e){const{style:n,ref:t,...i}=e,r=da(),a=hz(),{onThumbPositionChange:o}=a,l=Nt(t,h=>a.onThumbChange(h)),f=O.useRef(void 0),c=P1(()=>{f.current&&(f.current(),f.current=void 0)},100);return O.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{c(),f.current||(f.current=OX(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,c,o]),k.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:Zl(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:Zl(e.onPointerUp,a.onThumbPointerUp)})}yz.displayName="@mantine/core/ScrollAreaThumb";function Y3(e){const{forceMount:n,...t}=e,i=hz();return n||i.hasThumb?k.jsx(yz,{...t}):null}Y3.displayName="@mantine/core/ScrollAreaThumb";function bz({children:e,style:n,ref:t,onWheel:i,...r}){const a=da(),o=Nt(t,a.onViewportChange),l=f=>{if(i==null||i(f),a.scrollbarXEnabled&&a.viewport&&f.shiftKey){const{scrollTop:c,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,y=c<1,b=c>=h-d-1;p>v&&(y||b)&&f.stopPropagation()}};return k.jsx(_e,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:k.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}bz.displayName="@mantine/core/ScrollAreaViewport";var y6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function F1(){return typeof window<"u"}function pc(e){return wz(e)?(e.nodeName||"").toLowerCase():"#document"}function pr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function so(e){var n;return(n=(wz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function wz(e){return F1()?e instanceof Node||e instanceof pr(e).Node:!1}function Rt(e){return F1()?e instanceof Element||e instanceof pr(e).Element:!1}function ha(e){return F1()?e instanceof HTMLElement||e instanceof pr(e).HTMLElement:!1}function K3(e){return!F1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pr(e).ShadowRoot}function _m(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=la(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function EX(e){return/^(table|td|th)$/.test(pc(e))}function q1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const TX=/transform|translate|scale|rotate|perspective|filter/,MX=/paint|layout|strict|content/,Rl=e=>!!e&&e!=="none";let Ww;function b6(e){const n=Rt(e)?la(e):e;return Rl(n.transform)||Rl(n.translate)||Rl(n.scale)||Rl(n.rotate)||Rl(n.perspective)||!H1()&&(Rl(n.backdropFilter)||Rl(n.filter))||TX.test(n.willChange||"")||MX.test(n.contain||"")}function jX(e){let n=Go(e);for(;ha(n)&&!Bo(n);){if(b6(n))return n;if(q1(n))return null;n=Go(n)}return null}function H1(){return Ww==null&&(Ww=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ww}function Bo(e){return/^(html|body|#document)$/.test(pc(e))}function la(e){return pr(e).getComputedStyle(e)}function U1(e){return Rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Go(e){if(pc(e)==="html")return e;const n=e.assignedSlot||e.parentNode||K3(e)&&e.host||so(e);return K3(n)?n.host:n}function kz(e){const n=Go(e);return Bo(n)?e.ownerDocument?e.ownerDocument.body:e.body:ha(n)&&_m(n)?n:kz(n)}function Fo(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=kz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=pr(r);if(a){const l=X3(o);return n.concat(o,o.visualViewport||[],_m(r)?r:[],l&&t?Fo(l):[])}else return n.concat(r,Fo(r,[],t))}function X3(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const DX=["top","right","bottom","left"],Da=Math.min,Hi=Math.max,fg=Math.round,hv=Math.floor,Ka=e=>({x:e,y:e}),RX={left:"right",right:"left",bottom:"top",top:"bottom"};function Z3(e,n,t){return Hi(e,Da(n,t))}function no(e,n){return typeof e=="function"?e(n):e}function Ra(e){return e.split("-")[0]}function vc(e){return e.split("-")[1]}function w6(e){return e==="x"?"y":"x"}function k6(e){return e==="y"?"height":"width"}function Ea(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function _6(e){return w6(Ea(e))}function PX(e,n,t){t===void 0&&(t=!1);const i=vc(e),r=_6(e),a=k6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=cg(o)),[o,cg(o)]}function NX(e){const n=cg(e);return[Q3(e),n,Q3(n)]}function Q3(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const l5=["left","right"],u5=["right","left"],$X=["top","bottom"],zX=["bottom","top"];function LX(e,n,t){switch(e){case"top":case"bottom":return t?n?u5:l5:n?l5:u5;case"left":case"right":return n?$X:zX;default:return[]}}function IX(e,n,t,i){const r=vc(e);let a=LX(Ra(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(Q3)))),a}function cg(e){const n=Ra(e);return RX[n]+e.slice(n.length)}function BX(e){return{top:0,right:0,bottom:0,left:0,...e}}function x6(e){return typeof e!="number"?BX(e):{top:e,right:e,bottom:e,left:e}}function $f(e){const{x:n,y:t,width:i,height:r}=e;return{width:i,height:r,top:t,left:n,right:n+i,bottom:t+r,x:n,y:t}}function FX(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function qX(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:t,version:i}=n;return t+"/"+i}).join(" "):navigator.userAgent}function HX(){return/apple/i.test(navigator.vendor)}function UX(){return FX().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function VX(){return qX().includes("jsdom/")}const f5="data-floating-ui-focusable",WX="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function c5(e){let n=e.activeElement;for(;((t=n)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}function Ah(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&K3(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function wf(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Gw(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const t=e;return t.target!=null&&n.contains(t.target)}function GX(e){return e.matches("html,body")}function ql(e){return(e==null?void 0:e.ownerDocument)||document}function YX(e){return ha(e)&&e.matches(WX)}function KX(e){if(!e||VX())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function XX(e){return e?e.hasAttribute(f5)?e:e.querySelector("["+f5+"]")||e:null}function Vv(e,n,t){return t===void 0&&(t=!0),e.filter(r=>{var a;return r.parentId===n&&(!t||((a=r.context)==null?void 0:a.open))}).flatMap(r=>[r,...Vv(e,r.id,t)])}function ZX(e){return"nativeEvent"in e}function J3(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var QX=typeof document<"u",JX=function(){},Xa=QX?O.useLayoutEffect:JX;const eZ={...B$};function mv(e){const n=O.useRef(e);return Xa(()=>{n.current=e}),n}const nZ=eZ.useInsertionEffect,tZ=nZ||(e=>e());function Va(e){const n=O.useRef(()=>{});return tZ(()=>{n.current=e}),O.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:iZ},f=await(o.isRTL==null?void 0:o.isRTL(n));let c=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=d5(c,i,f),p=i,v=0;const y={};for(let b=0;b({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:f}=n,{element:c,padding:h=0}=no(e,n)||{};if(c==null)return{};const d=x6(h),p={x:t,y:i},v=_6(r),y=k6(v),b=await o.getDimensions(c),w=v==="y",_=w?"top":"left",S=w?"bottom":"right",C=w?"clientHeight":"clientWidth",T=a.reference[y]+a.reference[v]-p[v]-a.floating[y],A=p[v]-a.reference[v],M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let j=M?M[C]:0;(!j||!await(o.isElement==null?void 0:o.isElement(M)))&&(j=l.floating[C]||a.floating[y]);const N=T/2-A/2,F=j/2-b[y]/2-1,R=Da(d[_],F),L=Da(d[S],F),B=R,G=j-b[y]-L,H=j/2-b[y]/2+N,U=Z3(B,H,G),P=!f.arrow&&vc(r)!=null&&H!==U&&a.reference[y]/2-(HH<=0)){var L,B;const H=(((L=a.flip)==null?void 0:L.index)||0)+1,U=j[H];if(U&&(!(d==="alignment"?S!==Ea(U):!1)||R.every(q=>Ea(q.placement)===S?q.overflows[0]>0:!0)))return{data:{index:H,overflows:R},reset:{placement:U}};let P=(B=R.filter(z=>z.overflows[0]<=0).sort((z,q)=>z.overflows[1]-q.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(v){case"bestFit":{var G;const z=(G=R.filter(q=>{if(M){const Y=Ea(q.placement);return Y===S||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,D)=>Y+D,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:G[0];z&&(P=z);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function h5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function m5(e){return DX.some(n=>e[n]>=0)}const lZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=no(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=h5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:m5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=h5(o,t.floating);return{data:{escapedOffsets:l,escaped:m5(l)}}}default:return{}}}}};function _z(e){const n=Da(...e.map(a=>a.left)),t=Da(...e.map(a=>a.top)),i=Hi(...e.map(a=>a.right)),r=Hi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function uZ(e){const n=e.slice().sort((r,a)=>r.y-a.y),t=[];let i=null;for(let r=0;ri.height/2?t.push([a]):t[t.length-1].push(a),i=a}return t.map(r=>$f(_z(r)))}const fZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:f,y:c}=no(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=uZ(h),p=$f(_z(h)),v=x6(l);function y(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&c!=null)return d.find(w=>f>w.left-v.left&&fw.top-v.top&&c=2){if(Ea(t)==="y"){const R=d[0],L=d[d.length-1],B=Ra(t)==="top",G=R.top,H=L.bottom,U=B?R.left:L.left,P=B?R.right:L.right,z=P-U,q=H-G;return{top:G,bottom:H,left:U,right:P,width:z,height:q,x:U,y:G}}const w=Ra(t)==="left",_=Hi(...d.map(R=>R.right)),S=Da(...d.map(R=>R.left)),C=d.filter(R=>w?R.left===S:R.right===_),T=C[0].top,A=C[C.length-1].bottom,M=S,j=_,N=j-M,F=A-T;return{top:T,bottom:A,left:M,right:j,width:N,height:F,x:M,y:T}}return p}const b=await a.getElementRects({reference:{getBoundingClientRect:y},floating:i.floating,strategy:o});return r.reference.x!==b.reference.x||r.reference.y!==b.reference.y||r.reference.width!==b.reference.width||r.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},xz=new Set(["left","top"]);async function cZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Ra(t),l=vc(t),f=Ea(t)==="y",c=xz.has(o)?-1:1,h=a&&f?-1:1,d=no(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof y=="number"&&(v=l==="end"?y*-1:y),f?{x:v*h,y:p*c}:{x:p*c,y:v*h}}const dZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,f=await cZ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:a+f.y,data:{...f,placement:o}}}}},hZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:f={fn:_=>{let{x:S,y:C}=_;return{x:S,y:C}}},...c}=no(e,n),h={x:t,y:i},d=await a.detectOverflow(n,c),p=Ea(Ra(r)),v=w6(p);let y=h[v],b=h[p];if(o){const _=v==="y"?"top":"left",S=v==="y"?"bottom":"right",C=y+d[_],T=y-d[S];y=Z3(C,y,T)}if(l){const _=p==="y"?"top":"left",S=p==="y"?"bottom":"right",C=b+d[_],T=b-d[S];b=Z3(C,b,T)}const w=f.fn({...n,[v]:y,[p]:b});return{...w,data:{x:w.x-t,y:w.y-i,enabled:{[v]:o,[p]:l}}}}}},mZ=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:f=!0,crossAxis:c=!0}=no(e,n),h={x:t,y:i},d=Ea(r),p=w6(d);let v=h[p],y=h[d];const b=no(l,n),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(f){const C=p==="y"?"height":"width",T=a.reference[p]-a.floating[C]+w.mainAxis,A=a.reference[p]+a.reference[C]-w.mainAxis;vA&&(v=A)}if(c){var _,S;const C=p==="y"?"width":"height",T=xz.has(Ra(r)),A=a.reference[d]-a.floating[C]+(T&&((_=o.offset)==null?void 0:_[d])||0)+(T?0:w.crossAxis),M=a.reference[d]+a.reference[C]+(T?0:((S=o.offset)==null?void 0:S[d])||0)-(T?w.crossAxis:0);yM&&(y=M)}return{[p]:v,[d]:y}}}},pZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:f=()=>{},...c}=no(e,n),h=await o.detectOverflow(n,c),d=Ra(r),p=vc(r),v=Ea(r)==="y",{width:y,height:b}=a.floating;let w,_;d==="top"||d==="bottom"?(w=d,_=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(_=d,w=p==="end"?"top":"bottom");const S=b-h.top-h.bottom,C=y-h.left-h.right,T=Da(b-h[w],S),A=Da(y-h[_],C),M=!n.middlewareData.shift;let j=T,N=A;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(N=C),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(j=S),M&&!p){const R=Hi(h.left,0),L=Hi(h.right,0),B=Hi(h.top,0),G=Hi(h.bottom,0);v?N=y-2*(R!==0||L!==0?R+L:Hi(h.left,h.right)):j=b-2*(B!==0||G!==0?B+G:Hi(h.top,h.bottom))}await f({...n,availableWidth:N,availableHeight:j});const F=await o.getDimensions(l.floating);return y!==F.width||b!==F.height?{reset:{rects:!0}}:{}}}};function Sz(e){const n=la(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=ha(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=fg(t)!==a||fg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function S6(e){return Rt(e)?e:e.contextElement}function Of(e){const n=S6(e);if(!ha(n))return Ka(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=Sz(n);let o=(a?fg(t.width):t.width)/i,l=(a?fg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const vZ=Ka(0);function Cz(e){const n=pr(e);return!H1()||!n.visualViewport?vZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function gZ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==pr(e)?!1:n}function eu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=S6(e);let o=Ka(1);n&&(i?Rt(i)&&(o=Of(i)):o=Of(e));const l=gZ(a,t,i)?Cz(a):Ka(0);let f=(r.left+l.x)/o.x,c=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=pr(a),v=i&&Rt(i)?pr(i):i;let y=p,b=X3(y);for(;b&&i&&v!==y;){const w=Of(b),_=b.getBoundingClientRect(),S=la(b),C=_.left+(b.clientLeft+parseFloat(S.paddingLeft))*w.x,T=_.top+(b.clientTop+parseFloat(S.paddingTop))*w.y;f*=w.x,c*=w.y,h*=w.x,d*=w.y,f+=C,c+=T,y=pr(b),b=X3(y)}}return $f({width:h,height:d,x:f,y:c})}function V1(e,n){const t=U1(e).scrollLeft;return n?n.left+t:eu(so(e)).left+t}function Az(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-V1(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function yZ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=so(i),l=n?q1(n.floating):!1;if(i===o||l&&a)return t;let f={scrollLeft:0,scrollTop:0},c=Ka(1);const h=Ka(0),d=ha(i);if((d||!d&&!a)&&((pc(i)!=="body"||_m(o))&&(f=U1(i)),d)){const v=eu(i);c=Of(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?Az(o,f):Ka(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-f.scrollLeft*c.x+h.x+p.x,y:t.y*c.y-f.scrollTop*c.y+h.y+p.y}}function bZ(e){return Array.from(e.getClientRects())}function wZ(e){const n=so(e),t=U1(e),i=e.ownerDocument.body,r=Hi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Hi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+V1(e);const l=-t.scrollTop;return la(i).direction==="rtl"&&(o+=Hi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const p5=25;function kZ(e,n){const t=pr(e),i=so(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,f=0;if(r){a=r.width,o=r.height;const h=H1();(!h||h&&n==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=V1(i);if(c<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(i.clientWidth-d.clientWidth-v);y<=p5&&(a-=y)}else c<=p5&&(a+=c);return{width:a,height:o,x:l,y:f}}function _Z(e,n){const t=eu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=ha(e)?Of(e):Ka(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,f=r*a.x,c=i*a.y;return{width:o,height:l,x:f,y:c}}function v5(e,n,t){let i;if(n==="viewport")i=kZ(e,t);else if(n==="document")i=wZ(so(e));else if(Rt(n))i=_Z(n,t);else{const r=Cz(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return $f(i)}function Oz(e,n){const t=Go(e);return t===n||!Rt(t)||Bo(t)?!1:la(t).position==="fixed"||Oz(t,n)}function xZ(e,n){const t=n.get(e);if(t)return t;let i=Fo(e,[],!1).filter(l=>Rt(l)&&pc(l)!=="body"),r=null;const a=la(e).position==="fixed";let o=a?Go(e):e;for(;Rt(o)&&!Bo(o);){const l=la(o),f=b6(o);!f&&l.position==="fixed"&&(r=null),(a?!f&&!r:!f&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||_m(o)&&!f&&Oz(e,o))?i=i.filter(h=>h!==o):r=l,o=Go(o)}return n.set(e,i),i}function SZ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?q1(n)?[]:xZ(n,this._c):[].concat(t),i],l=v5(n,o[0],r);let f=l.top,c=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}j===1&&!Tz(c,e.getBoundingClientRect())&&o(),T=!1}try{t=new IntersectionObserver(A,{...C,root:r.ownerDocument})}catch{t=new IntersectionObserver(A,C)}t.observe(e)}return o(!0),a}function eS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,c=S6(e),h=r||a?[...c?Fo(c):[],...n?Fo(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=c&&l?MZ(c,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[S]=_;S&&S.target===c&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(n)})),t()}),c&&!f&&v.observe(c),n&&v.observe(n));let y,b=f?eu(e):null;f&&w();function w(){const _=eu(e);b&&!Tz(b,_)&&t(),b=_,y=requestAnimationFrame(w)}return t(),()=>{var _;h.forEach(S=>{r&&S.removeEventListener("scroll",t),a&&S.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,f&&cancelAnimationFrame(y)}}const jZ=dZ,DZ=hZ,RZ=sZ,PZ=pZ,NZ=lZ,y5=oZ,$Z=fZ,zZ=mZ,LZ=(e,n,t)=>{const i=new Map,r={platform:TZ,...t},a={...r.platform,_c:i};return aZ(e,n,{...r,platform:a})};var IZ=typeof document<"u",BZ=function(){},Wv=IZ?O.useLayoutEffect:BZ;function dg(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!dg(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=t;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!dg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function Mz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function b5(e,n){const t=Mz(e);return Math.round(n*t)/t}function Kw(e){const n=O.useRef(e);return Wv(()=>{n.current=e}),n}function FZ(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:f,open:c}=e,[h,d]=O.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=O.useState(i);dg(p,i)||v(i);const[y,b]=O.useState(null),[w,_]=O.useState(null),S=O.useCallback(q=>{q!==M.current&&(M.current=q,b(q))},[]),C=O.useCallback(q=>{q!==j.current&&(j.current=q,_(q))},[]),T=a||y,A=o||w,M=O.useRef(null),j=O.useRef(null),N=O.useRef(h),F=f!=null,R=Kw(f),L=Kw(r),B=Kw(c),G=O.useCallback(()=>{if(!M.current||!j.current)return;const q={placement:n,strategy:t,middleware:p};L.current&&(q.platform=L.current),LZ(M.current,j.current,q).then(Y=>{const D={...Y,isPositioned:B.current!==!1};H.current&&!dg(N.current,D)&&(N.current=D,Vs.flushSync(()=>{d(D)}))})},[p,n,t,L,B]);Wv(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[c]);const H=O.useRef(!1);Wv(()=>(H.current=!0,()=>{H.current=!1}),[]),Wv(()=>{if(T&&(M.current=T),A&&(j.current=A),T&&A){if(R.current)return R.current(T,A,G);G()}},[T,A,G,R,F]);const U=O.useMemo(()=>({reference:M,floating:j,setReference:S,setFloating:C}),[S,C]),P=O.useMemo(()=>({reference:T,floating:A}),[T,A]),z=O.useMemo(()=>{const q={position:t,left:0,top:0};if(!P.floating)return q;const Y=b5(P.floating,h.x),D=b5(P.floating,h.y);return l?{...q,transform:"translate("+Y+"px, "+D+"px)",...Mz(P.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:D}},[t,l,P.floating,h.x,h.y]);return O.useMemo(()=>({...h,update:G,refs:U,elements:P,floatingStyles:z}),[h,G,U,P,z])}const qZ=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?y5({element:i.current,padding:r}).fn(t):{}:i?y5({element:i,padding:r}).fn(t):{}}}},jz=(e,n)=>{const t=jZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},C6=(e,n)=>{const t=DZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},w5=(e,n)=>({fn:zZ(e).fn,options:[e,n]}),hg=(e,n)=>{const t=RZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},HZ=(e,n)=>{const t=PZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},UZ=(e,n)=>{const t=NZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},uh=(e,n)=>{const t=$Z(e);return{name:t.name,fn:t.fn,options:[e,n]}},Dz=(e,n)=>{const t=qZ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function Rz(e){const n=O.useRef(void 0),t=O.useCallback(i=>{const r=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,l=o(i);return typeof l=="function"?l:()=>{o(null)}}return a.current=i,()=>{a.current=null}}});return()=>{r.forEach(a=>a==null?void 0:a())}},e);return O.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const VZ="data-floating-ui-focusable",k5="active",_5="selected",WZ={...B$};let x5=!1,GZ=0;const S5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+GZ++;function YZ(){const[e,n]=O.useState(()=>x5?S5():void 0);return Xa(()=>{e==null&&n(S5())},[]),O.useEffect(()=>{x5=!0},[]),e}const KZ=WZ.useId,Pz=KZ||YZ;function XZ(){const e=new Map;return{emit(n,t){var i;(i=e.get(n))==null||i.forEach(r=>r(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var i;(i=e.get(n))==null||i.delete(t)}}}const ZZ=O.createContext(null),QZ=O.createContext(null),A6=()=>{var e;return((e=O.useContext(ZZ))==null?void 0:e.id)||null},O6=()=>O.useContext(QZ);function E6(e){return"data-floating-ui-"+e}function Qr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const C5=E6("safe-polygon");function Gv(e,n,t){if(t&&!J3(t))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i==null?void 0:i[n]}return e==null?void 0:e[n]}function Xw(e){return typeof e=="function"?e():e}function JZ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:f=0,handleClose:c=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=O6(),y=A6(),b=mv(c),w=mv(f),_=mv(t),S=mv(d),C=O.useRef(),T=O.useRef(-1),A=O.useRef(),M=O.useRef(-1),j=O.useRef(!0),N=O.useRef(!1),F=O.useRef(()=>{}),R=O.useRef(!1),L=Va(()=>{var z;const q=(z=r.current.openEvent)==null?void 0:z.type;return(q==null?void 0:q.includes("mouse"))&&q!=="mousedown"});O.useEffect(()=>{if(!l)return;function z(q){let{open:Y}=q;Y||(Qr(T),Qr(M),j.current=!0,R.current=!1)}return a.on("openchange",z),()=>{a.off("openchange",z)}},[l,a]),O.useEffect(()=>{if(!l||!b.current||!t)return;function z(Y){L()&&i(!1,Y,"hover")}const q=ql(o.floating).documentElement;return q.addEventListener("mouseleave",z),()=>{q.removeEventListener("mouseleave",z)}},[o.floating,t,i,l,b,L]);const B=O.useCallback(function(z,q,Y){q===void 0&&(q=!0),Y===void 0&&(Y="hover");const D=Gv(w.current,"close",C.current);D&&!A.current?(Qr(T),T.current=window.setTimeout(()=>i(!1,z,Y),D)):q&&(Qr(T),i(!1,z,Y))},[w,i]),G=Va(()=>{F.current(),A.current=void 0}),H=Va(()=>{if(N.current){const z=ql(o.floating).body;z.style.pointerEvents="",z.removeAttribute(C5),N.current=!1}}),U=Va(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);O.useEffect(()=>{if(!l)return;function z(W){if(Qr(T),j.current=!1,h&&!J3(C.current)||Xw(S.current)>0&&!Gv(w.current,"open"))return;const $=Gv(w.current,"open",C.current);$?T.current=window.setTimeout(()=>{_.current||i(!0,W,"hover")},$):t||i(!0,W,"hover")}function q(W){if(U()){H();return}F.current();const $=ql(o.floating);if(Qr(M),R.current=!1,b.current&&r.current.floatingContext){t||Qr(T),A.current=b.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){H(),G(),U()||B(W,!0,"safe-polygon")}});const ee=A.current;$.addEventListener("mousemove",ee),F.current=()=>{$.removeEventListener("mousemove",ee)};return}(C.current==="touch"?!Ah(o.floating,W.relatedTarget):!0)&&B(W)}function Y(W){U()||r.current.floatingContext&&(b.current==null||b.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){H(),G(),U()||B(W)}})(W))}function D(){Qr(T)}function V(W){U()||B(W,!1)}if(Rt(o.domReference)){const W=o.domReference,$=o.floating;return t&&W.addEventListener("mouseleave",Y),p&&W.addEventListener("mousemove",z,{once:!0}),W.addEventListener("mouseenter",z),W.addEventListener("mouseleave",q),$&&($.addEventListener("mouseleave",Y),$.addEventListener("mouseenter",D),$.addEventListener("mouseleave",V)),()=>{t&&W.removeEventListener("mouseleave",Y),p&&W.removeEventListener("mousemove",z),W.removeEventListener("mouseenter",z),W.removeEventListener("mouseleave",q),$&&($.removeEventListener("mouseleave",Y),$.removeEventListener("mouseenter",D),$.removeEventListener("mouseleave",V))}}},[o,l,e,h,p,B,G,H,i,t,_,v,w,b,r,U,S]),Xa(()=>{var z;if(l&&t&&(z=b.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&L()){N.current=!0;const Y=o.floating;if(Rt(o.domReference)&&Y){var q;const D=ql(o.floating).body;D.setAttribute(C5,"");const V=o.domReference,W=v==null||(q=v.nodesRef.current.find($=>$.id===y))==null||(q=q.context)==null?void 0:q.elements.floating;return W&&(W.style.pointerEvents=""),D.style.pointerEvents="none",V.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{D.style.pointerEvents="",V.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,y,o,v,b,L]),Xa(()=>{t||(C.current=void 0,R.current=!1,G(),H())},[t,G,H]),O.useEffect(()=>()=>{G(),Qr(T),Qr(M),H()},[l,o.domReference,G,H]);const P=O.useMemo(()=>{function z(q){C.current=q.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(q){const{nativeEvent:Y}=q;function D(){!j.current&&!_.current&&i(!0,Y,"hover")}h&&!J3(C.current)||t||Xw(S.current)===0||R.current&&q.movementX**2+q.movementY**2<2||(Qr(M),C.current==="touch"?D():(R.current=!0,M.current=window.setTimeout(D,Xw(S.current))))}}},[h,i,t,_,S]);return O.useMemo(()=>l?{reference:P}:{},[l,P])}const nS=()=>{},Nz=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:nS,setState:nS,isInstantPhase:!1}),eQ=()=>O.useContext(Nz);function nQ(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=O.useReducer((f,c)=>({...f,...c}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=O.useRef(null),l=O.useCallback(f=>{a({currentId:f})},[]);return Xa(()=>{r.currentId?o.current===null?o.current=r.currentId:r.isInstantPhase||a({isInstantPhase:!0}):(r.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[r.currentId,r.isInstantPhase]),k.jsx(Nz.Provider,{value:O.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function tQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,f=eQ(),{currentId:c,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=f;return Xa(()=>{o&&c&&(p({delay:{open:1,close:Gv(d,"close")}}),c!==l&&i(!1))},[o,l,i,p,c,d]),Xa(()=>{function y(){i(!1),p({delay:d,currentId:null})}if(o&&c&&!t&&c===l){if(v){const b=window.setTimeout(y,v);return()=>{clearTimeout(b)}}y()}},[o,t,p,c,l,i,d,v]),Xa(()=>{o&&(h===nS||!t||h(l))},[o,t,h,l]),f}const iQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},rQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},A5=e=>{var n,t;return{escapeKey:typeof e=="boolean"?e:(n=e==null?void 0:e.escapeKey)!=null?n:!1,outsidePress:typeof e=="boolean"?e:(t=e==null?void 0:e.outsidePress)!=null?t:!0}};function aQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:f=!0,outsidePressEvent:c="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:y}=n,b=O6(),w=Va(typeof f=="function"?f:()=>!1),_=typeof f=="function"?w:f,S=O.useRef(!1),{escapeKey:C,outsidePress:T}=A5(v),{escapeKey:A,outsidePress:M}=A5(y),j=O.useRef(!1),N=Va(H=>{var U;if(!t||!o||!l||H.key!=="Escape"||j.current)return;const P=(U=a.current.floatingContext)==null?void 0:U.nodeId,z=b?Vv(b.nodesRef.current,P):[];if(!C&&(H.stopPropagation(),z.length>0)){let q=!0;if(z.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){q=!1;return}}),!q)return}i(!1,ZX(H)?H.nativeEvent:H,"escape-key")}),F=Va(H=>{var U;const P=()=>{var z;N(H),(z=wf(H))==null||z.removeEventListener("keydown",P)};(U=wf(H))==null||U.addEventListener("keydown",P)}),R=Va(H=>{var U;const P=a.current.insideReactTree;a.current.insideReactTree=!1;const z=S.current;if(S.current=!1,c==="click"&&z||P||typeof _=="function"&&!_(H))return;const q=wf(H),Y="["+E6("inert")+"]",D=ql(r.floating).querySelectorAll(Y);let V=Rt(q)?q:null;for(;V&&!Bo(V);){const ee=Go(V);if(Bo(ee)||!Rt(ee))break;V=ee}if(D.length&&Rt(q)&&!GX(q)&&!Ah(q,r.floating)&&Array.from(D).every(ee=>!Ah(V,ee)))return;if(ha(q)&&G){const ee=Bo(q),oe=la(q),ue=/auto|scroll/,ye=ee||ue.test(oe.overflowX),ae=ee||ue.test(oe.overflowY),le=ye&&q.clientWidth>0&&q.scrollWidth>q.clientWidth,Se=ae&&q.clientHeight>0&&q.scrollHeight>q.clientHeight,ne=oe.direction==="rtl",$e=Se&&(ne?H.offsetX<=q.offsetWidth-q.clientWidth:H.offsetX>q.clientWidth),ve=le&&H.offsetY>q.clientHeight;if($e||ve)return}const W=(U=a.current.floatingContext)==null?void 0:U.nodeId,$=b&&Vv(b.nodesRef.current,W).some(ee=>{var oe;return Gw(H,(oe=ee.context)==null?void 0:oe.elements.floating)});if(Gw(H,r.floating)||Gw(H,r.domReference)||$)return;const X=b?Vv(b.nodesRef.current,W):[];if(X.length>0){let ee=!0;if(X.forEach(oe=>{var ue;if((ue=oe.context)!=null&&ue.open&&!oe.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i(!1,H,"outside-press")}),L=Va(H=>{var U;const P=()=>{var z;R(H),(z=wf(H))==null||z.removeEventListener(c,P)};(U=wf(H))==null||U.addEventListener(c,P)});O.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=T;let H=-1;function U(D){i(!1,D,"ancestor-scroll")}function P(){window.clearTimeout(H),j.current=!0}function z(){H=window.setTimeout(()=>{j.current=!1},H1()?5:0)}const q=ql(r.floating);l&&(q.addEventListener("keydown",A?F:N,A),q.addEventListener("compositionstart",P),q.addEventListener("compositionend",z)),_&&q.addEventListener(c,M?L:R,M);let Y=[];return p&&(Rt(r.domReference)&&(Y=Fo(r.domReference)),Rt(r.floating)&&(Y=Y.concat(Fo(r.floating))),!Rt(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(Fo(r.reference.contextElement)))),Y=Y.filter(D=>{var V;return D!==((V=q.defaultView)==null?void 0:V.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",U,{passive:!0})}),()=>{l&&(q.removeEventListener("keydown",A?F:N,A),q.removeEventListener("compositionstart",P),q.removeEventListener("compositionend",z)),_&&q.removeEventListener(c,M?L:R,M),Y.forEach(D=>{D.removeEventListener("scroll",U)}),window.clearTimeout(H)}},[a,r,l,_,c,t,i,p,o,C,T,N,A,F,R,M,L]),O.useEffect(()=>{a.current.insideReactTree=!1},[a,_,c]);const B=O.useMemo(()=>({onKeyDown:N,...h&&{[iQ[d]]:H=>{i(!1,H.nativeEvent,"reference-press")},...d!=="click"&&{onClick(H){i(!1,H.nativeEvent,"reference-press")}}}}),[N,i,h,d]),G=O.useMemo(()=>{function H(U){U.button===0&&(S.current=!0)}return{onKeyDown:N,onMouseDown:H,onMouseUp:H,[rQ[c]]:()=>{a.current.insideReactTree=!0}}},[N,c,a]);return O.useMemo(()=>o?{reference:B,floating:G}:{},[o,B,G])}function oQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=Pz(),a=O.useRef({}),[o]=O.useState(()=>XZ()),l=A6()!=null,[f,c]=O.useState(i.reference),h=Va((v,y,b)=>{a.current.openEvent=v?y:void 0,o.emit("openchange",{open:v,event:y,reason:b,nested:l}),t==null||t(v,y,b)}),d=O.useMemo(()=>({setPositionReference:c}),[]),p=O.useMemo(()=>({reference:f||i.reference||null,floating:i.floating||null,domReference:i.reference}),[f,i.reference,i.floating]);return O.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function T6(e){e===void 0&&(e={});const{nodeId:n}=e,t=oQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=O.useState(null),[l,f]=O.useState(null),h=(r==null?void 0:r.domReference)||a,d=O.useRef(null),p=O6();Xa(()=>{h&&(d.current=h)},[h]);const v=FZ({...e,elements:{...r,...l&&{reference:l}}}),y=O.useCallback(C=>{const T=Rt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;f(T),v.refs.setReference(T)},[v.refs]),b=O.useCallback(C=>{(Rt(C)||C===null)&&(d.current=C,o(C)),(Rt(v.refs.reference.current)||v.refs.reference.current===null||C!==null&&!Rt(C))&&v.refs.setReference(C)},[v.refs]),w=O.useMemo(()=>({...v.refs,setReference:b,setPositionReference:y,domReference:d}),[v.refs,b,y]),_=O.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),S=O.useMemo(()=>({...v,...i,refs:w,elements:_,nodeId:n}),[v,w,_,n,i]);return Xa(()=>{i.dataRef.current.floatingContext=S;const C=p==null?void 0:p.nodesRef.current.find(T=>T.id===n);C&&(C.context=S)}),O.useMemo(()=>({...v,context:S,refs:w,elements:_}),[v,w,_,S])}function Zw(){return UX()&&HX()}function sQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:f=!0}=n,c=O.useRef(!1),h=O.useRef(-1),d=O.useRef(!0);O.useEffect(()=>{if(!l)return;const v=pr(o.domReference);function y(){!t&&ha(o.domReference)&&o.domReference===c5(ql(o.domReference))&&(c.current=!0)}function b(){d.current=!0}function w(){d.current=!1}return v.addEventListener("blur",y),Zw()&&(v.addEventListener("keydown",b,!0),v.addEventListener("pointerdown",w,!0)),()=>{v.removeEventListener("blur",y),Zw()&&(v.removeEventListener("keydown",b,!0),v.removeEventListener("pointerdown",w,!0))}},[o.domReference,t,l]),O.useEffect(()=>{if(!l)return;function v(y){let{reason:b}=y;(b==="reference-press"||b==="escape-key")&&(c.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),O.useEffect(()=>()=>{Qr(h)},[]);const p=O.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(v){if(c.current)return;const y=wf(v.nativeEvent);if(f&&Rt(y)){if(Zw()&&!v.relatedTarget){if(!d.current&&!YX(y))return}else if(!KX(y))return}i(!0,v.nativeEvent,"focus")},onBlur(v){c.current=!1;const y=v.relatedTarget,b=v.nativeEvent,w=Rt(y)&&y.hasAttribute(E6("focus-guard"))&&y.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const S=c5(o.domReference?o.domReference.ownerDocument:document);!y&&S===o.domReference||Ah((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,S)||Ah(o.domReference,S)||w||i(!1,b,"focus")})}}),[a,o.domReference,i,f]);return O.useMemo(()=>l?{reference:p}:{},[l,p])}function Qw(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[k5]:o,[_5]:l,...f}=e;a=f}return{...t==="floating"&&{tabIndex:-1,[VZ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(f=>{let[c,h]=f;if(!(r&&[k5,_5].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof h=="function"){var d;(d=i.get(c))==null||d.push(h),o[c]=function(){for(var p,v=arguments.length,y=new Array(v),b=0;bw(...y)).find(w=>w!==void 0)}}}else o[c]=h}),o),{})}}function lQ(e){e===void 0&&(e=[]);const n=e.map(l=>l==null?void 0:l.reference),t=e.map(l=>l==null?void 0:l.floating),i=e.map(l=>l==null?void 0:l.item),r=O.useCallback(l=>Qw(l,e,"reference"),n),a=O.useCallback(l=>Qw(l,e,"floating"),t),o=O.useCallback(l=>Qw(l,e,"item"),i);return O.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const uQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:f="dialog"}=n,c=Pz(),h=((t=a.domReference)==null?void 0:t.id)||c,d=O.useMemo(()=>{var S;return((S=XX(a.floating))==null?void 0:S.id)||o},[a.floating,o]),p=(i=uQ.get(f))!=null?i:f,y=A6()!=null,b=O.useMemo(()=>p==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&y&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[p,d,y,r,h,f]),w=O.useMemo(()=>{const S={id:d,...p&&{role:p}};return p==="tooltip"||f==="label"?S:{...S,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,f]),_=O.useCallback(S=>{let{active:C,selected:T}=S;const A={role:"option",...C&&{id:d+"-fui-option"}};switch(f){case"select":case"combobox":return{...A,"aria-selected":T}}return{}},[d,f]);return O.useMemo(()=>l?{reference:b,floating:w,item:_}:{},[l,b,w,_])}const $z={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},zz=(e,{scrollbarSize:n,overscrollBehavior:t,scrollbars:i})=>{let r=t;return t&&i&&(i==="x"?r=`${t} auto`:i==="y"&&(r=`auto ${t}`)),{root:{"--scrollarea-scrollbar-size":he(n),"--scrollarea-over-scroll-behavior":r}}},lo=je(e=>{const n=be("ScrollArea",$z,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:f,type:c,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:y,offsetScrollbars:b,scrollbars:w,onBottomReached:_,onTopReached:S,onLeftReached:C,onRightReached:T,overscrollBehavior:A,startScrollPosition:M,attributes:j,...N}=n,[F,R]=O.useState(!1),[L,B]=O.useState(!1),[G,H]=O.useState(!1),U=O.useRef(!0),P=O.useRef(!1),z=O.useRef(!0),q=O.useRef(!1),Y=We({name:"ScrollArea",props:n,classes:y6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:f,varsResolver:zz}),D=O.useRef(null),[V,W]=O.useState(null),$=Rz([p,D,O.useCallback(X=>{W(ee=>ee===X?ee:X)},[])]);return Js(b==="present"?V:null,()=>{const X=D.current;X&&(B(X.scrollHeight>X.clientHeight),H(X.scrollWidth>X.clientWidth))}),es(()=>{M&&D.current&&D.current.scrollTo({left:M.x??0,top:M.y??0})},[]),k.jsxs(uz,{getStyles:Y,type:c==="never"?"always":c,scrollHideDelay:h,scrollbars:w,...Y("root"),...N,children:[k.jsx(bz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:$,"data-offset-scrollbars":b===!0?"xy":b||void 0,"data-scrollbars":w||void 0,"data-horizontal-hidden":b==="present"&&!G?"true":void 0,"data-vertical-hidden":b==="present"&&!L?"true":void 0,onScroll:X=>{var xe;(xe=d==null?void 0:d.onScroll)==null||xe.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:ee,scrollHeight:oe,clientHeight:ue,scrollLeft:ye,scrollWidth:ae,clientWidth:le}=X.currentTarget,Se=ee-(oe-ue)>=-.8,ne=ee===0;Se&&!P.current&&(_==null||_()),ne&&!U.current&&(S==null||S()),P.current=Se,U.current=ne;const $e=ye-(ae-le)>=-.8,ve=ye===0;$e&&!q.current&&(T==null||T()),ve&&!z.current&&(C==null||C()),q.current=$e,z.current=ve},children:y}),(w==="xy"||w==="x")&&k.jsx(G3,{...Y("scrollbar"),orientation:"horizontal","data-hidden":c==="never"||b==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:k.jsx(Y3,{...Y("thumb")})}),(w==="xy"||w==="y")&&k.jsx(G3,{...Y("scrollbar"),orientation:"vertical","data-hidden":c==="never"||b==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:k.jsx(Y3,{...Y("thumb")})}),k.jsx(kX,{...Y("corner"),"data-hovered":F||void 0,"data-hidden":c==="never"||void 0})]})});lo.displayName="@mantine/core/ScrollArea";const M6=je(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:y,scrollbars:b,style:w,vars:_,onBottomReached:S,onTopReached:C,startScrollPosition:T,onOverflowChange:A,...M}=be("ScrollAreaAutosize",$z,e),j=O.useRef(null),[N,F]=O.useState(null),R=Rz([h,j,O.useCallback(H=>{F(U=>U===H?U:H)},[])]),L=O.useRef(!1),B=O.useRef(!1),G=O.useEffectEvent(()=>{const H=j.current;if(!H||!A)return;const U=H.scrollHeight>H.clientHeight;U!==L.current&&(B.current?A(U):(B.current=!0,U&&A(!0)),L.current=U)});return Js(A?N:null,G),k.jsx(_e,{...M,variant:v,style:[{display:"flex",overflow:"hidden"},w],children:k.jsx(_e,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...b==="y"&&{minWidth:0},...b==="x"&&{minHeight:0},...b==="xy"&&{minWidth:0,minHeight:0},...b===!1&&{minWidth:0,minHeight:0}},children:k.jsx(lo,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:R,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:y,vars:_,scrollbars:b,onBottomReached:S,onTopReached:C,startScrollPosition:T,"data-autosize":"true",children:n})})})});lo.classes=y6;lo.varsResolver=zz;M6.displayName="@mantine/core/ScrollAreaAutosize";M6.classes=y6;lo.Autosize=M6;var Lz={root:"m_87cf2631"};const cQ={__staticSelector:"UnstyledButton"},Si=$i(e=>{const n=be("UnstyledButton",cQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:f,attributes:c,...h}=n;return k.jsx(_e,{...We({name:r,props:n,classes:Lz,className:t,style:f,classNames:o,styles:l,unstyled:a,attributes:c})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});Si.classes=Lz;Si.displayName="@mantine/core/UnstyledButton";var Iz={root:"m_515a97f8"};const j6=je(e=>{const n=be("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,...c}=n;return k.jsx(_e,{component:"span",...We({name:"VisuallyHidden",classes:Iz,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f})("root"),...c})});j6.classes=Iz;j6.displayName="@mantine/core/VisuallyHidden";var Bz={root:"m_1b7284a3"};const Fz=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Vt(n),"--paper-shadow":l6(t)}}),ni=$i(e=>{const n=be("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:f,radius:c,shadow:h,variant:d,mod:p,attributes:v,...y}=n,b=We({name:"Paper",props:n,classes:Bz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:f,varsResolver:Fz});return k.jsx(_e,{mod:[{"data-with-border":l},p],...b("root"),variant:d,...y})});ni.classes=Bz;ni.varsResolver=Fz;ni.displayName="@mantine/core/Paper";function O5(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function E5(e,n,t,i,r){return e==="center"||i==="center"?{left:n}:e==="end"?{[r==="ltr"?"right":"left"]:t}:e==="start"?{[r==="ltr"?"left":"right"]:t}:{}}const dQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function hQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[f,c="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[dQ[f]]:i},d=-n/2;return f==="left"?{...h,...O5(c,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:f==="right"?{...h,...O5(c,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:f==="top"?{...h,...E5(c,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:f==="bottom"?{...h,...E5(c,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function mg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:f,...c}){const{dir:h}=mu();return a?k.jsx("div",{...c,style:{...f,...hQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}mg.displayName="@mantine/core/FloatingArrow";function qz(e,n){if(e==="rtl"&&(n.includes("right")||n.includes("left"))){const[t,i]=n.split("-"),r=t==="right"?"left":"right";return i===void 0?r:`${r}-${i}`}return n}function Hz({open:e,close:n,openDelay:t,closeDelay:i}){const r=O.useRef(-1),a=O.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},f=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return O.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:f}}var Uz={root:"m_9814e45f"};const mQ={zIndex:ca("modal")},Vz=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Is(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${he(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Vt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),xm=$i(e=>{const n=be("Overlay",mQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:f,center:c,children:h,radius:d,zIndex:p,gradient:v,blur:y,color:b,backgroundOpacity:w,mod:_,attributes:S,...C}=n;return k.jsx(_e,{...We({name:"Overlay",props:n,classes:Uz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:Vz})("root"),mod:[{center:c,fixed:f},_],...C,children:h})});xm.classes=Uz;xm.varsResolver=Vz;xm.displayName="@mantine/core/Overlay";function Jw(e){const n=document.createElement("div");return n.setAttribute("data-portal","true"),typeof e.className=="string"&&n.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(n.style,e.style),typeof e.id=="string"&&n.setAttribute("id",e.id),n}function pQ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||Jw(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=Jw(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return Jw(t)}const vQ={reuseTargetNode:!0},Wz=je(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=be("Portal",vQ,e),[o,l]=O.useState(!1),f=O.useRef(null);return es(()=>(l(!0),f.current=pQ({target:t,reuseTargetNode:i,...a}),sg(r,f.current),!t&&!i&&f.current&&document.body.appendChild(f.current),()=>{!t&&!i&&f.current&&document.body.removeChild(f.current)}),[t]),!o||!f.current?null:Vs.createPortal(k.jsx(k.Fragment,{children:n}),f.current)});Wz.displayName="@mantine/core/Portal";const el=je(({withinPortal:e=!0,children:n,...t})=>km()==="test"||!e?k.jsx(k.Fragment,{children:n}):k.jsx(Wz,{...t,children:n}));el.displayName="@mantine/core/OptionalPortal";const Dd=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),pv={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...Dd("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Dd("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Dd("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Dd("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Dd("top"),common:{transformOrigin:"top right"}}},T5={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function M5({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in pv?{transitionProperty:pv[e].transitionProperty,...r,...pv[e].common,...pv[e][T5[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[T5[n]]}}function gQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:f,exitDelay:c}){const h=ti(),d=f6(),p=h.respectReducedMotion?d:!1,[v,y]=O.useState(p?0:e),[b,w]=O.useState(i?"entered":"exited"),_=O.useRef(-1),S=O.useRef(-1),C=O.useRef(-1);function T(){window.clearTimeout(_.current),window.clearTimeout(S.current),cancelAnimationFrame(C.current)}const A=j=>{T();const N=j?r:a,F=j?o:l,R=p?0:j?e:n;y(R),R===0?(typeof N=="function"&&N(),typeof F=="function"&&F(),w(j?"entered":"exited")):C.current=requestAnimationFrame(()=>{Qd.flushSync(()=>{w(j?"pre-entering":"pre-exiting")}),C.current=requestAnimationFrame(()=>{typeof N=="function"&&N(),w(j?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof F=="function"&&F(),w(j?"entered":"exited")},R)})})},M=j=>{if(T(),typeof(j?f:c)!="number"){A(j);return}S.current=window.setTimeout(()=>{A(j)},j?f:c)};return Wo(()=>{M(i)},[i]),O.useEffect(()=>()=>{T()},[]),{transitionDuration:v,transitionStatus:b,transitionTimingFunction:t||"ease"}}function Yo({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p}){const v=km(),{transitionDuration:y,transitionStatus:b,transitionTimingFunction:w}=gQ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?k.jsx(k.Fragment,{children:a({})}):e?a({display:"none"}):null;if(y===0)return e?k.jsx(O.Activity,{mode:r?"visible":"hidden",children:a({})}):r?k.jsx(k.Fragment,{children:a({})}):null;const _=b==="exited";return e?k.jsx(O.Activity,{mode:_?"hidden":"visible",children:a(_?{}:M5({transition:n,duration:y,state:b,timingFunction:w}))}):_?null:k.jsx(k.Fragment,{children:a(M5({transition:n,duration:y,state:b,timingFunction:w}))})}Yo.displayName="@mantine/core/Transition";const yQ={duration:100,transition:"fade"};function j5(e,n){return{...yQ,...n,...e}}const[bQ,Gz]=fa("Popover component was not found in the tree");function W1({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Nt(ZY(n),i),a=du(e);return a?O.cloneElement(a,{[t]:r}):e}function Yz(e){return k.jsx(j6,{tabIndex:-1,"data-autofocus":!0,...e})}W1.displayName="@mantine/core/FocusTrap";Yz.displayName="@mantine/core/FocusTrapInitialFocus";W1.InitialFocus=Yz;var Kz={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const D6=je(e=>{var w,_,S,C;const n=be("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:f,styles:c,ref:h,...d}=n,p=Gz(),v=F$({opened:p.opened,shouldReturnFocus:p.returnFocus}),y=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},b=Nt(h,p.floating);return p.disabled?null:k.jsx(el,{...p.portalProps,withinPortal:p.withinPortal,children:k.jsx(Yo,{mounted:p.opened,...p.transitionProps,transition:((w=p.transitionProps)==null?void 0:w.transition)||"fade",duration:((_=p.transitionProps)==null?void 0:_.duration)??150,keepMounted:p.keepMounted,exitDuration:typeof((S=p.transitionProps)==null?void 0:S.exitDuration)=="number"?p.transitionProps.exitDuration:(C=p.transitionProps)==null?void 0:C.duration,children:T=>{var A;return k.jsx(W1,{active:p.trapFocus&&p.opened,innerRef:b,children:k.jsxs(_e,{...y,...d,variant:l,onKeyDownCapture:IY(()=>{var M,j;(M=p.onClose)==null||M.call(p),(j=p.onDismiss)==null||j.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:f,styles:c,style:[{...T,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:he(p.width),...p.referenceHidden?{display:"none"}:null},(A=p.resolvedStyles)==null?void 0:A.dropdown,c==null?void 0:c.dropdown,i]}),children:[a,k.jsx(mg,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:f,styles:c})})]})})}})})});D6.classes=Kz;D6.displayName="@mantine/core/PopoverDropdown";const wQ={refProp:"ref",popupType:"dialog"},Xz=je(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=be("PopoverTarget",wQ,e),o=du(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=a,f=Gz(),c=Nt(f.reference,N1(o),r),h=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.opened?f.getDropdownId():void 0,id:f.getTargetId()}:{},d=o.props;return O.cloneElement(o,{...l,...h,...f.targetProps,className:sn(f.targetProps.className,l.className,d.className),[t]:c,...f.controlled?null:{onClick:p=>{var v;f.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});Xz.displayName="@mantine/core/PopoverTarget";function kQ(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function _Q(e,n,t){const i=kQ(e.middlewares),r=[jz(e.offset),UZ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?hg():hg(i.flip)),i.shift&&r.push(C6(typeof i.shift=="boolean"?{limiter:w5(),padding:5}:{limiter:w5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?uh():uh(i.inline)),r.push(Dz({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(HZ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...f}){var h;const c=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...f}):Object.assign(c,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(c,{width:`${a.reference.width}px`})}})),r}function xQ(e){const n=km(),[t,i]=Ci({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=O.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=T6({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:_Q(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:eS});return O.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return eS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),Wo(()=>{var f;(f=e.onPositionChange)==null||f.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),Wo(()=>{var f,c;t!==r.current&&(t?(c=e.onOpen)==null||c.call(e):(f=e.onClose)==null||f.call(e)),r.current=t},[t,e.onClose,e.onOpen]),es(()=>{let f=-1;return t&&(f=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(f)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const SQ={position:"bottom",offset:8,transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:ca("popover"),__staticSelector:"Popover",width:"max-content"},Zz=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Vt(n),"--popover-shadow":l6(t)}});function Vn(e){var Qe,ln,En,hn,rn,Je,zn;const n=be("Popover",SQ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:f,onEnterTransitionEnd:c,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:w,unstyled:_,classNames:S,styles:C,closeOnClickOutside:T,withinPortal:A,portalProps:M,closeOnEscape:j,clickOutsideEvents:N,trapFocus:F,onClose:R,onDismiss:L,onOpen:B,onChange:G,zIndex:H,radius:U,shadow:P,id:z,defaultOpened:q,__staticSelector:Y,withRoles:D,disabled:V,returnFocus:W,variant:$,keepMounted:X,vars:ee,floatingStrategy:oe,withOverlay:ue,overlayProps:ye,hideDetached:ae,attributes:le,preventPositionChangeWhenVisible:Se,...ne}=n,$e=We({name:Y,props:n,classes:Kz,classNames:S,styles:C,unstyled:_,attributes:le,rootSelector:"dropdown",vars:ee,varsResolver:Zz}),{resolvedStyles:ve}=Ni({classNames:S,styles:C,props:n}),[xe,De]=O.useState(o??q??!1),we=O.useRef(i),re=O.useRef(null),[ke,Ie]=O.useState(null),[qe,Ue]=O.useState(null),{dir:Ve}=mu(),me=km(),Ge=Gi(z),te=xQ({middlewares:d,width:h,position:qz(Ve,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:re,arrowOffset:y,onPositionChange:a,opened:o,defaultOpened:q,onChange:G,onOpen:B,onClose:R,onDismiss:L,strategy:oe,dropdownVisible:xe,setDropdownVisible:De,positionRef:we,disabled:V,preventPositionChangeWhenVisible:Se,keepMounted:X});HY(()=>{T&&(te.onClose(),L==null||L())},N,[ke,qe]);const pe=O.useCallback(un=>{Ie(un),te.floating.refs.setReference(un)},[te.floating.refs.setReference]),He=O.useCallback(un=>{Ue(un),te.floating.refs.setFloating(un)},[te.floating.refs.setFloating]),Ye=O.useCallback(()=>{var un;(un=l==null?void 0:l.onExited)==null||un.call(l),f==null||f(),De(!1),Se||(we.current=i)},[l==null?void 0:l.onExited,f,Se,i]),Ce=O.useCallback(()=>{var un;(un=l==null?void 0:l.onEntered)==null||un.call(l),c==null||c()},[l==null?void 0:l.onEntered,c]);return k.jsxs(bQ,{value:{returnFocus:W,disabled:V,controlled:te.controlled,reference:pe,floating:He,x:te.floating.x,y:te.floating.y,arrowX:(En=(ln=(Qe=te.floating)==null?void 0:Qe.middlewareData)==null?void 0:ln.arrow)==null?void 0:En.x,arrowY:(Je=(rn=(hn=te.floating)==null?void 0:hn.middlewareData)==null?void 0:rn.arrow)==null?void 0:Je.y,opened:te.opened,arrowRef:re,transitionProps:{...l,onExited:Ye,onEntered:Ce},width:h,withArrow:p,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:w,placement:te.floating.placement,trapFocus:F,withinPortal:A,portalProps:M,zIndex:H,radius:U,shadow:P,closeOnEscape:j,onDismiss:L,onClose:te.onClose,onToggle:te.onToggle,getTargetId:()=>Ge,getDropdownId:()=>`${Ge}-dropdown`,withRoles:D,targetProps:ne,__staticSelector:Y,classNames:S,styles:C,unstyled:_,variant:$,keepMounted:X,getStyles:$e,resolvedStyles:ve,floatingStrategy:oe,referenceHidden:ae&&me!=="test"?(zn=te.floating.middlewareData.hide)==null?void 0:zn.referenceHidden:!1},children:[t,ue&&k.jsx(Yo,{transition:"fade",mounted:te.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:un=>k.jsx(el,{withinPortal:A,children:k.jsx(xm,{...ye,...$e("overlay",{className:ye==null?void 0:ye.className,style:[un,ye==null?void 0:ye.style]})})})})]})}Vn.Target=Xz;Vn.Dropdown=D6;Vn.varsResolver=Zz;Vn.displayName="@mantine/core/Popover";Vn.extend=e=>e;Vn.withProps=e=>{const n=t=>k.jsx(Vn,{...e,...t});return n.extend=Vn.extend,n.displayName=`WithProps(${Vn.displayName})`,n};var Ta={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const Qz=({className:e,...n})=>k.jsxs(_e,{component:"span",className:sn(Ta.barsLoader,e),...n,children:[k.jsx("span",{className:Ta.bar}),k.jsx("span",{className:Ta.bar}),k.jsx("span",{className:Ta.bar})]});Qz.displayName="@mantine/core/Bars";const Jz=({className:e,...n})=>k.jsxs(_e,{component:"span",className:sn(Ta.dotsLoader,e),...n,children:[k.jsx("span",{className:Ta.dot}),k.jsx("span",{className:Ta.dot}),k.jsx("span",{className:Ta.dot})]});Jz.displayName="@mantine/core/Dots";const eL=({className:e,...n})=>k.jsx(_e,{component:"span",className:sn(Ta.ovalLoader,e),...n});eL.displayName="@mantine/core/Oval";const nL={bars:Qz,oval:eL,dots:Jz},CQ={loaders:nL,type:"oval"},tL=(e,{size:n,color:t})=>({root:{"--loader-size":On(n,"loader-size"),"--loader-color":t?et(t,e):void 0}}),tr=je(e=>{const n=be("Loader",CQ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:f,styles:c,unstyled:h,loaders:d,variant:p,children:v,attributes:y,...b}=n,w=We({name:"Loader",props:n,classes:Ta,className:o,style:l,classNames:f,styles:c,unstyled:h,attributes:y,vars:a,varsResolver:tL});return v?k.jsx(_e,{...w("root"),...b,children:v}):k.jsx(_e,{...w("root"),component:d[r],variant:p,size:t,...b})});tr.defaultLoaders=nL;tr.classes=Ta;tr.varsResolver=tL;tr.displayName="@mantine/core/Loader";var gc={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const D5={orientation:"horizontal"},iL=(e,{borderWidth:n})=>({group:{"--ai-border-width":he(n)}}),G1=je(e=>{const n=be("ActionIconGroup",D5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,variant:h,mod:d,attributes:p,...v}=be("ActionIconGroup",D5,e);return k.jsx(_e,{...We({name:"ActionIconGroup",props:n,classes:gc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:f,varsResolver:iL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});G1.classes=gc;G1.varsResolver=iL;G1.displayName="@mantine/core/ActionIconGroup";const rL=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":On(o,"section-height"),"--section-padding-x":On(o,"section-padding-x"),"--section-fz":Zt(o),"--section-radius":n===void 0?void 0:Vt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},Y1=je(e=>{const n=be("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:f,gradient:c,radius:h,autoContrast:d,attributes:p,...v}=n;return k.jsx(_e,{...We({name:"ActionIconGroupSection",props:n,classes:gc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:rL,rootSelector:"groupSection"})("groupSection"),variant:f,...v})});Y1.classes=gc;Y1.varsResolver=rL;Y1.displayName="@mantine/core/ActionIconGroupSection";const aL=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o})=>{const l=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--ai-size":On(n,"ai-size"),"--ai-radius":t===void 0?void 0:Vt(t),"--ai-bg":a||i?l.background:void 0,"--ai-hover":a||i?l.hover:void 0,"--ai-hover-color":a||i?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":a||i?l.border:void 0}}},Yt=$i(e=>{const n=be("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:f,loaderProps:c,size:h,color:d,radius:p,__staticSelector:v,gradient:y,vars:b,children:w,disabled:_,"data-disabled":S,autoContrast:C,mod:T,attributes:A,...M}=n,j=We({name:["ActionIcon",v],props:n,className:t,style:l,classes:gc,classNames:a,styles:o,unstyled:i,attributes:A,vars:b,varsResolver:aL});return k.jsxs(Si,{...j("root",{active:!_&&!f&&!S}),...M,unstyled:i,variant:r,size:h,disabled:_||f,mod:[{loading:f,disabled:_||S},T],children:[typeof f=="boolean"&&k.jsx(Yo,{mounted:f,transition:"slide-down",duration:150,children:N=>k.jsx(_e,{component:"span",...j("loader",{style:N}),"aria-hidden":!0,children:k.jsx(tr,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...c})})}),k.jsx(_e,{component:"span",mod:{loading:f},...j("icon"),children:w})]})});Yt.classes=gc;Yt.varsResolver=aL;Yt.displayName="@mantine/core/ActionIcon";Yt.Group=G1;Yt.GroupSection=Y1;function oL({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return k.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:k.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}oL.displayName="@mantine/core/CloseIcon";var sL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const AQ={variant:"subtle"},lL=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":On(n,"cb-size"),"--cb-radius":t===void 0?void 0:Vt(t),"--cb-icon-size":he(i)}}),pu=$i(e=>{const n=be("CloseButton",AQ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:f,styles:c,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:y,mod:b,attributes:w,__staticSelector:_,...S}=n,C=We({name:_||"CloseButton",props:n,className:o,style:f,classes:sL,classNames:l,styles:c,unstyled:h,attributes:w,vars:r,varsResolver:lL});return k.jsxs(Si,{...S,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},b],...C("root",{variant:v,active:!p&&!d}),children:[y||k.jsx(oL,{}),i]})});pu.classes=sL;pu.varsResolver=lL;pu.displayName="@mantine/core/CloseButton";function OQ(e){return O.Children.toArray(e).filter(Boolean)}var uL={root:"m_4081bf90"};const EQ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},fL=(e,{grow:n,preventGrowOverflow:t,gap:i,align:r,justify:a,wrap:o},{childWidth:l})=>({root:{"--group-child-width":n&&t?l:void 0,"--group-gap":Ft(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),wn=je(e=>{const n=be("Group",EQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:f,align:c,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:y,variant:b,__size:w,mod:_,attributes:S,...C}=n,T=OQ(l),A=T.length,M=Ft(f??"md");return k.jsx(_e,{...We({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/A}% - (${M} - ${M} / ${A}))`},className:i,style:r,classes:uL,classNames:t,styles:a,unstyled:o,attributes:S,vars:y,varsResolver:fL})("root"),variant:b,mod:[{grow:p},_],size:w,...C,children:T})});wn.classes=uL;wn.varsResolver=fL;wn.displayName="@mantine/core/Group";const[TQ,ts]=fa("ModalBase component was not found in tree");function MQ({opened:e,transitionDuration:n}){const[t,i]=O.useState(e),r=O.useRef(-1),a=f6()?0:n;return O.useEffect(()=>(e?(i(!0),window.clearTimeout(r.current)):a===0?i(!1):r.current=window.setTimeout(()=>i(!1),a),()=>window.clearTimeout(r.current)),[e,a]),t}function jQ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Gi(e),[f,c]=O.useState(!1),[h,d]=O.useState(!1),p=MQ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return V$("keydown",v=>{var y;v.key==="Escape"&&r&&!v.isComposing&&t&&((y=v.target)==null?void 0:y.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),F$({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:f,bodyMounted:h,shouldLockScroll:p,setTitleMounted:c,setBodyMounted:d}}var Wa=function(){return Wa=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return YQ;var n=KQ(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},ZQ=mL(),Ef="data-scroll-locked",QQ=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,l=e.gap;return t===void 0&&(t="margin"),` - .`.concat(RQ,` { - overflow: hidden `).concat(i,`; - padding-right: `).concat(l,"px ").concat(i,`; - } - body[`).concat(Ef,`] { - overflow: hidden `).concat(i,`; - overscroll-behavior: contain; - `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&` - padding-left: `.concat(r,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(l,"px ").concat(i,`; - `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` - } - - .`).concat(Yv,` { - right: `).concat(l,"px ").concat(i,`; - } - - .`).concat(Kv,` { - margin-right: `).concat(l,"px ").concat(i,`; - } - - .`).concat(Yv," .").concat(Yv,` { - right: 0 `).concat(i,`; - } - - .`).concat(Kv," .").concat(Kv,` { - margin-right: 0 `).concat(i,`; - } - - body[`).concat(Ef,`] { - `).concat(PQ,": ").concat(l,`px; - } -`)},P5=function(){var e=parseInt(document.body.getAttribute(Ef)||"0",10);return isFinite(e)?e:0},JQ=function(){O.useEffect(function(){return document.body.setAttribute(Ef,(P5()+1).toString()),function(){var e=P5()-1;e<=0?document.body.removeAttribute(Ef):document.body.setAttribute(Ef,e.toString())}},[])},eJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;JQ();var a=O.useMemo(function(){return XQ(r)},[r]);return O.createElement(ZQ,{styles:QQ(a,!n,r,t?"":"!important")})},tS=!1;if(typeof window<"u")try{var vv=Object.defineProperty({},"passive",{get:function(){return tS=!0,!0}});window.addEventListener("test",vv,vv),window.removeEventListener("test",vv,vv)}catch{tS=!1}var ff=tS?{passive:!1}:!1,nJ=function(e){return e.tagName==="TEXTAREA"},pL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!nJ(e)&&t[n]==="visible")},tJ=function(e){return pL(e,"overflowY")},iJ=function(e){return pL(e,"overflowX")},N5=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=vL(e,i);if(r){var a=gL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},rJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},aJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},vL=function(e,n){return e==="v"?tJ(n):iJ(n)},gL=function(e,n){return e==="v"?rJ(n):aJ(n)},oJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},sJ=function(e,n,t,i,r){var a=oJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,f=n.contains(l),c=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=gL(e,l),y=v[0],b=v[1],w=v[2],_=b-w-a*y;(y||_)&&vL(e,l)&&(d+=_,p+=y);var S=l.parentNode;l=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!f&&l!==document.body||f&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(c=!0),c},gv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$5=function(e){return[e.deltaX,e.deltaY]},z5=function(e){return e&&"current"in e?e.current:e},lJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},uJ=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},fJ=0,cf=[];function cJ(e){var n=O.useRef([]),t=O.useRef([0,0]),i=O.useRef(),r=O.useState(fJ++)[0],a=O.useState(mL)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var b=DQ([e.lockRef.current],(e.shards||[]).map(z5),!0).filter(Boolean);return b.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),b.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=O.useCallback(function(b,w){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!o.current.allowPinchZoom;var _=gv(b),S=t.current,C="deltaX"in b?b.deltaX:S[0]-_[0],T="deltaY"in b?b.deltaY:S[1]-_[1],A,M=b.target,j=Math.abs(C)>Math.abs(T)?"h":"v";if("touches"in b&&j==="h"&&M.type==="range")return!1;var N=window.getSelection(),F=N&&N.anchorNode,R=F?F===M||F.contains(M):!1;if(R)return!1;var L=N5(j,M);if(!L)return!0;if(L?A=j:(A=j==="v"?"h":"v",L=N5(j,M)),!L)return!1;if(!i.current&&"changedTouches"in b&&(C||T)&&(i.current=A),!A)return!0;var B=i.current||A;return sJ(B,w,b,B==="h"?C:T)},[]),f=O.useCallback(function(b){var w=b;if(!(!cf.length||cf[cf.length-1]!==a)){var _="deltaY"in w?$5(w):gv(w),S=n.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&lJ(A.delta,_)})[0];if(S&&S.should){w.cancelable&&w.preventDefault();return}if(!S){var C=(o.current.shards||[]).map(z5).filter(Boolean).filter(function(A){return A.contains(w.target)}),T=C.length>0?l(w,C[0]):!o.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),c=O.useCallback(function(b,w,_,S){var C={name:b,delta:w,target:_,should:S,shadowParent:dJ(_)};n.current.push(C),setTimeout(function(){n.current=n.current.filter(function(T){return T!==C})},1)},[]),h=O.useCallback(function(b){t.current=gv(b),i.current=void 0},[]),d=O.useCallback(function(b){c(b.type,$5(b),b.target,l(b,e.lockRef.current))},[]),p=O.useCallback(function(b){c(b.type,gv(b),b.target,l(b,e.lockRef.current))},[]);O.useEffect(function(){return cf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",f,ff),document.addEventListener("touchmove",f,ff),document.addEventListener("touchstart",h,ff),function(){cf=cf.filter(function(b){return b!==a}),document.removeEventListener("wheel",f,ff),document.removeEventListener("touchmove",f,ff),document.removeEventListener("touchstart",h,ff)}},[]);var v=e.removeScrollBar,y=e.inert;return O.createElement(O.Fragment,null,y?O.createElement(a,{styles:uJ(r)}):null,v?O.createElement(eJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dJ(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const hJ=FQ(hL,cJ);var nu=O.forwardRef(function(e,n){return O.createElement(K1,Wa({},e,{ref:n,sideCar:hJ}))});nu.classNames=K1.classNames;function yL({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:f,returnFocus:c,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:y,zIndex:b,shadow:w,padding:_,__vars:S,unstyled:C,removeScrollProps:T,...A}){const{_id:M,titleMounted:j,bodyMounted:N,shouldLockScroll:F,setTitleMounted:R,setBodyMounted:L}=jQ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:f,onClose:t,returnFocus:c}),{key:B,...G}=T||{};return k.jsx(el,{...p,withinPortal:d,children:k.jsx(TQ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${M}-title`,getBodyId:()=>`${M}-body`,titleMounted:j,bodyMounted:N,setTitleMounted:R,setBodyMounted:L,trapFocus:l,closeOnEscape:f,zIndex:b,unstyled:C},children:k.jsx(nu,{enabled:F&&v,...G,children:k.jsx(_e,{...A,id:M,__vars:{...S,"--mb-z-index":(b||ca("modal")).toString(),"--mb-shadow":l6(w),"--mb-padding":Ft(_)},children:y})},B)})})}yL.displayName="@mantine/core/ModalBase";function mJ(){const e=ts();return O.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var zf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function bL({className:e,...n}){const t=mJ(),i=ts();return k.jsx(_e,{id:t,className:sn({[zf.body]:!i.unstyled},e),...n})}bL.displayName="@mantine/core/ModalBaseBody";function wL({className:e,onClick:n,...t}){const i=ts();return k.jsx(pu,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:sn({[zf.close]:!i.unstyled},e),unstyled:i.unstyled})}wL.displayName="@mantine/core/ModalBaseCloseButton";function kL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=ts();return k.jsx(Yo,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var f,c,h;(f=l.onExitTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onExited)==null||h.call(c)},onEntered:()=>{var f,c,h;(f=l.onEnterTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onEntered)==null||h.call(c)},...e,children:f=>k.jsx("div",{...t,className:sn({[zf.inner]:!l.unstyled},t.className),children:k.jsx(W1,{active:l.opened&&l.trapFocus,innerRef:a,children:k.jsx(ni,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,f],className:sn({[zf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}kL.displayName="@mantine/core/ModalBaseContent";function _L({className:e,...n}){const t=ts();return k.jsx(_e,{component:"header",className:sn({[zf.header]:!t.unstyled},e),...n})}_L.displayName="@mantine/core/ModalBaseHeader";const pJ={duration:200,timingFunction:"ease",transition:"fade"};function vJ(e){const n=ts();return{...pJ,...n.transitionProps,...e}}function xL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=ts(),o=vJ(n);return k.jsx(Yo,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>k.jsx(xm,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:f=>{e==null||e(f),a.closeOnClickOutside&&a.onClose()},...r})})}xL.displayName="@mantine/core/ModalBaseOverlay";function gJ(){const e=ts();return O.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function SL({className:e,...n}){const t=gJ(),i=ts();return k.jsx(_e,{component:"h2",className:sn({[zf.title]:!i.unstyled},e),id:t,...n})}SL.displayName="@mantine/core/ModalBaseTitle";function yJ({children:e}){return k.jsx(k.Fragment,{children:e})}const CL=O.createContext({size:"sm"}),AL=je(e=>{const n=be("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,f=O.use(CL),{resolvedClassNames:c,resolvedStyles:h}=Ni({classNames:a,styles:o,props:n});return k.jsx(pu,{variant:i||"transparent",size:t||(f==null?void 0:f.size)||"sm",classNames:c,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});AL.displayName="@mantine/core/InputClearButton";const bJ={xs:7,sm:8,md:10,lg:12,xl:15};function wJ({__clearable:e,__clearSection:n,rightSection:t,__defaultRightSection:i,size:r="sm",__clearSectionMode:a="both"}){const o=e&&n;return a==="rightSection"?t===null?null:t||i:a==="clear"?t===null?null:o||i:o&&(t||i)?k.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:bJ[r]},children:[o,t||i]}):t===null?null:t||o||i}const vu=O.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var ma={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const OL=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),Sm=je(e=>{const n=be("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,__inheritStyles:c=!0,attributes:h,...d}=be("InputDescription",null,n),p=O.use(vu),v=We({name:["InputWrapper",f],props:n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:OL});return k.jsx(_e,{component:"p",...(c&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});Sm.classes=ma;Sm.varsResolver=OL;Sm.displayName="@mantine/core/InputDescription";const EL=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),Cm=je(e=>{const n=be("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,__staticSelector:c,__inheritStyles:h=!0,...d}=n,p=We({name:["InputWrapper",c],props:n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,rootSelector:"error",vars:l,varsResolver:EL}),v=O.use(vu);return k.jsx(_e,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});Cm.classes=ma;Cm.varsResolver=EL;Cm.displayName="@mantine/core/InputError";const kJ={labelElement:"label"},TL=(e,{size:n})=>({label:{"--input-label-size":Zt(n),"--input-asterisk-color":void 0}}),Am=je(e=>{const n=be("InputLabel",kJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:f,required:c,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:y,attributes:b,...w}=n,_=We({name:["InputWrapper",v],props:n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,rootSelector:"label",vars:l,varsResolver:TL}),S=O.use(vu),C=(S==null?void 0:S.getStyles)||_;return k.jsxs(_e,{...C("label",S!=null&&S.getStyles?{className:i,style:r}:void 0),component:f,htmlFor:f==="label"?h:void 0,mod:[{required:c},y],onMouseDown:T=>{d==null||d(T),!T.defaultPrevented&&T.detail>1&&T.preventDefault()},...w,children:[p,c&&k.jsx("span",{...C("required"),"aria-hidden":!0,children:" *"})]})});Am.classes=ma;Am.varsResolver=TL;Am.displayName="@mantine/core/InputLabel";const R6=je(e=>{const n=be("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,error:c,mod:h,attributes:d,...p}=n;return k.jsx(_e,{...We({name:["InputPlaceholder",f],props:n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!c},h],component:"span",...p})});R6.classes=ma;R6.displayName="@mantine/core/InputPlaceholder";function _J(e,{hasDescription:n,hasError:t}){const i=e.findIndex(l=>l==="input"),r=e.slice(0,i),a=e.slice(i+1),o=n&&r.includes("description")||t&&r.includes("error");return{offsetBottom:n&&a.includes("description")||t&&a.includes("error"),offsetTop:o}}const xJ={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},ML=(e,{size:n})=>({label:{"--input-label-size":Zt(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),X1=je(e=>{const n=be("InputWrapper",xJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,variant:c,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:y,description:b,labelProps:w,descriptionProps:_,errorProps:S,labelElement:C,children:T,withAsterisk:A,id:M,required:j,__stylesApiProps:N,mod:F,attributes:R,...L}=n,B=We({name:["InputWrapper",h],props:N||n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:R,vars:l,varsResolver:ML}),G={size:f,variant:c,__staticSelector:h},H=Gi(M),U=typeof A=="boolean"?A:j,P=(S==null?void 0:S.id)||`${H}-error`,z=(_==null?void 0:_.id)||`${H}-description`,q=H,Y=!!y&&typeof y!="boolean",D=!!b,V=`${Y?P:""} ${D?z:""}`,W=V.trim().length>0?V.trim():void 0,$=(w==null?void 0:w.id)||`${H}-label`,X=v&&k.jsx(Am,{labelElement:C,id:$,htmlFor:q,required:U,...G,...w,children:v},"label"),ee=D&&k.jsx(Sm,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||z,children:b},"description"),oe=k.jsx(O.Fragment,{children:d(T)},"input"),ue=Y&&O.createElement(Cm,{...S,...G,size:(S==null?void 0:S.size)||G.size,key:"error",id:(S==null?void 0:S.id)||P},y),ye=p.map(ae=>{switch(ae){case"label":return X;case"input":return oe;case"description":return ee;case"error":return ue;default:return null}});return k.jsx(vu,{value:{getStyles:B,describedBy:W,inputId:q,labelId:$,..._J(p,{hasDescription:D,hasError:Y})},children:k.jsx(_e,{variant:c,size:f,mod:[{error:!!y},F],id:C==="label"?void 0:M,...B("root"),...L,children:ye})})});X1.classes=ma;X1.varsResolver=ML;X1.displayName="@mantine/core/InputWrapper";const SJ={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},jL=(e,n,t)=>({wrapper:{"--input-margin-top":t.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":t.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":On(n.size,"input-height"),"--input-fz":Zt(n.size),"--input-radius":n.radius===void 0?void 0:Vt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?he(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?he(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?On(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Pt=$i(e=>{const n=be("Input",SJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:f,__stylesApiProps:c,size:h,wrapperProps:d,error:p,disabled:v,leftSection:y,leftSectionProps:b,leftSectionWidth:w,rightSection:_,rightSectionProps:S,rightSectionWidth:C,rightSectionPointerEvents:T,leftSectionPointerEvents:A,variant:M,vars:j,pointer:N,multiline:F,radius:R,id:L,withAria:B,withErrorStyles:G,mod:H,inputSize:U,attributes:P,__clearSection:z,__clearable:q,__clearSectionMode:Y,__defaultRightSection:D,loading:V,loadingPosition:W,rootRef:$,...X}=n,{styleProps:ee,rest:oe}=hu(X),ue=O.use(vu),ye={offsetBottom:ue==null?void 0:ue.offsetBottom,offsetTop:ue==null?void 0:ue.offsetTop},ae=We({name:["Input",f],props:c||n,classes:ma,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,stylesCtx:ye,rootSelector:"wrapper",vars:j,varsResolver:jL}),le=B?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":ue==null?void 0:ue.describedBy,id:(ue==null?void 0:ue.inputId)||L}:{},Se=V?k.jsx(tr,{size:W==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ne=V&&W==="left"?Se:y,$e=wJ({__clearable:q,__clearSection:z,rightSection:V&&W==="right"?Se:_,__defaultRightSection:D,size:h,__clearSectionMode:Y});return k.jsx(CL,{value:{size:h||"sm"},children:k.jsxs(_e,{ref:$,...ae("wrapper"),...ee,...d,mod:[{error:!!p&&G,pointer:N,disabled:v,multiline:F,"data-with-right-section":!!$e,"data-with-left-section":!!ne},H],variant:M,size:h,children:[ne&&k.jsx("div",{...b,"data-position":"left",...ae("section",{className:b==null?void 0:b.className,style:b==null?void 0:b.style}),children:ne}),k.jsx(_e,{component:"input",...oe,...le,required:l,mod:{disabled:v,error:!!p&&G},variant:M,__size:U,...ae("input")}),$e&&k.jsx("div",{...S,"data-position":"right",...ae("section",{className:S==null?void 0:S.className,style:S==null?void 0:S.style}),children:$e})]})})});Pt.classes=ma;Pt.varsResolver=jL;Pt.Wrapper=X1;Pt.Label=Am;Pt.Error=Cm;Pt.Description=Sm;Pt.Placeholder=R6;Pt.ClearButton=AL;Pt.displayName="@mantine/core/Input";function DL(e,n,t){const i=be(e,n,t),{label:r,description:a,error:o,required:l,classNames:f,styles:c,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:y,labelProps:b,descriptionProps:w,wrapperProps:_,id:S,size:C,style:T,inputContainer:A,inputWrapperOrder:M,withAsterisk:j,variant:N,vars:F,mod:R,attributes:L,...B}=i,{styleProps:G,rest:H}=hu(B),U={label:r,description:a,error:o,required:l,classNames:f,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:y,labelProps:b,descriptionProps:w,unstyled:d,styles:c,size:C,style:T,inputContainer:A,inputWrapperOrder:M,withAsterisk:j,variant:N,id:S,mod:R,attributes:L,..._};return{...H,classNames:f,styles:c,unstyled:d,wrapperProps:{...U,...G},inputProps:{required:l,classNames:f,styles:c,unstyled:d,size:C,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:N,id:S,attributes:L}}}const CJ={__staticSelector:"InputBase",withAria:!0,size:"sm"},zi=$i(e=>{const{inputProps:n,wrapperProps:t,...i}=DL("InputBase",CJ,e);return k.jsx(Pt.Wrapper,{...t,children:k.jsx(Pt,{...n,...i})})});zi.classes={...Pt.classes,...Pt.Wrapper.classes};zi.displayName="@mantine/core/InputBase";function pg({style:e,size:n=16,...t}){return k.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:he(n),height:he(n),display:"block"},...t,children:k.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}pg.displayName="@mantine/core/AccordionChevron";var RL={root:"m_b6d8b162"};function AJ(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const OJ={inherit:!1},PL=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":Zt(r),"--text-lh":BY(r),"--text-gradient":n==="gradient"?V3(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),cn=$i(e=>{const n=be("Text",OJ,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:f,vars:c,className:h,style:d,classNames:p,styles:v,unstyled:y,variant:b,mod:w,size:_,attributes:S,...C}=n;return k.jsx(_e,{...We({name:["Text",f],props:n,classes:RL,className:h,style:d,classNames:p,styles:v,unstyled:y,attributes:S,vars:c,varsResolver:PL})("root",{focusable:!0}),component:l?"span":"p",variant:b,mod:[{"data-truncate":AJ(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},w],size:_,...C})});cn.classes=RL;cn.varsResolver=PL;cn.displayName="@mantine/core/Text";var NL={root:"m_849cf0da"};const EJ={underline:"hover"},P6=$i(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=be("Anchor",EJ,e);return k.jsx(cn,{component:"a",className:sn({[NL.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});P6.classes=NL;P6.displayName="@mantine/core/Anchor";const[TJ,yc]=fa("AppShell was not found in tree");var il={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const N6=je(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellAside",null,e),d=yc();return d.disabled?null:k.jsx(_e,{component:"aside",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("aside",{className:sn({[nu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${f??d.zIndex} + 1)`}})});N6.classes=il;N6.displayName="@mantine/core/AppShellAside";const $6=je(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellFooter",null,e),d=yc();return d.disabled?null:k.jsx(_e,{component:"footer",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("footer",{className:sn({[nu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});$6.classes=il;$6.displayName="@mantine/core/AppShellFooter";const z6=je(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellHeader",null,e),d=yc();return d.disabled?null:k.jsx(_e,{component:"header",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("header",{className:sn({[nu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});z6.classes=il;z6.displayName="@mantine/core/AppShellHeader";const L6=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("AppShellMain",null,e);return k.jsx(_e,{component:"main",...yc().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});L6.classes=il;L6.displayName="@mantine/core/AppShellMain";const I6=je(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellNavbar",null,e),d=yc();return d.disabled?null:k.jsx(_e,{component:"nav",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${f??d.zIndex} + 1)`}})});I6.classes=il;I6.displayName="@mantine/core/AppShellNavbar";const B6=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...f}=be("AppShellSection",null,e),c=yc();return k.jsx(_e,{mod:[{grow:o},l],...c.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...f})});B6.classes=il;B6.displayName="@mantine/core/AppShellSection";function Om(e){return typeof e=="object"?e.base:e}function Em(e){const n=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||n}function Tm(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function MJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),Em(o)){const p=he(Om(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Tm(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=he(o.base),e["--app-shell-aside-offset"]=he(o.base)),xt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=he(o[p]),n[p]["--app-shell-aside-offset"]=he(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=u6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=f,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function jJ({baseStyles:e,minMediaStyles:n,footer:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(var(--app-shell-footer-height))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-footer-position"]="sticky",e["--app-shell-footer-grid-column"]="1 / -1",e["--app-shell-footer-grid-row"]="3"),Em(r)){const l=he(Om(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Tm(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=he(r.base),o&&(e["--app-shell-footer-offset"]=he(r.base))),xt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=he(r[l]),o&&(n[l]["--app-shell-footer-offset"]=he(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function DJ({baseStyles:e,minMediaStyles:n,header:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(calc(var(--app-shell-header-height) * -1))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-header-position"]="sticky",e["--app-shell-header-grid-column"]="1 / -1",e["--app-shell-header-grid-row"]="1"),Em(r)){const l=he(Om(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Tm(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=he(r.base),o&&(e["--app-shell-header-offset"]=he(r.base))),xt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=he(r[l]),o&&(n[l]["--app-shell-header-offset"]=he(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function RJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),Em(o)){const p=he(Om(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Tm(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=he(o.base),e["--app-shell-navbar-offset"]=he(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=he(o.base))),xt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=he(o[p]),n[p]["--app-shell-navbar-offset"]=he(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=he(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=u6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=f}}function ik(e){return Number(e)===0?"0px":Ft(e)}function PJ({padding:e,baseStyles:n,minMediaStyles:t}){Em(e)&&(n["--app-shell-padding"]=ik(Om(e))),Tm(e)&&(e.base&&(n["--app-shell-padding"]=ik(e.base)),xt(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=ik(e[i]))}))}function NJ({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},f={},c={};o==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),RJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,navbar:e,theme:a,mode:o}),MJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,aside:i,theme:a,mode:o}),DJ({baseStyles:c,minMediaStyles:l,header:n,mode:o}),jJ({baseStyles:c,minMediaStyles:l,footer:t,mode:o}),PJ({baseStyles:c,minMediaStyles:l,padding:r});const h=xh(xt(l),a.breakpoints).map(p=>({query:`(min-width: ${ag(p.px)})`,styles:l[p.value]})),d=xh(xt(f),a.breakpoints).map(p=>({query:`(max-width: ${ag(p.px)})`,styles:f[p.value]}));return{baseStyles:c,media:[...h,...d]}}function $J({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ti(),f=oo(),{media:c,baseStyles:h}=NJ({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return k.jsx(mc,{media:c,styles:h,selector:o||f.cssVariablesSelector})}function zJ({transitionDuration:e,disabled:n}){const[t,i]=O.useState(!0),r=O.useRef(-1),a=O.useRef(-1);return V$("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>O.startTransition(()=>{i(!1)}),200)}),es(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>O.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const LJ={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:ca("app"),mode:"fixed"},$L=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),dr=je(e=>{const n=be("AppShell",LJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:f,withBorder:c,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:y,layout:b,disabled:w,aside:_,footer:S,offsetScrollbars:C=!0,mode:T,mod:A,attributes:M,id:j,...N}=n,F=We({name:"AppShell",classes:il,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:l,varsResolver:$L}),R=zJ({disabled:w,transitionDuration:d}),L=Gi(j);return k.jsxs(TJ,{value:{getStyles:F,withBorder:c,zIndex:y,disabled:w,offsetScrollbars:C,mode:T},children:[k.jsx($J,{navbar:f,header:v,aside:_,footer:S,padding:h,mode:T,selector:T==="static"?`#${L}`:void 0}),k.jsx(_e,{...F("root"),id:L,mod:[{resizing:R,layout:b,disabled:w,mode:T},A],...N})]})});dr.classes=il;dr.varsResolver=$L;dr.displayName="@mantine/core/AppShell";dr.Navbar=I6;dr.Header=z6;dr.Main=L6;dr.Aside=N6;dr.Footer=$6;dr.Section=B6;function zL(e){return typeof e=="string"?{value:e,label:e}:typeof e=="object"&&"value"in e&&!("label"in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e=="object"&&"group"in e?{group:e.group,items:e.items.map(n=>zL(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function Z1(e){return e?e.map(n=>zL(n)):[]}function Mm(e){return e.reduce((n,t)=>"group"in t?{...n,...Mm(t.items)}:(n[`${t.value}`]=t,n),{})}var nr={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const IJ={error:null},LL=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":On(n,"combobox-chevron-size"),"--combobox-chevron-color":t?et(t,e):void 0}}),Q1=je(e=>{const n=be("ComboboxChevron",IJ,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,attributes:h,mod:d,...p}=n,v=We({name:"ComboboxChevron",classes:nr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,varsResolver:LL,attributes:h,rootSelector:"chevron"});return k.jsx(_e,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:k.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});Q1.classes=nr;Q1.varsResolver=LL;Q1.displayName="@mantine/core/ComboboxChevron";const[BJ,pa]=fa("Combobox component was not found in tree");function IL({onMouseDown:e,onClick:n,onClear:t,...i}){return k.jsx(Pt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}IL.displayName="@mantine/core/ComboboxClearButton";const F6=je(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=be("ComboboxDropdown",null,e),l=pa();return k.jsx(Vn.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});F6.classes=nr;F6.displayName="@mantine/core/ComboboxDropdown";const FJ={refProp:"ref"},BL=je(e=>{const{children:n,refProp:t,ref:i}=be("ComboboxDropdownTarget",FJ,e);if(pa(),!o6(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return k.jsx(Vn.Target,{ref:i,refProp:t,children:n})});BL.displayName="@mantine/core/ComboboxDropdownTarget";const q6=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxEmpty",null,e);return k.jsx(_e,{...pa().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});q6.classes=nr;q6.displayName="@mantine/core/ComboboxEmpty";function H6({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=pa(),[f,c]=O.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const y=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&y!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&f||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const qJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},FL=je(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=be("ComboboxEventsTarget",qJ,e),h=du(n);if(!h)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=pa();return O.cloneElement(h,{...H6({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c,[t]:Nt(f,d.store.targetRef,N1(h))})});FL.displayName="@mantine/core/ComboboxEventsTarget";const U6=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxFooter",null,e);return k.jsx(_e,{...pa().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});U6.classes=nr;U6.displayName="@mantine/core/ComboboxFooter";const V6=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:f,...c}=be("ComboboxGroup",null,e),h=pa(),d=Gi(f);return k.jsxs(_e,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...c,children:[l&&k.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});V6.classes=nr;V6.displayName="@mantine/core/ComboboxGroup";const W6=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxHeader",null,e);return k.jsx(_e,{...pa().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});W6.classes=nr;W6.displayName="@mantine/core/ComboboxHeader";function qL({value:e,valuesDivider:n=",",...t}){return k.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}qL.displayName="@mantine/core/ComboboxHiddenInput";const G6=je(e=>{const n=be("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:f,active:c,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:y,...b}=n,w=pa(),_=O.useId(),S=f||_;return k.jsx(_e,{...w.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...b,id:S,mod:["combobox-option",{"combobox-active":c,"combobox-disabled":p,"combobox-selected":v},y],role:"option",onClick:C=>{var T;p?C.preventDefault():((T=w.onOptionSubmit)==null||T.call(w,n.value,n),l==null||l(C))},onMouseDown:C=>{C.preventDefault(),h==null||h(C)},onMouseOver:C=>{w.resetSelectionOnOptionHover&&w.store.resetSelectedOption(),d==null||d(C)}})});G6.classes=nr;G6.displayName="@mantine/core/ComboboxOption";const Y6=je(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...f}=be("ComboboxOptions",null,e),c=pa(),h=Gi(a);return O.useEffect(()=>{c.store.setListId(h)},[h]),k.jsx(_e,{...c.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...f,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});Y6.classes=nr;Y6.displayName="@mantine/core/ComboboxOptions";const HJ={withAriaAttributes:!0,withKeyboardNavigation:!0},K6=je(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:f,size:c,ref:h,...d}=be("ComboboxSearch",HJ,e),p=pa(),v=p.getStyles("search"),y=H6({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return k.jsx(Pt,{ref:Nt(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:c||p.size,...y,...d,__staticSelector:"Combobox"})});K6.classes=nr;K6.displayName="@mantine/core/ComboboxSearch";const UJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},HL=je(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=be("ComboboxTarget",UJ,e),h=du(n);if(!h)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=pa(),p=O.cloneElement(h,{...H6({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c});return k.jsx(Vn.Target,{refProp:t,ref:Nt(f,d.store.targetRef),children:p})});HL.displayName="@mantine/core/ComboboxTarget";function VJ(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i}return e}function WJ(e,n,t){for(let i=e+1;i{l||(f(!0),r==null||r(P))},[f,r,l]),_=O.useCallback((P="unknown")=>{l&&(f(!1),i==null||i(P))},[f,i,l]),S=O.useCallback((P="unknown")=>{l?_(P):w(P)},[_,w,l]),C=O.useCallback(()=>{const P=Mo(p.current),z=Uv(`#${c.current} [data-combobox-selected]`,P);z==null||z.removeAttribute("data-combobox-selected"),z==null||z.removeAttribute("aria-selected")},[]),T=O.useCallback(P=>{const z=Mo(p.current),q=Uv(`#${c.current}`,z),Y=q?Po("[data-combobox-option]",q):null;if(!Y)return null;const D=P>=Y.length?0:P<0?Y.length-1:P;return h.current=D,Y!=null&&Y[D]&&!Y[D].hasAttribute("data-combobox-disabled")?(C(),Y[D].setAttribute("data-combobox-selected","true"),Y[D].setAttribute("aria-selected","true"),Y[D].scrollIntoView({block:"nearest",behavior:o}),Y[D].id):null},[o,C]),A=O.useCallback(()=>{const P=Mo(p.current),z=Uv(`#${c.current} [data-combobox-active]`,P);return T(z?Po(`#${c.current} [data-combobox-option]`,P).findIndex(q=>q===z):0)},[T]),M=O.useCallback(()=>{const P=Mo(p.current),z=Po(`#${c.current} [data-combobox-option]`,P);return T(WJ(h.current,z,a))},[T,a]),j=O.useCallback(()=>{const P=Mo(p.current),z=Po(`#${c.current} [data-combobox-option]`,P);return T(VJ(h.current,z,a))},[T,a]),N=O.useCallback(()=>{const P=Mo(p.current);return T(GJ(Po(`#${c.current} [data-combobox-option]`,P)))},[T]),F=O.useCallback((P="selected",z)=>{var q;if(typeof P=="number"){h.current=P;const Y=Mo(p.current),D=Po(`#${c.current} [data-combobox-option]`,Y);z!=null&&z.scrollIntoView&&((q=D[P])==null||q.scrollIntoView({block:"nearest",behavior:o}));return}b.current=window.setTimeout(()=>{var W;const Y=Mo(p.current),D=Po(`#${c.current} [data-combobox-option]`,Y),V=D.findIndex($=>$.hasAttribute(`data-combobox-${P}`));h.current=V,z!=null&&z.scrollIntoView&&((W=D[V])==null||W.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),R=O.useCallback(()=>{h.current=-1,C()},[C]),L=O.useCallback(()=>{var z,q;const P=Mo(p.current);(q=(z=Po(`#${c.current} [data-combobox-option]`,P))==null?void 0:z[h.current])==null||q.click()},[]),B=O.useCallback(P=>{c.current=P},[]),G=O.useCallback(()=>{v.current=window.setTimeout(()=>{var P;return(P=d.current)==null?void 0:P.focus()},0)},[]),H=O.useCallback(()=>{y.current=window.setTimeout(()=>{var P;return(P=p.current)==null?void 0:P.focus()},0)},[]),U=O.useCallback(()=>h.current,[]);return O.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(y.current),window.clearTimeout(b.current)},[]),{dropdownOpened:l,openDropdown:w,closeDropdown:_,toggleDropdown:S,selectedOptionIndex:h.current,getSelectedOptionIndex:U,selectOption:T,selectFirstOption:N,selectActiveOption:A,selectNextOption:M,selectPreviousOption:j,resetSelectedOption:R,updateSelectedOptionIndex:F,listId:c.current,setListId:B,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:H}}const YJ={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},UL=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":Zt(n),"--combobox-option-padding":On(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:he(t),"--combobox-option-fz":Zt(n),"--combobox-option-padding":On(n,"combobox-option-padding")}}),xn=e=>{const n=be("Combobox",YJ,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:f,onClose:c,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:y,attributes:b,...w}=n,_=jm(),S=o||_,C=We({name:v||"Combobox",classes:nr,props:n,classNames:t,styles:i,unstyled:r,attributes:b,vars:l,varsResolver:UL}),T=()=>{c==null||c(),S.closeDropdown()};return k.jsx(BJ,{value:{getStyles:C,store:S,onOptionSubmit:f,size:h,resetSelectionOnOptionHover:p,readOnly:y},children:k.jsx(Vn,{opened:S.dropdownOpened,preventPositionChangeWhenVisible:!1,...w,onChange:A=>!A&&T(),withRoles:!1,unstyled:r,children:a})})},KJ=e=>e;xn.extend=KJ;xn.classes=nr;xn.varsResolver=UL;xn.displayName="@mantine/core/Combobox";xn.Target=HL;xn.Dropdown=F6;xn.Options=Y6;xn.Option=G6;xn.Search=K6;xn.Empty=q6;xn.Chevron=Q1;xn.Footer=U6;xn.Header=W6;xn.EventsTarget=FL;xn.DropdownTarget=BL;xn.Group=V6;xn.ClearButton=IL;xn.HiddenInput=qL;function XJ({children:e,role:n}){const t=O.use(vu);return t?k.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):k.jsx(k.Fragment,{children:e})}const X6=O.createContext(null),ZJ={hiddenInputValuesSeparator:","},Z6=L1((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:f,hiddenInputValuesSeparator:c,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=be("CheckboxGroup",ZJ,e),[y,b]=Ci({value:n,defaultValue:t,finalValue:[],onChange:i}),w=C=>{const T=typeof C=="string"?C:C.currentTarget.value;if(l)return;const A=y.includes(T);!A&&d&&y.length>=d||b(A?y.filter(M=>M!==T):[...y,T])},_=C=>{if(p)return!0;if(!d)return!1;const T=y.includes(C),A=y.length>=d;return!T&&A},S=y.join(c);return k.jsx(X6,{value:{value:y,onChange:w,size:r,isDisabled:_},children:k.jsxs(Pt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[k.jsx(XJ,{role:"group",children:o}),k.jsx("input",{type:"hidden",name:f,value:S,...h})]})})}));Z6.classes=Pt.Wrapper.classes;Z6.displayName="@mantine/core/CheckboxGroup";var VL={card:"m_26775b0a"};const WL=O.createContext(null),QJ={withBorder:!0},GL=(e,{radius:n})=>({card:{"--card-radius":Vt(n)}}),J1=je(e=>{const n=be("CheckboxCard",QJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:f,mod:c,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:y,attributes:b,...w}=n,_=We({name:"CheckboxCard",classes:VL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:GL,rootSelector:"card"}),S=O.use(X6),[C,T]=Ci({value:typeof f=="boolean"?f:S?S.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:y});return k.jsx(WL,{value:{checked:C},children:k.jsx(Si,{mod:[{"with-border":h,checked:C},c],..._("card"),...w,role:"checkbox","aria-checked":C,onClick:A=>{p==null||p(A),S==null||S.onChange(d||""),T(!C)}})})});J1.displayName="@mantine/core/CheckboxCard";J1.classes=VL;J1.varsResolver=GL;function Q6({size:e,style:n,...t}){return k.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:he(e),height:he(e),...n}:n,"aria-hidden":!0,...t,children:k.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function YL({indeterminate:e,...n}){return e?k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:k.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):k.jsx(Q6,{...n})}var KL={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const JJ={icon:YL,variant:"filled",radius:"sm"},XL=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=ns({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":On(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Vt(n),"--checkbox-color":a==="outline"?f:et(t,e),"--checkbox-icon-color":r?et(r,e):$1(o,e)?wm({color:t,theme:e,autoContrast:o}):void 0}}},ey=je(e=>{const n=be("CheckboxIndicator",JJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:f,indeterminate:c,radius:h,color:d,iconColor:p,autoContrast:v,checked:y,mod:b,variant:w,disabled:_,attributes:S,...C}=n,T=We({name:"CheckboxIndicator",classes:KL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:XL,rootSelector:"indicator"}),A=O.use(WL),M=typeof y=="boolean"||typeof c=="boolean"?y||c:(A==null?void 0:A.checked)||!1;return k.jsx(_e,{...T("indicator",{variant:w}),variant:w,mod:[{checked:M,disabled:_},b],...C,children:k.jsx(f,{indeterminate:c,...T("icon")})})});ey.displayName="@mantine/core/CheckboxIndicator";ey.classes=KL;ey.varsResolver=XL;var ZL={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const eee=ZL;function QL({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:f,id:c,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:y="div",labelElement:b="label",variant:w,style:_,vars:S,mod:C,attributes:T,...A}){const M=We({name:e,props:n,className:t,style:_,classes:ZL,classNames:i,styles:r,unstyled:a,attributes:T});return k.jsx(_e,{...M("root"),__vars:{"--label-fz":Zt(p),"--label-lh":On(p,"label-lh")},mod:[{"label-position":v},C],variant:w,size:p,...A,children:k.jsxs(_e,{component:y,htmlFor:y==="label"?c:void 0,...M("body"),children:[o,k.jsxs("div",{...M("labelWrapper"),"data-disabled":h||void 0,children:[l&&k.jsx(_e,{component:b,htmlFor:b==="label"?c:void 0,...M("label"),"data-disabled":h||void 0,children:l}),f&&k.jsx(Pt.Description,{size:p,__inheritStyles:!1,...M("description"),children:f}),d&&typeof d!="boolean"&&k.jsx(Pt.Error,{size:p,__inheritStyles:!1,...M("error"),children:d})]})]})})}QL.displayName="@mantine/core/InlineInput";var JL={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const nee={labelPosition:"right",icon:YL,withErrorStyles:!0,variant:"filled",radius:"sm"},eI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=ns({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":On(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Vt(n),"--checkbox-color":a==="outline"?f:et(t,e),"--checkbox-icon-color":r?et(r,e):$1(o,e)?wm({color:t,theme:e,autoContrast:o}):void 0}}},gu=je(e=>{var ue;const n=be("Checkbox",nee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,label:c,id:h,size:d,radius:p,wrapperProps:v,checked:y,labelPosition:b,description:w,error:_,disabled:S,variant:C,indeterminate:T,icon:A,rootRef:M,iconColor:j,onChange:N,autoContrast:F,mod:R,attributes:L,readOnly:B,onClick:G,withErrorStyles:H,ref:U,...P}=n,z=O.useRef(null),q=O.use(X6),Y=d||(q==null?void 0:q.size),D=We({name:"Checkbox",props:n,classes:JL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:eI}),{styleProps:V,rest:W}=hu(P),$=Gi(h),X={checked:(q==null?void 0:q.value.includes(W.value))??y,onChange:ye=>{q==null||q.onChange(ye),N==null||N(ye)}},ee=((ue=q==null?void 0:q.isDisabled)==null?void 0:ue.call(q,W.value))??!1,oe=S||ee;return O.useEffect(()=>{z.current&&(z.current.indeterminate=T||!1,T?z.current.setAttribute("data-indeterminate","true"):z.current.removeAttribute("data-indeterminate"))},[T]),k.jsx(QL,{...D("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:$,size:Y,labelPosition:b,label:c,description:w,error:_,disabled:oe,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||y||void 0,variant:C,ref:M,mod:R,attributes:L,inert:W.inert,...V,...v,children:k.jsxs(_e,{...D("inner"),mod:{"data-label-position":b},children:[k.jsx(_e,{component:"input",id:$,ref:Nt(z,U),mod:{error:!!_},...D("input",{focusable:!0,variant:C}),...W,...X,disabled:oe,inert:W.inert,type:"checkbox",onClick:ye=>{B&&ye.preventDefault(),G==null||G(ye)}}),k.jsx(A,{indeterminate:T,...D("icon")})]})})});gu.classes={...JL,...eee};gu.varsResolver=eI;gu.displayName="@mantine/core/Checkbox";gu.Group=Z6;gu.Indicator=ey;gu.Card=J1;function tu(e){return"group"in e}function nI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function tI(e,n=new Set){if(Array.isArray(e))for(const t of e)if(tu(t))tI(t.items,n);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(n.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);n.add(t.value)}}function iee(e,n){return Array.isArray(e)?e.includes(n):e===n}function iI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!tu(e)){const f=iee(i,e.value),c=n&&(f?k.jsx(Q6,{className:nr.optionsDropdownCheckIcon}):t?k.jsx("div",{className:nr.optionsDropdownCheckPlaceholder}):null),h=k.jsxs(k.Fragment,{children:[r==="left"&&c,k.jsx("span",{children:e.label}),r==="right"&&c]});return k.jsx(xn.Option,{value:e.value,disabled:e.disabled,className:sn({[nr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":f||void 0,"aria-selected":f,active:f,children:typeof o=="function"?o({option:e,checked:f}):h})}const l=e.items.map(f=>k.jsx(iI,{data:f,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${f.value}`));return k.jsx(xn.Group,{label:e.group,children:l})}function ny({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:f=!0,withCheckIcon:c=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:y,labelId:b,renderOption:w,scrollAreaProps:_,"aria-label":S}){tI(e);const C=typeof r=="string"?(i||nI)({options:e,search:f?r:"",limit:a??1/0}):e,T=tee(C),A=C.map(M=>k.jsx(iI,{data:M,withCheckIcon:c,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:y,renderOption:w},tu(M)?M.group:`${M.value}`));return k.jsx(xn.Dropdown,{hidden:n||t&&T,"data-composed":!0,children:k.jsxs(xn.Options,{labelledBy:b,"aria-label":S,children:[l?k.jsx(lo.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:A}):A,T&&v&&k.jsx(xn.Empty,{children:v})]})})}const ty=je(e=>{const n=be("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:y,value:b,defaultValue:w,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:T,readOnly:A,disabled:M,filter:j,limit:N,withScrollArea:F,maxDropdownHeight:R,size:L,id:B,renderOption:G,autoComplete:H,scrollAreaProps:U,onClear:P,clearButtonProps:z,error:q,clearable:Y,clearSectionMode:D,rightSection:V,autoSelectOnBlur:W,openOnFocus:$=!0,attributes:X,...ee}=n,oe=Gi(B),ue=Z1(y),ye=Mm(ue),[ae,le]=Ci({value:b,defaultValue:w,finalValue:"",onChange:v}),Se=jm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),S&&Se.selectFirstOption()},onDropdownClose:()=>{f==null||f(),setTimeout(Se.resetSelectedOption,0)}}),ne=De=>{le(De),Se.resetSelectedOption()},{resolvedClassNames:$e,resolvedStyles:ve}=Ni({props:n,styles:i,classNames:t});O.useEffect(()=>{_&&Se.selectFirstOption()},[_,ae]);const xe=k.jsx(xn.ClearButton,{...z,onClear:()=>{ne(""),P==null||P()}});return k.jsxs(xn,{store:Se,__staticSelector:"Autocomplete",classNames:$e,styles:ve,unstyled:r,readOnly:A,size:L,attributes:X,keepMounted:W,onOptionSubmit:De=>{C==null||C(De),ne(ye[De].label),Se.closeDropdown()},...T,children:[k.jsx(xn.Target,{autoComplete:H,withExpandedAttribute:!0,children:k.jsx(zi,{...ee,size:L,__staticSelector:"Autocomplete",__clearSection:xe,__clearable:Y&&!!ae&&!M&&!A,__clearSectionMode:D,rightSection:V,disabled:M,readOnly:A,value:ae,error:q,onChange:De=>{ne(De.currentTarget.value),Se.openDropdown(),_&&Se.selectFirstOption()},onFocus:De=>{$&&Se.openDropdown(),h==null||h(De)},onBlur:De=>{W&&Se.clickSelectedOption(),Se.closeDropdown(),d==null||d(De)},onClick:De=>{Se.openDropdown(),p==null||p(De)},classNames:$e,styles:ve,unstyled:r,attributes:X,id:oe})}),k.jsx(ny,{data:ue,hidden:A||M,filter:j,search:ae,limit:N,hiddenWhenEmpty:!0,withScrollArea:F,maxDropdownHeight:R,unstyled:r,labelId:ee.label?`${oe}-label`:void 0,"aria-label":ee.label?void 0:ee["aria-label"],renderOption:G,scrollAreaProps:U})]})});ty.classes={...zi.classes,...xn.classes};ty.displayName="@mantine/core/Autocomplete";var iy={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const rI=O.createContext({withinGroup:!1}),aI=(e,{spacing:n})=>({group:{"--ag-spacing":Ft(n)}}),ry=je(e=>{const n=be("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:f,attributes:c,...h}=n;return k.jsx(rI,{value:{withinGroup:!0},children:k.jsx(_e,{...We({name:"AvatarGroup",classes:iy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:aI,rootSelector:"group"})("group"),...h})})});ry.classes=iy;ry.varsResolver=aI;ry.displayName="@mantine/core/AvatarGroup";function ree(e){return k.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:k.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function aee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const oI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:f})=>{const c=a==="initials"&&typeof l=="string"?see(l,f):a,h=e.variantColorResolver({color:c||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":On(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Vt(t),"--avatar-bg":c||i?h.background:void 0,"--avatar-color":c||i?h.color:void 0,"--avatar-bd":c||i?h.border:void 0}}},iu=$i(e=>{const n=be("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:f,alt:c,radius:h,color:d,gradient:p,imageProps:v,children:y,autoContrast:b,mod:w,name:_,allowedInitialsColors:S,attributes:C,...T}=n,A=O.use(rI),[M,j]=O.useState(!f),N=We({name:"Avatar",props:n,classes:iy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:oI});return O.useEffect(()=>j(!f),[f]),k.jsx(_e,{...N("root"),mod:[{"within-group":A.withinGroup},w],...T,children:M||!f?k.jsx("span",{...N("placeholder"),title:c,children:y||typeof _=="string"&&lee(_)||k.jsx(ree,{})}):k.jsx("img",{...v,...N("image"),src:f,alt:c,onError:F=>{var R;j(!0),(R=v==null?void 0:v.onError)==null||R.call(v,F)}})})});iu.classes=iy;iu.varsResolver=oI;iu.displayName="@mantine/core/Avatar";iu.Group=ry;var sI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const lI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":On(a,"badge-height"),"--badge-padding-x":On(a,"badge-padding-x"),"--badge-fz":On(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Vt(n),"--badge-bg":t||r?f.background:void 0,"--badge-color":t||r?f.color:void 0,"--badge-bd":t||r?f.border:void 0,"--badge-dot-color":r==="dot"?et(t,e):void 0}}},gi=$i(e=>{const n=be("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,gradient:h,leftSection:d,rightSection:p,children:v,variant:y,fullWidth:b,autoContrast:w,circle:_,mod:S,attributes:C,...T}=n,A=We({name:"Badge",props:n,classes:sI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:lI});return k.jsxs(_e,{variant:y,mod:[{block:b,circle:_,"with-right-section":!!p,"with-left-section":!!d},S],...A("root",{variant:y}),...T,children:[d&&k.jsx("span",{...A("section"),"data-position":"left",children:d}),k.jsx("span",{...A("label"),children:v}),p&&k.jsx("span",{...A("section"),"data-position":"right",children:p})]})});gi.classes=sI;gi.varsResolver=lI;gi.displayName="@mantine/core/Badge";var bc={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const L5={orientation:"horizontal"},uI=(e,{borderWidth:n})=>({group:{"--button-border-width":he(n)}}),ay=je(e=>{const n=be("ButtonGroup",L5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,mod:h,attributes:d,...p}=be("ButtonGroup",L5,e);return k.jsx(_e,{...We({name:"ButtonGroup",props:n,classes:bc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:f,varsResolver:uI,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});ay.classes=bc;ay.varsResolver=uI;ay.displayName="@mantine/core/ButtonGroup";const fI=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":On(o,"section-height"),"--section-padding-x":On(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?Zt(o.replace("compact-","")):Zt(o),"--section-radius":n===void 0?void 0:Vt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},oy=je(e=>{const n=be("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:f,radius:c,autoContrast:h,attributes:d,...p}=n;return k.jsx(_e,{...We({name:"ButtonGroupSection",props:n,classes:bc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:fI,rootSelector:"groupSection"})("groupSection"),...p})});oy.classes=bc;oy.varsResolver=fI;oy.displayName="@mantine/core/ButtonGroupSection";const uee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${he(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},cI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":On(a,"button-height"),"--button-padding-x":On(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?Zt(a.replace("compact-","")):Zt(a),"--button-radius":n===void 0?void 0:Vt(n),"--button-bg":t||r?f.background:void 0,"--button-hover":t||r?f.hover:void 0,"--button-color":f.color,"--button-bd":t||r?f.border:void 0,"--button-hover-color":t||r?f.hoverColor:void 0}}},Bt=$i(e=>{const n=be("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:f,rightSection:c,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:y,gradient:b,classNames:w,styles:_,unstyled:S,"data-disabled":C,autoContrast:T,mod:A,attributes:M,...j}=n,N=We({name:"Button",props:n,classes:bc,className:r,style:t,classNames:w,styles:_,unstyled:S,attributes:M,vars:i,varsResolver:cI}),F=!!f,R=!!c;return k.jsxs(Si,{...N("root",{active:!o&&!v&&!C}),unstyled:S,variant:d,disabled:o||v,mod:[{disabled:o||C,loading:v,block:h,"with-left-section":F,"with-right-section":R},A],...j,children:[typeof v=="boolean"&&k.jsx(Yo,{mounted:v,transition:uee,duration:150,children:L=>k.jsx(_e,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:k.jsx(tr,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...y})})}),k.jsxs("span",{...N("inner"),children:[f&&k.jsx(_e,{component:"span",...N("section"),mod:{position:"left"},children:f}),k.jsx(_e,{component:"span",mod:{loading:v},...N("label"),children:l}),c&&k.jsx(_e,{component:"span",...N("section"),mod:{position:"right"},children:c})]})]})});Bt.classes=bc;Bt.varsResolver=cI;Bt.displayName="@mantine/core/Button";Bt.Group=ay;Bt.GroupSection=oy;var dI={root:"m_4451eb3a"};const wc=$i(e=>{const n=be("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:f,mod:c,attributes:h,...d}=n,p=We({name:"Center",props:n,classes:dI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return k.jsx(_e,{mod:[{inline:f},c],...p("root"),...d})});wc.classes=dI;wc.displayName="@mantine/core/Center";var hI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const I5={withShadow:!0},mI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Vt(n),"--cs-size":he(t)}}),kc=$i(e=>{const n=be("ColorSwatch",I5,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,radius:c,withShadow:h,children:d,attributes:p,...v}=be("ColorSwatch",I5,n),y=We({name:"ColorSwatch",props:n,classes:hI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:mI});return k.jsxs(_e,{...y("root",{focusable:!0}),...v,children:[k.jsx("span",{...y("alphaOverlay")}),h&&k.jsx("span",{...y("shadowOverlay")}),k.jsx("span",{...y("colorOverlay",{style:{backgroundColor:f}})}),k.jsx("span",{...y("childrenOverlay"),children:d})]})});kc.classes=hI;kc.varsResolver=mI;kc.displayName="@mantine/core/ColorSwatch";function ra(e,n=0,t=10**n){return Math.round(t*e)/t}function fee({h:e,s:n,l:t,a:i}){const r=n*((t<50?t:100-t)/100);return{h:e,s:r>0?2*r/(t+r)*100:0,v:t+r,a:i}}const cee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function dee(e,n="deg"){return Number(e)*(cee[n]||1)}const hee=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function B5(e){const n=hee.exec(e);return n?fee({h:dee(n[1],n[2]),s:Number(n[3]),l:Number(n[4]),a:n[5]===void 0?1:Number(n[5])/(n[6]?100:1)}):{h:0,s:0,v:0,a:1}}function iS({r:e,g:n,b:t,a:i}){const r=Math.max(e,n,t),a=r-Math.min(e,n,t),o=a?r===e?(n-t)/a:r===n?2+(t-e)/a:4+(e-n)/a:0;return{h:ra(60*(o<0?o+6:o),3),s:ra(r?a/r*100:0,3),v:ra(r/255*100,3),a:i}}function rS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?iS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):iS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function mee(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ra(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...rS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...rS(i),a:r}}const pee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function F5(e){const n=pee.exec(e);return n?iS({r:Number(n[1])/(n[2]?100/255:1),g:Number(n[3])/(n[4]?100/255:1),b:Number(n[5])/(n[6]?100/255:1),a:n[7]===void 0?1:Number(n[7])/(n[8]?100:1)}):{h:0,s:0,v:0,a:1}}const pI={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},vee={hex:rS,hexa:mee,rgb:F5,rgba:F5,hsl:B5,hsla:B5};function gee(e){for(const[,n]of Object.entries(pI))if(n.test(e))return!0;return!1}function yv(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const n=e.trim();for(const[t,i]of Object.entries(pI))if(i.test(n))return vee[t](n);return{h:0,s:0,v:0,a:1}}const sy=O.createContext(null);function J6({position:e,...n}){return k.jsx(_e,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}J6.displayName="@mantine/core/ColorPickerThumb";var ly={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const _c=je(e=>{var q;const n=be("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:f,onChangeEnd:c,maxValue:h,round:d,size:p="md",focusable:v=!0,value:y,overlays:b,thumbColor:w="transparent",onScrubStart:_,onScrubEnd:S,__staticSelector:C="ColorPicker",attributes:T,ref:A,...M}=n,j=We({name:C,classes:ly,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,rootSelector:"slider"}),N=((q=O.use(sy))==null?void 0:q.getStyles)||j,F=ti(),[R,L]=O.useState({y:0,x:y/h}),B=O.useRef(R),G=Y=>d?Math.round(Y*h):Y*h,{ref:H}=G$(({x:Y,y:D})=>{B.current={x:Y,y:D},f==null||f(G(Y))},{onScrubEnd:()=>{const{x:Y}=B.current;c==null||c(G(Y)),S==null||S()},onScrubStart:_});Wo(()=>{L({y:0,x:y/h})},[y]);const U=(Y,D)=>{Y.preventDefault();const V=W$(D);f==null||f(G(V.x)),c==null||c(G(V.x))},P=Y=>{switch(Y.key){case"ArrowRight":U(Y,{x:R.x+.05,y:R.y});break;case"ArrowLeft":U(Y,{x:R.x-.05,y:R.y});break}},z=b.map((Y,D)=>O.createElement("div",{...N("sliderOverlay"),style:Y,key:D}));return k.jsxs(_e,{...M,ref:Nt(H,A),...N("slider"),size:p,role:"slider","aria-valuenow":y,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:P,"data-focus-ring":F.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[z,k.jsx(J6,{position:R,...N("thumb",{style:{top:he(1),background:w}})})]})});_c.displayName="@mantine/core/ColorSlider";_c.classes=ly;const yee={__staticSelector:"AlphaSlider"},eC=je(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("AlphaSlider",yee,e);return k.jsx(_c,{...a,value:n,onChange:o=>t==null?void 0:t(ra(o,2)),onChangeEnd:o=>i==null?void 0:i(ra(o,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${he(8)} ${he(8)}`,backgroundPosition:`0 0, 0 ${he(4)}, ${he(4)} ${he(-4)}, ${he(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${he(1)} inset, rgb(0, 0, 0, .15) 0 0 ${he(4)} inset`}]})});eC.displayName="@mantine/core/AlphaSlider";eC.classes=_c.classes;function vI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),f=o*(1-a),c=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ra([o,c,f,f,h,o][d]*255),g:ra([h,o,o,c,f,f][d]*255),b:ra([f,f,h,o,o,c][d]*255),a:ra(i,2)}}function q5(e,n){const{r:t,g:i,b:r,a}=vI(e);return n?`rgba(${t}, ${i}, ${r}, ${ra(a,2)})`:`rgb(${t}, ${i}, ${r})`}function H5({h:e,s:n,v:t,a:i},r){const a=(200-n)*t/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?n*t/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return r?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${ra(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function Xv(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function gI(e){const{r:n,g:t,b:i}=vI(e);return`#${Xv(n)}${Xv(t)}${Xv(i)}`}function bee(e){const n=Math.round(e.a*255);return`${gI(e)}${Xv(n)}`}const rk={hex:gI,hexa:e=>bee(e),rgb:e=>q5(e,!1),rgba:e=>q5(e,!0),hsl:e=>H5(e,!1),hsla:e=>H5(e,!0)};function zs(e,n){return n?e in rk?rk[e](n):rk.hex(n):"#000000"}const wee={__staticSelector:"HueSlider"},nC=je(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("HueSlider",wee,e);return k.jsx(_c,{...a,value:n,onChange:t,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${he(1)} inset, rgb(0, 0, 0, .15) 0 0 ${he(4)} inset`}]})});nC.displayName="@mantine/core/HueSlider";nC.classes=_c.classes;function yI({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:f,onScrubEnd:c,...h}){const{getStyles:d}=O.use(sy),[p,v]=O.useState({x:i.s/100,y:1-i.v/100}),y=O.useRef(p),{ref:b}=G$(({x:S,y:C})=>{y.current={x:S,y:C},n({s:Math.round(S*100),v:Math.round((1-C)*100)})},{onScrubEnd:()=>{const{x:S,y:C}=y.current;t({s:Math.round(S*100),v:Math.round((1-C)*100)}),c==null||c()},onScrubStart:f});O.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const w=(S,C)=>{S.preventDefault();const T=W$(C);n({s:Math.round(T.x*100),v:Math.round((1-T.y)*100)}),t({s:Math.round(T.x*100),v:Math.round((1-T.y)*100)})},_=S=>{switch(S.key){case"ArrowUp":w(S,{y:p.y-.05,x:p.x});break;case"ArrowDown":w(S,{y:p.y+.05,x:p.x});break;case"ArrowRight":w(S,{x:p.x+.05,y:p.y});break;case"ArrowLeft":w(S,{x:p.x-.05,y:p.y});break}};return k.jsxs(_e,{...d("saturation"),ref:b,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":zs("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[k.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),k.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),k.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),k.jsx(J6,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}yI.displayName="@mantine/core/Saturation";function bI({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:f,...c}){const h=O.use(sy),d=o.map((p,v)=>O.createElement(kc,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},f===p&&k.jsx(Q6,{size:"35%",color:Z$(p)<.5?"white":"black"})));return k.jsx(_e,{...h.getStyles("swatches"),...c,children:d})}bI.displayName="@mantine/core/Swatches";const kee={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},wI=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":On(n,"cp-preview-size"),"--cp-width":On(n,"cp-width"),"--cp-body-spacing":Ft(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":On(n,"cp-thumb-size"),"--cp-saturation-height":On(n,"cp-saturation-height")}}),uy=je(e=>{const n=be("ColorPicker",kee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:f="hex",value:c,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:y,saturationLabel:b,hueLabel:w,alphaLabel:_,focusable:S,swatches:C,swatchesPerRow:T,fullWidth:A,onColorSwatchClick:M,__staticSelector:j,mod:N,attributes:F,name:R,hiddenInputProps:L,...B}=n,G=We({name:j,props:n,classes:ly,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:F,rootSelector:"wrapper",vars:l,varsResolver:wI}),H=O.useRef(f||"hex"),U=O.useRef(""),P=O.useRef(-1),z=O.useRef(!1),q=f==="hexa"||f==="rgba"||f==="hsla",[Y,D,V]=Ci({value:c,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[W,$]=O.useState(yv(Y)),X=()=>{window.clearTimeout(P.current),z.current=!0},ee=()=>{window.clearTimeout(P.current),P.current=window.setTimeout(()=>{z.current=!1},200)},oe=ue=>{$(ye=>{const ae={...ye,...ue};return U.current=zs(H.current,ae),ae}),D(U.current)};return Wo(()=>{typeof c=="string"&&gee(c)&&!z.current&&$(yv(c))},[c]),Wo(()=>{H.current=f||"hex",D(zs(H.current,W))},[f]),k.jsx(sy,{value:{getStyles:G,unstyled:o},children:k.jsxs(_e,{...G("wrapper"),size:y,mod:[{"full-width":A},N],...B,children:[R&&k.jsx("input",{type:"hidden",name:R,value:Y,...L}),v&&k.jsxs(k.Fragment,{children:[k.jsx(yI,{value:W,onChange:oe,onChangeEnd:({s:ue,v:ye})=>p==null?void 0:p(zs(H.current,{...W,s:ue,v:ye})),color:Y,size:y,focusable:S,saturationLabel:b,onScrubStart:X,onScrubEnd:ee}),k.jsxs("div",{...G("body"),children:[k.jsxs("div",{...G("sliders"),children:[k.jsx(nC,{value:W.h,onChange:ue=>oe({h:ue}),onChangeEnd:ue=>p==null?void 0:p(zs(H.current,{...W,h:ue})),size:y,focusable:S,"aria-label":w,onScrubStart:X,onScrubEnd:ee}),q&&k.jsx(eC,{value:W.a,onChange:ue=>oe({a:ue}),onChangeEnd:ue=>{p==null||p(zs(H.current,{...W,a:ue}))},size:y,color:zs("hex",W),focusable:S,"aria-label":_,onScrubStart:X,onScrubEnd:ee})]}),q&&k.jsx(kc,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(C)&&k.jsx(bI,{data:C,swatchesPerRow:T,focusable:S,setValue:D,value:Y,onChangeEnd:ue=>{const ye=zs(f,yv(ue));M==null||M(ye),p==null||p(ye),V||$(yv(ue))}})]})})});uy.classes=ly;uy.varsResolver=wI;uy.displayName="@mantine/core/ColorPicker";var kI={root:"m_3eebeb36",label:"m_9e365f20"};const _ee={orientation:"horizontal"},_I=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?et(n,e):void 0,"--divider-border-style":t,"--divider-size":On(i,"divider-size")}}),fy=je(e=>{const n=be("Divider",_ee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,orientation:c,label:h,labelPosition:d,mod:p,attributes:v,...y}=n,b=We({name:"Divider",classes:kI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:_I});return k.jsx(_e,{mod:[{orientation:c,withLabel:!!h},p],role:"separator",...b("root"),...y,children:h&&k.jsx(_e,{component:"span",mod:{position:d},...b("label"),children:h})})});fy.classes=kI;fy.varsResolver=_I;fy.displayName="@mantine/core/Divider";const[U5,xI]=fa("Grid component was not found in tree"),aS=(e,n)=>{if(e==="content")return"auto";if(e==="auto")return"0rem";if(e)return e===n?"100%":`calc(${100*e/n}% - ${(n-e)/n} * var(--grid-column-gap))`},V5=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":aS(e,n),W5=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},G5=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function xee({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=ti(),o=xI(),l=o.breakpoints||a.breakpoints,f=Pr(e),c=f===void 0?12:f,h=cu({"--col-order":(v=Pr(n))==null?void 0:v.toString(),"--col-flex-grow":W5(c,o.grow),"--col-flex-basis":aS(c,o.columns),"--col-width":c==="content"?"auto":void 0,"--col-max-width":V5(c,o.columns,o.grow),"--col-offset":G5(Pr(t),o.columns),"--col-align-self":Pr(i)}),d=xt(l).reduce((y,b)=>{var w;return y[b]||(y[b]={}),typeof n=="object"&&n[b]!==void 0&&(y[b]["--col-order"]=(w=n[b])==null?void 0:w.toString()),typeof e=="object"&&e[b]!==void 0&&(y[b]["--col-flex-grow"]=W5(e[b],o.grow),y[b]["--col-flex-basis"]=aS(e[b],o.columns),y[b]["--col-width"]=e[b]==="content"?"auto":void 0,y[b]["--col-max-width"]=V5(e[b],o.columns,o.grow)),typeof t=="object"&&t[b]!==void 0&&(y[b]["--col-offset"]=G5(t[b],o.columns)),typeof i=="object"&&i[b]!==void 0&&(y[b]["--col-align-self"]=i[b]),y},{}),p=xh(xt(d),l).filter(y=>xt(d[y.value]).length>0).map(y=>({query:o.type==="container"?`mantine-grid (min-width: ${l[y.value]})`:`(min-width: ${l[y.value]})`,styles:d[y.value]}));return k.jsx(mc,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var tC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const See={span:12},iC=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:f,align:c,...h}=be("GridCol",See,e),d=xI(),p=z1();return k.jsxs(k.Fragment,{children:[k.jsx(xee,{selector:`.${p}`,span:o,order:l,offset:f,align:c}),k.jsx(_e,{...d.getStyles("col",{className:sn(t,p),style:i,classNames:n,styles:r}),...h})]})});iC.classes=tC;iC.displayName="@mantine/core/GridCol";function Y5({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ti(),l=r||o.breakpoints,f=cu({"--grid-gap":Ft(Pr(e)),"--grid-row-gap":Ft(Pr(n)),"--grid-column-gap":Ft(Pr(t))}),c=xt(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Ft(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Ft(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Ft(t[p])),d),{}),h=xh(xt(c),l).filter(d=>xt(c[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:c[d.value]}));return k.jsx(mc,{styles:f,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const Cee={gap:"md",columns:12},SI=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),jr=je(e=>{const n=be("Grid",Cee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:f,gap:c,rowGap:h,columnGap:d,columns:p,align:v,justify:y,children:b,breakpoints:w,type:_,attributes:S,...C}=n,T=We({name:"Grid",classes:tC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:SI}),A=z1();return _==="container"&&w?k.jsxs(U5,{value:{getStyles:T,grow:f,columns:p,breakpoints:w,type:_},children:[k.jsx(Y5,{selector:`.${A}`,...n}),k.jsx("div",{...T("container"),children:k.jsx(_e,{...T("root",{className:A}),...C,children:k.jsx("div",{...T("inner"),children:b})})})]}):k.jsxs(U5,{value:{getStyles:T,grow:f,columns:p,breakpoints:w,type:_},children:[k.jsx(Y5,{selector:`.${A}`,...n}),k.jsx(_e,{...T("root",{className:A}),...C,children:k.jsx("div",{...T("inner"),children:b})})]})});jr.classes=tC;jr.varsResolver=SI;jr.displayName="@mantine/core/Grid";jr.Col=iC;const Aee=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],K5={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function X5(e){Object.keys(K5).forEach(n=>{e.style.setProperty(n,K5[n],"important")})}function Oee(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of Aee)t[i]=n[i];return t.boxSizing===""?null:{sizingStyle:t,paddingSize:parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),borderSize:parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth)}}let ki=null;function Eee(e,n,t=1,i=1/0){ki||(ki=document.createElement("textarea"),ki.setAttribute("tabindex","-1"),ki.setAttribute("aria-hidden","true"),ki.setAttribute("aria-label","autosize measurement"),X5(ki)),ki.parentNode===null&&document.body.appendChild(ki);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{ki.style[p]=o[p]}),X5(ki),ki.value=n;let f=l==="border-box"?ki.scrollHeight+a:ki.scrollHeight-r;ki.value=n,f=l==="border-box"?ki.scrollHeight+a:ki.scrollHeight-r,ki.value="x";const c=ki.scrollHeight-r;let h=c*t;l==="border-box"&&(h=h+r+a),f=Math.max(h,f);let d=c*i;return l==="border-box"&&(d=d+r+a),f=Math.min(d,f),[f,c]}function Tee({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=O.useRef(null),l=Nt(o,i),f=O.useRef(0),c=()=>{const d=o.current;if(!d)return;const p=Oee(d);if(!p)return;const[v]=Eee(p,d.value||d.placeholder||"x",n,e);f.current!==v&&(f.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||c(),t==null||t(d)};return O.useLayoutEffect(c),O.useEffect(()=>{const d=()=>c();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),O.useEffect(()=>{const d=()=>c();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),O.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const y=o.current.value;requestAnimationFrame(()=>{o.current&&y!==o.current.value&&c()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),k.jsx("textarea",{...r,onChange:h,ref:l})}const Mee={size:"sm"},Oh=je(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=be("Textarea",Mee,e),l=n&&oK()!=="test",f=l?{maxRows:t,minRows:i}:{};return k.jsx(zi,{component:l?Tee:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});Oh.classes=zi.classes;Oh.displayName="@mantine/core/Textarea";const[jee,rl]=fa("Menu component was not found in the tree");var al={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const rC=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuDivider",null,e);return k.jsx(_e,{...rl().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});rC.classes=al;rC.displayName="@mantine/core/MenuDivider";const aC=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=be("MenuDropdown",null,e),p=O.useRef(null),v=rl(),y=hr(f,_=>{var S,C;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(C=(S=p.current)==null?void 0:S.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||C.focus())}),b=hr(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),w=hr(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return k.jsxs(Vn.Dropdown,{...d,onMouseEnter:b,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:Nt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:y,children:[v.withInitialFocusPlaceholder&&k.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),c]})});aC.classes=al;aC.displayName="@mantine/core/MenuDropdown";const Eh=O.createContext(null),oC=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:f,rightSection:c,children:h,disabled:d,"data-disabled":p,ref:v,...y}=be("MenuItem",null,e),b=rl(),w=O.use(Eh),_=ti(),{dir:S}=mu(),C=O.useRef(null),T=y,A=hr(T.onClick,()=>{p||(typeof l=="boolean"?l&&b.closeDropdownImmediately():b.closeOnItemClick&&b.closeDropdownImmediately())}),M=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,j=o?ns({color:o,theme:_}):null,N=hr(T.onKeyDown,F=>{F.key==="ArrowLeft"&&w&&(w.close(),w.focusParentItem())});return k.jsxs(Si,{onMouseDown:F=>F.preventDefault(),...y,unstyled:b.unstyled,tabIndex:b.menuItemTabIndex,...b.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Nt(C,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:A,onKeyDown:s6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:b.loop,dir:S,orientation:"vertical",onKeyDown:N}),__vars:{"--menu-item-color":j!=null&&j.isThemeColor&&(j==null?void 0:j.shade)===void 0?`var(--mantine-color-${j.color}-6)`:M==null?void 0:M.color,"--menu-item-hover":M==null?void 0:M.hover},children:[f&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:f}),h&&k.jsx("div",{...b.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),c&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c})]})});oC.classes=al;oC.displayName="@mantine/core/MenuItem";const sC=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuLabel",null,e);return k.jsx(_e,{...rl().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});sC.classes=al;sC.displayName="@mantine/core/MenuLabel";const lC=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=be("MenuSubDropdown",null,e),p=O.useRef(null),v=rl(),y=O.use(Eh),b=hr(o,y==null?void 0:y.open),w=hr(l,y==null?void 0:y.close);return k.jsx(Vn.Dropdown,{...d,onMouseEnter:b,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:Nt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:c})});lC.classes=al;lC.displayName="@mantine/core/MenuSubDropdown";const uC=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:f,children:c,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...y}=be("MenuSubItem",null,e),b=rl(),w=O.use(Eh),_=ti(),{dir:S}=mu(),C=O.useRef(null),T=y,A=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?ns({color:o,theme:_}):null,j=hr(T.onKeyDown,L=>{L.key==="ArrowRight"&&(w==null||w.open(),w==null||w.focusFirstItem()),L.key==="ArrowLeft"&&(w!=null&&w.parentContext)&&(w.parentContext.close(),w.parentContext.focusParentItem())}),N=hr(T.onClick,()=>{!d&&p&&b.closeDropdownImmediately()}),F=hr(T.onMouseEnter,w==null?void 0:w.open),R=hr(T.onMouseLeave,w==null?void 0:w.close);return k.jsxs(Si,{onMouseDown:L=>L.preventDefault(),...y,unstyled:b.unstyled,tabIndex:b.menuItemTabIndex,...b.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Nt(C,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:F,onMouseLeave:R,onClick:N,onKeyDown:s6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:b.loop,dir:S,orientation:"vertical",onKeyDown:j}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:A==null?void 0:A.color,"--menu-item-hover":A==null?void 0:A.hover},children:[l&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),c&&k.jsx("div",{...b.getStyles("itemLabel",{styles:r,classNames:n}),children:c}),k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f||k.jsx(pg,{...b.getStyles("chevron"),size:14})})]})});uC.classes=al;uC.displayName="@mantine/core/MenuSubItem";function CI({children:e,refProp:n}){if(!o6(e))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return rl(),k.jsx(Vn.Target,{refProp:n,popupType:"menu",children:e})}CI.displayName="@mantine/core/MenuSubTarget";const Dee={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function xc(e){const{children:n,closeDelay:t,openDelay:i,...r}=be("MenuSub",Dee,e),a=Gi(),[o,{open:l,close:f}]=Y$(!1),c=O.use(Eh),{openDropdown:h,closeDropdown:d}=Hz({open:l,close:f,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var y,b;(b=(y=document.getElementById(`${a}-dropdown`))==null?void 0:y.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||b.focus()},16),v=()=>window.setTimeout(()=>{var y;(y=document.getElementById(`${a}-target`))==null||y.focus()},16);return k.jsx(Eh,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:c},children:k.jsx(Vn,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}xc.extend=e=>e;xc.displayName="@mantine/core/MenuSub";xc.Target=CI;xc.Dropdown=lC;xc.Item=uC;const Ree={refProp:"ref"};function AI(e){const{children:n,refProp:t,...i}=be("MenuTarget",Ree,e),r=du(n);if(!r)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=rl(),o=r.props,l=hr(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),f=hr(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),c=hr(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return k.jsx(Vn.Target,{refProp:t,popupType:"menu",...i,children:O.cloneElement(r,{onClick:l,onMouseEnter:f,onMouseLeave:c,"data-expanded":a.opened?!0:void 0})})}AI.displayName="@mantine/core/MenuTarget";const Pee={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Zn=je(e=>{const n=be("Menu",Pee,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:f,closeOnItemClick:c,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:y,classNames:b,styles:w,unstyled:_,variant:S,vars:C,menuItemTabIndex:T,keepMounted:A,withInitialFocusPlaceholder:M,attributes:j,...N}=n,F=We({name:"Menu",classes:al,props:n,classNames:b,styles:w,unstyled:_,attributes:j}),[R,L]=Ci({value:a,defaultValue:o,finalValue:!1,onChange:f}),[B,G]=O.useState(!1),H=()=>{L(!1),G(!1),R&&(r==null||r())},U=()=>{L(!0),!R&&(i==null||i())},P=()=>{R?H():U()},{openDropdown:z,closeDropdown:q}=Hz({open:U,close:H,closeDelay:y,openDelay:v}),Y=W=>FY("[data-menu-item]","[data-menu-dropdown]",W),{resolvedClassNames:D,resolvedStyles:V}=Ni({classNames:b,styles:w,props:n});return k.jsx(jee,{value:{getStyles:F,opened:R,toggleDropdown:P,getItemIndex:Y,openedViaClick:B,setOpenedViaClick:G,closeOnItemClick:c,closeDropdown:p==="click"?H:q,openDropdown:p==="click"?U:z,closeDropdownImmediately:H,loop:h,trigger:p,unstyled:_,menuItemTabIndex:T,withInitialFocusPlaceholder:M},children:k.jsx(Vn,{returnFocus:!0,...N,opened:R,onChange:P,defaultOpened:o,trapFocus:A?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:D,styles:V,unstyled:_,variant:S,keepMounted:A,children:t})})});Zn.displayName="@mantine/core/Menu";Zn.classes=al;Zn.Item=oC;Zn.Label=sC;Zn.Dropdown=aC;Zn.Target=AI;Zn.Divider=rC;Zn.Sub=xc;const[Nee,Sc]=fa("Modal component was not found in tree");var is={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const cy=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalBody",null,e);return k.jsx(bL,{...Sc().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});cy.classes=is;cy.displayName="@mantine/core/ModalBody";const dy=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalCloseButton",null,e);return k.jsx(wL,{...Sc().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});dy.classes=is;dy.displayName="@mantine/core/ModalCloseButton";const hy=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...f}=be("ModalContent",null,e),c=Sc(),h=c.scrollAreaComponent||yJ;return k.jsx(kL,{...c.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:c.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":c.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...f,children:k.jsx(h,{style:{maxHeight:c.fullScreen?"100dvh":`calc(100dvh - (${he(c.yOffset)} * 2))`},children:o})})});hy.classes=is;hy.displayName="@mantine/core/ModalContent";const my=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalHeader",null,e);return k.jsx(_L,{...Sc().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});my.classes=is;my.displayName="@mantine/core/ModalHeader";const py=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalOverlay",null,e);return k.jsx(xL,{...Sc().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});py.classes=is;py.displayName="@mantine/core/ModalOverlay";const $ee={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ca("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},OI=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Vt(n),"--modal-size":On(t,"modal-size"),"--modal-y-offset":he(i),"--modal-x-offset":he(r)}}),Dm=je(e=>{const n=be("ModalRoot",$ee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:f,scrollAreaComponent:c,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:y,attributes:b,...w}=n,_=We({name:y,classes:is,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:OI});return k.jsx(Nee,{value:{yOffset:f,scrollAreaComponent:c,getStyles:_,fullScreen:d},children:k.jsx(yL,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":c===lo.Autosize||void 0,unstyled:o,...w})})});Dm.classes=is;Dm.varsResolver=OI;Dm.displayName="@mantine/core/ModalRoot";const EI=O.createContext(null);function TI({children:e}){const[n,t]=O.useState([]),[i,r]=O.useState(ca("modal"));return k.jsx(EI,{value:{stack:n,addModal:(a,o)=>{t(l=>[...new Set([...l,a])]),r(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:a=>t(o=>o.filter(l=>l!==a)),getZIndex:a=>`calc(${i} + ${n.indexOf(a)} + 1)`,currentId:n[n.length-1],maxZIndex:i},children:e})}TI.displayName="@mantine/core/ModalStack";const vy=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalTitle",null,e);return k.jsx(SL,{...Sc().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});vy.classes=is;vy.displayName="@mantine/core/ModalTitle";const zee={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ca("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},$r=je(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:f,stackId:c,zIndex:h,...d}=be("Modal",zee,e),p=O.use(EI),v=!!n||r,y=p&&c?{closeOnEscape:p.currentId===c,trapFocus:p.currentId===c,zIndex:p.getZIndex(c)}:{},b=t===!1?!1:c&&p?p.currentId===c:f;return O.useEffect(()=>{p&&c&&(f?p.addModal(c,h||ca("modal")):p.removeModal(c))},[f,c,h]),k.jsxs(Dm,{radius:l,opened:f,zIndex:p&&c?p.getZIndex(c):h,...d,...y,children:[t&&k.jsx(py,{visible:b,transitionProps:p&&c?{duration:0}:void 0,...i}),k.jsxs(hy,{radius:l,__hidden:p&&c&&f?c!==p.currentId:!1,children:[v&&k.jsxs(my,{children:[n&&k.jsx(vy,{children:n}),r&&k.jsx(dy,{...a})]}),k.jsx(cy,{children:o})]})]})});$r.classes=is;$r.displayName="@mantine/core/Modal";$r.Root=Dm;$r.Overlay=py;$r.Content=hy;$r.Body=cy;$r.Header=my;$r.Title=vy;$r.CloseButton=dy;$r.Stack=TI;const gy=O.createContext(null);var yy={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const MI=O.createContext(null),jI=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?On(n):On(t,"pg-gap")}}),by=je(e=>{var y;const n=be("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,disabled:c,attributes:h,...d}=n,p=((y=O.use(gy))==null?void 0:y.size)||f||void 0,v=We({name:"PillGroup",classes:yy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:jI,stylesCtx:{size:p},rootSelector:"group"});return k.jsx(MI,{value:{size:p,disabled:c},children:k.jsx(_e,{size:p,...v("group"),...d})})});by.classes=yy;by.varsResolver=jI;by.displayName="@mantine/core/PillGroup";const Lee={variant:"default"},DI=(e,{radius:n},{size:t})=>({root:{"--pill-fz":On(t,"pill-fz"),"--pill-height":On(t,"pill-height"),"--pill-radius":n===void 0?void 0:Vt(n)}}),nl=je(e=>{const n=be("Pill",Lee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:f,children:c,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:y,disabled:b,mod:w,attributes:_,...S}=n,C=O.use(MI),T=O.use(gy),A=y||(C==null?void 0:C.size)||void 0,M=(T==null?void 0:T.variant)==="filled"?"contrast":f||"default",j=We({name:"Pill",classes:yy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:DI,stylesCtx:{size:A}});return k.jsxs(_e,{component:"span",variant:M,size:A,...j("root",{variant:M}),mod:[{"with-remove":h&&!b,disabled:b||(C==null?void 0:C.disabled)},w],...S,children:[k.jsx("span",{...j("label"),children:c}),h&&k.jsx(pu,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...j("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:N=>{var F;N.preventDefault(),N.stopPropagation(),(F=p==null?void 0:p.onMouseDown)==null||F.call(p,N)},onClick:N=>{var F;N.stopPropagation(),d==null||d(),(F=p==null?void 0:p.onClick)==null||F.call(p,N)}})]})});nl.classes=yy;nl.varsResolver=DI;nl.displayName="@mantine/core/Pill";nl.Group=by;var RI={field:"m_45c4369d"};const Iee={type:"visible"},fC=je(e=>{const n=be("PillsInputField",Iee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:f,disabled:c,id:h,pointer:d,mod:p,attributes:v,ref:y,...b}=n,w=O.use(gy),_=O.use(vu),S=We({name:"PillsInputField",classes:RI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),C=c||(w==null?void 0:w.disabled);return k.jsx(_e,{component:"input",ref:Nt(y,w==null?void 0:w.fieldRef),"data-type":f,disabled:C,mod:[{disabled:C,pointer:d},p],...S("field"),...b,id:(_==null?void 0:_.inputId)||h,"aria-invalid":w==null?void 0:w.hasError,"aria-describedby":_==null?void 0:_.describedBy,type:"text",onMouseDown:T=>!d&&T.stopPropagation()})});fC.classes=RI;fC.displayName="@mantine/core/PillsInputField";const Bee={size:"sm"},ru=je(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:f,...c}=be("PillsInput",Bee,e),h=O.useRef(null);return k.jsx(gy,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:f},children:k.jsx(zi,{size:r,error:l,variant:f,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...c,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});ru.displayName="@mantine/core/PillsInput";ru.classes=zi.classes;ru.Field=fC;function ak(e){return typeof e=="string"?e.trim().toLowerCase():e}function Fee({data:e,value:n}){const t=n.map(ak);return e.reduce((i,r)=>(tu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(ak(a.value))===-1)}):t.indexOf(ak(r.value))===-1&&i.push(r),i),[])}const Z5={xs:41,sm:50,md:60,lg:72,xl:89},qee={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},wy=L1(e=>{const n=be("MultiSelect",qee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:y,dropdownOpened:b,defaultDropdownOpened:w,onDropdownOpen:_,onDropdownClose:S,selectFirstOptionOnChange:C,selectFirstOptionOnDropdownOpen:T,onOptionSubmit:A,comboboxProps:M,filter:j,limit:N,withScrollArea:F,maxDropdownHeight:R,searchValue:L,defaultSearchValue:B,onSearchChange:G,readOnly:H,disabled:U,onFocus:P,onBlur:z,radius:q,rightSection:Y,rightSectionWidth:D,rightSectionPointerEvents:V,rightSectionProps:W,leftSection:$,leftSectionWidth:X,leftSectionPointerEvents:ee,leftSectionProps:oe,inputContainer:ue,inputWrapperOrder:ye,withAsterisk:ae,labelProps:le,descriptionProps:Se,errorProps:ne,wrapperProps:$e,description:ve,label:xe,error:De,maxValues:we,searchable:re,nothingFoundMessage:ke,withCheckIcon:Ie,withAlignedLabels:qe,checkIconPosition:Ue,hidePickedOptions:Ve,withErrorStyles:me,name:Ge,form:te,id:pe,clearable:He,clearSectionMode:Ye,clearButtonProps:Ce,hiddenInputProps:Qe,placeholder:ln,hiddenInputValuesDivider:En,required:hn,mod:rn,renderOption:Je,renderPill:zn,onRemove:un,onClear:yt,onMaxValues:Ct,scrollAreaProps:Tn,chevronColor:mn,attributes:bn,clearSearchOnChange:ot,openOnFocus:$t,loading:Ne,loadingPosition:Be,...An}=n,Qn=Gi(pe),Sn=Z1(y),Ke=Mm(Sn),Xe=O.useRef({}),en=jm({opened:b,defaultOpened:w,onDropdownOpen:()=>{_==null||_(),T&&en.selectFirstOption()},onDropdownClose:()=>{S==null||S(),en.resetSelectedOption()}}),{styleProps:$n,rest:{type:Ln,autoComplete:bt,..._n}}=hu(An),[kn,Bn]=Ci({value:c,defaultValue:h,finalValue:[],onChange:d}),[zt,fi]=Ci({value:L,defaultValue:B,finalValue:"",onChange:G}),Ki=an=>{fi(an),en.resetSelectedOption()},ga=We({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:bn}),{resolvedClassNames:za,resolvedStyles:ya}=Ni({props:n,styles:a,classNames:t}),zr=an=>{p==null||p(an),an.key===" "&&!re&&(an.preventDefault(),en.toggleDropdown()),an.key==="Backspace"&&zt.length===0&&kn.length>0&&(un==null||un(kn[kn.length-1]),Bn(kn.slice(0,kn.length-1)))},La=kn.map((an,Xi)=>{var J;const Ir=Ke[`${an}`]||Xe.current[`${an}`];return zn?k.jsx(O.Fragment,{children:zn({option:Ir,value:an,onRemove:()=>{Bn(kn.filter(Ae=>an!==Ae)),un==null||un(an)},disabled:U})},`${an}-${Xi}`):k.jsx(nl,{withRemoveButton:!H&&!((J=Ke[`${an}`])!=null&&J.disabled),onRemove:()=>{Bn(kn.filter(Ae=>an!==Ae)),un==null||un(an)},unstyled:o,disabled:U,...ga("pill"),children:(Ir==null?void 0:Ir.label)||an},`${an}-${Xi}`)});O.useEffect(()=>{C&&en.selectFirstOption()},[C,zt]),O.useEffect(()=>{kn.forEach(an=>{`${an}`in Ke&&(Xe.current[`${an}`]=Ke[`${an}`])})},[Ke,kn]);const br=k.jsx(xn.ClearButton,{...Ce,onClear:()=>{yt==null||yt(),Bn([]),Ki("")}}),Lr=Fee({data:Sn,value:kn}),fn=He&&kn.length>0&&!U&&!H,ci=fn?{paddingInlineEnd:Z5[f]??Z5.sm}:void 0;return k.jsxs(k.Fragment,{children:[k.jsxs(xn,{store:en,classNames:za,styles:ya,unstyled:o,size:f,readOnly:H,__staticSelector:"MultiSelect",attributes:bn,onOptionSubmit:an=>{A==null||A(an),ot&&Ki(""),en.updateSelectedOptionIndex("selected"),kn.includes(Ke[`${an}`].value)?(Bn(kn.filter(Xi=>Xi!==Ke[`${an}`].value)),un==null||un(Ke[`${an}`].value)):kn.lengthre?en.openDropdown():en.toggleDropdown(),"data-expanded":en.dropdownOpened||void 0,id:Qn,required:hn,mod:rn,attributes:bn,children:k.jsxs(nl.Group,{attributes:bn,disabled:U,unstyled:o,...ga("pillsList",{style:ci}),children:[La,k.jsx(xn.EventsTarget,{autoComplete:bt,withExpandedAttribute:!0,children:k.jsx(ru.Field,{..._n,id:Qn,placeholder:ln,type:!re&&!ln?"hidden":"visible",...ga("inputField"),unstyled:o,onFocus:an=>{P==null||P(an),$t&&re&&en.openDropdown()},onBlur:an=>{z==null||z(an),en.closeDropdown(),Ki("")},onKeyDown:zr,value:zt,onChange:an=>{Ki(an.currentTarget.value),re&&en.openDropdown(),C&&en.selectFirstOption()},disabled:U,readOnly:H||!re,pointer:!re})})]})})}),k.jsx(ny,{data:Ve?Lr:Sn,hidden:H||U,filter:j,search:zt,limit:N,hiddenWhenEmpty:!ke,withScrollArea:F,maxDropdownHeight:R,filterOptions:re,value:kn,checkIconPosition:Ue,withCheckIcon:Ie,withAlignedLabels:qe,nothingFoundMessage:ke,unstyled:o,labelId:xe?`${Qn}-label`:void 0,"aria-label":xe?void 0:An["aria-label"],renderOption:Je,scrollAreaProps:Tn})]}),k.jsx(xn.HiddenInput,{name:Ge,valuesDivider:En,value:kn,form:te,disabled:U,...Qe})]})});wy.classes={...zi.classes,...xn.classes};wy.displayName="@mantine/core/MultiSelect";var PI={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const Hee={withCloseButton:!0},NI=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Vt(n),"--notification-color":t?et(t,e):void 0}}),ky=je(e=>{const n=be("Notification",Hee,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:f,icon:c,children:h,onClose:d,closeButtonProps:p,classNames:v,style:y,styles:b,unstyled:w,vars:_,mod:S,loaderProps:C,role:T,attributes:A,...M}=n,j=We({name:"Notification",classes:PI,props:n,className:t,style:y,classNames:v,styles:b,unstyled:w,attributes:A,vars:_,varsResolver:NI});return k.jsxs(_e,{...j("root"),mod:[{"data-with-icon":!!c||a,"data-with-border":l},S],role:T||"alert",...M,children:[c&&!a&&k.jsx("div",{...j("icon"),children:c}),a&&k.jsx(tr,{size:28,color:i,...j("loader"),...C}),k.jsxs("div",{...j("body"),children:[f&&k.jsx("div",{...j("title"),children:f}),k.jsx(_e,{...j("description"),mod:{"data-with-title":!!f},children:h})]}),o&&k.jsx(pu,{iconSize:16,color:"gray",...p,unstyled:w,onClick:N=>{var F;(F=p==null?void 0:p.onClick)==null||F.call(p,N),d==null||d()},...j("closeButton")})]})});ky.classes=PI;ky.varsResolver=NI;ky.displayName="@mantine/core/Notification";function $I(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r=l?r=r+J5("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function eM(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=cC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,f=parseFloat("0."+(o||"0")),c=o.length<=n?"0."+o:f.toFixed(n),h=c.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(b,w,_){return b.length>_?(Number(b[0])+Number(w)).toString()+b.substring(1,b.length):w+b},h[0]));var p=II(h[1]||"",n,t),v=l?"-":"",y=i?".":"";return""+v+d+y+p}function Fl(e,n){if(e.value=e.value,e!==null){if(e.createTextRange){var t=e.createTextRange();return t.move("character",n),t.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(n,n),!0):(e.focus(),!1)}}var FI=Uee(function(e,n){for(var t=0,i=0,r=e.length,a=n.length;e[t]===n[t]&&tt&&r-i>t;)i++;return{from:{start:t,end:r-i},to:{start:t,end:a-i}}}),Kee=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function Xee(e,n,t){return Math.min(Math.max(e,n),t)}function ok(e){return Math.max(e.selectionStart,e.selectionEnd)}function Zee(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Qee(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Jee(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function ene(e,n,t,i,r,a,o){o===void 0&&(o=Jee);var l=r.findIndex(function(T){return T}),f=e.slice(0,l);!n&&!t.startsWith(f)&&(n=f,t=f+t,i=i+f.length);for(var c=t.length,h=e.length,d={},p=new Array(c),v=0;v0&&p[_]===-1;)_--;var C=_===-1||p[_]===-1?0:p[_]+1;return C>S?S:i-C=0&&!t[n];)n--;n===-1&&(n=t.indexOf(!0))}else{for(;n<=r&&!t[n];)n++;n>r&&(n=t.lastIndexOf(!0))}return n===-1&&(n=r),n}function nne(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tj.length-o.length||ML||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=ane(C?"-"+e:e,r),e=(e.match(one(y))||[]).join("");var B=e.indexOf(y);e=e.replace(new RegExp(LI(y),"g"),function(z,q){return q===B?".":""});var G=cC(e,r),H=G.beforeDecimal,U=G.afterDecimal,P=G.addNegation;return c.end-c.startV?!1:D>=ee.start&&Dt?t:e}function pne(e){return e.toString().replace(".","").length}function vne(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const fk={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},VI=(e,{size:n})=>({controls:{"--ni-chevron-size":On(n,"ni-chevron-size")}});function yne(e,n,t){const i=e.toString(),r=HI.test(i),a=i.replace(/^0+(?=\d)/,""),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>Number.MAX_SAFE_INTEGER)return n!==void 0?n:a;const l=Io(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function bne(e,n){if(e===""||e==="-")return e;const t=Jd(e);return t===null?e:n.clampBehavior==="blur"?Zv(t,n.min,n.max):t}const xy=L1(e=>{const n=be("NumberInput",fk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:f,value:c,defaultValue:h,max:d,min:p,step:v,hideControls:y,rightSection:b,isAllowed:w,clampBehavior:_,onBlur:S,allowDecimal:C,decimalScale:T,onKeyDown:A,onKeyDownCapture:M,handlersRef:j,startValue:N,disabled:F,rightSectionPointerEvents:R,allowNegative:L,readOnly:B,size:G,rightSectionWidth:H,stepHoldInterval:U,stepHoldDelay:P,allowLeadingZeros:z,withKeyboardEvents:q,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:D,selectAllOnFocus:V,onMinReached:W,onMaxReached:$,onFocus:X,attributes:ee,ref:oe,...ue}=n,ye=L??!0,ae=z??!0,le=We({name:"NumberInput",classes:oS,props:n,classNames:i,styles:r,unstyled:a,attributes:ee,vars:o,varsResolver:VI}),{resolvedClassNames:Se,resolvedStyles:ne}=Ni({classNames:i,styles:r,props:n}),$e=O.useRef(sk(c)||sk(h)?"bigint":"number");sk(c)?$e.current="bigint":typeof c=="number"&&($e.current="number");const ve=$e.current==="bigint",[xe,De]=Ci({value:c,defaultValue:h,finalValue:"",onChange:l}),we=P!==void 0&&U!==void 0,re=O.useRef(null),ke=O.useRef(null),Ie=O.useRef(0),qe=typeof p=="number"?p:void 0,Ue=typeof d=="number"?d:void 0,Ve=typeof v=="number"?v:fk.step,me=typeof N=="number"?N:fk.startValue,Ge=bv(p),te=bv(d),pe=bv(v)??BigInt(1),He=bv(N)??BigInt(0),Ye=Ne=>!UI(Ne,ye)||ae&&rM.test(Ne)?Ne:Jd(Ne)??Ne,Ce=Ne=>{const Be=Number(Ne);return Number.isSafeInteger(Be)?Be:void 0},Qe=(Ne,Be)=>{Be.source==="event"&&De(ve?Ye(Ne.value):vne(Ne.floatValue,Ne.value)&&!hne.test(Ne.value)&&!(ae&&rM.test(Ne.value))&&!mne.test(Ne.value)&&!HI.test(Ne.value)?Ne.floatValue:Ne.value),f==null||f(Ne,Be)},ln=Ne=>{const Be=String(Ne).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Be?Math.max(0,(Be[1]?Be[1].length:0)-(Be[2]?+Be[2]:0)):0},En=Ne=>{re.current&&typeof Ne<"u"&&re.current.setSelectionRange(Ne,Ne)},hn=O.useRef(H3);hn.current=()=>{if(ve){if(!uk(xe,ye))return;let Xe;const en=xe;if(typeof en=="bigint"){const Ln=en+pe;te!==void 0&&Ln>te&&($==null||$()),Xe=te!==void 0&&Ln>te?te:Ln}else if(typeof en=="string"&&en!==""){const Ln=Jd(en);if(Ln===null)return;const bt=Ln+pe;te!==void 0&&bt>te&&($==null||$()),Xe=te!==void 0&&bt>te?te:bt}else Xe=Zv(He,Ge,te);const $n=Xe.toString();De(Xe),f==null||f({floatValue:Ce(Xe),formattedValue:$n,value:$n},{source:"increment"}),setTimeout(()=>{var Ln;return En((Ln=re.current)==null?void 0:Ln.value.length)},0);return}if(!lk(xe))return;let Ne;const Be=ln(xe),An=ln(Ve),Qn=Math.max(Be,An),Sn=10**Qn;if(!sS(xe)&&(typeof xe!="number"||Number.isNaN(xe)))Ne=Io(me,qe,Ue);else if(Ue!==void 0){const Xe=(Math.round(Number(xe)*Sn)+Math.round(Ve*Sn))/Sn;Xe>Ue&&($==null||$()),Ne=Xe<=Ue?Xe:Ue}else Ne=(Math.round(Number(xe)*Sn)+Math.round(Ve*Sn))/Sn;const Ke=Ne.toFixed(Qn);De(parseFloat(Ke)),f==null||f({floatValue:parseFloat(Ke),formattedValue:Ke,value:Ke},{source:"increment"}),setTimeout(()=>{var Xe;return En((Xe=re.current)==null?void 0:Xe.value.length)},0)};const rn=O.useRef(H3);rn.current=()=>{if(ve){if(!uk(xe,ye))return;let en;const $n=Ge!==void 0?Ge:ye?void 0:BigInt(0),Ln=xe;if(typeof Ln=="bigint"){const _n=Ln-pe;$n!==void 0&&_n<$n&&(W==null||W()),en=$n!==void 0&&_n<$n?$n:_n}else if(typeof Ln=="string"&&Ln!==""){const _n=Jd(Ln);if(_n===null)return;const kn=_n-pe;$n!==void 0&&kn<$n&&(W==null||W()),en=$n!==void 0&&kn<$n?$n:kn}else en=Zv(He,$n,te);const bt=en.toString();De(en),f==null||f({floatValue:Ce(en),formattedValue:bt,value:bt},{source:"decrement"}),setTimeout(()=>{var _n;return En((_n=re.current)==null?void 0:_n.value.length)},0);return}if(!lk(xe))return;let Ne;const Be=qe!==void 0?qe:ye?Number.MIN_SAFE_INTEGER:0,An=ln(xe),Qn=ln(Ve),Sn=Math.max(An,Qn),Ke=10**Sn;if(!sS(xe)&&typeof xe!="number"||Number.isNaN(xe))Ne=Io(me,Be,Ue);else{const en=(Math.round(Number(xe)*Ke)-Math.round(Ve*Ke))/Ke;Be!==void 0&&en{var en;return En((en=re.current)==null?void 0:en.value.length)},0)};const Je=Ne=>{var Sn,Ke,Xe;const Be=Ne.clipboardData.getData("text"),An=ue.decimalSeparator||".",Qn=(D||[".",","]).filter(en=>en!==An);if(Qn.some(en=>Be.includes(en))){Ne.preventDefault();let en=Be;Qn.forEach(Ln=>{en=en.split(Ln).join(An)});const $n=re.current;if($n){const Ln=$n.selectionStart??0,bt=$n.selectionEnd??0,_n=$n.value,kn=_n.substring(0,Ln)+en+_n.substring(bt);(Ke=(Sn=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:Sn.set)==null||Ke.call($n,kn),$n.dispatchEvent(new Event("change",{bubbles:!0}));const Bn=Ln+en.length;setTimeout(()=>En(Bn),0)}}(Xe=ue.onPaste)==null||Xe.call(ue,Ne)},zn=Ne=>{var Be,An;A==null||A(Ne),!(B||!q)&&(Ne.key==="ArrowUp"&&(Ne.preventDefault(),(Be=hn.current)==null||Be.call(hn)),Ne.key==="ArrowDown"&&(Ne.preventDefault(),(An=rn.current)==null||An.call(rn)))},un=Ne=>{if(M==null||M(Ne),Ne.key==="Backspace"){const Be=re.current;Be&&Be.selectionStart===0&&Be.selectionStart===Be.selectionEnd&&(Ne.preventDefault(),window.setTimeout(()=>En(0),0))}},yt=Ne=>{V&&setTimeout(()=>Ne.currentTarget.select(),0),X==null||X(Ne)},Ct=Ne=>{let Be=xe;ve?(_==="blur"&&typeof Be=="bigint"&&(Be=Zv(Be,Ge,te)),Y&&typeof Be=="string"&&(Be=bne(Be,{min:Ge,max:te,clampBehavior:_}))):(_==="blur"&&typeof Be=="number"&&(Be=Io(Be,qe,Ue)),Y&&typeof Be=="string"&&ln(Be)<15&&(Be=yne(Be,Ue,qe))),xe!==Be&&De(Be),S==null||S(Ne)};sg(j,{increment:hn.current,decrement:rn.current});const Tn=Ne=>{var Be,An;Ne?(Be=hn.current)==null||Be.call(hn):(An=rn.current)==null||An.call(rn),Ie.current+=1},mn=Ne=>{if(Tn(Ne),we){const Be=typeof U=="number"?U:U(Ie.current);ke.current=window.setTimeout(()=>mn(Ne),Be)}},bn=(Ne,Be)=>{var An;Ne.preventDefault(),(An=re.current)==null||An.focus(),Tn(Be),we&&(ke.current=window.setTimeout(()=>mn(Be),P))},ot=()=>{ke.current&&window.clearTimeout(ke.current),ke.current=null,Ie.current=0},$t=k.jsxs("div",{...le("controls"),children:[k.jsx(Si,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:F||typeof xe=="number"&&Ue!==void 0&&xe>=Ue||typeof xe=="bigint"&&te!==void 0&&xe>=te,mod:{direction:"up"},onMouseDown:Ne=>Ne.preventDefault(),onPointerDown:Ne=>{bn(Ne,!0)},onPointerUp:ot,onPointerLeave:ot,children:k.jsx(iM,{direction:"up"})}),k.jsx(Si,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:F||typeof xe=="number"&&qe!==void 0&&xe<=qe||typeof xe=="bigint"&&Ge!==void 0&&xe<=Ge,mod:{direction:"down"},onMouseDown:Ne=>Ne.preventDefault(),onPointerDown:Ne=>{bn(Ne,!1)},onPointerUp:ot,onPointerLeave:ot,children:k.jsx(iM,{direction:"down"})})]});return k.jsx(zi,{component:dne,allowNegative:L,className:sn(oS.root,t),size:G,...ue,inputMode:ve?"numeric":"decimal",readOnly:B,disabled:F,value:typeof xe=="bigint"?xe.toString():xe,getInputRef:Nt(oe,re),onValueChange:Qe,rightSection:y||B||!(ve?uk(xe,ye):lk(xe))?b:b||$t,classNames:Se,styles:ne,unstyled:a,__staticSelector:"NumberInput",decimalScale:ve?0:C?T:0,onPaste:Je,onFocus:yt,onKeyDown:zn,onKeyDownCapture:un,rightSectionPointerEvents:R??(F?"none":void 0),rightSectionWidth:H??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:z,allowedDecimalSeparators:D,onBlur:Ct,attributes:ee,isAllowed:Ne=>{if(!(!w||w(Ne)))return!1;if(_!=="strict")return!0;if(!ve)return gne(Ne.floatValue,qe,Ue);if(Ne.value===""||Ne.value==="-")return!0;const Be=Jd(Ne.value);return Be===null?!0:(Ge===void 0||Be>=Ge)&&(te===void 0||Be<=te)}})});xy.classes={...zi.classes,...oS};xy.varsResolver=VI;xy.displayName="@mantine/core/NumberInput";function wne({reveal:e}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:e?k.jsxs(k.Fragment,{children:[k.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),k.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53"}),k.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6"})]}):k.jsxs(k.Fragment,{children:[k.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),k.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z"}),k.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var lS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const kne={visibilityToggleIcon:wne,size:"sm"},WI=(e,{size:n})=>({root:{"--psi-icon-size":On(n,"psi-icon-size"),"--psi-button-size":On(n,"psi-button-size")}}),Sy=je(e=>{const n=be("PasswordInput",kne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:f,error:c,leftSection:h,disabled:d,id:p,variant:v,inputContainer:y,description:b,label:w,size:_,errorProps:S,descriptionProps:C,labelProps:T,withAsterisk:A,inputWrapperOrder:M,wrapperProps:j,radius:N,rightSection:F,rightSectionWidth:R,rightSectionPointerEvents:L,leftSectionWidth:B,visible:G,defaultVisible:H,onVisibilityChange:U,visibilityToggleIcon:P,visibilityToggleButtonProps:z,rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withErrorStyles:V,mod:W,attributes:$,...X}=n,ee=Gi(p),[oe,ue]=Ci({value:G,defaultValue:H,finalValue:!1,onChange:U}),ye=()=>ue(!oe),ae=We({name:"PasswordInput",classes:lS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,varsResolver:WI}),{resolvedClassNames:le,resolvedStyles:Se}=Ni({classNames:t,styles:a,props:n}),{styleProps:ne,rest:$e}=hu(X),ve=(S==null?void 0:S.id)||`${ee}-error`,xe=(C==null?void 0:C.id)||`${ee}-description`,De=`${c&&typeof c!="boolean"?ve:""} ${b?xe:""}`,we=De.trim().length>0?De.trim():void 0,re=k.jsx(Yt,{...ae("visibilityToggle"),disabled:d,radius:N,"aria-pressed":oe,tabIndex:-1,"aria-label":"Toggle password visibility",...z,variant:(z==null?void 0:z.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:ke=>{var Ie;ke.preventDefault(),(Ie=z==null?void 0:z.onTouchEnd)==null||Ie.call(z,ke),ye()},onMouseDown:ke=>{var Ie;ke.preventDefault(),(Ie=z==null?void 0:z.onMouseDown)==null||Ie.call(z,ke),ye()},onKeyDown:ke=>{var Ie;(Ie=z==null?void 0:z.onKeyDown)==null||Ie.call(z,ke),ke.key===" "&&(ke.preventDefault(),ye())},children:k.jsx(P,{reveal:oe})});return k.jsx(Pt.Wrapper,{required:f,id:ee,label:w,error:c,description:b,size:_,classNames:le,styles:Se,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:A,inputWrapperOrder:M,inputContainer:y,variant:v,labelProps:{...T,htmlFor:ee},descriptionProps:{...C,id:xe},errorProps:{...S,id:ve},mod:W,attributes:$,...ae("root"),...ne,...j,children:k.jsx(Pt,{component:"div",error:c,leftSection:h,size:_,classNames:{...le,input:sn(lS.input,le==null?void 0:le.input)},styles:Se,radius:N,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:R,rightSection:F??re,variant:v,unstyled:o,leftSectionWidth:B,rightSectionPointerEvents:L||"all",rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withAria:!1,withErrorStyles:V,attributes:$,children:k.jsx("input",{required:f,"data-invalid":!!c||void 0,"data-with-left-section":!!h||void 0,...ae("innerInput"),disabled:d,id:ee,...$e,"aria-describedby":we,autoComplete:$e.autoComplete||"off",type:oe?"text":"password"})})})});Sy.classes={...zi.classes,...lS};Sy.varsResolver=WI;Sy.displayName="@mantine/core/PasswordInput";function _ne({offset:e,position:n,defaultOpened:t}){const[i,r]=O.useState(t),a=O.useRef(null),{x:o,y:l,elements:f,refs:c,update:h,placement:d}=T6({placement:n,middleware:[C6({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,y=O.useCallback(({clientX:b,clientY:w})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:b,y:w,left:b+p,top:w+v,right:b,bottom:w}}})},[f.reference]);return O.useEffect(()=>{if(c.floating.current){const b=a.current;b.addEventListener("mousemove",y);const w=Fo(c.floating.current);return w.forEach(_=>{_.addEventListener("scroll",h)}),()=>{b.removeEventListener("mousemove",y),w.forEach(_=>{_.removeEventListener("scroll",h)})}}},[f.reference,c.floating.current,h,y,i]),{handleMouseMove:y,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:c.setFloating}}var Cy={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const xne={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ca("popover")},GI=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Vt(n),"--tooltip-bg":t?et(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),Ay=je(e=>{const n=be("TooltipFloating",xne,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:f,unstyled:c,radius:h,color:d,label:p,offset:v,position:y,multiline:b,zIndex:w,disabled:_,defaultOpened:S,variant:C,vars:T,portalProps:A,attributes:M,ref:j,...N}=n,F=ti(),R=We({name:"TooltipFloating",props:n,classes:Cy,className:o,style:a,classNames:l,styles:f,unstyled:c,attributes:M,rootSelector:"tooltip",vars:T,varsResolver:GI}),{handleMouseMove:L,x:B,y:G,opened:H,boundaryRef:U,floating:P,setOpened:z}=_ne({offset:v,position:y,defaultOpened:S}),q=du(t);if(!q)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Y=Nt(U,N1(q),j),D=q.props,V=$=>{var X;(X=D.onMouseEnter)==null||X.call(D,$),L($),z(!0)},W=$=>{var X;(X=D.onMouseLeave)==null||X.call(D,$),z(!1)};return k.jsxs(k.Fragment,{children:[k.jsx(el,{...A,withinPortal:r,children:k.jsx(_e,{...N,...R("tooltip",{style:{...rz(a,F),zIndex:w,display:!_&&H?"block":"none",top:(G&&Math.round(G))??"",left:(B&&Math.round(B))??""}}),variant:C,ref:P,mod:{multiline:b},children:p})}),O.cloneElement(q,{...D,[i]:Y,onMouseEnter:V,onMouseLeave:W})]})});Ay.classes=Cy;Ay.varsResolver=GI;Ay.displayName="@mantine/core/TooltipFloating";const YI=O.createContext({withinGroup:!1}),Sne={openDelay:0,closeDelay:0};function dC(e){const{openDelay:n,closeDelay:t,children:i}=be("TooltipGroup",Sne,e);return k.jsx(YI,{value:{withinGroup:!0},children:k.jsx(nQ,{delay:{open:n,close:t},children:i})})}dC.displayName="@mantine/core/TooltipGroup";dC.extend=e=>e;function Cne(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function Ane(e){const n=Cne(e.middlewares),t=[jz(e.offset)];return n.shift&&t.push(C6(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?hg():hg(n.flip)),t.push(Dz({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?uh():uh(n.inline)):e.inline&&t.push(uh()),t}function One(e){var T,A,M;const[n,t]=O.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=O.use(YI).withinGroup,a=Gi(),o=O.useCallback(j=>{t(j),j&&w(a)},[a]),{x:l,y:f,context:c,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=T6({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:Ane(e),whileElementsMounted:eS}),{delay:y,currentId:b,setCurrentId:w}=tQ(c,{id:a}),{getReferenceProps:_,getFloatingProps:S}=lQ([JZ(c,{enabled:(T=e.events)==null?void 0:T.hover,delay:r?y:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((A=e.events)!=null&&A.touch)}),sQ(c,{enabled:(M=e.events)==null?void 0:M.focus,visibleOnly:!0}),fQ(c,{role:"tooltip"}),aQ(c,{enabled:typeof e.opened>"u"})]);Wo(()=>{var j;(j=e.onPositionChange)==null||j.call(e,d)},[d]);const C=i&&b&&b!==a;return{x:l,y:f,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:S,getReferenceProps:_,isGroupPhase:C,opened:i,placement:d}}const Ene={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:ca("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},KI=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({theme:e,color:t||e.primaryColor,autoContrast:r,variant:i||"filled"});return{tooltip:{"--tooltip-radius":n===void 0?void 0:Vt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},vr=je(e=>{const n=be("Tooltip",Ene,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:f,opened:c,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:y,styles:b,unstyled:w,style:_,className:S,withArrow:C,arrowSize:T,arrowOffset:A,arrowRadius:M,arrowPosition:j,offset:N,transitionProps:F,multiline:R,events:L,zIndex:B,disabled:G,onClick:H,onMouseEnter:U,onMouseLeave:P,inline:z,variant:q,keepMounted:Y,vars:D,portalProps:V,mod:W,floatingStrategy:$,middlewares:X,autoContrast:ee,attributes:oe,target:ue,ref:ye,...ae}=n,{dir:le}=mu(),Se=O.useRef(null),ne=One({position:qz(le,i),closeDelay:l,openDelay:o,onPositionChange:f,opened:c,defaultOpened:h,events:L,arrowRef:Se,arrowOffset:A,offset:typeof N=="number"?N+(C?T/2:0):N,inline:z,strategy:$,middlewares:X});O.useEffect(()=>{const ke=ue instanceof HTMLElement?ue:typeof ue=="string"?document.querySelector(ue):(ue==null?void 0:ue.current)||null;ke&&ne.reference(ke)},[ue,ne]);const $e=We({name:"Tooltip",props:n,classes:Cy,className:S,style:_,classNames:y,styles:b,unstyled:w,attributes:oe,rootSelector:"tooltip",vars:D,varsResolver:KI}),ve=du(t);if(!ue&&!ve)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const xe=$e("tooltip");if(ue){const ke=j5(F,{duration:100,transition:"fade"});return k.jsx(k.Fragment,{children:k.jsx(el,{...V,withinPortal:d,children:k.jsx(Yo,{...ke,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:ke.duration,children:Ie=>k.jsxs(_e,{...ae,"data-fixed":$==="fixed"||void 0,variant:q,mod:[{multiline:R},W],...xe,...ne.getFloatingProps({ref:ne.floating,className:xe.className,style:{...xe.style,...Ie,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,k.jsx(mg,{ref:Se,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:C,position:ne.placement,arrowSize:T,arrowOffset:A,arrowRadius:M,arrowPosition:j,...$e("arrow")})]})})})})}const De=ve.props,we=Nt(ne.reference,N1(ve),ye),re=j5(F,{duration:100,transition:"fade"});return k.jsxs(k.Fragment,{children:[k.jsx(el,{...V,withinPortal:d,children:k.jsx(Yo,{...re,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:re.duration,children:ke=>k.jsxs(_e,{...ae,"data-fixed":$==="fixed"||void 0,variant:q,mod:[{multiline:R},W],...ne.getFloatingProps({ref:ne.floating,className:$e("tooltip").className,style:{...$e("tooltip").style,...ke,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,k.jsx(mg,{ref:Se,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:C,position:ne.placement,arrowSize:T,arrowOffset:A,arrowRadius:M,arrowPosition:j,...$e("arrow")})]})})}),O.cloneElement(ve,ne.getReferenceProps({onClick:H,onMouseEnter:U,onMouseLeave:P,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...De,className:sn(S,De.className),[r]:we}))]})});vr.classes=Cy;vr.varsResolver=KI;vr.displayName="@mantine/core/Tooltip";vr.Floating=Ay;vr.Group=dC;const Tne={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},Ko=L1(e=>{const n=be("Select",Tne,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:y,value:b,defaultValue:w,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:T,readOnly:A,disabled:M,filter:j,limit:N,withScrollArea:F,maxDropdownHeight:R,size:L,searchable:B,rightSection:G,checkIconPosition:H,withCheckIcon:U,withAlignedLabels:P,nothingFoundMessage:z,name:q,form:Y,searchValue:D,defaultSearchValue:V,onSearchChange:W,allowDeselect:$,error:X,rightSectionPointerEvents:ee,id:oe,clearable:ue,clearSectionMode:ye,clearButtonProps:ae,hiddenInputProps:le,renderOption:Se,onClear:ne,autoComplete:$e,scrollAreaProps:ve,__defaultRightSection:xe,__clearSection:De,__clearable:we,chevronColor:re,autoSelectOnBlur:ke,openOnFocus:Ie,attributes:qe,...Ue}=n,Ve=O.useMemo(()=>Z1(y),[y]),me=O.useRef({}),Ge=O.useMemo(()=>Mm(Ve),[Ve]),te=Gi(oe),[pe,He,Ye]=Ci({value:b,defaultValue:w,finalValue:null,onChange:v}),Ce=pe!=null?`${pe}`in Ge?Ge[`${pe}`]:me.current[`${pe}`]:void 0,Qe=nK(Ce),[ln,En,hn]=Ci({value:D,defaultValue:V,finalValue:Ce?Ce.label:"",onChange:W}),rn=jm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),S?rn.selectFirstOption():rn.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f==null||f(),setTimeout(rn.resetSelectedOption,0)}}),Je=Tn=>{En(Tn),rn.resetSelectedOption()},{resolvedClassNames:zn,resolvedStyles:un}=Ni({props:n,styles:i,classNames:t});O.useEffect(()=>{_&&rn.selectFirstOption()},[_,ln]),O.useEffect(()=>{b===null&&Je(""),b!=null&&Ce&&((Qe==null?void 0:Qe.value)!==Ce.value||(Qe==null?void 0:Qe.label)!==Ce.label)&&Je(Ce.label)},[b,Ce]),O.useEffect(()=>{var Tn,mn;!Ye&&!hn&&Je(pe!=null?`${pe}`in Ge?(Tn=Ge[`${pe}`])==null?void 0:Tn.label:((mn=me.current[`${pe}`])==null?void 0:mn.label)||"":"")},[Ge,pe]),O.useEffect(()=>{pe&&`${pe}`in Ge&&(me.current[`${pe}`]=Ge[`${pe}`])},[Ge,pe]);const yt=k.jsx(xn.ClearButton,{...ae,onClear:()=>{He(null,null),Je(""),ne==null||ne()}}),Ct=ue&&!!pe&&!M&&!A;return k.jsxs(k.Fragment,{children:[k.jsxs(xn,{store:rn,__staticSelector:"Select",classNames:zn,styles:un,unstyled:r,readOnly:A,size:L,attributes:qe,keepMounted:ke,onOptionSubmit:Tn=>{C==null||C(Tn);const mn=$&&`${Ge[Tn].value}`==`${pe}`?null:Ge[Tn],bn=mn?mn.value:null;bn!==pe&&He(bn,mn),!Ye&&Je(bn!=null&&(mn==null?void 0:mn.label)||""),rn.closeDropdown()},...T,children:[k.jsx(xn.Target,{targetType:B?"input":"button",autoComplete:$e,withExpandedAttribute:!0,children:k.jsx(zi,{id:te,__defaultRightSection:k.jsx(xn.Chevron,{size:L,error:X,unstyled:r,color:re}),__clearSection:yt,__clearable:Ct,__clearSectionMode:ye,rightSection:G,rightSectionPointerEvents:ee||"none",...Ue,size:L,__staticSelector:"Select",disabled:M,readOnly:A||!B,value:ln,onChange:Tn=>{Je(Tn.currentTarget.value),rn.openDropdown(),_&&rn.selectFirstOption()},onFocus:Tn=>{Ie&&B&&rn.openDropdown(),h==null||h(Tn)},onBlur:Tn=>{ke&&rn.clickSelectedOption(),B&&rn.closeDropdown();const mn=pe!=null&&(`${pe}`in Ge?Ge[`${pe}`]:me.current[`${pe}`]);Je(mn&&mn.label||""),d==null||d(Tn)},onClick:Tn=>{B?rn.openDropdown():rn.toggleDropdown(),p==null||p(Tn)},classNames:zn,styles:un,unstyled:r,pointer:!B,error:X,attributes:qe})}),k.jsx(ny,{data:Ve,hidden:A||M,filter:j,search:ln,limit:N,hiddenWhenEmpty:!z,withScrollArea:F,maxDropdownHeight:R,filterOptions:!!B&&(Ce==null?void 0:Ce.label)!==ln,value:pe,checkIconPosition:H,withCheckIcon:U,withAlignedLabels:P,nothingFoundMessage:z,unstyled:r,labelId:Ue.label?`${te}-label`:void 0,"aria-label":Ue.label?void 0:Ue["aria-label"],renderOption:Se,scrollAreaProps:ve})]}),k.jsx(xn.HiddenInput,{value:pe,name:q,form:Y,disabled:M,...le})]})});Ko.classes={...zi.classes,...xn.classes};Ko.displayName="@mantine/core/Select";function XI(e){if(e!==void 0)return typeof e=="number"?he(e):e}function Mne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ti(),l=n===void 0?e:n,f=i!==void 0,c=cu({"--sg-spacing-x":Ft(Pr(e)),"--sg-spacing-y":Ft(Pr(l)),"--sg-auto-rows":r,...f?{"--sg-min-col-width":XI(i)}:{"--sg-cols":(d=Pr(t))==null?void 0:d.toString()}}),h=xt(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ft(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ft(l[v])),!f&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return k.jsx(mc,{styles:c,media:xh(xt(h),o.breakpoints).filter(p=>xt(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function ck(e){return typeof e=="object"&&e!==null?xt(e):[]}function jne(e){return e.sort((n,t)=>_h(n)-_h(t))}function Dne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return jne(Array.from(new Set([...ck(e),...ck(n),...i!==void 0?[]:ck(t)])))}function Rne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,f=cu({"--sg-spacing-x":Ft(Pr(e)),"--sg-spacing-y":Ft(Pr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":XI(i)}:{"--sg-cols":(d=Pr(t))==null?void 0:d.toString()}}),c=Dne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=c.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ft(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ft(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return k.jsx(mc,{styles:f,container:c.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var ZI={container:"m_925c2d2c",root:"m_2415a157"};const Pne={cols:1,spacing:"md",type:"media"},Mh=je(e=>{const n=be("SimpleGrid",Pne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:f,verticalSpacing:c,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:y,attributes:b,...w}=n,_=We({name:"SimpleGrid",classes:ZI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l}),S=z1(),C=p!==void 0?v||"auto-fill":void 0;return d==="container"?k.jsxs(k.Fragment,{children:[k.jsx(Rne,{...n,selector:`.${S}`}),k.jsx("div",{..._("container"),children:k.jsx(_e,{..._("root",{className:S}),...w,"data-auto-cols":C})})]}):k.jsxs(k.Fragment,{children:[k.jsx(Mne,{...n,selector:`.${S}`}),k.jsx(_e,{..._("root",{className:S}),...w,"data-auto-cols":C})]})});Mh.classes=ZI;Mh.displayName="@mantine/core/SimpleGrid";var QI={root:"m_6d731127"};const Nne={gap:"md",align:"stretch",justify:"flex-start"},JI=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ft(n),"--stack-align":t,"--stack-justify":i}}),Ut=je(e=>{const n=be("Stack",Nne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:f,justify:c,gap:h,variant:d,attributes:p,...v}=n;return k.jsx(_e,{...We({name:"Stack",props:n,classes:QI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:JI})("root"),variant:d,...v})});Ut.classes=QI;Ut.varsResolver=JI;Ut.displayName="@mantine/core/Stack";const[$ne,zne]=fa("Table component was not found in the tree");var Rm={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Lne(e,n){if(!n)return;const t={};return n.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),n.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),n.striped&&e.striped&&(t["data-striped"]=e.striped),n.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),n.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),n.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function yu(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=je(r=>{const a=be(t,{},r),{classNames:o,className:l,style:f,styles:c,...h}=a,d=zne();return k.jsx(_e,{component:e,...Lne(d,n),...d.getStyles(e,{className:l,classNames:o,style:f,styles:c,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=Rm,i}const uS=yu("th",{columnBorder:!0}),eB=yu("td",{columnBorder:!0}),Qv=yu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),nB=yu("thead",{stickyHeader:!0}),tB=yu("tbody"),iB=yu("tfoot"),rB=yu("caption",{captionSide:!0}),Ine={type:"scrollarea"},aB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":he(n),"--table-max-height":he(t),"--table-overflow":i==="native"?"auto":void 0}}),Oy=je(e=>{const n=be("TableScrollContainer",Ine,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,minWidth:c,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...y}=n,b=We({name:"TableScrollContainer",classes:Rm,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:aB,rootSelector:"scrollContainer"});return k.jsx(_e,{component:d==="scrollarea"?lo:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...b("scrollContainer"),...y,children:k.jsx("div",{...b("scrollContainerInner"),children:f})})});Oy.classes=Rm;Oy.varsResolver=aB;Oy.displayName="@mantine/core/TableScrollContainer";function hC({data:e}){return k.jsxs(k.Fragment,{children:[e.caption&&k.jsx(rB,{children:e.caption}),e.head&&k.jsx(nB,{children:k.jsx(Qv,{children:e.head.map((n,t)=>k.jsx(uS,{children:n},t))})}),e.body&&k.jsx(tB,{children:e.body.map((n,t)=>k.jsx(Qv,{children:n.map((i,r)=>k.jsx(eB,{children:i},r))},t))}),e.foot&&k.jsx(iB,{children:k.jsx(Qv,{children:e.foot.map((n,t)=>k.jsx(uS,{children:n},t))})})]})}hC.displayName="@mantine/core/TableDataRenderer";const Bne={withRowBorders:!0,verticalSpacing:7},oB=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:f,highlightOnHover:c,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Ft(i),"--table-vertical-spacing":Ft(r),"--table-border-color":a?et(a,e):void 0,"--table-striped-color":f&&o?et(o,e):void 0,"--table-highlight-on-hover-color":c&&l?et(l,e):void 0,"--table-sticky-header-offset":d?he(h):void 0}}),kt=je(e=>{const n=be("Table",Bne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:f,verticalSpacing:c,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:y,withColumnBorders:b,withRowBorders:w,withTableBorder:_,borderColor:S,layout:C,data:T,children:A,stickyHeader:M,stickyHeaderOffset:j,mod:N,tabularNums:F,attributes:R,...L}=n,B=We({name:"Table",props:n,className:i,style:r,classes:Rm,classNames:t,styles:a,unstyled:o,attributes:R,rootSelector:"table",vars:l,varsResolver:oB});return k.jsx($ne,{value:{getStyles:B,stickyHeader:M,striped:v===!0?"odd":v||void 0,highlightOnHover:y,withColumnBorders:b,withRowBorders:w,captionSide:h||"bottom"},children:k.jsx(_e,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":F},N],...B("table"),...L,children:A||!!T&&k.jsx(hC,{data:T})})})});kt.classes=Rm;kt.varsResolver=oB;kt.displayName="@mantine/core/Table";kt.Td=eB;kt.Th=uS;kt.Tr=Qv;kt.Thead=nB;kt.Tbody=tB;kt.Tfoot=iB;kt.Caption=rB;kt.ScrollContainer=Oy;kt.DataRenderer=hC;const[Fne,mC]=fa("Tabs component was not found in the tree");var Pm={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const pC=je(e=>{const n=be("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:f,mod:c,...h}=n,d=mC();return k.jsx(_e,{...d.getStyles("list",{className:i,style:f,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},c],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});pC.classes=Pm;pC.displayName="@mantine/core/TabsList";const vC=je(e=>{const n=be("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:f,keepMounted:c,...h}=n,d=km(),p=mC(),v=p.value===r,y=p.keepMounted||c,b=p.keepMountedMode!=="display-none",w=y&&b&&d!=="test"?k.jsx(O.Activity,{mode:v?"visible":"hidden",children:t}):y||v?t:null;return k.jsx(_e,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},f],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:w})});vC.classes=Pm;vC.displayName="@mantine/core/TabsPanel";const gC=je(e=>{const n=be("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:f,disabled:c,color:h,style:d,classNames:p,styles:v,vars:y,mod:b,tabIndex:w,..._}=n,S=ti(),{dir:C}=mu(),T=mC(),A=o===T.value,M=N=>{T.onChange(T.allowTabDeactivation&&o===T.value?null:o),l==null||l(N)},j={classNames:p,styles:v,props:n};return k.jsxs(Si,{...T.getStyles("tab",{className:t,style:d,variant:T.variant,...j}),disabled:c,unstyled:T.unstyled,variant:T.variant,mod:[{active:A,disabled:c,orientation:T.orientation,inverted:T.inverted,placement:T.orientation==="vertical"&&T.placement},b],role:"tab",id:T.getTabId(o),"aria-selected":A,tabIndex:w!==void 0?w:A||T.value===null?0:-1,"aria-controls":T.getPanelId(o),onClick:M,__vars:{"--tabs-color":h?et(h,S):void 0},onKeyDown:s6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:T.activateTabWithKeyboard,loop:T.loop,orientation:T.orientation||"horizontal",dir:C,onKeyDown:f}),..._,children:[a&&k.jsx("span",{...T.getStyles("tabSection",j),"data-position":"left",children:a}),i&&k.jsx("span",{...T.getStyles("tabLabel",j),children:i}),r&&k.jsx("span",{...T.getStyles("tabSection",j),"data-position":"right",children:r})]})});gC.classes=Pm;gC.displayName="@mantine/core/TabsTab";const aM="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",qne={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},sB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Vt(n),"--tabs-color":et(t,e),"--tabs-text-color":$1(i,e)?wm({color:t,theme:e,autoContrast:i}):void 0}}),Aa=je(e=>{const n=be("Tabs",qne,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:f,activateTabWithKeyboard:c,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:y,placement:b,keepMounted:w,keepMountedMode:_,classNames:S,styles:C,unstyled:T,className:A,style:M,vars:j,autoContrast:N,mod:F,attributes:R,...L}=n,B=Gi(f),[G,H]=Ci({value:i,defaultValue:t,finalValue:null,onChange:r}),U=We({name:"Tabs",props:n,classes:Pm,className:A,style:M,classNames:S,styles:C,unstyled:T,attributes:R,vars:j,varsResolver:sB});return k.jsx(Fne,{value:{placement:b,value:G,orientation:a,id:B,loop:l,activateTabWithKeyboard:c,getTabId:XT(`${B}-tab`,aM),getPanelId:XT(`${B}-panel`,aM),onChange:H,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:y,keepMounted:w,keepMountedMode:_,unstyled:T,getStyles:U},children:k.jsx(_e,{id:B,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&y,placement:a==="vertical"&&b},F],...U("root"),...L,children:o})})});Aa.classes=Pm;Aa.varsResolver=sB;Aa.displayName="@mantine/core/Tabs";Aa.Tab=gC;Aa.Panel=vC;Aa.List=pC;function Hne({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(tu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(a.label.toLowerCase().trim())===-1)}):t.indexOf(r.label.toLowerCase().trim())===-1&&i.push(r),i),[])}function Une(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function oM({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=Une(e,i),f=[];if(n)f.push(...r,...l);else{f.push(...r);for(const c of l)(a?h=>a(h,f):h=>f.some(d=>d.toLowerCase()===h.toLowerCase()))(c)?o==null||o(c):f.push(c)}return t?f.slice(0,t):f}const Vne={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},yC=je(e=>{const n=be("TagsInput",Vne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:y,onDuplicate:b,variant:w,data:_,dropdownOpened:S,defaultDropdownOpened:C,onDropdownOpen:T,onDropdownClose:A,selectFirstOptionOnChange:M,selectFirstOptionOnDropdownOpen:j,onOptionSubmit:N,comboboxProps:F,filter:R,limit:L,withScrollArea:B,maxDropdownHeight:G,searchValue:H,defaultSearchValue:U,onSearchChange:P,readOnly:z,disabled:q,splitChars:Y,onFocus:D,onBlur:V,onPaste:W,radius:$,rightSection:X,rightSectionWidth:ee,rightSectionPointerEvents:oe,rightSectionProps:ue,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:Se,inputContainer:ne,inputWrapperOrder:$e,withAsterisk:ve,required:xe,labelProps:De,descriptionProps:we,errorProps:re,wrapperProps:ke,description:Ie,label:qe,error:Ue,withErrorStyles:Ve,name:me,form:Ge,id:te,clearable:pe,clearSectionMode:He,clearButtonProps:Ye,hiddenInputProps:Ce,hiddenInputValuesDivider:Qe,mod:ln,renderOption:En,renderPill:hn,onRemove:rn,onClear:Je,onMaxTags:zn,scrollAreaProps:un,acceptValueOnBlur:yt,isDuplicate:Ct,openOnFocus:Tn,attributes:mn,ref:bn,loading:ot,loadingPosition:$t,...Ne}=n,Be=Gi(te),An=Z1(_),Qn=Mm(An),Sn=O.useRef(null),Ke=Nt(Sn,bn),Xe=jm({opened:S,defaultOpened:C,onDropdownOpen:()=>{T==null||T(),j&&Xe.selectFirstOption()},onDropdownClose:()=>{A==null||A(),Xe.resetSelectedOption()}}),{styleProps:en,rest:{type:$n,autoComplete:Ln,...bt}}=hu(Ne),[_n,kn]=Ci({value:c,defaultValue:h,finalValue:[],onChange:d}),[Bn,zt]=Ci({value:H,defaultValue:U,finalValue:"",onChange:P}),fi=fn=>{zt(fn),Xe.resetSelectedOption()},Ki=We({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:ga,resolvedStyles:za}=Ni({props:n,styles:a,classNames:t}),ya=fn=>{if((Ct?Ct(fn,_n):_n.some(ci=>ci.toLowerCase()===fn.toLowerCase()))&&(b==null||b(fn),!y)){fi("");return}if(_n.length>=v){zn==null||zn(fn);return}N==null||N(fn),fi(""),fn.length>0&&kn([..._n,fn])},zr=fn=>{if(p==null||p(fn),fn.isPropagationStopped())return;const ci=Bn.trim(),{length:an}=ci;if(Y.includes(fn.key)&&an>0&&(kn(oM({splitChars:Y,allowDuplicates:y,maxTags:v,value:Bn,currentTags:_n,isDuplicate:Ct,onDuplicate:b})),fi(""),fn.preventDefault()),fn.key==="Enter"&&an>0&&!fn.nativeEvent.isComposing){if(fn.preventDefault(),document.querySelector(`#${Xe.listId} [data-combobox-option][data-combobox-selected]`))return;ya(ci)}fn.key==="Backspace"&&an===0&&_n.length>0&&!fn.nativeEvent.isComposing&&!z&&(rn==null||rn(_n[_n.length-1]),kn(_n.slice(0,_n.length-1)))},La=fn=>{W==null||W(fn),fn.preventDefault(),fn.clipboardData&&(kn(oM({splitChars:Y,allowDuplicates:y,maxTags:v,value:`${Bn}${fn.clipboardData.getData("text/plain")}`,currentTags:_n,isDuplicate:Ct,onDuplicate:b})),fi(""))},br=_n.map((fn,ci)=>{const an=()=>{const Xi=_n.slice();Xi.splice(ci,1),kn(Xi),rn==null||rn(fn)};return hn?k.jsx(O.Fragment,{children:hn({option:Qn[fn]||{value:fn,label:fn,disabled:!1},value:fn,onRemove:an,disabled:q||z})},`${fn}-${ci}`):k.jsx(nl,{withRemoveButton:!z,onRemove:an,unstyled:o,disabled:q,attributes:mn,...Ki("pill"),children:fn},`${fn}-${ci}`)});O.useEffect(()=>{M&&Xe.selectFirstOption()},[M,_n,Bn]);const Lr=k.jsx(xn.ClearButton,{...Ye,onClear:()=>{var fn;kn([]),fi(""),(fn=Sn.current)==null||fn.focus(),Xe.openDropdown(),Je==null||Je()}});return k.jsxs(k.Fragment,{children:[k.jsxs(xn,{store:Xe,classNames:ga,styles:za,unstyled:o,size:f,readOnly:z,__staticSelector:"TagsInput",attributes:mn,onOptionSubmit:fn=>{N==null||N(fn),fi(""),_n.length>=v?zn==null||zn(fn):kn([..._n,Qn[fn].value]),Xe.resetSelectedOption()},...F,children:[k.jsx(xn.DropdownTarget,{children:k.jsx(ru,{...en,__staticSelector:"TagsInput",classNames:ga,styles:za,unstyled:o,size:f,className:i,style:r,variant:w,disabled:q,radius:$,rightSection:X,__clearSection:Lr,__clearable:pe&&_n.length>0&&!q&&!z,__clearSectionMode:He,rightSectionWidth:ee,rightSectionPointerEvents:oe,rightSectionProps:ue,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:Se,loading:ot,loadingPosition:$t,inputContainer:ne,inputWrapperOrder:$e,withAsterisk:ve,required:xe,labelProps:De,descriptionProps:we,errorProps:re,wrapperProps:ke,description:Ie,label:qe,error:Ue,withErrorStyles:Ve,__stylesApiProps:{...n,multiline:!0},id:Be,mod:ln,attributes:mn,children:k.jsxs(nl.Group,{disabled:q,unstyled:o,...Ki("pillsList"),children:[br,k.jsx(xn.EventsTarget,{autoComplete:Ln,withExpandedAttribute:!0,children:k.jsx(ru.Field,{...bt,ref:Ke,...Ki("inputField"),unstyled:o,onKeyDown:zr,onFocus:fn=>{D==null||D(fn),Tn&&Xe.openDropdown()},onBlur:fn=>{V==null||V(fn),yt&&ya(Bn),Xe.closeDropdown()},onPaste:La,value:Bn,onChange:fn=>fi(fn.currentTarget.value),required:xe&&_n.length===0,disabled:q,readOnly:z,id:Be})})]})})}),k.jsx(ny,{data:Hne({data:An,value:_n}),hidden:z||q,filter:R,search:Bn,limit:L,hiddenWhenEmpty:!0,withScrollArea:B,maxDropdownHeight:G,unstyled:o,labelId:qe?`${Be}-label`:void 0,"aria-label":qe?void 0:Ne["aria-label"],renderOption:En,scrollAreaProps:un})]}),k.jsx(xn.HiddenInput,{name:me,form:Ge,value:_n,valuesDivider:Qe,disabled:q,...Ce})]})});yC.classes={...zi.classes,...xn.classes};yC.displayName="@mantine/core/TagsInput";const tl=je(e=>k.jsx(zi,{component:"input",...be("TextInput",null,e),__staticSelector:"TextInput"}));tl.classes=zi.classes;tl.displayName="@mantine/core/TextInput";const[Wne,Gne]=fa("Timeline component was not found in tree");var bC={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const wC=je(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:f,__vars:c,bullet:h,radius:d,color:p,lineVariant:v,children:y,title:b,mod:w,..._}=be("TimelineItem",null,e),S=Gne(),C=ti(),T={classNames:n,styles:r};return k.jsxs(_e,{...S.getStyles("item",{...T,className:t,style:i}),mod:[{"line-active":f,active:o},w],__vars:{"--tli-radius":d!==void 0?Vt(d):void 0,"--tli-color":p?et(p,C):void 0,"--tli-border-style":v||void 0},..._,children:[k.jsx(_e,{...S.getStyles("itemBullet",T),mod:{"with-child":!!h,align:l,active:o},children:h}),k.jsxs("div",{...S.getStyles("itemBody",T),children:[b&&k.jsx("div",{...S.getStyles("itemTitle",T),children:b}),k.jsx("div",{...S.getStyles("itemContent",T),children:y})]})]})});wC.classes=bC;wC.displayName="@mantine/core/TimelineItem";const Yne={active:-1,align:"left"},lB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":he(n),"--tl-line-width":he(t),"--tl-radius":i===void 0?void 0:Vt(i),"--tl-color":r?et(r,e):void 0,"--tl-icon-color":$1(a,e)?wm({color:r,theme:e,autoContrast:a}):void 0}}),If=je(e=>{const n=be("Timeline",Yne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,active:c,color:h,radius:d,bulletSize:p,align:v,lineWidth:y,reverseActive:b,mod:w,autoContrast:_,attributes:S,...C}=n,T=We({name:"Timeline",classes:bC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:lB}),A=O.Children.toArray(f),M=A.map((j,N)=>{var F,R;return O.cloneElement(j,{unstyled:o,__align:v,__active:((F=j.props)==null?void 0:F.active)||(b?c>=A.length-N-1:c>=N),__lineActive:((R=j.props)==null?void 0:R.lineActive)||(b?c>=A.length-N-1:c-1>=N)})});return k.jsx(Wne,{value:{getStyles:T},children:k.jsx(_e,{...T("root"),mod:[{align:v},w],...C,children:M})})});If.classes=bC;If.varsResolver=lB;If.displayName="@mantine/core/Timeline";If.Item=wC;const Kne=["h1","h2","h3","h4","h5","h6"],Xne=["xs","sm","md","lg","xl"];function Zne(e,n){const t=n!==void 0?n:`h${e}`;return Kne.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:Xne.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:he(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var uB={root:"m_8a5d1357"};const Qne={order:1},fB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=Zne(n||1,t);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},bu=je(e=>{const n=be("Title",Qne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:f,size:c,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:y,...b}=n,w=We({name:"Title",props:n,classes:uB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:y,vars:f,varsResolver:fB});return[1,2,3,4,5,6].includes(l)?k.jsx(_e,{...w("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:c,...b}):null});bu.classes=uB;bu.varsResolver=fB;bu.displayName="@mantine/core/Title";const kC=O.createContext(null);kC.displayName="@mantine/modals/ModalsContext";function Jne(){const e=O.use(kC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[ete,wu]=rK("mantine-modals"),nte=e=>{const n=e.modalId||Xs();return wu("openModal")({...e,modalId:n}),n},tte=e=>{const n=e.modalId||Xs();return wu("openConfirmModal")({...e,modalId:n}),n},ite=e=>{const n=e.modalId||Xs();return wu("openContextModal")({...e,modalId:n}),n},rte=wu("closeModal"),ate=wu("closeAllModals"),ote=e=>wu("updateModal")(e),ste=e=>wu("updateContextModal")(e),jo={open:nte,close:rte,closeAll:ate,openConfirmModal:tte,openContextModal:ite,updateModal:ote,updateContextModal:ste};function lte({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:f,children:c}){const{cancel:h,confirm:d}=i,p=Jne(),v=b=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(b)),typeof l=="function"&&l(),a&&p.closeModal(e)},y=b=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(b)),typeof f=="function"&&f(),r&&p.closeModal(e)};return k.jsxs(k.Fragment,{children:[c&&k.jsx(_e,{mb:"md",children:c}),k.jsxs(wn,{mt:c?0:"md",justify:"flex-end",...o,children:[k.jsx(Bt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),k.jsx(Bt,{...t,onClick:y,children:(t==null?void 0:t.children)||d})]})]})}function sM(e,n){var t,i,r,a;n&&e.type==="confirm"&&((i=(t=e.props).onCancel)==null||i.call(t)),(a=(r=e.props).onClose)==null||a.call(r)}function ute(e,n){var t;switch(n.type){case"OPEN":return{current:n.modal,modals:[...e.modals,n.modal]};case"CLOSE":{if(!e.modals.find(r=>r.id===n.modalId))return e;const i=e.modals.filter(r=>r.id!==n.modalId);return{current:i[i.length-1]||e.current,modals:i}}case"CLOSE_ALL":return e.modals.length?{current:e.current,modals:[]}:e;case"UPDATE":{const{modalId:i,newProps:r}=n,a=e.modals.map(l=>l.id!==i?l:l.type==="content"||l.type==="confirm"?{...l,props:{...l.props,...r}}:l.type==="context"?{...l,props:{...l.props,...r,innerProps:{...l.props.innerProps,...r.innerProps}}}:l),o=((t=e.current)==null?void 0:t.id)===i&&a.find(l=>l.id===i)||e.current;return{...e,modals:a,current:o}}default:return e}}function fte(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h},modalProps:{id:n,...d}}}function cte({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=O.useReducer(ute,{modals:[],current:null}),o=O.useRef(r);o.current=r;const l=O.useRef(!1),f=O.useCallback(C=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(T=>{sM(T,C)}),l.current=!1),a({type:"CLOSE_ALL",canceled:C})},[o,a]),c=O.useCallback(({modalId:C,...T})=>{const A=C||Xs();return a({type:"OPEN",modal:{id:A,type:"content",props:T}}),A},[a]),h=O.useCallback(({modalId:C,...T})=>{const A=C||Xs();return a({type:"OPEN",modal:{id:A,type:"confirm",props:T}}),A},[a]),d=O.useCallback((C,{modalId:T,...A})=>{const M=T||Xs();return a({type:"OPEN",modal:{id:M,type:"context",props:A,ctx:C}}),M},[a]),p=O.useCallback((C,T)=>{if(!l.current){const A=o.current.modals.find(M=>M.id===C);A&&(l.current=!0,sM(A,T),l.current=!1)}a({type:"CLOSE",modalId:C,canceled:T})},[o,a]),v=O.useCallback(({modalId:C,...T})=>{a({type:"UPDATE",modalId:C,newProps:T})},[a]),y=O.useCallback(({modalId:C,...T})=>{a({type:"UPDATE",modalId:C,newProps:T})},[a]);ete({openModal:c,openConfirmModal:h,openContextModal:({modal:C,...T})=>d(C,T),closeModal:p,closeContextModal:p,closeAllModals:f,updateModal:v,updateContextModal:y});const b={modalProps:n||{},modals:r.modals,openModal:c,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:f,updateModal:v,updateContextModal:y},w=()=>{const C=o.current.current;switch(C==null?void 0:C.type){case"context":{const{innerProps:T,...A}=C.props,M=i[C.ctx];return{modalProps:A,content:k.jsx(M,{innerProps:T,context:b,id:C.id})}}case"confirm":{const{modalProps:T,confirmProps:A}=fte(C.props);return{modalProps:T,content:k.jsx(lte,{...A,id:C.id,labels:C.props.labels||t})}}case"content":{const{children:T,...A}=C.props;return{modalProps:A,content:T}}default:return{modalProps:{},content:null}}},{modalProps:_,content:S}=w();return k.jsxs(kC,{value:b,children:[k.jsx($r,{zIndex:ca("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var C;return p((C=r.current)==null?void 0:C.id)},children:S}),e]})}function dte(e){let n=e,t=!1;const i=new Set;return{getState(){return n},updateState(r){n=typeof r=="function"?r(n):r},setState(r){this.updateState(r),i.forEach(a=>a(n))},initialize(r){t||(n=r,t=!0)},subscribe(r){return i.add(r),()=>i.delete(r)}}}function hte(e){return O.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function mte(e,n,t){const i=[],r=[],a={};for(const o of e){const l=o.position||n;a[l]=a[l]||0,a[l]+=1,a[l]<=t?r.push(o):i.push(o)}return{notifications:r,queue:i}}const pte=()=>dte({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),ku=pte(),vte=(e=ku)=>hte(e);function Cc(e,n){const t=e.getState(),i=mte(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function gte(e,n=ku){const t=e.id||Xs();return Cc(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function cB(e,n=ku){return Cc(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function yte(e,n=ku){return Cc(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function bte(e=ku){Cc(e,()=>[])}function wte(e=ku){Cc(e,n=>n.slice(0,e.getState().limit))}const it={show:gte,hide:cB,update:yte,clean:bte,cleanQueue:wte,updateState:Cc},dB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function kte(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),dB.reduce((t,i)=>(t[i]=[],t),{}))}const lM={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},_te={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function xte({state:e,maxHeight:n,position:t,transitionDuration:i}){const[r,a]=t.split("-"),o=a==="center"?`${r}-center`:a,l={opacity:0,maxHeight:n,transform:lM[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},f={opacity:1,transform:_te[o]},c={opacity:0,maxHeight:0,transform:lM[o]};return{...l,...{entering:f,entered:f,exiting:c,exited:c}[e]}}function Ste(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function hB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:f,onOpen:c,...h}=e,d=Ste(t,e.autoClose),p=O.useRef(-1),[v,y]=O.useState(!1),b=()=>window.clearTimeout(p.current),w=()=>{n(e.id),b()},_=()=>{b(),typeof d=="number"&&(p.current=window.setTimeout(w,d))},S=()=>{y(!0),r==null||r()},C=()=>{y(!1),a==null||a()};return O.useEffect(()=>{var T;(T=e.onOpen)==null||T.call(e,e)},[]),O.useEffect(()=>(_(),b),[d]),O.useEffect(()=>(i||v?b():_(),b),[i,v]),k.jsx(ky,{...o,...h,onClose:w,onMouseEnter:S,onMouseLeave:C,children:f})}hB.displayName="@mantine/notifications/NotificationContainer";var mB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function fS(){return fS=Object.assign?Object.assign.bind():function(e){for(var n=1;n({root:{"--notifications-z-index":n==null?void 0:n.toString(),"--notifications-container-width":he(t)}}),uo=je(e=>{const n=be("Notifications",zte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,position:c,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:y,zIndex:b,store:w,portalProps:_,withinPortal:S,pauseResetOnHover:C,...T}=n,A=ti(),M=vte(w),j=JY(),N=f6(),F=O.useRef({}),R=O.useRef(0),[L,B]=O.useState(0),G=O.useCallback(()=>B(Y=>Y+1),[]),H=O.useCallback(()=>B(Y=>Math.max(0,Y-1)),[]),U=A.respectReducedMotion&&N?1:d,P=We({name:"Notifications",classes:mB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:gB});O.useEffect(()=>{w==null||w.updateState(Y=>({...Y,limit:y||5,defaultPosition:c}))},[y,c]),Wo(()=>{M.notifications.length>R.current&&setTimeout(()=>j(),0),R.current=M.notifications.length},[M.notifications]);const z=kte(M.notifications,c),q=dB.reduce((Y,D)=>(Y[D]=z[D].map(({style:V,...W})=>k.jsx($te,{timeout:U,onEnter:()=>F.current[W.id].offsetHeight,nodeRef:{current:F.current[W.id]},children:$=>k.jsx(hB,{ref:X=>{X&&(F.current[W.id]=X)},data:W,onHide:X=>cB(X,w),autoClose:h,paused:C==="all"?L>0:!1,onHoverStart:G,onHoverEnd:H,...P("notification",{style:{...xte({state:$,position:D,transitionDuration:U,maxHeight:v}),...V}})})},W.id)),Y),{});return k.jsxs(el,{withinPortal:S,..._,children:[k.jsx(_e,{...P("root"),"data-position":"top-center",...T,children:k.jsx(Bs,{children:q["top-center"]})}),k.jsx(_e,{...P("root"),"data-position":"top-left",...T,children:k.jsx(Bs,{children:q["top-left"]})}),k.jsx(_e,{...P("root",{className:nu.classNames.fullWidth}),"data-position":"top-right",...T,children:k.jsx(Bs,{children:q["top-right"]})}),k.jsx(_e,{...P("root",{className:nu.classNames.fullWidth}),"data-position":"bottom-right",...T,children:k.jsx(Bs,{children:q["bottom-right"]})}),k.jsx(_e,{...P("root"),"data-position":"bottom-left",...T,children:k.jsx(Bs,{children:q["bottom-left"]})}),k.jsx(_e,{...P("root"),"data-position":"bottom-center",...T,children:k.jsx(Bs,{children:q["bottom-center"]})})]})});uo.classes=mB;uo.varsResolver=gB;uo.displayName="@mantine/notifications/Notifications";uo.show=it.show;uo.hide=it.hide;uo.update=it.update;uo.clean=it.clean;uo.cleanQueue=it.cleanQueue;uo.updateState=it.updateState;var pk={exports:{}},Rd={},vk={exports:{}},gk={};/** - * @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 hM;function Lte(){return hM||(hM=1,(function(e){function n(P,z){var q=P.length;P.push(z);e:for(;0>>1,D=P[Y];if(0>>1;Yr($,q))Xr(ee,$)?(P[Y]=ee,P[X]=q,Y=X):(P[Y]=$,P[W]=q,Y=W);else if(Xr(ee,q))P[Y]=ee,P[X]=q,Y=X;else break e}}return z}function r(P,z){var q=P.sortIndex-z.sortIndex;return q!==0?q:P.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var f=[],c=[],h=1,d=null,p=3,v=!1,y=!1,b=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function T(P){for(var z=t(c);z!==null;){if(z.callback===null)i(c);else if(z.startTime<=P)i(c),z.sortIndex=z.expirationTime,n(f,z);else break;z=t(c)}}function A(P){if(b=!1,T(P),!y)if(t(f)!==null)y=!0,M||(M=!0,B());else{var z=t(c);z!==null&&U(A,z.startTime-P)}}var M=!1,j=-1,N=5,F=-1;function R(){return w?!0:!(e.unstable_now()-FP&&R());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var D=Y(d.expirationTime<=P);if(P=e.unstable_now(),typeof D=="function"){d.callback=D,T(P),z=!0;break n}d===t(f)&&i(f),T(P)}else i(f);d=t(f)}if(d!==null)z=!0;else{var V=t(c);V!==null&&U(A,V.startTime-P),z=!1}}break e}finally{d=null,p=q,v=!1}z=void 0}}finally{z?B():M=!1}}}var B;if(typeof C=="function")B=function(){C(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,H=G.port2;G.port1.onmessage=L,B=function(){H.postMessage(null)}}else B=function(){_(L,0)};function U(P,z){j=_(function(){P(e.unstable_now())},z)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125Y?(P.sortIndex=q,n(c,P),t(f)===null&&P===t(c)&&(b?(S(j),j=-1):b=!0,U(A,q-Y))):(P.sortIndex=D,n(f,P),y||v||(y=!0,M||(M=!0,B()))),P},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(P){var z=p;return function(){var q=p;p=z;try{return P.apply(this,arguments)}finally{p=q}}}})(gk)),gk}var mM;function Ite(){return mM||(mM=1,vk.exports=Lte()),vk.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 pM;function Bte(){if(pM)return Rd;pM=1;var e=Ite(),n=a6(),t=K$();function i(s){var u="https://react.dev/errors/"+s;if(1D||(s.current=Y[D],Y[D]=null,D--)}function $(s,u){D++,Y[D]=s.current,s.current=u}var X=V(null),ee=V(null),oe=V(null),ue=V(null);function ye(s,u){switch($(oe,u),$(ee,s),$(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?mT(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=mT(u),s=pT(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}W(X),$(X,s)}function ae(){W(X),W(ee),W(oe)}function le(s){s.memoizedState!==null&&$(ue,s);var u=X.current,m=pT(u,s.type);u!==m&&($(ee,s),$(X,m))}function Se(s){ee.current===s&&(W(X),W(ee)),ue.current===s&&(W(ue),Ad._currentValue=q)}var ne,$e;function ve(s){if(ne===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ne=u&&u[1]||"",$e=-1)":-1x||Q[g]!==ce[x]){var Oe=` -`+Q[g].replace(" at new "," at ");return s.displayName&&Oe.includes("")&&(Oe=Oe.replace("",s.displayName)),Oe}while(1<=g&&0<=x);break}}}finally{xe=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?ve(m):""}function we(s,u){switch(s.tag){case 26:case 27:case 5:return ve(s.type);case 16:return ve("Lazy");case 13:return s.child!==u&&u!==null?ve("Suspense Fallback"):ve("Suspense");case 19:return ve("SuspenseList");case 0:case 15:return De(s.type,!1);case 11:return De(s.type.render,!1);case 1:return De(s.type,!0);case 31:return ve("Activity");default:return""}}function re(s){try{var u="",m=null;do u+=we(s,m),m=s,s=s.return;while(s);return u}catch(g){return` -Error generating stack: `+g.message+` -`+g.stack}}var ke=Object.prototype.hasOwnProperty,Ie=e.unstable_scheduleCallback,qe=e.unstable_cancelCallback,Ue=e.unstable_shouldYield,Ve=e.unstable_requestPaint,me=e.unstable_now,Ge=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,He=e.unstable_NormalPriority,Ye=e.unstable_LowPriority,Ce=e.unstable_IdlePriority,Qe=e.log,ln=e.unstable_setDisableYieldValue,En=null,hn=null;function rn(s){if(typeof Qe=="function"&&ln(s),hn&&typeof hn.setStrictMode=="function")try{hn.setStrictMode(En,s)}catch{}}var Je=Math.clz32?Math.clz32:yt,zn=Math.log,un=Math.LN2;function yt(s){return s>>>=0,s===0?32:31-(zn(s)/un|0)|0}var Ct=256,Tn=262144,mn=4194304;function bn(s){var u=s&42;if(u!==0)return u;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ot(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var x=0,E=s.suspendedLanes,I=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~E,g!==0?x=bn(g):(I&=K,I!==0?x=bn(I):m||(m=K&~s,m!==0&&(x=bn(m))))):(K=g&~E,K!==0?x=bn(K):I!==0?x=bn(I):m||(m=g&~s,m!==0&&(x=bn(m)))),x===0?0:u!==0&&u!==x&&(u&E)===0&&(E=x&-x,m=u&-u,E>=m||E===32&&(m&4194048)!==0)?u:x}function $t(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Ne(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Be(){var s=mn;return mn<<=1,(mn&62914560)===0&&(mn=4194304),s}function An(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function Qn(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Sn(s,u,m,g,x,E){var I=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var K=s.entanglements,Q=s.expirationTimes,ce=s.hiddenUpdates;for(m=I&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var fs=/[\n"\\]/g;function wr(s){return s.replace(fs,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Ia(s,u,m,g,x,E,I,K){s.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?s.type=I:s.removeAttribute("type"),u!=null?I==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+Qt(u)):s.value!==""+Qt(u)&&(s.value=""+Qt(u)):I!=="submit"&&I!=="reset"||s.removeAttribute("value"),u!=null?cs(s,I,Qt(u)):m!=null?cs(s,I,Qt(m)):g!=null&&s.removeAttribute("value"),x==null&&E!=null&&(s.defaultChecked=!!E),x!=null&&(s.checked=x&&typeof x!="function"&&typeof x!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+Qt(K):s.removeAttribute("name")}function Tu(s,u,m,g,x,E,I,K){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(s.type=E),u!=null||m!=null){if(!(E!=="submit"&&E!=="reset"||u!=null)){Li(s);return}m=m!=null?""+Qt(m):"",u=u!=null?""+Qt(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}g=g??x,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=K?s.checked:!!g,s.defaultChecked=!!g,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(s.name=I),Li(s)}function cs(s,u,m){u==="number"&&Zi(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function ba(s,u,m,g){if(s=s.options,u){u={};for(var x=0;x"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),z0=!1;if(mo)try{var Uc={};Object.defineProperty(Uc,"passive",{get:function(){z0=!0}}),window.addEventListener("test",Uc,Uc),window.removeEventListener("test",Uc,Uc)}catch{z0=!1}var hs=null,L0=null,ip=null;function pA(){if(ip)return ip;var s,u=L0,m=u.length,g,x="value"in hs?hs.value:hs.textContent,E=x.length;for(s=0;s=Gc),kA=" ",_A=!1;function xA(s,u){switch(s){case"keyup":return ZW.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ru=!1;function JW(s,u){switch(s){case"compositionend":return SA(u);case"keypress":return u.which!==32?null:(_A=!0,kA);case"textInput":return s=u.data,s===kA&&_A?null:s;default:return null}}function eG(s,u){if(Ru)return s==="compositionend"||!H0&&xA(s,u)?(s=pA(),ip=L0=hs=null,Ru=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=DA(m)}}function PA(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?PA(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function NA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=Zi(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=Zi(s.document)}return u}function W0(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var lG=mo&&"documentMode"in document&&11>=document.documentMode,Pu=null,G0=null,Zc=null,Y0=!1;function $A(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Y0||Pu==null||Pu!==Zi(g)||(g=Pu,"selectionStart"in g&&W0(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Zc&&Xc(Zc,g)||(Zc=g,g=Xp(G0,"onSelect"),0>=I,x-=I,Ba=1<<32-Je(u)+x|m<Rn?(Yn=on,on=null):Yn=on.sibling;var tt=de(se,on,fe[Rn],Te);if(tt===null){on===null&&(on=Yn);break}s&&on&&tt.alternate===null&&u(se,on),ie=E(tt,ie,Rn),nt===null?dn=tt:nt.sibling=tt,nt=tt,on=Yn}if(Rn===fe.length)return m(se,on),Kn&&vo(se,Rn),dn;if(on===null){for(;RnRn?(Yn=on,on=null):Yn=on.sibling;var Ns=de(se,on,tt.value,Te);if(Ns===null){on===null&&(on=Yn);break}s&&on&&Ns.alternate===null&&u(se,on),ie=E(Ns,ie,Rn),nt===null?dn=Ns:nt.sibling=Ns,nt=Ns,on=Yn}if(tt.done)return m(se,on),Kn&&vo(se,Rn),dn;if(on===null){for(;!tt.done;Rn++,tt=fe.next())tt=Me(se,tt.value,Te),tt!==null&&(ie=E(tt,ie,Rn),nt===null?dn=tt:nt.sibling=tt,nt=tt);return Kn&&vo(se,Rn),dn}for(on=g(on);!tt.done;Rn++,tt=fe.next())tt=ge(on,se,Rn,tt.value,Te),tt!==null&&(s&&tt.alternate!==null&&on.delete(tt.key===null?Rn:tt.key),ie=E(tt,ie,Rn),nt===null?dn=tt:nt.sibling=tt,nt=tt);return s&&on.forEach(function(EY){return u(se,EY)}),Kn&&vo(se,Rn),dn}function vt(se,ie,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===b&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var dn=fe.key;ie!==null;){if(ie.key===dn){if(dn=fe.type,dn===b){if(ie.tag===7){m(se,ie.sibling),Te=x(ie,fe.props.children),Te.return=se,se=Te;break e}}else if(ie.elementType===dn||typeof dn=="object"&&dn!==null&&dn.$$typeof===N&&Cl(dn)===ie.type){m(se,ie.sibling),Te=x(ie,fe.props),id(Te,fe),Te.return=se,se=Te;break e}m(se,ie);break}else u(se,ie);ie=ie.sibling}fe.type===b?(Te=wl(fe.props.children,se.mode,Te,fe.key),Te.return=se,se=Te):(Te=hp(fe.type,fe.key,fe.props,null,se.mode,Te),id(Te,fe),Te.return=se,se=Te)}return I(se);case y:e:{for(dn=fe.key;ie!==null;){if(ie.key===dn)if(ie.tag===4&&ie.stateNode.containerInfo===fe.containerInfo&&ie.stateNode.implementation===fe.implementation){m(se,ie.sibling),Te=x(ie,fe.children||[]),Te.return=se,se=Te;break e}else{m(se,ie);break}else u(se,ie);ie=ie.sibling}Te=nb(fe,se.mode,Te),Te.return=se,se=Te}return I(se);case N:return fe=Cl(fe),vt(se,ie,fe,Te)}if(U(fe))return tn(se,ie,fe,Te);if(B(fe)){if(dn=B(fe),typeof dn!="function")throw Error(i(150));return fe=dn.call(fe),vn(se,ie,fe,Te)}if(typeof fe.then=="function")return vt(se,ie,wp(fe),Te);if(fe.$$typeof===C)return vt(se,ie,vp(se,fe),Te);kp(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,ie!==null&&ie.tag===6?(m(se,ie.sibling),Te=x(ie,fe),Te.return=se,se=Te):(m(se,ie),Te=eb(fe,se.mode,Te),Te.return=se,se=Te),I(se)):m(se,ie)}return function(se,ie,fe,Te){try{td=0;var dn=vt(se,ie,fe,Te);return Vu=null,dn}catch(on){if(on===Uu||on===yp)throw on;var nt=_r(29,on,null,se.mode);return nt.lanes=Te,nt.return=se,nt}finally{}}}var Ol=aO(!0),oO=aO(!1),ys=!1;function hb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mb(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function bs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function ws(s,u,m){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(st&2)!==0){var x=g.pending;return x===null?u.next=u:(u.next=x.next,x.next=u),g.pending=u,u=dp(s),HA(s,null,m),u}return cp(s,g,u,m),dp(s)}function rd(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,Xe(s,m)}}function pb(s,u){var m=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var x=null,E=null;if(m=m.firstBaseUpdate,m!==null){do{var I={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};E===null?x=E=I:E=E.next=I,m=m.next}while(m!==null);E===null?x=E=u:E=E.next=u}else x=E=u;m={baseState:g.baseState,firstBaseUpdate:x,lastBaseUpdate:E,shared:g.shared,callbacks:g.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var vb=!1;function ad(){if(vb){var s=Hu;if(s!==null)throw s}}function od(s,u,m,g){vb=!1;var x=s.updateQueue;ys=!1;var E=x.firstBaseUpdate,I=x.lastBaseUpdate,K=x.shared.pending;if(K!==null){x.shared.pending=null;var Q=K,ce=Q.next;Q.next=null,I===null?E=ce:I.next=ce,I=Q;var Oe=s.alternate;Oe!==null&&(Oe=Oe.updateQueue,K=Oe.lastBaseUpdate,K!==I&&(K===null?Oe.firstBaseUpdate=ce:K.next=ce,Oe.lastBaseUpdate=Q))}if(E!==null){var Me=x.baseState;I=0,Oe=ce=Q=null,K=E;do{var de=K.lane&-536870913,ge=de!==K.lane;if(ge?(Gn&de)===de:(g&de)===de){de!==0&&de===qu&&(vb=!0),Oe!==null&&(Oe=Oe.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var tn=s,vn=K;de=u;var vt=m;switch(vn.tag){case 1:if(tn=vn.payload,typeof tn=="function"){Me=tn.call(vt,Me,de);break e}Me=tn;break e;case 3:tn.flags=tn.flags&-65537|128;case 0:if(tn=vn.payload,de=typeof tn=="function"?tn.call(vt,Me,de):tn,de==null)break e;Me=d({},Me,de);break e;case 2:ys=!0}}de=K.callback,de!==null&&(s.flags|=64,ge&&(s.flags|=8192),ge=x.callbacks,ge===null?x.callbacks=[de]:ge.push(de))}else ge={lane:de,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Oe===null?(ce=Oe=ge,Q=Me):Oe=Oe.next=ge,I|=de;if(K=K.next,K===null){if(K=x.shared.pending,K===null)break;ge=K,K=ge.next,ge.next=null,x.lastBaseUpdate=ge,x.shared.pending=null}}while(!0);Oe===null&&(Q=Me),x.baseState=Q,x.firstBaseUpdate=ce,x.lastBaseUpdate=Oe,E===null&&(x.shared.lanes=0),Cs|=I,s.lanes=I,s.memoizedState=Me}}function sO(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function lO(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sE?E:8;var I=P.T,K={};P.T=K,Nb(s,!1,u,m);try{var Q=x(),ce=P.S;if(ce!==null&&ce(K,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var Oe=gG(Q,g);ud(s,u,Oe,Or(s))}else ud(s,u,g,Or(s))}catch(Me){ud(s,u,{then:function(){},status:"rejected",reason:Me},Or())}finally{z.p=E,I!==null&&K.types!==null&&(I.types=K.types),P.T=I}}function xG(){}function Rb(s,u,m,g){if(s.tag!==5)throw Error(i(476));var x=BO(s).queue;IO(s,x,u,q,m===null?xG:function(){return FO(s),m(g)})}function BO(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:q},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function FO(s){var u=BO(s);u.next===null&&(u=s.alternate.memoizedState),ud(s,u.next.queue,{},Or())}function Pb(){return Ei(Ad)}function qO(){return ei().memoizedState}function HO(){return ei().memoizedState}function SG(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=Or();s=bs(m);var g=ws(u,s,m);g!==null&&(fr(g,u,m),rd(g,u,m)),u={cache:ub()},s.payload=u;return}u=u.return}}function CG(s,u,m){var g=Or();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},jp(s)?VO(u,m):(m=Q0(s,u,m,g),m!==null&&(fr(m,s,g),WO(m,u,g)))}function UO(s,u,m){var g=Or();ud(s,u,m,g)}function ud(s,u,m,g){var x={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(jp(s))VO(u,x);else{var E=s.alternate;if(s.lanes===0&&(E===null||E.lanes===0)&&(E=u.lastRenderedReducer,E!==null))try{var I=u.lastRenderedState,K=E(I,m);if(x.hasEagerState=!0,x.eagerState=K,kr(K,I))return cp(s,u,x,0),wt===null&&fp(),!1}catch{}finally{}if(m=Q0(s,u,x,g),m!==null)return fr(m,s,g),WO(m,u,g),!0}return!1}function Nb(s,u,m,g){if(g={lane:2,revertLane:hw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},jp(s)){if(u)throw Error(i(479))}else u=Q0(s,m,g,2),u!==null&&fr(u,s,2)}function jp(s){var u=s.alternate;return s===Mn||u!==null&&u===Mn}function VO(s,u){Gu=Sp=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function WO(s,u,m){if((m&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,Xe(s,m)}}var fd={readContext:Ei,use:Op,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt,useHostTransitionStatus:Wt,useFormState:Wt,useActionState:Wt,useOptimistic:Wt,useMemoCache:Wt,useCacheRefresh:Wt};fd.useEffectEvent=Wt;var GO={readContext:Ei,use:Op,useCallback:function(s,u){return Qi().memoizedState=[s,u===void 0?null:u],s},useContext:Ei,useEffect:MO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,Tp(4194308,4,PO.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Tp(4194308,4,s,u)},useInsertionEffect:function(s,u){Tp(4,2,s,u)},useMemo:function(s,u){var m=Qi();u=u===void 0?null:u;var g=s();if(El){rn(!0);try{s()}finally{rn(!1)}}return m.memoizedState=[g,u],g},useReducer:function(s,u,m){var g=Qi();if(m!==void 0){var x=m(u);if(El){rn(!0);try{m(u)}finally{rn(!1)}}}else x=u;return g.memoizedState=g.baseState=x,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:x},g.queue=s,s=s.dispatch=CG.bind(null,Mn,s),[g.memoizedState,s]},useRef:function(s){var u=Qi();return s={current:s},u.memoizedState=s},useState:function(s){s=Eb(s);var u=s.queue,m=UO.bind(null,Mn,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:jb,useDeferredValue:function(s,u){var m=Qi();return Db(m,s,u)},useTransition:function(){var s=Eb(!1);return s=IO.bind(null,Mn,s.queue,!0,!1),Qi().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=Mn,x=Qi();if(Kn){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),wt===null)throw Error(i(349));(Gn&127)!==0||mO(g,u,m)}x.memoizedState=m;var E={value:m,getSnapshot:u};return x.queue=E,MO(vO.bind(null,g,E,s),[s]),g.flags|=2048,Ku(9,{destroy:void 0},pO.bind(null,g,E,m,u),null),m},useId:function(){var s=Qi(),u=wt.identifierPrefix;if(Kn){var m=Fa,g=Ba;m=(g&~(1<<32-Je(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Cp++,0<\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof g.is=="string"?I.createElement("select",{is:g.is}):I.createElement("select"),g.multiple?E.multiple=!0:g.size&&(E.size=g.size);break;default:E=typeof g.is=="string"?I.createElement(x,{is:g.is}):I.createElement(x)}}E[Bn]=u,E[zt]=g;e:for(I=u.child;I!==null;){if(I.tag===5||I.tag===6)E.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===u)break e;for(;I.sibling===null;){if(I.return===null||I.return===u)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}u.stateNode=E;e:switch(Mi(E,x,g),x){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&_o(u)}}return jt(u),Kb(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&_o(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(i(166));if(s=oe.current,Bu(u)){if(s=u.stateNode,m=u.memoizedProps,g=null,x=Oi,x!==null)switch(x.tag){case 27:case 5:g=x.memoizedProps}s[Bn]=u,s=!!(s.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||dT(s.nodeValue,m)),s||vs(u,!0)}else s=Zp(s).createTextNode(g),s[Bn]=u,u.stateNode=s}return jt(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(g=Bu(u),m!==null){if(s===null){if(!g)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Bn]=u}else kl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;jt(u),s=!1}else m=ab(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?(Sr(u),u):(Sr(u),null);if((u.flags&128)!==0)throw Error(i(558))}return jt(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(x=Bu(u),g!==null&&g.dehydrated!==null){if(s===null){if(!x)throw Error(i(318));if(x=u.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[Bn]=u}else kl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;jt(u),x=!1}else x=ab(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=x),x=!0;if(!x)return u.flags&256?(Sr(u),u):(Sr(u),null)}return Sr(u),(u.flags&128)!==0?(u.lanes=m,u):(m=g!==null,s=s!==null&&s.memoizedState!==null,m&&(g=u.child,x=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(x=g.alternate.memoizedState.cachePool.pool),E=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(E=g.memoizedState.cachePool.pool),E!==x&&(g.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),$p(u,u.updateQueue),jt(u),null);case 4:return ae(),s===null&&gw(u.stateNode.containerInfo),jt(u),null;case 10:return yo(u.type),jt(u),null;case 19:if(W(Jt),g=u.memoizedState,g===null)return jt(u),null;if(x=(u.flags&128)!==0,E=g.rendering,E===null)if(x)dd(g,!1);else{if(Gt!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(E=xp(s),E!==null){for(u.flags|=128,dd(g,!1),s=E.updateQueue,u.updateQueue=s,$p(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)UA(m,s),m=m.sibling;return $(Jt,Jt.current&1|2),Kn&&vo(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&me()>Fp&&(u.flags|=128,x=!0,dd(g,!1),u.lanes=4194304)}else{if(!x)if(s=xp(E),s!==null){if(u.flags|=128,x=!0,s=s.updateQueue,u.updateQueue=s,$p(u,s),dd(g,!0),g.tail===null&&g.tailMode==="hidden"&&!E.alternate&&!Kn)return jt(u),null}else 2*me()-g.renderingStartTime>Fp&&m!==536870912&&(u.flags|=128,x=!0,dd(g,!1),u.lanes=4194304);g.isBackwards?(E.sibling=u.child,u.child=E):(s=g.last,s!==null?s.sibling=E:u.child=E,g.last=E)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=me(),s.sibling=null,m=Jt.current,$(Jt,x?m&1|2:m&1),Kn&&vo(u,g.treeForkCount),s):(jt(u),null);case 22:case 23:return Sr(u),yb(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(m&536870912)!==0&&(u.flags&128)===0&&(jt(u),u.subtreeFlags&6&&(u.flags|=8192)):jt(u),m=u.updateQueue,m!==null&&$p(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048),s!==null&&W(Sl),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),yo(ii),jt(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function MG(s,u){switch(ib(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return yo(ii),ae(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return Se(u),null;case 31:if(u.memoizedState!==null){if(Sr(u),u.alternate===null)throw Error(i(340));kl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Sr(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));kl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return W(Jt),null;case 4:return ae(),null;case 10:return yo(u.type),null;case 22:case 23:return Sr(u),yb(),s!==null&&W(Sl),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return yo(ii),null;case 25:return null;default:return null}}function gE(s,u){switch(ib(u),u.tag){case 3:yo(ii),ae();break;case 26:case 27:case 5:Se(u);break;case 4:ae();break;case 31:u.memoizedState!==null&&Sr(u);break;case 13:Sr(u);break;case 19:W(Jt);break;case 10:yo(u.type);break;case 22:case 23:Sr(u),yb(),s!==null&&W(Sl);break;case 24:yo(ii)}}function hd(s,u){try{var m=u.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var x=g.next;m=x;do{if((m.tag&s)===s){g=void 0;var E=m.create,I=m.inst;g=E(),I.destroy=g}m=m.next}while(m!==x)}}catch(K){dt(u,u.return,K)}}function xs(s,u,m){try{var g=u.updateQueue,x=g!==null?g.lastEffect:null;if(x!==null){var E=x.next;g=E;do{if((g.tag&s)===s){var I=g.inst,K=I.destroy;if(K!==void 0){I.destroy=void 0,x=u;var Q=m,ce=K;try{ce()}catch(Oe){dt(x,Q,Oe)}}}g=g.next}while(g!==E)}}catch(Oe){dt(u,u.return,Oe)}}function yE(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{lO(u,m)}catch(g){dt(s,s.return,g)}}}function bE(s,u,m){m.props=Tl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){dt(s,u,g)}}function md(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof m=="function"?s.refCleanup=m(g):m.current=g}}catch(x){dt(s,u,x)}}function qa(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(x){dt(s,u,x)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(x){dt(s,u,x)}else m.current=null}function wE(s){var u=s.type,m=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(x){dt(s,s.return,x)}}function Xb(s,u,m){try{var g=s.stateNode;QG(g,s.type,m,u),g[zt]=u}catch(x){dt(s,s.return,x)}}function kE(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ms(s.type)||s.tag===4}function Zb(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||kE(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ms(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Qb(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=ho));else if(g!==4&&(g===27&&Ms(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(Qb(s,u,m),s=s.sibling;s!==null;)Qb(s,u,m),s=s.sibling}function zp(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(g!==4&&(g===27&&Ms(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(zp(s,u,m),s=s.sibling;s!==null;)zp(s,u,m),s=s.sibling}function _E(s){var u=s.stateNode,m=s.memoizedProps;try{for(var g=s.type,x=u.attributes;x.length;)u.removeAttributeNode(x[0]);Mi(u,g,m),u[Bn]=s,u[zt]=m}catch(E){dt(s,s.return,E)}}var xo=!1,oi=!1,Jb=!1,xE=typeof WeakSet=="function"?WeakSet:Set,wi=null;function jG(s,u){if(s=s.containerInfo,ww=rv,s=NA(s),W0(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var x=g.anchorOffset,E=g.focusNode;g=g.focusOffset;try{m.nodeType,E.nodeType}catch{m=null;break e}var I=0,K=-1,Q=-1,ce=0,Oe=0,Me=s,de=null;n:for(;;){for(var ge;Me!==m||x!==0&&Me.nodeType!==3||(K=I+x),Me!==E||g!==0&&Me.nodeType!==3||(Q=I+g),Me.nodeType===3&&(I+=Me.nodeValue.length),(ge=Me.firstChild)!==null;)de=Me,Me=ge;for(;;){if(Me===s)break n;if(de===m&&++ce===x&&(K=I),de===E&&++Oe===g&&(Q=I),(ge=Me.nextSibling)!==null)break;Me=de,de=Me.parentNode}Me=ge}m=K===-1||Q===-1?null:{start:K,end:Q}}else m=null}m=m||{start:0,end:0}}else m=null;for(kw={focusedElem:s,selectionRange:m},rv=!1,wi=u;wi!==null;)if(u=wi,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,wi=s;else for(;wi!==null;){switch(u=wi,E=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),Mi(E,g,m),E[Bn]=s,an(E),g=E;break e;case"link":var I=TT("link","href",x).get(g+(m.href||""));if(I){for(var K=0;Kvt&&(I=vt,vt=vn,vn=I);var se=RA(K,vn),ie=RA(K,vt);if(se&&ie&&(ge.rangeCount!==1||ge.anchorNode!==se.node||ge.anchorOffset!==se.offset||ge.focusNode!==ie.node||ge.focusOffset!==ie.offset)){var fe=Me.createRange();fe.setStart(se.node,se.offset),ge.removeAllRanges(),vn>vt?(ge.addRange(fe),ge.extend(ie.node,ie.offset)):(fe.setEnd(ie.node,ie.offset),ge.addRange(fe))}}}}for(Me=[],ge=K;ge=ge.parentNode;)ge.nodeType===1&&Me.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,P.T=null,m=ow,ow=null;var E=Os,I=Eo;if(hi=0,ef=Os=null,Eo=0,(st&6)!==0)throw Error(i(331));var K=st;if(st|=4,PE(E.current),jE(E,E.current,I,m),st=K,wd(0,!1),hn&&typeof hn.onPostCommitFiberRoot=="function")try{hn.onPostCommitFiberRoot(En,E)}catch{}return!0}finally{z.p=x,P.T=g,QE(s,u)}}function eT(s,u,m){u=qr(m,u),u=Ib(s.stateNode,u,2),s=ws(s,u,2),s!==null&&(Qn(s,2),Ha(s))}function dt(s,u,m){if(s.tag===3)eT(s,s,m);else for(;u!==null;){if(u.tag===3){eT(u,s,m);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(As===null||!As.has(g))){s=qr(m,s),m=nE(2),g=ws(u,m,2),g!==null&&(tE(m,g,u,s),Qn(g,2),Ha(g));break}}u=u.return}}function fw(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new PG;var x=new Set;g.set(u,x)}else x=g.get(u),x===void 0&&(x=new Set,g.set(u,x));x.has(m)||(tw=!0,x.add(m),s=IG.bind(null,s,u,m),u.then(s,s))}function IG(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,wt===s&&(Gn&m)===m&&(Gt===4||Gt===3&&(Gn&62914560)===Gn&&300>me()-Bp?(st&2)===0&&nf(s,0):iw|=m,Ju===Gn&&(Ju=0)),Ha(s)}function nT(s,u){u===0&&(u=Be()),s=bl(s,u),s!==null&&(Qn(s,u),Ha(s))}function BG(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),nT(s,m)}function FG(s,u){var m=0;switch(s.tag){case 31:case 13:var g=s.stateNode,x=s.memoizedState;x!==null&&(m=x.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(i(314))}g!==null&&g.delete(u),nT(s,m)}function qG(s,u){return Ie(s,u)}var Gp=null,rf=null,cw=!1,Yp=!1,dw=!1,Ts=0;function Ha(s){s!==rf&&s.next===null&&(rf===null?Gp=rf=s:rf=rf.next=s),Yp=!0,cw||(cw=!0,UG())}function wd(s,u){if(!dw&&Yp){dw=!0;do for(var m=!1,g=Gp;g!==null;){if(s!==0){var x=g.pendingLanes;if(x===0)var E=0;else{var I=g.suspendedLanes,K=g.pingedLanes;E=(1<<31-Je(42|s)+1)-1,E&=x&~(I&~K),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(m=!0,aT(g,E))}else E=Gn,E=ot(g,g===wt?E:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(E&3)===0||$t(g,E)||(m=!0,aT(g,E));g=g.next}while(m);dw=!1}}function HG(){tT()}function tT(){Yp=cw=!1;var s=0;Ts!==0&&eY()&&(s=Ts);for(var u=me(),m=null,g=Gp;g!==null;){var x=g.next,E=iT(g,u);E===0?(g.next=null,m===null?Gp=x:m.next=x,x===null&&(rf=m)):(m=g,(s!==0||(E&3)!==0)&&(Yp=!0)),g=x}hi!==0&&hi!==5||wd(s),Ts!==0&&(Ts=0)}function iT(s,u){for(var m=s.suspendedLanes,g=s.pingedLanes,x=s.expirationTimes,E=s.pendingLanes&-62914561;0K)break;var Oe=Q.transferSize,Me=Q.initiatorType;Oe&&hT(Me)&&(Q=Q.responseEnd,I+=Oe*(Q"u"?null:document;function CT(s,u,m){var g=af;if(g&&typeof u=="string"&&u){var x=wr(u);x='link[rel="'+s+'"][href="'+x+'"]',typeof m=="string"&&(x+='[crossorigin="'+m+'"]'),ST.has(x)||(ST.add(x),s={rel:s,crossOrigin:m,href:u},g.querySelector(x)===null&&(u=g.createElement("link"),Mi(u,"link",s),an(u),g.head.appendChild(u)))}}function uY(s){To.D(s),CT("dns-prefetch",s,null)}function fY(s,u){To.C(s,u),CT("preconnect",s,u)}function cY(s,u,m){To.L(s,u,m);var g=af;if(g&&s&&u){var x='link[rel="preload"][as="'+wr(u)+'"]';u==="image"&&m&&m.imageSrcSet?(x+='[imagesrcset="'+wr(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(x+='[imagesizes="'+wr(m.imageSizes)+'"]')):x+='[href="'+wr(s)+'"]';var E=x;switch(u){case"style":E=of(s);break;case"script":E=sf(s)}Yr.has(E)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),Yr.set(E,s),g.querySelector(x)!==null||u==="style"&&g.querySelector(Sd(E))||u==="script"&&g.querySelector(Cd(E))||(u=g.createElement("link"),Mi(u,"link",s),an(u),g.head.appendChild(u)))}}function dY(s,u){To.m(s,u);var m=af;if(m&&s){var g=u&&typeof u.as=="string"?u.as:"script",x='link[rel="modulepreload"][as="'+wr(g)+'"][href="'+wr(s)+'"]',E=x;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=sf(s)}if(!Yr.has(E)&&(s=d({rel:"modulepreload",href:s},u),Yr.set(E,s),m.querySelector(x)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Cd(E)))return}g=m.createElement("link"),Mi(g,"link",s),an(g),m.head.appendChild(g)}}}function hY(s,u,m){To.S(s,u,m);var g=af;if(g&&s){var x=ci(g).hoistableStyles,E=of(s);u=u||"default";var I=x.get(E);if(!I){var K={loading:0,preload:null};if(I=g.querySelector(Sd(E)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=Yr.get(E))&&Ew(s,m);var Q=I=g.createElement("link");an(Q),Mi(Q,"link",s),Q._p=new Promise(function(ce,Oe){Q.onload=ce,Q.onerror=Oe}),Q.addEventListener("load",function(){K.loading|=1}),Q.addEventListener("error",function(){K.loading|=2}),K.loading|=4,Jp(I,u,g)}I={type:"stylesheet",instance:I,count:1,state:K},x.set(E,I)}}}function mY(s,u){To.X(s,u);var m=af;if(m&&s){var g=ci(m).hoistableScripts,x=sf(s),E=g.get(x);E||(E=m.querySelector(Cd(x)),E||(s=d({src:s,async:!0},u),(u=Yr.get(x))&&Tw(s,u),E=m.createElement("script"),an(E),Mi(E,"link",s),m.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},g.set(x,E))}}function pY(s,u){To.M(s,u);var m=af;if(m&&s){var g=ci(m).hoistableScripts,x=sf(s),E=g.get(x);E||(E=m.querySelector(Cd(x)),E||(s=d({src:s,async:!0,type:"module"},u),(u=Yr.get(x))&&Tw(s,u),E=m.createElement("script"),an(E),Mi(E,"link",s),m.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},g.set(x,E))}}function AT(s,u,m,g){var x=(x=oe.current)?Qp(x):null;if(!x)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=of(m.href),m=ci(x).hoistableStyles,g=m.get(u),g||(g={type:"style",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=of(m.href);var E=ci(x).hoistableStyles,I=E.get(s);if(I||(x=x.ownerDocument||x,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(s,I),(E=x.querySelector(Sd(s)))&&!E._p&&(I.instance=E,I.state.loading=5),Yr.has(s)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},Yr.set(s,m),E||vY(x,s,m,I.state))),u&&g===null)throw Error(i(528,""));return I}if(u&&g!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=sf(m),m=ci(x).hoistableScripts,g=m.get(u),g||(g={type:"script",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function of(s){return'href="'+wr(s)+'"'}function Sd(s){return'link[rel="stylesheet"]['+s+"]"}function OT(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function vY(s,u,m,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),Mi(u,"link",m),an(u),s.head.appendChild(u))}function sf(s){return'[src="'+wr(s)+'"]'}function Cd(s){return"script[async]"+s}function ET(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+wr(m.href)+'"]');if(g)return u.instance=g,an(g),g;var x=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),an(g),Mi(g,"style",x),Jp(g,m.precedence,s),u.instance=g;case"stylesheet":x=of(m.href);var E=s.querySelector(Sd(x));if(E)return u.state.loading|=4,u.instance=E,an(E),E;g=OT(m),(x=Yr.get(x))&&Ew(g,x),E=(s.ownerDocument||s).createElement("link"),an(E);var I=E;return I._p=new Promise(function(K,Q){I.onload=K,I.onerror=Q}),Mi(E,"link",g),u.state.loading|=4,Jp(E,m.precedence,s),u.instance=E;case"script":return E=sf(m.src),(x=s.querySelector(Cd(E)))?(u.instance=x,an(x),x):(g=m,(x=Yr.get(E))&&(g=d({},m),Tw(g,x)),s=s.ownerDocument||s,x=s.createElement("script"),an(x),Mi(x,"link",g),s.head.appendChild(x),u.instance=x);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,Jp(g,m.precedence,s));return u.instance}function Jp(s,u,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=g.length?g[g.length-1]:null,E=x,I=0;I title"):null)}function gY(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function jT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function yY(s,u,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var x=of(g.href),E=u.querySelector(Sd(x));if(E){u=E._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=nv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=E,an(E);return}E=u.ownerDocument||u,g=OT(g),(x=Yr.get(x))&&Ew(g,x),E=E.createElement("link"),an(E);var I=E;I._p=new Promise(function(K,Q){I.onload=K,I.onerror=Q}),Mi(E,"link",g),m.instance=E}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=nv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Mw=0;function bY(s,u){return s.stylesheets&&s.count===0&&iv(s,s.stylesheets),0Mw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(x)}}:null}function nv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)iv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var tv=null;function iv(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,tv=new Map,u.forEach(wY,s),tv=null,nv.call(s))}function wY(s,u){if(!(u.state.loading&4)){var m=tv.get(s);if(m)var g=m.get(null);else{m=new Map,tv.set(s,m);for(var x=s.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),pk.exports=Bte(),pk.exports}var qte=Fte();class yB extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function Hte(e,n,t){const i=await fetch(`${t}${e}`,{credentials:"include",...n,headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)??{}}});if(!i.ok){const r=await i.json().catch(()=>({Message:i.statusText}));throw new yB(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const Ute="/api";function Ht(e,n){return Hte(e,n,Ute)}function Vte(){return Ht("/board")}function Wte(e){return Ht("/columns",{method:"POST",body:JSON.stringify({name:e})})}function hf(e,n){return Ht(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Gte(e){return Ht(`/columns/${e}`,{method:"DELETE"})}function Yte(e){return Ht("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function Kte(e){return Ht("/cards",{method:"POST",body:JSON.stringify(e)})}function Pd(e,n){return Ht(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Xte(e){return Ht(`/cards/${e}`,{method:"DELETE"})}function yk(e,n){return Ht(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function Zte(){return Ht("/trash")}function Qte(e){return Ht(`/cards/${e}/restore`,{method:"POST"})}function Jte(e){return Ht(`/cards/${e}/purge`,{method:"DELETE"})}function eie(e,n,t){return Ht(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function nie(e){return Ht(`/cards/${e}/history`)}function tie(e){return Ht("/chat",{method:"POST",body:JSON.stringify({messages:e})})}function gM(e,n){return Ht("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function iie(e,n,t){return Ht("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function rie(){return Ht("/auth/logout",{method:"POST"})}function aie(){return Ht("/me")}function yM(e){return Ht("/me",{method:"PATCH",body:JSON.stringify(e)})}function bB(){return Ht("/users")}function wB(){return Ht("/tags")}function oie(){return Ht("/requesters")}function kB(e){const n=new URLSearchParams;e.from&&n.set("from",e.from),e.to&&n.set("to",e.to),e.assignee_id&&n.set("assignee_id",e.assignee_id),e.requester&&n.set("requester",e.requester),e.tags&&e.tags.length>0&&n.set("tags",e.tags.join(","));const t=n.toString();return Ht(`/metrics${t?`?${t}`:""}`)}const _B=O.createContext(null);function sie({children:e}){const[n,t]=O.useState(null),[i,r]=O.useState(!0);O.useEffect(()=>{aie().then(t).catch(f=>{(!(f instanceof yB)||f.status!==401)&&console.warn("getMe failed",f)}).finally(()=>r(!1))},[]);const a=O.useCallback(async(f,c)=>{const h=await gM(f,c);t(h)},[]),o=O.useCallback(async(f,c,h)=>{await iie(f,c,h);const d=await gM(f,c);t(d)},[]),l=O.useCallback(async()=>{await rie(),t(null)},[]);return k.jsx(_B.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function xC(){const e=O.useContext(_B);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function lie(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const Ey=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ac(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function SC(e){return"nodeType"in e}function rr(e){var n,t;return e?Ac(e)?e:SC(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function CC(e){const{Document:n}=rr(e);return e instanceof n}function Nm(e){return Ac(e)?!1:e instanceof rr(e).HTMLElement}function xB(e){return e instanceof rr(e).SVGElement}function Oc(e){return e?Ac(e)?e.document:SC(e)?CC(e)?e:Nm(e)||xB(e)?e.ownerDocument:document:document:document}const Pa=Ey?O.useLayoutEffect:O.useEffect;function Ty(e){const n=O.useRef(e);return Pa(()=>{n.current=e}),O.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=O.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function jh(e,n){n===void 0&&(n=[e]);const t=O.useRef(e);return Pa(()=>{t.current!==e&&(t.current=e)},n),t}function $m(e,n){const t=O.useRef();return O.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function gg(e){const n=Ty(e),t=O.useRef(null),i=O.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function yg(e){const n=O.useRef();return O.useEffect(()=>{n.current=e},[e]),n.current}let bk={};function zm(e,n){return O.useMemo(()=>{if(n)return n;const t=bk[e]==null?0:bk[e]+1;return bk[e]=t,e+"-"+t},[e,n])}function SB(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[f,c]of l){const h=a[f];h!=null&&(a[f]=h+e*c)}return a},{...n})}}const Tf=SB(1),Dh=SB(-1);function fie(e){return"clientX"in e&&"clientY"in e}function My(e){if(!e)return!1;const{KeyboardEvent:n}=rr(e.target);return n&&e instanceof n}function cie(e){if(!e)return!1;const{TouchEvent:n}=rr(e.target);return n&&e instanceof n}function bg(e){if(cie(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return fie(e)?{x:e.clientX,y:e.clientY}:null}const to=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[to.Translate.toString(e),to.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),bM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function die(e){return e.matches(bM)?e:e.querySelector(bM)}const hie={display:"none"};function mie(e){let{id:n,value:t}=e;return Z.createElement("div",{id:n,style:hie},t)}function pie(e){let{id:n,announcement:t,ariaLiveType:i="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Z.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function vie(){const[e,n]=O.useState("");return{announce:O.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const CB=O.createContext(null);function gie(e){const n=O.useContext(CB);O.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function yie(){const[e]=O.useState(()=>new Set),n=O.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[O.useCallback(i=>{let{type:r,event:a}=i;e.forEach(o=>{var l;return(l=o[r])==null?void 0:l.call(o,a)})},[e]),n]}const bie={draggable:` - To pick up a draggable item, press the space bar. - While dragging, use the arrow keys to move the item. - Press space again to drop the item in its new position, or press escape to cancel. - `},wie={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function kie(e){let{announcements:n=wie,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=bie}=e;const{announce:a,announcement:o}=vie(),l=zm("DndLiveRegion"),[f,c]=O.useState(!1);if(O.useEffect(()=>{c(!0)},[]),gie(O.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!f)return null;const h=Z.createElement(Z.Fragment,null,Z.createElement(mie,{id:i,value:r.draggable}),Z.createElement(pie,{id:l,announcement:o}));return t?Vs.createPortal(h,t):h}var vi;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(vi||(vi={}));function wg(){}function wM(e,n){return O.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function _ie(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Na=Object.freeze({x:0,y:0});function AC(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function xie(e,n){const t=bg(e);if(!t)return"0 0";const i={x:(t.x-n.left)/n.width*100,y:(t.y-n.top)/n.height*100};return i.x+"% "+i.y+"%"}function OC(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function Sie(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function hS(e){let{left:n,top:t,height:i,width:r}=e;return[{x:n,y:t},{x:n+r,y:t},{x:n,y:t+i},{x:n+r,y:t+i}]}function AB(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function kM(e,n,t){return n===void 0&&(n=e.left),t===void 0&&(t=e.top),{x:n+e.width*.5,y:t+e.height*.5}}const Cie=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=kM(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=AC(kM(f),r);a.push({id:l,data:{droppableContainer:o,value:c}})}}return a.sort(OC)},OB=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=hS(n),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=hS(f),h=r.reduce((p,v,y)=>p+AC(c[y],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(OC)};function Aie(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const f=Aie(l,n);f>0&&r.push({id:o,data:{droppableContainer:a,value:f}})}}return r.sort(Sie)};function Oie(e,n){const{top:t,left:i,bottom:r,right:a}=n;return t<=e.y&&e.y<=r&&i<=e.x&&e.x<=a}const Eie=e=>{let{droppableContainers:n,droppableRects:t,pointerCoordinates:i}=e;if(!i)return[];const r=[];for(const a of n){const{id:o}=a,l=t.get(o);if(l&&Oie(i,l)){const c=hS(l).reduce((d,p)=>d+AC(i,p),0),h=Number((c/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(OC)};function Tie(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function TB(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Na}function Mie(e){return function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...t})}}const jie=Mie(1);function MB(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function Die(e,n,t){const i=MB(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,f=e.left-o-(1-r)*parseFloat(t),c=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:c,right:f+h,bottom:c+d,left:f}}const Rie={ignoreTransform:!1};function Ec(e,n){n===void 0&&(n=Rie);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:c,transformOrigin:h}=rr(e).getComputedStyle(e);c&&(t=Die(t,c,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:f}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:f}}function _M(e){return Ec(e,{ignoreTransform:!0})}function Pie(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Nie(e,n){return n===void 0&&(n=rr(e).getComputedStyle(e)),n.position==="fixed"}function $ie(e,n){n===void 0&&(n=rr(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const a=n[r];return typeof a=="string"?t.test(a):!1})}function jy(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(CC(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!Nm(r)||xB(r)||t.includes(r))return t;const a=rr(e).getComputedStyle(r);return r!==e&&$ie(r,a)&&t.push(r),Nie(r,a)?t:i(r.parentNode)}return e?i(e):t}function jB(e){const[n]=jy(e,1);return n??null}function wk(e){return!Ey||!e?null:Ac(e)?e:SC(e)?CC(e)||e===Oc(e).scrollingElement?window:Nm(e)?e:null:null}function DB(e){return Ac(e)?e.scrollX:e.scrollLeft}function RB(e){return Ac(e)?e.scrollY:e.scrollTop}function mS(e){return{x:DB(e),y:RB(e)}}var xi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(xi||(xi={}));function PB(e){return!Ey||!e?!1:e===document.scrollingElement}function NB(e){const n={x:0,y:0},t=PB(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height},r=e.scrollTop<=n.y,a=e.scrollLeft<=n.x,o=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:r,isLeft:a,isBottom:o,isRight:l,maxScroll:i,minScroll:n}}const zie={x:.2,y:.2};function Lie(e,n,t,i,r){let{top:a,left:o,right:l,bottom:f}=t;i===void 0&&(i=10),r===void 0&&(r=zie);const{isTop:c,isBottom:h,isLeft:d,isRight:p}=NB(e),v={x:0,y:0},y={x:0,y:0},b={height:n.height*r.y,width:n.width*r.x};return!c&&a<=n.top+b.height?(v.y=xi.Backward,y.y=i*Math.abs((n.top+b.height-a)/b.height)):!h&&f>=n.bottom-b.height&&(v.y=xi.Forward,y.y=i*Math.abs((n.bottom-b.height-f)/b.height)),!p&&l>=n.right-b.width?(v.x=xi.Forward,y.x=i*Math.abs((n.right-b.width-l)/b.width)):!d&&o<=n.left+b.width&&(v.x=xi.Backward,y.x=i*Math.abs((n.left+b.width-o)/b.width)),{direction:v,speed:y}}function Iie(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:n,left:t,right:i,bottom:r}=e.getBoundingClientRect();return{top:n,left:t,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function $B(e){return e.reduce((n,t)=>Tf(n,mS(t)),Na)}function Bie(e){return e.reduce((n,t)=>n+DB(t),0)}function Fie(e){return e.reduce((n,t)=>n+RB(t),0)}function zB(e,n){if(n===void 0&&(n=Ec),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);jB(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const qie=[["x",["left","right"],Bie],["y",["top","bottom"],Fie]];class EC{constructor(n,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=jy(t),r=$B(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of qie)for(const f of o)Object.defineProperty(this,f,{get:()=>{const c=l(i),h=r[a]-c;return this.rect[f]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class fh{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=n}add(n,t,i){var r;(r=this.target)==null||r.addEventListener(n,t,i),this.listeners.push([n,t,i])}}function Hie(e){const{EventTarget:n}=rr(e);return e instanceof n?e:Oc(e)}function kk(e,n){const t=Math.abs(e.x),i=Math.abs(e.y);return typeof n=="number"?Math.sqrt(t**2+i**2)>n:"x"in n&&"y"in n?t>n.x&&i>n.y:"x"in n?t>n.x:"y"in n?i>n.y:!1}var ea;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ea||(ea={}));function xM(e){e.preventDefault()}function Uie(e){e.stopPropagation()}var Xn;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Xn||(Xn={}));const LB={start:[Xn.Space,Xn.Enter],cancel:[Xn.Esc],end:[Xn.Space,Xn.Enter,Xn.Tab]},Vie=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case Xn.Right:return{...t,x:t.x+25};case Xn.Left:return{...t,x:t.x-25};case Xn.Down:return{...t,y:t.y+25};case Xn.Up:return{...t,y:t.y-25}}};class TC{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:t}}=n;this.props=n,this.listeners=new fh(Oc(t)),this.windowListeners=new fh(rr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ea.Resize,this.handleCancel),this.windowListeners.add(ea.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ea.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&zB(i),t(Na)}handleKeyDown(n){if(My(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=LB,coordinateGetter:o=Vie,scrollBehavior:l="smooth"}=r,{code:f}=n;if(a.end.includes(f)){this.handleEnd(n);return}if(a.cancel.includes(f)){this.handleCancel(n);return}const{collisionRect:c}=i.current,h=c?{x:c.left,y:c.top}:Na;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=Dh(d,h),v={x:0,y:0},{scrollableAncestors:y}=i.current;for(const b of y){const w=n.code,{isTop:_,isRight:S,isLeft:C,isBottom:T,maxScroll:A,minScroll:M}=NB(b),j=Iie(b),N={x:Math.min(w===Xn.Right?j.right-j.width/2:j.right,Math.max(w===Xn.Right?j.left:j.left+j.width/2,d.x)),y:Math.min(w===Xn.Down?j.bottom-j.height/2:j.bottom,Math.max(w===Xn.Down?j.top:j.top+j.height/2,d.y))},F=w===Xn.Right&&!S||w===Xn.Left&&!C,R=w===Xn.Down&&!T||w===Xn.Up&&!_;if(F&&N.x!==d.x){const L=b.scrollLeft+p.x,B=w===Xn.Right&&L<=A.x||w===Xn.Left&&L>=M.x;if(B&&!p.y){b.scrollTo({left:L,behavior:l});return}B?v.x=b.scrollLeft-L:v.x=w===Xn.Right?b.scrollLeft-A.x:b.scrollLeft-M.x,v.x&&b.scrollBy({left:-v.x,behavior:l});break}else if(R&&N.y!==d.y){const L=b.scrollTop+p.y,B=w===Xn.Down&&L<=A.y||w===Xn.Up&&L>=M.y;if(B&&!p.x){b.scrollTo({top:L,behavior:l});return}B?v.y=b.scrollTop-L:v.y=w===Xn.Down?b.scrollTop-A.y:b.scrollTop-M.y,v.y&&b.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Tf(Dh(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}TC.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=LB,onActivation:r}=n,{active:a}=t;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r==null||r({event:e.nativeEvent}),!0)}return!1}}];function SM(e){return!!(e&&"distance"in e)}function CM(e){return!!(e&&"delay"in e)}class MC{constructor(n,t,i){var r;i===void 0&&(i=Hie(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=t;const{event:a}=n,{target:o}=a;this.props=n,this.events=t,this.document=Oc(o),this.documentListeners=new fh(this.document),this.listeners=new fh(i),this.windowListeners=new fh(rr(o)),this.initialCoordinates=(r=bg(a))!=null?r:Na,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(ea.Resize,this.handleCancel),this.windowListeners.add(ea.DragStart,xM),this.windowListeners.add(ea.VisibilityChange,this.handleCancel),this.windowListeners.add(ea.ContextMenu,xM),this.documentListeners.add(ea.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(CM(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(SM(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,t){const{active:i,onPending:r}=this.props;r(i,n,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:n}=this,{onStart:t}=this.props;n&&(this.activated=!0,this.documentListeners.add(ea.Click,Uie,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ea.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const f=(t=bg(n))!=null?t:Na,c=Dh(r,f);if(!i&&l){if(SM(l)){if(l.tolerance!=null&&kk(c,l.tolerance))return this.handleCancel();if(kk(c,l.distance))return this.handleStart()}if(CM(l)&&kk(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}n.cancelable&&n.preventDefault(),o(f)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===Xn.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Wie={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class jC extends MC{constructor(n){const{event:t}=n,i=Oc(t.target);super(n,Wie,i)}}jC.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return!t.isPrimary||t.button!==0?!1:(i==null||i({event:t}),!0)}}];const Gie={move:{name:"mousemove"},end:{name:"mouseup"}};var pS;(function(e){e[e.RightClick=2]="RightClick"})(pS||(pS={}));class Yie extends MC{constructor(n){super(n,Gie,Oc(n.event.target))}}Yie.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===pS.RightClick?!1:(i==null||i({event:t}),!0)}}];const _k={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Kie extends MC{constructor(n){super(n,_k)}static setup(){return window.addEventListener(_k.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(_k.move.name,n)};function n(){}}}Kie.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;const{touches:r}=t;return r.length>1?!1:(i==null||i({event:t}),!0)}}];var ch;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ch||(ch={}));var kg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(kg||(kg={}));function Xie(e){let{acceleration:n,activator:t=ch.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=kg.TreeOrder,pointerCoordinates:f,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=Qie({delta:d,disabled:!a}),[y,b]=uie(),w=O.useRef({x:0,y:0}),_=O.useRef({x:0,y:0}),S=O.useMemo(()=>{switch(t){case ch.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case ch.DraggableRect:return r}},[t,r,f]),C=O.useRef(null),T=O.useCallback(()=>{const M=C.current;if(!M)return;const j=w.current.x*_.current.x,N=w.current.y*_.current.y;M.scrollBy(j,N)},[]),A=O.useMemo(()=>l===kg.TreeOrder?[...c].reverse():c,[l,c]);O.useEffect(()=>{if(!a||!c.length||!S){b();return}for(const M of A){if((i==null?void 0:i(M))===!1)continue;const j=c.indexOf(M),N=h[j];if(!N)continue;const{direction:F,speed:R}=Lie(M,N,S,n,p);for(const L of["x","y"])v[L][F[L]]||(R[L]=0,F[L]=0);if(R.x>0||R.y>0){b(),C.current=M,y(T,o),w.current=R,_.current=F;return}}w.current={x:0,y:0},_.current={x:0,y:0},b()},[n,T,i,b,a,o,JSON.stringify(S),JSON.stringify(v),y,c,A,h,JSON.stringify(p)])}const Zie={x:{[xi.Backward]:!1,[xi.Forward]:!1},y:{[xi.Backward]:!1,[xi.Forward]:!1}};function Qie(e){let{delta:n,disabled:t}=e;const i=yg(n);return $m(r=>{if(t||!i||!r)return Zie;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[xi.Backward]:r.x[xi.Backward]||a.x===-1,[xi.Forward]:r.x[xi.Forward]||a.x===1},y:{[xi.Backward]:r.y[xi.Backward]||a.y===-1,[xi.Forward]:r.y[xi.Forward]||a.y===1}}},[t,n,i])}function Jie(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return $m(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function ere(e,n){return O.useMemo(()=>e.reduce((t,i)=>{const{sensor:r}=i,a=r.activators.map(o=>({eventName:o.eventName,handler:n(o.handler,i)}));return[...t,...a]},[]),[e,n])}var Rh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Rh||(Rh={}));var vS;(function(e){e.Optimized="optimized"})(vS||(vS={}));const AM=new Map;function nre(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=O.useState(null),{frequency:l,measure:f,strategy:c}=r,h=O.useRef(e),d=w(),p=jh(d),v=O.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(S=>S===null?_:S.concat(_.filter(C=>!S.includes(C))))},[p]),y=O.useRef(null),b=$m(_=>{if(d&&!t)return AM;if(!_||_===AM||h.current!==e||a!=null){const S=new Map;for(let C of e){if(!C)continue;if(a&&a.length>0&&!a.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const T=C.node.current,A=T?new EC(f(T),T):null;C.rect.current=A,A&&S.set(C.id,A)}return S}return _},[e,a,t,d,f]);return O.useEffect(()=>{h.current=e},[e]),O.useEffect(()=>{d||v()},[t,d]),O.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),O.useEffect(()=>{d||typeof l!="number"||y.current!==null||(y.current=setTimeout(()=>{v(),y.current=null},l))},[l,d,v,...i]),{droppableRects:b,measureDroppableContainers:v,measuringScheduled:a!=null};function w(){switch(c){case Rh.Always:return!1;case Rh.BeforeDragging:return t;default:return!t}}}function DC(e,n){return $m(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function tre(e,n){return DC(e,n)}function ire(e){let{callback:n,disabled:t}=e;const i=Ty(n),r=O.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return O.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Dy(e){let{callback:n,disabled:t}=e;const i=Ty(n),r=O.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return O.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function rre(e){return new EC(Ec(e),e)}function OM(e,n,t){n===void 0&&(n=rre);const[i,r]=O.useState(null);function a(){r(f=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=f??t)!=null?c:null}const h=n(e);return JSON.stringify(f)===JSON.stringify(h)?f:h})}const o=ire({callback(f){if(e)for(const c of f){const{type:h,target:d}=c;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=Dy({callback:a});return Pa(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),i}function are(e){const n=DC(e);return TB(e,n)}const EM=[];function ore(e){const n=O.useRef(e),t=$m(i=>e?i&&i!==EM&&e&&n.current&&e.parentNode===n.current.parentNode?i:jy(e):EM,[e]);return O.useEffect(()=>{n.current=e},[e]),t}function sre(e){const[n,t]=O.useState(null),i=O.useRef(e),r=O.useCallback(a=>{const o=wk(a.target);o&&t(l=>l?(l.set(o,mS(o)),new Map(l)):null)},[]);return O.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(f=>{const c=wk(f);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,mS(c)]):null}).filter(f=>f!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(f=>{const c=wk(f);c==null||c.removeEventListener("scroll",r)})}},[r,e]),O.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Tf(a,o),Na):$B(e):Na,[e,n])}function TM(e,n){n===void 0&&(n=[]);const t=O.useRef(null);return O.useEffect(()=>{t.current=null},n),O.useEffect(()=>{const i=e!==Na;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?Dh(e,t.current):Na}function lre(e){O.useEffect(()=>{if(!Ey)return;const n=e.map(t=>{let{sensor:i}=t;return i.setup==null?void 0:i.setup()});return()=>{for(const t of n)t==null||t()}},e.map(n=>{let{sensor:t}=n;return t}))}function ure(e,n){return O.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function IB(e){return O.useMemo(()=>e?Pie(e):null,[e])}const MM=[];function fre(e,n){n===void 0&&(n=Ec);const[t]=e,i=IB(t?rr(t):null),[r,a]=O.useState(MM);function o(){a(()=>e.length?e.map(f=>PB(f)?i:new EC(n(f),f)):MM)}const l=Dy({callback:o});return Pa(()=>{l==null||l.disconnect(),o(),e.forEach(f=>l==null?void 0:l.observe(f))},[e]),r}function BB(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Nm(n)?n:e}function cre(e){let{measure:n}=e;const[t,i]=O.useState(null),r=O.useCallback(c=>{for(const{target:h}of c)if(Nm(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=Dy({callback:r}),o=O.useCallback(c=>{const h=BB(c);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,f]=gg(o);return O.useMemo(()=>({nodeRef:l,rect:t,setRef:f}),[t,l,f])}const dre=[{sensor:jC,options:{}},{sensor:TC,options:{}}],hre={current:{}},Jv={draggable:{measure:_M},droppable:{measure:_M,strategy:Rh.WhileDragging,frequency:vS.Optimized},dragOverlay:{measure:Ec}};class dh extends Map{get(n){var t;return n!=null&&(t=super.get(n))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:t}=n;return!t})}getNodeFor(n){var t,i;return(t=(i=this.get(n))==null?void 0:i.node.current)!=null?t:void 0}}const mre={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new dh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:wg},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Jv,measureDroppableContainers:wg,windowRect:null,measuringScheduled:!1},FB={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:wg,draggableNodes:new Map,over:null,measureDroppableContainers:wg},Lm=O.createContext(FB),qB=O.createContext(mre);function pre(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dh}}}function vre(e,n){switch(n.type){case vi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case vi.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case vi.DragEnd:case vi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case vi.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new dh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case vi.SetDroppableDisabled:{const{id:t,key:i,disabled:r}=n,a=e.droppable.containers.get(t);if(!a||i!==a.key)return e;const o=new dh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case vi.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new dh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function gre(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=O.useContext(Lm),a=yg(i),o=yg(t==null?void 0:t.id);return O.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!My(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:f,node:c}=l;if(!f.current&&!c.current)return;requestAnimationFrame(()=>{for(const h of[f.current,c.current]){if(!h)continue;const d=die(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function HB(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function yre(e){return O.useMemo(()=>({draggable:{...Jv.draggable,...e==null?void 0:e.draggable},droppable:{...Jv.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Jv.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function bre(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=O.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Pa(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const c=n==null?void 0:n.node.current;if(!c||c.isConnected===!1)return;const h=t(c),d=TB(h,i);if(o||(d.x=0),l||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=jB(c);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const Ry=O.createContext({...Na,scaleX:1,scaleY:1});var Fs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Fs||(Fs={}));const wre=O.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:f=!0,children:c,sensors:h=dre,collisionDetection:d=EB,measuring:p,modifiers:v,...y}=n;const b=O.useReducer(vre,void 0,pre),[w,_]=b,[S,C]=yie(),[T,A]=O.useState(Fs.Uninitialized),M=T===Fs.Initialized,{draggable:{active:j,nodes:N,translate:F},droppable:{containers:R}}=w,L=j!=null?N.get(j):null,B=O.useRef({initial:null,translated:null}),G=O.useMemo(()=>{var mn;return j!=null?{id:j,data:(mn=L==null?void 0:L.data)!=null?mn:hre,rect:B}:null},[j,L]),H=O.useRef(null),[U,P]=O.useState(null),[z,q]=O.useState(null),Y=jh(y,Object.values(y)),D=zm("DndDescribedBy",o),V=O.useMemo(()=>R.getEnabled(),[R]),W=yre(p),{droppableRects:$,measureDroppableContainers:X,measuringScheduled:ee}=nre(V,{dragging:M,dependencies:[F.x,F.y],config:W.droppable}),oe=Jie(N,j),ue=O.useMemo(()=>z?bg(z):null,[z]),ye=Tn(),ae=tre(oe,W.draggable.measure);bre({activeNode:j!=null?N.get(j):null,config:ye.layoutShiftCompensation,initialRect:ae,measure:W.draggable.measure});const le=OM(oe,W.draggable.measure,ae),Se=OM(oe?oe.parentElement:null),ne=O.useRef({activatorEvent:null,active:null,activeNode:oe,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),$e=R.getNodeFor((t=ne.current.over)==null?void 0:t.id),ve=cre({measure:W.dragOverlay.measure}),xe=(i=ve.nodeRef.current)!=null?i:oe,De=M?(r=ve.rect)!=null?r:le:null,we=!!(ve.nodeRef.current&&ve.rect),re=are(we?null:le),ke=IB(xe?rr(xe):null),Ie=ore(M?$e??oe:null),qe=fre(Ie),Ue=HB(v,{transform:{x:F.x-re.x,y:F.y-re.y,scaleX:1,scaleY:1},activatorEvent:z,active:G,activeNodeRect:le,containerNodeRect:Se,draggingNodeRect:De,over:ne.current.over,overlayNodeRect:ve.rect,scrollableAncestors:Ie,scrollableAncestorRects:qe,windowRect:ke}),Ve=ue?Tf(ue,F):null,me=sre(Ie),Ge=TM(me),te=TM(me,[le]),pe=Tf(Ue,Ge),He=De?jie(De,Ue):null,Ye=G&&He?d({active:G,collisionRect:He,droppableRects:$,droppableContainers:V,pointerCoordinates:Ve}):null,Ce=AB(Ye,"id"),[Qe,ln]=O.useState(null),En=we?Ue:Tf(Ue,te),hn=Tie(En,(a=Qe==null?void 0:Qe.rect)!=null?a:null,le),rn=O.useRef(null),Je=O.useCallback((mn,bn)=>{let{sensor:ot,options:$t}=bn;if(H.current==null)return;const Ne=N.get(H.current);if(!Ne)return;const Be=mn.nativeEvent,An=new ot({active:H.current,activeNode:Ne,event:Be,options:$t,context:ne,onAbort(Sn){if(!N.get(Sn))return;const{onDragAbort:Xe}=Y.current,en={id:Sn};Xe==null||Xe(en),S({type:"onDragAbort",event:en})},onPending(Sn,Ke,Xe,en){if(!N.get(Sn))return;const{onDragPending:Ln}=Y.current,bt={id:Sn,constraint:Ke,initialCoordinates:Xe,offset:en};Ln==null||Ln(bt),S({type:"onDragPending",event:bt})},onStart(Sn){const Ke=H.current;if(Ke==null)return;const Xe=N.get(Ke);if(!Xe)return;const{onDragStart:en}=Y.current,$n={activatorEvent:Be,active:{id:Ke,data:Xe.data,rect:B}};Vs.unstable_batchedUpdates(()=>{en==null||en($n),A(Fs.Initializing),_({type:vi.DragStart,initialCoordinates:Sn,active:Ke}),S({type:"onDragStart",event:$n}),P(rn.current),q(Be)})},onMove(Sn){_({type:vi.DragMove,coordinates:Sn})},onEnd:Qn(vi.DragEnd),onCancel:Qn(vi.DragCancel)});rn.current=An;function Qn(Sn){return async function(){const{active:Xe,collisions:en,over:$n,scrollAdjustedTranslate:Ln}=ne.current;let bt=null;if(Xe&&Ln){const{cancelDrop:_n}=Y.current;bt={activatorEvent:Be,active:Xe,collisions:en,delta:Ln,over:$n},Sn===vi.DragEnd&&typeof _n=="function"&&await Promise.resolve(_n(bt))&&(Sn=vi.DragCancel)}H.current=null,Vs.unstable_batchedUpdates(()=>{_({type:Sn}),A(Fs.Uninitialized),ln(null),P(null),q(null),rn.current=null;const _n=Sn===vi.DragEnd?"onDragEnd":"onDragCancel";if(bt){const kn=Y.current[_n];kn==null||kn(bt),S({type:_n,event:bt})}})}}},[N]),zn=O.useCallback((mn,bn)=>(ot,$t)=>{const Ne=ot.nativeEvent,Be=N.get($t);if(H.current!==null||!Be||Ne.dndKit||Ne.defaultPrevented)return;const An={active:Be};mn(ot,bn.options,An)===!0&&(Ne.dndKit={capturedBy:bn.sensor},H.current=$t,Je(ot,bn))},[N,Je]),un=ere(h,zn);lre(h),Pa(()=>{le&&T===Fs.Initializing&&A(Fs.Initialized)},[le,T]),O.useEffect(()=>{const{onDragMove:mn}=Y.current,{active:bn,activatorEvent:ot,collisions:$t,over:Ne}=ne.current;if(!bn||!ot)return;const Be={active:bn,activatorEvent:ot,collisions:$t,delta:{x:pe.x,y:pe.y},over:Ne};Vs.unstable_batchedUpdates(()=>{mn==null||mn(Be),S({type:"onDragMove",event:Be})})},[pe.x,pe.y]),O.useEffect(()=>{const{active:mn,activatorEvent:bn,collisions:ot,droppableContainers:$t,scrollAdjustedTranslate:Ne}=ne.current;if(!mn||H.current==null||!bn||!Ne)return;const{onDragOver:Be}=Y.current,An=$t.get(Ce),Qn=An&&An.rect.current?{id:An.id,rect:An.rect.current,data:An.data,disabled:An.disabled}:null,Sn={active:mn,activatorEvent:bn,collisions:ot,delta:{x:Ne.x,y:Ne.y},over:Qn};Vs.unstable_batchedUpdates(()=>{ln(Qn),Be==null||Be(Sn),S({type:"onDragOver",event:Sn})})},[Ce]),Pa(()=>{ne.current={activatorEvent:z,active:G,activeNode:oe,collisionRect:He,collisions:Ye,droppableRects:$,draggableNodes:N,draggingNode:xe,draggingNodeRect:De,droppableContainers:R,over:Qe,scrollableAncestors:Ie,scrollAdjustedTranslate:pe},B.current={initial:De,translated:He}},[G,oe,Ye,He,N,xe,De,$,R,Qe,Ie,pe]),Xie({...ye,delta:F,draggingRect:He,pointerCoordinates:Ve,scrollableAncestors:Ie,scrollableAncestorRects:qe});const yt=O.useMemo(()=>({active:G,activeNode:oe,activeNodeRect:le,activatorEvent:z,collisions:Ye,containerNodeRect:Se,dragOverlay:ve,draggableNodes:N,droppableContainers:R,droppableRects:$,over:Qe,measureDroppableContainers:X,scrollableAncestors:Ie,scrollableAncestorRects:qe,measuringConfiguration:W,measuringScheduled:ee,windowRect:ke}),[G,oe,le,z,Ye,Se,ve,N,R,$,Qe,X,Ie,qe,W,ee,ke]),Ct=O.useMemo(()=>({activatorEvent:z,activators:un,active:G,activeNodeRect:le,ariaDescribedById:{draggable:D},dispatch:_,draggableNodes:N,over:Qe,measureDroppableContainers:X}),[z,un,G,le,_,D,N,Qe,X]);return Z.createElement(CB.Provider,{value:C},Z.createElement(Lm.Provider,{value:Ct},Z.createElement(qB.Provider,{value:yt},Z.createElement(Ry.Provider,{value:hn},c)),Z.createElement(gre,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Z.createElement(kie,{...l,hiddenTextDescribedById:D}));function Tn(){const mn=(U==null?void 0:U.autoScrollEnabled)===!1,bn=typeof f=="object"?f.enabled===!1:f===!1,ot=M&&!mn&&!bn;return typeof f=="object"?{...f,enabled:ot}:{enabled:ot}}}),kre=O.createContext(null),jM="button",_re="Draggable";function xre(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=zm(_re),{activators:o,activatorEvent:l,active:f,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=O.useContext(Lm),{role:v=jM,roleDescription:y="draggable",tabIndex:b=0}=r??{},w=(f==null?void 0:f.id)===n,_=O.useContext(w?Ry:kre),[S,C]=gg(),[T,A]=gg(),M=ure(o,n),j=jh(t);Pa(()=>(d.set(n,{id:n,key:a,node:S,activatorNode:T,data:j}),()=>{const F=d.get(n);F&&F.key===a&&d.delete(n)}),[d,n]);const N=O.useMemo(()=>({role:v,tabIndex:b,"aria-disabled":i,"aria-pressed":w&&v===jM?!0:void 0,"aria-roledescription":y,"aria-describedby":h.draggable}),[i,v,b,w,y,h.draggable]);return{active:f,activatorEvent:l,activeNodeRect:c,attributes:N,isDragging:w,listeners:i?void 0:M,node:S,over:p,setNodeRef:C,setActivatorNodeRef:A,transform:_}}function UB(){return O.useContext(qB)}const Sre="Droppable",Cre={timeout:25};function Are(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=zm(Sre),{active:o,dispatch:l,over:f,measureDroppableContainers:c}=O.useContext(Lm),h=O.useRef({disabled:t}),d=O.useRef(!1),p=O.useRef(null),v=O.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:w}={...Cre,...r},_=jh(b??i),S=O.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),v.current=null},w)},[w]),C=Dy({callback:S,disabled:y||!o}),T=O.useCallback((N,F)=>{C&&(F&&(C.unobserve(F),d.current=!1),N&&C.observe(N))},[C]),[A,M]=gg(T),j=jh(n);return O.useEffect(()=>{!C||!A.current||(C.disconnect(),d.current=!1,C.observe(A.current))},[A,C]),O.useEffect(()=>(l({type:vi.RegisterDroppable,element:{id:i,key:a,disabled:t,node:A,rect:p,data:j}}),()=>l({type:vi.UnregisterDroppable,key:a,id:i})),[i]),O.useEffect(()=>{t!==h.current.disabled&&(l({type:vi.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(f==null?void 0:f.id)===i,node:A,over:f,setNodeRef:M}}function Ore(e){let{animation:n,children:t}=e;const[i,r]=O.useState(null),[a,o]=O.useState(null),l=yg(t);return!t&&!i&&l&&r(l),Pa(()=>{if(!a)return;const f=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(f==null||c==null){r(null);return}Promise.resolve(n(c,a)).then(()=>{r(null)})},[n,i,a]),Z.createElement(Z.Fragment,null,t,i?O.cloneElement(i,{ref:o}):null)}const Ere={x:0,y:0,scaleX:1,scaleY:1};function Tre(e){let{children:n}=e;return Z.createElement(Lm.Provider,{value:FB},Z.createElement(Ry.Provider,{value:Ere},n))}const Mre={position:"fixed",touchAction:"none"},jre=e=>My(e)?"transform 250ms ease":void 0,Dre=O.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:f,transform:c,transition:h=jre}=e;if(!l)return null;const d=r?c:{...c,scaleX:1,scaleY:1},p={...Mre,width:l.width,height:l.height,top:l.top,left:l.left,transform:to.Transform.toString(d),transformOrigin:r&&i?xie(i,l):void 0,transition:typeof h=="function"?h(i):h,...f};return Z.createElement(t,{className:o,style:p,ref:n},a)}),Rre=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,f]of Object.entries(a.active))f!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,f));if(a!=null&&a.dragOverlay)for(const[l,f]of Object.entries(a.dragOverlay))f!==void 0&&i.node.style.setProperty(l,f);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[f,c]of Object.entries(r))t.node.style.setProperty(f,c);o!=null&&o.active&&t.node.classList.remove(o.active)}},Pre=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:to.Transform.toString(n)},{transform:to.Transform.toString(t)}]},Nre={duration:250,easing:"ease",keyframes:Pre,sideEffects:Rre({styles:{active:{opacity:"0"}}})};function $re(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return Ty((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const f=l.node.current;if(!f)return;const c=BB(o);if(!c)return;const{transform:h}=rr(o).getComputedStyle(o),d=MB(h);if(!d)return;const p=typeof n=="function"?n:zre(n);return zB(f,r.draggable.measure),p({active:{id:a,data:l.data,node:f,rect:r.draggable.measure(f)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function zre(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Nre,...e};return a=>{let{active:o,dragOverlay:l,transform:f,...c}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:f.scaleX!==1?o.rect.width*f.scaleX/l.rect.width:1,scaleY:f.scaleY!==1?o.rect.height*f.scaleY/l.rect.height:1},p={x:f.x-h.x,y:f.y-h.y,...d},v=r({...c,active:o,dragOverlay:l,transform:{initial:f,final:p}}),[y]=v,b=v[v.length-1];if(JSON.stringify(y)===JSON.stringify(b))return;const w=i==null?void 0:i({active:o,dragOverlay:l,...c}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(S=>{_.onfinish=()=>{w==null||w(),S()}})}}let DM=0;function Lre(e){return O.useMemo(()=>{if(e!=null)return DM++,DM},[e])}const Ire=Z.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:f,zIndex:c=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:y,droppableContainers:b,dragOverlay:w,over:_,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:T,windowRect:A}=UB(),M=O.useContext(Ry),j=Lre(d==null?void 0:d.id),N=HB(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:w.rect,over:_,overlayNodeRect:w.rect,scrollableAncestors:C,scrollableAncestorRects:T,transform:M,windowRect:A}),F=DC(p),R=$re({config:i,draggableNodes:y,droppableContainers:b,measuringConfiguration:S}),L=F?w.setRef:void 0;return Z.createElement(Tre,null,Z.createElement(Ore,{animation:R},d&&j?Z.createElement(Dre,{key:j,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:f,transition:a,rect:F,style:{zIndex:c,...r},transform:N},t):null))});function _g(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function Bre(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function wv(e){return e!==null&&e>=0}function Fre(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const f=Ure(t,o,r);if(o===r){const c=t[a];return c?{x:rr&&o<=a?{x:-l.width-f,y:0,...kv}:o=a?{x:l.width+f,y:0,...kv}:{x:0,y:0,...kv}};function Ure(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return!i||!r&&!a?0:t{let{rects:n,activeIndex:t,overIndex:i,index:r}=e;const a=_g(n,i,t),o=n[r],l=a[r];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},_v={scaleX:1,scaleY:1},WB=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const c=a[o];return c?{x:0,y:tt&&r<=o?{x:0,y:-l.height-f,..._v}:r=o?{x:0,y:l.height+f,..._v}:{x:0,y:0,..._v}};function Vre(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(M=>typeof M=="object"&&"id"in M?M.id:M),[i]),y=o!=null,b=o?v.indexOf(o.id):-1,w=c?v.indexOf(c.id):-1,_=O.useRef(v),S=!Fre(v,_.current),C=w!==-1&&b===-1||S,T=qre(a);Pa(()=>{S&&y&&h(v)},[S,v,y,h]),O.useEffect(()=>{_.current=v},[v]);const A=O.useMemo(()=>({activeIndex:b,containerId:d,disabled:T,disableTransforms:C,items:v,overIndex:w,useDragOverlay:p,sortedRects:Bre(v,f),strategy:r}),[b,d,T.draggable,T.droppable,C,v,w,f,p,r]);return Z.createElement(YB.Provider,{value:A},n)}const Wre=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return _g(t,i,r).indexOf(n)},Gre=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:f,transition:c}=e;return!c||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===f},Yre={duration:200,easing:"ease"},KB="transform",Kre=to.Transition.toString({property:KB,duration:0,easing:"linear"}),Xre={roleDescription:"sortable"};function Zre(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=O.useState(null),l=O.useRef(t);return Pa(()=>{if(!n&&t!==l.current&&i.current){const f=r.current;if(f){const c=Ec(i.current,{ignoreTransform:!0}),h={x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),O.useEffect(()=>{a&&o(null)},[a]),a}function XB(e){let{animateLayoutChanges:n=Gre,attributes:t,disabled:i,data:r,getNewIndex:a=Wre,id:o,strategy:l,resizeObserverConfig:f,transition:c=Yre}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:y,sortedRects:b,overIndex:w,useDragOverlay:_,strategy:S}=O.useContext(YB),C=Qre(i,v),T=h.indexOf(o),A=O.useMemo(()=>({sortable:{containerId:d,index:T,items:h},...r}),[d,r,T,h]),M=O.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:j,node:N,isOver:F,setNodeRef:R}=Are({id:o,data:A,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:M,...f}}),{active:L,activatorEvent:B,activeNodeRect:G,attributes:H,setNodeRef:U,listeners:P,isDragging:z,over:q,setActivatorNodeRef:Y,transform:D}=xre({id:o,data:A,attributes:{...Xre,...t},disabled:C.draggable}),V=lie(R,U),W=!!L,$=W&&!y&&wv(p)&&wv(w),X=!_&&z,ee=X&&$?D:null,ue=$?ee??(l??S)({rects:b,activeNodeRect:G,activeIndex:p,overIndex:w,index:T}):null,ye=wv(p)&&wv(w)?a({id:o,items:h,activeIndex:p,overIndex:w}):T,ae=L==null?void 0:L.id,le=O.useRef({activeId:ae,items:h,newIndex:ye,containerId:d}),Se=h!==le.current.items,ne=n({active:L,containerId:d,isDragging:z,isSorting:W,id:o,index:T,items:h,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:c,wasDragging:le.current.activeId!=null}),$e=Zre({disabled:!ne,index:T,node:N,rect:j});return O.useEffect(()=>{W&&le.current.newIndex!==ye&&(le.current.newIndex=ye),d!==le.current.containerId&&(le.current.containerId=d),h!==le.current.items&&(le.current.items=h)},[W,ye,d,h]),O.useEffect(()=>{if(ae===le.current.activeId)return;if(ae!=null&&le.current.activeId==null){le.current.activeId=ae;return}const xe=setTimeout(()=>{le.current.activeId=ae},50);return()=>clearTimeout(xe)},[ae]),{active:L,activeIndex:p,attributes:H,data:A,rect:j,index:T,newIndex:ye,items:h,isOver:F,isSorting:W,isDragging:z,listeners:P,node:N,overIndex:w,over:q,setNodeRef:V,setActivatorNodeRef:Y,setDroppableNodeRef:R,setDraggableNodeRef:U,transform:$e??ue,transition:ve()};function ve(){if($e||Se&&le.current.newIndex===T)return Kre;if(!(X&&!My(B)||!c)&&(W||ne))return to.Transition.toString({...c,property:KB})}}function Qre(e,n){var t,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(t=e==null?void 0:e.draggable)!=null?t:n.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:n.droppable}}function xg(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const Jre=[Xn.Down,Xn.Right,Xn.Up,Xn.Left],eae=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(Jre.includes(e.code)){if(e.preventDefault(),!t||!i)return;const f=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case Xn.Down:i.topp.top&&f.push(d);break;case Xn.Left:i.left>p.left&&f.push(d);break;case Xn.Right:i.left1&&(h=c[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,y=p==null?void 0:p.node.current;if(y&&v&&d&&p){const w=jy(y).some((M,j)=>l[j]!==M),_=ZB(d,p),S=nae(d,p),C=w||!_?{x:0,y:0}:{x:S?i.width-v.width:0,y:S?i.height-v.height:0},T={x:v.left,y:v.top};return C.x&&C.y?T:Dh(T,C)}}}};function ZB(e,n){return!xg(e)||!xg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function nae(e,n){return!xg(e)||!xg(n)||!ZB(e,n)?!1:e.data.current.sortable.index=U?H:""+Array(U+1-z.length).join(P)+H},T={s:C,z:function(H){var U=-H.utcOffset(),P=Math.abs(U),z=Math.floor(P/60),q=P%60;return(U<=0?"+":"-")+C(z,2,"0")+":"+C(q,2,"0")},m:function H(U,P){if(U.date()1)return H(D[0])}else{var V=U.name;M[V]=U,q=V}return!z&&q&&(A=q),q||!z&&A},R=function(H,U){if(N(H))return H.clone();var P=typeof U=="object"?U:{};return P.date=H,P.args=arguments,new B(P)},L=T;L.l=F,L.i=N,L.w=function(H,U){return R(H,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var B=(function(){function H(P){this.$L=F(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[j]=!0}var U=H.prototype;return U.parse=function(P){this.$d=(function(z){var q=z.date,Y=z.utc;if(q===null)return new Date(NaN);if(L.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var D=q.match(w);if(D){var V=D[2]-1||0,W=(D[7]||"0").substring(0,3);return Y?new Date(Date.UTC(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)):new Date(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)}}return new Date(q)})(P),this.init()},U.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},U.$utils=function(){return L},U.isValid=function(){return this.$d.toString()!==b},U.isSame=function(P,z){var q=R(P);return this.startOf(z)<=q&&q<=this.endOf(z)},U.isAfter=function(P,z){return R(P)ze(o).locale(t).format(i);return e==="default"?n===null?"":a(n):e==="multiple"?n.map(a).join(", "):e==="range"&&Array.isArray(n)?n[0]&&n[1]?`${a(n[0])} ${r} ${a(n[1])}`:n[0]?`${a(n[0])} ${r} `:"":""}function oae({formatter:e,...n}){return(e||aae)(n)}function sae({direction:e,levelIndex:n,rowIndex:t,cellIndex:i,size:r}){switch(e){case"up":return n===0&&t===0?null:t===0?{levelIndex:n-1,rowIndex:i<=r[n-1][r[n-1].length-1]-1?r[n-1].length-1:r[n-1].length-2,cellIndex:i}:{levelIndex:n,rowIndex:t-1,cellIndex:i};case"down":return t===r[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:i}:t===r[n].length-2&&i>=r[n][r[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:i}:{levelIndex:n,rowIndex:t+1,cellIndex:i};case"left":return n===0&&t===0&&i===0?null:t===0&&i===0?{levelIndex:n-1,rowIndex:r[n-1].length-1,cellIndex:r[n-1][r[n-1].length-1]-1}:i===0?{levelIndex:n,rowIndex:t-1,cellIndex:r[n][t-1]-1}:{levelIndex:n,rowIndex:t,cellIndex:i-1};case"right":return t===r[n].length-1&&i===r[n][t]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:i===r[n][t]-1?{levelIndex:n,rowIndex:t+1,cellIndex:0}:{levelIndex:n,rowIndex:t,cellIndex:i+1};default:return{levelIndex:n,rowIndex:t,cellIndex:i}}}function QB({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var f,c,h;const o=sae({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(c=(f=e.current)==null?void 0:f[o.levelIndex])==null?void 0:c[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?QB({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function lae(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function uae(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function RC({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=lae(r.key);a&&(r.preventDefault(),QB({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:uae(e)}))}function Vi(e){return e==null||e===""?e:ze(e).format("YYYY-MM-DD")}function JB(e){return e==null||e===""?e:ze(e).format("YYYY-MM-DD HH:mm:ss")}function yS({minDate:e,maxDate:n}){const t=ze();return!e&&!n?Vi(t):e&&ze(t).isBefore(e)?Vi(e):n&&ze(t).isAfter(n)?Vi(n):Vi(t)}const fae={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},cae=O.createContext(fae);function ol(){const e=O.use(cae),n=O.useCallback(a=>a||e.locale,[e.locale]),t=O.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=O.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=O.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function dae({value:e,type:n,withTime:t}){const i=t?JB:Vi;if(n==="range"&&Array.isArray(e)){const r=i(e[0]),a=i(e[1]);return r?a?`${r} – ${a}`:`${r} –`:""}return n==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?i(e):""}function eF({value:e,type:n,name:t,form:i,withTime:r=!1}){return k.jsx("input",{type:"hidden",value:dae({value:e,type:n,withTime:r}),name:t,form:i})}eF.displayName="@mantine/dates/HiddenDatesInput";var nF={day:"m_396ce5cb"};const tF=(e,{size:n})=>({day:{"--day-size":On(n,"day-size")}}),Py=je(e=>{const n=be("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:f,disabled:c,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:y,inRange:b,firstInRange:w,lastInRange:_,hidden:S,static:C,highlightToday:T,fullWidth:A,attributes:M,...j}=n;return k.jsx(Si,{...We({name:h||"Day",classes:nF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:l,varsResolver:tF,rootSelector:"day"})("day",{style:S?{display:"none"}:void 0}),component:C?"div":"button",disabled:c,"data-today":ze(f).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-highlight-today":T||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!p&&d||void 0,"data-outside":!c&&p||void 0,"data-selected":!c&&v||void 0,"data-in-range":b&&!c||void 0,"data-first-in-range":w&&!c||void 0,"data-last-in-range":_&&!c||void 0,"data-static":C||void 0,"data-full-width":A||void 0,unstyled:o,...j,children:(y==null?void 0:y(f))||ze(f).date()})});Py.classes=nF;Py.varsResolver=tF;Py.displayName="@mantine/dates/Day";function hae({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=ze().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(ze(i).add(a,"days").locale(e).format(n)):r.push(n(ze(i).add(a,"days").format("YYYY-MM-DD")));return r}var iF={weekday:"m_18a3eca"};const rF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":Zt(n),"--wr-spacing":Ft(n)}}),Ny=je(e=>{const n=be("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:f,firstDayOfWeek:c,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:y,...b}=n,w=We({name:p||"WeekdaysRow",classes:iF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:y,vars:l,varsResolver:rF,rootSelector:"weekdaysRow"}),_=ol(),S=hae({locale:_.getLocale(f),format:h,firstDayOfWeek:_.getFirstDayOfWeek(c)}).map((C,T)=>k.jsx(d,{...w("weekday"),children:C},T));return k.jsxs(_e,{component:"tr",...w("weekdaysRow"),...b,children:[v&&k.jsx(d,{...w("weekday"),children:"#"}),S]})});Ny.classes=iF;Ny.varsResolver=rF;Ny.displayName="@mantine/dates/WeekdaysRow";function mae(e,n=1){let t=ze(e);if(!t.isValid())return t;const i=n===0?6:n-1;for(;t.day()!==i;)t=t.add(1,"day");return t.format("YYYY-MM-DD")}function pae(e,n=1){let t=ze(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function vae({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=ze(ze(e).subtract(ze(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=mae(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=ze(pae(r,n));for(;ze(l).isBefore(a,"day");){const f=[];for(let c=0;c<7;c+=1)f.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(f)}if(t&&o.length<6){const f=o[o.length-1],c=f[f.length-1];let h=ze(c).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function PC(e,n){return ze(e).format("YYYY-MM")===ze(n).format("YYYY-MM")}function aF(e,n){return n?ze(e).isAfter(ze(n).subtract(1,"day"),"day"):!0}function oF(e,n){return n?ze(e).isBefore(ze(n).add(1,"day"),"day"):!0}function gae({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return oF(h,t)&&aF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||PC(h,o))}),f=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(f)return f;const c=l.find(h=>ze().isSame(h,"date"));return c||l[0]}var ng={exports:{}},yae=ng.exports,PM;function bae(){return PM||(PM=1,(function(e,n){(function(t,i){e.exports=i()})(yae,(function(){var t="day";return function(i,r,a){var o=function(c){return c.add(4-c.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),t);var h,d,p,v,y=o(this),b=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return y.diff(b,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var f=l.startOf;l.startOf=function(c,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(c)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(c,h)}}}))})(ng)),ng.exports}var wae=bae();const kae=at(wae);ze.extend(kae);function _ae(e){return ze(e.find(n=>ze(n).day()===1)).isoWeek()}var sF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const xae={withCellSpacing:!0},lF=(e,{size:n})=>({weekNumber:{"--wn-fz":Zt(n),"--wn-size":On(n,"wn-size")}}),Im=je(e=>{const n=be("Month",xae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,locale:c,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:y,excludeDate:b,minDate:w,maxDate:_,renderDay:S,hideOutsideDates:C,hideWeekdays:T,getDayAriaLabel:A,static:M,__getDayRef:j,__onDayKeyDown:N,__onDayClick:F,__onDayMouseEnter:R,__preventFocus:L,__stopPropagation:B,withCellSpacing:G,size:H,highlightToday:U,withWeekNumbers:P,fullWidth:z,attributes:q,...Y}=n,D=We({name:f||"Month",classes:sF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,vars:l,varsResolver:lF,rootSelector:"month"}),V=ol(),W=vae({month:p,firstDayOfWeek:V.getFirstDayOfWeek(h),consistentWeeks:V.consistentWeeks}),$=gae({dates:W,minDate:Vi(w),maxDate:Vi(_),getDayProps:y,excludeDate:b,hideOutsideDates:C,month:p}),{resolvedClassNames:X,resolvedStyles:ee}=Ni({classNames:t,styles:a,props:n}),oe=W.map((ue,ye)=>{const ae=ue.map((le,Se)=>{const ne=!PC(le,p),$e=(A==null?void 0:A(le))||ze(le).locale(c||V.locale).format("D MMMM YYYY"),ve=y==null?void 0:y(le),xe=ze(le).isSame($,"date");return k.jsx("td",{...D("monthCell"),"data-with-spacing":G||void 0,children:k.jsx(Py,{__staticSelector:f||"Month",classNames:X,styles:ee,attributes:q,unstyled:o,"data-mantine-stop-propagation":B||void 0,highlightToday:U,renderDay:S,date:le,size:H,weekend:V.getWeekendDays(v).includes(ze(le).get("day")),outside:ne,hidden:C?ne:!1,"aria-label":$e,static:M,fullWidth:z,disabled:(b==null?void 0:b(le))||!oF(le,Vi(_))||!aF(le,Vi(w)),ref:De=>{De&&(j==null||j(ye,Se,De))},...ve,onKeyDown:De=>{var we;(we=ve==null?void 0:ve.onKeyDown)==null||we.call(ve,De),N==null||N(De,{rowIndex:ye,cellIndex:Se,date:le})},onMouseEnter:De=>{var we;(we=ve==null?void 0:ve.onMouseEnter)==null||we.call(ve,De),R==null||R(De,le)},onClick:De=>{var we;(we=ve==null?void 0:ve.onClick)==null||we.call(ve,De),F==null||F(De,le)},onMouseDown:De=>{var we;(we=ve==null?void 0:ve.onMouseDown)==null||we.call(ve,De),L&&De.preventDefault()},tabIndex:L||!xe?-1:0})},le.toString())});return k.jsxs("tr",{...D("monthRow"),children:[P&&k.jsx("td",{...D("weekNumber"),children:_ae(ue)}),ae]},ye)});return k.jsxs(_e,{component:"table",...D("month"),size:H,"data-full-width":z||void 0,...Y,children:[!T&&k.jsx("thead",{...D("monthThead"),children:k.jsx(Ny,{__staticSelector:f||"Month",locale:c,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:P,size:H,classNames:X,styles:ee,unstyled:o,attributes:q})}),k.jsx("tbody",{...D("monthTbody"),children:oe})]})});Im.classes=sF;Im.varsResolver=lF;Im.displayName="@mantine/dates/Month";var uF={pickerControl:"m_dc6a3c71"};const fF=(e,{size:n})=>({pickerControl:{"--dpc-fz":Zt(n),"--dpc-size":On(n,"dpc-size")}}),Bm=je(e=>{const n=be("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:f,lastInRange:c,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:y,attributes:b,...w}=n;return k.jsx(Si,{...We({name:d||"PickerControl",classes:uF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:fF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":y||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":f&&!v||void 0,"data-last-in-range":c&&!v||void 0,disabled:v,...w})});Bm.classes=uF;Bm.varsResolver=fF;Bm.displayName="@mantine/dates/PickerControl";function cF({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&ze(e).isBefore(n,"year")||t&&ze(e).isAfter(t,"year"))}function Sae({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var f;return!cF({year:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>ze().isSame(l,"year"));return o||r[0]}function dF(e){const n=ze(e).year(),t=n-n%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let l=0;l{const n=be("YearsList",Cae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:f,yearsListFormat:c,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:y,__getControlRef:b,__onControlKeyDown:w,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:T,withCellSpacing:A,fullWidth:M,size:j,attributes:N,...F}=n,R=We({name:y||"YearsList",classes:hF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"yearsList"}),L=ol(),B=dF(f),G=Sae({years:B,minDate:d,maxDate:p,getYearControlProps:v}),H=B.map((U,P)=>{const z=U.map((q,Y)=>{const D=v==null?void 0:v(q),V=ze(q).isSame(G,"year");return k.jsx("td",{...R("yearsListCell"),"data-with-spacing":A||void 0,children:k.jsx(Bm,{...R("yearsListControl"),size:j,unstyled:o,fullWidth:M,"data-mantine-stop-propagation":T||void 0,disabled:cF({year:q,minDate:d,maxDate:p}),ref:W=>{W&&(b==null||b(P,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),w==null||w(W,{rowIndex:P,cellIndex:Y,date:q})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,q)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),S==null||S(W,q)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),C&&W.preventDefault()},tabIndex:C||!V?-1:0,children:(D==null?void 0:D.children)??ze(q).locale(L.getLocale(h)).format(c)})},Y)});return k.jsx("tr",{...R("yearsListRow"),children:z},P)});return k.jsx(_e,{component:"table",size:j,...R("yearsList"),"data-full-width":M||void 0,...F,children:k.jsx("tbody",{children:H})})});$y.classes=hF;$y.displayName="@mantine/dates/YearsList";function mF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&ze(e).isBefore(n,"month")||t&&ze(e).isAfter(t,"month"))}function Aae({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var f;return!mF({month:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>ze().isSame(l,"month"));return o||r[0]}function Oae(e){const n=ze(e).startOf("year").toDate(),t=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)t[r].push(ze(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var pF={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Eae={monthsListFormat:"MMM",withCellSpacing:!0},zy=je(e=>{const n=be("MonthsList",Eae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,year:c,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:y,__getControlRef:b,__onControlKeyDown:w,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:T,withCellSpacing:A,fullWidth:M,size:j,attributes:N,...F}=n,R=We({name:f||"MonthsList",classes:pF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"monthsList"}),L=ol(),B=Oae(c),G=Aae({months:B,minDate:Vi(p),maxDate:Vi(v),getMonthControlProps:y}),H=B.map((U,P)=>{const z=U.map((q,Y)=>{const D=y==null?void 0:y(q),V=ze(q).isSame(G,"month");return k.jsx("td",{...R("monthsListCell"),"data-with-spacing":A||void 0,children:k.jsx(Bm,{...R("monthsListControl"),size:j,unstyled:o,fullWidth:M,__staticSelector:f||"MonthsList","data-mantine-stop-propagation":T||void 0,disabled:mF({month:q,minDate:Vi(p),maxDate:Vi(v)}),ref:W=>{W&&(b==null||b(P,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),w==null||w(W,{rowIndex:P,cellIndex:Y,date:q})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,q)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),S==null||S(W,q)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),C&&W.preventDefault()},tabIndex:C||!V?-1:0,children:(D==null?void 0:D.children)??ze(q).locale(L.getLocale(d)).format(h)})},Y)});return k.jsx("tr",{...R("monthsListRow"),children:z},P)});return k.jsx(_e,{component:"table",size:j,...R("monthsList"),"data-full-width":M||void 0,...F,children:k.jsx("tbody",{children:H})})});zy.classes=pF;zy.displayName="@mantine/dates/MonthsList";var vF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const Tae={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},gF=(e,{size:n})=>({calendarHeader:{"--dch-control-size":On(n,"dch-control-size"),"--dch-fz":Zt(n)}}),as=je(e=>{const n=be("CalendarHeader",Tae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:f,previousIcon:c,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:y,label:b,nextDisabled:w,previousDisabled:_,hasNextLevel:S,levelControlAriaLabel:C,withNext:T,withPrevious:A,headerControlsOrder:M,fullWidth:j,__staticSelector:N,__preventFocus:F,__stopPropagation:R,attributes:L,...B}=n,G=We({name:N||"CalendarHeader",classes:vF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:gF,rootSelector:"calendarHeader"}),H=F?Y=>Y.preventDefault():void 0,U=A&&O.createElement(Si,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:H,disabled:_,"data-disabled":_||void 0,tabIndex:F||_?-1:0,"data-mantine-stop-propagation":R||void 0},c||k.jsx(pg,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),P=O.createElement(Si,{component:S?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:S?y:void 0,unstyled:o,onMouseDown:S?H:void 0,disabled:!S,"data-static":!S||void 0,"aria-label":C,tabIndex:F||!S?-1:0,"data-mantine-stop-propagation":R||void 0},b),z=T&&O.createElement(Si,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:H,disabled:w,"data-disabled":w||void 0,tabIndex:F||w?-1:0,"data-mantine-stop-propagation":R||void 0},f||k.jsx(pg,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),q=M.map(Y=>Y==="previous"?U:Y==="level"?P:Y==="next"?z:null);return k.jsx(_e,{...G("calendarHeader"),"data-full-width":j||void 0,...B,children:q})});as.classes=vF;as.varsResolver=gF;as.displayName="@mantine/dates/CalendarHeader";function Mae(e){const n=dF(e);return[n[0][0],n[3][0]]}const jae={decadeLabelFormat:"YYYY"},Ly=je(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,nextDisabled:C,previousDisabled:T,levelControlAriaLabel:A,withNext:M,withPrevious:j,headerControlsOrder:N,decadeLabelFormat:F,classNames:R,styles:L,unstyled:B,__staticSelector:G,__stopPropagation:H,size:U,fullWidth:P,attributes:z,...q}=be("DecadeLevel",jae,e),Y=ol(),[D,V]=Mae(n),W={__staticSelector:G||"DecadeLevel",classNames:R,styles:L,unstyled:B,size:U,attributes:z},$=typeof C=="boolean"?C:r?!ze(V).endOf("year").isBefore(r):!1,X=typeof T=="boolean"?T:i?!ze(D).startOf("year").isAfter(i):!1,ee=(oe,ue)=>ze(oe).locale(t||Y.locale).format(ue);return k.jsxs(_e,{"data-decade-level":!0,size:U,...q,children:[k.jsx(as,{label:typeof F=="function"?F(D,V):`${ee(D,F)} – ${ee(V,F)}`,__preventFocus:p,__stopPropagation:H,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,nextDisabled:$,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:A,withNext:M,withPrevious:j,headerControlsOrder:N,fullWidth:P,...W}),k.jsx($y,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:H,withCellSpacing:d,fullWidth:P,...W})]})});Ly.classes={...$y.classes,...as.classes};Ly.displayName="@mantine/dates/DecadeLevel";const Dae={yearLabelFormat:"YYYY"},Iy=je(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,onLevelClick:C,nextDisabled:T,previousDisabled:A,hasNextLevel:M,levelControlAriaLabel:j,withNext:N,withPrevious:F,headerControlsOrder:R,yearLabelFormat:L,__staticSelector:B,__stopPropagation:G,size:H,classNames:U,styles:P,unstyled:z,fullWidth:q,attributes:Y,...D}=be("YearLevel",Dae,e),V=ol(),W={__staticSelector:B||"YearLevel",classNames:U,styles:P,unstyled:z,size:H,attributes:Y},$=typeof T=="boolean"?T:r?!ze(n).endOf("year").isBefore(r):!1,X=typeof A=="boolean"?A:i?!ze(n).startOf("year").isAfter(i):!1;return k.jsxs(_e,{"data-year-level":!0,size:H,...D,children:[k.jsx(as,{label:typeof L=="function"?L(n):ze(n).locale(t||V.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,onLevelClick:C,nextDisabled:$,previousDisabled:X,hasNextLevel:M,levelControlAriaLabel:j,withNext:N,withPrevious:F,headerControlsOrder:R,fullWidth:q,...W}),k.jsx(zy,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:q,...W})]})});Iy.classes={...as.classes,...zy.classes};Iy.displayName="@mantine/dates/YearLevel";const Rae={monthLabelFormat:"MMMM YYYY"},By=je(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:b,__onDayClick:w,__onDayMouseEnter:_,withCellSpacing:S,highlightToday:C,withWeekNumbers:T,__preventFocus:A,__stopPropagation:M,nextIcon:j,previousIcon:N,nextLabel:F,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:H,previousDisabled:U,hasNextLevel:P,levelControlAriaLabel:z,withNext:q,withPrevious:Y,headerControlsOrder:D,monthLabelFormat:V,classNames:W,styles:$,unstyled:X,__staticSelector:ee,size:oe,static:ue,fullWidth:ye,attributes:ae,...le}=be("MonthLevel",Rae,e),Se=ol(),ne={__staticSelector:ee||"MonthLevel",classNames:W,styles:$,unstyled:X,size:oe,attributes:ae},$e=typeof H=="boolean"?H:c?!ze(n).endOf("month").isBefore(c):!1,ve=typeof U=="boolean"?U:f?!ze(n).startOf("month").isAfter(f):!1;return k.jsxs(_e,{"data-month-level":!0,size:oe,...le,children:[k.jsx(as,{label:typeof V=="function"?V(n):ze(n).locale(t||Se.locale).format(V),__preventFocus:A,__stopPropagation:M,nextIcon:j,previousIcon:N,nextLabel:F,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:$e,previousDisabled:ve,hasNextLevel:P,levelControlAriaLabel:z,withNext:q,withPrevious:Y,headerControlsOrder:D,fullWidth:ye,...ne}),k.jsx(Im,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:b,__onDayClick:w,__onDayMouseEnter:_,__preventFocus:A,__stopPropagation:M,static:ue,withCellSpacing:S,highlightToday:C,withWeekNumbers:T,fullWidth:ye,...ne})]})});By.classes={...Im.classes,...as.classes};By.displayName="@mantine/dates/MonthLevel";var yF={levelsGroup:"m_30b26e33"};const sl=je(e=>{const n=be("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,fullWidth:c,attributes:h,...d}=n;return k.jsx(_e,{...We({name:f||"LevelsGroup",classes:yF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":c||void 0,...d})});sl.classes=yF;sl.displayName="@mantine/dates/LevelsGroup";const Pae={numberOfColumns:1},Fy=je(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,nextDisabled:_,previousDisabled:S,headerControlsOrder:C,classNames:T,styles:A,unstyled:M,__staticSelector:j,__stopPropagation:N,numberOfColumns:F,levelControlAriaLabel:R,decadeLabelFormat:L,size:B,fullWidth:G,vars:H,attributes:U,...P}=be("DecadeLevelGroup",Pae,e),z=O.useRef([]),q=Array(F).fill(0).map((Y,D)=>{const V=ze(n).add(D*10,"years").format("YYYY-MM-DD");return k.jsx(Ly,{size:B,yearsListFormat:a,decade:V,withNext:D===F-1,withPrevious:D===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(W,$)=>RC({levelIndex:D,rowIndex:$.rowIndex,cellIndex:$.cellIndex,event:W,controlsRef:z}),__getControlRef:(W,$,X)=>{Array.isArray(z.current[D])||(z.current[D]=[]),Array.isArray(z.current[D][W])||(z.current[D][W]=[]),z.current[D][W][$]=X},levelControlAriaLabel:typeof R=="function"?R(V):R,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:N,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,nextDisabled:_,previousDisabled:S,getYearControlProps:o,__staticSelector:j||"DecadeLevelGroup",classNames:T,styles:A,unstyled:M,withCellSpacing:c,headerControlsOrder:C,fullWidth:G,attributes:U},D)});return k.jsx(sl,{classNames:T,styles:A,__staticSelector:j||"DecadeLevelGroup",size:B,unstyled:M,fullWidth:G,attributes:U,...P,children:q})});Fy.classes={...sl.classes,...Ly.classes};Fy.displayName="@mantine/dates/DecadeLevelGroup";const Nae={numberOfColumns:1},qy=je(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,onLevelClick:_,nextDisabled:S,previousDisabled:C,hasNextLevel:T,headerControlsOrder:A,classNames:M,styles:j,unstyled:N,__staticSelector:F,__stopPropagation:R,numberOfColumns:L,levelControlAriaLabel:B,yearLabelFormat:G,size:H,fullWidth:U,vars:P,attributes:z,...q}=be("YearLevelGroup",Nae,e),Y=O.useRef([]),D=Array(L).fill(0).map((V,W)=>{const $=ze(n).add(W,"years").format("YYYY-MM-DD");return k.jsx(Iy,{size:H,monthsListFormat:a,year:$,withNext:W===L-1,withPrevious:W===0,yearLabelFormat:G,__stopPropagation:R,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(X,ee)=>RC({levelIndex:W,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,ee,oe)=>{Array.isArray(Y.current[W])||(Y.current[W]=[]),Array.isArray(Y.current[W][X])||(Y.current[W][X]=[]),Y.current[W][X][ee]=oe},levelControlAriaLabel:typeof B=="function"?B($):B,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,onLevelClick:_,nextDisabled:S,previousDisabled:C,hasNextLevel:T,getMonthControlProps:o,classNames:M,styles:j,unstyled:N,__staticSelector:F||"YearLevelGroup",withCellSpacing:c,headerControlsOrder:A,fullWidth:U,attributes:z},W)});return k.jsx(sl,{classNames:M,styles:j,__staticSelector:F||"YearLevelGroup",size:H,unstyled:N,fullWidth:U,attributes:z,...q,children:D})});qy.classes={...Iy.classes,...sl.classes};qy.displayName="@mantine/dates/YearLevelGroup";const $ae={numberOfColumns:1},Hy=je(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:y,__onDayMouseEnter:b,withCellSpacing:w,highlightToday:_,withWeekNumbers:S,__preventFocus:C,nextIcon:T,previousIcon:A,nextLabel:M,previousLabel:j,onNext:N,onPrevious:F,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,headerControlsOrder:H,classNames:U,styles:P,unstyled:z,numberOfColumns:q,levelControlAriaLabel:Y,monthLabelFormat:D,__staticSelector:V,__stopPropagation:W,size:$,static:X,fullWidth:ee,vars:oe,attributes:ue,...ye}=be("MonthLevelGroup",$ae,e),ae=O.useRef([]),le=Array(q).fill(0).map((Se,ne)=>{const $e=ze(n).add(ne,"months").format("YYYY-MM-DD");return k.jsx(By,{month:$e,withNext:ne===q-1,withPrevious:ne===0,monthLabelFormat:D,__stopPropagation:W,__onDayClick:y,__onDayMouseEnter:b,__onDayKeyDown:(ve,xe)=>RC({levelIndex:ne,rowIndex:xe.rowIndex,cellIndex:xe.cellIndex,event:ve,controlsRef:ae}),__getDayRef:(ve,xe,De)=>{Array.isArray(ae.current[ne])||(ae.current[ne]=[]),Array.isArray(ae.current[ne][ve])||(ae.current[ne][ve]=[]),ae.current[ne][ve][xe]=De},levelControlAriaLabel:typeof Y=="function"?Y($e):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:C,nextIcon:T,previousIcon:A,nextLabel:M,previousLabel:j,onNext:N,onPrevious:F,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,classNames:U,styles:P,unstyled:z,__staticSelector:V||"MonthLevelGroup",size:$,static:X,withCellSpacing:w,highlightToday:_,withWeekNumbers:S,headerControlsOrder:H,fullWidth:ee,attributes:ue},ne)});return k.jsx(sl,{classNames:U,styles:P,__staticSelector:V||"MonthLevelGroup",size:$,fullWidth:ee,attributes:ue,...ye,children:le})});Hy.classes={...sl.classes,...By.classes};Hy.displayName="@mantine/dates/MonthLevelGroup";var bF={input:"m_6fa5e2aa"};const Tc=je(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:f,dropdownType:c,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:y,clearable:b,clearSectionMode:w,onClear:_,clearButtonProps:S,rightSection:C,shouldClear:T,readOnly:A,disabled:M,value:j,name:N,form:F,type:R,onDropdownClose:L,withTime:B,...G}=DL("PickerInputBase",{size:"sm"},e),H=k.jsx(Pt.ClearButton,{onClick:_,unstyled:o,...S}),U=()=>{R==="range"&&Array.isArray(j)&&j[0]&&!j[1]&&_(),p.close()};return k.jsxs(k.Fragment,{children:[c==="modal"&&!A&&k.jsx($r,{opened:v,onClose:U,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...f,children:h}),k.jsx(Pt.Wrapper,{...t,children:k.jsxs(Vn,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||c==="modal"||A,onChange:P=>{var z;P||((z=l==null?void 0:l.onClose)==null||z.call(l),U())},children:[k.jsx(Vn.Target,{children:k.jsx(Pt,{"data-dates-input":!0,"data-read-only":A||void 0,disabled:M,component:"button",type:"button",multiline:!0,onClick:P=>{y==null||y(P),p.toggle()},__clearSection:H,__clearable:b&&T&&!A&&!M,__clearSectionMode:w,rightSection:C,...n,classNames:{...r,input:sn(bF.input,r==null?void 0:r.input)},...G,children:d||k.jsx(Pt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),k.jsx(Vn.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),k.jsx(eF,{value:j,name:N,form:F,type:R,withTime:B})]})});Tc.classes=bF;Tc.displayName="@mantine/dates/PickerInputBase";const NM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,$M=(e,n)=>{const t=n?JB:Vi;return Array.isArray(e)?e.map(t):t(e)};function NC({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=O.useRef(e),[o,l,f]=Ci({value:$M(n,r),defaultValue:$M(t,r),finalValue:NM(e),onChange:i});let c=o;return a.current!==e&&(a.current=e,n===void 0&&(c=t!==void 0?t:NM(e),l(c))),[c,l,f]}function xk(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function zae(e){return e===0?"month":e===1?"year":"decade"}function Nd(e,n,t){return zae(Io(xk(e,0),xk(n,0),xk(t,2)))}const Lae={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Mc=je(e=>{const n=be("Calendar",Lae,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,headerControlsOrder:T,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:M,__setDateRef:j,__setLevelRef:N,firstDayOfWeek:F,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:H,hideOutsideDates:U,hideWeekdays:P,getDayAriaLabel:z,monthLabelFormat:q,nextIcon:Y,previousIcon:D,__onDayClick:V,__onDayMouseEnter:W,withCellSpacing:$,highlightToday:X,withWeekNumbers:ee,monthsListFormat:oe,getMonthControlProps:ue,yearLabelFormat:ye,yearsListFormat:ae,getYearControlProps:le,decadeLabelFormat:Se,classNames:ne,styles:$e,unstyled:ve,minDate:xe,maxDate:De,locale:we,__staticSelector:re,size:ke,__preventFocus:Ie,__stopPropagation:qe,onNextDecade:Ue,onPreviousDecade:Ve,onNextYear:me,onPreviousYear:Ge,onNextMonth:te,onPreviousMonth:pe,static:He,enableKeyboardNavigation:Ye,fullWidth:Ce,attributes:Qe,ref:ln,...En}=n,{resolvedClassNames:hn,resolvedStyles:rn}=Ni({classNames:ne,styles:$e,props:n}),[Je,zn]=Ci({value:o?Nd(o,r,i):void 0,defaultValue:a?Nd(a,r,i):void 0,finalValue:Nd(void 0,r,i),onChange:l}),[un,yt]=NC({type:"default",value:Vi(f),defaultValue:Vi(c),onChange:h});O.useImperativeHandle(j,()=>Ke=>{yt(Ke)}),O.useImperativeHandle(N,()=>Ke=>{zn(Ke)});const Ct={__staticSelector:re||"Calendar",styles:rn,classNames:hn,unstyled:ve,size:ke,attributes:Qe},Tn=p||d||1,mn=O.useRef(null);if(mn.current===null){const Ke=new Date;mn.current=xe&&ze(Ke).isAfter(xe)?xe:ze(Ke).format("YYYY-MM-DD")}const bn=un||mn.current,ot=()=>{const Ke=ze(bn).add(Tn,"month").format("YYYY-MM-DD");te==null||te(Ke),yt(Ke)},$t=()=>{const Ke=ze(bn).subtract(Tn,"month").format("YYYY-MM-DD");pe==null||pe(Ke),yt(Ke)},Ne=()=>{const Ke=ze(bn).add(Tn,"year").format("YYYY-MM-DD");me==null||me(Ke),yt(Ke)},Be=()=>{const Ke=ze(bn).subtract(Tn,"year").format("YYYY-MM-DD");Ge==null||Ge(Ke),yt(Ke)},An=()=>{const Ke=ze(bn).add(10*Tn,"year").format("YYYY-MM-DD");Ue==null||Ue(Ke),yt(Ke)},Qn=()=>{const Ke=ze(bn).subtract(10*Tn,"year").format("YYYY-MM-DD");Ve==null||Ve(Ke),yt(Ke)},Sn=O.useRef(null);return O.useEffect(()=>{if(!Ye||He)return;const Ke=Xe=>{var Ln;if(!((Ln=Sn.current)!=null&&Ln.contains(document.activeElement)))return;const en=Xe.ctrlKey||Xe.metaKey,$n=Xe.shiftKey;switch(Xe.key){case"ArrowUp":en&&$n?(Xe.preventDefault(),Qn()):en&&(Xe.preventDefault(),Be());break;case"ArrowDown":en&&$n?(Xe.preventDefault(),An()):en&&(Xe.preventDefault(),Ne());break;case"y":case"Y":Je==="month"&&(Xe.preventDefault(),zn("year"));break}};return document.addEventListener("keydown",Ke),()=>{document.removeEventListener("keydown",Ke)}},[Ye,He,Je,Ne,Be,An,Qn]),k.jsxs(_e,{ref:Nt(Sn,ln),size:ke,"data-calendar":!0,"data-full-width":Ce||void 0,...En,children:[Je==="month"&&k.jsx(Hy,{month:bn,minDate:xe,maxDate:De,firstDayOfWeek:F,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:H,hideOutsideDates:U,hideWeekdays:P,getDayAriaLabel:z,onNext:ot,onPrevious:$t,hasNextLevel:i!=="month",onLevelClick:()=>zn("year"),numberOfColumns:d,locale:we,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousMonth)??b,previousIcon:D,monthLabelFormat:q,__onDayClick:V,__onDayMouseEnter:W,__preventFocus:Ie,__stopPropagation:qe,static:He,withCellSpacing:$,highlightToday:X,withWeekNumbers:ee,headerControlsOrder:T,fullWidth:Ce,...Ct}),Je==="year"&&k.jsx(qy,{year:bn,numberOfColumns:d,minDate:xe,maxDate:De,monthsListFormat:oe,getMonthControlProps:ue,locale:we,onNext:Ne,onPrevious:Be,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>zn("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousYear)??b,previousIcon:D,yearLabelFormat:ye,__onControlMouseEnter:C,__onControlClick:(Ke,Xe)=>{M&&yt(Xe),zn(Nd("month",r,i)),_==null||_(Xe)},__preventFocus:Ie,__stopPropagation:qe,withCellSpacing:$,headerControlsOrder:T,fullWidth:Ce,...Ct}),Je==="decade"&&k.jsx(Fy,{decade:bn,minDate:xe,maxDate:De,yearsListFormat:ae,getYearControlProps:le,locale:we,onNext:An,onPrevious:Qn,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousDecade)??b,previousIcon:D,decadeLabelFormat:Se,__onControlMouseEnter:S,__onControlClick:(Ke,Xe)=>{A&&yt(Xe),zn(Nd("year",r,i)),w==null||w(Xe)},__preventFocus:Ie,__stopPropagation:qe,withCellSpacing:$,headerControlsOrder:T,fullWidth:Ce,...Ct})]})});Mc.classes={...Fy.classes,...qy.classes,...Hy.classes};Mc.displayName="@mantine/dates/Calendar";function Uy(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:T,onPreviousMonth:A,onNextYear:M,onPreviousYear:j,onNextDecade:N,onPreviousDecade:F,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:H,__setLevelRef:U,withWeekNumbers:P,headerControlsOrder:z,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:oe,monthLabelFormat:ue,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:le,yearsListFormat:Se,getYearControlProps:ne,decadeLabelFormat:$e,allowSingleDateInRange:ve,allowDeselect:xe,minDate:De,maxDate:we,locale:re,...ke}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:T,onPreviousMonth:A,onNextYear:M,onPreviousYear:j,onNextDecade:N,onPreviousDecade:F,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:H,withWeekNumbers:P,headerControlsOrder:z,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:oe,monthLabelFormat:ue,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:le,yearsListFormat:Se,getYearControlProps:ne,decadeLabelFormat:$e,allowSingleDateInRange:ve,allowDeselect:xe,minDate:De,maxDate:we,locale:re},others:ke}}function zM(e,n){const t=[...n].sort((i,r)=>ze(i).isAfter(ze(r))?1:-1);return ze(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&ze(t[1]).endOf("day").add(1,"ms").isAfter(e)}function wF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[f,c]=NC({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=O.useState(e==="range"&&f[0]&&!f[1]?f[0]:null),[p,v]=O.useState(null),y=A=>{if(e==="range"){if(h&&!f[1]){if(ze(A).isSame(h,n)&&!a){d(null),v(null),c([null,null]);return}const M=[A,h];M.sort((j,N)=>ze(j).isAfter(ze(N))?1:-1),c(M),v(null),d(null);return}if(f[0]&&!f[1]&&ze(A).isSame(f[0],n)&&!a){d(null),v(null),c([null,null]);return}c([A,null]),v(null),d(A);return}if(e==="multiple"){f.some(M=>ze(M).isSame(A,n))?c(f.filter(M=>!ze(M).isSame(A,n))):c([...f,A]);return}f&&o&&ze(A).isSame(f,n)?c(null):c(A)},b=A=>h&&p?zM(A,[p,h]):f[0]&&f[1]?zM(A,f):!1,w=e==="range"?A=>{l==null||l(A),v(null)}:l,_=A=>f[0]&&ze(A).isSame(f[0],n)?!(p&&ze(p).isBefore(f[0])):!1,S=A=>f[1]?ze(A).isSame(f[1],n):!f[0]||!p?!1:ze(p).isBefore(f[0])&&ze(A).isSame(f[0],n),C=A=>{if(e==="range")return{selected:f.some(j=>j&&ze(j).isSame(A,n)),inRange:b(A),firstInRange:_(A),lastInRange:S(A),"data-autofocus":!!f[0]&&ze(f[0]).isSame(A,n)||void 0};if(e==="multiple")return{selected:f.some(j=>j&&ze(j).isSame(A,n)),"data-autofocus":!!f[0]&&ze(f[0]).isSame(A,n)||void 0};const M=ze(f).isSame(A,n);return{selected:M,"data-autofocus":M||void 0}},T=e==="range"&&h?v:()=>{};return O.useEffect(()=>{if(e==="range")if(f[0]&&!f[1])d(f[0]);else{const A=f[0]==null&&f[1]==null,M=f[0]!=null&&f[1]!=null;(A||M)&&(d(null),v(null))}},[f]),{onDateChange:y,onRootMouseLeave:w,onHoveredDateChange:T,getControlProps:C,_value:f,setValue:c}}var kF={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const _F=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":Zt(n)}}),Iae={type:"default"},Fm=je(e=>{const n=be("MonthPicker",Iae,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:f,__staticSelector:c,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:y,__updateDateOnMonthSelect:b,__onPresetSelect:w,__stopPropagation:_,presets:S,className:C,style:T,unstyled:A,size:M,attributes:j,onLevelChange:N,...F}=n,{calendarProps:R,others:L}=Uy(F),B=O.useRef(null),G=O.useRef(null),H=We({name:c||"MonthPicker",classes:kF,props:n,className:C,style:T,classNames:t,styles:i,unstyled:A,attributes:j,rootSelector:S?"monthPickerRoot":void 0,varsResolver:_F,vars:r}),{onDateChange:U,onRootMouseLeave:P,onHoveredDateChange:z,getControlProps:q,setValue:Y}=wF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:f,onMouseLeave:v}),{resolvedClassNames:D,resolvedStyles:V}=Ni({classNames:t,styles:i,props:n}),W=k.jsx(Mc,{classNames:D,styles:V,size:M,...R,...S?{}:L,minLevel:"year",__updateDateOnMonthSelect:b??!1,__staticSelector:c||"MonthPicker",onMouseLeave:P,onMonthMouseEnter:(ee,oe)=>z(oe),onMonthSelect:ee=>{U(ee),y==null||y(ee)},getMonthControlProps:ee=>({...q(ee),...h==null?void 0:h(ee)}),onLevelChange:N,__setDateRef:B,__setLevelRef:G,__stopPropagation:_,attributes:j,...S?{}:{className:C,style:T}});if(!S)return W;const $=ee=>{var ue,ye;const oe=Array.isArray(ee)?ee[0]:ee;oe!==void 0&&((ue=B.current)==null||ue.call(B,oe),(ye=G.current)==null||ye.call(G,"year"),w?w(oe):Y(ee))},X=S.map((ee,oe)=>k.jsx(Si,{...H("presetButton"),onClick:()=>$(ee.value),onMouseDown:ue=>ue.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ee.label},oe));return k.jsxs(_e,{...H("monthPickerRoot"),size:M,...L,children:[k.jsx("div",{...H("presetsList"),children:X}),W]})});Fm.classes={...Mc.classes,...kF};Fm.varsResolver=_F;Fm.displayName="@mantine/dates/MonthPicker";var Bae={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const xF=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":Zt(n)}}),Fae={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},qm=je(e=>{const n=be("DatePicker",Fae,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:f,styles:c,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:y,presets:b,className:w,style:_,unstyled:S,size:C,vars:T,attributes:A,...M}=n,{calendarProps:j,others:N}=Uy(M),F=O.useRef(null),R=O.useRef(null),L=We({name:h||"DatePicker",classes:Bae,props:n,className:w,style:_,classNames:f,styles:c,unstyled:S,attributes:A,rootSelector:b?"datePickerRoot":void 0,varsResolver:xF,vars:T}),{onDateChange:B,onRootMouseLeave:G,onHoveredDateChange:H,getControlProps:U,_value:P,setValue:z}=wF({type:N.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:q,resolvedStyles:Y}=Ni({classNames:f,styles:c,props:n}),D=k.jsx(Mc,{classNames:q,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:C,...j,...b?{}:N,__stopPropagation:y,__setDateRef:F,__setLevelRef:R,minLevel:j.minLevel||"month",__onDayMouseEnter:($,X)=>{H(X),p==null||p($,X)},__onDayClick:($,X)=>{B(X),d==null||d($,X)},getDayProps:$=>{var X;return{...U($),...(X=j.getDayProps)==null?void 0:X.call(j,$)}},getMonthControlProps:$=>{var X;return{selected:typeof P=="string"?PC($,P):!1,...(X=j.getMonthControlProps)==null?void 0:X.call(j,$)}},getYearControlProps:$=>{var X;return{selected:typeof P=="string"?ze($).isSame(P,"year"):!1,...(X=j.getYearControlProps)==null?void 0:X.call(j,$)}},hideOutsideDates:j.hideOutsideDates??j.numberOfColumns!==1,attributes:A,...b?{}:{className:w,style:_}});if(!b)return D;const V=$=>{var ee,oe;const X=Array.isArray($)?$[0]:$;X!==void 0&&((ee=F.current)==null||ee.call(F,X),(oe=R.current)==null||oe.call(R,"month"),v?v(X):z($))},W=b.map(($,X)=>k.jsx(Si,{...L("presetButton"),onClick:()=>V($.value),onMouseDown:ee=>ee.preventDefault(),"data-mantine-stop-propagation":y||void 0,children:$.label},X));return k.jsxs(_e,{...L("datePickerRoot"),size:C,...N,children:[k.jsx("div",{...L("presetsList"),children:W}),D]})});qm.classes=Mc.classes;qm.varsResolver=xF;qm.displayName="@mantine/dates/DatePicker";function SF({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:f,valueFormatter:c}){const h=ol(),[d,p]=Y$(!1),[v,y]=NC({type:e,value:n,defaultValue:t,onChange:i}),b=oae({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(f),formatter:c}),w=S=>{o&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),y(l&&e==="multiple"?[...S].sort((C,T)=>ze(C).isAfter(ze(T))?1:-1):S)};return{_value:v,setValue:w,onClear:()=>w(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:b,dropdownOpened:d,dropdownHandlers:p}}const qae={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},$C=je(e=>{const n=be("MonthPickerInput",qae,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:y,dropdownType:b,sortDates:w,minDate:_,maxDate:S,vars:C,valueFormatter:T,presets:A,attributes:M,...j}=n,{resolvedClassNames:N,resolvedStyles:F}=Ni({classNames:c,styles:h,props:n}),{calendarProps:R,others:L}=Uy(j),{_value:B,setValue:G,formattedValue:H,dropdownHandlers:U,dropdownOpened:P,onClear:z,shouldClear:q}=SF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:w,valueFormatter:T});return k.jsx(Tc,{formattedValue:H,dropdownOpened:P,dropdownHandlers:U,classNames:N,styles:F,unstyled:d,onClear:z,shouldClear:q,value:B,size:v,variant:y,dropdownType:b,...L,attributes:M,type:t,__staticSelector:"MonthPickerInput",children:k.jsx(Fm,{...R,size:v,variant:y,type:t,value:B,defaultDate:R.defaultDate||(Array.isArray(B)?B[0]||yS({maxDate:S,minDate:_}):B||yS({maxDate:S,minDate:_})),onChange:G,locale:f,classNames:N,styles:F,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:b==="popover",minDate:_,maxDate:S,presets:A,attributes:M})})});$C.classes={...Tc.classes,...Fm.classes};$C.displayName="@mantine/dates/MonthPickerInput";const Hae={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},Bf=je(e=>{const n=be("DatePickerInput",Hae,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:y,dropdownType:b,sortDates:w,minDate:_,maxDate:S,vars:C,defaultDate:T,valueFormatter:A,presets:M,attributes:j,...N}=n,{resolvedClassNames:F,resolvedStyles:R}=Ni({classNames:c,styles:h,props:n}),{calendarProps:L,others:B}=Uy(N),{_value:G,setValue:H,formattedValue:U,dropdownHandlers:P,dropdownOpened:z,onClear:q,shouldClear:Y}=SF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:w,valueFormatter:A}),D=Array.isArray(G)?G[0]||T:G||T;return k.jsx(Tc,{formattedValue:U,dropdownOpened:z,dropdownHandlers:P,classNames:F,styles:R,unstyled:d,onClear:q,shouldClear:Y,value:G,size:v,variant:y,dropdownType:b,...B,type:t,__staticSelector:"DatePickerInput",attributes:j,children:k.jsx(qm,{...L,size:v,variant:y,type:t,value:G,defaultDate:D||yS({maxDate:S,minDate:_}),onChange:H,locale:f,classNames:F,styles:R,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:b==="popover",minDate:_,maxDate:S,presets:M,attributes:j})})});Bf.classes={...Tc.classes,...qm.classes};Bf.displayName="@mantine/dates/DatePickerInput";/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */var Uae={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Dn=(e,n,t,i)=>{const r=O.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:f,className:c,children:h,...d},p)=>O.createElement("svg",{ref:p,...Uae[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,c].join(" "),strokeWidth:l,stroke:a,...d},[f&&O.createElement("title",{key:"svg-title"},f),...i.map(([v,y])=>O.createElement(v,y)),...Array.isArray(h)?h:[h]]));return r.displayName=`${t}`,r};/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Vae=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],Wae=Dn("outline","alert-triangle","AlertTriangle",Vae);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Gae=[["path",{d:"M8 4h11a2 2 0 1 1 0 4h-7m-4 0h-3a2 2 0 0 1 -.826 -3.822",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 1.824 -1.18m.176 -3.82v-7",key:"svg-1"}],["path",{d:"M10 12h2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],Yae=Dn("outline","archive-off","ArchiveOff",Gae);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Kae=[["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]],Xae=Dn("outline","archive","Archive",Kae);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Zae=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],Qae=Dn("outline","arrow-back-up","ArrowBackUp",Zae);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Jae=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M3 12l18 0",key:"svg-2"}]],eoe=Dn("outline","arrows-horizontal","ArrowsHorizontal",Jae);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const noe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],toe=Dn("outline","calendar","Calendar",noe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const ioe=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],roe=Dn("outline","chart-bar","ChartBar",ioe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const aoe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],CF=Dn("outline","check","Check",aoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const ooe=[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]],Ph=Dn("outline","checkbox","Checkbox",ooe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const soe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],AF=Dn("outline","chevron-down","ChevronDown",soe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const loe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],OF=Dn("outline","chevron-right","ChevronRight",loe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const uoe=[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2",key:"svg-1"}],["path",{d:"M9 12l.01 0",key:"svg-2"}],["path",{d:"M13 12l2 0",key:"svg-3"}],["path",{d:"M9 16l.01 0",key:"svg-4"}],["path",{d:"M13 16l2 0",key:"svg-5"}]],LM=Dn("outline","clipboard-list","ClipboardList",uoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const foe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],coe=Dn("outline","clock-hour-4","ClockHour4",foe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const doe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],IM=Dn("outline","clock","Clock",doe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const hoe=[["path",{d:"M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16",key:"svg-0"}],["path",{d:"M9 3v18",key:"svg-1"}],["path",{d:"M15 3v18",key:"svg-2"}]],moe=Dn("outline","columns-3","Columns3",hoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const poe=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],EF=Dn("outline","dots-vertical","DotsVertical",poe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const voe=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],nh=Dn("outline","edit","Edit",voe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const goe=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],TF=Dn("outline","grip-vertical","GripVertical",goe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const yoe=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],boe=Dn("outline","history","History",yoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const woe=[["path",{d:"M4 4l6 0",key:"svg-0"}],["path",{d:"M14 4l6 0",key:"svg-1"}],["path",{d:"M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8",key:"svg-2"}],["path",{d:"M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-3"}]],bS=Dn("outline","layout-kanban","LayoutKanban",woe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const koe=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-5a4 4 0 0 1 8 0",key:"svg-2"}]],MF=Dn("outline","lock-open","LockOpen",koe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const _oe=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],Ul=Dn("outline","lock","Lock",_oe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const xoe=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],Soe=Dn("outline","logout","Logout",xoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Coe=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],Aoe=Dn("outline","menu-2","Menu2",Coe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Ooe=[["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-0"}],["path",{d:"M9.5 9h.01",key:"svg-1"}],["path",{d:"M14.5 9h.01",key:"svg-2"}],["path",{d:"M9.5 13a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],jF=Dn("outline","message-chatbot","MessageChatbot",Ooe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Eoe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],Toe=Dn("outline","mood-smile","MoodSmile",Eoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Moe=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],zC=Dn("outline","palette","Palette",Moe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const joe=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Doe=Dn("outline","pencil","Pencil",joe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Roe=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],Nh=Dn("outline","plus","Plus",Roe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Poe=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],Noe=Dn("outline","refresh","Refresh",Poe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const $oe=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],zoe=Dn("outline","search","Search",$oe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Loe=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],Ioe=Dn("outline","send","Send",Loe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Boe=[["path",{d:"M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3",key:"svg-1"}]],Foe=Dn("outline","tag","Tag",Boe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const qoe=[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]],Hoe=Dn("outline","trash-x","TrashX",qoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Uoe=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],Vy=Dn("outline","trash","Trash",Uoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Voe=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],BM=Dn("outline","trending-up","TrendingUp",Voe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Woe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],Goe=Dn("outline","user-circle","UserCircle",Woe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Yoe=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4c.348 0 .686 .045 1.009 .128",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}]],Koe=Dn("outline","user-minus","UserMinus",Yoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Xoe=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]],Zoe=Dn("outline","user-plus","UserPlus",Xoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Qoe=[["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M6 21v-1a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v1",key:"svg-1"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-2"}]],Joe=Dn("outline","user-square","UserSquare",Qoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const ese=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],nse=Dn("outline","user","User",ese);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const tse=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],th=Dn("outline","x","X",tse);function FM({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],onSubmit:a,onCancel:o}){const[l,f]=O.useState((e==null?void 0:e.requester)??""),[c,h]=O.useState((e==null?void 0:e.title)??""),[d,p]=O.useState((e==null?void 0:e.description)??""),[v,y]=O.useState((e==null?void 0:e.assignee_id)??null),[b,w]=O.useState((e==null?void 0:e.tags)??[]),_=async T=>{T==null||T.preventDefault();const A=c.trim();A&&await a({requester:l.trim(),title:A,description:d,assignee_id:v,tags:b})},S=T=>{T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),_())},C=T=>{T.key==="Enter"&&(T.ctrlKey||T.metaKey)&&(T.preventDefault(),_())};return k.jsx("form",{onSubmit:_,children:k.jsxs(Ut,{gap:"sm",children:[k.jsx(Oh,{label:"Tarea",value:c,onChange:T=>h(T.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:T=>{T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),_())}}),k.jsx(ty,{label:"Solicitante",value:l,onChange:f,data:i,tabIndex:2,autoComplete:"off",onKeyDown:S,placeholder:"Empieza a escribir y elige uno existente",limit:10}),k.jsx(Oh,{label:"Descripcion",value:d,onChange:T=>p(T.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:C,description:"Ctrl+Enter para guardar"}),k.jsx(Ko,{label:"Asignar a",placeholder:"Sin asignar",value:v,onChange:T=>y(T),data:t.map(T=>({value:T.id,label:T.display_name||T.username})),clearable:!0,searchable:!0,tabIndex:4}),k.jsx(yC,{label:"Tags",value:b,onChange:w,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),k.jsxs(wn,{justify:"flex-end",gap:"xs",mt:"xs",children:[k.jsx(Bt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),k.jsx(Bt,{tabIndex:6,type:"submit",disabled:!c.trim(),children:n})]})]})})}function ise(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const rse=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ase=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ose={};function qM(e,n){return(ose.jsx?ase:rse).test(e)}const sse=/[ \t\n\f\r]/g;function lse(e){return typeof e=="object"?e.type==="text"?HM(e.value):!1:HM(e)}function HM(e){return e.replace(sse,"")===""}class Hm{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}Hm.prototype.normal={};Hm.prototype.property={};Hm.prototype.space=void 0;function DF(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new Hm(t,i,n)}function wS(e){return e.toLowerCase()}class gr{constructor(n,t){this.attribute=t,this.property=n}}gr.prototype.attribute="";gr.prototype.booleanish=!1;gr.prototype.boolean=!1;gr.prototype.commaOrSpaceSeparated=!1;gr.prototype.commaSeparated=!1;gr.prototype.defined=!1;gr.prototype.mustUseProperty=!1;gr.prototype.number=!1;gr.prototype.overloadedBoolean=!1;gr.prototype.property="";gr.prototype.spaceSeparated=!1;gr.prototype.space=void 0;let use=0;const Pn=_u(),si=_u(),kS=_u(),Le=_u(),At=_u(),Mf=_u(),Er=_u();function _u(){return 2**++use}const _S=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pn,booleanish:si,commaOrSpaceSeparated:Er,commaSeparated:Mf,number:Le,overloadedBoolean:kS,spaceSeparated:At},Symbol.toStringTag,{value:"Module"})),Sk=Object.keys(_S);class LC extends gr{constructor(n,t,i,r){let a=-1;if(super(n,t),UM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&mse.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(VM,gse);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!VM.test(a)){let o=a.replace(hse,vse);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=LC}return new r(i,n)}function vse(e){return"-"+e.toLowerCase()}function gse(e){return e.charAt(1).toUpperCase()}const yse=DF([RF,fse,$F,zF,LF],"html"),IC=DF([RF,cse,$F,zF,LF],"svg");function bse(e){return e.join(" ").trim()}var mf={},Ck,WM;function wse(){if(WM)return Ck;WM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,f=` -`,c="/",h="*",d="",p="comment",v="declaration";function y(w,_){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];_=_||{};var S=1,C=1;function T(H){var U=H.match(n);U&&(S+=U.length);var P=H.lastIndexOf(f);C=~P?H.length-P:C+H.length}function A(){var H={line:S,column:C};return function(U){return U.position=new M(H),F(),U}}function M(H){this.start=H,this.end={line:S,column:C},this.source=_.source}M.prototype.content=w;function j(H){var U=new Error(_.source+":"+S+":"+C+": "+H);if(U.reason=H,U.filename=_.source,U.line=S,U.column=C,U.source=w,!_.silent)throw U}function N(H){var U=H.exec(w);if(U){var P=U[0];return T(P),w=w.slice(P.length),U}}function F(){N(t)}function R(H){var U;for(H=H||[];U=L();)U!==!1&&H.push(U);return H}function L(){var H=A();if(!(c!=w.charAt(0)||h!=w.charAt(1))){for(var U=2;d!=w.charAt(U)&&(h!=w.charAt(U)||c!=w.charAt(U+1));)++U;if(U+=2,d===w.charAt(U-1))return j("End of comment missing");var P=w.slice(2,U-2);return C+=2,T(P),w=w.slice(U),C+=2,H({type:p,comment:P})}}function B(){var H=A(),U=N(i);if(U){if(L(),!N(r))return j("property missing ':'");var P=N(a),z=H({type:v,property:b(U[0].replace(e,d)),value:P?b(P[0].replace(e,d)):d});return N(o),z}}function G(){var H=[];R(H);for(var U;U=B();)U!==!1&&(H.push(U),R(H));return H}return F(),G()}function b(w){return w?w.replace(l,d):d}return Ck=y,Ck}var GM;function kse(){if(GM)return mf;GM=1;var e=mf&&mf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(mf,"__esModule",{value:!0}),mf.default=t;const n=e(wse());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(f=>{if(f.type!=="declaration")return;const{property:c,value:h}=f;l?r(c,h,f):h&&(a=a||{},a[c]=h)}),a}return mf}var $d={},YM;function _se(){if(YM)return $d;YM=1,Object.defineProperty($d,"__esModule",{value:!0}),$d.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(c){return!c||t.test(c)||e.test(c)},o=function(c,h){return h.toUpperCase()},l=function(c,h){return"".concat(h,"-")},f=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(r,l):c=c.replace(i,l),c.replace(n,o))};return $d.camelCase=f,$d}var zd,KM;function xse(){if(KM)return zd;KM=1;var e=zd&&zd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(kse()),t=_se();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,f){l&&f&&(o[(0,t.camelCase)(l,a)]=f)}),o}return i.default=i,zd=i,zd}var Sse=xse();const Cse=at(Sse),IF=BF("end"),BC=BF("start");function BF(e){return n;function n(t){const i=t&&t.position&&t.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Ase(e){const n=BC(e),t=IF(e);if(n&&t)return{start:n,end:t}}function hh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?XM(e.position):"start"in e||"end"in e?XM(e):"line"in e||"column"in e?xS(e):""}function xS(e){return ZM(e&&e.line)+":"+ZM(e&&e.column)}function XM(e){return xS(e&&e.start)+"-"+xS(e&&e.end)}function ZM(e){return e&&typeof e=="number"?e:1}class Yi extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=hh(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Yi.prototype.file="";Yi.prototype.name="";Yi.prototype.reason="";Yi.prototype.message="";Yi.prototype.stack="";Yi.prototype.column=void 0;Yi.prototype.line=void 0;Yi.prototype.ancestors=void 0;Yi.prototype.cause=void 0;Yi.prototype.fatal=void 0;Yi.prototype.place=void 0;Yi.prototype.ruleId=void 0;Yi.prototype.source=void 0;const FC={}.hasOwnProperty,Ose=new Map,Ese=/[A-Z]/g,Tse=new Set(["table","tbody","thead","tfoot","tr"]),Mse=new Set(["td","th"]),FF="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jse(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Ise(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Lse(t,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?IC:yse,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=qF(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function qF(e,n,t){if(n.type==="element")return Dse(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Rse(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Nse(e,n,t);if(n.type==="mdxjsEsm")return Pse(e,n);if(n.type==="root")return $se(e,n,t);if(n.type==="text")return zse(e,n)}function Dse(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=IC,e.schema=r),e.ancestors.push(n);const a=UF(e,n.tagName,!1),o=Bse(e,n);let l=HC(e,n);return Tse.has(n.tagName)&&(l=l.filter(function(f){return typeof f=="string"?!lse(f):!0})),HF(e,o,a,n),qC(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Rse(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}$h(e,n.position)}function Pse(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);$h(e,n.position)}function Nse(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=IC,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:UF(e,n.name,!0),o=Fse(e,n),l=HC(e,n);return HF(e,o,a,n),qC(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function $se(e,n,t){const i={};return qC(i,HC(e,n)),e.create(n,e.Fragment,i,t)}function zse(e,n){return n.value}function HF(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function qC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Lse(e,n,t){return i;function i(r,a,o,l){const c=Array.isArray(o.children)?t:n;return l?c(a,o,l):c(a,o)}}function Ise(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),f=BC(i);return n(r,a,o,l,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Bse(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&FC.call(n.properties,r)){const a=qse(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Mse.has(n.tagName)?i=l:t[o]=l}}if(i){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return t}function Fse(e,n){const t={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else $h(e,n.position);else{const r=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const l=i.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else $h(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function HC(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:Ose;for(;++ir?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(Nr(e,e.length,0,n),e):n}const ej={}.hasOwnProperty;function WF(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ja(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ji=ll(/[A-Za-z]/),Wi=ll(/[\dA-Za-z]/),Zse=ll(/[#-'*+\--9=?A-Z^-~]/);function Sg(e){return e!==null&&(e<32||e===127)}const SS=ll(/\d/),Qse=ll(/[\dA-Fa-f]/),Jse=ll(/[!-/:-@[-`{-~]/);function pn(e){return e!==null&&e<-2}function St(e){return e!==null&&(e<0||e===32)}function Wn(e){return e===-2||e===-1||e===32}const Wy=ll(new RegExp("\\p{P}|\\p{S}","u")),au=ll(/\s/);function ll(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Dc(e){const n=[];let t=-1,i=0,r=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),r=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(i,t),encodeURIComponent(o)),i=t+r+1,o=""),r&&(t+=r,r=0)}return n.join("")+e.slice(i)}function Jn(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(f){return Wn(f)?(e.enter(t),l(f)):n(f)}function l(f){return Wn(f)&&a++o))return;const j=n.events.length;let N=j,F,R;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(F){R=n.events[N][1].end;break}F=!0}for(_(i),M=j;MC;){const A=t[T];n.containerState=A[1],A[0].exit.call(n,e)}t.length=C}function S(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function rle(e,n,t){return Jn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ff(e){if(e===null||St(e)||au(e))return 1;if(Wy(e))return 2}function Gy(e,n,t){const i=[];let r=-1;for(;++r1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[i][1].end},p={...e[t][1].start};tj(d,-f),tj(p,f),o={type:f>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:f>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:f>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=ta(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=ta(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),c=ta(c,Gy(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=ta(c,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,c=ta(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Nr(e,i-1,t-i+3,c),t=i+c.length-h-2;break}}for(t=-1;++t0&&Wn(M)?Jn(e,S,"linePrefix",a+1)(M):S(M)}function S(M){return M===null||pn(M)?e.check(ij,b,T)(M):(e.enter("codeFlowValue"),C(M))}function C(M){return M===null||pn(M)?(e.exit("codeFlowValue"),S(M)):(e.consume(M),C)}function T(M){return e.exit("codeFenced"),n(M)}function A(M,j,N){let F=0;return R;function R(U){return M.enter("lineEnding"),M.consume(U),M.exit("lineEnding"),L}function L(U){return M.enter("codeFencedFence"),Wn(U)?Jn(M,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):B(U)}function B(U){return U===l?(M.enter("codeFencedFenceSequence"),G(U)):N(U)}function G(U){return U===l?(F++,M.consume(U),G):F>=o?(M.exit("codeFencedFenceSequence"),Wn(U)?Jn(M,H,"whitespace")(U):H(U)):N(U)}function H(U){return U===null||pn(U)?(M.exit("codeFencedFence"),j(U)):N(U)}}}function vle(e,n,t){const i=this;return r;function r(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}const Ok={name:"codeIndented",tokenize:yle},gle={partial:!0,tokenize:ble};function yle(e,n,t){const i=this;return r;function r(c){return e.enter("codeIndented"),Jn(e,a,"linePrefix",5)(c)}function a(c){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?f(c):pn(c)?e.attempt(gle,o,f)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||pn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function f(c){return e.exit("codeIndented"),n(c)}}function ble(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):pn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):Jn(e,a,"linePrefix",5)(o)}function a(o){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):pn(o)?r(o):t(o)}}const wle={name:"codeText",previous:_le,resolve:kle,tokenize:xle};function kle(e){let n=e.length-4,t=3,i,r;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=t;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,t,i){const r=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&Ld(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Ld(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Ld(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(i.parser.constructs.flow,t,n)(o)}}function QF(e,n,t,i,r,a,o,l,f){const c=f||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Sg(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),b(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||pn(_)?t(_):(e.consume(_),_===92?y:v)}function y(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function b(_){return!h&&(_===null||_===41||St(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!f||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):pn(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||pn(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),f||(f=!Wn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function eq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,f):t(p)}function f(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),f(o)):p===null?t(p):pn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Jn(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||pn(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function mh(e,n){let t;return i;function i(r){return pn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Wn(r)?Jn(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const jle={name:"definition",tokenize:Rle},Dle={partial:!0,tokenize:Ple};function Rle(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return JF.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=ja(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):t(v)}function f(v){return St(v)?mh(e,c)(v):c(v)}function c(v){return QF(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(Dle,d,d)(v)}function d(v){return Wn(v)?Jn(e,p,"whitespace")(v):p(v)}function p(v){return v===null||pn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function Ple(e,n,t){return i;function i(l){return St(l)?mh(e,r)(l):t(l)}function r(l){return eq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Wn(l)?Jn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||pn(l)?n(l):t(l)}}const Nle={name:"hardBreakEscape",tokenize:$le};function $le(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return pn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const zle={name:"headingAtx",resolve:Lle,tokenize:Ile};function Lle(e,n){let t=e.length-2,i=3,r,a;return e[i][1].type==="whitespace"&&(i+=2),t-2>i&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(i===t-1||t-4>i&&e[t-2][1].type==="whitespace")&&(t-=i+1===t?2:4),t>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[t][1].end},a={type:"chunkText",start:e[i][1].start,end:e[t][1].end,contentType:"text"},Nr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Ile(e,n,t){let i=0;return r;function r(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&i++<6?(e.consume(h),o):h===null||St(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||pn(h)?(e.exit("atxHeading"),n(h)):Wn(h)?Jn(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||St(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const Ble=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],aj=["pre","script","style","textarea"],Fle={concrete:!0,name:"htmlFlow",resolveTo:Ule,tokenize:Vle},qle={partial:!0,tokenize:Gle},Hle={partial:!0,tokenize:Wle};function Ule(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Vle(e,n,t){const i=this;let r,a,o,l,f;return c;function c($){return h($)}function h($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),d}function d($){return $===33?(e.consume($),p):$===47?(e.consume($),a=!0,b):$===63?(e.consume($),r=3,i.interrupt?n:D):Ji($)?(e.consume($),o=String.fromCharCode($),w):t($)}function p($){return $===45?(e.consume($),r=2,v):$===91?(e.consume($),r=5,l=0,y):Ji($)?(e.consume($),r=4,i.interrupt?n:D):t($)}function v($){return $===45?(e.consume($),i.interrupt?n:D):t($)}function y($){const X="CDATA[";return $===X.charCodeAt(l++)?(e.consume($),l===X.length?i.interrupt?n:B:y):t($)}function b($){return Ji($)?(e.consume($),o=String.fromCharCode($),w):t($)}function w($){if($===null||$===47||$===62||St($)){const X=$===47,ee=o.toLowerCase();return!X&&!a&&aj.includes(ee)?(r=1,i.interrupt?n($):B($)):Ble.includes(o.toLowerCase())?(r=6,X?(e.consume($),_):i.interrupt?n($):B($)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t($):a?S($):C($))}return $===45||Wi($)?(e.consume($),o+=String.fromCharCode($),w):t($)}function _($){return $===62?(e.consume($),i.interrupt?n:B):t($)}function S($){return Wn($)?(e.consume($),S):R($)}function C($){return $===47?(e.consume($),R):$===58||$===95||Ji($)?(e.consume($),T):Wn($)?(e.consume($),C):R($)}function T($){return $===45||$===46||$===58||$===95||Wi($)?(e.consume($),T):A($)}function A($){return $===61?(e.consume($),M):Wn($)?(e.consume($),A):C($)}function M($){return $===null||$===60||$===61||$===62||$===96?t($):$===34||$===39?(e.consume($),f=$,j):Wn($)?(e.consume($),M):N($)}function j($){return $===f?(e.consume($),f=null,F):$===null||pn($)?t($):(e.consume($),j)}function N($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||St($)?A($):(e.consume($),N)}function F($){return $===47||$===62||Wn($)?C($):t($)}function R($){return $===62?(e.consume($),L):t($)}function L($){return $===null||pn($)?B($):Wn($)?(e.consume($),L):t($)}function B($){return $===45&&r===2?(e.consume($),P):$===60&&r===1?(e.consume($),z):$===62&&r===4?(e.consume($),V):$===63&&r===3?(e.consume($),D):$===93&&r===5?(e.consume($),Y):pn($)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(qle,W,G)($)):$===null||pn($)?(e.exit("htmlFlowData"),G($)):(e.consume($),B)}function G($){return e.check(Hle,H,W)($)}function H($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),U}function U($){return $===null||pn($)?G($):(e.enter("htmlFlowData"),B($))}function P($){return $===45?(e.consume($),D):B($)}function z($){return $===47?(e.consume($),o="",q):B($)}function q($){if($===62){const X=o.toLowerCase();return aj.includes(X)?(e.consume($),V):B($)}return Ji($)&&o.length<8?(e.consume($),o+=String.fromCharCode($),q):B($)}function Y($){return $===93?(e.consume($),D):B($)}function D($){return $===62?(e.consume($),V):$===45&&r===2?(e.consume($),D):B($)}function V($){return $===null||pn($)?(e.exit("htmlFlowData"),W($)):(e.consume($),V)}function W($){return e.exit("htmlFlow"),n($)}}function Wle(e,n,t){const i=this;return r;function r(o){return pn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}function Gle(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Um,n,t)}}const Yle={name:"htmlText",tokenize:Kle};function Kle(e,n,t){const i=this;let r,a,o;return l;function l(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),f}function f(D){return D===33?(e.consume(D),c):D===47?(e.consume(D),A):D===63?(e.consume(D),C):Ji(D)?(e.consume(D),N):t(D)}function c(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,y):Ji(D)?(e.consume(D),S):t(D)}function h(D){return D===45?(e.consume(D),v):t(D)}function d(D){return D===null?t(D):D===45?(e.consume(D),p):pn(D)?(o=d,z(D)):(e.consume(D),d)}function p(D){return D===45?(e.consume(D),v):d(D)}function v(D){return D===62?P(D):D===45?p(D):d(D)}function y(D){const V="CDATA[";return D===V.charCodeAt(a++)?(e.consume(D),a===V.length?b:y):t(D)}function b(D){return D===null?t(D):D===93?(e.consume(D),w):pn(D)?(o=b,z(D)):(e.consume(D),b)}function w(D){return D===93?(e.consume(D),_):b(D)}function _(D){return D===62?P(D):D===93?(e.consume(D),_):b(D)}function S(D){return D===null||D===62?P(D):pn(D)?(o=S,z(D)):(e.consume(D),S)}function C(D){return D===null?t(D):D===63?(e.consume(D),T):pn(D)?(o=C,z(D)):(e.consume(D),C)}function T(D){return D===62?P(D):C(D)}function A(D){return Ji(D)?(e.consume(D),M):t(D)}function M(D){return D===45||Wi(D)?(e.consume(D),M):j(D)}function j(D){return pn(D)?(o=j,z(D)):Wn(D)?(e.consume(D),j):P(D)}function N(D){return D===45||Wi(D)?(e.consume(D),N):D===47||D===62||St(D)?F(D):t(D)}function F(D){return D===47?(e.consume(D),P):D===58||D===95||Ji(D)?(e.consume(D),R):pn(D)?(o=F,z(D)):Wn(D)?(e.consume(D),F):P(D)}function R(D){return D===45||D===46||D===58||D===95||Wi(D)?(e.consume(D),R):L(D)}function L(D){return D===61?(e.consume(D),B):pn(D)?(o=L,z(D)):Wn(D)?(e.consume(D),L):F(D)}function B(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),r=D,G):pn(D)?(o=B,z(D)):Wn(D)?(e.consume(D),B):(e.consume(D),H)}function G(D){return D===r?(e.consume(D),r=void 0,U):D===null?t(D):pn(D)?(o=G,z(D)):(e.consume(D),G)}function H(D){return D===null||D===34||D===39||D===60||D===61||D===96?t(D):D===47||D===62||St(D)?F(D):(e.consume(D),H)}function U(D){return D===47||D===62||St(D)?F(D):t(D)}function P(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function z(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),q}function q(D){return Wn(D)?Jn(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Y(D)}function Y(D){return e.enter("htmlTextData"),o(D)}}const WC={name:"labelEnd",resolveAll:Jle,resolveTo:eue,tokenize:nue},Xle={tokenize:tue},Zle={tokenize:iue},Qle={tokenize:rue};function Jle(e){let n=-1;const t=[];for(;++n=3&&(c===null||pn(c))?(e.exit("thematicBreak"),n(c)):t(c)}function f(c){return c===r?(e.consume(c),i++,f):(e.exit("thematicBreakSequence"),Wn(c)?Jn(e,l,"whitespace")(c):l(c))}}const cr={continuation:{tokenize:mue},exit:vue,name:"list",tokenize:hue},cue={partial:!0,tokenize:gue},due={partial:!0,tokenize:pue};function hue(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const y=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:SS(v)){if(i.containerState.type||(i.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(tg,t,c)(v):c(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return t(v)}function f(v){return SS(v)&&++o<10?(e.consume(v),f):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):t(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Um,i.interrupt?t:h,e.attempt(cue,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Wn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function mue(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(Um,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Jn(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Wn(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(due,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,Jn(e,e.attempt(cr,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function pue(e,n,t){const i=this;return Jn(e,r,"listItemIndent",i.containerState.size+1);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?n(a):t(a)}}function vue(e){e.exit(this.containerState.type)}function gue(e,n,t){const i=this;return Jn(e,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(a){const o=i.events[i.events.length-1];return!Wn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const oj={name:"setextUnderline",resolveTo:yue,tokenize:bue};function yue(e,n){let t=e.length,i,r,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){i=t;break}e[t][1].type==="paragraph"&&(r=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",o,n]),e.splice(a+1,0,["exit",e[i][1],n]),e[i][1].end={...e[a][1].end}):e[i][1]=o,e.push(["exit",o,n]),e}function bue(e,n,t){const i=this;let r;return a;function a(c){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Wn(c)?Jn(e,f,"lineSuffix")(c):f(c))}function f(c){return c===null||pn(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const wue={tokenize:kue};function kue(e){const n=this,t=e.attempt(Um,i,e.attempt(this.parser.constructs.flowInitial,r,Jn(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ale,r)),"linePrefix")));return t;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const _ue={resolveAll:tq()},xue=nq("string"),Sue=nq("text");function nq(e){return{resolveAll:tq(e==="text"?Cue:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),f}function f(h){return c(h)?(t.exit("data"),a(h)):(t.consume(h),f)}function c(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function Lue(e,n){let t=-1;const i=[];let r;for(;++t0){const Qe=He.tokenStack[He.tokenStack.length-1];(Qe[1]||lj).call(He,void 0,Qe[0])}for(pe.position={start:$s(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:$s(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Ce=-1;++Ce0&&(i.className=["language-"+r[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Que(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Jue(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function efe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=Dc(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const f={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,f);const c={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,c),e.applyData(n,c)}function nfe(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function tfe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function aq(e,n){const t=n.referenceType;let i="]";if(t==="collapsed"?i+="[]":t==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const r=e.all(n),a=r[0];a&&a.type==="text"?a.value="["+a.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function ife(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return aq(e,n);const r={src:Dc(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function rfe(e,n){const t={src:Dc(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,i),e.applyData(n,i)}function afe(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const i={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,i),e.applyData(n,i)}function ofe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return aq(e,n);const r={href:Dc(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function sfe(e,n){const t={href:Dc(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function lfe(e,n,t){const i=e.all(n),r=t?ufe(t):oq(n),a={},o=[];if(typeof n.checked=="boolean"){const h=i[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l1}function ffe(e,n){const t={},i=e.all(n);let r=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++r0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=BC(n.children[1]),f=IF(n.children[n.children.length-1]);l&&f&&(o.position={start:l,end:f}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function pfe(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let f=-1;const c=[];for(;++f0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(cj(n.slice(r),r>0,!1)),a.join("")}function cj(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===uj||a===fj;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===uj||a===fj;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function yfe(e,n){const t={type:"text",value:gfe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function bfe(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const wfe={blockquote:Kue,break:Xue,code:Zue,delete:Que,emphasis:Jue,footnoteReference:efe,heading:nfe,html:tfe,imageReference:ife,image:rfe,inlineCode:afe,linkReference:ofe,link:sfe,listItem:lfe,list:ffe,paragraph:cfe,root:dfe,strong:hfe,table:mfe,tableCell:vfe,tableRow:pfe,text:yfe,thematicBreak:bfe,toml:xv,yaml:xv,definition:xv,footnoteDefinition:xv};function xv(){}const sq=-1,Yy=0,ph=1,Cg=2,GC=3,YC=4,KC=5,XC=6,lq=7,uq=8,kfe=typeof self=="object"?self:globalThis,dj=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new kfe[e](n)},_fe=(e,n)=>{const t=(r,a)=>(e.set(a,r),r),i=r=>{if(e.has(r))return e.get(r);const[a,o]=n[r];switch(a){case Yy:case sq:return t(o,r);case ph:{const l=t([],r);for(const f of o)l.push(i(f));return l}case Cg:{const l=t({},r);for(const[f,c]of o)l[i(f)]=i(c);return l}case GC:return t(new Date(o),r);case YC:{const{source:l,flags:f}=o;return t(new RegExp(l,f),r)}case KC:{const l=t(new Map,r);for(const[f,c]of o)l.set(i(f),i(c));return l}case XC:{const l=t(new Set,r);for(const f of o)l.add(i(f));return l}case lq:{const{name:l,message:f}=o;return t(dj(l,f),r)}case uq:return t(BigInt(o),r);case"BigInt":return t(Object(BigInt(o)),r);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(dj(a,o),r)};return i},hj=e=>_fe(new Map,e)(0),pf="",{toString:xfe}={},{keys:Sfe}=Object,Id=e=>{const n=typeof e;if(n!=="object"||!e)return[Yy,n];const t=xfe.call(e).slice(8,-1);switch(t){case"Array":return[ph,pf];case"Object":return[Cg,pf];case"Date":return[GC,pf];case"RegExp":return[YC,pf];case"Map":return[KC,pf];case"Set":return[XC,pf];case"DataView":return[ph,t]}return t.includes("Array")?[ph,t]:t.includes("Error")?[lq,t]:[Cg,t]},Sv=([e,n])=>e===Yy&&(n==="function"||n==="symbol"),Cfe=(e,n,t,i)=>{const r=(o,l)=>{const f=i.push(o)-1;return t.set(l,f),f},a=o=>{if(t.has(o))return t.get(o);let[l,f]=Id(o);switch(l){case Yy:{let h=o;switch(f){case"bigint":l=uq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return r([sq],o)}return r([l,h],o)}case ph:{if(f){let p=o;return f==="DataView"?p=new Uint8Array(o.buffer):f==="ArrayBuffer"&&(p=new Uint8Array(o)),r([f,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Cg:{if(f)switch(f){case"BigInt":return r([f,o.toString()],o);case"Boolean":case"Number":case"String":return r([f,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of Sfe(o))(e||!Sv(Id(o[p])))&&h.push([a(p),a(o[p])]);return d}case GC:return r([l,o.toISOString()],o);case YC:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case KC:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Sv(Id(p))||Sv(Id(v))))&&h.push([a(p),a(v)]);return d}case XC:{const h=[],d=r([l,h],o);for(const p of o)(e||!Sv(Id(p)))&&h.push(a(p));return d}}const{message:c}=o;return r([l,{name:f,message:c}],o)};return a},mj=(e,{json:n,lossy:t}={})=>{const i=[];return Cfe(!(n||t),!!n,new Map,i)(e),i},Ag=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?hj(mj(e,n)):structuredClone(e):(e,n)=>hj(mj(e,n));function Afe(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ofe(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Efe(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Afe,i=e.options.footnoteBackLabel||Ofe,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let f=-1;for(;++f0&&y.push({type:"text",value:" "});let S=typeof t=="string"?t:t(f,v);typeof S=="string"&&(S={type:"text",value:S}),y.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const w=h[h.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const S=w.children[w.children.length-1];S&&S.type==="text"?S.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...y)}else h.push(...y);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ag(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` -`}]}}const Ky=(function(e){if(e==null)return Dfe;if(typeof e=="function")return Xy(e);if(typeof e=="object")return Array.isArray(e)?Tfe(e):Mfe(e);if(typeof e=="string")return jfe(e);throw new Error("Expected function, string, or object as test")});function Tfe(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=fq,y,b,w;if((!n||a(f,c,h[h.length-1]||void 0))&&(v=$fe(t(f,h)),v[0]===AS))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==Nfe)for(b=(i?_.children.length:-1)+o,w=h.concat(_);b>-1&&b<_.children.length;){const S=_.children[b];if(y=l(S,b,w)(),y[0]===AS)return y;b=typeof y[1]=="number"?y[1]:b+o}}return v}}}function $fe(e){return Array.isArray(e)?e:typeof e=="number"?[Pfe,e]:e==null?fq:[e]}function ZC(e,n,t,i){let r,a,o;typeof n=="function"&&typeof t!="function"?(a=void 0,o=n,r=t):(a=n,o=t,r=i),cq(e,a,l,r);function l(f,c){const h=c[c.length-1],d=h?h.children.indexOf(f):void 0;return o(f,d,h)}}const OS={}.hasOwnProperty,zfe={};function Lfe(e,n){const t=n||zfe,i=new Map,r=new Map,a=new Map,o={...wfe,...t.handlers},l={all:c,applyData:Bfe,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:f,options:t,patch:Ife,wrap:qfe};return ZC(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function f(h,d){const p=h.type,v=l.handlers[p];if(OS.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:b,...w}=h,_=Ag(w);return _.children=l.all(h),_}return Ag(h)}return(l.options.unknownHandler||Ffe)(l,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v0&&t.push({type:"text",value:` -`}),t}function pj(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function vj(e,n){const t=Lfe(e,n),i=t.one(e,void 0),r=Efe(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` -`},r),a}function Hfe(e,n){return e&&"run"in e?async function(t,i){const r=vj(t,{file:i,...n});await e.run(r,i)}:function(t,i){return vj(t,{file:i,...e||n})}}function gj(e){if(e)throw e}var Tk,yj;function Ufe(){if(yj)return Tk;yj=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},a=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},o=function(c,h){t&&h.name==="__proto__"?t(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},l=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(i)return i(c,h).value}else return;return c[h]};return Tk=function f(){var c,h,d,p,v,y,b=arguments[0],w=1,_=arguments.length,S=!1;for(typeof b=="boolean"&&(S=b,b=arguments[1]||{},w=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});w<_;++w)if(c=arguments[w],c!=null)for(h in c)d=l(b,h),p=l(c,h),b!==p&&(S&&p&&(a(p)||(v=r(p)))?(v?(v=!1,y=d&&r(d)?d:[]):y=d&&a(d)?d:{},o(b,{name:h,newValue:f(S,y,p)})):typeof p<"u"&&o(b,{name:h,newValue:p}));return b},Tk}var Vfe=Ufe();const Mk=at(Vfe);function ES(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Wfe(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(f,...c){const h=e[++a];let d=-1;if(f){o(f);return}for(;++do.length;let f;l&&o.push(r);try{f=e.apply(this,o)}catch(c){const h=c;if(l&&t)throw h;return r(h)}l||(f&&f.then&&typeof f.then=="function"?f.then(a,r):f instanceof Error?r(f):a(f))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const Ua={basename:Yfe,dirname:Kfe,extname:Xfe,join:Zfe,sep:"/"};function Yfe(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Vm(e);let t=0,i=-1,r=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else i<0&&(a=!0,i=r+1);return i<0?"":e.slice(t,i)}if(n===e)return"";let o=-1,l=n.length-1;for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else o<0&&(a=!0,o=r+1),l>-1&&(e.codePointAt(r)===n.codePointAt(l--)?l<0&&(i=r):(l=-1,i=o));return t===i?i=o:i<0&&(i=e.length),e.slice(t,i)}function Kfe(e){if(Vm(e),e.length===0)return".";let n=-1,t=e.length,i;for(;--t;)if(e.codePointAt(t)===47){if(i){n=t;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Xfe(e){Vm(e);let n=e.length,t=-1,i=0,r=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){i=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?r<0?r=n:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||t<0||a===0||a===1&&r===t-1&&r===i+1?"":e.slice(r,t)}function Zfe(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Jfe(e,n){let t="",i=0,r=-1,a=0,o=-1,l,f;for(;++o<=e.length;){if(o2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",i=0):(t=t.slice(0,f),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function Vm(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ece={cwd:nce};function nce(){return"/"}function TS(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tce(e){if(typeof e=="string")e=new URL(e);else if(!TS(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return ice(e)}function ice(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...y]=h;const b=i[p][1];ES(b)&&ES(v)&&(v=Mk(!0,b,v)),i[p]=[c,v,...y]}}}}const sce=new QC().freeze();function Pk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $k(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wj(e){if(!ES(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function kj(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Cv(e){return lce(e)?e:new dq(e)}function lce(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uce(e){return typeof e=="string"||fce(e)}function fce(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cce="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_j=[],xj={allowDangerousHtml:!0},dce=/^(https?|ircs?|mailto|xmpp)$/i,hce=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mce(e){const n=pce(e),t=vce(e);return gce(n.runSync(n.parse(t),t),e)}function pce(e){const n=e.rehypePlugins||_j,t=e.remarkPlugins||_j,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xj}:xj;return sce().use(Yue).use(t).use(Hfe,i).use(n)}function vce(e){const n=e.children||"",t=new dq;return typeof n=="string"&&(t.value=n),t}function gce(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,f=n.urlTransform||yce;for(const h of hce)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+cce+h.id,void 0);return ZC(e,c),jse(e,{Fragment:k.Fragment,components:r,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function c(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in Ak)if(Object.hasOwn(Ak,v)&&Object.hasOwn(h.properties,v)){const y=h.properties[v],b=Ak[v];(b===null||b.includes(h.tagName))&&(h.properties[v]=f(String(y||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function yce(e){const n=e.indexOf(":"),t=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return n===-1||r!==-1&&n>r||t!==-1&&n>t||i!==-1&&n>i||dce.test(e.slice(0,n))?e:""}function Sj(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,r=t.indexOf(n);for(;r!==-1;)i++,r=t.indexOf(n,r+n.length);return i}function bce(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wce(e,n,t){const r=Ky((t||{}).ignore||[]),a=kce(n);let o=-1;for(;++o0?{type:"text",value:M}:void 0),M===!1?p.lastIndex=T+1:(y!==T&&S.push({type:"text",value:c.value.slice(y,T)}),Array.isArray(M)?S.push(...M):M&&S.push(M),y=T+C[0].length,_=!0),!p.global)break;C=p.exec(c.value)}return _?(y?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=Sj(e,"(");let a=Sj(e,")");for(;i!==-1&&r>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function hq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||au(t)||Wy(t))&&(!n||t!==47)}mq.peek=Uce;function $ce(){this.buffer()}function zce(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Lce(){this.buffer()}function Ice(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Bce(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Fce(e){this.exit(e)}function qce(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Hce(e){this.exit(e)}function Uce(){return"["}function mq(e,n,t,i){const r=t.createTracker(i);let a=r.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=r.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=r.move("]"),a}function Vce(){return{enter:{gfmFootnoteCallString:$ce,gfmFootnoteCall:zce,gfmFootnoteDefinitionLabelString:Lce,gfmFootnoteDefinition:Ice},exit:{gfmFootnoteCallString:Bce,gfmFootnoteCall:Fce,gfmFootnoteDefinitionLabelString:qce,gfmFootnoteDefinition:Hce}}}function Wce(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:mq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let f=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return f+=l.move(a.safe(a.associationId(i),{before:f,after:"]"})),h(),f+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),f+=l.move((n?` -`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?pq:Gce))),c(),f}}function Gce(e,n,t){return n===0?e:pq(e,n,t)}function pq(e,n,t){return(t?"":" ")+e}const Yce=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];vq.peek=Jce;function Kce(){return{canContainEols:["delete"],enter:{strikethrough:Zce},exit:{strikethrough:Qce}}}function Xce(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yce}],handlers:{delete:vq}}}function Zce(e){this.enter({type:"delete",children:[]},e)}function Qce(e){this.exit(e)}function vq(e,n,t,i){const r=t.createTracker(i),a=t.enter("strikethrough");let o=r.move("~~");return o+=t.containerPhrasing(e,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),a(),o}function Jce(){return"~"}function ede(e){return e.length}function nde(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||ede,a=[],o=[],l=[],f=[];let c=0,h=-1;for(;++hc&&(c=e[h].length);++_f[_])&&(f[_]=C)}b.push(S)}o[h]=b,l[h]=w}let d=-1;if(typeof i=="object"&&"length"in i)for(;++df[d]&&(f[d]=S),v[d]=S),p[d]=C}o.splice(1,0,p),l.splice(1,0,v),h=-1;const y=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),rde);return r(),o}function rde(e,n,t){return">"+(t?"":" ")+e}function ade(e,n){return Aj(e,n.inConstruct,!0)&&!Aj(e,n.notInConstruct,!1)}function Aj(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++io&&(o=a):a=1,r=i+n.length,i=t.indexOf(n,r);return o}function sde(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function lde(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function ude(e,n,t,i){const r=lde(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(sde(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,fde);return d(),p}const l=t.createTracker(i),f=r.repeat(Math.max(ode(a,r)+1,3)),c=t.enter("codeFenced");let h=l.move(f);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` -`,encode:["`"],...l.current()})),d()}return h+=l.move(` -`),a&&(h+=l.move(a+` -`)),h+=l.move(f),c(),h}function fde(e,n,t){return(t?"":" ")+e}function JC(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function cde(e,n,t,i){const r=JC(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("[");return c+=f.move(t.safe(t.associationId(e),{before:c,after:"]",...f.current()})),c+=f.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":` -`,...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),o(),c}function dde(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function zh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Og(e,n,t){const i=Ff(e),r=Ff(n);return i===void 0?r===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gq.peek=hde;function gq(e,n,t,i){const r=dde(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Og(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=zh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Og(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+zh(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function hde(e,n,t){return t.options.emphasis||"*"}function mde(e,n){let t=!1;return ZC(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,AS}),!!((!e.depth||e.depth<3)&&UC(e)&&(n.options.setext||t))}function pde(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(mde(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` -`,after:` -`});return d(),h(),p+` -`+(r===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` -`))+1))}const o="#".repeat(r),l=t.enter("headingAtx"),f=t.enter("phrasing");a.move(o+" ");let c=t.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(c)&&(c=zh(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),f(),l(),c}yq.peek=vde;function yq(e){return e.value||""}function vde(){return"<"}bq.peek=gde;function bq(e,n,t,i){const r=JC(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("![");return c+=f.move(t.safe(e.alt,{before:c,after:"]",...f.current()})),c+=f.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":")",...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),c+=f.move(")"),o(),c}function gde(){return"!"}wq.peek=yde;function wq(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("![");const c=t.safe(e.alt,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function yde(){return"!"}kq.peek=bde;function kq(e,n,t){let i=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a\u007F]/.test(e.url))}xq.peek=wde;function xq(e,n,t,i){const r=JC(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,f;if(_q(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),f=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(f=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),f(),e.title&&(f=t.enter(`title${a}`),c+=o.move(" "+r),c+=o.move(t.safe(e.title,{before:c,after:r,...o.current()})),c+=o.move(r),f()),c+=o.move(")"),l(),c}function wde(e,n,t){return _q(e,t)?"<":"["}Sq.peek=kde;function Sq(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("[");const c=t.containerPhrasing(e,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function kde(){return"["}function e9(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function _de(e){const n=e9(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function xde(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Cq(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Sde(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?xde(t):e9(t);const l=e.ordered?o==="."?")":".":_de(t);let f=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(f=!0),Cq(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const f=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,l.current()),h);return f(),c;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function Ode(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const Ede=Ky(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tde(e,n,t,i){return(e.children.some(function(o){return Ede(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function Mde(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Aq.peek=jde;function Aq(e,n,t,i){const r=Mde(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Og(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=zh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Og(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+zh(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function jde(e,n,t){return t.options.strong||"*"}function Dde(e,n,t,i){return t.safe(e.value,i)}function Rde(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Pde(e,n,t){const i=(Cq(t)+(t.options.ruleSpaces?" ":"")).repeat(Rde(t));return t.options.ruleSpaces?i.slice(0,-1):i}const Oq={blockquote:ide,break:Oj,code:ude,definition:cde,emphasis:gq,hardBreak:Oj,heading:pde,html:yq,image:bq,imageReference:wq,inlineCode:kq,link:xq,linkReference:Sq,list:Sde,listItem:Ade,paragraph:Ode,root:Tde,strong:Aq,text:Dde,thematicBreak:Pde};function Nde(){return{enter:{table:$de,tableData:Ej,tableHeader:Ej,tableRow:Lde},exit:{codeText:Ide,table:zde,tableData:Bk,tableHeader:Bk,tableRow:Bk}}}function $de(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function zde(e){this.exit(e),this.data.inTable=void 0}function Lde(e){this.enter({type:"tableRow",children:[]},e)}function Bk(e){this.exit(e)}function Ej(e){this.enter({type:"tableCell",children:[]},e)}function Ide(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Bde));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Bde(e,n){return n==="|"?n:e}function Fde(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:f,tableRow:l}};function o(v,y,b,w){return c(h(v,b,w),v.align)}function l(v,y,b,w){const _=d(v,b,w),S=c([_]);return S.slice(0,S.indexOf(` -`))}function f(v,y,b,w){const _=b.enter("tableCell"),S=b.enter("phrasing"),C=b.containerPhrasing(v,{...w,before:a,after:a});return S(),_(),C}function c(v,y){return nde(v,{align:y,alignDelimiters:i,padding:t,stringLength:r})}function h(v,y,b){const w=v.children;let _=-1;const S=[],C=y.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const ahe={tokenize:hhe,partial:!0};function ohe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fhe,continuation:{tokenize:che},exit:dhe}},text:{91:{name:"gfmFootnoteCall",tokenize:uhe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:she,resolveTo:lhe}}}}function she(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const f=i.events[r][1];if(f.type==="labelImage"){o=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return l;function l(f){if(!o||!o._balanced)return t(f);const c=ja(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?t(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function lhe(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",r,n],["exit",r,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function uhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),f}function f(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||St(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(ja(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return St(d)||(o=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function fhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return f;function f(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(y)}function h(y){if(o>999||y===93&&!l||y===null||y===91||St(y))return t(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=ja(i.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return St(y)||(l=!0),o++,e.consume(y),y===92?d:h}function d(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}function p(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),r.includes(a)||r.push(a),Jn(e,v,"gfmFootnoteDefinitionWhitespace")):t(y)}function v(y){return n(y)}}function che(e,n,t){return e.check(Um,n,e.attempt(ahe,n,t))}function dhe(e){e.exit("gfmFootnoteDefinition")}function hhe(e,n,t){const i=this;return Jn(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function mhe(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let f=-1;for(;++f1?f(y):(o.consume(y),d++,v);if(d<2&&!t)return f(y);const w=o.exit("strikethroughSequenceTemporary"),_=Ff(y);return w._open=!_||_===2&&!!b,w._close=!b||b===2&&!!_,l(y)}}}class phe{constructor(){this.map=[]}add(n,t,i){vhe(this,n,t,i)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let r=i.pop();for(;r;){for(const a of r)n.push(a);r=i.pop()}this.map.length=0}}function vhe(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const H=i.events[L][1].type;if(H==="lineEnding"||H==="linePrefix")L--;else break}const B=L>-1?i.events[L][1].type:null,G=B==="tableHead"||B==="tableRow"?M:f;return G===M&&i.parser.lazy[i.now().line]?t(R):G(R)}function f(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(o=!0,a+=1),h(R)}function h(R){return R===null?t(R):pn(R)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):t(R):Wn(R)?Jn(e,h,"whitespace")(R):(a+=1,o&&(o=!1,r+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||St(R)?(e.exit("data"),h(R)):(e.consume(R),R===92?p:d)}function p(R){return R===92||R===124?(e.consume(R),d):d(R)}function v(R){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(R):(e.enter("tableDelimiterRow"),o=!1,Wn(R)?Jn(e,y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):y(R))}function y(R){return R===45||R===58?w(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),b):A(R)}function b(R){return Wn(R)?Jn(e,w,"whitespace")(R):w(R)}function w(R){return R===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||pn(R)?T(R):A(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),S(R)):A(R)}function S(R){return R===45?(e.consume(R),S):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(R))}function C(R){return Wn(R)?Jn(e,T,"whitespace")(R):T(R)}function T(R){return R===124?y(R):R===null||pn(R)?!o||r!==a?A(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):A(R)}function A(R){return t(R)}function M(R){return e.enter("tableRow"),j(R)}function j(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),j):R===null||pn(R)?(e.exit("tableRow"),n(R)):Wn(R)?Jn(e,j,"whitespace")(R):(e.enter("data"),N(R))}function N(R){return R===null||R===124||St(R)?(e.exit("data"),j(R)):(e.consume(R),R===92?F:N)}function F(R){return R===92||R===124?(e.consume(R),N):N(R)}}function whe(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,f=0,c,h,d;const p=new phe;for(;++tt[2]+1){const y=t[2]+1,b=t[3]-t[2]-1;e.add(y,b,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},_f(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function Mj(e,n,t,i,r){const a=[],o=_f(n.events,t);r&&(r.end=Object.assign({},o),a.push(["exit",r,n])),i.end=Object.assign({},o),a.push(["exit",i,n]),e.add(t+1,0,a)}function _f(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const khe={name:"tasklistCheck",tokenize:xhe};function _he(){return{text:{91:khe}}}function xhe(e,n,t){const i=this;return r;function r(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return St(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),o):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),o):t(f)}function o(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(f)}function l(f){return pn(f)?n(f):Wn(f)?e.check({tokenize:She},n,t)(f):t(f)}}function She(e,n,t){return Jn(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function Che(e){return WF([Xde(),ohe(),mhe(e),yhe(),_he()])}const Ahe={};function Ohe(e){const n=this,t=e||Ahe,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Che(t)),a.push(Wde()),o.push(Gde(t))}const jS="kanban_chat_v1";function Ehe(){try{const e=localStorage.getItem(jS);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function The({onBoardChange:e}){const[n,t]=O.useState(()=>Ehe()),[i,r]=O.useState(""),[a,o]=O.useState(!1),l=O.useRef(null);O.useEffect(()=>{localStorage.setItem(jS,JSON.stringify(n))},[n]),O.useEffect(()=>{var d;(d=l.current)==null||d.scrollTo({top:l.current.scrollHeight,behavior:"smooth"})},[n,a]);const f=async()=>{const d=i.trim();if(!d||a)return;const p={role:"user",content:d,ts:Date.now()},v=[...n,p];t(v),r(""),o(!0);try{const y=v.map(_=>({role:_.role,content:_.content})),b=await tie(y),w={role:"assistant",content:b.content,ts:Date.now(),tool_calls:b.tool_calls};t(_=>[..._,w]),b.board_changed&&e()}catch(y){it.show({color:"red",message:y.message}),t(b=>[...b,{role:"assistant",content:`Error: ${y.message}`,ts:Date.now()}])}finally{o(!1)}},c=d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),f())},h=()=>{t([]),localStorage.removeItem(jS)};return k.jsxs(Ut,{gap:0,h:"100%",children:[k.jsxs(wn,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[k.jsxs(wn,{gap:6,children:[k.jsx(jF,{size:18}),k.jsx(cn,{fw:600,size:"sm",children:"Asistente"})]}),k.jsx(vr,{label:"Limpiar conversacion",withArrow:!0,children:k.jsx(Yt,{variant:"subtle",color:"gray",size:"sm",onClick:h,disabled:n.length===0,children:k.jsx(Vy,{size:14})})})]}),k.jsx(lo,{viewportRef:l,style:{flex:1},type:"auto",p:"xs",children:k.jsxs(Ut,{gap:"xs",children:[n.length===0&&k.jsxs(cn,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",k.jsx("br",{}),'- "crea columna Backlog"',k.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',k.jsx("br",{}),'- "que hay en Doing?"']}),n.map((d,p)=>k.jsx(Mhe,{msg:d},p)),a&&k.jsxs(wn,{gap:6,pl:"xs",children:[k.jsx(tr,{size:"xs"}),k.jsx(cn,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),k.jsx(Ut,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:k.jsxs(wn,{align:"flex-end",gap:4,wrap:"nowrap",children:[k.jsx(Oh,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:d=>r(d.currentTarget.value),onKeyDown:c,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),k.jsx(Yt,{size:"lg",variant:"filled",onClick:f,disabled:!i.trim()||a,"aria-label":"Send",children:a?k.jsx(tr,{size:"xs",color:"white"}):k.jsx(Ioe,{size:16})})]})})]})}function Mhe({msg:e}){const n=e.role==="user";return k.jsx(ni,{p:"xs",radius:"md",withBorder:!0,bg:n?"blue.9":"dark.6",style:{alignSelf:n?"flex-end":"flex-start",maxWidth:"92%"},children:k.jsxs(Ut,{gap:4,children:[e.content&&k.jsx(_e,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:k.jsx(mce,{remarkPlugins:[Ohe],children:e.content})}),e.tool_calls&&e.tool_calls.length>0&&k.jsx(wn,{gap:4,wrap:"wrap",children:e.tool_calls.map((t,i)=>k.jsxs(gi,{size:"xs",color:t.ok?"teal":"red",variant:"light",title:t.error||"",children:[t.tool,!t.ok&&t.error?`: ${t.error}`:""]},i))})]})})}const jhe=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function Dhe({users:e}){const[n,t]=O.useState(new Date),[i,r]=O.useState(null),[a,o]=O.useState(null),[l,f]=O.useState(!1);O.useEffect(()=>{let y=!1;f(!0);const b=ze(n).startOf("month").format("YYYY-MM-DD"),w=ze(n).endOf("month").format("YYYY-MM-DD");return kB({from:b,to:w,assignee_id:i||void 0}).then(_=>{y||o(_)}).finally(()=>{y||f(!1)}),()=>{y=!0}},[n,i]);const c=O.useMemo(()=>e.map(y=>({value:y.id,label:y.display_name||y.username})),[e]),h=O.useMemo(()=>{const y=new Map;if(!a)return y;for(const b of a.created_daily){const w=y.get(b.date)??{created:0,done:0};w.created=b.count,y.set(b.date,w)}for(const b of a.throughput_daily){const w=y.get(b.date)??{created:0,done:0};w.done=b.count,y.set(b.date,w)}return y},[a]),d=O.useMemo(()=>{const y=ze(n).startOf("month"),b=ze(n).endOf("month"),w=(y.day()+6)%7,_=[];for(let S=0;SArray.from(h.values()).reduce((y,b)=>y+b.created,0),[h]),v=O.useMemo(()=>Array.from(h.values()).reduce((y,b)=>y+b.done,0),[h]);return k.jsx(_e,{p:"md",children:k.jsxs(Ut,{gap:"md",children:[k.jsxs(wn,{justify:"space-between",children:[k.jsx(bu,{order:3,children:"Calendario"}),k.jsxs(wn,{gap:"xs",wrap:"nowrap",children:[k.jsx($C,{label:"Mes",size:"xs",value:n,onChange:y=>y&&t(typeof y=="string"?new Date(y):y),style:{minWidth:160},clearable:!1}),k.jsx(Ko,{label:"Asignado",size:"xs",placeholder:"Todos",value:i,onChange:r,data:c,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),k.jsxs(wn,{gap:"md",children:[k.jsx(ni,{withBorder:!0,p:"sm",radius:"md",children:k.jsxs(wn,{gap:6,children:[k.jsx(Nh,{size:14,color:"var(--mantine-color-blue-5)"}),k.jsx(cn,{size:"sm",fw:600,children:p}),k.jsx(cn,{size:"xs",c:"dimmed",children:"creadas"})]})}),k.jsx(ni,{withBorder:!0,p:"sm",radius:"md",children:k.jsxs(wn,{gap:6,children:[k.jsx(Ph,{size:14,color:"var(--mantine-color-green-5)"}),k.jsx(cn,{size:"sm",fw:600,children:v}),k.jsx(cn,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),l&&!a?k.jsx(wc,{p:"xl",children:k.jsx(tr,{})}):k.jsxs(ni,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(Mh,{cols:7,spacing:4,mb:4,children:jhe.map(y=>k.jsx(cn,{size:"xs",c:"dimmed",ta:"center",fw:600,children:y},y))}),k.jsx(Mh,{cols:7,spacing:4,children:d.map((y,b)=>{if(!y.date)return k.jsx(_e,{style:{minHeight:72}},b);const w=h.get(y.date)??{created:0,done:0},_=parseInt(y.date.slice(8,10),10),S=y.date===ze().format("YYYY-MM-DD");return k.jsx(ni,{p:6,withBorder:!0,radius:"sm",style:{minHeight:72,borderColor:S?"var(--mantine-color-blue-5)":void 0,background:w.done>0?"rgba(81, 207, 102, 0.08)":w.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:k.jsxs(Ut,{gap:2,children:[k.jsx(cn,{size:"xs",fw:S?700:500,c:S?"blue":void 0,children:_}),w.created>0&&k.jsxs(wn,{gap:3,wrap:"nowrap",children:[k.jsx(Nh,{size:10,color:"var(--mantine-color-blue-5)"}),k.jsx(cn,{size:"xs",c:"blue",children:w.created})]}),w.done>0&&k.jsxs(wn,{gap:3,wrap:"nowrap",children:[k.jsx(Ph,{size:10,color:"var(--mantine-color-green-5)"}),k.jsx(cn,{size:"xs",c:"green",children:w.done})]})]})},b)})})]})]})})}function $q(e){return e?e.reduce((n,t)=>{const i=t.name.search(/\./);if(i>=0){const r=t.name.substring(i+1);return n[r]=t.label,n}return n[t.name]=t.label,n},{}):{}}var Rhe={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};function Phe(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[f,c]=l;return f===i?o:{...o,[f]:c}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function Nhe(e,n){const t=Phe(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function jj(e,n){return n==="radial"||n==="scatter"?Array.isArray(e.value)?e.value[1]-e.value[0]:e.value:Array.isArray(e.payload[e.dataKey])?e.payload[e.dataKey][1]-e.payload[e.dataKey][0]:e.payload[e.name]}const $he={type:"area",showColor:!0},t9=je(e=>{var R,L;const n=be("ChartTooltip",$he,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,label:c,unit:h,type:d,segmentId:p,mod:v,series:y,valueFormatter:b,showColor:w,attributes:_,...S}=n,C=ti(),T=We({name:"ChartTooltip",classes:Rhe,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!f)return null;const A=Nhe(f,p),M=d==="scatter"?(L=(R=f[0])==null?void 0:R.payload)==null?void 0:L.name:null,j=$q(y),N=c||M,F=A.map(B=>k.jsxs("div",{"data-type":d,...T("tooltipItem"),children:[k.jsxs("div",{...T("tooltipItemBody"),children:[w&&k.jsx("svg",{...T("tooltipItemColor"),children:k.jsx("circle",{r:6,fill:et(B.color,C),width:12,height:12,cx:6,cy:6})}),k.jsx("div",{...T("tooltipItemName"),children:j[B.name]||B.name})]}),k.jsxs("div",{...T("tooltipItemData"),children:[typeof b=="function"?b(jj(B,d)):jj(B,d),h||B.unit]})]},(B==null?void 0:B.key)??B.name));return k.jsxs(_e,{...T("tooltip"),mod:[{type:d},v],...S,children:[N&&k.jsx("div",{...T("tooltipLabel"),children:N}),k.jsx("div",{...T("tooltipBody"),children:F})]})});t9.displayName="@mantine/charts/ChartTooltip";var zq={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function zhe(e){return e.map(n=>{var i;const t=(i=n.dataKey)==null?void 0:i.split(".").pop();return{...n,dataKey:t,payload:{...n.payload,name:t,dataKey:t}}})}function Lhe(e){return zhe(e.filter(n=>n.color!=="none"))}const Zy=je(e=>{const n=be("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,onHighlight:c,legendPosition:h,mod:d,series:p,showColor:v,centered:y,attributes:b,...w}=n,_=We({name:"ChartLegend",classes:zq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,rootSelector:"legend"});if(!f)return null;const S=Lhe(f),C=$q(p),T=S.map((A,M)=>k.jsxs("div",{..._("legendItem"),onMouseEnter:()=>c(A.dataKey),onMouseLeave:()=>c(null),"data-without-color":v===!1||void 0,children:[k.jsx(kc,{color:A.color,size:12,..._("legendItemColor"),withShadow:!1}),k.jsx("p",{..._("legendItemName"),children:C[A.dataKey]||A.dataKey})]},M));return k.jsx(_e,{mod:[{position:h,centered:y},d],..._("legend"),...w,children:T})});Zy.displayName="@mantine/charts/ChartLegend";Zy.classes=zq;function Ihe({x:e,y:n,value:t,valueFormatter:i}){return k.jsx("g",{transform:`translate(${e},${n})`,children:k.jsx("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"start",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:i?i(t):t})})}var Qy={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},Fk,Dj;function yr(){if(Dj)return Fk;Dj=1;var e=Array.isArray;return Fk=e,Fk}var qk,Rj;function Lq(){if(Rj)return qk;Rj=1;var e=typeof cv=="object"&&cv&&cv.Object===Object&&cv;return qk=e,qk}var Hk,Pj;function co(){if(Pj)return Hk;Pj=1;var e=Lq(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return Hk=t,Hk}var Uk,Nj;function Wm(){if(Nj)return Uk;Nj=1;var e=co(),n=e.Symbol;return Uk=n,Uk}var Vk,$j;function Bhe(){if($j)return Vk;$j=1;var e=Wm(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),f=o[r];try{o[r]=void 0;var c=!0}catch{}var h=i.call(o);return c&&(l?o[r]=f:delete o[r]),h}return Vk=a,Vk}var Wk,zj;function Fhe(){if(zj)return Wk;zj=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return Wk=t,Wk}var Gk,Lj;function ss(){if(Lj)return Gk;Lj=1;var e=Wm(),n=Bhe(),t=Fhe(),i="[object Null]",r="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?r:i:a&&a in Object(l)?n(l):t(l)}return Gk=o,Gk}var Yk,Ij;function ls(){if(Ij)return Yk;Ij=1;function e(n){return n!=null&&typeof n=="object"}return Yk=e,Yk}var Kk,Bj;function Rc(){if(Bj)return Kk;Bj=1;var e=ss(),n=ls(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return Kk=i,Kk}var Xk,Fj;function i9(){if(Fj)return Xk;Fj=1;var e=yr(),n=Rc(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||n(a)?!0:i.test(a)||!t.test(a)||o!=null&&a in Object(o)}return Xk=r,Xk}var Zk,qj;function ul(){if(qj)return Zk;qj=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return Zk=e,Zk}var Qk,Hj;function r9(){if(Hj)return Qk;Hj=1;var e=ss(),n=ul(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var f=e(l);return f==i||f==r||f==t||f==a}return Qk=o,Qk}var Jk,Uj;function qhe(){if(Uj)return Jk;Uj=1;var e=co(),n=e["__core-js_shared__"];return Jk=n,Jk}var e_,Vj;function Hhe(){if(Vj)return e_;Vj=1;var e=qhe(),n=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function t(i){return!!n&&n in i}return e_=t,e_}var n_,Wj;function Iq(){if(Wj)return n_;Wj=1;var e=Function.prototype,n=e.toString;function t(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return n_=t,n_}var t_,Gj;function Uhe(){if(Gj)return t_;Gj=1;var e=r9(),n=Hhe(),t=ul(),i=Iq(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,f=o.toString,c=l.hasOwnProperty,h=RegExp("^"+f.call(c).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return t_=d,t_}var i_,Yj;function Vhe(){if(Yj)return i_;Yj=1;function e(n,t){return n==null?void 0:n[t]}return i_=e,i_}var r_,Kj;function xu(){if(Kj)return r_;Kj=1;var e=Uhe(),n=Vhe();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return r_=t,r_}var a_,Xj;function Jy(){if(Xj)return a_;Xj=1;var e=xu(),n=e(Object,"create");return a_=n,a_}var o_,Zj;function Whe(){if(Zj)return o_;Zj=1;var e=Jy();function n(){this.__data__=e?e(null):{},this.size=0}return o_=n,o_}var s_,Qj;function Ghe(){if(Qj)return s_;Qj=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return s_=e,s_}var l_,Jj;function Yhe(){if(Jj)return l_;Jj=1;var e=Jy(),n="__lodash_hash_undefined__",t=Object.prototype,i=t.hasOwnProperty;function r(a){var o=this.__data__;if(e){var l=o[a];return l===n?void 0:l}return i.call(o,a)?o[a]:void 0}return l_=r,l_}var u_,e8;function Khe(){if(e8)return u_;e8=1;var e=Jy(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return u_=i,u_}var f_,n8;function Xhe(){if(n8)return f_;n8=1;var e=Jy(),n="__lodash_hash_undefined__";function t(i,r){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=e&&r===void 0?n:r,this}return f_=t,f_}var c_,t8;function Zhe(){if(t8)return c_;t8=1;var e=Whe(),n=Ghe(),t=Yhe(),i=Khe(),r=Xhe();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l-1}return g_=n,g_}var y_,u8;function tme(){if(u8)return y_;u8=1;var e=e0();function n(t,i){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,i])):r[a][1]=i,this}return y_=n,y_}var b_,f8;function n0(){if(f8)return b_;f8=1;var e=Qhe(),n=Jhe(),t=eme(),i=nme(),r=tme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l0?1:-1},Vl=function(n){return ou(n)&&n.indexOf("%")===n.length-1},Fe=function(n){return Cme(n)&&!Nc(n)},Ame=function(n){return In(n)},yi=function(n){return Fe(n)||ou(n)},Ome=0,$c=function(n){var t=++Ome;return"".concat(n||"").concat(t)},su=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Fe(n)&&!ou(n))return i;var a;if(Vl(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return Nc(a)&&(a=i),r&&a>t&&(a=t),a},Us=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},Eme=function(n){if(!Array.isArray(n))return!1;for(var t=n.length,i={},r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Nme(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function RS(e){"@babel/helpers - typeof";return RS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},RS(e)}var L8={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},qo=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},I8=null,V_=null,c9=function e(n){if(n===I8&&Array.isArray(V_))return V_;var t=[];return O.Children.forEach(n,function(i){In(i)||(kme.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),V_=t,I8=n,t};function sa(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return qo(r)}):i=[qo(n)],c9(e).forEach(function(r){var a=oa(r,"type.displayName")||oa(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Dr(e,n){var t=sa(e,n);return t&&t[0]}var B8=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!Fe(i)||i<=0||!Fe(r)||r<=0)},$me=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],zme=function(n){return n&&n.type&&ou(n.type)&&$me.indexOf(n.type)>=0},Vq=function(n){return n&&RS(n)==="object"&&"clipDot"in n},Lme=function(n,t,i,r){var a,o=(a=U_==null?void 0:U_[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!jn(n)&&(r&&o.includes(t)||jme.includes(t))||i&&f9.includes(t)},Nn=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(O.isValidElement(n)&&(r=n.props),!Pc(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;Lme((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},PS=function e(n,t){if(n===t)return!0;var i=O.Children.count(n);if(i!==O.Children.count(t))return!1;if(i===0)return!0;if(i===1)return F8(Array.isArray(n)?n[0]:n,Array.isArray(t)?t[0]:t);for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Hme(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function $S(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,f=e.desc,c=qme(e,Fme),h=r||{width:t,height:i,x:0,y:0},d=sn("recharts-surface",a);return Z.createElement("svg",NS({},Nn(c,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Z.createElement("title",null,l),Z.createElement("desc",null,f),n)}var Ume=["children","className"];function zS(){return zS=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Wme(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Et=Z.forwardRef(function(e,n){var t=e.children,i=e.className,r=Vme(e,Ume),a=sn("recharts-layer",i);return Z.createElement("g",zS({className:a},Nn(r,!0),{ref:n}),t)}),Ho=function(n,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;aa?0:a+t),i=i>a?a:i,i<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(a);++r=a?t:e(t,i,r)}return G_=n,G_}var Y_,V8;function Wq(){if(V8)return Y_;V8=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function f(c){return l.test(c)}return Y_=f,Y_}var K_,W8;function Kme(){if(W8)return K_;W8=1;function e(n){return n.split("")}return K_=e,K_}var X_,G8;function Xme(){if(G8)return X_;G8=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+l+"|"+f+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=c+"?",b="["+a+"]?",w="(?:"+v+"(?:"+[h,d,p].join("|")+")"+b+y+")*",_=b+y+w,S="(?:"+[h+l+"?",l,d,p,o].join("|")+")",C=RegExp(f+"(?="+f+")|"+S+_,"g");function T(A){return A.match(C)||[]}return X_=T,X_}var Z_,Y8;function Zme(){if(Y8)return Z_;Y8=1;var e=Kme(),n=Wq(),t=Xme();function i(r){return n(r)?t(r):e(r)}return Z_=i,Z_}var Q_,K8;function Qme(){if(K8)return Q_;K8=1;var e=Yme(),n=Wq(),t=Zme(),i=Fq();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,f=l?l[0]:o.charAt(0),c=l?e(l,1).join(""):o.slice(1);return f[a]()+c}}return Q_=r,Q_}var J_,X8;function Jme(){if(X8)return J_;X8=1;var e=Qme(),n=e("toUpperCase");return J_=n,J_}var epe=Jme();const r0=at(epe);function Ot(e){return function(){return e}}const Gq=Math.cos,jg=Math.sin,$a=Math.sqrt,Dg=Math.PI,a0=2*Dg,LS=Math.PI,IS=2*LS,Ll=1e-6,npe=IS-Ll;function Yq(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return Yq;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rLl)if(!(Math.abs(d*f-c*h)>Ll)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,y=r-l,b=f*f+c*c,w=v*v+y*y,_=Math.sqrt(b),S=Math.sqrt(p),C=a*Math.tan((LS-Math.acos((b+p-w)/(2*_*S)))/2),T=C/S,A=C/_;Math.abs(T-1)>Ll&&this._append`L${n+T*h},${t+T*d}`,this._append`A${a},${a},0,0,${+(d*v>h*y)},${this._x1=n+A*f},${this._y1=t+A*c}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),f=i*Math.sin(r),c=n+l,h=t+f,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Ll||Math.abs(this._y1-h)>Ll)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%IS+IS),p>npe?this._append`A${i},${i},0,1,${d},${n-l},${t-f}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>Ll&&this._append`A${i},${i},0,${+(p>=LS)},${d},${this._x1=n+i*Math.cos(a)},${this._y1=t+i*Math.sin(a)}`)}rect(n,t,i,r){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function d9(e){let n=3;return e.digits=function(t){if(!arguments.length)return n;if(t==null)n=null;else{const i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);n=i}return e},()=>new ipe(n)}function h9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Kq(e){this._context=e}Kq.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function o0(e){return new Kq(e)}function Xq(e){return e[0]}function Zq(e){return e[1]}function Qq(e,n){var t=Ot(!0),i=null,r=o0,a=null,o=d9(l);e=typeof e=="function"?e:e===void 0?Xq:Ot(e),n=typeof n=="function"?n:n===void 0?Zq:Ot(n);function l(f){var c,h=(f=h9(f)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),c=0;c<=h;++c)!(c=v;--y)l.point(C[y],T[y]);l.lineEnd(),l.areaEnd()}_&&(C[p]=+e(w,p,d),T[p]=+n(w,p,d),l.point(i?+i(w,p,d):C[p],t?+t(w,p,d):T[p]))}if(S)return l=null,S+""||null}function h(){return Qq().defined(r).curve(o).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ot(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ot(+d),c):e},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Ot(+d),c):i},c.y=function(d){return arguments.length?(n=typeof d=="function"?d:Ot(+d),t=null,c):n},c.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Ot(+d),c):n},c.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Ot(+d),c):t},c.lineX0=c.lineY0=function(){return h().x(e).y(n)},c.lineY1=function(){return h().x(e).y(t)},c.lineX1=function(){return h().x(i).y(n)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Ot(!!d),c):r},c.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),c):o},c.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),c):a},c}class Jq{constructor(n,t){this._context=n,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,t){switch(n=+n,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,t,n,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,n,this._y0,n,t);break}}this._x0=n,this._y0=t}}function rpe(e){return new Jq(e,!0)}function ape(e){return new Jq(e,!1)}const m9={draw(e,n){const t=$a(n/Dg);e.moveTo(t,0),e.arc(0,0,t,0,a0)}},ope={draw(e,n){const t=$a(n/5)/2;e.moveTo(-3*t,-t),e.lineTo(-t,-t),e.lineTo(-t,-3*t),e.lineTo(t,-3*t),e.lineTo(t,-t),e.lineTo(3*t,-t),e.lineTo(3*t,t),e.lineTo(t,t),e.lineTo(t,3*t),e.lineTo(-t,3*t),e.lineTo(-t,t),e.lineTo(-3*t,t),e.closePath()}},eH=$a(1/3),spe=eH*2,lpe={draw(e,n){const t=$a(n/spe),i=t*eH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},upe={draw(e,n){const t=$a(n),i=-t/2;e.rect(i,i,t,t)}},fpe=.8908130915292852,nH=jg(Dg/10)/jg(7*Dg/10),cpe=jg(a0/10)*nH,dpe=-Gq(a0/10)*nH,hpe={draw(e,n){const t=$a(n*fpe),i=cpe*t,r=dpe*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=a0*a/5,l=Gq(o),f=jg(o);e.lineTo(f*t,-l*t),e.lineTo(l*i-f*r,f*i+l*r)}e.closePath()}},e2=$a(3),mpe={draw(e,n){const t=-$a(n/(e2*3));e.moveTo(0,t*2),e.lineTo(-e2*t,-t),e.lineTo(e2*t,-t),e.closePath()}},Kr=-.5,Xr=$a(3)/2,BS=1/$a(12),ppe=(BS/2+1)*3,vpe={draw(e,n){const t=$a(n/ppe),i=t/2,r=t*BS,a=i,o=t*BS+t,l=-a,f=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,f),e.lineTo(Kr*i-Xr*r,Xr*i+Kr*r),e.lineTo(Kr*a-Xr*o,Xr*a+Kr*o),e.lineTo(Kr*l-Xr*f,Xr*l+Kr*f),e.lineTo(Kr*i+Xr*r,Kr*r-Xr*i),e.lineTo(Kr*a+Xr*o,Kr*o-Xr*a),e.lineTo(Kr*l+Xr*f,Kr*f-Xr*l),e.closePath()}};function gpe(e,n){let t=null,i=d9(r);e=typeof e=="function"?e:Ot(e||m9),n=typeof n=="function"?n:Ot(n===void 0?64:+n);function r(){let a;if(t||(t=a=i()),e.apply(this,arguments).draw(t,+n.apply(this,arguments)),a)return t=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ot(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Ot(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function Rg(){}function Pg(e,n,t){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+t)/6)}function tH(e){this._context=e}tH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Pg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Pg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function ype(e){return new tH(e)}function iH(e){this._context=e}iH.prototype={areaStart:Rg,areaEnd:Rg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:Pg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function bpe(e){return new iH(e)}function rH(e){this._context=e}rH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var t=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 3:this._point=4;default:Pg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function wpe(e){return new rH(e)}function aH(e){this._context=e}aH.prototype={areaStart:Rg,areaEnd:Rg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function kpe(e){return new aH(e)}function Z8(e){return e<0?-1:1}function Q8(e,n,t){var i=e._x1-e._x0,r=n-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),o=(t-e._y1)/(r||i<0&&-0),l=(a*r+o*i)/(i+r);return(Z8(a)+Z8(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function J8(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function n2(e,n,t){var i=e._x0,r=e._y0,a=e._x1,o=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,r+l*n,a-l,o-l*t,a,o)}function Ng(e){this._context=e}Ng.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:n2(this,this._t0,J8(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var t=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,n2(this,J8(this,t=Q8(this,e,n)),t);break;default:n2(this,this._t0,t=Q8(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function oH(e){this._context=new sH(e)}(oH.prototype=Object.create(Ng.prototype)).point=function(e,n){Ng.prototype.point.call(this,n,e)};function sH(e){this._context=e}sH.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,t,i,r,a){this._context.bezierCurveTo(n,e,i,t,a,r)}};function _pe(e){return new Ng(e)}function xpe(e){return new oH(e)}function lH(e){this._context=e}lH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,t=e.length;if(t)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),t===2)this._context.lineTo(e[1],n[1]);else for(var i=eD(e),r=eD(n),a=0,o=1;o=0;--n)r[n]=(o[n]-r[n+1])/a[n];for(a[t-1]=(e[t]+r[t-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,n)}break}}this._x=e,this._y=n}};function Cpe(e){return new s0(e,.5)}function Ape(e){return new s0(e,0)}function Ope(e){return new s0(e,1)}function qf(e,n){if((o=e.length)>1)for(var t=1,i,r,a=e[n[0]],o,l=a.length;t=0;)t[n]=n;return t}function Epe(e,n){return e[n]}function Tpe(e){const n=[];return n.key=e,n}function Mpe(){var e=Ot([]),n=FS,t=qf,i=Epe;function r(a){var o=Array.from(e.apply(this,arguments),Tpe),l,f=o.length,c=-1,h;for(const d of a)for(l=0,++c;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Ipe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var uH={symbolCircle:m9,symbolCross:ope,symbolDiamond:lpe,symbolSquare:upe,symbolStar:hpe,symbolTriangle:mpe,symbolWye:vpe},Bpe=Math.PI/180,Fpe=function(n){var t="symbol".concat(r0(n));return uH[t]||m9},qpe=function(n,t,i){if(t==="area")return n;switch(i){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var r=18*Bpe;return 1.25*n*n*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},Hpe=function(n,t){uH["symbol".concat(r0(n))]=t},p9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,f=Lpe(n,Ppe),c=tD(tD({},f),{},{type:i,size:a,sizeType:l}),h=function(){var w=Fpe(i),_=gpe().type(w).size(qpe(a,l,i));return _()},d=c.className,p=c.cx,v=c.cy,y=Nn(c,!0);return p===+p&&v===+v&&a===+a?Z.createElement("path",qS({},y,{className:sn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};p9.registerSymbol=Hpe;function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hf(e)}function HS(){return HS=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var S=v.inactive?c:v.color;return Z.createElement("li",HS({className:w,style:d,key:"legend-item-".concat(y)},Mg(i.props,v,y)),Z.createElement($S,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Z.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},b?b(_,v,y):_))})}},{key:"render",value:function(){var i=this.props,r=i.payload,a=i.layout,o=i.align;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Z.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(O.PureComponent);Ih(v9,"displayName","Legend");Ih(v9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var t2,rD;function Jpe(){if(rD)return t2;rD=1;var e=n0();function n(){this.__data__=new e,this.size=0}return t2=n,t2}var i2,aD;function eve(){if(aD)return i2;aD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return i2=e,i2}var r2,oD;function nve(){if(oD)return r2;oD=1;function e(n){return this.__data__.get(n)}return r2=e,r2}var a2,sD;function tve(){if(sD)return a2;sD=1;function e(n){return this.__data__.has(n)}return a2=e,a2}var o2,lD;function ive(){if(lD)return o2;lD=1;var e=n0(),n=o9(),t=s9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!n||f.lengthv))return!1;var b=d.get(o),w=d.get(l);if(b&&w)return b==l&&w==o;var _=-1,S=!0,C=f&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return E2=n,E2}var T2,DD;function vve(){if(DD)return T2;DD=1;var e=ss(),n=w9(),t=ls(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",f="[object Function]",c="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",y="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",C="[object Float64Array]",T="[object Int8Array]",A="[object Int16Array]",M="[object Int32Array]",j="[object Uint8Array]",N="[object Uint8ClampedArray]",F="[object Uint16Array]",R="[object Uint32Array]",L={};L[S]=L[C]=L[T]=L[A]=L[M]=L[j]=L[N]=L[F]=L[R]=!0,L[i]=L[r]=L[w]=L[a]=L[_]=L[o]=L[l]=L[f]=L[c]=L[h]=L[d]=L[p]=L[v]=L[y]=L[b]=!1;function B(G){return t(G)&&n(G.length)&&!!L[e(G)]}return T2=B,T2}var M2,RD;function bH(){if(RD)return M2;RD=1;function e(n){return function(t){return n(t)}}return M2=e,M2}var rh={exports:{}};rh.exports;var PD;function gve(){return PD||(PD=1,(function(e,n){var t=Lq(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var f=r&&r.require&&r.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(rh,rh.exports)),rh.exports}var j2,ND;function wH(){if(ND)return j2;ND=1;var e=vve(),n=bH(),t=gve(),i=t&&t.isTypedArray,r=i?n(i):e;return j2=r,j2}var D2,$D;function yve(){if($D)return D2;$D=1;var e=hve(),n=y9(),t=yr(),i=yH(),r=b9(),a=wH(),o=Object.prototype,l=o.hasOwnProperty;function f(c,h){var d=t(c),p=!d&&n(c),v=!d&&!p&&i(c),y=!d&&!p&&!v&&a(c),b=d||p||v||y,w=b?e(c.length,String):[],_=w.length;for(var S in c)(h||l.call(c,S))&&!(b&&(S=="length"||v&&(S=="offset"||S=="parent")||y&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||r(S,_)))&&w.push(S);return w}return D2=f,D2}var R2,zD;function bve(){if(zD)return R2;zD=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return R2=n,R2}var P2,LD;function kH(){if(LD)return P2;LD=1;function e(n,t){return function(i){return n(t(i))}}return P2=e,P2}var N2,ID;function wve(){if(ID)return N2;ID=1;var e=kH(),n=e(Object.keys,Object);return N2=n,N2}var $2,BD;function kve(){if(BD)return $2;BD=1;var e=bve(),n=wve(),t=Object.prototype,i=t.hasOwnProperty;function r(a){if(!e(a))return n(a);var o=[];for(var l in Object(a))i.call(a,l)&&l!="constructor"&&o.push(l);return o}return $2=r,$2}var z2,FD;function Gm(){if(FD)return z2;FD=1;var e=r9(),n=w9();function t(i){return i!=null&&n(i.length)&&!e(i)}return z2=t,z2}var L2,qD;function l0(){if(qD)return L2;qD=1;var e=yve(),n=kve(),t=Gm();function i(r){return t(r)?e(r):n(r)}return L2=i,L2}var I2,HD;function _ve(){if(HD)return I2;HD=1;var e=uve(),n=dve(),t=l0();function i(r){return e(r,t,n)}return I2=i,I2}var B2,UD;function xve(){if(UD)return B2;UD=1;var e=_ve(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,f,c,h){var d=l&n,p=e(a),v=p.length,y=e(o),b=y.length;if(v!=b&&!d)return!1;for(var w=v;w--;){var _=p[w];if(!(d?_ in o:i.call(o,_)))return!1}var S=h.get(a),C=h.get(o);if(S&&C)return S==o&&C==a;var T=!0;h.set(a,o),h.set(o,a);for(var A=d;++w-1}return dx=n,dx}var hx,g7;function Hve(){if(g7)return hx;g7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=c?null:r(f);if(_)return a(_);y=!1,p=i,w=new e}else w=c?[]:b;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function rge(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function age(e){return e.value}function oge(e,n){if(Z.isValidElement(e))return Z.cloneElement(e,n);if(typeof e=="function")return Z.createElement(e,n);n.ref;var t=ige(n,Kve);return Z.createElement(v9,t)}var C7=1,Uo=(function(e){function n(){var t;Xve(this,n);for(var i=arguments.length,r=new Array(i),a=0;aC7||Math.abs(r.height-this.lastBoundingBox.height)>C7)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,i&&i(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Do({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,f=r.margin,c=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=o==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var y=this.getBBoxSnapshot();p={top:((h||0)-y.height)/2}}else p=l==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Do(Do({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,f=r.wrapperStyle,c=r.payloadUniqBy,h=r.payload,d=Do(Do({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(f)),f);return Z.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},oge(a,Do(Do({},this.props),{},{payload:AH(h,c,age)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Do(Do({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&Fe(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(O.PureComponent);u0(Uo,"displayName","Legend");u0(Uo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var yx,A7;function sge(){if(A7)return yx;A7=1;var e=Wm(),n=y9(),t=yr(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return yx=r,yx}var bx,O7;function TH(){if(O7)return bx;O7=1;var e=gH(),n=sge();function t(i,r,a,o,l){var f=-1,c=i.length;for(a||(a=n),l||(l=[]);++f0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return bx=t,bx}var wx,E7;function lge(){if(E7)return wx;E7=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),f=l.length;f--;){var c=l[n?f:++a];if(i(o[c],c,o)===!1)break}return t}}return wx=e,wx}var kx,T7;function uge(){if(T7)return kx;T7=1;var e=lge(),n=e();return kx=n,kx}var _x,M7;function MH(){if(M7)return _x;M7=1;var e=uge(),n=l0();function t(i,r){return i&&e(i,r,n)}return _x=t,_x}var xx,j7;function fge(){if(j7)return xx;j7=1;var e=Gm();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,f=Object(r);(i?l--:++li||l&&f&&h&&!c&&!d||a&&f&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=c)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return Ex=n,Ex}var Tx,z7;function mge(){if(z7)return Tx;z7=1;var e=l9(),n=u9(),t=fl(),i=jH(),r=cge(),a=bH(),o=hge(),l=zc(),f=yr();function c(h,d,p){d.length?d=e(d,function(b){return f(b)?function(w){return n(w,b.length===1?b[0]:b)}:b}):d=[l];var v=-1;d=e(d,a(t));var y=i(h,function(b,w,_){var S=e(d,function(C){return C(b)});return{criteria:S,index:++v,value:b}});return r(y,function(b,w){return o(b,w,p)})}return Tx=c,Tx}var Mx,L7;function pge(){if(L7)return Mx;L7=1;function e(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}return Mx=e,Mx}var jx,I7;function vge(){if(I7)return jx;I7=1;var e=pge(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,f=n(o.length-r,0),c=Array(f);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return Nx=i,Nx}var $x,U7;function wge(){if(U7)return $x;U7=1;var e=yge(),n=bge(),t=n(e);return $x=t,$x}var zx,V7;function kge(){if(V7)return zx;V7=1;var e=zc(),n=vge(),t=wge();function i(r,a){return t(n(r,a,e),r+"")}return zx=i,zx}var Lx,W7;function f0(){if(W7)return Lx;W7=1;var e=a9(),n=Gm(),t=b9(),i=ul();function r(a,o,l){if(!i(l))return!1;var f=typeof o;return(f=="number"?n(l)&&t(o,l.length):f=="string"&&o in l)?e(l[o],a):!1}return Lx=r,Lx}var Ix,G7;function _ge(){if(G7)return Ix;G7=1;var e=TH(),n=mge(),t=kge(),i=f0(),r=t(function(a,o){if(a==null)return[];var l=o.length;return l>1&&i(a,o[0],o[1])?o=[]:l>2&&i(o[0],o[1],o[2])&&(o=[o[0]]),n(a,e(o,1),[])});return Ix=r,Ix}var xge=_ge();const x9=at(xge);function Bh(e){"@babel/helpers - typeof";return Bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bh(e)}function WS(){return WS=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n.x),"".concat(Bd,"-left"),Fe(t)&&n&&Fe(n.x)&&t=n.y),"".concat(Bd,"-top"),Fe(i)&&n&&Fe(n.y)&&ib?Math.max(h,f[i]):Math.max(d,f[i])}function Lge(e){var n=e.translateX,t=e.translateY,i=e.useTranslate3d;return{transform:i?"translate3d(".concat(n,"px, ").concat(t,"px, 0)"):"translate(".concat(n,"px, ").concat(t,"px)")}}function Ige(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,f=e.viewBox,c,h,d;return o.height>0&&o.width>0&&t?(h=X7({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:f,viewBoxDimension:f.width}),d=X7({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:f,viewBoxDimension:f.height}),c=Lge({translateX:h,translateY:d,useTranslate3d:l})):c=$ge,{cssProperties:c,cssClasses:zge({translateX:h,translateY:d,coordinate:t})}}function Vf(e){"@babel/helpers - typeof";return Vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vf(e)}function Z7(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Q7(e){for(var n=1;nJ7||Math.abs(i.height-this.state.lastBoundingBox.height)>J7)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,f=r.animationEasing,c=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,y=r.position,b=r.reverseDirection,w=r.useTranslate3d,_=r.viewBox,S=r.wrapperStyle,C=Ige({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:y,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:_}),T=C.cssClasses,A=C.cssProperties,M=Q7(Q7({transition:p&&a?"transform ".concat(l,"ms ").concat(f):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},S);return Z.createElement("div",{tabIndex:-1,className:T,style:M,ref:function(N){i.wrapperNode=N}},c)}}])})(O.PureComponent),Kge=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Su={isSsr:Kge()};function Wf(e){"@babel/helpers - typeof";return Wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wf(e)}function eR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function nR(e){for(var n=1;n0;return Z.createElement(Yge,{allowEscapeViewBox:o,animationDuration:l,animationEasing:f,isAnimationActive:p,active:a,coordinate:h,hasPayload:M,offset:v,position:w,reverseDirection:_,useTranslate3d:S,viewBox:C,wrapperStyle:T},a1e(c,nR(nR({},this.props),{},{payload:A})))}}])})(O.PureComponent);S9(na,"displayName","Tooltip");S9(na,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Su.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Fx,tR;function o1e(){if(tR)return Fx;tR=1;var e=co(),n=function(){return e.Date.now()};return Fx=n,Fx}var qx,iR;function s1e(){if(iR)return qx;iR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return qx=n,qx}var Hx,rR;function l1e(){if(rR)return Hx;rR=1;var e=s1e(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Hx=t,Hx}var Ux,aR;function zH(){if(aR)return Ux;aR=1;var e=l1e(),n=ul(),t=Rc(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function f(c){if(typeof c=="number")return c;if(t(c))return i;if(n(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=n(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=a.test(c);return d||o.test(c)?l(c.slice(2),d?2:8):r.test(c)?i:+c}return Ux=f,Ux}var Vx,oR;function u1e(){if(oR)return Vx;oR=1;var e=ul(),n=o1e(),t=zH(),i="Expected a function",r=Math.max,a=Math.min;function o(l,f,c){var h,d,p,v,y,b,w=0,_=!1,S=!1,C=!0;if(typeof l!="function")throw new TypeError(i);f=t(f)||0,e(c)&&(_=!!c.leading,S="maxWait"in c,p=S?r(t(c.maxWait)||0,f):p,C="trailing"in c?!!c.trailing:C);function T(G){var H=h,U=d;return h=d=void 0,w=G,v=l.apply(U,H),v}function A(G){return w=G,y=setTimeout(N,f),_?T(G):v}function M(G){var H=G-b,U=G-w,P=f-H;return S?a(P,p-U):P}function j(G){var H=G-b,U=G-w;return b===void 0||H>=f||H<0||S&&U>=p}function N(){var G=n();if(j(G))return F(G);y=setTimeout(N,M(G))}function F(G){return y=void 0,C&&h?T(G):(h=d=void 0,v)}function R(){y!==void 0&&clearTimeout(y),w=0,h=b=d=y=void 0}function L(){return y===void 0?v:F(n())}function B(){var G=n(),H=j(G);if(h=arguments,d=this,b=G,H){if(y===void 0)return A(b);if(S)return clearTimeout(y),y=setTimeout(N,f),T(b)}return y===void 0&&(y=setTimeout(N,f)),v}return B.cancel=R,B.flush=L,B}return Vx=o,Vx}var Wx,sR;function f1e(){if(sR)return Wx;sR=1;var e=u1e(),n=ul(),t="Expected a function";function i(r,a,o){var l=!0,f=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,f="trailing"in o?!!o.trailing:f),e(r,a,{leading:l,maxWait:a,trailing:f})}return Wx=i,Wx}var c1e=f1e();const LH=at(c1e);function qh(e){"@babel/helpers - typeof";return qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qh(e)}function lR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Tv(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=LH(G,b,{trailing:!0,leading:!1}));var H=new ResizeObserver(G),U=A.current.getBoundingClientRect(),P=U.width,z=U.height;return L(P,z),H.observe(A.current),function(){H.disconnect()}},[L,b]);var B=O.useMemo(function(){var G=F.containerWidth,H=F.containerHeight;if(G<0||H<0)return null;Ho(Vl(o)||Vl(f),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,f),Ho(!t||t>0,"The aspect(%s) must be greater than zero.",t);var U=Vl(o)?G:o,P=Vl(f)?H:f;t&&t>0&&(U?P=U/t:P&&(U=P*t),p&&P>p&&(P=p)),Ho(U>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,U,P,o,f,h,d,t);var z=!Array.isArray(v)&&qo(v.type).endsWith("Chart");return Z.Children.map(v,function(q){return Z.isValidElement(q)?O.cloneElement(q,Tv({width:U,height:P},z?{style:Tv({height:"100%",width:"100%",maxHeight:P,maxWidth:U},q.props.style)}:{})):q})},[t,v,f,p,d,h,F,o]);return Z.createElement("div",{id:w?"".concat(w):void 0,className:sn("recharts-responsive-container",_),style:Tv(Tv({},T),{},{width:o,height:f,minWidth:h,minHeight:d,maxHeight:p}),ref:A},B)}),IH=function(n){return null};IH.displayName="Cell";function Hh(e){"@babel/helpers - typeof";return Hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hh(e)}function fR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function XS(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Su.isSsr)return{width:0,height:0};var i=C1e(t),r=JSON.stringify({text:n,copyStyle:i});if(vf.widthCache[r])return vf.widthCache[r];try{var a=document.getElementById(cR);a||(a=document.createElement("span"),a.setAttribute("id",cR),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=XS(XS({},S1e),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),f={width:l.width,height:l.height};return vf.widthCache[r]=f,++vf.cacheCount>x1e&&(vf.cacheCount=0,vf.widthCache={}),f}catch{return{width:0,height:0}}},A1e=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function Uh(e){"@babel/helpers - typeof";return Uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Uh(e)}function Bg(e,n){return M1e(e)||T1e(e,n)||E1e(e,n)||O1e()}function O1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E1e(e,n){if(e){if(typeof e=="string")return dR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return dR(e,n)}}function dR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function U1e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function yR(e,n){return Y1e(e)||G1e(e,n)||W1e(e,n)||V1e()}function V1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W1e(e,n){if(e){if(typeof e=="string")return bR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return bR(e,n)}}function bR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&arguments[0]!==void 0?arguments[0]:[];return U.reduce(function(P,z){var q=z.word,Y=z.width,D=P[P.length-1];if(D&&(r==null||a||D.width+Y+iz.width?P:z})};if(!h)return v;for(var b="…",w=function(U){var P=d.slice(0,U),z=HH({breakAll:c,style:f,children:P+b}).wordsWithComputedWidth,q=p(z),Y=q.length>o||y(q).width>Number(r);return[Y,q]},_=0,S=d.length-1,C=0,T;_<=S&&C<=d.length-1;){var A=Math.floor((_+S)/2),M=A-1,j=w(M),N=yR(j,2),F=N[0],R=N[1],L=w(A),B=yR(L,1),G=B[0];if(!F&&!G&&(_=A+1),F&&G&&(S=A-1),!F&&G){T=R;break}C++}return T||v},wR=function(n){var t=In(n)?[]:n.toString().split(qH);return[{words:t}]},X1e=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Su.isSsr){var f,c,h=HH({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;f=d,c=p}else return wR(r);return K1e({breakAll:o,children:r,maxLines:l,style:a},f,c,t,i)}return wR(r)},kR="#808080",Fg=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,f=n.capHeight,c=f===void 0?"0.71em":f,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,y=n.verticalAnchor,b=y===void 0?"end":y,w=n.fill,_=w===void 0?kR:w,S=gR(n,q1e),C=O.useMemo(function(){return X1e({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:d,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,d,S.style,S.width]),T=S.dx,A=S.dy,M=S.angle,j=S.className,N=S.breakAll,F=gR(S,H1e);if(!yi(i)||!yi(a))return null;var R=i+(Fe(T)?T:0),L=a+(Fe(A)?A:0),B;switch(b){case"start":B=Gx("calc(".concat(c,")"));break;case"middle":B=Gx("calc(".concat((C.length-1)/2," * -").concat(l," + (").concat(c," / 2))"));break;default:B=Gx("calc(".concat(C.length-1," * -").concat(l,")"));break}var G=[];if(d){var H=C[0].width,U=S.width;G.push("scale(".concat((Fe(U)?U/H:1)/H,")"))}return M&&G.push("rotate(".concat(M,", ").concat(R,", ").concat(L,")")),G.length&&(F.transform=G.join(" ")),Z.createElement("text",ZS({},Nn(F,!0),{x:R,y:L,className:sn("recharts-text",j),textAnchor:v,fill:_.includes("url")?kR:_}),C.map(function(P,z){var q=P.words.join(N?"":" ");return Z.createElement("tspan",{x:R,dy:z===0?B:l,key:"".concat(q,"-").concat(z)},q)}))};function Zs(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function Z1e(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function A9(e){let n,t,i;e.length!==2?(n=Zs,t=(l,f)=>Zs(e(l),f),i=(l,f)=>e(l)-f):(n=e===Zs||e===Z1e?e:Q1e,t=e,i=e);function r(l,f,c=0,h=l.length){if(c>>1;t(l[d],f)<0?c=d+1:h=d}while(c>>1;t(l[d],f)<=0?c=d+1:h=d}while(cc&&i(l[d-1],f)>-i(l[d],f)?d-1:d}return{left:r,center:o,right:a}}function Q1e(){return 0}function UH(e){return e===null?NaN:+e}function*J1e(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const eye=A9(Zs),Ym=eye.right;A9(UH).center;class _R extends Map{constructor(n,t=iye){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[i,r]of n)this.set(i,r)}get(n){return super.get(xR(this,n))}has(n){return super.has(xR(this,n))}set(n,t){return super.set(nye(this,n),t)}delete(n){return super.delete(tye(this,n))}}function xR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function nye({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function tye({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function iye(e){return e!==null&&typeof e=="object"?e.valueOf():e}function rye(e=Zs){if(e===Zs)return VH;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,t)=>{const i=e(n,t);return i||i===0?i:(e(t,t)===0)-(e(n,n)===0)}}function VH(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const aye=Math.sqrt(50),oye=Math.sqrt(10),sye=Math.sqrt(2);function qg(e,n,t){const i=(n-e)/Math.max(0,t),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=aye?10:a>=oye?5:a>=sye?2:1;let l,f,c;return r<0?(c=Math.pow(10,-r)/o,l=Math.round(e*c),f=Math.round(n*c),l/cn&&--f,c=-c):(c=Math.pow(10,r)*o,l=Math.round(e/c),f=Math.round(n/c),l*cn&&--f),f0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,f=new Array(l);if(i)if(o<0)for(let c=0;c=i)&&(t=i);return t}function CR(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function WH(e,n,t=0,i=1/0,r){if(n=Math.floor(n),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(e.length-1,i)),!(t<=n&&n<=i))return e;for(r=r===void 0?VH:rye(r);i>t;){if(i-t>600){const f=i-t+1,c=n-t+1,h=Math.log(f),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(f-d)/f)*(c-f/2<0?-1:1),v=Math.max(t,Math.floor(n-c*d/f+p)),y=Math.min(i,Math.floor(n+(f-c)*d/f+p));WH(e,n,v,y,r)}const a=e[n];let o=t,l=i;for(Fd(e,t,n),r(e[i],a)>0&&Fd(e,t,i);o0;)--l}r(e[t],a)===0?Fd(e,t,l):(++l,Fd(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function Fd(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function lye(e,n,t){if(e=Float64Array.from(J1e(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return CR(e);if(n>=1)return SR(e);var i,r=(i-1)*n,a=Math.floor(r),o=SR(WH(e,a).subarray(0,a+1)),l=CR(e.subarray(a+1));return o+(l-o)*(r-a)}}function uye(e,n,t=UH){if(!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return+t(e[0],0,e);if(n>=1)return+t(e[i-1],i-1,e);var i,r=(i-1)*n,a=Math.floor(r),o=+t(e[a],a,e),l=+t(e[a+1],a+1,e);return o+(l-o)*(r-a)}}function fye(e,n,t){e=+e,n=+n,t=(r=arguments.length)<2?(n=e,e=0,1):r<3?1:+t;for(var i=-1,r=Math.max(0,Math.ceil((n-e)/t))|0,a=new Array(r);++i>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?jv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?jv(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=dye.exec(e))?new mr(n[1],n[2],n[3],1):(n=hye.exec(e))?new mr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=mye.exec(e))?jv(n[1],n[2],n[3],n[4]):(n=pye.exec(e))?jv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=vye.exec(e))?DR(n[1],n[2]/100,n[3]/100,1):(n=gye.exec(e))?DR(n[1],n[2]/100,n[3]/100,n[4]):AR.hasOwnProperty(e)?TR(AR[e]):e==="transparent"?new mr(NaN,NaN,NaN,0):null}function TR(e){return new mr(e>>16&255,e>>8&255,e&255,1)}function jv(e,n,t,i){return i<=0&&(e=n=t=NaN),new mr(e,n,t,i)}function wye(e){return e instanceof Km||(e=Yh(e)),e?(e=e.rgb(),new mr(e.r,e.g,e.b,e.opacity)):new mr}function t4(e,n,t,i){return arguments.length===1?wye(e):new mr(e,n,t,i??1)}function mr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}E9(mr,t4,YH(Km,{brighter(e){return e=e==null?Hg:Math.pow(Hg,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Wh:Math.pow(Wh,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mr(Ql(this.r),Ql(this.g),Ql(this.b),Ug(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:MR,formatHex:MR,formatHex8:kye,formatRgb:jR,toString:jR}));function MR(){return`#${Wl(this.r)}${Wl(this.g)}${Wl(this.b)}`}function kye(){return`#${Wl(this.r)}${Wl(this.g)}${Wl(this.b)}${Wl((isNaN(this.opacity)?1:this.opacity)*255)}`}function jR(){const e=Ug(this.opacity);return`${e===1?"rgb(":"rgba("}${Ql(this.r)}, ${Ql(this.g)}, ${Ql(this.b)}${e===1?")":`, ${e})`}`}function Ug(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ql(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wl(e){return e=Ql(e),(e<16?"0":"")+e.toString(16)}function DR(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Oa(e,n,t,i)}function KH(e){if(e instanceof Oa)return new Oa(e.h,e.s,e.l,e.opacity);if(e instanceof Km||(e=Yh(e)),!e)return new Oa;if(e instanceof Oa)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,f=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&f<1?0:o,new Oa(o,l,f,e.opacity)}function _ye(e,n,t,i){return arguments.length===1?KH(e):new Oa(e,n,t,i??1)}function Oa(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}E9(Oa,_ye,YH(Km,{brighter(e){return e=e==null?Hg:Math.pow(Hg,e),new Oa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Wh:Math.pow(Wh,e),new Oa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*n,r=2*t-i;return new mr(Yx(e>=240?e-240:e+120,r,i),Yx(e,r,i),Yx(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Oa(RR(this.h),Dv(this.s),Dv(this.l),Ug(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ug(this.opacity);return`${e===1?"hsl(":"hsla("}${RR(this.h)}, ${Dv(this.s)*100}%, ${Dv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function RR(e){return e=(e||0)%360,e<0?e+360:e}function Dv(e){return Math.max(0,Math.min(1,e||0))}function Yx(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const T9=e=>()=>e;function xye(e,n){return function(t){return e+t*n}}function Sye(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(i){return Math.pow(e+i*n,t)}}function Cye(e){return(e=+e)==1?XH:function(n,t){return t-n?Sye(n,t,e):T9(isNaN(n)?t:n)}}function XH(e,n){var t=n-e;return t?xye(e,t):T9(isNaN(e)?n:e)}const PR=(function e(n){var t=Cye(n);function i(r,a){var o=t((r=t4(r)).r,(a=t4(a)).r),l=t(r.g,a.g),f=t(r.b,a.b),c=XH(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=f(h),r.opacity=c(h),r+""}}return i.gamma=e,i})(1);function Aye(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,f.push({i:o,x:Vg(i,r)})),t=Kx.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function zye(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?Lye:zye,f=c=null,d}function d(p){return p==null||isNaN(p=+p)?a:(f||(f=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((c||(c=l(n,e.map(i),Vg)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Wg),h()):e.slice()},d.range=function(p){return arguments.length?(n=Array.from(p),h()):n.slice()},d.rangeRound=function(p){return n=Array.from(p),t=M9,h()},d.clamp=function(p){return arguments.length?(o=p?!0:er,h()):o!==er},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function j9(){return c0()(er,er)}function Iye(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Gg(e,n){if(!isFinite(e)||e===0)return null;var t=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function Gf(e){return e=Gg(Math.abs(e)),e?e[1]:NaN}function Bye(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],f=0;r>0&&l>0&&(f+l+1>i&&(l=Math.max(1,i-f)),a.push(t.substring(r-=l,r+l)),!((f+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function Fye(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var qye=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kh(e){if(!(n=qye.exec(e)))throw new Error("invalid format: "+e);var n;return new D9({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}Kh.prototype=D9.prototype;function D9(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}D9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Hye(e){e:for(var n=e.length,t=1,i=-1,r;t0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var Yg;function Uye(e,n){var t=Gg(e,n);if(!t)return Yg=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(Yg=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Gg(e,Math.max(0,n+a-1))[0]}function $R(e,n){var t=Gg(e,n);if(!t)return e+"";var i=t[0],r=t[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const zR={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Iye,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>$R(e*100,n),r:$R,s:Uye,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function LR(e){return e}var IR=Array.prototype.map,BR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vye(e){var n=e.grouping===void 0||e.thousands===void 0?LR:Bye(IR.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?LR:Fye(IR.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(d,p){d=Kh(d);var v=d.fill,y=d.align,b=d.sign,w=d.symbol,_=d.zero,S=d.width,C=d.comma,T=d.precision,A=d.trim,M=d.type;M==="n"?(C=!0,M="g"):zR[M]||(T===void 0&&(T=12),A=!0,M="g"),(_||v==="0"&&y==="=")&&(_=!0,v="0",y="=");var j=(p&&p.prefix!==void 0?p.prefix:"")+(w==="$"?t:w==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():""),N=(w==="$"?i:/[%p]/.test(M)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),F=zR[M],R=/[defgprs%]/.test(M);T=T===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function L(B){var G=j,H=N,U,P,z;if(M==="c")H=F(B)+H,B="";else{B=+B;var q=B<0||1/B<0;if(B=isNaN(B)?f:F(Math.abs(B),T),A&&(B=Hye(B)),q&&+B==0&&b!=="+"&&(q=!1),G=(q?b==="("?b:l:b==="-"||b==="("?"":b)+G,H=(M==="s"&&!isNaN(B)&&Yg!==void 0?BR[8+Yg/3]:"")+H+(q&&b==="("?")":""),R){for(U=-1,P=B.length;++Uz||z>57){H=(z===46?r+B.slice(U+1):B.slice(U))+H,B=B.slice(0,U);break}}}C&&!_&&(B=n(B,1/0));var Y=G.length+B.length+H.length,D=Y>1)+G+B+H+D.slice(Y);break;default:B=D+G+B+H;break}return a(B)}return L.toString=function(){return d+""},L}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(Gf(p)/3)))*3,y=Math.pow(10,-v),b=c((d=Kh(d),d.type="f",d),{suffix:BR[8+v/3]});return function(w){return b(y*w)}}return{format:c,formatPrefix:h}}var Rv,R9,ZH;Wye({thousands:",",grouping:[3],currency:["$",""]});function Wye(e){return Rv=Vye(e),R9=Rv.format,ZH=Rv.formatPrefix,Rv}function Gye(e){return Math.max(0,-Gf(Math.abs(e)))}function Yye(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gf(n)/3)))*3-Gf(Math.abs(e)))}function Kye(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,Gf(n)-Gf(e))+1}function QH(e,n,t,i){var r=e4(e,n,t),a;switch(i=Kh(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=Yye(r,o))&&(i.precision=a),ZH(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Kye(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=Gye(r))&&(i.precision=a-(i.type==="%")*2);break}}return R9(i)}function cl(e){var n=e.domain;return e.ticks=function(t){var i=n();return QS(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return QH(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],f,c,h=10;for(l0;){if(c=JS(o,l,t),c===f)return i[r]=o,i[a]=l,n(i);if(c>0)o=Math.floor(o/c)*c,l=Math.ceil(l/c)*c;else if(c<0)o=Math.ceil(o*c)/c,l=Math.floor(l*c)/c;else break;f=c}return e},e}function Kg(){var e=j9();return e.copy=function(){return Xm(e,Kg())},va.apply(e,arguments),cl(e)}function JH(e){var n;function t(i){return i==null||isNaN(i=+i)?n:i}return t.invert=t,t.domain=t.range=function(i){return arguments.length?(e=Array.from(i,Wg),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return JH(e).unknown(n)},e=arguments.length?Array.from(e,Wg):[0,1],cl(t)}function eU(e,n){e=e.slice();var t=0,i=e.length-1,r=e[t],a=e[i],o;return aMath.pow(e,n)}function e0e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function HR(e){return(n,t)=>-e(-n,t)}function P9(e){const n=e(FR,qR),t=n.domain;let i=10,r,a;function o(){return r=e0e(i),a=Jye(i),t()[0]<0?(r=HR(r),a=HR(a),e(Xye,Zye)):e(FR,qR),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const f=t();let c=f[0],h=f[f.length-1];const d=h0){for(;p<=v;++p)for(y=1;yh)break;_.push(b)}}else for(;p<=v;++p)for(y=i-1;y>=1;--y)if(b=p>0?y/a(-p):y*a(p),!(bh)break;_.push(b)}_.length*2{if(l==null&&(l=10),f==null&&(f=i===10?"s":","),typeof f!="function"&&(!(i%1)&&(f=Kh(f)).precision==null&&(f.trim=!0),f=R9(f)),l===1/0)return f;const c=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(eU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function nU(){const e=P9(c0()).domain([1,10]);return e.copy=()=>Xm(e,nU()).base(e.base()),va.apply(e,arguments),e}function UR(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function VR(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function N9(e){var n=1,t=e(UR(n),VR(n));return t.constant=function(i){return arguments.length?e(UR(n=+i),VR(n)):n},cl(t)}function tU(){var e=N9(c0());return e.copy=function(){return Xm(e,tU()).constant(e.constant())},va.apply(e,arguments)}function WR(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function n0e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function t0e(e){return e<0?-e*e:e*e}function $9(e){var n=e(er,er),t=1;function i(){return t===1?e(er,er):t===.5?e(n0e,t0e):e(WR(t),WR(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},cl(n)}function z9(){var e=$9(c0());return e.copy=function(){return Xm(e,z9()).exponent(e.exponent())},va.apply(e,arguments),e}function i0e(){return z9.apply(null,arguments).exponent(.5)}function GR(e){return Math.sign(e)*e*e}function r0e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function iU(){var e=j9(),n=[0,1],t=!1,i;function r(a){var o=r0e(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(GR(a))},r.domain=function(a){return arguments.length?(e.domain(a),r):e.domain()},r.range=function(a){return arguments.length?(e.range((n=Array.from(a,Wg)).map(GR)),r):n.slice()},r.rangeRound=function(a){return r.range(a).round(!0)},r.round=function(a){return arguments.length?(t=!!a,r):t},r.clamp=function(a){return arguments.length?(e.clamp(a),r):e.clamp()},r.unknown=function(a){return arguments.length?(i=a,r):i},r.copy=function(){return iU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},va.apply(r,arguments),cl(r)}function rU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[c-1],i[c]]},o.unknown=function(f){return arguments.length&&(a=f),o},o.thresholds=function(){return i.slice()},o.copy=function(){return aU().domain([e,n]).range(r).unknown(a)},va.apply(cl(o),arguments)}function oU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[Ym(e,a,0,i)]:t}return r.domain=function(a){return arguments.length?(e=Array.from(a),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(a){return arguments.length?(n=Array.from(a),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(a){var o=n.indexOf(a);return[e[o-1],e[o]]},r.unknown=function(a){return arguments.length?(t=a,r):t},r.copy=function(){return oU().domain(e).range(n).unknown(t)},va.apply(r,arguments)}const Xx=new Date,Zx=new Date;function bi(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const f=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return f;let c;do f.push(c=new Date(+a)),n(a,l),e(a);while(cbi(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;n(o,-1),!a(o););else for(;--l>=0;)for(;n(o,1),!a(o););}),t&&(r.count=(a,o)=>(Xx.setTime(+a),Zx.setTime(+o),e(Xx),e(Zx),Math.floor(t(Xx,Zx))),r.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?r.filter(i?o=>i(o)%a===0:o=>r.count(0,o)%a===0):r)),r}const Xg=bi(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);Xg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?bi(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):Xg);Xg.range;const $o=1e3,aa=$o*60,zo=aa*60,Xo=zo*24,L9=Xo*7,YR=Xo*30,Qx=Xo*365,Gl=bi(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*$o)},(e,n)=>(n-e)/$o,e=>e.getUTCSeconds());Gl.range;const I9=bi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*$o)},(e,n)=>{e.setTime(+e+n*aa)},(e,n)=>(n-e)/aa,e=>e.getMinutes());I9.range;const B9=bi(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*aa)},(e,n)=>(n-e)/aa,e=>e.getUTCMinutes());B9.range;const F9=bi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*$o-e.getMinutes()*aa)},(e,n)=>{e.setTime(+e+n*zo)},(e,n)=>(n-e)/zo,e=>e.getHours());F9.range;const q9=bi(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*zo)},(e,n)=>(n-e)/zo,e=>e.getUTCHours());q9.range;const Zm=bi(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*aa)/Xo,e=>e.getDate()-1);Zm.range;const d0=bi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Xo,e=>e.getUTCDate()-1);d0.range;const sU=bi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Xo,e=>Math.floor(e/Xo));sU.range;function Cu(e){return bi(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*aa)/L9)}const h0=Cu(0),Zg=Cu(1),a0e=Cu(2),o0e=Cu(3),Yf=Cu(4),s0e=Cu(5),l0e=Cu(6);h0.range;Zg.range;a0e.range;o0e.range;Yf.range;s0e.range;l0e.range;function Au(e){return bi(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/L9)}const m0=Au(0),Qg=Au(1),u0e=Au(2),f0e=Au(3),Kf=Au(4),c0e=Au(5),d0e=Au(6);m0.range;Qg.range;u0e.range;f0e.range;Kf.range;c0e.range;d0e.range;const H9=bi(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());H9.range;const U9=bi(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());U9.range;const Zo=bi(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());Zo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:bi(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});Zo.range;const Qo=bi(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Qo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:bi(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});Qo.range;function lU(e,n,t,i,r,a){const o=[[Gl,1,$o],[Gl,5,5*$o],[Gl,15,15*$o],[Gl,30,30*$o],[a,1,aa],[a,5,5*aa],[a,15,15*aa],[a,30,30*aa],[r,1,zo],[r,3,3*zo],[r,6,6*zo],[r,12,12*zo],[i,1,Xo],[i,2,2*Xo],[t,1,L9],[n,1,YR],[n,3,3*YR],[e,1,Qx]];function l(c,h,d){const p=hw).right(o,p);if(v===o.length)return e.every(e4(c/Qx,h/Qx,d));if(v===0)return Xg.every(Math.max(e4(c,h,d),1));const[y,b]=o[p/o[v-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(ve=e3(qd(ne.y,0,1)),xe=ve.getUTCDay(),ve=xe>4||xe===0?Qg.ceil(ve):Qg(ve),ve=d0.offset(ve,(ne.V-1)*7),ne.y=ve.getUTCFullYear(),ne.m=ve.getUTCMonth(),ne.d=ve.getUTCDate()+(ne.w+6)%7):(ve=Jx(qd(ne.y,0,1)),xe=ve.getDay(),ve=xe>4||xe===0?Zg.ceil(ve):Zg(ve),ve=Zm.offset(ve,(ne.V-1)*7),ne.y=ve.getFullYear(),ne.m=ve.getMonth(),ne.d=ve.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),xe="Z"in ne?e3(qd(ne.y,0,1)).getUTCDay():Jx(qd(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(xe+5)%7:ne.w+ne.U*7-(xe+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,e3(ne)):Jx(ne)}}function N(ae,le,Se,ne){for(var $e=0,ve=le.length,xe=Se.length,De,we;$e=xe)return-1;if(De=le.charCodeAt($e++),De===37){if(De=le.charAt($e++),we=A[De in KR?le.charAt($e++):De],!we||(ne=we(ae,Se,ne))<0)return-1}else if(De!=Se.charCodeAt(ne++))return-1}return ne}function F(ae,le,Se){var ne=c.exec(le.slice(Se));return ne?(ae.p=h.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function R(ae,le,Se){var ne=v.exec(le.slice(Se));return ne?(ae.w=y.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function L(ae,le,Se){var ne=d.exec(le.slice(Se));return ne?(ae.w=p.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function B(ae,le,Se){var ne=_.exec(le.slice(Se));return ne?(ae.m=S.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function G(ae,le,Se){var ne=b.exec(le.slice(Se));return ne?(ae.m=w.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function H(ae,le,Se){return N(ae,n,le,Se)}function U(ae,le,Se){return N(ae,t,le,Se)}function P(ae,le,Se){return N(ae,i,le,Se)}function z(ae){return o[ae.getDay()]}function q(ae){return a[ae.getDay()]}function Y(ae){return f[ae.getMonth()]}function D(ae){return l[ae.getMonth()]}function V(ae){return r[+(ae.getHours()>=12)]}function W(ae){return 1+~~(ae.getMonth()/3)}function $(ae){return o[ae.getUTCDay()]}function X(ae){return a[ae.getUTCDay()]}function ee(ae){return f[ae.getUTCMonth()]}function oe(ae){return l[ae.getUTCMonth()]}function ue(ae){return r[+(ae.getUTCHours()>=12)]}function ye(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var le=M(ae+="",C);return le.toString=function(){return ae},le},parse:function(ae){var le=j(ae+="",!1);return le.toString=function(){return ae},le},utcFormat:function(ae){var le=M(ae+="",T);return le.toString=function(){return ae},le},utcParse:function(ae){var le=j(ae+="",!0);return le.toString=function(){return ae},le}}}var KR={"-":"",_:" ",0:"0"},Ai=/^\s*\d+/,y0e=/^%/,b0e=/[\\^$*+?|[\]().{}]/g;function rt(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function k0e(e,n,t){var i=Ai.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function _0e(e,n,t){var i=Ai.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function x0e(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function S0e(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function C0e(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function XR(e,n,t){var i=Ai.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function ZR(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function A0e(e,n,t){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),t+i[0].length):-1}function O0e(e,n,t){var i=Ai.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function E0e(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function QR(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function T0e(e,n,t){var i=Ai.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function JR(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function M0e(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function j0e(e,n,t){var i=Ai.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function D0e(e,n,t){var i=Ai.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function R0e(e,n,t){var i=Ai.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function P0e(e,n,t){var i=y0e.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function N0e(e,n,t){var i=Ai.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function $0e(e,n,t){var i=Ai.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function eP(e,n){return rt(e.getDate(),n,2)}function z0e(e,n){return rt(e.getHours(),n,2)}function L0e(e,n){return rt(e.getHours()%12||12,n,2)}function I0e(e,n){return rt(1+Zm.count(Zo(e),e),n,3)}function uU(e,n){return rt(e.getMilliseconds(),n,3)}function B0e(e,n){return uU(e,n)+"000"}function F0e(e,n){return rt(e.getMonth()+1,n,2)}function q0e(e,n){return rt(e.getMinutes(),n,2)}function H0e(e,n){return rt(e.getSeconds(),n,2)}function U0e(e){var n=e.getDay();return n===0?7:n}function V0e(e,n){return rt(h0.count(Zo(e)-1,e),n,2)}function fU(e){var n=e.getDay();return n>=4||n===0?Yf(e):Yf.ceil(e)}function W0e(e,n){return e=fU(e),rt(Yf.count(Zo(e),e)+(Zo(e).getDay()===4),n,2)}function G0e(e){return e.getDay()}function Y0e(e,n){return rt(Zg.count(Zo(e)-1,e),n,2)}function K0e(e,n){return rt(e.getFullYear()%100,n,2)}function X0e(e,n){return e=fU(e),rt(e.getFullYear()%100,n,2)}function Z0e(e,n){return rt(e.getFullYear()%1e4,n,4)}function Q0e(e,n){var t=e.getDay();return e=t>=4||t===0?Yf(e):Yf.ceil(e),rt(e.getFullYear()%1e4,n,4)}function J0e(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+rt(n/60|0,"0",2)+rt(n%60,"0",2)}function nP(e,n){return rt(e.getUTCDate(),n,2)}function ebe(e,n){return rt(e.getUTCHours(),n,2)}function nbe(e,n){return rt(e.getUTCHours()%12||12,n,2)}function tbe(e,n){return rt(1+d0.count(Qo(e),e),n,3)}function cU(e,n){return rt(e.getUTCMilliseconds(),n,3)}function ibe(e,n){return cU(e,n)+"000"}function rbe(e,n){return rt(e.getUTCMonth()+1,n,2)}function abe(e,n){return rt(e.getUTCMinutes(),n,2)}function obe(e,n){return rt(e.getUTCSeconds(),n,2)}function sbe(e){var n=e.getUTCDay();return n===0?7:n}function lbe(e,n){return rt(m0.count(Qo(e)-1,e),n,2)}function dU(e){var n=e.getUTCDay();return n>=4||n===0?Kf(e):Kf.ceil(e)}function ube(e,n){return e=dU(e),rt(Kf.count(Qo(e),e)+(Qo(e).getUTCDay()===4),n,2)}function fbe(e){return e.getUTCDay()}function cbe(e,n){return rt(Qg.count(Qo(e)-1,e),n,2)}function dbe(e,n){return rt(e.getUTCFullYear()%100,n,2)}function hbe(e,n){return e=dU(e),rt(e.getUTCFullYear()%100,n,2)}function mbe(e,n){return rt(e.getUTCFullYear()%1e4,n,4)}function pbe(e,n){var t=e.getUTCDay();return e=t>=4||t===0?Kf(e):Kf.ceil(e),rt(e.getUTCFullYear()%1e4,n,4)}function vbe(){return"+0000"}function tP(){return"%"}function iP(e){return+e}function rP(e){return Math.floor(+e/1e3)}var gf,hU,mU;gbe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gbe(e){return gf=g0e(e),hU=gf.format,gf.parse,mU=gf.utcFormat,gf.utcParse,gf}function ybe(e){return new Date(e)}function bbe(e){return e instanceof Date?+e:+new Date(+e)}function V9(e,n,t,i,r,a,o,l,f,c){var h=j9(),d=h.invert,p=h.domain,v=c(".%L"),y=c(":%S"),b=c("%I:%M"),w=c("%I %p"),_=c("%a %d"),S=c("%b %d"),C=c("%B"),T=c("%Y");function A(M){return(f(M)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>lye(e,a/i))},t.copy=function(){return yU(n).domain(e)},us.apply(t,arguments)}function v0(){var e=0,n=.5,t=1,i=1,r,a,o,l,f,c=er,h,d=!1,p;function v(b){return isNaN(b=+b)?p:(b=.5+((b=+h(b))-a)*(i*bt}return t3=e,t3}var i3,lP;function Cbe(){if(lP)return i3;lP=1;var e=_U(),n=Sbe(),t=zc();function i(r){return r&&r.length?e(r,t,n):void 0}return i3=i,i3}var Abe=Cbe();const Gs=at(Abe);var r3,uP;function Obe(){if(uP)return r3;uP=1;function e(n,t){return ne.e^a.s<0?1:-1;for(i=a.d.length,r=e.d.length,n=0,t=ie.d[n]^a.s<0?1:-1;return i===r?0:i>r^a.s<0?1:-1};nn.decimalPlaces=nn.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*Dt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};nn.dividedBy=nn.div=function(e){return Vo(this,new this.constructor(e))};nn.dividedToIntegerBy=nn.idiv=function(e){var n=this,t=n.constructor;return _t(Vo(n,new t(e),0,1),t.precision)};nn.equals=nn.eq=function(e){return!this.cmp(e)};nn.exponent=function(){return ui(this)};nn.greaterThan=nn.gt=function(e){return this.cmp(e)>0};nn.greaterThanOrEqualTo=nn.gte=function(e){return this.cmp(e)>=0};nn.isInteger=nn.isint=function(){return this.e>this.d.length-2};nn.isNegative=nn.isneg=function(){return this.s<0};nn.isPositive=nn.ispos=function(){return this.s>0};nn.isZero=function(){return this.s===0};nn.lessThan=nn.lt=function(e){return this.cmp(e)<0};nn.lessThanOrEqualTo=nn.lte=function(e){return this.cmp(e)<1};nn.logarithm=nn.log=function(e){var n,t=this,i=t.constructor,r=i.precision,a=r+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(Rr))throw Error(ua+"NaN");if(t.s<1)throw Error(ua+(t.s?"NaN":"-Infinity"));return t.eq(Rr)?new i(0):(qt=!1,n=Vo(Xh(t,a),Xh(e,a),a),qt=!0,_t(n,r))};nn.minus=nn.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?AU(n,e):SU(n,(e.s=-e.s,e))};nn.modulo=nn.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(ua+"NaN");return t.s?(qt=!1,n=Vo(t,e,0,1).times(e),qt=!0,t.minus(n)):_t(new i(t),r)};nn.naturalExponential=nn.exp=function(){return CU(this)};nn.naturalLogarithm=nn.ln=function(){return Xh(this)};nn.negated=nn.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};nn.plus=nn.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?SU(n,e):AU(n,(e.s=-e.s,e))};nn.precision=nn.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Jl+e);if(n=ui(r)+1,i=r.d.length-1,t=i*Dt+1,i=r.d[i],i){for(;i%10==0;i/=10)t--;for(i=r.d[0];i>=10;i/=10)t++}return e&&n>t?n:t};nn.squareRoot=nn.sqrt=function(){var e,n,t,i,r,a,o,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(ua+"NaN")}for(e=ui(l),qt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=Ga(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=Bc((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n)):i=new f(r.toString()),t=f.precision,r=o=t+3;;)if(a=i,i=a.plus(Vo(l,a,o+2)).times(.5),Ga(a.d).slice(0,o)===(n=Ga(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(_t(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return qt=!0,_t(i,t)};nn.times=nn.mul=function(e){var n,t,i,r,a,o,l,f,c,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,f=p.length,c=v.length,f=0;){for(n=0,r=f+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%_i|0,n=l/_i|0;a[r]=(a[r]+n)%_i|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,qt?_t(e,d.precision):e};nn.toDecimalPlaces=nn.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(io(e,0,Ic),n===void 0?n=i.rounding:io(n,0,8),_t(t,e+ui(t)+1,n))};nn.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=lu(i,!0):(io(e,0,Ic),n===void 0?n=r.rounding:io(n,0,8),i=_t(new r(i),e+1,n),t=lu(i,!0,e+1)),t};nn.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?lu(r):(io(e,0,Ic),n===void 0?n=a.rounding:io(n,0,8),i=_t(new a(r),e+ui(r)+1,n),t=lu(i.abs(),!1,e+ui(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};nn.toInteger=nn.toint=function(){var e=this,n=e.constructor;return _t(new n(e),ui(e)+1,n.rounding)};nn.toNumber=function(){return+this};nn.toPower=nn.pow=function(e){var n,t,i,r,a,o,l=this,f=l.constructor,c=12,h=+(e=new f(e));if(!e.s)return new f(Rr);if(l=new f(l),!l.s){if(e.s<1)throw Error(ua+"Infinity");return l}if(l.eq(Rr))return l;if(i=f.precision,e.eq(Rr))return _t(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=xU){for(r=new f(Rr),n=Math.ceil(i/Dt+4),qt=!1;t%2&&(r=r.times(l),pP(r.d,n)),t=Bc(t/2),t!==0;)l=l.times(l),pP(l.d,n);return qt=!0,e.s<0?new f(Rr).div(r):_t(r,i)}}else if(a<0)throw Error(ua+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,qt=!1,r=e.times(Xh(l,i+c)),qt=!0,r=CU(r),r.s=a,r};nn.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=ui(r),i=lu(r,t<=a.toExpNeg||t>=a.toExpPos)):(io(e,1,Ic),n===void 0?n=a.rounding:io(n,0,8),r=_t(new a(r),e,n),t=ui(r),i=lu(r,e<=t||t<=a.toExpNeg,e)),i};nn.toSignificantDigits=nn.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(io(e,1,Ic),n===void 0?n=i.rounding:io(n,0,8)),_t(new i(t),e,n)};nn.toString=nn.valueOf=nn.val=nn.toJSON=nn[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=ui(e),t=e.constructor;return lu(e,n<=t.toExpNeg||n>=t.toExpPos)};function SU(e,n){var t,i,r,a,o,l,f,c,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),qt?_t(n,d):n;if(f=e.d,c=n.d,o=e.e,r=n.e,f=f.slice(),a=o-r,a){for(a<0?(i=f,a=-a,l=c.length):(i=c,r=o,l=f.length),o=Math.ceil(d/Dt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=f.length,a=c.length,l-a<0&&(a=l,i=c,c=f,f=i),t=0;a;)t=(f[--a]=f[a]+c[a]+t)/_i|0,f[a]%=_i;for(t&&(f.unshift(t),++r),l=f.length;f[--l]==0;)f.pop();return n.d=f,n.e=r,qt?_t(n,d):n}function io(e,n,t){if(e!==~~e||et)throw Error(Jl+e)}function Ga(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=f=0;lr[l]?1:-1;break}return f}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,f,c,h,d,p,v,y,b,w,_,S,C,T,A,M,j,N,F=i.constructor,R=i.s==r.s?1:-1,L=i.d,B=r.d;if(!i.s)return new F(i);if(!r.s)throw Error(ua+"Division by zero");for(f=i.e-r.e,j=B.length,A=L.length,v=new F(R),y=v.d=[],c=0;B[c]==(L[c]||0);)++c;if(B[c]>(L[c]||0)&&--f,a==null?S=a=F.precision:o?S=a+(ui(i)-ui(r))+1:S=a,S<0)return new F(0);if(S=S/Dt+2|0,c=0,j==1)for(h=0,B=B[0],S++;(c1&&(B=e(B,h),L=e(L,h),j=B.length,A=L.length),T=j,b=L.slice(0,j),w=b.length;w=_i/2&&++M;do h=0,l=n(B,b,j,w),l<0?(_=b[0],j!=w&&(_=_*_i+(b[1]||0)),h=_/M|0,h>1?(h>=_i&&(h=_i-1),d=e(B,h),p=d.length,w=b.length,l=n(d,b,p,w),l==1&&(h--,t(d,j16)throw Error(Y9+ui(e));if(!e.s)return new h(Rr);for(qt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(i=Math.log(Il(2,c))/Math.LN10*2+5|0,l+=i,t=r=a=new h(Rr),h.precision=l;;){if(r=_t(r.times(e),l),t=t.times(++f),o=a.plus(Vo(r,t,l)),Ga(o.d).slice(0,l)===Ga(a.d).slice(0,l)){for(;c--;)a=_t(a.times(a),l);return h.precision=d,n==null?(qt=!0,_t(a,d)):a}a=o}}function ui(e){for(var n=e.e*Dt,t=e.d[0];t>=10;t/=10)n++;return n}function u3(e,n,t){if(n>e.LN10.sd())throw qt=!0,t&&(e.precision=t),Error(ua+"LN10 precision limit exceeded");return _t(new e(e.LN10),n)}function qs(e){for(var n="";e--;)n+="0";return n}function Xh(e,n){var t,i,r,a,o,l,f,c,h,d=1,p=10,v=e,y=v.d,b=v.constructor,w=b.precision;if(v.s<1)throw Error(ua+(v.s?"NaN":"-Infinity"));if(v.eq(Rr))return new b(0);if(n==null?(qt=!1,c=w):c=n,v.eq(10))return n==null&&(qt=!0),u3(b,c);if(c+=p,b.precision=c,t=Ga(y),i=t.charAt(0),a=ui(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=Ga(v.d),i=t.charAt(0),d++;a=ui(v),i>1?(v=new b("0."+t),a++):v=new b(i+"."+t.slice(1))}else return f=u3(b,c+2,w).times(a+""),v=Xh(new b(i+"."+t.slice(1)),c-p).plus(f),b.precision=w,n==null?(qt=!0,_t(v,w)):v;for(l=o=v=Vo(v.minus(Rr),v.plus(Rr),c),h=_t(v.times(v),c),r=3;;){if(o=_t(o.times(h),c),f=l.plus(Vo(o,new b(r),c)),Ga(f.d).slice(0,c)===Ga(l.d).slice(0,c))return l=l.times(2),a!==0&&(l=l.plus(u3(b,c+2,w).times(a+""))),l=Vo(l,new b(d),c),b.precision=w,n==null?(qt=!0,_t(l,w)):l;l=f,r+=2}}function mP(e,n){var t,i,r;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charCodeAt(i)===48;)++i;for(r=n.length;n.charCodeAt(r-1)===48;)--r;if(n=n.slice(i,r),n){if(r-=i,t=t-i-1,e.e=Bc(t/Dt),e.d=[],i=(t+1)%Dt,t<0&&(i+=Dt),iJg||e.e<-Jg))throw Error(Y9+t)}else e.s=0,e.e=0,e.d=[0];return e}function _t(e,n,t){var i,r,a,o,l,f,c,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=Dt,r=n,c=d[h=0];else{if(h=Math.ceil((i+1)/Dt),a=d.length,h>=a)return e;for(c=a=d[h],o=1;a>=10;a/=10)o++;i%=Dt,r=i-Dt+o}if(t!==void 0&&(a=Il(10,o-r-1),l=c/a%10|0,f=n<0||d[h+1]!==void 0||c%a,f=t<4?(l||f)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||f||t==6&&(i>0?r>0?c/Il(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return f?(a=ui(e),d.length=1,n=n-a-1,d[0]=Il(10,(Dt-n%Dt)%Dt),e.e=Bc(-n/Dt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(i==0?(d.length=h,a=1,h--):(d.length=h+1,a=Il(10,Dt-i),d[h]=r>0?(c/Il(10,o-r)%Il(10,r)|0)*a:0),f)for(;;)if(h==0){(d[0]+=a)==_i&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=_i)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(qt&&(e.e>Jg||e.e<-Jg))throw Error(Y9+ui(e));return e}function AU(e,n){var t,i,r,a,o,l,f,c,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),qt?_t(n,v):n;if(f=e.d,d=n.d,i=n.e,c=e.e,f=f.slice(),o=c-i,o){for(h=o<0,h?(t=f,o=-o,l=d.length):(t=d,i=c,l=f.length),r=Math.max(Math.ceil(v/Dt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=f.length,l=d.length,h=r0;--r)f[l++]=0;for(r=d.length;r>o;){if(f[--r]0?a=a.charAt(0)+"."+a.slice(1)+qs(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+qs(-r-1)+a,t&&(i=t-o)>0&&(a+=qs(i))):r>=o?(a+=qs(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+qs(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=qs(i))),e.s<0?"-"+a:a}function pP(e,n){if(e.length>n)return e.length=n,!0}function OU(e){var n,t,i;function r(a){var o=this;if(!(o instanceof r))return new r(a);if(o.constructor=r,a instanceof r){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Jl+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return mP(o,a.toString())}else if(typeof a!="string")throw Error(Jl+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,zbe.test(a))mP(o,a);else throw Error(Jl+a)}if(r.prototype=nn,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=OU,r.config=r.set=Lbe,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n=r[n+1]&&i<=r[n+2])this[t]=i;else throw Error(Jl+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(Jl+t+": "+i);return this}var K9=OU($be);Rr=new K9(1);const gt=K9;function Ibe(e){return Hbe(e)||qbe(e)||Fbe(e)||Bbe()}function Bbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fbe(e,n){if(e){if(typeof e=="string")return a4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a4(e,n)}}function qbe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Hbe(e){if(Array.isArray(e))return a4(e)}function a4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n?t.apply(void 0,r):e(n-o,vP(function(){for(var l=arguments.length,f=new Array(l),c=0;ce.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(f){r=!0,a=f}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function rwe(e){if(Array.isArray(e))return e}function DU(e){var n=Zh(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function RU(e,n,t){if(e.lte(0))return new gt(0);var i=b0.getDigitCount(e.toNumber()),r=new gt(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new gt(Math.ceil(a.div(o).toNumber())).add(t).mul(o),f=l.mul(r);return n?f:new gt(Math.ceil(f))}function awe(e,n,t){var i=1,r=new gt(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new gt(10).pow(b0.getDigitCount(e)-1),r=new gt(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new gt(Math.floor(e)))}else e===0?r=new gt(Math.floor((n-1)/2)):t||(r=new gt(Math.floor(e)));var o=Math.floor((n-1)/2),l=Gbe(Wbe(function(f){return r.add(new gt(f-o).mul(i)).toNumber()}),o4);return l(0,n)}function PU(e,n,t,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(t-1)))return{step:new gt(0),tickMin:new gt(0),tickMax:new gt(0)};var a=RU(new gt(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new gt(0):(o=new gt(e).add(n).div(2),o=o.sub(new gt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),f=Math.ceil(new gt(n).sub(o).div(a).toNumber()),c=l+f+1;return c>t?PU(e,n,t,i,r+1):(c0?f+(t-c):f,l=n>0?l:l+(t-c)),{step:a,tickMin:o.sub(new gt(l).mul(a)),tickMax:o.add(new gt(f).mul(a))})}function owe(e){var n=Zh(e,2),t=n[0],i=n[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),l=DU([t,i]),f=Zh(l,2),c=f[0],h=f[1];if(c===-1/0||h===1/0){var d=h===1/0?[c].concat(l4(o4(0,r-1).map(function(){return 1/0}))):[].concat(l4(o4(0,r-1).map(function(){return-1/0})),[h]);return t>i?s4(d):d}if(c===h)return awe(c,r,a);var p=PU(c,h,o,a),v=p.step,y=p.tickMin,b=p.tickMax,w=b0.rangeStep(y,b.add(new gt(.1).mul(v)),v);return t>i?s4(w):w}function swe(e,n){var t=Zh(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=DU([i,r]),l=Zh(o,2),f=l[0],c=l[1];if(f===-1/0||c===1/0)return[i,r];if(f===c)return[f];var h=Math.max(n,2),d=RU(new gt(c).sub(f).div(h-1),a,0),p=[].concat(l4(b0.rangeStep(new gt(f),new gt(c).sub(new gt(.99).mul(d)),d)),[c]);return i>r?s4(p):p}var lwe=MU(owe),uwe=MU(swe),fwe="Invariant failed";function uu(e,n){throw new Error(fwe)}var cwe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Zf(e){"@babel/helpers - typeof";return Zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zf(e)}function e1(){return e1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function ywe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function bwe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function wwe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?r[c-1].coordinate:r[l-1].coordinate,d=r[c].coordinate,p=c>=l-1?r[0].coordinate:r[c+1].coordinate,v=void 0;if(Ma(d-h)!==Ma(p-d)){var y=[];if(Ma(p-d)===Ma(f[1]-f[0])){v=p;var b=d+f[1]-f[0];y[0]=Math.min(b,(b+h)/2),y[1]=Math.max(b,(b+h)/2)}else{v=h;var w=p+f[1]-f[0];y[0]=Math.min(d,(w+d)/2),y[1]=Math.max(d,(w+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=y[0]&&n<=y[1]){o=r[c].index;break}}else{var S=Math.min(h,p),C=Math.max(h,p);if(n>(S+d)/2&&n<=(C+d)/2){o=r[c].index;break}}}else for(var T=0;T0&&T(i[T].coordinate+i[T-1].coordinate)/2&&n<=(i[T].coordinate+i[T+1].coordinate)/2||T===l-1&&n>(i[T].coordinate+i[T-1].coordinate)/2){o=i[T].index;break}return o},X9=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?Kt(Kt({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,f;switch(r){case"Line":f=o;break;case"Area":case"Radar":f=o&&o!=="none"?o:l;break;default:f=l;break}return f},zwe=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),f=0,c=l.length;f=0});if(_&&_.length){var S=_[0].type.defaultProps,C=S!==void 0?Kt(Kt({},S),_[0].props):_[0].props,T=C.barSize,A=C[w];o[A]||(o[A]=[]);var M=In(T)?t:T;o[A].push({item:_[0],stackList:_.slice(1),barSize:In(M)?void 0:su(M,i,0)})}}return o},Lwe=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,f=o.length;if(f<1)return null;var c=su(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/f,y=o.reduce(function(T,A){return T+A.barSize||0},0);y+=(f-1)*c,y>=r&&(y-=(f-1)*c,c=0),y>=r&&v>0&&(p=!0,v*=.9,y=f*v);var b=(r-y)/2>>0,w={offset:b-c,size:0};h=o.reduce(function(T,A){var M={item:A.item,position:{offset:w.offset+w.size+c,size:p?v:A.barSize}},j=[].concat(bP(T),[M]);return w=j[j.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(N){j.push({item:N,position:w})}),j},d)}else{var _=su(i,r,0,!0);r-2*_-(f-1)*c<=0&&(c=0);var S=(r-2*_-(f-1)*c)/f;S>1&&(S>>=0);var C=l===+l?Math.min(S,l):S;h=o.reduce(function(T,A,M){var j=[].concat(bP(T),[{item:A.item,position:{offset:_+(S+c)*M+(S-C)/2,size:C}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(N){j.push({item:N,position:j[j.length-1].position})}),j},d)}return h},Iwe=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,f=o-(l.left||0)-(l.right||0),c=LU({children:a,legendWidth:f});if(c){var h=r||{},d=h.width,p=h.height,v=c.align,y=c.verticalAlign,b=c.layout;if((b==="vertical"||b==="horizontal"&&y==="middle")&&v!=="center"&&Fe(n[v]))return Kt(Kt({},n),{},Rf({},v,n[v]+(d||0)));if((b==="horizontal"||b==="vertical"&&v==="center")&&y!=="middle"&&Fe(n[y]))return Kt(Kt({},n),{},Rf({},y,n[y]+(p||0)))}return n},Bwe=function(n,t,i){return In(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},IU=function(n,t,i,r,a){var o=t.props.children,l=sa(o,Qm).filter(function(c){return Bwe(r,a,c.props.direction)});if(l&&l.length){var f=l.map(function(c){return c.props.dataKey});return n.reduce(function(c,h){var d=ir(h,i);if(In(d))return c;var p=Array.isArray(d)?[g0(d),Gs(d)]:[d,d],v=f.reduce(function(y,b){var w=ir(h,b,0),_=p[0]-Math.abs(Array.isArray(w)?w[0]:w),S=p[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(_,y[0]),Math.max(S,y[1])]},[1/0,-1/0]);return[Math.min(v[0],c[0]),Math.max(v[1],c[1])]},[1/0,-1/0])}return null},Fwe=function(n,t,i,r,a){var o=t.map(function(l){return IU(n,l,i,a,r)}).filter(function(l){return!In(l)});return o&&o.length?o.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]):null},BU=function(n,t,i,r,a){var o=t.map(function(f){var c=f.props.dataKey;return i==="number"&&c&&IU(n,f,c,r)||yh(n,c,i,a)});if(i==="number")return o.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var l={};return o.reduce(function(f,c){for(var h=0,d=c.length;h=2?Ma(l[0]-l[1])*2*c:c,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+c,value:d,offset:c}});return h.filter(function(d){return!Nc(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+c,value:d,index:p,offset:c}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+c,value:d,offset:c}}):r.domain().map(function(d,p){return{coordinate:r(d)+c,value:a?a[d]:d,index:p,offset:c}})},f3=new WeakMap,Pv=function(n,t){if(typeof t!="function")return n;f3.has(n)||f3.set(n,new WeakMap);var i=f3.get(n);if(i.has(t))return i.get(t);var r=function(){n.apply(void 0,arguments),t.apply(void 0,arguments)};return i.set(t,r),r},qwe=function(n,t,i){var r=n.scale,a=n.type,o=n.layout,l=n.axisType;if(r==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Vh(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:Kg(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:gh(),realScaleType:"point"}:a==="category"?{scale:Vh(),realScaleType:"band"}:{scale:Kg(),realScaleType:"linear"};if(ou(r)){var f="scale".concat(r0(r));return{scale:(aP[f]||gh)(),realScaleType:aP[f]?f:"point"}}return jn(r)?{scale:r}:{scale:gh(),realScaleType:"point"}},kP=1e-4,Hwe=function(n){var t=n.domain();if(!(!t||t.length<=2)){var i=t.length,r=n.range(),a=Math.min(r[0],r[1])-kP,o=Math.max(r[0],r[1])+kP,l=n(t[0]),f=n(t[i-1]);(lo||fo)&&n.domain([t[0],t[i-1]])}},Uwe=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+f,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+f,o=n[l][i][1])}},Gwe=function(n){var t=n.length;if(!(t<=0))for(var i=0,r=n[0].length;i=0?(n[o][i][0]=a,n[o][i][1]=a+l,a=n[o][i][1]):(n[o][i][0]=0,n[o][i][1]=0)}},Ywe={sign:Wwe,expand:jpe,none:qf,silhouette:Dpe,wiggle:Rpe,positive:Gwe},Kwe=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=Ywe[i],o=Mpe().keys(r).value(function(l,f){return+ir(l,f,0)}).order(FS).offset(a);return o(n)},Xwe=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,f={},c=l.reduce(function(d,p){var v,y=(v=p.type)!==null&&v!==void 0&&v.defaultProps?Kt(Kt({},p.type.defaultProps),p.props):p.props,b=y.stackId,w=y.hide;if(w)return d;var _=y[i],S=d[_]||{hasStack:!1,stackGroups:{}};if(yi(b)){var C=S.stackGroups[b]||{numericAxisId:i,cateAxisId:r,items:[]};C.items.push(p),S.hasStack=!0,S.stackGroups[b]=C}else S.stackGroups[$c("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return Kt(Kt({},d),{},Rf({},_,S))},f),h={};return Object.keys(c).reduce(function(d,p){var v=c[p];if(v.hasStack){var y={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(b,w){var _=v.stackGroups[w];return Kt(Kt({},b),{},Rf({},w,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:Kwe(n,_.items,a)}))},y)}return Kt(Kt({},d),{},Rf({},p,v))},h)},Zwe=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,f=i||t.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=n.domain();if(!c.length)return null;var h=lwe(c,a,l);return n.domain([g0(h),Gs(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=uwe(d,a,l);return{niceTicks:p}}return null};function t1(e){var n=e.axis,t=e.ticks,i=e.bandSize,r=e.entry,a=e.index,o=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!In(r[n.dataKey])){var l=Eg(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var f=ir(r,In(o)?n.dataKey:o);return In(f)?null:n.scale(f)}var _P=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var f=ir(o,t.dataKey,t.domain[l]);return In(f)?null:t.scale(f)-a/2+r},Qwe=function(n){var t=n.numericAxis,i=t.scale.domain();if(t.type==="number"){var r=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);return r<=0&&a>=0?0:a<0?a:r}return i[0]},Jwe=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?Kt(Kt({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(yi(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},eke=function(n){return n.reduce(function(t,i){return[g0(i.concat([t[0]]).filter(Fe)),Gs(i.concat([t[1]]).filter(Fe))]},[1/0,-1/0])},HU=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,f=l.reduce(function(c,h){var d=eke(h.slice(t,i+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},xP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,SP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,d4=function(n,t,i){if(jn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(Fe(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(xP.test(n[0])){var a=+xP.exec(n[0])[1];r[0]=t[0]-a}else jn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(Fe(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(SP.test(n[1])){var o=+SP.exec(n[1])[1];r[1]=t[1]+o}else jn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},i1=function(n,t,i){if(n&&n.scale&&n.scale.bandwidth){var r=n.scale.bandwidth();if(!i||r>0)return r}if(n&&t&&t.length>=2){for(var a=x9(t,function(d){return d.coordinate}),o=1/0,l=1,f=a.length;lo&&(c=2*Math.PI-c),{radius:l,angle:rke(c),angleInRadian:c}},ske=function(n){var t=n.startAngle,i=n.endAngle,r=Math.floor(t/360),a=Math.floor(i/360),o=Math.min(r,a);return{startAngle:t-o*360,endAngle:i-o*360}},lke=function(n,t){var i=t.startAngle,r=t.endAngle,a=Math.floor(i/360),o=Math.floor(r/360),l=Math.min(a,o);return n+l*360},EP=function(n,t){var i=n.x,r=n.y,a=oke({x:i,y:r},t),o=a.radius,l=a.angle,f=t.innerRadius,c=t.outerRadius;if(oc)return!1;if(o===0)return!0;var h=ske(t),d=h.startAngle,p=h.endAngle,v=l,y;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return y?OP(OP({},t),{},{radius:o,angle:lke(v,t)}):null};function nm(e){"@babel/helpers - typeof";return nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},nm(e)}var uke=["offset"];function fke(e){return mke(e)||hke(e)||dke(e)||cke()}function cke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dke(e,n){if(e){if(typeof e=="string")return h4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return h4(e,n)}}function hke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mke(e){if(Array.isArray(e))return h4(e)}function h4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function vke(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function TP(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function pi(e){for(var n=1;n=0?1:-1,C,T;r==="insideStart"?(C=v+S*o,T=b):r==="insideEnd"?(C=y-S*o,T=!b):r==="end"&&(C=y+S*o,T=b),T=_<=0?T:!T;var A=Pi(c,h,w,C),M=Pi(c,h,w,C+(T?1:-1)*359),j="M".concat(A.x,",").concat(A.y,` - A`).concat(w,",").concat(w,",0,1,").concat(T?0:1,`, - `).concat(M.x,",").concat(M.y),N=In(n.id)?$c("recharts-radial-line-"):n.id;return Z.createElement("text",tm({},i,{dominantBaseline:"central",className:sn("recharts-radial-bar-label",l)}),Z.createElement("defs",null,Z.createElement("path",{id:N,d:j})),Z.createElement("textPath",{xlinkHref:"#".concat(N)},t))},xke=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,f=a.innerRadius,c=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var v=Pi(o,l,c+i,p),y=v.x,b=v.y;return{x:y,y:b,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var w=(f+c)/2,_=Pi(o,l,w,p),S=_.x,C=_.y;return{x:S,y:C,textAnchor:"middle",verticalAnchor:"middle"}},Ske=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,f=o.y,c=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",y=d>0?"start":"end",b=c>=0?1:-1,w=b*r,_=b>0?"end":"start",S=b>0?"start":"end";if(a==="top"){var C={x:l+c/2,y:f-d*r,textAnchor:"middle",verticalAnchor:v};return pi(pi({},C),i?{height:Math.max(f-i.y,0),width:c}:{})}if(a==="bottom"){var T={x:l+c/2,y:f+h+p,textAnchor:"middle",verticalAnchor:y};return pi(pi({},T),i?{height:Math.max(i.y+i.height-(f+h),0),width:c}:{})}if(a==="left"){var A={x:l-w,y:f+h/2,textAnchor:_,verticalAnchor:"middle"};return pi(pi({},A),i?{width:Math.max(A.x-i.x,0),height:h}:{})}if(a==="right"){var M={x:l+c+w,y:f+h/2,textAnchor:S,verticalAnchor:"middle"};return pi(pi({},M),i?{width:Math.max(i.x+i.width-M.x,0),height:h}:{})}var j=i?{width:c,height:h}:{};return a==="insideLeft"?pi({x:l+w,y:f+h/2,textAnchor:S,verticalAnchor:"middle"},j):a==="insideRight"?pi({x:l+c-w,y:f+h/2,textAnchor:_,verticalAnchor:"middle"},j):a==="insideTop"?pi({x:l+c/2,y:f+p,textAnchor:"middle",verticalAnchor:y},j):a==="insideBottom"?pi({x:l+c/2,y:f+h-p,textAnchor:"middle",verticalAnchor:v},j):a==="insideTopLeft"?pi({x:l+w,y:f+p,textAnchor:S,verticalAnchor:y},j):a==="insideTopRight"?pi({x:l+c-w,y:f+p,textAnchor:_,verticalAnchor:y},j):a==="insideBottomLeft"?pi({x:l+w,y:f+h-p,textAnchor:S,verticalAnchor:v},j):a==="insideBottomRight"?pi({x:l+c-w,y:f+h-p,textAnchor:_,verticalAnchor:v},j):Pc(a)&&(Fe(a.x)||Vl(a.x))&&(Fe(a.y)||Vl(a.y))?pi({x:l+su(a.x,c),y:f+su(a.y,h),textAnchor:"end",verticalAnchor:"end"},j):pi({x:l+c/2,y:f+h/2,textAnchor:"middle",verticalAnchor:"middle"},j)},Cke=function(n){return"cx"in n&&Fe(n.cx)};function Xt(e){var n=e.offset,t=n===void 0?5:n,i=pke(e,uke),r=pi({offset:t},i),a=r.viewBox,o=r.position,l=r.value,f=r.children,c=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||In(l)&&In(f)&&!O.isValidElement(c)&&!jn(c))return null;if(O.isValidElement(c))return O.cloneElement(c,r);var v;if(jn(c)){if(v=O.createElement(c,r),O.isValidElement(v))return v}else v=wke(r);var y=Cke(a),b=Nn(r,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return _ke(r,v,b);var w=y?xke(r):Ske(r);return Z.createElement(Fg,tm({className:sn("recharts-label",d)},b,w,{breakAll:p}),v)}Xt.displayName="Label";var VU=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,f=n.radius,c=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,y=n.left,b=n.width,w=n.height,_=n.clockWise,S=n.labelViewBox;if(S)return S;if(Fe(b)&&Fe(w)){if(Fe(d)&&Fe(p))return{x:d,y:p,width:b,height:w};if(Fe(v)&&Fe(y))return{x:v,y,width:b,height:w}}return Fe(d)&&Fe(p)?{x:d,y:p,width:0,height:0}:Fe(t)&&Fe(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:c||0,outerRadius:h||f||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},Ake=function(n,t){return n?n===!0?Z.createElement(Xt,{key:"label-implicit",viewBox:t}):yi(n)?Z.createElement(Xt,{key:"label-implicit",viewBox:t,value:n}):O.isValidElement(n)?n.type===Xt?O.cloneElement(n,{key:"label-implicit",viewBox:t}):Z.createElement(Xt,{key:"label-implicit",content:n,viewBox:t}):jn(n)?Z.createElement(Xt,{key:"label-implicit",content:n,viewBox:t}):Pc(n)?Z.createElement(Xt,tm({viewBox:t},n,{key:"label-implicit"})):null:null},Oke=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&i&&!n.label)return null;var r=n.children,a=VU(n),o=sa(r,Xt).map(function(f,c){return O.cloneElement(f,{viewBox:t||a,key:"label-".concat(c)})});if(!i)return o;var l=Ake(n.label,t||a);return[l].concat(fke(o))};Xt.parseViewBox=VU;Xt.renderCallByParent=Oke;var c3,MP;function Eke(){if(MP)return c3;MP=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return c3=e,c3}var Tke=Eke();const Mke=at(Tke);function im(e){"@babel/helpers - typeof";return im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},im(e)}var jke=["valueAccessor"],Dke=["data","dataKey","clockWise","id","textBreakAll"];function Rke(e){return zke(e)||$ke(e)||Nke(e)||Pke()}function Pke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nke(e,n){if(e){if(typeof e=="string")return m4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m4(e,n)}}function $ke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zke(e){if(Array.isArray(e))return m4(e)}function m4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Fke(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var qke=function(n){return Array.isArray(n.value)?Mke(n.value):n.value};function Qa(e){var n=e.valueAccessor,t=n===void 0?qke:n,i=RP(e,jke),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,f=i.textBreakAll,c=RP(i,Dke);return!r||!r.length?null:Z.createElement(Et,{className:"recharts-label-list"},r.map(function(h,d){var p=In(a)?t(h,d):ir(h&&h.payload,a),v=In(l)?{}:{id:"".concat(l,"-").concat(d)};return Z.createElement(Xt,a1({},Nn(h,!0),c,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:f,viewBox:Xt.parseViewBox(In(o)?h:DP(DP({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Qa.displayName="LabelList";function Hke(e,n){return e?e===!0?Z.createElement(Qa,{key:"labelList-implicit",data:n}):Z.isValidElement(e)||jn(e)?Z.createElement(Qa,{key:"labelList-implicit",data:n,content:e}):Pc(e)?Z.createElement(Qa,a1({data:n},e,{key:"labelList-implicit"})):null:null}function Uke(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&t&&!e.label)return null;var i=e.children,r=sa(i,Qa).map(function(o,l){return O.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=Hke(e.label,n);return[a].concat(Rke(r))}Qa.renderCallByParent=Uke;function rm(e){"@babel/helpers - typeof";return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rm(e)}function p4(){return p4=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>c),`, - `).concat(d.x,",").concat(d.y,` - `);if(r>0){var v=Pi(t,i,r,o),y=Pi(t,i,r,c);p+="L ".concat(y.x,",").concat(y.y,` - A `).concat(r,",").concat(r,`,0, - `).concat(+(Math.abs(f)>180),",").concat(+(o<=c),`, - `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},Kke=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,f=n.cornerIsExternal,c=n.startAngle,h=n.endAngle,d=Ma(h-c),p=Nv({cx:t,cy:i,radius:a,angle:c,sign:d,cornerRadius:o,cornerIsExternal:f}),v=p.circleTangency,y=p.lineTangency,b=p.theta,w=Nv({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:f}),_=w.circleTangency,S=w.lineTangency,C=w.theta,T=f?Math.abs(c-h):Math.abs(c-h)-b-C;if(T<0)return l?"M ".concat(y.x,",").concat(y.y,` - a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 - a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):WU({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:c,endAngle:h});var A="M ".concat(y.x,",").concat(y.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` - A`).concat(a,",").concat(a,",0,").concat(+(T>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(S.x,",").concat(S.y,` - `);if(r>0){var M=Nv({cx:t,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),j=M.circleTangency,N=M.lineTangency,F=M.theta,R=Nv({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),L=R.circleTangency,B=R.lineTangency,G=R.theta,H=f?Math.abs(c-h):Math.abs(c-h)-F-G;if(H<0&&o===0)return"".concat(A,"L").concat(t,",").concat(i,"Z");A+="L".concat(B.x,",").concat(B.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` - A`).concat(r,",").concat(r,",0,").concat(+(H>180),",").concat(+(d>0),",").concat(j.x,",").concat(j.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else A+="L".concat(t,",").concat(i,"Z");return A},Xke={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},GU=function(n){var t=NP(NP({},Xke),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,f=t.forceCornerRadius,c=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?w=Kke({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(b,y/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:h,endAngle:d}):w=WU({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Z.createElement("path",p4({},Nn(t,!0),{className:v,d:w,role:"img"}))};function am(e){"@babel/helpers - typeof";return am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},am(e)}function v4(){return v4=Object.assign?Object.assign.bind():function(e){for(var n=1;nr_e.call(e,n));function Ou(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const s_e="__v",l_e="__o",u_e="_owner",{getOwnPropertyDescriptor:BP,keys:FP}=Object;function f_e(e,n){return e.byteLength===n.byteLength&&o1(new Uint8Array(e),new Uint8Array(n))}function c_e(e,n,t){let i=e.length;if(n.length!==i)return!1;for(;i-- >0;)if(!t.equals(e[i],n[i],i,i,e,n,t))return!1;return!0}function d_e(e,n){return e.byteLength===n.byteLength&&o1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function h_e(e,n){return Ou(e.getTime(),n.getTime())}function m_e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function p_e(e,n){return e===n}function qP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,f=0;for(;(o=a.next())&&!o.done;){const c=n.entries();let h=!1,d=0;for(;(l=c.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],f,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;f++}return!0}const v_e=Ou;function g_e(e,n,t){const i=FP(e);let r=i.length;if(FP(n).length!==r)return!1;for(;r-- >0;)if(!YU(e,n,t,i[r]))return!1;return!0}function Gd(e,n,t){const i=IP(e);let r=i.length;if(IP(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!YU(e,n,t,a)||(o=BP(e,a),l=BP(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function y_e(e,n){return Ou(e.valueOf(),n.valueOf())}function b_e(e,n){return e.source===n.source&&e.flags===n.flags}function HP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const f=n.values();let c=!1,h=0;for(;(l=f.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){c=r[h]=!0;break}h++}if(!c)return!1}return!0}function o1(e,n){let t=e.byteLength;if(n.byteLength!==t||e.byteOffset!==n.byteOffset)return!1;for(;t-- >0;)if(e[t]!==n[t])return!1;return!0}function w_e(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function YU(e,n,t,i){return(i===u_e||i===l_e||i===s_e)&&(e.$$typeof||n.$$typeof)?!0:o_e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const k_e="[object ArrayBuffer]",__e="[object Arguments]",x_e="[object Boolean]",S_e="[object DataView]",C_e="[object Date]",A_e="[object Error]",O_e="[object Map]",E_e="[object Number]",T_e="[object Object]",M_e="[object RegExp]",j_e="[object Set]",D_e="[object String]",R_e={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},P_e="[object URL]",N_e=Object.prototype.toString;function $_e({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:y}){return function(w,_,S){if(w===_)return!0;if(w==null||_==null)return!1;const C=typeof w;if(C!==typeof _)return!1;if(C!=="object")return C==="number"?l(w,_,S):C==="function"?a(w,_,S):!1;const T=w.constructor;if(T!==_.constructor)return!1;if(T===Object)return f(w,_,S);if(Array.isArray(w))return n(w,_,S);if(T===Date)return i(w,_,S);if(T===RegExp)return h(w,_,S);if(T===Map)return o(w,_,S);if(T===Set)return d(w,_,S);const A=N_e.call(w);if(A===C_e)return i(w,_,S);if(A===M_e)return h(w,_,S);if(A===O_e)return o(w,_,S);if(A===j_e)return d(w,_,S);if(A===T_e)return typeof w.then!="function"&&typeof _.then!="function"&&f(w,_,S);if(A===P_e)return v(w,_,S);if(A===A_e)return r(w,_,S);if(A===__e)return f(w,_,S);if(R_e[A])return p(w,_,S);if(A===k_e)return e(w,_,S);if(A===S_e)return t(w,_,S);if(A===x_e||A===E_e||A===D_e)return c(w,_,S);if(y){let M=y[A];if(!M){const j=a_e(w);j&&(M=y[j])}if(M)return M(w,_,S)}return!1}}function z_e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:f_e,areArraysEqual:t?Gd:c_e,areDataViewsEqual:d_e,areDatesEqual:h_e,areErrorsEqual:m_e,areFunctionsEqual:p_e,areMapsEqual:t?d3(qP,Gd):qP,areNumbersEqual:v_e,areObjectsEqual:t?Gd:g_e,arePrimitiveWrappersEqual:y_e,areRegExpsEqual:b_e,areSetsEqual:t?d3(HP,Gd):HP,areTypedArraysEqual:t?d3(o1,Gd):o1,areUrlsEqual:w_e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=zv(i.areArraysEqual),a=zv(i.areMapsEqual),o=zv(i.areObjectsEqual),l=zv(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function L_e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function I_e({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,f){const{cache:c=e?new WeakMap:void 0,meta:h}=t();return n(l,f,{cache:c,equals:i,meta:h,strict:r})};if(e)return function(l,f){return n(l,f,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,f){return n(l,f,a)}}const B_e=hl();hl({strict:!0});hl({circular:!0});hl({circular:!0,strict:!0});hl({createInternalComparator:()=>Ou});hl({strict:!0,createInternalComparator:()=>Ou});hl({circular:!0,createInternalComparator:()=>Ou});hl({circular:!0,createInternalComparator:()=>Ou,strict:!0});function hl(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=z_e(e),o=$_e(a),l=t?t(o):L_e(o);return I_e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function F_e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function UP(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=-1,i=function r(a){t<0&&(t=a),a-t>n?(e(a),t=-1):F_e(r)};requestAnimationFrame(i)}function g4(e){"@babel/helpers - typeof";return g4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},g4(e)}function q_e(e){return W_e(e)||V_e(e)||U_e(e)||H_e()}function H_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U_e(e,n){if(e){if(typeof e=="string")return VP(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return VP(e,n)}}function VP(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1?1:_<0?0:_},b=function(_){for(var S=_>1?1:_,C=S,T=0;T<8;++T){var A=d(C)-S,M=v(C);if(Math.abs(A-S)0&&arguments[0]!==void 0?arguments[0]:{},t=n.stiff,i=t===void 0?100:t,r=n.damping,a=r===void 0?8:r,o=n.dt,l=o===void 0?17:o,f=function(h,d,p){var v=-(h-d)*i,y=p*a,b=p+(v-y)*l/1e3,w=p*l/1e3+h;return Math.abs(w-d)e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function x2e(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,a;for(a=0;a=0)&&(t[r]=e[r]);return t}function h3(e){return O2e(e)||A2e(e)||C2e(e)||S2e()}function S2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C2e(e,n){if(e){if(typeof e=="string")return _4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _4(e,n)}}function A2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O2e(e){if(Array.isArray(e))return _4(e)}function _4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u1(e){return u1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u1(e)}var ro=(function(e){D2e(t,e);var n=R2e(t);function t(i,r){var a;E2e(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,f=o.attributeName,c=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(C4(a)),a.changeStyle=a.changeStyle.bind(C4(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),S4(a);if(d&&d.length)a.state={style:d[0].style};else if(c){if(typeof p=="function")return a.state={style:c},S4(a);a.state={style:f?ah({},f,c):c}}else a.state={style:{}};return a}return M2e(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:f?ah({},f,h):h};this.state&&p&&(f&&p[f]!==h||!f&&p!==h)&&this.setState(v);return}if(!(B_e(r.to,h)&&r.canBegin&&r.isActive)){var y=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=y||c?d:r.to;if(this.state&&p){var w={style:f?ah({},f,b):b};(f&&p[f]!==b||!f&&p!==b)&&this.setState(w)}this.runAnimation(xa(xa({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,f=r.duration,c=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=w2e(o,l,u2e(c),f,this.changeStyle),y=function(){a.stopJSAnimation=v()};this.manager.start([p,h,y,f,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,f=r.onAnimationStart,c=o[0],h=c.style,d=c.duration,p=d===void 0?0:d,v=function(b,w,_){if(_===0)return b;var S=w.duration,C=w.easing,T=C===void 0?"ease":C,A=w.style,M=w.properties,j=w.onAnimationEnd,N=_>0?o[_-1]:w,F=M||Object.keys(A);if(typeof T=="function"||T==="spring")return[].concat(h3(b),[a.runJSAnimation.bind(a,{from:N.style,to:A,duration:S,easing:T}),S]);var R=YP(F,S,T),L=xa(xa(xa({},N.style),A),{},{transition:R});return[].concat(h3(b),[L,S,j]).filter(Z_e)};return this.manager.start([f].concat(h3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=G_e());var a=r.begin,o=r.duration,l=r.attributeName,f=r.to,c=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof v=="function"||c==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var b=l?ah({},l,f):f,w=YP(Object.keys(b),o,c);y.start([h,a,xa(xa({},b),{},{transition:w}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var f=_2e(r,k2e),c=O.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||c===0||o<=0)return a;var d=function(v){var y=v.props,b=y.style,w=b===void 0?{}:b,_=y.className,S=O.cloneElement(v,xa(xa({},f),{},{style:xa(xa({},w),h),className:_}));return S};return c===1?d(O.Children.only(a)):Z.createElement("div",null,O.Children.map(a,function(p){return d(p)}))}}]),t})(O.PureComponent);ro.displayName="Animate";ro.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ro.propTypes={from:lt.oneOfType([lt.object,lt.string]),to:lt.oneOfType([lt.object,lt.string]),attributeName:lt.string,duration:lt.number,begin:lt.number,easing:lt.oneOfType([lt.string,lt.func]),steps:lt.arrayOf(lt.shape({duration:lt.number.isRequired,style:lt.object.isRequired,easing:lt.oneOfType([lt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),lt.func]),properties:lt.arrayOf("string"),onAnimationEnd:lt.func})),children:lt.oneOfType([lt.node,lt.func]),isActive:lt.bool,canBegin:lt.bool,onAnimationEnd:lt.func,shouldReAnimate:lt.bool,onAnimationStart:lt.func,onAnimationReStart:lt.func};function lm(e){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lm(e)}function f1(){return f1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,f=i>=0?1:-1,c=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(n+f*d[0],",").concat(t)),h+="L ".concat(n+i-f*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, - `).concat(n+i,",").concat(t+l*d[1])),h+="L ".concat(n+i,",").concat(t+r-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, - `).concat(n+i-f*d[2],",").concat(t+r)),h+="L ".concat(n+f*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, - `).concat(n,",").concat(t+r-l*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);h="M ".concat(n,",").concat(t+l*y,` - A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+f*y,",").concat(t,` - L `).concat(n+i-f*y,",").concat(t,` - A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+i,",").concat(t+l*y,` - L `).concat(n+i,",").concat(t+r-l*y,` - A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+i-f*y,",").concat(t+r,` - L `).concat(n+f*y,",").concat(t+r,` - A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n,",").concat(t+r-l*y," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},H2e=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,f=t.height;if(Math.abs(l)>0&&Math.abs(f)>0){var c=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+f),p=Math.max(o,o+f);return i>=c&&i<=h&&r>=d&&r<=p}return!1},U2e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},um=function(n){var t=tN(tN({},U2e),n),i=O.useRef(),r=O.useState(-1),a=N2e(r,2),o=a[0],l=a[1];O.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var T=i.current.getTotalLength();T&&l(T)}catch{}},[]);var f=t.x,c=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,y=t.animationEasing,b=t.animationDuration,w=t.animationBegin,_=t.isAnimationActive,S=t.isUpdateAnimationActive;if(f!==+f||c!==+c||h!==+h||d!==+d||h===0||d===0)return null;var C=sn("recharts-rectangle",v);return S?Z.createElement(ro,{canBegin:o>0,from:{width:h,height:d,x:f,y:c},to:{width:h,height:d,x:f,y:c},duration:b,animationEasing:y,isActive:S},function(T){var A=T.width,M=T.height,j=T.x,N=T.y;return Z.createElement(ro,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,isActive:_,easing:y},Z.createElement("path",f1({},Nn(t,!0),{className:C,d:iN(j,N,A,M,p),ref:i})))}):Z.createElement("path",f1({},Nn(t,!0),{className:C,d:iN(f,c,h,d,p)}))};function A4(){return A4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Z2e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Q2e=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},J2e=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,f=n.left,c=f===void 0?0:f,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,y=n.className,b=X2e(n,V2e),w=W2e({x:i,y:a,top:l,left:c,width:d,height:v},b);return!Fe(i)||!Fe(a)||!Fe(d)||!Fe(v)||!Fe(l)||!Fe(c)?null:Z.createElement("path",O4({},Nn(w,!0),{className:sn("recharts-cross",y),d:Q2e(i,a,d,v,l,c)}))},m3,aN;function exe(){if(aN)return m3;aN=1;var e=kH(),n=e(Object.getPrototypeOf,Object);return m3=n,m3}var p3,oN;function nxe(){if(oN)return p3;oN=1;var e=ss(),n=exe(),t=ls(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,f=o.call(Object);function c(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==f}return p3=c,p3}var txe=nxe();const ixe=at(txe);var v3,sN;function rxe(){if(sN)return v3;sN=1;var e=ss(),n=ls(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return v3=i,v3}var axe=rxe();const oxe=at(axe);function cm(e){"@babel/helpers - typeof";return cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cm(e)}function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:f,y:c},to:{upperWidth:h,lowerWidth:d,height:p,x:f,y:c},duration:b,animationEasing:y,isActive:_},function(C){var T=C.upperWidth,A=C.lowerWidth,M=C.height,j=C.x,N=C.y;return Z.createElement(ro,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,easing:y},Z.createElement("path",c1({},Nn(t,!0),{className:S,d:cN(j,N,T,A,M),ref:i})))}):Z.createElement("g",null,Z.createElement("path",c1({},Nn(t,!0),{className:S,d:cN(f,c,h,d,p)})))},gxe=["option","shapeType","propTransformer","activeClassName","isActive"];function dm(e){"@babel/helpers - typeof";return dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dm(e)}function yxe(e,n){if(e==null)return{};var t=bxe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function bxe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function dN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function d1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Mr(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=i.props,a=r.endIndex,o=r.onDragEnd,l=r.startIndex;o==null||o({endIndex:a,startIndex:l})}),i.detachDragEndListener()}),Mr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Mr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Mr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Mr(i,"handleSlideDragStart",function(r){var a=_N(r)?r.changedTouches[0]:r;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return Gxe(n,e),Hxe(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,f=l.gap,c=l.data,h=c.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),y=n.getIndexInRange(o,p);return{startIndex:v-v%f,endIndex:y===h?h:y-y%f}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,f=ir(a[i],l,i);return jn(o)?o(f,i):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,f=this.props,c=f.x,h=f.width,d=f.travellerWidth,p=f.startIndex,v=f.endIndex,y=f.onChange,b=i.pageX-a;b>0?b=Math.min(b,c+h-d-l,c+h-d-o):b<0&&(b=Math.max(b,c-o,c-l));var w=this.getIndex({startX:o+b,endX:l+b});(w.startIndex!==p||w.endIndex!==v)&&y&&y(w),this.setState({startX:o+b,endX:l+b,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=_N(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,f=r.startX,c=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,y=h.onChange,b=h.gap,w=h.data,_={startX:this.state.startX,endX:this.state.endX},S=i.pageX-a;S>0?S=Math.min(S,d+p-v-c):S<0&&(S=Math.max(S,d-c)),_[o]=c+S;var C=this.getIndex(_),T=C.startIndex,A=C.endIndex,M=function(){var N=w.length-1;return o==="startX"&&(l>f?T%b===0:A%b===0)||lf?A%b===0:T%b===0)||l>f&&A===N};this.setState(Mr(Mr({},o,c+S),"brushMoveStartX",i.pageX),function(){y&&M()&&y(C)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,f=o.startX,c=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=c||r==="endX"&&v<=f||this.setState(Mr({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.fill,c=i.stroke;return Z.createElement("rect",{stroke:c,fill:f,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.data,c=i.children,h=i.padding,d=O.Children.only(c);return d?Z.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,f=this.props,c=f.y,h=f.travellerWidth,d=f.height,p=f.traveller,v=f.ariaLabel,y=f.data,b=f.startIndex,w=f.endIndex,_=Math.max(i,this.props.x),S=k3(k3({},Nn(this.props,!1)),{},{x:_,y:c,width:h,height:d}),C=v||"Min value: ".concat((a=y[b])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[w])===null||o===void 0?void 0:o.name);return Z.createElement(Et,{tabIndex:0,role:"slider","aria-label":C,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),l.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,S))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,f=a.stroke,c=a.travellerWidth,h=Math.min(i,r)+c,d=Math.max(Math.abs(r-i)-c,0);return Z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,f=i.travellerWidth,c=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,y={pointerEvents:"none",fill:c};return Z.createElement(Et,{className:"recharts-brush-texts"},Z.createElement(Fg,m1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},y),this.getTextOfTick(r)),Z.createElement(Fg,m1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+f+v,y:o+l/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,f=i.y,c=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,y=p.endX,b=p.isTextActive,w=p.isSlideMoving,_=p.isTravellerMoving,S=p.isTravellerFocused;if(!r||!r.length||!Fe(l)||!Fe(f)||!Fe(c)||!Fe(h)||c<=0||h<=0)return null;var C=sn("recharts-brush",a),T=Z.Children.count(o)===1,A=Fxe("userSelect","none");return Z.createElement(Et,{className:C,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(v,y),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(y,"endX"),(b||w||_||S||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,f=i.stroke,c=Math.floor(a+l/2)-1;return Z.createElement(Z.Fragment,null,Z.createElement("rect",{x:r,y:a,width:o,height:l,fill:f,stroke:"none"}),Z.createElement("line",{x1:r+1,y1:c,x2:r+o-1,y2:c,fill:"none",stroke:"#fff"}),Z.createElement("line",{x1:r+1,y1:c+2,x2:r+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Z.isValidElement(i)?a=Z.cloneElement(i,r):jn(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,f=i.travellerWidth,c=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||c!==r.prevUpdateId)return k3({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o},a&&a.length?Kxe({data:a,width:o,x:l,travellerWidth:f,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||f!==r.prevTravellerWidth)){r.scale.range([l,l+o-f]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var f=Math.floor((o+l)/2);i[f]>r?l=f:o=f}return r>=i[l]?l:o}}])})(O.PureComponent);Mr(ec,"displayName","Brush");Mr(ec,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var _3,xN;function Xxe(){if(xN)return _3;xN=1;var e=_9();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return _3=n,_3}var x3,SN;function Zxe(){if(SN)return x3;SN=1;var e=mH(),n=fl(),t=Xxe(),i=yr(),r=f0();function a(o,l,f){var c=i(o)?e:t;return f&&r(o,l,f)&&(l=void 0),c(o,n(l,3))}return x3=a,x3}var Qxe=Zxe();const Jxe=at(Qxe);var Ja=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},S3,CN;function e3e(){if(CN)return S3;CN=1;var e=DH();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return S3=n,S3}var C3,AN;function n3e(){if(AN)return C3;AN=1;var e=e3e(),n=MH(),t=fl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,f,c){e(o,f,a(l,f,c))}),o}return C3=i,C3}var t3e=n3e();const i3e=at(t3e);var A3,ON;function r3e(){if(ON)return A3;ON=1;function e(n,t){for(var i=-1,r=n==null?0:n.length;++i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function h3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function m3e(e,n){var t=e.x,i=e.y,r=d3e(e,l3e),a="".concat(t),o=parseInt(a,10),l="".concat(i),f=parseInt(l,10),c="".concat(n.height||r.height),h=parseInt(c,10),d="".concat(n.width||r.width),p=parseInt(d,10);return Yd(Yd(Yd(Yd(Yd({},n),r),o?{x:o}:{}),f?{y:f}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function jN(e){return Z.createElement(Axe,T4({shapeType:"rectangle",propTransformer:m3e,activeClassName:"recharts-active-bar"},e))}var p3e=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,r){if(typeof n=="number")return n;var a=Fe(i)||Ame(i);return a?n(i,r):(a||uu(),t)}},v3e=["value","background"],oV;function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},nc(e)}function g3e(e,n){if(e==null)return{};var t=y3e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function y3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function v1(){return v1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(U)0&&Math.abs(H)0&&(G=Math.min((X||0)-(H[ee-1]||0),G))}),Number.isFinite(G)){var U=G/B,P=b.layout==="vertical"?i.height:i.width;if(b.padding==="gap"&&(j=U*P/2),b.padding==="no-gap"){var z=su(n.barCategoryGap,U*P),q=U*P/2;j=q-z-(q-z)/P*z}}}r==="xAxis"?N=[i.left+(C.left||0)+(j||0),i.left+i.width-(C.right||0)-(j||0)]:r==="yAxis"?N=f==="horizontal"?[i.top+i.height-(C.bottom||0),i.top+(C.top||0)]:[i.top+(C.top||0)+(j||0),i.top+i.height-(C.bottom||0)-(j||0)]:N=b.range,A&&(N=[N[1],N[0]]);var Y=qwe(b,a,p),D=Y.scale,V=Y.realScaleType;D.domain(_).range(N),Hwe(D);var W=Zwe(D,Sa(Sa({},b),{},{realScaleType:V}));r==="xAxis"?(L=w==="top"&&!T||w==="bottom"&&T,F=i.left,R=d[M]-L*b.height):r==="yAxis"&&(L=w==="left"&&!T||w==="right"&&T,F=d[M]-L*b.width,R=i.top);var $=Sa(Sa(Sa({},b),W),{},{realScaleType:V,x:F,y:R,scale:D,width:r==="xAxis"?i.width:b.width,height:r==="yAxis"?i.height:b.height});return $.bandSize=i1($,W),!b.hide&&r==="xAxis"?d[M]+=(L?-1:1)*$.height:b.hide||(d[M]+=(L?-1:1)*$.width),Sa(Sa({},v),{},x0({},y,$))},{})},fV=function(n,t){var i=n.x,r=n.y,a=t.x,o=t.y;return{x:Math.min(i,a),y:Math.min(r,o),width:Math.abs(a-i),height:Math.abs(o-r)}},T3e=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return fV({x:t,y:i},{x:r,y:a})},cV=(function(){function e(n){A3e(this,e),this.scale=n}return O3e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+f}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();x0(cV,"EPS",1e-4);var Q9=function(n){var t=Object.keys(n).reduce(function(i,r){return Sa(Sa({},i),{},x0({},r,cV.create(n[r])))},{});return Sa(Sa({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return i3e(r,function(f,c){return t[c].apply(f,{bandAware:o,position:l})})},isInRange:function(r){return aV(r,function(a,o){return t[o].isInRange(a)})}})};function M3e(e){return(e%180+180)%180}var j3e=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=M3e(r),o=a*Math.PI/180,l=Math.atan(i/t),f=o>l&&o-1?f[c?a[h]:h]:void 0}}return T3=i,T3}var M3,zN;function R3e(){if(zN)return M3;zN=1;var e=nV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return M3=n,M3}var j3,LN;function P3e(){if(LN)return j3;LN=1;var e=CH(),n=fl(),t=R3e(),i=Math.max;function r(a,o,l){var f=a==null?0:a.length;if(!f)return-1;var c=l==null?0:t(l);return c<0&&(c=i(f+c,0)),e(a,n(o,3),c)}return j3=r,j3}var D3,IN;function N3e(){if(IN)return D3;IN=1;var e=D3e(),n=P3e(),t=e(n);return D3=t,D3}var $3e=N3e();const z3e=at($3e);var L3e=Bq();const I3e=at(L3e);var B3e=I3e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),J9=O.createContext(void 0),eA=O.createContext(void 0),dV=O.createContext(void 0),hV=O.createContext({}),mV=O.createContext(void 0),pV=O.createContext(0),vV=O.createContext(0),BN=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,f=n.width,c=n.height,h=B3e(a);return Z.createElement(J9.Provider,{value:i},Z.createElement(eA.Provider,{value:r},Z.createElement(hV.Provider,{value:a},Z.createElement(dV.Provider,{value:h},Z.createElement(mV.Provider,{value:o},Z.createElement(pV.Provider,{value:c},Z.createElement(vV.Provider,{value:f},l)))))))},F3e=function(){return O.useContext(mV)},gV=function(n){var t=O.useContext(J9);t==null&&uu();var i=t[n];return i==null&&uu(),i},q3e=function(){var n=O.useContext(J9);return Us(n)},H3e=function(){var n=O.useContext(eA),t=z3e(n,function(i){return aV(i.domain,Number.isFinite)});return t||Us(n)},yV=function(n){var t=O.useContext(eA);t==null&&uu();var i=t[n];return i==null&&uu(),i},U3e=function(){var n=O.useContext(dV);return n},V3e=function(){return O.useContext(hV)},nA=function(){return O.useContext(vV)},tA=function(){return O.useContext(pV)};function tc(e){"@babel/helpers - typeof";return tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tc(e)}function W3e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function G3e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);te*r)return!1;var a=t();return e*(n-e*a/2-i)>=0&&e*(n+e*a/2-r)<=0}function ESe(e,n){return CV(e,n+1)}function TSe(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,f=0,c=1,h=o,d=function(){var y=i==null?void 0:i[f];if(y===void 0)return{v:CV(i,c)};var b=f,w,_=function(){return w===void 0&&(w=t(y,b)),w},S=y.coordinate,C=f===0||k1(e,S,_,h,l);C||(f=0,h=o,c+=1),C&&(h=S+e*(_()/2+r),f+=c)},p;c<=a.length;)if(p=d(),p)return p.v;return[]}function gm(e){"@babel/helpers - typeof";return gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function YN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function qi(e){for(var n=1;n0?v.coordinate-w*e:v.coordinate})}else a[p]=v=qi(qi({},v),{},{tickCoord:v.coordinate});var _=k1(e,v.tickCoord,b,l,f);_&&(f=v.tickCoord-e*(b()/2+r),a[p]=qi(qi({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)c(h);return a}function PSe(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,f=n.start,c=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-c);o[l-1]=h=qi(qi({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=k1(e,h.tickCoord,function(){return d},f,c);v&&(c=h.tickCoord-e*(d/2+r),o[l-1]=qi(qi({},h),{},{isShow:!0}))}for(var y=a?l-1:l,b=function(S){var C=o[S],T,A=function(){return T===void 0&&(T=t(C,S)),T};if(S===0){var M=e*(C.coordinate-e*A()/2-f);o[S]=C=qi(qi({},C),{},{tickCoord:M<0?C.coordinate-M*e:C.coordinate})}else o[S]=C=qi(qi({},C),{},{tickCoord:C.coordinate});var j=k1(e,C.tickCoord,A,f,c);j&&(f=C.tickCoord+e*(A()/2+r),o[S]=qi(qi({},C),{},{isShow:!0}))},w=0;w=2?Ma(r[1].coordinate-r[0].coordinate):1,_=OSe(a,w,v);return f==="equidistantPreserveStart"?TSe(w,_,b,r,o):(f==="preserveStart"||f==="preserveStartEnd"?p=PSe(w,_,b,r,o,f==="preserveStartEnd"):p=RSe(w,_,b,r,o),p.filter(function(S){return S.isShow}))}var NSe=["viewBox"],$Se=["viewBox"],zSe=["ticks"];function ac(e){"@babel/helpers - typeof";return ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ac(e)}function Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function LSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function ISe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function XN(e,n){for(var t=0;t0?f(this.props):f(v)),o<=0||l<=0||!y||!y.length?null:Z.createElement(Et,{className:sn("recharts-cartesian-axis",c),ref:function(w){i.layerReference=w}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Xt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=sn(r.className,"recharts-cartesian-axis-tick-value");return Z.isValidElement(i)?o=Z.cloneElement(i,mi(mi({},r),{},{className:l})):jn(i)?o=i(mi(mi({},r),{},{className:l})):o=Z.createElement(Fg,Sf({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(O.Component);aA(Fc,"displayName","CartesianAxis");aA(Fc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var WSe=["x1","y1","x2","y2","key"],GSe=["offset"];function fu(e){"@babel/helpers - typeof";return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fu(e)}function ZN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Ui(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function ZSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var QSe=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,f=n.ry;return Z.createElement("rect",{x:r,y:a,ry:f,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function EV(e,n){var t;if(Z.isValidElement(e))t=Z.cloneElement(e,n);else if(jn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,f=QN(n,WSe),c=Nn(f,!1);c.offset;var h=QN(c,GSe);t=Z.createElement("line",Yl({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function JSe(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Ui(Ui({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(f),index:f});return EV(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function e4e(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Ui(Ui({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(f),index:f});return EV(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function n4e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var y=!h[v+1],b=y?r+o-p:h[v+1]-p;if(b<=0)return null;var w=v%n.length;return Z.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:b,width:a,stroke:"none",fill:n[w],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function t4e(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,f=e.height,c=e.verticalPoints;if(!t||!i||!i.length)return null;var h=c.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var y=!h[v+1],b=y?a+l-p:h[v+1]-p;if(b<=0)return null;var w=v%i.length;return Z.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:b,height:f,stroke:"none",fill:i[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var i4e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return qU(rA(Ui(Ui(Ui({},Fc.defaultProps),i),{},{ticks:Lo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},r4e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return qU(rA(Ui(Ui(Ui({},Fc.defaultProps),i),{},{ticks:Lo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},yf={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function E0(e){var n,t,i,r,a,o,l=nA(),f=tA(),c=V3e(),h=Ui(Ui({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:yf.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:yf.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:yf.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:yf.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:yf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:yf.verticalFill,x:Fe(e.x)?e.x:c.left,y:Fe(e.y)?e.y:c.top,width:Fe(e.width)?e.width:c.width,height:Fe(e.height)?e.height:c.height}),d=h.x,p=h.y,v=h.width,y=h.height,b=h.syncWithTicks,w=h.horizontalValues,_=h.verticalValues,S=q3e(),C=H3e();if(!Fe(v)||v<=0||!Fe(y)||y<=0||!Fe(d)||d!==+d||!Fe(p)||p!==+p)return null;var T=h.verticalCoordinatesGenerator||i4e,A=h.horizontalCoordinatesGenerator||r4e,M=h.horizontalPoints,j=h.verticalPoints;if((!M||!M.length)&&jn(A)){var N=w&&w.length,F=A({yAxis:C?Ui(Ui({},C),{},{ticks:N?w:C.ticks}):void 0,width:l,height:f,offset:c},N?!0:b);Ho(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(fu(F),"]")),Array.isArray(F)&&(M=F)}if((!j||!j.length)&&jn(T)){var R=_&&_.length,L=T({xAxis:S?Ui(Ui({},S),{},{ticks:R?_:S.ticks}):void 0,width:l,height:f,offset:c},R?!0:b);Ho(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(fu(L),"]")),Array.isArray(L)&&(j=L)}return Z.createElement("g",{className:"recharts-cartesian-grid"},Z.createElement(QSe,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Z.createElement(JSe,Yl({},h,{offset:c,horizontalPoints:M,xAxis:S,yAxis:C})),Z.createElement(e4e,Yl({},h,{offset:c,verticalPoints:j,xAxis:S,yAxis:C})),Z.createElement(n4e,Yl({},h,{horizontalPoints:M})),Z.createElement(t4e,Yl({},h,{verticalPoints:j})))}E0.displayName="CartesianGrid";var a4e=["type","layout","connectNulls","ref"],o4e=["key"];function oc(e){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oc(e)}function JN(e,n){if(e==null)return{};var t=s4e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function s4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function wh(){return wh=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(bf(f.slice(0,y)),[d-b]);break}var w=v.length%2===0?[0,p]:[p];return[].concat(bf(n.repeat(f,h)),bf(v),w).map(function(_){return"".concat(_,"px")}).join(", ")}),Ca(t,"id",$c("recharts-line-")),Ca(t,"pathRef",function(o){t.mainCurve=o}),Ca(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),Ca(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return g4e(n,e),h4e(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,f=a.yAxis,c=a.layout,h=a.children,d=sa(h,Qm);if(!d)return null;var p=function(b,w){return{x:b.x,y:b.y,value:b.value,errorVal:ir(b.payload,w)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Z.createElement(Et,v,d.map(function(y){return Z.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:l,yAxis:f,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,f=l.dot,c=l.points,h=l.dataKey,d=Nn(this.props,!1),p=Nn(f,!0),v=c.map(function(b,w){var _=Tr(Tr(Tr({key:"dot-".concat(w),r:3},d),p),{},{index:w,cx:b.x,cy:b.y,value:b.value,dataKey:h,payload:b.payload,points:c});return n.renderDotItem(f,_)}),y={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Z.createElement(Et,wh({className:"recharts-line-dots",key:"dots"},y),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,f=l.type,c=l.layout,h=l.connectNulls;l.ref;var d=JN(l,a4e),p=Tr(Tr(Tr({},Nn(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:f,layout:c,connectNulls:h});return Z.createElement(Pf,wh({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,f=o.strokeDasharray,c=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,y=o.animateNewValues,b=o.width,w=o.height,_=this.state,S=_.prevPoints,C=_.totalLength;return Z.createElement(ro,{begin:h,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var A=T.t;if(S){var M=S.length/l.length,j=l.map(function(B,G){var H=Math.floor(G*M);if(S[H]){var U=S[H],P=Ri(U.x,B.x),z=Ri(U.y,B.y);return Tr(Tr({},B),{},{x:P(A),y:z(A)})}if(y){var q=Ri(b*2,B.x),Y=Ri(w/2,B.y);return Tr(Tr({},B),{},{x:q(A),y:Y(A)})}return Tr(Tr({},B),{},{x:B.x,y:B.y})});return a.renderCurveStatically(j,i,r)}var N=Ri(0,C),F=N(A),R;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});R=a.getStrokeDasharray(F,C,L)}else R=a.generateSimpleStrokeDasharray(C,F);return a.renderCurveStatically(l,i,r,{strokeDasharray:R})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,f=this.state,c=f.prevPoints,h=f.totalLength;return l&&o&&o.length&&(!c&&h>0||!Xf(c,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,y=r.height,b=r.isAnimationActive,w=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,C=sn("recharts-line",f),T=c&&c.allowDataOverflow,A=h&&h.allowDataOverflow,M=T||A,j=In(w)?this.id:w,N=(i=Nn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},F=N.r,R=F===void 0?3:F,L=N.strokeWidth,B=L===void 0?2:L,G=Vq(o)?o:{},H=G.clipDot,U=H===void 0?!0:H,P=R*2+B;return Z.createElement(Et,{className:C},T||A?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(j)},Z.createElement("rect",{x:T?p:p-v/2,y:A?d:d-y/2,width:T?v:v*2,height:A?y:y*2})),!U&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(j)},Z.createElement("rect",{x:p-P/2,y:d-P/2,width:v+P,height:y+P}))):null,!S&&this.renderCurve(M,j),this.renderErrorBar(M,j),(S||o)&&this.renderDots(M,U,j),(!b||_)&&Qa.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,r){for(var a=i.length%2!==0?[].concat(bf(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function k4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!Xf(h,o)||!Xf(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,y=r.height,b=r.isAnimationActive,w=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,C=sn("recharts-area",f),T=d&&d.allowDataOverflow,A=p&&p.allowDataOverflow,M=T||A,j=In(w)?this.id:w,N=(i=Nn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},F=N.r,R=F===void 0?3:F,L=N.strokeWidth,B=L===void 0?2:L,G=Vq(o)?o:{},H=G.clipDot,U=H===void 0?!0:H,P=R*2+B;return Z.createElement(Et,{className:C},T||A?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(j)},Z.createElement("rect",{x:T?h:h-v/2,y:A?c:c-y/2,width:T?v:v*2,height:A?y:y*2})),!U&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(j)},Z.createElement("rect",{x:h-P/2,y:c-P/2,width:v+P,height:y+P}))):null,S?null:this.renderArea(M,j),(o||S)&&this.renderDots(M,U,j),(!b||_)&&Qa.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])})(O.PureComponent);jV=Jo;Ya(Jo,"displayName","Area");Ya(Jo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Su.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ya(Jo,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(Fe(l)&&typeof l=="number")return l;var f=r==="horizontal"?i:t,c=f.scale.domain();if(f.type==="number"){var h=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(c[0],c[1]),0)}return l==="dataMin"?c[0]:l==="dataMax"?c[1]:c[0]});Ya(Jo,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,f=e.dataKey,c=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,y=c&&c.length,b=jV.getBaseValue(n,t,i,r),w=v==="horizontal",_=!1,S=d.map(function(T,A){var M;y?M=c[h+A]:(M=ir(T,f),Array.isArray(M)?_=!0:M=[b,M]);var j=M[1]==null||y&&ir(T,f)==null;return w?{x:t1({axis:i,ticks:a,bandSize:l,entry:T,index:A}),y:j?null:r.scale(M[1]),value:M,payload:T}:{x:j?null:i.scale(M[1]),y:t1({axis:r,ticks:o,bandSize:l,entry:T,index:A}),value:M,payload:T}}),C;return y||_?C=S.map(function(T){var A=Array.isArray(T.value)?T.value[0]:null;return w?{x:T.x,y:A!=null&&T.y!=null?r.scale(A):null}:{x:A!=null?i.scale(A):null,y:T.y}}):C=w?r.scale(b):i.scale(b),Ls({points:S,baseLine:C,layout:v,isRange:_},p)});Ya(Jo,"renderDotItem",function(e,n){var t;if(Z.isValidElement(e))t=Z.cloneElement(e,n);else if(jn(e))t=e(n);else{var i=sn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=DV(n,w4e);t=Z.createElement(w0,Kl({},a,{key:r,className:i}))}return t});function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lc(e)}function T4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function M4e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function g6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function y6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function b6e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&Fe(r)&&Fe(a)?n.slice(r,a+1):[]};function GV(e){return e==="number"?[0,"auto"]:void 0}var K4=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=T0(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(f,c){var h,d=(h=c.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=Eg(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(cc(f),[UU(c,p)]):f},[])},f$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=j6e(a,i),l=n.orderedTooltipTicks,f=n.tooltipAxis,c=n.tooltipTicks,h=$we(o,l,c,f);if(h>=0&&c){var d=c[h]&&c[h].value,p=K4(n,t,h,d),v=D6e(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},R6e=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=FU(h,a);return i.reduce(function(y,b){var w,_=b.type.defaultProps!==void 0?Ee(Ee({},b.type.defaultProps),b.props):b.props,S=_.type,C=_.dataKey,T=_.allowDataOverflow,A=_.allowDuplicatedCategory,M=_.scale,j=_.ticks,N=_.includeHidden,F=_[o];if(y[F])return y;var R=T0(n.data,{graphicalItems:r.filter(function(W){var $,X=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o];return X===F}),dataStartIndex:f,dataEndIndex:c}),L=R.length,B,G,H;a6e(_.domain,T,S)&&(B=d4(_.domain,null,T),v&&(S==="number"||M!=="auto")&&(H=yh(R,C,"category")));var U=GV(S);if(!B||B.length===0){var P,z=(P=_.domain)!==null&&P!==void 0?P:U;if(C){if(B=yh(R,C,S),S==="category"&&v){var q=Eme(B);A&&q?(G=B,B=h1(0,L)):A||(B=CP(z,B,b).reduce(function(W,$){return W.indexOf($)>=0?W:[].concat(cc(W),[$])},[]))}else if(S==="category")A?B=B.filter(function(W){return W!==""&&!In(W)}):B=CP(z,B,b).reduce(function(W,$){return W.indexOf($)>=0||$===""||In($)?W:[].concat(cc(W),[$])},[]);else if(S==="number"){var Y=Fwe(R,r.filter(function(W){var $,X,ee=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o],oe="hide"in W.props?W.props.hide:(X=W.type.defaultProps)===null||X===void 0?void 0:X.hide;return ee===F&&(N||!oe)}),C,a,h);Y&&(B=Y)}v&&(S==="number"||M!=="auto")&&(H=yh(R,C,"category"))}else v?B=h1(0,L):l&&l[F]&&l[F].hasStack&&S==="number"?B=p==="expand"?[0,1]:HU(l[F].stackGroups,f,c):B=BU(R,r.filter(function(W){var $=o in W.props?W.props[o]:W.type.defaultProps[o],X="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return $===F&&(N||!X)}),S,h,!0);if(S==="number")B=W4(d,B,F,a,j),z&&(B=d4(z,B,T));else if(S==="category"&&z){var D=z,V=B.every(function(W){return D.indexOf(W)>=0});V&&(B=D)}}return Ee(Ee({},y),{},yn({},F,Ee(Ee({},_),{},{axisType:a,domain:B,categoricalDomain:H,duplicateDomain:G,originalDomain:(w=_.domain)!==null&&w!==void 0?w:U,isCategorical:v,layout:h})))},{})},P6e=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=T0(n.data,{graphicalItems:i,dataStartIndex:f,dataEndIndex:c}),v=p.length,y=FU(h,a),b=-1;return i.reduce(function(w,_){var S=_.type.defaultProps!==void 0?Ee(Ee({},_.type.defaultProps),_.props):_.props,C=S[o],T=GV("number");if(!w[C]){b++;var A;return y?A=h1(0,v):l&&l[C]&&l[C].hasStack?(A=HU(l[C].stackGroups,f,c),A=W4(d,A,C,a)):(A=d4(T,BU(p,i.filter(function(M){var j,N,F=o in M.props?M.props[o]:(j=M.type.defaultProps)===null||j===void 0?void 0:j[o],R="hide"in M.props?M.props.hide:(N=M.type.defaultProps)===null||N===void 0?void 0:N.hide;return F===C&&!R}),"number",h),r.defaultProps.allowDataOverflow),A=W4(d,A,C,a)),Ee(Ee({},w),{},yn({},C,Ee(Ee({axisType:a},r.defaultProps),{},{hide:!0,orientation:oa(T6e,"".concat(a,".").concat(b%2),null),domain:A,originalDomain:T,isCategorical:y,layout:h})))}return w},{})},N6e=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=sa(h,a),v={};return p&&p.length?v=R6e(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c}):o&&o.length&&(v=P6e(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c})),v},$6e=function(n){var t=Us(n),i=Lo(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:x9(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:i1(t,i)}},c$=function(n){var t=n.children,i=n.defaultShowTooltip,r=Dr(t,ec),a=0,o=0;return n.data&&n.data.length!==0&&(o=n.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(a=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!i}},z6e=function(n){return!n||!n.length?!1:n.some(function(t){var i=qo(t&&t.type);return i&&i.indexOf("Bar")>=0})},d$=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},L6e=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,f=l===void 0?{}:l,c=i.width,h=i.height,d=i.children,p=i.margin||{},v=Dr(d,ec),y=Dr(d,Uo),b=Object.keys(f).reduce(function(A,M){var j=f[M],N=j.orientation;return!j.mirror&&!j.hide?Ee(Ee({},A),{},yn({},N,A[N]+j.width)):A},{left:p.left||0,right:p.right||0}),w=Object.keys(o).reduce(function(A,M){var j=o[M],N=j.orientation;return!j.mirror&&!j.hide?Ee(Ee({},A),{},yn({},N,oa(A,"".concat(N))+j.height)):A},{top:p.top||0,bottom:p.bottom||0}),_=Ee(Ee({},w),b),S=_.bottom;v&&(_.bottom+=v.props.height||ec.defaultProps.height),y&&t&&(_=Iwe(_,r,i,t));var C=c-_.left-_.right,T=h-_.top-_.bottom;return Ee(Ee({brushBottom:S},_),{},{width:Math.max(C,0),height:Math.max(T,0)})},I6e=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},oA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,f=n.axisComponents,c=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,S){var C=S.graphicalItems,T=S.stackGroups,A=S.offset,M=S.updateId,j=S.dataStartIndex,N=S.dataEndIndex,F=_.barSize,R=_.layout,L=_.barGap,B=_.barCategoryGap,G=_.maxBarSize,H=d$(R),U=H.numericAxisName,P=H.cateAxisName,z=z6e(C),q=[];return C.forEach(function(Y,D){var V=T0(_.data,{graphicalItems:[Y],dataStartIndex:j,dataEndIndex:N}),W=Y.type.defaultProps!==void 0?Ee(Ee({},Y.type.defaultProps),Y.props):Y.props,$=W.dataKey,X=W.maxBarSize,ee=W["".concat(U,"Id")],oe=W["".concat(P,"Id")],ue={},ye=f.reduce(function(qe,Ue){var Ve=S["".concat(Ue.axisType,"Map")],me=W["".concat(Ue.axisType,"Id")];Ve&&Ve[me]||Ue.axisType==="zAxis"||uu();var Ge=Ve[me];return Ee(Ee({},qe),{},yn(yn({},Ue.axisType,Ge),"".concat(Ue.axisType,"Ticks"),Lo(Ge)))},ue),ae=ye[P],le=ye["".concat(P,"Ticks")],Se=T&&T[ee]&&T[ee].hasStack&&Jwe(Y,T[ee].stackGroups),ne=qo(Y.type).indexOf("Bar")>=0,$e=i1(ae,le),ve=[],xe=z&&zwe({barSize:F,stackGroups:T,totalSize:I6e(ye,P)});if(ne){var De,we,re=In(X)?G:X,ke=(De=(we=i1(ae,le,!0))!==null&&we!==void 0?we:re)!==null&&De!==void 0?De:0;ve=Lwe({barGap:L,barCategoryGap:B,bandSize:ke!==$e?ke:$e,sizeList:xe[oe],maxBarSize:re}),ke!==$e&&(ve=ve.map(function(qe){return Ee(Ee({},qe),{},{position:Ee(Ee({},qe.position),{},{offset:qe.position.offset-ke/2})})}))}var Ie=Y&&Y.type&&Y.type.getComposedData;Ie&&q.push({props:Ee(Ee({},Ie(Ee(Ee({},ye),{},{displayedData:V,props:_,dataKey:$,item:Y,bandSize:$e,barPosition:ve,offset:A,stackedData:Se,layout:R,dataStartIndex:j,dataEndIndex:N}))),{},yn(yn(yn({key:Y.key||"item-".concat(D)},U,ye[U]),P,ye[P]),"animationId",M)),childIndex:Bme(Y,_.children),item:Y})}),q},v=function(_,S){var C=_.props,T=_.dataStartIndex,A=_.dataEndIndex,M=_.updateId;if(!B8({props:C}))return null;var j=C.children,N=C.layout,F=C.stackOffset,R=C.data,L=C.reverseStackOrder,B=d$(N),G=B.numericAxisName,H=B.cateAxisName,U=sa(j,i),P=Xwe(R,U,"".concat(G,"Id"),"".concat(H,"Id"),F,L),z=f.reduce(function(W,$){var X="".concat($.axisType,"Map");return Ee(Ee({},W),{},yn({},X,N6e(C,Ee(Ee({},$),{},{graphicalItems:U,stackGroups:$.axisType===G&&P,dataStartIndex:T,dataEndIndex:A}))))},{}),q=L6e(Ee(Ee({},z),{},{props:C,graphicalItems:U}),S==null?void 0:S.legendBBox);Object.keys(z).forEach(function(W){z[W]=h(C,z[W],q,W.replace("Map",""),t)});var Y=z["".concat(H,"Map")],D=$6e(Y),V=p(C,Ee(Ee({},z),{},{dataStartIndex:T,dataEndIndex:A,updateId:M,graphicalItems:U,stackGroups:P,offset:q}));return Ee(Ee({formattedGraphicalItems:V,graphicalItems:U,offset:q,stackGroups:P},D),z)},y=(function(w){function _(S){var C,T,A;return y6e(this,_),A=k6e(this,_,[S]),yn(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),yn(A,"accessibilityManager",new r6e),yn(A,"handleLegendBBoxUpdate",function(M){if(M){var j=A.state,N=j.dataStartIndex,F=j.dataEndIndex,R=j.updateId;A.setState(Ee({legendBBox:M},v({props:A.props,dataStartIndex:N,dataEndIndex:F,updateId:R},Ee(Ee({},A.state),{},{legendBBox:M}))))}}),yn(A,"handleReceiveSyncEvent",function(M,j,N){if(A.props.syncId===M){if(N===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(j)}}),yn(A,"handleBrushChange",function(M){var j=M.startIndex,N=M.endIndex;if(j!==A.state.dataStartIndex||N!==A.state.dataEndIndex){var F=A.state.updateId;A.setState(function(){return Ee({dataStartIndex:j,dataEndIndex:N},v({props:A.props,dataStartIndex:j,dataEndIndex:N,updateId:F},A.state))}),A.triggerSyncEvent({dataStartIndex:j,dataEndIndex:N})}}),yn(A,"handleMouseEnter",function(M){var j=A.getMouseInfo(M);if(j){var N=Ee(Ee({},j),{},{isTooltipActive:!0});A.setState(N),A.triggerSyncEvent(N);var F=A.props.onMouseEnter;jn(F)&&F(N,M)}}),yn(A,"triggeredAfterMouseMove",function(M){var j=A.getMouseInfo(M),N=j?Ee(Ee({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(N),A.triggerSyncEvent(N);var F=A.props.onMouseMove;jn(F)&&F(N,M)}),yn(A,"handleItemMouseEnter",function(M){A.setState(function(){return{isTooltipActive:!0,activeItem:M,activePayload:M.tooltipPayload,activeCoordinate:M.tooltipPosition||{x:M.cx,y:M.cy}}})}),yn(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),yn(A,"handleMouseMove",function(M){M.persist(),A.throttleTriggeredAfterMouseMove(M)}),yn(A,"handleMouseLeave",function(M){A.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};A.setState(j),A.triggerSyncEvent(j);var N=A.props.onMouseLeave;jn(N)&&N(j,M)}),yn(A,"handleOuterEvent",function(M){var j=Ime(M),N=oa(A.props,"".concat(j));if(j&&jn(N)){var F,R;/.*touch.*/i.test(j)?R=A.getMouseInfo(M.changedTouches[0]):R=A.getMouseInfo(M),N((F=R)!==null&&F!==void 0?F:{},M)}}),yn(A,"handleClick",function(M){var j=A.getMouseInfo(M);if(j){var N=Ee(Ee({},j),{},{isTooltipActive:!0});A.setState(N),A.triggerSyncEvent(N);var F=A.props.onClick;jn(F)&&F(N,M)}}),yn(A,"handleMouseDown",function(M){var j=A.props.onMouseDown;if(jn(j)){var N=A.getMouseInfo(M);j(N,M)}}),yn(A,"handleMouseUp",function(M){var j=A.props.onMouseUp;if(jn(j)){var N=A.getMouseInfo(M);j(N,M)}}),yn(A,"handleTouchMove",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(M.changedTouches[0])}),yn(A,"handleTouchStart",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&A.handleMouseDown(M.changedTouches[0])}),yn(A,"handleTouchEnd",function(M){M.changedTouches!=null&&M.changedTouches.length>0&&A.handleMouseUp(M.changedTouches[0])}),yn(A,"handleDoubleClick",function(M){var j=A.props.onDoubleClick;if(jn(j)){var N=A.getMouseInfo(M);j(N,M)}}),yn(A,"handleContextMenu",function(M){var j=A.props.onContextMenu;if(jn(j)){var N=A.getMouseInfo(M);j(N,M)}}),yn(A,"triggerSyncEvent",function(M){A.props.syncId!==void 0&&N3.emit($3,A.props.syncId,M,A.eventEmitterSymbol)}),yn(A,"applySyncEvent",function(M){var j=A.props,N=j.layout,F=j.syncMethod,R=A.state.updateId,L=M.dataStartIndex,B=M.dataEndIndex;if(M.dataStartIndex!==void 0||M.dataEndIndex!==void 0)A.setState(Ee({dataStartIndex:L,dataEndIndex:B},v({props:A.props,dataStartIndex:L,dataEndIndex:B,updateId:R},A.state)));else if(M.activeTooltipIndex!==void 0){var G=M.chartX,H=M.chartY,U=M.activeTooltipIndex,P=A.state,z=P.offset,q=P.tooltipTicks;if(!z)return;if(typeof F=="function")U=F(q,M);else if(F==="value"){U=-1;for(var Y=0;Y=0){var Se,ne;if(G.dataKey&&!G.allowDuplicatedCategory){var $e=typeof G.dataKey=="function"?le:"payload.".concat(G.dataKey.toString());Se=Eg(Y,$e,U),ne=D&&V&&Eg(V,$e,U)}else Se=Y==null?void 0:Y[H],ne=D&&V&&V[H];if(oe||ee){var ve=M.props.activeIndex!==void 0?M.props.activeIndex:H;return[O.cloneElement(M,Ee(Ee(Ee({},F.props),ye),{},{activeIndex:ve})),null,null]}if(!In(Se))return[ae].concat(cc(A.renderActivePoints({item:F,activePoint:Se,basePoint:ne,childIndex:H,isRange:D})))}else{var xe,De=(xe=A.getItemByXY(A.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:ae},we=De.graphicalItem,re=we.item,ke=re===void 0?M:re,Ie=we.childIndex,qe=Ee(Ee(Ee({},F.props),ye),{},{activeIndex:Ie});return[O.cloneElement(ke,qe),null,null]}return D?[ae,null,null]:[ae,null]}),yn(A,"renderCustomized",function(M,j,N){return O.cloneElement(M,Ee(Ee({key:"recharts-customized-".concat(N)},A.props),A.state))}),yn(A,"renderMap",{CartesianGrid:{handler:Iv,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Iv},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Iv},YAxis:{handler:Iv},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((C=S.id)!==null&&C!==void 0?C:$c("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=LH(A.triggeredAfterMouseMove,(T=S.throttleDelay)!==null&&T!==void 0?T:1e3/60),A.state={},A}return S6e(_,w),w6e(_,[{key:"componentDidMount",value:function(){var C,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var C=this.props,T=C.children,A=C.data,M=C.height,j=C.layout,N=Dr(T,na);if(N){var F=N.props.defaultIndex;if(!(typeof F!="number"||F<0||F>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[F]&&this.state.tooltipTicks[F].value,L=K4(this.state,A,F,R),B=this.state.tooltipTicks[F].coordinate,G=(this.state.offset.top+M)/2,H=j==="horizontal",U=H?{x:B,y:G}:{y:B,x:G},P=this.state.formattedGraphicalItems.find(function(q){var Y=q.item;return Y.type.name==="Scatter"});P&&(U=Ee(Ee({},U),P.props.points[F].tooltipPosition),L=P.props.points[F].tooltipPayload);var z={activeTooltipIndex:F,isTooltipActive:!0,activeLabel:R,activePayload:L,activeCoordinate:U};this.setState(z),this.renderCursor(N),this.accessibilityManager.setIndex(F)}}}},{key:"getSnapshotBeforeUpdate",value:function(C,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==C.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==C.margin){var A,M;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(M=this.props.margin.top)!==null&&M!==void 0?M:0}})}return null}},{key:"componentDidUpdate",value:function(C){PS([Dr(C.children,na)],[Dr(this.props.children,na)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=Dr(this.props.children,na);if(C&&typeof C.props.shared=="boolean"){var T=C.props.shared?"axis":"item";return l.indexOf(T)>=0?T:a}return a}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var T=this.container,A=T.getBoundingClientRect(),M=A1e(A),j={chartX:Math.round(C.pageX-M.left),chartY:Math.round(C.pageY-M.top)},N=A.width/T.offsetWidth||1,F=this.inRange(j.chartX,j.chartY,N);if(!F)return null;var R=this.state,L=R.xAxisMap,B=R.yAxisMap,G=this.getTooltipEventType(),H=f$(this.state,this.props.data,this.props.layout,F);if(G!=="axis"&&L&&B){var U=Us(L).scale,P=Us(B).scale,z=U&&U.invert?U.invert(j.chartX):null,q=P&&P.invert?P.invert(j.chartY):null;return Ee(Ee({},j),{},{xValue:z,yValue:q},H)}return H?Ee(Ee({},j),H):null}},{key:"inRange",value:function(C,T){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,M=this.props.layout,j=C/A,N=T/A;if(M==="horizontal"||M==="vertical"){var F=this.state.offset,R=j>=F.left&&j<=F.left+F.width&&N>=F.top&&N<=F.top+F.height;return R?{x:j,y:N}:null}var L=this.state,B=L.angleAxisMap,G=L.radiusAxisMap;if(B&&G){var H=Us(B);return EP({x:j,y:N},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,T=this.getTooltipEventType(),A=Dr(C,na),M={};A&&T==="axis"&&(A.props.trigger==="click"?M={onClick:this.handleClick}:M={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=Tg(this.props,this.handleOuterEvent);return Ee(Ee({},j),M)}},{key:"addListener",value:function(){N3.on($3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){N3.removeListener($3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,T,A){for(var M=this.state.formattedGraphicalItems,j=0,N=M.length;j({root:{"--chart-text-color":n?et(n,e):void 0,"--chart-grid-color":t?et(t,e):void 0,"--chart-cursor-fill":i?et(i,e):void 0,"--chart-bar-label-color":r?et(r,e):void 0}});function V6e(e,n){let t=0,i=0;return e.map(r=>{if(r.standalone)for(const a in r)typeof r[a]=="number"&&a!==n&&(r[a]=[0,r[a]]);else for(const a in r)typeof r[a]=="number"&&a!==n&&(i+=r[a],r[a]=[t,i],t=i);return r})}function W6e(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const Xl=je(e=>{const n=be("BarChart",U6e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:y,withXAxis:b,withYAxis:w,gridAxis:_,tickLine:S,xAxisProps:C,yAxisProps:T,unit:A,tooltipAnimationDuration:M,strokeDasharray:j,gridProps:N,tooltipProps:F,referenceLines:R,fillOpacity:L,barChartProps:B,type:G,orientation:H,dir:U,valueFormatter:P,children:z,barProps:q,xAxisLabel:Y,yAxisLabel:D,withBarValueLabel:V,valueLabelProps:W,withRightYAxis:$,rightYAxisLabel:X,rightYAxisProps:ee,minBarSize:oe,maxBarWidth:ue,mod:ye,getBarColor:ae,gridColor:le,textColor:Se,attributes:ne,...$e}=n,ve=ti(),xe=_!=="none"&&(S==="x"||S==="xy"),De=_!=="none"&&(S==="y"||S==="xy"),[we,re]=O.useState(null),ke=we!==null,Ie=G==="stacked"||G==="percent",qe=G==="percent"?H6e:P,Ue=Ce=>{re(null),p==null||p(Ce)},{resolvedClassNames:Ve,resolvedStyles:me}=Ni({classNames:t,styles:a,props:n}),Ge=G==="waterfall"?V6e(f,v):f,te=We({name:"BarChart",classes:Qy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:YV}),pe=d.map(Ce=>{const Qe=et(Ce.color,ve),ln=ke&&we!==Ce.name,En=typeof q=="function"?q(Ce):q,hn=En==null?void 0:En.shape;return O.createElement(Eu,{...te("bar"),key:Ce.name,name:Ce.name,dataKey:Ce.name,fill:Qe,stroke:Qe,isAnimationActive:!1,fillOpacity:ln?.1:L,strokeOpacity:ln?.2:0,stackId:Ie?"stack":Ce.stackId||void 0,yAxisId:Ce.yAxisId||void 0,minPointSize:oe,...En,shape:rn=>{const Je=rn.payload,zn=Je!=null&&Je.color?et(Je.color,ve):typeof ae=="function"?et(ae(Je==null?void 0:Je[Ce.name],Ce),ve):W6e(q,Ce)||Qe,un={...rn,fill:zn};return typeof hn=="function"?hn(un):Z.isValidElement(hn)?Z.cloneElement(hn,un):typeof hn=="object"&&hn?k.jsx(um,{...un,...hn}):k.jsx(um,{...un})}},V&&k.jsx(Qa,{position:H==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:rn=>qe==null?void 0:qe(rn),...typeof W=="function"?W(Ce):W}))}),He=R==null?void 0:R.map((Ce,Qe)=>{const ln=et(Ce.color,ve);return k.jsx(Jm,{stroke:Ce.color?ln:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Ce.yAxisId||void 0,...Ce,label:{fill:Ce.color?ln:"currentColor",fontSize:12,position:Ce.labelPosition??"insideBottomLeft",...typeof Ce.label=="object"?Ce.label:{value:Ce.label}},...te("referenceLine")},Qe)}),Ye={axisLine:!1,...H==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:De?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:H==="vertical"?void 0:qe,...te("axis")};return k.jsx(_e,{...te("root"),onMouseLeave:Ue,dir:U||"ltr",mod:[{orientation:H},ye],...$e,children:k.jsx(C9,{...te("container"),children:k.jsxs(F6e,{data:Ge,stackOffset:G==="percent"?"expand":void 0,layout:H,maxBarSize:ue,margin:{bottom:Y?30:void 0,left:D?10:void 0,right:D?5:void 0},...B,children:[c&&k.jsx(Uo,{verticalAlign:"top",content:Ce=>k.jsx(Zy,{payload:Ce.payload,onHighlight:re,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ve,styles:me,series:d,showColor:G!=="waterfall",attributes:ne}),...h}),k.jsxs(ml,{hide:!b,...H==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:xe?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:H==="vertical"?qe:void 0,...te("axis"),...C,children:[Y&&k.jsx(Xt,{position:"insideBottom",offset:-20,fontSize:12,...te("axisLabel"),children:Y}),C==null?void 0:C.children]}),k.jsxs(ao,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!w,...Ye,...T,children:[D&&k.jsx(Xt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...te("axisLabel"),children:D}),T==null?void 0:T.children]}),k.jsxs(ao,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!$,...Ye,...ee,children:[X&&k.jsx(Xt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...te("axisLabel"),children:X}),T==null?void 0:T.children]}),k.jsx(E0,{strokeDasharray:j,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...te("grid"),...N}),y&&k.jsx(na,{animationDuration:M,isAnimationActive:M!==0,position:H==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:j,fill:"var(--chart-cursor-fill)"},content:({label:Ce,payload:Qe,labelFormatter:ln})=>k.jsx(t9,{label:ln&&Qe?ln(Ce,Qe):Ce,payload:Qe,type:G==="waterfall"?"scatter":void 0,unit:A,classNames:Ve,styles:me,series:d,valueFormatter:P,attributes:ne}),...F}),pe,He,z]})})})});Xl.displayName="@mantine/charts/BarChart";Xl.classes=Qy;Xl.varsResolver=YV;const G6e={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},KV=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?et(n,e):void 0,"--chart-grid-color":t?et(t,e):void 0}}),M0=je(e=>{const n=be("LineChart",G6e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:y,withXAxis:b,withYAxis:w,gridAxis:_,tickLine:S,xAxisProps:C,yAxisProps:T,unit:A,tooltipAnimationDuration:M,strokeDasharray:j,gridProps:N,tooltipProps:F,referenceLines:R,withDots:L,dotProps:B,activeDotProps:G,strokeWidth:H,lineChartProps:U,connectNulls:P,fillOpacity:z,curveType:q,orientation:Y,dir:D,valueFormatter:V,children:W,lineProps:$,xAxisLabel:X,yAxisLabel:ee,type:oe,gradientStops:ue,withRightYAxis:ye,rightYAxisLabel:ae,rightYAxisProps:le,withPointLabels:Se,attributes:ne,gridColor:$e,...ve}=n,xe=ti(),De=_!=="none"&&(S==="x"||S==="xy"),we=_!=="none"&&(S==="y"||S==="xy"),[re,ke]=O.useState(null),Ie=re!==null,qe=Ce=>{ke(null),p==null||p(Ce)},{resolvedClassNames:Ue,resolvedStyles:Ve}=Ni({classNames:t,styles:a,props:n}),me=We({name:"LineChart",classes:Qy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:KV}),Ge=`line-chart-gradient-${Gi()}`,te=ue==null?void 0:ue.map(Ce=>k.jsx("stop",{offset:`${Ce.offset}%`,stopColor:et(Ce.color,xe)},Ce.color)),pe=d.map(Ce=>{const Qe=et(Ce.color,xe),ln=Ie&&re!==Ce.name;return O.createElement(ep,{...me("line"),key:Ce.name,name:Ce.name,dataKey:Ce.name,dot:L?{fillOpacity:ln?0:1,strokeOpacity:ln?0:1,strokeWidth:1,fill:oe==="gradient"?"var(--mantine-color-gray-7)":Qe,stroke:oe==="gradient"?"white":Qe,...B}:!1,activeDot:L?{fill:oe==="gradient"?"var(--mantine-color-gray-7)":Qe,stroke:oe==="gradient"?"white":Qe,...G}:!1,fill:Qe,stroke:oe==="gradient"?`url(#${Ge})`:Qe,strokeWidth:H,isAnimationActive:!1,fillOpacity:ln?0:z,strokeOpacity:ln?.5:z,connectNulls:P,type:Ce.curveType??q,strokeDasharray:Ce.strokeDasharray,yAxisId:Ce.yAxisId||void 0,label:Se?k.jsx(Ihe,{valueFormatter:V}):void 0,...typeof $=="function"?$(Ce):$})}),He=R==null?void 0:R.map((Ce,Qe)=>{const ln=et(Ce.color,xe);return k.jsx(Jm,{stroke:Ce.color?ln:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Ce.yAxisId||void 0,...Ce,label:{fill:Ce.color?ln:"currentColor",fontSize:12,position:Ce.labelPosition??"insideBottomLeft",...typeof Ce.label=="object"?Ce.label:{value:Ce.label}},...me("referenceLine")},Qe)}),Ye={axisLine:!1,...Y==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:we?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:Y==="vertical"?void 0:V,...me("axis")};return k.jsx(_e,{...me("root"),onMouseLeave:qe,dir:D||"ltr",...ve,children:k.jsx(C9,{...me("container"),children:k.jsxs(B6e,{data:f,layout:Y,margin:{bottom:X?30:void 0,left:ee?10:void 0,right:ee?5:void 0},...U,children:[oe==="gradient"&&k.jsx("defs",{children:k.jsx("linearGradient",{id:Ge,x1:"0",y1:"0",x2:"0",y2:"1",children:te})}),c&&k.jsx(Uo,{verticalAlign:"top",content:Ce=>k.jsx(Zy,{payload:Ce.payload,onHighlight:ke,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ue,styles:Ve,series:d,showColor:oe!=="gradient",attributes:ne}),...h}),k.jsxs(ml,{hide:!b,...Y==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:De?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?V:void 0,...me("axis"),...C,children:[X&&k.jsx(Xt,{position:"insideBottom",offset:-20,fontSize:12,...me("axisLabel"),children:X}),C==null?void 0:C.children]}),k.jsxs(ao,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!w,...Ye,...T,children:[ee&&k.jsx(Xt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...me("axisLabel"),children:ee}),T==null?void 0:T.children]}),k.jsxs(ao,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!ye,...Ye,...le,children:[ae&&k.jsx(Xt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...me("axisLabel"),children:ae}),T==null?void 0:T.children]}),k.jsx(E0,{strokeDasharray:j,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...me("grid"),...N}),y&&k.jsx(na,{animationDuration:M,isAnimationActive:M!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:j},content:({label:Ce,payload:Qe,labelFormatter:ln})=>k.jsx(t9,{label:ln&&Qe?ln(Ce,Qe):Ce,payload:Qe,unit:A,classNames:Ue,styles:Ve,series:d,valueFormatter:V,showColor:oe!=="gradient",attributes:ne}),...F}),pe,He,W]})})})});M0.displayName="@mantine/charts/LineChart";M0.classes=Qy;M0.varsResolver=KV;const X4=6e4,oh=60*X4,Af=24*oh,Bv=7*Af,L3=30*Af;function ia(e){if(!Number.isFinite(e)||e<0)return"0m";if(eze().subtract(30,"day").toDate()),[i,r]=O.useState(()=>new Date),[a,o]=O.useState(null),[l,f]=O.useState(null),[c,h]=O.useState([]),[d,p]=O.useState([]),[v,y]=O.useState(null),[b,w]=O.useState(!1),[_,S]=O.useState([]);O.useEffect(()=>{wB().then(p).catch(()=>{})},[]),O.useEffect(()=>{let R=!1;return w(!0),kB({from:h$(n),to:h$(i),assignee_id:a||void 0,requester:l||void 0,tags:c.length>0?c:void 0}).then(L=>{R||(y(L),S(B=>{const G=new Set(B);for(const H of L.top_requesters??[])G.add(H.requester);return Array.from(G).sort()}))}).catch(()=>{}).finally(()=>{R||w(!1)}),()=>{R=!0}},[n,i,a,l,c]);const C=O.useMemo(()=>e.map(R=>({value:R.id,label:R.display_name||R.username})),[e]),T=O.useMemo(()=>{if(!v)return[];const R=v.cumulative_flow??[],L=R.findIndex(G=>G.total>0||G.done>0);return(L<=0?R:R.slice(Math.max(0,L-1))).map(G=>({date:G.date,done:G.done,wip:Math.max(0,G.total-G.done),total:G.total}))},[v]),A=O.useMemo(()=>{if(!v)return[];const R=new Map;for(const L of v.throughput_daily??[])R.set(L.date,{date:L.date,completed:L.count,created:0});for(const L of v.created_daily??[]){const B=R.get(L.date)??{date:L.date,completed:0,created:0};B.created=L.count,R.set(L.date,B)}return Array.from(R.values()).sort((L,B)=>L.date.localeCompare(B.date))},[v]),M=O.useMemo(()=>v?(v.by_column??[]).map(R=>({column:R.name+(R.is_done?" ✓":""),tarjetas:R.count})):[],[v]),j=O.useMemo(()=>v?(v.top_assignees??[]).slice().sort((R,L)=>L.completed_in_range+L.active-(R.completed_in_range+R.active)).slice(0,8).map(R=>({usuario:R.display_name||R.username,completadas:R.completed_in_range,activas:R.active})):[],[v]),N=O.useMemo(()=>v?(v.top_requesters??[]).map(R=>({solicitante:R.requester,activas:R.active,completadas:R.completed_in_range})):[],[v]),F=O.useMemo(()=>v?(v.movements_by_user??[]).filter(R=>R.moves>0).slice(0,8).map(R=>({usuario:R.display_name||R.username,movimientos:R.moves})):[],[v]);return k.jsx(_e,{p:"md",children:k.jsxs(Ut,{gap:"md",children:[k.jsxs(wn,{justify:"space-between",children:[k.jsx(bu,{order:3,children:"Dashboard"}),k.jsxs(wn,{gap:"xs",wrap:"nowrap",children:[k.jsx(Bf,{label:"Desde",value:n,onChange:R=>t(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),k.jsx(Bf,{label:"Hasta",value:i,onChange:R=>r(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),k.jsx(Ko,{label:"Asignado",size:"xs",placeholder:"Todos",value:a,onChange:o,data:C,clearable:!0,searchable:!0,style:{minWidth:160}}),k.jsx(Ko,{label:"Solicitante",size:"xs",placeholder:"Todos",value:l,onChange:f,data:_.map(R=>({value:R,label:R})),clearable:!0,searchable:!0,style:{minWidth:160}}),k.jsx(wy,{label:"Tags",size:"xs",placeholder:"Todas",value:c,onChange:h,data:d,clearable:!0,searchable:!0,style:{minWidth:200}})]})]}),b&&!v&&k.jsx(wc,{p:"xl",children:k.jsx(tr,{})}),v&&(()=>{const R=v.totals??{},L=v.lead_time??{n:0,p50_ms:0,p90_ms:0},B=G=>R[G]??0;return k.jsxs(k.Fragment,{children:[k.jsxs(Mh,{cols:{base:2,md:5},spacing:"md",children:[k.jsx(Kd,{icon:k.jsx(LM,{size:14}),label:"Totales",value:B("cards"),hint:`${B("columns")} columnas, ${B("users")} usuarios`}),k.jsx(Kd,{icon:k.jsx(LM,{size:14}),label:"Activas",value:B("cards_active"),hint:"Sin completar",color:"blue"}),k.jsx(Kd,{icon:k.jsx(Ph,{size:14}),label:"Completadas (rango)",value:B("cards_completed_in_range"),hint:`${B("cards_done")} completadas total · ${B("cards_created_in_range")} creadas rango`,color:"green"}),k.jsx(Kd,{icon:k.jsx(coe,{size:14}),label:"Lead time p50",value:L.n>0?ia(L.p50_ms):0,hint:`p90 ${L.n>0?ia(L.p90_ms):0} · n=${L.n}`}),k.jsx(Kd,{icon:k.jsx(Ul,{size:14}),label:"Bloqueos activos",value:B("active_locks"),hint:`Total bloqueado: ${ia(v.lock_total_ms??0)}`,color:B("active_locks")>0?"yellow":void 0})]}),k.jsxs(ni,{withBorder:!0,p:"md",radius:"md",children:[k.jsxs(wn,{gap:6,mb:"sm",children:[k.jsx(BM,{size:16}),k.jsx(cn,{fw:600,children:"Cumulative Flow Diagram"}),k.jsx(cn,{size:"xs",c:"dimmed",children:"total vs hechas (acumulado)"})]}),T.length===0?k.jsx(cn,{c:"dimmed",size:"sm",children:"Sin datos."}):k.jsx("div",{style:{height:260,width:"100%"},children:k.jsx(C9,{width:"100%",height:"100%",children:k.jsxs(q6e,{data:T,margin:{top:10,right:16,left:0,bottom:0},children:[k.jsx(E0,{strokeDasharray:"5 5",stroke:"var(--mantine-color-gray-4)"}),k.jsx(ml,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),k.jsx(ao,{allowDecimals:!1,tick:{fontSize:12,fill:"currentColor"}}),k.jsx(na,{contentStyle:{background:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-gray-3)",borderRadius:6,fontSize:12}}),k.jsx(Uo,{wrapperStyle:{fontSize:12}}),k.jsx(Jo,{type:"linear",dataKey:"done",name:"Hechas",stackId:"cfd",stroke:"var(--mantine-color-green-6)",fill:"var(--mantine-color-green-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-green-6)",strokeWidth:0},activeDot:{r:5}}),k.jsx(Jo,{type:"linear",dataKey:"wip",name:"En curso",stackId:"cfd",stroke:"var(--mantine-color-blue-6)",fill:"var(--mantine-color-blue-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-blue-6)",strokeWidth:0},activeDot:{r:5}})]})})})]}),k.jsxs(jr,{children:[k.jsx(jr.Col,{span:{base:12,md:8},children:k.jsxs(ni,{withBorder:!0,p:"md",radius:"md",children:[k.jsxs(wn,{gap:6,mb:"sm",children:[k.jsx(BM,{size:16}),k.jsx(cn,{fw:600,children:"Throughput diario"})]}),A.length===0?k.jsx(cn,{c:"dimmed",size:"sm",children:"Sin datos en el rango."}):k.jsx(M0,{h:240,data:A,dataKey:"date",curveType:"monotone",withLegend:!0,series:[{name:"completed",label:"Completadas",color:"green.6"},{name:"created",label:"Creadas",color:"blue.6"}]})]})}),k.jsx(jr.Col,{span:{base:12,md:4},children:k.jsxs(ni,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(cn,{fw:600,mb:"sm",children:"Tarjetas por columna"}),M.length===0?k.jsx(cn,{c:"dimmed",size:"sm",children:"Sin columnas."}):k.jsx(Xl,{h:240,data:M,dataKey:"column",orientation:"vertical",yAxisProps:{width:100},series:[{name:"tarjetas",label:"Tarjetas",color:"blue.6"}]})]})})]}),k.jsxs(jr,{children:[k.jsx(jr.Col,{span:{base:12,md:6},children:k.jsxs(ni,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(cn,{fw:600,mb:"sm",children:"Top asignados"}),j.length===0?k.jsx(cn,{c:"dimmed",size:"sm",children:"Sin asignaciones."}):k.jsx(Xl,{h:240,data:j,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"blue.6"}],type:"stacked"})]})}),k.jsx(jr.Col,{span:{base:12,md:6},children:k.jsxs(ni,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(cn,{fw:600,mb:"sm",children:"Top solicitantes"}),N.length===0?k.jsx(cn,{c:"dimmed",size:"sm",children:"Sin solicitantes en el rango."}):k.jsx(Xl,{h:Math.max(240,N.length*32),data:N,dataKey:"solicitante",orientation:"vertical",yAxisProps:{width:160,interval:0},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"violet.6"}],type:"stacked"})]})})]}),k.jsxs(jr,{children:[k.jsx(jr.Col,{span:{base:12,md:6},children:k.jsxs(ni,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(cn,{fw:600,mb:"sm",children:"Movimientos por usuario (rango)"}),F.length===0?k.jsx(cn,{c:"dimmed",size:"sm",children:"Sin movimientos registrados."}):k.jsx(Xl,{h:240,data:F,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},series:[{name:"movimientos",label:"Movimientos",color:"orange.6"}]})]})}),k.jsx(jr.Col,{span:{base:12,md:6},children:k.jsxs(ni,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(cn,{fw:600,mb:"sm",children:"Tiempo en columna (cycle time)"}),k.jsxs(kt,{striped:!0,highlightOnHover:!0,withTableBorder:!0,withColumnBorders:!0,fz:"xs",children:[k.jsx(kt.Thead,{children:k.jsxs(kt.Tr,{children:[k.jsx(kt.Th,{children:"Columna"}),k.jsx(kt.Th,{children:"n"}),k.jsx(kt.Th,{children:"p50"}),k.jsx(kt.Th,{children:"p90"}),k.jsx(kt.Th,{children:"avg"})]})}),k.jsx(kt.Tbody,{children:(v.cycle_time_per_column??[]).map(G=>k.jsxs(kt.Tr,{children:[k.jsx(kt.Td,{children:k.jsxs(wn,{gap:6,wrap:"nowrap",children:[k.jsx(cn,{size:"xs",fw:500,children:G.name}),G.is_done&&k.jsx(gi,{size:"xs",color:"green",variant:"light",children:"done"})]})}),k.jsx(kt.Td,{children:G.stats.n}),k.jsx(kt.Td,{children:G.stats.n>0?ia(G.stats.p50_ms):"—"}),k.jsx(kt.Td,{children:G.stats.n>0?ia(G.stats.p90_ms):"—"}),k.jsx(kt.Td,{children:G.stats.n>0?ia(G.stats.avg_ms):"—"})]},G.column_id))})]})]})})]})]})})()]})})}function X6e(e){try{return JSON.parse(e)}catch{return{}}}function Z6e(e){const n=X6e(e.payload);switch(e.kind){case"created":return{id:e.id,ts:e.created_at,kind:"Creada",actorID:e.actor_id,detail:String(n.title||""),icon:k.jsx(Nh,{size:12}),color:"green"};case"title_changed":return{id:e.id,ts:e.created_at,kind:"Titulo",actorID:e.actor_id,detail:`"${n.old}" → "${n.new}"`,icon:k.jsx(nh,{size:12}),color:"blue"};case"requester_changed":return{id:e.id,ts:e.created_at,kind:"Solicitante",actorID:e.actor_id,detail:`"${n.old||"(vacio)"}" → "${n.new||"(vacio)"}"`,icon:k.jsx(nh,{size:12}),color:"orange"};case"description_changed":return{id:e.id,ts:e.created_at,kind:"Descripcion",actorID:e.actor_id,detail:"edicion",icon:k.jsx(nh,{size:12}),color:"blue"};case"color_changed":return{id:e.id,ts:e.created_at,kind:"Color",actorID:e.actor_id,detail:String(n.color||""),icon:k.jsx(zC,{size:12}),color:"violet"};case"tags_changed":return{id:e.id,ts:e.created_at,kind:"Tags",actorID:e.actor_id,detail:Array.isArray(n.tags)?n.tags.join(", ")||"(sin tags)":"",icon:k.jsx(Foe,{size:12}),color:"grape"};case"assigned":return{id:e.id,ts:e.created_at,kind:"Asignada",actorID:e.actor_id,detail:String(n.assignee_id||""),icon:k.jsx(Zoe,{size:12}),color:"teal"};case"unassigned":return{id:e.id,ts:e.created_at,kind:"Sin asignar",actorID:e.actor_id,detail:"",icon:k.jsx(Koe,{size:12}),color:"gray"};default:return{id:e.id,ts:e.created_at,kind:e.kind,actorID:e.actor_id,detail:e.payload,icon:k.jsx(nh,{size:12}),color:"gray"}}}function Q6e({card:e}){const[n,t]=O.useState(null),[i,r]=O.useState([]);O.useEffect(()=>{nie(e.id).then(t).catch(()=>t({column_history:[],lock_periods:[],events:[],total_locked_ms:0,currently_locked:!1})),bB().then(r).catch(()=>{})},[e.id]);const a=O.useMemo(()=>{const d=new Map;for(const p of i)d.set(p.id,p);return d},[i]),o=O.useMemo(()=>{if(!n)return[];const d=[];for(const p of n.events||[])d.push(Z6e(p));for(const p of n.column_history||[])d.push({id:"h_in_"+p.id,ts:p.entered_at,kind:"Mueve a columna",actorID:p.actor_id,detail:p.column_name||p.column_id,icon:k.jsx(eoe,{size:12}),color:"blue"});for(const p of n.lock_periods||[])d.push({id:"lk_"+p.id,ts:p.locked_at,kind:"Bloqueada",actorID:p.actor_id,detail:"",icon:k.jsx(Ul,{size:12}),color:"yellow"}),p.unlocked_at&&d.push({id:"lku_"+p.id,ts:p.unlocked_at,kind:"Desbloqueada",actorID:p.actor_id,detail:ia(p.duration_ms),icon:k.jsx(MF,{size:12}),color:"yellow"});return d.sort((p,v)=>p.ts.localeCompare(v.ts))},[n]);if(!n)return k.jsx(wn,{justify:"center",p:"xl",children:k.jsx(tr,{size:"sm"})});const{column_history:l,total_locked_ms:f,currently_locked:c}=n;if(o.length===0)return k.jsx(cn,{c:"dimmed",children:"Sin historial."});const h=d=>{if(!d)return"";const p=a.get(d);return p?p.display_name||p.username:d};return k.jsxs(Ut,{gap:"md",children:[k.jsx(cn,{size:"sm",c:"dimmed",children:"Linea de tiempo completa de la tarjeta."}),k.jsx(If,{active:o.length,bulletSize:22,lineWidth:2,children:o.map(d=>k.jsx(If.Item,{bullet:d.icon,color:d.color,title:k.jsxs(wn,{gap:6,wrap:"wrap",children:[k.jsx(cn,{fw:500,size:"sm",children:d.kind}),d.actorID&&k.jsx(gi,{size:"xs",variant:"light",color:"cyan",leftSection:k.jsx(nse,{size:10}),children:h(d.actorID)}),d.detail&&k.jsx(gi,{size:"xs",variant:"outline",color:d.color,children:d.detail})]}),children:k.jsx(cn,{size:"xs",c:"dimmed",children:new Date(d.ts).toLocaleString()})},d.id))}),k.jsx(fy,{}),k.jsxs(wn,{gap:6,align:"center",children:[k.jsx(moe,{size:14}),k.jsx(cn,{fw:500,size:"sm",children:"Columnas visitadas"}),k.jsx(gi,{size:"xs",variant:"light",color:"gray",children:l.length}),k.jsx(Ul,{size:14,color:"var(--mantine-color-yellow-6)"}),k.jsx(gi,{size:"xs",variant:"light",color:f>0?"yellow":"gray",children:ia(f)}),c&&k.jsx(gi,{size:"xs",variant:"filled",color:"yellow",children:"bloqueada"})]})]})}function J6e(e,n){if(n.length===0)throw new Error("palette must not be empty");let t=0;for(let i=0;i>>0;return n[t%n.length]}const sA=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function lA(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function XV(e){return e?lA(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:sA.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-9) 18%, var(--mantine-color-dark-6))`:"var(--mantine-color-dark-6)":"var(--mantine-color-dark-6)"}function uA(e){return e?lA(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:sA.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-7) 30%, var(--mantine-color-dark-4))`:"var(--mantine-color-dark-4)":"var(--mantine-color-dark-4)"}function eCe(e){return e?lA(e)?e:sA.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const ZV=[{value:"",label:"Default"},{value:"blue",label:"Azul"},{value:"cyan",label:"Cian"},{value:"teal",label:"Teal"},{value:"green",label:"Verde"},{value:"lime",label:"Lima"},{value:"yellow",label:"Amarillo"},{value:"orange",label:"Naranja"},{value:"red",label:"Rojo"},{value:"pink",label:"Rosa"},{value:"grape",label:"Uva"},{value:"violet",label:"Violeta"},{value:"indigo",label:"Indigo"},{value:"gray",label:"Gris"},{value:"#0ea5e9",label:"Sky"},{value:"#14b8a6",label:"Esmeralda"},{value:"#84cc16",label:"Lima fluor"},{value:"#ec4899",label:"Magenta"},{value:"#a855f7",label:"Lavanda"},{value:"#f97316",label:"Mandarina"},{value:"#dc2626",label:"Rubi"},{value:"#0891b2",label:"Petroleo"},{value:"#fde047",label:"Limon"},{value:"#10b981",label:"Menta"},{value:"#fb7185",label:"Coral"},{value:"#6366f1",label:"Iris"},{value:"#94a3b8",label:"Pizarra"}],nCe=ZV,tCe=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function m$(e){return J6e(e,tCe)}const Fv=26;function QV({value:e,onChange:n,options:t=ZV,onOpenCustom:i}){const[r,a]=O.useState(!1),[o,l]=O.useState(e&&e.startsWith("#")?e:"#888888"),f=!!e&&e.startsWith("#")&&!t.some(c=>c.value===e);return k.jsxs(k.Fragment,{children:[k.jsxs(wn,{gap:6,maw:280,children:[t.map(c=>{const h=e===c.value;return k.jsx(vr,{label:c.label,withArrow:!0,children:k.jsx(_e,{role:"button",onClick:d=>{d.stopPropagation(),n(c.value)},"aria-label":c.label,style:{width:Fv,height:Fv,borderRadius:"50%",background:eCe(c.value),border:`2px solid ${h?"var(--mantine-color-white)":uA(c.value)}`,boxShadow:h?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,transition:"transform .1s"}})},c.value||"default")}),k.jsx(vr,{label:"Color personalizado",withArrow:!0,children:k.jsx(_e,{role:"button",onMouseDown:c=>{c.stopPropagation()},onClick:c=>{c.stopPropagation(),i?i():a(!0)},"aria-label":"Color personalizado",style:{width:Fv,height:Fv,borderRadius:"50%",background:f?o:"transparent",border:`2px dashed ${f?o:"var(--mantine-color-gray-5)"}`,boxShadow:f?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--mantine-color-gray-3)"},children:k.jsx(zC,{size:14})})})]}),!i&&k.jsx(Z4,{opened:r,onClose:()=>a(!1),value:o,onAccept:c=>{l(c),n(c)}})]})}const Xd=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function Z4({opened:e,onClose:n,value:t,onAccept:i}){const[r,a]=O.useState(t||"#888888"),[o,l]=O.useState(t||"#888888");O.useEffect(()=>{if(e){const d=t&&Xd.test(t)?t:"#888888";a(d),l(d)}},[e,t]);const f=d=>{let p=d.trim();p&&!p.startsWith("#")&&(p="#"+p),l(p),Xd.test(p)&&a(p)},c=d=>{a(d),l(d)},h=()=>{i(r),n()};return k.jsx($r,{opened:e,onClose:n,title:"Color personalizado",size:"auto",centered:!0,withinPortal:!0,zIndex:2e3,closeOnClickOutside:!0,closeOnEscape:!1,trapFocus:!1,withCloseButton:!1,children:k.jsxs(Ut,{gap:"sm",onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),onClick:d=>d.stopPropagation(),children:[k.jsx(uy,{value:r,onChange:c,format:"hex",swatches:["#1c7ed6","#15aabf","#12b886","#37b24d","#82c91e","#fab005","#fd7e14","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#868e96","#212529"],fullWidth:!0}),k.jsxs(wn,{align:"end",gap:"xs",children:[k.jsx(tl,{label:"Hex",value:o,onChange:d=>f(d.currentTarget.value),error:o&&!Xd.test(o)?"Hex invalido":void 0,size:"xs",style:{flex:1},placeholder:"#rrggbb"}),k.jsx(_e,{style:{width:32,height:32,borderRadius:4,background:Xd.test(o)?o:"transparent",border:"1px solid var(--mantine-color-dark-4)"}})]}),k.jsxs(wn,{justify:"flex-end",gap:"xs",children:[k.jsx(Bt,{variant:"default",size:"xs",onClick:n,children:"Cancelar"}),k.jsx(Bt,{size:"xs",onClick:h,disabled:!Xd.test(r),children:"Aceptar"})]})]})})}function iCe({card:e,now:n,onDelete:t,onEdit:i,onChangeColor:r,onShowHistory:a,onToggleLock:o,onAssign:l,onSetRequester:f,requesterOptions:c,onOpenCustomColor:h,activeSticker:d,onAddSticker:p,onRemoveSticker:v,onMoveSticker:y,onCommitSticker:b,users:w,assignee:_,inDoneColumn:S,isOverlay:C}){const T=S||!!e.completed_at,[A,M]=O.useState(!1),[j,N]=O.useState(!1),[F,R]=O.useState(!1),[L,B]=O.useState(e.requester||""),[G,H]=O.useState(!1),U=O.useRef(null),P=O.useRef(null),z=!!d,{attributes:q,listeners:Y,setNodeRef:D,transform:V,transition:W,isDragging:$}=XB({id:e.id,data:{type:"card",columnId:e.column_id,locked:e.locked},disabled:z}),X=O.useCallback(re=>{U.current=re,D(re)},[D]),ee=re=>{if(!z||!p||C||re.target.closest("[data-sticker-overlay]"))return;const ke=re.currentTarget.getBoundingClientRect(),Ie=(re.clientX-ke.left)/ke.width,qe=(re.clientY-ke.top)/ke.height;p(e.id,Math.max(0,Math.min(1,Ie)),Math.max(0,Math.min(1,qe)))},oe=re=>ke=>{var me;if(!z||C||!y||ke.button!==0)return;ke.stopPropagation(),ke.preventDefault();const Ie=(me=U.current)==null?void 0:me.getBoundingClientRect();if(!Ie)return;P.current=re;const qe=ke.currentTarget;qe.setPointerCapture(ke.pointerId);const Ue=Ge=>{const te=P.current;if(te===null)return;const pe=(Ge.clientX-Ie.left)/Ie.width,He=(Ge.clientY-Ie.top)/Ie.height;y(e.id,te,Math.max(0,Math.min(1,pe)),Math.max(0,Math.min(1,He)))},Ve=Ge=>{var te;(te=qe.releasePointerCapture)==null||te.call(qe,Ge.pointerId),qe.removeEventListener("pointermove",Ue),qe.removeEventListener("pointerup",Ve),qe.removeEventListener("pointercancel",Ve),P.current=null,b==null||b(e.id)};qe.addEventListener("pointermove",Ue),qe.addEventListener("pointerup",Ve),qe.addEventListener("pointercancel",Ve)},ue=re=>ke=>{!z||C||(ke.preventDefault(),ke.stopPropagation(),v==null||v(e.id,re))},ye={transform:to.Transform.toString(V),transition:W,opacity:$?.4:1,background:XV(e.color),borderColor:e.locked?"var(--mantine-color-yellow-6)":uA(e.color),borderWidth:e.locked?2:1,filter:T?"brightness(0.55) saturate(0.7)":void 0},ae=e.entered_at?new Date(e.entered_at).getTime():n,le=Math.max(0,n-ae),Se=e.locked_at?new Date(e.locked_at).getTime():0,ne=e.locked&&Se?Math.max(0,n-Se):0,$e=e.created_at?new Date(e.created_at).getTime():0,ve=e.completed_at?new Date(e.completed_at).getTime():0,xe=T&&$e&&ve?Math.max(0,ve-$e):0,De=re=>{re.preventDefault(),H(!0)},we=k.jsxs(k.Fragment,{children:[k.jsx(Zn.Label,{children:"Acciones"}),k.jsx(Zn.Item,{leftSection:k.jsx(nh,{size:14}),onClick:()=>{H(!1),i(e)},children:"Editar"}),k.jsxs(Vn,{opened:A,onChange:M,position:"right-start",withArrow:!0,shadow:"md",children:[k.jsx(Vn.Target,{children:k.jsx(Zn.Item,{leftSection:k.jsx(zC,{size:14}),onClick:re=>{re.preventDefault(),re.stopPropagation(),M(ke=>!ke)},closeMenuOnClick:!1,children:"Color"})}),k.jsx(Vn.Dropdown,{p:"xs",onDoubleClick:re=>re.stopPropagation(),onClick:re=>re.stopPropagation(),onMouseDown:re=>re.stopPropagation(),children:k.jsx(QV,{value:e.color,onChange:re=>r(e.id,re),onOpenCustom:h?()=>h(e.id,e.color||"#888888"):void 0})})]}),k.jsxs(Vn,{opened:j,onChange:N,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[k.jsx(Vn.Target,{children:k.jsxs(Zn.Item,{leftSection:k.jsx(Goe,{size:14}),onClick:re=>{re.preventDefault(),re.stopPropagation(),N(ke=>!ke)},closeMenuOnClick:!1,children:["Asignar a ",_?`(${_.display_name||_.username})`:"..."]})}),k.jsx(Vn.Dropdown,{p:"xs",onDoubleClick:re=>re.stopPropagation(),onClick:re=>re.stopPropagation(),onMouseDown:re=>re.stopPropagation(),children:k.jsx(Ko,{placeholder:"Sin asignar",value:e.assignee_id??null,onChange:re=>{l(e.id,re),N(!1),H(!1)},data:w.map(re=>({value:re.id,label:re.display_name||re.username})),clearable:!0,searchable:!0,autoFocus:!0,comboboxProps:{withinPortal:!1}})})]}),k.jsxs(Vn,{opened:F,onChange:R,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[k.jsx(Vn.Target,{children:k.jsxs(Zn.Item,{leftSection:k.jsx(Joe,{size:14}),onClick:re=>{re.preventDefault(),re.stopPropagation(),B(e.requester||""),R(ke=>!ke)},closeMenuOnClick:!1,children:["Solicitante ",e.requester?`(${e.requester})`:"..."]})}),k.jsx(Vn.Dropdown,{p:"xs",onDoubleClick:re=>re.stopPropagation(),onClick:re=>re.stopPropagation(),onMouseDown:re=>re.stopPropagation(),children:k.jsx(ty,{placeholder:"Sin solicitante",value:L,onChange:B,data:c||[],autoFocus:!0,comboboxProps:{withinPortal:!1},onKeyDown:re=>{re.key==="Enter"?(re.preventDefault(),f==null||f(e.id,L.trim()),R(!1),H(!1)):re.key==="Escape"&&R(!1)},onOptionSubmit:re=>{B(re),f==null||f(e.id,re),R(!1),H(!1)}})})]}),k.jsx(Zn.Item,{leftSection:e.locked?k.jsx(MF,{size:14}):k.jsx(Ul,{size:14}),color:e.locked?"yellow":void 0,onClick:()=>{H(!1),o(e.id,!e.locked)},children:e.locked?"Desbloquear":"Bloquear"}),k.jsx(Zn.Item,{leftSection:k.jsx(boe,{size:14}),onClick:()=>{H(!1),a(e)},children:"Historial"}),k.jsx(Zn.Divider,{}),k.jsx(Zn.Item,{leftSection:k.jsx(Vy,{size:14}),color:"red",onClick:()=>{H(!1),t(e.id)},children:"Borrar"})]});return k.jsxs(ni,{ref:X,style:{...ye,position:"relative",cursor:z?"copy":"grab",touchAction:"none"},withBorder:!0,p:"xs",shadow:C?"lg":"xs",radius:"md",onContextMenu:De,onClick:ee,onDoubleClick:re=>{re.stopPropagation(),i(e)},...q,...z?{}:Y,children:[k.jsxs(Ut,{gap:6,style:{position:"relative",zIndex:1,pointerEvents:z?"none":void 0},children:[k.jsxs(wn,{justify:"space-between",gap:4,wrap:"nowrap",align:"flex-start",children:[k.jsxs(wn,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},align:"flex-start",children:[k.jsx(TF,{size:14,color:"var(--mantine-color-dark-2)",style:{flexShrink:0,marginTop:4}}),e.locked&&k.jsx(vr,{label:"Bloqueada",withArrow:!0,children:k.jsx(Ul,{size:14,color:"var(--mantine-color-yellow-6)",style:{flexShrink:0,marginTop:4}})}),k.jsx(cn,{size:"sm",fw:500,style:{flex:1,wordBreak:"break-word",whiteSpace:"normal",textDecoration:T?"line-through":"none",opacity:T?.7:1},children:e.title})]}),k.jsxs(Zn,{opened:G,onChange:H,position:"bottom-end",shadow:"md",withArrow:!0,children:[k.jsx(Zn.Target,{children:k.jsx(Yt,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones",style:{flexShrink:0},onPointerDown:re=>re.stopPropagation(),children:k.jsx(EF,{size:14})})}),k.jsx(Zn.Dropdown,{onDoubleClick:re=>re.stopPropagation(),onClick:re=>re.stopPropagation(),onMouseDown:re=>re.stopPropagation(),onContextMenu:re=>re.stopPropagation(),children:we})]})]}),(e.requester||_)&&k.jsxs(wn,{gap:6,wrap:"nowrap",style:{minWidth:0},children:[e.requester&&k.jsxs(k.Fragment,{children:[k.jsx(iu,{size:18,radius:"xs",color:m$(e.requester),style:{flexShrink:0},children:e.requester.slice(0,2).toUpperCase()}),k.jsx(cn,{size:"xs",c:"dimmed",truncate:!0,children:e.requester})]}),e.requester&&_&&k.jsx(cn,{size:"xs",c:"dimmed",style:{flexShrink:0},children:"-"}),_&&k.jsxs(k.Fragment,{children:[k.jsx(iu,{size:18,radius:"xl",color:_.color||"blue",style:{flexShrink:0},children:(_.display_name||_.username).slice(0,2).toUpperCase()}),k.jsx(cn,{size:"xs",c:"dimmed",truncate:!0,children:_.display_name||_.username})]})]}),e.description&&k.jsx(cn,{size:"xs",c:"dimmed",lineClamp:3,children:e.description}),e.tags&&e.tags.length>0&&k.jsx(wn,{gap:4,wrap:"wrap",children:e.tags.map(re=>k.jsx(gi,{size:"xs",variant:"light",color:m$(re),radius:"sm",children:re},re))}),k.jsx(wn,{gap:4,wrap:"wrap",children:e.locked?k.jsx(gi,{size:"xs",variant:"light",color:"yellow",leftSection:k.jsx(Ul,{size:10}),children:ia(ne)}):T&&e.completed_at?k.jsxs(k.Fragment,{children:[k.jsx(gi,{size:"xs",variant:"light",color:"teal",leftSection:k.jsx(CF,{size:10}),children:Y6e(e.completed_at)}),k.jsxs(gi,{size:"xs",variant:"light",color:"gray",leftSection:k.jsx(IM,{size:10}),children:["Total: ",ia(xe)]}),e.total_locked_ms>0&&k.jsx(gi,{size:"xs",variant:"light",color:"yellow",leftSection:k.jsx(Ul,{size:10}),children:ia(e.total_locked_ms)})]}):k.jsx(gi,{size:"xs",variant:"light",color:"gray",leftSection:k.jsx(IM,{size:10}),children:ia(le)})}),e.seq_num>0&&k.jsxs(cn,{size:"xs",c:"dimmed",style:{marginTop:-2},children:["#",String(e.seq_num).padStart(5,"0")]})]}),e.stickers&&e.stickers.length>0&&k.jsx("div",{"data-sticker-overlay":!0,style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden",borderRadius:"inherit",zIndex:0},children:e.stickers.map((re,ke)=>k.jsx("span",{onPointerDown:oe(ke),onContextMenu:ue(ke),title:z?"Arrastra para mover. Click derecho para borrar.":"",style:{position:"absolute",left:`${re.x*100}%`,top:`${re.y*100}%`,transform:"translate(-50%, -50%)",fontSize:48,lineHeight:1,opacity:1,userSelect:"none",cursor:z&&!C?"grab":"default",pointerEvents:z&&!C?"auto":"none",touchAction:"none"},children:re.emoji},ke))})]})}const JV=O.memo(iCe);function rCe({column:e,cards:n,now:t,collapsed:i,onAddCard:r,onRenameColumn:a,onResizeColumn:o,onMoveColumnLocation:l,onDeleteColumn:f,onSetWIPLimit:c,onToggleDone:h,onEditCard:d,onDeleteCard:p,onChangeCardColor:v,onShowHistory:y,onToggleCardLock:b,onAssignCard:w,onSetRequester:_,requesterOptions:S,onOpenCustomCardColor:C,activeSticker:T,onAddSticker:A,onRemoveSticker:M,onMoveSticker:j,onCommitSticker:N,users:F,usersById:R}){const[L,B]=O.useState(!1),[G,H]=O.useState(e.name),[U,P]=O.useState(null),[z,q]=O.useState(!1),[Y,D]=O.useState(e.wip_limit),[V,W]=O.useState(()=>i?localStorage.getItem(`kanban_col_body_${e.id}`)==="1":!1);O.useEffect(()=>{i&&localStorage.setItem(`kanban_col_body_${e.id}`,V?"1":"0")},[V,i,e.id]);const $=e.wip_limit,X=$>0&&n.length>$;O.useEffect(()=>{P(null)},[e.width]);const{attributes:ee,listeners:oe,setNodeRef:ue,transform:ye,transition:ae,isDragging:le}=XB({id:`column-${e.id}`,data:{type:"column",columnId:e.id,location:e.location}}),Se=i?"100%":U??e.width,ne=i?{transform:to.Transform.toString(ye),transition:ae,opacity:le?.4:1,width:"100%",display:"flex",flexDirection:"column",position:"relative",flex:V?"0 0 auto":"1 1 auto",minHeight:0}:{transform:to.Transform.toString(ye),transition:ae,opacity:le?.4:1,width:Se,minWidth:Se,maxWidth:Se,display:"flex",flexDirection:"column",height:"100%",position:"relative"},$e=n.map(me=>me.id),ve=()=>{const me=G.trim();me&&me!==e.name&&a(e.id,me),B(!1)},xe=O.useRef(null),De=me=>{me.preventDefault(),me.stopPropagation(),xe.current={startX:me.clientX,startWidth:e.width},document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ge=pe=>{if(!xe.current)return;const He=pe.clientX-xe.current.startX,Ye=Math.min(800,Math.max(200,xe.current.startWidth+He));P(Ye)},te=()=>{xe.current&&we.current!==null&&o(e.id,we.current),xe.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",te)};window.addEventListener("mousemove",Ge),window.addEventListener("mouseup",te)},we=O.useRef(null);O.useEffect(()=>{we.current=U},[U]);const re=e.location==="sidebar",ke=re?"Restaurar al board":"Mover al sidebar",Ie=re?Yae:Xae,qe=()=>{const me=typeof Y=="number"?Y:parseInt(String(Y),10),Ge=Number.isFinite(me)&&me>=0?Math.floor(me):0;Ge!==e.wip_limit&&c(e.id,Ge),q(!1)},Ue=X?"var(--mantine-color-red-9)":"var(--mantine-color-dark-7)",Ve=X?"var(--mantine-color-red-6)":void 0;return k.jsxs(ni,{ref:ue,style:{...ne,background:Ue,borderColor:Ve,borderWidth:X?2:1},withBorder:!0,radius:"md",p:"sm",children:[k.jsxs(wn,{justify:"space-between",mb:"xs",wrap:"nowrap",children:[k.jsxs(wn,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},children:[k.jsx(Yt,{variant:"subtle",color:"gray",size:"sm",...ee,...oe,style:{cursor:"grab"},"aria-label":"Drag column",children:k.jsx(TF,{size:14})}),L?k.jsx(tl,{size:"xs",value:G,onChange:me=>H(me.currentTarget.value),autoFocus:!0,onBlur:ve,onKeyDown:me=>{me.key==="Enter"&&ve(),me.key==="Escape"&&(H(e.name),B(!1))},style:{flex:1}}):k.jsx(cn,{fw:600,size:"sm",truncate:!0,onDoubleClick:()=>{H(e.name),B(!0)},style:{flex:1,cursor:"text"},title:"Doble click para renombrar",children:e.name}),k.jsxs(Vn,{opened:z,onChange:me=>{q(me),me&&D(e.wip_limit)},position:"bottom",withArrow:!0,shadow:"md",children:[k.jsx(Vn.Target,{children:k.jsx(vr,{label:$>0?`WIP ${n.length}/${$}${X?" (excedido)":""}`:"Click para limitar WIP",withArrow:!0,children:k.jsx(gi,{size:"xs",variant:X?"filled":"light",color:X?"red":$>0?"yellow":"gray",leftSection:X?k.jsx(Wae,{size:10}):null,style:{cursor:"pointer"},onClick:()=>q(me=>!me),children:$>0?`${n.length}/${$}`:n.length})})}),k.jsx(Vn.Dropdown,{p:"xs",children:k.jsxs(Ut,{gap:"xs",children:[k.jsx(cn,{size:"xs",c:"dimmed",children:"Maximo de tarjetas (0 = sin limite)"}),k.jsx(xy,{size:"xs",value:Y,onChange:D,min:0,max:999,autoFocus:!0,onKeyDown:me=>{me.key==="Enter"&&qe(),me.key==="Escape"&&q(!1)}}),k.jsxs(wn,{justify:"flex-end",gap:4,children:[k.jsx(Bt,{size:"xs",variant:"subtle",onClick:()=>q(!1),children:"Cancelar"}),k.jsx(Bt,{size:"xs",onClick:qe,children:"Guardar"})]})]})})]})]}),k.jsx(wn,{gap:2,wrap:"nowrap",children:L?k.jsxs(k.Fragment,{children:[k.jsx(Yt,{variant:"subtle",color:"green",size:"sm",onClick:ve,"aria-label":"Save",children:k.jsx(CF,{size:14})}),k.jsx(Yt,{variant:"subtle",color:"gray",size:"sm",onClick:()=>{H(e.name),B(!1)},"aria-label":"Cancel",children:k.jsx(th,{size:14})})]}):k.jsxs(k.Fragment,{children:[i&&k.jsx(vr,{label:V?"Expandir":"Colapsar",withArrow:!0,children:k.jsx(Yt,{variant:"subtle",color:"gray",size:"sm",onClick:()=>W(me=>!me),"aria-label":V?"Expandir columna":"Colapsar columna",children:V?k.jsx(OF,{size:14}):k.jsx(AF,{size:14})})}),e.is_done&&k.jsx(vr,{label:"Columna Done",withArrow:!0,children:k.jsx(gi,{size:"xs",color:"green",variant:"filled",leftSection:k.jsx(Ph,{size:10}),children:"done"})}),k.jsxs(Zn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[k.jsx(Zn.Target,{children:k.jsx(Yt,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones columna",children:k.jsx(EF,{size:14})})}),k.jsxs(Zn.Dropdown,{children:[k.jsx(Zn.Label,{children:"Columna"}),k.jsx(Zn.Item,{leftSection:k.jsx(Doe,{size:14}),onClick:()=>{H(e.name),B(!0)},children:"Renombrar"}),k.jsx(Zn.Item,{leftSection:k.jsx(Ph,{size:14}),color:e.is_done?"yellow":"green",onClick:()=>h(e.id,!e.is_done),children:e.is_done?"Quitar marca Done":"Marcar como Done"}),k.jsx(Zn.Item,{leftSection:k.jsx(Ie,{size:14}),onClick:()=>l(e.id,re?"board":"sidebar"),children:ke}),k.jsx(Zn.Divider,{}),k.jsx(Zn.Item,{leftSection:k.jsx(Vy,{size:14}),color:"red",onClick:()=>f(e.id),children:"Borrar columna"})]})]})]})})]}),!(i&&V)&&k.jsxs(k.Fragment,{children:[k.jsx(lo,{style:{flex:1},type:"auto",children:k.jsx(gS,{items:$e,strategy:WB,children:k.jsx(Ut,{gap:"xs",pb:"xs",style:{minHeight:40},children:n.map(me=>k.jsx(JV,{card:me,now:t,onDelete:p,onEdit:d,onChangeColor:v,onShowHistory:y,onToggleLock:b,onAssign:w,onSetRequester:_,requesterOptions:S,onOpenCustomColor:C,users:F,assignee:me.assignee_id?R.get(me.assignee_id):void 0,inDoneColumn:e.is_done,activeSticker:T,onAddSticker:A,onRemoveSticker:M,onMoveSticker:j,onCommitSticker:N},me.id))})})}),k.jsx(Bt,{variant:"subtle",color:"gray",size:"xs",leftSection:k.jsx(Nh,{size:14}),onClick:()=>r(e.id),mt:"xs",fullWidth:!0,children:"Anadir tarjeta"})]}),!re&&k.jsx(_e,{onMouseDown:De,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:5},"aria-label":"Resize column"})]})}const p$=O.memo(rCe),aCe=JSON.parse('[{"id":"people","emojis":["grinning","smiley","smile","grin","laughing","sweat_smile","rolling_on_the_floor_laughing","joy","slightly_smiling_face","upside_down_face","melting_face","wink","blush","innocent","smiling_face_with_3_hearts","heart_eyes","star-struck","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","smiling_face_with_tear","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","zany_face","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","face_with_hand_over_mouth","face_with_open_eyes_and_hand_over_mouth","face_with_peeking_eye","shushing_face","thinking_face","saluting_face","zipper_mouth_face","face_with_raised_eyebrow","neutral_face","expressionless","no_mouth","dotted_line_face","face_in_clouds","smirk","unamused","face_with_rolling_eyes","grimacing","face_exhaling","lying_face","shaking_face","relieved","pensive","sleepy","drooling_face","sleeping","mask","face_with_thermometer","face_with_head_bandage","nauseated_face","face_vomiting","sneezing_face","hot_face","cold_face","woozy_face","dizzy_face","face_with_spiral_eyes","exploding_head","face_with_cowboy_hat","partying_face","disguised_face","sunglasses","nerd_face","face_with_monocle","confused","face_with_diagonal_mouth","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","pleading_face","face_holding_back_tears","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","yawning_face","triumph","rage","angry","face_with_symbols_on_mouth","smiling_imp","imp","skull","skull_and_crossbones","hankey","clown_face","japanese_ogre","japanese_goblin","ghost","alien","space_invader","wave","raised_back_of_hand","raised_hand_with_fingers_splayed","hand","spock-hand","rightwards_hand","leftwards_hand","palm_down_hand","palm_up_hand","leftwards_pushing_hand","rightwards_pushing_hand","ok_hand","pinched_fingers","pinching_hand","v","crossed_fingers","hand_with_index_finger_and_thumb_crossed","i_love_you_hand_sign","the_horns","call_me_hand","point_left","point_right","point_up_2","middle_finger","point_down","point_up","index_pointing_at_the_viewer","+1","-1","fist","facepunch","left-facing_fist","right-facing_fist","clap","raised_hands","heart_hands","open_hands","palms_up_together","handshake","pray","writing_hand","nail_care","selfie","muscle","mechanical_arm","mechanical_leg","leg","foot","ear","ear_with_hearing_aid","nose","brain","anatomical_heart","lungs","tooth","bone","eyes","eye","tongue","lips","biting_lip","baby","child","boy","girl","adult","person_with_blond_hair","man","bearded_person","man_with_beard","woman_with_beard","red_haired_man","curly_haired_man","white_haired_man","bald_man","woman","red_haired_woman","red_haired_person","curly_haired_woman","curly_haired_person","white_haired_woman","white_haired_person","bald_woman","bald_person","blond-haired-woman","blond-haired-man","older_adult","older_man","older_woman","person_frowning","man-frowning","woman-frowning","person_with_pouting_face","man-pouting","woman-pouting","no_good","man-gesturing-no","woman-gesturing-no","ok_woman","man-gesturing-ok","woman-gesturing-ok","information_desk_person","man-tipping-hand","woman-tipping-hand","raising_hand","man-raising-hand","woman-raising-hand","deaf_person","deaf_man","deaf_woman","bow","man-bowing","woman-bowing","face_palm","man-facepalming","woman-facepalming","shrug","man-shrugging","woman-shrugging","health_worker","male-doctor","female-doctor","student","male-student","female-student","teacher","male-teacher","female-teacher","judge","male-judge","female-judge","farmer","male-farmer","female-farmer","cook","male-cook","female-cook","mechanic","male-mechanic","female-mechanic","factory_worker","male-factory-worker","female-factory-worker","office_worker","male-office-worker","female-office-worker","scientist","male-scientist","female-scientist","technologist","male-technologist","female-technologist","singer","male-singer","female-singer","artist","male-artist","female-artist","pilot","male-pilot","female-pilot","astronaut","male-astronaut","female-astronaut","firefighter","male-firefighter","female-firefighter","cop","male-police-officer","female-police-officer","sleuth_or_spy","male-detective","female-detective","guardsman","male-guard","female-guard","ninja","construction_worker","male-construction-worker","female-construction-worker","person_with_crown","prince","princess","man_with_turban","man-wearing-turban","woman-wearing-turban","man_with_gua_pi_mao","person_with_headscarf","person_in_tuxedo","man_in_tuxedo","woman_in_tuxedo","bride_with_veil","man_with_veil","woman_with_veil","pregnant_woman","pregnant_man","pregnant_person","breast-feeding","woman_feeding_baby","man_feeding_baby","person_feeding_baby","angel","santa","mrs_claus","mx_claus","superhero","male_superhero","female_superhero","supervillain","male_supervillain","female_supervillain","mage","male_mage","female_mage","fairy","male_fairy","female_fairy","vampire","male_vampire","female_vampire","merperson","merman","mermaid","elf","male_elf","female_elf","genie","male_genie","female_genie","zombie","male_zombie","female_zombie","troll","massage","man-getting-massage","woman-getting-massage","haircut","man-getting-haircut","woman-getting-haircut","walking","man-walking","woman-walking","standing_person","man_standing","woman_standing","kneeling_person","man_kneeling","woman_kneeling","person_with_probing_cane","man_with_probing_cane","woman_with_probing_cane","person_in_motorized_wheelchair","man_in_motorized_wheelchair","woman_in_motorized_wheelchair","person_in_manual_wheelchair","man_in_manual_wheelchair","woman_in_manual_wheelchair","runner","man-running","woman-running","dancer","man_dancing","man_in_business_suit_levitating","dancers","men-with-bunny-ears-partying","women-with-bunny-ears-partying","person_in_steamy_room","man_in_steamy_room","woman_in_steamy_room","person_climbing","man_climbing","woman_climbing","fencer","horse_racing","skier","snowboarder","golfer","man-golfing","woman-golfing","surfer","man-surfing","woman-surfing","rowboat","man-rowing-boat","woman-rowing-boat","swimmer","man-swimming","woman-swimming","person_with_ball","man-bouncing-ball","woman-bouncing-ball","weight_lifter","man-lifting-weights","woman-lifting-weights","bicyclist","man-biking","woman-biking","mountain_bicyclist","man-mountain-biking","woman-mountain-biking","person_doing_cartwheel","man-cartwheeling","woman-cartwheeling","wrestlers","man-wrestling","woman-wrestling","water_polo","man-playing-water-polo","woman-playing-water-polo","handball","man-playing-handball","woman-playing-handball","juggling","man-juggling","woman-juggling","person_in_lotus_position","man_in_lotus_position","woman_in_lotus_position","bath","sleeping_accommodation","people_holding_hands","two_women_holding_hands","man_and_woman_holding_hands","two_men_holding_hands","couplekiss","woman-kiss-man","man-kiss-man","woman-kiss-woman","couple_with_heart","woman-heart-man","man-heart-man","woman-heart-woman","family","man-woman-boy","man-woman-girl","man-woman-girl-boy","man-woman-boy-boy","man-woman-girl-girl","man-man-boy","man-man-girl","man-man-girl-boy","man-man-boy-boy","man-man-girl-girl","woman-woman-boy","woman-woman-girl","woman-woman-girl-boy","woman-woman-boy-boy","woman-woman-girl-girl","man-boy","man-boy-boy","man-girl","man-girl-boy","man-girl-girl","woman-boy","woman-boy-boy","woman-girl","woman-girl-boy","woman-girl-girl","speaking_head_in_silhouette","bust_in_silhouette","busts_in_silhouette","people_hugging","footprints","robot_face","smiley_cat","smile_cat","joy_cat","heart_eyes_cat","smirk_cat","kissing_cat","scream_cat","crying_cat_face","pouting_cat","see_no_evil","hear_no_evil","speak_no_evil","love_letter","cupid","gift_heart","sparkling_heart","heartpulse","heartbeat","revolving_hearts","two_hearts","heart_decoration","heavy_heart_exclamation_mark_ornament","broken_heart","heart_on_fire","mending_heart","heart","pink_heart","orange_heart","yellow_heart","green_heart","blue_heart","light_blue_heart","purple_heart","brown_heart","black_heart","grey_heart","white_heart","kiss","100","anger","boom","dizzy","sweat_drops","dash","hole","speech_balloon","eye-in-speech-bubble","left_speech_bubble","right_anger_bubble","thought_balloon","zzz"]},{"id":"nature","emojis":["monkey_face","monkey","gorilla","orangutan","dog","dog2","guide_dog","service_dog","poodle","wolf","fox_face","raccoon","cat","cat2","black_cat","lion_face","tiger","tiger2","leopard","horse","moose","donkey","racehorse","unicorn_face","zebra_face","deer","bison","cow","ox","water_buffalo","cow2","pig","pig2","boar","pig_nose","ram","sheep","goat","dromedary_camel","camel","llama","giraffe_face","elephant","mammoth","rhinoceros","hippopotamus","mouse","mouse2","rat","hamster","rabbit","rabbit2","chipmunk","beaver","hedgehog","bat","bear","polar_bear","koala","panda_face","sloth","otter","skunk","kangaroo","badger","feet","turkey","chicken","rooster","hatching_chick","baby_chick","hatched_chick","bird","penguin","dove_of_peace","eagle","duck","swan","owl","dodo","feather","flamingo","peacock","parrot","wing","black_bird","goose","frog","crocodile","turtle","lizard","snake","dragon_face","dragon","sauropod","t-rex","whale","whale2","dolphin","seal","fish","tropical_fish","blowfish","shark","octopus","shell","coral","jellyfish","snail","butterfly","bug","ant","bee","beetle","ladybug","cricket","cockroach","spider","spider_web","scorpion","mosquito","fly","worm","microbe","bouquet","cherry_blossom","white_flower","lotus","rosette","rose","wilted_flower","hibiscus","sunflower","blossom","tulip","hyacinth","seedling","potted_plant","evergreen_tree","deciduous_tree","palm_tree","cactus","ear_of_rice","herb","shamrock","four_leaf_clover","maple_leaf","fallen_leaf","leaves","empty_nest","nest_with_eggs","mushroom"]},{"id":"foods","emojis":["grapes","melon","watermelon","tangerine","lemon","banana","pineapple","mango","apple","green_apple","pear","peach","cherries","strawberry","blueberries","kiwifruit","tomato","olive","coconut","avocado","eggplant","potato","carrot","corn","hot_pepper","bell_pepper","cucumber","leafy_green","broccoli","garlic","onion","peanuts","beans","chestnut","ginger_root","pea_pod","bread","croissant","baguette_bread","flatbread","pretzel","bagel","pancakes","waffle","cheese_wedge","meat_on_bone","poultry_leg","cut_of_meat","bacon","hamburger","fries","pizza","hotdog","sandwich","taco","burrito","tamale","stuffed_flatbread","falafel","egg","fried_egg","shallow_pan_of_food","stew","fondue","bowl_with_spoon","green_salad","popcorn","butter","salt","canned_food","bento","rice_cracker","rice_ball","rice","curry","ramen","spaghetti","sweet_potato","oden","sushi","fried_shrimp","fish_cake","moon_cake","dango","dumpling","fortune_cookie","takeout_box","crab","lobster","shrimp","squid","oyster","icecream","shaved_ice","ice_cream","doughnut","cookie","birthday","cake","cupcake","pie","chocolate_bar","candy","lollipop","custard","honey_pot","baby_bottle","glass_of_milk","coffee","teapot","tea","sake","champagne","wine_glass","cocktail","tropical_drink","beer","beers","clinking_glasses","tumbler_glass","pouring_liquid","cup_with_straw","bubble_tea","beverage_box","mate_drink","ice_cube","chopsticks","knife_fork_plate","fork_and_knife","spoon","hocho","jar","amphora"]},{"id":"activity","emojis":["jack_o_lantern","christmas_tree","fireworks","sparkler","firecracker","sparkles","balloon","tada","confetti_ball","tanabata_tree","bamboo","dolls","flags","wind_chime","rice_scene","red_envelope","ribbon","gift","reminder_ribbon","admission_tickets","ticket","medal","trophy","sports_medal","first_place_medal","second_place_medal","third_place_medal","soccer","baseball","softball","basketball","volleyball","football","rugby_football","tennis","flying_disc","bowling","cricket_bat_and_ball","field_hockey_stick_and_ball","ice_hockey_stick_and_puck","lacrosse","table_tennis_paddle_and_ball","badminton_racquet_and_shuttlecock","boxing_glove","martial_arts_uniform","goal_net","golf","ice_skate","fishing_pole_and_fish","diving_mask","running_shirt_with_sash","ski","sled","curling_stone","dart","yo-yo","kite","gun","8ball","crystal_ball","magic_wand","video_game","joystick","slot_machine","game_die","jigsaw","teddy_bear","pinata","mirror_ball","nesting_dolls","spades","hearts","diamonds","clubs","chess_pawn","black_joker","mahjong","flower_playing_cards","performing_arts","frame_with_picture","art","thread","sewing_needle","yarn","knot"]},{"id":"places","emojis":["earth_africa","earth_americas","earth_asia","globe_with_meridians","world_map","japan","compass","snow_capped_mountain","mountain","volcano","mount_fuji","camping","beach_with_umbrella","desert","desert_island","national_park","stadium","classical_building","building_construction","bricks","rock","wood","hut","house_buildings","derelict_house_building","house","house_with_garden","office","post_office","european_post_office","hospital","bank","hotel","love_hotel","convenience_store","school","department_store","factory","japanese_castle","european_castle","wedding","tokyo_tower","statue_of_liberty","church","mosque","hindu_temple","synagogue","shinto_shrine","kaaba","fountain","tent","foggy","night_with_stars","cityscape","sunrise_over_mountains","sunrise","city_sunset","city_sunrise","bridge_at_night","hotsprings","carousel_horse","playground_slide","ferris_wheel","roller_coaster","barber","circus_tent","steam_locomotive","railway_car","bullettrain_side","bullettrain_front","train2","metro","light_rail","station","tram","monorail","mountain_railway","train","bus","oncoming_bus","trolleybus","minibus","ambulance","fire_engine","police_car","oncoming_police_car","taxi","oncoming_taxi","car","oncoming_automobile","blue_car","pickup_truck","truck","articulated_lorry","tractor","racing_car","racing_motorcycle","motor_scooter","manual_wheelchair","motorized_wheelchair","auto_rickshaw","bike","scooter","skateboard","roller_skate","busstop","motorway","railway_track","oil_drum","fuelpump","wheel","rotating_light","traffic_light","vertical_traffic_light","octagonal_sign","construction","anchor","ring_buoy","boat","canoe","speedboat","passenger_ship","ferry","motor_boat","ship","airplane","small_airplane","airplane_departure","airplane_arriving","parachute","seat","helicopter","suspension_railway","mountain_cableway","aerial_tramway","satellite","rocket","flying_saucer","bellhop_bell","luggage","hourglass","hourglass_flowing_sand","watch","alarm_clock","stopwatch","timer_clock","mantelpiece_clock","clock12","clock1230","clock1","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","clock10","clock1030","clock11","clock1130","new_moon","waxing_crescent_moon","first_quarter_moon","moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","crescent_moon","new_moon_with_face","first_quarter_moon_with_face","last_quarter_moon_with_face","thermometer","sunny","full_moon_with_face","sun_with_face","ringed_planet","star","star2","stars","milky_way","cloud","partly_sunny","thunder_cloud_and_rain","mostly_sunny","barely_sunny","partly_sunny_rain","rain_cloud","snow_cloud","lightning","tornado","fog","wind_blowing_face","cyclone","rainbow","closed_umbrella","umbrella","umbrella_with_rain_drops","umbrella_on_ground","zap","snowflake","snowman","snowman_without_snow","comet","fire","droplet","ocean"]},{"id":"objects","emojis":["eyeglasses","dark_sunglasses","goggles","lab_coat","safety_vest","necktie","shirt","jeans","scarf","gloves","coat","socks","dress","kimono","sari","one-piece_swimsuit","briefs","shorts","bikini","womans_clothes","folding_hand_fan","purse","handbag","pouch","shopping_bags","school_satchel","thong_sandal","mans_shoe","athletic_shoe","hiking_boot","womans_flat_shoe","high_heel","sandal","ballet_shoes","boot","hair_pick","crown","womans_hat","tophat","mortar_board","billed_cap","military_helmet","helmet_with_white_cross","prayer_beads","lipstick","ring","gem","mute","speaker","sound","loud_sound","loudspeaker","mega","postal_horn","bell","no_bell","musical_score","musical_note","notes","studio_microphone","level_slider","control_knobs","microphone","headphones","radio","saxophone","accordion","guitar","musical_keyboard","trumpet","violin","banjo","drum_with_drumsticks","long_drum","maracas","flute","iphone","calling","phone","telephone_receiver","pager","fax","battery","low_battery","electric_plug","computer","desktop_computer","printer","keyboard","three_button_mouse","trackball","minidisc","floppy_disk","cd","dvd","abacus","movie_camera","film_frames","film_projector","clapper","tv","camera","camera_with_flash","video_camera","vhs","mag","mag_right","candle","bulb","flashlight","izakaya_lantern","diya_lamp","notebook_with_decorative_cover","closed_book","book","green_book","blue_book","orange_book","books","notebook","ledger","page_with_curl","scroll","page_facing_up","newspaper","rolled_up_newspaper","bookmark_tabs","bookmark","label","moneybag","coin","yen","dollar","euro","pound","money_with_wings","credit_card","receipt","chart","email","e-mail","incoming_envelope","envelope_with_arrow","outbox_tray","inbox_tray","package","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","postbox","ballot_box_with_ballot","pencil2","black_nib","lower_left_fountain_pen","lower_left_ballpoint_pen","lower_left_paintbrush","lower_left_crayon","memo","briefcase","file_folder","open_file_folder","card_index_dividers","date","calendar","spiral_note_pad","spiral_calendar_pad","card_index","chart_with_upwards_trend","chart_with_downwards_trend","bar_chart","clipboard","pushpin","round_pushpin","paperclip","linked_paperclips","straight_ruler","triangular_ruler","scissors","card_file_box","file_cabinet","wastebasket","lock","unlock","lock_with_ink_pen","closed_lock_with_key","key","old_key","hammer","axe","pick","hammer_and_pick","hammer_and_wrench","dagger_knife","crossed_swords","bomb","boomerang","bow_and_arrow","shield","carpentry_saw","wrench","screwdriver","nut_and_bolt","gear","compression","scales","probing_cane","link","chains","hook","toolbox","magnet","ladder","alembic","test_tube","petri_dish","dna","microscope","telescope","satellite_antenna","syringe","drop_of_blood","pill","adhesive_bandage","crutch","stethoscope","x-ray","door","elevator","mirror","window","bed","couch_and_lamp","chair","toilet","plunger","shower","bathtub","mouse_trap","razor","lotion_bottle","safety_pin","broom","basket","roll_of_paper","bucket","soap","bubbles","toothbrush","sponge","fire_extinguisher","shopping_trolley","smoking","coffin","headstone","funeral_urn","nazar_amulet","hamsa","moyai","placard","identification_card"]},{"id":"symbols","emojis":["atm","put_litter_in_its_place","potable_water","wheelchair","mens","womens","restroom","baby_symbol","wc","passport_control","customs","baggage_claim","left_luggage","warning","children_crossing","no_entry","no_entry_sign","no_bicycles","no_smoking","do_not_litter","non-potable_water","no_pedestrians","no_mobile_phones","underage","radioactive_sign","biohazard_sign","arrow_up","arrow_upper_right","arrow_right","arrow_lower_right","arrow_down","arrow_lower_left","arrow_left","arrow_upper_left","arrow_up_down","left_right_arrow","leftwards_arrow_with_hook","arrow_right_hook","arrow_heading_up","arrow_heading_down","arrows_clockwise","arrows_counterclockwise","back","end","on","soon","top","place_of_worship","atom_symbol","om_symbol","star_of_david","wheel_of_dharma","yin_yang","latin_cross","orthodox_cross","star_and_crescent","peace_symbol","menorah_with_nine_branches","six_pointed_star","khanda","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","twisted_rightwards_arrows","repeat","repeat_one","arrow_forward","fast_forward","black_right_pointing_double_triangle_with_vertical_bar","black_right_pointing_triangle_with_double_vertical_bar","arrow_backward","rewind","black_left_pointing_double_triangle_with_vertical_bar","arrow_up_small","arrow_double_up","arrow_down_small","arrow_double_down","double_vertical_bar","black_square_for_stop","black_circle_for_record","eject","cinema","low_brightness","high_brightness","signal_strength","wireless","vibration_mode","mobile_phone_off","female_sign","male_sign","transgender_symbol","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","heavy_equals_sign","infinity","bangbang","interrobang","question","grey_question","grey_exclamation","exclamation","wavy_dash","currency_exchange","heavy_dollar_sign","medical_symbol","recycle","fleur_de_lis","trident","name_badge","beginner","o","white_check_mark","ballot_box_with_check","heavy_check_mark","x","negative_squared_cross_mark","curly_loop","loop","part_alternation_mark","eight_spoked_asterisk","eight_pointed_black_star","sparkle","copyright","registered","tm","hash","keycap_star","zero","one","two","three","four","five","six","seven","eight","nine","keycap_ten","capital_abcd","abcd","1234","symbols","abc","a","ab","b","cl","cool","free","information_source","id","m","new","ng","o2","ok","parking","sos","up","vs","koko","sa","u6708","u6709","u6307","ideograph_advantage","u5272","u7121","u7981","accept","u7533","u5408","u7a7a","congratulations","secret","u55b6","u6e80","red_circle","large_orange_circle","large_yellow_circle","large_green_circle","large_blue_circle","large_purple_circle","large_brown_circle","black_circle","white_circle","large_red_square","large_orange_square","large_yellow_square","large_green_square","large_blue_square","large_purple_square","large_brown_square","black_large_square","white_large_square","black_medium_square","white_medium_square","black_medium_small_square","white_medium_small_square","black_small_square","white_small_square","large_orange_diamond","large_blue_diamond","small_orange_diamond","small_blue_diamond","small_red_triangle","small_red_triangle_down","diamond_shape_with_a_dot_inside","radio_button","white_square_button","black_square_button"]},{"id":"flags","emojis":["checkered_flag","cn","crossed_flags","de","es","flag-ac","flag-ad","flag-ae","flag-af","flag-ag","flag-ai","flag-al","flag-am","flag-ao","flag-aq","flag-ar","flag-as","flag-at","flag-au","flag-aw","flag-ax","flag-az","flag-ba","flag-bb","flag-bd","flag-be","flag-bf","flag-bg","flag-bh","flag-bi","flag-bj","flag-bl","flag-bm","flag-bn","flag-bo","flag-bq","flag-br","flag-bs","flag-bt","flag-bv","flag-bw","flag-by","flag-bz","flag-ca","flag-cc","flag-cd","flag-cf","flag-cg","flag-ch","flag-ci","flag-ck","flag-cl","flag-cm","flag-co","flag-cp","flag-cr","flag-cu","flag-cv","flag-cw","flag-cx","flag-cy","flag-cz","flag-dg","flag-dj","flag-dk","flag-dm","flag-do","flag-dz","flag-ea","flag-ec","flag-ee","flag-eg","flag-eh","flag-england","flag-er","flag-et","flag-eu","flag-fi","flag-fj","flag-fk","flag-fm","flag-fo","flag-ga","flag-gd","flag-ge","flag-gf","flag-gg","flag-gh","flag-gi","flag-gl","flag-gm","flag-gn","flag-gp","flag-gq","flag-gr","flag-gs","flag-gt","flag-gu","flag-gw","flag-gy","flag-hk","flag-hm","flag-hn","flag-hr","flag-ht","flag-hu","flag-ic","flag-id","flag-ie","flag-il","flag-im","flag-in","flag-io","flag-iq","flag-ir","flag-is","flag-je","flag-jm","flag-jo","flag-ke","flag-kg","flag-kh","flag-ki","flag-km","flag-kn","flag-kp","flag-kw","flag-ky","flag-kz","flag-la","flag-lb","flag-lc","flag-li","flag-lk","flag-lr","flag-ls","flag-lt","flag-lu","flag-lv","flag-ly","flag-ma","flag-mc","flag-md","flag-me","flag-mf","flag-mg","flag-mh","flag-mk","flag-ml","flag-mm","flag-mn","flag-mo","flag-mp","flag-mq","flag-mr","flag-ms","flag-mt","flag-mu","flag-mv","flag-mw","flag-mx","flag-my","flag-mz","flag-na","flag-nc","flag-ne","flag-nf","flag-ng","flag-ni","flag-nl","flag-no","flag-np","flag-nr","flag-nu","flag-nz","flag-om","flag-pa","flag-pe","flag-pf","flag-pg","flag-ph","flag-pk","flag-pl","flag-pm","flag-pn","flag-pr","flag-ps","flag-pt","flag-pw","flag-py","flag-qa","flag-re","flag-ro","flag-rs","flag-rw","flag-sa","flag-sb","flag-sc","flag-scotland","flag-sd","flag-se","flag-sg","flag-sh","flag-si","flag-sj","flag-sk","flag-sl","flag-sm","flag-sn","flag-so","flag-sr","flag-ss","flag-st","flag-sv","flag-sx","flag-sy","flag-sz","flag-ta","flag-tc","flag-td","flag-tf","flag-tg","flag-th","flag-tj","flag-tk","flag-tl","flag-tm","flag-tn","flag-to","flag-tr","flag-tt","flag-tv","flag-tw","flag-tz","flag-ua","flag-ug","flag-um","flag-un","flag-uy","flag-uz","flag-va","flag-vc","flag-ve","flag-vg","flag-vi","flag-vn","flag-vu","flag-wales","flag-wf","flag-ws","flag-xk","flag-ye","flag-yt","flag-za","flag-zm","flag-zw","fr","gb","it","jp","kr","pirate_flag","rainbow-flag","ru","transgender_flag","triangular_flag_on_post","us","waving_black_flag","waving_white_flag"]}]'),oCe=JSON.parse(`{"100":{"id":"100","name":"Hundred Points","keywords":["100","score","perfect","numbers","century","exam","quiz","test","pass"],"skins":[{"unified":"1f4af","native":"💯"}],"version":1},"1234":{"id":"1234","name":"Input Numbers","keywords":["1234","blue","square","1","2","3","4"],"skins":[{"unified":"1f522","native":"🔢"}],"version":1},"grinning":{"id":"grinning","name":"Grinning Face","emoticons":[":D"],"keywords":["smile","happy","joy",":D","grin"],"skins":[{"unified":"1f600","native":"😀"}],"version":1},"smiley":{"id":"smiley","name":"Grinning Face with Big Eyes","emoticons":[":)","=)","=-)"],"keywords":["smiley","happy","joy","haha",":D",":)","smile","funny"],"skins":[{"unified":"1f603","native":"😃"}],"version":1},"smile":{"id":"smile","name":"Grinning Face with Smiling Eyes","emoticons":[":)","C:","c:",":D",":-D"],"keywords":["smile","happy","joy","funny","haha","laugh","like",":D",":)"],"skins":[{"unified":"1f604","native":"😄"}],"version":1},"grin":{"id":"grin","name":"Beaming Face with Smiling Eyes","keywords":["grin","happy","smile","joy","kawaii"],"skins":[{"unified":"1f601","native":"😁"}],"version":1},"laughing":{"id":"laughing","name":"Grinning Squinting Face","emoticons":[":>",":->"],"keywords":["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],"skins":[{"unified":"1f606","native":"😆"}],"version":1},"sweat_smile":{"id":"sweat_smile","name":"Grinning Face with Sweat","keywords":["smile","hot","happy","laugh","relief"],"skins":[{"unified":"1f605","native":"😅"}],"version":1},"rolling_on_the_floor_laughing":{"id":"rolling_on_the_floor_laughing","name":"Rolling on the Floor Laughing","keywords":["face","lol","haha","rofl"],"skins":[{"unified":"1f923","native":"🤣"}],"version":3},"joy":{"id":"joy","name":"Face with Tears of Joy","keywords":["cry","weep","happy","happytears","haha"],"skins":[{"unified":"1f602","native":"😂"}],"version":1},"slightly_smiling_face":{"id":"slightly_smiling_face","name":"Slightly Smiling Face","emoticons":[":)","(:",":-)"],"keywords":["smile"],"skins":[{"unified":"1f642","native":"🙂"}],"version":1},"upside_down_face":{"id":"upside_down_face","name":"Upside-Down Face","keywords":["upside","down","flipped","silly","smile"],"skins":[{"unified":"1f643","native":"🙃"}],"version":1},"melting_face":{"id":"melting_face","name":"Melting Face","keywords":["hot","heat"],"skins":[{"unified":"1fae0","native":"🫠"}],"version":14},"wink":{"id":"wink","name":"Winking Face","emoticons":[";)",";-)"],"keywords":["wink","happy","mischievous","secret",";)","smile","eye"],"skins":[{"unified":"1f609","native":"😉"}],"version":1},"blush":{"id":"blush","name":"Smiling Face with Smiling Eyes","emoticons":[":)"],"keywords":["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],"skins":[{"unified":"1f60a","native":"😊"}],"version":1},"innocent":{"id":"innocent","name":"Smiling Face with Halo","keywords":["innocent","angel","heaven"],"skins":[{"unified":"1f607","native":"😇"}],"version":1},"smiling_face_with_3_hearts":{"id":"smiling_face_with_3_hearts","name":"Smiling Face with Hearts","keywords":["3","love","like","affection","valentines","infatuation","crush","adore"],"skins":[{"unified":"1f970","native":"🥰"}],"version":11},"heart_eyes":{"id":"heart_eyes","name":"Smiling Face with Heart-Eyes","keywords":["heart","eyes","love","like","affection","valentines","infatuation","crush"],"skins":[{"unified":"1f60d","native":"😍"}],"version":1},"star-struck":{"id":"star-struck","name":"Star-Struck","keywords":["star","struck","grinning","face","with","eyes","smile","starry"],"skins":[{"unified":"1f929","native":"🤩"}],"version":5},"kissing_heart":{"id":"kissing_heart","name":"Face Blowing a Kiss","emoticons":[":*",":-*"],"keywords":["kissing","heart","love","like","affection","valentines","infatuation"],"skins":[{"unified":"1f618","native":"😘"}],"version":1},"kissing":{"id":"kissing","name":"Kissing Face","keywords":["love","like","3","valentines","infatuation","kiss"],"skins":[{"unified":"1f617","native":"😗"}],"version":1},"relaxed":{"id":"relaxed","name":"Smiling Face","keywords":["relaxed","blush","massage","happiness"],"skins":[{"unified":"263a-fe0f","native":"☺️"}],"version":1},"kissing_closed_eyes":{"id":"kissing_closed_eyes","name":"Kissing Face with Closed Eyes","keywords":["love","like","affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f61a","native":"😚"}],"version":1},"kissing_smiling_eyes":{"id":"kissing_smiling_eyes","name":"Kissing Face with Smiling Eyes","keywords":["affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f619","native":"😙"}],"version":1},"smiling_face_with_tear":{"id":"smiling_face_with_tear","name":"Smiling Face with Tear","keywords":["sad","cry","pretend"],"skins":[{"unified":"1f972","native":"🥲"}],"version":13},"yum":{"id":"yum","name":"Face Savoring Food","keywords":["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],"skins":[{"unified":"1f60b","native":"😋"}],"version":1},"stuck_out_tongue":{"id":"stuck_out_tongue","name":"Face with Tongue","emoticons":[":p",":-p",":P",":-P",":b",":-b"],"keywords":["stuck","out","prank","childish","playful","mischievous","smile"],"skins":[{"unified":"1f61b","native":"😛"}],"version":1},"stuck_out_tongue_winking_eye":{"id":"stuck_out_tongue_winking_eye","name":"Winking Face with Tongue","emoticons":[";p",";-p",";b",";-b",";P",";-P"],"keywords":["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],"skins":[{"unified":"1f61c","native":"😜"}],"version":1},"zany_face":{"id":"zany_face","name":"Zany Face","keywords":["grinning","with","one","large","and","small","eye","goofy","crazy"],"skins":[{"unified":"1f92a","native":"🤪"}],"version":5},"stuck_out_tongue_closed_eyes":{"id":"stuck_out_tongue_closed_eyes","name":"Squinting Face with Tongue","keywords":["stuck","out","closed","eyes","prank","playful","mischievous","smile"],"skins":[{"unified":"1f61d","native":"😝"}],"version":1},"money_mouth_face":{"id":"money_mouth_face","name":"Money-Mouth Face","keywords":["money","mouth","rich","dollar"],"skins":[{"unified":"1f911","native":"🤑"}],"version":1},"hugging_face":{"id":"hugging_face","name":"Hugging Face","keywords":["smile","hug"],"skins":[{"unified":"1f917","native":"🤗"}],"version":1},"face_with_hand_over_mouth":{"id":"face_with_hand_over_mouth","name":"Face with Hand over Mouth","keywords":["smiling","eyes","and","covering","whoops","shock","surprise"],"skins":[{"unified":"1f92d","native":"🤭"}],"version":5},"face_with_open_eyes_and_hand_over_mouth":{"id":"face_with_open_eyes_and_hand_over_mouth","name":"Face with Open Eyes and Hand over Mouth","keywords":["silence","secret","shock","surprise"],"skins":[{"unified":"1fae2","native":"🫢"}],"version":14},"face_with_peeking_eye":{"id":"face_with_peeking_eye","name":"Face with Peeking Eye","keywords":["scared","frightening","embarrassing","shy"],"skins":[{"unified":"1fae3","native":"🫣"}],"version":14},"shushing_face":{"id":"shushing_face","name":"Shushing Face","keywords":["with","finger","covering","closed","lips","quiet","shhh"],"skins":[{"unified":"1f92b","native":"🤫"}],"version":5},"thinking_face":{"id":"thinking_face","name":"Thinking Face","keywords":["hmmm","think","consider"],"skins":[{"unified":"1f914","native":"🤔"}],"version":1},"saluting_face":{"id":"saluting_face","name":"Saluting Face","keywords":["respect","salute"],"skins":[{"unified":"1fae1","native":"🫡"}],"version":14},"zipper_mouth_face":{"id":"zipper_mouth_face","name":"Zipper-Mouth Face","keywords":["zipper","mouth","sealed","secret"],"skins":[{"unified":"1f910","native":"🤐"}],"version":1},"face_with_raised_eyebrow":{"id":"face_with_raised_eyebrow","name":"Face with Raised Eyebrow","keywords":["one","distrust","scepticism","disapproval","disbelief","surprise"],"skins":[{"unified":"1f928","native":"🤨"}],"version":5},"neutral_face":{"id":"neutral_face","name":"Neutral Face","emoticons":[":|",":-|"],"keywords":["indifference","meh",":",""],"skins":[{"unified":"1f610","native":"😐"}],"version":1},"expressionless":{"id":"expressionless","name":"Expressionless Face","emoticons":["-_-"],"keywords":["indifferent","-","","meh","deadpan"],"skins":[{"unified":"1f611","native":"😑"}],"version":1},"no_mouth":{"id":"no_mouth","name":"Face Without Mouth","keywords":["no","hellokitty"],"skins":[{"unified":"1f636","native":"😶"}],"version":1},"dotted_line_face":{"id":"dotted_line_face","name":"Dotted Line Face","keywords":["invisible","lonely","isolation","depression"],"skins":[{"unified":"1fae5","native":"🫥"}],"version":14},"face_in_clouds":{"id":"face_in_clouds","name":"Face in Clouds","keywords":["shower","steam","dream"],"skins":[{"unified":"1f636-200d-1f32b-fe0f","native":"😶‍🌫️"}],"version":13.1},"smirk":{"id":"smirk","name":"Smirking Face","keywords":["smirk","smile","mean","prank","smug","sarcasm"],"skins":[{"unified":"1f60f","native":"😏"}],"version":1},"unamused":{"id":"unamused","name":"Unamused Face","emoticons":[":("],"keywords":["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],"skins":[{"unified":"1f612","native":"😒"}],"version":1},"face_with_rolling_eyes":{"id":"face_with_rolling_eyes","name":"Face with Rolling Eyes","keywords":["eyeroll","frustrated"],"skins":[{"unified":"1f644","native":"🙄"}],"version":1},"grimacing":{"id":"grimacing","name":"Grimacing Face","keywords":["grimace","teeth"],"skins":[{"unified":"1f62c","native":"😬"}],"version":1},"face_exhaling":{"id":"face_exhaling","name":"Face Exhaling","keywords":["relieve","relief","tired","sigh"],"skins":[{"unified":"1f62e-200d-1f4a8","native":"😮‍💨"}],"version":13.1},"lying_face":{"id":"lying_face","name":"Lying Face","keywords":["lie","pinocchio"],"skins":[{"unified":"1f925","native":"🤥"}],"version":3},"shaking_face":{"id":"shaking_face","name":"Shaking Face","keywords":["dizzy","shock","blurry","earthquake"],"skins":[{"unified":"1fae8","native":"🫨"}],"version":15},"relieved":{"id":"relieved","name":"Relieved Face","keywords":["relaxed","phew","massage","happiness"],"skins":[{"unified":"1f60c","native":"😌"}],"version":1},"pensive":{"id":"pensive","name":"Pensive Face","keywords":["sad","depressed","upset"],"skins":[{"unified":"1f614","native":"😔"}],"version":1},"sleepy":{"id":"sleepy","name":"Sleepy Face","keywords":["tired","rest","nap"],"skins":[{"unified":"1f62a","native":"😪"}],"version":1},"drooling_face":{"id":"drooling_face","name":"Drooling Face","keywords":[],"skins":[{"unified":"1f924","native":"🤤"}],"version":3},"sleeping":{"id":"sleeping","name":"Sleeping Face","keywords":["tired","sleepy","night","zzz"],"skins":[{"unified":"1f634","native":"😴"}],"version":1},"mask":{"id":"mask","name":"Face with Medical Mask","keywords":["sick","ill","disease","covid"],"skins":[{"unified":"1f637","native":"😷"}],"version":1},"face_with_thermometer":{"id":"face_with_thermometer","name":"Face with Thermometer","keywords":["sick","temperature","cold","fever","covid"],"skins":[{"unified":"1f912","native":"🤒"}],"version":1},"face_with_head_bandage":{"id":"face_with_head_bandage","name":"Face with Head-Bandage","keywords":["head","bandage","injured","clumsy","hurt"],"skins":[{"unified":"1f915","native":"🤕"}],"version":1},"nauseated_face":{"id":"nauseated_face","name":"Nauseated Face","keywords":["vomit","gross","green","sick","throw","up","ill"],"skins":[{"unified":"1f922","native":"🤢"}],"version":3},"face_vomiting":{"id":"face_vomiting","name":"Face Vomiting","keywords":["with","open","mouth","sick"],"skins":[{"unified":"1f92e","native":"🤮"}],"version":5},"sneezing_face":{"id":"sneezing_face","name":"Sneezing Face","keywords":["gesundheit","sneeze","sick","allergy"],"skins":[{"unified":"1f927","native":"🤧"}],"version":3},"hot_face":{"id":"hot_face","name":"Hot Face","keywords":["feverish","heat","red","sweating"],"skins":[{"unified":"1f975","native":"🥵"}],"version":11},"cold_face":{"id":"cold_face","name":"Cold Face","keywords":["blue","freezing","frozen","frostbite","icicles"],"skins":[{"unified":"1f976","native":"🥶"}],"version":11},"woozy_face":{"id":"woozy_face","name":"Woozy Face","keywords":["dizzy","intoxicated","tipsy","wavy"],"skins":[{"unified":"1f974","native":"🥴"}],"version":11},"dizzy_face":{"id":"dizzy_face","name":"Dizzy Face","keywords":["spent","unconscious","xox"],"skins":[{"unified":"1f635","native":"😵"}],"version":1},"face_with_spiral_eyes":{"id":"face_with_spiral_eyes","name":"Face with Spiral Eyes","keywords":["sick","ill","confused","nauseous","nausea"],"skins":[{"unified":"1f635-200d-1f4ab","native":"😵‍💫"}],"version":13.1},"exploding_head":{"id":"exploding_head","name":"Exploding Head","keywords":["shocked","face","with","mind","blown"],"skins":[{"unified":"1f92f","native":"🤯"}],"version":5},"face_with_cowboy_hat":{"id":"face_with_cowboy_hat","name":"Cowboy Hat Face","keywords":["with","cowgirl"],"skins":[{"unified":"1f920","native":"🤠"}],"version":3},"partying_face":{"id":"partying_face","name":"Partying Face","keywords":["celebration","woohoo"],"skins":[{"unified":"1f973","native":"🥳"}],"version":11},"disguised_face":{"id":"disguised_face","name":"Disguised Face","keywords":["pretent","brows","glasses","moustache"],"skins":[{"unified":"1f978","native":"🥸"}],"version":13},"sunglasses":{"id":"sunglasses","name":"Smiling Face with Sunglasses","emoticons":["8)"],"keywords":["cool","smile","summer","beach","sunglass"],"skins":[{"unified":"1f60e","native":"😎"}],"version":1},"nerd_face":{"id":"nerd_face","name":"Nerd Face","keywords":["nerdy","geek","dork"],"skins":[{"unified":"1f913","native":"🤓"}],"version":1},"face_with_monocle":{"id":"face_with_monocle","name":"Face with Monocle","keywords":["stuffy","wealthy"],"skins":[{"unified":"1f9d0","native":"🧐"}],"version":5},"confused":{"id":"confused","name":"Confused Face","emoticons":[":\\\\",":-\\\\",":/",":-/"],"keywords":["indifference","huh","weird","hmmm",":/"],"skins":[{"unified":"1f615","native":"😕"}],"version":1},"face_with_diagonal_mouth":{"id":"face_with_diagonal_mouth","name":"Face with Diagonal Mouth","keywords":["skeptic","confuse","frustrated","indifferent"],"skins":[{"unified":"1fae4","native":"🫤"}],"version":14},"worried":{"id":"worried","name":"Worried Face","keywords":["concern","nervous",":("],"skins":[{"unified":"1f61f","native":"😟"}],"version":1},"slightly_frowning_face":{"id":"slightly_frowning_face","name":"Slightly Frowning Face","keywords":["disappointed","sad","upset"],"skins":[{"unified":"1f641","native":"🙁"}],"version":1},"white_frowning_face":{"id":"white_frowning_face","name":"Frowning Face","keywords":["white","sad","upset","frown"],"skins":[{"unified":"2639-fe0f","native":"☹️"}],"version":1},"open_mouth":{"id":"open_mouth","name":"Face with Open Mouth","emoticons":[":o",":-o",":O",":-O"],"keywords":["surprise","impressed","wow","whoa",":O"],"skins":[{"unified":"1f62e","native":"😮"}],"version":1},"hushed":{"id":"hushed","name":"Hushed Face","keywords":["woo","shh"],"skins":[{"unified":"1f62f","native":"😯"}],"version":1},"astonished":{"id":"astonished","name":"Astonished Face","keywords":["xox","surprised","poisoned"],"skins":[{"unified":"1f632","native":"😲"}],"version":1},"flushed":{"id":"flushed","name":"Flushed Face","keywords":["blush","shy","flattered"],"skins":[{"unified":"1f633","native":"😳"}],"version":1},"pleading_face":{"id":"pleading_face","name":"Pleading Face","keywords":["begging","mercy","cry","tears","sad","grievance"],"skins":[{"unified":"1f97a","native":"🥺"}],"version":11},"face_holding_back_tears":{"id":"face_holding_back_tears","name":"Face Holding Back Tears","keywords":["touched","gratitude","cry"],"skins":[{"unified":"1f979","native":"🥹"}],"version":14},"frowning":{"id":"frowning","name":"Frowning Face with Open Mouth","keywords":["aw","what"],"skins":[{"unified":"1f626","native":"😦"}],"version":1},"anguished":{"id":"anguished","name":"Anguished Face","emoticons":["D:"],"keywords":["stunned","nervous"],"skins":[{"unified":"1f627","native":"😧"}],"version":1},"fearful":{"id":"fearful","name":"Fearful Face","keywords":["scared","terrified","nervous"],"skins":[{"unified":"1f628","native":"😨"}],"version":1},"cold_sweat":{"id":"cold_sweat","name":"Anxious Face with Sweat","keywords":["cold","nervous"],"skins":[{"unified":"1f630","native":"😰"}],"version":1},"disappointed_relieved":{"id":"disappointed_relieved","name":"Sad but Relieved Face","keywords":["disappointed","phew","sweat","nervous"],"skins":[{"unified":"1f625","native":"😥"}],"version":1},"cry":{"id":"cry","name":"Crying Face","emoticons":[":'("],"keywords":["cry","tears","sad","depressed","upset",":'("],"skins":[{"unified":"1f622","native":"😢"}],"version":1},"sob":{"id":"sob","name":"Loudly Crying Face","emoticons":[":'("],"keywords":["sob","cry","tears","sad","upset","depressed"],"skins":[{"unified":"1f62d","native":"😭"}],"version":1},"scream":{"id":"scream","name":"Face Screaming in Fear","keywords":["scream","munch","scared","omg"],"skins":[{"unified":"1f631","native":"😱"}],"version":1},"confounded":{"id":"confounded","name":"Confounded Face","keywords":["confused","sick","unwell","oops",":S"],"skins":[{"unified":"1f616","native":"😖"}],"version":1},"persevere":{"id":"persevere","name":"Persevering Face","keywords":["persevere","sick","no","upset","oops"],"skins":[{"unified":"1f623","native":"😣"}],"version":1},"disappointed":{"id":"disappointed","name":"Disappointed Face","emoticons":["):",":(",":-("],"keywords":["sad","upset","depressed",":("],"skins":[{"unified":"1f61e","native":"😞"}],"version":1},"sweat":{"id":"sweat","name":"Face with Cold Sweat","keywords":["downcast","hot","sad","tired","exercise"],"skins":[{"unified":"1f613","native":"😓"}],"version":1},"weary":{"id":"weary","name":"Weary Face","keywords":["tired","sleepy","sad","frustrated","upset"],"skins":[{"unified":"1f629","native":"😩"}],"version":1},"tired_face":{"id":"tired_face","name":"Tired Face","keywords":["sick","whine","upset","frustrated"],"skins":[{"unified":"1f62b","native":"😫"}],"version":1},"yawning_face":{"id":"yawning_face","name":"Yawning Face","keywords":["tired","sleepy"],"skins":[{"unified":"1f971","native":"🥱"}],"version":12},"triumph":{"id":"triumph","name":"Face with Look of Triumph","keywords":["steam","from","nose","gas","phew","proud","pride"],"skins":[{"unified":"1f624","native":"😤"}],"version":1},"rage":{"id":"rage","name":"Pouting Face","keywords":["rage","angry","mad","hate","despise"],"skins":[{"unified":"1f621","native":"😡"}],"version":1},"angry":{"id":"angry","name":"Angry Face","emoticons":[">:(",">:-("],"keywords":["mad","annoyed","frustrated"],"skins":[{"unified":"1f620","native":"😠"}],"version":1},"face_with_symbols_on_mouth":{"id":"face_with_symbols_on_mouth","name":"Face with Symbols on Mouth","keywords":["serious","covering","swearing","cursing","cussing","profanity","expletive"],"skins":[{"unified":"1f92c","native":"🤬"}],"version":5},"smiling_imp":{"id":"smiling_imp","name":"Smiling Face with Horns","keywords":["imp","devil"],"skins":[{"unified":"1f608","native":"😈"}],"version":1},"imp":{"id":"imp","name":"Imp","keywords":["angry","face","with","horns","devil"],"skins":[{"unified":"1f47f","native":"👿"}],"version":1},"skull":{"id":"skull","name":"Skull","keywords":["dead","skeleton","creepy","death"],"skins":[{"unified":"1f480","native":"💀"}],"version":1},"skull_and_crossbones":{"id":"skull_and_crossbones","name":"Skull and Crossbones","keywords":["poison","danger","deadly","scary","death","pirate","evil"],"skins":[{"unified":"2620-fe0f","native":"☠️"}],"version":1},"hankey":{"id":"hankey","name":"Pile of Poo","keywords":["hankey","poop","shit","shitface","fail","turd"],"skins":[{"unified":"1f4a9","native":"💩"}],"version":1},"clown_face":{"id":"clown_face","name":"Clown Face","keywords":[],"skins":[{"unified":"1f921","native":"🤡"}],"version":3},"japanese_ogre":{"id":"japanese_ogre","name":"Ogre","keywords":["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],"skins":[{"unified":"1f479","native":"👹"}],"version":1},"japanese_goblin":{"id":"japanese_goblin","name":"Goblin","keywords":["japanese","red","evil","mask","monster","scary","creepy"],"skins":[{"unified":"1f47a","native":"👺"}],"version":1},"ghost":{"id":"ghost","name":"Ghost","keywords":["halloween","spooky","scary"],"skins":[{"unified":"1f47b","native":"👻"}],"version":1},"alien":{"id":"alien","name":"Alien","keywords":["UFO","paul","weird","outer","space"],"skins":[{"unified":"1f47d","native":"👽"}],"version":1},"space_invader":{"id":"space_invader","name":"Alien Monster","keywords":["space","invader","game","arcade","play"],"skins":[{"unified":"1f47e","native":"👾"}],"version":1},"robot_face":{"id":"robot_face","name":"Robot","keywords":["face","computer","machine","bot"],"skins":[{"unified":"1f916","native":"🤖"}],"version":1},"smiley_cat":{"id":"smiley_cat","name":"Grinning Cat","keywords":["smiley","animal","cats","happy","smile"],"skins":[{"unified":"1f63a","native":"😺"}],"version":1},"smile_cat":{"id":"smile_cat","name":"Grinning Cat with Smiling Eyes","keywords":["smile","animal","cats"],"skins":[{"unified":"1f638","native":"😸"}],"version":1},"joy_cat":{"id":"joy_cat","name":"Cat with Tears of Joy","keywords":["animal","cats","haha","happy"],"skins":[{"unified":"1f639","native":"😹"}],"version":1},"heart_eyes_cat":{"id":"heart_eyes_cat","name":"Smiling Cat with Heart-Eyes","keywords":["heart","eyes","animal","love","like","affection","cats","valentines"],"skins":[{"unified":"1f63b","native":"😻"}],"version":1},"smirk_cat":{"id":"smirk_cat","name":"Cat with Wry Smile","keywords":["smirk","animal","cats"],"skins":[{"unified":"1f63c","native":"😼"}],"version":1},"kissing_cat":{"id":"kissing_cat","name":"Kissing Cat","keywords":["animal","cats","kiss"],"skins":[{"unified":"1f63d","native":"😽"}],"version":1},"scream_cat":{"id":"scream_cat","name":"Weary Cat","keywords":["scream","animal","cats","munch","scared"],"skins":[{"unified":"1f640","native":"🙀"}],"version":1},"crying_cat_face":{"id":"crying_cat_face","name":"Crying Cat","keywords":["face","animal","tears","weep","sad","cats","upset","cry"],"skins":[{"unified":"1f63f","native":"😿"}],"version":1},"pouting_cat":{"id":"pouting_cat","name":"Pouting Cat","keywords":["animal","cats"],"skins":[{"unified":"1f63e","native":"😾"}],"version":1},"see_no_evil":{"id":"see_no_evil","name":"See-No-Evil Monkey","keywords":["see","no","evil","animal","nature","haha"],"skins":[{"unified":"1f648","native":"🙈"}],"version":1},"hear_no_evil":{"id":"hear_no_evil","name":"Hear-No-Evil Monkey","keywords":["hear","no","evil","animal","nature"],"skins":[{"unified":"1f649","native":"🙉"}],"version":1},"speak_no_evil":{"id":"speak_no_evil","name":"Speak-No-Evil Monkey","keywords":["speak","no","evil","animal","nature","omg"],"skins":[{"unified":"1f64a","native":"🙊"}],"version":1},"love_letter":{"id":"love_letter","name":"Love Letter","keywords":["email","like","affection","envelope","valentines"],"skins":[{"unified":"1f48c","native":"💌"}],"version":1},"cupid":{"id":"cupid","name":"Heart with Arrow","keywords":["cupid","love","like","affection","valentines"],"skins":[{"unified":"1f498","native":"💘"}],"version":1},"gift_heart":{"id":"gift_heart","name":"Heart with Ribbon","keywords":["gift","love","valentines"],"skins":[{"unified":"1f49d","native":"💝"}],"version":1},"sparkling_heart":{"id":"sparkling_heart","name":"Sparkling Heart","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f496","native":"💖"}],"version":1},"heartpulse":{"id":"heartpulse","name":"Growing Heart","keywords":["heartpulse","like","love","affection","valentines","pink"],"skins":[{"unified":"1f497","native":"💗"}],"version":1},"heartbeat":{"id":"heartbeat","name":"Beating Heart","keywords":["heartbeat","love","like","affection","valentines","pink"],"skins":[{"unified":"1f493","native":"💓"}],"version":1},"revolving_hearts":{"id":"revolving_hearts","name":"Revolving Hearts","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f49e","native":"💞"}],"version":1},"two_hearts":{"id":"two_hearts","name":"Two Hearts","keywords":["love","like","affection","valentines","heart"],"skins":[{"unified":"1f495","native":"💕"}],"version":1},"heart_decoration":{"id":"heart_decoration","name":"Heart Decoration","keywords":["purple","square","love","like"],"skins":[{"unified":"1f49f","native":"💟"}],"version":1},"heavy_heart_exclamation_mark_ornament":{"id":"heavy_heart_exclamation_mark_ornament","name":"Heart Exclamation","keywords":["heavy","mark","ornament","decoration","love"],"skins":[{"unified":"2763-fe0f","native":"❣️"}],"version":1},"broken_heart":{"id":"broken_heart","name":"Broken Heart","emoticons":["2&&(o.children=arguments.length>3?j0.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return ig(e,o,i,r,null)}function ig(e,n,t,i,r){var a={type:e,props:n,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++nW};return r==null&&gn.vnode!=null&&gn.vnode(a),a}function Ro(){return{current:null}}function dc(e){return e.children}function eo(e,n){this.props=e,this.context=n}function hc(e,n){if(n==null)return e.__?hc(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?ig(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=t,v.__b=t.__b+1,(p=_[h])===null||p&&v.key==p.key&&v.type===p.type)_[h]=void 0;else for(d=0;d{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const n=25,t=20,i=Math.floor(n/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=t*2,e.canvas.height=n,r=>{e.clearRect(0,0,t*2,n),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,t,22);const a=e.getImageData(0,0,t,n).data,o=a.length;let l=0;for(;l=o)return!1;const f=t+l/4%t,c=Math.floor(l/4/t),h=e.getImageData(f,c,1,1).data;return!(a[l]!==h[0]||a[l+2]!==h[2]||e.measureText(r).width>=t)}})();var k$={latestVersion:yCe,noCountryFlags:bCe};const J4=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Di=null;function kCe(e){Di||(Di=Qs.get("frequently")||{});const n=e.id||e;n&&(Di[n]||(Di[n]=0),Di[n]+=1,Qs.set("last",n),Qs.set("frequently",Di))}function _Ce({maxFrequentRows:e,perLine:n}){if(!e)return[];Di||(Di=Qs.get("frequently"));let t=[];if(!Di){Di={};for(let a in J4.slice(0,n)){const o=J4[a];Di[o]=n-a,t.push(o)}return t}const i=e*n,r=Qs.get("last");for(let a in Di)t.push(a);if(t.sort((a,o)=>{const l=Di[o],f=Di[a];return l==f?a.localeCompare(o):l-f}),t.length>i){const a=t.slice(i);t=t.slice(0,i);for(let o of a)o!=r&&delete Di[o];r&&t.indexOf(r)==-1&&(delete Di[t[t.length-1]],t.splice(-1,1,r)),Qs.set("frequently",Di)}return t}var mW={add:kCe,get:_Ce,DEFAULTS:J4},pW={};pW=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var No={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Fi=null,Un=null;const B3={};async function _$(e){if(B3[e])return B3[e];const t=await(await fetch(e)).json();return B3[e]=t,t}let F3=null,vW=null,gW=!1;function D0(e,{caller:n}={}){return F3||(F3=new Promise(t=>{vW=t})),e?xCe(e):n&&!gW&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),F3}async function xCe(e){gW=!0;let{emojiVersion:n,set:t,locale:i}=e;if(n||(n=No.emojiVersion.value),t||(t=No.set.value),i||(i=No.locale.value),Un)Un.categories=Un.categories.filter(f=>!f.name);else{Un=(typeof e.data=="function"?await e.data():e.data)||await _$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),Un.emoticons={},Un.natives={},Un.categories.unshift({id:"frequent",emojis:[]});for(const f in Un.aliases){const c=Un.aliases[f],h=Un.emojis[c];h&&(h.aliases||(h.aliases=[]),h.aliases.push(f))}Un.originalCategories=Un.categories}if(Fi=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?eW(pW):await _$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let f in e.custom){f=parseInt(f);const c=e.custom[f],h=e.custom[f-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${f+1}`),c.name||(c.name=Fi.categories.custom),h&&!c.icon&&(c.target=h.target||h),Un.categories.push(c);for(const d of c.emojis)Un.emojis[d.id]=d}}e.categories&&(Un.categories=Un.originalCategories.filter(f=>e.categories.indexOf(f.id)!=-1).sort((f,c)=>{const h=e.categories.indexOf(f.id),d=e.categories.indexOf(c.id);return h-d}));let r=null,a=null;t=="native"&&(r=k$.latestVersion(),a=e.noCountryFlags||k$.noCountryFlags());let o=Un.categories.length,l=!1;for(;o--;){const f=Un.categories[o];if(f.id=="frequent"){let{maxFrequentRows:d,perLine:p}=e;d=d>=0?d:No.maxFrequentRows.value,p||(p=No.perLine.value),f.emojis=mW.get({maxFrequentRows:d,perLine:p})}if(!f.emojis||!f.emojis.length){Un.categories.splice(o,1);continue}const{categoryIcons:c}=e;if(c){const d=c[f.id];d&&!f.icon&&(f.icon=d)}let h=f.emojis.length;for(;h--;){const d=f.emojis[h],p=d.id?d:Un.emojis[d],v=()=>{f.emojis.splice(h,1)};if(!p||e.exceptEmojis&&e.exceptEmojis.includes(p.id)){v();continue}if(r&&p.version>r){v();continue}if(a&&f.id=="flags"&&!ECe.includes(p.id)){v();continue}if(!p.search){if(l=!0,p.search=","+[[p.id,!1],[p.name,!0],[p.keywords,!1],[p.emoticons,!1]].map(([b,w])=>{if(b)return(Array.isArray(b)?b:[b]).map(_=>(w?_.split(/[-|_|\s]+/):[_]).map(S=>S.toLowerCase())).flat()}).flat().filter(b=>b&&b.trim()).join(","),p.emoticons)for(const b of p.emoticons)Un.emoticons[b]||(Un.emoticons[b]=p.id);let y=0;for(const b of p.skins){if(!b)continue;y++;const{native:w}=b;w&&(Un.natives[w]=p.id,p.search+=`,${w}`);const _=y==1?"":`:skin-tone-${y}:`;b.shortcodes=`:${p.id}:${_}`}}}}l&&Nf.reset(),vW()}function yW(e,n,t){e||(e={});const i={};for(let r in n)i[r]=bW(r,e,n,t);return i}function bW(e,n,t,i){const r=t[e];let a=i&&i.getAttribute(e)||(n[e]!=null&&n[e]!=null?n[e]:null);return r&&(a!=null&&r.value&&typeof r.value!=typeof a&&(typeof r.value=="boolean"?a=a!="false":a=r.value.constructor(a)),r.transform&&a&&(a=r.transform(a)),(a==null||r.choices&&r.choices.indexOf(a)==-1)&&(a=r.value)),a}const SCe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let e6=null;function CCe(e){return e.id?e:Un.emojis[e]||Un.emojis[Un.aliases[e]]||Un.emojis[Un.natives[e]]}function ACe(){e6=null}async function OCe(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await D0(null,{caller:t||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,f,c)=>l.trim()&&c.indexOf(l)==f);if(!i.length)return;let r=e6||(e6=Object.values(Un.emojis)),a,o;for(const l of i){if(!r.length)break;a=[],o={};for(const f of r){if(!f.search)continue;const c=f.search.indexOf(`,${l}`);c!=-1&&(a.push(f),o[f.id]||(o[f.id]=0),o[f.id]+=f.id==l?0:c+1)}r=a}return a.length<2||(a.sort((l,f)=>{const c=o[l.id],h=o[f.id];return c==h?l.id.localeCompare(f.id):c-h}),a.length>n&&(a=a.slice(0,n))),a}var Nf={search:OCe,get:CCe,reset:ACe,SHORTCODES_REGEX:SCe};const ECe=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function TCe(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,i)=>t==n[i])}async function MCe(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function jCe(e,{skinIndex:n=0}={}){const t=e.skins[n]||(n=0,e.skins[n]),i={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=n+1),t.src&&(i.src=t.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}const DCe={activity:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Re("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Re("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Re("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Re("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Re("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Re("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Re("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Re("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Re("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Re("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Re("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Re("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Re("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Re("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Re("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Re("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Re("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Re("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Re("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Re("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Re("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Re("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Re("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Re("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},RCe={loupe:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Re("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Re("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Re("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var D1={categories:DCe,search:RCe};function n6(e){let{id:n,skin:t,emoji:i}=e;if(e.shortcodes){const l=e.shortcodes.match(Nf.SHORTCODES_REGEX);l&&(n=l[1],l[2]&&(t=l[2]))}if(i||(i=Nf.get(n||e.native)),!i)return e.fallback;const r=i.skins[t-1]||i.skins[0],a=r.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${r.unified}.png`:void 0),o=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return Re("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?Re("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:a}):e.set=="native"?Re("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):Re("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${o})`,backgroundSize:`${100*Un.sheet.cols}% ${100*Un.sheet.rows}%`,backgroundPosition:`${100/(Un.sheet.cols-1)*r.x}% ${100/(Un.sheet.rows-1)*r.y}%`}})})}const PCe=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class wW extends PCe{static get observedAttributes(){return Object.keys(this.Props)}update(n={}){for(let t in n)this.attributeChangedCallback(t,null,n[t])}attributeChangedCallback(n,t,i){if(!this.component)return;const r=bW(n,{[n]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[n]:r}):(this.component.props[n]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(n={}){if(super(),this.props=n,n.parent||n.ref){let t=null;const i=n.parent||(t=n.ref&&n.ref.current);t&&(t.innerHTML=""),i&&i.appendChild(this)}}}class NCe extends wW{setShadow(){this.attachShadow({mode:"open"})}injectStyles(n){if(!n)return;const t=document.createElement("style");t.textContent=n,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(n,{styles:t}={}){super(n),this.setShadow(),this.injectStyles(t)}}var kW={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:No.set,skin:No.skin};class _W extends wW{async connectedCallback(){const n=yW(this.props,kW,this);n.element=this,n.ref=t=>{this.component=t},await D0(),!this.disconnected&&dW(Re(n6,{...n}),this)}constructor(n){super(n)}}Jr(_W,"Props",kW);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",_W);var x$,t6=[],S$=gn.__b,C$=gn.__r,A$=gn.diffed,O$=gn.__c,E$=gn.unmount;function $Ce(){var e;for(t6.sort(function(n,t){return n.__v.__b-t.__v.__b});e=t6.pop();)if(e.__P)try{e.__H.__h.forEach(rg),e.__H.__h.forEach(i6),e.__H.__h=[]}catch(n){e.__H.__h=[],gn.__e(n,e.__v)}}gn.__b=function(e){S$&&S$(e)},gn.__r=function(e){C$&&C$(e);var n=e.__c.__H;n&&(n.__h.forEach(rg),n.__h.forEach(i6),n.__h=[])},gn.diffed=function(e){A$&&A$(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(t6.push(n)!==1&&x$===gn.requestAnimationFrame||((x$=gn.requestAnimationFrame)||function(t){var i,r=function(){clearTimeout(a),T$&&cancelAnimationFrame(i),setTimeout(t)},a=setTimeout(r,100);T$&&(i=requestAnimationFrame(r))})($Ce))},gn.__c=function(e,n){n.some(function(t){try{t.__h.forEach(rg),t.__h=t.__h.filter(function(i){return!i.__||i6(i)})}catch(i){n.some(function(r){r.__h&&(r.__h=[])}),n=[],gn.__e(i,t.__v)}}),O$&&O$(e,n)},gn.unmount=function(e){E$&&E$(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{rg(i)}catch(r){n=r}}),n&&gn.__e(n,t.__v))};var T$=typeof requestAnimationFrame=="function";function rg(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function i6(e){e.__c=e.__()}function zCe(e,n){for(var t in n)e[t]=n[t];return e}function M$(e,n){for(var t in e)if(t!=="__source"&&!(t in n))return!0;for(var i in n)if(i!=="__source"&&e[i]!==n[i])return!0;return!1}function R1(e){this.props=e}(R1.prototype=new eo).isPureReactComponent=!0,R1.prototype.shouldComponentUpdate=function(e,n){return M$(this.props,e)||M$(this.state,n)};var j$=gn.__b;gn.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),j$&&j$(e)};var LCe=gn.__e;gn.__e=function(e,n,t){if(e.then){for(var i,r=n;r=r.__;)if((i=r.__c)&&i.__c)return n.__e==null&&(n.__e=t.__e,n.__k=t.__k),i.__c(e,n)}LCe(e,n,t)};var D$=gn.unmount;function q3(){this.__u=0,this.t=null,this.__b=null}function xW(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function qv(){this.u=null,this.o=null}gn.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),D$&&D$(e)},(q3.prototype=new eo).__c=function(e,n){var t=n.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var r=xW(i.__v),a=!1,o=function(){a||(a=!0,t.__R=null,r?r(l):l())};t.__R=o;var l=function(){if(!--i.__u){if(i.state.__e){var c=i.state.__e;i.__v.__k[0]=(function d(p,v,y){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(b){return d(b,v,y)}),p.__c&&p.__c.__P===v&&(p.__e&&y.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=y)),p})(c,c.__c.__P,c.__c.__O)}var h;for(i.setState({__e:i.__b=null});h=i.t.pop();)h.forceUpdate()}},f=n.__h===!0;i.__u++||f||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(o,o)},q3.prototype.componentWillUnmount=function(){this.t=[]},q3.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=(function a(o,l,f){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),o.__c.__H=null),(o=zCe({},o)).__c!=null&&(o.__c.__P===f&&(o.__c.__P=l),o.__c=null),o.__k=o.__k&&o.__k.map(function(c){return a(c,l,f)})),o})(this.__b,t,i.__O=i.__P)}this.__b=null}var r=n.__e&&Q4(dc,null,e.fallback);return r&&(r.__h=null),[Q4(dc,null,n.__e?null:e.children),r]};var R$=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]{const r=t.name||Fi.categories[t.id],a=!this.props.unfocused&&t.id==this.state.categoryId;return a&&(n=i),Re("button",{"aria-label":r,"aria-selected":a||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:o=>o.preventDefault(),onClick:()=>{this.props.onClick({category:t,i})},children:this.renderIcon(t)})}),Re("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:n==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${n*100}%)`:`translateX(${n*100}%)`}})]})})}constructor(){super(),this.categories=Un.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class YCe extends R1{shouldComponentUpdate(n){for(let t in n)if(t!="children"&&n[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const Hv={rowsPerRender:10};class KCe extends eo{getInitialState(n=this.props){return{skin:Qs.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=Fi.rtl?"rtl":"ltr",this.refs={menu:Ro(),navigation:Ro(),scroll:Ro(),search:Ro(),searchInput:Ro(),skinToneButton:Ro(),skinToneRadio:Ro()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:n}=this.refs;n.current&&n.current.focus()}}componentWillReceiveProps(n){this.nextState||(this.nextState={});for(const t in n)this.nextState[t]=n[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let t=!1;for(const r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(t=!0);delete this.nextState;const i=this.getInitialState();if(t)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(n={}){await D0(this.props),this.initGrid(),this.unobserve(),this.setState(n,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var n;document.removeEventListener("click",this.handleClickOutside),(n=this.darkMedia)==null||n.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:n=[]}={}){Array.isArray(n)||(n=[n]);for(const t of this.observers)n.includes(t)||t.disconnect();this.observers=[].concat(n)}initGrid(){const{categories:n}=Un;this.refs.categories=new Map;const t=Un.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const i=(r,a)=>{const o=[];o.__categoryId=a.id,o.__index=r.length,this.grid.push(o);const l=this.grid.length-1,f=l%Hv.rowsPerRender?{}:Ro();return f.index=l,f.posinset=this.grid.setsize+1,r.push(f),o};for(let r of n){const a=[];let o=i(a,r);for(let l of r.emojis)o.length==this.getPerLine()&&(o=i(a,r)),this.grid.setsize+=1,o.push(l);this.refs.categories.set(r.id,{root:Ro(),rows:a})}}initTheme(n){if(n!="auto")return n;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(n=this.props){if(!n.dynamicWidth)return;const{element:t,emojiButtonSize:i}=n,r=()=>{const{width:o}=t.getBoundingClientRect();return Math.floor(o/i)},a=new ResizeObserver(()=>{this.unobserve({except:a}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return a.observe(t),this.observers.push(a),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([n,t]){const i=this.state.searchResults||this.grid,r=i[n]&&i[n][t];if(r)return Nf.get(r)}observeCategories(){const n=this.refs.navigation.current;if(!n)return;const t=new Map,i=o=>{o!=n.state.categoryId&&n.setState({categoryId:o})},r={root:this.refs.scroll.current,threshold:[0,1]},a=new IntersectionObserver(o=>{for(const f of o){const c=f.target.dataset.id;t.set(c,f.intersectionRatio)}const l=[...t];for(const[f,c]of l)if(c){i(f);break}},r);for(const{root:o}of this.refs.categories.values())a.observe(o.current);this.observers.push(a)}observeRows(){const n={...this.state.visibleRows},t=new IntersectionObserver(i=>{for(const r of i){const a=parseInt(r.target.dataset.index);r.isIntersecting?n[a]=!0:delete n[a]}this.setState({visibleRows:n})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(Hv.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*Hv.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const r of i)r.current&&t.observe(r.current);this.observers.push(t)}preventDefault(n){n.preventDefault()}unfocusSearch(){const n=this.refs.searchInput.current;n&&n.blur()}navigate({e:n,input:t,left:i,right:r,up:a,down:o}){const l=this.state.searchResults||this.grid;if(!l.length)return;let[f,c]=this.state.pos;const h=(()=>{if(f==0&&c==0&&!n.repeat&&(i||a))return null;if(f==-1)return!n.repeat&&(r||o)&&t.selectionStart==t.value.length?[0,0]:null;if(i||r){let d=l[f];const p=i?-1:1;if(c+=p,!d[c]){if(f+=p,d=l[f],!d)return f=i?0:l.length-1,c=i?0:l[f].length-1,[f,c];c=i?d.length-1:0}return[f,c]}if(a||o){f+=a?-1:1;const d=l[f];return d?(d[c]||(c=d.length-1),[f,c]):(f=a?0:l.length-1,c=a?0:l[f].length-1,[f,c])}})();if(h)n.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:h,keyboard:!0},()=>{this.scrollTo({row:h[0]})})}scrollTo({categoryId:n,row:t}){const i=this.state.searchResults||this.grid;if(!i.length)return;const r=this.refs.scroll.current,a=r.getBoundingClientRect();let o=0;if(t>=0&&(n=i[t].__categoryId),n&&(o=(this.refs[n]||this.refs.categories.get(n).root).current.getBoundingClientRect().top-(a.top-r.scrollTop)+1),t>=0)if(!t)o=0;else{const l=i[t].__index,f=o+l*this.props.emojiButtonSize,c=f+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(fr.scrollTop+a.height)o=c-a.height;else return}this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(n){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:n||[-1,-1],keyboard:!1})}handleEmojiClick({e:n,emoji:t,pos:i}){if(this.props.onEmojiSelect&&(!t&&i&&(t=this.getEmojiByPos(i)),t)){const r=jCe(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&mW.add(r,this.props),this.props.onEmojiSelect(r,n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(n){this.setState({tempSkin:n})}handleSkinClick(n){this.ignoreMouse(),this.closeSkins(),this.setState({skin:n,tempSkin:null}),Qs.set("skin",n)}renderNav(){return Re(GCe,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const n=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return Re("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Re("div",{class:"flex flex-middle flex-grow",children:[Re("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Re(n6,{emoji:n,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Re("div",{class:`margin-${this.dir[0]}`,children:n||t?Re("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Re("div",{class:"preview-title ellipsis",children:n?n.name:Fi.search_no_results_1}),Re("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:Fi.search_no_results_2})]}):Re("div",{class:"preview-placeholder color-c",children:Fi.pick})})]}),!n&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(n,{pos:t,posinset:i,grid:r}){const a=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,f=(n.skins[o-1]||n.skins[0]).native,c=TCe(this.state.pos,t),h=t.concat(n.id).join("");return Re(YCe,{selected:c,skin:o,size:a,children:Re("button",{"aria-label":f,"aria-selected":c||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?n.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:n}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Re("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),Re(n6,{emoji:n,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},h)}renderSearch(){const n=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return Re("div",{children:[Re("div",{class:"spacer"}),Re("div",{class:"flex flex-middle",children:[Re("div",{class:"search relative flex-grow",children:[Re("input",{type:"search",ref:this.refs.searchInput,placeholder:Fi.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Re("span",{class:"icon loupe flex",children:D1.search.loupe}),this.state.searchResults&&Re("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:D1.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?Re("div",{class:"category",ref:this.refs.search,children:[Re("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Fi.categories.search}),Re("div",{children:n.length?n.map((t,i)=>Re("div",{class:"flex",children:t.map((r,a)=>this.renderEmojiButton(r,{pos:[i,a],posinset:i*this.props.perLine+a+1,grid:n}))})):Re("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Re("a",{onClick:this.props.onAddCustomEmoji,children:Fi.add_custom})})})]}):null}renderCategories(){const{categories:n}=Un,t=!!this.state.searchResults,i=this.getPerLine();return Re("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0,height:"100%"},children:n.map(r=>{const{root:a,rows:o}=this.refs.categories.get(r.id);return Re("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:a,children:[Re("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Fi.categories[r.id]}),Re("div",{class:"relative",style:{height:o.length*this.props.emojiButtonSize},children:o.map((l,f)=>{const c=l.index-l.index%Hv.rowsPerRender,h=this.state.visibleRows[c],d="current"in l?l:void 0;if(!h&&!d)return null;const p=f*i,v=p+i,y=r.emojis.slice(p,v);return y.length{if(!b)return Re("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const _=Nf.get(b);return this.renderEmojiButton(_,{pos:[l.index,w],posinset:l.posinset+w,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Re("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Re("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Fi.skins.choose,title:Fi.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Re("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return Re("div",{"aria-live":"polite",class:"sr-only",children:t})}renderSkins(){const t=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),r={};return this.dir=="ltr"?r.right=i.right-t.right-3:r.left=t.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?r.bottom=i.bottom-t.top+6:(r.top=t.bottom-i.top+3,r.bottom="auto"),Re("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Fi.skins.choose,class:"menu hidden","data-position":r.top?"top":"bottom",style:r,children:[...Array(6).keys()].map(a=>{const o=a+1,l=this.state.skin==o;return Re("div",{children:[Re("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Fi.skins[o],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:f=>{(f.code=="Enter"||f.code=="Space"||f.code=="Tab")&&(f.preventDefault(),this.handleSkinClick(o))}}),Re("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(o),onMouseEnter:()=>this.handleSkinMouseOver(o),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Re("span",{class:`skin-tone skin-tone-${o}`}),Re("span",{class:"margin-small-lr",children:Fi.skins[o]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return Re("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${n}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&Re("div",{class:"padding-lr",children:this.renderSearch()}),Re("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Re("div",{style:{width:this.props.dynamicWidth?"100%":n,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(n){super(),Jr(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),Jr(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),Jr(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),Jr(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),Jr(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),Jr(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,r=await Nf.search(i),a=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},a);const o=t.selectionStart==t.value.length?[0,0]:[-1,-1],l=[];l.setsize=r.length;let f=null;for(let c of r)(!l.length||f.length==this.getPerLine())&&(f=[],f.__categoryId="search",f.__index=l.length,l.push(f)),f.push(c);this.ignoreMouse(),this.setState({searchResults:l,pos:o},a)}),Jr(this,"handleSearchKeyDown",t=>{const i=t.currentTarget;switch(t.stopImmediatePropagation(),t.key){case"ArrowLeft":this.navigate({e:t,input:i,left:!0});break;case"ArrowRight":this.navigate({e:t,input:i,right:!0});break;case"ArrowUp":this.navigate({e:t,input:i,up:!0});break;case"ArrowDown":this.navigate({e:t,input:i,down:!0});break;case"Enter":t.preventDefault(),this.handleEmojiClick({e:t,pos:this.state.pos});break;case"Escape":t.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),Jr(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),Jr(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),Jr(this,"openSkins",t=>{const{currentTarget:i}=t,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await MCe(2);const a=this.refs.menu.current;a&&(a.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(n),visibleRows:{0:!0},...this.getInitialState(n)}}}class cA extends NCe{async connectedCallback(){const n=yW(this.props,No,this);n.element=this,n.ref=t=>{this.component=t},await D0(n),!this.disconnected&&dW(Re(KCe,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:eW(SW)})}}Jr(cA,"Props",No);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",cA);var SW={};SW=`:host { - width: min-content; - height: 435px; - min-height: 230px; - border-radius: var(--border-radius); - box-shadow: var(--shadow); - --border-radius: 10px; - --category-icon-size: 18px; - --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; - --font-size: 15px; - --preview-placeholder-size: 21px; - --preview-title-size: 1.1em; - --preview-subtitle-size: .9em; - --shadow-color: 0deg 0% 0%; - --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); - display: flex; -} - -[data-theme="light"] { - --em-rgb-color: var(--rgb-color, 34, 36, 39); - --em-rgb-accent: var(--rgb-accent, 34, 102, 237); - --em-rgb-background: var(--rgb-background, 255, 255, 255); - --em-rgb-input: var(--rgb-input, 255, 255, 255); - --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); - --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); -} - -[data-theme="dark"] { - --em-rgb-color: var(--rgb-color, 222, 222, 221); - --em-rgb-accent: var(--rgb-accent, 58, 130, 247); - --em-rgb-background: var(--rgb-background, 21, 22, 23); - --em-rgb-input: var(--rgb-input, 0, 0, 0); - --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); - --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); -} - -#root { - --color-a: rgb(var(--em-rgb-color)); - --color-b: rgba(var(--em-rgb-color), .65); - --color-c: rgba(var(--em-rgb-color), .45); - --padding: 12px; - --padding-small: calc(var(--padding) / 2); - --sidebar-width: 16px; - --duration: 225ms; - --duration-fast: 125ms; - --duration-instant: 50ms; - --easing: cubic-bezier(.4, 0, .2, 1); - width: 100%; - text-align: left; - border-radius: var(--border-radius); - background-color: rgb(var(--em-rgb-background)); - position: relative; -} - -@media (prefers-reduced-motion) { - #root { - --duration: 0; - --duration-fast: 0; - --duration-instant: 0; - } -} - -#root[data-menu] button { - cursor: auto; -} - -#root[data-menu] .menu button { - cursor: pointer; -} - -:host, #root, input, button { - color: rgb(var(--em-rgb-color)); - font-family: var(--font-family); - font-size: var(--font-size); - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - line-height: normal; -} - -*, :before, :after { - box-sizing: border-box; - min-width: 0; - margin: 0; - padding: 0; -} - -.relative { - position: relative; -} - -.flex { - display: flex; -} - -.flex-auto { - flex: none; -} - -.flex-center { - justify-content: center; -} - -.flex-column { - flex-direction: column; -} - -.flex-grow { - flex: auto; -} - -.flex-middle { - align-items: center; -} - -.flex-wrap { - flex-wrap: wrap; -} - -.padding { - padding: var(--padding); -} - -.padding-t { - padding-top: var(--padding); -} - -.padding-lr { - padding-left: var(--padding); - padding-right: var(--padding); -} - -.padding-r { - padding-right: var(--padding); -} - -.padding-small { - padding: var(--padding-small); -} - -.padding-small-b { - padding-bottom: var(--padding-small); -} - -.padding-small-lr { - padding-left: var(--padding-small); - padding-right: var(--padding-small); -} - -.margin { - margin: var(--padding); -} - -.margin-r { - margin-right: var(--padding); -} - -.margin-l { - margin-left: var(--padding); -} - -.margin-small-l { - margin-left: var(--padding-small); -} - -.margin-small-lr { - margin-left: var(--padding-small); - margin-right: var(--padding-small); -} - -.align-l { - text-align: left; -} - -.align-r { - text-align: right; -} - -.color-a { - color: var(--color-a); -} - -.color-b { - color: var(--color-b); -} - -.color-c { - color: var(--color-c); -} - -.ellipsis { - white-space: nowrap; - max-width: 100%; - width: auto; - text-overflow: ellipsis; - overflow: hidden; -} - -.sr-only { - width: 1px; - height: 1px; - position: absolute; - top: auto; - left: -10000px; - overflow: hidden; -} - -a { - cursor: pointer; - color: rgb(var(--em-rgb-accent)); -} - -a:hover { - text-decoration: underline; -} - -.spacer { - height: 10px; -} - -[dir="rtl"] .scroll { - padding-left: 0; - padding-right: var(--padding); -} - -.scroll { - padding-right: 0; - overflow-x: hidden; - overflow-y: auto; -} - -.scroll::-webkit-scrollbar { - width: var(--sidebar-width); - height: var(--sidebar-width); -} - -.scroll::-webkit-scrollbar-track { - border: 0; -} - -.scroll::-webkit-scrollbar-button { - width: 0; - height: 0; - display: none; -} - -.scroll::-webkit-scrollbar-corner { - background-color: rgba(0, 0, 0, 0); -} - -.scroll::-webkit-scrollbar-thumb { - min-height: 20%; - min-height: 65px; - border: 4px solid rgb(var(--em-rgb-background)); - border-radius: 8px; -} - -.scroll::-webkit-scrollbar-thumb:hover { - background-color: var(--em-color-border-over) !important; -} - -.scroll:hover::-webkit-scrollbar-thumb { - background-color: var(--em-color-border); -} - -.sticky { - z-index: 1; - background-color: rgba(var(--em-rgb-background), .9); - -webkit-backdrop-filter: blur(4px); - backdrop-filter: blur(4px); - font-weight: 500; - position: sticky; - top: -1px; -} - -[dir="rtl"] .search input[type="search"] { - padding: 10px 2.2em 10px 2em; -} - -[dir="rtl"] .search .loupe { - left: auto; - right: .7em; -} - -[dir="rtl"] .search .delete { - left: .7em; - right: auto; -} - -.search { - z-index: 2; - position: relative; -} - -.search input, .search button { - font-size: calc(var(--font-size) - 1px); -} - -.search input[type="search"] { - width: 100%; - background-color: var(--em-color-border); - transition-duration: var(--duration); - transition-property: background-color, box-shadow; - transition-timing-function: var(--easing); - border: 0; - border-radius: 10px; - outline: 0; - padding: 10px 2em 10px 2.2em; - display: block; -} - -.search input[type="search"]::-ms-input-placeholder { - color: inherit; - opacity: .6; -} - -.search input[type="search"]::placeholder { - color: inherit; - opacity: .6; -} - -.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; -} - -.search input[type="search"]:focus { - background-color: rgb(var(--em-rgb-input)); - box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); -} - -.search .icon { - z-index: 1; - color: rgba(var(--em-rgb-color), .7); - position: absolute; - top: 50%; - transform: translateY(-50%); -} - -.search .loupe { - pointer-events: none; - left: .7em; -} - -.search .delete { - right: .7em; -} - -svg { - fill: currentColor; - width: 1em; - height: 1em; -} - -button { - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; - cursor: pointer; - color: currentColor; - background-color: rgba(0, 0, 0, 0); - border: 0; -} - -#nav { - z-index: 2; - padding-top: 12px; - padding-bottom: 12px; - padding-right: var(--sidebar-width); - position: relative; -} - -#nav button { - color: var(--color-b); - transition: color var(--duration) var(--easing); -} - -#nav button:hover { - color: var(--color-a); -} - -#nav svg, #nav img { - width: var(--category-icon-size); - height: var(--category-icon-size); -} - -#nav[dir="rtl"] .bar { - left: auto; - right: 0; -} - -#nav .bar { - width: 100%; - height: 3px; - background-color: rgb(var(--em-rgb-accent)); - transition: transform var(--duration) var(--easing); - border-radius: 3px 3px 0 0; - position: absolute; - bottom: -12px; - left: 0; -} - -#nav button[aria-selected] { - color: rgb(var(--em-rgb-accent)); -} - -#preview { - z-index: 2; - padding: calc(var(--padding) + 4px) var(--padding); - padding-right: var(--sidebar-width); - position: relative; -} - -#preview .preview-placeholder { - font-size: var(--preview-placeholder-size); -} - -#preview .preview-title { - font-size: var(--preview-title-size); -} - -#preview .preview-subtitle { - font-size: var(--preview-subtitle-size); -} - -#nav:before, #preview:before { - content: ""; - height: 2px; - position: absolute; - left: 0; - right: 0; -} - -#nav[data-position="top"]:before, #preview[data-position="top"]:before { - background: linear-gradient(to bottom, var(--em-color-border), transparent); - top: 100%; -} - -#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { - background: linear-gradient(to top, var(--em-color-border), transparent); - bottom: 100%; -} - -.category:last-child { - min-height: calc(100% + 1px); -} - -.category button { - font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; - position: relative; -} - -.category button > * { - position: relative; -} - -.category button .background { - opacity: 0; - background-color: var(--em-color-border); - transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; -} - -.category button:hover .background { - transition-duration: var(--duration-instant); - transition-delay: 0s; -} - -.category button[aria-selected] .background { - opacity: 1; -} - -.category button[data-keyboard] .background { - transition: none; -} - -.row { - width: 100%; - position: absolute; - top: 0; - left: 0; -} - -.skin-tone-button { - border: 1px solid rgba(0, 0, 0, 0); - border-radius: 100%; -} - -.skin-tone-button:hover { - border-color: var(--em-color-border); -} - -.skin-tone-button:active .skin-tone { - transform: scale(.85) !important; -} - -.skin-tone-button .skin-tone { - transition: transform var(--duration) var(--easing); -} - -.skin-tone-button[aria-selected] { - background-color: var(--em-color-border); - border-top-color: rgba(0, 0, 0, .05); - border-bottom-color: rgba(0, 0, 0, 0); - border-left-width: 0; - border-right-width: 0; -} - -.skin-tone-button[aria-selected] .skin-tone { - transform: scale(.9); -} - -.menu { - z-index: 2; - white-space: nowrap; - border: 1px solid var(--em-color-border); - background-color: rgba(var(--em-rgb-background), .9); - -webkit-backdrop-filter: blur(4px); - backdrop-filter: blur(4px); - transition-property: opacity, transform; - transition-duration: var(--duration); - transition-timing-function: var(--easing); - border-radius: 10px; - padding: 4px; - position: absolute; - box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); -} - -.menu.hidden { - opacity: 0; -} - -.menu[data-position="bottom"] { - transform-origin: 100% 100%; -} - -.menu[data-position="bottom"].hidden { - transform: scale(.9)rotate(-3deg)translateY(5%); -} - -.menu[data-position="top"] { - transform-origin: 100% 0; -} - -.menu[data-position="top"].hidden { - transform: scale(.9)rotate(3deg)translateY(-5%); -} - -.menu input[type="radio"] { - clip: rect(0 0 0 0); - width: 1px; - height: 1px; - border: 0; - margin: 0; - padding: 0; - position: absolute; - overflow: hidden; -} - -.menu input[type="radio"]:checked + .option { - box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); -} - -.option { - width: 100%; - border-radius: 6px; - padding: 4px 6px; -} - -.option:hover { - color: #fff; - background-color: rgb(var(--em-rgb-accent)); -} - -.skin-tone { - width: 16px; - height: 16px; - border-radius: 100%; - display: inline-block; - position: relative; - overflow: hidden; -} - -.skin-tone:after { - content: ""; - mix-blend-mode: overlay; - background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); - border: 1px solid rgba(0, 0, 0, .8); - border-radius: 100%; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; -} - -.skin-tone-1 { - background-color: #ffc93a; -} - -.skin-tone-2 { - background-color: #ffdab7; -} - -.skin-tone-3 { - background-color: #e7b98f; -} - -.skin-tone-4 { - background-color: #c88c61; -} - -.skin-tone-5 { - background-color: #a46134; -} - -.skin-tone-6 { - background-color: #5d4437; -} - -[data-index] { - justify-content: space-between; -} - -[data-emoji-set="twitter"] .skin-tone:after { - box-shadow: none; - border-color: rgba(0, 0, 0, .5); -} - -[data-emoji-set="twitter"] .skin-tone-1 { - background-color: #fade72; -} - -[data-emoji-set="twitter"] .skin-tone-2 { - background-color: #f3dfd0; -} - -[data-emoji-set="twitter"] .skin-tone-3 { - background-color: #eed3a8; -} - -[data-emoji-set="twitter"] .skin-tone-4 { - background-color: #cfad8d; -} - -[data-emoji-set="twitter"] .skin-tone-5 { - background-color: #a8805d; -} - -[data-emoji-set="twitter"] .skin-tone-6 { - background-color: #765542; -} - -[data-emoji-set="google"] .skin-tone:after { - box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); -} - -[data-emoji-set="google"] .skin-tone-1 { - background-color: #f5c748; -} - -[data-emoji-set="google"] .skin-tone-2 { - background-color: #f1d5aa; -} - -[data-emoji-set="google"] .skin-tone-3 { - background-color: #d4b48d; -} - -[data-emoji-set="google"] .skin-tone-4 { - background-color: #aa876b; -} - -[data-emoji-set="google"] .skin-tone-5 { - background-color: #916544; -} - -[data-emoji-set="google"] .skin-tone-6 { - background-color: #61493f; -} - -[data-emoji-set="facebook"] .skin-tone:after { - border-color: rgba(0, 0, 0, .4); - box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; -} - -[data-emoji-set="facebook"] .skin-tone-1 { - background-color: #f5c748; -} - -[data-emoji-set="facebook"] .skin-tone-2 { - background-color: #f1d5aa; -} - -[data-emoji-set="facebook"] .skin-tone-3 { - background-color: #d4b48d; -} - -[data-emoji-set="facebook"] .skin-tone-4 { - background-color: #aa876b; -} - -[data-emoji-set="facebook"] .skin-tone-5 { - background-color: #916544; -} - -[data-emoji-set="facebook"] .skin-tone-6 { - background-color: #61493f; -} - -`;function XCe({opened:e,onClose:n,onSelect:t,target:i}){return k.jsxs(Vn,{opened:e,onChange:r=>{r||n()},onDismiss:n,position:"bottom-start",withArrow:!0,shadow:"md",withinPortal:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!1,children:[k.jsx(Vn.Target,{children:i}),k.jsx(Vn.Dropdown,{p:0,style:{background:"transparent",border:"none"},children:k.jsx(ZCe,{onSelect:r=>{t(r),n()}})})]})}function ZCe({onSelect:e}){const n=O.useRef(null),t=O.useRef(null),i=O.useRef(e);return i.current=e,O.useEffect(()=>{if(n.current)return t.current=new cA({data:uCe,onEmojiSelect:r=>{const a=i.current;r.native?a(r.native):r.shortcodes&&a(r.shortcodes)},theme:"dark",previewPosition:"none",skinTonePosition:"search",autoFocus:!0,maxFrequentRows:2,ref:n}),()=>{n.current&&(n.current.innerHTML=""),t.current=null}},[]),k.jsx("div",{ref:n})}const sh="column-";function QCe(e){return e==="column"?n=>{const t=n.droppableContainers.filter(r=>String(r.id).startsWith(sh)),i=EB({...n,droppableContainers:t});return i.length>0?i:Cie({...n,droppableContainers:t})}:n=>{const t=Eie(n);return t.length>0?t:OB(n)}}function JCe(){const e=xC(),[n,t]=O.useState(null),[i,r]=O.useState([]),[a,o]=O.useState(null),[l,f]=O.useState(null),[c,h]=O.useState(void 0),[d,p]=O.useState(!1),[v,y]=O.useState(""),[b,w]=O.useState(Date.now()),[_,S]=O.useState(!1),[C,T]=O.useState("board"),[A,M]=O.useState([]),[j,N]=O.useState(!1),[F,R]=O.useState([]),[L,B]=O.useState([]),[G,H]=O.useState(""),[U,P]=O.useState(null),[z,q]=O.useState(null),[Y,D]=O.useState([]),[V,W]=O.useState(!1),[$,X]=O.useState(null),[ee,oe]=O.useState(null),[ue,ye]=O.useState(!1),[ae,le]=O.useState(null),[Se,ne]=O.useState(!1),[$e,ve]=O.useState("#888888"),[xe,De]=O.useState(null),[we,re]=O.useState(!1),[ke,Ie]=O.useState(()=>{const J=localStorage.getItem("kanban_nav_width"),Ae=J?parseInt(J,10):NaN;return Number.isFinite(Ae)&&Ae>=180&&Ae<=600?Ae:240}),qe=O.useRef(ke);O.useEffect(()=>{qe.current=ke,localStorage.setItem("kanban_nav_width",String(ke))},[ke]);const Ue=J=>{J.preventDefault();const Ae=J.clientX,Pe=qe.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ze=Tt=>{const ht=Tt.clientX-Ae,Lt=Math.min(600,Math.max(180,Pe+ht));Ie(Lt)},Fn=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ze),window.removeEventListener("mouseup",Fn)};window.addEventListener("mousemove",Ze),window.addEventListener("mouseup",Fn)},Ve=_ie(wM(jC,{activationConstraint:{distance:5}}),wM(TC,{coordinateGetter:eae})),me=O.useCallback(async()=>{try{const J=await Vte();t(J)}catch(J){it.show({color:"red",message:J.message})}},[]);O.useEffect(()=>{me()},[me]);const Ge=O.useCallback(async()=>{try{const J=await bB();r(J)}catch(J){console.warn("listUsers failed",J)}},[]),te=O.useCallback(async()=>{try{const J=await Zte();M(J)}catch(J){console.warn("listTrash failed",J)}},[]),pe=O.useCallback(async()=>{try{const J=await wB();R(J)}catch(J){console.warn("listTags failed",J)}},[]),He=O.useCallback(async()=>{try{const J=await oie();B(J)}catch(J){console.warn("listRequesters failed",J)}},[]);O.useEffect(()=>{Ge()},[Ge]),O.useEffect(()=>{te()},[te]),O.useEffect(()=>{pe(),He()},[pe,He]),O.useEffect(()=>{const J=setInterval(()=>w(Date.now()),1e3);return()=>clearInterval(J)},[]),O.useEffect(()=>{if(!ae)return;const J=Ae=>{Ae.key==="Escape"&&le(null)};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[ae]);const Ye=O.useMemo(()=>{const J=new Map;for(const Ae of i)J.set(Ae.id,Ae);return J},[i]),Ce=O.useMemo(()=>n?[...n.columns].sort((J,Ae)=>J.position-Ae.position):[],[n]),Qe=O.useMemo(()=>Ce.filter(J=>J.location!=="sidebar"),[Ce]),ln=O.useMemo(()=>Ce.filter(J=>J.location==="sidebar"),[Ce]),En=O.useMemo(()=>Qe.map(J=>`${sh}${J.id}`),[Qe]),hn=O.useMemo(()=>ln.map(J=>`${sh}${J.id}`),[ln]),rn=O.useCallback(J=>{const Ae=G.trim().toLowerCase();if(Ae&&![J.title,J.description,J.requester,...J.tags||[]].filter(Boolean).join(" ").toLowerCase().includes(Ae)||U&&J.assignee_id!==U||V&&J.assignee_id||z&&J.requester!==z)return!1;if(Y.length>0){const Pe=new Set(J.tags||[]);for(const Ze of Y)if(!Pe.has(Ze))return!1}if($||ee){const Pe=$?new Date($).setHours(0,0,0,0):-1/0,Ze=ee?new Date(ee).setHours(23,59,59,999):1/0,Fn=J.created_at?new Date(J.created_at).getTime():NaN,Tt=J.entered_at?new Date(J.entered_at).getTime():NaN,ht=Lt=>!isNaN(Lt)&&Lt>=Pe&&Lt<=Ze;if(!ht(Fn)&&!ht(Tt))return!1}return!0},[G,U,V,z,Y,$,ee]),Je=O.useMemo(()=>{const J=new Map;if(!n)return J;for(const Ae of n.columns)J.set(Ae.id,[]);for(const Ae of[...n.cards].sort((Pe,Ze)=>Pe.position-Ze.position)){if(!rn(Ae))continue;const Pe=J.get(Ae.column_id);Pe&&Pe.push(Ae)}return J},[n,rn]),zn=!!G.trim()||!!U||V||!!z||Y.length>0||!!$||!!ee,un=J=>n==null?void 0:n.cards.find(Ae=>Ae.id===J),yt=J=>n==null?void 0:n.columns.find(Ae=>Ae.id===J),Ct=J=>{var Ae;return(Ae=un(J))==null?void 0:Ae.column_id},Tn=J=>J.startsWith(sh),mn=J=>J.slice(sh.length),bn=J=>{if(n)return Tn(J)?mn(J):Ct(J)},ot=J=>{var Fn;const Ae=J.active.id,Pe=(Fn=J.active.data.current)==null?void 0:Fn.type;if(h(Pe),Pe==="column"){f(mn(Ae));return}const Ze=un(Ae);Ze&&o(Ze)},$t=J=>{var Tt,ht;if(!n||((Tt=J.active.data.current)==null?void 0:Tt.type)!=="card")return;const Ae=J.active.id,Pe=(ht=J.over)==null?void 0:ht.id;if(!Pe)return;const Ze=Ct(Ae),Fn=bn(Pe);!Ze||!Fn||Ze===Fn||t(Lt=>{if(!Lt)return Lt;const di=Lt.cards.map(Qt=>Qt.id===Ae?{...Qt,column_id:Fn}:Qt);return{...Lt,cards:di}})},Ne=async J=>{var Qt,qc;const Ae=(Qt=J.active.data.current)==null?void 0:Qt.type,Pe=J.active.id,Ze=(qc=J.over)==null?void 0:qc.id;if(o(null),f(null),h(void 0),!n||!Ze)return;if(Ae==="column"){if(!Tn(Ze))return;const ft=mn(Pe),Li=mn(Ze);if(ft===Li)return;const pl=yt(ft),Zi=yt(Li);if(!pl||!Zi)return;const fs=Zi.location,Ia=Ce.filter(Ii=>Ii.location===fs).map(Ii=>Ii.id),Tu=Ia.indexOf(ft),cs=Ia.indexOf(Li);let ba;if(Tu===-1){const Ii=cs===-1?Ia.length:cs;ba=[...Ia.slice(0,Ii),ft,...Ia.slice(Ii)]}else{if(Tu===cs)return;ba=_g(Ia,Tu,cs)}t(Ii=>{if(!Ii)return Ii;const Mu=new Map(ba.map((Br,np)=>[Br,np])),ds=Ii.columns.map(Br=>Br.id===ft?{...Br,location:fs,position:Mu.get(Br.id)??Br.position}:Mu.has(Br.id)?{...Br,position:Mu.get(Br.id)}:Br);return{...Ii,columns:ds}});try{pl.location!==fs&&await hf(ft,{location:fs}),await Yte(ba)}catch(Ii){it.show({color:"red",message:Ii.message})}me();return}const Fn=bn(Ze);if(!Fn)return;const Tt=n.cards.find(ft=>ft.id===Pe);if(Tt!=null&&Tt.locked&&Tt.column_id!==Fn){it.show({color:"yellow",message:"Card bloqueada: no se puede mover entre columnas"}),me();return}const ht=n.cards.filter(ft=>ft.column_id===Fn).sort((ft,Li)=>ft.position-Li.position),Lt=ht.findIndex(ft=>ft.id===Pe);let di;if(Tn(Ze)||Lt===-1)di=[...ht.filter(ft=>ft.id!==Pe).map(ft=>ft.id),Pe];else{const ft=ht.findIndex(Li=>Li.id===Ze);di=_g(ht.map(Li=>Li.id),Lt,ft)}t(ft=>{if(!ft)return ft;const Li=new Map(di.map((Zi,fs)=>[Zi,fs])),pl=ft.cards.map(Zi=>Zi.column_id===Fn&&Li.has(Zi.id)?{...Zi,position:Li.get(Zi.id)}:Zi);return{...ft,cards:pl}});try{await eie(Pe,Fn,di)}catch(ft){it.show({color:"red",message:ft.message})}me()},Be=async()=>{const J=v.trim();if(J)try{await Wte(J),y(""),p(!1),me()}catch(Ae){it.show({color:"red",message:Ae.message})}},An=O.useCallback(async(J,Ae)=>{try{await hf(J,{name:Ae}),me()}catch(Pe){it.show({color:"red",message:Pe.message})}},[me]),Qn=O.useCallback(async(J,Ae)=>{try{await hf(J,{width:Ae}),me()}catch(Pe){it.show({color:"red",message:Pe.message})}},[me]),Sn=O.useCallback(async(J,Ae)=>{try{await hf(J,{location:Ae}),me()}catch(Pe){it.show({color:"red",message:Pe.message})}},[me]),Ke=O.useCallback(J=>{jo.openConfirmModal({title:"Eliminar columna",children:k.jsx(cn,{size:"sm",children:"Se borraran todas sus tarjetas. Continuar?"}),labels:{confirm:"Eliminar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await Gte(J),me()}catch(Ae){it.show({color:"red",message:Ae.message})}}})},[me]),Xe=O.useCallback(J=>{var Pe,Ze;const Ae=jo.open({title:"Nueva tarjeta",size:"md",children:k.jsx(FM,{users:i,requesterOptions:L,tagOptions:F,initial:{requester:((Pe=e.user)==null?void 0:Pe.display_name)||((Ze=e.user)==null?void 0:Ze.username)||""},submitLabel:"Crear",onCancel:()=>jo.close(Ae),onSubmit:async Fn=>{try{await Kte({column_id:J,requester:Fn.requester,title:Fn.title,description:Fn.description,assignee_id:Fn.assignee_id,tags:Fn.tags}),jo.close(Ae),me(),pe(),He()}catch(Tt){it.show({color:"red",message:Tt.message})}}})})},[me,i,e.user,L,F]),en=O.useCallback(J=>{const Ae=jo.open({title:"Editar tarjeta",size:"md",children:k.jsx(FM,{users:i,requesterOptions:L,tagOptions:F,initial:{requester:J.requester,title:J.title,description:J.description,assignee_id:J.assignee_id,tags:J.tags||[]},submitLabel:"Guardar",onCancel:()=>jo.close(Ae),onSubmit:async Pe=>{try{await Pd(J.id,{requester:Pe.requester,title:Pe.title,description:Pe.description,assignee_id:Pe.assignee_id,tags:Pe.tags}),jo.close(Ae),me(),pe(),He()}catch(Ze){it.show({color:"red",message:Ze.message})}}})})},[me,i,L,F]),$n=O.useCallback(async(J,Ae)=>{t(Pe=>Pe&&{...Pe,cards:Pe.cards.map(Ze=>Ze.id===J?{...Ze,requester:Ae}:Ze)});try{await Pd(J,{requester:Ae})}catch(Pe){it.show({color:"red",message:Pe.message}),me()}},[me]),Ln=O.useCallback(async(J,Ae)=>{t(Pe=>Pe&&{...Pe,cards:Pe.cards.map(Ze=>Ze.id===J?{...Ze,assignee_id:Ae}:Ze)});try{await Pd(J,{assignee_id:Ae})}catch(Pe){it.show({color:"red",message:Pe.message}),me()}},[me]),bt=O.useCallback(async J=>{try{await Xte(J),me(),te()}catch(Ae){it.show({color:"red",message:Ae.message})}},[me,te]),_n=O.useCallback(async J=>{try{await Qte(J),me(),te()}catch(Ae){it.show({color:"red",message:Ae.message})}},[me,te]),kn=O.useCallback(async J=>{jo.openConfirmModal({title:"Borrar permanentemente",children:k.jsx(cn,{size:"sm",children:"Esta accion no se puede deshacer."}),labels:{confirm:"Borrar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await Jte(J),te()}catch(Ae){it.show({color:"red",message:Ae.message})}}})},[te]),Bn=O.useCallback(async(J,Ae)=>{t(Pe=>Pe&&{...Pe,cards:Pe.cards.map(Ze=>Ze.id===J?{...Ze,color:Ae}:Ze)});try{await Pd(J,{color:Ae})}catch(Pe){it.show({color:"red",message:Pe.message}),me()}},[me]),zt=O.useCallback(async(J,Ae)=>{t(Pe=>Pe&&{...Pe,cards:Pe.cards.map(Ze=>Ze.id===J?{...Ze,stickers:Ae}:Ze)});try{await yk(J,Ae)}catch(Pe){it.show({color:"red",message:Pe.message}),me()}},[me]),fi=O.useCallback((J,Ae,Pe)=>{ae&&t(Ze=>{if(!Ze)return Ze;const Fn=Ze.cards.map(Tt=>{if(Tt.id!==J)return Tt;const ht=[...Tt.stickers||[],{emoji:ae,x:Ae,y:Pe}];return yk(J,ht).catch(Lt=>{it.show({color:"red",message:Lt.message}),me()}),{...Tt,stickers:ht}});return{...Ze,cards:Fn}})},[ae,me]),Ki=O.useCallback((J,Ae)=>{t(Pe=>{if(!Pe)return Pe;const Ze=Pe.cards.map(Fn=>{if(Fn.id!==J)return Fn;const Tt=(Fn.stickers||[]).filter((ht,Lt)=>Lt!==Ae);return yk(J,Tt).catch(ht=>{it.show({color:"red",message:ht.message}),me()}),{...Fn,stickers:Tt}});return{...Pe,cards:Ze}})},[me]),ga=O.useCallback((J,Ae,Pe,Ze)=>{t(Fn=>{if(!Fn)return Fn;const Tt=Fn.cards.map(ht=>{if(ht.id!==J)return ht;const Lt=(ht.stickers||[]).map((di,Qt)=>Qt===Ae?{...di,x:Pe,y:Ze}:di);return{...ht,stickers:Lt}});return{...Fn,cards:Tt}})},[]),za=O.useCallback(J=>{t(Ae=>{if(!Ae)return Ae;const Pe=Ae.cards.find(Ze=>Ze.id===J);return Pe&&zt(J,Pe.stickers||[]),Ae})},[zt]),ya=O.useCallback(J=>{jo.open({title:J.title,size:"md",children:k.jsx(Q6e,{card:J})})},[]),zr=O.useCallback(async(J,Ae)=>{t(Pe=>Pe&&{...Pe,cards:Pe.cards.map(Ze=>Ze.id===J?{...Ze,locked:Ae}:Ze)});try{await Pd(J,{locked:Ae})}catch(Pe){it.show({color:"red",message:Pe.message}),me()}},[me]),La=O.useCallback(async(J,Ae)=>{t(Pe=>Pe&&{...Pe,columns:Pe.columns.map(Ze=>Ze.id===J?{...Ze,wip_limit:Ae}:Ze)});try{await hf(J,{wip_limit:Ae})}catch(Pe){it.show({color:"red",message:Pe.message}),me()}},[me]),br=O.useCallback(async(J,Ae)=>{t(Pe=>Pe&&{...Pe,columns:Pe.columns.map(Ze=>Ze.id===J?{...Ze,is_done:Ae}:Ze)});try{await hf(J,{is_done:Ae}),me()}catch(Pe){it.show({color:"red",message:Pe.message}),me()}},[me]),Lr=O.useMemo(()=>({height:50}),[]),fn=O.useMemo(()=>({width:ke,breakpoint:"md",collapsed:{mobile:!we,desktop:!we}}),[ke,we]),ci=O.useMemo(()=>({width:380,breakpoint:"md",collapsed:{mobile:!_,desktop:!_}}),[_]),an=O.useMemo(()=>({main:{paddingInlineStart:0,paddingInlineEnd:0}}),[]);if(!n)return k.jsx(wn,{justify:"center",p:"xl",children:k.jsx(tr,{})});const Xi=a,Ir=l?yt(l):null;return k.jsxs(wre,{sensors:Ve,collisionDetection:QCe(c),onDragStart:ot,onDragOver:$t,onDragEnd:Ne,children:[k.jsxs(dr,{header:Lr,navbar:fn,aside:ci,padding:0,styles:an,children:[k.jsx(dr.Header,{children:k.jsxs(wn,{h:"100%",px:"md",justify:"space-between",children:[k.jsxs(wn,{gap:6,children:[k.jsx(Yt,{variant:we?"filled":"subtle",onClick:()=>re(J=>!J),"aria-label":"Toggle sidebar",children:k.jsx(Aoe,{size:16})}),k.jsx(bS,{size:22}),k.jsx(bu,{order:4,children:"Kanban"}),k.jsx(Aa,{value:C,onChange:J=>J&&T(J),variant:"pills",ml:"md",children:k.jsxs(Aa.List,{children:[k.jsx(Aa.Tab,{value:"board",leftSection:k.jsx(bS,{size:14}),children:"Tablero"}),k.jsx(Aa.Tab,{value:"dashboard",leftSection:k.jsx(roe,{size:14}),children:"Dashboard"}),k.jsx(Aa.Tab,{value:"calendar",leftSection:k.jsx(toe,{size:14}),children:"Calendario"})]})})]}),k.jsxs(wn,{gap:4,children:[k.jsx(Yt,{variant:"subtle",onClick:me,"aria-label":"Refresh",children:k.jsx(Noe,{size:16})}),k.jsx(Yt,{variant:_?"filled":"subtle",onClick:()=>S(J=>!J),"aria-label":"Toggle chat",children:k.jsx(jF,{size:16})}),e.user&&k.jsxs(Zn,{position:"bottom-end",shadow:"md",withArrow:!0,closeOnItemClick:!1,children:[k.jsx(Zn.Target,{children:k.jsx(Yt,{variant:"subtle","aria-label":"Usuario",children:k.jsx(iu,{size:26,radius:"xl",color:e.user.color||"blue",children:(e.user.display_name||e.user.username).slice(0,2).toUpperCase()})})}),k.jsxs(Zn.Dropdown,{children:[k.jsx(Zn.Label,{children:e.user.display_name||e.user.username}),k.jsxs(_e,{p:"xs",children:[k.jsx(cn,{size:"xs",c:"dimmed",mb:4,children:"Color del avatar"}),k.jsx(QV,{value:e.user.color||"",onChange:async J=>{try{const Ae=await yM({color:J});e.setUser(Ae)}catch(Ae){it.show({color:"red",message:Ae.message})}},options:nCe,onOpenCustom:()=>{var J,Ae;ve((Ae=(J=e.user)==null?void 0:J.color)!=null&&Ae.startsWith("#")?e.user.color:"#888888"),ne(!0)}})]}),k.jsx(Zn.Divider,{}),k.jsx(Zn.Item,{leftSection:k.jsx(Soe,{size:14}),color:"red",onClick:()=>e.logout(),children:"Cerrar sesion"})]})]})]})]})}),k.jsxs(dr.Navbar,{p:"xs",children:[k.jsx(_e,{onMouseDown:Ue,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:10},"aria-label":"Resize sidebar"}),k.jsxs(Ut,{gap:"xs",h:"100%",children:[k.jsx(cn,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",children:"Columnas parqueadas"}),k.jsx(_e,{style:{flex:1,overflowY:"auto"},children:k.jsx(gS,{items:hn,strategy:WB,children:k.jsxs(Ut,{gap:"xs",children:[ln.length===0&&k.jsx(cn,{size:"xs",c:"dimmed",children:'Vacio. Mueve columnas aqui con el icono "archivar" en su cabecera.'}),ln.map(J=>k.jsx(p$,{column:J,cards:Je.get(J.id)??[],now:b,collapsed:!0,onAddCard:Xe,onRenameColumn:An,onResizeColumn:Qn,onMoveColumnLocation:Sn,onDeleteColumn:Ke,onSetWIPLimit:La,onToggleDone:br,onEditCard:en,onDeleteCard:bt,onChangeCardColor:Bn,onShowHistory:ya,onToggleCardLock:zr,onAssignCard:Ln,onSetRequester:$n,requesterOptions:L,onOpenCustomCardColor:(Ae,Pe)=>De({cardId:Ae,color:Pe}),activeSticker:ae,onAddSticker:fi,onRemoveSticker:Ki,onMoveSticker:ga,onCommitSticker:za,users:i,usersById:Ye},J.id))]})})}),k.jsxs(_e,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[k.jsx(Bt,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:k.jsx(Vy,{size:14}),rightSection:k.jsxs(wn,{gap:4,children:[k.jsx(gi,{size:"xs",variant:"light",color:A.length>0?"red":"gray",children:A.length}),j?k.jsx(AF,{size:12}):k.jsx(OF,{size:12})]}),onClick:()=>N(J=>!J),children:"Papelera"}),j&&k.jsxs(Ut,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[A.length===0&&k.jsx(cn,{size:"xs",c:"dimmed",px:"xs",children:"Vacia."}),A.map(J=>k.jsx(ni,{p:6,withBorder:!0,radius:"sm",bg:"dark.7",children:k.jsxs(wn,{justify:"space-between",gap:4,wrap:"nowrap",children:[k.jsx(cn,{size:"xs",truncate:!0,style:{flex:1},title:J.title,children:J.title}),k.jsx(vr,{label:"Restaurar",withArrow:!0,children:k.jsx(Yt,{size:"xs",variant:"subtle",color:"green",onClick:()=>_n(J.id),children:k.jsx(Qae,{size:12})})}),k.jsx(vr,{label:"Borrar permanentemente",withArrow:!0,children:k.jsx(Yt,{size:"xs",variant:"subtle",color:"red",onClick:()=>kn(J.id),children:k.jsx(Hoe,{size:12})})})]})},J.id))]})]})]})]}),k.jsx(dr.Aside,{children:k.jsx(The,{onBoardChange:me})}),k.jsx(dr.Main,{children:C==="dashboard"?k.jsx(_e,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:k.jsx(K6e,{users:i})}):C==="calendar"?k.jsx(_e,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:k.jsx(Dhe,{users:i})}):k.jsxs(_e,{style:{height:"calc(100vh - 50px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:[k.jsxs(wn,{gap:"xs",p:"xs",wrap:"wrap",align:"end",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[k.jsx(tl,{leftSection:k.jsx(zoe,{size:14}),placeholder:"Buscar (titulo, descripcion, solicitante, tag)",value:G,onChange:J=>H(J.currentTarget.value),rightSection:G?k.jsx(Yt,{size:"sm",variant:"subtle",color:"gray",onClick:()=>H(""),"aria-label":"Limpiar",children:k.jsx(th,{size:14})}):null,style:{minWidth:280,flex:1},size:"xs"}),k.jsx(Ko,{placeholder:"Asignado",value:U,onChange:P,data:i.map(J=>({value:J.id,label:J.display_name||J.username})),clearable:!0,searchable:!0,size:"xs",style:{minWidth:160},disabled:V}),k.jsx(gu,{size:"xs",label:"Sin asignar",checked:V,onChange:J=>{const Ae=J.currentTarget.checked;W(Ae),Ae&&P(null)}}),k.jsx(Ko,{placeholder:"Solicitante",value:z,onChange:q,data:L,clearable:!0,searchable:!0,size:"xs",style:{minWidth:160}}),k.jsx(wy,{placeholder:"Tags",value:Y,onChange:D,data:F,clearable:!0,searchable:!0,size:"xs",style:{minWidth:200}}),k.jsx(Bf,{placeholder:"Desde",value:$,onChange:J=>X(J?new Date(J):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),k.jsx(Bf,{placeholder:"Hasta",value:ee,onChange:J=>oe(J?new Date(J):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),k.jsxs(wn,{gap:4,children:[k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const J=new Date;X(J),oe(J)},children:"Hoy"}),k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const J=new Date,Ae=new Date;Ae.setDate(Ae.getDate()-7),X(Ae),oe(J)},children:"7d"}),k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const J=new Date,Ae=new Date;Ae.setDate(Ae.getDate()-30),X(Ae),oe(J)},children:"30d"})]}),k.jsx(XCe,{opened:ue,onClose:()=>ye(!1),onSelect:J=>le(J),target:k.jsx(Bt,{size:"xs",variant:ae?"filled":"default",color:ae?"yellow":void 0,leftSection:k.jsx(Toe,{size:14}),onClick:()=>{ae?ye(J=>!J):le("😀")},children:ae?`Modo sticker: ${ae}`:"Stickers"})}),ae&&k.jsx(Bt,{size:"xs",variant:"subtle",color:"gray",leftSection:k.jsx(th,{size:12}),onClick:()=>le(null),children:"ESC"}),zn&&k.jsx(Bt,{size:"xs",variant:"subtle",color:"gray",leftSection:k.jsx(th,{size:12}),onClick:()=>{H(""),P(null),W(!1),q(null),D([]),X(null),oe(null)},children:"Limpiar"})]}),k.jsx(gS,{items:En,strategy:Hre,children:k.jsxs(wn,{align:"stretch",wrap:"nowrap",gap:"md",p:"md",style:{flex:1,overflowX:"auto",overflowY:"hidden"},children:[Qe.map(J=>k.jsx(p$,{column:J,cards:Je.get(J.id)??[],now:b,onAddCard:Xe,onRenameColumn:An,onResizeColumn:Qn,onMoveColumnLocation:Sn,onDeleteColumn:Ke,onSetWIPLimit:La,onToggleDone:br,onEditCard:en,onDeleteCard:bt,onChangeCardColor:Bn,onShowHistory:ya,onToggleCardLock:zr,onAssignCard:Ln,onSetRequester:$n,requesterOptions:L,activeSticker:ae,onAddSticker:fi,onRemoveSticker:Ki,onMoveSticker:ga,onCommitSticker:za,users:i,usersById:Ye},J.id)),k.jsx(_e,{style:{minWidth:280,maxWidth:320},children:d?k.jsxs(Ut,{gap:4,children:[k.jsx(tl,{size:"xs",placeholder:"Nombre de columna...",value:v,onChange:J=>y(J.currentTarget.value),autoFocus:!0,onKeyDown:J=>{J.key==="Enter"&&Be(),J.key==="Escape"&&(p(!1),y(""))}}),k.jsxs(wn,{gap:4,children:[k.jsx(Bt,{size:"xs",onClick:Be,children:"Anadir"}),k.jsx(Yt,{variant:"subtle",color:"gray",onClick:()=>p(!1),children:k.jsx(th,{size:14})})]})]}):k.jsx(Bt,{variant:"light",color:"gray",leftSection:k.jsx(Nh,{size:14}),onClick:()=>p(!0),children:"Anadir columna"})})]})})]})})]}),k.jsx(Ire,{children:Xi?k.jsx(JV,{card:Xi,now:b,onDelete:()=>{},onEdit:()=>{},onChangeColor:()=>{},onShowHistory:()=>{},onToggleLock:()=>{},onAssign:()=>{},users:i,assignee:Xi.assignee_id?Ye.get(Xi.assignee_id):void 0,isOverlay:!0}):Ir?k.jsx(_e,{style:{width:Ir.location==="sidebar"?220:Ir.width,padding:8,background:XV(""),border:`1px solid ${uA("")}`,borderRadius:8,opacity:.9},children:k.jsx(cn,{fw:600,size:"sm",children:Ir.name})}):null}),k.jsx(Z4,{opened:Se,onClose:()=>ne(!1),value:$e,onAccept:async J=>{ve(J);try{const Ae=await yM({color:J});e.setUser(Ae)}catch(Ae){it.show({color:"red",message:Ae.message})}}}),k.jsx(Z4,{opened:!!xe,onClose:()=>De(null),value:(xe==null?void 0:xe.color)||"#888888",onAccept:J=>{xe&&Bn(xe.cardId,J)}})]})}function e9e(){const e=xC(),[n,t]=O.useState("login"),[i,r]=O.useState(""),[a,o]=O.useState(""),[l,f]=O.useState(""),[c,h]=O.useState(!1),[d,p]=O.useState(null),v=async y=>{y.preventDefault(),p(null),h(!0);try{n==="login"?await e.login(i.trim(),a):await e.register(i.trim(),a,l.trim()||i.trim())}catch(b){p(b.message)}finally{h(!1)}};return k.jsx(wc,{style:{minHeight:"100vh"},p:"md",children:k.jsx(ni,{p:"xl",withBorder:!0,radius:"md",shadow:"md",style:{width:360,maxWidth:"100%"},children:k.jsx("form",{onSubmit:v,children:k.jsxs(Ut,{gap:"md",children:[k.jsxs(Ut,{gap:4,align:"center",children:[k.jsx(bS,{size:36}),k.jsx(bu,{order:3,children:"Kanban"}),k.jsx(cn,{size:"sm",c:"dimmed",children:n==="login"?"Inicia sesion":"Crea una cuenta"})]}),k.jsx(tl,{label:"Usuario",value:i,onChange:y=>r(y.currentTarget.value),required:!0,autoFocus:!0,autoComplete:"username"}),n==="register"&&k.jsx(tl,{label:"Nombre (opcional)",value:l,onChange:y=>f(y.currentTarget.value),autoComplete:"name"}),k.jsx(Sy,{label:"Contrasena",value:a,onChange:y=>o(y.currentTarget.value),required:!0,autoComplete:n==="login"?"current-password":"new-password"}),d&&k.jsx(cn,{size:"sm",c:"red",children:d}),k.jsx(Bt,{type:"submit",loading:c,fullWidth:!0,children:n==="login"?"Entrar":"Registrar"}),k.jsxs(cn,{size:"xs",c:"dimmed",ta:"center",children:[n==="login"?"No tienes cuenta?":"Ya tienes cuenta?"," ",k.jsx(P6,{component:"button",type:"button",size:"xs",onClick:()=>{p(null),t(n==="login"?"register":"login")},children:n==="login"?"Registrate":"Inicia sesion"})]})]})})})})}function n9e(){const{user:e,loading:n}=xC();return n?k.jsx(wc,{style:{minHeight:"100vh"},children:k.jsx(tr,{})}):e?k.jsx(JCe,{}):k.jsx(e9e,{})}const t9e={primaryColor:"blue",fontFamily:"system-ui, -apple-system, sans-serif"};qte.createRoot(document.getElementById("root")).render(k.jsx(iz,{theme:t9e,defaultColorScheme:"dark",children:k.jsxs(cte,{children:[k.jsx(uo,{position:"top-right"}),k.jsx(sie,{children:k.jsx(n9e,{})})]})})); diff --git a/backend/dist/assets/index-CPqSy0gZ.js b/backend/dist/assets/index-CPqSy0gZ.js new file mode 100644 index 0000000..ed5d318 --- /dev/null +++ b/backend/dist/assets/index-CPqSy0gZ.js @@ -0,0 +1,1151 @@ +function RY(e,n){for(var t=0;ti[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=t(r);fetch(r.href,a)}})();var hv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bw={exports:{}},Rd={};/** + * @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 GT;function PY(){if(GT)return Rd;GT=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(i,r,a){var o=null;if(a!==void 0&&(o=""+a),r.key!==void 0&&(o=""+r.key),"key"in r){a={};for(var l in r)l!=="key"&&(a[l]=r[l])}else a=r;return r=a.ref,{$$typeof:e,type:i,key:o,ref:r!==void 0?r:null,props:a}}return Rd.Fragment=n,Rd.jsx=t,Rd.jsxs=t,Rd}var YT;function NY(){return YT||(YT=1,Bw.exports=PY()),Bw.exports}var k=NY();function St(e){return Object.keys(e)}function Fw(e){return e&&typeof e=="object"&&!Array.isArray(e)}function s6(e,n){const t={...e},i=n;return Fw(e)&&Fw(n)&&Object.keys(n).forEach(r=>{Fw(i[r])&&r in e?t[r]=s6(t[r],i[r]):t[r]=i[r]}),t}function $Y(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function zY(e){var n;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(n=e.match(/^calc\((.*?)\)$/))==null?void 0:n[1].split("*")[0].trim()}function Sh(e){const n=zY(e);return typeof n=="number"?n:typeof n=="string"?n.includes("calc")||n.includes("var")?n:n.includes("px")?Number(n.replace("px","")):n.includes("rem")?Number(n.replace("rem",""))*16:n.includes("em")?Number(n.replace("em",""))*16:Number(n):NaN}function KT(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function q$(e,{shouldScale:n=!1}={}){function t(i){if(i===0||i==="0")return`0${e}`;if(typeof i=="number"){const r=`${i/16}${e}`;return n?KT(r):r}if(typeof i=="string"){if(i===""||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(a=>t(a)).join(",");if(i.includes(" "))return i.split(" ").map(a=>t(a)).join(" ");const r=i.replace("px","");if(!Number.isNaN(Number(r))){const a=`${Number(r)/16}${e}`;return n?KT(a):a}}return i}return t}const he=q$("rem",{shouldScale:!0}),sg=q$("em");function pu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function H$(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const n=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(t=>n.test(t))}return!1}var qw={exports:{}},En={};/** + * @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 XT;function LY(){if(XT)return En;XT=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function v(V){return V===null||typeof V!="object"?null:(V=p&&V[p]||V["@@iterator"],typeof V=="function"?V:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function _(V,W,$){this.props=V,this.context=W,this.refs=w,this.updater=$||y}_.prototype.isReactComponent={},_.prototype.setState=function(V,W){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,W,"setState")},_.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function S(){}S.prototype=_.prototype;function C(V,W,$){this.props=V,this.context=W,this.refs=w,this.updater=$||y}var E=C.prototype=new S;E.constructor=C,b(E,_.prototype),E.isPureReactComponent=!0;var A=Array.isArray;function T(){}var j={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function q(V,W,$){var X=$.ref;return{$$typeof:e,type:V,key:W,ref:X!==void 0?X:null,props:$}}function R(V,W){return q(V.type,W,V.props)}function L(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function B(V){var W={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function($){return W[$]})}var G=/\/+/g;function H(V,W){return typeof V=="object"&&V!==null&&V.key!=null?B(""+V.key):W.toString(36)}function U(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(T,T):(V.status="pending",V.then(function(W){V.status==="pending"&&(V.status="fulfilled",V.value=W)},function(W){V.status==="pending"&&(V.status="rejected",V.reason=W)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function P(V,W,$,X,te){var ae=typeof V;(ae==="undefined"||ae==="boolean")&&(V=null);var le=!1;if(V===null)le=!0;else switch(ae){case"bigint":case"string":case"number":le=!0;break;case"object":switch(V.$$typeof){case e:case n:le=!0;break;case h:return le=V._init,P(le(V._payload),W,$,X,te)}}if(le)return te=te(V),le=X===""?"."+H(V,0):X,A(te)?($="",le!=null&&($=le.replace(G,"$&/")+"/"),P(te,W,$,"",function(ue){return ue})):te!=null&&(L(te)&&(te=R(te,$+(te.key==null||V&&V.key===te.key?"":(""+te.key).replace(G,"$&/")+"/")+le)),W.push(te)),1;le=0;var ye=X===""?".":X+":";if(A(V))for(var oe=0;oe{const i=O.use(n);if(i===null)throw new Error(e);return i}]}function QT(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function lg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function IY(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].disabled)return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].disabled)return i}return e}function BY(e,n,t){for(let i=e+1;i{var y;t==null||t(l);const f=Array.from(((y=lg(l.currentTarget,e))==null?void 0:y.querySelectorAll(n))||[]).filter(b=>FY(l.currentTarget,b,e)),c=f.findIndex(b=>l.currentTarget===b),h=BY(c,f,i),d=IY(c,f,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[p].focus(),r&&f[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[v].focus(),r&&f[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[d].focus(),r&&f[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[h].focus(),r&&f[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!f[0].disabled&&f[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const b=f.length-1;!f[b].disabled&&f[b].focus();break}}}}const qY={app:100,modal:200,popover:300,overlay:400,max:9999};function ha(e){return qY[e]}const W3=()=>{};function HY(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||W3:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Mn(e,n="size",t=!0){if(e!==void 0)return H$(e)?t?he(e):e:`var(--${n}-${e})`}function Ft(e){return Mn(e,"mantine-spacing")}function Ut(e){return e===void 0?"var(--mantine-radius-default)":Mn(e,"mantine-radius")}function Zt(e){return Mn(e,"mantine-font-size")}function UY(e){return Mn(e,"mantine-line-height",!1)}function c6(e){if(e)return Mn(e,"mantine-shadow",!1)}function pr(e,n){return t=>{e==null||e(t),n==null||n(t)}}function d6(e,n){return e in n?Sh(n[e]):Sh(e)}function Ch(e,n){const t=e.map(i=>({value:i,px:d6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function zr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function VY(e,n,t){var i;return t?Array.from(((i=lg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Fo(e,n,t){return n===void 0&&t===void 0?e:n!==void 0&&t===void 0?Math.max(e,n):Math.min(n===void 0&&t!==void 0?e:Math.max(e,n),t)}function Xs(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function Jd(e){const n=O.useRef(e);return O.useEffect(()=>{n.current=e}),O.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function $1(e,n){const{delay:t,flushOnUnmount:i,leading:r,maxWait:a}=typeof n=="number"?{delay:n,flushOnUnmount:!1,leading:!1,maxWait:void 0}:n,o=Jd(e),l=O.useRef(0),f=O.useRef(0),c=O.useRef(null),h=O.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),c.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function y(){window.clearTimeout(l.current),window.clearTimeout(f.current),l.current=0,f.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function b(){a!==void 0&&f.current===0&&(f.current=window.setTimeout(()=>{if(l.current!==0){const S=c.current;y(),o(...S)}},a))}if(r&&v){o(...p);const S=()=>{y()},C=()=>{l.current!==0&&(y(),o(...p))},E=()=>{y()};d.flush=C,d.cancel=E,l.current=window.setTimeout(S,t),b();return}if(r&&!v){d._hasPendingCallback=!0;const S=()=>{l.current!==0&&(y(),o(...p))},C=()=>{y()};d.flush=S,d.cancel=C;const E=()=>{y()};l.current=window.setTimeout(E,t),b();return}d._hasPendingCallback=!0;const w=()=>{l.current!==0&&(y(),o(...p))},_=()=>{y()};d.flush=w,d.cancel=_,l.current=window.setTimeout(w,t),b()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return O.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const WY=["mousedown","touchstart"];function GY(e,n,t,i=!0){const r=O.useRef(null),a=n||WY,o=O.useEffectEvent(f=>{const{target:c}=f??{};if(!document.body.contains(c)&&(c==null?void 0:c.tagName)!=="HTML")return;const h=f.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(f):r.current&&!h.includes(r.current)&&e(f)}),l=a.join(",");return O.useEffect(()=>{if(!i)return;const f=l.split(",");return f.forEach(c=>document.addEventListener(c,o)),()=>{f.forEach(c=>document.removeEventListener(c,o))}},[l,i]),r}function YY(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function KY(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=O.useState(t?n:YY(e));return O.useEffect(()=>{try{if("matchMedia"in window){const a=window.matchMedia(e);r(a.matches);const o=l=>r(l.matches);return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}}catch{return}},[e]),i||!1}const ts=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Yo(e,n){const t=O.useRef(!1);O.useEffect(()=>()=>{t.current=!1},[]),O.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function V$({opened:e,shouldReturnFocus:n=!0}){const t=O.useRef(null),i=()=>{var r;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((r=t.current)==null||r.focus({preventScroll:!0}))};return Yo(()=>{let r=-1;const a=o=>{o.key==="Tab"&&window.clearTimeout(r)};if(document.addEventListener("keydown",a),e)t.current=document.activeElement;else if(n){const o=document.activeElement;r=window.setTimeout(()=>{const l=document.activeElement;(l===null||l===document.body||l===o)&&i()},10)}return()=>{window.clearTimeout(r),document.removeEventListener("keydown",a)}},[e,n]),i}const XY=/input|select|textarea|button|object/,W$="a, input, select, textarea, button, object, [tabindex]";function ZY(e){return e.style.display==="none"}function QY(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(ZY(n))return!1;n=n.parentNode}return!0}function G$(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function G3(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(G$(e));return(XY.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&QY(e)}function Y$(e){const n=G$(e);return(Number.isNaN(n)||n>=0)&&G3(e)}function JY(e){return Array.from(e.querySelectorAll(W$)).filter(Y$)}function eK(e,n){const t=JY(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function nK(e=!0){const n=O.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(W$));a=o.find(Y$)||o.find(G3)||null,!a&&G3(r)&&(a=r)}a?a.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",r)},i=O.useCallback(r=>{if(e){if(r===null){n.current=null;return}n.current!==r&&(setTimeout(()=>{r.getRootNode()?t(r):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",r)}),n.current=r)}},[e]);return O.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&eK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const tK=e=>(e+1)%1e6;function iK(){const[,e]=O.useReducer(tK,0);return e}function Gi(e){const[n,t]=O.useState(`mantine-${O.useId().replace(/:/g,"")}`);return ts(()=>{t(Xs())},[]),typeof e=="string"?e:n}function K$(e,n,t){const i=O.useEffectEvent(n);O.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function ug(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function rK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=ug(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():ug(i,null)}),n.clear()}}}function zt(...e){return O.useCallback(rK(...e),e)}function X$(e){return{x:Fo(e.x,0,1),y:Fo(e.y,0,1)}}function Z$(e,n,t="ltr"){const i=O.useRef(!1),r=O.useRef(!1),a=O.useRef(0),o=O.useRef(null),[l,f]=O.useState(!1);return O.useEffect(()=>(i.current=!0,()=>{var c;(c=o.current)==null||c.call(o)}),[]),{ref:O.useCallback(c=>{const h=({x:C,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&c){c.style.userSelect="none";const A=c.getBoundingClientRect();if(A.width&&A.height){const T=Fo((C-A.left)/A.width,0,1);e({x:t==="ltr"?T:1-T,y:Fo((E-A.top)/A.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",w),document.addEventListener("mouseup",y),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",y)},p=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",y)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),f(!0),d())},y=()=>{r.current&&i.current&&(r.current=!1,f(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},b=C=>{v(),C.preventDefault(),w(C)},w=C=>h({x:C.clientX,y:C.clientY}),_=C=>{C.cancelable&&C.preventDefault(),v(),S(C)},S=C=>{C.cancelable&&C.preventDefault(),h({x:C.changedTouches[0].clientX,y:C.changedTouches[0].clientY})};return c==null||c.addEventListener("mousedown",b),c==null||c.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{c&&(c.removeEventListener("mousedown",b),c.removeEventListener("touchstart",_))}},[t,e]),active:l}}function xi({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=O.useState(n!==void 0?n:t),o=(l,...f)=>{a(l),i==null||i(l,...f)};return e!==void 0?[e,i,!0]:[r,o,!1]}function h6(e,n){return KY("(prefers-reduced-motion: reduce)",e,n)}function Q$(e=!1,n={}){const[t,i]=O.useState(e),r=O.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=O.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:O.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function aK(e){const n=O.useRef(void 0);return O.useEffect(()=>{n.current=e},[e]),n.current}var Hw={exports:{}},Li={};/** + * @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 JT;function oK(){if(JT)return Li;JT=1;var e=l6();function n(f){var c="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Hw.exports=oK(),Hw.exports}var Vs=J$();const eh=ot(Vs);function sK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function lK(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});ts(()=>(Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a]),window.addEventListener(a,r[a])}),()=>Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a])})),[r])}function t(i){return(...r)=>sK(`${e}:${String(i)}`,r[0])}return[n,t]}var uK={};function fK(){return"development"}function z1(e){var t;const n=Z.version;return typeof Z.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function Wv(e,n=document){const t=n.querySelector(e);if(t)return t;const i=n.querySelectorAll("*");for(let r=0;r{Object.entries(t).forEach(([i,r])=>{n[i]?n[i]=cn(n[i],r):n[i]=r})}),n}function Ah({theme:e,classNames:n,props:t,stylesCtx:i}){return dK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||cK))}function fg({theme:e,styles:n,props:t,stylesCtx:i}){const r=Array.isArray(n)?n:[n],a={};for(const o of r)typeof o=="function"?Object.assign(a,o(e,t,i)):o&&Object.assign(a,o);return a}function n5(e){return e==="auto"||e==="dark"||e==="light"}function hK({key:e="mantine-color-scheme-value"}={}){let n;return{get:t=>{if(typeof window>"u")return t;try{const i=window.localStorage.getItem(e);return n5(i)?i:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(i){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",i)}},subscribe:t=>{n=i=>{i.storageArea===window.localStorage&&i.key===e&&n5(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function Oh(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function mK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function pK(e){let n=e.replace("#","");if(n.length===3){const i=n.split("");n=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(n.length===8){const i=parseInt(n.slice(6,8),16)/255;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:i}}const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255,a:1}}function vK(e){const[n,t,i,r]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:n,g:t,b:i,a:r===void 0?1:r}}function gK(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,f=o*(1-Math.abs(l%2-1)),c=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=f,p=0):l>=1&&l<2?(h=f,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=f):l>=3&&l<4?(h=0,d=f,p=o):l>=4&&l<5?(h=f,d=0,p=o):(h=o,d=0,p=f),{r:Math.round((h+c)*255),g:Math.round((d+c)*255),b:Math.round((p+c)*255),a:a||1}}function m6(e){return mK(e)?pK(e):e.startsWith("rgb")?vK(e):e.startsWith("hsl")?gK(e):{r:0,g:0,b:0,a:1}}function Uw(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function yK(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function nz(e){if(e.startsWith("oklch("))return(yK(e)||0)/100;const{r:n,g:t,b:i}=m6(e),r=n/255,a=t/255,o=i/255,l=Uw(r),f=Uw(a),c=Uw(o);return .2126*l+.7152*f+.0722*c}function Pd(e,n=.179){return e.startsWith("var(")?!1:nz(e)>n}function is({color:e,theme:n,colorScheme:t}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:t==="dark"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:Pd(t==="dark"?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:t==="dark"?n.colors.dark[2]:n.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Pd(t==="dark"?n.colors.dark[2]:n.colors.gray[6],n.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:Pd(e==="white"?n.white:n.black,n.luminanceThreshold),variable:`--mantine-color-${e}`};const[i,r]=e.split("."),a=r?Number(r):void 0,o=i in n.colors;if(o){const l=a!==void 0?n.colors[i][a]:n.colors[i][Oh(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:Pd(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Pd(e,n.luminanceThreshold),shade:a,variable:void 0}}function nt(e,n){const t=is({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function Hl(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=m6(e),o=1-n,l=f=>Math.round(f*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function Y3(e,n){const t={from:(e==null?void 0:e.from)||n.defaultGradient.from,to:(e==null?void 0:e.to)||n.defaultGradient.to,deg:(e==null?void 0:e.deg)??n.defaultGradient.deg??0},i=nt(t.from,n),r=nt(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Is(e,n){if(typeof e!="string"||n>1||n<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${(1-n)*100}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${n})`):e.replace(")",` / ${n})`);const{r:t,g:i,b:r}=m6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const t5=Is,bK=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=is({color:e,theme:n}),o=typeof r=="boolean"?r:n.autoContrast;if(t==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(t==="filled"){const l=o&&a.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:l,border:`${he(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:l,border:`${he(1)} solid transparent`}:{background:e,hover:Hl(e,.1),color:l,border:`${he(1)} solid transparent`}}if(t==="light"){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:Hl(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${he(1)} solid transparent`}}return{background:Is(e,.1),hover:Is(e,.12),color:e,border:`${he(1)} solid transparent`}}if(t==="outline")return a.isThemeColor?a.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${he(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Is(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${he(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Is(e,.05),color:e,border:`${he(1)} solid ${e}`};if(t==="subtle"){if(a.isThemeColor){if(a.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Is(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${he(1)} solid transparent`}}return{background:"transparent",hover:Is(e,.12),color:e,border:`${he(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${he(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${he(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${he(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${he(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Hl(n.white,.01),color:e,border:`${he(1)} solid transparent`}:t==="gradient"?{background:Y3(i,n),hover:Y3(i,n),color:"var(--mantine-color-white)",border:"none"}:t==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${he(1)} solid var(--mantine-color-default-border)`}:{}};function xm({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&is({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function i5(e,n){return xm({color:e.colors[e.primaryColor][Oh(e,n)],theme:e,autoContrast:null})}function L1(e,n){return typeof e=="boolean"?e:n.autoContrast}const tz=O.createContext(null);function so(){const e=O.use(tz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function wK(){return so().cssVariablesResolver}function kK(){return so().classNamesPrefix}function p6(){return so().getStyleNonce}function _K(){return so().withStaticClasses}function xK(){return so().headless}function SK(){var e;return(e=so().stylesTransform)==null?void 0:e.sx}function CK(){var e;return(e=so().stylesTransform)==null?void 0:e.styles}function Sm(){return so().env||"default"}function AK(){return so().deduplicateInlineStyles}function cf(e,n){var r,a;const t=typeof window<"u"&&"matchMedia"in window&&((r=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:r.matches),i=e!=="auto"?e:t?"dark":"light";(a=n())==null||a.setAttribute("data-mantine-color-scheme",i)}function OK({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=O.useRef(null),[a,o]=O.useState(()=>e.get(n)),l=i||a,f=O.useCallback(h=>{i||(cf(h,t),o(h),e.set(h))},[e.set,l,i]),c=O.useCallback(()=>{o(n),cf(n,t),e.clear()},[e.clear,n]);return O.useEffect(()=>(e.subscribe(f),e.unsubscribe),[e.subscribe,e.unsubscribe]),ts(()=>{cf(e.get(n),t)},[]),O.useEffect(()=>{var d;if(i)return cf(i,t),()=>{};i===void 0&&cf(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&cf(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:f,clearColorScheme:c}}const EK={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},r5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",v6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:EK,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:bK,autoContrast:!1,luminanceThreshold:.3,fontFamily:r5,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"md",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:r5,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:he(34),lineHeight:"1.3"},h2:{fontSize:he(26),lineHeight:"1.35"},h3:{fontSize:he(22),lineHeight:"1.4"},h4:{fontSize:he(18),lineHeight:"1.45"},h5:{fontSize:he(16),lineHeight:"1.5"},h6:{fontSize:he(14),lineHeight:"1.5"}}},fontSizes:{xs:he(12),sm:he(14),md:he(16),lg:he(18),xl:he(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},fontWeights:{regular:"400",medium:"600",bold:"700"},radius:{xs:he(2),sm:he(4),md:he(8),lg:he(16),xl:he(32)},spacing:{xs:he(10),sm:he(12),md:he(16),lg:he(20),xl:he(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), 0 ${he(1)} ${he(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(10)} ${he(15)} ${he(-5)}, rgba(0, 0, 0, 0.04) 0 ${he(7)} ${he(7)} ${he(-5)}`,md:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(20)} ${he(25)} ${he(-5)}, rgba(0, 0, 0, 0.04) 0 ${he(10)} ${he(10)} ${he(-5)}`,lg:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(28)} ${he(23)} ${he(-7)}, rgba(0, 0, 0, 0.04) 0 ${he(12)} ${he(12)} ${he(-7)}`,xl:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(36)} ${he(28)} ${he(-7)}, rgba(0, 0, 0, 0.04) 0 ${he(17)} ${he(17)} ${he(-7)}`},other:{},components:{}},TK="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",a5="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function Vw(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function o5(e){if(!(e.primaryColor in e.colors))throw new Error(TK);if(typeof e.primaryShade=="object"&&(!Vw(e.primaryShade.dark)||!Vw(e.primaryShade.light)))throw new Error(a5);if(typeof e.primaryShade=="number"&&!Vw(e.primaryShade))throw new Error(a5)}function MK(e,n){var i;if(!n)return o5(e),e;const t=s6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),o5(t),t}const g6=O.createContext(null),jK=()=>O.use(g6)||v6;function ni(){const e=O.use(g6);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function iz({theme:e,children:n,inherit:t=!0}){const i=jK();return k.jsx(g6,{value:O.useMemo(()=>MK(t?i:v6,e),[e,i,t]),children:n})}iz.displayName="@mantine/core/MantineThemeProvider";function Ww(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function rz(e,n){const t=n?[n]:[":root",":host"],i=Ww(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=Ww(e.dark),o=Ww(e.light),l=f=>t.map(c=>c===":host"?`${c}([data-mantine-color-scheme="${f}"])`:`${c}[data-mantine-color-scheme="${f}"]`).join(", ");return`${r} + +${a?`${l("dark")}{${a}}`:""} + +${o?`${l("light")}{${o}}`:""}`}function mv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=Oh(e,"light"),f={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:t5(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...f}:f}const a=Oh(e,"dark"),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${a===9?8:a+1})`,[`--mantine-color-${i}-light`]:Hl(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:Hl(e.colors[n][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(a-4,0)})`,[`--mantine-color-${i}-outline-hover`]:t5(e.colors[n][Math.max(a-4,0)],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...o}:o}function DK(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Nl(e,n,t){St(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const az=e=>{const n=Oh(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:he(e.defaultRadius),i={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":t,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":i5(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${n})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":i5(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Nl(i.variables,e.breakpoints,"breakpoint"),Nl(i.variables,e.spacing,"spacing"),Nl(i.variables,e.fontSizes,"font-size"),Nl(i.variables,e.lineHeights,"line-height"),Nl(i.variables,e.shadows,"shadow"),Nl(i.variables,e.radius,"radius"),Nl(i.variables,e.fontWeights,"font-weight"),e.colors[e.primaryColor].forEach((a,o)=>{i.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${e.primaryColor}-${o})`}),St(e.colors).forEach(a=>{const o=e.colors[a];if(DK(o)){Object.assign(i.light,mv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,mv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,f)=>{i.variables[`--mantine-color-${a}-${f}`]=l}),Object.assign(i.light,mv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,mv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return St(r).forEach(a=>{i.variables[`--mantine-${a}-font-size`]=r[a].fontSize,i.variables[`--mantine-${a}-line-height`]=r[a].lineHeight,i.variables[`--mantine-${a}-font-weight`]=r[a].fontWeight||e.headings.fontWeight}),i};function RK(){const e=ni(),n=p6(),t=St(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=Sh(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:sg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:sg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return k.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function PK({theme:e,generator:n}){const t=az(e),i=n==null?void 0:n(e);return i?s6(t,i):t}const Gw=az(v6);function NK(e){const n={variables:{},light:{},dark:{}};return St(e.variables).forEach(t=>{Gw.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),St(e.light).forEach(t=>{Gw.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),St(e.dark).forEach(t=>{Gw.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function $K(e){return rz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function oz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ni(),i=p6(),r=PK({theme:t,generator:wK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=rz(a?NK(r):r,e);return o?k.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":$K(e)}`}}):null}oz.displayName="@mantine/CssVariables";function zK({respectReducedMotion:e,getRootElement:n}){ts(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function sz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:f="mantine",colorSchemeManager:c=hK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:y,env:b,deduplicateInlineStyles:w=!1}){const{colorScheme:_,setColorScheme:S,clearColorScheme:C}=OK({defaultColorScheme:h,forceColorScheme:v,manager:c,getRootElement:d});return zK({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),k.jsx(tz,{value:{colorScheme:_,setColorScheme:S,clearColorScheme:C,getRootElement:d,classNamesPrefix:f,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:y,env:b,deduplicateInlineStyles:w},children:k.jsxs(iz,{theme:e,children:[o&&k.jsx(oz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&k.jsx(RK,{}),n]})})}sz.displayName="@mantine/core/MantineProvider";function ge(e,n,t){var o;const i=ni(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...pu(t)}}function Ni({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ni();return{resolvedClassNames:e===void 0?void 0:Ah({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:fg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const LK={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function IK({theme:e,options:n,unstyled:t}){return cn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||LK[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function BK({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return Ah({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function FK({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Ah({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function qK({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function HK({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function UK({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function VK({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function WK({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:f,className:c,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:y,transformedStyles:b}){return cn(IK({theme:e,options:n,unstyled:f||y}),o.map(w=>w[i]),VK({options:n,classes:l,selector:i,unstyled:f||y}),a[i],FK({selector:i,stylesCtx:p,theme:e,classNames:b,props:d}),BK({selector:i,stylesCtx:p,options:n,props:d,theme:e}),qK({rootSelector:h,selector:i,className:c}),HK({selector:i,classes:l,unstyled:f||y}),v&&!y&&UK({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function y6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...y6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function GK({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:f,resolvedVars:c,resolvedRootStyle:h}){return{...f[n],...l[n],...!o&&fg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...c[n],...a===n?h:null,...y6({style:t==null?void 0:t.style,theme:e})}}function YK(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...pu(t[i])}}),n),{})}function KK({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=CK())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(f=>r(f,{props:e,theme:i,ctx:n})),...t.map(f=>{var c;return r((c=i.components[f])==null?void 0:c.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Ge({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:f,styles:c,vars:h,varsResolver:d,attributes:p}){var R;const v=ni(),y=kK(),b=_K(),w=xK(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:S,getTransformedStyles:C}=KK({props:t,stylesCtx:i,themeName:_,theme:v}),E=Ah({theme:v,classNames:f,props:t,stylesCtx:i}),A=_.map(L=>{var B;return Ah({theme:v,classNames:(B=v.components[L])==null?void 0:B.classNames,props:t,stylesCtx:i})}),T=S?{}:fg({theme:v,styles:c,props:t,stylesCtx:i}),j={};if(!S)for(const L of _){const B=fg({theme:v,styles:(R=v.components[L])==null?void 0:R.styles,props:t,stylesCtx:i});for(const G of Object.keys(B))j[G]={...j[G],...B[G]}}const N=YK([w?{}:d==null?void 0:d(v,t,i),..._.map(L=>{var B,G,H;return(H=(G=(B=v.components)==null?void 0:B[L])==null?void 0:G.vars)==null?void 0:H.call(G,v,t,i)}),h==null?void 0:h(v,t,i)]),q=y6({style:a,theme:v});return(L,B)=>({...p==null?void 0:p[L],className:WK({theme:v,options:B,themeName:_,selector:L,classNamesPrefix:y,resolvedClassNames:E,resolvedThemeClassNames:A,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:b,headless:w,transformedStyles:C([B==null?void 0:B.styles,c])}),style:GK({theme:v,selector:L,options:B,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:S,resolvedStyles:T,resolvedThemeStyles:j,resolvedVars:N,resolvedRootStyle:q})})}function fh(e){return St(e).reduce((n,t)=>e[t]!==void 0?`${n}${$Y(t)}:${e[t]};`:n,"").trim()}function XK({selector:e,styles:n,media:t,container:i}){const r=n?fh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${fh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${fh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function ZK(e){let n=5381;for(let t=0;t>>0).toString(36)}function vc({deduplicate:e,...n}){const t=p6(),i=XK(n);return e?k.jsx("style",{href:`mantine-${ZK(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):k.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function QK(e){let n=5381;for(let t=0;t>>0).toString(36)}function JK(e,n){return`__mdi__-${QK(`${e?fh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${fh(t.styles)}`).join("|"):""}`)}`}function gu(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:y,pt:b,pb:w,pl:_,pr:S,pe:C,ps:E,pis:A,pie:T,bd:j,bdrs:N,bg:q,c:R,opacity:L,ff:B,fz:G,fw:H,lts:U,ta:P,lh:z,fs:F,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:te,mah:ae,bgsz:le,bgp:ye,bgr:oe,bga:ue,pos:ke,top:ie,left:Re,bottom:pe,right:Ce,inset:De,display:be,flex:_e,hiddenFrom:Me,visibleFrom:Be,lightHidden:Ve,darkHidden:He,sx:We,...Ye}=e;return{styleProps:pu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:y,pt:b,pb:w,pl:_,pr:S,pis:A,pie:T,pe:C,ps:E,bd:j,bg:q,c:R,opacity:L,ff:B,fz:G,fw:H,lts:U,ta:P,lh:z,fs:F,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:te,mah:ae,bgsz:le,bgp:ye,bgr:oe,bga:ue,pos:ke,top:ie,left:Re,bottom:pe,right:Ce,inset:De,display:be,flex:_e,bdrs:N,hiddenFrom:Me,visibleFrom:Be,lightHidden:Ve,darkHidden:He,sx:We}),rest:Ye}}const eX={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mis:{type:"spacing",property:"marginInlineStart"},mie:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},pis:{type:"spacing",property:"paddingInlineStart"},pie:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function b6(e,n){const t=is({color:e,theme:n});return t.color==="dimmed"?"var(--mantine-color-dimmed)":t.color==="bright"?"var(--mantine-color-bright)":t.variable?`var(${t.variable})`:t.color}function nX(e,n){const t=is({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:b6(e,n)}function tX(e,n){if(typeof e=="number")return he(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${he(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${b6(r.join(" "),n)}`),a.trim()}return e}const s5={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function iX(e){return typeof e=="string"&&e in s5?s5[e]:e}const rX=["h1","h2","h3","h4","h5","h6"];function aX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&rX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?he(e):e}function oX(e){return e}const sX=["h1","h2","h3","h4","h5","h6"];function lX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&sX.includes(e)?`var(--mantine-${e}-line-height)`:e}function uX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?he(e):e}function fX(e){return typeof e=="number"?he(e):e}function cX(e,n){if(typeof e=="number")return he(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return he(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const Yw={color:b6,textColor:nX,fontSize:aX,spacing:cX,radius:uX,identity:oX,size:fX,lineHeight:lX,fontFamily:iX,border:tX};function l5(e){return e.replace("(min-width: ","").replace("em)","")}function dX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(l5(i))-Number(l5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function hX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function mX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function pX(e){return typeof e=="object"&&e!==null?St(e).filter(n=>n!=="base"):[]}function vX(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function gX({styleProps:e,data:n,theme:t}){return dX(St(e).reduce((i,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return i;const a=n[r],o=Array.isArray(a.property)?a.property:[a.property],l=mX(e[r]);if(!hX(e[r]))return o.forEach(c=>{i.inlineStyles[c]=Yw[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const f=pX(e[r]);return o.forEach(c=>{l!=null&&(i.styles[c]=Yw[a.type](l,t)),f.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[c]:Yw[a.type](vX(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function I1(){return`__m__-${O.useId().replace(/[:«»]/g,"")}`}function lz(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...lz(i,n)}),{}):typeof e=="function"?e(n):e??{}}function yX(e){return e}const bX=yX;function uz(e){return e}function Pe(e){const n=e;return n.extend=uz,n.withProps=t=>{const i=r=>k.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function B1(e){return Pe(e)}function $i(e){const n=e;return n.withProps=t=>{const i=r=>k.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=uz,n}function fz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function wX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[fz(t)]=e[t]),n},{})}function cz(e){return e?typeof e=="string"?{[fz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...cz(t)}),{}):wX(e):null}function K3(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...K3(i,n)}),{}):typeof e=="function"?e(n):e??{}}function kX({theme:e,style:n,vars:t,styleProps:i}){const r=K3(n,e),a=K3(t,e);return{...r,...a,...i}}function dz({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:f,lightHidden:c,darkHidden:h,renderRoot:d,__size:p,ref:v,...y}){var q,R;const b=ni(),w=e||"div",{styleProps:_,rest:S}=gu(y),C=(R=(q=SK())==null?void 0:q())==null?void 0:R(_.sx),E=I1(),A=gX({styleProps:_,theme:b,data:eX}),T=AK(),j=T&&A.hasResponsiveStyles?JK(A.styles,A.media):E,N={ref:v,style:kX({theme:b,style:n,vars:t,styleProps:A.inlineStyles}),className:cn(i,C,{[j]:A.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${f}`]:f}),"data-variant":r,"data-size":H$(o)?void 0:o||void 0,size:p,...cz(a),...S};return k.jsxs(k.Fragment,{children:[A.hasResponsiveStyles&&k.jsx(vc,{selector:`.${j}`,styles:A.styles,media:A.media,deduplicate:T}),typeof d=="function"?d(N):k.jsx(w,{...N})]})}dz.displayName="@mantine/core/Box";const we=bX(dz),_X=O.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function yu(){return O.use(_X)}const[xX,ma]=da("ScrollArea.Root component was not found in tree");function Js(e,n){const t=O.useEffectEvent(n);ts(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(t)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e])}function SX(e){const{style:n,...t}=e,i=ma(),[r,a]=O.useState(0),[o,l]=O.useState(0),f=!!(r&&o);return Js(i.scrollbarX,()=>{var h;const c=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(c),l(c)}),Js(i.scrollbarY,()=>{var h;const c=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(c),a(c)}),f?k.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function CX(e){const n=ma(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?k.jsx(SX,{...e}):null}const AX={scrollHideDelay:1e3,type:"hover"};function hz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=ge("ScrollAreaRoot",AX,e),[l,f]=O.useState(null),[c,h]=O.useState(null),[d,p]=O.useState(null),[v,y]=O.useState(null),[b,w]=O.useState(null),[_,S]=O.useState(0),[C,E]=O.useState(0),[A,T]=O.useState(!1),[j,N]=O.useState(!1),q=zt(a,R=>f(R));return k.jsx(xX,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:c,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:A,onScrollbarXEnabledChange:T,scrollbarY:b,onScrollbarYChange:w,scrollbarYEnabled:j,onScrollbarYEnabledChange:N,onCornerWidthChange:S,onCornerHeightChange:E,getStyles:r},children:k.jsx(we,{...o,ref:q,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${C}px`}})})}hz.displayName="@mantine/core/ScrollAreaRoot";function mz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function F1(e){const n=mz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function pz(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(t-e[0])}}function OX(e,[n,t]){return Math.min(t,Math.max(n,e))}function u5(e,n,t="ltr"){const i=F1(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,f=OX(e,t==="ltr"?[0,o]:[o*-1,0]);return pz([0,o],[0,l])(f)}function EX(e,n,t,i="ltr"){const r=F1(t),a=r/2,o=n||a,l=r-o,f=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return pz([f,c],d)(e)}function vz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[TX,gz]=da("ScrollAreaScrollbar was not found in tree");function yz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:f,onResize:c,ref:h,...d}=e,p=ma(),[v,y]=O.useState(null),b=zt(h,N=>y(N)),w=O.useRef(null),_=O.useRef(""),{viewport:S}=p,C=n.content-n.viewport,E=O.useEffectEvent(f),A=Jd(o),T=$1(c,10),j=N=>{w.current&&l({x:N.clientX-w.current.left,y:N.clientY-w.current.top})};return O.useEffect(()=>{const N=q=>{const R=q.target;v!=null&&v.contains(R)&&E(q,C)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[S,v,C]),O.useEffect(A,[n,A]),Js(v,T),Js(p.content,T),k.jsx(TX,{value:{scrollbar:v,hasThumb:t,onThumbChange:Jd(i),onThumbPointerUp:Jd(r),onThumbPositionChange:A,onThumbPointerDown:Jd(a)},children:k.jsx("div",{...d,ref:b,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:eu(e.onPointerDown,N=>{N.preventDefault(),N.button===0&&(N.target.setPointerCapture(N.pointerId),w.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j(N))}),onPointerMove:eu(e.onPointerMove,j),onPointerUp:eu(e.onPointerUp,N=>{const q=N.target;q.hasPointerCapture(N.pointerId)&&(N.preventDefault(),q.releasePointerCapture(N.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,w.current=null}})})}const bz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ma(),[l,f]=O.useState(),c=O.useRef(null),h=zt(r,c,o.onScrollbarXChange);return O.useEffect(()=>{c.current&&f(getComputedStyle(c.current))},[c]),k.jsx(yz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${F1(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),vz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:cg(l.paddingLeft),paddingEnd:cg(l.paddingRight)}})}})};bz.displayName="@mantine/core/ScrollAreaScrollbarX";function wz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ma(),[l,f]=O.useState(),c=O.useRef(null),h=zt(r,c,o.onScrollbarYChange);return O.useEffect(()=>{c.current&&f(window.getComputedStyle(c.current))},[]),k.jsx(yz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${F1(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),vz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:cg(l.paddingTop),paddingEnd:cg(l.paddingBottom)}})}})}wz.displayName="@mantine/core/ScrollAreaScrollbarY";function q1(e){const{orientation:n="vertical",...t}=e,{dir:i}=yu(),r=ma(),a=O.useRef(null),o=O.useRef(0),[l,f]=O.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=mz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>EX(p,o.current,l,v);return n==="horizontal"?k.jsx(bz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=u5(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?k.jsx(wz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=u5(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}q1.displayName="@mantine/core/ScrollAreaScrollbarVisible";function w6(e){const n=ma(),{forceMount:t,...i}=e,[r,a]=O.useState(!1),o=e.orientation==="horizontal",l=$1(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const f=()=>{window.clearTimeout(l),a(!0)},c=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",f),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",f),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),n||r?k.jsx(w6,{"data-state":r?"visible":"hidden",...t}):null}kz.displayName="@mantine/core/ScrollAreaScrollbarHover";function MX(e){const{forceMount:n,...t}=e,i=ma(),r=e.orientation==="horizontal",[a,o]=O.useState("hidden"),l=$1(()=>o("idle"),100);return O.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,i.scrollHideDelay]),O.useEffect(()=>{const{viewport:f}=i,c=r?"scrollLeft":"scrollTop";if(f){let h=f[c];const d=()=>{const p=f[c];h!==p&&(o("scrolling"),l()),h=p};return f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?k.jsx(q1,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:eu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:eu(e.onPointerLeave,()=>o("idle"))}):null}function X3(e){const{forceMount:n,...t}=e,i=ma(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return O.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?k.jsx(kz,{...t,forceMount:n}):i.type==="scroll"?k.jsx(MX,{...t,forceMount:n}):i.type==="auto"?k.jsx(w6,{...t,forceMount:n}):i.type==="always"?k.jsx(q1,{...t}):null}X3.displayName="@mantine/core/ScrollAreaScrollbar";function jX(e,n=()=>{}){let t={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=t.left!==a.left,l=t.top!==a.top;(o||l)&&n(),t=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)}function _z(e){const{style:n,ref:t,...i}=e,r=ma(),a=gz(),{onThumbPositionChange:o}=a,l=zt(t,h=>a.onThumbChange(h)),f=O.useRef(void 0),c=$1(()=>{f.current&&(f.current(),f.current=void 0)},100);return O.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{c(),f.current||(f.current=jX(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,c,o]),k.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:eu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:eu(e.onPointerUp,a.onThumbPointerUp)})}_z.displayName="@mantine/core/ScrollAreaThumb";function Z3(e){const{forceMount:n,...t}=e,i=gz();return n||i.hasThumb?k.jsx(_z,{...t}):null}Z3.displayName="@mantine/core/ScrollAreaThumb";function xz({children:e,style:n,ref:t,onWheel:i,...r}){const a=ma(),o=zt(t,a.onViewportChange),l=f=>{if(i==null||i(f),a.scrollbarXEnabled&&a.viewport&&f.shiftKey){const{scrollTop:c,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,y=c<1,b=c>=h-d-1;p>v&&(y||b)&&f.stopPropagation()}};return k.jsx(we,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:k.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}xz.displayName="@mantine/core/ScrollAreaViewport";var k6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function H1(){return typeof window<"u"}function gc(e){return Sz(e)?(e.nodeName||"").toLowerCase():"#document"}function gr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function lo(e){var n;return(n=(Sz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Sz(e){return H1()?e instanceof Node||e instanceof gr(e).Node:!1}function Pt(e){return H1()?e instanceof Element||e instanceof gr(e).Element:!1}function pa(e){return H1()?e instanceof HTMLElement||e instanceof gr(e).HTMLElement:!1}function Q3(e){return!H1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gr(e).ShadowRoot}function Cm(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=fa(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function DX(e){return/^(table|td|th)$/.test(gc(e))}function U1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const RX=/transform|translate|scale|rotate|perspective|filter/,PX=/paint|layout|strict|content/,$l=e=>!!e&&e!=="none";let Kw;function _6(e){const n=Pt(e)?fa(e):e;return $l(n.transform)||$l(n.translate)||$l(n.scale)||$l(n.rotate)||$l(n.perspective)||!V1()&&($l(n.backdropFilter)||$l(n.filter))||RX.test(n.willChange||"")||PX.test(n.contain||"")}function NX(e){let n=Ko(e);for(;pa(n)&&!qo(n);){if(_6(n))return n;if(U1(n))return null;n=Ko(n)}return null}function V1(){return Kw==null&&(Kw=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kw}function qo(e){return/^(html|body|#document)$/.test(gc(e))}function fa(e){return gr(e).getComputedStyle(e)}function W1(e){return Pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ko(e){if(gc(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Q3(e)&&e.host||lo(e);return Q3(n)?n.host:n}function Cz(e){const n=Ko(e);return qo(n)?e.ownerDocument?e.ownerDocument.body:e.body:pa(n)&&Cm(n)?n:Cz(n)}function Ho(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Cz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=gr(r);if(a){const l=J3(o);return n.concat(o,o.visualViewport||[],Cm(r)?r:[],l&&t?Ho(l):[])}else return n.concat(r,Ho(r,[],t))}function J3(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const $X=["top","right","bottom","left"],Da=Math.min,Fi=Math.max,dg=Math.round,pv=Math.floor,Xa=e=>({x:e,y:e}),zX={left:"right",right:"left",bottom:"top",top:"bottom"};function eS(e,n,t){return Fi(e,Da(n,t))}function to(e,n){return typeof e=="function"?e(n):e}function Ra(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function x6(e){return e==="x"?"y":"x"}function S6(e){return e==="y"?"height":"width"}function Ea(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function C6(e){return x6(Ea(e))}function LX(e,n,t){t===void 0&&(t=!1);const i=yc(e),r=C6(e),a=S6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=hg(o)),[o,hg(o)]}function IX(e){const n=hg(e);return[nS(e),n,nS(n)]}function nS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const f5=["left","right"],c5=["right","left"],BX=["top","bottom"],FX=["bottom","top"];function qX(e,n,t){switch(e){case"top":case"bottom":return t?n?c5:f5:n?f5:c5;case"left":case"right":return n?BX:FX;default:return[]}}function HX(e,n,t,i){const r=yc(e);let a=qX(Ra(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(nS)))),a}function hg(e){const n=Ra(e);return zX[n]+e.slice(n.length)}function UX(e){return{top:0,right:0,bottom:0,left:0,...e}}function A6(e){return typeof e!="number"?UX(e):{top:e,right:e,bottom:e,left:e}}function If(e){const{x:n,y:t,width:i,height:r}=e;return{width:i,height:r,top:t,left:n,right:n+i,bottom:t+r,x:n,y:t}}function VX(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function WX(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:t,version:i}=n;return t+"/"+i}).join(" "):navigator.userAgent}function GX(){return/apple/i.test(navigator.vendor)}function YX(){return VX().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function KX(){return WX().includes("jsdom/")}const d5="data-floating-ui-focusable",XX="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function h5(e){let n=e.activeElement;for(;((t=n)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}function Eh(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&Q3(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function xf(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Xw(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const t=e;return t.target!=null&&n.contains(t.target)}function ZX(e){return e.matches("html,body")}function Vl(e){return(e==null?void 0:e.ownerDocument)||document}function QX(e){return pa(e)&&e.matches(XX)}function JX(e){if(!e||KX())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function eZ(e){return e?e.hasAttribute(d5)?e:e.querySelector("["+d5+"]")||e:null}function Gv(e,n,t){return t===void 0&&(t=!0),e.filter(r=>{var a;return r.parentId===n&&(!t||((a=r.context)==null?void 0:a.open))}).flatMap(r=>[r,...Gv(e,r.id,t)])}function nZ(e){return"nativeEvent"in e}function tS(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var tZ=typeof document<"u",iZ=function(){},Za=tZ?O.useLayoutEffect:iZ;const rZ={...U$};function vv(e){const n=O.useRef(e);return Za(()=>{n.current=e}),n}const aZ=rZ.useInsertionEffect,oZ=aZ||(e=>e());function Wa(e){const n=O.useRef(()=>{});return oZ(()=>{n.current=e}),O.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:sZ},f=await(o.isRTL==null?void 0:o.isRTL(n));let c=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=m5(c,i,f),p=i,v=0;const y={};for(let b=0;b({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:f}=n,{element:c,padding:h=0}=to(e,n)||{};if(c==null)return{};const d=A6(h),p={x:t,y:i},v=C6(r),y=S6(v),b=await o.getDimensions(c),w=v==="y",_=w?"top":"left",S=w?"bottom":"right",C=w?"clientHeight":"clientWidth",E=a.reference[y]+a.reference[v]-p[v]-a.floating[y],A=p[v]-a.reference[v],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let j=T?T[C]:0;(!j||!await(o.isElement==null?void 0:o.isElement(T)))&&(j=l.floating[C]||a.floating[y]);const N=E/2-A/2,q=j/2-b[y]/2-1,R=Da(d[_],q),L=Da(d[S],q),B=R,G=j-b[y]-L,H=j/2-b[y]/2+N,U=eS(B,H,G),P=!f.arrow&&yc(r)!=null&&H!==U&&a.reference[y]/2-(HH<=0)){var L,B;const H=(((L=a.flip)==null?void 0:L.index)||0)+1,U=j[H];if(U&&(!(d==="alignment"?S!==Ea(U):!1)||R.every(F=>Ea(F.placement)===S?F.overflows[0]>0:!0)))return{data:{index:H,overflows:R},reset:{placement:U}};let P=(B=R.filter(z=>z.overflows[0]<=0).sort((z,F)=>z.overflows[1]-F.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(v){case"bestFit":{var G;const z=(G=R.filter(F=>{if(T){const Y=Ea(F.placement);return Y===S||Y==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(Y=>Y>0).reduce((Y,D)=>Y+D,0)]).sort((F,Y)=>F[1]-Y[1])[0])==null?void 0:G[0];z&&(P=z);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function p5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function v5(e){return $X.some(n=>e[n]>=0)}const dZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=to(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=p5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:v5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=p5(o,t.floating);return{data:{escapedOffsets:l,escaped:v5(l)}}}default:return{}}}}};function Az(e){const n=Da(...e.map(a=>a.left)),t=Da(...e.map(a=>a.top)),i=Fi(...e.map(a=>a.right)),r=Fi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function hZ(e){const n=e.slice().sort((r,a)=>r.y-a.y),t=[];let i=null;for(let r=0;ri.height/2?t.push([a]):t[t.length-1].push(a),i=a}return t.map(r=>If(Az(r)))}const mZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:f,y:c}=to(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=hZ(h),p=If(Az(h)),v=A6(l);function y(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&c!=null)return d.find(w=>f>w.left-v.left&&fw.top-v.top&&c=2){if(Ea(t)==="y"){const R=d[0],L=d[d.length-1],B=Ra(t)==="top",G=R.top,H=L.bottom,U=B?R.left:L.left,P=B?R.right:L.right,z=P-U,F=H-G;return{top:G,bottom:H,left:U,right:P,width:z,height:F,x:U,y:G}}const w=Ra(t)==="left",_=Fi(...d.map(R=>R.right)),S=Da(...d.map(R=>R.left)),C=d.filter(R=>w?R.left===S:R.right===_),E=C[0].top,A=C[C.length-1].bottom,T=S,j=_,N=j-T,q=A-E;return{top:E,bottom:A,left:T,right:j,width:N,height:q,x:T,y:E}}return p}const b=await a.getElementRects({reference:{getBoundingClientRect:y},floating:i.floating,strategy:o});return r.reference.x!==b.reference.x||r.reference.y!==b.reference.y||r.reference.width!==b.reference.width||r.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},Oz=new Set(["left","top"]);async function pZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Ra(t),l=yc(t),f=Ea(t)==="y",c=Oz.has(o)?-1:1,h=a&&f?-1:1,d=to(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof y=="number"&&(v=l==="end"?y*-1:y),f?{x:v*h,y:p*c}:{x:p*c,y:v*h}}const vZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,f=await pZ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:a+f.y,data:{...f,placement:o}}}}},gZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:f={fn:_=>{let{x:S,y:C}=_;return{x:S,y:C}}},...c}=to(e,n),h={x:t,y:i},d=await a.detectOverflow(n,c),p=Ea(Ra(r)),v=x6(p);let y=h[v],b=h[p];if(o){const _=v==="y"?"top":"left",S=v==="y"?"bottom":"right",C=y+d[_],E=y-d[S];y=eS(C,y,E)}if(l){const _=p==="y"?"top":"left",S=p==="y"?"bottom":"right",C=b+d[_],E=b-d[S];b=eS(C,b,E)}const w=f.fn({...n,[v]:y,[p]:b});return{...w,data:{x:w.x-t,y:w.y-i,enabled:{[v]:o,[p]:l}}}}}},yZ=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:f=!0,crossAxis:c=!0}=to(e,n),h={x:t,y:i},d=Ea(r),p=x6(d);let v=h[p],y=h[d];const b=to(l,n),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(f){const C=p==="y"?"height":"width",E=a.reference[p]-a.floating[C]+w.mainAxis,A=a.reference[p]+a.reference[C]-w.mainAxis;vA&&(v=A)}if(c){var _,S;const C=p==="y"?"width":"height",E=Oz.has(Ra(r)),A=a.reference[d]-a.floating[C]+(E&&((_=o.offset)==null?void 0:_[d])||0)+(E?0:w.crossAxis),T=a.reference[d]+a.reference[C]+(E?0:((S=o.offset)==null?void 0:S[d])||0)-(E?w.crossAxis:0);yT&&(y=T)}return{[p]:v,[d]:y}}}},bZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:f=()=>{},...c}=to(e,n),h=await o.detectOverflow(n,c),d=Ra(r),p=yc(r),v=Ea(r)==="y",{width:y,height:b}=a.floating;let w,_;d==="top"||d==="bottom"?(w=d,_=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(_=d,w=p==="end"?"top":"bottom");const S=b-h.top-h.bottom,C=y-h.left-h.right,E=Da(b-h[w],S),A=Da(y-h[_],C),T=!n.middlewareData.shift;let j=E,N=A;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(N=C),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(j=S),T&&!p){const R=Fi(h.left,0),L=Fi(h.right,0),B=Fi(h.top,0),G=Fi(h.bottom,0);v?N=y-2*(R!==0||L!==0?R+L:Fi(h.left,h.right)):j=b-2*(B!==0||G!==0?B+G:Fi(h.top,h.bottom))}await f({...n,availableWidth:N,availableHeight:j});const q=await o.getDimensions(l.floating);return y!==q.width||b!==q.height?{reset:{rects:!0}}:{}}}};function Ez(e){const n=fa(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=pa(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=dg(t)!==a||dg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function O6(e){return Pt(e)?e:e.contextElement}function Mf(e){const n=O6(e);if(!pa(n))return Xa(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=Ez(n);let o=(a?dg(t.width):t.width)/i,l=(a?dg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const wZ=Xa(0);function Tz(e){const n=gr(e);return!V1()||!n.visualViewport?wZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function kZ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==gr(e)?!1:n}function iu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=O6(e);let o=Xa(1);n&&(i?Pt(i)&&(o=Mf(i)):o=Mf(e));const l=kZ(a,t,i)?Tz(a):Xa(0);let f=(r.left+l.x)/o.x,c=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=gr(a),v=i&&Pt(i)?gr(i):i;let y=p,b=J3(y);for(;b&&i&&v!==y;){const w=Mf(b),_=b.getBoundingClientRect(),S=fa(b),C=_.left+(b.clientLeft+parseFloat(S.paddingLeft))*w.x,E=_.top+(b.clientTop+parseFloat(S.paddingTop))*w.y;f*=w.x,c*=w.y,h*=w.x,d*=w.y,f+=C,c+=E,y=gr(b),b=J3(y)}}return If({width:h,height:d,x:f,y:c})}function G1(e,n){const t=W1(e).scrollLeft;return n?n.left+t:iu(lo(e)).left+t}function Mz(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-G1(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function _Z(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=lo(i),l=n?U1(n.floating):!1;if(i===o||l&&a)return t;let f={scrollLeft:0,scrollTop:0},c=Xa(1);const h=Xa(0),d=pa(i);if((d||!d&&!a)&&((gc(i)!=="body"||Cm(o))&&(f=W1(i)),d)){const v=iu(i);c=Mf(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?Mz(o,f):Xa(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-f.scrollLeft*c.x+h.x+p.x,y:t.y*c.y-f.scrollTop*c.y+h.y+p.y}}function xZ(e){return Array.from(e.getClientRects())}function SZ(e){const n=lo(e),t=W1(e),i=e.ownerDocument.body,r=Fi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Fi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+G1(e);const l=-t.scrollTop;return fa(i).direction==="rtl"&&(o+=Fi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const g5=25;function CZ(e,n){const t=gr(e),i=lo(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,f=0;if(r){a=r.width,o=r.height;const h=V1();(!h||h&&n==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=G1(i);if(c<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(i.clientWidth-d.clientWidth-v);y<=g5&&(a-=y)}else c<=g5&&(a+=c);return{width:a,height:o,x:l,y:f}}function AZ(e,n){const t=iu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=pa(e)?Mf(e):Xa(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,f=r*a.x,c=i*a.y;return{width:o,height:l,x:f,y:c}}function y5(e,n,t){let i;if(n==="viewport")i=CZ(e,t);else if(n==="document")i=SZ(lo(e));else if(Pt(n))i=AZ(n,t);else{const r=Tz(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return If(i)}function jz(e,n){const t=Ko(e);return t===n||!Pt(t)||qo(t)?!1:fa(t).position==="fixed"||jz(t,n)}function OZ(e,n){const t=n.get(e);if(t)return t;let i=Ho(e,[],!1).filter(l=>Pt(l)&&gc(l)!=="body"),r=null;const a=fa(e).position==="fixed";let o=a?Ko(e):e;for(;Pt(o)&&!qo(o);){const l=fa(o),f=_6(o);!f&&l.position==="fixed"&&(r=null),(a?!f&&!r:!f&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Cm(o)&&!f&&jz(e,o))?i=i.filter(h=>h!==o):r=l,o=Ko(o)}return n.set(e,i),i}function EZ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?U1(n)?[]:OZ(n,this._c):[].concat(t),i],l=y5(n,o[0],r);let f=l.top,c=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}j===1&&!Rz(c,e.getBoundingClientRect())&&o(),E=!1}try{t=new IntersectionObserver(A,{...C,root:r.ownerDocument})}catch{t=new IntersectionObserver(A,C)}t.observe(e)}return o(!0),a}function iS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,c=O6(e),h=r||a?[...c?Ho(c):[],...n?Ho(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=c&&l?PZ(c,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[S]=_;S&&S.target===c&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(n)})),t()}),c&&!f&&v.observe(c),n&&v.observe(n));let y,b=f?iu(e):null;f&&w();function w(){const _=iu(e);b&&!Rz(b,_)&&t(),b=_,y=requestAnimationFrame(w)}return t(),()=>{var _;h.forEach(S=>{r&&S.removeEventListener("scroll",t),a&&S.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,f&&cancelAnimationFrame(y)}}const NZ=vZ,$Z=gZ,zZ=cZ,LZ=bZ,IZ=dZ,w5=fZ,BZ=mZ,FZ=yZ,qZ=(e,n,t)=>{const i=new Map,r={platform:RZ,...t},a={...r.platform,_c:i};return uZ(e,n,{...r,platform:a})};var HZ=typeof document<"u",UZ=function(){},Yv=HZ?O.useLayoutEffect:UZ;function mg(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!mg(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=t;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!mg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function Pz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function k5(e,n){const t=Pz(e);return Math.round(n*t)/t}function Qw(e){const n=O.useRef(e);return Yv(()=>{n.current=e}),n}function VZ(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:f,open:c}=e,[h,d]=O.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=O.useState(i);mg(p,i)||v(i);const[y,b]=O.useState(null),[w,_]=O.useState(null),S=O.useCallback(F=>{F!==T.current&&(T.current=F,b(F))},[]),C=O.useCallback(F=>{F!==j.current&&(j.current=F,_(F))},[]),E=a||y,A=o||w,T=O.useRef(null),j=O.useRef(null),N=O.useRef(h),q=f!=null,R=Qw(f),L=Qw(r),B=Qw(c),G=O.useCallback(()=>{if(!T.current||!j.current)return;const F={placement:n,strategy:t,middleware:p};L.current&&(F.platform=L.current),qZ(T.current,j.current,F).then(Y=>{const D={...Y,isPositioned:B.current!==!1};H.current&&!mg(N.current,D)&&(N.current=D,Vs.flushSync(()=>{d(D)}))})},[p,n,t,L,B]);Yv(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const H=O.useRef(!1);Yv(()=>(H.current=!0,()=>{H.current=!1}),[]),Yv(()=>{if(E&&(T.current=E),A&&(j.current=A),E&&A){if(R.current)return R.current(E,A,G);G()}},[E,A,G,R,q]);const U=O.useMemo(()=>({reference:T,floating:j,setReference:S,setFloating:C}),[S,C]),P=O.useMemo(()=>({reference:E,floating:A}),[E,A]),z=O.useMemo(()=>{const F={position:t,left:0,top:0};if(!P.floating)return F;const Y=k5(P.floating,h.x),D=k5(P.floating,h.y);return l?{...F,transform:"translate("+Y+"px, "+D+"px)",...Pz(P.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:D}},[t,l,P.floating,h.x,h.y]);return O.useMemo(()=>({...h,update:G,refs:U,elements:P,floatingStyles:z}),[h,G,U,P,z])}const WZ=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?w5({element:i.current,padding:r}).fn(t):{}:i?w5({element:i,padding:r}).fn(t):{}}}},Nz=(e,n)=>{const t=NZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},E6=(e,n)=>{const t=$Z(e);return{name:t.name,fn:t.fn,options:[e,n]}},_5=(e,n)=>({fn:FZ(e).fn,options:[e,n]}),pg=(e,n)=>{const t=zZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},GZ=(e,n)=>{const t=LZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},YZ=(e,n)=>{const t=IZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},ch=(e,n)=>{const t=BZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},$z=(e,n)=>{const t=WZ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function zz(e){const n=O.useRef(void 0),t=O.useCallback(i=>{const r=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,l=o(i);return typeof l=="function"?l:()=>{o(null)}}return a.current=i,()=>{a.current=null}}});return()=>{r.forEach(a=>a==null?void 0:a())}},e);return O.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const KZ="data-floating-ui-focusable",x5="active",S5="selected",XZ={...U$};let C5=!1,ZZ=0;const A5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ZZ++;function QZ(){const[e,n]=O.useState(()=>C5?A5():void 0);return Za(()=>{e==null&&n(A5())},[]),O.useEffect(()=>{C5=!0},[]),e}const JZ=XZ.useId,Lz=JZ||QZ;function eQ(){const e=new Map;return{emit(n,t){var i;(i=e.get(n))==null||i.forEach(r=>r(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var i;(i=e.get(n))==null||i.delete(t)}}}const nQ=O.createContext(null),tQ=O.createContext(null),T6=()=>{var e;return((e=O.useContext(nQ))==null?void 0:e.id)||null},M6=()=>O.useContext(tQ);function j6(e){return"data-floating-ui-"+e}function na(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const O5=j6("safe-polygon");function Kv(e,n,t){if(t&&!tS(t))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i==null?void 0:i[n]}return e==null?void 0:e[n]}function Jw(e){return typeof e=="function"?e():e}function iQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:f=0,handleClose:c=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=M6(),y=T6(),b=vv(c),w=vv(f),_=vv(t),S=vv(d),C=O.useRef(),E=O.useRef(-1),A=O.useRef(),T=O.useRef(-1),j=O.useRef(!0),N=O.useRef(!1),q=O.useRef(()=>{}),R=O.useRef(!1),L=Wa(()=>{var z;const F=(z=r.current.openEvent)==null?void 0:z.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"});O.useEffect(()=>{if(!l)return;function z(F){let{open:Y}=F;Y||(na(E),na(T),j.current=!0,R.current=!1)}return a.on("openchange",z),()=>{a.off("openchange",z)}},[l,a]),O.useEffect(()=>{if(!l||!b.current||!t)return;function z(Y){L()&&i(!1,Y,"hover")}const F=Vl(o.floating).documentElement;return F.addEventListener("mouseleave",z),()=>{F.removeEventListener("mouseleave",z)}},[o.floating,t,i,l,b,L]);const B=O.useCallback(function(z,F,Y){F===void 0&&(F=!0),Y===void 0&&(Y="hover");const D=Kv(w.current,"close",C.current);D&&!A.current?(na(E),E.current=window.setTimeout(()=>i(!1,z,Y),D)):F&&(na(E),i(!1,z,Y))},[w,i]),G=Wa(()=>{q.current(),A.current=void 0}),H=Wa(()=>{if(N.current){const z=Vl(o.floating).body;z.style.pointerEvents="",z.removeAttribute(O5),N.current=!1}}),U=Wa(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);O.useEffect(()=>{if(!l)return;function z(W){if(na(E),j.current=!1,h&&!tS(C.current)||Jw(S.current)>0&&!Kv(w.current,"open"))return;const $=Kv(w.current,"open",C.current);$?E.current=window.setTimeout(()=>{_.current||i(!0,W,"hover")},$):t||i(!0,W,"hover")}function F(W){if(U()){H();return}q.current();const $=Vl(o.floating);if(na(T),R.current=!1,b.current&&r.current.floatingContext){t||na(E),A.current=b.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){H(),G(),U()||B(W,!0,"safe-polygon")}});const te=A.current;$.addEventListener("mousemove",te),q.current=()=>{$.removeEventListener("mousemove",te)};return}(C.current==="touch"?!Eh(o.floating,W.relatedTarget):!0)&&B(W)}function Y(W){U()||r.current.floatingContext&&(b.current==null||b.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){H(),G(),U()||B(W)}})(W))}function D(){na(E)}function V(W){U()||B(W,!1)}if(Pt(o.domReference)){const W=o.domReference,$=o.floating;return t&&W.addEventListener("mouseleave",Y),p&&W.addEventListener("mousemove",z,{once:!0}),W.addEventListener("mouseenter",z),W.addEventListener("mouseleave",F),$&&($.addEventListener("mouseleave",Y),$.addEventListener("mouseenter",D),$.addEventListener("mouseleave",V)),()=>{t&&W.removeEventListener("mouseleave",Y),p&&W.removeEventListener("mousemove",z),W.removeEventListener("mouseenter",z),W.removeEventListener("mouseleave",F),$&&($.removeEventListener("mouseleave",Y),$.removeEventListener("mouseenter",D),$.removeEventListener("mouseleave",V))}}},[o,l,e,h,p,B,G,H,i,t,_,v,w,b,r,U,S]),Za(()=>{var z;if(l&&t&&(z=b.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&L()){N.current=!0;const Y=o.floating;if(Pt(o.domReference)&&Y){var F;const D=Vl(o.floating).body;D.setAttribute(O5,"");const V=o.domReference,W=v==null||(F=v.nodesRef.current.find($=>$.id===y))==null||(F=F.context)==null?void 0:F.elements.floating;return W&&(W.style.pointerEvents=""),D.style.pointerEvents="none",V.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{D.style.pointerEvents="",V.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,y,o,v,b,L]),Za(()=>{t||(C.current=void 0,R.current=!1,G(),H())},[t,G,H]),O.useEffect(()=>()=>{G(),na(E),na(T),H()},[l,o.domReference,G,H]);const P=O.useMemo(()=>{function z(F){C.current=F.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(F){const{nativeEvent:Y}=F;function D(){!j.current&&!_.current&&i(!0,Y,"hover")}h&&!tS(C.current)||t||Jw(S.current)===0||R.current&&F.movementX**2+F.movementY**2<2||(na(T),C.current==="touch"?D():(R.current=!0,T.current=window.setTimeout(D,Jw(S.current))))}}},[h,i,t,_,S]);return O.useMemo(()=>l?{reference:P}:{},[l,P])}const rS=()=>{},Iz=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:rS,setState:rS,isInstantPhase:!1}),rQ=()=>O.useContext(Iz);function aQ(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=O.useReducer((f,c)=>({...f,...c}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=O.useRef(null),l=O.useCallback(f=>{a({currentId:f})},[]);return Za(()=>{r.currentId?o.current===null?o.current=r.currentId:r.isInstantPhase||a({isInstantPhase:!0}):(r.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[r.currentId,r.isInstantPhase]),k.jsx(Iz.Provider,{value:O.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function oQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,f=rQ(),{currentId:c,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=f;return Za(()=>{o&&c&&(p({delay:{open:1,close:Kv(d,"close")}}),c!==l&&i(!1))},[o,l,i,p,c,d]),Za(()=>{function y(){i(!1),p({delay:d,currentId:null})}if(o&&c&&!t&&c===l){if(v){const b=window.setTimeout(y,v);return()=>{clearTimeout(b)}}y()}},[o,t,p,c,l,i,d,v]),Za(()=>{o&&(h===rS||!t||h(l))},[o,t,h,l]),f}const sQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},lQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},E5=e=>{var n,t;return{escapeKey:typeof e=="boolean"?e:(n=e==null?void 0:e.escapeKey)!=null?n:!1,outsidePress:typeof e=="boolean"?e:(t=e==null?void 0:e.outsidePress)!=null?t:!0}};function uQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:f=!0,outsidePressEvent:c="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:y}=n,b=M6(),w=Wa(typeof f=="function"?f:()=>!1),_=typeof f=="function"?w:f,S=O.useRef(!1),{escapeKey:C,outsidePress:E}=E5(v),{escapeKey:A,outsidePress:T}=E5(y),j=O.useRef(!1),N=Wa(H=>{var U;if(!t||!o||!l||H.key!=="Escape"||j.current)return;const P=(U=a.current.floatingContext)==null?void 0:U.nodeId,z=b?Gv(b.nodesRef.current,P):[];if(!C&&(H.stopPropagation(),z.length>0)){let F=!0;if(z.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}i(!1,nZ(H)?H.nativeEvent:H,"escape-key")}),q=Wa(H=>{var U;const P=()=>{var z;N(H),(z=xf(H))==null||z.removeEventListener("keydown",P)};(U=xf(H))==null||U.addEventListener("keydown",P)}),R=Wa(H=>{var U;const P=a.current.insideReactTree;a.current.insideReactTree=!1;const z=S.current;if(S.current=!1,c==="click"&&z||P||typeof _=="function"&&!_(H))return;const F=xf(H),Y="["+j6("inert")+"]",D=Vl(r.floating).querySelectorAll(Y);let V=Pt(F)?F:null;for(;V&&!qo(V);){const te=Ko(V);if(qo(te)||!Pt(te))break;V=te}if(D.length&&Pt(F)&&!ZX(F)&&!Eh(F,r.floating)&&Array.from(D).every(te=>!Eh(V,te)))return;if(pa(F)&&G){const te=qo(F),ae=fa(F),le=/auto|scroll/,ye=te||le.test(ae.overflowX),oe=te||le.test(ae.overflowY),ue=ye&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,ke=oe&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,ie=ae.direction==="rtl",Re=ke&&(ie?H.offsetX<=F.offsetWidth-F.clientWidth:H.offsetX>F.clientWidth),pe=ue&&H.offsetY>F.clientHeight;if(Re||pe)return}const W=(U=a.current.floatingContext)==null?void 0:U.nodeId,$=b&&Gv(b.nodesRef.current,W).some(te=>{var ae;return Xw(H,(ae=te.context)==null?void 0:ae.elements.floating)});if(Xw(H,r.floating)||Xw(H,r.domReference)||$)return;const X=b?Gv(b.nodesRef.current,W):[];if(X.length>0){let te=!0;if(X.forEach(ae=>{var le;if((le=ae.context)!=null&&le.open&&!ae.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}i(!1,H,"outside-press")}),L=Wa(H=>{var U;const P=()=>{var z;R(H),(z=xf(H))==null||z.removeEventListener(c,P)};(U=xf(H))==null||U.addEventListener(c,P)});O.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=E;let H=-1;function U(D){i(!1,D,"ancestor-scroll")}function P(){window.clearTimeout(H),j.current=!0}function z(){H=window.setTimeout(()=>{j.current=!1},V1()?5:0)}const F=Vl(r.floating);l&&(F.addEventListener("keydown",A?q:N,A),F.addEventListener("compositionstart",P),F.addEventListener("compositionend",z)),_&&F.addEventListener(c,T?L:R,T);let Y=[];return p&&(Pt(r.domReference)&&(Y=Ho(r.domReference)),Pt(r.floating)&&(Y=Y.concat(Ho(r.floating))),!Pt(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(Ho(r.reference.contextElement)))),Y=Y.filter(D=>{var V;return D!==((V=F.defaultView)==null?void 0:V.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",U,{passive:!0})}),()=>{l&&(F.removeEventListener("keydown",A?q:N,A),F.removeEventListener("compositionstart",P),F.removeEventListener("compositionend",z)),_&&F.removeEventListener(c,T?L:R,T),Y.forEach(D=>{D.removeEventListener("scroll",U)}),window.clearTimeout(H)}},[a,r,l,_,c,t,i,p,o,C,E,N,A,q,R,T,L]),O.useEffect(()=>{a.current.insideReactTree=!1},[a,_,c]);const B=O.useMemo(()=>({onKeyDown:N,...h&&{[sQ[d]]:H=>{i(!1,H.nativeEvent,"reference-press")},...d!=="click"&&{onClick(H){i(!1,H.nativeEvent,"reference-press")}}}}),[N,i,h,d]),G=O.useMemo(()=>{function H(U){U.button===0&&(S.current=!0)}return{onKeyDown:N,onMouseDown:H,onMouseUp:H,[lQ[c]]:()=>{a.current.insideReactTree=!0}}},[N,c,a]);return O.useMemo(()=>o?{reference:B,floating:G}:{},[o,B,G])}function fQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=Lz(),a=O.useRef({}),[o]=O.useState(()=>eQ()),l=T6()!=null,[f,c]=O.useState(i.reference),h=Wa((v,y,b)=>{a.current.openEvent=v?y:void 0,o.emit("openchange",{open:v,event:y,reason:b,nested:l}),t==null||t(v,y,b)}),d=O.useMemo(()=>({setPositionReference:c}),[]),p=O.useMemo(()=>({reference:f||i.reference||null,floating:i.floating||null,domReference:i.reference}),[f,i.reference,i.floating]);return O.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function D6(e){e===void 0&&(e={});const{nodeId:n}=e,t=fQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=O.useState(null),[l,f]=O.useState(null),h=(r==null?void 0:r.domReference)||a,d=O.useRef(null),p=M6();Za(()=>{h&&(d.current=h)},[h]);const v=VZ({...e,elements:{...r,...l&&{reference:l}}}),y=O.useCallback(C=>{const E=Pt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;f(E),v.refs.setReference(E)},[v.refs]),b=O.useCallback(C=>{(Pt(C)||C===null)&&(d.current=C,o(C)),(Pt(v.refs.reference.current)||v.refs.reference.current===null||C!==null&&!Pt(C))&&v.refs.setReference(C)},[v.refs]),w=O.useMemo(()=>({...v.refs,setReference:b,setPositionReference:y,domReference:d}),[v.refs,b,y]),_=O.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),S=O.useMemo(()=>({...v,...i,refs:w,elements:_,nodeId:n}),[v,w,_,n,i]);return Za(()=>{i.dataRef.current.floatingContext=S;const C=p==null?void 0:p.nodesRef.current.find(E=>E.id===n);C&&(C.context=S)}),O.useMemo(()=>({...v,context:S,refs:w,elements:_}),[v,w,_,S])}function ek(){return YX()&&GX()}function cQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:f=!0}=n,c=O.useRef(!1),h=O.useRef(-1),d=O.useRef(!0);O.useEffect(()=>{if(!l)return;const v=gr(o.domReference);function y(){!t&&pa(o.domReference)&&o.domReference===h5(Vl(o.domReference))&&(c.current=!0)}function b(){d.current=!0}function w(){d.current=!1}return v.addEventListener("blur",y),ek()&&(v.addEventListener("keydown",b,!0),v.addEventListener("pointerdown",w,!0)),()=>{v.removeEventListener("blur",y),ek()&&(v.removeEventListener("keydown",b,!0),v.removeEventListener("pointerdown",w,!0))}},[o.domReference,t,l]),O.useEffect(()=>{if(!l)return;function v(y){let{reason:b}=y;(b==="reference-press"||b==="escape-key")&&(c.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),O.useEffect(()=>()=>{na(h)},[]);const p=O.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(v){if(c.current)return;const y=xf(v.nativeEvent);if(f&&Pt(y)){if(ek()&&!v.relatedTarget){if(!d.current&&!QX(y))return}else if(!JX(y))return}i(!0,v.nativeEvent,"focus")},onBlur(v){c.current=!1;const y=v.relatedTarget,b=v.nativeEvent,w=Pt(y)&&y.hasAttribute(j6("focus-guard"))&&y.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const S=h5(o.domReference?o.domReference.ownerDocument:document);!y&&S===o.domReference||Eh((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,S)||Eh(o.domReference,S)||w||i(!1,b,"focus")})}}),[a,o.domReference,i,f]);return O.useMemo(()=>l?{reference:p}:{},[l,p])}function nk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[x5]:o,[S5]:l,...f}=e;a=f}return{...t==="floating"&&{tabIndex:-1,[KZ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(f=>{let[c,h]=f;if(!(r&&[x5,S5].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof h=="function"){var d;(d=i.get(c))==null||d.push(h),o[c]=function(){for(var p,v=arguments.length,y=new Array(v),b=0;bw(...y)).find(w=>w!==void 0)}}}else o[c]=h}),o),{})}}function dQ(e){e===void 0&&(e=[]);const n=e.map(l=>l==null?void 0:l.reference),t=e.map(l=>l==null?void 0:l.floating),i=e.map(l=>l==null?void 0:l.item),r=O.useCallback(l=>nk(l,e,"reference"),n),a=O.useCallback(l=>nk(l,e,"floating"),t),o=O.useCallback(l=>nk(l,e,"item"),i);return O.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const hQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function mQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:f="dialog"}=n,c=Lz(),h=((t=a.domReference)==null?void 0:t.id)||c,d=O.useMemo(()=>{var S;return((S=eZ(a.floating))==null?void 0:S.id)||o},[a.floating,o]),p=(i=hQ.get(f))!=null?i:f,y=T6()!=null,b=O.useMemo(()=>p==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&y&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[p,d,y,r,h,f]),w=O.useMemo(()=>{const S={id:d,...p&&{role:p}};return p==="tooltip"||f==="label"?S:{...S,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,f]),_=O.useCallback(S=>{let{active:C,selected:E}=S;const A={role:"option",...C&&{id:d+"-fui-option"}};switch(f){case"select":case"combobox":return{...A,"aria-selected":E}}return{}},[d,f]);return O.useMemo(()=>l?{reference:b,floating:w,item:_}:{},[l,b,w,_])}const Bz={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},Fz=(e,{scrollbarSize:n,overscrollBehavior:t,scrollbars:i})=>{let r=t;return t&&i&&(i==="x"?r=`${t} auto`:i==="y"&&(r=`auto ${t}`)),{root:{"--scrollarea-scrollbar-size":he(n),"--scrollarea-over-scroll-behavior":r}}},uo=Pe(e=>{const n=ge("ScrollArea",Bz,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:f,type:c,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:y,offsetScrollbars:b,scrollbars:w,onBottomReached:_,onTopReached:S,onLeftReached:C,onRightReached:E,overscrollBehavior:A,startScrollPosition:T,attributes:j,...N}=n,[q,R]=O.useState(!1),[L,B]=O.useState(!1),[G,H]=O.useState(!1),U=O.useRef(!0),P=O.useRef(!1),z=O.useRef(!0),F=O.useRef(!1),Y=Ge({name:"ScrollArea",props:n,classes:k6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:f,varsResolver:Fz}),D=O.useRef(null),[V,W]=O.useState(null),$=zz([p,D,O.useCallback(X=>{W(te=>te===X?te:X)},[])]);return Js(b==="present"?V:null,()=>{const X=D.current;X&&(B(X.scrollHeight>X.clientHeight),H(X.scrollWidth>X.clientWidth))}),ts(()=>{T&&D.current&&D.current.scrollTo({left:T.x??0,top:T.y??0})},[]),k.jsxs(hz,{getStyles:Y,type:c==="never"?"always":c,scrollHideDelay:h,scrollbars:w,...Y("root"),...N,children:[k.jsx(xz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:$,"data-offset-scrollbars":b===!0?"xy":b||void 0,"data-scrollbars":w||void 0,"data-horizontal-hidden":b==="present"&&!G?"true":void 0,"data-vertical-hidden":b==="present"&&!L?"true":void 0,onScroll:X=>{var Ce;(Ce=d==null?void 0:d.onScroll)==null||Ce.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:te,scrollHeight:ae,clientHeight:le,scrollLeft:ye,scrollWidth:oe,clientWidth:ue}=X.currentTarget,ke=te-(ae-le)>=-.8,ie=te===0;ke&&!P.current&&(_==null||_()),ie&&!U.current&&(S==null||S()),P.current=ke,U.current=ie;const Re=ye-(oe-ue)>=-.8,pe=ye===0;Re&&!F.current&&(E==null||E()),pe&&!z.current&&(C==null||C()),F.current=Re,z.current=pe},children:y}),(w==="xy"||w==="x")&&k.jsx(X3,{...Y("scrollbar"),orientation:"horizontal","data-hidden":c==="never"||b==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:k.jsx(Z3,{...Y("thumb")})}),(w==="xy"||w==="y")&&k.jsx(X3,{...Y("scrollbar"),orientation:"vertical","data-hidden":c==="never"||b==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:k.jsx(Z3,{...Y("thumb")})}),k.jsx(CX,{...Y("corner"),"data-hovered":q||void 0,"data-hidden":c==="never"||void 0})]})});uo.displayName="@mantine/core/ScrollArea";const R6=Pe(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:y,scrollbars:b,style:w,vars:_,onBottomReached:S,onTopReached:C,startScrollPosition:E,onOverflowChange:A,...T}=ge("ScrollAreaAutosize",Bz,e),j=O.useRef(null),[N,q]=O.useState(null),R=zz([h,j,O.useCallback(H=>{q(U=>U===H?U:H)},[])]),L=O.useRef(!1),B=O.useRef(!1),G=O.useEffectEvent(()=>{const H=j.current;if(!H||!A)return;const U=H.scrollHeight>H.clientHeight;U!==L.current&&(B.current?A(U):(B.current=!0,U&&A(!0)),L.current=U)});return Js(A?N:null,G),k.jsx(we,{...T,variant:v,style:[{display:"flex",overflow:"hidden"},w],children:k.jsx(we,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...b==="y"&&{minWidth:0},...b==="x"&&{minHeight:0},...b==="xy"&&{minWidth:0,minHeight:0},...b===!1&&{minWidth:0,minHeight:0}},children:k.jsx(uo,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:R,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:y,vars:_,scrollbars:b,onBottomReached:S,onTopReached:C,startScrollPosition:E,"data-autosize":"true",children:n})})})});uo.classes=k6;uo.varsResolver=Fz;R6.displayName="@mantine/core/ScrollAreaAutosize";R6.classes=k6;uo.Autosize=R6;var qz={root:"m_87cf2631"};const pQ={__staticSelector:"UnstyledButton"},fi=$i(e=>{const n=ge("UnstyledButton",pQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:f,attributes:c,...h}=n;return k.jsx(we,{...Ge({name:r,props:n,classes:qz,className:t,style:f,classNames:o,styles:l,unstyled:a,attributes:c})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});fi.classes=qz;fi.displayName="@mantine/core/UnstyledButton";var Hz={root:"m_515a97f8"};const P6=Pe(e=>{const n=ge("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,...c}=n;return k.jsx(we,{component:"span",...Ge({name:"VisuallyHidden",classes:Hz,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f})("root"),...c})});P6.classes=Hz;P6.displayName="@mantine/core/VisuallyHidden";var Uz={root:"m_1b7284a3"};const Vz=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Ut(n),"--paper-shadow":c6(t)}}),ei=$i(e=>{const n=ge("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:f,radius:c,shadow:h,variant:d,mod:p,attributes:v,...y}=n,b=Ge({name:"Paper",props:n,classes:Uz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:f,varsResolver:Vz});return k.jsx(we,{mod:[{"data-with-border":l},p],...b("root"),variant:d,...y})});ei.classes=Uz;ei.varsResolver=Vz;ei.displayName="@mantine/core/Paper";function T5(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function M5(e,n,t,i,r){return e==="center"||i==="center"?{left:n}:e==="end"?{[r==="ltr"?"right":"left"]:t}:e==="start"?{[r==="ltr"?"left":"right"]:t}:{}}const vQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function gQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[f,c="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[vQ[f]]:i},d=-n/2;return f==="left"?{...h,...T5(c,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:f==="right"?{...h,...T5(c,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:f==="top"?{...h,...M5(c,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:f==="bottom"?{...h,...M5(c,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function vg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:f,...c}){const{dir:h}=yu();return a?k.jsx("div",{...c,style:{...f,...gQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}vg.displayName="@mantine/core/FloatingArrow";function Wz(e,n){if(e==="rtl"&&(n.includes("right")||n.includes("left"))){const[t,i]=n.split("-"),r=t==="right"?"left":"right";return i===void 0?r:`${r}-${i}`}return n}function Gz({open:e,close:n,openDelay:t,closeDelay:i}){const r=O.useRef(-1),a=O.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},f=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return O.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:f}}var Yz={root:"m_9814e45f"};const yQ={zIndex:ha("modal")},Kz=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Is(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${he(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Ut(a),"--overlay-z-index":o==null?void 0:o.toString()}}),Am=$i(e=>{const n=ge("Overlay",yQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:f,center:c,children:h,radius:d,zIndex:p,gradient:v,blur:y,color:b,backgroundOpacity:w,mod:_,attributes:S,...C}=n;return k.jsx(we,{...Ge({name:"Overlay",props:n,classes:Yz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:Kz})("root"),mod:[{center:c,fixed:f},_],...C,children:h})});Am.classes=Yz;Am.varsResolver=Kz;Am.displayName="@mantine/core/Overlay";function tk(e){const n=document.createElement("div");return n.setAttribute("data-portal","true"),typeof e.className=="string"&&n.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(n.style,e.style),typeof e.id=="string"&&n.setAttribute("id",e.id),n}function bQ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||tk(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=tk(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return tk(t)}const wQ={reuseTargetNode:!0},Xz=Pe(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=ge("Portal",wQ,e),[o,l]=O.useState(!1),f=O.useRef(null);return ts(()=>(l(!0),f.current=bQ({target:t,reuseTargetNode:i,...a}),ug(r,f.current),!t&&!i&&f.current&&document.body.appendChild(f.current),()=>{!t&&!i&&f.current&&document.body.removeChild(f.current)}),[t]),!o||!f.current?null:Vs.createPortal(k.jsx(k.Fragment,{children:n}),f.current)});Xz.displayName="@mantine/core/Portal";const el=Pe(({withinPortal:e=!0,children:n,...t})=>Sm()==="test"||!e?k.jsx(k.Fragment,{children:n}):k.jsx(Xz,{...t,children:n}));el.displayName="@mantine/core/OptionalPortal";const Nd=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),gv={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...Nd("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Nd("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Nd("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Nd("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Nd("top"),common:{transformOrigin:"top right"}}},j5={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function D5({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in gv?{transitionProperty:gv[e].transitionProperty,...r,...gv[e].common,...gv[e][j5[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[j5[n]]}}function kQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:f,exitDelay:c}){const h=ni(),d=h6(),p=h.respectReducedMotion?d:!1,[v,y]=O.useState(p?0:e),[b,w]=O.useState(i?"entered":"exited"),_=O.useRef(-1),S=O.useRef(-1),C=O.useRef(-1);function E(){window.clearTimeout(_.current),window.clearTimeout(S.current),cancelAnimationFrame(C.current)}const A=j=>{E();const N=j?r:a,q=j?o:l,R=p?0:j?e:n;y(R),R===0?(typeof N=="function"&&N(),typeof q=="function"&&q(),w(j?"entered":"exited")):C.current=requestAnimationFrame(()=>{eh.flushSync(()=>{w(j?"pre-entering":"pre-exiting")}),C.current=requestAnimationFrame(()=>{typeof N=="function"&&N(),w(j?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof q=="function"&&q(),w(j?"entered":"exited")},R)})})},T=j=>{if(E(),typeof(j?f:c)!="number"){A(j);return}S.current=window.setTimeout(()=>{A(j)},j?f:c)};return Yo(()=>{T(i)},[i]),O.useEffect(()=>()=>{E()},[]),{transitionDuration:v,transitionStatus:b,transitionTimingFunction:t||"ease"}}function Xo({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p}){const v=Sm(),{transitionDuration:y,transitionStatus:b,transitionTimingFunction:w}=kQ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?k.jsx(k.Fragment,{children:a({})}):e?a({display:"none"}):null;if(y===0)return e?k.jsx(O.Activity,{mode:r?"visible":"hidden",children:a({})}):r?k.jsx(k.Fragment,{children:a({})}):null;const _=b==="exited";return e?k.jsx(O.Activity,{mode:_?"hidden":"visible",children:a(_?{}:D5({transition:n,duration:y,state:b,timingFunction:w}))}):_?null:k.jsx(k.Fragment,{children:a(D5({transition:n,duration:y,state:b,timingFunction:w}))})}Xo.displayName="@mantine/core/Transition";const _Q={duration:100,transition:"fade"};function R5(e,n){return{..._Q,...n,...e}}const[xQ,Zz]=da("Popover component was not found in the tree");function Y1({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=zt(nK(n),i),a=vu(e);return a?O.cloneElement(a,{[t]:r}):e}function Qz(e){return k.jsx(P6,{tabIndex:-1,"data-autofocus":!0,...e})}Y1.displayName="@mantine/core/FocusTrap";Qz.displayName="@mantine/core/FocusTrapInitialFocus";Y1.InitialFocus=Qz;var Jz={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const N6=Pe(e=>{var w,_,S,C;const n=ge("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:f,styles:c,ref:h,...d}=n,p=Zz(),v=V$({opened:p.opened,shouldReturnFocus:p.returnFocus}),y=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},b=zt(h,p.floating);return p.disabled?null:k.jsx(el,{...p.portalProps,withinPortal:p.withinPortal,children:k.jsx(Xo,{mounted:p.opened,...p.transitionProps,transition:((w=p.transitionProps)==null?void 0:w.transition)||"fade",duration:((_=p.transitionProps)==null?void 0:_.duration)??150,keepMounted:p.keepMounted,exitDuration:typeof((S=p.transitionProps)==null?void 0:S.exitDuration)=="number"?p.transitionProps.exitDuration:(C=p.transitionProps)==null?void 0:C.duration,children:E=>{var A;return k.jsx(Y1,{active:p.trapFocus&&p.opened,innerRef:b,children:k.jsxs(we,{...y,...d,variant:l,onKeyDownCapture:HY(()=>{var T,j;(T=p.onClose)==null||T.call(p),(j=p.onDismiss)==null||j.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:f,styles:c,style:[{...E,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:he(p.width),...p.referenceHidden?{display:"none"}:null},(A=p.resolvedStyles)==null?void 0:A.dropdown,c==null?void 0:c.dropdown,i]}),children:[a,k.jsx(vg,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:f,styles:c})})]})})}})})});N6.classes=Jz;N6.displayName="@mantine/core/PopoverDropdown";const SQ={refProp:"ref",popupType:"dialog"},eL=Pe(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=ge("PopoverTarget",SQ,e),o=vu(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=a,f=Zz(),c=zt(f.reference,z1(o),r),h=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.opened?f.getDropdownId():void 0,id:f.getTargetId()}:{},d=o.props;return O.cloneElement(o,{...l,...h,...f.targetProps,className:cn(f.targetProps.className,l.className,d.className),[t]:c,...f.controlled?null:{onClick:p=>{var v;f.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});eL.displayName="@mantine/core/PopoverTarget";function CQ(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function AQ(e,n,t){const i=CQ(e.middlewares),r=[Nz(e.offset),YZ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?pg():pg(i.flip)),i.shift&&r.push(E6(typeof i.shift=="boolean"?{limiter:_5(),padding:5}:{limiter:_5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?ch():ch(i.inline)),r.push($z({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(GZ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...f}){var h;const c=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...f}):Object.assign(c,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(c,{width:`${a.reference.width}px`})}})),r}function OQ(e){const n=Sm(),[t,i]=xi({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=O.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=D6({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:AQ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:iS});return O.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return iS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),Yo(()=>{var f;(f=e.onPositionChange)==null||f.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),Yo(()=>{var f,c;t!==r.current&&(t?(c=e.onOpen)==null||c.call(e):(f=e.onClose)==null||f.call(e)),r.current=t},[t,e.onClose,e.onOpen]),ts(()=>{let f=-1;return t&&(f=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(f)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const EQ={position:"bottom",offset:8,transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:ha("popover"),__staticSelector:"Popover",width:"max-content"},nL=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Ut(n),"--popover-shadow":c6(t)}});function Tn(e){var Le,en,hn,fn,Ze,Ke,An;const n=ge("Popover",EQ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:f,onEnterTransitionEnd:c,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:w,unstyled:_,classNames:S,styles:C,closeOnClickOutside:E,withinPortal:A,portalProps:T,closeOnEscape:j,clickOutsideEvents:N,trapFocus:q,onClose:R,onDismiss:L,onOpen:B,onChange:G,zIndex:H,radius:U,shadow:P,id:z,defaultOpened:F,__staticSelector:Y,withRoles:D,disabled:V,returnFocus:W,variant:$,keepMounted:X,vars:te,floatingStrategy:ae,withOverlay:le,overlayProps:ye,hideDetached:oe,attributes:ue,preventPositionChangeWhenVisible:ke,...ie}=n,Re=Ge({name:Y,props:n,classes:Jz,classNames:S,styles:C,unstyled:_,attributes:ue,rootSelector:"dropdown",vars:te,varsResolver:nL}),{resolvedStyles:pe}=Ni({classNames:S,styles:C,props:n}),[Ce,De]=O.useState(o??F??!1),be=O.useRef(i),_e=O.useRef(null),[Me,Be]=O.useState(null),[Ve,He]=O.useState(null),{dir:We}=yu(),Ye=Sm(),rn=Gi(z),Q=OQ({middlewares:d,width:h,position:Wz(We,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:_e,arrowOffset:y,onPositionChange:a,opened:o,defaultOpened:F,onChange:G,onOpen:B,onClose:R,onDismiss:L,strategy:ae,dropdownVisible:Ce,setDropdownVisible:De,positionRef:be,disabled:V,preventPositionChangeWhenVisible:ke,keepMounted:X});GY(()=>{E&&(Q.onClose(),L==null||L())},N,[Me,Ve]);const me=O.useCallback(on=>{Be(on),Q.floating.refs.setReference(on)},[Q.floating.refs.setReference]),xe=O.useCallback(on=>{He(on),Q.floating.refs.setFloating(on)},[Q.floating.refs.setFloating]),Xe=O.useCallback(()=>{var on;(on=l==null?void 0:l.onExited)==null||on.call(l),f==null||f(),De(!1),ke||(be.current=i)},[l==null?void 0:l.onExited,f,ke,i]),ne=O.useCallback(()=>{var on;(on=l==null?void 0:l.onEntered)==null||on.call(l),c==null||c()},[l==null?void 0:l.onEntered,c]);return k.jsxs(xQ,{value:{returnFocus:W,disabled:V,controlled:Q.controlled,reference:me,floating:xe,x:Q.floating.x,y:Q.floating.y,arrowX:(hn=(en=(Le=Q.floating)==null?void 0:Le.middlewareData)==null?void 0:en.arrow)==null?void 0:hn.x,arrowY:(Ke=(Ze=(fn=Q.floating)==null?void 0:fn.middlewareData)==null?void 0:Ze.arrow)==null?void 0:Ke.y,opened:Q.opened,arrowRef:_e,transitionProps:{...l,onExited:Xe,onEntered:ne},width:h,withArrow:p,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:w,placement:Q.floating.placement,trapFocus:q,withinPortal:A,portalProps:T,zIndex:H,radius:U,shadow:P,closeOnEscape:j,onDismiss:L,onClose:Q.onClose,onToggle:Q.onToggle,getTargetId:()=>rn,getDropdownId:()=>`${rn}-dropdown`,withRoles:D,targetProps:ie,__staticSelector:Y,classNames:S,styles:C,unstyled:_,variant:$,keepMounted:X,getStyles:Re,resolvedStyles:pe,floatingStrategy:ae,referenceHidden:oe&&Ye!=="test"?(An=Q.floating.middlewareData.hide)==null?void 0:An.referenceHidden:!1},children:[t,le&&k.jsx(Xo,{transition:"fade",mounted:Q.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:on=>k.jsx(el,{withinPortal:A,children:k.jsx(Am,{...ye,...Re("overlay",{className:ye==null?void 0:ye.className,style:[on,ye==null?void 0:ye.style]})})})})]})}Tn.Target=eL;Tn.Dropdown=N6;Tn.varsResolver=nL;Tn.displayName="@mantine/core/Popover";Tn.extend=e=>e;Tn.withProps=e=>{const n=t=>k.jsx(Tn,{...e,...t});return n.extend=Tn.extend,n.displayName=`WithProps(${Tn.displayName})`,n};var Ta={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const tL=({className:e,...n})=>k.jsxs(we,{component:"span",className:cn(Ta.barsLoader,e),...n,children:[k.jsx("span",{className:Ta.bar}),k.jsx("span",{className:Ta.bar}),k.jsx("span",{className:Ta.bar})]});tL.displayName="@mantine/core/Bars";const iL=({className:e,...n})=>k.jsxs(we,{component:"span",className:cn(Ta.dotsLoader,e),...n,children:[k.jsx("span",{className:Ta.dot}),k.jsx("span",{className:Ta.dot}),k.jsx("span",{className:Ta.dot})]});iL.displayName="@mantine/core/Dots";const rL=({className:e,...n})=>k.jsx(we,{component:"span",className:cn(Ta.ovalLoader,e),...n});rL.displayName="@mantine/core/Oval";const aL={bars:tL,oval:rL,dots:iL},TQ={loaders:aL,type:"oval"},oL=(e,{size:n,color:t})=>({root:{"--loader-size":Mn(n,"loader-size"),"--loader-color":t?nt(t,e):void 0}}),Wi=Pe(e=>{const n=ge("Loader",TQ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:f,styles:c,unstyled:h,loaders:d,variant:p,children:v,attributes:y,...b}=n,w=Ge({name:"Loader",props:n,classes:Ta,className:o,style:l,classNames:f,styles:c,unstyled:h,attributes:y,vars:a,varsResolver:oL});return v?k.jsx(we,{...w("root"),...b,children:v}):k.jsx(we,{...w("root"),component:d[r],variant:p,size:t,...b})});Wi.defaultLoaders=aL;Wi.classes=Ta;Wi.varsResolver=oL;Wi.displayName="@mantine/core/Loader";var bc={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const P5={orientation:"horizontal"},sL=(e,{borderWidth:n})=>({group:{"--ai-border-width":he(n)}}),K1=Pe(e=>{const n=ge("ActionIconGroup",P5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,variant:h,mod:d,attributes:p,...v}=ge("ActionIconGroup",P5,e);return k.jsx(we,{...Ge({name:"ActionIconGroup",props:n,classes:bc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:f,varsResolver:sL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});K1.classes=bc;K1.varsResolver=sL;K1.displayName="@mantine/core/ActionIconGroup";const lL=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":Mn(o,"section-height"),"--section-padding-x":Mn(o,"section-padding-x"),"--section-fz":Zt(o),"--section-radius":n===void 0?void 0:Ut(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},X1=Pe(e=>{const n=ge("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:f,gradient:c,radius:h,autoContrast:d,attributes:p,...v}=n;return k.jsx(we,{...Ge({name:"ActionIconGroupSection",props:n,classes:bc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:lL,rootSelector:"groupSection"})("groupSection"),variant:f,...v})});X1.classes=bc;X1.varsResolver=lL;X1.displayName="@mantine/core/ActionIconGroupSection";const uL=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o})=>{const l=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--ai-size":Mn(n,"ai-size"),"--ai-radius":t===void 0?void 0:Ut(t),"--ai-bg":a||i?l.background:void 0,"--ai-hover":a||i?l.hover:void 0,"--ai-hover-color":a||i?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":a||i?l.border:void 0}}},Ht=$i(e=>{const n=ge("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:f,loaderProps:c,size:h,color:d,radius:p,__staticSelector:v,gradient:y,vars:b,children:w,disabled:_,"data-disabled":S,autoContrast:C,mod:E,attributes:A,...T}=n,j=Ge({name:["ActionIcon",v],props:n,className:t,style:l,classes:bc,classNames:a,styles:o,unstyled:i,attributes:A,vars:b,varsResolver:uL});return k.jsxs(fi,{...j("root",{active:!_&&!f&&!S}),...T,unstyled:i,variant:r,size:h,disabled:_||f,mod:[{loading:f,disabled:_||S},E],children:[typeof f=="boolean"&&k.jsx(Xo,{mounted:f,transition:"slide-down",duration:150,children:N=>k.jsx(we,{component:"span",...j("loader",{style:N}),"aria-hidden":!0,children:k.jsx(Wi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...c})})}),k.jsx(we,{component:"span",mod:{loading:f},...j("icon"),children:w})]})});Ht.classes=bc;Ht.varsResolver=uL;Ht.displayName="@mantine/core/ActionIcon";Ht.Group=K1;Ht.GroupSection=X1;function fL({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return k.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:k.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}fL.displayName="@mantine/core/CloseIcon";var cL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const MQ={variant:"subtle"},dL=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":Mn(n,"cb-size"),"--cb-radius":t===void 0?void 0:Ut(t),"--cb-icon-size":he(i)}}),bu=$i(e=>{const n=ge("CloseButton",MQ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:f,styles:c,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:y,mod:b,attributes:w,__staticSelector:_,...S}=n,C=Ge({name:_||"CloseButton",props:n,className:o,style:f,classes:cL,classNames:l,styles:c,unstyled:h,attributes:w,vars:r,varsResolver:dL});return k.jsxs(fi,{...S,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},b],...C("root",{variant:v,active:!p&&!d}),children:[y||k.jsx(fL,{}),i]})});bu.classes=cL;bu.varsResolver=dL;bu.displayName="@mantine/core/CloseButton";function jQ(e){return O.Children.toArray(e).filter(Boolean)}var hL={root:"m_4081bf90"};const DQ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},mL=(e,{grow:n,preventGrowOverflow:t,gap:i,align:r,justify:a,wrap:o},{childWidth:l})=>({root:{"--group-child-width":n&&t?l:void 0,"--group-gap":Ft(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),wn=Pe(e=>{const n=ge("Group",DQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:f,align:c,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:y,variant:b,__size:w,mod:_,attributes:S,...C}=n,E=jQ(l),A=E.length,T=Ft(f??"md");return k.jsx(we,{...Ge({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/A}% - (${T} - ${T} / ${A}))`},className:i,style:r,classes:hL,classNames:t,styles:a,unstyled:o,attributes:S,vars:y,varsResolver:mL})("root"),variant:b,mod:[{grow:p},_],size:w,...C,children:E})});wn.classes=hL;wn.varsResolver=mL;wn.displayName="@mantine/core/Group";const[RQ,rs]=da("ModalBase component was not found in tree");function PQ({opened:e,transitionDuration:n}){const[t,i]=O.useState(e),r=O.useRef(-1),a=h6()?0:n;return O.useEffect(()=>(e?(i(!0),window.clearTimeout(r.current)):a===0?i(!1):r.current=window.setTimeout(()=>i(!1),a),()=>window.clearTimeout(r.current)),[e,a]),t}function NQ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Gi(e),[f,c]=O.useState(!1),[h,d]=O.useState(!1),p=PQ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return K$("keydown",v=>{var y;v.key==="Escape"&&r&&!v.isComposing&&t&&((y=v.target)==null?void 0:y.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),V$({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:f,bodyMounted:h,shouldLockScroll:p,setTitleMounted:c,setBodyMounted:d}}var Ga=function(){return Ga=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return QQ;var n=JQ(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},nJ=yL(),jf="data-scroll-locked",tJ=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,l=e.gap;return t===void 0&&(t="margin"),` + .`.concat(zQ,` { + overflow: hidden `).concat(i,`; + padding-right: `).concat(l,"px ").concat(i,`; + } + body[`).concat(jf,`] { + overflow: hidden `).concat(i,`; + overscroll-behavior: contain; + `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&` + padding-left: `.concat(r,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(l,"px ").concat(i,`; + `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` + } + + .`).concat(Xv,` { + right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(Zv,` { + margin-right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(Xv," .").concat(Xv,` { + right: 0 `).concat(i,`; + } + + .`).concat(Zv," .").concat(Zv,` { + margin-right: 0 `).concat(i,`; + } + + body[`).concat(jf,`] { + `).concat(LQ,": ").concat(l,`px; + } +`)},$5=function(){var e=parseInt(document.body.getAttribute(jf)||"0",10);return isFinite(e)?e:0},iJ=function(){O.useEffect(function(){return document.body.setAttribute(jf,($5()+1).toString()),function(){var e=$5()-1;e<=0?document.body.removeAttribute(jf):document.body.setAttribute(jf,e.toString())}},[])},rJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;iJ();var a=O.useMemo(function(){return eJ(r)},[r]);return O.createElement(nJ,{styles:tJ(a,!n,r,t?"":"!important")})},aS=!1;if(typeof window<"u")try{var yv=Object.defineProperty({},"passive",{get:function(){return aS=!0,!0}});window.addEventListener("test",yv,yv),window.removeEventListener("test",yv,yv)}catch{aS=!1}var df=aS?{passive:!1}:!1,aJ=function(e){return e.tagName==="TEXTAREA"},bL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!aJ(e)&&t[n]==="visible")},oJ=function(e){return bL(e,"overflowY")},sJ=function(e){return bL(e,"overflowX")},z5=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=wL(e,i);if(r){var a=kL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},lJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},uJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},wL=function(e,n){return e==="v"?oJ(n):sJ(n)},kL=function(e,n){return e==="v"?lJ(n):uJ(n)},fJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},cJ=function(e,n,t,i,r){var a=fJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,f=n.contains(l),c=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=kL(e,l),y=v[0],b=v[1],w=v[2],_=b-w-a*y;(y||_)&&wL(e,l)&&(d+=_,p+=y);var S=l.parentNode;l=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!f&&l!==document.body||f&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(c=!0),c},bv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},L5=function(e){return[e.deltaX,e.deltaY]},I5=function(e){return e&&"current"in e?e.current:e},dJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},hJ=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},mJ=0,hf=[];function pJ(e){var n=O.useRef([]),t=O.useRef([0,0]),i=O.useRef(),r=O.useState(mJ++)[0],a=O.useState(yL)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var b=$Q([e.lockRef.current],(e.shards||[]).map(I5),!0).filter(Boolean);return b.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),b.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=O.useCallback(function(b,w){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!o.current.allowPinchZoom;var _=bv(b),S=t.current,C="deltaX"in b?b.deltaX:S[0]-_[0],E="deltaY"in b?b.deltaY:S[1]-_[1],A,T=b.target,j=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in b&&j==="h"&&T.type==="range")return!1;var N=window.getSelection(),q=N&&N.anchorNode,R=q?q===T||q.contains(T):!1;if(R)return!1;var L=z5(j,T);if(!L)return!0;if(L?A=j:(A=j==="v"?"h":"v",L=z5(j,T)),!L)return!1;if(!i.current&&"changedTouches"in b&&(C||E)&&(i.current=A),!A)return!0;var B=i.current||A;return cJ(B,w,b,B==="h"?C:E)},[]),f=O.useCallback(function(b){var w=b;if(!(!hf.length||hf[hf.length-1]!==a)){var _="deltaY"in w?L5(w):bv(w),S=n.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&dJ(A.delta,_)})[0];if(S&&S.should){w.cancelable&&w.preventDefault();return}if(!S){var C=(o.current.shards||[]).map(I5).filter(Boolean).filter(function(A){return A.contains(w.target)}),E=C.length>0?l(w,C[0]):!o.current.noIsolation;E&&w.cancelable&&w.preventDefault()}}},[]),c=O.useCallback(function(b,w,_,S){var C={name:b,delta:w,target:_,should:S,shadowParent:vJ(_)};n.current.push(C),setTimeout(function(){n.current=n.current.filter(function(E){return E!==C})},1)},[]),h=O.useCallback(function(b){t.current=bv(b),i.current=void 0},[]),d=O.useCallback(function(b){c(b.type,L5(b),b.target,l(b,e.lockRef.current))},[]),p=O.useCallback(function(b){c(b.type,bv(b),b.target,l(b,e.lockRef.current))},[]);O.useEffect(function(){return hf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",f,df),document.addEventListener("touchmove",f,df),document.addEventListener("touchstart",h,df),function(){hf=hf.filter(function(b){return b!==a}),document.removeEventListener("wheel",f,df),document.removeEventListener("touchmove",f,df),document.removeEventListener("touchstart",h,df)}},[]);var v=e.removeScrollBar,y=e.inert;return O.createElement(O.Fragment,null,y?O.createElement(a,{styles:hJ(r)}):null,v?O.createElement(rJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vJ(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const gJ=VQ(gL,pJ);var ru=O.forwardRef(function(e,n){return O.createElement(Z1,Ga({},e,{ref:n,sideCar:gJ}))});ru.classNames=Z1.classNames;function _L({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:f,returnFocus:c,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:y,zIndex:b,shadow:w,padding:_,__vars:S,unstyled:C,removeScrollProps:E,...A}){const{_id:T,titleMounted:j,bodyMounted:N,shouldLockScroll:q,setTitleMounted:R,setBodyMounted:L}=NQ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:f,onClose:t,returnFocus:c}),{key:B,...G}=E||{};return k.jsx(el,{...p,withinPortal:d,children:k.jsx(RQ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${T}-title`,getBodyId:()=>`${T}-body`,titleMounted:j,bodyMounted:N,setTitleMounted:R,setBodyMounted:L,trapFocus:l,closeOnEscape:f,zIndex:b,unstyled:C},children:k.jsx(ru,{enabled:q&&v,...G,children:k.jsx(we,{...A,id:T,__vars:{...S,"--mb-z-index":(b||ha("modal")).toString(),"--mb-shadow":c6(w),"--mb-padding":Ft(_)},children:y})},B)})})}_L.displayName="@mantine/core/ModalBase";function yJ(){const e=rs();return O.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Bf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function xL({className:e,...n}){const t=yJ(),i=rs();return k.jsx(we,{id:t,className:cn({[Bf.body]:!i.unstyled},e),...n})}xL.displayName="@mantine/core/ModalBaseBody";function SL({className:e,onClick:n,...t}){const i=rs();return k.jsx(bu,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:cn({[Bf.close]:!i.unstyled},e),unstyled:i.unstyled})}SL.displayName="@mantine/core/ModalBaseCloseButton";function CL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=rs();return k.jsx(Xo,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var f,c,h;(f=l.onExitTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onExited)==null||h.call(c)},onEntered:()=>{var f,c,h;(f=l.onEnterTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onEntered)==null||h.call(c)},...e,children:f=>k.jsx("div",{...t,className:cn({[Bf.inner]:!l.unstyled},t.className),children:k.jsx(Y1,{active:l.opened&&l.trapFocus,innerRef:a,children:k.jsx(ei,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,f],className:cn({[Bf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}CL.displayName="@mantine/core/ModalBaseContent";function AL({className:e,...n}){const t=rs();return k.jsx(we,{component:"header",className:cn({[Bf.header]:!t.unstyled},e),...n})}AL.displayName="@mantine/core/ModalBaseHeader";const bJ={duration:200,timingFunction:"ease",transition:"fade"};function wJ(e){const n=rs();return{...bJ,...n.transitionProps,...e}}function OL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=rs(),o=wJ(n);return k.jsx(Xo,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>k.jsx(Am,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:f=>{e==null||e(f),a.closeOnClickOutside&&a.onClose()},...r})})}OL.displayName="@mantine/core/ModalBaseOverlay";function kJ(){const e=rs();return O.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function EL({className:e,...n}){const t=kJ(),i=rs();return k.jsx(we,{component:"h2",className:cn({[Bf.title]:!i.unstyled},e),id:t,...n})}EL.displayName="@mantine/core/ModalBaseTitle";function _J({children:e}){return k.jsx(k.Fragment,{children:e})}const TL=O.createContext({size:"sm"}),ML=Pe(e=>{const n=ge("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,f=O.use(TL),{resolvedClassNames:c,resolvedStyles:h}=Ni({classNames:a,styles:o,props:n});return k.jsx(bu,{variant:i||"transparent",size:t||(f==null?void 0:f.size)||"sm",classNames:c,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});ML.displayName="@mantine/core/InputClearButton";const xJ={xs:7,sm:8,md:10,lg:12,xl:15};function SJ({__clearable:e,__clearSection:n,rightSection:t,__defaultRightSection:i,size:r="sm",__clearSectionMode:a="both"}){const o=e&&n;return a==="rightSection"?t===null?null:t||i:a==="clear"?t===null?null:o||i:o&&(t||i)?k.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:xJ[r]},children:[o,t||i]}):t===null?null:t||o||i}const wu=O.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var va={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const jL=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),Om=Pe(e=>{const n=ge("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,__inheritStyles:c=!0,attributes:h,...d}=ge("InputDescription",null,n),p=O.use(wu),v=Ge({name:["InputWrapper",f],props:n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:jL});return k.jsx(we,{component:"p",...(c&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});Om.classes=va;Om.varsResolver=jL;Om.displayName="@mantine/core/InputDescription";const DL=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),Em=Pe(e=>{const n=ge("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,__staticSelector:c,__inheritStyles:h=!0,...d}=n,p=Ge({name:["InputWrapper",c],props:n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,rootSelector:"error",vars:l,varsResolver:DL}),v=O.use(wu);return k.jsx(we,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});Em.classes=va;Em.varsResolver=DL;Em.displayName="@mantine/core/InputError";const CJ={labelElement:"label"},RL=(e,{size:n})=>({label:{"--input-label-size":Zt(n),"--input-asterisk-color":void 0}}),Tm=Pe(e=>{const n=ge("InputLabel",CJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:f,required:c,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:y,attributes:b,...w}=n,_=Ge({name:["InputWrapper",v],props:n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,rootSelector:"label",vars:l,varsResolver:RL}),S=O.use(wu),C=(S==null?void 0:S.getStyles)||_;return k.jsxs(we,{...C("label",S!=null&&S.getStyles?{className:i,style:r}:void 0),component:f,htmlFor:f==="label"?h:void 0,mod:[{required:c},y],onMouseDown:E=>{d==null||d(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},...w,children:[p,c&&k.jsx("span",{...C("required"),"aria-hidden":!0,children:" *"})]})});Tm.classes=va;Tm.varsResolver=RL;Tm.displayName="@mantine/core/InputLabel";const $6=Pe(e=>{const n=ge("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,error:c,mod:h,attributes:d,...p}=n;return k.jsx(we,{...Ge({name:["InputPlaceholder",f],props:n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!c},h],component:"span",...p})});$6.classes=va;$6.displayName="@mantine/core/InputPlaceholder";function AJ(e,{hasDescription:n,hasError:t}){const i=e.findIndex(l=>l==="input"),r=e.slice(0,i),a=e.slice(i+1),o=n&&r.includes("description")||t&&r.includes("error");return{offsetBottom:n&&a.includes("description")||t&&a.includes("error"),offsetTop:o}}const OJ={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},PL=(e,{size:n})=>({label:{"--input-label-size":Zt(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${Zt(n)} - ${he(2)})`}}),Q1=Pe(e=>{const n=ge("InputWrapper",OJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,variant:c,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:y,description:b,labelProps:w,descriptionProps:_,errorProps:S,labelElement:C,children:E,withAsterisk:A,id:T,required:j,__stylesApiProps:N,mod:q,attributes:R,...L}=n,B=Ge({name:["InputWrapper",h],props:N||n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:R,vars:l,varsResolver:PL}),G={size:f,variant:c,__staticSelector:h},H=Gi(T),U=typeof A=="boolean"?A:j,P=(S==null?void 0:S.id)||`${H}-error`,z=(_==null?void 0:_.id)||`${H}-description`,F=H,Y=!!y&&typeof y!="boolean",D=!!b,V=`${Y?P:""} ${D?z:""}`,W=V.trim().length>0?V.trim():void 0,$=(w==null?void 0:w.id)||`${H}-label`,X=v&&k.jsx(Tm,{labelElement:C,id:$,htmlFor:F,required:U,...G,...w,children:v},"label"),te=D&&k.jsx(Om,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||z,children:b},"description"),ae=k.jsx(O.Fragment,{children:d(E)},"input"),le=Y&&O.createElement(Em,{...S,...G,size:(S==null?void 0:S.size)||G.size,key:"error",id:(S==null?void 0:S.id)||P},y),ye=p.map(oe=>{switch(oe){case"label":return X;case"input":return ae;case"description":return te;case"error":return le;default:return null}});return k.jsx(wu,{value:{getStyles:B,describedBy:W,inputId:F,labelId:$,...AJ(p,{hasDescription:D,hasError:Y})},children:k.jsx(we,{variant:c,size:f,mod:[{error:!!y},q],id:C==="label"?void 0:T,...B("root"),...L,children:ye})})});Q1.classes=va;Q1.varsResolver=PL;Q1.displayName="@mantine/core/InputWrapper";const EJ={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},NL=(e,n,t)=>({wrapper:{"--input-margin-top":t.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":t.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Mn(n.size,"input-height"),"--input-fz":Zt(n.size),"--input-radius":n.radius===void 0?void 0:Ut(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?he(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?he(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?Mn(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Nt=$i(e=>{const n=ge("Input",EJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:f,__stylesApiProps:c,size:h,wrapperProps:d,error:p,disabled:v,leftSection:y,leftSectionProps:b,leftSectionWidth:w,rightSection:_,rightSectionProps:S,rightSectionWidth:C,rightSectionPointerEvents:E,leftSectionPointerEvents:A,variant:T,vars:j,pointer:N,multiline:q,radius:R,id:L,withAria:B,withErrorStyles:G,mod:H,inputSize:U,attributes:P,__clearSection:z,__clearable:F,__clearSectionMode:Y,__defaultRightSection:D,loading:V,loadingPosition:W,rootRef:$,...X}=n,{styleProps:te,rest:ae}=gu(X),le=O.use(wu),ye={offsetBottom:le==null?void 0:le.offsetBottom,offsetTop:le==null?void 0:le.offsetTop},oe=Ge({name:["Input",f],props:c||n,classes:va,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,stylesCtx:ye,rootSelector:"wrapper",vars:j,varsResolver:NL}),ue=B?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":le==null?void 0:le.describedBy,id:(le==null?void 0:le.inputId)||L}:{},ke=V?k.jsx(Wi,{size:W==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ie=V&&W==="left"?ke:y,Re=SJ({__clearable:F,__clearSection:z,rightSection:V&&W==="right"?ke:_,__defaultRightSection:D,size:h,__clearSectionMode:Y});return k.jsx(TL,{value:{size:h||"sm"},children:k.jsxs(we,{ref:$,...oe("wrapper"),...te,...d,mod:[{error:!!p&&G,pointer:N,disabled:v,multiline:q,"data-with-right-section":!!Re,"data-with-left-section":!!ie},H],variant:T,size:h,children:[ie&&k.jsx("div",{...b,"data-position":"left",...oe("section",{className:b==null?void 0:b.className,style:b==null?void 0:b.style}),children:ie}),k.jsx(we,{component:"input",...ae,...ue,required:l,mod:{disabled:v,error:!!p&&G},variant:T,__size:U,...oe("input")}),Re&&k.jsx("div",{...S,"data-position":"right",...oe("section",{className:S==null?void 0:S.className,style:S==null?void 0:S.style}),children:Re})]})})});Nt.classes=va;Nt.varsResolver=NL;Nt.Wrapper=Q1;Nt.Label=Tm;Nt.Error=Em;Nt.Description=Om;Nt.Placeholder=$6;Nt.ClearButton=ML;Nt.displayName="@mantine/core/Input";function $L(e,n,t){const i=ge(e,n,t),{label:r,description:a,error:o,required:l,classNames:f,styles:c,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:y,labelProps:b,descriptionProps:w,wrapperProps:_,id:S,size:C,style:E,inputContainer:A,inputWrapperOrder:T,withAsterisk:j,variant:N,vars:q,mod:R,attributes:L,...B}=i,{styleProps:G,rest:H}=gu(B),U={label:r,description:a,error:o,required:l,classNames:f,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:y,labelProps:b,descriptionProps:w,unstyled:d,styles:c,size:C,style:E,inputContainer:A,inputWrapperOrder:T,withAsterisk:j,variant:N,id:S,mod:R,attributes:L,..._};return{...H,classNames:f,styles:c,unstyled:d,wrapperProps:{...U,...G},inputProps:{required:l,classNames:f,styles:c,unstyled:d,size:C,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:N,id:S,attributes:L}}}const TJ={__staticSelector:"InputBase",withAria:!0,size:"sm"},zi=$i(e=>{const{inputProps:n,wrapperProps:t,...i}=$L("InputBase",TJ,e);return k.jsx(Nt.Wrapper,{...t,children:k.jsx(Nt,{...n,...i})})});zi.classes={...Nt.classes,...Nt.Wrapper.classes};zi.displayName="@mantine/core/InputBase";function gg({style:e,size:n=16,...t}){return k.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:he(n),height:he(n),display:"block"},...t,children:k.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}gg.displayName="@mantine/core/AccordionChevron";var zL={root:"m_b6d8b162"};function MJ(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const jJ={inherit:!1},LL=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":Zt(r),"--text-lh":UY(r),"--text-gradient":n==="gradient"?Y3(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),un=$i(e=>{const n=ge("Text",jJ,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:f,vars:c,className:h,style:d,classNames:p,styles:v,unstyled:y,variant:b,mod:w,size:_,attributes:S,...C}=n;return k.jsx(we,{...Ge({name:["Text",f],props:n,classes:zL,className:h,style:d,classNames:p,styles:v,unstyled:y,attributes:S,vars:c,varsResolver:LL})("root",{focusable:!0}),component:l?"span":"p",variant:b,mod:[{"data-truncate":MJ(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},w],size:_,...C})});un.classes=zL;un.varsResolver=LL;un.displayName="@mantine/core/Text";var IL={root:"m_849cf0da"};const DJ={underline:"hover"},z6=$i(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=ge("Anchor",DJ,e);return k.jsx(un,{component:"a",className:cn({[IL.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});z6.classes=IL;z6.displayName="@mantine/core/Anchor";const[RJ,wc]=da("AppShell was not found in tree");var rl={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const L6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ge("AppShellAside",null,e),d=wc();return d.disabled?null:k.jsx(we,{component:"aside",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("aside",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${f??d.zIndex} + 1)`}})});L6.classes=rl;L6.displayName="@mantine/core/AppShellAside";const I6=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ge("AppShellFooter",null,e),d=wc();return d.disabled?null:k.jsx(we,{component:"footer",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("footer",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});I6.classes=rl;I6.displayName="@mantine/core/AppShellFooter";const B6=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ge("AppShellHeader",null,e),d=wc();return d.disabled?null:k.jsx(we,{component:"header",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("header",{className:cn({[ru.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});B6.classes=rl;B6.displayName="@mantine/core/AppShellHeader";const F6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("AppShellMain",null,e);return k.jsx(we,{component:"main",...wc().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});F6.classes=rl;F6.displayName="@mantine/core/AppShellMain";const q6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ge("AppShellNavbar",null,e),d=wc();return d.disabled?null:k.jsx(we,{component:"nav",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${f??d.zIndex} + 1)`}})});q6.classes=rl;q6.displayName="@mantine/core/AppShellNavbar";const H6=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...f}=ge("AppShellSection",null,e),c=wc();return k.jsx(we,{mod:[{grow:o},l],...c.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...f})});H6.classes=rl;H6.displayName="@mantine/core/AppShellSection";function Mm(e){return typeof e=="object"?e.base:e}function jm(e){const n=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||n}function Dm(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function PJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),jm(o)){const p=he(Mm(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Dm(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=he(o.base),e["--app-shell-aside-offset"]=he(o.base)),St(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=he(o[p]),n[p]["--app-shell-aside-offset"]=he(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=d6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=f,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function NJ({baseStyles:e,minMediaStyles:n,footer:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(var(--app-shell-footer-height))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-footer-position"]="sticky",e["--app-shell-footer-grid-column"]="1 / -1",e["--app-shell-footer-grid-row"]="3"),jm(r)){const l=he(Mm(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Dm(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=he(r.base),o&&(e["--app-shell-footer-offset"]=he(r.base))),St(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=he(r[l]),o&&(n[l]["--app-shell-footer-offset"]=he(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function $J({baseStyles:e,minMediaStyles:n,header:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(calc(var(--app-shell-header-height) * -1))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-header-position"]="sticky",e["--app-shell-header-grid-column"]="1 / -1",e["--app-shell-header-grid-row"]="1"),jm(r)){const l=he(Mm(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Dm(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=he(r.base),o&&(e["--app-shell-header-offset"]=he(r.base))),St(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=he(r[l]),o&&(n[l]["--app-shell-header-offset"]=he(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function zJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),jm(o)){const p=he(Mm(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Dm(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=he(o.base),e["--app-shell-navbar-offset"]=he(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=he(o.base))),St(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=he(o[p]),n[p]["--app-shell-navbar-offset"]=he(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=he(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=d6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=f}}function ok(e){return Number(e)===0?"0px":Ft(e)}function LJ({padding:e,baseStyles:n,minMediaStyles:t}){jm(e)&&(n["--app-shell-padding"]=ok(Mm(e))),Dm(e)&&(e.base&&(n["--app-shell-padding"]=ok(e.base)),St(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=ok(e[i]))}))}function IJ({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},f={},c={};o==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),zJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,navbar:e,theme:a,mode:o}),PJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,aside:i,theme:a,mode:o}),$J({baseStyles:c,minMediaStyles:l,header:n,mode:o}),NJ({baseStyles:c,minMediaStyles:l,footer:t,mode:o}),LJ({baseStyles:c,minMediaStyles:l,padding:r});const h=Ch(St(l),a.breakpoints).map(p=>({query:`(min-width: ${sg(p.px)})`,styles:l[p.value]})),d=Ch(St(f),a.breakpoints).map(p=>({query:`(max-width: ${sg(p.px)})`,styles:f[p.value]}));return{baseStyles:c,media:[...h,...d]}}function BJ({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ni(),f=so(),{media:c,baseStyles:h}=IJ({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return k.jsx(vc,{media:c,styles:h,selector:o||f.cssVariablesSelector})}function FJ({transitionDuration:e,disabled:n}){const[t,i]=O.useState(!0),r=O.useRef(-1),a=O.useRef(-1);return K$("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>O.startTransition(()=>{i(!1)}),200)}),ts(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>O.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const qJ={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:ha("app"),mode:"fixed"},BL=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),mr=Pe(e=>{const n=ge("AppShell",qJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:f,withBorder:c,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:y,layout:b,disabled:w,aside:_,footer:S,offsetScrollbars:C=!0,mode:E,mod:A,attributes:T,id:j,...N}=n,q=Ge({name:"AppShell",classes:rl,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,vars:l,varsResolver:BL}),R=FJ({disabled:w,transitionDuration:d}),L=Gi(j);return k.jsxs(RJ,{value:{getStyles:q,withBorder:c,zIndex:y,disabled:w,offsetScrollbars:C,mode:E},children:[k.jsx(BJ,{navbar:f,header:v,aside:_,footer:S,padding:h,mode:E,selector:E==="static"?`#${L}`:void 0}),k.jsx(we,{...q("root"),id:L,mod:[{resizing:R,layout:b,disabled:w,mode:E},A],...N})]})});mr.classes=rl;mr.varsResolver=BL;mr.displayName="@mantine/core/AppShell";mr.Navbar=q6;mr.Header=B6;mr.Main=F6;mr.Aside=L6;mr.Footer=I6;mr.Section=H6;function FL(e){return typeof e=="string"?{value:e,label:e}:typeof e=="object"&&"value"in e&&!("label"in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e=="object"&&"group"in e?{group:e.group,items:e.items.map(n=>FL(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function J1(e){return e?e.map(n=>FL(n)):[]}function Rm(e){return e.reduce((n,t)=>"group"in t?{...n,...Rm(t.items)}:(n[`${t.value}`]=t,n),{})}var tr={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const HJ={error:null},qL=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Mn(n,"combobox-chevron-size"),"--combobox-chevron-color":t?nt(t,e):void 0}}),ey=Pe(e=>{const n=ge("ComboboxChevron",HJ,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,attributes:h,mod:d,...p}=n,v=Ge({name:"ComboboxChevron",classes:tr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,varsResolver:qL,attributes:h,rootSelector:"chevron"});return k.jsx(we,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:k.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});ey.classes=tr;ey.varsResolver=qL;ey.displayName="@mantine/core/ComboboxChevron";const[UJ,ga]=da("Combobox component was not found in tree");function HL({onMouseDown:e,onClick:n,onClear:t,...i}){return k.jsx(Nt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}HL.displayName="@mantine/core/ComboboxClearButton";const U6=Pe(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=ge("ComboboxDropdown",null,e),l=ga();return k.jsx(Tn.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});U6.classes=tr;U6.displayName="@mantine/core/ComboboxDropdown";const VJ={refProp:"ref"},UL=Pe(e=>{const{children:n,refProp:t,ref:i}=ge("ComboboxDropdownTarget",VJ,e);if(ga(),!u6(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return k.jsx(Tn.Target,{ref:i,refProp:t,children:n})});UL.displayName="@mantine/core/ComboboxDropdownTarget";const V6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ComboboxEmpty",null,e);return k.jsx(we,{...ga().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});V6.classes=tr;V6.displayName="@mantine/core/ComboboxEmpty";function W6({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=ga(),[f,c]=O.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const y=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&y!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&f||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const WJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},VL=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=ge("ComboboxEventsTarget",WJ,e),h=vu(n);if(!h)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=ga();return O.cloneElement(h,{...W6({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c,[t]:zt(f,d.store.targetRef,z1(h))})});VL.displayName="@mantine/core/ComboboxEventsTarget";const G6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ComboboxFooter",null,e);return k.jsx(we,{...ga().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});G6.classes=tr;G6.displayName="@mantine/core/ComboboxFooter";const Y6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:f,...c}=ge("ComboboxGroup",null,e),h=ga(),d=Gi(f);return k.jsxs(we,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...c,children:[l&&k.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});Y6.classes=tr;Y6.displayName="@mantine/core/ComboboxGroup";const K6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ComboboxHeader",null,e);return k.jsx(we,{...ga().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});K6.classes=tr;K6.displayName="@mantine/core/ComboboxHeader";function WL({value:e,valuesDivider:n=",",...t}){return k.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}WL.displayName="@mantine/core/ComboboxHiddenInput";const X6=Pe(e=>{const n=ge("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:f,active:c,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:y,...b}=n,w=ga(),_=O.useId(),S=f||_;return k.jsx(we,{...w.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...b,id:S,mod:["combobox-option",{"combobox-active":c,"combobox-disabled":p,"combobox-selected":v},y],role:"option",onClick:C=>{var E;p?C.preventDefault():((E=w.onOptionSubmit)==null||E.call(w,n.value,n),l==null||l(C))},onMouseDown:C=>{C.preventDefault(),h==null||h(C)},onMouseOver:C=>{w.resetSelectionOnOptionHover&&w.store.resetSelectedOption(),d==null||d(C)}})});X6.classes=tr;X6.displayName="@mantine/core/ComboboxOption";const Z6=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...f}=ge("ComboboxOptions",null,e),c=ga(),h=Gi(a);return O.useEffect(()=>{c.store.setListId(h)},[h]),k.jsx(we,{...c.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...f,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});Z6.classes=tr;Z6.displayName="@mantine/core/ComboboxOptions";const GJ={withAriaAttributes:!0,withKeyboardNavigation:!0},Q6=Pe(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:f,size:c,ref:h,...d}=ge("ComboboxSearch",GJ,e),p=ga(),v=p.getStyles("search"),y=W6({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return k.jsx(Nt,{ref:zt(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:c||p.size,...y,...d,__staticSelector:"Combobox"})});Q6.classes=tr;Q6.displayName="@mantine/core/ComboboxSearch";const YJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},GL=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=ge("ComboboxTarget",YJ,e),h=vu(n);if(!h)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=ga(),p=O.cloneElement(h,{...W6({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c});return k.jsx(Tn.Target,{refProp:t,ref:zt(f,d.store.targetRef),children:p})});GL.displayName="@mantine/core/ComboboxTarget";function KJ(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i}return e}function XJ(e,n,t){for(let i=e+1;i{l||(f(!0),r==null||r(P))},[f,r,l]),_=O.useCallback((P="unknown")=>{l&&(f(!1),i==null||i(P))},[f,i,l]),S=O.useCallback((P="unknown")=>{l?_(P):w(P)},[_,w,l]),C=O.useCallback(()=>{const P=Do(p.current),z=Wv(`#${c.current} [data-combobox-selected]`,P);z==null||z.removeAttribute("data-combobox-selected"),z==null||z.removeAttribute("aria-selected")},[]),E=O.useCallback(P=>{const z=Do(p.current),F=Wv(`#${c.current}`,z),Y=F?$o("[data-combobox-option]",F):null;if(!Y)return null;const D=P>=Y.length?0:P<0?Y.length-1:P;return h.current=D,Y!=null&&Y[D]&&!Y[D].hasAttribute("data-combobox-disabled")?(C(),Y[D].setAttribute("data-combobox-selected","true"),Y[D].setAttribute("aria-selected","true"),Y[D].scrollIntoView({block:"nearest",behavior:o}),Y[D].id):null},[o,C]),A=O.useCallback(()=>{const P=Do(p.current),z=Wv(`#${c.current} [data-combobox-active]`,P);return E(z?$o(`#${c.current} [data-combobox-option]`,P).findIndex(F=>F===z):0)},[E]),T=O.useCallback(()=>{const P=Do(p.current),z=$o(`#${c.current} [data-combobox-option]`,P);return E(XJ(h.current,z,a))},[E,a]),j=O.useCallback(()=>{const P=Do(p.current),z=$o(`#${c.current} [data-combobox-option]`,P);return E(KJ(h.current,z,a))},[E,a]),N=O.useCallback(()=>{const P=Do(p.current);return E(ZJ($o(`#${c.current} [data-combobox-option]`,P)))},[E]),q=O.useCallback((P="selected",z)=>{var F;if(typeof P=="number"){h.current=P;const Y=Do(p.current),D=$o(`#${c.current} [data-combobox-option]`,Y);z!=null&&z.scrollIntoView&&((F=D[P])==null||F.scrollIntoView({block:"nearest",behavior:o}));return}b.current=window.setTimeout(()=>{var W;const Y=Do(p.current),D=$o(`#${c.current} [data-combobox-option]`,Y),V=D.findIndex($=>$.hasAttribute(`data-combobox-${P}`));h.current=V,z!=null&&z.scrollIntoView&&((W=D[V])==null||W.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),R=O.useCallback(()=>{h.current=-1,C()},[C]),L=O.useCallback(()=>{var z,F;const P=Do(p.current);(F=(z=$o(`#${c.current} [data-combobox-option]`,P))==null?void 0:z[h.current])==null||F.click()},[]),B=O.useCallback(P=>{c.current=P},[]),G=O.useCallback(()=>{v.current=window.setTimeout(()=>{var P;return(P=d.current)==null?void 0:P.focus()},0)},[]),H=O.useCallback(()=>{y.current=window.setTimeout(()=>{var P;return(P=p.current)==null?void 0:P.focus()},0)},[]),U=O.useCallback(()=>h.current,[]);return O.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(y.current),window.clearTimeout(b.current)},[]),{dropdownOpened:l,openDropdown:w,closeDropdown:_,toggleDropdown:S,selectedOptionIndex:h.current,getSelectedOptionIndex:U,selectOption:E,selectFirstOption:N,selectActiveOption:A,selectNextOption:T,selectPreviousOption:j,resetSelectedOption:R,updateSelectedOptionIndex:q,listId:c.current,setListId:B,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:H}}const QJ={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},YL=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":Zt(n),"--combobox-option-padding":Mn(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:he(t),"--combobox-option-fz":Zt(n),"--combobox-option-padding":Mn(n,"combobox-option-padding")}}),Sn=e=>{const n=ge("Combobox",QJ,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:f,onClose:c,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:y,attributes:b,...w}=n,_=Pm(),S=o||_,C=Ge({name:v||"Combobox",classes:tr,props:n,classNames:t,styles:i,unstyled:r,attributes:b,vars:l,varsResolver:YL}),E=()=>{c==null||c(),S.closeDropdown()};return k.jsx(UJ,{value:{getStyles:C,store:S,onOptionSubmit:f,size:h,resetSelectionOnOptionHover:p,readOnly:y},children:k.jsx(Tn,{opened:S.dropdownOpened,preventPositionChangeWhenVisible:!1,...w,onChange:A=>!A&&E(),withRoles:!1,unstyled:r,children:a})})},JJ=e=>e;Sn.extend=JJ;Sn.classes=tr;Sn.varsResolver=YL;Sn.displayName="@mantine/core/Combobox";Sn.Target=GL;Sn.Dropdown=U6;Sn.Options=Z6;Sn.Option=X6;Sn.Search=Q6;Sn.Empty=V6;Sn.Chevron=ey;Sn.Footer=G6;Sn.Header=K6;Sn.EventsTarget=VL;Sn.DropdownTarget=UL;Sn.Group=Y6;Sn.ClearButton=HL;Sn.HiddenInput=WL;function eee({children:e,role:n}){const t=O.use(wu);return t?k.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):k.jsx(k.Fragment,{children:e})}const J6=O.createContext(null),nee={hiddenInputValuesSeparator:","},eC=B1((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:f,hiddenInputValuesSeparator:c,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=ge("CheckboxGroup",nee,e),[y,b]=xi({value:n,defaultValue:t,finalValue:[],onChange:i}),w=C=>{const E=typeof C=="string"?C:C.currentTarget.value;if(l)return;const A=y.includes(E);!A&&d&&y.length>=d||b(A?y.filter(T=>T!==E):[...y,E])},_=C=>{if(p)return!0;if(!d)return!1;const E=y.includes(C),A=y.length>=d;return!E&&A},S=y.join(c);return k.jsx(J6,{value:{value:y,onChange:w,size:r,isDisabled:_},children:k.jsxs(Nt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[k.jsx(eee,{role:"group",children:o}),k.jsx("input",{type:"hidden",name:f,value:S,...h})]})})}));eC.classes=Nt.Wrapper.classes;eC.displayName="@mantine/core/CheckboxGroup";var KL={card:"m_26775b0a"};const XL=O.createContext(null),tee={withBorder:!0},ZL=(e,{radius:n})=>({card:{"--card-radius":Ut(n)}}),ny=Pe(e=>{const n=ge("CheckboxCard",tee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:f,mod:c,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:y,attributes:b,...w}=n,_=Ge({name:"CheckboxCard",classes:KL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:ZL,rootSelector:"card"}),S=O.use(J6),[C,E]=xi({value:typeof f=="boolean"?f:S?S.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:y});return k.jsx(XL,{value:{checked:C},children:k.jsx(fi,{mod:[{"with-border":h,checked:C},c],..._("card"),...w,role:"checkbox","aria-checked":C,onClick:A=>{p==null||p(A),S==null||S.onChange(d||""),E(!C)}})})});ny.displayName="@mantine/core/CheckboxCard";ny.classes=KL;ny.varsResolver=ZL;function nC({size:e,style:n,...t}){return k.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:he(e),height:he(e),...n}:n,"aria-hidden":!0,...t,children:k.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function QL({indeterminate:e,...n}){return e?k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:k.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):k.jsx(nC,{...n})}var JL={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const iee={icon:QL,variant:"filled",radius:"sm"},eI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=is({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Mn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Ut(n),"--checkbox-color":a==="outline"?f:nt(t,e),"--checkbox-icon-color":r?nt(r,e):L1(o,e)?xm({color:t,theme:e,autoContrast:o}):void 0}}},ty=Pe(e=>{const n=ge("CheckboxIndicator",iee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:f,indeterminate:c,radius:h,color:d,iconColor:p,autoContrast:v,checked:y,mod:b,variant:w,disabled:_,attributes:S,...C}=n,E=Ge({name:"CheckboxIndicator",classes:JL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:eI,rootSelector:"indicator"}),A=O.use(XL),T=typeof y=="boolean"||typeof c=="boolean"?y||c:(A==null?void 0:A.checked)||!1;return k.jsx(we,{...E("indicator",{variant:w}),variant:w,mod:[{checked:T,disabled:_},b],...C,children:k.jsx(f,{indeterminate:c,...E("icon")})})});ty.displayName="@mantine/core/CheckboxIndicator";ty.classes=JL;ty.varsResolver=eI;var nI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const ree=nI;function tI({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:f,id:c,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:y="div",labelElement:b="label",variant:w,style:_,vars:S,mod:C,attributes:E,...A}){const T=Ge({name:e,props:n,className:t,style:_,classes:nI,classNames:i,styles:r,unstyled:a,attributes:E});return k.jsx(we,{...T("root"),__vars:{"--label-fz":Zt(p),"--label-lh":Mn(p,"label-lh")},mod:[{"label-position":v},C],variant:w,size:p,...A,children:k.jsxs(we,{component:y,htmlFor:y==="label"?c:void 0,...T("body"),children:[o,k.jsxs("div",{...T("labelWrapper"),"data-disabled":h||void 0,children:[l&&k.jsx(we,{component:b,htmlFor:b==="label"?c:void 0,...T("label"),"data-disabled":h||void 0,children:l}),f&&k.jsx(Nt.Description,{size:p,__inheritStyles:!1,...T("description"),children:f}),d&&typeof d!="boolean"&&k.jsx(Nt.Error,{size:p,__inheritStyles:!1,...T("error"),children:d})]})]})})}tI.displayName="@mantine/core/InlineInput";var iI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const aee={labelPosition:"right",icon:QL,withErrorStyles:!0,variant:"filled",radius:"sm"},rI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=is({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Mn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Ut(n),"--checkbox-color":a==="outline"?f:nt(t,e),"--checkbox-icon-color":r?nt(r,e):L1(o,e)?xm({color:t,theme:e,autoContrast:o}):void 0}}},nl=Pe(e=>{var le;const n=ge("Checkbox",aee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,label:c,id:h,size:d,radius:p,wrapperProps:v,checked:y,labelPosition:b,description:w,error:_,disabled:S,variant:C,indeterminate:E,icon:A,rootRef:T,iconColor:j,onChange:N,autoContrast:q,mod:R,attributes:L,readOnly:B,onClick:G,withErrorStyles:H,ref:U,...P}=n,z=O.useRef(null),F=O.use(J6),Y=d||(F==null?void 0:F.size),D=Ge({name:"Checkbox",props:n,classes:iI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:rI}),{styleProps:V,rest:W}=gu(P),$=Gi(h),X={checked:(F==null?void 0:F.value.includes(W.value))??y,onChange:ye=>{F==null||F.onChange(ye),N==null||N(ye)}},te=((le=F==null?void 0:F.isDisabled)==null?void 0:le.call(F,W.value))??!1,ae=S||te;return O.useEffect(()=>{z.current&&(z.current.indeterminate=E||!1,E?z.current.setAttribute("data-indeterminate","true"):z.current.removeAttribute("data-indeterminate"))},[E]),k.jsx(tI,{...D("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:$,size:Y,labelPosition:b,label:c,description:w,error:_,disabled:ae,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||y||void 0,variant:C,ref:T,mod:R,attributes:L,inert:W.inert,...V,...v,children:k.jsxs(we,{...D("inner"),mod:{"data-label-position":b},children:[k.jsx(we,{component:"input",id:$,ref:zt(z,U),mod:{error:!!_},...D("input",{focusable:!0,variant:C}),...W,...X,disabled:ae,inert:W.inert,type:"checkbox",onClick:ye=>{B&&ye.preventDefault(),G==null||G(ye)}}),k.jsx(A,{indeterminate:E,...D("icon")})]})})});nl.classes={...iI,...ree};nl.varsResolver=rI;nl.displayName="@mantine/core/Checkbox";nl.Group=eC;nl.Indicator=ty;nl.Card=ny;function au(e){return"group"in e}function aI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function oI(e,n=new Set){if(Array.isArray(e))for(const t of e)if(au(t))oI(t.items,n);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(n.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);n.add(t.value)}}function see(e,n){return Array.isArray(e)?e.includes(n):e===n}function sI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!au(e)){const f=see(i,e.value),c=n&&(f?k.jsx(nC,{className:tr.optionsDropdownCheckIcon}):t?k.jsx("div",{className:tr.optionsDropdownCheckPlaceholder}):null),h=k.jsxs(k.Fragment,{children:[r==="left"&&c,k.jsx("span",{children:e.label}),r==="right"&&c]});return k.jsx(Sn.Option,{value:e.value,disabled:e.disabled,className:cn({[tr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":f||void 0,"aria-selected":f,active:f,children:typeof o=="function"?o({option:e,checked:f}):h})}const l=e.items.map(f=>k.jsx(sI,{data:f,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${f.value}`));return k.jsx(Sn.Group,{label:e.group,children:l})}function iy({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:f=!0,withCheckIcon:c=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:y,labelId:b,renderOption:w,scrollAreaProps:_,"aria-label":S}){oI(e);const C=typeof r=="string"?(i||aI)({options:e,search:f?r:"",limit:a??1/0}):e,E=oee(C),A=C.map(T=>k.jsx(sI,{data:T,withCheckIcon:c,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:y,renderOption:w},au(T)?T.group:`${T.value}`));return k.jsx(Sn.Dropdown,{hidden:n||t&&E,"data-composed":!0,children:k.jsxs(Sn.Options,{labelledBy:b,"aria-label":S,children:[l?k.jsx(uo.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:A}):A,E&&v&&k.jsx(Sn.Empty,{children:v})]})})}const ry=Pe(e=>{const n=ge("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:y,value:b,defaultValue:w,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:E,readOnly:A,disabled:T,filter:j,limit:N,withScrollArea:q,maxDropdownHeight:R,size:L,id:B,renderOption:G,autoComplete:H,scrollAreaProps:U,onClear:P,clearButtonProps:z,error:F,clearable:Y,clearSectionMode:D,rightSection:V,autoSelectOnBlur:W,openOnFocus:$=!0,attributes:X,...te}=n,ae=Gi(B),le=J1(y),ye=Rm(le),[oe,ue]=xi({value:b,defaultValue:w,finalValue:"",onChange:v}),ke=Pm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),S&&ke.selectFirstOption()},onDropdownClose:()=>{f==null||f(),setTimeout(ke.resetSelectedOption,0)}}),ie=De=>{ue(De),ke.resetSelectedOption()},{resolvedClassNames:Re,resolvedStyles:pe}=Ni({props:n,styles:i,classNames:t});O.useEffect(()=>{_&&ke.selectFirstOption()},[_,oe]);const Ce=k.jsx(Sn.ClearButton,{...z,onClear:()=>{ie(""),P==null||P()}});return k.jsxs(Sn,{store:ke,__staticSelector:"Autocomplete",classNames:Re,styles:pe,unstyled:r,readOnly:A,size:L,attributes:X,keepMounted:W,onOptionSubmit:De=>{C==null||C(De),ie(ye[De].label),ke.closeDropdown()},...E,children:[k.jsx(Sn.Target,{autoComplete:H,withExpandedAttribute:!0,children:k.jsx(zi,{...te,size:L,__staticSelector:"Autocomplete",__clearSection:Ce,__clearable:Y&&!!oe&&!T&&!A,__clearSectionMode:D,rightSection:V,disabled:T,readOnly:A,value:oe,error:F,onChange:De=>{ie(De.currentTarget.value),ke.openDropdown(),_&&ke.selectFirstOption()},onFocus:De=>{$&&ke.openDropdown(),h==null||h(De)},onBlur:De=>{W&&ke.clickSelectedOption(),ke.closeDropdown(),d==null||d(De)},onClick:De=>{ke.openDropdown(),p==null||p(De)},classNames:Re,styles:pe,unstyled:r,attributes:X,id:ae})}),k.jsx(iy,{data:le,hidden:A||T,filter:j,search:oe,limit:N,hiddenWhenEmpty:!0,withScrollArea:q,maxDropdownHeight:R,unstyled:r,labelId:te.label?`${ae}-label`:void 0,"aria-label":te.label?void 0:te["aria-label"],renderOption:G,scrollAreaProps:U})]})});ry.classes={...zi.classes,...Sn.classes};ry.displayName="@mantine/core/Autocomplete";var ay={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const lI=O.createContext({withinGroup:!1}),uI=(e,{spacing:n})=>({group:{"--ag-spacing":Ft(n)}}),oy=Pe(e=>{const n=ge("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:f,attributes:c,...h}=n;return k.jsx(lI,{value:{withinGroup:!0},children:k.jsx(we,{...Ge({name:"AvatarGroup",classes:ay,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:uI,rootSelector:"group"})("group"),...h})})});oy.classes=ay;oy.varsResolver=uI;oy.displayName="@mantine/core/AvatarGroup";function lee(e){return k.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:k.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function uee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const fI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:f})=>{const c=a==="initials"&&typeof l=="string"?cee(l,f):a,h=e.variantColorResolver({color:c||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":Mn(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Ut(t),"--avatar-bg":c||i?h.background:void 0,"--avatar-color":c||i?h.color:void 0,"--avatar-bd":c||i?h.border:void 0}}},ou=$i(e=>{const n=ge("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:f,alt:c,radius:h,color:d,gradient:p,imageProps:v,children:y,autoContrast:b,mod:w,name:_,allowedInitialsColors:S,attributes:C,...E}=n,A=O.use(lI),[T,j]=O.useState(!f),N=Ge({name:"Avatar",props:n,classes:ay,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:fI});return O.useEffect(()=>j(!f),[f]),k.jsx(we,{...N("root"),mod:[{"within-group":A.withinGroup},w],...E,children:T||!f?k.jsx("span",{...N("placeholder"),title:c,children:y||typeof _=="string"&&dee(_)||k.jsx(lee,{})}):k.jsx("img",{...v,...N("image"),src:f,alt:c,onError:q=>{var R;j(!0),(R=v==null?void 0:v.onError)==null||R.call(v,q)}})})});ou.classes=ay;ou.varsResolver=fI;ou.displayName="@mantine/core/Avatar";ou.Group=oy;var cI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const dI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":Mn(a,"badge-height"),"--badge-padding-x":Mn(a,"badge-padding-x"),"--badge-fz":Mn(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Ut(n),"--badge-bg":t||r?f.background:void 0,"--badge-color":t||r?f.color:void 0,"--badge-bd":t||r?f.border:void 0,"--badge-dot-color":r==="dot"?nt(t,e):void 0}}},ui=$i(e=>{const n=ge("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,gradient:h,leftSection:d,rightSection:p,children:v,variant:y,fullWidth:b,autoContrast:w,circle:_,mod:S,attributes:C,...E}=n,A=Ge({name:"Badge",props:n,classes:cI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:dI});return k.jsxs(we,{variant:y,mod:[{block:b,circle:_,"with-right-section":!!p,"with-left-section":!!d},S],...A("root",{variant:y}),...E,children:[d&&k.jsx("span",{...A("section"),"data-position":"left",children:d}),k.jsx("span",{...A("label"),children:v}),p&&k.jsx("span",{...A("section"),"data-position":"right",children:p})]})});ui.classes=cI;ui.varsResolver=dI;ui.displayName="@mantine/core/Badge";var kc={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const B5={orientation:"horizontal"},hI=(e,{borderWidth:n})=>({group:{"--button-border-width":he(n)}}),sy=Pe(e=>{const n=ge("ButtonGroup",B5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,mod:h,attributes:d,...p}=ge("ButtonGroup",B5,e);return k.jsx(we,{...Ge({name:"ButtonGroup",props:n,classes:kc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:f,varsResolver:hI,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});sy.classes=kc;sy.varsResolver=hI;sy.displayName="@mantine/core/ButtonGroup";const mI=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":Mn(o,"section-height"),"--section-padding-x":Mn(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?Zt(o.replace("compact-","")):Zt(o),"--section-radius":n===void 0?void 0:Ut(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},ly=Pe(e=>{const n=ge("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:f,radius:c,autoContrast:h,attributes:d,...p}=n;return k.jsx(we,{...Ge({name:"ButtonGroupSection",props:n,classes:kc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:mI,rootSelector:"groupSection"})("groupSection"),...p})});ly.classes=kc;ly.varsResolver=mI;ly.displayName="@mantine/core/ButtonGroupSection";const hee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${he(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},pI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Mn(a,"button-height"),"--button-padding-x":Mn(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?Zt(a.replace("compact-","")):Zt(a),"--button-radius":n===void 0?void 0:Ut(n),"--button-bg":t||r?f.background:void 0,"--button-hover":t||r?f.hover:void 0,"--button-color":f.color,"--button-bd":t||r?f.border:void 0,"--button-hover-color":t||r?f.hoverColor:void 0}}},Bt=$i(e=>{const n=ge("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:f,rightSection:c,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:y,gradient:b,classNames:w,styles:_,unstyled:S,"data-disabled":C,autoContrast:E,mod:A,attributes:T,...j}=n,N=Ge({name:"Button",props:n,classes:kc,className:r,style:t,classNames:w,styles:_,unstyled:S,attributes:T,vars:i,varsResolver:pI}),q=!!f,R=!!c;return k.jsxs(fi,{...N("root",{active:!o&&!v&&!C}),unstyled:S,variant:d,disabled:o||v,mod:[{disabled:o||C,loading:v,block:h,"with-left-section":q,"with-right-section":R},A],...j,children:[typeof v=="boolean"&&k.jsx(Xo,{mounted:v,transition:hee,duration:150,children:L=>k.jsx(we,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:k.jsx(Wi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...y})})}),k.jsxs("span",{...N("inner"),children:[f&&k.jsx(we,{component:"span",...N("section"),mod:{position:"left"},children:f}),k.jsx(we,{component:"span",mod:{loading:v},...N("label"),children:l}),c&&k.jsx(we,{component:"span",...N("section"),mod:{position:"right"},children:c})]})]})});Bt.classes=kc;Bt.varsResolver=pI;Bt.displayName="@mantine/core/Button";Bt.Group=sy;Bt.GroupSection=ly;var vI={root:"m_4451eb3a"};const _c=$i(e=>{const n=ge("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:f,mod:c,attributes:h,...d}=n,p=Ge({name:"Center",props:n,classes:vI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return k.jsx(we,{mod:[{inline:f},c],...p("root"),...d})});_c.classes=vI;_c.displayName="@mantine/core/Center";var gI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const F5={withShadow:!0},yI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Ut(n),"--cs-size":he(t)}}),xc=$i(e=>{const n=ge("ColorSwatch",F5,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,radius:c,withShadow:h,children:d,attributes:p,...v}=ge("ColorSwatch",F5,n),y=Ge({name:"ColorSwatch",props:n,classes:gI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:yI});return k.jsxs(we,{...y("root",{focusable:!0}),...v,children:[k.jsx("span",{...y("alphaOverlay")}),h&&k.jsx("span",{...y("shadowOverlay")}),k.jsx("span",{...y("colorOverlay",{style:{backgroundColor:f}})}),k.jsx("span",{...y("childrenOverlay"),children:d})]})});xc.classes=gI;xc.varsResolver=yI;xc.displayName="@mantine/core/ColorSwatch";function oa(e,n=0,t=10**n){return Math.round(t*e)/t}function mee({h:e,s:n,l:t,a:i}){const r=n*((t<50?t:100-t)/100);return{h:e,s:r>0?2*r/(t+r)*100:0,v:t+r,a:i}}const pee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function vee(e,n="deg"){return Number(e)*(pee[n]||1)}const gee=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function q5(e){const n=gee.exec(e);return n?mee({h:vee(n[1],n[2]),s:Number(n[3]),l:Number(n[4]),a:n[5]===void 0?1:Number(n[5])/(n[6]?100:1)}):{h:0,s:0,v:0,a:1}}function oS({r:e,g:n,b:t,a:i}){const r=Math.max(e,n,t),a=r-Math.min(e,n,t),o=a?r===e?(n-t)/a:r===n?2+(t-e)/a:4+(e-n)/a:0;return{h:oa(60*(o<0?o+6:o),3),s:oa(r?a/r*100:0,3),v:oa(r/255*100,3),a:i}}function sS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?oS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):oS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function yee(e){const n=e[0]==="#"?e.slice(1):e,t=a=>oa(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...sS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...sS(i),a:r}}const bee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function H5(e){const n=bee.exec(e);return n?oS({r:Number(n[1])/(n[2]?100/255:1),g:Number(n[3])/(n[4]?100/255:1),b:Number(n[5])/(n[6]?100/255:1),a:n[7]===void 0?1:Number(n[7])/(n[8]?100:1)}):{h:0,s:0,v:0,a:1}}const bI={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},wee={hex:sS,hexa:yee,rgb:H5,rgba:H5,hsl:q5,hsla:q5};function kee(e){for(const[,n]of Object.entries(bI))if(n.test(e))return!0;return!1}function wv(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const n=e.trim();for(const[t,i]of Object.entries(bI))if(i.test(n))return wee[t](n);return{h:0,s:0,v:0,a:1}}const uy=O.createContext(null);function tC({position:e,...n}){return k.jsx(we,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}tC.displayName="@mantine/core/ColorPickerThumb";var fy={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const Sc=Pe(e=>{var F;const n=ge("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:f,onChangeEnd:c,maxValue:h,round:d,size:p="md",focusable:v=!0,value:y,overlays:b,thumbColor:w="transparent",onScrubStart:_,onScrubEnd:S,__staticSelector:C="ColorPicker",attributes:E,ref:A,...T}=n,j=Ge({name:C,classes:fy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,rootSelector:"slider"}),N=((F=O.use(uy))==null?void 0:F.getStyles)||j,q=ni(),[R,L]=O.useState({y:0,x:y/h}),B=O.useRef(R),G=Y=>d?Math.round(Y*h):Y*h,{ref:H}=Z$(({x:Y,y:D})=>{B.current={x:Y,y:D},f==null||f(G(Y))},{onScrubEnd:()=>{const{x:Y}=B.current;c==null||c(G(Y)),S==null||S()},onScrubStart:_});Yo(()=>{L({y:0,x:y/h})},[y]);const U=(Y,D)=>{Y.preventDefault();const V=X$(D);f==null||f(G(V.x)),c==null||c(G(V.x))},P=Y=>{switch(Y.key){case"ArrowRight":U(Y,{x:R.x+.05,y:R.y});break;case"ArrowLeft":U(Y,{x:R.x-.05,y:R.y});break}},z=b.map((Y,D)=>O.createElement("div",{...N("sliderOverlay"),style:Y,key:D}));return k.jsxs(we,{...T,ref:zt(H,A),...N("slider"),size:p,role:"slider","aria-valuenow":y,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:P,"data-focus-ring":q.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[z,k.jsx(tC,{position:R,...N("thumb",{style:{top:he(1),background:w}})})]})});Sc.displayName="@mantine/core/ColorSlider";Sc.classes=fy;const _ee={__staticSelector:"AlphaSlider"},iC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ge("AlphaSlider",_ee,e);return k.jsx(Sc,{...a,value:n,onChange:o=>t==null?void 0:t(oa(o,2)),onChangeEnd:o=>i==null?void 0:i(oa(o,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${he(8)} ${he(8)}`,backgroundPosition:`0 0, 0 ${he(4)}, ${he(4)} ${he(-4)}, ${he(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${he(1)} inset, rgb(0, 0, 0, .15) 0 0 ${he(4)} inset`}]})});iC.displayName="@mantine/core/AlphaSlider";iC.classes=Sc.classes;function wI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),f=o*(1-a),c=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:oa([o,c,f,f,h,o][d]*255),g:oa([h,o,o,c,f,f][d]*255),b:oa([f,f,h,o,o,c][d]*255),a:oa(i,2)}}function U5(e,n){const{r:t,g:i,b:r,a}=wI(e);return n?`rgba(${t}, ${i}, ${r}, ${oa(a,2)})`:`rgb(${t}, ${i}, ${r})`}function V5({h:e,s:n,v:t,a:i},r){const a=(200-n)*t/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?n*t/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return r?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${oa(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function Qv(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function kI(e){const{r:n,g:t,b:i}=wI(e);return`#${Qv(n)}${Qv(t)}${Qv(i)}`}function xee(e){const n=Math.round(e.a*255);return`${kI(e)}${Qv(n)}`}const sk={hex:kI,hexa:e=>xee(e),rgb:e=>U5(e,!1),rgba:e=>U5(e,!0),hsl:e=>V5(e,!1),hsla:e=>V5(e,!0)};function zs(e,n){return n?e in sk?sk[e](n):sk.hex(n):"#000000"}const See={__staticSelector:"HueSlider"},rC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ge("HueSlider",See,e);return k.jsx(Sc,{...a,value:n,onChange:t,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${he(1)} inset, rgb(0, 0, 0, .15) 0 0 ${he(4)} inset`}]})});rC.displayName="@mantine/core/HueSlider";rC.classes=Sc.classes;function _I({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:f,onScrubEnd:c,...h}){const{getStyles:d}=O.use(uy),[p,v]=O.useState({x:i.s/100,y:1-i.v/100}),y=O.useRef(p),{ref:b}=Z$(({x:S,y:C})=>{y.current={x:S,y:C},n({s:Math.round(S*100),v:Math.round((1-C)*100)})},{onScrubEnd:()=>{const{x:S,y:C}=y.current;t({s:Math.round(S*100),v:Math.round((1-C)*100)}),c==null||c()},onScrubStart:f});O.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const w=(S,C)=>{S.preventDefault();const E=X$(C);n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),t({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},_=S=>{switch(S.key){case"ArrowUp":w(S,{y:p.y-.05,x:p.x});break;case"ArrowDown":w(S,{y:p.y+.05,x:p.x});break;case"ArrowRight":w(S,{x:p.x+.05,y:p.y});break;case"ArrowLeft":w(S,{x:p.x-.05,y:p.y});break}};return k.jsxs(we,{...d("saturation"),ref:b,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":zs("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[k.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),k.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),k.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),k.jsx(tC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}_I.displayName="@mantine/core/Saturation";function xI({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:f,...c}){const h=O.use(uy),d=o.map((p,v)=>O.createElement(xc,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},f===p&&k.jsx(nC,{size:"35%",color:nz(p)<.5?"white":"black"})));return k.jsx(we,{...h.getStyles("swatches"),...c,children:d})}xI.displayName="@mantine/core/Swatches";const Cee={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},SI=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":Mn(n,"cp-preview-size"),"--cp-width":Mn(n,"cp-width"),"--cp-body-spacing":Ft(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":Mn(n,"cp-thumb-size"),"--cp-saturation-height":Mn(n,"cp-saturation-height")}}),cy=Pe(e=>{const n=ge("ColorPicker",Cee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:f="hex",value:c,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:y,saturationLabel:b,hueLabel:w,alphaLabel:_,focusable:S,swatches:C,swatchesPerRow:E,fullWidth:A,onColorSwatchClick:T,__staticSelector:j,mod:N,attributes:q,name:R,hiddenInputProps:L,...B}=n,G=Ge({name:j,props:n,classes:fy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,rootSelector:"wrapper",vars:l,varsResolver:SI}),H=O.useRef(f||"hex"),U=O.useRef(""),P=O.useRef(-1),z=O.useRef(!1),F=f==="hexa"||f==="rgba"||f==="hsla",[Y,D,V]=xi({value:c,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[W,$]=O.useState(wv(Y)),X=()=>{window.clearTimeout(P.current),z.current=!0},te=()=>{window.clearTimeout(P.current),P.current=window.setTimeout(()=>{z.current=!1},200)},ae=le=>{$(ye=>{const oe={...ye,...le};return U.current=zs(H.current,oe),oe}),D(U.current)};return Yo(()=>{typeof c=="string"&&kee(c)&&!z.current&&$(wv(c))},[c]),Yo(()=>{H.current=f||"hex",D(zs(H.current,W))},[f]),k.jsx(uy,{value:{getStyles:G,unstyled:o},children:k.jsxs(we,{...G("wrapper"),size:y,mod:[{"full-width":A},N],...B,children:[R&&k.jsx("input",{type:"hidden",name:R,value:Y,...L}),v&&k.jsxs(k.Fragment,{children:[k.jsx(_I,{value:W,onChange:ae,onChangeEnd:({s:le,v:ye})=>p==null?void 0:p(zs(H.current,{...W,s:le,v:ye})),color:Y,size:y,focusable:S,saturationLabel:b,onScrubStart:X,onScrubEnd:te}),k.jsxs("div",{...G("body"),children:[k.jsxs("div",{...G("sliders"),children:[k.jsx(rC,{value:W.h,onChange:le=>ae({h:le}),onChangeEnd:le=>p==null?void 0:p(zs(H.current,{...W,h:le})),size:y,focusable:S,"aria-label":w,onScrubStart:X,onScrubEnd:te}),F&&k.jsx(iC,{value:W.a,onChange:le=>ae({a:le}),onChangeEnd:le=>{p==null||p(zs(H.current,{...W,a:le}))},size:y,color:zs("hex",W),focusable:S,"aria-label":_,onScrubStart:X,onScrubEnd:te})]}),F&&k.jsx(xc,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(C)&&k.jsx(xI,{data:C,swatchesPerRow:E,focusable:S,setValue:D,value:Y,onChangeEnd:le=>{const ye=zs(f,wv(le));T==null||T(ye),p==null||p(ye),V||$(wv(le))}})]})})});cy.classes=fy;cy.varsResolver=SI;cy.displayName="@mantine/core/ColorPicker";var CI={root:"m_3eebeb36",label:"m_9e365f20"};const Aee={orientation:"horizontal"},AI=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?nt(n,e):void 0,"--divider-border-style":t,"--divider-size":Mn(i,"divider-size")}}),dy=Pe(e=>{const n=ge("Divider",Aee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,orientation:c,label:h,labelPosition:d,mod:p,attributes:v,...y}=n,b=Ge({name:"Divider",classes:CI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:AI});return k.jsx(we,{mod:[{orientation:c,withLabel:!!h},p],role:"separator",...b("root"),...y,children:h&&k.jsx(we,{component:"span",mod:{position:d},...b("label"),children:h})})});dy.classes=CI;dy.varsResolver=AI;dy.displayName="@mantine/core/Divider";const[W5,OI]=da("Grid component was not found in tree"),lS=(e,n)=>{if(e==="content")return"auto";if(e==="auto")return"0rem";if(e)return e===n?"100%":`calc(${100*e/n}% - ${(n-e)/n} * var(--grid-column-gap))`},G5=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":lS(e,n),Y5=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},K5=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function Oee({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=ni(),o=OI(),l=o.breakpoints||a.breakpoints,f=zr(e),c=f===void 0?12:f,h=pu({"--col-order":(v=zr(n))==null?void 0:v.toString(),"--col-flex-grow":Y5(c,o.grow),"--col-flex-basis":lS(c,o.columns),"--col-width":c==="content"?"auto":void 0,"--col-max-width":G5(c,o.columns,o.grow),"--col-offset":K5(zr(t),o.columns),"--col-align-self":zr(i)}),d=St(l).reduce((y,b)=>{var w;return y[b]||(y[b]={}),typeof n=="object"&&n[b]!==void 0&&(y[b]["--col-order"]=(w=n[b])==null?void 0:w.toString()),typeof e=="object"&&e[b]!==void 0&&(y[b]["--col-flex-grow"]=Y5(e[b],o.grow),y[b]["--col-flex-basis"]=lS(e[b],o.columns),y[b]["--col-width"]=e[b]==="content"?"auto":void 0,y[b]["--col-max-width"]=G5(e[b],o.columns,o.grow)),typeof t=="object"&&t[b]!==void 0&&(y[b]["--col-offset"]=K5(t[b],o.columns)),typeof i=="object"&&i[b]!==void 0&&(y[b]["--col-align-self"]=i[b]),y},{}),p=Ch(St(d),l).filter(y=>St(d[y.value]).length>0).map(y=>({query:o.type==="container"?`mantine-grid (min-width: ${l[y.value]})`:`(min-width: ${l[y.value]})`,styles:d[y.value]}));return k.jsx(vc,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var aC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const Eee={span:12},oC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:f,align:c,...h}=ge("GridCol",Eee,e),d=OI(),p=I1();return k.jsxs(k.Fragment,{children:[k.jsx(Oee,{selector:`.${p}`,span:o,order:l,offset:f,align:c}),k.jsx(we,{...d.getStyles("col",{className:cn(t,p),style:i,classNames:n,styles:r}),...h})]})});oC.classes=aC;oC.displayName="@mantine/core/GridCol";function X5({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ni(),l=r||o.breakpoints,f=pu({"--grid-gap":Ft(zr(e)),"--grid-row-gap":Ft(zr(n)),"--grid-column-gap":Ft(zr(t))}),c=St(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Ft(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Ft(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Ft(t[p])),d),{}),h=Ch(St(c),l).filter(d=>St(c[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:c[d.value]}));return k.jsx(vc,{styles:f,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const Tee={gap:"md",columns:12},EI=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Pr=Pe(e=>{const n=ge("Grid",Tee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:f,gap:c,rowGap:h,columnGap:d,columns:p,align:v,justify:y,children:b,breakpoints:w,type:_,attributes:S,...C}=n,E=Ge({name:"Grid",classes:aC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:EI}),A=I1();return _==="container"&&w?k.jsxs(W5,{value:{getStyles:E,grow:f,columns:p,breakpoints:w,type:_},children:[k.jsx(X5,{selector:`.${A}`,...n}),k.jsx("div",{...E("container"),children:k.jsx(we,{...E("root",{className:A}),...C,children:k.jsx("div",{...E("inner"),children:b})})})]}):k.jsxs(W5,{value:{getStyles:E,grow:f,columns:p,breakpoints:w,type:_},children:[k.jsx(X5,{selector:`.${A}`,...n}),k.jsx(we,{...E("root",{className:A}),...C,children:k.jsx("div",{...E("inner"),children:b})})]})});Pr.classes=aC;Pr.varsResolver=EI;Pr.displayName="@mantine/core/Grid";Pr.Col=oC;const Mee=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Z5={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function Q5(e){Object.keys(Z5).forEach(n=>{e.style.setProperty(n,Z5[n],"important")})}function jee(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of Mee)t[i]=n[i];return t.boxSizing===""?null:{sizingStyle:t,paddingSize:parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),borderSize:parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth)}}let wi=null;function Dee(e,n,t=1,i=1/0){wi||(wi=document.createElement("textarea"),wi.setAttribute("tabindex","-1"),wi.setAttribute("aria-hidden","true"),wi.setAttribute("aria-label","autosize measurement"),Q5(wi)),wi.parentNode===null&&document.body.appendChild(wi);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{wi.style[p]=o[p]}),Q5(wi),wi.value=n;let f=l==="border-box"?wi.scrollHeight+a:wi.scrollHeight-r;wi.value=n,f=l==="border-box"?wi.scrollHeight+a:wi.scrollHeight-r,wi.value="x";const c=wi.scrollHeight-r;let h=c*t;l==="border-box"&&(h=h+r+a),f=Math.max(h,f);let d=c*i;return l==="border-box"&&(d=d+r+a),f=Math.min(d,f),[f,c]}function Ree({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=O.useRef(null),l=zt(o,i),f=O.useRef(0),c=()=>{const d=o.current;if(!d)return;const p=jee(d);if(!p)return;const[v]=Dee(p,d.value||d.placeholder||"x",n,e);f.current!==v&&(f.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||c(),t==null||t(d)};return O.useLayoutEffect(c),O.useEffect(()=>{const d=()=>c();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),O.useEffect(()=>{const d=()=>c();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),O.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const y=o.current.value;requestAnimationFrame(()=>{o.current&&y!==o.current.value&&c()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),k.jsx("textarea",{...r,onChange:h,ref:l})}const Pee={size:"sm"},Th=Pe(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=ge("Textarea",Pee,e),l=n&&fK()!=="test",f=l?{maxRows:t,minRows:i}:{};return k.jsx(zi,{component:l?Ree:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});Th.classes=zi.classes;Th.displayName="@mantine/core/Textarea";const[Nee,al]=da("Menu component was not found in the tree");var ol={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const sC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("MenuDivider",null,e);return k.jsx(we,{...al().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});sC.classes=ol;sC.displayName="@mantine/core/MenuDivider";const lC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=ge("MenuDropdown",null,e),p=O.useRef(null),v=al(),y=pr(f,_=>{var S,C;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(C=(S=p.current)==null?void 0:S.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||C.focus())}),b=pr(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),w=pr(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return k.jsxs(Tn.Dropdown,{...d,onMouseEnter:b,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:zt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:y,children:[v.withInitialFocusPlaceholder&&k.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),c]})});lC.classes=ol;lC.displayName="@mantine/core/MenuDropdown";const Mh=O.createContext(null),uC=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:f,rightSection:c,children:h,disabled:d,"data-disabled":p,ref:v,...y}=ge("MenuItem",null,e),b=al(),w=O.use(Mh),_=ni(),{dir:S}=yu(),C=O.useRef(null),E=y,A=pr(E.onClick,()=>{p||(typeof l=="boolean"?l&&b.closeDropdownImmediately():b.closeOnItemClick&&b.closeDropdownImmediately())}),T=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,j=o?is({color:o,theme:_}):null,N=pr(E.onKeyDown,q=>{q.key==="ArrowLeft"&&w&&(w.close(),w.focusParentItem())});return k.jsxs(fi,{onMouseDown:q=>q.preventDefault(),...y,unstyled:b.unstyled,tabIndex:b.menuItemTabIndex,...b.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:zt(C,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:A,onKeyDown:f6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:b.loop,dir:S,orientation:"vertical",onKeyDown:N}),__vars:{"--menu-item-color":j!=null&&j.isThemeColor&&(j==null?void 0:j.shade)===void 0?`var(--mantine-color-${j.color}-6)`:T==null?void 0:T.color,"--menu-item-hover":T==null?void 0:T.hover},children:[f&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:f}),h&&k.jsx("div",{...b.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),c&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c})]})});uC.classes=ol;uC.displayName="@mantine/core/MenuItem";const fC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("MenuLabel",null,e);return k.jsx(we,{...al().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});fC.classes=ol;fC.displayName="@mantine/core/MenuLabel";const cC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=ge("MenuSubDropdown",null,e),p=O.useRef(null),v=al(),y=O.use(Mh),b=pr(o,y==null?void 0:y.open),w=pr(l,y==null?void 0:y.close);return k.jsx(Tn.Dropdown,{...d,onMouseEnter:b,onMouseLeave:w,role:"menu","aria-orientation":"vertical",ref:zt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:c})});cC.classes=ol;cC.displayName="@mantine/core/MenuSubDropdown";const dC=$i(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:f,children:c,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...y}=ge("MenuSubItem",null,e),b=al(),w=O.use(Mh),_=ni(),{dir:S}=yu(),C=O.useRef(null),E=y,A=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,T=o?is({color:o,theme:_}):null,j=pr(E.onKeyDown,L=>{L.key==="ArrowRight"&&(w==null||w.open(),w==null||w.focusFirstItem()),L.key==="ArrowLeft"&&(w!=null&&w.parentContext)&&(w.parentContext.close(),w.parentContext.focusParentItem())}),N=pr(E.onClick,()=>{!d&&p&&b.closeDropdownImmediately()}),q=pr(E.onMouseEnter,w==null?void 0:w.open),R=pr(E.onMouseLeave,w==null?void 0:w.close);return k.jsxs(fi,{onMouseDown:L=>L.preventDefault(),...y,unstyled:b.unstyled,tabIndex:b.menuItemTabIndex,...b.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:zt(C,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:q,onMouseLeave:R,onClick:N,onKeyDown:f6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:b.loop,dir:S,orientation:"vertical",onKeyDown:j}),__vars:{"--menu-item-color":T!=null&&T.isThemeColor&&(T==null?void 0:T.shade)===void 0?`var(--mantine-color-${T.color}-6)`:A==null?void 0:A.color,"--menu-item-hover":A==null?void 0:A.hover},children:[l&&k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),c&&k.jsx("div",{...b.getStyles("itemLabel",{styles:r,classNames:n}),children:c}),k.jsx("div",{...b.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f||k.jsx(gg,{...b.getStyles("chevron"),size:14})})]})});dC.classes=ol;dC.displayName="@mantine/core/MenuSubItem";function TI({children:e,refProp:n}){if(!u6(e))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return al(),k.jsx(Tn.Target,{refProp:n,popupType:"menu",children:e})}TI.displayName="@mantine/core/MenuSubTarget";const $ee={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Cc(e){const{children:n,closeDelay:t,openDelay:i,...r}=ge("MenuSub",$ee,e),a=Gi(),[o,{open:l,close:f}]=Q$(!1),c=O.use(Mh),{openDropdown:h,closeDropdown:d}=Gz({open:l,close:f,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var y,b;(b=(y=document.getElementById(`${a}-dropdown`))==null?void 0:y.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||b.focus()},16),v=()=>window.setTimeout(()=>{var y;(y=document.getElementById(`${a}-target`))==null||y.focus()},16);return k.jsx(Mh,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:c},children:k.jsx(Tn,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Cc.extend=e=>e;Cc.displayName="@mantine/core/MenuSub";Cc.Target=TI;Cc.Dropdown=cC;Cc.Item=dC;const zee={refProp:"ref"};function MI(e){const{children:n,refProp:t,...i}=ge("MenuTarget",zee,e),r=vu(n);if(!r)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=al(),o=r.props,l=pr(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),f=pr(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),c=pr(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return k.jsx(Tn.Target,{refProp:t,popupType:"menu",...i,children:O.cloneElement(r,{onClick:l,onMouseEnter:f,onMouseLeave:c,"data-expanded":a.opened?!0:void 0})})}MI.displayName="@mantine/core/MenuTarget";const Lee={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Kn=Pe(e=>{const n=ge("Menu",Lee,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:f,closeOnItemClick:c,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:y,classNames:b,styles:w,unstyled:_,variant:S,vars:C,menuItemTabIndex:E,keepMounted:A,withInitialFocusPlaceholder:T,attributes:j,...N}=n,q=Ge({name:"Menu",classes:ol,props:n,classNames:b,styles:w,unstyled:_,attributes:j}),[R,L]=xi({value:a,defaultValue:o,finalValue:!1,onChange:f}),[B,G]=O.useState(!1),H=()=>{L(!1),G(!1),R&&(r==null||r())},U=()=>{L(!0),!R&&(i==null||i())},P=()=>{R?H():U()},{openDropdown:z,closeDropdown:F}=Gz({open:U,close:H,closeDelay:y,openDelay:v}),Y=W=>VY("[data-menu-item]","[data-menu-dropdown]",W),{resolvedClassNames:D,resolvedStyles:V}=Ni({classNames:b,styles:w,props:n});return k.jsx(Nee,{value:{getStyles:q,opened:R,toggleDropdown:P,getItemIndex:Y,openedViaClick:B,setOpenedViaClick:G,closeOnItemClick:c,closeDropdown:p==="click"?H:F,openDropdown:p==="click"?U:z,closeDropdownImmediately:H,loop:h,trigger:p,unstyled:_,menuItemTabIndex:E,withInitialFocusPlaceholder:T},children:k.jsx(Tn,{returnFocus:!0,...N,opened:R,onChange:P,defaultOpened:o,trapFocus:A?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:D,styles:V,unstyled:_,variant:S,keepMounted:A,children:t})})});Kn.displayName="@mantine/core/Menu";Kn.classes=ol;Kn.Item=uC;Kn.Label=fC;Kn.Dropdown=lC;Kn.Target=MI;Kn.Divider=sC;Kn.Sub=Cc;const[Iee,Ac]=da("Modal component was not found in tree");var as={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const hy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalBody",null,e);return k.jsx(xL,{...Ac().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});hy.classes=as;hy.displayName="@mantine/core/ModalBody";const my=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalCloseButton",null,e);return k.jsx(SL,{...Ac().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});my.classes=as;my.displayName="@mantine/core/ModalCloseButton";const py=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...f}=ge("ModalContent",null,e),c=Ac(),h=c.scrollAreaComponent||_J;return k.jsx(CL,{...c.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:c.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":c.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...f,children:k.jsx(h,{style:{maxHeight:c.fullScreen?"100dvh":`calc(100dvh - (${he(c.yOffset)} * 2))`},children:o})})});py.classes=as;py.displayName="@mantine/core/ModalContent";const vy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalHeader",null,e);return k.jsx(AL,{...Ac().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});vy.classes=as;vy.displayName="@mantine/core/ModalHeader";const gy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalOverlay",null,e);return k.jsx(OL,{...Ac().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});gy.classes=as;gy.displayName="@mantine/core/ModalOverlay";const Bee={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ha("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},jI=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Ut(n),"--modal-size":Mn(t,"modal-size"),"--modal-y-offset":he(i),"--modal-x-offset":he(r)}}),Nm=Pe(e=>{const n=ge("ModalRoot",Bee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:f,scrollAreaComponent:c,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:y,attributes:b,...w}=n,_=Ge({name:y,classes:as,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:jI});return k.jsx(Iee,{value:{yOffset:f,scrollAreaComponent:c,getStyles:_,fullScreen:d},children:k.jsx(_L,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":c===uo.Autosize||void 0,unstyled:o,...w})})});Nm.classes=as;Nm.varsResolver=jI;Nm.displayName="@mantine/core/ModalRoot";const DI=O.createContext(null);function RI({children:e}){const[n,t]=O.useState([]),[i,r]=O.useState(ha("modal"));return k.jsx(DI,{value:{stack:n,addModal:(a,o)=>{t(l=>[...new Set([...l,a])]),r(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:a=>t(o=>o.filter(l=>l!==a)),getZIndex:a=>`calc(${i} + ${n.indexOf(a)} + 1)`,currentId:n[n.length-1],maxZIndex:i},children:e})}RI.displayName="@mantine/core/ModalStack";const yy=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ge("ModalTitle",null,e);return k.jsx(EL,{...Ac().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});yy.classes=as;yy.displayName="@mantine/core/ModalTitle";const Fee={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ha("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Ir=Pe(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:f,stackId:c,zIndex:h,...d}=ge("Modal",Fee,e),p=O.use(DI),v=!!n||r,y=p&&c?{closeOnEscape:p.currentId===c,trapFocus:p.currentId===c,zIndex:p.getZIndex(c)}:{},b=t===!1?!1:c&&p?p.currentId===c:f;return O.useEffect(()=>{p&&c&&(f?p.addModal(c,h||ha("modal")):p.removeModal(c))},[f,c,h]),k.jsxs(Nm,{radius:l,opened:f,zIndex:p&&c?p.getZIndex(c):h,...d,...y,children:[t&&k.jsx(gy,{visible:b,transitionProps:p&&c?{duration:0}:void 0,...i}),k.jsxs(py,{radius:l,__hidden:p&&c&&f?c!==p.currentId:!1,children:[v&&k.jsxs(vy,{children:[n&&k.jsx(yy,{children:n}),r&&k.jsx(my,{...a})]}),k.jsx(hy,{children:o})]})]})});Ir.classes=as;Ir.displayName="@mantine/core/Modal";Ir.Root=Nm;Ir.Overlay=gy;Ir.Content=py;Ir.Body=hy;Ir.Header=vy;Ir.Title=yy;Ir.CloseButton=my;Ir.Stack=RI;const by=O.createContext(null);var wy={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const PI=O.createContext(null),NI=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?Mn(n):Mn(t,"pg-gap")}}),ky=Pe(e=>{var y;const n=ge("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,disabled:c,attributes:h,...d}=n,p=((y=O.use(by))==null?void 0:y.size)||f||void 0,v=Ge({name:"PillGroup",classes:wy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:NI,stylesCtx:{size:p},rootSelector:"group"});return k.jsx(PI,{value:{size:p,disabled:c},children:k.jsx(we,{size:p,...v("group"),...d})})});ky.classes=wy;ky.varsResolver=NI;ky.displayName="@mantine/core/PillGroup";const qee={variant:"default"},$I=(e,{radius:n},{size:t})=>({root:{"--pill-fz":Mn(t,"pill-fz"),"--pill-height":Mn(t,"pill-height"),"--pill-radius":n===void 0?void 0:Ut(n)}}),tl=Pe(e=>{const n=ge("Pill",qee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:f,children:c,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:y,disabled:b,mod:w,attributes:_,...S}=n,C=O.use(PI),E=O.use(by),A=y||(C==null?void 0:C.size)||void 0,T=(E==null?void 0:E.variant)==="filled"?"contrast":f||"default",j=Ge({name:"Pill",classes:wy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:$I,stylesCtx:{size:A}});return k.jsxs(we,{component:"span",variant:T,size:A,...j("root",{variant:T}),mod:[{"with-remove":h&&!b,disabled:b||(C==null?void 0:C.disabled)},w],...S,children:[k.jsx("span",{...j("label"),children:c}),h&&k.jsx(bu,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...j("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:N=>{var q;N.preventDefault(),N.stopPropagation(),(q=p==null?void 0:p.onMouseDown)==null||q.call(p,N)},onClick:N=>{var q;N.stopPropagation(),d==null||d(),(q=p==null?void 0:p.onClick)==null||q.call(p,N)}})]})});tl.classes=wy;tl.varsResolver=$I;tl.displayName="@mantine/core/Pill";tl.Group=ky;var zI={field:"m_45c4369d"};const Hee={type:"visible"},hC=Pe(e=>{const n=ge("PillsInputField",Hee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:f,disabled:c,id:h,pointer:d,mod:p,attributes:v,ref:y,...b}=n,w=O.use(by),_=O.use(wu),S=Ge({name:"PillsInputField",classes:zI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),C=c||(w==null?void 0:w.disabled);return k.jsx(we,{component:"input",ref:zt(y,w==null?void 0:w.fieldRef),"data-type":f,disabled:C,mod:[{disabled:C,pointer:d},p],...S("field"),...b,id:(_==null?void 0:_.inputId)||h,"aria-invalid":w==null?void 0:w.hasError,"aria-describedby":_==null?void 0:_.describedBy,type:"text",onMouseDown:E=>!d&&E.stopPropagation()})});hC.classes=zI;hC.displayName="@mantine/core/PillsInputField";const Uee={size:"sm"},su=Pe(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:f,...c}=ge("PillsInput",Uee,e),h=O.useRef(null);return k.jsx(by,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:f},children:k.jsx(zi,{size:r,error:l,variant:f,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...c,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});su.displayName="@mantine/core/PillsInput";su.classes=zi.classes;su.Field=hC;function lk(e){return typeof e=="string"?e.trim().toLowerCase():e}function Vee({data:e,value:n}){const t=n.map(lk);return e.reduce((i,r)=>(au(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(lk(a.value))===-1)}):t.indexOf(lk(r.value))===-1&&i.push(r),i),[])}const J5={xs:41,sm:50,md:60,lg:72,xl:89},Wee={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},_y=B1(e=>{const n=ge("MultiSelect",Wee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:y,dropdownOpened:b,defaultDropdownOpened:w,onDropdownOpen:_,onDropdownClose:S,selectFirstOptionOnChange:C,selectFirstOptionOnDropdownOpen:E,onOptionSubmit:A,comboboxProps:T,filter:j,limit:N,withScrollArea:q,maxDropdownHeight:R,searchValue:L,defaultSearchValue:B,onSearchChange:G,readOnly:H,disabled:U,onFocus:P,onBlur:z,radius:F,rightSection:Y,rightSectionWidth:D,rightSectionPointerEvents:V,rightSectionProps:W,leftSection:$,leftSectionWidth:X,leftSectionPointerEvents:te,leftSectionProps:ae,inputContainer:le,inputWrapperOrder:ye,withAsterisk:oe,labelProps:ue,descriptionProps:ke,errorProps:ie,wrapperProps:Re,description:pe,label:Ce,error:De,maxValues:be,searchable:_e,nothingFoundMessage:Me,withCheckIcon:Be,withAlignedLabels:Ve,checkIconPosition:He,hidePickedOptions:We,withErrorStyles:Ye,name:rn,form:Q,id:me,clearable:xe,clearSectionMode:Xe,clearButtonProps:ne,hiddenInputProps:Le,placeholder:en,hiddenInputValuesDivider:hn,required:fn,mod:Ze,renderOption:Ke,renderPill:An,onRemove:on,onClear:ht,onMaxValues:mt,scrollAreaProps:zn,chevronColor:yn,attributes:kn,clearSearchOnChange:tt,openOnFocus:At,loading:$e,loadingPosition:Fe,...jn}=n,Jn=Gi(me),On=J1(y),Qe=Rm(On),Je=O.useRef({}),nn=Pm({opened:b,defaultOpened:w,onDropdownOpen:()=>{_==null||_(),E&&nn.selectFirstOption()},onDropdownClose:()=>{S==null||S(),nn.resetSelectedOption()}}),{styleProps:Ln,rest:{type:In,autoComplete:bt,...xn}}=gu(jn),[_n,Wn]=xi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Lt,di]=xi({value:L,defaultValue:B,finalValue:"",onChange:G}),Ki=sn=>{di(sn),nn.resetSelectedOption()},za=Ge({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:kn}),{resolvedClassNames:mo,resolvedStyles:Br}=Ni({props:n,styles:a,classNames:t}),Fr=sn=>{p==null||p(sn),sn.key===" "&&!_e&&(sn.preventDefault(),nn.toggleDropdown()),sn.key==="Backspace"&&Lt.length===0&&_n.length>0&&(on==null||on(_n[_n.length-1]),Wn(_n.slice(0,_n.length-1)))},La=_n.map((sn,_r)=>{var qr;const Ia=Qe[`${sn}`]||Je.current[`${sn}`];return An?k.jsx(O.Fragment,{children:An({option:Ia,value:sn,onRemove:()=>{Wn(_n.filter(Hr=>sn!==Hr)),on==null||on(sn)},disabled:U})},`${sn}-${_r}`):k.jsx(tl,{withRemoveButton:!H&&!((qr=Qe[`${sn}`])!=null&&qr.disabled),onRemove:()=>{Wn(_n.filter(Hr=>sn!==Hr)),on==null||on(sn)},unstyled:o,disabled:U,...za("pill"),children:(Ia==null?void 0:Ia.label)||sn},`${sn}-${_r}`)});O.useEffect(()=>{C&&nn.selectFirstOption()},[C,Lt]),O.useEffect(()=>{_n.forEach(sn=>{`${sn}`in Qe&&(Je.current[`${sn}`]=Qe[`${sn}`])})},[Qe,_n]);const wr=k.jsx(Sn.ClearButton,{...ne,onClear:()=>{ht==null||ht(),Wn([]),Ki("")}}),kr=Vee({data:On,value:_n}),dn=xe&&_n.length>0&&!U&&!H,ti=dn?{paddingInlineEnd:J5[f]??J5.sm}:void 0;return k.jsxs(k.Fragment,{children:[k.jsxs(Sn,{store:nn,classNames:mo,styles:Br,unstyled:o,size:f,readOnly:H,__staticSelector:"MultiSelect",attributes:kn,onOptionSubmit:sn=>{A==null||A(sn),tt&&Ki(""),nn.updateSelectedOptionIndex("selected"),_n.includes(Qe[`${sn}`].value)?(Wn(_n.filter(_r=>_r!==Qe[`${sn}`].value)),on==null||on(Qe[`${sn}`].value)):_n.length_e?nn.openDropdown():nn.toggleDropdown(),"data-expanded":nn.dropdownOpened||void 0,id:Jn,required:fn,mod:Ze,attributes:kn,children:k.jsxs(tl.Group,{attributes:kn,disabled:U,unstyled:o,...za("pillsList",{style:ti}),children:[La,k.jsx(Sn.EventsTarget,{autoComplete:bt,withExpandedAttribute:!0,children:k.jsx(su.Field,{...xn,id:Jn,placeholder:en,type:!_e&&!en?"hidden":"visible",...za("inputField"),unstyled:o,onFocus:sn=>{P==null||P(sn),At&&_e&&nn.openDropdown()},onBlur:sn=>{z==null||z(sn),nn.closeDropdown(),Ki("")},onKeyDown:Fr,value:Lt,onChange:sn=>{Ki(sn.currentTarget.value),_e&&nn.openDropdown(),C&&nn.selectFirstOption()},disabled:U,readOnly:H||!_e,pointer:!_e})})]})})}),k.jsx(iy,{data:We?kr:On,hidden:H||U,filter:j,search:Lt,limit:N,hiddenWhenEmpty:!Me,withScrollArea:q,maxDropdownHeight:R,filterOptions:_e,value:_n,checkIconPosition:He,withCheckIcon:Be,withAlignedLabels:Ve,nothingFoundMessage:Me,unstyled:o,labelId:Ce?`${Jn}-label`:void 0,"aria-label":Ce?void 0:jn["aria-label"],renderOption:Ke,scrollAreaProps:zn})]}),k.jsx(Sn.HiddenInput,{name:rn,valuesDivider:hn,value:_n,form:Q,disabled:U,...Le})]})});_y.classes={...zi.classes,...Sn.classes};_y.displayName="@mantine/core/MultiSelect";var LI={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const Gee={withCloseButton:!0},II=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Ut(n),"--notification-color":t?nt(t,e):void 0}}),xy=Pe(e=>{const n=ge("Notification",Gee,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:f,icon:c,children:h,onClose:d,closeButtonProps:p,classNames:v,style:y,styles:b,unstyled:w,vars:_,mod:S,loaderProps:C,role:E,attributes:A,...T}=n,j=Ge({name:"Notification",classes:LI,props:n,className:t,style:y,classNames:v,styles:b,unstyled:w,attributes:A,vars:_,varsResolver:II});return k.jsxs(we,{...j("root"),mod:[{"data-with-icon":!!c||a,"data-with-border":l},S],role:E||"alert",...T,children:[c&&!a&&k.jsx("div",{...j("icon"),children:c}),a&&k.jsx(Wi,{size:28,color:i,...j("loader"),...C}),k.jsxs("div",{...j("body"),children:[f&&k.jsx("div",{...j("title"),children:f}),k.jsx(we,{...j("description"),mod:{"data-with-title":!!f},children:h})]}),o&&k.jsx(bu,{iconSize:16,color:"gray",...p,unstyled:w,onClick:N=>{var q;(q=p==null?void 0:p.onClick)==null||q.call(p,N),d==null||d()},...j("closeButton")})]})});xy.classes=LI;xy.varsResolver=II;xy.displayName="@mantine/core/Notification";function BI(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r=l?r=r+nM("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function tM(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=mC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,f=parseFloat("0."+(o||"0")),c=o.length<=n?"0."+o:f.toFixed(n),h=c.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(b,w,_){return b.length>_?(Number(b[0])+Number(w)).toString()+b.substring(1,b.length):w+b},h[0]));var p=HI(h[1]||"",n,t),v=l?"-":"",y=i?".":"";return""+v+d+y+p}function Ul(e,n){if(e.value=e.value,e!==null){if(e.createTextRange){var t=e.createTextRange();return t.move("character",n),t.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(n,n),!0):(e.focus(),!1)}}var VI=Yee(function(e,n){for(var t=0,i=0,r=e.length,a=n.length;e[t]===n[t]&&tt&&r-i>t;)i++;return{from:{start:t,end:r-i},to:{start:t,end:a-i}}}),Jee=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function ene(e,n,t){return Math.min(Math.max(e,n),t)}function uk(e){return Math.max(e.selectionStart,e.selectionEnd)}function nne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function tne(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function ine(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function rne(e,n,t,i,r,a,o){o===void 0&&(o=ine);var l=r.findIndex(function(E){return E}),f=e.slice(0,l);!n&&!t.startsWith(f)&&(n=f,t=f+t,i=i+f.length);for(var c=t.length,h=e.length,d={},p=new Array(c),v=0;v0&&p[_]===-1;)_--;var C=_===-1||p[_]===-1?0:p[_]+1;return C>S?S:i-C=0&&!t[n];)n--;n===-1&&(n=t.indexOf(!0))}else{for(;n<=r&&!t[n];)n++;n>r&&(n=t.lastIndexOf(!0))}return n===-1&&(n=r),n}function ane(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tj.length-o.length||TL||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=une(C?"-"+e:e,r),e=(e.match(fne(y))||[]).join("");var B=e.indexOf(y);e=e.replace(new RegExp(qI(y),"g"),function(z,F){return F===B?".":""});var G=mC(e,r),H=G.beforeDecimal,U=G.afterDecimal,P=G.addNegation;return c.end-c.startV?!1:D>=te.start&&Dt?t:e}function bne(e){return e.toString().replace(".","").length}function wne(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const hk={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},KI=(e,{size:n})=>({controls:{"--ni-chevron-size":Mn(n,"ni-chevron-size")}});function _ne(e,n,t){const i=e.toString(),r=GI.test(i),a=i.replace(/^0+(?=\d)/,""),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>Number.MAX_SAFE_INTEGER)return n!==void 0?n:a;const l=Fo(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function xne(e,n){if(e===""||e==="-")return e;const t=nh(e);return t===null?e:n.clampBehavior==="blur"?Jv(t,n.min,n.max):t}const Cy=B1(e=>{const n=ge("NumberInput",hk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:f,value:c,defaultValue:h,max:d,min:p,step:v,hideControls:y,rightSection:b,isAllowed:w,clampBehavior:_,onBlur:S,allowDecimal:C,decimalScale:E,onKeyDown:A,onKeyDownCapture:T,handlersRef:j,startValue:N,disabled:q,rightSectionPointerEvents:R,allowNegative:L,readOnly:B,size:G,rightSectionWidth:H,stepHoldInterval:U,stepHoldDelay:P,allowLeadingZeros:z,withKeyboardEvents:F,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:D,selectAllOnFocus:V,onMinReached:W,onMaxReached:$,onFocus:X,attributes:te,ref:ae,...le}=n,ye=L??!0,oe=z??!0,ue=Ge({name:"NumberInput",classes:uS,props:n,classNames:i,styles:r,unstyled:a,attributes:te,vars:o,varsResolver:KI}),{resolvedClassNames:ke,resolvedStyles:ie}=Ni({classNames:i,styles:r,props:n}),Re=O.useRef(fk(c)||fk(h)?"bigint":"number");fk(c)?Re.current="bigint":typeof c=="number"&&(Re.current="number");const pe=Re.current==="bigint",[Ce,De]=xi({value:c,defaultValue:h,finalValue:"",onChange:l}),be=P!==void 0&&U!==void 0,_e=O.useRef(null),Me=O.useRef(null),Be=O.useRef(0),Ve=typeof p=="number"?p:void 0,He=typeof d=="number"?d:void 0,We=typeof v=="number"?v:hk.step,Ye=typeof N=="number"?N:hk.startValue,rn=kv(p),Q=kv(d),me=kv(v)??BigInt(1),xe=kv(N)??BigInt(0),Xe=$e=>!YI($e,ye)||oe&&oM.test($e)?$e:nh($e)??$e,ne=$e=>{const Fe=Number($e);return Number.isSafeInteger(Fe)?Fe:void 0},Le=($e,Fe)=>{Fe.source==="event"&&De(pe?Xe($e.value):wne($e.floatValue,$e.value)&&!gne.test($e.value)&&!(oe&&oM.test($e.value))&&!yne.test($e.value)&&!GI.test($e.value)?$e.floatValue:$e.value),f==null||f($e,Fe)},en=$e=>{const Fe=String($e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Fe?Math.max(0,(Fe[1]?Fe[1].length:0)-(Fe[2]?+Fe[2]:0)):0},hn=$e=>{_e.current&&typeof $e<"u"&&_e.current.setSelectionRange($e,$e)},fn=O.useRef(W3);fn.current=()=>{if(pe){if(!dk(Ce,ye))return;let Je;const nn=Ce;if(typeof nn=="bigint"){const In=nn+me;Q!==void 0&&In>Q&&($==null||$()),Je=Q!==void 0&&In>Q?Q:In}else if(typeof nn=="string"&&nn!==""){const In=nh(nn);if(In===null)return;const bt=In+me;Q!==void 0&&bt>Q&&($==null||$()),Je=Q!==void 0&&bt>Q?Q:bt}else Je=Jv(xe,rn,Q);const Ln=Je.toString();De(Je),f==null||f({floatValue:ne(Je),formattedValue:Ln,value:Ln},{source:"increment"}),setTimeout(()=>{var In;return hn((In=_e.current)==null?void 0:In.value.length)},0);return}if(!ck(Ce))return;let $e;const Fe=en(Ce),jn=en(We),Jn=Math.max(Fe,jn),On=10**Jn;if(!fS(Ce)&&(typeof Ce!="number"||Number.isNaN(Ce)))$e=Fo(Ye,Ve,He);else if(He!==void 0){const Je=(Math.round(Number(Ce)*On)+Math.round(We*On))/On;Je>He&&($==null||$()),$e=Je<=He?Je:He}else $e=(Math.round(Number(Ce)*On)+Math.round(We*On))/On;const Qe=$e.toFixed(Jn);De(parseFloat(Qe)),f==null||f({floatValue:parseFloat(Qe),formattedValue:Qe,value:Qe},{source:"increment"}),setTimeout(()=>{var Je;return hn((Je=_e.current)==null?void 0:Je.value.length)},0)};const Ze=O.useRef(W3);Ze.current=()=>{if(pe){if(!dk(Ce,ye))return;let nn;const Ln=rn!==void 0?rn:ye?void 0:BigInt(0),In=Ce;if(typeof In=="bigint"){const xn=In-me;Ln!==void 0&&xn{var xn;return hn((xn=_e.current)==null?void 0:xn.value.length)},0);return}if(!ck(Ce))return;let $e;const Fe=Ve!==void 0?Ve:ye?Number.MIN_SAFE_INTEGER:0,jn=en(Ce),Jn=en(We),On=Math.max(jn,Jn),Qe=10**On;if(!fS(Ce)&&typeof Ce!="number"||Number.isNaN(Ce))$e=Fo(Ye,Fe,He);else{const nn=(Math.round(Number(Ce)*Qe)-Math.round(We*Qe))/Qe;Fe!==void 0&&nn{var nn;return hn((nn=_e.current)==null?void 0:nn.value.length)},0)};const Ke=$e=>{var On,Qe,Je;const Fe=$e.clipboardData.getData("text"),jn=le.decimalSeparator||".",Jn=(D||[".",","]).filter(nn=>nn!==jn);if(Jn.some(nn=>Fe.includes(nn))){$e.preventDefault();let nn=Fe;Jn.forEach(In=>{nn=nn.split(In).join(jn)});const Ln=_e.current;if(Ln){const In=Ln.selectionStart??0,bt=Ln.selectionEnd??0,xn=Ln.value,_n=xn.substring(0,In)+nn+xn.substring(bt);(Qe=(On=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:On.set)==null||Qe.call(Ln,_n),Ln.dispatchEvent(new Event("change",{bubbles:!0}));const Wn=In+nn.length;setTimeout(()=>hn(Wn),0)}}(Je=le.onPaste)==null||Je.call(le,$e)},An=$e=>{var Fe,jn;A==null||A($e),!(B||!F)&&($e.key==="ArrowUp"&&($e.preventDefault(),(Fe=fn.current)==null||Fe.call(fn)),$e.key==="ArrowDown"&&($e.preventDefault(),(jn=Ze.current)==null||jn.call(Ze)))},on=$e=>{if(T==null||T($e),$e.key==="Backspace"){const Fe=_e.current;Fe&&Fe.selectionStart===0&&Fe.selectionStart===Fe.selectionEnd&&($e.preventDefault(),window.setTimeout(()=>hn(0),0))}},ht=$e=>{V&&setTimeout(()=>$e.currentTarget.select(),0),X==null||X($e)},mt=$e=>{let Fe=Ce;pe?(_==="blur"&&typeof Fe=="bigint"&&(Fe=Jv(Fe,rn,Q)),Y&&typeof Fe=="string"&&(Fe=xne(Fe,{min:rn,max:Q,clampBehavior:_}))):(_==="blur"&&typeof Fe=="number"&&(Fe=Fo(Fe,Ve,He)),Y&&typeof Fe=="string"&&en(Fe)<15&&(Fe=_ne(Fe,He,Ve))),Ce!==Fe&&De(Fe),S==null||S($e)};ug(j,{increment:fn.current,decrement:Ze.current});const zn=$e=>{var Fe,jn;$e?(Fe=fn.current)==null||Fe.call(fn):(jn=Ze.current)==null||jn.call(Ze),Be.current+=1},yn=$e=>{if(zn($e),be){const Fe=typeof U=="number"?U:U(Be.current);Me.current=window.setTimeout(()=>yn($e),Fe)}},kn=($e,Fe)=>{var jn;$e.preventDefault(),(jn=_e.current)==null||jn.focus(),zn(Fe),be&&(Me.current=window.setTimeout(()=>yn(Fe),P))},tt=()=>{Me.current&&window.clearTimeout(Me.current),Me.current=null,Be.current=0},At=k.jsxs("div",{...ue("controls"),children:[k.jsx(fi,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ce=="number"&&He!==void 0&&Ce>=He||typeof Ce=="bigint"&&Q!==void 0&&Ce>=Q,mod:{direction:"up"},onMouseDown:$e=>$e.preventDefault(),onPointerDown:$e=>{kn($e,!0)},onPointerUp:tt,onPointerLeave:tt,children:k.jsx(aM,{direction:"up"})}),k.jsx(fi,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ce=="number"&&Ve!==void 0&&Ce<=Ve||typeof Ce=="bigint"&&rn!==void 0&&Ce<=rn,mod:{direction:"down"},onMouseDown:$e=>$e.preventDefault(),onPointerDown:$e=>{kn($e,!1)},onPointerUp:tt,onPointerLeave:tt,children:k.jsx(aM,{direction:"down"})})]});return k.jsx(zi,{component:vne,allowNegative:L,className:cn(uS.root,t),size:G,...le,inputMode:pe?"numeric":"decimal",readOnly:B,disabled:q,value:typeof Ce=="bigint"?Ce.toString():Ce,getInputRef:zt(ae,_e),onValueChange:Le,rightSection:y||B||!(pe?dk(Ce,ye):ck(Ce))?b:b||At,classNames:ke,styles:ie,unstyled:a,__staticSelector:"NumberInput",decimalScale:pe?0:C?E:0,onPaste:Ke,onFocus:ht,onKeyDown:An,onKeyDownCapture:on,rightSectionPointerEvents:R??(q?"none":void 0),rightSectionWidth:H??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:z,allowedDecimalSeparators:D,onBlur:mt,attributes:te,isAllowed:$e=>{if(!(!w||w($e)))return!1;if(_!=="strict")return!0;if(!pe)return kne($e.floatValue,Ve,He);if($e.value===""||$e.value==="-")return!0;const Fe=nh($e.value);return Fe===null?!0:(rn===void 0||Fe>=rn)&&(Q===void 0||Fe<=Q)}})});Cy.classes={...zi.classes,...uS};Cy.varsResolver=KI;Cy.displayName="@mantine/core/NumberInput";function Sne({reveal:e}){return k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:e?k.jsxs(k.Fragment,{children:[k.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),k.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53"}),k.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6"})]}):k.jsxs(k.Fragment,{children:[k.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),k.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z"}),k.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var cS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Cne={visibilityToggleIcon:Sne,size:"sm"},XI=(e,{size:n})=>({root:{"--psi-icon-size":Mn(n,"psi-icon-size"),"--psi-button-size":Mn(n,"psi-button-size")}}),Ay=Pe(e=>{const n=ge("PasswordInput",Cne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:f,error:c,leftSection:h,disabled:d,id:p,variant:v,inputContainer:y,description:b,label:w,size:_,errorProps:S,descriptionProps:C,labelProps:E,withAsterisk:A,inputWrapperOrder:T,wrapperProps:j,radius:N,rightSection:q,rightSectionWidth:R,rightSectionPointerEvents:L,leftSectionWidth:B,visible:G,defaultVisible:H,onVisibilityChange:U,visibilityToggleIcon:P,visibilityToggleButtonProps:z,rightSectionProps:F,leftSectionProps:Y,leftSectionPointerEvents:D,withErrorStyles:V,mod:W,attributes:$,...X}=n,te=Gi(p),[ae,le]=xi({value:G,defaultValue:H,finalValue:!1,onChange:U}),ye=()=>le(!ae),oe=Ge({name:"PasswordInput",classes:cS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,varsResolver:XI}),{resolvedClassNames:ue,resolvedStyles:ke}=Ni({classNames:t,styles:a,props:n}),{styleProps:ie,rest:Re}=gu(X),pe=(S==null?void 0:S.id)||`${te}-error`,Ce=(C==null?void 0:C.id)||`${te}-description`,De=`${c&&typeof c!="boolean"?pe:""} ${b?Ce:""}`,be=De.trim().length>0?De.trim():void 0,_e=k.jsx(Ht,{...oe("visibilityToggle"),disabled:d,radius:N,"aria-pressed":ae,tabIndex:-1,"aria-label":"Toggle password visibility",...z,variant:(z==null?void 0:z.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Me=>{var Be;Me.preventDefault(),(Be=z==null?void 0:z.onTouchEnd)==null||Be.call(z,Me),ye()},onMouseDown:Me=>{var Be;Me.preventDefault(),(Be=z==null?void 0:z.onMouseDown)==null||Be.call(z,Me),ye()},onKeyDown:Me=>{var Be;(Be=z==null?void 0:z.onKeyDown)==null||Be.call(z,Me),Me.key===" "&&(Me.preventDefault(),ye())},children:k.jsx(P,{reveal:ae})});return k.jsx(Nt.Wrapper,{required:f,id:te,label:w,error:c,description:b,size:_,classNames:ue,styles:ke,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:A,inputWrapperOrder:T,inputContainer:y,variant:v,labelProps:{...E,htmlFor:te},descriptionProps:{...C,id:Ce},errorProps:{...S,id:pe},mod:W,attributes:$,...oe("root"),...ie,...j,children:k.jsx(Nt,{component:"div",error:c,leftSection:h,size:_,classNames:{...ue,input:cn(cS.input,ue==null?void 0:ue.input)},styles:ke,radius:N,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:R,rightSection:q??_e,variant:v,unstyled:o,leftSectionWidth:B,rightSectionPointerEvents:L||"all",rightSectionProps:F,leftSectionProps:Y,leftSectionPointerEvents:D,withAria:!1,withErrorStyles:V,attributes:$,children:k.jsx("input",{required:f,"data-invalid":!!c||void 0,"data-with-left-section":!!h||void 0,...oe("innerInput"),disabled:d,id:te,...Re,"aria-describedby":be,autoComplete:Re.autoComplete||"off",type:ae?"text":"password"})})})});Ay.classes={...zi.classes,...cS};Ay.varsResolver=XI;Ay.displayName="@mantine/core/PasswordInput";function Ane({offset:e,position:n,defaultOpened:t}){const[i,r]=O.useState(t),a=O.useRef(null),{x:o,y:l,elements:f,refs:c,update:h,placement:d}=D6({placement:n,middleware:[E6({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,y=O.useCallback(({clientX:b,clientY:w})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:b,y:w,left:b+p,top:w+v,right:b,bottom:w}}})},[f.reference]);return O.useEffect(()=>{if(c.floating.current){const b=a.current;b.addEventListener("mousemove",y);const w=Ho(c.floating.current);return w.forEach(_=>{_.addEventListener("scroll",h)}),()=>{b.removeEventListener("mousemove",y),w.forEach(_=>{_.removeEventListener("scroll",h)})}}},[f.reference,c.floating.current,h,y,i]),{handleMouseMove:y,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:c.setFloating}}var Oy={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const One={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ha("popover")},ZI=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Ut(n),"--tooltip-bg":t?nt(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),Ey=Pe(e=>{const n=ge("TooltipFloating",One,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:f,unstyled:c,radius:h,color:d,label:p,offset:v,position:y,multiline:b,zIndex:w,disabled:_,defaultOpened:S,variant:C,vars:E,portalProps:A,attributes:T,ref:j,...N}=n,q=ni(),R=Ge({name:"TooltipFloating",props:n,classes:Oy,className:o,style:a,classNames:l,styles:f,unstyled:c,attributes:T,rootSelector:"tooltip",vars:E,varsResolver:ZI}),{handleMouseMove:L,x:B,y:G,opened:H,boundaryRef:U,floating:P,setOpened:z}=Ane({offset:v,position:y,defaultOpened:S}),F=vu(t);if(!F)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Y=zt(U,z1(F),j),D=F.props,V=$=>{var X;(X=D.onMouseEnter)==null||X.call(D,$),L($),z(!0)},W=$=>{var X;(X=D.onMouseLeave)==null||X.call(D,$),z(!1)};return k.jsxs(k.Fragment,{children:[k.jsx(el,{...A,withinPortal:r,children:k.jsx(we,{...N,...R("tooltip",{style:{...lz(a,q),zIndex:w,display:!_&&H?"block":"none",top:(G&&Math.round(G))??"",left:(B&&Math.round(B))??""}}),variant:C,ref:P,mod:{multiline:b},children:p})}),O.cloneElement(F,{...D,[i]:Y,onMouseEnter:V,onMouseLeave:W})]})});Ey.classes=Oy;Ey.varsResolver=ZI;Ey.displayName="@mantine/core/TooltipFloating";const QI=O.createContext({withinGroup:!1}),Ene={openDelay:0,closeDelay:0};function pC(e){const{openDelay:n,closeDelay:t,children:i}=ge("TooltipGroup",Ene,e);return k.jsx(QI,{value:{withinGroup:!0},children:k.jsx(aQ,{delay:{open:n,close:t},children:i})})}pC.displayName="@mantine/core/TooltipGroup";pC.extend=e=>e;function Tne(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function Mne(e){const n=Tne(e.middlewares),t=[Nz(e.offset)];return n.shift&&t.push(E6(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?pg():pg(n.flip)),t.push($z({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?ch():ch(n.inline)):e.inline&&t.push(ch()),t}function jne(e){var E,A,T;const[n,t]=O.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=O.use(QI).withinGroup,a=Gi(),o=O.useCallback(j=>{t(j),j&&w(a)},[a]),{x:l,y:f,context:c,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=D6({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:Mne(e),whileElementsMounted:iS}),{delay:y,currentId:b,setCurrentId:w}=oQ(c,{id:a}),{getReferenceProps:_,getFloatingProps:S}=dQ([iQ(c,{enabled:(E=e.events)==null?void 0:E.hover,delay:r?y:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((A=e.events)!=null&&A.touch)}),cQ(c,{enabled:(T=e.events)==null?void 0:T.focus,visibleOnly:!0}),mQ(c,{role:"tooltip"}),uQ(c,{enabled:typeof e.opened>"u"})]);Yo(()=>{var j;(j=e.onPositionChange)==null||j.call(e,d)},[d]);const C=i&&b&&b!==a;return{x:l,y:f,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:S,getReferenceProps:_,isGroupPhase:C,opened:i,placement:d}}const Dne={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:ha("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},JI=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({theme:e,color:t||e.primaryColor,autoContrast:r,variant:i||"filled"});return{tooltip:{"--tooltip-radius":n===void 0?void 0:Ut(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},Vi=Pe(e=>{const n=ge("Tooltip",Dne,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:f,opened:c,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:y,styles:b,unstyled:w,style:_,className:S,withArrow:C,arrowSize:E,arrowOffset:A,arrowRadius:T,arrowPosition:j,offset:N,transitionProps:q,multiline:R,events:L,zIndex:B,disabled:G,onClick:H,onMouseEnter:U,onMouseLeave:P,inline:z,variant:F,keepMounted:Y,vars:D,portalProps:V,mod:W,floatingStrategy:$,middlewares:X,autoContrast:te,attributes:ae,target:le,ref:ye,...oe}=n,{dir:ue}=yu(),ke=O.useRef(null),ie=jne({position:Wz(ue,i),closeDelay:l,openDelay:o,onPositionChange:f,opened:c,defaultOpened:h,events:L,arrowRef:ke,arrowOffset:A,offset:typeof N=="number"?N+(C?E/2:0):N,inline:z,strategy:$,middlewares:X});O.useEffect(()=>{const Me=le instanceof HTMLElement?le:typeof le=="string"?document.querySelector(le):(le==null?void 0:le.current)||null;Me&&ie.reference(Me)},[le,ie]);const Re=Ge({name:"Tooltip",props:n,classes:Oy,className:S,style:_,classNames:y,styles:b,unstyled:w,attributes:ae,rootSelector:"tooltip",vars:D,varsResolver:JI}),pe=vu(t);if(!le&&!pe)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Ce=Re("tooltip");if(le){const Me=R5(q,{duration:100,transition:"fade"});return k.jsx(k.Fragment,{children:k.jsx(el,{...V,withinPortal:d,children:k.jsx(Xo,{...Me,keepMounted:Y,mounted:!G&&!!ie.opened,duration:ie.isGroupPhase?10:Me.duration,children:Be=>k.jsxs(we,{...oe,"data-fixed":$==="fixed"||void 0,variant:F,mod:[{multiline:R},W],...Ce,...ie.getFloatingProps({ref:ie.floating,className:Ce.className,style:{...Ce.style,...Be,zIndex:B,top:ie.y??0,left:ie.x??0}}),children:[a,k.jsx(vg,{ref:ke,arrowX:ie.arrowX,arrowY:ie.arrowY,visible:C,position:ie.placement,arrowSize:E,arrowOffset:A,arrowRadius:T,arrowPosition:j,...Re("arrow")})]})})})})}const De=pe.props,be=zt(ie.reference,z1(pe),ye),_e=R5(q,{duration:100,transition:"fade"});return k.jsxs(k.Fragment,{children:[k.jsx(el,{...V,withinPortal:d,children:k.jsx(Xo,{..._e,keepMounted:Y,mounted:!G&&!!ie.opened,duration:ie.isGroupPhase?10:_e.duration,children:Me=>k.jsxs(we,{...oe,"data-fixed":$==="fixed"||void 0,variant:F,mod:[{multiline:R},W],...ie.getFloatingProps({ref:ie.floating,className:Re("tooltip").className,style:{...Re("tooltip").style,...Me,zIndex:B,top:ie.y??0,left:ie.x??0}}),children:[a,k.jsx(vg,{ref:ke,arrowX:ie.arrowX,arrowY:ie.arrowY,visible:C,position:ie.placement,arrowSize:E,arrowOffset:A,arrowRadius:T,arrowPosition:j,...Re("arrow")})]})})}),O.cloneElement(pe,ie.getReferenceProps({onClick:H,onMouseEnter:U,onMouseLeave:P,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...De,className:cn(S,De.className),[r]:be}))]})});Vi.classes=Oy;Vi.varsResolver=JI;Vi.displayName="@mantine/core/Tooltip";Vi.Floating=Ey;Vi.Group=pC;const Rne={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},Zo=B1(e=>{const n=ge("Select",Rne,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:y,value:b,defaultValue:w,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:C,comboboxProps:E,readOnly:A,disabled:T,filter:j,limit:N,withScrollArea:q,maxDropdownHeight:R,size:L,searchable:B,rightSection:G,checkIconPosition:H,withCheckIcon:U,withAlignedLabels:P,nothingFoundMessage:z,name:F,form:Y,searchValue:D,defaultSearchValue:V,onSearchChange:W,allowDeselect:$,error:X,rightSectionPointerEvents:te,id:ae,clearable:le,clearSectionMode:ye,clearButtonProps:oe,hiddenInputProps:ue,renderOption:ke,onClear:ie,autoComplete:Re,scrollAreaProps:pe,__defaultRightSection:Ce,__clearSection:De,__clearable:be,chevronColor:_e,autoSelectOnBlur:Me,openOnFocus:Be,attributes:Ve,...He}=n,We=O.useMemo(()=>J1(y),[y]),Ye=O.useRef({}),rn=O.useMemo(()=>Rm(We),[We]),Q=Gi(ae),[me,xe,Xe]=xi({value:b,defaultValue:w,finalValue:null,onChange:v}),ne=me!=null?`${me}`in rn?rn[`${me}`]:Ye.current[`${me}`]:void 0,Le=aK(ne),[en,hn,fn]=xi({value:D,defaultValue:V,finalValue:ne?ne.label:"",onChange:W}),Ze=Pm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),S?Ze.selectFirstOption():Ze.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f==null||f(),setTimeout(Ze.resetSelectedOption,0)}}),Ke=zn=>{hn(zn),Ze.resetSelectedOption()},{resolvedClassNames:An,resolvedStyles:on}=Ni({props:n,styles:i,classNames:t});O.useEffect(()=>{_&&Ze.selectFirstOption()},[_,en]),O.useEffect(()=>{b===null&&Ke(""),b!=null&&ne&&((Le==null?void 0:Le.value)!==ne.value||(Le==null?void 0:Le.label)!==ne.label)&&Ke(ne.label)},[b,ne]),O.useEffect(()=>{var zn,yn;!Xe&&!fn&&Ke(me!=null?`${me}`in rn?(zn=rn[`${me}`])==null?void 0:zn.label:((yn=Ye.current[`${me}`])==null?void 0:yn.label)||"":"")},[rn,me]),O.useEffect(()=>{me&&`${me}`in rn&&(Ye.current[`${me}`]=rn[`${me}`])},[rn,me]);const ht=k.jsx(Sn.ClearButton,{...oe,onClear:()=>{xe(null,null),Ke(""),ie==null||ie()}}),mt=le&&!!me&&!T&&!A;return k.jsxs(k.Fragment,{children:[k.jsxs(Sn,{store:Ze,__staticSelector:"Select",classNames:An,styles:on,unstyled:r,readOnly:A,size:L,attributes:Ve,keepMounted:Me,onOptionSubmit:zn=>{C==null||C(zn);const yn=$&&`${rn[zn].value}`==`${me}`?null:rn[zn],kn=yn?yn.value:null;kn!==me&&xe(kn,yn),!Xe&&Ke(kn!=null&&(yn==null?void 0:yn.label)||""),Ze.closeDropdown()},...E,children:[k.jsx(Sn.Target,{targetType:B?"input":"button",autoComplete:Re,withExpandedAttribute:!0,children:k.jsx(zi,{id:Q,__defaultRightSection:k.jsx(Sn.Chevron,{size:L,error:X,unstyled:r,color:_e}),__clearSection:ht,__clearable:mt,__clearSectionMode:ye,rightSection:G,rightSectionPointerEvents:te||"none",...He,size:L,__staticSelector:"Select",disabled:T,readOnly:A||!B,value:en,onChange:zn=>{Ke(zn.currentTarget.value),Ze.openDropdown(),_&&Ze.selectFirstOption()},onFocus:zn=>{Be&&B&&Ze.openDropdown(),h==null||h(zn)},onBlur:zn=>{Me&&Ze.clickSelectedOption(),B&&Ze.closeDropdown();const yn=me!=null&&(`${me}`in rn?rn[`${me}`]:Ye.current[`${me}`]);Ke(yn&&yn.label||""),d==null||d(zn)},onClick:zn=>{B?Ze.openDropdown():Ze.toggleDropdown(),p==null||p(zn)},classNames:An,styles:on,unstyled:r,pointer:!B,error:X,attributes:Ve})}),k.jsx(iy,{data:We,hidden:A||T,filter:j,search:en,limit:N,hiddenWhenEmpty:!z,withScrollArea:q,maxDropdownHeight:R,filterOptions:!!B&&(ne==null?void 0:ne.label)!==en,value:me,checkIconPosition:H,withCheckIcon:U,withAlignedLabels:P,nothingFoundMessage:z,unstyled:r,labelId:He.label?`${Q}-label`:void 0,"aria-label":He.label?void 0:He["aria-label"],renderOption:ke,scrollAreaProps:pe})]}),k.jsx(Sn.HiddenInput,{value:me,name:F,form:Y,disabled:T,...ue})]})});Zo.classes={...zi.classes,...Sn.classes};Zo.displayName="@mantine/core/Select";function eB(e){if(e!==void 0)return typeof e=="number"?he(e):e}function Pne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ni(),l=n===void 0?e:n,f=i!==void 0,c=pu({"--sg-spacing-x":Ft(zr(e)),"--sg-spacing-y":Ft(zr(l)),"--sg-auto-rows":r,...f?{"--sg-min-col-width":eB(i)}:{"--sg-cols":(d=zr(t))==null?void 0:d.toString()}}),h=St(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ft(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ft(l[v])),!f&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return k.jsx(vc,{styles:c,media:Ch(St(h),o.breakpoints).filter(p=>St(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function mk(e){return typeof e=="object"&&e!==null?St(e):[]}function Nne(e){return e.sort((n,t)=>Sh(n)-Sh(t))}function $ne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return Nne(Array.from(new Set([...mk(e),...mk(n),...i!==void 0?[]:mk(t)])))}function zne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,f=pu({"--sg-spacing-x":Ft(zr(e)),"--sg-spacing-y":Ft(zr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":eB(i)}:{"--sg-cols":(d=zr(t))==null?void 0:d.toString()}}),c=$ne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=c.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ft(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ft(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return k.jsx(vc,{styles:f,container:c.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var nB={container:"m_925c2d2c",root:"m_2415a157"};const Lne={cols:1,spacing:"md",type:"media"},Dh=Pe(e=>{const n=ge("SimpleGrid",Lne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:f,verticalSpacing:c,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:y,attributes:b,...w}=n,_=Ge({name:"SimpleGrid",classes:nB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l}),S=I1(),C=p!==void 0?v||"auto-fill":void 0;return d==="container"?k.jsxs(k.Fragment,{children:[k.jsx(zne,{...n,selector:`.${S}`}),k.jsx("div",{..._("container"),children:k.jsx(we,{..._("root",{className:S}),...w,"data-auto-cols":C})})]}):k.jsxs(k.Fragment,{children:[k.jsx(Pne,{...n,selector:`.${S}`}),k.jsx(we,{..._("root",{className:S}),...w,"data-auto-cols":C})]})});Dh.classes=nB;Dh.displayName="@mantine/core/SimpleGrid";var tB={root:"m_6d731127"};const Ine={gap:"md",align:"stretch",justify:"flex-start"},iB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ft(n),"--stack-align":t,"--stack-justify":i}}),$t=Pe(e=>{const n=ge("Stack",Ine,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:f,justify:c,gap:h,variant:d,attributes:p,...v}=n;return k.jsx(we,{...Ge({name:"Stack",props:n,classes:tB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:iB})("root"),variant:d,...v})});$t.classes=tB;$t.varsResolver=iB;$t.displayName="@mantine/core/Stack";const[Bne,Fne]=da("Table component was not found in the tree");var $m={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function qne(e,n){if(!n)return;const t={};return n.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),n.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),n.striped&&e.striped&&(t["data-striped"]=e.striped),n.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),n.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),n.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function ku(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=Pe(r=>{const a=ge(t,{},r),{classNames:o,className:l,style:f,styles:c,...h}=a,d=Fne();return k.jsx(we,{component:e,...qne(d,n),...d.getStyles(e,{className:l,classNames:o,style:f,styles:c,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=$m,i}const dS=ku("th",{columnBorder:!0}),rB=ku("td",{columnBorder:!0}),eg=ku("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),aB=ku("thead",{stickyHeader:!0}),oB=ku("tbody"),sB=ku("tfoot"),lB=ku("caption",{captionSide:!0}),Hne={type:"scrollarea"},uB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":he(n),"--table-max-height":he(t),"--table-overflow":i==="native"?"auto":void 0}}),Ty=Pe(e=>{const n=ge("TableScrollContainer",Hne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,minWidth:c,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...y}=n,b=Ge({name:"TableScrollContainer",classes:$m,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:uB,rootSelector:"scrollContainer"});return k.jsx(we,{component:d==="scrollarea"?uo:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...b("scrollContainer"),...y,children:k.jsx("div",{...b("scrollContainerInner"),children:f})})});Ty.classes=$m;Ty.varsResolver=uB;Ty.displayName="@mantine/core/TableScrollContainer";function vC({data:e}){return k.jsxs(k.Fragment,{children:[e.caption&&k.jsx(lB,{children:e.caption}),e.head&&k.jsx(aB,{children:k.jsx(eg,{children:e.head.map((n,t)=>k.jsx(dS,{children:n},t))})}),e.body&&k.jsx(oB,{children:e.body.map((n,t)=>k.jsx(eg,{children:n.map((i,r)=>k.jsx(rB,{children:i},r))},t))}),e.foot&&k.jsx(sB,{children:k.jsx(eg,{children:e.foot.map((n,t)=>k.jsx(dS,{children:n},t))})})]})}vC.displayName="@mantine/core/TableDataRenderer";const Une={withRowBorders:!0,verticalSpacing:7},fB=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:f,highlightOnHover:c,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Ft(i),"--table-vertical-spacing":Ft(r),"--table-border-color":a?nt(a,e):void 0,"--table-striped-color":f&&o?nt(o,e):void 0,"--table-highlight-on-hover-color":c&&l?nt(l,e):void 0,"--table-sticky-header-offset":d?he(h):void 0}}),_t=Pe(e=>{const n=ge("Table",Une,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:f,verticalSpacing:c,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:y,withColumnBorders:b,withRowBorders:w,withTableBorder:_,borderColor:S,layout:C,data:E,children:A,stickyHeader:T,stickyHeaderOffset:j,mod:N,tabularNums:q,attributes:R,...L}=n,B=Ge({name:"Table",props:n,className:i,style:r,classes:$m,classNames:t,styles:a,unstyled:o,attributes:R,rootSelector:"table",vars:l,varsResolver:fB});return k.jsx(Bne,{value:{getStyles:B,stickyHeader:T,striped:v===!0?"odd":v||void 0,highlightOnHover:y,withColumnBorders:b,withRowBorders:w,captionSide:h||"bottom"},children:k.jsx(we,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":q},N],...B("table"),...L,children:A||!!E&&k.jsx(vC,{data:E})})})});_t.classes=$m;_t.varsResolver=fB;_t.displayName="@mantine/core/Table";_t.Td=rB;_t.Th=dS;_t.Tr=eg;_t.Thead=aB;_t.Tbody=oB;_t.Tfoot=sB;_t.Caption=lB;_t.ScrollContainer=Ty;_t.DataRenderer=vC;const[Vne,gC]=da("Tabs component was not found in the tree");var zm={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const yC=Pe(e=>{const n=ge("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:f,mod:c,...h}=n,d=gC();return k.jsx(we,{...d.getStyles("list",{className:i,style:f,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},c],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});yC.classes=zm;yC.displayName="@mantine/core/TabsList";const bC=Pe(e=>{const n=ge("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:f,keepMounted:c,...h}=n,d=Sm(),p=gC(),v=p.value===r,y=p.keepMounted||c,b=p.keepMountedMode!=="display-none",w=y&&b&&d!=="test"?k.jsx(O.Activity,{mode:v?"visible":"hidden",children:t}):y||v?t:null;return k.jsx(we,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},f],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:w})});bC.classes=zm;bC.displayName="@mantine/core/TabsPanel";const wC=Pe(e=>{const n=ge("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:f,disabled:c,color:h,style:d,classNames:p,styles:v,vars:y,mod:b,tabIndex:w,..._}=n,S=ni(),{dir:C}=yu(),E=gC(),A=o===E.value,T=N=>{E.onChange(E.allowTabDeactivation&&o===E.value?null:o),l==null||l(N)},j={classNames:p,styles:v,props:n};return k.jsxs(fi,{...E.getStyles("tab",{className:t,style:d,variant:E.variant,...j}),disabled:c,unstyled:E.unstyled,variant:E.variant,mod:[{active:A,disabled:c,orientation:E.orientation,inverted:E.inverted,placement:E.orientation==="vertical"&&E.placement},b],role:"tab",id:E.getTabId(o),"aria-selected":A,tabIndex:w!==void 0?w:A||E.value===null?0:-1,"aria-controls":E.getPanelId(o),onClick:T,__vars:{"--tabs-color":h?nt(h,S):void 0},onKeyDown:f6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:E.activateTabWithKeyboard,loop:E.loop,orientation:E.orientation||"horizontal",dir:C,onKeyDown:f}),..._,children:[a&&k.jsx("span",{...E.getStyles("tabSection",j),"data-position":"left",children:a}),i&&k.jsx("span",{...E.getStyles("tabLabel",j),children:i}),r&&k.jsx("span",{...E.getStyles("tabSection",j),"data-position":"right",children:r})]})});wC.classes=zm;wC.displayName="@mantine/core/TabsTab";const sM="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Wne={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},cB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Ut(n),"--tabs-color":nt(t,e),"--tabs-text-color":L1(i,e)?xm({color:t,theme:e,autoContrast:i}):void 0}}),Aa=Pe(e=>{const n=ge("Tabs",Wne,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:f,activateTabWithKeyboard:c,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:y,placement:b,keepMounted:w,keepMountedMode:_,classNames:S,styles:C,unstyled:E,className:A,style:T,vars:j,autoContrast:N,mod:q,attributes:R,...L}=n,B=Gi(f),[G,H]=xi({value:i,defaultValue:t,finalValue:null,onChange:r}),U=Ge({name:"Tabs",props:n,classes:zm,className:A,style:T,classNames:S,styles:C,unstyled:E,attributes:R,vars:j,varsResolver:cB});return k.jsx(Vne,{value:{placement:b,value:G,orientation:a,id:B,loop:l,activateTabWithKeyboard:c,getTabId:QT(`${B}-tab`,sM),getPanelId:QT(`${B}-panel`,sM),onChange:H,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:y,keepMounted:w,keepMountedMode:_,unstyled:E,getStyles:U},children:k.jsx(we,{id:B,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&y,placement:a==="vertical"&&b},q],...U("root"),...L,children:o})})});Aa.classes=zm;Aa.varsResolver=cB;Aa.displayName="@mantine/core/Tabs";Aa.Tab=wC;Aa.Panel=bC;Aa.List=yC;function Gne({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(au(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(a.label.toLowerCase().trim())===-1)}):t.indexOf(r.label.toLowerCase().trim())===-1&&i.push(r),i),[])}function Yne(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function lM({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=Yne(e,i),f=[];if(n)f.push(...r,...l);else{f.push(...r);for(const c of l)(a?h=>a(h,f):h=>f.some(d=>d.toLowerCase()===h.toLowerCase()))(c)?o==null||o(c):f.push(c)}return t?f.slice(0,t):f}const Kne={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},kC=Pe(e=>{const n=ge("TagsInput",Kne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:y,onDuplicate:b,variant:w,data:_,dropdownOpened:S,defaultDropdownOpened:C,onDropdownOpen:E,onDropdownClose:A,selectFirstOptionOnChange:T,selectFirstOptionOnDropdownOpen:j,onOptionSubmit:N,comboboxProps:q,filter:R,limit:L,withScrollArea:B,maxDropdownHeight:G,searchValue:H,defaultSearchValue:U,onSearchChange:P,readOnly:z,disabled:F,splitChars:Y,onFocus:D,onBlur:V,onPaste:W,radius:$,rightSection:X,rightSectionWidth:te,rightSectionPointerEvents:ae,rightSectionProps:le,leftSection:ye,leftSectionWidth:oe,leftSectionPointerEvents:ue,leftSectionProps:ke,inputContainer:ie,inputWrapperOrder:Re,withAsterisk:pe,required:Ce,labelProps:De,descriptionProps:be,errorProps:_e,wrapperProps:Me,description:Be,label:Ve,error:He,withErrorStyles:We,name:Ye,form:rn,id:Q,clearable:me,clearSectionMode:xe,clearButtonProps:Xe,hiddenInputProps:ne,hiddenInputValuesDivider:Le,mod:en,renderOption:hn,renderPill:fn,onRemove:Ze,onClear:Ke,onMaxTags:An,scrollAreaProps:on,acceptValueOnBlur:ht,isDuplicate:mt,openOnFocus:zn,attributes:yn,ref:kn,loading:tt,loadingPosition:At,...$e}=n,Fe=Gi(Q),jn=J1(_),Jn=Rm(jn),On=O.useRef(null),Qe=zt(On,kn),Je=Pm({opened:S,defaultOpened:C,onDropdownOpen:()=>{E==null||E(),j&&Je.selectFirstOption()},onDropdownClose:()=>{A==null||A(),Je.resetSelectedOption()}}),{styleProps:nn,rest:{type:Ln,autoComplete:In,...bt}}=gu($e),[xn,_n]=xi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Wn,Lt]=xi({value:H,defaultValue:U,finalValue:"",onChange:P}),di=dn=>{Lt(dn),Je.resetSelectedOption()},Ki=Ge({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:za,resolvedStyles:mo}=Ni({props:n,styles:a,classNames:t}),Br=dn=>{if((mt?mt(dn,xn):xn.some(ti=>ti.toLowerCase()===dn.toLowerCase()))&&(b==null||b(dn),!y)){di("");return}if(xn.length>=v){An==null||An(dn);return}N==null||N(dn),di(""),dn.length>0&&_n([...xn,dn])},Fr=dn=>{if(p==null||p(dn),dn.isPropagationStopped())return;const ti=Wn.trim(),{length:sn}=ti;if(Y.includes(dn.key)&&sn>0&&(_n(lM({splitChars:Y,allowDuplicates:y,maxTags:v,value:Wn,currentTags:xn,isDuplicate:mt,onDuplicate:b})),di(""),dn.preventDefault()),dn.key==="Enter"&&sn>0&&!dn.nativeEvent.isComposing){if(dn.preventDefault(),document.querySelector(`#${Je.listId} [data-combobox-option][data-combobox-selected]`))return;Br(ti)}dn.key==="Backspace"&&sn===0&&xn.length>0&&!dn.nativeEvent.isComposing&&!z&&(Ze==null||Ze(xn[xn.length-1]),_n(xn.slice(0,xn.length-1)))},La=dn=>{W==null||W(dn),dn.preventDefault(),dn.clipboardData&&(_n(lM({splitChars:Y,allowDuplicates:y,maxTags:v,value:`${Wn}${dn.clipboardData.getData("text/plain")}`,currentTags:xn,isDuplicate:mt,onDuplicate:b})),di(""))},wr=xn.map((dn,ti)=>{const sn=()=>{const _r=xn.slice();_r.splice(ti,1),_n(_r),Ze==null||Ze(dn)};return fn?k.jsx(O.Fragment,{children:fn({option:Jn[dn]||{value:dn,label:dn,disabled:!1},value:dn,onRemove:sn,disabled:F||z})},`${dn}-${ti}`):k.jsx(tl,{withRemoveButton:!z,onRemove:sn,unstyled:o,disabled:F,attributes:yn,...Ki("pill"),children:dn},`${dn}-${ti}`)});O.useEffect(()=>{T&&Je.selectFirstOption()},[T,xn,Wn]);const kr=k.jsx(Sn.ClearButton,{...Xe,onClear:()=>{var dn;_n([]),di(""),(dn=On.current)==null||dn.focus(),Je.openDropdown(),Ke==null||Ke()}});return k.jsxs(k.Fragment,{children:[k.jsxs(Sn,{store:Je,classNames:za,styles:mo,unstyled:o,size:f,readOnly:z,__staticSelector:"TagsInput",attributes:yn,onOptionSubmit:dn=>{N==null||N(dn),di(""),xn.length>=v?An==null||An(dn):_n([...xn,Jn[dn].value]),Je.resetSelectedOption()},...q,children:[k.jsx(Sn.DropdownTarget,{children:k.jsx(su,{...nn,__staticSelector:"TagsInput",classNames:za,styles:mo,unstyled:o,size:f,className:i,style:r,variant:w,disabled:F,radius:$,rightSection:X,__clearSection:kr,__clearable:me&&xn.length>0&&!F&&!z,__clearSectionMode:xe,rightSectionWidth:te,rightSectionPointerEvents:ae,rightSectionProps:le,leftSection:ye,leftSectionWidth:oe,leftSectionPointerEvents:ue,leftSectionProps:ke,loading:tt,loadingPosition:At,inputContainer:ie,inputWrapperOrder:Re,withAsterisk:pe,required:Ce,labelProps:De,descriptionProps:be,errorProps:_e,wrapperProps:Me,description:Be,label:Ve,error:He,withErrorStyles:We,__stylesApiProps:{...n,multiline:!0},id:Fe,mod:en,attributes:yn,children:k.jsxs(tl.Group,{disabled:F,unstyled:o,...Ki("pillsList"),children:[wr,k.jsx(Sn.EventsTarget,{autoComplete:In,withExpandedAttribute:!0,children:k.jsx(su.Field,{...bt,ref:Qe,...Ki("inputField"),unstyled:o,onKeyDown:Fr,onFocus:dn=>{D==null||D(dn),zn&&Je.openDropdown()},onBlur:dn=>{V==null||V(dn),ht&&Br(Wn),Je.closeDropdown()},onPaste:La,value:Wn,onChange:dn=>di(dn.currentTarget.value),required:Ce&&xn.length===0,disabled:F,readOnly:z,id:Fe})})]})})}),k.jsx(iy,{data:Gne({data:jn,value:xn}),hidden:z||F,filter:R,search:Wn,limit:L,hiddenWhenEmpty:!0,withScrollArea:B,maxDropdownHeight:G,unstyled:o,labelId:Ve?`${Fe}-label`:void 0,"aria-label":Ve?void 0:$e["aria-label"],renderOption:hn,scrollAreaProps:on})]}),k.jsx(Sn.HiddenInput,{name:Ye,form:rn,value:xn,valuesDivider:Le,disabled:F,...ne})]})});kC.classes={...zi.classes,...Sn.classes};kC.displayName="@mantine/core/TagsInput";const il=Pe(e=>k.jsx(zi,{component:"input",...ge("TextInput",null,e),__staticSelector:"TextInput"}));il.classes=zi.classes;il.displayName="@mantine/core/TextInput";const[Xne,Zne]=da("Timeline component was not found in tree");var _C={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const xC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:f,__vars:c,bullet:h,radius:d,color:p,lineVariant:v,children:y,title:b,mod:w,..._}=ge("TimelineItem",null,e),S=Zne(),C=ni(),E={classNames:n,styles:r};return k.jsxs(we,{...S.getStyles("item",{...E,className:t,style:i}),mod:[{"line-active":f,active:o},w],__vars:{"--tli-radius":d!==void 0?Ut(d):void 0,"--tli-color":p?nt(p,C):void 0,"--tli-border-style":v||void 0},..._,children:[k.jsx(we,{...S.getStyles("itemBullet",E),mod:{"with-child":!!h,align:l,active:o},children:h}),k.jsxs("div",{...S.getStyles("itemBody",E),children:[b&&k.jsx("div",{...S.getStyles("itemTitle",E),children:b}),k.jsx("div",{...S.getStyles("itemContent",E),children:y})]})]})});xC.classes=_C;xC.displayName="@mantine/core/TimelineItem";const Qne={active:-1,align:"left"},dB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":he(n),"--tl-line-width":he(t),"--tl-radius":i===void 0?void 0:Ut(i),"--tl-color":r?nt(r,e):void 0,"--tl-icon-color":L1(a,e)?xm({color:r,theme:e,autoContrast:a}):void 0}}),qf=Pe(e=>{const n=ge("Timeline",Qne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,active:c,color:h,radius:d,bulletSize:p,align:v,lineWidth:y,reverseActive:b,mod:w,autoContrast:_,attributes:S,...C}=n,E=Ge({name:"Timeline",classes:_C,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:dB}),A=O.Children.toArray(f),T=A.map((j,N)=>{var q,R;return O.cloneElement(j,{unstyled:o,__align:v,__active:((q=j.props)==null?void 0:q.active)||(b?c>=A.length-N-1:c>=N),__lineActive:((R=j.props)==null?void 0:R.lineActive)||(b?c>=A.length-N-1:c-1>=N)})});return k.jsx(Xne,{value:{getStyles:E},children:k.jsx(we,{...E("root"),mod:[{align:v},w],...C,children:T})})});qf.classes=_C;qf.varsResolver=dB;qf.displayName="@mantine/core/Timeline";qf.Item=xC;const Jne=["h1","h2","h3","h4","h5","h6"],ete=["xs","sm","md","lg","xl"];function nte(e,n){const t=n!==void 0?n:`h${e}`;return Jne.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:ete.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:he(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var hB={root:"m_8a5d1357"};const tte={order:1},mB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=nte(n||1,t);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},_u=Pe(e=>{const n=ge("Title",tte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:f,size:c,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:y,...b}=n,w=Ge({name:"Title",props:n,classes:hB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:y,vars:f,varsResolver:mB});return[1,2,3,4,5,6].includes(l)?k.jsx(we,{...w("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:c,...b}):null});_u.classes=hB;_u.varsResolver=mB;_u.displayName="@mantine/core/Title";const SC=O.createContext(null);SC.displayName="@mantine/modals/ModalsContext";function ite(){const e=O.use(SC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[rte,xu]=lK("mantine-modals"),ate=e=>{const n=e.modalId||Xs();return xu("openModal")({...e,modalId:n}),n},ote=e=>{const n=e.modalId||Xs();return xu("openConfirmModal")({...e,modalId:n}),n},ste=e=>{const n=e.modalId||Xs();return xu("openContextModal")({...e,modalId:n}),n},lte=xu("closeModal"),ute=xu("closeAllModals"),fte=e=>xu("updateModal")(e),cte=e=>xu("updateContextModal")(e),Ro={open:ate,close:lte,closeAll:ute,openConfirmModal:ote,openContextModal:ste,updateModal:fte,updateContextModal:cte};function dte({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:f,children:c}){const{cancel:h,confirm:d}=i,p=ite(),v=b=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(b)),typeof l=="function"&&l(),a&&p.closeModal(e)},y=b=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(b)),typeof f=="function"&&f(),r&&p.closeModal(e)};return k.jsxs(k.Fragment,{children:[c&&k.jsx(we,{mb:"md",children:c}),k.jsxs(wn,{mt:c?0:"md",justify:"flex-end",...o,children:[k.jsx(Bt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),k.jsx(Bt,{...t,onClick:y,children:(t==null?void 0:t.children)||d})]})]})}function uM(e,n){var t,i,r,a;n&&e.type==="confirm"&&((i=(t=e.props).onCancel)==null||i.call(t)),(a=(r=e.props).onClose)==null||a.call(r)}function hte(e,n){var t;switch(n.type){case"OPEN":return{current:n.modal,modals:[...e.modals,n.modal]};case"CLOSE":{if(!e.modals.find(r=>r.id===n.modalId))return e;const i=e.modals.filter(r=>r.id!==n.modalId);return{current:i[i.length-1]||e.current,modals:i}}case"CLOSE_ALL":return e.modals.length?{current:e.current,modals:[]}:e;case"UPDATE":{const{modalId:i,newProps:r}=n,a=e.modals.map(l=>l.id!==i?l:l.type==="content"||l.type==="confirm"?{...l,props:{...l.props,...r}}:l.type==="context"?{...l,props:{...l.props,...r,innerProps:{...l.props.innerProps,...r.innerProps}}}:l),o=((t=e.current)==null?void 0:t.id)===i&&a.find(l=>l.id===i)||e.current;return{...e,modals:a,current:o}}default:return e}}function mte(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h},modalProps:{id:n,...d}}}function pte({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=O.useReducer(hte,{modals:[],current:null}),o=O.useRef(r);o.current=r;const l=O.useRef(!1),f=O.useCallback(C=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(E=>{uM(E,C)}),l.current=!1),a({type:"CLOSE_ALL",canceled:C})},[o,a]),c=O.useCallback(({modalId:C,...E})=>{const A=C||Xs();return a({type:"OPEN",modal:{id:A,type:"content",props:E}}),A},[a]),h=O.useCallback(({modalId:C,...E})=>{const A=C||Xs();return a({type:"OPEN",modal:{id:A,type:"confirm",props:E}}),A},[a]),d=O.useCallback((C,{modalId:E,...A})=>{const T=E||Xs();return a({type:"OPEN",modal:{id:T,type:"context",props:A,ctx:C}}),T},[a]),p=O.useCallback((C,E)=>{if(!l.current){const A=o.current.modals.find(T=>T.id===C);A&&(l.current=!0,uM(A,E),l.current=!1)}a({type:"CLOSE",modalId:C,canceled:E})},[o,a]),v=O.useCallback(({modalId:C,...E})=>{a({type:"UPDATE",modalId:C,newProps:E})},[a]),y=O.useCallback(({modalId:C,...E})=>{a({type:"UPDATE",modalId:C,newProps:E})},[a]);rte({openModal:c,openConfirmModal:h,openContextModal:({modal:C,...E})=>d(C,E),closeModal:p,closeContextModal:p,closeAllModals:f,updateModal:v,updateContextModal:y});const b={modalProps:n||{},modals:r.modals,openModal:c,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:f,updateModal:v,updateContextModal:y},w=()=>{const C=o.current.current;switch(C==null?void 0:C.type){case"context":{const{innerProps:E,...A}=C.props,T=i[C.ctx];return{modalProps:A,content:k.jsx(T,{innerProps:E,context:b,id:C.id})}}case"confirm":{const{modalProps:E,confirmProps:A}=mte(C.props);return{modalProps:E,content:k.jsx(dte,{...A,id:C.id,labels:C.props.labels||t})}}case"content":{const{children:E,...A}=C.props;return{modalProps:A,content:E}}default:return{modalProps:{},content:null}}},{modalProps:_,content:S}=w();return k.jsxs(SC,{value:b,children:[k.jsx(Ir,{zIndex:ha("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var C;return p((C=r.current)==null?void 0:C.id)},children:S}),e]})}function vte(e){let n=e,t=!1;const i=new Set;return{getState(){return n},updateState(r){n=typeof r=="function"?r(n):r},setState(r){this.updateState(r),i.forEach(a=>a(n))},initialize(r){t||(n=r,t=!0)},subscribe(r){return i.add(r),()=>i.delete(r)}}}function gte(e){return O.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function yte(e,n,t){const i=[],r=[],a={};for(const o of e){const l=o.position||n;a[l]=a[l]||0,a[l]+=1,a[l]<=t?r.push(o):i.push(o)}return{notifications:r,queue:i}}const bte=()=>vte({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Su=bte(),wte=(e=Su)=>gte(e);function Oc(e,n){const t=e.getState(),i=yte(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function kte(e,n=Su){const t=e.id||Xs();return Oc(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function pB(e,n=Su){return Oc(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function _te(e,n=Su){return Oc(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function xte(e=Su){Oc(e,()=>[])}function Ste(e=Su){Oc(e,n=>n.slice(0,e.getState().limit))}const et={show:kte,hide:pB,update:_te,clean:xte,cleanQueue:Ste,updateState:Oc},vB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function Cte(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),vB.reduce((t,i)=>(t[i]=[],t),{}))}const fM={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Ate={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Ote({state:e,maxHeight:n,position:t,transitionDuration:i}){const[r,a]=t.split("-"),o=a==="center"?`${r}-center`:a,l={opacity:0,maxHeight:n,transform:fM[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},f={opacity:1,transform:Ate[o]},c={opacity:0,maxHeight:0,transform:fM[o]};return{...l,...{entering:f,entered:f,exiting:c,exited:c}[e]}}function Ete(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function gB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:f,onOpen:c,...h}=e,d=Ete(t,e.autoClose),p=O.useRef(-1),[v,y]=O.useState(!1),b=()=>window.clearTimeout(p.current),w=()=>{n(e.id),b()},_=()=>{b(),typeof d=="number"&&(p.current=window.setTimeout(w,d))},S=()=>{y(!0),r==null||r()},C=()=>{y(!1),a==null||a()};return O.useEffect(()=>{var E;(E=e.onOpen)==null||E.call(e,e)},[]),O.useEffect(()=>(_(),b),[d]),O.useEffect(()=>(i||v?b():_(),b),[i,v]),k.jsx(xy,{...o,...h,onClose:w,onMouseEnter:S,onMouseLeave:C,children:f})}gB.displayName="@mantine/notifications/NotificationContainer";var yB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function hS(){return hS=Object.assign?Object.assign.bind():function(e){for(var n=1;n({root:{"--notifications-z-index":n==null?void 0:n.toString(),"--notifications-container-width":he(t)}}),fo=Pe(e=>{const n=ge("Notifications",Fte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,position:c,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:y,zIndex:b,store:w,portalProps:_,withinPortal:S,pauseResetOnHover:C,...E}=n,A=ni(),T=wte(w),j=iK(),N=h6(),q=O.useRef({}),R=O.useRef(0),[L,B]=O.useState(0),G=O.useCallback(()=>B(Y=>Y+1),[]),H=O.useCallback(()=>B(Y=>Math.max(0,Y-1)),[]),U=A.respectReducedMotion&&N?1:d,P=Ge({name:"Notifications",classes:yB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:kB});O.useEffect(()=>{w==null||w.updateState(Y=>({...Y,limit:y||5,defaultPosition:c}))},[y,c]),Yo(()=>{T.notifications.length>R.current&&setTimeout(()=>j(),0),R.current=T.notifications.length},[T.notifications]);const z=Cte(T.notifications,c),F=vB.reduce((Y,D)=>(Y[D]=z[D].map(({style:V,...W})=>k.jsx(Bte,{timeout:U,onEnter:()=>q.current[W.id].offsetHeight,nodeRef:{current:q.current[W.id]},children:$=>k.jsx(gB,{ref:X=>{X&&(q.current[W.id]=X)},data:W,onHide:X=>pB(X,w),autoClose:h,paused:C==="all"?L>0:!1,onHoverStart:G,onHoverEnd:H,...P("notification",{style:{...Ote({state:$,position:D,transitionDuration:U,maxHeight:v}),...V}})})},W.id)),Y),{});return k.jsxs(el,{withinPortal:S,..._,children:[k.jsx(we,{...P("root"),"data-position":"top-center",...E,children:k.jsx(Bs,{children:F["top-center"]})}),k.jsx(we,{...P("root"),"data-position":"top-left",...E,children:k.jsx(Bs,{children:F["top-left"]})}),k.jsx(we,{...P("root",{className:ru.classNames.fullWidth}),"data-position":"top-right",...E,children:k.jsx(Bs,{children:F["top-right"]})}),k.jsx(we,{...P("root",{className:ru.classNames.fullWidth}),"data-position":"bottom-right",...E,children:k.jsx(Bs,{children:F["bottom-right"]})}),k.jsx(we,{...P("root"),"data-position":"bottom-left",...E,children:k.jsx(Bs,{children:F["bottom-left"]})}),k.jsx(we,{...P("root"),"data-position":"bottom-center",...E,children:k.jsx(Bs,{children:F["bottom-center"]})})]})});fo.classes=yB;fo.varsResolver=kB;fo.displayName="@mantine/notifications/Notifications";fo.show=et.show;fo.hide=et.hide;fo.update=et.update;fo.clean=et.clean;fo.cleanQueue=et.cleanQueue;fo.updateState=et.updateState;var yk={exports:{}},$d={},bk={exports:{}},wk={};/** + * @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 pM;function qte(){return pM||(pM=1,(function(e){function n(P,z){var F=P.length;P.push(z);e:for(;0>>1,D=P[Y];if(0>>1;Yr($,F))Xr(te,$)?(P[Y]=te,P[X]=F,Y=X):(P[Y]=$,P[W]=F,Y=W);else if(Xr(te,F))P[Y]=te,P[X]=F,Y=X;else break e}}return z}function r(P,z){var F=P.sortIndex-z.sortIndex;return F!==0?F:P.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var f=[],c=[],h=1,d=null,p=3,v=!1,y=!1,b=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function E(P){for(var z=t(c);z!==null;){if(z.callback===null)i(c);else if(z.startTime<=P)i(c),z.sortIndex=z.expirationTime,n(f,z);else break;z=t(c)}}function A(P){if(b=!1,E(P),!y)if(t(f)!==null)y=!0,T||(T=!0,B());else{var z=t(c);z!==null&&U(A,z.startTime-P)}}var T=!1,j=-1,N=5,q=-1;function R(){return w?!0:!(e.unstable_now()-qP&&R());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var D=Y(d.expirationTime<=P);if(P=e.unstable_now(),typeof D=="function"){d.callback=D,E(P),z=!0;break n}d===t(f)&&i(f),E(P)}else i(f);d=t(f)}if(d!==null)z=!0;else{var V=t(c);V!==null&&U(A,V.startTime-P),z=!1}}break e}finally{d=null,p=F,v=!1}z=void 0}}finally{z?B():T=!1}}}var B;if(typeof C=="function")B=function(){C(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,H=G.port2;G.port1.onmessage=L,B=function(){H.postMessage(null)}}else B=function(){_(L,0)};function U(P,z){j=_(function(){P(e.unstable_now())},z)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125Y?(P.sortIndex=F,n(c,P),t(f)===null&&P===t(c)&&(b?(S(j),j=-1):b=!0,U(A,F-Y))):(P.sortIndex=D,n(f,P),y||v||(y=!0,T||(T=!0,B()))),P},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(P){var z=p;return function(){var F=p;p=z;try{return P.apply(this,arguments)}finally{p=F}}}})(wk)),wk}var vM;function Hte(){return vM||(vM=1,bk.exports=qte()),bk.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 gM;function Ute(){if(gM)return $d;gM=1;var e=Hte(),n=l6(),t=J$();function i(s){var u="https://react.dev/errors/"+s;if(1D||(s.current=Y[D],Y[D]=null,D--)}function $(s,u){D++,Y[D]=s.current,s.current=u}var X=V(null),te=V(null),ae=V(null),le=V(null);function ye(s,u){switch($(ae,u),$(te,s),$(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?vT(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=vT(u),s=gT(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}W(X),$(X,s)}function oe(){W(X),W(te),W(ae)}function ue(s){s.memoizedState!==null&&$(le,s);var u=X.current,m=gT(u,s.type);u!==m&&($(te,s),$(X,m))}function ke(s){te.current===s&&(W(X),W(te)),le.current===s&&(W(le),Td._currentValue=F)}var ie,Re;function pe(s){if(ie===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ie=u&&u[1]||"",Re=-1)":-1x||J[g]!==ce[x]){var Se=` +`+J[g].replace(" at new "," at ");return s.displayName&&Se.includes("")&&(Se=Se.replace("",s.displayName)),Se}while(1<=g&&0<=x);break}}}finally{Ce=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?pe(m):""}function be(s,u){switch(s.tag){case 26:case 27:case 5:return pe(s.type);case 16:return pe("Lazy");case 13:return s.child!==u&&u!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return De(s.type,!1);case 11:return De(s.type.render,!1);case 1:return De(s.type,!0);case 31:return pe("Activity");default:return""}}function _e(s){try{var u="",m=null;do u+=be(s,m),m=s,s=s.return;while(s);return u}catch(g){return` +Error generating stack: `+g.message+` +`+g.stack}}var Me=Object.prototype.hasOwnProperty,Be=e.unstable_scheduleCallback,Ve=e.unstable_cancelCallback,He=e.unstable_shouldYield,We=e.unstable_requestPaint,Ye=e.unstable_now,rn=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,Xe=e.unstable_LowPriority,ne=e.unstable_IdlePriority,Le=e.log,en=e.unstable_setDisableYieldValue,hn=null,fn=null;function Ze(s){if(typeof Le=="function"&&en(s),fn&&typeof fn.setStrictMode=="function")try{fn.setStrictMode(hn,s)}catch{}}var Ke=Math.clz32?Math.clz32:ht,An=Math.log,on=Math.LN2;function ht(s){return s>>>=0,s===0?32:31-(An(s)/on|0)|0}var mt=256,zn=262144,yn=4194304;function kn(s){var u=s&42;if(u!==0)return u;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function tt(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var x=0,M=s.suspendedLanes,I=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~M,g!==0?x=kn(g):(I&=K,I!==0?x=kn(I):m||(m=K&~s,m!==0&&(x=kn(m))))):(K=g&~M,K!==0?x=kn(K):I!==0?x=kn(I):m||(m=g&~s,m!==0&&(x=kn(m)))),x===0?0:u!==0&&u!==x&&(u&M)===0&&(M=x&-x,m=u&-u,M>=m||M===32&&(m&4194048)!==0)?u:x}function At(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function $e(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Fe(){var s=yn;return yn<<=1,(yn&62914560)===0&&(yn=4194304),s}function jn(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function Jn(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function On(s,u,m,g,x,M){var I=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var K=s.entanglements,J=s.expirationTimes,ce=s.hiddenUpdates;for(m=I&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Ba=/[\n"\\]/g;function Xi(s){return s.replace(Ba,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function st(s,u,m,g,x,M,I,K){s.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?s.type=I:s.removeAttribute("type"),u!=null?I==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+Ue(u)):s.value!==""+Ue(u)&&(s.value=""+Ue(u)):I!=="submit"&&I!=="reset"||s.removeAttribute("value"),u!=null?ds(s,I,Ue(u)):m!=null?ds(s,I,Ue(m)):g!=null&&s.removeAttribute("value"),x==null&&M!=null&&(s.defaultChecked=!!M),x!=null&&(s.checked=x&&typeof x!="function"&&typeof x!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+Ue(K):s.removeAttribute("name")}function Zi(s,u,m,g,x,M,I,K){if(M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(s.type=M),u!=null||m!=null){if(!(M!=="submit"&&M!=="reset"||u!=null)){wt(s);return}m=m!=null?""+Ue(m):"",u=u!=null?""+Ue(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}g=g??x,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=K?s.checked:!!g,s.defaultChecked=!!g,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(s.name=I),wt(s)}function ds(s,u,m){u==="number"&&ar(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function Ci(s,u,m,g){if(s=s.options,u){u={};for(var x=0;x"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),B0=!1;if(vo)try{var Gc={};Object.defineProperty(Gc,"passive",{get:function(){B0=!0}}),window.addEventListener("test",Gc,Gc),window.removeEventListener("test",Gc,Gc)}catch{B0=!1}var hs=null,F0=null,ap=null;function gA(){if(ap)return ap;var s,u=F0,m=u.length,g,x="value"in hs?hs.value:hs.textContent,M=x.length;for(s=0;s=Xc),xA=" ",SA=!1;function CA(s,u){switch(s){case"keyup":return nG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function AA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Nu=!1;function iG(s,u){switch(s){case"compositionend":return AA(u);case"keypress":return u.which!==32?null:(SA=!0,xA);case"textInput":return s=u.data,s===xA&&SA?null:s;default:return null}}function rG(s,u){if(Nu)return s==="compositionend"||!W0&&CA(s,u)?(s=gA(),ap=F0=hs=null,Nu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=PA(m)}}function $A(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?$A(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function zA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=ar(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=ar(s.document)}return u}function K0(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var dG=vo&&"documentMode"in document&&11>=document.documentMode,$u=null,X0=null,ed=null,Z0=!1;function LA(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Z0||$u==null||$u!==ar(g)||(g=$u,"selectionStart"in g&&K0(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),ed&&Jc(ed,g)||(ed=g,g=Qp(X0,"onSelect"),0>=I,x-=I,Fa=1<<32-Ke(u)+x|m<Pn?(Yn=ln,ln=null):Yn=ln.sibling;var rt=de(se,ln,fe[Pn],Te);if(rt===null){ln===null&&(ln=Yn);break}s&&ln&&rt.alternate===null&&u(se,ln),re=M(rt,re,Pn),it===null?mn=rt:it.sibling=rt,it=rt,ln=Yn}if(Pn===fe.length)return m(se,ln),Xn&&yo(se,Pn),mn;if(ln===null){for(;PnPn?(Yn=ln,ln=null):Yn=ln.sibling;var Ns=de(se,ln,rt.value,Te);if(Ns===null){ln===null&&(ln=Yn);break}s&&ln&&Ns.alternate===null&&u(se,ln),re=M(Ns,re,Pn),it===null?mn=Ns:it.sibling=Ns,it=Ns,ln=Yn}if(rt.done)return m(se,ln),Xn&&yo(se,Pn),mn;if(ln===null){for(;!rt.done;Pn++,rt=fe.next())rt=je(se,rt.value,Te),rt!==null&&(re=M(rt,re,Pn),it===null?mn=rt:it.sibling=rt,it=rt);return Xn&&yo(se,Pn),mn}for(ln=g(ln);!rt.done;Pn++,rt=fe.next())rt=ve(ln,se,Pn,rt.value,Te),rt!==null&&(s&&rt.alternate!==null&&ln.delete(rt.key===null?Pn:rt.key),re=M(rt,re,Pn),it===null?mn=rt:it.sibling=rt,it=rt);return s&&ln.forEach(function(DY){return u(se,DY)}),Xn&&yo(se,Pn),mn}function gt(se,re,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===b&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var mn=fe.key;re!==null;){if(re.key===mn){if(mn=fe.type,mn===b){if(re.tag===7){m(se,re.sibling),Te=x(re,fe.props.children),Te.return=se,se=Te;break e}}else if(re.elementType===mn||typeof mn=="object"&&mn!==null&&mn.$$typeof===N&&El(mn)===re.type){m(se,re.sibling),Te=x(re,fe.props),od(Te,fe),Te.return=se,se=Te;break e}m(se,re);break}else u(se,re);re=re.sibling}fe.type===b?(Te=xl(fe.props.children,se.mode,Te,fe.key),Te.return=se,se=Te):(Te=pp(fe.type,fe.key,fe.props,null,se.mode,Te),od(Te,fe),Te.return=se,se=Te)}return I(se);case y:e:{for(mn=fe.key;re!==null;){if(re.key===mn)if(re.tag===4&&re.stateNode.containerInfo===fe.containerInfo&&re.stateNode.implementation===fe.implementation){m(se,re.sibling),Te=x(re,fe.children||[]),Te.return=se,se=Te;break e}else{m(se,re);break}else u(se,re);re=re.sibling}Te=rb(fe,se.mode,Te),Te.return=se,se=Te}return I(se);case N:return fe=El(fe),gt(se,re,fe,Te)}if(U(fe))return an(se,re,fe,Te);if(B(fe)){if(mn=B(fe),typeof mn!="function")throw Error(i(150));return fe=mn.call(fe),vn(se,re,fe,Te)}if(typeof fe.then=="function")return gt(se,re,_p(fe),Te);if(fe.$$typeof===C)return gt(se,re,yp(se,fe),Te);xp(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,re!==null&&re.tag===6?(m(se,re.sibling),Te=x(re,fe),Te.return=se,se=Te):(m(se,re),Te=ib(fe,se.mode,Te),Te.return=se,se=Te),I(se)):m(se,re)}return function(se,re,fe,Te){try{ad=0;var mn=gt(se,re,fe,Te);return Gu=null,mn}catch(ln){if(ln===Wu||ln===wp)throw ln;var it=Cr(29,ln,null,se.mode);return it.lanes=Te,it.return=se,it}finally{}}}var Ml=sO(!0),lO=sO(!1),ys=!1;function vb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gb(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function bs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function ws(s,u,m){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(lt&2)!==0){var x=g.pending;return x===null?u.next=u:(u.next=x.next,x.next=u),g.pending=u,u=mp(s),VA(s,null,m),u}return hp(s,g,u,m),mp(s)}function sd(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,Je(s,m)}}function yb(s,u){var m=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var x=null,M=null;if(m=m.firstBaseUpdate,m!==null){do{var I={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};M===null?x=M=I:M=M.next=I,m=m.next}while(m!==null);M===null?x=M=u:M=M.next=u}else x=M=u;m={baseState:g.baseState,firstBaseUpdate:x,lastBaseUpdate:M,shared:g.shared,callbacks:g.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var bb=!1;function ld(){if(bb){var s=Vu;if(s!==null)throw s}}function ud(s,u,m,g){bb=!1;var x=s.updateQueue;ys=!1;var M=x.firstBaseUpdate,I=x.lastBaseUpdate,K=x.shared.pending;if(K!==null){x.shared.pending=null;var J=K,ce=J.next;J.next=null,I===null?M=ce:I.next=ce,I=J;var Se=s.alternate;Se!==null&&(Se=Se.updateQueue,K=Se.lastBaseUpdate,K!==I&&(K===null?Se.firstBaseUpdate=ce:K.next=ce,Se.lastBaseUpdate=J))}if(M!==null){var je=x.baseState;I=0,Se=ce=J=null,K=M;do{var de=K.lane&-536870913,ve=de!==K.lane;if(ve?(Gn&de)===de:(g&de)===de){de!==0&&de===Uu&&(bb=!0),Se!==null&&(Se=Se.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var an=s,vn=K;de=u;var gt=m;switch(vn.tag){case 1:if(an=vn.payload,typeof an=="function"){je=an.call(gt,je,de);break e}je=an;break e;case 3:an.flags=an.flags&-65537|128;case 0:if(an=vn.payload,de=typeof an=="function"?an.call(gt,je,de):an,de==null)break e;je=d({},je,de);break e;case 2:ys=!0}}de=K.callback,de!==null&&(s.flags|=64,ve&&(s.flags|=8192),ve=x.callbacks,ve===null?x.callbacks=[de]:ve.push(de))}else ve={lane:de,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Se===null?(ce=Se=ve,J=je):Se=Se.next=ve,I|=de;if(K=K.next,K===null){if(K=x.shared.pending,K===null)break;ve=K,K=ve.next,ve.next=null,x.lastBaseUpdate=ve,x.shared.pending=null}}while(!0);Se===null&&(J=je),x.baseState=J,x.firstBaseUpdate=ce,x.lastBaseUpdate=Se,M===null&&(x.shared.lanes=0),Cs|=I,s.lanes=I,s.memoizedState=je}}function uO(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function fO(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sM?M:8;var I=P.T,K={};P.T=K,Lb(s,!1,u,m);try{var J=x(),ce=P.S;if(ce!==null&&ce(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Se=kG(J,g);dd(s,u,Se,Mr(s))}else dd(s,u,g,Mr(s))}catch(je){dd(s,u,{then:function(){},status:"rejected",reason:je},Mr())}finally{z.p=M,I!==null&&K.types!==null&&(I.types=K.types),P.T=I}}function OG(){}function $b(s,u,m,g){if(s.tag!==5)throw Error(i(476));var x=qO(s).queue;FO(s,x,u,F,m===null?OG:function(){return HO(s),m(g)})}function qO(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:F},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function HO(s){var u=qO(s);u.next===null&&(u=s.alternate.memoizedState),dd(s,u.next.queue,{},Mr())}function zb(){return Ei(Td)}function UO(){return Jt().memoizedState}function VO(){return Jt().memoizedState}function EG(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=Mr();s=bs(m);var g=ws(u,s,m);g!==null&&(cr(g,u,m),sd(g,u,m)),u={cache:db()},s.payload=u;return}u=u.return}}function TG(s,u,m){var g=Mr();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Rp(s)?GO(u,m):(m=nb(s,u,m,g),m!==null&&(cr(m,s,g),YO(m,u,g)))}function WO(s,u,m){var g=Mr();dd(s,u,m,g)}function dd(s,u,m,g){var x={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(Rp(s))GO(u,x);else{var M=s.alternate;if(s.lanes===0&&(M===null||M.lanes===0)&&(M=u.lastRenderedReducer,M!==null))try{var I=u.lastRenderedState,K=M(I,m);if(x.hasEagerState=!0,x.eagerState=K,Sr(K,I))return hp(s,u,x,0),kt===null&&dp(),!1}catch{}finally{}if(m=nb(s,u,x,g),m!==null)return cr(m,s,g),YO(m,u,g),!0}return!1}function Lb(s,u,m,g){if(g={lane:2,revertLane:vw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Rp(s)){if(u)throw Error(i(479))}else u=nb(s,m,g,2),u!==null&&cr(u,s,2)}function Rp(s){var u=s.alternate;return s===Dn||u!==null&&u===Dn}function GO(s,u){Ku=Ap=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function YO(s,u,m){if((m&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,Je(s,m)}}var hd={readContext:Ei,use:Tp,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};hd.useEffectEvent=Gt;var KO={readContext:Ei,use:Tp,useCallback:function(s,u){return Ji().memoizedState=[s,u===void 0?null:u],s},useContext:Ei,useEffect:DO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,jp(4194308,4,$O.bind(null,u,s),m)},useLayoutEffect:function(s,u){return jp(4194308,4,s,u)},useInsertionEffect:function(s,u){jp(4,2,s,u)},useMemo:function(s,u){var m=Ji();u=u===void 0?null:u;var g=s();if(jl){Ze(!0);try{s()}finally{Ze(!1)}}return m.memoizedState=[g,u],g},useReducer:function(s,u,m){var g=Ji();if(m!==void 0){var x=m(u);if(jl){Ze(!0);try{m(u)}finally{Ze(!1)}}}else x=u;return g.memoizedState=g.baseState=x,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:x},g.queue=s,s=s.dispatch=TG.bind(null,Dn,s),[g.memoizedState,s]},useRef:function(s){var u=Ji();return s={current:s},u.memoizedState=s},useState:function(s){s=jb(s);var u=s.queue,m=WO.bind(null,Dn,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:Pb,useDeferredValue:function(s,u){var m=Ji();return Nb(m,s,u)},useTransition:function(){var s=jb(!1);return s=FO.bind(null,Dn,s.queue,!0,!1),Ji().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=Dn,x=Ji();if(Xn){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),kt===null)throw Error(i(349));(Gn&127)!==0||vO(g,u,m)}x.memoizedState=m;var M={value:m,getSnapshot:u};return x.queue=M,DO(yO.bind(null,g,M,s),[s]),g.flags|=2048,Zu(9,{destroy:void 0},gO.bind(null,g,M,m,u),null),m},useId:function(){var s=Ji(),u=kt.identifierPrefix;if(Xn){var m=qa,g=Fa;m=(g&~(1<<32-Ke(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Op++,0<\/script>",M=M.removeChild(M.firstChild);break;case"select":M=typeof g.is=="string"?I.createElement("select",{is:g.is}):I.createElement("select"),g.multiple?M.multiple=!0:g.size&&(M.size=g.size);break;default:M=typeof g.is=="string"?I.createElement(x,{is:g.is}):I.createElement(x)}}M[Wn]=u,M[Lt]=g;e:for(I=u.child;I!==null;){if(I.tag===5||I.tag===6)M.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===u)break e;for(;I.sibling===null;){if(I.return===null||I.return===u)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}u.stateNode=M;e:switch(Mi(M,x,g),x){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&So(u)}}return Dt(u),Qb(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&So(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(i(166));if(s=ae.current,qu(u)){if(s=u.stateNode,m=u.memoizedProps,g=null,x=Oi,x!==null)switch(x.tag){case 27:case 5:g=x.memoizedProps}s[Wn]=u,s=!!(s.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||mT(s.nodeValue,m)),s||vs(u,!0)}else s=Jp(s).createTextNode(g),s[Wn]=u,u.stateNode=s}return Dt(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(g=qu(u),m!==null){if(s===null){if(!g)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Wn]=u}else Sl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Dt(u),s=!1}else m=lb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?(Or(u),u):(Or(u),null);if((u.flags&128)!==0)throw Error(i(558))}return Dt(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(x=qu(u),g!==null&&g.dehydrated!==null){if(s===null){if(!x)throw Error(i(318));if(x=u.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[Wn]=u}else Sl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Dt(u),x=!1}else x=lb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=x),x=!0;if(!x)return u.flags&256?(Or(u),u):(Or(u),null)}return Or(u),(u.flags&128)!==0?(u.lanes=m,u):(m=g!==null,s=s!==null&&s.memoizedState!==null,m&&(g=u.child,x=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(x=g.alternate.memoizedState.cachePool.pool),M=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(M=g.memoizedState.cachePool.pool),M!==x&&(g.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),Lp(u,u.updateQueue),Dt(u),null);case 4:return oe(),s===null&&ww(u.stateNode.containerInfo),Dt(u),null;case 10:return wo(u.type),Dt(u),null;case 19:if(W(Qt),g=u.memoizedState,g===null)return Dt(u),null;if(x=(u.flags&128)!==0,M=g.rendering,M===null)if(x)pd(g,!1);else{if(Yt!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(M=Cp(s),M!==null){for(u.flags|=128,pd(g,!1),s=M.updateQueue,u.updateQueue=s,Lp(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)WA(m,s),m=m.sibling;return $(Qt,Qt.current&1|2),Xn&&yo(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Ye()>Hp&&(u.flags|=128,x=!0,pd(g,!1),u.lanes=4194304)}else{if(!x)if(s=Cp(M),s!==null){if(u.flags|=128,x=!0,s=s.updateQueue,u.updateQueue=s,Lp(u,s),pd(g,!0),g.tail===null&&g.tailMode==="hidden"&&!M.alternate&&!Xn)return Dt(u),null}else 2*Ye()-g.renderingStartTime>Hp&&m!==536870912&&(u.flags|=128,x=!0,pd(g,!1),u.lanes=4194304);g.isBackwards?(M.sibling=u.child,u.child=M):(s=g.last,s!==null?s.sibling=M:u.child=M,g.last=M)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Ye(),s.sibling=null,m=Qt.current,$(Qt,x?m&1|2:m&1),Xn&&yo(u,g.treeForkCount),s):(Dt(u),null);case 22:case 23:return Or(u),kb(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(m&536870912)!==0&&(u.flags&128)===0&&(Dt(u),u.subtreeFlags&6&&(u.flags|=8192)):Dt(u),m=u.updateQueue,m!==null&&Lp(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048),s!==null&&W(Ol),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),wo(ii),Dt(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function PG(s,u){switch(ob(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return wo(ii),oe(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return ke(u),null;case 31:if(u.memoizedState!==null){if(Or(u),u.alternate===null)throw Error(i(340));Sl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Or(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Sl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return W(Qt),null;case 4:return oe(),null;case 10:return wo(u.type),null;case 22:case 23:return Or(u),kb(),s!==null&&W(Ol),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return wo(ii),null;case 25:return null;default:return null}}function bE(s,u){switch(ob(u),u.tag){case 3:wo(ii),oe();break;case 26:case 27:case 5:ke(u);break;case 4:oe();break;case 31:u.memoizedState!==null&&Or(u);break;case 13:Or(u);break;case 19:W(Qt);break;case 10:wo(u.type);break;case 22:case 23:Or(u),kb(),s!==null&&W(Ol);break;case 24:wo(ii)}}function vd(s,u){try{var m=u.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var x=g.next;m=x;do{if((m.tag&s)===s){g=void 0;var M=m.create,I=m.inst;g=M(),I.destroy=g}m=m.next}while(m!==x)}}catch(K){dt(u,u.return,K)}}function xs(s,u,m){try{var g=u.updateQueue,x=g!==null?g.lastEffect:null;if(x!==null){var M=x.next;g=M;do{if((g.tag&s)===s){var I=g.inst,K=I.destroy;if(K!==void 0){I.destroy=void 0,x=u;var J=m,ce=K;try{ce()}catch(Se){dt(x,J,Se)}}}g=g.next}while(g!==M)}}catch(Se){dt(u,u.return,Se)}}function wE(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{fO(u,m)}catch(g){dt(s,s.return,g)}}}function kE(s,u,m){m.props=Dl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){dt(s,u,g)}}function gd(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof m=="function"?s.refCleanup=m(g):m.current=g}}catch(x){dt(s,u,x)}}function Ha(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(x){dt(s,u,x)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(x){dt(s,u,x)}else m.current=null}function _E(s){var u=s.type,m=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(x){dt(s,s.return,x)}}function Jb(s,u,m){try{var g=s.stateNode;tY(g,s.type,m,u),g[Lt]=u}catch(x){dt(s,s.return,x)}}function xE(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ms(s.type)||s.tag===4}function ew(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||xE(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ms(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function nw(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=ba));else if(g!==4&&(g===27&&Ms(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(nw(s,u,m),s=s.sibling;s!==null;)nw(s,u,m),s=s.sibling}function Ip(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(g!==4&&(g===27&&Ms(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(Ip(s,u,m),s=s.sibling;s!==null;)Ip(s,u,m),s=s.sibling}function SE(s){var u=s.stateNode,m=s.memoizedProps;try{for(var g=s.type,x=u.attributes;x.length;)u.removeAttributeNode(x[0]);Mi(u,g,m),u[Wn]=s,u[Lt]=m}catch(M){dt(s,s.return,M)}}var Co=!1,oi=!1,tw=!1,CE=typeof WeakSet=="function"?WeakSet:Set,bi=null;function NG(s,u){if(s=s.containerInfo,xw=ov,s=zA(s),K0(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var x=g.anchorOffset,M=g.focusNode;g=g.focusOffset;try{m.nodeType,M.nodeType}catch{m=null;break e}var I=0,K=-1,J=-1,ce=0,Se=0,je=s,de=null;n:for(;;){for(var ve;je!==m||x!==0&&je.nodeType!==3||(K=I+x),je!==M||g!==0&&je.nodeType!==3||(J=I+g),je.nodeType===3&&(I+=je.nodeValue.length),(ve=je.firstChild)!==null;)de=je,je=ve;for(;;){if(je===s)break n;if(de===m&&++ce===x&&(K=I),de===M&&++Se===g&&(J=I),(ve=je.nextSibling)!==null)break;je=de,de=je.parentNode}je=ve}m=K===-1||J===-1?null:{start:K,end:J}}else m=null}m=m||{start:0,end:0}}else m=null;for(Sw={focusedElem:s,selectionRange:m},ov=!1,bi=u;bi!==null;)if(u=bi,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,bi=s;else for(;bi!==null;){switch(u=bi,M=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),Mi(M,g,m),M[Wn]=s,sn(M),g=M;break e;case"link":var I=jT("link","href",x).get(g+(m.href||""));if(I){for(var K=0;Kgt&&(I=gt,gt=vn,vn=I);var se=NA(K,vn),re=NA(K,gt);if(se&&re&&(ve.rangeCount!==1||ve.anchorNode!==se.node||ve.anchorOffset!==se.offset||ve.focusNode!==re.node||ve.focusOffset!==re.offset)){var fe=je.createRange();fe.setStart(se.node,se.offset),ve.removeAllRanges(),vn>gt?(ve.addRange(fe),ve.extend(re.node,re.offset)):(fe.setEnd(re.node,re.offset),ve.addRange(fe))}}}}for(je=[],ve=K;ve=ve.parentNode;)ve.nodeType===1&&je.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,P.T=null,m=uw,uw=null;var M=Os,I=Mo;if(hi=0,tf=Os=null,Mo=0,(lt&6)!==0)throw Error(i(331));var K=lt;if(lt|=4,$E(M.current),RE(M,M.current,I,m),lt=K,xd(0,!1),fn&&typeof fn.onPostCommitFiberRoot=="function")try{fn.onPostCommitFiberRoot(hn,M)}catch{}return!0}finally{z.p=x,P.T=g,eT(s,u)}}function tT(s,u,m){u=Vr(m,u),u=qb(s.stateNode,u,2),s=ws(s,u,2),s!==null&&(Jn(s,2),Ua(s))}function dt(s,u,m){if(s.tag===3)tT(s,s,m);else for(;u!==null;){if(u.tag===3){tT(u,s,m);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(As===null||!As.has(g))){s=Vr(m,s),m=iE(2),g=ws(u,m,2),g!==null&&(rE(m,g,u,s),Jn(g,2),Ua(g));break}}u=u.return}}function hw(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new LG;var x=new Set;g.set(u,x)}else x=g.get(u),x===void 0&&(x=new Set,g.set(u,x));x.has(m)||(aw=!0,x.add(m),s=HG.bind(null,s,u,m),u.then(s,s))}function HG(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,kt===s&&(Gn&m)===m&&(Yt===4||Yt===3&&(Gn&62914560)===Gn&&300>Ye()-qp?(lt&2)===0&&rf(s,0):ow|=m,nf===Gn&&(nf=0)),Ua(s)}function iT(s,u){u===0&&(u=Fe()),s=_l(s,u),s!==null&&(Jn(s,u),Ua(s))}function UG(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),iT(s,m)}function VG(s,u){var m=0;switch(s.tag){case 31:case 13:var g=s.stateNode,x=s.memoizedState;x!==null&&(m=x.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(i(314))}g!==null&&g.delete(u),iT(s,m)}function WG(s,u){return Be(s,u)}var Kp=null,of=null,mw=!1,Xp=!1,pw=!1,Ts=0;function Ua(s){s!==of&&s.next===null&&(of===null?Kp=of=s:of=of.next=s),Xp=!0,mw||(mw=!0,YG())}function xd(s,u){if(!pw&&Xp){pw=!0;do for(var m=!1,g=Kp;g!==null;){if(s!==0){var x=g.pendingLanes;if(x===0)var M=0;else{var I=g.suspendedLanes,K=g.pingedLanes;M=(1<<31-Ke(42|s)+1)-1,M&=x&~(I&~K),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(m=!0,sT(g,M))}else M=Gn,M=tt(g,g===kt?M:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(M&3)===0||At(g,M)||(m=!0,sT(g,M));g=g.next}while(m);pw=!1}}function GG(){rT()}function rT(){Xp=mw=!1;var s=0;Ts!==0&&rY()&&(s=Ts);for(var u=Ye(),m=null,g=Kp;g!==null;){var x=g.next,M=aT(g,u);M===0?(g.next=null,m===null?Kp=x:m.next=x,x===null&&(of=m)):(m=g,(s!==0||(M&3)!==0)&&(Xp=!0)),g=x}hi!==0&&hi!==5||xd(s),Ts!==0&&(Ts=0)}function aT(s,u){for(var m=s.suspendedLanes,g=s.pingedLanes,x=s.expirationTimes,M=s.pendingLanes&-62914561;0K)break;var Se=J.transferSize,je=J.initiatorType;Se&&pT(je)&&(J=J.responseEnd,I+=Se*(J"u"?null:document;function OT(s,u,m){var g=sf;if(g&&typeof u=="string"&&u){var x=Xi(u);x='link[rel="'+s+'"][href="'+x+'"]',typeof m=="string"&&(x+='[crossorigin="'+m+'"]'),AT.has(x)||(AT.add(x),s={rel:s,crossOrigin:m,href:u},g.querySelector(x)===null&&(u=g.createElement("link"),Mi(u,"link",s),sn(u),g.head.appendChild(u)))}}function hY(s){jo.D(s),OT("dns-prefetch",s,null)}function mY(s,u){jo.C(s,u),OT("preconnect",s,u)}function pY(s,u,m){jo.L(s,u,m);var g=sf;if(g&&s&&u){var x='link[rel="preload"][as="'+Xi(u)+'"]';u==="image"&&m&&m.imageSrcSet?(x+='[imagesrcset="'+Xi(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(x+='[imagesizes="'+Xi(m.imageSizes)+'"]')):x+='[href="'+Xi(s)+'"]';var M=x;switch(u){case"style":M=lf(s);break;case"script":M=uf(s)}Zr.has(M)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),Zr.set(M,s),g.querySelector(x)!==null||u==="style"&&g.querySelector(Od(M))||u==="script"&&g.querySelector(Ed(M))||(u=g.createElement("link"),Mi(u,"link",s),sn(u),g.head.appendChild(u)))}}function vY(s,u){jo.m(s,u);var m=sf;if(m&&s){var g=u&&typeof u.as=="string"?u.as:"script",x='link[rel="modulepreload"][as="'+Xi(g)+'"][href="'+Xi(s)+'"]',M=x;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":M=uf(s)}if(!Zr.has(M)&&(s=d({rel:"modulepreload",href:s},u),Zr.set(M,s),m.querySelector(x)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Ed(M)))return}g=m.createElement("link"),Mi(g,"link",s),sn(g),m.head.appendChild(g)}}}function gY(s,u,m){jo.S(s,u,m);var g=sf;if(g&&s){var x=ti(g).hoistableStyles,M=lf(s);u=u||"default";var I=x.get(M);if(!I){var K={loading:0,preload:null};if(I=g.querySelector(Od(M)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=Zr.get(M))&&jw(s,m);var J=I=g.createElement("link");sn(J),Mi(J,"link",s),J._p=new Promise(function(ce,Se){J.onload=ce,J.onerror=Se}),J.addEventListener("load",function(){K.loading|=1}),J.addEventListener("error",function(){K.loading|=2}),K.loading|=4,nv(I,u,g)}I={type:"stylesheet",instance:I,count:1,state:K},x.set(M,I)}}}function yY(s,u){jo.X(s,u);var m=sf;if(m&&s){var g=ti(m).hoistableScripts,x=uf(s),M=g.get(x);M||(M=m.querySelector(Ed(x)),M||(s=d({src:s,async:!0},u),(u=Zr.get(x))&&Dw(s,u),M=m.createElement("script"),sn(M),Mi(M,"link",s),m.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},g.set(x,M))}}function bY(s,u){jo.M(s,u);var m=sf;if(m&&s){var g=ti(m).hoistableScripts,x=uf(s),M=g.get(x);M||(M=m.querySelector(Ed(x)),M||(s=d({src:s,async:!0,type:"module"},u),(u=Zr.get(x))&&Dw(s,u),M=m.createElement("script"),sn(M),Mi(M,"link",s),m.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},g.set(x,M))}}function ET(s,u,m,g){var x=(x=ae.current)?ev(x):null;if(!x)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=lf(m.href),m=ti(x).hoistableStyles,g=m.get(u),g||(g={type:"style",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=lf(m.href);var M=ti(x).hoistableStyles,I=M.get(s);if(I||(x=x.ownerDocument||x,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},M.set(s,I),(M=x.querySelector(Od(s)))&&!M._p&&(I.instance=M,I.state.loading=5),Zr.has(s)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},Zr.set(s,m),M||wY(x,s,m,I.state))),u&&g===null)throw Error(i(528,""));return I}if(u&&g!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=uf(m),m=ti(x).hoistableScripts,g=m.get(u),g||(g={type:"script",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function lf(s){return'href="'+Xi(s)+'"'}function Od(s){return'link[rel="stylesheet"]['+s+"]"}function TT(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function wY(s,u,m,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),Mi(u,"link",m),sn(u),s.head.appendChild(u))}function uf(s){return'[src="'+Xi(s)+'"]'}function Ed(s){return"script[async]"+s}function MT(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+Xi(m.href)+'"]');if(g)return u.instance=g,sn(g),g;var x=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),sn(g),Mi(g,"style",x),nv(g,m.precedence,s),u.instance=g;case"stylesheet":x=lf(m.href);var M=s.querySelector(Od(x));if(M)return u.state.loading|=4,u.instance=M,sn(M),M;g=TT(m),(x=Zr.get(x))&&jw(g,x),M=(s.ownerDocument||s).createElement("link"),sn(M);var I=M;return I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),Mi(M,"link",g),u.state.loading|=4,nv(M,m.precedence,s),u.instance=M;case"script":return M=uf(m.src),(x=s.querySelector(Ed(M)))?(u.instance=x,sn(x),x):(g=m,(x=Zr.get(M))&&(g=d({},m),Dw(g,x)),s=s.ownerDocument||s,x=s.createElement("script"),sn(x),Mi(x,"link",g),s.head.appendChild(x),u.instance=x);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,nv(g,m.precedence,s));return u.instance}function nv(s,u,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=g.length?g[g.length-1]:null,M=x,I=0;I title"):null)}function kY(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function RT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function _Y(s,u,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var x=lf(g.href),M=u.querySelector(Od(x));if(M){u=M._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=iv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=M,sn(M);return}M=u.ownerDocument||u,g=TT(g),(x=Zr.get(x))&&jw(g,x),M=M.createElement("link"),sn(M);var I=M;I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),Mi(M,"link",g),m.instance=M}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=iv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Rw=0;function xY(s,u){return s.stylesheets&&s.count===0&&av(s,s.stylesheets),0Rw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(x)}}:null}function iv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)av(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var rv=null;function av(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,rv=new Map,u.forEach(SY,s),rv=null,iv.call(s))}function SY(s,u){if(!(u.state.loading&4)){var m=rv.get(s);if(m)var g=m.get(null);else{m=new Map,rv.set(s,m);for(var x=s.querySelectorAll("link[data-precedence],style[data-precedence]"),M=0;M"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),yk.exports=Ute(),yk.exports}var Wte=Vte();class _B extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function Gte(e,n,t){const i=await fetch(`${t}${e}`,{credentials:"include",...n,headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)??{}}});if(!i.ok){const r=await i.json().catch(()=>({Message:i.statusText}));throw new _B(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const Yte="/api";function Vt(e,n){return Gte(e,n,Yte)}function Kte(){return Vt("/board")}function Xte(e){return Vt("/columns",{method:"POST",body:JSON.stringify({name:e})})}function pf(e,n){return Vt(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Zte(e){return Vt(`/columns/${e}`,{method:"DELETE"})}function Qte(e){return Vt("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function Jte(e){return Vt("/cards",{method:"POST",body:JSON.stringify(e)})}function vf(e,n){return Vt(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function eie(e){return Vt(`/cards/${e}`,{method:"DELETE"})}function kk(e,n){return Vt(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function nie(){return Vt("/trash")}function tie(e){return Vt(`/cards/${e}/restore`,{method:"POST"})}function iie(e){return Vt(`/cards/${e}/purge`,{method:"DELETE"})}function rie(e,n,t){return Vt(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function aie(e){return Vt(`/cards/${e}/history`)}function oie(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function sie(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(oie());let o=!1;const l=f=>{if(!o){o=!0;try{a.close()}catch{}f?r(f):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=f=>{try{const c=JSON.parse(typeof f.data=="string"?f.data:"");n(c),(c.type==="done"||c.type==="error")&&l(c.type==="error"?new Error(c.error):void 0)}catch(c){l(c)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function bM(e,n){return Vt("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function lie(e,n,t){return Vt("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function uie(){return Vt("/auth/logout",{method:"POST"})}function fie(){return Vt("/me")}function wM(e){return Vt("/me",{method:"PATCH",body:JSON.stringify(e)})}function xB(){return Vt("/users")}function SB(){return Vt("/tags")}function cie(){return Vt("/requesters")}function CB(e){const n=new URLSearchParams;e.from&&n.set("from",e.from),e.to&&n.set("to",e.to),e.assignee_id&&n.set("assignee_id",e.assignee_id),e.requester&&n.set("requester",e.requester),e.tags&&e.tags.length>0&&n.set("tags",e.tags.join(","));const t=n.toString();return Vt(`/metrics${t?`?${t}`:""}`)}const AB=O.createContext(null);function die({children:e}){const[n,t]=O.useState(null),[i,r]=O.useState(!0);O.useEffect(()=>{fie().then(t).catch(f=>{(!(f instanceof _B)||f.status!==401)&&console.warn("getMe failed",f)}).finally(()=>r(!1))},[]);const a=O.useCallback(async(f,c)=>{const h=await bM(f,c);t(h)},[]),o=O.useCallback(async(f,c,h)=>{await lie(f,c,h);const d=await bM(f,c);t(d)},[]),l=O.useCallback(async()=>{await uie(),t(null)},[]);return k.jsx(AB.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function AC(){const e=O.useContext(AB);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function hie(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const My=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ec(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function OC(e){return"nodeType"in e}function rr(e){var n,t;return e?Ec(e)?e:OC(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function EC(e){const{Document:n}=rr(e);return e instanceof n}function Lm(e){return Ec(e)?!1:e instanceof rr(e).HTMLElement}function OB(e){return e instanceof rr(e).SVGElement}function Tc(e){return e?Ec(e)?e.document:OC(e)?EC(e)?e:Lm(e)||OB(e)?e.ownerDocument:document:document:document}const Pa=My?O.useLayoutEffect:O.useEffect;function jy(e){const n=O.useRef(e);return Pa(()=>{n.current=e}),O.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=O.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function Rh(e,n){n===void 0&&(n=[e]);const t=O.useRef(e);return Pa(()=>{t.current!==e&&(t.current=e)},n),t}function Im(e,n){const t=O.useRef();return O.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function bg(e){const n=jy(e),t=O.useRef(null),i=O.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function wg(e){const n=O.useRef();return O.useEffect(()=>{n.current=e},[e]),n.current}let _k={};function Bm(e,n){return O.useMemo(()=>{if(n)return n;const t=_k[e]==null?0:_k[e]+1;return _k[e]=t,e+"-"+t},[e,n])}function EB(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[f,c]of l){const h=a[f];h!=null&&(a[f]=h+e*c)}return a},{...n})}}const Df=EB(1),Ph=EB(-1);function pie(e){return"clientX"in e&&"clientY"in e}function Dy(e){if(!e)return!1;const{KeyboardEvent:n}=rr(e.target);return n&&e instanceof n}function vie(e){if(!e)return!1;const{TouchEvent:n}=rr(e.target);return n&&e instanceof n}function kg(e){if(vie(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return pie(e)?{x:e.clientX,y:e.clientY}:null}const io=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[io.Translate.toString(e),io.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),kM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function gie(e){return e.matches(kM)?e:e.querySelector(kM)}const yie={display:"none"};function bie(e){let{id:n,value:t}=e;return Z.createElement("div",{id:n,style:yie},t)}function wie(e){let{id:n,announcement:t,ariaLiveType:i="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Z.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function kie(){const[e,n]=O.useState("");return{announce:O.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const TB=O.createContext(null);function _ie(e){const n=O.useContext(TB);O.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function xie(){const[e]=O.useState(()=>new Set),n=O.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[O.useCallback(i=>{let{type:r,event:a}=i;e.forEach(o=>{var l;return(l=o[r])==null?void 0:l.call(o,a)})},[e]),n]}const Sie={draggable:` + To pick up a draggable item, press the space bar. + While dragging, use the arrow keys to move the item. + Press space again to drop the item in its new position, or press escape to cancel. + `},Cie={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function Aie(e){let{announcements:n=Cie,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=Sie}=e;const{announce:a,announcement:o}=kie(),l=Bm("DndLiveRegion"),[f,c]=O.useState(!1);if(O.useEffect(()=>{c(!0)},[]),_ie(O.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!f)return null;const h=Z.createElement(Z.Fragment,null,Z.createElement(bie,{id:i,value:r.draggable}),Z.createElement(wie,{id:l,announcement:o}));return t?Vs.createPortal(h,t):h}var vi;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(vi||(vi={}));function _g(){}function _M(e,n){return O.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function Oie(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Na=Object.freeze({x:0,y:0});function TC(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Eie(e,n){const t=kg(e);if(!t)return"0 0";const i={x:(t.x-n.left)/n.width*100,y:(t.y-n.top)/n.height*100};return i.x+"% "+i.y+"%"}function MC(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function Tie(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function vS(e){let{left:n,top:t,height:i,width:r}=e;return[{x:n,y:t},{x:n+r,y:t},{x:n,y:t+i},{x:n+r,y:t+i}]}function MB(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function xM(e,n,t){return n===void 0&&(n=e.left),t===void 0&&(t=e.top),{x:n+e.width*.5,y:t+e.height*.5}}const Mie=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=xM(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=TC(xM(f),r);a.push({id:l,data:{droppableContainer:o,value:c}})}}return a.sort(MC)},jB=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=vS(n),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=vS(f),h=r.reduce((p,v,y)=>p+TC(c[y],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(MC)};function jie(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const f=jie(l,n);f>0&&r.push({id:o,data:{droppableContainer:a,value:f}})}}return r.sort(Tie)};function Die(e,n){const{top:t,left:i,bottom:r,right:a}=n;return t<=e.y&&e.y<=r&&i<=e.x&&e.x<=a}const Rie=e=>{let{droppableContainers:n,droppableRects:t,pointerCoordinates:i}=e;if(!i)return[];const r=[];for(const a of n){const{id:o}=a,l=t.get(o);if(l&&Die(i,l)){const c=vS(l).reduce((d,p)=>d+TC(i,p),0),h=Number((c/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(MC)};function Pie(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function RB(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Na}function Nie(e){return function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...t})}}const $ie=Nie(1);function PB(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function zie(e,n,t){const i=PB(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,f=e.left-o-(1-r)*parseFloat(t),c=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:c,right:f+h,bottom:c+d,left:f}}const Lie={ignoreTransform:!1};function Mc(e,n){n===void 0&&(n=Lie);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:c,transformOrigin:h}=rr(e).getComputedStyle(e);c&&(t=zie(t,c,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:f}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:f}}function SM(e){return Mc(e,{ignoreTransform:!0})}function Iie(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Bie(e,n){return n===void 0&&(n=rr(e).getComputedStyle(e)),n.position==="fixed"}function Fie(e,n){n===void 0&&(n=rr(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const a=n[r];return typeof a=="string"?t.test(a):!1})}function Ry(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(EC(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!Lm(r)||OB(r)||t.includes(r))return t;const a=rr(e).getComputedStyle(r);return r!==e&&Fie(r,a)&&t.push(r),Bie(r,a)?t:i(r.parentNode)}return e?i(e):t}function NB(e){const[n]=Ry(e,1);return n??null}function xk(e){return!My||!e?null:Ec(e)?e:OC(e)?EC(e)||e===Tc(e).scrollingElement?window:Lm(e)?e:null:null}function $B(e){return Ec(e)?e.scrollX:e.scrollLeft}function zB(e){return Ec(e)?e.scrollY:e.scrollTop}function gS(e){return{x:$B(e),y:zB(e)}}var _i;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(_i||(_i={}));function LB(e){return!My||!e?!1:e===document.scrollingElement}function IB(e){const n={x:0,y:0},t=LB(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height},r=e.scrollTop<=n.y,a=e.scrollLeft<=n.x,o=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:r,isLeft:a,isBottom:o,isRight:l,maxScroll:i,minScroll:n}}const qie={x:.2,y:.2};function Hie(e,n,t,i,r){let{top:a,left:o,right:l,bottom:f}=t;i===void 0&&(i=10),r===void 0&&(r=qie);const{isTop:c,isBottom:h,isLeft:d,isRight:p}=IB(e),v={x:0,y:0},y={x:0,y:0},b={height:n.height*r.y,width:n.width*r.x};return!c&&a<=n.top+b.height?(v.y=_i.Backward,y.y=i*Math.abs((n.top+b.height-a)/b.height)):!h&&f>=n.bottom-b.height&&(v.y=_i.Forward,y.y=i*Math.abs((n.bottom-b.height-f)/b.height)),!p&&l>=n.right-b.width?(v.x=_i.Forward,y.x=i*Math.abs((n.right-b.width-l)/b.width)):!d&&o<=n.left+b.width&&(v.x=_i.Backward,y.x=i*Math.abs((n.left+b.width-o)/b.width)),{direction:v,speed:y}}function Uie(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:n,left:t,right:i,bottom:r}=e.getBoundingClientRect();return{top:n,left:t,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function BB(e){return e.reduce((n,t)=>Df(n,gS(t)),Na)}function Vie(e){return e.reduce((n,t)=>n+$B(t),0)}function Wie(e){return e.reduce((n,t)=>n+zB(t),0)}function FB(e,n){if(n===void 0&&(n=Mc),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);NB(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Gie=[["x",["left","right"],Vie],["y",["top","bottom"],Wie]];class jC{constructor(n,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Ry(t),r=BB(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of Gie)for(const f of o)Object.defineProperty(this,f,{get:()=>{const c=l(i),h=r[a]-c;return this.rect[f]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dh{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=n}add(n,t,i){var r;(r=this.target)==null||r.addEventListener(n,t,i),this.listeners.push([n,t,i])}}function Yie(e){const{EventTarget:n}=rr(e);return e instanceof n?e:Tc(e)}function Sk(e,n){const t=Math.abs(e.x),i=Math.abs(e.y);return typeof n=="number"?Math.sqrt(t**2+i**2)>n:"x"in n&&"y"in n?t>n.x&&i>n.y:"x"in n?t>n.x:"y"in n?i>n.y:!1}var ia;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ia||(ia={}));function CM(e){e.preventDefault()}function Kie(e){e.stopPropagation()}var Zn;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Zn||(Zn={}));const qB={start:[Zn.Space,Zn.Enter],cancel:[Zn.Esc],end:[Zn.Space,Zn.Enter,Zn.Tab]},Xie=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case Zn.Right:return{...t,x:t.x+25};case Zn.Left:return{...t,x:t.x-25};case Zn.Down:return{...t,y:t.y+25};case Zn.Up:return{...t,y:t.y-25}}};class DC{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:t}}=n;this.props=n,this.listeners=new dh(Tc(t)),this.windowListeners=new dh(rr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ia.Resize,this.handleCancel),this.windowListeners.add(ia.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ia.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&FB(i),t(Na)}handleKeyDown(n){if(Dy(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=qB,coordinateGetter:o=Xie,scrollBehavior:l="smooth"}=r,{code:f}=n;if(a.end.includes(f)){this.handleEnd(n);return}if(a.cancel.includes(f)){this.handleCancel(n);return}const{collisionRect:c}=i.current,h=c?{x:c.left,y:c.top}:Na;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=Ph(d,h),v={x:0,y:0},{scrollableAncestors:y}=i.current;for(const b of y){const w=n.code,{isTop:_,isRight:S,isLeft:C,isBottom:E,maxScroll:A,minScroll:T}=IB(b),j=Uie(b),N={x:Math.min(w===Zn.Right?j.right-j.width/2:j.right,Math.max(w===Zn.Right?j.left:j.left+j.width/2,d.x)),y:Math.min(w===Zn.Down?j.bottom-j.height/2:j.bottom,Math.max(w===Zn.Down?j.top:j.top+j.height/2,d.y))},q=w===Zn.Right&&!S||w===Zn.Left&&!C,R=w===Zn.Down&&!E||w===Zn.Up&&!_;if(q&&N.x!==d.x){const L=b.scrollLeft+p.x,B=w===Zn.Right&&L<=A.x||w===Zn.Left&&L>=T.x;if(B&&!p.y){b.scrollTo({left:L,behavior:l});return}B?v.x=b.scrollLeft-L:v.x=w===Zn.Right?b.scrollLeft-A.x:b.scrollLeft-T.x,v.x&&b.scrollBy({left:-v.x,behavior:l});break}else if(R&&N.y!==d.y){const L=b.scrollTop+p.y,B=w===Zn.Down&&L<=A.y||w===Zn.Up&&L>=T.y;if(B&&!p.x){b.scrollTo({top:L,behavior:l});return}B?v.y=b.scrollTop-L:v.y=w===Zn.Down?b.scrollTop-A.y:b.scrollTop-T.y,v.y&&b.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Df(Ph(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}DC.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=qB,onActivation:r}=n,{active:a}=t;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r==null||r({event:e.nativeEvent}),!0)}return!1}}];function AM(e){return!!(e&&"distance"in e)}function OM(e){return!!(e&&"delay"in e)}class RC{constructor(n,t,i){var r;i===void 0&&(i=Yie(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=t;const{event:a}=n,{target:o}=a;this.props=n,this.events=t,this.document=Tc(o),this.documentListeners=new dh(this.document),this.listeners=new dh(i),this.windowListeners=new dh(rr(o)),this.initialCoordinates=(r=kg(a))!=null?r:Na,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(ia.Resize,this.handleCancel),this.windowListeners.add(ia.DragStart,CM),this.windowListeners.add(ia.VisibilityChange,this.handleCancel),this.windowListeners.add(ia.ContextMenu,CM),this.documentListeners.add(ia.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(OM(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(AM(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,t){const{active:i,onPending:r}=this.props;r(i,n,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:n}=this,{onStart:t}=this.props;n&&(this.activated=!0,this.documentListeners.add(ia.Click,Kie,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ia.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const f=(t=kg(n))!=null?t:Na,c=Ph(r,f);if(!i&&l){if(AM(l)){if(l.tolerance!=null&&Sk(c,l.tolerance))return this.handleCancel();if(Sk(c,l.distance))return this.handleStart()}if(OM(l)&&Sk(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}n.cancelable&&n.preventDefault(),o(f)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===Zn.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Zie={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class PC extends RC{constructor(n){const{event:t}=n,i=Tc(t.target);super(n,Zie,i)}}PC.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return!t.isPrimary||t.button!==0?!1:(i==null||i({event:t}),!0)}}];const Qie={move:{name:"mousemove"},end:{name:"mouseup"}};var yS;(function(e){e[e.RightClick=2]="RightClick"})(yS||(yS={}));class Jie extends RC{constructor(n){super(n,Qie,Tc(n.event.target))}}Jie.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===yS.RightClick?!1:(i==null||i({event:t}),!0)}}];const Ck={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ere extends RC{constructor(n){super(n,Ck)}static setup(){return window.addEventListener(Ck.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Ck.move.name,n)};function n(){}}}ere.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;const{touches:r}=t;return r.length>1?!1:(i==null||i({event:t}),!0)}}];var hh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hh||(hh={}));var xg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(xg||(xg={}));function nre(e){let{acceleration:n,activator:t=hh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=xg.TreeOrder,pointerCoordinates:f,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=ire({delta:d,disabled:!a}),[y,b]=mie(),w=O.useRef({x:0,y:0}),_=O.useRef({x:0,y:0}),S=O.useMemo(()=>{switch(t){case hh.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case hh.DraggableRect:return r}},[t,r,f]),C=O.useRef(null),E=O.useCallback(()=>{const T=C.current;if(!T)return;const j=w.current.x*_.current.x,N=w.current.y*_.current.y;T.scrollBy(j,N)},[]),A=O.useMemo(()=>l===xg.TreeOrder?[...c].reverse():c,[l,c]);O.useEffect(()=>{if(!a||!c.length||!S){b();return}for(const T of A){if((i==null?void 0:i(T))===!1)continue;const j=c.indexOf(T),N=h[j];if(!N)continue;const{direction:q,speed:R}=Hie(T,N,S,n,p);for(const L of["x","y"])v[L][q[L]]||(R[L]=0,q[L]=0);if(R.x>0||R.y>0){b(),C.current=T,y(E,o),w.current=R,_.current=q;return}}w.current={x:0,y:0},_.current={x:0,y:0},b()},[n,E,i,b,a,o,JSON.stringify(S),JSON.stringify(v),y,c,A,h,JSON.stringify(p)])}const tre={x:{[_i.Backward]:!1,[_i.Forward]:!1},y:{[_i.Backward]:!1,[_i.Forward]:!1}};function ire(e){let{delta:n,disabled:t}=e;const i=wg(n);return Im(r=>{if(t||!i||!r)return tre;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[_i.Backward]:r.x[_i.Backward]||a.x===-1,[_i.Forward]:r.x[_i.Forward]||a.x===1},y:{[_i.Backward]:r.y[_i.Backward]||a.y===-1,[_i.Forward]:r.y[_i.Forward]||a.y===1}}},[t,n,i])}function rre(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return Im(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function are(e,n){return O.useMemo(()=>e.reduce((t,i)=>{const{sensor:r}=i,a=r.activators.map(o=>({eventName:o.eventName,handler:n(o.handler,i)}));return[...t,...a]},[]),[e,n])}var Nh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Nh||(Nh={}));var bS;(function(e){e.Optimized="optimized"})(bS||(bS={}));const EM=new Map;function ore(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=O.useState(null),{frequency:l,measure:f,strategy:c}=r,h=O.useRef(e),d=w(),p=Rh(d),v=O.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(S=>S===null?_:S.concat(_.filter(C=>!S.includes(C))))},[p]),y=O.useRef(null),b=Im(_=>{if(d&&!t)return EM;if(!_||_===EM||h.current!==e||a!=null){const S=new Map;for(let C of e){if(!C)continue;if(a&&a.length>0&&!a.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const E=C.node.current,A=E?new jC(f(E),E):null;C.rect.current=A,A&&S.set(C.id,A)}return S}return _},[e,a,t,d,f]);return O.useEffect(()=>{h.current=e},[e]),O.useEffect(()=>{d||v()},[t,d]),O.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),O.useEffect(()=>{d||typeof l!="number"||y.current!==null||(y.current=setTimeout(()=>{v(),y.current=null},l))},[l,d,v,...i]),{droppableRects:b,measureDroppableContainers:v,measuringScheduled:a!=null};function w(){switch(c){case Nh.Always:return!1;case Nh.BeforeDragging:return t;default:return!t}}}function NC(e,n){return Im(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function sre(e,n){return NC(e,n)}function lre(e){let{callback:n,disabled:t}=e;const i=jy(n),r=O.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return O.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Py(e){let{callback:n,disabled:t}=e;const i=jy(n),r=O.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return O.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function ure(e){return new jC(Mc(e),e)}function TM(e,n,t){n===void 0&&(n=ure);const[i,r]=O.useState(null);function a(){r(f=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=f??t)!=null?c:null}const h=n(e);return JSON.stringify(f)===JSON.stringify(h)?f:h})}const o=lre({callback(f){if(e)for(const c of f){const{type:h,target:d}=c;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=Py({callback:a});return Pa(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),i}function fre(e){const n=NC(e);return RB(e,n)}const MM=[];function cre(e){const n=O.useRef(e),t=Im(i=>e?i&&i!==MM&&e&&n.current&&e.parentNode===n.current.parentNode?i:Ry(e):MM,[e]);return O.useEffect(()=>{n.current=e},[e]),t}function dre(e){const[n,t]=O.useState(null),i=O.useRef(e),r=O.useCallback(a=>{const o=xk(a.target);o&&t(l=>l?(l.set(o,gS(o)),new Map(l)):null)},[]);return O.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(f=>{const c=xk(f);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,gS(c)]):null}).filter(f=>f!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(f=>{const c=xk(f);c==null||c.removeEventListener("scroll",r)})}},[r,e]),O.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Df(a,o),Na):BB(e):Na,[e,n])}function jM(e,n){n===void 0&&(n=[]);const t=O.useRef(null);return O.useEffect(()=>{t.current=null},n),O.useEffect(()=>{const i=e!==Na;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?Ph(e,t.current):Na}function hre(e){O.useEffect(()=>{if(!My)return;const n=e.map(t=>{let{sensor:i}=t;return i.setup==null?void 0:i.setup()});return()=>{for(const t of n)t==null||t()}},e.map(n=>{let{sensor:t}=n;return t}))}function mre(e,n){return O.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function HB(e){return O.useMemo(()=>e?Iie(e):null,[e])}const DM=[];function pre(e,n){n===void 0&&(n=Mc);const[t]=e,i=HB(t?rr(t):null),[r,a]=O.useState(DM);function o(){a(()=>e.length?e.map(f=>LB(f)?i:new jC(n(f),f)):DM)}const l=Py({callback:o});return Pa(()=>{l==null||l.disconnect(),o(),e.forEach(f=>l==null?void 0:l.observe(f))},[e]),r}function UB(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Lm(n)?n:e}function vre(e){let{measure:n}=e;const[t,i]=O.useState(null),r=O.useCallback(c=>{for(const{target:h}of c)if(Lm(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=Py({callback:r}),o=O.useCallback(c=>{const h=UB(c);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,f]=bg(o);return O.useMemo(()=>({nodeRef:l,rect:t,setRef:f}),[t,l,f])}const gre=[{sensor:PC,options:{}},{sensor:DC,options:{}}],yre={current:{}},ng={draggable:{measure:SM},droppable:{measure:SM,strategy:Nh.WhileDragging,frequency:bS.Optimized},dragOverlay:{measure:Mc}};class mh extends Map{get(n){var t;return n!=null&&(t=super.get(n))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:t}=n;return!t})}getNodeFor(n){var t,i;return(t=(i=this.get(n))==null?void 0:i.node.current)!=null?t:void 0}}const bre={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new mh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:_g},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ng,measureDroppableContainers:_g,windowRect:null,measuringScheduled:!1},VB={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:_g,draggableNodes:new Map,over:null,measureDroppableContainers:_g},Fm=O.createContext(VB),WB=O.createContext(bre);function wre(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new mh}}}function kre(e,n){switch(n.type){case vi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case vi.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case vi.DragEnd:case vi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case vi.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new mh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case vi.SetDroppableDisabled:{const{id:t,key:i,disabled:r}=n,a=e.droppable.containers.get(t);if(!a||i!==a.key)return e;const o=new mh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case vi.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new mh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function _re(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=O.useContext(Fm),a=wg(i),o=wg(t==null?void 0:t.id);return O.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!Dy(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:f,node:c}=l;if(!f.current&&!c.current)return;requestAnimationFrame(()=>{for(const h of[f.current,c.current]){if(!h)continue;const d=gie(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function GB(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function xre(e){return O.useMemo(()=>({draggable:{...ng.draggable,...e==null?void 0:e.draggable},droppable:{...ng.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ng.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Sre(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=O.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Pa(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const c=n==null?void 0:n.node.current;if(!c||c.isConnected===!1)return;const h=t(c),d=RB(h,i);if(o||(d.x=0),l||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=NB(c);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const Ny=O.createContext({...Na,scaleX:1,scaleY:1});var Fs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Fs||(Fs={}));const Cre=O.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:f=!0,children:c,sensors:h=gre,collisionDetection:d=DB,measuring:p,modifiers:v,...y}=n;const b=O.useReducer(kre,void 0,wre),[w,_]=b,[S,C]=xie(),[E,A]=O.useState(Fs.Uninitialized),T=E===Fs.Initialized,{draggable:{active:j,nodes:N,translate:q},droppable:{containers:R}}=w,L=j!=null?N.get(j):null,B=O.useRef({initial:null,translated:null}),G=O.useMemo(()=>{var yn;return j!=null?{id:j,data:(yn=L==null?void 0:L.data)!=null?yn:yre,rect:B}:null},[j,L]),H=O.useRef(null),[U,P]=O.useState(null),[z,F]=O.useState(null),Y=Rh(y,Object.values(y)),D=Bm("DndDescribedBy",o),V=O.useMemo(()=>R.getEnabled(),[R]),W=xre(p),{droppableRects:$,measureDroppableContainers:X,measuringScheduled:te}=ore(V,{dragging:T,dependencies:[q.x,q.y],config:W.droppable}),ae=rre(N,j),le=O.useMemo(()=>z?kg(z):null,[z]),ye=zn(),oe=sre(ae,W.draggable.measure);Sre({activeNode:j!=null?N.get(j):null,config:ye.layoutShiftCompensation,initialRect:oe,measure:W.draggable.measure});const ue=TM(ae,W.draggable.measure,oe),ke=TM(ae?ae.parentElement:null),ie=O.useRef({activatorEvent:null,active:null,activeNode:ae,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Re=R.getNodeFor((t=ie.current.over)==null?void 0:t.id),pe=vre({measure:W.dragOverlay.measure}),Ce=(i=pe.nodeRef.current)!=null?i:ae,De=T?(r=pe.rect)!=null?r:ue:null,be=!!(pe.nodeRef.current&&pe.rect),_e=fre(be?null:ue),Me=HB(Ce?rr(Ce):null),Be=cre(T?Re??ae:null),Ve=pre(Be),He=GB(v,{transform:{x:q.x-_e.x,y:q.y-_e.y,scaleX:1,scaleY:1},activatorEvent:z,active:G,activeNodeRect:ue,containerNodeRect:ke,draggingNodeRect:De,over:ie.current.over,overlayNodeRect:pe.rect,scrollableAncestors:Be,scrollableAncestorRects:Ve,windowRect:Me}),We=le?Df(le,q):null,Ye=dre(Be),rn=jM(Ye),Q=jM(Ye,[ue]),me=Df(He,rn),xe=De?$ie(De,He):null,Xe=G&&xe?d({active:G,collisionRect:xe,droppableRects:$,droppableContainers:V,pointerCoordinates:We}):null,ne=MB(Xe,"id"),[Le,en]=O.useState(null),hn=be?He:Df(He,Q),fn=Pie(hn,(a=Le==null?void 0:Le.rect)!=null?a:null,ue),Ze=O.useRef(null),Ke=O.useCallback((yn,kn)=>{let{sensor:tt,options:At}=kn;if(H.current==null)return;const $e=N.get(H.current);if(!$e)return;const Fe=yn.nativeEvent,jn=new tt({active:H.current,activeNode:$e,event:Fe,options:At,context:ie,onAbort(On){if(!N.get(On))return;const{onDragAbort:Je}=Y.current,nn={id:On};Je==null||Je(nn),S({type:"onDragAbort",event:nn})},onPending(On,Qe,Je,nn){if(!N.get(On))return;const{onDragPending:In}=Y.current,bt={id:On,constraint:Qe,initialCoordinates:Je,offset:nn};In==null||In(bt),S({type:"onDragPending",event:bt})},onStart(On){const Qe=H.current;if(Qe==null)return;const Je=N.get(Qe);if(!Je)return;const{onDragStart:nn}=Y.current,Ln={activatorEvent:Fe,active:{id:Qe,data:Je.data,rect:B}};Vs.unstable_batchedUpdates(()=>{nn==null||nn(Ln),A(Fs.Initializing),_({type:vi.DragStart,initialCoordinates:On,active:Qe}),S({type:"onDragStart",event:Ln}),P(Ze.current),F(Fe)})},onMove(On){_({type:vi.DragMove,coordinates:On})},onEnd:Jn(vi.DragEnd),onCancel:Jn(vi.DragCancel)});Ze.current=jn;function Jn(On){return async function(){const{active:Je,collisions:nn,over:Ln,scrollAdjustedTranslate:In}=ie.current;let bt=null;if(Je&&In){const{cancelDrop:xn}=Y.current;bt={activatorEvent:Fe,active:Je,collisions:nn,delta:In,over:Ln},On===vi.DragEnd&&typeof xn=="function"&&await Promise.resolve(xn(bt))&&(On=vi.DragCancel)}H.current=null,Vs.unstable_batchedUpdates(()=>{_({type:On}),A(Fs.Uninitialized),en(null),P(null),F(null),Ze.current=null;const xn=On===vi.DragEnd?"onDragEnd":"onDragCancel";if(bt){const _n=Y.current[xn];_n==null||_n(bt),S({type:xn,event:bt})}})}}},[N]),An=O.useCallback((yn,kn)=>(tt,At)=>{const $e=tt.nativeEvent,Fe=N.get(At);if(H.current!==null||!Fe||$e.dndKit||$e.defaultPrevented)return;const jn={active:Fe};yn(tt,kn.options,jn)===!0&&($e.dndKit={capturedBy:kn.sensor},H.current=At,Ke(tt,kn))},[N,Ke]),on=are(h,An);hre(h),Pa(()=>{ue&&E===Fs.Initializing&&A(Fs.Initialized)},[ue,E]),O.useEffect(()=>{const{onDragMove:yn}=Y.current,{active:kn,activatorEvent:tt,collisions:At,over:$e}=ie.current;if(!kn||!tt)return;const Fe={active:kn,activatorEvent:tt,collisions:At,delta:{x:me.x,y:me.y},over:$e};Vs.unstable_batchedUpdates(()=>{yn==null||yn(Fe),S({type:"onDragMove",event:Fe})})},[me.x,me.y]),O.useEffect(()=>{const{active:yn,activatorEvent:kn,collisions:tt,droppableContainers:At,scrollAdjustedTranslate:$e}=ie.current;if(!yn||H.current==null||!kn||!$e)return;const{onDragOver:Fe}=Y.current,jn=At.get(ne),Jn=jn&&jn.rect.current?{id:jn.id,rect:jn.rect.current,data:jn.data,disabled:jn.disabled}:null,On={active:yn,activatorEvent:kn,collisions:tt,delta:{x:$e.x,y:$e.y},over:Jn};Vs.unstable_batchedUpdates(()=>{en(Jn),Fe==null||Fe(On),S({type:"onDragOver",event:On})})},[ne]),Pa(()=>{ie.current={activatorEvent:z,active:G,activeNode:ae,collisionRect:xe,collisions:Xe,droppableRects:$,draggableNodes:N,draggingNode:Ce,draggingNodeRect:De,droppableContainers:R,over:Le,scrollableAncestors:Be,scrollAdjustedTranslate:me},B.current={initial:De,translated:xe}},[G,ae,Xe,xe,N,Ce,De,$,R,Le,Be,me]),nre({...ye,delta:q,draggingRect:xe,pointerCoordinates:We,scrollableAncestors:Be,scrollableAncestorRects:Ve});const ht=O.useMemo(()=>({active:G,activeNode:ae,activeNodeRect:ue,activatorEvent:z,collisions:Xe,containerNodeRect:ke,dragOverlay:pe,draggableNodes:N,droppableContainers:R,droppableRects:$,over:Le,measureDroppableContainers:X,scrollableAncestors:Be,scrollableAncestorRects:Ve,measuringConfiguration:W,measuringScheduled:te,windowRect:Me}),[G,ae,ue,z,Xe,ke,pe,N,R,$,Le,X,Be,Ve,W,te,Me]),mt=O.useMemo(()=>({activatorEvent:z,activators:on,active:G,activeNodeRect:ue,ariaDescribedById:{draggable:D},dispatch:_,draggableNodes:N,over:Le,measureDroppableContainers:X}),[z,on,G,ue,_,D,N,Le,X]);return Z.createElement(TB.Provider,{value:C},Z.createElement(Fm.Provider,{value:mt},Z.createElement(WB.Provider,{value:ht},Z.createElement(Ny.Provider,{value:fn},c)),Z.createElement(_re,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Z.createElement(Aie,{...l,hiddenTextDescribedById:D}));function zn(){const yn=(U==null?void 0:U.autoScrollEnabled)===!1,kn=typeof f=="object"?f.enabled===!1:f===!1,tt=T&&!yn&&!kn;return typeof f=="object"?{...f,enabled:tt}:{enabled:tt}}}),Are=O.createContext(null),RM="button",Ore="Draggable";function Ere(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=Bm(Ore),{activators:o,activatorEvent:l,active:f,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=O.useContext(Fm),{role:v=RM,roleDescription:y="draggable",tabIndex:b=0}=r??{},w=(f==null?void 0:f.id)===n,_=O.useContext(w?Ny:Are),[S,C]=bg(),[E,A]=bg(),T=mre(o,n),j=Rh(t);Pa(()=>(d.set(n,{id:n,key:a,node:S,activatorNode:E,data:j}),()=>{const q=d.get(n);q&&q.key===a&&d.delete(n)}),[d,n]);const N=O.useMemo(()=>({role:v,tabIndex:b,"aria-disabled":i,"aria-pressed":w&&v===RM?!0:void 0,"aria-roledescription":y,"aria-describedby":h.draggable}),[i,v,b,w,y,h.draggable]);return{active:f,activatorEvent:l,activeNodeRect:c,attributes:N,isDragging:w,listeners:i?void 0:T,node:S,over:p,setNodeRef:C,setActivatorNodeRef:A,transform:_}}function YB(){return O.useContext(WB)}const Tre="Droppable",Mre={timeout:25};function jre(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=Bm(Tre),{active:o,dispatch:l,over:f,measureDroppableContainers:c}=O.useContext(Fm),h=O.useRef({disabled:t}),d=O.useRef(!1),p=O.useRef(null),v=O.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:w}={...Mre,...r},_=Rh(b??i),S=O.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),v.current=null},w)},[w]),C=Py({callback:S,disabled:y||!o}),E=O.useCallback((N,q)=>{C&&(q&&(C.unobserve(q),d.current=!1),N&&C.observe(N))},[C]),[A,T]=bg(E),j=Rh(n);return O.useEffect(()=>{!C||!A.current||(C.disconnect(),d.current=!1,C.observe(A.current))},[A,C]),O.useEffect(()=>(l({type:vi.RegisterDroppable,element:{id:i,key:a,disabled:t,node:A,rect:p,data:j}}),()=>l({type:vi.UnregisterDroppable,key:a,id:i})),[i]),O.useEffect(()=>{t!==h.current.disabled&&(l({type:vi.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(f==null?void 0:f.id)===i,node:A,over:f,setNodeRef:T}}function Dre(e){let{animation:n,children:t}=e;const[i,r]=O.useState(null),[a,o]=O.useState(null),l=wg(t);return!t&&!i&&l&&r(l),Pa(()=>{if(!a)return;const f=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(f==null||c==null){r(null);return}Promise.resolve(n(c,a)).then(()=>{r(null)})},[n,i,a]),Z.createElement(Z.Fragment,null,t,i?O.cloneElement(i,{ref:o}):null)}const Rre={x:0,y:0,scaleX:1,scaleY:1};function Pre(e){let{children:n}=e;return Z.createElement(Fm.Provider,{value:VB},Z.createElement(Ny.Provider,{value:Rre},n))}const Nre={position:"fixed",touchAction:"none"},$re=e=>Dy(e)?"transform 250ms ease":void 0,zre=O.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:f,transform:c,transition:h=$re}=e;if(!l)return null;const d=r?c:{...c,scaleX:1,scaleY:1},p={...Nre,width:l.width,height:l.height,top:l.top,left:l.left,transform:io.Transform.toString(d),transformOrigin:r&&i?Eie(i,l):void 0,transition:typeof h=="function"?h(i):h,...f};return Z.createElement(t,{className:o,style:p,ref:n},a)}),Lre=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,f]of Object.entries(a.active))f!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,f));if(a!=null&&a.dragOverlay)for(const[l,f]of Object.entries(a.dragOverlay))f!==void 0&&i.node.style.setProperty(l,f);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[f,c]of Object.entries(r))t.node.style.setProperty(f,c);o!=null&&o.active&&t.node.classList.remove(o.active)}},Ire=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:io.Transform.toString(n)},{transform:io.Transform.toString(t)}]},Bre={duration:250,easing:"ease",keyframes:Ire,sideEffects:Lre({styles:{active:{opacity:"0"}}})};function Fre(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return jy((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const f=l.node.current;if(!f)return;const c=UB(o);if(!c)return;const{transform:h}=rr(o).getComputedStyle(o),d=PB(h);if(!d)return;const p=typeof n=="function"?n:qre(n);return FB(f,r.draggable.measure),p({active:{id:a,data:l.data,node:f,rect:r.draggable.measure(f)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function qre(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Bre,...e};return a=>{let{active:o,dragOverlay:l,transform:f,...c}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:f.scaleX!==1?o.rect.width*f.scaleX/l.rect.width:1,scaleY:f.scaleY!==1?o.rect.height*f.scaleY/l.rect.height:1},p={x:f.x-h.x,y:f.y-h.y,...d},v=r({...c,active:o,dragOverlay:l,transform:{initial:f,final:p}}),[y]=v,b=v[v.length-1];if(JSON.stringify(y)===JSON.stringify(b))return;const w=i==null?void 0:i({active:o,dragOverlay:l,...c}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(S=>{_.onfinish=()=>{w==null||w(),S()}})}}let PM=0;function Hre(e){return O.useMemo(()=>{if(e!=null)return PM++,PM},[e])}const Ure=Z.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:f,zIndex:c=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:y,droppableContainers:b,dragOverlay:w,over:_,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:E,windowRect:A}=YB(),T=O.useContext(Ny),j=Hre(d==null?void 0:d.id),N=GB(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:w.rect,over:_,overlayNodeRect:w.rect,scrollableAncestors:C,scrollableAncestorRects:E,transform:T,windowRect:A}),q=NC(p),R=Fre({config:i,draggableNodes:y,droppableContainers:b,measuringConfiguration:S}),L=q?w.setRef:void 0;return Z.createElement(Pre,null,Z.createElement(Dre,{animation:R},d&&j?Z.createElement(zre,{key:j,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:f,transition:a,rect:q,style:{zIndex:c,...r},transform:N},t):null))});function Sg(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function Vre(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function _v(e){return e!==null&&e>=0}function Wre(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const f=Kre(t,o,r);if(o===r){const c=t[a];return c?{x:rr&&o<=a?{x:-l.width-f,y:0,...xv}:o=a?{x:l.width+f,y:0,...xv}:{x:0,y:0,...xv}};function Kre(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return!i||!r&&!a?0:t{let{rects:n,activeIndex:t,overIndex:i,index:r}=e;const a=Sg(n,i,t),o=n[r],l=a[r];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},Sv={scaleX:1,scaleY:1},XB=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const c=a[o];return c?{x:0,y:tt&&r<=o?{x:0,y:-l.height-f,...Sv}:r=o?{x:0,y:l.height+f,...Sv}:{x:0,y:0,...Sv}};function Xre(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(T=>typeof T=="object"&&"id"in T?T.id:T),[i]),y=o!=null,b=o?v.indexOf(o.id):-1,w=c?v.indexOf(c.id):-1,_=O.useRef(v),S=!Wre(v,_.current),C=w!==-1&&b===-1||S,E=Gre(a);Pa(()=>{S&&y&&h(v)},[S,v,y,h]),O.useEffect(()=>{_.current=v},[v]);const A=O.useMemo(()=>({activeIndex:b,containerId:d,disabled:E,disableTransforms:C,items:v,overIndex:w,useDragOverlay:p,sortedRects:Vre(v,f),strategy:r}),[b,d,E.draggable,E.droppable,C,v,w,f,p,r]);return Z.createElement(QB.Provider,{value:A},n)}const Zre=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return Sg(t,i,r).indexOf(n)},Qre=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:f,transition:c}=e;return!c||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===f},Jre={duration:200,easing:"ease"},JB="transform",eae=io.Transition.toString({property:JB,duration:0,easing:"linear"}),nae={roleDescription:"sortable"};function tae(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=O.useState(null),l=O.useRef(t);return Pa(()=>{if(!n&&t!==l.current&&i.current){const f=r.current;if(f){const c=Mc(i.current,{ignoreTransform:!0}),h={x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),O.useEffect(()=>{a&&o(null)},[a]),a}function eF(e){let{animateLayoutChanges:n=Qre,attributes:t,disabled:i,data:r,getNewIndex:a=Zre,id:o,strategy:l,resizeObserverConfig:f,transition:c=Jre}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:y,sortedRects:b,overIndex:w,useDragOverlay:_,strategy:S}=O.useContext(QB),C=iae(i,v),E=h.indexOf(o),A=O.useMemo(()=>({sortable:{containerId:d,index:E,items:h},...r}),[d,r,E,h]),T=O.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:j,node:N,isOver:q,setNodeRef:R}=jre({id:o,data:A,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...f}}),{active:L,activatorEvent:B,activeNodeRect:G,attributes:H,setNodeRef:U,listeners:P,isDragging:z,over:F,setActivatorNodeRef:Y,transform:D}=Ere({id:o,data:A,attributes:{...nae,...t},disabled:C.draggable}),V=hie(R,U),W=!!L,$=W&&!y&&_v(p)&&_v(w),X=!_&&z,te=X&&$?D:null,le=$?te??(l??S)({rects:b,activeNodeRect:G,activeIndex:p,overIndex:w,index:E}):null,ye=_v(p)&&_v(w)?a({id:o,items:h,activeIndex:p,overIndex:w}):E,oe=L==null?void 0:L.id,ue=O.useRef({activeId:oe,items:h,newIndex:ye,containerId:d}),ke=h!==ue.current.items,ie=n({active:L,containerId:d,isDragging:z,isSorting:W,id:o,index:E,items:h,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),Re=tae({disabled:!ie,index:E,node:N,rect:j});return O.useEffect(()=>{W&&ue.current.newIndex!==ye&&(ue.current.newIndex=ye),d!==ue.current.containerId&&(ue.current.containerId=d),h!==ue.current.items&&(ue.current.items=h)},[W,ye,d,h]),O.useEffect(()=>{if(oe===ue.current.activeId)return;if(oe!=null&&ue.current.activeId==null){ue.current.activeId=oe;return}const Ce=setTimeout(()=>{ue.current.activeId=oe},50);return()=>clearTimeout(Ce)},[oe]),{active:L,activeIndex:p,attributes:H,data:A,rect:j,index:E,newIndex:ye,items:h,isOver:q,isSorting:W,isDragging:z,listeners:P,node:N,overIndex:w,over:F,setNodeRef:V,setActivatorNodeRef:Y,setDroppableNodeRef:R,setDraggableNodeRef:U,transform:Re??le,transition:pe()};function pe(){if(Re||ke&&ue.current.newIndex===E)return eae;if(!(X&&!Dy(B)||!c)&&(W||ie))return io.Transition.toString({...c,property:JB})}}function iae(e,n){var t,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(t=e==null?void 0:e.draggable)!=null?t:n.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:n.droppable}}function Cg(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const rae=[Zn.Down,Zn.Right,Zn.Up,Zn.Left],aae=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(rae.includes(e.code)){if(e.preventDefault(),!t||!i)return;const f=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case Zn.Down:i.topp.top&&f.push(d);break;case Zn.Left:i.left>p.left&&f.push(d);break;case Zn.Right:i.left1&&(h=c[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,y=p==null?void 0:p.node.current;if(y&&v&&d&&p){const w=Ry(y).some((T,j)=>l[j]!==T),_=nF(d,p),S=oae(d,p),C=w||!_?{x:0,y:0}:{x:S?i.width-v.width:0,y:S?i.height-v.height:0},E={x:v.left,y:v.top};return C.x&&C.y?E:Ph(E,C)}}}};function nF(e,n){return!Cg(e)||!Cg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function oae(e,n){return!Cg(e)||!Cg(n)||!nF(e,n)?!1:e.data.current.sortable.index=U?H:""+Array(U+1-z.length).join(P)+H},E={s:C,z:function(H){var U=-H.utcOffset(),P=Math.abs(U),z=Math.floor(P/60),F=P%60;return(U<=0?"+":"-")+C(z,2,"0")+":"+C(F,2,"0")},m:function H(U,P){if(U.date()1)return H(D[0])}else{var V=U.name;T[V]=U,F=V}return!z&&F&&(A=F),F||!z&&A},R=function(H,U){if(N(H))return H.clone();var P=typeof U=="object"?U:{};return P.date=H,P.args=arguments,new B(P)},L=E;L.l=q,L.i=N,L.w=function(H,U){return R(H,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var B=(function(){function H(P){this.$L=q(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[j]=!0}var U=H.prototype;return U.parse=function(P){this.$d=(function(z){var F=z.date,Y=z.utc;if(F===null)return new Date(NaN);if(L.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var D=F.match(w);if(D){var V=D[2]-1||0,W=(D[7]||"0").substring(0,3);return Y?new Date(Date.UTC(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)):new Date(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)}}return new Date(F)})(P),this.init()},U.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},U.$utils=function(){return L},U.isValid=function(){return this.$d.toString()!==b},U.isSame=function(P,z){var F=R(P);return this.startOf(z)<=F&&F<=this.endOf(z)},U.isAfter=function(P,z){return R(P)ze(o).locale(t).format(i);return e==="default"?n===null?"":a(n):e==="multiple"?n.map(a).join(", "):e==="range"&&Array.isArray(n)?n[0]&&n[1]?`${a(n[0])} ${r} ${a(n[1])}`:n[0]?`${a(n[0])} ${r} `:"":""}function cae({formatter:e,...n}){return(e||fae)(n)}function dae({direction:e,levelIndex:n,rowIndex:t,cellIndex:i,size:r}){switch(e){case"up":return n===0&&t===0?null:t===0?{levelIndex:n-1,rowIndex:i<=r[n-1][r[n-1].length-1]-1?r[n-1].length-1:r[n-1].length-2,cellIndex:i}:{levelIndex:n,rowIndex:t-1,cellIndex:i};case"down":return t===r[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:i}:t===r[n].length-2&&i>=r[n][r[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:i}:{levelIndex:n,rowIndex:t+1,cellIndex:i};case"left":return n===0&&t===0&&i===0?null:t===0&&i===0?{levelIndex:n-1,rowIndex:r[n-1].length-1,cellIndex:r[n-1][r[n-1].length-1]-1}:i===0?{levelIndex:n,rowIndex:t-1,cellIndex:r[n][t-1]-1}:{levelIndex:n,rowIndex:t,cellIndex:i-1};case"right":return t===r[n].length-1&&i===r[n][t]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:i===r[n][t]-1?{levelIndex:n,rowIndex:t+1,cellIndex:0}:{levelIndex:n,rowIndex:t,cellIndex:i+1};default:return{levelIndex:n,rowIndex:t,cellIndex:i}}}function tF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var f,c,h;const o=dae({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(c=(f=e.current)==null?void 0:f[o.levelIndex])==null?void 0:c[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?tF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function hae(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function mae(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function $C({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=hae(r.key);a&&(r.preventDefault(),tF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:mae(e)}))}function Hi(e){return e==null||e===""?e:ze(e).format("YYYY-MM-DD")}function iF(e){return e==null||e===""?e:ze(e).format("YYYY-MM-DD HH:mm:ss")}function kS({minDate:e,maxDate:n}){const t=ze();return!e&&!n?Hi(t):e&&ze(t).isBefore(e)?Hi(e):n&&ze(t).isAfter(n)?Hi(n):Hi(t)}const pae={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},vae=O.createContext(pae);function sl(){const e=O.use(vae),n=O.useCallback(a=>a||e.locale,[e.locale]),t=O.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=O.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=O.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function gae({value:e,type:n,withTime:t}){const i=t?iF:Hi;if(n==="range"&&Array.isArray(e)){const r=i(e[0]),a=i(e[1]);return r?a?`${r} – ${a}`:`${r} –`:""}return n==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?i(e):""}function rF({value:e,type:n,name:t,form:i,withTime:r=!1}){return k.jsx("input",{type:"hidden",value:gae({value:e,type:n,withTime:r}),name:t,form:i})}rF.displayName="@mantine/dates/HiddenDatesInput";var aF={day:"m_396ce5cb"};const oF=(e,{size:n})=>({day:{"--day-size":Mn(n,"day-size")}}),$y=Pe(e=>{const n=ge("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:f,disabled:c,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:y,inRange:b,firstInRange:w,lastInRange:_,hidden:S,static:C,highlightToday:E,fullWidth:A,attributes:T,...j}=n;return k.jsx(fi,{...Ge({name:h||"Day",classes:aF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,vars:l,varsResolver:oF,rootSelector:"day"})("day",{style:S?{display:"none"}:void 0}),component:C?"div":"button",disabled:c,"data-today":ze(f).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-highlight-today":E||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!p&&d||void 0,"data-outside":!c&&p||void 0,"data-selected":!c&&v||void 0,"data-in-range":b&&!c||void 0,"data-first-in-range":w&&!c||void 0,"data-last-in-range":_&&!c||void 0,"data-static":C||void 0,"data-full-width":A||void 0,unstyled:o,...j,children:(y==null?void 0:y(f))||ze(f).date()})});$y.classes=aF;$y.varsResolver=oF;$y.displayName="@mantine/dates/Day";function yae({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=ze().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(ze(i).add(a,"days").locale(e).format(n)):r.push(n(ze(i).add(a,"days").format("YYYY-MM-DD")));return r}var sF={weekday:"m_18a3eca"};const lF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":Zt(n),"--wr-spacing":Ft(n)}}),zy=Pe(e=>{const n=ge("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:f,firstDayOfWeek:c,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:y,...b}=n,w=Ge({name:p||"WeekdaysRow",classes:sF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:y,vars:l,varsResolver:lF,rootSelector:"weekdaysRow"}),_=sl(),S=yae({locale:_.getLocale(f),format:h,firstDayOfWeek:_.getFirstDayOfWeek(c)}).map((C,E)=>k.jsx(d,{...w("weekday"),children:C},E));return k.jsxs(we,{component:"tr",...w("weekdaysRow"),...b,children:[v&&k.jsx(d,{...w("weekday"),children:"#"}),S]})});zy.classes=sF;zy.varsResolver=lF;zy.displayName="@mantine/dates/WeekdaysRow";function bae(e,n=1){let t=ze(e);if(!t.isValid())return t;const i=n===0?6:n-1;for(;t.day()!==i;)t=t.add(1,"day");return t.format("YYYY-MM-DD")}function wae(e,n=1){let t=ze(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function kae({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=ze(ze(e).subtract(ze(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=bae(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=ze(wae(r,n));for(;ze(l).isBefore(a,"day");){const f=[];for(let c=0;c<7;c+=1)f.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(f)}if(t&&o.length<6){const f=o[o.length-1],c=f[f.length-1];let h=ze(c).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function zC(e,n){return ze(e).format("YYYY-MM")===ze(n).format("YYYY-MM")}function uF(e,n){return n?ze(e).isAfter(ze(n).subtract(1,"day"),"day"):!0}function fF(e,n){return n?ze(e).isBefore(ze(n).add(1,"day"),"day"):!0}function _ae({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return fF(h,t)&&uF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||zC(h,o))}),f=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(f)return f;const c=l.find(h=>ze().isSame(h,"date"));return c||l[0]}var ig={exports:{}},xae=ig.exports,$M;function Sae(){return $M||($M=1,(function(e,n){(function(t,i){e.exports=i()})(xae,(function(){var t="day";return function(i,r,a){var o=function(c){return c.add(4-c.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),t);var h,d,p,v,y=o(this),b=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return y.diff(b,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var f=l.startOf;l.startOf=function(c,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(c)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(c,h)}}}))})(ig)),ig.exports}var Cae=Sae();const Aae=ot(Cae);ze.extend(Aae);function Oae(e){return ze(e.find(n=>ze(n).day()===1)).isoWeek()}var cF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const Eae={withCellSpacing:!0},dF=(e,{size:n})=>({weekNumber:{"--wn-fz":Zt(n),"--wn-size":Mn(n,"wn-size")}}),qm=Pe(e=>{const n=ge("Month",Eae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,locale:c,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:y,excludeDate:b,minDate:w,maxDate:_,renderDay:S,hideOutsideDates:C,hideWeekdays:E,getDayAriaLabel:A,static:T,__getDayRef:j,__onDayKeyDown:N,__onDayClick:q,__onDayMouseEnter:R,__preventFocus:L,__stopPropagation:B,withCellSpacing:G,size:H,highlightToday:U,withWeekNumbers:P,fullWidth:z,attributes:F,...Y}=n,D=Ge({name:f||"Month",classes:cF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:F,vars:l,varsResolver:dF,rootSelector:"month"}),V=sl(),W=kae({month:p,firstDayOfWeek:V.getFirstDayOfWeek(h),consistentWeeks:V.consistentWeeks}),$=_ae({dates:W,minDate:Hi(w),maxDate:Hi(_),getDayProps:y,excludeDate:b,hideOutsideDates:C,month:p}),{resolvedClassNames:X,resolvedStyles:te}=Ni({classNames:t,styles:a,props:n}),ae=W.map((le,ye)=>{const oe=le.map((ue,ke)=>{const ie=!zC(ue,p),Re=(A==null?void 0:A(ue))||ze(ue).locale(c||V.locale).format("D MMMM YYYY"),pe=y==null?void 0:y(ue),Ce=ze(ue).isSame($,"date");return k.jsx("td",{...D("monthCell"),"data-with-spacing":G||void 0,children:k.jsx($y,{__staticSelector:f||"Month",classNames:X,styles:te,attributes:F,unstyled:o,"data-mantine-stop-propagation":B||void 0,highlightToday:U,renderDay:S,date:ue,size:H,weekend:V.getWeekendDays(v).includes(ze(ue).get("day")),outside:ie,hidden:C?ie:!1,"aria-label":Re,static:T,fullWidth:z,disabled:(b==null?void 0:b(ue))||!fF(ue,Hi(_))||!uF(ue,Hi(w)),ref:De=>{De&&(j==null||j(ye,ke,De))},...pe,onKeyDown:De=>{var be;(be=pe==null?void 0:pe.onKeyDown)==null||be.call(pe,De),N==null||N(De,{rowIndex:ye,cellIndex:ke,date:ue})},onMouseEnter:De=>{var be;(be=pe==null?void 0:pe.onMouseEnter)==null||be.call(pe,De),R==null||R(De,ue)},onClick:De=>{var be;(be=pe==null?void 0:pe.onClick)==null||be.call(pe,De),q==null||q(De,ue)},onMouseDown:De=>{var be;(be=pe==null?void 0:pe.onMouseDown)==null||be.call(pe,De),L&&De.preventDefault()},tabIndex:L||!Ce?-1:0})},ue.toString())});return k.jsxs("tr",{...D("monthRow"),children:[P&&k.jsx("td",{...D("weekNumber"),children:Oae(le)}),oe]},ye)});return k.jsxs(we,{component:"table",...D("month"),size:H,"data-full-width":z||void 0,...Y,children:[!E&&k.jsx("thead",{...D("monthThead"),children:k.jsx(zy,{__staticSelector:f||"Month",locale:c,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:P,size:H,classNames:X,styles:te,unstyled:o,attributes:F})}),k.jsx("tbody",{...D("monthTbody"),children:ae})]})});qm.classes=cF;qm.varsResolver=dF;qm.displayName="@mantine/dates/Month";var hF={pickerControl:"m_dc6a3c71"};const mF=(e,{size:n})=>({pickerControl:{"--dpc-fz":Zt(n),"--dpc-size":Mn(n,"dpc-size")}}),Hm=Pe(e=>{const n=ge("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:f,lastInRange:c,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:y,attributes:b,...w}=n;return k.jsx(fi,{...Ge({name:d||"PickerControl",classes:hF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:mF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":y||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":f&&!v||void 0,"data-last-in-range":c&&!v||void 0,disabled:v,...w})});Hm.classes=hF;Hm.varsResolver=mF;Hm.displayName="@mantine/dates/PickerControl";function pF({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&ze(e).isBefore(n,"year")||t&&ze(e).isAfter(t,"year"))}function Tae({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var f;return!pF({year:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>ze().isSame(l,"year"));return o||r[0]}function vF(e){const n=ze(e).year(),t=n-n%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let l=0;l{const n=ge("YearsList",Mae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:f,yearsListFormat:c,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:y,__getControlRef:b,__onControlKeyDown:w,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:E,withCellSpacing:A,fullWidth:T,size:j,attributes:N,...q}=n,R=Ge({name:y||"YearsList",classes:gF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"yearsList"}),L=sl(),B=vF(f),G=Tae({years:B,minDate:d,maxDate:p,getYearControlProps:v}),H=B.map((U,P)=>{const z=U.map((F,Y)=>{const D=v==null?void 0:v(F),V=ze(F).isSame(G,"year");return k.jsx("td",{...R("yearsListCell"),"data-with-spacing":A||void 0,children:k.jsx(Hm,{...R("yearsListControl"),size:j,unstyled:o,fullWidth:T,"data-mantine-stop-propagation":E||void 0,disabled:pF({year:F,minDate:d,maxDate:p}),ref:W=>{W&&(b==null||b(P,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),w==null||w(W,{rowIndex:P,cellIndex:Y,date:F})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,F)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),S==null||S(W,F)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),C&&W.preventDefault()},tabIndex:C||!V?-1:0,children:(D==null?void 0:D.children)??ze(F).locale(L.getLocale(h)).format(c)})},Y)});return k.jsx("tr",{...R("yearsListRow"),children:z},P)});return k.jsx(we,{component:"table",size:j,...R("yearsList"),"data-full-width":T||void 0,...q,children:k.jsx("tbody",{children:H})})});Ly.classes=gF;Ly.displayName="@mantine/dates/YearsList";function yF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&ze(e).isBefore(n,"month")||t&&ze(e).isAfter(t,"month"))}function jae({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var f;return!yF({month:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>ze().isSame(l,"month"));return o||r[0]}function Dae(e){const n=ze(e).startOf("year").toDate(),t=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)t[r].push(ze(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var bF={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Rae={monthsListFormat:"MMM",withCellSpacing:!0},Iy=Pe(e=>{const n=ge("MonthsList",Rae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,year:c,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:y,__getControlRef:b,__onControlKeyDown:w,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:C,__stopPropagation:E,withCellSpacing:A,fullWidth:T,size:j,attributes:N,...q}=n,R=Ge({name:f||"MonthsList",classes:bF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"monthsList"}),L=sl(),B=Dae(c),G=jae({months:B,minDate:Hi(p),maxDate:Hi(v),getMonthControlProps:y}),H=B.map((U,P)=>{const z=U.map((F,Y)=>{const D=y==null?void 0:y(F),V=ze(F).isSame(G,"month");return k.jsx("td",{...R("monthsListCell"),"data-with-spacing":A||void 0,children:k.jsx(Hm,{...R("monthsListControl"),size:j,unstyled:o,fullWidth:T,__staticSelector:f||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:yF({month:F,minDate:Hi(p),maxDate:Hi(v)}),ref:W=>{W&&(b==null||b(P,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),w==null||w(W,{rowIndex:P,cellIndex:Y,date:F})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,F)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),S==null||S(W,F)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),C&&W.preventDefault()},tabIndex:C||!V?-1:0,children:(D==null?void 0:D.children)??ze(F).locale(L.getLocale(d)).format(h)})},Y)});return k.jsx("tr",{...R("monthsListRow"),children:z},P)});return k.jsx(we,{component:"table",size:j,...R("monthsList"),"data-full-width":T||void 0,...q,children:k.jsx("tbody",{children:H})})});Iy.classes=bF;Iy.displayName="@mantine/dates/MonthsList";var wF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const Pae={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},kF=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Mn(n,"dch-control-size"),"--dch-fz":Zt(n)}}),ss=Pe(e=>{const n=ge("CalendarHeader",Pae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:f,previousIcon:c,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:y,label:b,nextDisabled:w,previousDisabled:_,hasNextLevel:S,levelControlAriaLabel:C,withNext:E,withPrevious:A,headerControlsOrder:T,fullWidth:j,__staticSelector:N,__preventFocus:q,__stopPropagation:R,attributes:L,...B}=n,G=Ge({name:N||"CalendarHeader",classes:wF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:kF,rootSelector:"calendarHeader"}),H=q?Y=>Y.preventDefault():void 0,U=A&&O.createElement(fi,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:H,disabled:_,"data-disabled":_||void 0,tabIndex:q||_?-1:0,"data-mantine-stop-propagation":R||void 0},c||k.jsx(gg,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),P=O.createElement(fi,{component:S?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:S?y:void 0,unstyled:o,onMouseDown:S?H:void 0,disabled:!S,"data-static":!S||void 0,"aria-label":C,tabIndex:q||!S?-1:0,"data-mantine-stop-propagation":R||void 0},b),z=E&&O.createElement(fi,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:H,disabled:w,"data-disabled":w||void 0,tabIndex:q||w?-1:0,"data-mantine-stop-propagation":R||void 0},f||k.jsx(gg,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),F=T.map(Y=>Y==="previous"?U:Y==="level"?P:Y==="next"?z:null);return k.jsx(we,{...G("calendarHeader"),"data-full-width":j||void 0,...B,children:F})});ss.classes=wF;ss.varsResolver=kF;ss.displayName="@mantine/dates/CalendarHeader";function Nae(e){const n=vF(e);return[n[0][0],n[3][0]]}const $ae={decadeLabelFormat:"YYYY"},By=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,nextDisabled:C,previousDisabled:E,levelControlAriaLabel:A,withNext:T,withPrevious:j,headerControlsOrder:N,decadeLabelFormat:q,classNames:R,styles:L,unstyled:B,__staticSelector:G,__stopPropagation:H,size:U,fullWidth:P,attributes:z,...F}=ge("DecadeLevel",$ae,e),Y=sl(),[D,V]=Nae(n),W={__staticSelector:G||"DecadeLevel",classNames:R,styles:L,unstyled:B,size:U,attributes:z},$=typeof C=="boolean"?C:r?!ze(V).endOf("year").isBefore(r):!1,X=typeof E=="boolean"?E:i?!ze(D).startOf("year").isAfter(i):!1,te=(ae,le)=>ze(ae).locale(t||Y.locale).format(le);return k.jsxs(we,{"data-decade-level":!0,size:U,...F,children:[k.jsx(ss,{label:typeof q=="function"?q(D,V):`${te(D,q)} – ${te(V,q)}`,__preventFocus:p,__stopPropagation:H,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,nextDisabled:$,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:A,withNext:T,withPrevious:j,headerControlsOrder:N,fullWidth:P,...W}),k.jsx(Ly,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:H,withCellSpacing:d,fullWidth:P,...W})]})});By.classes={...Ly.classes,...ss.classes};By.displayName="@mantine/dates/DecadeLevel";const zae={yearLabelFormat:"YYYY"},Fy=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,onLevelClick:C,nextDisabled:E,previousDisabled:A,hasNextLevel:T,levelControlAriaLabel:j,withNext:N,withPrevious:q,headerControlsOrder:R,yearLabelFormat:L,__staticSelector:B,__stopPropagation:G,size:H,classNames:U,styles:P,unstyled:z,fullWidth:F,attributes:Y,...D}=ge("YearLevel",zae,e),V=sl(),W={__staticSelector:B||"YearLevel",classNames:U,styles:P,unstyled:z,size:H,attributes:Y},$=typeof E=="boolean"?E:r?!ze(n).endOf("year").isBefore(r):!1,X=typeof A=="boolean"?A:i?!ze(n).startOf("year").isAfter(i):!1;return k.jsxs(we,{"data-year-level":!0,size:H,...D,children:[k.jsx(ss,{label:typeof L=="function"?L(n):ze(n).locale(t||V.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:v,previousIcon:y,nextLabel:b,previousLabel:w,onNext:_,onPrevious:S,onLevelClick:C,nextDisabled:$,previousDisabled:X,hasNextLevel:T,levelControlAriaLabel:j,withNext:N,withPrevious:q,headerControlsOrder:R,fullWidth:F,...W}),k.jsx(Iy,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:F,...W})]})});Fy.classes={...ss.classes,...Iy.classes};Fy.displayName="@mantine/dates/YearLevel";const Lae={monthLabelFormat:"MMMM YYYY"},qy=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:b,__onDayClick:w,__onDayMouseEnter:_,withCellSpacing:S,highlightToday:C,withWeekNumbers:E,__preventFocus:A,__stopPropagation:T,nextIcon:j,previousIcon:N,nextLabel:q,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:H,previousDisabled:U,hasNextLevel:P,levelControlAriaLabel:z,withNext:F,withPrevious:Y,headerControlsOrder:D,monthLabelFormat:V,classNames:W,styles:$,unstyled:X,__staticSelector:te,size:ae,static:le,fullWidth:ye,attributes:oe,...ue}=ge("MonthLevel",Lae,e),ke=sl(),ie={__staticSelector:te||"MonthLevel",classNames:W,styles:$,unstyled:X,size:ae,attributes:oe},Re=typeof H=="boolean"?H:c?!ze(n).endOf("month").isBefore(c):!1,pe=typeof U=="boolean"?U:f?!ze(n).startOf("month").isAfter(f):!1;return k.jsxs(we,{"data-month-level":!0,size:ae,...ue,children:[k.jsx(ss,{label:typeof V=="function"?V(n):ze(n).locale(t||ke.locale).format(V),__preventFocus:A,__stopPropagation:T,nextIcon:j,previousIcon:N,nextLabel:q,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:Re,previousDisabled:pe,hasNextLevel:P,levelControlAriaLabel:z,withNext:F,withPrevious:Y,headerControlsOrder:D,fullWidth:ye,...ie}),k.jsx(qm,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:y,__onDayKeyDown:b,__onDayClick:w,__onDayMouseEnter:_,__preventFocus:A,__stopPropagation:T,static:le,withCellSpacing:S,highlightToday:C,withWeekNumbers:E,fullWidth:ye,...ie})]})});qy.classes={...qm.classes,...ss.classes};qy.displayName="@mantine/dates/MonthLevel";var _F={levelsGroup:"m_30b26e33"};const ll=Pe(e=>{const n=ge("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,fullWidth:c,attributes:h,...d}=n;return k.jsx(we,{...Ge({name:f||"LevelsGroup",classes:_F,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":c||void 0,...d})});ll.classes=_F;ll.displayName="@mantine/dates/LevelsGroup";const Iae={numberOfColumns:1},Hy=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,nextDisabled:_,previousDisabled:S,headerControlsOrder:C,classNames:E,styles:A,unstyled:T,__staticSelector:j,__stopPropagation:N,numberOfColumns:q,levelControlAriaLabel:R,decadeLabelFormat:L,size:B,fullWidth:G,vars:H,attributes:U,...P}=ge("DecadeLevelGroup",Iae,e),z=O.useRef([]),F=Array(q).fill(0).map((Y,D)=>{const V=ze(n).add(D*10,"years").format("YYYY-MM-DD");return k.jsx(By,{size:B,yearsListFormat:a,decade:V,withNext:D===q-1,withPrevious:D===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(W,$)=>$C({levelIndex:D,rowIndex:$.rowIndex,cellIndex:$.cellIndex,event:W,controlsRef:z}),__getControlRef:(W,$,X)=>{Array.isArray(z.current[D])||(z.current[D]=[]),Array.isArray(z.current[D][W])||(z.current[D][W]=[]),z.current[D][W][$]=X},levelControlAriaLabel:typeof R=="function"?R(V):R,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:N,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,nextDisabled:_,previousDisabled:S,getYearControlProps:o,__staticSelector:j||"DecadeLevelGroup",classNames:E,styles:A,unstyled:T,withCellSpacing:c,headerControlsOrder:C,fullWidth:G,attributes:U},D)});return k.jsx(ll,{classNames:E,styles:A,__staticSelector:j||"DecadeLevelGroup",size:B,unstyled:T,fullWidth:G,attributes:U,...P,children:F})});Hy.classes={...ll.classes,...By.classes};Hy.displayName="@mantine/dates/DecadeLevelGroup";const Bae={numberOfColumns:1},Uy=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,onLevelClick:_,nextDisabled:S,previousDisabled:C,hasNextLevel:E,headerControlsOrder:A,classNames:T,styles:j,unstyled:N,__staticSelector:q,__stopPropagation:R,numberOfColumns:L,levelControlAriaLabel:B,yearLabelFormat:G,size:H,fullWidth:U,vars:P,attributes:z,...F}=ge("YearLevelGroup",Bae,e),Y=O.useRef([]),D=Array(L).fill(0).map((V,W)=>{const $=ze(n).add(W,"years").format("YYYY-MM-DD");return k.jsx(Fy,{size:H,monthsListFormat:a,year:$,withNext:W===L-1,withPrevious:W===0,yearLabelFormat:G,__stopPropagation:R,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(X,te)=>$C({levelIndex:W,rowIndex:te.rowIndex,cellIndex:te.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,te,ae)=>{Array.isArray(Y.current[W])||(Y.current[W]=[]),Array.isArray(Y.current[W][X])||(Y.current[W][X]=[]),Y.current[W][X][te]=ae},levelControlAriaLabel:typeof B=="function"?B($):B,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:y,onNext:b,onPrevious:w,onLevelClick:_,nextDisabled:S,previousDisabled:C,hasNextLevel:E,getMonthControlProps:o,classNames:T,styles:j,unstyled:N,__staticSelector:q||"YearLevelGroup",withCellSpacing:c,headerControlsOrder:A,fullWidth:U,attributes:z},W)});return k.jsx(ll,{classNames:T,styles:j,__staticSelector:q||"YearLevelGroup",size:H,unstyled:N,fullWidth:U,attributes:z,...F,children:D})});Uy.classes={...Fy.classes,...ll.classes};Uy.displayName="@mantine/dates/YearLevelGroup";const Fae={numberOfColumns:1},Vy=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:y,__onDayMouseEnter:b,withCellSpacing:w,highlightToday:_,withWeekNumbers:S,__preventFocus:C,nextIcon:E,previousIcon:A,nextLabel:T,previousLabel:j,onNext:N,onPrevious:q,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,headerControlsOrder:H,classNames:U,styles:P,unstyled:z,numberOfColumns:F,levelControlAriaLabel:Y,monthLabelFormat:D,__staticSelector:V,__stopPropagation:W,size:$,static:X,fullWidth:te,vars:ae,attributes:le,...ye}=ge("MonthLevelGroup",Fae,e),oe=O.useRef([]),ue=Array(F).fill(0).map((ke,ie)=>{const Re=ze(n).add(ie,"months").format("YYYY-MM-DD");return k.jsx(qy,{month:Re,withNext:ie===F-1,withPrevious:ie===0,monthLabelFormat:D,__stopPropagation:W,__onDayClick:y,__onDayMouseEnter:b,__onDayKeyDown:(pe,Ce)=>$C({levelIndex:ie,rowIndex:Ce.rowIndex,cellIndex:Ce.cellIndex,event:pe,controlsRef:oe}),__getDayRef:(pe,Ce,De)=>{Array.isArray(oe.current[ie])||(oe.current[ie]=[]),Array.isArray(oe.current[ie][pe])||(oe.current[ie][pe]=[]),oe.current[ie][pe][Ce]=De},levelControlAriaLabel:typeof Y=="function"?Y(Re):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:C,nextIcon:E,previousIcon:A,nextLabel:T,previousLabel:j,onNext:N,onPrevious:q,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,classNames:U,styles:P,unstyled:z,__staticSelector:V||"MonthLevelGroup",size:$,static:X,withCellSpacing:w,highlightToday:_,withWeekNumbers:S,headerControlsOrder:H,fullWidth:te,attributes:le},ie)});return k.jsx(ll,{classNames:U,styles:P,__staticSelector:V||"MonthLevelGroup",size:$,fullWidth:te,attributes:le,...ye,children:ue})});Vy.classes={...ll.classes,...qy.classes};Vy.displayName="@mantine/dates/MonthLevelGroup";var xF={input:"m_6fa5e2aa"};const jc=Pe(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:f,dropdownType:c,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:y,clearable:b,clearSectionMode:w,onClear:_,clearButtonProps:S,rightSection:C,shouldClear:E,readOnly:A,disabled:T,value:j,name:N,form:q,type:R,onDropdownClose:L,withTime:B,...G}=$L("PickerInputBase",{size:"sm"},e),H=k.jsx(Nt.ClearButton,{onClick:_,unstyled:o,...S}),U=()=>{R==="range"&&Array.isArray(j)&&j[0]&&!j[1]&&_(),p.close()};return k.jsxs(k.Fragment,{children:[c==="modal"&&!A&&k.jsx(Ir,{opened:v,onClose:U,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...f,children:h}),k.jsx(Nt.Wrapper,{...t,children:k.jsxs(Tn,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||c==="modal"||A,onChange:P=>{var z;P||((z=l==null?void 0:l.onClose)==null||z.call(l),U())},children:[k.jsx(Tn.Target,{children:k.jsx(Nt,{"data-dates-input":!0,"data-read-only":A||void 0,disabled:T,component:"button",type:"button",multiline:!0,onClick:P=>{y==null||y(P),p.toggle()},__clearSection:H,__clearable:b&&E&&!A&&!T,__clearSectionMode:w,rightSection:C,...n,classNames:{...r,input:cn(xF.input,r==null?void 0:r.input)},...G,children:d||k.jsx(Nt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),k.jsx(Tn.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),k.jsx(rF,{value:j,name:N,form:q,type:R,withTime:B})]})});jc.classes=xF;jc.displayName="@mantine/dates/PickerInputBase";const zM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,LM=(e,n)=>{const t=n?iF:Hi;return Array.isArray(e)?e.map(t):t(e)};function LC({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=O.useRef(e),[o,l,f]=xi({value:LM(n,r),defaultValue:LM(t,r),finalValue:zM(e),onChange:i});let c=o;return a.current!==e&&(a.current=e,n===void 0&&(c=t!==void 0?t:zM(e),l(c))),[c,l,f]}function Ak(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function qae(e){return e===0?"month":e===1?"year":"decade"}function zd(e,n,t){return qae(Fo(Ak(e,0),Ak(n,0),Ak(t,2)))}const Hae={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Dc=Pe(e=>{const n=ge("Calendar",Hae,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,headerControlsOrder:E,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:T,__setDateRef:j,__setLevelRef:N,firstDayOfWeek:q,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:H,hideOutsideDates:U,hideWeekdays:P,getDayAriaLabel:z,monthLabelFormat:F,nextIcon:Y,previousIcon:D,__onDayClick:V,__onDayMouseEnter:W,withCellSpacing:$,highlightToday:X,withWeekNumbers:te,monthsListFormat:ae,getMonthControlProps:le,yearLabelFormat:ye,yearsListFormat:oe,getYearControlProps:ue,decadeLabelFormat:ke,classNames:ie,styles:Re,unstyled:pe,minDate:Ce,maxDate:De,locale:be,__staticSelector:_e,size:Me,__preventFocus:Be,__stopPropagation:Ve,onNextDecade:He,onPreviousDecade:We,onNextYear:Ye,onPreviousYear:rn,onNextMonth:Q,onPreviousMonth:me,static:xe,enableKeyboardNavigation:Xe,fullWidth:ne,attributes:Le,ref:en,...hn}=n,{resolvedClassNames:fn,resolvedStyles:Ze}=Ni({classNames:ie,styles:Re,props:n}),[Ke,An]=xi({value:o?zd(o,r,i):void 0,defaultValue:a?zd(a,r,i):void 0,finalValue:zd(void 0,r,i),onChange:l}),[on,ht]=LC({type:"default",value:Hi(f),defaultValue:Hi(c),onChange:h});O.useImperativeHandle(j,()=>Qe=>{ht(Qe)}),O.useImperativeHandle(N,()=>Qe=>{An(Qe)});const mt={__staticSelector:_e||"Calendar",styles:Ze,classNames:fn,unstyled:pe,size:Me,attributes:Le},zn=p||d||1,yn=O.useRef(null);if(yn.current===null){const Qe=new Date;yn.current=Ce&&ze(Qe).isAfter(Ce)?Ce:ze(Qe).format("YYYY-MM-DD")}const kn=on||yn.current,tt=()=>{const Qe=ze(kn).add(zn,"month").format("YYYY-MM-DD");Q==null||Q(Qe),ht(Qe)},At=()=>{const Qe=ze(kn).subtract(zn,"month").format("YYYY-MM-DD");me==null||me(Qe),ht(Qe)},$e=()=>{const Qe=ze(kn).add(zn,"year").format("YYYY-MM-DD");Ye==null||Ye(Qe),ht(Qe)},Fe=()=>{const Qe=ze(kn).subtract(zn,"year").format("YYYY-MM-DD");rn==null||rn(Qe),ht(Qe)},jn=()=>{const Qe=ze(kn).add(10*zn,"year").format("YYYY-MM-DD");He==null||He(Qe),ht(Qe)},Jn=()=>{const Qe=ze(kn).subtract(10*zn,"year").format("YYYY-MM-DD");We==null||We(Qe),ht(Qe)},On=O.useRef(null);return O.useEffect(()=>{if(!Xe||xe)return;const Qe=Je=>{var In;if(!((In=On.current)!=null&&In.contains(document.activeElement)))return;const nn=Je.ctrlKey||Je.metaKey,Ln=Je.shiftKey;switch(Je.key){case"ArrowUp":nn&&Ln?(Je.preventDefault(),Jn()):nn&&(Je.preventDefault(),Fe());break;case"ArrowDown":nn&&Ln?(Je.preventDefault(),jn()):nn&&(Je.preventDefault(),$e());break;case"y":case"Y":Ke==="month"&&(Je.preventDefault(),An("year"));break}};return document.addEventListener("keydown",Qe),()=>{document.removeEventListener("keydown",Qe)}},[Xe,xe,Ke,$e,Fe,jn,Jn]),k.jsxs(we,{ref:zt(On,en),size:Me,"data-calendar":!0,"data-full-width":ne||void 0,...hn,children:[Ke==="month"&&k.jsx(Vy,{month:kn,minDate:Ce,maxDate:De,firstDayOfWeek:q,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:H,hideOutsideDates:U,hideWeekdays:P,getDayAriaLabel:z,onNext:tt,onPrevious:At,hasNextLevel:i!=="month",onLevelClick:()=>An("year"),numberOfColumns:d,locale:be,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousMonth)??b,previousIcon:D,monthLabelFormat:F,__onDayClick:V,__onDayMouseEnter:W,__preventFocus:Be,__stopPropagation:Ve,static:xe,withCellSpacing:$,highlightToday:X,withWeekNumbers:te,headerControlsOrder:E,fullWidth:ne,...mt}),Ke==="year"&&k.jsx(Uy,{year:kn,numberOfColumns:d,minDate:Ce,maxDate:De,monthsListFormat:ae,getMonthControlProps:le,locale:be,onNext:$e,onPrevious:Fe,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>An("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousYear)??b,previousIcon:D,yearLabelFormat:ye,__onControlMouseEnter:C,__onControlClick:(Qe,Je)=>{T&&ht(Je),An(zd("month",r,i)),_==null||_(Je)},__preventFocus:Be,__stopPropagation:Ve,withCellSpacing:$,headerControlsOrder:E,fullWidth:ne,...mt}),Ke==="decade"&&k.jsx(Hy,{decade:kn,minDate:Ce,maxDate:De,yearsListFormat:oe,getYearControlProps:ue,locale:be,onNext:jn,onPrevious:Jn,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??y,nextIcon:Y,previousLabel:(v==null?void 0:v.previousDecade)??b,previousIcon:D,decadeLabelFormat:ke,__onControlMouseEnter:S,__onControlClick:(Qe,Je)=>{A&&ht(Je),An(zd("year",r,i)),w==null||w(Je)},__preventFocus:Be,__stopPropagation:Ve,withCellSpacing:$,headerControlsOrder:E,fullWidth:ne,...mt})]})});Dc.classes={...Hy.classes,...Uy.classes,...Vy.classes};Dc.displayName="@mantine/dates/Calendar";function Wy(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:E,onPreviousMonth:A,onNextYear:T,onPreviousYear:j,onNextDecade:N,onPreviousDecade:q,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:H,__setLevelRef:U,withWeekNumbers:P,headerControlsOrder:z,firstDayOfWeek:F,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:te,getDayAriaLabel:ae,monthLabelFormat:le,monthsListFormat:ye,getMonthControlProps:oe,yearLabelFormat:ue,yearsListFormat:ke,getYearControlProps:ie,decadeLabelFormat:Re,allowSingleDateInRange:pe,allowDeselect:Ce,minDate:De,maxDate:be,locale:_e,...Me}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:y,previousLabel:b,onYearSelect:w,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:C,onNextMonth:E,onPreviousMonth:A,onNextYear:T,onPreviousYear:j,onNextDecade:N,onPreviousDecade:q,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:H,withWeekNumbers:P,headerControlsOrder:z,firstDayOfWeek:F,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:te,getDayAriaLabel:ae,monthLabelFormat:le,monthsListFormat:ye,getMonthControlProps:oe,yearLabelFormat:ue,yearsListFormat:ke,getYearControlProps:ie,decadeLabelFormat:Re,allowSingleDateInRange:pe,allowDeselect:Ce,minDate:De,maxDate:be,locale:_e},others:Me}}function IM(e,n){const t=[...n].sort((i,r)=>ze(i).isAfter(ze(r))?1:-1);return ze(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&ze(t[1]).endOf("day").add(1,"ms").isAfter(e)}function SF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[f,c]=LC({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=O.useState(e==="range"&&f[0]&&!f[1]?f[0]:null),[p,v]=O.useState(null),y=A=>{if(e==="range"){if(h&&!f[1]){if(ze(A).isSame(h,n)&&!a){d(null),v(null),c([null,null]);return}const T=[A,h];T.sort((j,N)=>ze(j).isAfter(ze(N))?1:-1),c(T),v(null),d(null);return}if(f[0]&&!f[1]&&ze(A).isSame(f[0],n)&&!a){d(null),v(null),c([null,null]);return}c([A,null]),v(null),d(A);return}if(e==="multiple"){f.some(T=>ze(T).isSame(A,n))?c(f.filter(T=>!ze(T).isSame(A,n))):c([...f,A]);return}f&&o&&ze(A).isSame(f,n)?c(null):c(A)},b=A=>h&&p?IM(A,[p,h]):f[0]&&f[1]?IM(A,f):!1,w=e==="range"?A=>{l==null||l(A),v(null)}:l,_=A=>f[0]&&ze(A).isSame(f[0],n)?!(p&&ze(p).isBefore(f[0])):!1,S=A=>f[1]?ze(A).isSame(f[1],n):!f[0]||!p?!1:ze(p).isBefore(f[0])&&ze(A).isSame(f[0],n),C=A=>{if(e==="range")return{selected:f.some(j=>j&&ze(j).isSame(A,n)),inRange:b(A),firstInRange:_(A),lastInRange:S(A),"data-autofocus":!!f[0]&&ze(f[0]).isSame(A,n)||void 0};if(e==="multiple")return{selected:f.some(j=>j&&ze(j).isSame(A,n)),"data-autofocus":!!f[0]&&ze(f[0]).isSame(A,n)||void 0};const T=ze(f).isSame(A,n);return{selected:T,"data-autofocus":T||void 0}},E=e==="range"&&h?v:()=>{};return O.useEffect(()=>{if(e==="range")if(f[0]&&!f[1])d(f[0]);else{const A=f[0]==null&&f[1]==null,T=f[0]!=null&&f[1]!=null;(A||T)&&(d(null),v(null))}},[f]),{onDateChange:y,onRootMouseLeave:w,onHoveredDateChange:E,getControlProps:C,_value:f,setValue:c}}var CF={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const AF=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":Zt(n)}}),Uae={type:"default"},Um=Pe(e=>{const n=ge("MonthPicker",Uae,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:f,__staticSelector:c,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:y,__updateDateOnMonthSelect:b,__onPresetSelect:w,__stopPropagation:_,presets:S,className:C,style:E,unstyled:A,size:T,attributes:j,onLevelChange:N,...q}=n,{calendarProps:R,others:L}=Wy(q),B=O.useRef(null),G=O.useRef(null),H=Ge({name:c||"MonthPicker",classes:CF,props:n,className:C,style:E,classNames:t,styles:i,unstyled:A,attributes:j,rootSelector:S?"monthPickerRoot":void 0,varsResolver:AF,vars:r}),{onDateChange:U,onRootMouseLeave:P,onHoveredDateChange:z,getControlProps:F,setValue:Y}=SF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:f,onMouseLeave:v}),{resolvedClassNames:D,resolvedStyles:V}=Ni({classNames:t,styles:i,props:n}),W=k.jsx(Dc,{classNames:D,styles:V,size:T,...R,...S?{}:L,minLevel:"year",__updateDateOnMonthSelect:b??!1,__staticSelector:c||"MonthPicker",onMouseLeave:P,onMonthMouseEnter:(te,ae)=>z(ae),onMonthSelect:te=>{U(te),y==null||y(te)},getMonthControlProps:te=>({...F(te),...h==null?void 0:h(te)}),onLevelChange:N,__setDateRef:B,__setLevelRef:G,__stopPropagation:_,attributes:j,...S?{}:{className:C,style:E}});if(!S)return W;const $=te=>{var le,ye;const ae=Array.isArray(te)?te[0]:te;ae!==void 0&&((le=B.current)==null||le.call(B,ae),(ye=G.current)==null||ye.call(G,"year"),w?w(ae):Y(te))},X=S.map((te,ae)=>k.jsx(fi,{...H("presetButton"),onClick:()=>$(te.value),onMouseDown:le=>le.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:te.label},ae));return k.jsxs(we,{...H("monthPickerRoot"),size:T,...L,children:[k.jsx("div",{...H("presetsList"),children:X}),W]})});Um.classes={...Dc.classes,...CF};Um.varsResolver=AF;Um.displayName="@mantine/dates/MonthPicker";var Vae={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const OF=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":Zt(n)}}),Wae={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},Vm=Pe(e=>{const n=ge("DatePicker",Wae,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:f,styles:c,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:y,presets:b,className:w,style:_,unstyled:S,size:C,vars:E,attributes:A,...T}=n,{calendarProps:j,others:N}=Wy(T),q=O.useRef(null),R=O.useRef(null),L=Ge({name:h||"DatePicker",classes:Vae,props:n,className:w,style:_,classNames:f,styles:c,unstyled:S,attributes:A,rootSelector:b?"datePickerRoot":void 0,varsResolver:OF,vars:E}),{onDateChange:B,onRootMouseLeave:G,onHoveredDateChange:H,getControlProps:U,_value:P,setValue:z}=SF({type:N.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:F,resolvedStyles:Y}=Ni({classNames:f,styles:c,props:n}),D=k.jsx(Dc,{classNames:F,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:C,...j,...b?{}:N,__stopPropagation:y,__setDateRef:q,__setLevelRef:R,minLevel:j.minLevel||"month",__onDayMouseEnter:($,X)=>{H(X),p==null||p($,X)},__onDayClick:($,X)=>{B(X),d==null||d($,X)},getDayProps:$=>{var X;return{...U($),...(X=j.getDayProps)==null?void 0:X.call(j,$)}},getMonthControlProps:$=>{var X;return{selected:typeof P=="string"?zC($,P):!1,...(X=j.getMonthControlProps)==null?void 0:X.call(j,$)}},getYearControlProps:$=>{var X;return{selected:typeof P=="string"?ze($).isSame(P,"year"):!1,...(X=j.getYearControlProps)==null?void 0:X.call(j,$)}},hideOutsideDates:j.hideOutsideDates??j.numberOfColumns!==1,attributes:A,...b?{}:{className:w,style:_}});if(!b)return D;const V=$=>{var te,ae;const X=Array.isArray($)?$[0]:$;X!==void 0&&((te=q.current)==null||te.call(q,X),(ae=R.current)==null||ae.call(R,"month"),v?v(X):z($))},W=b.map(($,X)=>k.jsx(fi,{...L("presetButton"),onClick:()=>V($.value),onMouseDown:te=>te.preventDefault(),"data-mantine-stop-propagation":y||void 0,children:$.label},X));return k.jsxs(we,{...L("datePickerRoot"),size:C,...N,children:[k.jsx("div",{...L("presetsList"),children:W}),D]})});Vm.classes=Dc.classes;Vm.varsResolver=OF;Vm.displayName="@mantine/dates/DatePicker";function EF({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:f,valueFormatter:c}){const h=sl(),[d,p]=Q$(!1),[v,y]=LC({type:e,value:n,defaultValue:t,onChange:i}),b=cae({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(f),formatter:c}),w=S=>{o&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),y(l&&e==="multiple"?[...S].sort((C,E)=>ze(C).isAfter(ze(E))?1:-1):S)};return{_value:v,setValue:w,onClear:()=>w(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:b,dropdownOpened:d,dropdownHandlers:p}}const Gae={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},IC=Pe(e=>{const n=ge("MonthPickerInput",Gae,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:y,dropdownType:b,sortDates:w,minDate:_,maxDate:S,vars:C,valueFormatter:E,presets:A,attributes:T,...j}=n,{resolvedClassNames:N,resolvedStyles:q}=Ni({classNames:c,styles:h,props:n}),{calendarProps:R,others:L}=Wy(j),{_value:B,setValue:G,formattedValue:H,dropdownHandlers:U,dropdownOpened:P,onClear:z,shouldClear:F}=EF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:w,valueFormatter:E});return k.jsx(jc,{formattedValue:H,dropdownOpened:P,dropdownHandlers:U,classNames:N,styles:q,unstyled:d,onClear:z,shouldClear:F,value:B,size:v,variant:y,dropdownType:b,...L,attributes:T,type:t,__staticSelector:"MonthPickerInput",children:k.jsx(Um,{...R,size:v,variant:y,type:t,value:B,defaultDate:R.defaultDate||(Array.isArray(B)?B[0]||kS({maxDate:S,minDate:_}):B||kS({maxDate:S,minDate:_})),onChange:G,locale:f,classNames:N,styles:q,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:b==="popover",minDate:_,maxDate:S,presets:A,attributes:T})})});IC.classes={...jc.classes,...Um.classes};IC.displayName="@mantine/dates/MonthPickerInput";const Yae={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},lu=Pe(e=>{const n=ge("DatePickerInput",Yae,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:y,dropdownType:b,sortDates:w,minDate:_,maxDate:S,vars:C,defaultDate:E,valueFormatter:A,presets:T,attributes:j,...N}=n,{resolvedClassNames:q,resolvedStyles:R}=Ni({classNames:c,styles:h,props:n}),{calendarProps:L,others:B}=Wy(N),{_value:G,setValue:H,formattedValue:U,dropdownHandlers:P,dropdownOpened:z,onClear:F,shouldClear:Y}=EF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:w,valueFormatter:A}),D=Array.isArray(G)?G[0]||E:G||E;return k.jsx(jc,{formattedValue:U,dropdownOpened:z,dropdownHandlers:P,classNames:q,styles:R,unstyled:d,onClear:F,shouldClear:Y,value:G,size:v,variant:y,dropdownType:b,...B,type:t,__staticSelector:"DatePickerInput",attributes:j,children:k.jsx(Vm,{...L,size:v,variant:y,type:t,value:G,defaultDate:D||kS({maxDate:S,minDate:_}),onChange:H,locale:f,classNames:q,styles:R,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:b==="popover",minDate:_,maxDate:S,presets:T,attributes:j})})});lu.classes={...jc.classes,...Vm.classes};lu.displayName="@mantine/dates/DatePickerInput";/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */var Kae={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Cn=(e,n,t,i)=>{const r=O.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:f,className:c,children:h,...d},p)=>O.createElement("svg",{ref:p,...Kae[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,c].join(" "),strokeWidth:l,stroke:a,...d},[f&&O.createElement("title",{key:"svg-title"},f),...i.map(([v,y])=>O.createElement(v,y)),...Array.isArray(h)?h:[h]]));return r.displayName=`${t}`,r};/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Xae=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],Zae=Cn("outline","alert-triangle","AlertTriangle",Xae);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Qae=[["path",{d:"M8 4h11a2 2 0 1 1 0 4h-7m-4 0h-3a2 2 0 0 1 -.826 -3.822",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 1.824 -1.18m.176 -3.82v-7",key:"svg-1"}],["path",{d:"M10 12h2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],Jae=Cn("outline","archive-off","ArchiveOff",Qae);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const eoe=[["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]],noe=Cn("outline","archive","Archive",eoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const toe=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],ioe=Cn("outline","arrow-back-up","ArrowBackUp",toe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const roe=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M3 12l18 0",key:"svg-2"}]],aoe=Cn("outline","arrows-horizontal","ArrowsHorizontal",roe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ooe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]],TF=Cn("outline","calendar-due","CalendarDue",ooe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const soe=[["path",{d:"M9 5h9a2 2 0 0 1 2 2v9m-.184 3.839a2 2 0 0 1 -1.816 1.161h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 1.158 -1.815",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v1",key:"svg-2"}],["path",{d:"M4 11h7m4 0h5",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]],loe=Cn("outline","calendar-off","CalendarOff",soe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const uoe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],foe=Cn("outline","calendar","Calendar",uoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const coe=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],doe=Cn("outline","chart-bar","ChartBar",coe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const hoe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],MF=Cn("outline","check","Check",hoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const moe=[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]],$h=Cn("outline","checkbox","Checkbox",moe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const poe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],jF=Cn("outline","chevron-down","ChevronDown",poe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const voe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],DF=Cn("outline","chevron-right","ChevronRight",voe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const goe=[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2",key:"svg-1"}],["path",{d:"M9 12l.01 0",key:"svg-2"}],["path",{d:"M13 12l2 0",key:"svg-3"}],["path",{d:"M9 16l.01 0",key:"svg-4"}],["path",{d:"M13 16l2 0",key:"svg-5"}]],BM=Cn("outline","clipboard-list","ClipboardList",goe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const yoe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],boe=Cn("outline","clock-hour-4","ClockHour4",yoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const woe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],FM=Cn("outline","clock","Clock",woe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const koe=[["path",{d:"M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16",key:"svg-0"}],["path",{d:"M9 3v18",key:"svg-1"}],["path",{d:"M15 3v18",key:"svg-2"}]],_oe=Cn("outline","columns-3","Columns3",koe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const xoe=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],RF=Cn("outline","dots-vertical","DotsVertical",xoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Soe=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],ih=Cn("outline","edit","Edit",Soe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Coe=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],PF=Cn("outline","grip-vertical","GripVertical",Coe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Aoe=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],Ooe=Cn("outline","history","History",Aoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Eoe=[["path",{d:"M6.5 7h11",key:"svg-0"}],["path",{d:"M6.5 17h11",key:"svg-1"}],["path",{d:"M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1",key:"svg-2"}],["path",{d:"M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1",key:"svg-3"}]],NF=Cn("outline","hourglass","Hourglass",Eoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Toe=[["path",{d:"M4 4l6 0",key:"svg-0"}],["path",{d:"M14 4l6 0",key:"svg-1"}],["path",{d:"M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8",key:"svg-2"}],["path",{d:"M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-3"}]],_S=Cn("outline","layout-kanban","LayoutKanban",Toe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Moe=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-5a4 4 0 0 1 8 0",key:"svg-2"}]],$F=Cn("outline","lock-open","LockOpen",Moe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const joe=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],Gl=Cn("outline","lock","Lock",joe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Doe=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],Roe=Cn("outline","logout","Logout",Doe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Poe=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],Noe=Cn("outline","menu-2","Menu2",Poe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const $oe=[["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-0"}],["path",{d:"M9.5 9h.01",key:"svg-1"}],["path",{d:"M14.5 9h.01",key:"svg-2"}],["path",{d:"M9.5 13a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],zF=Cn("outline","message-chatbot","MessageChatbot",$oe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const zoe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],Loe=Cn("outline","mood-smile","MoodSmile",zoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ioe=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],BC=Cn("outline","palette","Palette",Ioe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Boe=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Foe=Cn("outline","pencil","Pencil",Boe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const qoe=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],zh=Cn("outline","plus","Plus",qoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Hoe=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],Uoe=Cn("outline","refresh","Refresh",Hoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Voe=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],Woe=Cn("outline","search","Search",Voe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Goe=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],Yoe=Cn("outline","send","Send",Goe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Koe=[["path",{d:"M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3",key:"svg-1"}]],Xoe=Cn("outline","tag","Tag",Koe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Zoe=[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]],Qoe=Cn("outline","trash-x","TrashX",Zoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Joe=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],Lh=Cn("outline","trash","Trash",Joe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ese=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],qM=Cn("outline","trending-up","TrendingUp",ese);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const nse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],tse=Cn("outline","user-circle","UserCircle",nse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ise=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4c.348 0 .686 .045 1.009 .128",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}]],rse=Cn("outline","user-minus","UserMinus",ise);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ase=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]],ose=Cn("outline","user-plus","UserPlus",ase);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const sse=[["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M6 21v-1a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v1",key:"svg-1"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-2"}]],lse=Cn("outline","user-square","UserSquare",sse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const use=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],fse=Cn("outline","user","User",use);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const cse=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],rh=Cn("outline","x","X",cse);function HM({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],onSubmit:a,onCancel:o}){const[l,f]=O.useState((e==null?void 0:e.requester)??""),[c,h]=O.useState((e==null?void 0:e.title)??""),[d,p]=O.useState((e==null?void 0:e.description)??""),[v,y]=O.useState((e==null?void 0:e.assignee_id)??null),[b,w]=O.useState((e==null?void 0:e.tags)??[]),_=async E=>{E==null||E.preventDefault();const A=c.trim();A&&await a({requester:l.trim(),title:A,description:d,assignee_id:v,tags:b})},S=E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),_())},C=E=>{E.key==="Enter"&&(E.ctrlKey||E.metaKey)&&(E.preventDefault(),_())};return k.jsx("form",{onSubmit:_,children:k.jsxs($t,{gap:"sm",children:[k.jsx(Th,{label:"Tarea",value:c,onChange:E=>h(E.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),_())}}),k.jsx(ry,{label:"Solicitante",value:l,onChange:f,data:i,tabIndex:2,autoComplete:"off",onKeyDown:S,placeholder:"Empieza a escribir y elige uno existente",limit:10}),k.jsx(Th,{label:"Descripcion",value:d,onChange:E=>p(E.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:C,description:"Ctrl+Enter para guardar"}),k.jsx(Zo,{label:"Asignar a",placeholder:"Sin asignar",value:v,onChange:E=>y(E),data:t.map(E=>({value:E.id,label:E.display_name||E.username})),clearable:!0,searchable:!0,tabIndex:4}),k.jsx(kC,{label:"Tags",value:b,onChange:w,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),k.jsxs(wn,{justify:"flex-end",gap:"xs",mt:"xs",children:[k.jsx(Bt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),k.jsx(Bt,{tabIndex:6,type:"submit",disabled:!c.trim(),children:n})]})]})})}function dse(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const hse=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mse=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pse={};function UM(e,n){return(pse.jsx?mse:hse).test(e)}const vse=/[ \t\n\f\r]/g;function gse(e){return typeof e=="object"?e.type==="text"?VM(e.value):!1:VM(e)}function VM(e){return e.replace(vse,"")===""}class Wm{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}Wm.prototype.normal={};Wm.prototype.property={};Wm.prototype.space=void 0;function LF(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new Wm(t,i,n)}function xS(e){return e.toLowerCase()}class yr{constructor(n,t){this.attribute=t,this.property=n}}yr.prototype.attribute="";yr.prototype.booleanish=!1;yr.prototype.boolean=!1;yr.prototype.commaOrSpaceSeparated=!1;yr.prototype.commaSeparated=!1;yr.prototype.defined=!1;yr.prototype.mustUseProperty=!1;yr.prototype.number=!1;yr.prototype.overloadedBoolean=!1;yr.prototype.property="";yr.prototype.spaceSeparated=!1;yr.prototype.space=void 0;let yse=0;const Nn=Cu(),si=Cu(),SS=Cu(),Ie=Cu(),Ot=Cu(),Rf=Cu(),jr=Cu();function Cu(){return 2**++yse}const CS=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nn,booleanish:si,commaOrSpaceSeparated:jr,commaSeparated:Rf,number:Ie,overloadedBoolean:SS,spaceSeparated:Ot},Symbol.toStringTag,{value:"Module"})),Ok=Object.keys(CS);class FC extends yr{constructor(n,t,i,r){let a=-1;if(super(n,t),WM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&xse.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(GM,Ase);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!GM.test(a)){let o=a.replace(_se,Cse);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=FC}return new r(i,n)}function Cse(e){return"-"+e.toLowerCase()}function Ase(e){return e.charAt(1).toUpperCase()}const Ose=LF([IF,bse,qF,HF,UF],"html"),qC=LF([IF,wse,qF,HF,UF],"svg");function Ese(e){return e.join(" ").trim()}var gf={},Ek,YM;function Tse(){if(YM)return Ek;YM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,f=` +`,c="/",h="*",d="",p="comment",v="declaration";function y(w,_){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];_=_||{};var S=1,C=1;function E(H){var U=H.match(n);U&&(S+=U.length);var P=H.lastIndexOf(f);C=~P?H.length-P:C+H.length}function A(){var H={line:S,column:C};return function(U){return U.position=new T(H),q(),U}}function T(H){this.start=H,this.end={line:S,column:C},this.source=_.source}T.prototype.content=w;function j(H){var U=new Error(_.source+":"+S+":"+C+": "+H);if(U.reason=H,U.filename=_.source,U.line=S,U.column=C,U.source=w,!_.silent)throw U}function N(H){var U=H.exec(w);if(U){var P=U[0];return E(P),w=w.slice(P.length),U}}function q(){N(t)}function R(H){var U;for(H=H||[];U=L();)U!==!1&&H.push(U);return H}function L(){var H=A();if(!(c!=w.charAt(0)||h!=w.charAt(1))){for(var U=2;d!=w.charAt(U)&&(h!=w.charAt(U)||c!=w.charAt(U+1));)++U;if(U+=2,d===w.charAt(U-1))return j("End of comment missing");var P=w.slice(2,U-2);return C+=2,E(P),w=w.slice(U),C+=2,H({type:p,comment:P})}}function B(){var H=A(),U=N(i);if(U){if(L(),!N(r))return j("property missing ':'");var P=N(a),z=H({type:v,property:b(U[0].replace(e,d)),value:P?b(P[0].replace(e,d)):d});return N(o),z}}function G(){var H=[];R(H);for(var U;U=B();)U!==!1&&(H.push(U),R(H));return H}return q(),G()}function b(w){return w?w.replace(l,d):d}return Ek=y,Ek}var KM;function Mse(){if(KM)return gf;KM=1;var e=gf&&gf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(gf,"__esModule",{value:!0}),gf.default=t;const n=e(Tse());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(f=>{if(f.type!=="declaration")return;const{property:c,value:h}=f;l?r(c,h,f):h&&(a=a||{},a[c]=h)}),a}return gf}var Ld={},XM;function jse(){if(XM)return Ld;XM=1,Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(c){return!c||t.test(c)||e.test(c)},o=function(c,h){return h.toUpperCase()},l=function(c,h){return"".concat(h,"-")},f=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(r,l):c=c.replace(i,l),c.replace(n,o))};return Ld.camelCase=f,Ld}var Id,ZM;function Dse(){if(ZM)return Id;ZM=1;var e=Id&&Id.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(Mse()),t=jse();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,f){l&&f&&(o[(0,t.camelCase)(l,a)]=f)}),o}return i.default=i,Id=i,Id}var Rse=Dse();const Pse=ot(Rse),VF=WF("end"),HC=WF("start");function WF(e){return n;function n(t){const i=t&&t.position&&t.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Nse(e){const n=HC(e),t=VF(e);if(n&&t)return{start:n,end:t}}function ph(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?QM(e.position):"start"in e||"end"in e?QM(e):"line"in e||"column"in e?AS(e):""}function AS(e){return JM(e&&e.line)+":"+JM(e&&e.column)}function QM(e){return AS(e&&e.start)+"-"+AS(e&&e.end)}function JM(e){return e&&typeof e=="number"?e:1}class Yi extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=ph(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Yi.prototype.file="";Yi.prototype.name="";Yi.prototype.reason="";Yi.prototype.message="";Yi.prototype.stack="";Yi.prototype.column=void 0;Yi.prototype.line=void 0;Yi.prototype.ancestors=void 0;Yi.prototype.cause=void 0;Yi.prototype.fatal=void 0;Yi.prototype.place=void 0;Yi.prototype.ruleId=void 0;Yi.prototype.source=void 0;const UC={}.hasOwnProperty,$se=new Map,zse=/[A-Z]/g,Lse=new Set(["table","tbody","thead","tfoot","tr"]),Ise=new Set(["td","th"]),GF="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Bse(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Yse(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Gse(t,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?qC:Ose,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=YF(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function YF(e,n,t){if(n.type==="element")return Fse(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return qse(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Use(e,n,t);if(n.type==="mdxjsEsm")return Hse(e,n);if(n.type==="root")return Vse(e,n,t);if(n.type==="text")return Wse(e,n)}function Fse(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=qC,e.schema=r),e.ancestors.push(n);const a=XF(e,n.tagName,!1),o=Kse(e,n);let l=WC(e,n);return Lse.has(n.tagName)&&(l=l.filter(function(f){return typeof f=="string"?!gse(f):!0})),KF(e,o,a,n),VC(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function qse(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ih(e,n.position)}function Hse(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ih(e,n.position)}function Use(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=qC,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:XF(e,n.name,!0),o=Xse(e,n),l=WC(e,n);return KF(e,o,a,n),VC(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Vse(e,n,t){const i={};return VC(i,WC(e,n)),e.create(n,e.Fragment,i,t)}function Wse(e,n){return n.value}function KF(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function VC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Gse(e,n,t){return i;function i(r,a,o,l){const c=Array.isArray(o.children)?t:n;return l?c(a,o,l):c(a,o)}}function Yse(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),f=HC(i);return n(r,a,o,l,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Kse(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&UC.call(n.properties,r)){const a=Zse(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Ise.has(n.tagName)?i=l:t[o]=l}}if(i){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return t}function Xse(e,n){const t={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else Ih(e,n.position);else{const r=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const l=i.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Ih(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function WC(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:$se;for(;++ir?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(Lr(e,e.length,0,n),e):n}const tj={}.hasOwnProperty;function QF(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ja(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const er=ul(/[A-Za-z]/),Ui=ul(/[\dA-Za-z]/),ole=ul(/[#-'*+\--9=?A-Z^-~]/);function Ag(e){return e!==null&&(e<32||e===127)}const OS=ul(/\d/),sle=ul(/[\dA-Fa-f]/),lle=ul(/[!-/:-@[-`{-~]/);function pn(e){return e!==null&&e<-2}function Ct(e){return e!==null&&(e<0||e===32)}function Vn(e){return e===-2||e===-1||e===32}const Gy=ul(new RegExp("\\p{P}|\\p{S}","u")),uu=ul(/\s/);function ul(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Pc(e){const n=[];let t=-1,i=0,r=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),r=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(i,t),encodeURIComponent(o)),i=t+r+1,o=""),r&&(t+=r,r=0)}return n.join("")+e.slice(i)}function Qn(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(f){return Vn(f)?(e.enter(t),l(f)):n(f)}function l(f){return Vn(f)&&a++o))return;const j=n.events.length;let N=j,q,R;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(q){R=n.events[N][1].end;break}q=!0}for(_(i),T=j;TC;){const A=t[E];n.containerState=A[1],A[0].exit.call(n,e)}t.length=C}function S(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function hle(e,n,t){return Qn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hf(e){if(e===null||Ct(e)||uu(e))return 1;if(Gy(e))return 2}function Yy(e,n,t){const i=[];let r=-1;for(;++r1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[i][1].end},p={...e[t][1].start};rj(d,-f),rj(p,f),o={type:f>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:f>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:f>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=aa(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=aa(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),c=aa(c,Yy(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=aa(c,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,c=aa(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Lr(e,i-1,t-i+3,c),t=i+c.length-h-2;break}}for(t=-1;++t0&&Vn(T)?Qn(e,S,"linePrefix",a+1)(T):S(T)}function S(T){return T===null||pn(T)?e.check(aj,b,E)(T):(e.enter("codeFlowValue"),C(T))}function C(T){return T===null||pn(T)?(e.exit("codeFlowValue"),S(T)):(e.consume(T),C)}function E(T){return e.exit("codeFenced"),n(T)}function A(T,j,N){let q=0;return R;function R(U){return T.enter("lineEnding"),T.consume(U),T.exit("lineEnding"),L}function L(U){return T.enter("codeFencedFence"),Vn(U)?Qn(T,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):B(U)}function B(U){return U===l?(T.enter("codeFencedFenceSequence"),G(U)):N(U)}function G(U){return U===l?(q++,T.consume(U),G):q>=o?(T.exit("codeFencedFenceSequence"),Vn(U)?Qn(T,H,"whitespace")(U):H(U)):N(U)}function H(U){return U===null||pn(U)?(T.exit("codeFencedFence"),j(U)):N(U)}}}function Cle(e,n,t){const i=this;return r;function r(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}const Mk={name:"codeIndented",tokenize:Ole},Ale={partial:!0,tokenize:Ele};function Ole(e,n,t){const i=this;return r;function r(c){return e.enter("codeIndented"),Qn(e,a,"linePrefix",5)(c)}function a(c){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?f(c):pn(c)?e.attempt(Ale,o,f)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||pn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function f(c){return e.exit("codeIndented"),n(c)}}function Ele(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):pn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):Qn(e,a,"linePrefix",5)(o)}function a(o){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):pn(o)?r(o):t(o)}}const Tle={name:"codeText",previous:jle,resolve:Mle,tokenize:Dle};function Mle(e){let n=e.length-4,t=3,i,r;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=t;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,t,i){const r=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&Bd(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Bd(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Bd(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(i.parser.constructs.flow,t,n)(o)}}function rq(e,n,t,i,r,a,o,l,f){const c=f||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Ag(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),b(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||pn(_)?t(_):(e.consume(_),_===92?y:v)}function y(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function b(_){return!h&&(_===null||_===41||Ct(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!f||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):pn(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||pn(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),f||(f=!Vn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function oq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,f):t(p)}function f(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),f(o)):p===null?t(p):pn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Qn(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||pn(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function vh(e,n){let t;return i;function i(r){return pn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Vn(r)?Qn(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const Ble={name:"definition",tokenize:qle},Fle={partial:!0,tokenize:Hle};function qle(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return aq.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=ja(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):t(v)}function f(v){return Ct(v)?vh(e,c)(v):c(v)}function c(v){return rq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(Fle,d,d)(v)}function d(v){return Vn(v)?Qn(e,p,"whitespace")(v):p(v)}function p(v){return v===null||pn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function Hle(e,n,t){return i;function i(l){return Ct(l)?vh(e,r)(l):t(l)}function r(l){return oq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Vn(l)?Qn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||pn(l)?n(l):t(l)}}const Ule={name:"hardBreakEscape",tokenize:Vle};function Vle(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return pn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Wle={name:"headingAtx",resolve:Gle,tokenize:Yle};function Gle(e,n){let t=e.length-2,i=3,r,a;return e[i][1].type==="whitespace"&&(i+=2),t-2>i&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(i===t-1||t-4>i&&e[t-2][1].type==="whitespace")&&(t-=i+1===t?2:4),t>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[t][1].end},a={type:"chunkText",start:e[i][1].start,end:e[t][1].end,contentType:"text"},Lr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Yle(e,n,t){let i=0;return r;function r(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&i++<6?(e.consume(h),o):h===null||Ct(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||pn(h)?(e.exit("atxHeading"),n(h)):Vn(h)?Qn(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||Ct(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const Kle=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],sj=["pre","script","style","textarea"],Xle={concrete:!0,name:"htmlFlow",resolveTo:Jle,tokenize:eue},Zle={partial:!0,tokenize:tue},Qle={partial:!0,tokenize:nue};function Jle(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function eue(e,n,t){const i=this;let r,a,o,l,f;return c;function c($){return h($)}function h($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),d}function d($){return $===33?(e.consume($),p):$===47?(e.consume($),a=!0,b):$===63?(e.consume($),r=3,i.interrupt?n:D):er($)?(e.consume($),o=String.fromCharCode($),w):t($)}function p($){return $===45?(e.consume($),r=2,v):$===91?(e.consume($),r=5,l=0,y):er($)?(e.consume($),r=4,i.interrupt?n:D):t($)}function v($){return $===45?(e.consume($),i.interrupt?n:D):t($)}function y($){const X="CDATA[";return $===X.charCodeAt(l++)?(e.consume($),l===X.length?i.interrupt?n:B:y):t($)}function b($){return er($)?(e.consume($),o=String.fromCharCode($),w):t($)}function w($){if($===null||$===47||$===62||Ct($)){const X=$===47,te=o.toLowerCase();return!X&&!a&&sj.includes(te)?(r=1,i.interrupt?n($):B($)):Kle.includes(o.toLowerCase())?(r=6,X?(e.consume($),_):i.interrupt?n($):B($)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t($):a?S($):C($))}return $===45||Ui($)?(e.consume($),o+=String.fromCharCode($),w):t($)}function _($){return $===62?(e.consume($),i.interrupt?n:B):t($)}function S($){return Vn($)?(e.consume($),S):R($)}function C($){return $===47?(e.consume($),R):$===58||$===95||er($)?(e.consume($),E):Vn($)?(e.consume($),C):R($)}function E($){return $===45||$===46||$===58||$===95||Ui($)?(e.consume($),E):A($)}function A($){return $===61?(e.consume($),T):Vn($)?(e.consume($),A):C($)}function T($){return $===null||$===60||$===61||$===62||$===96?t($):$===34||$===39?(e.consume($),f=$,j):Vn($)?(e.consume($),T):N($)}function j($){return $===f?(e.consume($),f=null,q):$===null||pn($)?t($):(e.consume($),j)}function N($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||Ct($)?A($):(e.consume($),N)}function q($){return $===47||$===62||Vn($)?C($):t($)}function R($){return $===62?(e.consume($),L):t($)}function L($){return $===null||pn($)?B($):Vn($)?(e.consume($),L):t($)}function B($){return $===45&&r===2?(e.consume($),P):$===60&&r===1?(e.consume($),z):$===62&&r===4?(e.consume($),V):$===63&&r===3?(e.consume($),D):$===93&&r===5?(e.consume($),Y):pn($)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Zle,W,G)($)):$===null||pn($)?(e.exit("htmlFlowData"),G($)):(e.consume($),B)}function G($){return e.check(Qle,H,W)($)}function H($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),U}function U($){return $===null||pn($)?G($):(e.enter("htmlFlowData"),B($))}function P($){return $===45?(e.consume($),D):B($)}function z($){return $===47?(e.consume($),o="",F):B($)}function F($){if($===62){const X=o.toLowerCase();return sj.includes(X)?(e.consume($),V):B($)}return er($)&&o.length<8?(e.consume($),o+=String.fromCharCode($),F):B($)}function Y($){return $===93?(e.consume($),D):B($)}function D($){return $===62?(e.consume($),V):$===45&&r===2?(e.consume($),D):B($)}function V($){return $===null||pn($)?(e.exit("htmlFlowData"),W($)):(e.consume($),V)}function W($){return e.exit("htmlFlow"),n($)}}function nue(e,n,t){const i=this;return r;function r(o){return pn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}function tue(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Gm,n,t)}}const iue={name:"htmlText",tokenize:rue};function rue(e,n,t){const i=this;let r,a,o;return l;function l(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),f}function f(D){return D===33?(e.consume(D),c):D===47?(e.consume(D),A):D===63?(e.consume(D),C):er(D)?(e.consume(D),N):t(D)}function c(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,y):er(D)?(e.consume(D),S):t(D)}function h(D){return D===45?(e.consume(D),v):t(D)}function d(D){return D===null?t(D):D===45?(e.consume(D),p):pn(D)?(o=d,z(D)):(e.consume(D),d)}function p(D){return D===45?(e.consume(D),v):d(D)}function v(D){return D===62?P(D):D===45?p(D):d(D)}function y(D){const V="CDATA[";return D===V.charCodeAt(a++)?(e.consume(D),a===V.length?b:y):t(D)}function b(D){return D===null?t(D):D===93?(e.consume(D),w):pn(D)?(o=b,z(D)):(e.consume(D),b)}function w(D){return D===93?(e.consume(D),_):b(D)}function _(D){return D===62?P(D):D===93?(e.consume(D),_):b(D)}function S(D){return D===null||D===62?P(D):pn(D)?(o=S,z(D)):(e.consume(D),S)}function C(D){return D===null?t(D):D===63?(e.consume(D),E):pn(D)?(o=C,z(D)):(e.consume(D),C)}function E(D){return D===62?P(D):C(D)}function A(D){return er(D)?(e.consume(D),T):t(D)}function T(D){return D===45||Ui(D)?(e.consume(D),T):j(D)}function j(D){return pn(D)?(o=j,z(D)):Vn(D)?(e.consume(D),j):P(D)}function N(D){return D===45||Ui(D)?(e.consume(D),N):D===47||D===62||Ct(D)?q(D):t(D)}function q(D){return D===47?(e.consume(D),P):D===58||D===95||er(D)?(e.consume(D),R):pn(D)?(o=q,z(D)):Vn(D)?(e.consume(D),q):P(D)}function R(D){return D===45||D===46||D===58||D===95||Ui(D)?(e.consume(D),R):L(D)}function L(D){return D===61?(e.consume(D),B):pn(D)?(o=L,z(D)):Vn(D)?(e.consume(D),L):q(D)}function B(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),r=D,G):pn(D)?(o=B,z(D)):Vn(D)?(e.consume(D),B):(e.consume(D),H)}function G(D){return D===r?(e.consume(D),r=void 0,U):D===null?t(D):pn(D)?(o=G,z(D)):(e.consume(D),G)}function H(D){return D===null||D===34||D===39||D===60||D===61||D===96?t(D):D===47||D===62||Ct(D)?q(D):(e.consume(D),H)}function U(D){return D===47||D===62||Ct(D)?q(D):t(D)}function P(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function z(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),F}function F(D){return Vn(D)?Qn(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Y(D)}function Y(D){return e.enter("htmlTextData"),o(D)}}const KC={name:"labelEnd",resolveAll:lue,resolveTo:uue,tokenize:fue},aue={tokenize:cue},oue={tokenize:due},sue={tokenize:hue};function lue(e){let n=-1;const t=[];for(;++n=3&&(c===null||pn(c))?(e.exit("thematicBreak"),n(c)):t(c)}function f(c){return c===r?(e.consume(c),i++,f):(e.exit("thematicBreakSequence"),Vn(c)?Qn(e,l,"whitespace")(c):l(c))}}const dr={continuation:{tokenize:xue},exit:Cue,name:"list",tokenize:_ue},wue={partial:!0,tokenize:Aue},kue={partial:!0,tokenize:Sue};function _ue(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const y=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:OS(v)){if(i.containerState.type||(i.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(rg,t,c)(v):c(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return t(v)}function f(v){return OS(v)&&++o<10?(e.consume(v),f):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):t(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Gm,i.interrupt?t:h,e.attempt(wue,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Vn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function xue(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(Gm,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Qn(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Vn(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(kue,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,Qn(e,e.attempt(dr,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Sue(e,n,t){const i=this;return Qn(e,r,"listItemIndent",i.containerState.size+1);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?n(a):t(a)}}function Cue(e){e.exit(this.containerState.type)}function Aue(e,n,t){const i=this;return Qn(e,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(a){const o=i.events[i.events.length-1];return!Vn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const lj={name:"setextUnderline",resolveTo:Oue,tokenize:Eue};function Oue(e,n){let t=e.length,i,r,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){i=t;break}e[t][1].type==="paragraph"&&(r=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",o,n]),e.splice(a+1,0,["exit",e[i][1],n]),e[i][1].end={...e[a][1].end}):e[i][1]=o,e.push(["exit",o,n]),e}function Eue(e,n,t){const i=this;let r;return a;function a(c){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Vn(c)?Qn(e,f,"lineSuffix")(c):f(c))}function f(c){return c===null||pn(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const Tue={tokenize:Mue};function Mue(e){const n=this,t=e.attempt(Gm,i,e.attempt(this.parser.constructs.flowInitial,r,Qn(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Nle,r)),"linePrefix")));return t;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const jue={resolveAll:lq()},Due=sq("string"),Rue=sq("text");function sq(e){return{resolveAll:lq(e==="text"?Pue:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),f}function f(h){return c(h)?(t.exit("data"),a(h)):(t.consume(h),f)}function c(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function Gue(e,n){let t=-1;const i=[];let r;for(;++t0){const Le=xe.tokenStack[xe.tokenStack.length-1];(Le[1]||fj).call(xe,void 0,Le[0])}for(me.position={start:$s(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:$s(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne0&&(i.className=["language-"+r[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function sfe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function lfe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ufe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=Pc(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const f={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,f);const c={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,c),e.applyData(n,c)}function ffe(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function cfe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function cq(e,n){const t=n.referenceType;let i="]";if(t==="collapsed"?i+="[]":t==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const r=e.all(n),a=r[0];a&&a.type==="text"?a.value="["+a.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function dfe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return cq(e,n);const r={src:Pc(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function hfe(e,n){const t={src:Pc(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,i),e.applyData(n,i)}function mfe(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const i={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,i),e.applyData(n,i)}function pfe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return cq(e,n);const r={href:Pc(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function vfe(e,n){const t={href:Pc(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function gfe(e,n,t){const i=e.all(n),r=t?yfe(t):dq(n),a={},o=[];if(typeof n.checked=="boolean"){const h=i[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l1}function bfe(e,n){const t={},i=e.all(n);let r=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++r0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=HC(n.children[1]),f=VF(n.children[n.children.length-1]);l&&f&&(o.position={start:l,end:f}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function Sfe(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let f=-1;const c=[];for(;++f0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(hj(n.slice(r),r>0,!1)),a.join("")}function hj(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===cj||a===dj;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===cj||a===dj;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function Ofe(e,n){const t={type:"text",value:Afe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Efe(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Tfe={blockquote:rfe,break:afe,code:ofe,delete:sfe,emphasis:lfe,footnoteReference:ufe,heading:ffe,html:cfe,imageReference:dfe,image:hfe,inlineCode:mfe,linkReference:pfe,link:vfe,listItem:gfe,list:bfe,paragraph:wfe,root:kfe,strong:_fe,table:xfe,tableCell:Cfe,tableRow:Sfe,text:Ofe,thematicBreak:Efe,toml:Cv,yaml:Cv,definition:Cv,footnoteDefinition:Cv};function Cv(){}const hq=-1,Ky=0,gh=1,Og=2,XC=3,ZC=4,QC=5,JC=6,mq=7,pq=8,Mfe=typeof self=="object"?self:globalThis,mj=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Mfe[e](n)},jfe=(e,n)=>{const t=(r,a)=>(e.set(a,r),r),i=r=>{if(e.has(r))return e.get(r);const[a,o]=n[r];switch(a){case Ky:case hq:return t(o,r);case gh:{const l=t([],r);for(const f of o)l.push(i(f));return l}case Og:{const l=t({},r);for(const[f,c]of o)l[i(f)]=i(c);return l}case XC:return t(new Date(o),r);case ZC:{const{source:l,flags:f}=o;return t(new RegExp(l,f),r)}case QC:{const l=t(new Map,r);for(const[f,c]of o)l.set(i(f),i(c));return l}case JC:{const l=t(new Set,r);for(const f of o)l.add(i(f));return l}case mq:{const{name:l,message:f}=o;return t(mj(l,f),r)}case pq:return t(BigInt(o),r);case"BigInt":return t(Object(BigInt(o)),r);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(mj(a,o),r)};return i},pj=e=>jfe(new Map,e)(0),yf="",{toString:Dfe}={},{keys:Rfe}=Object,Fd=e=>{const n=typeof e;if(n!=="object"||!e)return[Ky,n];const t=Dfe.call(e).slice(8,-1);switch(t){case"Array":return[gh,yf];case"Object":return[Og,yf];case"Date":return[XC,yf];case"RegExp":return[ZC,yf];case"Map":return[QC,yf];case"Set":return[JC,yf];case"DataView":return[gh,t]}return t.includes("Array")?[gh,t]:t.includes("Error")?[mq,t]:[Og,t]},Av=([e,n])=>e===Ky&&(n==="function"||n==="symbol"),Pfe=(e,n,t,i)=>{const r=(o,l)=>{const f=i.push(o)-1;return t.set(l,f),f},a=o=>{if(t.has(o))return t.get(o);let[l,f]=Fd(o);switch(l){case Ky:{let h=o;switch(f){case"bigint":l=pq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return r([hq],o)}return r([l,h],o)}case gh:{if(f){let p=o;return f==="DataView"?p=new Uint8Array(o.buffer):f==="ArrayBuffer"&&(p=new Uint8Array(o)),r([f,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Og:{if(f)switch(f){case"BigInt":return r([f,o.toString()],o);case"Boolean":case"Number":case"String":return r([f,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of Rfe(o))(e||!Av(Fd(o[p])))&&h.push([a(p),a(o[p])]);return d}case XC:return r([l,o.toISOString()],o);case ZC:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case QC:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Av(Fd(p))||Av(Fd(v))))&&h.push([a(p),a(v)]);return d}case JC:{const h=[],d=r([l,h],o);for(const p of o)(e||!Av(Fd(p)))&&h.push(a(p));return d}}const{message:c}=o;return r([l,{name:f,message:c}],o)};return a},vj=(e,{json:n,lossy:t}={})=>{const i=[];return Pfe(!(n||t),!!n,new Map,i)(e),i},Eg=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?pj(vj(e,n)):structuredClone(e):(e,n)=>pj(vj(e,n));function Nfe(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function $fe(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function zfe(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Nfe,i=e.options.footnoteBackLabel||$fe,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let f=-1;for(;++f0&&y.push({type:"text",value:" "});let S=typeof t=="string"?t:t(f,v);typeof S=="string"&&(S={type:"text",value:S}),y.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const w=h[h.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const S=w.children[w.children.length-1];S&&S.type==="text"?S.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...y)}else h.push(...y);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Eg(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` +`}]}}const Xy=(function(e){if(e==null)return Ffe;if(typeof e=="function")return Zy(e);if(typeof e=="object")return Array.isArray(e)?Lfe(e):Ife(e);if(typeof e=="string")return Bfe(e);throw new Error("Expected function, string, or object as test")});function Lfe(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=vq,y,b,w;if((!n||a(f,c,h[h.length-1]||void 0))&&(v=Vfe(t(f,h)),v[0]===TS))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==Ufe)for(b=(i?_.children.length:-1)+o,w=h.concat(_);b>-1&&b<_.children.length;){const S=_.children[b];if(y=l(S,b,w)(),y[0]===TS)return y;b=typeof y[1]=="number"?y[1]:b+o}}return v}}}function Vfe(e){return Array.isArray(e)?e:typeof e=="number"?[Hfe,e]:e==null?vq:[e]}function e9(e,n,t,i){let r,a,o;typeof n=="function"&&typeof t!="function"?(a=void 0,o=n,r=t):(a=n,o=t,r=i),gq(e,a,l,r);function l(f,c){const h=c[c.length-1],d=h?h.children.indexOf(f):void 0;return o(f,d,h)}}const MS={}.hasOwnProperty,Wfe={};function Gfe(e,n){const t=n||Wfe,i=new Map,r=new Map,a=new Map,o={...Tfe,...t.handlers},l={all:c,applyData:Kfe,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:f,options:t,patch:Yfe,wrap:Zfe};return e9(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function f(h,d){const p=h.type,v=l.handlers[p];if(MS.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:b,...w}=h,_=Eg(w);return _.children=l.all(h),_}return Eg(h)}return(l.options.unknownHandler||Xfe)(l,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v0&&t.push({type:"text",value:` +`}),t}function gj(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function yj(e,n){const t=Gfe(e,n),i=t.one(e,void 0),r=zfe(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` +`},r),a}function Qfe(e,n){return e&&"run"in e?async function(t,i){const r=yj(t,{file:i,...n});await e.run(r,i)}:function(t,i){return yj(t,{file:i,...e||n})}}function bj(e){if(e)throw e}var Dk,wj;function Jfe(){if(wj)return Dk;wj=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},a=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},o=function(c,h){t&&h.name==="__proto__"?t(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},l=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(i)return i(c,h).value}else return;return c[h]};return Dk=function f(){var c,h,d,p,v,y,b=arguments[0],w=1,_=arguments.length,S=!1;for(typeof b=="boolean"&&(S=b,b=arguments[1]||{},w=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});w<_;++w)if(c=arguments[w],c!=null)for(h in c)d=l(b,h),p=l(c,h),b!==p&&(S&&p&&(a(p)||(v=r(p)))?(v?(v=!1,y=d&&r(d)?d:[]):y=d&&a(d)?d:{},o(b,{name:h,newValue:f(S,y,p)})):typeof p<"u"&&o(b,{name:h,newValue:p}));return b},Dk}var ece=Jfe();const Rk=ot(ece);function jS(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function nce(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(f,...c){const h=e[++a];let d=-1;if(f){o(f);return}for(;++do.length;let f;l&&o.push(r);try{f=e.apply(this,o)}catch(c){const h=c;if(l&&t)throw h;return r(h)}l||(f&&f.then&&typeof f.then=="function"?f.then(a,r):f instanceof Error?r(f):a(f))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const Va={basename:ice,dirname:rce,extname:ace,join:oce,sep:"/"};function ice(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ym(e);let t=0,i=-1,r=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else i<0&&(a=!0,i=r+1);return i<0?"":e.slice(t,i)}if(n===e)return"";let o=-1,l=n.length-1;for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else o<0&&(a=!0,o=r+1),l>-1&&(e.codePointAt(r)===n.codePointAt(l--)?l<0&&(i=r):(l=-1,i=o));return t===i?i=o:i<0&&(i=e.length),e.slice(t,i)}function rce(e){if(Ym(e),e.length===0)return".";let n=-1,t=e.length,i;for(;--t;)if(e.codePointAt(t)===47){if(i){n=t;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function ace(e){Ym(e);let n=e.length,t=-1,i=0,r=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){i=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?r<0?r=n:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||t<0||a===0||a===1&&r===t-1&&r===i+1?"":e.slice(r,t)}function oce(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function lce(e,n){let t="",i=0,r=-1,a=0,o=-1,l,f;for(;++o<=e.length;){if(o2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",i=0):(t=t.slice(0,f),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function Ym(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const uce={cwd:fce};function fce(){return"/"}function DS(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function cce(e){if(typeof e=="string")e=new URL(e);else if(!DS(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return dce(e)}function dce(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...y]=h;const b=i[p][1];jS(b)&&jS(v)&&(v=Rk(!0,b,v)),i[p]=[c,v,...y]}}}}const vce=new n9().freeze();function zk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ik(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _j(e){if(!jS(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function xj(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ov(e){return gce(e)?e:new yq(e)}function gce(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yce(e){return typeof e=="string"||bce(e)}function bce(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wce="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Sj=[],Cj={allowDangerousHtml:!0},kce=/^(https?|ircs?|mailto|xmpp)$/i,_ce=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function xce(e){const n=Sce(e),t=Cce(e);return Ace(n.runSync(n.parse(t),t),e)}function Sce(e){const n=e.rehypePlugins||Sj,t=e.remarkPlugins||Sj,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Cj}:Cj;return vce().use(ife).use(t).use(Qfe,i).use(n)}function Cce(e){const n=e.children||"",t=new yq;return typeof n=="string"&&(t.value=n),t}function Ace(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,f=n.urlTransform||Oce;for(const h of _ce)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+wce+h.id,void 0);return e9(e,c),Bse(e,{Fragment:k.Fragment,components:r,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function c(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in Tk)if(Object.hasOwn(Tk,v)&&Object.hasOwn(h.properties,v)){const y=h.properties[v],b=Tk[v];(b===null||b.includes(h.tagName))&&(h.properties[v]=f(String(y||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function Oce(e){const n=e.indexOf(":"),t=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return n===-1||r!==-1&&n>r||t!==-1&&n>t||i!==-1&&n>i||kce.test(e.slice(0,n))?e:""}function Aj(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,r=t.indexOf(n);for(;r!==-1;)i++,r=t.indexOf(n,r+n.length);return i}function Ece(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Tce(e,n,t){const r=Xy((t||{}).ignore||[]),a=Mce(n);let o=-1;for(;++o0?{type:"text",value:T}:void 0),T===!1?p.lastIndex=E+1:(y!==E&&S.push({type:"text",value:c.value.slice(y,E)}),Array.isArray(T)?S.push(...T):T&&S.push(T),y=E+C[0].length,_=!0),!p.global)break;C=p.exec(c.value)}return _?(y?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=Aj(e,"(");let a=Aj(e,")");for(;i!==-1&&r>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function bq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||uu(t)||Gy(t))&&(!n||t!==47)}wq.peek=Jce;function Vce(){this.buffer()}function Wce(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Gce(){this.buffer()}function Yce(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Kce(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Xce(e){this.exit(e)}function Zce(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Qce(e){this.exit(e)}function Jce(){return"["}function wq(e,n,t,i){const r=t.createTracker(i);let a=r.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=r.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=r.move("]"),a}function ede(){return{enter:{gfmFootnoteCallString:Vce,gfmFootnoteCall:Wce,gfmFootnoteDefinitionLabelString:Gce,gfmFootnoteDefinition:Yce},exit:{gfmFootnoteCallString:Kce,gfmFootnoteCall:Xce,gfmFootnoteDefinitionLabelString:Zce,gfmFootnoteDefinition:Qce}}}function nde(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:wq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let f=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return f+=l.move(a.safe(a.associationId(i),{before:f,after:"]"})),h(),f+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),f+=l.move((n?` +`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?kq:tde))),c(),f}}function tde(e,n,t){return n===0?e:kq(e,n,t)}function kq(e,n,t){return(t?"":" ")+e}const ide=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];_q.peek=lde;function rde(){return{canContainEols:["delete"],enter:{strikethrough:ode},exit:{strikethrough:sde}}}function ade(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ide}],handlers:{delete:_q}}}function ode(e){this.enter({type:"delete",children:[]},e)}function sde(e){this.exit(e)}function _q(e,n,t,i){const r=t.createTracker(i),a=t.enter("strikethrough");let o=r.move("~~");return o+=t.containerPhrasing(e,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),a(),o}function lde(){return"~"}function ude(e){return e.length}function fde(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||ude,a=[],o=[],l=[],f=[];let c=0,h=-1;for(;++hc&&(c=e[h].length);++_f[_])&&(f[_]=C)}b.push(S)}o[h]=b,l[h]=w}let d=-1;if(typeof i=="object"&&"length"in i)for(;++df[d]&&(f[d]=S),v[d]=S),p[d]=C}o.splice(1,0,p),l.splice(1,0,v),h=-1;const y=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),hde);return r(),o}function hde(e,n,t){return">"+(t?"":" ")+e}function mde(e,n){return Ej(e,n.inConstruct,!0)&&!Ej(e,n.notInConstruct,!1)}function Ej(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++io&&(o=a):a=1,r=i+n.length,i=t.indexOf(n,r);return o}function vde(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function gde(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function yde(e,n,t,i){const r=gde(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(vde(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,bde);return d(),p}const l=t.createTracker(i),f=r.repeat(Math.max(pde(a,r)+1,3)),c=t.enter("codeFenced");let h=l.move(f);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` +`,encode:["`"],...l.current()})),d()}return h+=l.move(` +`),a&&(h+=l.move(a+` +`)),h+=l.move(f),c(),h}function bde(e,n,t){return(t?"":" ")+e}function t9(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function wde(e,n,t,i){const r=t9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("[");return c+=f.move(t.safe(t.associationId(e),{before:c,after:"]",...f.current()})),c+=f.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":` +`,...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),o(),c}function kde(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Bh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tg(e,n,t){const i=Hf(e),r=Hf(n);return i===void 0?r===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}xq.peek=_de;function xq(e,n,t,i){const r=kde(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Tg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=Bh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Tg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+Bh(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function _de(e,n,t){return t.options.emphasis||"*"}function xde(e,n){let t=!1;return e9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,TS}),!!((!e.depth||e.depth<3)&&GC(e)&&(n.options.setext||t))}function Sde(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(xde(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` +`,after:` +`});return d(),h(),p+` +`+(r===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` +`))+1))}const o="#".repeat(r),l=t.enter("headingAtx"),f=t.enter("phrasing");a.move(o+" ");let c=t.containerPhrasing(e,{before:"# ",after:` +`,...a.current()});return/^[\t ]/.test(c)&&(c=Bh(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),f(),l(),c}Sq.peek=Cde;function Sq(e){return e.value||""}function Cde(){return"<"}Cq.peek=Ade;function Cq(e,n,t,i){const r=t9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("![");return c+=f.move(t.safe(e.alt,{before:c,after:"]",...f.current()})),c+=f.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":")",...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),c+=f.move(")"),o(),c}function Ade(){return"!"}Aq.peek=Ode;function Aq(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("![");const c=t.safe(e.alt,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function Ode(){return"!"}Oq.peek=Ede;function Oq(e,n,t){let i=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a\u007F]/.test(e.url))}Tq.peek=Tde;function Tq(e,n,t,i){const r=t9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,f;if(Eq(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),f=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(f=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),f(),e.title&&(f=t.enter(`title${a}`),c+=o.move(" "+r),c+=o.move(t.safe(e.title,{before:c,after:r,...o.current()})),c+=o.move(r),f()),c+=o.move(")"),l(),c}function Tde(e,n,t){return Eq(e,t)?"<":"["}Mq.peek=Mde;function Mq(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("[");const c=t.containerPhrasing(e,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function Mde(){return"["}function i9(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function jde(e){const n=i9(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Dde(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function jq(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Rde(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?Dde(t):i9(t);const l=e.ordered?o==="."?")":".":jde(t);let f=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(f=!0),jq(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const f=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,l.current()),h);return f(),c;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function $de(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const zde=Xy(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Lde(e,n,t,i){return(e.children.some(function(o){return zde(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function Ide(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Dq.peek=Bde;function Dq(e,n,t,i){const r=Ide(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Tg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=Bh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Tg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+Bh(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function Bde(e,n,t){return t.options.strong||"*"}function Fde(e,n,t,i){return t.safe(e.value,i)}function qde(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Hde(e,n,t){const i=(jq(t)+(t.options.ruleSpaces?" ":"")).repeat(qde(t));return t.options.ruleSpaces?i.slice(0,-1):i}const Rq={blockquote:dde,break:Tj,code:yde,definition:wde,emphasis:xq,hardBreak:Tj,heading:Sde,html:Sq,image:Cq,imageReference:Aq,inlineCode:Oq,link:Tq,linkReference:Mq,list:Rde,listItem:Nde,paragraph:$de,root:Lde,strong:Dq,text:Fde,thematicBreak:Hde};function Ude(){return{enter:{table:Vde,tableData:Mj,tableHeader:Mj,tableRow:Gde},exit:{codeText:Yde,table:Wde,tableData:Hk,tableHeader:Hk,tableRow:Hk}}}function Vde(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Wde(e){this.exit(e),this.data.inTable=void 0}function Gde(e){this.enter({type:"tableRow",children:[]},e)}function Hk(e){this.exit(e)}function Mj(e){this.enter({type:"tableCell",children:[]},e)}function Yde(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Kde));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Kde(e,n){return n==="|"?n:e}function Xde(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:f,tableRow:l}};function o(v,y,b,w){return c(h(v,b,w),v.align)}function l(v,y,b,w){const _=d(v,b,w),S=c([_]);return S.slice(0,S.indexOf(` +`))}function f(v,y,b,w){const _=b.enter("tableCell"),S=b.enter("phrasing"),C=b.containerPhrasing(v,{...w,before:a,after:a});return S(),_(),C}function c(v,y){return fde(v,{align:y,alignDelimiters:i,padding:t,stringLength:r})}function h(v,y,b){const w=v.children;let _=-1;const S=[],C=y.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const mhe={tokenize:_he,partial:!0};function phe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:bhe,continuation:{tokenize:whe},exit:khe}},text:{91:{name:"gfmFootnoteCall",tokenize:yhe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vhe,resolveTo:ghe}}}}function vhe(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const f=i.events[r][1];if(f.type==="labelImage"){o=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return l;function l(f){if(!o||!o._balanced)return t(f);const c=ja(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?t(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function ghe(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",r,n],["exit",r,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function yhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),f}function f(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||Ct(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(ja(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return Ct(d)||(o=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function bhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return f;function f(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(y)}function h(y){if(o>999||y===93&&!l||y===null||y===91||Ct(y))return t(y);if(y===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=ja(i.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ct(y)||(l=!0),o++,e.consume(y),y===92?d:h}function d(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}function p(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),r.includes(a)||r.push(a),Qn(e,v,"gfmFootnoteDefinitionWhitespace")):t(y)}function v(y){return n(y)}}function whe(e,n,t){return e.check(Gm,n,e.attempt(mhe,n,t))}function khe(e){e.exit("gfmFootnoteDefinition")}function _he(e,n,t){const i=this;return Qn(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function xhe(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let f=-1;for(;++f1?f(y):(o.consume(y),d++,v);if(d<2&&!t)return f(y);const w=o.exit("strikethroughSequenceTemporary"),_=Hf(y);return w._open=!_||_===2&&!!b,w._close=!b||b===2&&!!_,l(y)}}}class She{constructor(){this.map=[]}add(n,t,i){Che(this,n,t,i)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let r=i.pop();for(;r;){for(const a of r)n.push(a);r=i.pop()}this.map.length=0}}function Che(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const H=i.events[L][1].type;if(H==="lineEnding"||H==="linePrefix")L--;else break}const B=L>-1?i.events[L][1].type:null,G=B==="tableHead"||B==="tableRow"?T:f;return G===T&&i.parser.lazy[i.now().line]?t(R):G(R)}function f(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(o=!0,a+=1),h(R)}function h(R){return R===null?t(R):pn(R)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):t(R):Vn(R)?Qn(e,h,"whitespace")(R):(a+=1,o&&(o=!1,r+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||Ct(R)?(e.exit("data"),h(R)):(e.consume(R),R===92?p:d)}function p(R){return R===92||R===124?(e.consume(R),d):d(R)}function v(R){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(R):(e.enter("tableDelimiterRow"),o=!1,Vn(R)?Qn(e,y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):y(R))}function y(R){return R===45||R===58?w(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),b):A(R)}function b(R){return Vn(R)?Qn(e,w,"whitespace")(R):w(R)}function w(R){return R===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||pn(R)?E(R):A(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),S(R)):A(R)}function S(R){return R===45?(e.consume(R),S):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(R))}function C(R){return Vn(R)?Qn(e,E,"whitespace")(R):E(R)}function E(R){return R===124?y(R):R===null||pn(R)?!o||r!==a?A(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):A(R)}function A(R){return t(R)}function T(R){return e.enter("tableRow"),j(R)}function j(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),j):R===null||pn(R)?(e.exit("tableRow"),n(R)):Vn(R)?Qn(e,j,"whitespace")(R):(e.enter("data"),N(R))}function N(R){return R===null||R===124||Ct(R)?(e.exit("data"),j(R)):(e.consume(R),R===92?q:N)}function q(R){return R===92||R===124?(e.consume(R),N):N(R)}}function The(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,f=0,c,h,d;const p=new She;for(;++tt[2]+1){const y=t[2]+1,b=t[3]-t[2]-1;e.add(y,b,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},Cf(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function Dj(e,n,t,i,r){const a=[],o=Cf(n.events,t);r&&(r.end=Object.assign({},o),a.push(["exit",r,n])),i.end=Object.assign({},o),a.push(["exit",i,n]),e.add(t+1,0,a)}function Cf(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const Mhe={name:"tasklistCheck",tokenize:Dhe};function jhe(){return{text:{91:Mhe}}}function Dhe(e,n,t){const i=this;return r;function r(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return Ct(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),o):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),o):t(f)}function o(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(f)}function l(f){return pn(f)?n(f):Vn(f)?e.check({tokenize:Rhe},n,t)(f):t(f)}}function Rhe(e,n,t){return Qn(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function Phe(e){return QF([ahe(),phe(),xhe(e),Ohe(),jhe()])}const Nhe={};function $he(e){const n=this,t=e||Nhe,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Phe(t)),a.push(nhe()),o.push(the(t))}const PS="kanban_chat_v1";function zhe(){try{const e=localStorage.getItem(PS);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function Lhe({onBoardChange:e}){const[n,t]=O.useState(()=>zhe()),[i,r]=O.useState(""),[a,o]=O.useState(!1),[l,f]=O.useState(""),[c,h]=O.useState([]),d=O.useRef(null);O.useEffect(()=>{localStorage.setItem(PS,JSON.stringify(n))},[n]),O.useEffect(()=>{var b;(b=d.current)==null||b.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,c,a]);const p=async()=>{const b=i.trim();if(!b||a)return;const w={role:"user",content:b,ts:Date.now()},_=[...n,w];t(_),r(""),o(!0),f(""),h([]);let S="";const C=[];let E=!1;const A=T=>{switch(T.type){case"delta":S+=T.text,f(S);break;case"tool_use":{const j={tool:T.tool,ok:!0,input:T.input};C.push(j),h([...C]);break}case"tool_result":{for(let j=C.length-1;j>=0;j--){const N=C[j];if(N.error===void 0&&N.ok){T.is_error&&(N.ok=!1,N.error=T.result||"tool error");break}}h([...C]);break}case"result":T.text&&S.trim()===""&&(S=T.text,f(S));break;case"done":T.board_changed&&(E=!0);break;case"error":S=`Error: ${T.error}`,f(S);break}};try{const T=_.map(j=>({role:j.role,content:j.content}));await sie(T,A)}catch(T){const j=T.message;et.show({color:"red",message:j}),S=S||`Error: ${j}`}finally{const T={role:"assistant",content:S,ts:Date.now(),tool_calls:C.length>0?C:void 0};t(j=>[...j,T]),f(""),h([]),o(!1),E&&e()}},v=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},y=()=>{t([]),localStorage.removeItem(PS)};return k.jsxs($t,{gap:0,h:"100%",children:[k.jsxs(wn,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[k.jsxs(wn,{gap:6,children:[k.jsx(zF,{size:18}),k.jsx(un,{fw:600,size:"sm",children:"Asistente"})]}),k.jsx(Vi,{label:"Limpiar conversacion",withArrow:!0,children:k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm",onClick:y,disabled:n.length===0,children:k.jsx(Lh,{size:14})})})]}),k.jsx(uo,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:k.jsxs($t,{gap:"xs",children:[n.length===0&&!a&&k.jsxs(un,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",k.jsx("br",{}),'- "crea columna Backlog"',k.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',k.jsx("br",{}),'- "que hay en Doing?"']}),n.map((b,w)=>k.jsx(Rj,{msg:b},w)),a&&k.jsx(Rj,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:c.length>0?c:void 0},streaming:!0}),a&&l===""&&c.length===0&&k.jsxs(wn,{gap:6,pl:"xs",children:[k.jsx(Wi,{size:"xs"}),k.jsx(un,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),k.jsx($t,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:k.jsxs(wn,{align:"flex-end",gap:4,wrap:"nowrap",children:[k.jsx(Th,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:b=>r(b.currentTarget.value),onKeyDown:v,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),k.jsx(Ht,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?k.jsx(Wi,{size:"xs",color:"white"}):k.jsx(Yoe,{size:16})})]})})]})}function Rj({msg:e,streaming:n=!1}){const t=e.role==="user";return k.jsx(ei,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:k.jsxs($t,{gap:4,children:[e.content&&k.jsx(we,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:k.jsx(xce,{remarkPlugins:[$he],children:e.content})}),n&&e.content&&k.jsx(we,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&k.jsx(wn,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>k.jsxs(ui,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?k.jsx(Wi,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const Ihe=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function Bhe({users:e,cards:n,onJumpToCard:t}){const[i,r]=O.useState(null),[a,o]=O.useState(new Date),[l,f]=O.useState(null),[c,h]=O.useState(null),[d,p]=O.useState(!1);O.useEffect(()=>{let S=!1;p(!0);const C=ze(a).startOf("month").format("YYYY-MM-DD"),E=ze(a).endOf("month").format("YYYY-MM-DD");return CB({from:C,to:E,assignee_id:l||void 0}).then(A=>{S||h(A)}).finally(()=>{S||p(!1)}),()=>{S=!0}},[a,l]);const v=O.useMemo(()=>e.map(S=>({value:S.id,label:S.display_name||S.username})),[e]),y=O.useMemo(()=>{const S=new Map;if(!c)return S;for(const C of c.created_daily){const E=S.get(C.date)??{created:0,done:0,deadlines:[]};E.created=C.count,S.set(C.date,E)}for(const C of c.throughput_daily){const E=S.get(C.date)??{created:0,done:0,deadlines:[]};E.done=C.count,S.set(C.date,E)}for(const C of n){if(!C.deadline||C.deleted_at)continue;const E=C.deadline.slice(0,10),A=S.get(E)??{created:0,done:0,deadlines:[]};A.deadlines.push(C),S.set(E,A)}return S},[c,n]),b=O.useMemo(()=>{const S=ze(a).startOf("month"),C=ze(a).endOf("month"),E=(S.day()+6)%7,A=[];for(let T=0;TArray.from(y.values()).reduce((S,C)=>S+C.created,0),[y]),_=O.useMemo(()=>Array.from(y.values()).reduce((S,C)=>S+C.done,0),[y]);return k.jsx(we,{p:"md",children:k.jsxs($t,{gap:"md",children:[k.jsxs(wn,{justify:"space-between",children:[k.jsx(_u,{order:3,children:"Calendario"}),k.jsxs(wn,{gap:"xs",wrap:"nowrap",children:[k.jsx(IC,{label:"Mes",size:"xs",value:a,onChange:S=>S&&o(typeof S=="string"?new Date(S):S),style:{minWidth:160},clearable:!1}),k.jsx(Zo,{label:"Asignado",size:"xs",placeholder:"Todos",value:l,onChange:f,data:v,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),k.jsxs(wn,{gap:"md",children:[k.jsx(ei,{withBorder:!0,p:"sm",radius:"md",children:k.jsxs(wn,{gap:6,children:[k.jsx(zh,{size:14,color:"var(--mantine-color-blue-5)"}),k.jsx(un,{size:"sm",fw:600,children:w}),k.jsx(un,{size:"xs",c:"dimmed",children:"creadas"})]})}),k.jsx(ei,{withBorder:!0,p:"sm",radius:"md",children:k.jsxs(wn,{gap:6,children:[k.jsx($h,{size:14,color:"var(--mantine-color-green-5)"}),k.jsx(un,{size:"sm",fw:600,children:_}),k.jsx(un,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),d&&!c?k.jsx(_c,{p:"xl",children:k.jsx(Wi,{})}):k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(Dh,{cols:7,spacing:4,mb:4,children:Ihe.map(S=>k.jsx(un,{size:"xs",c:"dimmed",ta:"center",fw:600,children:S},S))}),k.jsx(Dh,{cols:7,spacing:4,children:b.map((S,C)=>{if(!S.date)return k.jsx(we,{style:{minHeight:72}},C);const E=y.get(S.date)??{created:0,done:0,deadlines:[]},A=parseInt(S.date.slice(8,10),10),T=S.date===ze().format("YYYY-MM-DD"),j=ze().startOf("day").valueOf(),q=ze(S.date).startOf("day").valueOf()0?"rgba(81, 207, 102, 0.08)":E.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:k.jsxs($t,{gap:2,children:[k.jsx(un,{size:"xs",fw:T?700:500,c:T?"blue":void 0,children:A}),E.created>0&&k.jsxs(wn,{gap:3,wrap:"nowrap",children:[k.jsx(zh,{size:10,color:"var(--mantine-color-blue-5)"}),k.jsx(un,{size:"xs",c:"blue",children:E.created})]}),E.done>0&&k.jsxs(wn,{gap:3,wrap:"nowrap",children:[k.jsx($h,{size:10,color:"var(--mantine-color-green-5)"}),k.jsx(un,{size:"xs",c:"green",children:E.done})]}),E.deadlines.length>0&&k.jsxs(Tn,{opened:i===S.date,onChange:R=>r(R?S.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[k.jsx(Tn.Target,{children:k.jsx(fi,{onClick:()=>r(i===S.date?null:S.date),style:{textAlign:"left"},children:k.jsx($t,{gap:1,children:k.jsxs(wn,{gap:3,wrap:"nowrap",children:[k.jsx(NF,{size:10,color:q?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),k.jsxs(un,{size:"xs",c:q?"red":"orange",fw:700,td:"underline",children:[E.deadlines.length," deadline",E.deadlines.length===1?"":"s"]})]})})})}),k.jsx(Tn.Dropdown,{p:6,children:k.jsxs($t,{gap:2,children:[k.jsxs(un,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",ze(S.date).format("DD/MM/YYYY")]}),E.deadlines.map(R=>k.jsx(fi,{onClick:()=>{r(null),t==null||t(R.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:k.jsxs(wn,{gap:6,wrap:"nowrap",children:[k.jsxs(un,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(R.seq_num).padStart(5,"0")]}),k.jsx(un,{size:"xs",lineClamp:1,title:R.title,children:R.title})]})},R.id))]})})]})]})},C)})})]})]})})}function qq(e){return e?e.reduce((n,t)=>{const i=t.name.search(/\./);if(i>=0){const r=t.name.substring(i+1);return n[r]=t.label,n}return n[t.name]=t.label,n},{}):{}}var Fhe={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};function qhe(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[f,c]=l;return f===i?o:{...o,[f]:c}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function Hhe(e,n){const t=qhe(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function Pj(e,n){return n==="radial"||n==="scatter"?Array.isArray(e.value)?e.value[1]-e.value[0]:e.value:Array.isArray(e.payload[e.dataKey])?e.payload[e.dataKey][1]-e.payload[e.dataKey][0]:e.payload[e.name]}const Uhe={type:"area",showColor:!0},a9=Pe(e=>{var R,L;const n=ge("ChartTooltip",Uhe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,label:c,unit:h,type:d,segmentId:p,mod:v,series:y,valueFormatter:b,showColor:w,attributes:_,...S}=n,C=ni(),E=Ge({name:"ChartTooltip",classes:Fhe,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!f)return null;const A=Hhe(f,p),T=d==="scatter"?(L=(R=f[0])==null?void 0:R.payload)==null?void 0:L.name:null,j=qq(y),N=c||T,q=A.map(B=>k.jsxs("div",{"data-type":d,...E("tooltipItem"),children:[k.jsxs("div",{...E("tooltipItemBody"),children:[w&&k.jsx("svg",{...E("tooltipItemColor"),children:k.jsx("circle",{r:6,fill:nt(B.color,C),width:12,height:12,cx:6,cy:6})}),k.jsx("div",{...E("tooltipItemName"),children:j[B.name]||B.name})]}),k.jsxs("div",{...E("tooltipItemData"),children:[typeof b=="function"?b(Pj(B,d)):Pj(B,d),h||B.unit]})]},(B==null?void 0:B.key)??B.name));return k.jsxs(we,{...E("tooltip"),mod:[{type:d},v],...S,children:[N&&k.jsx("div",{...E("tooltipLabel"),children:N}),k.jsx("div",{...E("tooltipBody"),children:q})]})});a9.displayName="@mantine/charts/ChartTooltip";var Hq={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function Vhe(e){return e.map(n=>{var i;const t=(i=n.dataKey)==null?void 0:i.split(".").pop();return{...n,dataKey:t,payload:{...n.payload,name:t,dataKey:t}}})}function Whe(e){return Vhe(e.filter(n=>n.color!=="none"))}const Qy=Pe(e=>{const n=ge("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,onHighlight:c,legendPosition:h,mod:d,series:p,showColor:v,centered:y,attributes:b,...w}=n,_=Ge({name:"ChartLegend",classes:Hq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,rootSelector:"legend"});if(!f)return null;const S=Whe(f),C=qq(p),E=S.map((A,T)=>k.jsxs("div",{..._("legendItem"),onMouseEnter:()=>c(A.dataKey),onMouseLeave:()=>c(null),"data-without-color":v===!1||void 0,children:[k.jsx(xc,{color:A.color,size:12,..._("legendItemColor"),withShadow:!1}),k.jsx("p",{..._("legendItemName"),children:C[A.dataKey]||A.dataKey})]},T));return k.jsx(we,{mod:[{position:h,centered:y},d],..._("legend"),...w,children:E})});Qy.displayName="@mantine/charts/ChartLegend";Qy.classes=Hq;function Ghe({x:e,y:n,value:t,valueFormatter:i}){return k.jsx("g",{transform:`translate(${e},${n})`,children:k.jsx("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"start",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:i?i(t):t})})}var Jy={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},Uk,Nj;function br(){if(Nj)return Uk;Nj=1;var e=Array.isArray;return Uk=e,Uk}var Vk,$j;function Uq(){if($j)return Vk;$j=1;var e=typeof hv=="object"&&hv&&hv.Object===Object&&hv;return Vk=e,Vk}var Wk,zj;function ho(){if(zj)return Wk;zj=1;var e=Uq(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return Wk=t,Wk}var Gk,Lj;function Km(){if(Lj)return Gk;Lj=1;var e=ho(),n=e.Symbol;return Gk=n,Gk}var Yk,Ij;function Yhe(){if(Ij)return Yk;Ij=1;var e=Km(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),f=o[r];try{o[r]=void 0;var c=!0}catch{}var h=i.call(o);return c&&(l?o[r]=f:delete o[r]),h}return Yk=a,Yk}var Kk,Bj;function Khe(){if(Bj)return Kk;Bj=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return Kk=t,Kk}var Xk,Fj;function us(){if(Fj)return Xk;Fj=1;var e=Km(),n=Yhe(),t=Khe(),i="[object Null]",r="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?r:i:a&&a in Object(l)?n(l):t(l)}return Xk=o,Xk}var Zk,qj;function fs(){if(qj)return Zk;qj=1;function e(n){return n!=null&&typeof n=="object"}return Zk=e,Zk}var Qk,Hj;function Nc(){if(Hj)return Qk;Hj=1;var e=us(),n=fs(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return Qk=i,Qk}var Jk,Uj;function o9(){if(Uj)return Jk;Uj=1;var e=br(),n=Nc(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||n(a)?!0:i.test(a)||!t.test(a)||o!=null&&a in Object(o)}return Jk=r,Jk}var e_,Vj;function fl(){if(Vj)return e_;Vj=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return e_=e,e_}var n_,Wj;function s9(){if(Wj)return n_;Wj=1;var e=us(),n=fl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var f=e(l);return f==i||f==r||f==t||f==a}return n_=o,n_}var t_,Gj;function Xhe(){if(Gj)return t_;Gj=1;var e=ho(),n=e["__core-js_shared__"];return t_=n,t_}var i_,Yj;function Zhe(){if(Yj)return i_;Yj=1;var e=Xhe(),n=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function t(i){return!!n&&n in i}return i_=t,i_}var r_,Kj;function Vq(){if(Kj)return r_;Kj=1;var e=Function.prototype,n=e.toString;function t(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return r_=t,r_}var a_,Xj;function Qhe(){if(Xj)return a_;Xj=1;var e=s9(),n=Zhe(),t=fl(),i=Vq(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,f=o.toString,c=l.hasOwnProperty,h=RegExp("^"+f.call(c).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return a_=d,a_}var o_,Zj;function Jhe(){if(Zj)return o_;Zj=1;function e(n,t){return n==null?void 0:n[t]}return o_=e,o_}var s_,Qj;function Au(){if(Qj)return s_;Qj=1;var e=Qhe(),n=Jhe();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return s_=t,s_}var l_,Jj;function e0(){if(Jj)return l_;Jj=1;var e=Au(),n=e(Object,"create");return l_=n,l_}var u_,e8;function eme(){if(e8)return u_;e8=1;var e=e0();function n(){this.__data__=e?e(null):{},this.size=0}return u_=n,u_}var f_,n8;function nme(){if(n8)return f_;n8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return f_=e,f_}var c_,t8;function tme(){if(t8)return c_;t8=1;var e=e0(),n="__lodash_hash_undefined__",t=Object.prototype,i=t.hasOwnProperty;function r(a){var o=this.__data__;if(e){var l=o[a];return l===n?void 0:l}return i.call(o,a)?o[a]:void 0}return c_=r,c_}var d_,i8;function ime(){if(i8)return d_;i8=1;var e=e0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return d_=i,d_}var h_,r8;function rme(){if(r8)return h_;r8=1;var e=e0(),n="__lodash_hash_undefined__";function t(i,r){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=e&&r===void 0?n:r,this}return h_=t,h_}var m_,a8;function ame(){if(a8)return m_;a8=1;var e=eme(),n=nme(),t=tme(),i=ime(),r=rme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l-1}return w_=n,w_}var k_,d8;function fme(){if(d8)return k_;d8=1;var e=n0();function n(t,i){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,i])):r[a][1]=i,this}return k_=n,k_}var __,h8;function t0(){if(h8)return __;h8=1;var e=ome(),n=sme(),t=lme(),i=ume(),r=fme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l0?1:-1},Yl=function(n){return fu(n)&&n.indexOf("%")===n.length-1},qe=function(n){return Rme(n)&&!zc(n)},Pme=function(n){return Bn(n)},gi=function(n){return qe(n)||fu(n)},Nme=0,Lc=function(n){var t=++Nme;return"".concat(n||"").concat(t)},cu=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!qe(n)&&!fu(n))return i;var a;if(Yl(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return zc(a)&&(a=i),r&&a>t&&(a=t),a},Us=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},$me=function(n){if(!Array.isArray(n))return!1;for(var t=n.length,i={},r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Hme(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function $S(e){"@babel/helpers - typeof";return $S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$S(e)}var F8={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Uo=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},q8=null,Y_=null,m9=function e(n){if(n===q8&&Array.isArray(Y_))return Y_;var t=[];return O.Children.forEach(n,function(i){Bn(i)||(Tme.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),Y_=t,q8=n,t};function ua(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return Uo(r)}):i=[Uo(n)],m9(e).forEach(function(r){var a=la(r,"type.displayName")||la(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Nr(e,n){var t=ua(e,n);return t&&t[0]}var H8=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!qe(i)||i<=0||!qe(r)||r<=0)},Ume=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Vme=function(n){return n&&n.type&&fu(n.type)&&Ume.indexOf(n.type)>=0},Zq=function(n){return n&&$S(n)==="object"&&"clipDot"in n},Wme=function(n,t,i,r){var a,o=(a=G_==null?void 0:G_[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!Rn(n)&&(r&&o.includes(t)||Ime.includes(t))||i&&h9.includes(t)},$n=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(O.isValidElement(n)&&(r=n.props),!$c(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;Wme((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},zS=function e(n,t){if(n===t)return!0;var i=O.Children.count(n);if(i!==O.Children.count(t))return!1;if(i===0)return!0;if(i===1)return U8(Array.isArray(n)?n[0]:n,Array.isArray(t)?t[0]:t);for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Zme(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function IS(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,f=e.desc,c=Xme(e,Kme),h=r||{width:t,height:i,x:0,y:0},d=cn("recharts-surface",a);return Z.createElement("svg",LS({},$n(c,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Z.createElement("title",null,l),Z.createElement("desc",null,f),n)}var Qme=["children","className"];function BS(){return BS=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function epe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Tt=Z.forwardRef(function(e,n){var t=e.children,i=e.className,r=Jme(e,Qme),a=cn("recharts-layer",i);return Z.createElement("g",BS({className:a},$n(r,!0),{ref:n}),t)}),Vo=function(n,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;aa?0:a+t),i=i>a?a:i,i<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(a);++r=a?t:e(t,i,r)}return X_=n,X_}var Z_,Y8;function Qq(){if(Y8)return Z_;Y8=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function f(c){return l.test(c)}return Z_=f,Z_}var Q_,K8;function ipe(){if(K8)return Q_;K8=1;function e(n){return n.split("")}return Q_=e,Q_}var J_,X8;function rpe(){if(X8)return J_;X8=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+l+"|"+f+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=c+"?",b="["+a+"]?",w="(?:"+v+"(?:"+[h,d,p].join("|")+")"+b+y+")*",_=b+y+w,S="(?:"+[h+l+"?",l,d,p,o].join("|")+")",C=RegExp(f+"(?="+f+")|"+S+_,"g");function E(A){return A.match(C)||[]}return J_=E,J_}var e2,Z8;function ape(){if(Z8)return e2;Z8=1;var e=ipe(),n=Qq(),t=rpe();function i(r){return n(r)?t(r):e(r)}return e2=i,e2}var n2,Q8;function ope(){if(Q8)return n2;Q8=1;var e=tpe(),n=Qq(),t=ape(),i=Gq();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,f=l?l[0]:o.charAt(0),c=l?e(l,1).join(""):o.slice(1);return f[a]()+c}}return n2=r,n2}var t2,J8;function spe(){if(J8)return t2;J8=1;var e=ope(),n=e("toUpperCase");return t2=n,t2}var lpe=spe();const a0=ot(lpe);function Et(e){return function(){return e}}const Jq=Math.cos,Rg=Math.sin,$a=Math.sqrt,Pg=Math.PI,o0=2*Pg,FS=Math.PI,qS=2*FS,Fl=1e-6,upe=qS-Fl;function eH(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return eH;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rFl)if(!(Math.abs(d*f-c*h)>Fl)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,y=r-l,b=f*f+c*c,w=v*v+y*y,_=Math.sqrt(b),S=Math.sqrt(p),C=a*Math.tan((FS-Math.acos((b+p-w)/(2*_*S)))/2),E=C/S,A=C/_;Math.abs(E-1)>Fl&&this._append`L${n+E*h},${t+E*d}`,this._append`A${a},${a},0,0,${+(d*v>h*y)},${this._x1=n+A*f},${this._y1=t+A*c}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),f=i*Math.sin(r),c=n+l,h=t+f,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Fl||Math.abs(this._y1-h)>Fl)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%qS+qS),p>upe?this._append`A${i},${i},0,1,${d},${n-l},${t-f}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>Fl&&this._append`A${i},${i},0,${+(p>=FS)},${d},${this._x1=n+i*Math.cos(a)},${this._y1=t+i*Math.sin(a)}`)}rect(n,t,i,r){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function p9(e){let n=3;return e.digits=function(t){if(!arguments.length)return n;if(t==null)n=null;else{const i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);n=i}return e},()=>new cpe(n)}function v9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function nH(e){this._context=e}nH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function s0(e){return new nH(e)}function tH(e){return e[0]}function iH(e){return e[1]}function rH(e,n){var t=Et(!0),i=null,r=s0,a=null,o=p9(l);e=typeof e=="function"?e:e===void 0?tH:Et(e),n=typeof n=="function"?n:n===void 0?iH:Et(n);function l(f){var c,h=(f=v9(f)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),c=0;c<=h;++c)!(c=v;--y)l.point(C[y],E[y]);l.lineEnd(),l.areaEnd()}_&&(C[p]=+e(w,p,d),E[p]=+n(w,p,d),l.point(i?+i(w,p,d):C[p],t?+t(w,p,d):E[p]))}if(S)return l=null,S+""||null}function h(){return rH().defined(r).curve(o).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Et(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Et(+d),c):e},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Et(+d),c):i},c.y=function(d){return arguments.length?(n=typeof d=="function"?d:Et(+d),t=null,c):n},c.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Et(+d),c):n},c.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Et(+d),c):t},c.lineX0=c.lineY0=function(){return h().x(e).y(n)},c.lineY1=function(){return h().x(e).y(t)},c.lineX1=function(){return h().x(i).y(n)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Et(!!d),c):r},c.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),c):o},c.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),c):a},c}class aH{constructor(n,t){this._context=n,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,t){switch(n=+n,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,t,n,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,n,this._y0,n,t);break}}this._x0=n,this._y0=t}}function dpe(e){return new aH(e,!0)}function hpe(e){return new aH(e,!1)}const g9={draw(e,n){const t=$a(n/Pg);e.moveTo(t,0),e.arc(0,0,t,0,o0)}},mpe={draw(e,n){const t=$a(n/5)/2;e.moveTo(-3*t,-t),e.lineTo(-t,-t),e.lineTo(-t,-3*t),e.lineTo(t,-3*t),e.lineTo(t,-t),e.lineTo(3*t,-t),e.lineTo(3*t,t),e.lineTo(t,t),e.lineTo(t,3*t),e.lineTo(-t,3*t),e.lineTo(-t,t),e.lineTo(-3*t,t),e.closePath()}},oH=$a(1/3),ppe=oH*2,vpe={draw(e,n){const t=$a(n/ppe),i=t*oH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},gpe={draw(e,n){const t=$a(n),i=-t/2;e.rect(i,i,t,t)}},ype=.8908130915292852,sH=Rg(Pg/10)/Rg(7*Pg/10),bpe=Rg(o0/10)*sH,wpe=-Jq(o0/10)*sH,kpe={draw(e,n){const t=$a(n*ype),i=bpe*t,r=wpe*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=o0*a/5,l=Jq(o),f=Rg(o);e.lineTo(f*t,-l*t),e.lineTo(l*i-f*r,f*i+l*r)}e.closePath()}},i2=$a(3),_pe={draw(e,n){const t=-$a(n/(i2*3));e.moveTo(0,t*2),e.lineTo(-i2*t,-t),e.lineTo(i2*t,-t),e.closePath()}},Qr=-.5,Jr=$a(3)/2,HS=1/$a(12),xpe=(HS/2+1)*3,Spe={draw(e,n){const t=$a(n/xpe),i=t/2,r=t*HS,a=i,o=t*HS+t,l=-a,f=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,f),e.lineTo(Qr*i-Jr*r,Jr*i+Qr*r),e.lineTo(Qr*a-Jr*o,Jr*a+Qr*o),e.lineTo(Qr*l-Jr*f,Jr*l+Qr*f),e.lineTo(Qr*i+Jr*r,Qr*r-Jr*i),e.lineTo(Qr*a+Jr*o,Qr*o-Jr*a),e.lineTo(Qr*l+Jr*f,Qr*f-Jr*l),e.closePath()}};function Cpe(e,n){let t=null,i=p9(r);e=typeof e=="function"?e:Et(e||g9),n=typeof n=="function"?n:Et(n===void 0?64:+n);function r(){let a;if(t||(t=a=i()),e.apply(this,arguments).draw(t,+n.apply(this,arguments)),a)return t=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:Et(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Et(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function Ng(){}function $g(e,n,t){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+t)/6)}function lH(e){this._context=e}lH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:$g(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:$g(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Ape(e){return new lH(e)}function uH(e){this._context=e}uH.prototype={areaStart:Ng,areaEnd:Ng,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:$g(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Ope(e){return new uH(e)}function fH(e){this._context=e}fH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var t=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 3:this._point=4;default:$g(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Epe(e){return new fH(e)}function cH(e){this._context=e}cH.prototype={areaStart:Ng,areaEnd:Ng,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function Tpe(e){return new cH(e)}function eD(e){return e<0?-1:1}function nD(e,n,t){var i=e._x1-e._x0,r=n-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),o=(t-e._y1)/(r||i<0&&-0),l=(a*r+o*i)/(i+r);return(eD(a)+eD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function tD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function r2(e,n,t){var i=e._x0,r=e._y0,a=e._x1,o=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,r+l*n,a-l,o-l*t,a,o)}function zg(e){this._context=e}zg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:r2(this,this._t0,tD(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var t=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,r2(this,tD(this,t=nD(this,e,n)),t);break;default:r2(this,this._t0,t=nD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function dH(e){this._context=new hH(e)}(dH.prototype=Object.create(zg.prototype)).point=function(e,n){zg.prototype.point.call(this,n,e)};function hH(e){this._context=e}hH.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,t,i,r,a){this._context.bezierCurveTo(n,e,i,t,a,r)}};function Mpe(e){return new zg(e)}function jpe(e){return new dH(e)}function mH(e){this._context=e}mH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,t=e.length;if(t)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),t===2)this._context.lineTo(e[1],n[1]);else for(var i=iD(e),r=iD(n),a=0,o=1;o=0;--n)r[n]=(o[n]-r[n+1])/a[n];for(a[t-1]=(e[t]+r[t-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,n)}break}}this._x=e,this._y=n}};function Rpe(e){return new l0(e,.5)}function Ppe(e){return new l0(e,0)}function Npe(e){return new l0(e,1)}function Uf(e,n){if((o=e.length)>1)for(var t=1,i,r,a=e[n[0]],o,l=a.length;t=0;)t[n]=n;return t}function $pe(e,n){return e[n]}function zpe(e){const n=[];return n.key=e,n}function Lpe(){var e=Et([]),n=US,t=Uf,i=$pe;function r(a){var o=Array.from(e.apply(this,arguments),zpe),l,f=o.length,c=-1,h;for(const d of a)for(l=0,++c;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Gpe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var pH={symbolCircle:g9,symbolCross:mpe,symbolDiamond:vpe,symbolSquare:gpe,symbolStar:kpe,symbolTriangle:_pe,symbolWye:Spe},Ype=Math.PI/180,Kpe=function(n){var t="symbol".concat(a0(n));return pH[t]||g9},Xpe=function(n,t,i){if(t==="area")return n;switch(i){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var r=18*Ype;return 1.25*n*n*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},Zpe=function(n,t){pH["symbol".concat(a0(n))]=t},y9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,f=Wpe(n,qpe),c=aD(aD({},f),{},{type:i,size:a,sizeType:l}),h=function(){var w=Kpe(i),_=Cpe().type(w).size(Xpe(a,l,i));return _()},d=c.className,p=c.cx,v=c.cy,y=$n(c,!0);return p===+p&&v===+v&&a===+a?Z.createElement("path",VS({},y,{className:cn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};y9.registerSymbol=Zpe;function Vf(e){"@babel/helpers - typeof";return Vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vf(e)}function WS(){return WS=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var S=v.inactive?c:v.color;return Z.createElement("li",WS({className:w,style:d,key:"legend-item-".concat(y)},Dg(i.props,v,y)),Z.createElement(IS,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Z.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},b?b(_,v,y):_))})}},{key:"render",value:function(){var i=this.props,r=i.payload,a=i.layout,o=i.align;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Z.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(O.PureComponent);qh(b9,"displayName","Legend");qh(b9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var a2,sD;function sve(){if(sD)return a2;sD=1;var e=t0();function n(){this.__data__=new e,this.size=0}return a2=n,a2}var o2,lD;function lve(){if(lD)return o2;lD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return o2=e,o2}var s2,uD;function uve(){if(uD)return s2;uD=1;function e(n){return this.__data__.get(n)}return s2=e,s2}var l2,fD;function fve(){if(fD)return l2;fD=1;function e(n){return this.__data__.has(n)}return l2=e,l2}var u2,cD;function cve(){if(cD)return u2;cD=1;var e=t0(),n=u9(),t=f9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!n||f.lengthv))return!1;var b=d.get(o),w=d.get(l);if(b&&w)return b==l&&w==o;var _=-1,S=!0,C=f&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return j2=n,j2}var D2,ND;function Sve(){if(ND)return D2;ND=1;var e=us(),n=x9(),t=fs(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",f="[object Function]",c="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",y="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",C="[object Float64Array]",E="[object Int8Array]",A="[object Int16Array]",T="[object Int32Array]",j="[object Uint8Array]",N="[object Uint8ClampedArray]",q="[object Uint16Array]",R="[object Uint32Array]",L={};L[S]=L[C]=L[E]=L[A]=L[T]=L[j]=L[N]=L[q]=L[R]=!0,L[i]=L[r]=L[w]=L[a]=L[_]=L[o]=L[l]=L[f]=L[c]=L[h]=L[d]=L[p]=L[v]=L[y]=L[b]=!1;function B(G){return t(G)&&n(G.length)&&!!L[e(G)]}return D2=B,D2}var R2,$D;function CH(){if($D)return R2;$D=1;function e(n){return function(t){return n(t)}}return R2=e,R2}var oh={exports:{}};oh.exports;var zD;function Cve(){return zD||(zD=1,(function(e,n){var t=Uq(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var f=r&&r.require&&r.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(oh,oh.exports)),oh.exports}var P2,LD;function AH(){if(LD)return P2;LD=1;var e=Sve(),n=CH(),t=Cve(),i=t&&t.isTypedArray,r=i?n(i):e;return P2=r,P2}var N2,ID;function Ave(){if(ID)return N2;ID=1;var e=kve(),n=k9(),t=br(),i=SH(),r=_9(),a=AH(),o=Object.prototype,l=o.hasOwnProperty;function f(c,h){var d=t(c),p=!d&&n(c),v=!d&&!p&&i(c),y=!d&&!p&&!v&&a(c),b=d||p||v||y,w=b?e(c.length,String):[],_=w.length;for(var S in c)(h||l.call(c,S))&&!(b&&(S=="length"||v&&(S=="offset"||S=="parent")||y&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||r(S,_)))&&w.push(S);return w}return N2=f,N2}var $2,BD;function Ove(){if(BD)return $2;BD=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return $2=n,$2}var z2,FD;function OH(){if(FD)return z2;FD=1;function e(n,t){return function(i){return n(t(i))}}return z2=e,z2}var L2,qD;function Eve(){if(qD)return L2;qD=1;var e=OH(),n=e(Object.keys,Object);return L2=n,L2}var I2,HD;function Tve(){if(HD)return I2;HD=1;var e=Ove(),n=Eve(),t=Object.prototype,i=t.hasOwnProperty;function r(a){if(!e(a))return n(a);var o=[];for(var l in Object(a))i.call(a,l)&&l!="constructor"&&o.push(l);return o}return I2=r,I2}var B2,UD;function Xm(){if(UD)return B2;UD=1;var e=s9(),n=x9();function t(i){return i!=null&&n(i.length)&&!e(i)}return B2=t,B2}var F2,VD;function u0(){if(VD)return F2;VD=1;var e=Ave(),n=Tve(),t=Xm();function i(r){return t(r)?e(r):n(r)}return F2=i,F2}var q2,WD;function Mve(){if(WD)return q2;WD=1;var e=gve(),n=wve(),t=u0();function i(r){return e(r,t,n)}return q2=i,q2}var H2,GD;function jve(){if(GD)return H2;GD=1;var e=Mve(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,f,c,h){var d=l&n,p=e(a),v=p.length,y=e(o),b=y.length;if(v!=b&&!d)return!1;for(var w=v;w--;){var _=p[w];if(!(d?_ in o:i.call(o,_)))return!1}var S=h.get(a),C=h.get(o);if(S&&C)return S==o&&C==a;var E=!0;h.set(a,o),h.set(o,a);for(var A=d;++w-1}return px=n,px}var vx,w7;function Zve(){if(w7)return vx;w7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=c?null:r(f);if(_)return a(_);y=!1,p=i,w=new e}else w=c?[]:b;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function dge(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function hge(e){return e.value}function mge(e,n){if(Z.isValidElement(e))return Z.cloneElement(e,n);if(typeof e=="function")return Z.createElement(e,n);n.ref;var t=cge(n,ige);return Z.createElement(b9,t)}var E7=1,Wo=(function(e){function n(){var t;rge(this,n);for(var i=arguments.length,r=new Array(i),a=0;aE7||Math.abs(r.height-this.lastBoundingBox.height)>E7)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,i&&i(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Po({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,f=r.margin,c=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=o==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var y=this.getBBoxSnapshot();p={top:((h||0)-y.height)/2}}else p=l==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Po(Po({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,f=r.wrapperStyle,c=r.payloadUniqBy,h=r.payload,d=Po(Po({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(f)),f);return Z.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},mge(a,Po(Po({},this.props),{},{payload:DH(h,c,hge)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Po(Po({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&qe(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(O.PureComponent);f0(Wo,"displayName","Legend");f0(Wo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var kx,T7;function pge(){if(T7)return kx;T7=1;var e=Km(),n=k9(),t=br(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return kx=r,kx}var _x,M7;function NH(){if(M7)return _x;M7=1;var e=xH(),n=pge();function t(i,r,a,o,l){var f=-1,c=i.length;for(a||(a=n),l||(l=[]);++f0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return _x=t,_x}var xx,j7;function vge(){if(j7)return xx;j7=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),f=l.length;f--;){var c=l[n?f:++a];if(i(o[c],c,o)===!1)break}return t}}return xx=e,xx}var Sx,D7;function gge(){if(D7)return Sx;D7=1;var e=vge(),n=e();return Sx=n,Sx}var Cx,R7;function $H(){if(R7)return Cx;R7=1;var e=gge(),n=u0();function t(i,r){return i&&e(i,r,n)}return Cx=t,Cx}var Ax,P7;function yge(){if(P7)return Ax;P7=1;var e=Xm();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,f=Object(r);(i?l--:++li||l&&f&&h&&!c&&!d||a&&f&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=c)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return jx=n,jx}var Dx,B7;function _ge(){if(B7)return Dx;B7=1;var e=c9(),n=d9(),t=cl(),i=zH(),r=bge(),a=CH(),o=kge(),l=Ic(),f=br();function c(h,d,p){d.length?d=e(d,function(b){return f(b)?function(w){return n(w,b.length===1?b[0]:b)}:b}):d=[l];var v=-1;d=e(d,a(t));var y=i(h,function(b,w,_){var S=e(d,function(C){return C(b)});return{criteria:S,index:++v,value:b}});return r(y,function(b,w){return o(b,w,p)})}return Dx=c,Dx}var Rx,F7;function xge(){if(F7)return Rx;F7=1;function e(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}return Rx=e,Rx}var Px,q7;function Sge(){if(q7)return Px;q7=1;var e=xge(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,f=n(o.length-r,0),c=Array(f);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return Lx=i,Lx}var Ix,G7;function Ege(){if(G7)return Ix;G7=1;var e=Age(),n=Oge(),t=n(e);return Ix=t,Ix}var Bx,Y7;function Tge(){if(Y7)return Bx;Y7=1;var e=Ic(),n=Sge(),t=Ege();function i(r,a){return t(n(r,a,e),r+"")}return Bx=i,Bx}var Fx,K7;function c0(){if(K7)return Fx;K7=1;var e=l9(),n=Xm(),t=_9(),i=fl();function r(a,o,l){if(!i(l))return!1;var f=typeof o;return(f=="number"?n(l)&&t(o,l.length):f=="string"&&o in l)?e(l[o],a):!1}return Fx=r,Fx}var qx,X7;function Mge(){if(X7)return qx;X7=1;var e=NH(),n=_ge(),t=Tge(),i=c0(),r=t(function(a,o){if(a==null)return[];var l=o.length;return l>1&&i(a,o[0],o[1])?o=[]:l>2&&i(o[0],o[1],o[2])&&(o=[o[0]]),n(a,e(o,1),[])});return qx=r,qx}var jge=Mge();const A9=ot(jge);function Hh(e){"@babel/helpers - typeof";return Hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hh(e)}function KS(){return KS=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n.x),"".concat(qd,"-left"),qe(t)&&n&&qe(n.x)&&t=n.y),"".concat(qd,"-top"),qe(i)&&n&&qe(n.y)&&ib?Math.max(h,f[i]):Math.max(d,f[i])}function Wge(e){var n=e.translateX,t=e.translateY,i=e.useTranslate3d;return{transform:i?"translate3d(".concat(n,"px, ").concat(t,"px, 0)"):"translate(".concat(n,"px, ").concat(t,"px)")}}function Gge(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,f=e.viewBox,c,h,d;return o.height>0&&o.width>0&&t?(h=J7({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:f,viewBoxDimension:f.width}),d=J7({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:f,viewBoxDimension:f.height}),c=Wge({translateX:h,translateY:d,useTranslate3d:l})):c=Uge,{cssProperties:c,cssClasses:Vge({translateX:h,translateY:d,coordinate:t})}}function Gf(e){"@babel/helpers - typeof";return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gf(e)}function eR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function nR(e){for(var n=1;ntR||Math.abs(i.height-this.state.lastBoundingBox.height)>tR)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,f=r.animationEasing,c=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,y=r.position,b=r.reverseDirection,w=r.useTranslate3d,_=r.viewBox,S=r.wrapperStyle,C=Gge({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:y,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:_}),E=C.cssClasses,A=C.cssProperties,T=nR(nR({transition:p&&a?"transform ".concat(l,"ms ").concat(f):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},S);return Z.createElement("div",{tabIndex:-1,className:E,style:T,ref:function(N){i.wrapperNode=N}},c)}}])})(O.PureComponent),i1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ou={isSsr:i1e()};function Yf(e){"@babel/helpers - typeof";return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Yf(e)}function iR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function rR(e){for(var n=1;n0;return Z.createElement(t1e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:f,isAnimationActive:p,active:a,coordinate:h,hasPayload:T,offset:v,position:w,reverseDirection:_,useTranslate3d:S,viewBox:C,wrapperStyle:E},h1e(c,rR(rR({},this.props),{},{payload:A})))}}])})(O.PureComponent);O9(ra,"displayName","Tooltip");O9(ra,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ou.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Ux,aR;function m1e(){if(aR)return Ux;aR=1;var e=ho(),n=function(){return e.Date.now()};return Ux=n,Ux}var Vx,oR;function p1e(){if(oR)return Vx;oR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return Vx=n,Vx}var Wx,sR;function v1e(){if(sR)return Wx;sR=1;var e=p1e(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Wx=t,Wx}var Gx,lR;function HH(){if(lR)return Gx;lR=1;var e=v1e(),n=fl(),t=Nc(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function f(c){if(typeof c=="number")return c;if(t(c))return i;if(n(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=n(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=a.test(c);return d||o.test(c)?l(c.slice(2),d?2:8):r.test(c)?i:+c}return Gx=f,Gx}var Yx,uR;function g1e(){if(uR)return Yx;uR=1;var e=fl(),n=m1e(),t=HH(),i="Expected a function",r=Math.max,a=Math.min;function o(l,f,c){var h,d,p,v,y,b,w=0,_=!1,S=!1,C=!0;if(typeof l!="function")throw new TypeError(i);f=t(f)||0,e(c)&&(_=!!c.leading,S="maxWait"in c,p=S?r(t(c.maxWait)||0,f):p,C="trailing"in c?!!c.trailing:C);function E(G){var H=h,U=d;return h=d=void 0,w=G,v=l.apply(U,H),v}function A(G){return w=G,y=setTimeout(N,f),_?E(G):v}function T(G){var H=G-b,U=G-w,P=f-H;return S?a(P,p-U):P}function j(G){var H=G-b,U=G-w;return b===void 0||H>=f||H<0||S&&U>=p}function N(){var G=n();if(j(G))return q(G);y=setTimeout(N,T(G))}function q(G){return y=void 0,C&&h?E(G):(h=d=void 0,v)}function R(){y!==void 0&&clearTimeout(y),w=0,h=b=d=y=void 0}function L(){return y===void 0?v:q(n())}function B(){var G=n(),H=j(G);if(h=arguments,d=this,b=G,H){if(y===void 0)return A(b);if(S)return clearTimeout(y),y=setTimeout(N,f),E(b)}return y===void 0&&(y=setTimeout(N,f)),v}return B.cancel=R,B.flush=L,B}return Yx=o,Yx}var Kx,fR;function y1e(){if(fR)return Kx;fR=1;var e=g1e(),n=fl(),t="Expected a function";function i(r,a,o){var l=!0,f=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,f="trailing"in o?!!o.trailing:f),e(r,a,{leading:l,maxWait:a,trailing:f})}return Kx=i,Kx}var b1e=y1e();const UH=ot(b1e);function Vh(e){"@babel/helpers - typeof";return Vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vh(e)}function cR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function jv(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=UH(G,b,{trailing:!0,leading:!1}));var H=new ResizeObserver(G),U=A.current.getBoundingClientRect(),P=U.width,z=U.height;return L(P,z),H.observe(A.current),function(){H.disconnect()}},[L,b]);var B=O.useMemo(function(){var G=q.containerWidth,H=q.containerHeight;if(G<0||H<0)return null;Vo(Yl(o)||Yl(f),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,f),Vo(!t||t>0,"The aspect(%s) must be greater than zero.",t);var U=Yl(o)?G:o,P=Yl(f)?H:f;t&&t>0&&(U?P=U/t:P&&(U=P*t),p&&P>p&&(P=p)),Vo(U>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,U,P,o,f,h,d,t);var z=!Array.isArray(v)&&Uo(v.type).endsWith("Chart");return Z.Children.map(v,function(F){return Z.isValidElement(F)?O.cloneElement(F,jv({width:U,height:P},z?{style:jv({height:"100%",width:"100%",maxHeight:P,maxWidth:U},F.props.style)}:{})):F})},[t,v,f,p,d,h,q,o]);return Z.createElement("div",{id:w?"".concat(w):void 0,className:cn("recharts-responsive-container",_),style:jv(jv({},E),{},{width:o,height:f,minWidth:h,minHeight:d,maxHeight:p}),ref:A},B)}),VH=function(n){return null};VH.displayName="Cell";function Wh(e){"@babel/helpers - typeof";return Wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wh(e)}function hR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function JS(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Ou.isSsr)return{width:0,height:0};var i=R1e(t),r=JSON.stringify({text:n,copyStyle:i});if(bf.widthCache[r])return bf.widthCache[r];try{var a=document.getElementById(mR);a||(a=document.createElement("span"),a.setAttribute("id",mR),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=JS(JS({},D1e),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),f={width:l.width,height:l.height};return bf.widthCache[r]=f,++bf.cacheCount>j1e&&(bf.cacheCount=0,bf.widthCache={}),f}catch{return{width:0,height:0}}},P1e=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function Gh(e){"@babel/helpers - typeof";return Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gh(e)}function qg(e,n){return L1e(e)||z1e(e,n)||$1e(e,n)||N1e()}function N1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $1e(e,n){if(e){if(typeof e=="string")return pR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pR(e,n)}}function pR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Q1e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function kR(e,n){return tye(e)||nye(e,n)||eye(e,n)||J1e()}function J1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eye(e,n){if(e){if(typeof e=="string")return _R(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _R(e,n)}}function _R(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&arguments[0]!==void 0?arguments[0]:[];return U.reduce(function(P,z){var F=z.word,Y=z.width,D=P[P.length-1];if(D&&(r==null||a||D.width+Y+iz.width?P:z})};if(!h)return v;for(var b="…",w=function(U){var P=d.slice(0,U),z=KH({breakAll:c,style:f,children:P+b}).wordsWithComputedWidth,F=p(z),Y=F.length>o||y(F).width>Number(r);return[Y,F]},_=0,S=d.length-1,C=0,E;_<=S&&C<=d.length-1;){var A=Math.floor((_+S)/2),T=A-1,j=w(T),N=kR(j,2),q=N[0],R=N[1],L=w(A),B=kR(L,1),G=B[0];if(!q&&!G&&(_=A+1),q&&G&&(S=A-1),!q&&G){E=R;break}C++}return E||v},xR=function(n){var t=Bn(n)?[]:n.toString().split(YH);return[{words:t}]},rye=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Ou.isSsr){var f,c,h=KH({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;f=d,c=p}else return xR(r);return iye({breakAll:o,children:r,maxLines:l,style:a},f,c,t,i)}return xR(r)},SR="#808080",Hg=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,f=n.capHeight,c=f===void 0?"0.71em":f,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,y=n.verticalAnchor,b=y===void 0?"end":y,w=n.fill,_=w===void 0?SR:w,S=wR(n,X1e),C=O.useMemo(function(){return rye({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:d,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,d,S.style,S.width]),E=S.dx,A=S.dy,T=S.angle,j=S.className,N=S.breakAll,q=wR(S,Z1e);if(!gi(i)||!gi(a))return null;var R=i+(qe(E)?E:0),L=a+(qe(A)?A:0),B;switch(b){case"start":B=Xx("calc(".concat(c,")"));break;case"middle":B=Xx("calc(".concat((C.length-1)/2," * -").concat(l," + (").concat(c," / 2))"));break;default:B=Xx("calc(".concat(C.length-1," * -").concat(l,")"));break}var G=[];if(d){var H=C[0].width,U=S.width;G.push("scale(".concat((qe(U)?U/H:1)/H,")"))}return T&&G.push("rotate(".concat(T,", ").concat(R,", ").concat(L,")")),G.length&&(q.transform=G.join(" ")),Z.createElement("text",e4({},$n(q,!0),{x:R,y:L,className:cn("recharts-text",j),textAnchor:v,fill:_.includes("url")?SR:_}),C.map(function(P,z){var F=P.words.join(N?"":" ");return Z.createElement("tspan",{x:R,dy:z===0?B:l,key:"".concat(F,"-").concat(z)},F)}))};function Zs(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function aye(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function T9(e){let n,t,i;e.length!==2?(n=Zs,t=(l,f)=>Zs(e(l),f),i=(l,f)=>e(l)-f):(n=e===Zs||e===aye?e:oye,t=e,i=e);function r(l,f,c=0,h=l.length){if(c>>1;t(l[d],f)<0?c=d+1:h=d}while(c>>1;t(l[d],f)<=0?c=d+1:h=d}while(cc&&i(l[d-1],f)>-i(l[d],f)?d-1:d}return{left:r,center:o,right:a}}function oye(){return 0}function XH(e){return e===null?NaN:+e}function*sye(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const lye=T9(Zs),Zm=lye.right;T9(XH).center;class CR extends Map{constructor(n,t=cye){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[i,r]of n)this.set(i,r)}get(n){return super.get(AR(this,n))}has(n){return super.has(AR(this,n))}set(n,t){return super.set(uye(this,n),t)}delete(n){return super.delete(fye(this,n))}}function AR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function uye({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function fye({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function cye(e){return e!==null&&typeof e=="object"?e.valueOf():e}function dye(e=Zs){if(e===Zs)return ZH;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,t)=>{const i=e(n,t);return i||i===0?i:(e(t,t)===0)-(e(n,n)===0)}}function ZH(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const hye=Math.sqrt(50),mye=Math.sqrt(10),pye=Math.sqrt(2);function Ug(e,n,t){const i=(n-e)/Math.max(0,t),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=hye?10:a>=mye?5:a>=pye?2:1;let l,f,c;return r<0?(c=Math.pow(10,-r)/o,l=Math.round(e*c),f=Math.round(n*c),l/cn&&--f,c=-c):(c=Math.pow(10,r)*o,l=Math.round(e/c),f=Math.round(n/c),l*cn&&--f),f0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,f=new Array(l);if(i)if(o<0)for(let c=0;c=i)&&(t=i);return t}function ER(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function QH(e,n,t=0,i=1/0,r){if(n=Math.floor(n),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(e.length-1,i)),!(t<=n&&n<=i))return e;for(r=r===void 0?ZH:dye(r);i>t;){if(i-t>600){const f=i-t+1,c=n-t+1,h=Math.log(f),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(f-d)/f)*(c-f/2<0?-1:1),v=Math.max(t,Math.floor(n-c*d/f+p)),y=Math.min(i,Math.floor(n+(f-c)*d/f+p));QH(e,n,v,y,r)}const a=e[n];let o=t,l=i;for(Hd(e,t,n),r(e[i],a)>0&&Hd(e,t,i);o0;)--l}r(e[t],a)===0?Hd(e,t,l):(++l,Hd(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function Hd(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function vye(e,n,t){if(e=Float64Array.from(sye(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return ER(e);if(n>=1)return OR(e);var i,r=(i-1)*n,a=Math.floor(r),o=OR(QH(e,a).subarray(0,a+1)),l=ER(e.subarray(a+1));return o+(l-o)*(r-a)}}function gye(e,n,t=XH){if(!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return+t(e[0],0,e);if(n>=1)return+t(e[i-1],i-1,e);var i,r=(i-1)*n,a=Math.floor(r),o=+t(e[a],a,e),l=+t(e[a+1],a+1,e);return o+(l-o)*(r-a)}}function yye(e,n,t){e=+e,n=+n,t=(r=arguments.length)<2?(n=e,e=0,1):r<3?1:+t;for(var i=-1,r=Math.max(0,Math.ceil((n-e)/t))|0,a=new Array(r);++i>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?Rv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?Rv(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=wye.exec(e))?new vr(n[1],n[2],n[3],1):(n=kye.exec(e))?new vr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=_ye.exec(e))?Rv(n[1],n[2],n[3],n[4]):(n=xye.exec(e))?Rv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Sye.exec(e))?NR(n[1],n[2]/100,n[3]/100,1):(n=Cye.exec(e))?NR(n[1],n[2]/100,n[3]/100,n[4]):TR.hasOwnProperty(e)?DR(TR[e]):e==="transparent"?new vr(NaN,NaN,NaN,0):null}function DR(e){return new vr(e>>16&255,e>>8&255,e&255,1)}function Rv(e,n,t,i){return i<=0&&(e=n=t=NaN),new vr(e,n,t,i)}function Eye(e){return e instanceof Qm||(e=Zh(e)),e?(e=e.rgb(),new vr(e.r,e.g,e.b,e.opacity)):new vr}function a4(e,n,t,i){return arguments.length===1?Eye(e):new vr(e,n,t,i??1)}function vr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}j9(vr,a4,eU(Qm,{brighter(e){return e=e==null?Vg:Math.pow(Vg,e),new vr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Kh:Math.pow(Kh,e),new vr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vr(nu(this.r),nu(this.g),nu(this.b),Wg(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:RR,formatHex:RR,formatHex8:Tye,formatRgb:PR,toString:PR}));function RR(){return`#${Kl(this.r)}${Kl(this.g)}${Kl(this.b)}`}function Tye(){return`#${Kl(this.r)}${Kl(this.g)}${Kl(this.b)}${Kl((isNaN(this.opacity)?1:this.opacity)*255)}`}function PR(){const e=Wg(this.opacity);return`${e===1?"rgb(":"rgba("}${nu(this.r)}, ${nu(this.g)}, ${nu(this.b)}${e===1?")":`, ${e})`}`}function Wg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Kl(e){return e=nu(e),(e<16?"0":"")+e.toString(16)}function NR(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Oa(e,n,t,i)}function nU(e){if(e instanceof Oa)return new Oa(e.h,e.s,e.l,e.opacity);if(e instanceof Qm||(e=Zh(e)),!e)return new Oa;if(e instanceof Oa)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,f=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&f<1?0:o,new Oa(o,l,f,e.opacity)}function Mye(e,n,t,i){return arguments.length===1?nU(e):new Oa(e,n,t,i??1)}function Oa(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}j9(Oa,Mye,eU(Qm,{brighter(e){return e=e==null?Vg:Math.pow(Vg,e),new Oa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Kh:Math.pow(Kh,e),new Oa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*n,r=2*t-i;return new vr(Zx(e>=240?e-240:e+120,r,i),Zx(e,r,i),Zx(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Oa($R(this.h),Pv(this.s),Pv(this.l),Wg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Wg(this.opacity);return`${e===1?"hsl(":"hsla("}${$R(this.h)}, ${Pv(this.s)*100}%, ${Pv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $R(e){return e=(e||0)%360,e<0?e+360:e}function Pv(e){return Math.max(0,Math.min(1,e||0))}function Zx(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const D9=e=>()=>e;function jye(e,n){return function(t){return e+t*n}}function Dye(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(i){return Math.pow(e+i*n,t)}}function Rye(e){return(e=+e)==1?tU:function(n,t){return t-n?Dye(n,t,e):D9(isNaN(n)?t:n)}}function tU(e,n){var t=n-e;return t?jye(e,t):D9(isNaN(e)?n:e)}const zR=(function e(n){var t=Rye(n);function i(r,a){var o=t((r=a4(r)).r,(a=a4(a)).r),l=t(r.g,a.g),f=t(r.b,a.b),c=tU(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=f(h),r.opacity=c(h),r+""}}return i.gamma=e,i})(1);function Pye(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,f.push({i:o,x:Gg(i,r)})),t=Qx.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function Vye(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?Wye:Vye,f=c=null,d}function d(p){return p==null||isNaN(p=+p)?a:(f||(f=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((c||(c=l(n,e.map(i),Gg)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Yg),h()):e.slice()},d.range=function(p){return arguments.length?(n=Array.from(p),h()):n.slice()},d.rangeRound=function(p){return n=Array.from(p),t=R9,h()},d.clamp=function(p){return arguments.length?(o=p?!0:nr,h()):o!==nr},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function P9(){return d0()(nr,nr)}function Gye(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Kg(e,n){if(!isFinite(e)||e===0)return null;var t=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function Kf(e){return e=Kg(Math.abs(e)),e?e[1]:NaN}function Yye(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],f=0;r>0&&l>0&&(f+l+1>i&&(l=Math.max(1,i-f)),a.push(t.substring(r-=l,r+l)),!((f+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function Kye(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var Xye=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qh(e){if(!(n=Xye.exec(e)))throw new Error("invalid format: "+e);var n;return new N9({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}Qh.prototype=N9.prototype;function N9(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}N9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Zye(e){e:for(var n=e.length,t=1,i=-1,r;t0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var Xg;function Qye(e,n){var t=Kg(e,n);if(!t)return Xg=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(Xg=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Kg(e,Math.max(0,n+a-1))[0]}function IR(e,n){var t=Kg(e,n);if(!t)return e+"";var i=t[0],r=t[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const BR={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Gye,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>IR(e*100,n),r:IR,s:Qye,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function FR(e){return e}var qR=Array.prototype.map,HR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Jye(e){var n=e.grouping===void 0||e.thousands===void 0?FR:Yye(qR.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?FR:Kye(qR.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(d,p){d=Qh(d);var v=d.fill,y=d.align,b=d.sign,w=d.symbol,_=d.zero,S=d.width,C=d.comma,E=d.precision,A=d.trim,T=d.type;T==="n"?(C=!0,T="g"):BR[T]||(E===void 0&&(E=12),A=!0,T="g"),(_||v==="0"&&y==="=")&&(_=!0,v="0",y="=");var j=(p&&p.prefix!==void 0?p.prefix:"")+(w==="$"?t:w==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():""),N=(w==="$"?i:/[%p]/.test(T)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),q=BR[T],R=/[defgprs%]/.test(T);E=E===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function L(B){var G=j,H=N,U,P,z;if(T==="c")H=q(B)+H,B="";else{B=+B;var F=B<0||1/B<0;if(B=isNaN(B)?f:q(Math.abs(B),E),A&&(B=Zye(B)),F&&+B==0&&b!=="+"&&(F=!1),G=(F?b==="("?b:l:b==="-"||b==="("?"":b)+G,H=(T==="s"&&!isNaN(B)&&Xg!==void 0?HR[8+Xg/3]:"")+H+(F&&b==="("?")":""),R){for(U=-1,P=B.length;++Uz||z>57){H=(z===46?r+B.slice(U+1):B.slice(U))+H,B=B.slice(0,U);break}}}C&&!_&&(B=n(B,1/0));var Y=G.length+B.length+H.length,D=Y>1)+G+B+H+D.slice(Y);break;default:B=D+G+B+H;break}return a(B)}return L.toString=function(){return d+""},L}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(Kf(p)/3)))*3,y=Math.pow(10,-v),b=c((d=Qh(d),d.type="f",d),{suffix:HR[8+v/3]});return function(w){return b(y*w)}}return{format:c,formatPrefix:h}}var Nv,$9,iU;e0e({thousands:",",grouping:[3],currency:["$",""]});function e0e(e){return Nv=Jye(e),$9=Nv.format,iU=Nv.formatPrefix,Nv}function n0e(e){return Math.max(0,-Kf(Math.abs(e)))}function t0e(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Kf(n)/3)))*3-Kf(Math.abs(e)))}function i0e(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,Kf(n)-Kf(e))+1}function rU(e,n,t,i){var r=i4(e,n,t),a;switch(i=Qh(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=t0e(r,o))&&(i.precision=a),iU(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=i0e(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=n0e(r))&&(i.precision=a-(i.type==="%")*2);break}}return $9(i)}function dl(e){var n=e.domain;return e.ticks=function(t){var i=n();return n4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return rU(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],f,c,h=10;for(l0;){if(c=t4(o,l,t),c===f)return i[r]=o,i[a]=l,n(i);if(c>0)o=Math.floor(o/c)*c,l=Math.ceil(l/c)*c;else if(c<0)o=Math.ceil(o*c)/c,l=Math.floor(l*c)/c;else break;f=c}return e},e}function Zg(){var e=P9();return e.copy=function(){return Jm(e,Zg())},ya.apply(e,arguments),dl(e)}function aU(e){var n;function t(i){return i==null||isNaN(i=+i)?n:i}return t.invert=t,t.domain=t.range=function(i){return arguments.length?(e=Array.from(i,Yg),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return aU(e).unknown(n)},e=arguments.length?Array.from(e,Yg):[0,1],dl(t)}function oU(e,n){e=e.slice();var t=0,i=e.length-1,r=e[t],a=e[i],o;return aMath.pow(e,n)}function l0e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function WR(e){return(n,t)=>-e(-n,t)}function z9(e){const n=e(UR,VR),t=n.domain;let i=10,r,a;function o(){return r=l0e(i),a=s0e(i),t()[0]<0?(r=WR(r),a=WR(a),e(r0e,a0e)):e(UR,VR),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const f=t();let c=f[0],h=f[f.length-1];const d=h0){for(;p<=v;++p)for(y=1;yh)break;_.push(b)}}else for(;p<=v;++p)for(y=i-1;y>=1;--y)if(b=p>0?y/a(-p):y*a(p),!(bh)break;_.push(b)}_.length*2{if(l==null&&(l=10),f==null&&(f=i===10?"s":","),typeof f!="function"&&(!(i%1)&&(f=Qh(f)).precision==null&&(f.trim=!0),f=$9(f)),l===1/0)return f;const c=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(oU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function sU(){const e=z9(d0()).domain([1,10]);return e.copy=()=>Jm(e,sU()).base(e.base()),ya.apply(e,arguments),e}function GR(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function YR(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function L9(e){var n=1,t=e(GR(n),YR(n));return t.constant=function(i){return arguments.length?e(GR(n=+i),YR(n)):n},dl(t)}function lU(){var e=L9(d0());return e.copy=function(){return Jm(e,lU()).constant(e.constant())},ya.apply(e,arguments)}function KR(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function u0e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function f0e(e){return e<0?-e*e:e*e}function I9(e){var n=e(nr,nr),t=1;function i(){return t===1?e(nr,nr):t===.5?e(u0e,f0e):e(KR(t),KR(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},dl(n)}function B9(){var e=I9(d0());return e.copy=function(){return Jm(e,B9()).exponent(e.exponent())},ya.apply(e,arguments),e}function c0e(){return B9.apply(null,arguments).exponent(.5)}function XR(e){return Math.sign(e)*e*e}function d0e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uU(){var e=P9(),n=[0,1],t=!1,i;function r(a){var o=d0e(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(XR(a))},r.domain=function(a){return arguments.length?(e.domain(a),r):e.domain()},r.range=function(a){return arguments.length?(e.range((n=Array.from(a,Yg)).map(XR)),r):n.slice()},r.rangeRound=function(a){return r.range(a).round(!0)},r.round=function(a){return arguments.length?(t=!!a,r):t},r.clamp=function(a){return arguments.length?(e.clamp(a),r):e.clamp()},r.unknown=function(a){return arguments.length?(i=a,r):i},r.copy=function(){return uU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},ya.apply(r,arguments),dl(r)}function fU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[c-1],i[c]]},o.unknown=function(f){return arguments.length&&(a=f),o},o.thresholds=function(){return i.slice()},o.copy=function(){return cU().domain([e,n]).range(r).unknown(a)},ya.apply(dl(o),arguments)}function dU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[Zm(e,a,0,i)]:t}return r.domain=function(a){return arguments.length?(e=Array.from(a),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(a){return arguments.length?(n=Array.from(a),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(a){var o=n.indexOf(a);return[e[o-1],e[o]]},r.unknown=function(a){return arguments.length?(t=a,r):t},r.copy=function(){return dU().domain(e).range(n).unknown(t)},ya.apply(r,arguments)}const Jx=new Date,e3=new Date;function yi(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const f=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return f;let c;do f.push(c=new Date(+a)),n(a,l),e(a);while(cyi(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;n(o,-1),!a(o););else for(;--l>=0;)for(;n(o,1),!a(o););}),t&&(r.count=(a,o)=>(Jx.setTime(+a),e3.setTime(+o),e(Jx),e(e3),Math.floor(t(Jx,e3))),r.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?r.filter(i?o=>i(o)%a===0:o=>r.count(0,o)%a===0):r)),r}const Qg=yi(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);Qg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?yi(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):Qg);Qg.range;const Lo=1e3,sa=Lo*60,Io=sa*60,Qo=Io*24,F9=Qo*7,ZR=Qo*30,n3=Qo*365,Xl=yi(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Lo)},(e,n)=>(n-e)/Lo,e=>e.getUTCSeconds());Xl.range;const q9=yi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lo)},(e,n)=>{e.setTime(+e+n*sa)},(e,n)=>(n-e)/sa,e=>e.getMinutes());q9.range;const H9=yi(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*sa)},(e,n)=>(n-e)/sa,e=>e.getUTCMinutes());H9.range;const U9=yi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lo-e.getMinutes()*sa)},(e,n)=>{e.setTime(+e+n*Io)},(e,n)=>(n-e)/Io,e=>e.getHours());U9.range;const V9=yi(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Io)},(e,n)=>(n-e)/Io,e=>e.getUTCHours());V9.range;const ep=yi(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*sa)/Qo,e=>e.getDate()-1);ep.range;const h0=yi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Qo,e=>e.getUTCDate()-1);h0.range;const hU=yi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Qo,e=>Math.floor(e/Qo));hU.range;function Eu(e){return yi(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*sa)/F9)}const m0=Eu(0),Jg=Eu(1),h0e=Eu(2),m0e=Eu(3),Xf=Eu(4),p0e=Eu(5),v0e=Eu(6);m0.range;Jg.range;h0e.range;m0e.range;Xf.range;p0e.range;v0e.range;function Tu(e){return yi(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/F9)}const p0=Tu(0),e1=Tu(1),g0e=Tu(2),y0e=Tu(3),Zf=Tu(4),b0e=Tu(5),w0e=Tu(6);p0.range;e1.range;g0e.range;y0e.range;Zf.range;b0e.range;w0e.range;const W9=yi(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());W9.range;const G9=yi(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());G9.range;const Jo=yi(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());Jo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yi(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});Jo.range;const es=yi(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());es.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yi(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});es.range;function mU(e,n,t,i,r,a){const o=[[Xl,1,Lo],[Xl,5,5*Lo],[Xl,15,15*Lo],[Xl,30,30*Lo],[a,1,sa],[a,5,5*sa],[a,15,15*sa],[a,30,30*sa],[r,1,Io],[r,3,3*Io],[r,6,6*Io],[r,12,12*Io],[i,1,Qo],[i,2,2*Qo],[t,1,F9],[n,1,ZR],[n,3,3*ZR],[e,1,n3]];function l(c,h,d){const p=hw).right(o,p);if(v===o.length)return e.every(i4(c/n3,h/n3,d));if(v===0)return Qg.every(Math.max(i4(c,h,d),1));const[y,b]=o[p/o[v-1][2]53)return null;"w"in ie||(ie.w=1),"Z"in ie?(pe=i3(Ud(ie.y,0,1)),Ce=pe.getUTCDay(),pe=Ce>4||Ce===0?e1.ceil(pe):e1(pe),pe=h0.offset(pe,(ie.V-1)*7),ie.y=pe.getUTCFullYear(),ie.m=pe.getUTCMonth(),ie.d=pe.getUTCDate()+(ie.w+6)%7):(pe=t3(Ud(ie.y,0,1)),Ce=pe.getDay(),pe=Ce>4||Ce===0?Jg.ceil(pe):Jg(pe),pe=ep.offset(pe,(ie.V-1)*7),ie.y=pe.getFullYear(),ie.m=pe.getMonth(),ie.d=pe.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),Ce="Z"in ie?i3(Ud(ie.y,0,1)).getUTCDay():t3(Ud(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(Ce+5)%7:ie.w+ie.U*7-(Ce+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,i3(ie)):t3(ie)}}function N(oe,ue,ke,ie){for(var Re=0,pe=ue.length,Ce=ke.length,De,be;Re=Ce)return-1;if(De=ue.charCodeAt(Re++),De===37){if(De=ue.charAt(Re++),be=A[De in QR?ue.charAt(Re++):De],!be||(ie=be(oe,ke,ie))<0)return-1}else if(De!=ke.charCodeAt(ie++))return-1}return ie}function q(oe,ue,ke){var ie=c.exec(ue.slice(ke));return ie?(oe.p=h.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function R(oe,ue,ke){var ie=v.exec(ue.slice(ke));return ie?(oe.w=y.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function L(oe,ue,ke){var ie=d.exec(ue.slice(ke));return ie?(oe.w=p.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function B(oe,ue,ke){var ie=_.exec(ue.slice(ke));return ie?(oe.m=S.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function G(oe,ue,ke){var ie=b.exec(ue.slice(ke));return ie?(oe.m=w.get(ie[0].toLowerCase()),ke+ie[0].length):-1}function H(oe,ue,ke){return N(oe,n,ue,ke)}function U(oe,ue,ke){return N(oe,t,ue,ke)}function P(oe,ue,ke){return N(oe,i,ue,ke)}function z(oe){return o[oe.getDay()]}function F(oe){return a[oe.getDay()]}function Y(oe){return f[oe.getMonth()]}function D(oe){return l[oe.getMonth()]}function V(oe){return r[+(oe.getHours()>=12)]}function W(oe){return 1+~~(oe.getMonth()/3)}function $(oe){return o[oe.getUTCDay()]}function X(oe){return a[oe.getUTCDay()]}function te(oe){return f[oe.getUTCMonth()]}function ae(oe){return l[oe.getUTCMonth()]}function le(oe){return r[+(oe.getUTCHours()>=12)]}function ye(oe){return 1+~~(oe.getUTCMonth()/3)}return{format:function(oe){var ue=T(oe+="",C);return ue.toString=function(){return oe},ue},parse:function(oe){var ue=j(oe+="",!1);return ue.toString=function(){return oe},ue},utcFormat:function(oe){var ue=T(oe+="",E);return ue.toString=function(){return oe},ue},utcParse:function(oe){var ue=j(oe+="",!0);return ue.toString=function(){return oe},ue}}}var QR={"-":"",_:" ",0:"0"},Si=/^\s*\d+/,A0e=/^%/,O0e=/[\\^$*+?|[\]().{}]/g;function at(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function T0e(e,n,t){var i=Si.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function M0e(e,n,t){var i=Si.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function j0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function D0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function R0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function JR(e,n,t){var i=Si.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function eP(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function P0e(e,n,t){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),t+i[0].length):-1}function N0e(e,n,t){var i=Si.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function $0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function nP(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function z0e(e,n,t){var i=Si.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function tP(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function L0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function I0e(e,n,t){var i=Si.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function B0e(e,n,t){var i=Si.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function F0e(e,n,t){var i=Si.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function q0e(e,n,t){var i=A0e.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function H0e(e,n,t){var i=Si.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function U0e(e,n,t){var i=Si.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function iP(e,n){return at(e.getDate(),n,2)}function V0e(e,n){return at(e.getHours(),n,2)}function W0e(e,n){return at(e.getHours()%12||12,n,2)}function G0e(e,n){return at(1+ep.count(Jo(e),e),n,3)}function pU(e,n){return at(e.getMilliseconds(),n,3)}function Y0e(e,n){return pU(e,n)+"000"}function K0e(e,n){return at(e.getMonth()+1,n,2)}function X0e(e,n){return at(e.getMinutes(),n,2)}function Z0e(e,n){return at(e.getSeconds(),n,2)}function Q0e(e){var n=e.getDay();return n===0?7:n}function J0e(e,n){return at(m0.count(Jo(e)-1,e),n,2)}function vU(e){var n=e.getDay();return n>=4||n===0?Xf(e):Xf.ceil(e)}function ebe(e,n){return e=vU(e),at(Xf.count(Jo(e),e)+(Jo(e).getDay()===4),n,2)}function nbe(e){return e.getDay()}function tbe(e,n){return at(Jg.count(Jo(e)-1,e),n,2)}function ibe(e,n){return at(e.getFullYear()%100,n,2)}function rbe(e,n){return e=vU(e),at(e.getFullYear()%100,n,2)}function abe(e,n){return at(e.getFullYear()%1e4,n,4)}function obe(e,n){var t=e.getDay();return e=t>=4||t===0?Xf(e):Xf.ceil(e),at(e.getFullYear()%1e4,n,4)}function sbe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+at(n/60|0,"0",2)+at(n%60,"0",2)}function rP(e,n){return at(e.getUTCDate(),n,2)}function lbe(e,n){return at(e.getUTCHours(),n,2)}function ube(e,n){return at(e.getUTCHours()%12||12,n,2)}function fbe(e,n){return at(1+h0.count(es(e),e),n,3)}function gU(e,n){return at(e.getUTCMilliseconds(),n,3)}function cbe(e,n){return gU(e,n)+"000"}function dbe(e,n){return at(e.getUTCMonth()+1,n,2)}function hbe(e,n){return at(e.getUTCMinutes(),n,2)}function mbe(e,n){return at(e.getUTCSeconds(),n,2)}function pbe(e){var n=e.getUTCDay();return n===0?7:n}function vbe(e,n){return at(p0.count(es(e)-1,e),n,2)}function yU(e){var n=e.getUTCDay();return n>=4||n===0?Zf(e):Zf.ceil(e)}function gbe(e,n){return e=yU(e),at(Zf.count(es(e),e)+(es(e).getUTCDay()===4),n,2)}function ybe(e){return e.getUTCDay()}function bbe(e,n){return at(e1.count(es(e)-1,e),n,2)}function wbe(e,n){return at(e.getUTCFullYear()%100,n,2)}function kbe(e,n){return e=yU(e),at(e.getUTCFullYear()%100,n,2)}function _be(e,n){return at(e.getUTCFullYear()%1e4,n,4)}function xbe(e,n){var t=e.getUTCDay();return e=t>=4||t===0?Zf(e):Zf.ceil(e),at(e.getUTCFullYear()%1e4,n,4)}function Sbe(){return"+0000"}function aP(){return"%"}function oP(e){return+e}function sP(e){return Math.floor(+e/1e3)}var wf,bU,wU;Cbe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Cbe(e){return wf=C0e(e),bU=wf.format,wf.parse,wU=wf.utcFormat,wf.utcParse,wf}function Abe(e){return new Date(e)}function Obe(e){return e instanceof Date?+e:+new Date(+e)}function Y9(e,n,t,i,r,a,o,l,f,c){var h=P9(),d=h.invert,p=h.domain,v=c(".%L"),y=c(":%S"),b=c("%I:%M"),w=c("%I %p"),_=c("%a %d"),S=c("%b %d"),C=c("%B"),E=c("%Y");function A(T){return(f(T)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>vye(e,a/i))},t.copy=function(){return SU(n).domain(e)},cs.apply(t,arguments)}function g0(){var e=0,n=.5,t=1,i=1,r,a,o,l,f,c=nr,h,d=!1,p;function v(b){return isNaN(b=+b)?p:(b=.5+((b=+h(b))-a)*(i*bt}return a3=e,a3}var o3,cP;function Rbe(){if(cP)return o3;cP=1;var e=EU(),n=Dbe(),t=Ic();function i(r){return r&&r.length?e(r,t,n):void 0}return o3=i,o3}var Pbe=Rbe();const Gs=ot(Pbe);var s3,dP;function Nbe(){if(dP)return s3;dP=1;function e(n,t){return ne.e^a.s<0?1:-1;for(i=a.d.length,r=e.d.length,n=0,t=ie.d[n]^a.s<0?1:-1;return i===r?0:i>r^a.s<0?1:-1};tn.decimalPlaces=tn.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*Rt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};tn.dividedBy=tn.div=function(e){return Go(this,new this.constructor(e))};tn.dividedToIntegerBy=tn.idiv=function(e){var n=this,t=n.constructor;return xt(Go(n,new t(e),0,1),t.precision)};tn.equals=tn.eq=function(e){return!this.cmp(e)};tn.exponent=function(){return ci(this)};tn.greaterThan=tn.gt=function(e){return this.cmp(e)>0};tn.greaterThanOrEqualTo=tn.gte=function(e){return this.cmp(e)>=0};tn.isInteger=tn.isint=function(){return this.e>this.d.length-2};tn.isNegative=tn.isneg=function(){return this.s<0};tn.isPositive=tn.ispos=function(){return this.s>0};tn.isZero=function(){return this.s===0};tn.lessThan=tn.lt=function(e){return this.cmp(e)<0};tn.lessThanOrEqualTo=tn.lte=function(e){return this.cmp(e)<1};tn.logarithm=tn.log=function(e){var n,t=this,i=t.constructor,r=i.precision,a=r+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq($r))throw Error(ca+"NaN");if(t.s<1)throw Error(ca+(t.s?"NaN":"-Infinity"));return t.eq($r)?new i(0):(qt=!1,n=Go(Jh(t,a),Jh(e,a),a),qt=!0,xt(n,r))};tn.minus=tn.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?DU(n,e):MU(n,(e.s=-e.s,e))};tn.modulo=tn.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(ca+"NaN");return t.s?(qt=!1,n=Go(t,e,0,1).times(e),qt=!0,t.minus(n)):xt(new i(t),r)};tn.naturalExponential=tn.exp=function(){return jU(this)};tn.naturalLogarithm=tn.ln=function(){return Jh(this)};tn.negated=tn.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};tn.plus=tn.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?MU(n,e):DU(n,(e.s=-e.s,e))};tn.precision=tn.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(tu+e);if(n=ci(r)+1,i=r.d.length-1,t=i*Rt+1,i=r.d[i],i){for(;i%10==0;i/=10)t--;for(i=r.d[0];i>=10;i/=10)t++}return e&&n>t?n:t};tn.squareRoot=tn.sqrt=function(){var e,n,t,i,r,a,o,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(ca+"NaN")}for(e=ci(l),qt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=Ya(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=qc((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n)):i=new f(r.toString()),t=f.precision,r=o=t+3;;)if(a=i,i=a.plus(Go(l,a,o+2)).times(.5),Ya(a.d).slice(0,o)===(n=Ya(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(xt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return qt=!0,xt(i,t)};tn.times=tn.mul=function(e){var n,t,i,r,a,o,l,f,c,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,f=p.length,c=v.length,f=0;){for(n=0,r=f+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%ki|0,n=l/ki|0;a[r]=(a[r]+n)%ki|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,qt?xt(e,d.precision):e};tn.toDecimalPlaces=tn.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(ro(e,0,Fc),n===void 0?n=i.rounding:ro(n,0,8),xt(t,e+ci(t)+1,n))};tn.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=du(i,!0):(ro(e,0,Fc),n===void 0?n=r.rounding:ro(n,0,8),i=xt(new r(i),e+1,n),t=du(i,!0,e+1)),t};tn.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?du(r):(ro(e,0,Fc),n===void 0?n=a.rounding:ro(n,0,8),i=xt(new a(r),e+ci(r)+1,n),t=du(i.abs(),!1,e+ci(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};tn.toInteger=tn.toint=function(){var e=this,n=e.constructor;return xt(new n(e),ci(e)+1,n.rounding)};tn.toNumber=function(){return+this};tn.toPower=tn.pow=function(e){var n,t,i,r,a,o,l=this,f=l.constructor,c=12,h=+(e=new f(e));if(!e.s)return new f($r);if(l=new f(l),!l.s){if(e.s<1)throw Error(ca+"Infinity");return l}if(l.eq($r))return l;if(i=f.precision,e.eq($r))return xt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=TU){for(r=new f($r),n=Math.ceil(i/Rt+4),qt=!1;t%2&&(r=r.times(l),yP(r.d,n)),t=qc(t/2),t!==0;)l=l.times(l),yP(l.d,n);return qt=!0,e.s<0?new f($r).div(r):xt(r,i)}}else if(a<0)throw Error(ca+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,qt=!1,r=e.times(Jh(l,i+c)),qt=!0,r=jU(r),r.s=a,r};tn.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=ci(r),i=du(r,t<=a.toExpNeg||t>=a.toExpPos)):(ro(e,1,Fc),n===void 0?n=a.rounding:ro(n,0,8),r=xt(new a(r),e,n),t=ci(r),i=du(r,e<=t||t<=a.toExpNeg,e)),i};tn.toSignificantDigits=tn.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(ro(e,1,Fc),n===void 0?n=i.rounding:ro(n,0,8)),xt(new i(t),e,n)};tn.toString=tn.valueOf=tn.val=tn.toJSON=tn[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=ci(e),t=e.constructor;return du(e,n<=t.toExpNeg||n>=t.toExpPos)};function MU(e,n){var t,i,r,a,o,l,f,c,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),qt?xt(n,d):n;if(f=e.d,c=n.d,o=e.e,r=n.e,f=f.slice(),a=o-r,a){for(a<0?(i=f,a=-a,l=c.length):(i=c,r=o,l=f.length),o=Math.ceil(d/Rt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=f.length,a=c.length,l-a<0&&(a=l,i=c,c=f,f=i),t=0;a;)t=(f[--a]=f[a]+c[a]+t)/ki|0,f[a]%=ki;for(t&&(f.unshift(t),++r),l=f.length;f[--l]==0;)f.pop();return n.d=f,n.e=r,qt?xt(n,d):n}function ro(e,n,t){if(e!==~~e||et)throw Error(tu+e)}function Ya(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=f=0;lr[l]?1:-1;break}return f}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,f,c,h,d,p,v,y,b,w,_,S,C,E,A,T,j,N,q=i.constructor,R=i.s==r.s?1:-1,L=i.d,B=r.d;if(!i.s)return new q(i);if(!r.s)throw Error(ca+"Division by zero");for(f=i.e-r.e,j=B.length,A=L.length,v=new q(R),y=v.d=[],c=0;B[c]==(L[c]||0);)++c;if(B[c]>(L[c]||0)&&--f,a==null?S=a=q.precision:o?S=a+(ci(i)-ci(r))+1:S=a,S<0)return new q(0);if(S=S/Rt+2|0,c=0,j==1)for(h=0,B=B[0],S++;(c1&&(B=e(B,h),L=e(L,h),j=B.length,A=L.length),E=j,b=L.slice(0,j),w=b.length;w=ki/2&&++T;do h=0,l=n(B,b,j,w),l<0?(_=b[0],j!=w&&(_=_*ki+(b[1]||0)),h=_/T|0,h>1?(h>=ki&&(h=ki-1),d=e(B,h),p=d.length,w=b.length,l=n(d,b,p,w),l==1&&(h--,t(d,j16)throw Error(Z9+ci(e));if(!e.s)return new h($r);for(qt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(i=Math.log(ql(2,c))/Math.LN10*2+5|0,l+=i,t=r=a=new h($r),h.precision=l;;){if(r=xt(r.times(e),l),t=t.times(++f),o=a.plus(Go(r,t,l)),Ya(o.d).slice(0,l)===Ya(a.d).slice(0,l)){for(;c--;)a=xt(a.times(a),l);return h.precision=d,n==null?(qt=!0,xt(a,d)):a}a=o}}function ci(e){for(var n=e.e*Rt,t=e.d[0];t>=10;t/=10)n++;return n}function d3(e,n,t){if(n>e.LN10.sd())throw qt=!0,t&&(e.precision=t),Error(ca+"LN10 precision limit exceeded");return xt(new e(e.LN10),n)}function qs(e){for(var n="";e--;)n+="0";return n}function Jh(e,n){var t,i,r,a,o,l,f,c,h,d=1,p=10,v=e,y=v.d,b=v.constructor,w=b.precision;if(v.s<1)throw Error(ca+(v.s?"NaN":"-Infinity"));if(v.eq($r))return new b(0);if(n==null?(qt=!1,c=w):c=n,v.eq(10))return n==null&&(qt=!0),d3(b,c);if(c+=p,b.precision=c,t=Ya(y),i=t.charAt(0),a=ci(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=Ya(v.d),i=t.charAt(0),d++;a=ci(v),i>1?(v=new b("0."+t),a++):v=new b(i+"."+t.slice(1))}else return f=d3(b,c+2,w).times(a+""),v=Jh(new b(i+"."+t.slice(1)),c-p).plus(f),b.precision=w,n==null?(qt=!0,xt(v,w)):v;for(l=o=v=Go(v.minus($r),v.plus($r),c),h=xt(v.times(v),c),r=3;;){if(o=xt(o.times(h),c),f=l.plus(Go(o,new b(r),c)),Ya(f.d).slice(0,c)===Ya(l.d).slice(0,c))return l=l.times(2),a!==0&&(l=l.plus(d3(b,c+2,w).times(a+""))),l=Go(l,new b(d),c),b.precision=w,n==null?(qt=!0,xt(l,w)):l;l=f,r+=2}}function gP(e,n){var t,i,r;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charCodeAt(i)===48;)++i;for(r=n.length;n.charCodeAt(r-1)===48;)--r;if(n=n.slice(i,r),n){if(r-=i,t=t-i-1,e.e=qc(t/Rt),e.d=[],i=(t+1)%Rt,t<0&&(i+=Rt),in1||e.e<-n1))throw Error(Z9+t)}else e.s=0,e.e=0,e.d=[0];return e}function xt(e,n,t){var i,r,a,o,l,f,c,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=Rt,r=n,c=d[h=0];else{if(h=Math.ceil((i+1)/Rt),a=d.length,h>=a)return e;for(c=a=d[h],o=1;a>=10;a/=10)o++;i%=Rt,r=i-Rt+o}if(t!==void 0&&(a=ql(10,o-r-1),l=c/a%10|0,f=n<0||d[h+1]!==void 0||c%a,f=t<4?(l||f)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||f||t==6&&(i>0?r>0?c/ql(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return f?(a=ci(e),d.length=1,n=n-a-1,d[0]=ql(10,(Rt-n%Rt)%Rt),e.e=qc(-n/Rt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(i==0?(d.length=h,a=1,h--):(d.length=h+1,a=ql(10,Rt-i),d[h]=r>0?(c/ql(10,o-r)%ql(10,r)|0)*a:0),f)for(;;)if(h==0){(d[0]+=a)==ki&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=ki)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(qt&&(e.e>n1||e.e<-n1))throw Error(Z9+ci(e));return e}function DU(e,n){var t,i,r,a,o,l,f,c,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),qt?xt(n,v):n;if(f=e.d,d=n.d,i=n.e,c=e.e,f=f.slice(),o=c-i,o){for(h=o<0,h?(t=f,o=-o,l=d.length):(t=d,i=c,l=f.length),r=Math.max(Math.ceil(v/Rt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=f.length,l=d.length,h=r0;--r)f[l++]=0;for(r=d.length;r>o;){if(f[--r]0?a=a.charAt(0)+"."+a.slice(1)+qs(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+qs(-r-1)+a,t&&(i=t-o)>0&&(a+=qs(i))):r>=o?(a+=qs(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+qs(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=qs(i))),e.s<0?"-"+a:a}function yP(e,n){if(e.length>n)return e.length=n,!0}function RU(e){var n,t,i;function r(a){var o=this;if(!(o instanceof r))return new r(a);if(o.constructor=r,a instanceof r){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(tu+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return gP(o,a.toString())}else if(typeof a!="string")throw Error(tu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,Vbe.test(a))gP(o,a);else throw Error(tu+a)}if(r.prototype=tn,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=RU,r.config=r.set=Wbe,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n=r[n+1]&&i<=r[n+2])this[t]=i;else throw Error(tu+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(tu+t+": "+i);return this}var Q9=RU(Ube);$r=new Q9(1);const yt=Q9;function Gbe(e){return Zbe(e)||Xbe(e)||Kbe(e)||Ybe()}function Ybe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kbe(e,n){if(e){if(typeof e=="string")return l4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l4(e,n)}}function Xbe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Zbe(e){if(Array.isArray(e))return l4(e)}function l4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n?t.apply(void 0,r):e(n-o,bP(function(){for(var l=arguments.length,f=new Array(l),c=0;ce.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(f){r=!0,a=f}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function dwe(e){if(Array.isArray(e))return e}function LU(e){var n=em(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function IU(e,n,t){if(e.lte(0))return new yt(0);var i=w0.getDigitCount(e.toNumber()),r=new yt(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new yt(Math.ceil(a.div(o).toNumber())).add(t).mul(o),f=l.mul(r);return n?f:new yt(Math.ceil(f))}function hwe(e,n,t){var i=1,r=new yt(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new yt(10).pow(w0.getDigitCount(e)-1),r=new yt(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new yt(Math.floor(e)))}else e===0?r=new yt(Math.floor((n-1)/2)):t||(r=new yt(Math.floor(e)));var o=Math.floor((n-1)/2),l=nwe(ewe(function(f){return r.add(new yt(f-o).mul(i)).toNumber()}),u4);return l(0,n)}function BU(e,n,t,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(t-1)))return{step:new yt(0),tickMin:new yt(0),tickMax:new yt(0)};var a=IU(new yt(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new yt(0):(o=new yt(e).add(n).div(2),o=o.sub(new yt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),f=Math.ceil(new yt(n).sub(o).div(a).toNumber()),c=l+f+1;return c>t?BU(e,n,t,i,r+1):(c0?f+(t-c):f,l=n>0?l:l+(t-c)),{step:a,tickMin:o.sub(new yt(l).mul(a)),tickMax:o.add(new yt(f).mul(a))})}function mwe(e){var n=em(e,2),t=n[0],i=n[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),l=LU([t,i]),f=em(l,2),c=f[0],h=f[1];if(c===-1/0||h===1/0){var d=h===1/0?[c].concat(c4(u4(0,r-1).map(function(){return 1/0}))):[].concat(c4(u4(0,r-1).map(function(){return-1/0})),[h]);return t>i?f4(d):d}if(c===h)return hwe(c,r,a);var p=BU(c,h,o,a),v=p.step,y=p.tickMin,b=p.tickMax,w=w0.rangeStep(y,b.add(new yt(.1).mul(v)),v);return t>i?f4(w):w}function pwe(e,n){var t=em(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=LU([i,r]),l=em(o,2),f=l[0],c=l[1];if(f===-1/0||c===1/0)return[i,r];if(f===c)return[f];var h=Math.max(n,2),d=IU(new yt(c).sub(f).div(h-1),a,0),p=[].concat(c4(w0.rangeStep(new yt(f),new yt(c).sub(new yt(.99).mul(d)),d)),[c]);return i>r?f4(p):p}var vwe=$U(mwe),gwe=$U(pwe),ywe="Invariant failed";function hu(e,n){throw new Error(ywe)}var bwe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Jf(e){"@babel/helpers - typeof";return Jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Jf(e)}function t1(){return t1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Awe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Owe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ewe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?r[c-1].coordinate:r[l-1].coordinate,d=r[c].coordinate,p=c>=l-1?r[0].coordinate:r[c+1].coordinate,v=void 0;if(Ma(d-h)!==Ma(p-d)){var y=[];if(Ma(p-d)===Ma(f[1]-f[0])){v=p;var b=d+f[1]-f[0];y[0]=Math.min(b,(b+h)/2),y[1]=Math.max(b,(b+h)/2)}else{v=h;var w=p+f[1]-f[0];y[0]=Math.min(d,(w+d)/2),y[1]=Math.max(d,(w+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=y[0]&&n<=y[1]){o=r[c].index;break}}else{var S=Math.min(h,p),C=Math.max(h,p);if(n>(S+d)/2&&n<=(C+d)/2){o=r[c].index;break}}}else for(var E=0;E0&&E(i[E].coordinate+i[E-1].coordinate)/2&&n<=(i[E].coordinate+i[E+1].coordinate)/2||E===l-1&&n>(i[E].coordinate+i[E-1].coordinate)/2){o=i[E].index;break}return o},J9=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?Kt(Kt({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,f;switch(r){case"Line":f=o;break;case"Area":case"Radar":f=o&&o!=="none"?o:l;break;default:f=l;break}return f},Vwe=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),f=0,c=l.length;f=0});if(_&&_.length){var S=_[0].type.defaultProps,C=S!==void 0?Kt(Kt({},S),_[0].props):_[0].props,E=C.barSize,A=C[w];o[A]||(o[A]=[]);var T=Bn(E)?t:E;o[A].push({item:_[0],stackList:_.slice(1),barSize:Bn(T)?void 0:cu(T,i,0)})}}return o},Wwe=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,f=o.length;if(f<1)return null;var c=cu(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/f,y=o.reduce(function(E,A){return E+A.barSize||0},0);y+=(f-1)*c,y>=r&&(y-=(f-1)*c,c=0),y>=r&&v>0&&(p=!0,v*=.9,y=f*v);var b=(r-y)/2>>0,w={offset:b-c,size:0};h=o.reduce(function(E,A){var T={item:A.item,position:{offset:w.offset+w.size+c,size:p?v:A.barSize}},j=[].concat(_P(E),[T]);return w=j[j.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(N){j.push({item:N,position:w})}),j},d)}else{var _=cu(i,r,0,!0);r-2*_-(f-1)*c<=0&&(c=0);var S=(r-2*_-(f-1)*c)/f;S>1&&(S>>=0);var C=l===+l?Math.min(S,l):S;h=o.reduce(function(E,A,T){var j=[].concat(_P(E),[{item:A.item,position:{offset:_+(S+c)*T+(S-C)/2,size:C}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(N){j.push({item:N,position:j[j.length-1].position})}),j},d)}return h},Gwe=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,f=o-(l.left||0)-(l.right||0),c=UU({children:a,legendWidth:f});if(c){var h=r||{},d=h.width,p=h.height,v=c.align,y=c.verticalAlign,b=c.layout;if((b==="vertical"||b==="horizontal"&&y==="middle")&&v!=="center"&&qe(n[v]))return Kt(Kt({},n),{},$f({},v,n[v]+(d||0)));if((b==="horizontal"||b==="vertical"&&v==="center")&&y!=="middle"&&qe(n[y]))return Kt(Kt({},n),{},$f({},y,n[y]+(p||0)))}return n},Ywe=function(n,t,i){return Bn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},VU=function(n,t,i,r,a){var o=t.props.children,l=ua(o,np).filter(function(c){return Ywe(r,a,c.props.direction)});if(l&&l.length){var f=l.map(function(c){return c.props.dataKey});return n.reduce(function(c,h){var d=ir(h,i);if(Bn(d))return c;var p=Array.isArray(d)?[y0(d),Gs(d)]:[d,d],v=f.reduce(function(y,b){var w=ir(h,b,0),_=p[0]-Math.abs(Array.isArray(w)?w[0]:w),S=p[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(_,y[0]),Math.max(S,y[1])]},[1/0,-1/0]);return[Math.min(v[0],c[0]),Math.max(v[1],c[1])]},[1/0,-1/0])}return null},Kwe=function(n,t,i,r,a){var o=t.map(function(l){return VU(n,l,i,a,r)}).filter(function(l){return!Bn(l)});return o&&o.length?o.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]):null},WU=function(n,t,i,r,a){var o=t.map(function(f){var c=f.props.dataKey;return i==="number"&&c&&VU(n,f,c,r)||wh(n,c,i,a)});if(i==="number")return o.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var l={};return o.reduce(function(f,c){for(var h=0,d=c.length;h=2?Ma(l[0]-l[1])*2*c:c,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+c,value:d,offset:c}});return h.filter(function(d){return!zc(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+c,value:d,index:p,offset:c}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+c,value:d,offset:c}}):r.domain().map(function(d,p){return{coordinate:r(d)+c,value:a?a[d]:d,index:p,offset:c}})},h3=new WeakMap,$v=function(n,t){if(typeof t!="function")return n;h3.has(n)||h3.set(n,new WeakMap);var i=h3.get(n);if(i.has(t))return i.get(t);var r=function(){n.apply(void 0,arguments),t.apply(void 0,arguments)};return i.set(t,r),r},Xwe=function(n,t,i){var r=n.scale,a=n.type,o=n.layout,l=n.axisType;if(r==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Yh(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:Zg(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:bh(),realScaleType:"point"}:a==="category"?{scale:Yh(),realScaleType:"band"}:{scale:Zg(),realScaleType:"linear"};if(fu(r)){var f="scale".concat(a0(r));return{scale:(lP[f]||bh)(),realScaleType:lP[f]?f:"point"}}return Rn(r)?{scale:r}:{scale:bh(),realScaleType:"point"}},SP=1e-4,Zwe=function(n){var t=n.domain();if(!(!t||t.length<=2)){var i=t.length,r=n.range(),a=Math.min(r[0],r[1])-SP,o=Math.max(r[0],r[1])+SP,l=n(t[0]),f=n(t[i-1]);(lo||fo)&&n.domain([t[0],t[i-1]])}},Qwe=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+f,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+f,o=n[l][i][1])}},nke=function(n){var t=n.length;if(!(t<=0))for(var i=0,r=n[0].length;i=0?(n[o][i][0]=a,n[o][i][1]=a+l,a=n[o][i][1]):(n[o][i][0]=0,n[o][i][1]=0)}},tke={sign:eke,expand:Ipe,none:Uf,silhouette:Bpe,wiggle:Fpe,positive:nke},ike=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=tke[i],o=Lpe().keys(r).value(function(l,f){return+ir(l,f,0)}).order(US).offset(a);return o(n)},rke=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,f={},c=l.reduce(function(d,p){var v,y=(v=p.type)!==null&&v!==void 0&&v.defaultProps?Kt(Kt({},p.type.defaultProps),p.props):p.props,b=y.stackId,w=y.hide;if(w)return d;var _=y[i],S=d[_]||{hasStack:!1,stackGroups:{}};if(gi(b)){var C=S.stackGroups[b]||{numericAxisId:i,cateAxisId:r,items:[]};C.items.push(p),S.hasStack=!0,S.stackGroups[b]=C}else S.stackGroups[Lc("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return Kt(Kt({},d),{},$f({},_,S))},f),h={};return Object.keys(c).reduce(function(d,p){var v=c[p];if(v.hasStack){var y={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(b,w){var _=v.stackGroups[w];return Kt(Kt({},b),{},$f({},w,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:ike(n,_.items,a)}))},y)}return Kt(Kt({},d),{},$f({},p,v))},h)},ake=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,f=i||t.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=n.domain();if(!c.length)return null;var h=vwe(c,a,l);return n.domain([y0(h),Gs(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=gwe(d,a,l);return{niceTicks:p}}return null};function r1(e){var n=e.axis,t=e.ticks,i=e.bandSize,r=e.entry,a=e.index,o=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Bn(r[n.dataKey])){var l=Mg(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var f=ir(r,Bn(o)?n.dataKey:o);return Bn(f)?null:n.scale(f)}var CP=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var f=ir(o,t.dataKey,t.domain[l]);return Bn(f)?null:t.scale(f)-a/2+r},oke=function(n){var t=n.numericAxis,i=t.scale.domain();if(t.type==="number"){var r=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);return r<=0&&a>=0?0:a<0?a:r}return i[0]},ske=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?Kt(Kt({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(gi(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},lke=function(n){return n.reduce(function(t,i){return[y0(i.concat([t[0]]).filter(qe)),Gs(i.concat([t[1]]).filter(qe))]},[1/0,-1/0])},KU=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,f=l.reduce(function(c,h){var d=lke(h.slice(t,i+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},AP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,OP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,p4=function(n,t,i){if(Rn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(qe(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(AP.test(n[0])){var a=+AP.exec(n[0])[1];r[0]=t[0]-a}else Rn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(qe(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(OP.test(n[1])){var o=+OP.exec(n[1])[1];r[1]=t[1]+o}else Rn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},a1=function(n,t,i){if(n&&n.scale&&n.scale.bandwidth){var r=n.scale.bandwidth();if(!i||r>0)return r}if(n&&t&&t.length>=2){for(var a=A9(t,function(d){return d.coordinate}),o=1/0,l=1,f=a.length;lo&&(c=2*Math.PI-c),{radius:l,angle:dke(c),angleInRadian:c}},pke=function(n){var t=n.startAngle,i=n.endAngle,r=Math.floor(t/360),a=Math.floor(i/360),o=Math.min(r,a);return{startAngle:t-o*360,endAngle:i-o*360}},vke=function(n,t){var i=t.startAngle,r=t.endAngle,a=Math.floor(i/360),o=Math.floor(r/360),l=Math.min(a,o);return n+l*360},jP=function(n,t){var i=n.x,r=n.y,a=mke({x:i,y:r},t),o=a.radius,l=a.angle,f=t.innerRadius,c=t.outerRadius;if(oc)return!1;if(o===0)return!0;var h=pke(t),d=h.startAngle,p=h.endAngle,v=l,y;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return y?MP(MP({},t),{},{radius:o,angle:vke(v,t)}):null};function rm(e){"@babel/helpers - typeof";return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rm(e)}var gke=["offset"];function yke(e){return _ke(e)||kke(e)||wke(e)||bke()}function bke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wke(e,n){if(e){if(typeof e=="string")return v4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v4(e,n)}}function kke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _ke(e){if(Array.isArray(e))return v4(e)}function v4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Ske(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function DP(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function pi(e){for(var n=1;n=0?1:-1,C,E;r==="insideStart"?(C=v+S*o,E=b):r==="insideEnd"?(C=y-S*o,E=!b):r==="end"&&(C=y+S*o,E=b),E=_<=0?E:!E;var A=Pi(c,h,w,C),T=Pi(c,h,w,C+(E?1:-1)*359),j="M".concat(A.x,",").concat(A.y,` + A`).concat(w,",").concat(w,",0,1,").concat(E?0:1,`, + `).concat(T.x,",").concat(T.y),N=Bn(n.id)?Lc("recharts-radial-line-"):n.id;return Z.createElement("text",am({},i,{dominantBaseline:"central",className:cn("recharts-radial-bar-label",l)}),Z.createElement("defs",null,Z.createElement("path",{id:N,d:j})),Z.createElement("textPath",{xlinkHref:"#".concat(N)},t))},jke=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,f=a.innerRadius,c=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var v=Pi(o,l,c+i,p),y=v.x,b=v.y;return{x:y,y:b,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var w=(f+c)/2,_=Pi(o,l,w,p),S=_.x,C=_.y;return{x:S,y:C,textAnchor:"middle",verticalAnchor:"middle"}},Dke=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,f=o.y,c=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",y=d>0?"start":"end",b=c>=0?1:-1,w=b*r,_=b>0?"end":"start",S=b>0?"start":"end";if(a==="top"){var C={x:l+c/2,y:f-d*r,textAnchor:"middle",verticalAnchor:v};return pi(pi({},C),i?{height:Math.max(f-i.y,0),width:c}:{})}if(a==="bottom"){var E={x:l+c/2,y:f+h+p,textAnchor:"middle",verticalAnchor:y};return pi(pi({},E),i?{height:Math.max(i.y+i.height-(f+h),0),width:c}:{})}if(a==="left"){var A={x:l-w,y:f+h/2,textAnchor:_,verticalAnchor:"middle"};return pi(pi({},A),i?{width:Math.max(A.x-i.x,0),height:h}:{})}if(a==="right"){var T={x:l+c+w,y:f+h/2,textAnchor:S,verticalAnchor:"middle"};return pi(pi({},T),i?{width:Math.max(i.x+i.width-T.x,0),height:h}:{})}var j=i?{width:c,height:h}:{};return a==="insideLeft"?pi({x:l+w,y:f+h/2,textAnchor:S,verticalAnchor:"middle"},j):a==="insideRight"?pi({x:l+c-w,y:f+h/2,textAnchor:_,verticalAnchor:"middle"},j):a==="insideTop"?pi({x:l+c/2,y:f+p,textAnchor:"middle",verticalAnchor:y},j):a==="insideBottom"?pi({x:l+c/2,y:f+h-p,textAnchor:"middle",verticalAnchor:v},j):a==="insideTopLeft"?pi({x:l+w,y:f+p,textAnchor:S,verticalAnchor:y},j):a==="insideTopRight"?pi({x:l+c-w,y:f+p,textAnchor:_,verticalAnchor:y},j):a==="insideBottomLeft"?pi({x:l+w,y:f+h-p,textAnchor:S,verticalAnchor:v},j):a==="insideBottomRight"?pi({x:l+c-w,y:f+h-p,textAnchor:_,verticalAnchor:v},j):$c(a)&&(qe(a.x)||Yl(a.x))&&(qe(a.y)||Yl(a.y))?pi({x:l+cu(a.x,c),y:f+cu(a.y,h),textAnchor:"end",verticalAnchor:"end"},j):pi({x:l+c/2,y:f+h/2,textAnchor:"middle",verticalAnchor:"middle"},j)},Rke=function(n){return"cx"in n&&qe(n.cx)};function Xt(e){var n=e.offset,t=n===void 0?5:n,i=xke(e,gke),r=pi({offset:t},i),a=r.viewBox,o=r.position,l=r.value,f=r.children,c=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Bn(l)&&Bn(f)&&!O.isValidElement(c)&&!Rn(c))return null;if(O.isValidElement(c))return O.cloneElement(c,r);var v;if(Rn(c)){if(v=O.createElement(c,r),O.isValidElement(v))return v}else v=Eke(r);var y=Rke(a),b=$n(r,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Mke(r,v,b);var w=y?jke(r):Dke(r);return Z.createElement(Hg,am({className:cn("recharts-label",d)},b,w,{breakAll:p}),v)}Xt.displayName="Label";var ZU=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,f=n.radius,c=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,y=n.left,b=n.width,w=n.height,_=n.clockWise,S=n.labelViewBox;if(S)return S;if(qe(b)&&qe(w)){if(qe(d)&&qe(p))return{x:d,y:p,width:b,height:w};if(qe(v)&&qe(y))return{x:v,y,width:b,height:w}}return qe(d)&&qe(p)?{x:d,y:p,width:0,height:0}:qe(t)&&qe(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:c||0,outerRadius:h||f||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},Pke=function(n,t){return n?n===!0?Z.createElement(Xt,{key:"label-implicit",viewBox:t}):gi(n)?Z.createElement(Xt,{key:"label-implicit",viewBox:t,value:n}):O.isValidElement(n)?n.type===Xt?O.cloneElement(n,{key:"label-implicit",viewBox:t}):Z.createElement(Xt,{key:"label-implicit",content:n,viewBox:t}):Rn(n)?Z.createElement(Xt,{key:"label-implicit",content:n,viewBox:t}):$c(n)?Z.createElement(Xt,am({viewBox:t},n,{key:"label-implicit"})):null:null},Nke=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&i&&!n.label)return null;var r=n.children,a=ZU(n),o=ua(r,Xt).map(function(f,c){return O.cloneElement(f,{viewBox:t||a,key:"label-".concat(c)})});if(!i)return o;var l=Pke(n.label,t||a);return[l].concat(yke(o))};Xt.parseViewBox=ZU;Xt.renderCallByParent=Nke;var m3,RP;function $ke(){if(RP)return m3;RP=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return m3=e,m3}var zke=$ke();const Lke=ot(zke);function om(e){"@babel/helpers - typeof";return om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},om(e)}var Ike=["valueAccessor"],Bke=["data","dataKey","clockWise","id","textBreakAll"];function Fke(e){return Vke(e)||Uke(e)||Hke(e)||qke()}function qke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hke(e,n){if(e){if(typeof e=="string")return g4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g4(e,n)}}function Uke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vke(e){if(Array.isArray(e))return g4(e)}function g4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Kke(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Xke=function(n){return Array.isArray(n.value)?Lke(n.value):n.value};function Ja(e){var n=e.valueAccessor,t=n===void 0?Xke:n,i=$P(e,Ike),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,f=i.textBreakAll,c=$P(i,Bke);return!r||!r.length?null:Z.createElement(Tt,{className:"recharts-label-list"},r.map(function(h,d){var p=Bn(a)?t(h,d):ir(h&&h.payload,a),v=Bn(l)?{}:{id:"".concat(l,"-").concat(d)};return Z.createElement(Xt,s1({},$n(h,!0),c,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:f,viewBox:Xt.parseViewBox(Bn(o)?h:NP(NP({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Ja.displayName="LabelList";function Zke(e,n){return e?e===!0?Z.createElement(Ja,{key:"labelList-implicit",data:n}):Z.isValidElement(e)||Rn(e)?Z.createElement(Ja,{key:"labelList-implicit",data:n,content:e}):$c(e)?Z.createElement(Ja,s1({data:n},e,{key:"labelList-implicit"})):null:null}function Qke(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&t&&!e.label)return null;var i=e.children,r=ua(i,Ja).map(function(o,l){return O.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=Zke(e.label,n);return[a].concat(Fke(r))}Ja.renderCallByParent=Qke;function sm(e){"@babel/helpers - typeof";return sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sm(e)}function y4(){return y4=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>c),`, + `).concat(d.x,",").concat(d.y,` + `);if(r>0){var v=Pi(t,i,r,o),y=Pi(t,i,r,c);p+="L ".concat(y.x,",").concat(y.y,` + A `).concat(r,",").concat(r,`,0, + `).concat(+(Math.abs(f)>180),",").concat(+(o<=c),`, + `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},i_e=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,f=n.cornerIsExternal,c=n.startAngle,h=n.endAngle,d=Ma(h-c),p=zv({cx:t,cy:i,radius:a,angle:c,sign:d,cornerRadius:o,cornerIsExternal:f}),v=p.circleTangency,y=p.lineTangency,b=p.theta,w=zv({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:f}),_=w.circleTangency,S=w.lineTangency,C=w.theta,E=f?Math.abs(c-h):Math.abs(c-h)-b-C;if(E<0)return l?"M ".concat(y.x,",").concat(y.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):QU({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:c,endAngle:h});var A="M ".concat(y.x,",").concat(y.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` + A`).concat(a,",").concat(a,",0,").concat(+(E>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(S.x,",").concat(S.y,` + `);if(r>0){var T=zv({cx:t,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),j=T.circleTangency,N=T.lineTangency,q=T.theta,R=zv({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),L=R.circleTangency,B=R.lineTangency,G=R.theta,H=f?Math.abs(c-h):Math.abs(c-h)-q-G;if(H<0&&o===0)return"".concat(A,"L").concat(t,",").concat(i,"Z");A+="L".concat(B.x,",").concat(B.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` + A`).concat(r,",").concat(r,",0,").concat(+(H>180),",").concat(+(d>0),",").concat(j.x,",").concat(j.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else A+="L".concat(t,",").concat(i,"Z");return A},r_e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},JU=function(n){var t=LP(LP({},r_e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,f=t.forceCornerRadius,c=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?w=i_e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(b,y/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:h,endAngle:d}):w=QU({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Z.createElement("path",y4({},$n(t,!0),{className:v,d:w,role:"img"}))};function lm(e){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lm(e)}function b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var n=1;nd_e.call(e,n));function Mu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const p_e="__v",v_e="__o",g_e="_owner",{getOwnPropertyDescriptor:HP,keys:UP}=Object;function y_e(e,n){return e.byteLength===n.byteLength&&l1(new Uint8Array(e),new Uint8Array(n))}function b_e(e,n,t){let i=e.length;if(n.length!==i)return!1;for(;i-- >0;)if(!t.equals(e[i],n[i],i,i,e,n,t))return!1;return!0}function w_e(e,n){return e.byteLength===n.byteLength&&l1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function k_e(e,n){return Mu(e.getTime(),n.getTime())}function __e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function x_e(e,n){return e===n}function VP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,f=0;for(;(o=a.next())&&!o.done;){const c=n.entries();let h=!1,d=0;for(;(l=c.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],f,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;f++}return!0}const S_e=Mu;function C_e(e,n,t){const i=UP(e);let r=i.length;if(UP(n).length!==r)return!1;for(;r-- >0;)if(!eV(e,n,t,i[r]))return!1;return!0}function Kd(e,n,t){const i=qP(e);let r=i.length;if(qP(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!eV(e,n,t,a)||(o=HP(e,a),l=HP(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function A_e(e,n){return Mu(e.valueOf(),n.valueOf())}function O_e(e,n){return e.source===n.source&&e.flags===n.flags}function WP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const f=n.values();let c=!1,h=0;for(;(l=f.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){c=r[h]=!0;break}h++}if(!c)return!1}return!0}function l1(e,n){let t=e.byteLength;if(n.byteLength!==t||e.byteOffset!==n.byteOffset)return!1;for(;t-- >0;)if(e[t]!==n[t])return!1;return!0}function E_e(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function eV(e,n,t,i){return(i===g_e||i===v_e||i===p_e)&&(e.$$typeof||n.$$typeof)?!0:m_e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const T_e="[object ArrayBuffer]",M_e="[object Arguments]",j_e="[object Boolean]",D_e="[object DataView]",R_e="[object Date]",P_e="[object Error]",N_e="[object Map]",$_e="[object Number]",z_e="[object Object]",L_e="[object RegExp]",I_e="[object Set]",B_e="[object String]",F_e={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},q_e="[object URL]",H_e=Object.prototype.toString;function U_e({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:y}){return function(w,_,S){if(w===_)return!0;if(w==null||_==null)return!1;const C=typeof w;if(C!==typeof _)return!1;if(C!=="object")return C==="number"?l(w,_,S):C==="function"?a(w,_,S):!1;const E=w.constructor;if(E!==_.constructor)return!1;if(E===Object)return f(w,_,S);if(Array.isArray(w))return n(w,_,S);if(E===Date)return i(w,_,S);if(E===RegExp)return h(w,_,S);if(E===Map)return o(w,_,S);if(E===Set)return d(w,_,S);const A=H_e.call(w);if(A===R_e)return i(w,_,S);if(A===L_e)return h(w,_,S);if(A===N_e)return o(w,_,S);if(A===I_e)return d(w,_,S);if(A===z_e)return typeof w.then!="function"&&typeof _.then!="function"&&f(w,_,S);if(A===q_e)return v(w,_,S);if(A===P_e)return r(w,_,S);if(A===M_e)return f(w,_,S);if(F_e[A])return p(w,_,S);if(A===T_e)return e(w,_,S);if(A===D_e)return t(w,_,S);if(A===j_e||A===$_e||A===B_e)return c(w,_,S);if(y){let T=y[A];if(!T){const j=h_e(w);j&&(T=y[j])}if(T)return T(w,_,S)}return!1}}function V_e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:y_e,areArraysEqual:t?Kd:b_e,areDataViewsEqual:w_e,areDatesEqual:k_e,areErrorsEqual:__e,areFunctionsEqual:x_e,areMapsEqual:t?p3(VP,Kd):VP,areNumbersEqual:S_e,areObjectsEqual:t?Kd:C_e,arePrimitiveWrappersEqual:A_e,areRegExpsEqual:O_e,areSetsEqual:t?p3(WP,Kd):WP,areTypedArraysEqual:t?p3(l1,Kd):l1,areUrlsEqual:E_e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=Iv(i.areArraysEqual),a=Iv(i.areMapsEqual),o=Iv(i.areObjectsEqual),l=Iv(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function W_e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function G_e({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,f){const{cache:c=e?new WeakMap:void 0,meta:h}=t();return n(l,f,{cache:c,equals:i,meta:h,strict:r})};if(e)return function(l,f){return n(l,f,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,f){return n(l,f,a)}}const Y_e=ml();ml({strict:!0});ml({circular:!0});ml({circular:!0,strict:!0});ml({createInternalComparator:()=>Mu});ml({strict:!0,createInternalComparator:()=>Mu});ml({circular:!0,createInternalComparator:()=>Mu});ml({circular:!0,createInternalComparator:()=>Mu,strict:!0});function ml(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=V_e(e),o=U_e(a),l=t?t(o):W_e(o);return G_e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function K_e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function GP(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=-1,i=function r(a){t<0&&(t=a),a-t>n?(e(a),t=-1):K_e(r)};requestAnimationFrame(i)}function w4(e){"@babel/helpers - typeof";return w4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},w4(e)}function X_e(e){return e2e(e)||J_e(e)||Q_e(e)||Z_e()}function Z_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q_e(e,n){if(e){if(typeof e=="string")return YP(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return YP(e,n)}}function YP(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1?1:_<0?0:_},b=function(_){for(var S=_>1?1:_,C=S,E=0;E<8;++E){var A=d(C)-S,T=v(C);if(Math.abs(A-S)0&&arguments[0]!==void 0?arguments[0]:{},t=n.stiff,i=t===void 0?100:t,r=n.damping,a=r===void 0?8:r,o=n.dt,l=o===void 0?17:o,f=function(h,d,p){var v=-(h-d)*i,y=p*a,b=p+(v-y)*l/1e3,w=p*l/1e3+h;return Math.abs(w-d)e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function j2e(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,a;for(a=0;a=0)&&(t[r]=e[r]);return t}function v3(e){return N2e(e)||P2e(e)||R2e(e)||D2e()}function D2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R2e(e,n){if(e){if(typeof e=="string")return C4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return C4(e,n)}}function P2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function N2e(e){if(Array.isArray(e))return C4(e)}function C4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c1(e){return c1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c1(e)}var ao=(function(e){B2e(t,e);var n=F2e(t);function t(i,r){var a;$2e(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,f=o.attributeName,c=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(E4(a)),a.changeStyle=a.changeStyle.bind(E4(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),O4(a);if(d&&d.length)a.state={style:d[0].style};else if(c){if(typeof p=="function")return a.state={style:c},O4(a);a.state={style:f?sh({},f,c):c}}else a.state={style:{}};return a}return L2e(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:f?sh({},f,h):h};this.state&&p&&(f&&p[f]!==h||!f&&p!==h)&&this.setState(v);return}if(!(Y_e(r.to,h)&&r.canBegin&&r.isActive)){var y=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=y||c?d:r.to;if(this.state&&p){var w={style:f?sh({},f,b):b};(f&&p[f]!==b||!f&&p!==b)&&this.setState(w)}this.runAnimation(xa(xa({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,f=r.duration,c=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=E2e(o,l,g2e(c),f,this.changeStyle),y=function(){a.stopJSAnimation=v()};this.manager.start([p,h,y,f,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,f=r.onAnimationStart,c=o[0],h=c.style,d=c.duration,p=d===void 0?0:d,v=function(b,w,_){if(_===0)return b;var S=w.duration,C=w.easing,E=C===void 0?"ease":C,A=w.style,T=w.properties,j=w.onAnimationEnd,N=_>0?o[_-1]:w,q=T||Object.keys(A);if(typeof E=="function"||E==="spring")return[].concat(v3(b),[a.runJSAnimation.bind(a,{from:N.style,to:A,duration:S,easing:E}),S]);var R=ZP(q,S,E),L=xa(xa(xa({},N.style),A),{},{transition:R});return[].concat(v3(b),[L,S,j]).filter(a2e)};return this.manager.start([f].concat(v3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=n2e());var a=r.begin,o=r.duration,l=r.attributeName,f=r.to,c=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof v=="function"||c==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var b=l?sh({},l,f):f,w=ZP(Object.keys(b),o,c);y.start([h,a,xa(xa({},b),{},{transition:w}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var f=M2e(r,T2e),c=O.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||c===0||o<=0)return a;var d=function(v){var y=v.props,b=y.style,w=b===void 0?{}:b,_=y.className,S=O.cloneElement(v,xa(xa({},f),{},{style:xa(xa({},w),h),className:_}));return S};return c===1?d(O.Children.only(a)):Z.createElement("div",null,O.Children.map(a,function(p){return d(p)}))}}]),t})(O.PureComponent);ao.displayName="Animate";ao.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ao.propTypes={from:ut.oneOfType([ut.object,ut.string]),to:ut.oneOfType([ut.object,ut.string]),attributeName:ut.string,duration:ut.number,begin:ut.number,easing:ut.oneOfType([ut.string,ut.func]),steps:ut.arrayOf(ut.shape({duration:ut.number.isRequired,style:ut.object.isRequired,easing:ut.oneOfType([ut.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ut.func]),properties:ut.arrayOf("string"),onAnimationEnd:ut.func})),children:ut.oneOfType([ut.node,ut.func]),isActive:ut.bool,canBegin:ut.bool,onAnimationEnd:ut.func,shouldReAnimate:ut.bool,onAnimationStart:ut.func,onAnimationReStart:ut.func};function cm(e){"@babel/helpers - typeof";return cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cm(e)}function d1(){return d1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,f=i>=0?1:-1,c=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(n+f*d[0],",").concat(t)),h+="L ".concat(n+i-f*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, + `).concat(n+i,",").concat(t+l*d[1])),h+="L ".concat(n+i,",").concat(t+r-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, + `).concat(n+i-f*d[2],",").concat(t+r)),h+="L ".concat(n+f*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, + `).concat(n,",").concat(t+r-l*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);h="M ".concat(n,",").concat(t+l*y,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+f*y,",").concat(t,` + L `).concat(n+i-f*y,",").concat(t,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+i,",").concat(t+l*y,` + L `).concat(n+i,",").concat(t+r-l*y,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n+i-f*y,",").concat(t+r,` + L `).concat(n+f*y,",").concat(t+r,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(n,",").concat(t+r-l*y," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},Z2e=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,f=t.height;if(Math.abs(l)>0&&Math.abs(f)>0){var c=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+f),p=Math.max(o,o+f);return i>=c&&i<=h&&r>=d&&r<=p}return!1},Q2e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},dm=function(n){var t=aN(aN({},Q2e),n),i=O.useRef(),r=O.useState(-1),a=H2e(r,2),o=a[0],l=a[1];O.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var E=i.current.getTotalLength();E&&l(E)}catch{}},[]);var f=t.x,c=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,y=t.animationEasing,b=t.animationDuration,w=t.animationBegin,_=t.isAnimationActive,S=t.isUpdateAnimationActive;if(f!==+f||c!==+c||h!==+h||d!==+d||h===0||d===0)return null;var C=cn("recharts-rectangle",v);return S?Z.createElement(ao,{canBegin:o>0,from:{width:h,height:d,x:f,y:c},to:{width:h,height:d,x:f,y:c},duration:b,animationEasing:y,isActive:S},function(E){var A=E.width,T=E.height,j=E.x,N=E.y;return Z.createElement(ao,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,isActive:_,easing:y},Z.createElement("path",d1({},$n(t,!0),{className:C,d:oN(j,N,A,T,p),ref:i})))}):Z.createElement("path",d1({},$n(t,!0),{className:C,d:oN(f,c,h,d,p)}))};function T4(){return T4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function axe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var oxe=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},sxe=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,f=n.left,c=f===void 0?0:f,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,y=n.className,b=rxe(n,J2e),w=exe({x:i,y:a,top:l,left:c,width:d,height:v},b);return!qe(i)||!qe(a)||!qe(d)||!qe(v)||!qe(l)||!qe(c)?null:Z.createElement("path",M4({},$n(w,!0),{className:cn("recharts-cross",y),d:oxe(i,a,d,v,l,c)}))},g3,lN;function lxe(){if(lN)return g3;lN=1;var e=OH(),n=e(Object.getPrototypeOf,Object);return g3=n,g3}var y3,uN;function uxe(){if(uN)return y3;uN=1;var e=us(),n=lxe(),t=fs(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,f=o.call(Object);function c(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==f}return y3=c,y3}var fxe=uxe();const cxe=ot(fxe);var b3,fN;function dxe(){if(fN)return b3;fN=1;var e=us(),n=fs(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return b3=i,b3}var hxe=dxe();const mxe=ot(hxe);function mm(e){"@babel/helpers - typeof";return mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mm(e)}function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:f,y:c},to:{upperWidth:h,lowerWidth:d,height:p,x:f,y:c},duration:b,animationEasing:y,isActive:_},function(C){var E=C.upperWidth,A=C.lowerWidth,T=C.height,j=C.x,N=C.y;return Z.createElement(ao,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,easing:y},Z.createElement("path",h1({},$n(t,!0),{className:S,d:mN(j,N,E,A,T),ref:i})))}):Z.createElement("g",null,Z.createElement("path",h1({},$n(t,!0),{className:S,d:mN(f,c,h,d,p)})))},Cxe=["option","shapeType","propTransformer","activeClassName","isActive"];function pm(e){"@babel/helpers - typeof";return pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pm(e)}function Axe(e,n){if(e==null)return{};var t=Oxe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Oxe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function pN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function m1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Rr(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=i.props,a=r.endIndex,o=r.onDragEnd,l=r.startIndex;o==null||o({endIndex:a,startIndex:l})}),i.detachDragEndListener()}),Rr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Rr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Rr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Rr(i,"handleSlideDragStart",function(r){var a=CN(r)?r.changedTouches[0]:r;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return n3e(n,e),Zxe(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,f=l.gap,c=l.data,h=c.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),y=n.getIndexInRange(o,p);return{startIndex:v-v%f,endIndex:y===h?h:y-y%f}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,f=ir(a[i],l,i);return Rn(o)?o(f,i):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,f=this.props,c=f.x,h=f.width,d=f.travellerWidth,p=f.startIndex,v=f.endIndex,y=f.onChange,b=i.pageX-a;b>0?b=Math.min(b,c+h-d-l,c+h-d-o):b<0&&(b=Math.max(b,c-o,c-l));var w=this.getIndex({startX:o+b,endX:l+b});(w.startIndex!==p||w.endIndex!==v)&&y&&y(w),this.setState({startX:o+b,endX:l+b,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=CN(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,f=r.startX,c=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,y=h.onChange,b=h.gap,w=h.data,_={startX:this.state.startX,endX:this.state.endX},S=i.pageX-a;S>0?S=Math.min(S,d+p-v-c):S<0&&(S=Math.max(S,d-c)),_[o]=c+S;var C=this.getIndex(_),E=C.startIndex,A=C.endIndex,T=function(){var N=w.length-1;return o==="startX"&&(l>f?E%b===0:A%b===0)||lf?A%b===0:E%b===0)||l>f&&A===N};this.setState(Rr(Rr({},o,c+S),"brushMoveStartX",i.pageX),function(){y&&T()&&y(C)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,f=o.startX,c=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=c||r==="endX"&&v<=f||this.setState(Rr({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.fill,c=i.stroke;return Z.createElement("rect",{stroke:c,fill:f,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.data,c=i.children,h=i.padding,d=O.Children.only(c);return d?Z.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,f=this.props,c=f.y,h=f.travellerWidth,d=f.height,p=f.traveller,v=f.ariaLabel,y=f.data,b=f.startIndex,w=f.endIndex,_=Math.max(i,this.props.x),S=S3(S3({},$n(this.props,!1)),{},{x:_,y:c,width:h,height:d}),C=v||"Min value: ".concat((a=y[b])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[w])===null||o===void 0?void 0:o.name);return Z.createElement(Tt,{tabIndex:0,role:"slider","aria-label":C,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),l.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,S))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,f=a.stroke,c=a.travellerWidth,h=Math.min(i,r)+c,d=Math.max(Math.abs(r-i)-c,0);return Z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,f=i.travellerWidth,c=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,y={pointerEvents:"none",fill:c};return Z.createElement(Tt,{className:"recharts-brush-texts"},Z.createElement(Hg,v1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},y),this.getTextOfTick(r)),Z.createElement(Hg,v1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+f+v,y:o+l/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,f=i.y,c=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,y=p.endX,b=p.isTextActive,w=p.isSlideMoving,_=p.isTravellerMoving,S=p.isTravellerFocused;if(!r||!r.length||!qe(l)||!qe(f)||!qe(c)||!qe(h)||c<=0||h<=0)return null;var C=cn("recharts-brush",a),E=Z.Children.count(o)===1,A=Kxe("userSelect","none");return Z.createElement(Tt,{className:C,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,y),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(y,"endX"),(b||w||_||S||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,f=i.stroke,c=Math.floor(a+l/2)-1;return Z.createElement(Z.Fragment,null,Z.createElement("rect",{x:r,y:a,width:o,height:l,fill:f,stroke:"none"}),Z.createElement("line",{x1:r+1,y1:c,x2:r+o-1,y2:c,fill:"none",stroke:"#fff"}),Z.createElement("line",{x1:r+1,y1:c+2,x2:r+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Z.isValidElement(i)?a=Z.cloneElement(i,r):Rn(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,f=i.travellerWidth,c=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||c!==r.prevUpdateId)return S3({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o},a&&a.length?i3e({data:a,width:o,x:l,travellerWidth:f,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||f!==r.prevTravellerWidth)){r.scale.range([l,l+o-f]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var f=Math.floor((o+l)/2);i[f]>r?l=f:o=f}return r>=i[l]?l:o}}])})(O.PureComponent);Rr(tc,"displayName","Brush");Rr(tc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var C3,AN;function r3e(){if(AN)return C3;AN=1;var e=C9();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return C3=n,C3}var A3,ON;function a3e(){if(ON)return A3;ON=1;var e=wH(),n=cl(),t=r3e(),i=br(),r=c0();function a(o,l,f){var c=i(o)?e:t;return f&&r(o,l,f)&&(l=void 0),c(o,n(l,3))}return A3=a,A3}var o3e=a3e();const s3e=ot(o3e);var eo=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},O3,EN;function l3e(){if(EN)return O3;EN=1;var e=LH();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return O3=n,O3}var E3,TN;function u3e(){if(TN)return E3;TN=1;var e=l3e(),n=$H(),t=cl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,f,c){e(o,f,a(l,f,c))}),o}return E3=i,E3}var f3e=u3e();const c3e=ot(f3e);var T3,MN;function d3e(){if(MN)return T3;MN=1;function e(n,t){for(var i=-1,r=n==null?0:n.length;++i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function k3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function _3e(e,n){var t=e.x,i=e.y,r=w3e(e,v3e),a="".concat(t),o=parseInt(a,10),l="".concat(i),f=parseInt(l,10),c="".concat(n.height||r.height),h=parseInt(c,10),d="".concat(n.width||r.width),p=parseInt(d,10);return Xd(Xd(Xd(Xd(Xd({},n),r),o?{x:o}:{}),f?{y:f}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function PN(e){return Z.createElement(Pxe,D4({shapeType:"rectangle",propTransformer:_3e,activeClassName:"recharts-active-bar"},e))}var x3e=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,r){if(typeof n=="number")return n;var a=qe(i)||Pme(i);return a?n(i,r):(a||hu(),t)}},S3e=["value","background"],dV;function ic(e){"@babel/helpers - typeof";return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ic(e)}function C3e(e,n){if(e==null)return{};var t=A3e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function A3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function y1(){return y1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(U)0&&Math.abs(H)0&&(G=Math.min((X||0)-(H[te-1]||0),G))}),Number.isFinite(G)){var U=G/B,P=b.layout==="vertical"?i.height:i.width;if(b.padding==="gap"&&(j=U*P/2),b.padding==="no-gap"){var z=cu(n.barCategoryGap,U*P),F=U*P/2;j=F-z-(F-z)/P*z}}}r==="xAxis"?N=[i.left+(C.left||0)+(j||0),i.left+i.width-(C.right||0)-(j||0)]:r==="yAxis"?N=f==="horizontal"?[i.top+i.height-(C.bottom||0),i.top+(C.top||0)]:[i.top+(C.top||0)+(j||0),i.top+i.height-(C.bottom||0)-(j||0)]:N=b.range,A&&(N=[N[1],N[0]]);var Y=Xwe(b,a,p),D=Y.scale,V=Y.realScaleType;D.domain(_).range(N),Zwe(D);var W=ake(D,Sa(Sa({},b),{},{realScaleType:V}));r==="xAxis"?(L=w==="top"&&!E||w==="bottom"&&E,q=i.left,R=d[T]-L*b.height):r==="yAxis"&&(L=w==="left"&&!E||w==="right"&&E,q=d[T]-L*b.width,R=i.top);var $=Sa(Sa(Sa({},b),W),{},{realScaleType:V,x:q,y:R,scale:D,width:r==="xAxis"?i.width:b.width,height:r==="yAxis"?i.height:b.height});return $.bandSize=a1($,W),!b.hide&&r==="xAxis"?d[T]+=(L?-1:1)*$.height:b.hide||(d[T]+=(L?-1:1)*$.width),Sa(Sa({},v),{},S0({},y,$))},{})},vV=function(n,t){var i=n.x,r=n.y,a=t.x,o=t.y;return{x:Math.min(i,a),y:Math.min(r,o),width:Math.abs(a-i),height:Math.abs(o-r)}},z3e=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return vV({x:t,y:i},{x:r,y:a})},gV=(function(){function e(n){P3e(this,e),this.scale=n}return N3e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+f}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();S0(gV,"EPS",1e-4);var nA=function(n){var t=Object.keys(n).reduce(function(i,r){return Sa(Sa({},i),{},S0({},r,gV.create(n[r])))},{});return Sa(Sa({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return c3e(r,function(f,c){return t[c].apply(f,{bandAware:o,position:l})})},isInRange:function(r){return cV(r,function(a,o){return t[o].isInRange(a)})}})};function L3e(e){return(e%180+180)%180}var I3e=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=L3e(r),o=a*Math.PI/180,l=Math.atan(i/t),f=o>l&&o-1?f[c?a[h]:h]:void 0}}return D3=i,D3}var R3,BN;function F3e(){if(BN)return R3;BN=1;var e=sV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return R3=n,R3}var P3,FN;function q3e(){if(FN)return P3;FN=1;var e=jH(),n=cl(),t=F3e(),i=Math.max;function r(a,o,l){var f=a==null?0:a.length;if(!f)return-1;var c=l==null?0:t(l);return c<0&&(c=i(f+c,0)),e(a,n(o,3),c)}return P3=r,P3}var N3,qN;function H3e(){if(qN)return N3;qN=1;var e=B3e(),n=q3e(),t=e(n);return N3=t,N3}var U3e=H3e();const V3e=ot(U3e);var W3e=Wq();const G3e=ot(W3e);var Y3e=G3e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),tA=O.createContext(void 0),iA=O.createContext(void 0),yV=O.createContext(void 0),bV=O.createContext({}),wV=O.createContext(void 0),kV=O.createContext(0),_V=O.createContext(0),HN=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,f=n.width,c=n.height,h=Y3e(a);return Z.createElement(tA.Provider,{value:i},Z.createElement(iA.Provider,{value:r},Z.createElement(bV.Provider,{value:a},Z.createElement(yV.Provider,{value:h},Z.createElement(wV.Provider,{value:o},Z.createElement(kV.Provider,{value:c},Z.createElement(_V.Provider,{value:f},l)))))))},K3e=function(){return O.useContext(wV)},xV=function(n){var t=O.useContext(tA);t==null&&hu();var i=t[n];return i==null&&hu(),i},X3e=function(){var n=O.useContext(tA);return Us(n)},Z3e=function(){var n=O.useContext(iA),t=V3e(n,function(i){return cV(i.domain,Number.isFinite)});return t||Us(n)},SV=function(n){var t=O.useContext(iA);t==null&&hu();var i=t[n];return i==null&&hu(),i},Q3e=function(){var n=O.useContext(yV);return n},J3e=function(){return O.useContext(bV)},rA=function(){return O.useContext(_V)},aA=function(){return O.useContext(kV)};function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rc(e)}function eSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function nSe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);te*r)return!1;var a=t();return e*(n-e*a/2-i)>=0&&e*(n+e*a/2-r)<=0}function $Se(e,n){return jV(e,n+1)}function zSe(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,f=0,c=1,h=o,d=function(){var y=i==null?void 0:i[f];if(y===void 0)return{v:jV(i,c)};var b=f,w,_=function(){return w===void 0&&(w=t(y,b)),w},S=y.coordinate,C=f===0||x1(e,S,_,h,l);C||(f=0,h=o,c+=1),C&&(h=S+e*(_()/2+r),f+=c)},p;c<=a.length;)if(p=d(),p)return p.v;return[]}function wm(e){"@babel/helpers - typeof";return wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wm(e)}function ZN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Bi(e){for(var n=1;n0?v.coordinate-w*e:v.coordinate})}else a[p]=v=Bi(Bi({},v),{},{tickCoord:v.coordinate});var _=x1(e,v.tickCoord,b,l,f);_&&(f=v.tickCoord-e*(b()/2+r),a[p]=Bi(Bi({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)c(h);return a}function qSe(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,f=n.start,c=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-c);o[l-1]=h=Bi(Bi({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=x1(e,h.tickCoord,function(){return d},f,c);v&&(c=h.tickCoord-e*(d/2+r),o[l-1]=Bi(Bi({},h),{},{isShow:!0}))}for(var y=a?l-1:l,b=function(S){var C=o[S],E,A=function(){return E===void 0&&(E=t(C,S)),E};if(S===0){var T=e*(C.coordinate-e*A()/2-f);o[S]=C=Bi(Bi({},C),{},{tickCoord:T<0?C.coordinate-T*e:C.coordinate})}else o[S]=C=Bi(Bi({},C),{},{tickCoord:C.coordinate});var j=x1(e,C.tickCoord,A,f,c);j&&(f=C.tickCoord+e*(A()/2+r),o[S]=Bi(Bi({},C),{},{isShow:!0}))},w=0;w=2?Ma(r[1].coordinate-r[0].coordinate):1,_=NSe(a,w,v);return f==="equidistantPreserveStart"?zSe(w,_,b,r,o):(f==="preserveStart"||f==="preserveStartEnd"?p=qSe(w,_,b,r,o,f==="preserveStartEnd"):p=FSe(w,_,b,r,o),p.filter(function(S){return S.isShow}))}var HSe=["viewBox"],USe=["viewBox"],VSe=["ticks"];function sc(e){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sc(e)}function Of(){return Of=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function WSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function GSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function JN(e,n){for(var t=0;t0?f(this.props):f(v)),o<=0||l<=0||!y||!y.length?null:Z.createElement(Tt,{className:cn("recharts-cartesian-axis",c),ref:function(w){i.layerReference=w}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Xt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=cn(r.className,"recharts-cartesian-axis-tick-value");return Z.isValidElement(i)?o=Z.cloneElement(i,mi(mi({},r),{},{className:l})):Rn(i)?o=i(mi(mi({},r),{},{className:l})):o=Z.createElement(Hg,Of({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(O.Component);lA(Hc,"displayName","CartesianAxis");lA(Hc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var e4e=["x1","y1","x2","y2","key"],n4e=["offset"];function mu(e){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mu(e)}function e$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function qi(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function a4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var o4e=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,f=n.ry;return Z.createElement("rect",{x:r,y:a,ry:f,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function PV(e,n){var t;if(Z.isValidElement(e))t=Z.cloneElement(e,n);else if(Rn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,f=n$(n,e4e),c=$n(f,!1);c.offset;var h=n$(c,n4e);t=Z.createElement("line",Zl({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function s4e(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=qi(qi({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(f),index:f});return PV(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function l4e(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=qi(qi({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(f),index:f});return PV(r,c)});return Z.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function u4e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var y=!h[v+1],b=y?r+o-p:h[v+1]-p;if(b<=0)return null;var w=v%n.length;return Z.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:b,width:a,stroke:"none",fill:n[w],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function f4e(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,f=e.height,c=e.verticalPoints;if(!t||!i||!i.length)return null;var h=c.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var y=!h[v+1],b=y?a+l-p:h[v+1]-p;if(b<=0)return null;var w=v%i.length;return Z.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:b,height:f,stroke:"none",fill:i[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var c4e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return YU(sA(qi(qi(qi({},Hc.defaultProps),i),{},{ticks:Bo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},d4e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return YU(sA(qi(qi(qi({},Hc.defaultProps),i),{},{ticks:Bo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},kf={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function T0(e){var n,t,i,r,a,o,l=rA(),f=aA(),c=J3e(),h=qi(qi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:kf.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:kf.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:kf.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:kf.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:kf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:kf.verticalFill,x:qe(e.x)?e.x:c.left,y:qe(e.y)?e.y:c.top,width:qe(e.width)?e.width:c.width,height:qe(e.height)?e.height:c.height}),d=h.x,p=h.y,v=h.width,y=h.height,b=h.syncWithTicks,w=h.horizontalValues,_=h.verticalValues,S=X3e(),C=Z3e();if(!qe(v)||v<=0||!qe(y)||y<=0||!qe(d)||d!==+d||!qe(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||c4e,A=h.horizontalCoordinatesGenerator||d4e,T=h.horizontalPoints,j=h.verticalPoints;if((!T||!T.length)&&Rn(A)){var N=w&&w.length,q=A({yAxis:C?qi(qi({},C),{},{ticks:N?w:C.ticks}):void 0,width:l,height:f,offset:c},N?!0:b);Vo(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(mu(q),"]")),Array.isArray(q)&&(T=q)}if((!j||!j.length)&&Rn(E)){var R=_&&_.length,L=E({xAxis:S?qi(qi({},S),{},{ticks:R?_:S.ticks}):void 0,width:l,height:f,offset:c},R?!0:b);Vo(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(mu(L),"]")),Array.isArray(L)&&(j=L)}return Z.createElement("g",{className:"recharts-cartesian-grid"},Z.createElement(o4e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Z.createElement(s4e,Zl({},h,{offset:c,horizontalPoints:T,xAxis:S,yAxis:C})),Z.createElement(l4e,Zl({},h,{offset:c,verticalPoints:j,xAxis:S,yAxis:C})),Z.createElement(u4e,Zl({},h,{horizontalPoints:T})),Z.createElement(f4e,Zl({},h,{verticalPoints:j})))}T0.displayName="CartesianGrid";var h4e=["type","layout","connectNulls","ref"],m4e=["key"];function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lc(e)}function t$(e,n){if(e==null)return{};var t=p4e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function p4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function _h(){return _h=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(_f(f.slice(0,y)),[d-b]);break}var w=v.length%2===0?[0,p]:[p];return[].concat(_f(n.repeat(f,h)),_f(v),w).map(function(_){return"".concat(_,"px")}).join(", ")}),Ca(t,"id",Lc("recharts-line-")),Ca(t,"pathRef",function(o){t.mainCurve=o}),Ca(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),Ca(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return C4e(n,e),k4e(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,f=a.yAxis,c=a.layout,h=a.children,d=ua(h,np);if(!d)return null;var p=function(b,w){return{x:b.x,y:b.y,value:b.value,errorVal:ir(b.payload,w)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Z.createElement(Tt,v,d.map(function(y){return Z.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:l,yAxis:f,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,f=l.dot,c=l.points,h=l.dataKey,d=$n(this.props,!1),p=$n(f,!0),v=c.map(function(b,w){var _=Dr(Dr(Dr({key:"dot-".concat(w),r:3},d),p),{},{index:w,cx:b.x,cy:b.y,value:b.value,dataKey:h,payload:b.payload,points:c});return n.renderDotItem(f,_)}),y={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Z.createElement(Tt,_h({className:"recharts-line-dots",key:"dots"},y),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,f=l.type,c=l.layout,h=l.connectNulls;l.ref;var d=t$(l,h4e),p=Dr(Dr(Dr({},$n(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:f,layout:c,connectNulls:h});return Z.createElement(zf,_h({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,f=o.strokeDasharray,c=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,y=o.animateNewValues,b=o.width,w=o.height,_=this.state,S=_.prevPoints,C=_.totalLength;return Z.createElement(ao,{begin:h,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var A=E.t;if(S){var T=S.length/l.length,j=l.map(function(B,G){var H=Math.floor(G*T);if(S[H]){var U=S[H],P=Ri(U.x,B.x),z=Ri(U.y,B.y);return Dr(Dr({},B),{},{x:P(A),y:z(A)})}if(y){var F=Ri(b*2,B.x),Y=Ri(w/2,B.y);return Dr(Dr({},B),{},{x:F(A),y:Y(A)})}return Dr(Dr({},B),{},{x:B.x,y:B.y})});return a.renderCurveStatically(j,i,r)}var N=Ri(0,C),q=N(A),R;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});R=a.getStrokeDasharray(q,C,L)}else R=a.generateSimpleStrokeDasharray(C,q);return a.renderCurveStatically(l,i,r,{strokeDasharray:R})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,f=this.state,c=f.prevPoints,h=f.totalLength;return l&&o&&o.length&&(!c&&h>0||!Qf(c,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,y=r.height,b=r.isAnimationActive,w=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,C=cn("recharts-line",f),E=c&&c.allowDataOverflow,A=h&&h.allowDataOverflow,T=E||A,j=Bn(w)?this.id:w,N=(i=$n(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=N.r,R=q===void 0?3:q,L=N.strokeWidth,B=L===void 0?2:L,G=Zq(o)?o:{},H=G.clipDot,U=H===void 0?!0:H,P=R*2+B;return Z.createElement(Tt,{className:C},E||A?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(j)},Z.createElement("rect",{x:E?p:p-v/2,y:A?d:d-y/2,width:E?v:v*2,height:A?y:y*2})),!U&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(j)},Z.createElement("rect",{x:p-P/2,y:d-P/2,width:v+P,height:y+P}))):null,!S&&this.renderCurve(T,j),this.renderErrorBar(T,j),(S||o)&&this.renderDots(T,U,j),(!b||_)&&Ja.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,r){for(var a=i.length%2!==0?[].concat(_f(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function T4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!Qf(h,o)||!Qf(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,y=r.height,b=r.isAnimationActive,w=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,C=cn("recharts-area",f),E=d&&d.allowDataOverflow,A=p&&p.allowDataOverflow,T=E||A,j=Bn(w)?this.id:w,N=(i=$n(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=N.r,R=q===void 0?3:q,L=N.strokeWidth,B=L===void 0?2:L,G=Zq(o)?o:{},H=G.clipDot,U=H===void 0?!0:H,P=R*2+B;return Z.createElement(Tt,{className:C},E||A?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(j)},Z.createElement("rect",{x:E?h:h-v/2,y:A?c:c-y/2,width:E?v:v*2,height:A?y:y*2})),!U&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(j)},Z.createElement("rect",{x:h-P/2,y:c-P/2,width:v+P,height:y+P}))):null,S?null:this.renderArea(T,j),(o||S)&&this.renderDots(T,U,j),(!b||_)&&Ja.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])})(O.PureComponent);zV=ns;Ka(ns,"displayName","Area");Ka(ns,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ou.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ka(ns,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(qe(l)&&typeof l=="number")return l;var f=r==="horizontal"?i:t,c=f.scale.domain();if(f.type==="number"){var h=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(c[0],c[1]),0)}return l==="dataMin"?c[0]:l==="dataMax"?c[1]:c[0]});Ka(ns,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,f=e.dataKey,c=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,y=c&&c.length,b=zV.getBaseValue(n,t,i,r),w=v==="horizontal",_=!1,S=d.map(function(E,A){var T;y?T=c[h+A]:(T=ir(E,f),Array.isArray(T)?_=!0:T=[b,T]);var j=T[1]==null||y&&ir(E,f)==null;return w?{x:r1({axis:i,ticks:a,bandSize:l,entry:E,index:A}),y:j?null:r.scale(T[1]),value:T,payload:E}:{x:j?null:i.scale(T[1]),y:r1({axis:r,ticks:o,bandSize:l,entry:E,index:A}),value:T,payload:E}}),C;return y||_?C=S.map(function(E){var A=Array.isArray(E.value)?E.value[0]:null;return w?{x:E.x,y:A!=null&&E.y!=null?r.scale(A):null}:{x:A!=null?i.scale(A):null,y:E.y}}):C=w?r.scale(b):i.scale(b),Ls({points:S,baseLine:C,layout:v,isRange:_},p)});Ka(ns,"renderDotItem",function(e,n){var t;if(Z.isValidElement(e))t=Z.cloneElement(e,n);else if(Rn(e))t=e(n);else{var i=cn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=LV(n,E4e);t=Z.createElement(k0,Ql({},a,{key:r,className:i}))}return t});function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fc(e)}function z4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function L4e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function C6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function A6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function O6e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&qe(r)&&qe(a)?n.slice(r,a+1):[]};function JV(e){return e==="number"?[0,"auto"]:void 0}var Q4=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=M0(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(f,c){var h,d=(h=c.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=Mg(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(hc(f),[XU(c,p)]):f},[])},h$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=I6e(a,i),l=n.orderedTooltipTicks,f=n.tooltipAxis,c=n.tooltipTicks,h=Uwe(o,l,c,f);if(h>=0&&c){var d=c[h]&&c[h].value,p=Q4(n,t,h,d),v=B6e(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},F6e=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=GU(h,a);return i.reduce(function(y,b){var w,_=b.type.defaultProps!==void 0?Ae(Ae({},b.type.defaultProps),b.props):b.props,S=_.type,C=_.dataKey,E=_.allowDataOverflow,A=_.allowDuplicatedCategory,T=_.scale,j=_.ticks,N=_.includeHidden,q=_[o];if(y[q])return y;var R=M0(n.data,{graphicalItems:r.filter(function(W){var $,X=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o];return X===q}),dataStartIndex:f,dataEndIndex:c}),L=R.length,B,G,H;h6e(_.domain,E,S)&&(B=p4(_.domain,null,E),v&&(S==="number"||T!=="auto")&&(H=wh(R,C,"category")));var U=JV(S);if(!B||B.length===0){var P,z=(P=_.domain)!==null&&P!==void 0?P:U;if(C){if(B=wh(R,C,S),S==="category"&&v){var F=$me(B);A&&F?(G=B,B=p1(0,L)):A||(B=EP(z,B,b).reduce(function(W,$){return W.indexOf($)>=0?W:[].concat(hc(W),[$])},[]))}else if(S==="category")A?B=B.filter(function(W){return W!==""&&!Bn(W)}):B=EP(z,B,b).reduce(function(W,$){return W.indexOf($)>=0||$===""||Bn($)?W:[].concat(hc(W),[$])},[]);else if(S==="number"){var Y=Kwe(R,r.filter(function(W){var $,X,te=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o],ae="hide"in W.props?W.props.hide:(X=W.type.defaultProps)===null||X===void 0?void 0:X.hide;return te===q&&(N||!ae)}),C,a,h);Y&&(B=Y)}v&&(S==="number"||T!=="auto")&&(H=wh(R,C,"category"))}else v?B=p1(0,L):l&&l[q]&&l[q].hasStack&&S==="number"?B=p==="expand"?[0,1]:KU(l[q].stackGroups,f,c):B=WU(R,r.filter(function(W){var $=o in W.props?W.props[o]:W.type.defaultProps[o],X="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return $===q&&(N||!X)}),S,h,!0);if(S==="number")B=K4(d,B,q,a,j),z&&(B=p4(z,B,E));else if(S==="category"&&z){var D=z,V=B.every(function(W){return D.indexOf(W)>=0});V&&(B=D)}}return Ae(Ae({},y),{},bn({},q,Ae(Ae({},_),{},{axisType:a,domain:B,categoricalDomain:H,duplicateDomain:G,originalDomain:(w=_.domain)!==null&&w!==void 0?w:U,isCategorical:v,layout:h})))},{})},q6e=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=M0(n.data,{graphicalItems:i,dataStartIndex:f,dataEndIndex:c}),v=p.length,y=GU(h,a),b=-1;return i.reduce(function(w,_){var S=_.type.defaultProps!==void 0?Ae(Ae({},_.type.defaultProps),_.props):_.props,C=S[o],E=JV("number");if(!w[C]){b++;var A;return y?A=p1(0,v):l&&l[C]&&l[C].hasStack?(A=KU(l[C].stackGroups,f,c),A=K4(d,A,C,a)):(A=p4(E,WU(p,i.filter(function(T){var j,N,q=o in T.props?T.props[o]:(j=T.type.defaultProps)===null||j===void 0?void 0:j[o],R="hide"in T.props?T.props.hide:(N=T.type.defaultProps)===null||N===void 0?void 0:N.hide;return q===C&&!R}),"number",h),r.defaultProps.allowDataOverflow),A=K4(d,A,C,a)),Ae(Ae({},w),{},bn({},C,Ae(Ae({axisType:a},r.defaultProps),{},{hide:!0,orientation:la(z6e,"".concat(a,".").concat(b%2),null),domain:A,originalDomain:E,isCategorical:y,layout:h})))}return w},{})},H6e=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=ua(h,a),v={};return p&&p.length?v=F6e(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c}):o&&o.length&&(v=q6e(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c})),v},U6e=function(n){var t=Us(n),i=Bo(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:A9(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:a1(t,i)}},m$=function(n){var t=n.children,i=n.defaultShowTooltip,r=Nr(t,tc),a=0,o=0;return n.data&&n.data.length!==0&&(o=n.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(a=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!i}},V6e=function(n){return!n||!n.length?!1:n.some(function(t){var i=Uo(t&&t.type);return i&&i.indexOf("Bar")>=0})},p$=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},W6e=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,f=l===void 0?{}:l,c=i.width,h=i.height,d=i.children,p=i.margin||{},v=Nr(d,tc),y=Nr(d,Wo),b=Object.keys(f).reduce(function(A,T){var j=f[T],N=j.orientation;return!j.mirror&&!j.hide?Ae(Ae({},A),{},bn({},N,A[N]+j.width)):A},{left:p.left||0,right:p.right||0}),w=Object.keys(o).reduce(function(A,T){var j=o[T],N=j.orientation;return!j.mirror&&!j.hide?Ae(Ae({},A),{},bn({},N,la(A,"".concat(N))+j.height)):A},{top:p.top||0,bottom:p.bottom||0}),_=Ae(Ae({},w),b),S=_.bottom;v&&(_.bottom+=v.props.height||tc.defaultProps.height),y&&t&&(_=Gwe(_,r,i,t));var C=c-_.left-_.right,E=h-_.top-_.bottom;return Ae(Ae({brushBottom:S},_),{},{width:Math.max(C,0),height:Math.max(E,0)})},G6e=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},uA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,f=n.axisComponents,c=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,S){var C=S.graphicalItems,E=S.stackGroups,A=S.offset,T=S.updateId,j=S.dataStartIndex,N=S.dataEndIndex,q=_.barSize,R=_.layout,L=_.barGap,B=_.barCategoryGap,G=_.maxBarSize,H=p$(R),U=H.numericAxisName,P=H.cateAxisName,z=V6e(C),F=[];return C.forEach(function(Y,D){var V=M0(_.data,{graphicalItems:[Y],dataStartIndex:j,dataEndIndex:N}),W=Y.type.defaultProps!==void 0?Ae(Ae({},Y.type.defaultProps),Y.props):Y.props,$=W.dataKey,X=W.maxBarSize,te=W["".concat(U,"Id")],ae=W["".concat(P,"Id")],le={},ye=f.reduce(function(Ve,He){var We=S["".concat(He.axisType,"Map")],Ye=W["".concat(He.axisType,"Id")];We&&We[Ye]||He.axisType==="zAxis"||hu();var rn=We[Ye];return Ae(Ae({},Ve),{},bn(bn({},He.axisType,rn),"".concat(He.axisType,"Ticks"),Bo(rn)))},le),oe=ye[P],ue=ye["".concat(P,"Ticks")],ke=E&&E[te]&&E[te].hasStack&&ske(Y,E[te].stackGroups),ie=Uo(Y.type).indexOf("Bar")>=0,Re=a1(oe,ue),pe=[],Ce=z&&Vwe({barSize:q,stackGroups:E,totalSize:G6e(ye,P)});if(ie){var De,be,_e=Bn(X)?G:X,Me=(De=(be=a1(oe,ue,!0))!==null&&be!==void 0?be:_e)!==null&&De!==void 0?De:0;pe=Wwe({barGap:L,barCategoryGap:B,bandSize:Me!==Re?Me:Re,sizeList:Ce[ae],maxBarSize:_e}),Me!==Re&&(pe=pe.map(function(Ve){return Ae(Ae({},Ve),{},{position:Ae(Ae({},Ve.position),{},{offset:Ve.position.offset-Me/2})})}))}var Be=Y&&Y.type&&Y.type.getComposedData;Be&&F.push({props:Ae(Ae({},Be(Ae(Ae({},ye),{},{displayedData:V,props:_,dataKey:$,item:Y,bandSize:Re,barPosition:pe,offset:A,stackedData:ke,layout:R,dataStartIndex:j,dataEndIndex:N}))),{},bn(bn(bn({key:Y.key||"item-".concat(D)},U,ye[U]),P,ye[P]),"animationId",T)),childIndex:Yme(Y,_.children),item:Y})}),F},v=function(_,S){var C=_.props,E=_.dataStartIndex,A=_.dataEndIndex,T=_.updateId;if(!H8({props:C}))return null;var j=C.children,N=C.layout,q=C.stackOffset,R=C.data,L=C.reverseStackOrder,B=p$(N),G=B.numericAxisName,H=B.cateAxisName,U=ua(j,i),P=rke(R,U,"".concat(G,"Id"),"".concat(H,"Id"),q,L),z=f.reduce(function(W,$){var X="".concat($.axisType,"Map");return Ae(Ae({},W),{},bn({},X,H6e(C,Ae(Ae({},$),{},{graphicalItems:U,stackGroups:$.axisType===G&&P,dataStartIndex:E,dataEndIndex:A}))))},{}),F=W6e(Ae(Ae({},z),{},{props:C,graphicalItems:U}),S==null?void 0:S.legendBBox);Object.keys(z).forEach(function(W){z[W]=h(C,z[W],F,W.replace("Map",""),t)});var Y=z["".concat(H,"Map")],D=U6e(Y),V=p(C,Ae(Ae({},z),{},{dataStartIndex:E,dataEndIndex:A,updateId:T,graphicalItems:U,stackGroups:P,offset:F}));return Ae(Ae({formattedGraphicalItems:V,graphicalItems:U,offset:F,stackGroups:P},D),z)},y=(function(w){function _(S){var C,E,A;return A6e(this,_),A=T6e(this,_,[S]),bn(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),bn(A,"accessibilityManager",new d6e),bn(A,"handleLegendBBoxUpdate",function(T){if(T){var j=A.state,N=j.dataStartIndex,q=j.dataEndIndex,R=j.updateId;A.setState(Ae({legendBBox:T},v({props:A.props,dataStartIndex:N,dataEndIndex:q,updateId:R},Ae(Ae({},A.state),{},{legendBBox:T}))))}}),bn(A,"handleReceiveSyncEvent",function(T,j,N){if(A.props.syncId===T){if(N===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(j)}}),bn(A,"handleBrushChange",function(T){var j=T.startIndex,N=T.endIndex;if(j!==A.state.dataStartIndex||N!==A.state.dataEndIndex){var q=A.state.updateId;A.setState(function(){return Ae({dataStartIndex:j,dataEndIndex:N},v({props:A.props,dataStartIndex:j,dataEndIndex:N,updateId:q},A.state))}),A.triggerSyncEvent({dataStartIndex:j,dataEndIndex:N})}}),bn(A,"handleMouseEnter",function(T){var j=A.getMouseInfo(T);if(j){var N=Ae(Ae({},j),{},{isTooltipActive:!0});A.setState(N),A.triggerSyncEvent(N);var q=A.props.onMouseEnter;Rn(q)&&q(N,T)}}),bn(A,"triggeredAfterMouseMove",function(T){var j=A.getMouseInfo(T),N=j?Ae(Ae({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(N),A.triggerSyncEvent(N);var q=A.props.onMouseMove;Rn(q)&&q(N,T)}),bn(A,"handleItemMouseEnter",function(T){A.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),bn(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),bn(A,"handleMouseMove",function(T){T.persist(),A.throttleTriggeredAfterMouseMove(T)}),bn(A,"handleMouseLeave",function(T){A.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};A.setState(j),A.triggerSyncEvent(j);var N=A.props.onMouseLeave;Rn(N)&&N(j,T)}),bn(A,"handleOuterEvent",function(T){var j=Gme(T),N=la(A.props,"".concat(j));if(j&&Rn(N)){var q,R;/.*touch.*/i.test(j)?R=A.getMouseInfo(T.changedTouches[0]):R=A.getMouseInfo(T),N((q=R)!==null&&q!==void 0?q:{},T)}}),bn(A,"handleClick",function(T){var j=A.getMouseInfo(T);if(j){var N=Ae(Ae({},j),{},{isTooltipActive:!0});A.setState(N),A.triggerSyncEvent(N);var q=A.props.onClick;Rn(q)&&q(N,T)}}),bn(A,"handleMouseDown",function(T){var j=A.props.onMouseDown;if(Rn(j)){var N=A.getMouseInfo(T);j(N,T)}}),bn(A,"handleMouseUp",function(T){var j=A.props.onMouseUp;if(Rn(j)){var N=A.getMouseInfo(T);j(N,T)}}),bn(A,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),bn(A,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&A.handleMouseDown(T.changedTouches[0])}),bn(A,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&A.handleMouseUp(T.changedTouches[0])}),bn(A,"handleDoubleClick",function(T){var j=A.props.onDoubleClick;if(Rn(j)){var N=A.getMouseInfo(T);j(N,T)}}),bn(A,"handleContextMenu",function(T){var j=A.props.onContextMenu;if(Rn(j)){var N=A.getMouseInfo(T);j(N,T)}}),bn(A,"triggerSyncEvent",function(T){A.props.syncId!==void 0&&L3.emit(I3,A.props.syncId,T,A.eventEmitterSymbol)}),bn(A,"applySyncEvent",function(T){var j=A.props,N=j.layout,q=j.syncMethod,R=A.state.updateId,L=T.dataStartIndex,B=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)A.setState(Ae({dataStartIndex:L,dataEndIndex:B},v({props:A.props,dataStartIndex:L,dataEndIndex:B,updateId:R},A.state)));else if(T.activeTooltipIndex!==void 0){var G=T.chartX,H=T.chartY,U=T.activeTooltipIndex,P=A.state,z=P.offset,F=P.tooltipTicks;if(!z)return;if(typeof q=="function")U=q(F,T);else if(q==="value"){U=-1;for(var Y=0;Y=0){var ke,ie;if(G.dataKey&&!G.allowDuplicatedCategory){var Re=typeof G.dataKey=="function"?ue:"payload.".concat(G.dataKey.toString());ke=Mg(Y,Re,U),ie=D&&V&&Mg(V,Re,U)}else ke=Y==null?void 0:Y[H],ie=D&&V&&V[H];if(ae||te){var pe=T.props.activeIndex!==void 0?T.props.activeIndex:H;return[O.cloneElement(T,Ae(Ae(Ae({},q.props),ye),{},{activeIndex:pe})),null,null]}if(!Bn(ke))return[oe].concat(hc(A.renderActivePoints({item:q,activePoint:ke,basePoint:ie,childIndex:H,isRange:D})))}else{var Ce,De=(Ce=A.getItemByXY(A.state.activeCoordinate))!==null&&Ce!==void 0?Ce:{graphicalItem:oe},be=De.graphicalItem,_e=be.item,Me=_e===void 0?T:_e,Be=be.childIndex,Ve=Ae(Ae(Ae({},q.props),ye),{},{activeIndex:Be});return[O.cloneElement(Me,Ve),null,null]}return D?[oe,null,null]:[oe,null]}),bn(A,"renderCustomized",function(T,j,N){return O.cloneElement(T,Ae(Ae({key:"recharts-customized-".concat(N)},A.props),A.state))}),bn(A,"renderMap",{CartesianGrid:{handler:Fv,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Fv},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Fv},YAxis:{handler:Fv},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((C=S.id)!==null&&C!==void 0?C:Lc("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=UH(A.triggeredAfterMouseMove,(E=S.throttleDelay)!==null&&E!==void 0?E:1e3/60),A.state={},A}return D6e(_,w),E6e(_,[{key:"componentDidMount",value:function(){var C,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var C=this.props,E=C.children,A=C.data,T=C.height,j=C.layout,N=Nr(E,ra);if(N){var q=N.props.defaultIndex;if(!(typeof q!="number"||q<0||q>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[q]&&this.state.tooltipTicks[q].value,L=Q4(this.state,A,q,R),B=this.state.tooltipTicks[q].coordinate,G=(this.state.offset.top+T)/2,H=j==="horizontal",U=H?{x:B,y:G}:{y:B,x:G},P=this.state.formattedGraphicalItems.find(function(F){var Y=F.item;return Y.type.name==="Scatter"});P&&(U=Ae(Ae({},U),P.props.points[q].tooltipPosition),L=P.props.points[q].tooltipPayload);var z={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:R,activePayload:L,activeCoordinate:U};this.setState(z),this.renderCursor(N),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(C,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==C.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==C.margin){var A,T;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(C){zS([Nr(C.children,ra)],[Nr(this.props.children,ra)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=Nr(this.props.children,ra);if(C&&typeof C.props.shared=="boolean"){var E=C.props.shared?"axis":"item";return l.indexOf(E)>=0?E:a}return a}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var E=this.container,A=E.getBoundingClientRect(),T=P1e(A),j={chartX:Math.round(C.pageX-T.left),chartY:Math.round(C.pageY-T.top)},N=A.width/E.offsetWidth||1,q=this.inRange(j.chartX,j.chartY,N);if(!q)return null;var R=this.state,L=R.xAxisMap,B=R.yAxisMap,G=this.getTooltipEventType(),H=h$(this.state,this.props.data,this.props.layout,q);if(G!=="axis"&&L&&B){var U=Us(L).scale,P=Us(B).scale,z=U&&U.invert?U.invert(j.chartX):null,F=P&&P.invert?P.invert(j.chartY):null;return Ae(Ae({},j),{},{xValue:z,yValue:F},H)}return H?Ae(Ae({},j),H):null}},{key:"inRange",value:function(C,E){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,j=C/A,N=E/A;if(T==="horizontal"||T==="vertical"){var q=this.state.offset,R=j>=q.left&&j<=q.left+q.width&&N>=q.top&&N<=q.top+q.height;return R?{x:j,y:N}:null}var L=this.state,B=L.angleAxisMap,G=L.radiusAxisMap;if(B&&G){var H=Us(B);return jP({x:j,y:N},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,E=this.getTooltipEventType(),A=Nr(C,ra),T={};A&&E==="axis"&&(A.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=jg(this.props,this.handleOuterEvent);return Ae(Ae({},j),T)}},{key:"addListener",value:function(){L3.on(I3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){L3.removeListener(I3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,E,A){for(var T=this.state.formattedGraphicalItems,j=0,N=T.length;j({root:{"--chart-text-color":n?nt(n,e):void 0,"--chart-grid-color":t?nt(t,e):void 0,"--chart-cursor-fill":i?nt(i,e):void 0,"--chart-bar-label-color":r?nt(r,e):void 0}});function J6e(e,n){let t=0,i=0;return e.map(r=>{if(r.standalone)for(const a in r)typeof r[a]=="number"&&a!==n&&(r[a]=[0,r[a]]);else for(const a in r)typeof r[a]=="number"&&a!==n&&(i+=r[a],r[a]=[t,i],t=i);return r})}function eCe(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const Jl=Pe(e=>{const n=ge("BarChart",Q6e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:y,withXAxis:b,withYAxis:w,gridAxis:_,tickLine:S,xAxisProps:C,yAxisProps:E,unit:A,tooltipAnimationDuration:T,strokeDasharray:j,gridProps:N,tooltipProps:q,referenceLines:R,fillOpacity:L,barChartProps:B,type:G,orientation:H,dir:U,valueFormatter:P,children:z,barProps:F,xAxisLabel:Y,yAxisLabel:D,withBarValueLabel:V,valueLabelProps:W,withRightYAxis:$,rightYAxisLabel:X,rightYAxisProps:te,minBarSize:ae,maxBarWidth:le,mod:ye,getBarColor:oe,gridColor:ue,textColor:ke,attributes:ie,...Re}=n,pe=ni(),Ce=_!=="none"&&(S==="x"||S==="xy"),De=_!=="none"&&(S==="y"||S==="xy"),[be,_e]=O.useState(null),Me=be!==null,Be=G==="stacked"||G==="percent",Ve=G==="percent"?Z6e:P,He=ne=>{_e(null),p==null||p(ne)},{resolvedClassNames:We,resolvedStyles:Ye}=Ni({classNames:t,styles:a,props:n}),rn=G==="waterfall"?J6e(f,v):f,Q=Ge({name:"BarChart",classes:Jy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ie,vars:l,varsResolver:eW}),me=d.map(ne=>{const Le=nt(ne.color,pe),en=Me&&be!==ne.name,hn=typeof F=="function"?F(ne):F,fn=hn==null?void 0:hn.shape;return O.createElement(ju,{...Q("bar"),key:ne.name,name:ne.name,dataKey:ne.name,fill:Le,stroke:Le,isAnimationActive:!1,fillOpacity:en?.1:L,strokeOpacity:en?.2:0,stackId:Be?"stack":ne.stackId||void 0,yAxisId:ne.yAxisId||void 0,minPointSize:ae,...hn,shape:Ze=>{const Ke=Ze.payload,An=Ke!=null&&Ke.color?nt(Ke.color,pe):typeof oe=="function"?nt(oe(Ke==null?void 0:Ke[ne.name],ne),pe):eCe(F,ne)||Le,on={...Ze,fill:An};return typeof fn=="function"?fn(on):Z.isValidElement(fn)?Z.cloneElement(fn,on):typeof fn=="object"&&fn?k.jsx(dm,{...on,...fn}):k.jsx(dm,{...on})}},V&&k.jsx(Ja,{position:H==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:Ze=>Ve==null?void 0:Ve(Ze),...typeof W=="function"?W(ne):W}))}),xe=R==null?void 0:R.map((ne,Le)=>{const en=nt(ne.color,pe);return k.jsx(tp,{stroke:ne.color?en:"var(--chart-grid-color)",strokeWidth:1,yAxisId:ne.yAxisId||void 0,...ne,label:{fill:ne.color?en:"currentColor",fontSize:12,position:ne.labelPosition??"insideBottomLeft",...typeof ne.label=="object"?ne.label:{value:ne.label}},...Q("referenceLine")},Le)}),Xe={axisLine:!1,...H==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:De?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:H==="vertical"?void 0:Ve,...Q("axis")};return k.jsx(we,{...Q("root"),onMouseLeave:He,dir:U||"ltr",mod:[{orientation:H},ye],...Re,children:k.jsx(E9,{...Q("container"),children:k.jsxs(K6e,{data:rn,stackOffset:G==="percent"?"expand":void 0,layout:H,maxBarSize:le,margin:{bottom:Y?30:void 0,left:D?10:void 0,right:D?5:void 0},...B,children:[c&&k.jsx(Wo,{verticalAlign:"top",content:ne=>k.jsx(Qy,{payload:ne.payload,onHighlight:_e,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Ye,series:d,showColor:G!=="waterfall",attributes:ie}),...h}),k.jsxs(pl,{hide:!b,...H==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ce?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:H==="vertical"?Ve:void 0,...Q("axis"),...C,children:[Y&&k.jsx(Xt,{position:"insideBottom",offset:-20,fontSize:12,...Q("axisLabel"),children:Y}),C==null?void 0:C.children]}),k.jsxs(oo,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!w,...Xe,...E,children:[D&&k.jsx(Xt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Q("axisLabel"),children:D}),E==null?void 0:E.children]}),k.jsxs(oo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!$,...Xe,...te,children:[X&&k.jsx(Xt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Q("axisLabel"),children:X}),E==null?void 0:E.children]}),k.jsx(T0,{strokeDasharray:j,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Q("grid"),...N}),y&&k.jsx(ra,{animationDuration:T,isAnimationActive:T!==0,position:H==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:j,fill:"var(--chart-cursor-fill)"},content:({label:ne,payload:Le,labelFormatter:en})=>k.jsx(a9,{label:en&&Le?en(ne,Le):ne,payload:Le,type:G==="waterfall"?"scatter":void 0,unit:A,classNames:We,styles:Ye,series:d,valueFormatter:P,attributes:ie}),...q}),me,xe,z]})})})});Jl.displayName="@mantine/charts/BarChart";Jl.classes=Jy;Jl.varsResolver=eW;const nCe={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},nW=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?nt(n,e):void 0,"--chart-grid-color":t?nt(t,e):void 0}}),j0=Pe(e=>{const n=ge("LineChart",nCe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:y,withXAxis:b,withYAxis:w,gridAxis:_,tickLine:S,xAxisProps:C,yAxisProps:E,unit:A,tooltipAnimationDuration:T,strokeDasharray:j,gridProps:N,tooltipProps:q,referenceLines:R,withDots:L,dotProps:B,activeDotProps:G,strokeWidth:H,lineChartProps:U,connectNulls:P,fillOpacity:z,curveType:F,orientation:Y,dir:D,valueFormatter:V,children:W,lineProps:$,xAxisLabel:X,yAxisLabel:te,type:ae,gradientStops:le,withRightYAxis:ye,rightYAxisLabel:oe,rightYAxisProps:ue,withPointLabels:ke,attributes:ie,gridColor:Re,...pe}=n,Ce=ni(),De=_!=="none"&&(S==="x"||S==="xy"),be=_!=="none"&&(S==="y"||S==="xy"),[_e,Me]=O.useState(null),Be=_e!==null,Ve=ne=>{Me(null),p==null||p(ne)},{resolvedClassNames:He,resolvedStyles:We}=Ni({classNames:t,styles:a,props:n}),Ye=Ge({name:"LineChart",classes:Jy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ie,vars:l,varsResolver:nW}),rn=`line-chart-gradient-${Gi()}`,Q=le==null?void 0:le.map(ne=>k.jsx("stop",{offset:`${ne.offset}%`,stopColor:nt(ne.color,Ce)},ne.color)),me=d.map(ne=>{const Le=nt(ne.color,Ce),en=Be&&_e!==ne.name;return O.createElement(ip,{...Ye("line"),key:ne.name,name:ne.name,dataKey:ne.name,dot:L?{fillOpacity:en?0:1,strokeOpacity:en?0:1,strokeWidth:1,fill:ae==="gradient"?"var(--mantine-color-gray-7)":Le,stroke:ae==="gradient"?"white":Le,...B}:!1,activeDot:L?{fill:ae==="gradient"?"var(--mantine-color-gray-7)":Le,stroke:ae==="gradient"?"white":Le,...G}:!1,fill:Le,stroke:ae==="gradient"?`url(#${rn})`:Le,strokeWidth:H,isAnimationActive:!1,fillOpacity:en?0:z,strokeOpacity:en?.5:z,connectNulls:P,type:ne.curveType??F,strokeDasharray:ne.strokeDasharray,yAxisId:ne.yAxisId||void 0,label:ke?k.jsx(Ghe,{valueFormatter:V}):void 0,...typeof $=="function"?$(ne):$})}),xe=R==null?void 0:R.map((ne,Le)=>{const en=nt(ne.color,Ce);return k.jsx(tp,{stroke:ne.color?en:"var(--chart-grid-color)",strokeWidth:1,yAxisId:ne.yAxisId||void 0,...ne,label:{fill:ne.color?en:"currentColor",fontSize:12,position:ne.labelPosition??"insideBottomLeft",...typeof ne.label=="object"?ne.label:{value:ne.label}},...Ye("referenceLine")},Le)}),Xe={axisLine:!1,...Y==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:be?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:Y==="vertical"?void 0:V,...Ye("axis")};return k.jsx(we,{...Ye("root"),onMouseLeave:Ve,dir:D||"ltr",...pe,children:k.jsx(E9,{...Ye("container"),children:k.jsxs(Y6e,{data:f,layout:Y,margin:{bottom:X?30:void 0,left:te?10:void 0,right:te?5:void 0},...U,children:[ae==="gradient"&&k.jsx("defs",{children:k.jsx("linearGradient",{id:rn,x1:"0",y1:"0",x2:"0",y2:"1",children:Q})}),c&&k.jsx(Wo,{verticalAlign:"top",content:ne=>k.jsx(Qy,{payload:ne.payload,onHighlight:Me,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:He,styles:We,series:d,showColor:ae!=="gradient",attributes:ie}),...h}),k.jsxs(pl,{hide:!b,...Y==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:De?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?V:void 0,...Ye("axis"),...C,children:[X&&k.jsx(Xt,{position:"insideBottom",offset:-20,fontSize:12,...Ye("axisLabel"),children:X}),C==null?void 0:C.children]}),k.jsxs(oo,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!w,...Xe,...E,children:[te&&k.jsx(Xt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Ye("axisLabel"),children:te}),E==null?void 0:E.children]}),k.jsxs(oo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!ye,...Xe,...ue,children:[oe&&k.jsx(Xt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Ye("axisLabel"),children:oe}),E==null?void 0:E.children]}),k.jsx(T0,{strokeDasharray:j,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Ye("grid"),...N}),y&&k.jsx(ra,{animationDuration:T,isAnimationActive:T!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:j},content:({label:ne,payload:Le,labelFormatter:en})=>k.jsx(a9,{label:en&&Le?en(ne,Le):ne,payload:Le,unit:A,classNames:He,styles:We,series:d,valueFormatter:V,showColor:ae!=="gradient",attributes:ie}),...q}),me,xe,W]})})})});j0.displayName="@mantine/charts/LineChart";j0.classes=Jy;j0.varsResolver=nW;const J4=6e4,lh=60*J4,Tf=24*lh,qv=7*Tf,F3=30*Tf;function hr(e){if(!Number.isFinite(e)||e<0)return"0m";if(eze().subtract(30,"day").toDate()),[i,r]=O.useState(()=>new Date),[a,o]=O.useState(null),[l,f]=O.useState(null),[c,h]=O.useState([]),[d,p]=O.useState([]),[v,y]=O.useState(null),[b,w]=O.useState(!1),[_,S]=O.useState([]);O.useEffect(()=>{SB().then(p).catch(()=>{})},[]),O.useEffect(()=>{let R=!1;return w(!0),CB({from:g$(n),to:g$(i),assignee_id:a||void 0,requester:l||void 0,tags:c.length>0?c:void 0}).then(L=>{R||(y(L),S(B=>{const G=new Set(B);for(const H of L.top_requesters??[])G.add(H.requester);return Array.from(G).sort()}))}).catch(()=>{}).finally(()=>{R||w(!1)}),()=>{R=!0}},[n,i,a,l,c]);const C=O.useMemo(()=>e.map(R=>({value:R.id,label:R.display_name||R.username})),[e]),E=O.useMemo(()=>{if(!v)return[];const R=v.cumulative_flow??[],L=R.findIndex(G=>G.total>0||G.done>0);return(L<=0?R:R.slice(Math.max(0,L-1))).map(G=>({date:G.date,done:G.done,wip:Math.max(0,G.total-G.done),total:G.total}))},[v]),A=O.useMemo(()=>{if(!v)return[];const R=new Map;for(const L of v.throughput_daily??[])R.set(L.date,{date:L.date,completed:L.count,created:0});for(const L of v.created_daily??[]){const B=R.get(L.date)??{date:L.date,completed:0,created:0};B.created=L.count,R.set(L.date,B)}return Array.from(R.values()).sort((L,B)=>L.date.localeCompare(B.date))},[v]),T=O.useMemo(()=>v?(v.by_column??[]).map(R=>({column:R.name+(R.is_done?" ✓":""),tarjetas:R.count})):[],[v]),j=O.useMemo(()=>v?(v.top_assignees??[]).slice().sort((R,L)=>L.completed_in_range+L.active-(R.completed_in_range+R.active)).slice(0,8).map(R=>({usuario:R.display_name||R.username,completadas:R.completed_in_range,activas:R.active})):[],[v]),N=O.useMemo(()=>v?(v.top_requesters??[]).map(R=>({solicitante:R.requester,activas:R.active,completadas:R.completed_in_range})):[],[v]),q=O.useMemo(()=>v?(v.movements_by_user??[]).filter(R=>R.moves>0).slice(0,8).map(R=>({usuario:R.display_name||R.username,movimientos:R.moves})):[],[v]);return k.jsx(we,{p:"md",children:k.jsxs($t,{gap:"md",children:[k.jsxs(wn,{justify:"space-between",children:[k.jsx(_u,{order:3,children:"Dashboard"}),k.jsxs(wn,{gap:"xs",wrap:"nowrap",children:[k.jsx(lu,{label:"Desde",value:n,onChange:R=>t(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),k.jsx(lu,{label:"Hasta",value:i,onChange:R=>r(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),k.jsx(Zo,{label:"Asignado",size:"xs",placeholder:"Todos",value:a,onChange:o,data:C,clearable:!0,searchable:!0,style:{minWidth:160}}),k.jsx(Zo,{label:"Solicitante",size:"xs",placeholder:"Todos",value:l,onChange:f,data:_.map(R=>({value:R,label:R})),clearable:!0,searchable:!0,style:{minWidth:160}}),k.jsx(_y,{label:"Tags",size:"xs",placeholder:"Todas",value:c,onChange:h,data:d,clearable:!0,searchable:!0,style:{minWidth:200}})]})]}),b&&!v&&k.jsx(_c,{p:"xl",children:k.jsx(Wi,{})}),v&&(()=>{const R=v.totals??{},L=v.lead_time??{n:0,p50_ms:0,p90_ms:0},B=G=>R[G]??0;return k.jsxs(k.Fragment,{children:[k.jsxs(Dh,{cols:{base:2,md:5},spacing:"md",children:[k.jsx(Zd,{icon:k.jsx(BM,{size:14}),label:"Totales",value:B("cards"),hint:`${B("columns")} columnas, ${B("users")} usuarios`}),k.jsx(Zd,{icon:k.jsx(BM,{size:14}),label:"Activas",value:B("cards_active"),hint:"Sin completar",color:"blue"}),k.jsx(Zd,{icon:k.jsx($h,{size:14}),label:"Completadas (rango)",value:B("cards_completed_in_range"),hint:`${B("cards_done")} completadas total · ${B("cards_created_in_range")} creadas rango`,color:"green"}),k.jsx(Zd,{icon:k.jsx(boe,{size:14}),label:"Lead time p50",value:L.n>0?hr(L.p50_ms):0,hint:`p90 ${L.n>0?hr(L.p90_ms):0} · n=${L.n}`}),k.jsx(Zd,{icon:k.jsx(Gl,{size:14}),label:"Bloqueos activos",value:B("active_locks"),hint:`Total bloqueado: ${hr(v.lock_total_ms??0)}`,color:B("active_locks")>0?"yellow":void 0})]}),k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsxs(wn,{gap:6,mb:"sm",children:[k.jsx(qM,{size:16}),k.jsx(un,{fw:600,children:"Cumulative Flow Diagram"}),k.jsx(un,{size:"xs",c:"dimmed",children:"total vs hechas (acumulado)"})]}),E.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin datos."}):k.jsx("div",{style:{height:260,width:"100%"},children:k.jsx(E9,{width:"100%",height:"100%",children:k.jsxs(X6e,{data:E,margin:{top:10,right:16,left:0,bottom:0},children:[k.jsx(T0,{strokeDasharray:"5 5",stroke:"var(--mantine-color-gray-4)"}),k.jsx(pl,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),k.jsx(oo,{allowDecimals:!1,tick:{fontSize:12,fill:"currentColor"}}),k.jsx(ra,{contentStyle:{background:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-gray-3)",borderRadius:6,fontSize:12}}),k.jsx(Wo,{wrapperStyle:{fontSize:12}}),k.jsx(ns,{type:"linear",dataKey:"done",name:"Hechas",stackId:"cfd",stroke:"var(--mantine-color-green-6)",fill:"var(--mantine-color-green-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-green-6)",strokeWidth:0},activeDot:{r:5}}),k.jsx(ns,{type:"linear",dataKey:"wip",name:"En curso",stackId:"cfd",stroke:"var(--mantine-color-blue-6)",fill:"var(--mantine-color-blue-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-blue-6)",strokeWidth:0},activeDot:{r:5}})]})})})]}),k.jsxs(Pr,{children:[k.jsx(Pr.Col,{span:{base:12,md:8},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsxs(wn,{gap:6,mb:"sm",children:[k.jsx(qM,{size:16}),k.jsx(un,{fw:600,children:"Throughput diario"})]}),A.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin datos en el rango."}):k.jsx(j0,{h:240,data:A,dataKey:"date",curveType:"monotone",withLegend:!0,series:[{name:"completed",label:"Completadas",color:"green.6"},{name:"created",label:"Creadas",color:"blue.6"}]})]})}),k.jsx(Pr.Col,{span:{base:12,md:4},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Tarjetas por columna"}),T.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin columnas."}):k.jsx(Jl,{h:240,data:T,dataKey:"column",orientation:"vertical",yAxisProps:{width:100},series:[{name:"tarjetas",label:"Tarjetas",color:"blue.6"}]})]})})]}),k.jsxs(Pr,{children:[k.jsx(Pr.Col,{span:{base:12,md:6},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Top asignados"}),j.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin asignaciones."}):k.jsx(Jl,{h:240,data:j,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"blue.6"}],type:"stacked"})]})}),k.jsx(Pr.Col,{span:{base:12,md:6},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Top solicitantes"}),N.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin solicitantes en el rango."}):k.jsx(Jl,{h:Math.max(240,N.length*32),data:N,dataKey:"solicitante",orientation:"vertical",yAxisProps:{width:160,interval:0},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"violet.6"}],type:"stacked"})]})})]}),k.jsxs(Pr,{children:[k.jsx(Pr.Col,{span:{base:12,md:6},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Movimientos por usuario (rango)"}),q.length===0?k.jsx(un,{c:"dimmed",size:"sm",children:"Sin movimientos registrados."}):k.jsx(Jl,{h:240,data:q,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},series:[{name:"movimientos",label:"Movimientos",color:"orange.6"}]})]})}),k.jsx(Pr.Col,{span:{base:12,md:6},children:k.jsxs(ei,{withBorder:!0,p:"md",radius:"md",children:[k.jsx(un,{fw:600,mb:"sm",children:"Tiempo en columna (cycle time)"}),k.jsxs(_t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,withColumnBorders:!0,fz:"xs",children:[k.jsx(_t.Thead,{children:k.jsxs(_t.Tr,{children:[k.jsx(_t.Th,{children:"Columna"}),k.jsx(_t.Th,{children:"n"}),k.jsx(_t.Th,{children:"p50"}),k.jsx(_t.Th,{children:"p90"}),k.jsx(_t.Th,{children:"avg"})]})}),k.jsx(_t.Tbody,{children:(v.cycle_time_per_column??[]).map(G=>k.jsxs(_t.Tr,{children:[k.jsx(_t.Td,{children:k.jsxs(wn,{gap:6,wrap:"nowrap",children:[k.jsx(un,{size:"xs",fw:500,children:G.name}),G.is_done&&k.jsx(ui,{size:"xs",color:"green",variant:"light",children:"done"})]})}),k.jsx(_t.Td,{children:G.stats.n}),k.jsx(_t.Td,{children:G.stats.n>0?hr(G.stats.p50_ms):"—"}),k.jsx(_t.Td,{children:G.stats.n>0?hr(G.stats.p90_ms):"—"}),k.jsx(_t.Td,{children:G.stats.n>0?hr(G.stats.avg_ms):"—"})]},G.column_id))})]})]})})]})]})})()]})})}function iCe(e){try{return JSON.parse(e)}catch{return{}}}function rCe(e){const n=iCe(e.payload);switch(e.kind){case"created":return{id:e.id,ts:e.created_at,kind:"Creada",actorID:e.actor_id,detail:String(n.title||""),icon:k.jsx(zh,{size:12}),color:"green"};case"title_changed":return{id:e.id,ts:e.created_at,kind:"Titulo",actorID:e.actor_id,detail:`"${n.old}" → "${n.new}"`,icon:k.jsx(ih,{size:12}),color:"blue"};case"requester_changed":return{id:e.id,ts:e.created_at,kind:"Solicitante",actorID:e.actor_id,detail:`"${n.old||"(vacio)"}" → "${n.new||"(vacio)"}"`,icon:k.jsx(ih,{size:12}),color:"orange"};case"description_changed":return{id:e.id,ts:e.created_at,kind:"Descripcion",actorID:e.actor_id,detail:"edicion",icon:k.jsx(ih,{size:12}),color:"blue"};case"color_changed":return{id:e.id,ts:e.created_at,kind:"Color",actorID:e.actor_id,detail:String(n.color||""),icon:k.jsx(BC,{size:12}),color:"violet"};case"tags_changed":return{id:e.id,ts:e.created_at,kind:"Tags",actorID:e.actor_id,detail:Array.isArray(n.tags)?n.tags.join(", ")||"(sin tags)":"",icon:k.jsx(Xoe,{size:12}),color:"grape"};case"assigned":return{id:e.id,ts:e.created_at,kind:"Asignada",actorID:e.actor_id,detail:String(n.assignee_id||""),icon:k.jsx(ose,{size:12}),color:"teal"};case"unassigned":return{id:e.id,ts:e.created_at,kind:"Sin asignar",actorID:e.actor_id,detail:"",icon:k.jsx(rse,{size:12}),color:"gray"};case"deadline_set":{const t=String(n.deadline||"");return{id:e.id,ts:e.created_at,kind:"Deadline",actorID:e.actor_id,detail:t?t.slice(0,10):"",icon:k.jsx(TF,{size:12}),color:"orange"}}case"deadline_cleared":return{id:e.id,ts:e.created_at,kind:"Deadline quitado",actorID:e.actor_id,detail:n.prev?String(n.prev).slice(0,10):"",icon:k.jsx(loe,{size:12}),color:"gray"};default:return{id:e.id,ts:e.created_at,kind:e.kind,actorID:e.actor_id,detail:e.payload,icon:k.jsx(ih,{size:12}),color:"gray"}}}function aCe({card:e}){const[n,t]=O.useState(null),[i,r]=O.useState([]);O.useEffect(()=>{aie(e.id).then(t).catch(()=>t({column_history:[],lock_periods:[],events:[],total_locked_ms:0,currently_locked:!1})),xB().then(r).catch(()=>{})},[e.id]);const a=O.useMemo(()=>{const d=new Map;for(const p of i)d.set(p.id,p);return d},[i]),o=O.useMemo(()=>{if(!n)return[];const d=[];for(const p of n.events||[])d.push(rCe(p));for(const p of n.column_history||[])d.push({id:"h_in_"+p.id,ts:p.entered_at,kind:"Mueve a columna",actorID:p.actor_id,detail:p.column_name||p.column_id,icon:k.jsx(aoe,{size:12}),color:"blue"});for(const p of n.lock_periods||[])d.push({id:"lk_"+p.id,ts:p.locked_at,kind:"Bloqueada",actorID:p.actor_id,detail:"",icon:k.jsx(Gl,{size:12}),color:"yellow"}),p.unlocked_at&&d.push({id:"lku_"+p.id,ts:p.unlocked_at,kind:"Desbloqueada",actorID:p.actor_id,detail:hr(p.duration_ms),icon:k.jsx($F,{size:12}),color:"yellow"});return d.sort((p,v)=>p.ts.localeCompare(v.ts))},[n]);if(!n)return k.jsx(wn,{justify:"center",p:"xl",children:k.jsx(Wi,{size:"sm"})});const{column_history:l,total_locked_ms:f,currently_locked:c}=n;if(o.length===0)return k.jsx(un,{c:"dimmed",children:"Sin historial."});const h=d=>{if(!d)return"";const p=a.get(d);return p?p.display_name||p.username:d};return k.jsxs($t,{gap:"md",children:[k.jsx(un,{size:"sm",c:"dimmed",children:"Linea de tiempo completa de la tarjeta."}),k.jsx(qf,{active:o.length,bulletSize:22,lineWidth:2,children:o.map(d=>k.jsx(qf.Item,{bullet:d.icon,color:d.color,title:k.jsxs(wn,{gap:6,wrap:"wrap",children:[k.jsx(un,{fw:500,size:"sm",children:d.kind}),d.actorID&&k.jsx(ui,{size:"xs",variant:"light",color:"cyan",leftSection:k.jsx(fse,{size:10}),children:h(d.actorID)}),d.detail&&k.jsx(ui,{size:"xs",variant:"outline",color:d.color,children:d.detail})]}),children:k.jsx(un,{size:"xs",c:"dimmed",children:new Date(d.ts).toLocaleString()})},d.id))}),k.jsx(dy,{}),k.jsxs(wn,{gap:6,align:"center",children:[k.jsx(_oe,{size:14}),k.jsx(un,{fw:500,size:"sm",children:"Columnas visitadas"}),k.jsx(ui,{size:"xs",variant:"light",color:"gray",children:l.length}),k.jsx(Gl,{size:14,color:"var(--mantine-color-yellow-6)"}),k.jsx(ui,{size:"xs",variant:"light",color:f>0?"yellow":"gray",children:hr(f)}),c&&k.jsx(ui,{size:"xs",variant:"filled",color:"yellow",children:"bloqueada"})]})]})}function oCe(e,n){if(n.length===0)throw new Error("palette must not be empty");let t=0;for(let i=0;i>>0;return n[t%n.length]}const fA=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function cA(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function tW(e){return e?cA(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:fA.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-9) 18%, var(--mantine-color-dark-6))`:"var(--mantine-color-dark-6)":"var(--mantine-color-dark-6)"}function dA(e){return e?cA(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:fA.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-7) 30%, var(--mantine-color-dark-4))`:"var(--mantine-color-dark-4)":"var(--mantine-color-dark-4)"}function sCe(e){return e?cA(e)?e:fA.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const iW=[{value:"",label:"Default"},{value:"blue",label:"Azul"},{value:"cyan",label:"Cian"},{value:"teal",label:"Teal"},{value:"green",label:"Verde"},{value:"lime",label:"Lima"},{value:"yellow",label:"Amarillo"},{value:"orange",label:"Naranja"},{value:"red",label:"Rojo"},{value:"pink",label:"Rosa"},{value:"grape",label:"Uva"},{value:"violet",label:"Violeta"},{value:"indigo",label:"Indigo"},{value:"gray",label:"Gris"},{value:"#0ea5e9",label:"Sky"},{value:"#14b8a6",label:"Esmeralda"},{value:"#84cc16",label:"Lima fluor"},{value:"#ec4899",label:"Magenta"},{value:"#a855f7",label:"Lavanda"},{value:"#f97316",label:"Mandarina"},{value:"#dc2626",label:"Rubi"},{value:"#0891b2",label:"Petroleo"},{value:"#fde047",label:"Limon"},{value:"#10b981",label:"Menta"},{value:"#fb7185",label:"Coral"},{value:"#6366f1",label:"Iris"},{value:"#94a3b8",label:"Pizarra"}],lCe=iW,uCe=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function y$(e){return oCe(e,uCe)}const Hv=26;function rW({value:e,onChange:n,options:t=iW,onOpenCustom:i}){const[r,a]=O.useState(!1),[o,l]=O.useState(e&&e.startsWith("#")?e:"#888888"),f=!!e&&e.startsWith("#")&&!t.some(c=>c.value===e);return k.jsxs(k.Fragment,{children:[k.jsxs(wn,{gap:6,maw:280,children:[t.map(c=>{const h=e===c.value;return k.jsx(Vi,{label:c.label,withArrow:!0,children:k.jsx(we,{role:"button",onClick:d=>{d.stopPropagation(),n(c.value)},"aria-label":c.label,style:{width:Hv,height:Hv,borderRadius:"50%",background:sCe(c.value),border:`2px solid ${h?"var(--mantine-color-white)":dA(c.value)}`,boxShadow:h?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,transition:"transform .1s"}})},c.value||"default")}),k.jsx(Vi,{label:"Color personalizado",withArrow:!0,children:k.jsx(we,{role:"button",onMouseDown:c=>{c.stopPropagation()},onClick:c=>{c.stopPropagation(),i?i():a(!0)},"aria-label":"Color personalizado",style:{width:Hv,height:Hv,borderRadius:"50%",background:f?o:"transparent",border:`2px dashed ${f?o:"var(--mantine-color-gray-5)"}`,boxShadow:f?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--mantine-color-gray-3)"},children:k.jsx(BC,{size:14})})})]}),!i&&k.jsx(e6,{opened:r,onClose:()=>a(!1),value:o,onAccept:c=>{l(c),n(c)}})]})}const Qd=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function e6({opened:e,onClose:n,value:t,onAccept:i}){const[r,a]=O.useState(t||"#888888"),[o,l]=O.useState(t||"#888888");O.useEffect(()=>{if(e){const d=t&&Qd.test(t)?t:"#888888";a(d),l(d)}},[e,t]);const f=d=>{let p=d.trim();p&&!p.startsWith("#")&&(p="#"+p),l(p),Qd.test(p)&&a(p)},c=d=>{a(d),l(d)},h=()=>{i(r),n()};return k.jsx(Ir,{opened:e,onClose:n,title:"Color personalizado",size:"auto",centered:!0,withinPortal:!0,zIndex:2e3,closeOnClickOutside:!0,closeOnEscape:!1,trapFocus:!1,withCloseButton:!1,children:k.jsxs($t,{gap:"sm",onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),onClick:d=>d.stopPropagation(),children:[k.jsx(cy,{value:r,onChange:c,format:"hex",swatches:["#1c7ed6","#15aabf","#12b886","#37b24d","#82c91e","#fab005","#fd7e14","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#868e96","#212529"],fullWidth:!0}),k.jsxs(wn,{align:"end",gap:"xs",children:[k.jsx(il,{label:"Hex",value:o,onChange:d=>f(d.currentTarget.value),error:o&&!Qd.test(o)?"Hex invalido":void 0,size:"xs",style:{flex:1},placeholder:"#rrggbb"}),k.jsx(we,{style:{width:32,height:32,borderRadius:4,background:Qd.test(o)?o:"transparent",border:"1px solid var(--mantine-color-dark-4)"}})]}),k.jsxs(wn,{justify:"flex-end",gap:"xs",children:[k.jsx(Bt,{variant:"default",size:"xs",onClick:n,children:"Cancelar"}),k.jsx(Bt,{size:"xs",onClick:h,disabled:!Qd.test(r),children:"Aceptar"})]})]})})}function fCe({card:e,now:n,onDelete:t,onEdit:i,onChangeColor:r,onShowHistory:a,onToggleLock:o,onAssign:l,onSetDeadline:f,onSetRequester:c,requesterOptions:h,onOpenCustomColor:d,activeSticker:p,onAddSticker:v,onRemoveSticker:y,onMoveSticker:b,onCommitSticker:w,users:_,assignee:S,inDoneColumn:C,isOverlay:E,highlight:A}){const T=C||!!e.completed_at,[j,N]=O.useState(!1),[q,R]=O.useState(!1),[L,B]=O.useState(!1),[G,H]=O.useState(!1),[U,P]=O.useState(e.requester||""),[z,F]=O.useState(!1),Y=O.useRef(null),D=O.useRef(null),V=!!p,{attributes:W,listeners:$,setNodeRef:X,transform:te,transition:ae,isDragging:le}=eF({id:e.id,data:{type:"card",columnId:e.column_id,locked:e.locked},disabled:V}),ye=O.useCallback(ne=>{Y.current=ne,X(ne)},[X]);O.useEffect(()=>{A&&Y.current&&Y.current.scrollIntoView({behavior:"smooth",block:"center"})},[A]);const oe=ne=>{if(!V||!v||E||ne.target.closest("[data-sticker-overlay]"))return;const Le=ne.currentTarget.getBoundingClientRect(),en=(ne.clientX-Le.left)/Le.width,hn=(ne.clientY-Le.top)/Le.height;v(e.id,Math.max(0,Math.min(1,en)),Math.max(0,Math.min(1,hn)))},ue=ne=>Le=>{var Ke;if(!V||E||!b||Le.button!==0)return;Le.stopPropagation(),Le.preventDefault();const en=(Ke=Y.current)==null?void 0:Ke.getBoundingClientRect();if(!en)return;D.current=ne;const hn=Le.currentTarget;hn.setPointerCapture(Le.pointerId);const fn=An=>{const on=D.current;if(on===null)return;const ht=(An.clientX-en.left)/en.width,mt=(An.clientY-en.top)/en.height;b(e.id,on,Math.max(0,Math.min(1,ht)),Math.max(0,Math.min(1,mt)))},Ze=An=>{var on;(on=hn.releasePointerCapture)==null||on.call(hn,An.pointerId),hn.removeEventListener("pointermove",fn),hn.removeEventListener("pointerup",Ze),hn.removeEventListener("pointercancel",Ze),D.current=null,w==null||w(e.id)};hn.addEventListener("pointermove",fn),hn.addEventListener("pointerup",Ze),hn.addEventListener("pointercancel",Ze)},ke=ne=>Le=>{!V||E||(Le.preventDefault(),Le.stopPropagation(),y==null||y(e.id,ne))},ie={transform:io.Transform.toString(te),transition:ae,opacity:le?.4:1,background:tW(e.color),borderColor:A?"var(--mantine-color-blue-5)":e.locked?"var(--mantine-color-yellow-6)":dA(e.color),borderWidth:A||e.locked?2:1,boxShadow:A?"0 0 0 3px var(--mantine-color-blue-4)":void 0,filter:T?"brightness(0.55) saturate(0.7)":void 0},Re=e.entered_at?new Date(e.entered_at).getTime():n,pe=Math.max(0,n-Re),Ce=e.deadline?new Date(e.deadline).getTime():0,De=Ce?Ce-n:0,be=Ce?De<0:!1,_e=e.created_at?new Date(e.created_at).getTime():0,Me=Ce&&_e?Ce-_e:0,Be=Me>0?De/Me:0;let Ve="blue",He="light";be?(Ve="red.9",He="filled"):Be<.1?(Ve="red",He="filled"):Be<.5&&(Ve="yellow",He="light");const We=e.locked_at?new Date(e.locked_at).getTime():0,Ye=e.locked&&We?Math.max(0,n-We):0,rn=e.created_at?new Date(e.created_at).getTime():0,Q=e.completed_at?new Date(e.completed_at).getTime():0,me=T&&rn&&Q?Math.max(0,Q-rn):0,xe=ne=>{ne.preventDefault(),F(!0)},Xe=k.jsxs(k.Fragment,{children:[k.jsx(Kn.Label,{children:"Acciones"}),k.jsx(Kn.Item,{leftSection:k.jsx(ih,{size:14}),onClick:()=>{F(!1),i(e)},children:"Editar"}),k.jsxs(Tn,{opened:j,onChange:N,position:"right-start",withArrow:!0,shadow:"md",children:[k.jsx(Tn.Target,{children:k.jsx(Kn.Item,{leftSection:k.jsx(BC,{size:14}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),N(Le=>!Le)},closeMenuOnClick:!1,children:"Color"})}),k.jsx(Tn.Dropdown,{p:"xs",onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),children:k.jsx(rW,{value:e.color,onChange:ne=>r(e.id,ne),onOpenCustom:d?()=>d(e.id,e.color||"#888888"):void 0})})]}),k.jsxs(Tn,{opened:q,onChange:R,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[k.jsx(Tn.Target,{children:k.jsxs(Kn.Item,{leftSection:k.jsx(tse,{size:14}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),R(Le=>!Le)},closeMenuOnClick:!1,children:["Asignar a ",S?`(${S.display_name||S.username})`:"..."]})}),k.jsx(Tn.Dropdown,{p:"xs",onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),children:k.jsx(Zo,{placeholder:"Sin asignar",value:e.assignee_id??null,onChange:ne=>{l(e.id,ne),R(!1),F(!1)},data:_.map(ne=>({value:ne.id,label:ne.display_name||ne.username})),clearable:!0,searchable:!0,autoFocus:!0,comboboxProps:{withinPortal:!1}})})]}),k.jsxs(Tn,{opened:L,onChange:B,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[k.jsx(Tn.Target,{children:k.jsxs(Kn.Item,{leftSection:k.jsx(lse,{size:14}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),P(e.requester||""),B(Le=>!Le)},closeMenuOnClick:!1,children:["Solicitante ",e.requester?`(${e.requester})`:"..."]})}),k.jsx(Tn.Dropdown,{p:"xs",onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),children:k.jsx(ry,{placeholder:"Sin solicitante",value:U,onChange:P,data:h||[],autoFocus:!0,comboboxProps:{withinPortal:!1},onKeyDown:ne=>{ne.key==="Enter"?(ne.preventDefault(),c==null||c(e.id,U.trim()),B(!1),F(!1)):ne.key==="Escape"&&B(!1)},onOptionSubmit:ne=>{P(ne),c==null||c(e.id,ne),B(!1),F(!1)}})})]}),k.jsx(Kn.Item,{leftSection:e.locked?k.jsx($F,{size:14}):k.jsx(Gl,{size:14}),color:e.locked?"yellow":void 0,onClick:()=>{F(!1),o(e.id,!e.locked)},children:e.locked?"Desbloquear":"Bloquear"}),k.jsx(Kn.Item,{leftSection:k.jsx(Ooe,{size:14}),onClick:()=>{F(!1),a(e)},children:"Historial"}),f&&k.jsxs(Tn,{opened:G,onChange:H,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[k.jsx(Tn.Target,{children:k.jsx(Kn.Item,{leftSection:k.jsx(TF,{size:14}),onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),H(Le=>!Le)},closeMenuOnClick:!1,children:e.deadline?`Deadline (${e.deadline.slice(0,10)})`:"Deadline..."})}),k.jsxs(Tn.Dropdown,{p:"xs",onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),children:[k.jsx(lu,{value:e.deadline?e.deadline.slice(0,10):null,onChange:ne=>{const Le=ne?typeof ne=="string"?ne.slice(0,10):new Date(ne).toISOString().slice(0,10):null;f(e.id,Le?`${Le}T23:59:59Z`:null),H(!1),F(!1)},clearable:!0,valueFormat:"DD/MM/YYYY",size:"xs",placeholder:"Elegir fecha",popoverProps:{withinPortal:!1}}),e.deadline&&k.jsx(Vi,{label:"Quitar deadline",withArrow:!0,children:k.jsx(Ht,{size:"sm",variant:"subtle",color:"red",mt:6,onClick:()=>{f(e.id,null),H(!1),F(!1)},children:k.jsx(Lh,{size:12})})})]})]}),k.jsx(Kn.Divider,{}),k.jsx(Kn.Item,{leftSection:k.jsx(Lh,{size:14}),color:"red",onClick:()=>{F(!1),t(e.id)},children:"Borrar"})]});return k.jsxs(ei,{ref:ye,style:{...ie,position:"relative",cursor:V?"copy":"grab",touchAction:"none"},withBorder:!0,p:"xs",shadow:E?"lg":"xs",radius:"md",onContextMenu:xe,onClick:oe,onDoubleClick:ne=>{ne.stopPropagation(),i(e)},...W,...V?{}:$,children:[k.jsxs($t,{gap:6,style:{position:"relative",zIndex:1,pointerEvents:V?"none":void 0},children:[k.jsxs(wn,{justify:"space-between",gap:4,wrap:"nowrap",align:"flex-start",children:[k.jsxs(wn,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},align:"flex-start",children:[k.jsx(PF,{size:14,color:"var(--mantine-color-dark-2)",style:{flexShrink:0,marginTop:4}}),e.locked&&k.jsx(Vi,{label:"Bloqueada",withArrow:!0,children:k.jsx(Gl,{size:14,color:"var(--mantine-color-yellow-6)",style:{flexShrink:0,marginTop:4}})}),k.jsx(un,{size:"sm",fw:500,style:{flex:1,wordBreak:"break-word",whiteSpace:"normal",textDecoration:T?"line-through":"none",opacity:T?.7:1},children:e.title})]}),k.jsxs(Kn,{opened:z,onChange:F,position:"bottom-end",shadow:"md",withArrow:!0,children:[k.jsx(Kn.Target,{children:k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones",style:{flexShrink:0},onPointerDown:ne=>ne.stopPropagation(),children:k.jsx(RF,{size:14})})}),k.jsx(Kn.Dropdown,{onDoubleClick:ne=>ne.stopPropagation(),onClick:ne=>ne.stopPropagation(),onMouseDown:ne=>ne.stopPropagation(),onContextMenu:ne=>ne.stopPropagation(),children:Xe})]})]}),(e.requester||S)&&k.jsxs(wn,{gap:6,wrap:"nowrap",style:{minWidth:0},children:[e.requester&&k.jsxs(k.Fragment,{children:[k.jsx(ou,{size:18,radius:"xs",color:y$(e.requester),style:{flexShrink:0},children:e.requester.slice(0,2).toUpperCase()}),k.jsx(un,{size:"xs",c:"dimmed",truncate:!0,children:e.requester})]}),e.requester&&S&&k.jsx(un,{size:"xs",c:"dimmed",style:{flexShrink:0},children:"-"}),S&&k.jsxs(k.Fragment,{children:[k.jsx(ou,{size:18,radius:"xl",color:S.color||"blue",style:{flexShrink:0},children:(S.display_name||S.username).slice(0,2).toUpperCase()}),k.jsx(un,{size:"xs",c:"dimmed",truncate:!0,children:S.display_name||S.username})]})]}),e.description&&k.jsx(un,{size:"xs",c:"dimmed",lineClamp:3,children:e.description}),e.tags&&e.tags.length>0&&k.jsx(wn,{gap:4,wrap:"wrap",children:e.tags.map(ne=>k.jsx(ui,{size:"xs",variant:"light",color:y$(ne),radius:"sm",children:ne},ne))}),k.jsxs(wn,{gap:4,wrap:"wrap",children:[e.locked&&k.jsx(ui,{size:"xs",variant:"light",color:"yellow",leftSection:k.jsx(Gl,{size:10}),children:hr(Ye)}),!e.locked&&T&&e.completed_at?k.jsxs(k.Fragment,{children:[k.jsx(ui,{size:"xs",variant:"light",color:"teal",leftSection:k.jsx(MF,{size:10}),children:v$(e.completed_at)}),k.jsxs(ui,{size:"xs",variant:"light",color:"gray",leftSection:k.jsx(FM,{size:10}),children:["Total: ",hr(me)]}),e.total_locked_ms>0&&k.jsx(ui,{size:"xs",variant:"light",color:"yellow",leftSection:k.jsx(Gl,{size:10}),children:hr(e.total_locked_ms)})]}):e.locked?null:e.deadline?k.jsx(Vi,{label:`Vence: ${v$(e.deadline)}`,withArrow:!0,children:k.jsx(ui,{size:"xs",variant:He,color:Ve,leftSection:k.jsx(NF,{size:10}),children:be?`-${hr(-De)}`:hr(De)})}):k.jsx(ui,{size:"xs",variant:"light",color:"gray",leftSection:k.jsx(FM,{size:10}),children:hr(pe)})]}),e.seq_num>0&&k.jsxs(un,{size:"xs",c:"dimmed",style:{marginTop:-2},children:["#",String(e.seq_num).padStart(5,"0")]})]}),e.stickers&&e.stickers.length>0&&k.jsx("div",{"data-sticker-overlay":!0,style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden",borderRadius:"inherit",zIndex:0},children:e.stickers.map((ne,Le)=>k.jsx("span",{onPointerDown:ue(Le),onContextMenu:ke(Le),title:V?"Arrastra para mover. Click derecho para borrar.":"",style:{position:"absolute",left:`${ne.x*100}%`,top:`${ne.y*100}%`,transform:"translate(-50%, -50%)",fontSize:48,lineHeight:1,opacity:1,userSelect:"none",cursor:V&&!E?"grab":"default",pointerEvents:V&&!E?"auto":"none",touchAction:"none"},children:ne.emoji},Le))})]})}const aW=O.memo(fCe);function cCe({column:e,cards:n,now:t,collapsed:i,onAddCard:r,onRenameColumn:a,onResizeColumn:o,onMoveColumnLocation:l,onDeleteColumn:f,onSetWIPLimit:c,onToggleDone:h,onEditCard:d,onDeleteCard:p,onChangeCardColor:v,onShowHistory:y,onToggleCardLock:b,onAssignCard:w,onSetCardDeadline:_,onSetRequester:S,requesterOptions:C,onOpenCustomCardColor:E,activeSticker:A,onAddSticker:T,onRemoveSticker:j,onMoveSticker:N,onCommitSticker:q,users:R,usersById:L,highlightCardId:B}){const[G,H]=O.useState(!1),[U,P]=O.useState(e.name),[z,F]=O.useState(null),[Y,D]=O.useState(!1),[V,W]=O.useState(e.wip_limit),[$,X]=O.useState(()=>i?localStorage.getItem(`kanban_col_body_${e.id}`)==="1":!1);O.useEffect(()=>{i&&localStorage.setItem(`kanban_col_body_${e.id}`,$?"1":"0")},[$,i,e.id]);const te=e.wip_limit,ae=te>0&&n.length>te;O.useEffect(()=>{F(null)},[e.width]);const{attributes:le,listeners:ye,setNodeRef:oe,transform:ue,transition:ke,isDragging:ie}=eF({id:`column-${e.id}`,data:{type:"column",columnId:e.id,location:e.location}}),Re=i?"100%":z??e.width,pe=i?{transform:io.Transform.toString(ue),transition:ke,opacity:ie?.4:1,width:"100%",display:"flex",flexDirection:"column",position:"relative",flex:$?"0 0 auto":"1 1 auto",minHeight:0}:{transform:io.Transform.toString(ue),transition:ke,opacity:ie?.4:1,width:Re,minWidth:Re,maxWidth:Re,display:"flex",flexDirection:"column",height:"100%",position:"relative"},Ce=n.map(Q=>Q.id),De=()=>{const Q=U.trim();Q&&Q!==e.name&&a(e.id,Q),H(!1)},be=O.useRef(null),_e=Q=>{Q.preventDefault(),Q.stopPropagation(),be.current={startX:Q.clientX,startWidth:e.width},document.body.style.cursor="col-resize",document.body.style.userSelect="none";const me=Xe=>{if(!be.current)return;const ne=Xe.clientX-be.current.startX,Le=Math.min(800,Math.max(200,be.current.startWidth+ne));F(Le)},xe=()=>{be.current&&Me.current!==null&&o(e.id,Me.current),be.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",me),window.removeEventListener("mouseup",xe)};window.addEventListener("mousemove",me),window.addEventListener("mouseup",xe)},Me=O.useRef(null);O.useEffect(()=>{Me.current=z},[z]);const Be=e.location==="sidebar",Ve=Be?"Restaurar al board":"Mover al sidebar",He=Be?Jae:noe,We=()=>{const Q=typeof V=="number"?V:parseInt(String(V),10),me=Number.isFinite(Q)&&Q>=0?Math.floor(Q):0;me!==e.wip_limit&&c(e.id,me),D(!1)},Ye=ae?"var(--mantine-color-red-9)":"var(--mantine-color-dark-7)",rn=ae?"var(--mantine-color-red-6)":void 0;return k.jsxs(ei,{ref:oe,style:{...pe,background:Ye,borderColor:rn,borderWidth:ae?2:1},withBorder:!0,radius:"md",p:"sm",children:[k.jsxs(wn,{justify:"space-between",mb:"xs",wrap:"nowrap",children:[k.jsxs(wn,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},children:[k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm",...le,...ye,style:{cursor:"grab"},"aria-label":"Drag column",children:k.jsx(PF,{size:14})}),G?k.jsx(il,{size:"xs",value:U,onChange:Q=>P(Q.currentTarget.value),autoFocus:!0,onBlur:De,onKeyDown:Q=>{Q.key==="Enter"&&De(),Q.key==="Escape"&&(P(e.name),H(!1))},style:{flex:1}}):k.jsx(un,{fw:600,size:"sm",truncate:!0,onDoubleClick:()=>{P(e.name),H(!0)},style:{flex:1,cursor:"text"},title:"Doble click para renombrar",children:e.name}),k.jsxs(Tn,{opened:Y,onChange:Q=>{D(Q),Q&&W(e.wip_limit)},position:"bottom",withArrow:!0,shadow:"md",children:[k.jsx(Tn.Target,{children:k.jsx(Vi,{label:te>0?`WIP ${n.length}/${te}${ae?" (excedido)":""}`:"Click para limitar WIP",withArrow:!0,children:k.jsx(ui,{size:"xs",variant:ae?"filled":"light",color:ae?"red":te>0?"yellow":"gray",leftSection:ae?k.jsx(Zae,{size:10}):null,style:{cursor:"pointer"},onClick:()=>D(Q=>!Q),children:te>0?`${n.length}/${te}`:n.length})})}),k.jsx(Tn.Dropdown,{p:"xs",children:k.jsxs($t,{gap:"xs",children:[k.jsx(un,{size:"xs",c:"dimmed",children:"Maximo de tarjetas (0 = sin limite)"}),k.jsx(Cy,{size:"xs",value:V,onChange:W,min:0,max:999,autoFocus:!0,onKeyDown:Q=>{Q.key==="Enter"&&We(),Q.key==="Escape"&&D(!1)}}),k.jsxs(wn,{justify:"flex-end",gap:4,children:[k.jsx(Bt,{size:"xs",variant:"subtle",onClick:()=>D(!1),children:"Cancelar"}),k.jsx(Bt,{size:"xs",onClick:We,children:"Guardar"})]})]})})]})]}),k.jsx(wn,{gap:2,wrap:"nowrap",children:G?k.jsxs(k.Fragment,{children:[k.jsx(Ht,{variant:"subtle",color:"green",size:"sm",onClick:De,"aria-label":"Save",children:k.jsx(MF,{size:14})}),k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm",onClick:()=>{P(e.name),H(!1)},"aria-label":"Cancel",children:k.jsx(rh,{size:14})})]}):k.jsxs(k.Fragment,{children:[i&&k.jsx(Vi,{label:$?"Expandir":"Colapsar",withArrow:!0,children:k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm",onClick:()=>X(Q=>!Q),"aria-label":$?"Expandir columna":"Colapsar columna",children:$?k.jsx(DF,{size:14}):k.jsx(jF,{size:14})})}),e.is_done&&k.jsx(Vi,{label:"Columna Done",withArrow:!0,children:k.jsx(ui,{size:"xs",color:"green",variant:"filled",leftSection:k.jsx($h,{size:10}),children:"done"})}),k.jsxs(Kn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[k.jsx(Kn.Target,{children:k.jsx(Ht,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones columna",children:k.jsx(RF,{size:14})})}),k.jsxs(Kn.Dropdown,{children:[k.jsx(Kn.Label,{children:"Columna"}),k.jsx(Kn.Item,{leftSection:k.jsx(Foe,{size:14}),onClick:()=>{P(e.name),H(!0)},children:"Renombrar"}),k.jsx(Kn.Item,{leftSection:k.jsx($h,{size:14}),color:e.is_done?"yellow":"green",onClick:()=>h(e.id,!e.is_done),children:e.is_done?"Quitar marca Done":"Marcar como Done"}),k.jsx(Kn.Item,{leftSection:k.jsx(He,{size:14}),onClick:()=>l(e.id,Be?"board":"sidebar"),children:Ve}),k.jsx(Kn.Divider,{}),k.jsx(Kn.Item,{leftSection:k.jsx(Lh,{size:14}),color:"red",onClick:()=>f(e.id),children:"Borrar columna"})]})]})]})})]}),!(i&&$)&&k.jsxs(k.Fragment,{children:[k.jsx(uo,{style:{flex:1},type:"auto",children:k.jsx(wS,{items:Ce,strategy:XB,children:k.jsx($t,{gap:"xs",pb:"xs",style:{minHeight:40},children:n.map(Q=>k.jsx(aW,{card:Q,now:t,onDelete:p,onEdit:d,onChangeColor:v,onShowHistory:y,onToggleLock:b,onAssign:w,onSetDeadline:_,onSetRequester:S,requesterOptions:C,onOpenCustomColor:E,users:R,assignee:Q.assignee_id?L.get(Q.assignee_id):void 0,inDoneColumn:e.is_done,highlight:B===Q.id,activeSticker:A,onAddSticker:T,onRemoveSticker:j,onMoveSticker:N,onCommitSticker:q},Q.id))})})}),k.jsx(Bt,{variant:"subtle",color:"gray",size:"xs",leftSection:k.jsx(zh,{size:14}),onClick:()=>r(e.id),mt:"xs",fullWidth:!0,children:"Anadir tarjeta"})]}),!Be&&k.jsx(we,{onMouseDown:_e,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:5},"aria-label":"Resize column"})]})}const b$=O.memo(cCe),dCe=JSON.parse('[{"id":"people","emojis":["grinning","smiley","smile","grin","laughing","sweat_smile","rolling_on_the_floor_laughing","joy","slightly_smiling_face","upside_down_face","melting_face","wink","blush","innocent","smiling_face_with_3_hearts","heart_eyes","star-struck","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","smiling_face_with_tear","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","zany_face","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","face_with_hand_over_mouth","face_with_open_eyes_and_hand_over_mouth","face_with_peeking_eye","shushing_face","thinking_face","saluting_face","zipper_mouth_face","face_with_raised_eyebrow","neutral_face","expressionless","no_mouth","dotted_line_face","face_in_clouds","smirk","unamused","face_with_rolling_eyes","grimacing","face_exhaling","lying_face","shaking_face","relieved","pensive","sleepy","drooling_face","sleeping","mask","face_with_thermometer","face_with_head_bandage","nauseated_face","face_vomiting","sneezing_face","hot_face","cold_face","woozy_face","dizzy_face","face_with_spiral_eyes","exploding_head","face_with_cowboy_hat","partying_face","disguised_face","sunglasses","nerd_face","face_with_monocle","confused","face_with_diagonal_mouth","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","pleading_face","face_holding_back_tears","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","yawning_face","triumph","rage","angry","face_with_symbols_on_mouth","smiling_imp","imp","skull","skull_and_crossbones","hankey","clown_face","japanese_ogre","japanese_goblin","ghost","alien","space_invader","wave","raised_back_of_hand","raised_hand_with_fingers_splayed","hand","spock-hand","rightwards_hand","leftwards_hand","palm_down_hand","palm_up_hand","leftwards_pushing_hand","rightwards_pushing_hand","ok_hand","pinched_fingers","pinching_hand","v","crossed_fingers","hand_with_index_finger_and_thumb_crossed","i_love_you_hand_sign","the_horns","call_me_hand","point_left","point_right","point_up_2","middle_finger","point_down","point_up","index_pointing_at_the_viewer","+1","-1","fist","facepunch","left-facing_fist","right-facing_fist","clap","raised_hands","heart_hands","open_hands","palms_up_together","handshake","pray","writing_hand","nail_care","selfie","muscle","mechanical_arm","mechanical_leg","leg","foot","ear","ear_with_hearing_aid","nose","brain","anatomical_heart","lungs","tooth","bone","eyes","eye","tongue","lips","biting_lip","baby","child","boy","girl","adult","person_with_blond_hair","man","bearded_person","man_with_beard","woman_with_beard","red_haired_man","curly_haired_man","white_haired_man","bald_man","woman","red_haired_woman","red_haired_person","curly_haired_woman","curly_haired_person","white_haired_woman","white_haired_person","bald_woman","bald_person","blond-haired-woman","blond-haired-man","older_adult","older_man","older_woman","person_frowning","man-frowning","woman-frowning","person_with_pouting_face","man-pouting","woman-pouting","no_good","man-gesturing-no","woman-gesturing-no","ok_woman","man-gesturing-ok","woman-gesturing-ok","information_desk_person","man-tipping-hand","woman-tipping-hand","raising_hand","man-raising-hand","woman-raising-hand","deaf_person","deaf_man","deaf_woman","bow","man-bowing","woman-bowing","face_palm","man-facepalming","woman-facepalming","shrug","man-shrugging","woman-shrugging","health_worker","male-doctor","female-doctor","student","male-student","female-student","teacher","male-teacher","female-teacher","judge","male-judge","female-judge","farmer","male-farmer","female-farmer","cook","male-cook","female-cook","mechanic","male-mechanic","female-mechanic","factory_worker","male-factory-worker","female-factory-worker","office_worker","male-office-worker","female-office-worker","scientist","male-scientist","female-scientist","technologist","male-technologist","female-technologist","singer","male-singer","female-singer","artist","male-artist","female-artist","pilot","male-pilot","female-pilot","astronaut","male-astronaut","female-astronaut","firefighter","male-firefighter","female-firefighter","cop","male-police-officer","female-police-officer","sleuth_or_spy","male-detective","female-detective","guardsman","male-guard","female-guard","ninja","construction_worker","male-construction-worker","female-construction-worker","person_with_crown","prince","princess","man_with_turban","man-wearing-turban","woman-wearing-turban","man_with_gua_pi_mao","person_with_headscarf","person_in_tuxedo","man_in_tuxedo","woman_in_tuxedo","bride_with_veil","man_with_veil","woman_with_veil","pregnant_woman","pregnant_man","pregnant_person","breast-feeding","woman_feeding_baby","man_feeding_baby","person_feeding_baby","angel","santa","mrs_claus","mx_claus","superhero","male_superhero","female_superhero","supervillain","male_supervillain","female_supervillain","mage","male_mage","female_mage","fairy","male_fairy","female_fairy","vampire","male_vampire","female_vampire","merperson","merman","mermaid","elf","male_elf","female_elf","genie","male_genie","female_genie","zombie","male_zombie","female_zombie","troll","massage","man-getting-massage","woman-getting-massage","haircut","man-getting-haircut","woman-getting-haircut","walking","man-walking","woman-walking","standing_person","man_standing","woman_standing","kneeling_person","man_kneeling","woman_kneeling","person_with_probing_cane","man_with_probing_cane","woman_with_probing_cane","person_in_motorized_wheelchair","man_in_motorized_wheelchair","woman_in_motorized_wheelchair","person_in_manual_wheelchair","man_in_manual_wheelchair","woman_in_manual_wheelchair","runner","man-running","woman-running","dancer","man_dancing","man_in_business_suit_levitating","dancers","men-with-bunny-ears-partying","women-with-bunny-ears-partying","person_in_steamy_room","man_in_steamy_room","woman_in_steamy_room","person_climbing","man_climbing","woman_climbing","fencer","horse_racing","skier","snowboarder","golfer","man-golfing","woman-golfing","surfer","man-surfing","woman-surfing","rowboat","man-rowing-boat","woman-rowing-boat","swimmer","man-swimming","woman-swimming","person_with_ball","man-bouncing-ball","woman-bouncing-ball","weight_lifter","man-lifting-weights","woman-lifting-weights","bicyclist","man-biking","woman-biking","mountain_bicyclist","man-mountain-biking","woman-mountain-biking","person_doing_cartwheel","man-cartwheeling","woman-cartwheeling","wrestlers","man-wrestling","woman-wrestling","water_polo","man-playing-water-polo","woman-playing-water-polo","handball","man-playing-handball","woman-playing-handball","juggling","man-juggling","woman-juggling","person_in_lotus_position","man_in_lotus_position","woman_in_lotus_position","bath","sleeping_accommodation","people_holding_hands","two_women_holding_hands","man_and_woman_holding_hands","two_men_holding_hands","couplekiss","woman-kiss-man","man-kiss-man","woman-kiss-woman","couple_with_heart","woman-heart-man","man-heart-man","woman-heart-woman","family","man-woman-boy","man-woman-girl","man-woman-girl-boy","man-woman-boy-boy","man-woman-girl-girl","man-man-boy","man-man-girl","man-man-girl-boy","man-man-boy-boy","man-man-girl-girl","woman-woman-boy","woman-woman-girl","woman-woman-girl-boy","woman-woman-boy-boy","woman-woman-girl-girl","man-boy","man-boy-boy","man-girl","man-girl-boy","man-girl-girl","woman-boy","woman-boy-boy","woman-girl","woman-girl-boy","woman-girl-girl","speaking_head_in_silhouette","bust_in_silhouette","busts_in_silhouette","people_hugging","footprints","robot_face","smiley_cat","smile_cat","joy_cat","heart_eyes_cat","smirk_cat","kissing_cat","scream_cat","crying_cat_face","pouting_cat","see_no_evil","hear_no_evil","speak_no_evil","love_letter","cupid","gift_heart","sparkling_heart","heartpulse","heartbeat","revolving_hearts","two_hearts","heart_decoration","heavy_heart_exclamation_mark_ornament","broken_heart","heart_on_fire","mending_heart","heart","pink_heart","orange_heart","yellow_heart","green_heart","blue_heart","light_blue_heart","purple_heart","brown_heart","black_heart","grey_heart","white_heart","kiss","100","anger","boom","dizzy","sweat_drops","dash","hole","speech_balloon","eye-in-speech-bubble","left_speech_bubble","right_anger_bubble","thought_balloon","zzz"]},{"id":"nature","emojis":["monkey_face","monkey","gorilla","orangutan","dog","dog2","guide_dog","service_dog","poodle","wolf","fox_face","raccoon","cat","cat2","black_cat","lion_face","tiger","tiger2","leopard","horse","moose","donkey","racehorse","unicorn_face","zebra_face","deer","bison","cow","ox","water_buffalo","cow2","pig","pig2","boar","pig_nose","ram","sheep","goat","dromedary_camel","camel","llama","giraffe_face","elephant","mammoth","rhinoceros","hippopotamus","mouse","mouse2","rat","hamster","rabbit","rabbit2","chipmunk","beaver","hedgehog","bat","bear","polar_bear","koala","panda_face","sloth","otter","skunk","kangaroo","badger","feet","turkey","chicken","rooster","hatching_chick","baby_chick","hatched_chick","bird","penguin","dove_of_peace","eagle","duck","swan","owl","dodo","feather","flamingo","peacock","parrot","wing","black_bird","goose","frog","crocodile","turtle","lizard","snake","dragon_face","dragon","sauropod","t-rex","whale","whale2","dolphin","seal","fish","tropical_fish","blowfish","shark","octopus","shell","coral","jellyfish","snail","butterfly","bug","ant","bee","beetle","ladybug","cricket","cockroach","spider","spider_web","scorpion","mosquito","fly","worm","microbe","bouquet","cherry_blossom","white_flower","lotus","rosette","rose","wilted_flower","hibiscus","sunflower","blossom","tulip","hyacinth","seedling","potted_plant","evergreen_tree","deciduous_tree","palm_tree","cactus","ear_of_rice","herb","shamrock","four_leaf_clover","maple_leaf","fallen_leaf","leaves","empty_nest","nest_with_eggs","mushroom"]},{"id":"foods","emojis":["grapes","melon","watermelon","tangerine","lemon","banana","pineapple","mango","apple","green_apple","pear","peach","cherries","strawberry","blueberries","kiwifruit","tomato","olive","coconut","avocado","eggplant","potato","carrot","corn","hot_pepper","bell_pepper","cucumber","leafy_green","broccoli","garlic","onion","peanuts","beans","chestnut","ginger_root","pea_pod","bread","croissant","baguette_bread","flatbread","pretzel","bagel","pancakes","waffle","cheese_wedge","meat_on_bone","poultry_leg","cut_of_meat","bacon","hamburger","fries","pizza","hotdog","sandwich","taco","burrito","tamale","stuffed_flatbread","falafel","egg","fried_egg","shallow_pan_of_food","stew","fondue","bowl_with_spoon","green_salad","popcorn","butter","salt","canned_food","bento","rice_cracker","rice_ball","rice","curry","ramen","spaghetti","sweet_potato","oden","sushi","fried_shrimp","fish_cake","moon_cake","dango","dumpling","fortune_cookie","takeout_box","crab","lobster","shrimp","squid","oyster","icecream","shaved_ice","ice_cream","doughnut","cookie","birthday","cake","cupcake","pie","chocolate_bar","candy","lollipop","custard","honey_pot","baby_bottle","glass_of_milk","coffee","teapot","tea","sake","champagne","wine_glass","cocktail","tropical_drink","beer","beers","clinking_glasses","tumbler_glass","pouring_liquid","cup_with_straw","bubble_tea","beverage_box","mate_drink","ice_cube","chopsticks","knife_fork_plate","fork_and_knife","spoon","hocho","jar","amphora"]},{"id":"activity","emojis":["jack_o_lantern","christmas_tree","fireworks","sparkler","firecracker","sparkles","balloon","tada","confetti_ball","tanabata_tree","bamboo","dolls","flags","wind_chime","rice_scene","red_envelope","ribbon","gift","reminder_ribbon","admission_tickets","ticket","medal","trophy","sports_medal","first_place_medal","second_place_medal","third_place_medal","soccer","baseball","softball","basketball","volleyball","football","rugby_football","tennis","flying_disc","bowling","cricket_bat_and_ball","field_hockey_stick_and_ball","ice_hockey_stick_and_puck","lacrosse","table_tennis_paddle_and_ball","badminton_racquet_and_shuttlecock","boxing_glove","martial_arts_uniform","goal_net","golf","ice_skate","fishing_pole_and_fish","diving_mask","running_shirt_with_sash","ski","sled","curling_stone","dart","yo-yo","kite","gun","8ball","crystal_ball","magic_wand","video_game","joystick","slot_machine","game_die","jigsaw","teddy_bear","pinata","mirror_ball","nesting_dolls","spades","hearts","diamonds","clubs","chess_pawn","black_joker","mahjong","flower_playing_cards","performing_arts","frame_with_picture","art","thread","sewing_needle","yarn","knot"]},{"id":"places","emojis":["earth_africa","earth_americas","earth_asia","globe_with_meridians","world_map","japan","compass","snow_capped_mountain","mountain","volcano","mount_fuji","camping","beach_with_umbrella","desert","desert_island","national_park","stadium","classical_building","building_construction","bricks","rock","wood","hut","house_buildings","derelict_house_building","house","house_with_garden","office","post_office","european_post_office","hospital","bank","hotel","love_hotel","convenience_store","school","department_store","factory","japanese_castle","european_castle","wedding","tokyo_tower","statue_of_liberty","church","mosque","hindu_temple","synagogue","shinto_shrine","kaaba","fountain","tent","foggy","night_with_stars","cityscape","sunrise_over_mountains","sunrise","city_sunset","city_sunrise","bridge_at_night","hotsprings","carousel_horse","playground_slide","ferris_wheel","roller_coaster","barber","circus_tent","steam_locomotive","railway_car","bullettrain_side","bullettrain_front","train2","metro","light_rail","station","tram","monorail","mountain_railway","train","bus","oncoming_bus","trolleybus","minibus","ambulance","fire_engine","police_car","oncoming_police_car","taxi","oncoming_taxi","car","oncoming_automobile","blue_car","pickup_truck","truck","articulated_lorry","tractor","racing_car","racing_motorcycle","motor_scooter","manual_wheelchair","motorized_wheelchair","auto_rickshaw","bike","scooter","skateboard","roller_skate","busstop","motorway","railway_track","oil_drum","fuelpump","wheel","rotating_light","traffic_light","vertical_traffic_light","octagonal_sign","construction","anchor","ring_buoy","boat","canoe","speedboat","passenger_ship","ferry","motor_boat","ship","airplane","small_airplane","airplane_departure","airplane_arriving","parachute","seat","helicopter","suspension_railway","mountain_cableway","aerial_tramway","satellite","rocket","flying_saucer","bellhop_bell","luggage","hourglass","hourglass_flowing_sand","watch","alarm_clock","stopwatch","timer_clock","mantelpiece_clock","clock12","clock1230","clock1","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","clock10","clock1030","clock11","clock1130","new_moon","waxing_crescent_moon","first_quarter_moon","moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","crescent_moon","new_moon_with_face","first_quarter_moon_with_face","last_quarter_moon_with_face","thermometer","sunny","full_moon_with_face","sun_with_face","ringed_planet","star","star2","stars","milky_way","cloud","partly_sunny","thunder_cloud_and_rain","mostly_sunny","barely_sunny","partly_sunny_rain","rain_cloud","snow_cloud","lightning","tornado","fog","wind_blowing_face","cyclone","rainbow","closed_umbrella","umbrella","umbrella_with_rain_drops","umbrella_on_ground","zap","snowflake","snowman","snowman_without_snow","comet","fire","droplet","ocean"]},{"id":"objects","emojis":["eyeglasses","dark_sunglasses","goggles","lab_coat","safety_vest","necktie","shirt","jeans","scarf","gloves","coat","socks","dress","kimono","sari","one-piece_swimsuit","briefs","shorts","bikini","womans_clothes","folding_hand_fan","purse","handbag","pouch","shopping_bags","school_satchel","thong_sandal","mans_shoe","athletic_shoe","hiking_boot","womans_flat_shoe","high_heel","sandal","ballet_shoes","boot","hair_pick","crown","womans_hat","tophat","mortar_board","billed_cap","military_helmet","helmet_with_white_cross","prayer_beads","lipstick","ring","gem","mute","speaker","sound","loud_sound","loudspeaker","mega","postal_horn","bell","no_bell","musical_score","musical_note","notes","studio_microphone","level_slider","control_knobs","microphone","headphones","radio","saxophone","accordion","guitar","musical_keyboard","trumpet","violin","banjo","drum_with_drumsticks","long_drum","maracas","flute","iphone","calling","phone","telephone_receiver","pager","fax","battery","low_battery","electric_plug","computer","desktop_computer","printer","keyboard","three_button_mouse","trackball","minidisc","floppy_disk","cd","dvd","abacus","movie_camera","film_frames","film_projector","clapper","tv","camera","camera_with_flash","video_camera","vhs","mag","mag_right","candle","bulb","flashlight","izakaya_lantern","diya_lamp","notebook_with_decorative_cover","closed_book","book","green_book","blue_book","orange_book","books","notebook","ledger","page_with_curl","scroll","page_facing_up","newspaper","rolled_up_newspaper","bookmark_tabs","bookmark","label","moneybag","coin","yen","dollar","euro","pound","money_with_wings","credit_card","receipt","chart","email","e-mail","incoming_envelope","envelope_with_arrow","outbox_tray","inbox_tray","package","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","postbox","ballot_box_with_ballot","pencil2","black_nib","lower_left_fountain_pen","lower_left_ballpoint_pen","lower_left_paintbrush","lower_left_crayon","memo","briefcase","file_folder","open_file_folder","card_index_dividers","date","calendar","spiral_note_pad","spiral_calendar_pad","card_index","chart_with_upwards_trend","chart_with_downwards_trend","bar_chart","clipboard","pushpin","round_pushpin","paperclip","linked_paperclips","straight_ruler","triangular_ruler","scissors","card_file_box","file_cabinet","wastebasket","lock","unlock","lock_with_ink_pen","closed_lock_with_key","key","old_key","hammer","axe","pick","hammer_and_pick","hammer_and_wrench","dagger_knife","crossed_swords","bomb","boomerang","bow_and_arrow","shield","carpentry_saw","wrench","screwdriver","nut_and_bolt","gear","compression","scales","probing_cane","link","chains","hook","toolbox","magnet","ladder","alembic","test_tube","petri_dish","dna","microscope","telescope","satellite_antenna","syringe","drop_of_blood","pill","adhesive_bandage","crutch","stethoscope","x-ray","door","elevator","mirror","window","bed","couch_and_lamp","chair","toilet","plunger","shower","bathtub","mouse_trap","razor","lotion_bottle","safety_pin","broom","basket","roll_of_paper","bucket","soap","bubbles","toothbrush","sponge","fire_extinguisher","shopping_trolley","smoking","coffin","headstone","funeral_urn","nazar_amulet","hamsa","moyai","placard","identification_card"]},{"id":"symbols","emojis":["atm","put_litter_in_its_place","potable_water","wheelchair","mens","womens","restroom","baby_symbol","wc","passport_control","customs","baggage_claim","left_luggage","warning","children_crossing","no_entry","no_entry_sign","no_bicycles","no_smoking","do_not_litter","non-potable_water","no_pedestrians","no_mobile_phones","underage","radioactive_sign","biohazard_sign","arrow_up","arrow_upper_right","arrow_right","arrow_lower_right","arrow_down","arrow_lower_left","arrow_left","arrow_upper_left","arrow_up_down","left_right_arrow","leftwards_arrow_with_hook","arrow_right_hook","arrow_heading_up","arrow_heading_down","arrows_clockwise","arrows_counterclockwise","back","end","on","soon","top","place_of_worship","atom_symbol","om_symbol","star_of_david","wheel_of_dharma","yin_yang","latin_cross","orthodox_cross","star_and_crescent","peace_symbol","menorah_with_nine_branches","six_pointed_star","khanda","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","twisted_rightwards_arrows","repeat","repeat_one","arrow_forward","fast_forward","black_right_pointing_double_triangle_with_vertical_bar","black_right_pointing_triangle_with_double_vertical_bar","arrow_backward","rewind","black_left_pointing_double_triangle_with_vertical_bar","arrow_up_small","arrow_double_up","arrow_down_small","arrow_double_down","double_vertical_bar","black_square_for_stop","black_circle_for_record","eject","cinema","low_brightness","high_brightness","signal_strength","wireless","vibration_mode","mobile_phone_off","female_sign","male_sign","transgender_symbol","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","heavy_equals_sign","infinity","bangbang","interrobang","question","grey_question","grey_exclamation","exclamation","wavy_dash","currency_exchange","heavy_dollar_sign","medical_symbol","recycle","fleur_de_lis","trident","name_badge","beginner","o","white_check_mark","ballot_box_with_check","heavy_check_mark","x","negative_squared_cross_mark","curly_loop","loop","part_alternation_mark","eight_spoked_asterisk","eight_pointed_black_star","sparkle","copyright","registered","tm","hash","keycap_star","zero","one","two","three","four","five","six","seven","eight","nine","keycap_ten","capital_abcd","abcd","1234","symbols","abc","a","ab","b","cl","cool","free","information_source","id","m","new","ng","o2","ok","parking","sos","up","vs","koko","sa","u6708","u6709","u6307","ideograph_advantage","u5272","u7121","u7981","accept","u7533","u5408","u7a7a","congratulations","secret","u55b6","u6e80","red_circle","large_orange_circle","large_yellow_circle","large_green_circle","large_blue_circle","large_purple_circle","large_brown_circle","black_circle","white_circle","large_red_square","large_orange_square","large_yellow_square","large_green_square","large_blue_square","large_purple_square","large_brown_square","black_large_square","white_large_square","black_medium_square","white_medium_square","black_medium_small_square","white_medium_small_square","black_small_square","white_small_square","large_orange_diamond","large_blue_diamond","small_orange_diamond","small_blue_diamond","small_red_triangle","small_red_triangle_down","diamond_shape_with_a_dot_inside","radio_button","white_square_button","black_square_button"]},{"id":"flags","emojis":["checkered_flag","cn","crossed_flags","de","es","flag-ac","flag-ad","flag-ae","flag-af","flag-ag","flag-ai","flag-al","flag-am","flag-ao","flag-aq","flag-ar","flag-as","flag-at","flag-au","flag-aw","flag-ax","flag-az","flag-ba","flag-bb","flag-bd","flag-be","flag-bf","flag-bg","flag-bh","flag-bi","flag-bj","flag-bl","flag-bm","flag-bn","flag-bo","flag-bq","flag-br","flag-bs","flag-bt","flag-bv","flag-bw","flag-by","flag-bz","flag-ca","flag-cc","flag-cd","flag-cf","flag-cg","flag-ch","flag-ci","flag-ck","flag-cl","flag-cm","flag-co","flag-cp","flag-cr","flag-cu","flag-cv","flag-cw","flag-cx","flag-cy","flag-cz","flag-dg","flag-dj","flag-dk","flag-dm","flag-do","flag-dz","flag-ea","flag-ec","flag-ee","flag-eg","flag-eh","flag-england","flag-er","flag-et","flag-eu","flag-fi","flag-fj","flag-fk","flag-fm","flag-fo","flag-ga","flag-gd","flag-ge","flag-gf","flag-gg","flag-gh","flag-gi","flag-gl","flag-gm","flag-gn","flag-gp","flag-gq","flag-gr","flag-gs","flag-gt","flag-gu","flag-gw","flag-gy","flag-hk","flag-hm","flag-hn","flag-hr","flag-ht","flag-hu","flag-ic","flag-id","flag-ie","flag-il","flag-im","flag-in","flag-io","flag-iq","flag-ir","flag-is","flag-je","flag-jm","flag-jo","flag-ke","flag-kg","flag-kh","flag-ki","flag-km","flag-kn","flag-kp","flag-kw","flag-ky","flag-kz","flag-la","flag-lb","flag-lc","flag-li","flag-lk","flag-lr","flag-ls","flag-lt","flag-lu","flag-lv","flag-ly","flag-ma","flag-mc","flag-md","flag-me","flag-mf","flag-mg","flag-mh","flag-mk","flag-ml","flag-mm","flag-mn","flag-mo","flag-mp","flag-mq","flag-mr","flag-ms","flag-mt","flag-mu","flag-mv","flag-mw","flag-mx","flag-my","flag-mz","flag-na","flag-nc","flag-ne","flag-nf","flag-ng","flag-ni","flag-nl","flag-no","flag-np","flag-nr","flag-nu","flag-nz","flag-om","flag-pa","flag-pe","flag-pf","flag-pg","flag-ph","flag-pk","flag-pl","flag-pm","flag-pn","flag-pr","flag-ps","flag-pt","flag-pw","flag-py","flag-qa","flag-re","flag-ro","flag-rs","flag-rw","flag-sa","flag-sb","flag-sc","flag-scotland","flag-sd","flag-se","flag-sg","flag-sh","flag-si","flag-sj","flag-sk","flag-sl","flag-sm","flag-sn","flag-so","flag-sr","flag-ss","flag-st","flag-sv","flag-sx","flag-sy","flag-sz","flag-ta","flag-tc","flag-td","flag-tf","flag-tg","flag-th","flag-tj","flag-tk","flag-tl","flag-tm","flag-tn","flag-to","flag-tr","flag-tt","flag-tv","flag-tw","flag-tz","flag-ua","flag-ug","flag-um","flag-un","flag-uy","flag-uz","flag-va","flag-vc","flag-ve","flag-vg","flag-vi","flag-vn","flag-vu","flag-wales","flag-wf","flag-ws","flag-xk","flag-ye","flag-yt","flag-za","flag-zm","flag-zw","fr","gb","it","jp","kr","pirate_flag","rainbow-flag","ru","transgender_flag","triangular_flag_on_post","us","waving_black_flag","waving_white_flag"]}]'),hCe=JSON.parse(`{"100":{"id":"100","name":"Hundred Points","keywords":["100","score","perfect","numbers","century","exam","quiz","test","pass"],"skins":[{"unified":"1f4af","native":"💯"}],"version":1},"1234":{"id":"1234","name":"Input Numbers","keywords":["1234","blue","square","1","2","3","4"],"skins":[{"unified":"1f522","native":"🔢"}],"version":1},"grinning":{"id":"grinning","name":"Grinning Face","emoticons":[":D"],"keywords":["smile","happy","joy",":D","grin"],"skins":[{"unified":"1f600","native":"😀"}],"version":1},"smiley":{"id":"smiley","name":"Grinning Face with Big Eyes","emoticons":[":)","=)","=-)"],"keywords":["smiley","happy","joy","haha",":D",":)","smile","funny"],"skins":[{"unified":"1f603","native":"😃"}],"version":1},"smile":{"id":"smile","name":"Grinning Face with Smiling Eyes","emoticons":[":)","C:","c:",":D",":-D"],"keywords":["smile","happy","joy","funny","haha","laugh","like",":D",":)"],"skins":[{"unified":"1f604","native":"😄"}],"version":1},"grin":{"id":"grin","name":"Beaming Face with Smiling Eyes","keywords":["grin","happy","smile","joy","kawaii"],"skins":[{"unified":"1f601","native":"😁"}],"version":1},"laughing":{"id":"laughing","name":"Grinning Squinting Face","emoticons":[":>",":->"],"keywords":["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],"skins":[{"unified":"1f606","native":"😆"}],"version":1},"sweat_smile":{"id":"sweat_smile","name":"Grinning Face with Sweat","keywords":["smile","hot","happy","laugh","relief"],"skins":[{"unified":"1f605","native":"😅"}],"version":1},"rolling_on_the_floor_laughing":{"id":"rolling_on_the_floor_laughing","name":"Rolling on the Floor Laughing","keywords":["face","lol","haha","rofl"],"skins":[{"unified":"1f923","native":"🤣"}],"version":3},"joy":{"id":"joy","name":"Face with Tears of Joy","keywords":["cry","weep","happy","happytears","haha"],"skins":[{"unified":"1f602","native":"😂"}],"version":1},"slightly_smiling_face":{"id":"slightly_smiling_face","name":"Slightly Smiling Face","emoticons":[":)","(:",":-)"],"keywords":["smile"],"skins":[{"unified":"1f642","native":"🙂"}],"version":1},"upside_down_face":{"id":"upside_down_face","name":"Upside-Down Face","keywords":["upside","down","flipped","silly","smile"],"skins":[{"unified":"1f643","native":"🙃"}],"version":1},"melting_face":{"id":"melting_face","name":"Melting Face","keywords":["hot","heat"],"skins":[{"unified":"1fae0","native":"🫠"}],"version":14},"wink":{"id":"wink","name":"Winking Face","emoticons":[";)",";-)"],"keywords":["wink","happy","mischievous","secret",";)","smile","eye"],"skins":[{"unified":"1f609","native":"😉"}],"version":1},"blush":{"id":"blush","name":"Smiling Face with Smiling Eyes","emoticons":[":)"],"keywords":["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],"skins":[{"unified":"1f60a","native":"😊"}],"version":1},"innocent":{"id":"innocent","name":"Smiling Face with Halo","keywords":["innocent","angel","heaven"],"skins":[{"unified":"1f607","native":"😇"}],"version":1},"smiling_face_with_3_hearts":{"id":"smiling_face_with_3_hearts","name":"Smiling Face with Hearts","keywords":["3","love","like","affection","valentines","infatuation","crush","adore"],"skins":[{"unified":"1f970","native":"🥰"}],"version":11},"heart_eyes":{"id":"heart_eyes","name":"Smiling Face with Heart-Eyes","keywords":["heart","eyes","love","like","affection","valentines","infatuation","crush"],"skins":[{"unified":"1f60d","native":"😍"}],"version":1},"star-struck":{"id":"star-struck","name":"Star-Struck","keywords":["star","struck","grinning","face","with","eyes","smile","starry"],"skins":[{"unified":"1f929","native":"🤩"}],"version":5},"kissing_heart":{"id":"kissing_heart","name":"Face Blowing a Kiss","emoticons":[":*",":-*"],"keywords":["kissing","heart","love","like","affection","valentines","infatuation"],"skins":[{"unified":"1f618","native":"😘"}],"version":1},"kissing":{"id":"kissing","name":"Kissing Face","keywords":["love","like","3","valentines","infatuation","kiss"],"skins":[{"unified":"1f617","native":"😗"}],"version":1},"relaxed":{"id":"relaxed","name":"Smiling Face","keywords":["relaxed","blush","massage","happiness"],"skins":[{"unified":"263a-fe0f","native":"☺️"}],"version":1},"kissing_closed_eyes":{"id":"kissing_closed_eyes","name":"Kissing Face with Closed Eyes","keywords":["love","like","affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f61a","native":"😚"}],"version":1},"kissing_smiling_eyes":{"id":"kissing_smiling_eyes","name":"Kissing Face with Smiling Eyes","keywords":["affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f619","native":"😙"}],"version":1},"smiling_face_with_tear":{"id":"smiling_face_with_tear","name":"Smiling Face with Tear","keywords":["sad","cry","pretend"],"skins":[{"unified":"1f972","native":"🥲"}],"version":13},"yum":{"id":"yum","name":"Face Savoring Food","keywords":["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],"skins":[{"unified":"1f60b","native":"😋"}],"version":1},"stuck_out_tongue":{"id":"stuck_out_tongue","name":"Face with Tongue","emoticons":[":p",":-p",":P",":-P",":b",":-b"],"keywords":["stuck","out","prank","childish","playful","mischievous","smile"],"skins":[{"unified":"1f61b","native":"😛"}],"version":1},"stuck_out_tongue_winking_eye":{"id":"stuck_out_tongue_winking_eye","name":"Winking Face with Tongue","emoticons":[";p",";-p",";b",";-b",";P",";-P"],"keywords":["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],"skins":[{"unified":"1f61c","native":"😜"}],"version":1},"zany_face":{"id":"zany_face","name":"Zany Face","keywords":["grinning","with","one","large","and","small","eye","goofy","crazy"],"skins":[{"unified":"1f92a","native":"🤪"}],"version":5},"stuck_out_tongue_closed_eyes":{"id":"stuck_out_tongue_closed_eyes","name":"Squinting Face with Tongue","keywords":["stuck","out","closed","eyes","prank","playful","mischievous","smile"],"skins":[{"unified":"1f61d","native":"😝"}],"version":1},"money_mouth_face":{"id":"money_mouth_face","name":"Money-Mouth Face","keywords":["money","mouth","rich","dollar"],"skins":[{"unified":"1f911","native":"🤑"}],"version":1},"hugging_face":{"id":"hugging_face","name":"Hugging Face","keywords":["smile","hug"],"skins":[{"unified":"1f917","native":"🤗"}],"version":1},"face_with_hand_over_mouth":{"id":"face_with_hand_over_mouth","name":"Face with Hand over Mouth","keywords":["smiling","eyes","and","covering","whoops","shock","surprise"],"skins":[{"unified":"1f92d","native":"🤭"}],"version":5},"face_with_open_eyes_and_hand_over_mouth":{"id":"face_with_open_eyes_and_hand_over_mouth","name":"Face with Open Eyes and Hand over Mouth","keywords":["silence","secret","shock","surprise"],"skins":[{"unified":"1fae2","native":"🫢"}],"version":14},"face_with_peeking_eye":{"id":"face_with_peeking_eye","name":"Face with Peeking Eye","keywords":["scared","frightening","embarrassing","shy"],"skins":[{"unified":"1fae3","native":"🫣"}],"version":14},"shushing_face":{"id":"shushing_face","name":"Shushing Face","keywords":["with","finger","covering","closed","lips","quiet","shhh"],"skins":[{"unified":"1f92b","native":"🤫"}],"version":5},"thinking_face":{"id":"thinking_face","name":"Thinking Face","keywords":["hmmm","think","consider"],"skins":[{"unified":"1f914","native":"🤔"}],"version":1},"saluting_face":{"id":"saluting_face","name":"Saluting Face","keywords":["respect","salute"],"skins":[{"unified":"1fae1","native":"🫡"}],"version":14},"zipper_mouth_face":{"id":"zipper_mouth_face","name":"Zipper-Mouth Face","keywords":["zipper","mouth","sealed","secret"],"skins":[{"unified":"1f910","native":"🤐"}],"version":1},"face_with_raised_eyebrow":{"id":"face_with_raised_eyebrow","name":"Face with Raised Eyebrow","keywords":["one","distrust","scepticism","disapproval","disbelief","surprise"],"skins":[{"unified":"1f928","native":"🤨"}],"version":5},"neutral_face":{"id":"neutral_face","name":"Neutral Face","emoticons":[":|",":-|"],"keywords":["indifference","meh",":",""],"skins":[{"unified":"1f610","native":"😐"}],"version":1},"expressionless":{"id":"expressionless","name":"Expressionless Face","emoticons":["-_-"],"keywords":["indifferent","-","","meh","deadpan"],"skins":[{"unified":"1f611","native":"😑"}],"version":1},"no_mouth":{"id":"no_mouth","name":"Face Without Mouth","keywords":["no","hellokitty"],"skins":[{"unified":"1f636","native":"😶"}],"version":1},"dotted_line_face":{"id":"dotted_line_face","name":"Dotted Line Face","keywords":["invisible","lonely","isolation","depression"],"skins":[{"unified":"1fae5","native":"🫥"}],"version":14},"face_in_clouds":{"id":"face_in_clouds","name":"Face in Clouds","keywords":["shower","steam","dream"],"skins":[{"unified":"1f636-200d-1f32b-fe0f","native":"😶‍🌫️"}],"version":13.1},"smirk":{"id":"smirk","name":"Smirking Face","keywords":["smirk","smile","mean","prank","smug","sarcasm"],"skins":[{"unified":"1f60f","native":"😏"}],"version":1},"unamused":{"id":"unamused","name":"Unamused Face","emoticons":[":("],"keywords":["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],"skins":[{"unified":"1f612","native":"😒"}],"version":1},"face_with_rolling_eyes":{"id":"face_with_rolling_eyes","name":"Face with Rolling Eyes","keywords":["eyeroll","frustrated"],"skins":[{"unified":"1f644","native":"🙄"}],"version":1},"grimacing":{"id":"grimacing","name":"Grimacing Face","keywords":["grimace","teeth"],"skins":[{"unified":"1f62c","native":"😬"}],"version":1},"face_exhaling":{"id":"face_exhaling","name":"Face Exhaling","keywords":["relieve","relief","tired","sigh"],"skins":[{"unified":"1f62e-200d-1f4a8","native":"😮‍💨"}],"version":13.1},"lying_face":{"id":"lying_face","name":"Lying Face","keywords":["lie","pinocchio"],"skins":[{"unified":"1f925","native":"🤥"}],"version":3},"shaking_face":{"id":"shaking_face","name":"Shaking Face","keywords":["dizzy","shock","blurry","earthquake"],"skins":[{"unified":"1fae8","native":"🫨"}],"version":15},"relieved":{"id":"relieved","name":"Relieved Face","keywords":["relaxed","phew","massage","happiness"],"skins":[{"unified":"1f60c","native":"😌"}],"version":1},"pensive":{"id":"pensive","name":"Pensive Face","keywords":["sad","depressed","upset"],"skins":[{"unified":"1f614","native":"😔"}],"version":1},"sleepy":{"id":"sleepy","name":"Sleepy Face","keywords":["tired","rest","nap"],"skins":[{"unified":"1f62a","native":"😪"}],"version":1},"drooling_face":{"id":"drooling_face","name":"Drooling Face","keywords":[],"skins":[{"unified":"1f924","native":"🤤"}],"version":3},"sleeping":{"id":"sleeping","name":"Sleeping Face","keywords":["tired","sleepy","night","zzz"],"skins":[{"unified":"1f634","native":"😴"}],"version":1},"mask":{"id":"mask","name":"Face with Medical Mask","keywords":["sick","ill","disease","covid"],"skins":[{"unified":"1f637","native":"😷"}],"version":1},"face_with_thermometer":{"id":"face_with_thermometer","name":"Face with Thermometer","keywords":["sick","temperature","cold","fever","covid"],"skins":[{"unified":"1f912","native":"🤒"}],"version":1},"face_with_head_bandage":{"id":"face_with_head_bandage","name":"Face with Head-Bandage","keywords":["head","bandage","injured","clumsy","hurt"],"skins":[{"unified":"1f915","native":"🤕"}],"version":1},"nauseated_face":{"id":"nauseated_face","name":"Nauseated Face","keywords":["vomit","gross","green","sick","throw","up","ill"],"skins":[{"unified":"1f922","native":"🤢"}],"version":3},"face_vomiting":{"id":"face_vomiting","name":"Face Vomiting","keywords":["with","open","mouth","sick"],"skins":[{"unified":"1f92e","native":"🤮"}],"version":5},"sneezing_face":{"id":"sneezing_face","name":"Sneezing Face","keywords":["gesundheit","sneeze","sick","allergy"],"skins":[{"unified":"1f927","native":"🤧"}],"version":3},"hot_face":{"id":"hot_face","name":"Hot Face","keywords":["feverish","heat","red","sweating"],"skins":[{"unified":"1f975","native":"🥵"}],"version":11},"cold_face":{"id":"cold_face","name":"Cold Face","keywords":["blue","freezing","frozen","frostbite","icicles"],"skins":[{"unified":"1f976","native":"🥶"}],"version":11},"woozy_face":{"id":"woozy_face","name":"Woozy Face","keywords":["dizzy","intoxicated","tipsy","wavy"],"skins":[{"unified":"1f974","native":"🥴"}],"version":11},"dizzy_face":{"id":"dizzy_face","name":"Dizzy Face","keywords":["spent","unconscious","xox"],"skins":[{"unified":"1f635","native":"😵"}],"version":1},"face_with_spiral_eyes":{"id":"face_with_spiral_eyes","name":"Face with Spiral Eyes","keywords":["sick","ill","confused","nauseous","nausea"],"skins":[{"unified":"1f635-200d-1f4ab","native":"😵‍💫"}],"version":13.1},"exploding_head":{"id":"exploding_head","name":"Exploding Head","keywords":["shocked","face","with","mind","blown"],"skins":[{"unified":"1f92f","native":"🤯"}],"version":5},"face_with_cowboy_hat":{"id":"face_with_cowboy_hat","name":"Cowboy Hat Face","keywords":["with","cowgirl"],"skins":[{"unified":"1f920","native":"🤠"}],"version":3},"partying_face":{"id":"partying_face","name":"Partying Face","keywords":["celebration","woohoo"],"skins":[{"unified":"1f973","native":"🥳"}],"version":11},"disguised_face":{"id":"disguised_face","name":"Disguised Face","keywords":["pretent","brows","glasses","moustache"],"skins":[{"unified":"1f978","native":"🥸"}],"version":13},"sunglasses":{"id":"sunglasses","name":"Smiling Face with Sunglasses","emoticons":["8)"],"keywords":["cool","smile","summer","beach","sunglass"],"skins":[{"unified":"1f60e","native":"😎"}],"version":1},"nerd_face":{"id":"nerd_face","name":"Nerd Face","keywords":["nerdy","geek","dork"],"skins":[{"unified":"1f913","native":"🤓"}],"version":1},"face_with_monocle":{"id":"face_with_monocle","name":"Face with Monocle","keywords":["stuffy","wealthy"],"skins":[{"unified":"1f9d0","native":"🧐"}],"version":5},"confused":{"id":"confused","name":"Confused Face","emoticons":[":\\\\",":-\\\\",":/",":-/"],"keywords":["indifference","huh","weird","hmmm",":/"],"skins":[{"unified":"1f615","native":"😕"}],"version":1},"face_with_diagonal_mouth":{"id":"face_with_diagonal_mouth","name":"Face with Diagonal Mouth","keywords":["skeptic","confuse","frustrated","indifferent"],"skins":[{"unified":"1fae4","native":"🫤"}],"version":14},"worried":{"id":"worried","name":"Worried Face","keywords":["concern","nervous",":("],"skins":[{"unified":"1f61f","native":"😟"}],"version":1},"slightly_frowning_face":{"id":"slightly_frowning_face","name":"Slightly Frowning Face","keywords":["disappointed","sad","upset"],"skins":[{"unified":"1f641","native":"🙁"}],"version":1},"white_frowning_face":{"id":"white_frowning_face","name":"Frowning Face","keywords":["white","sad","upset","frown"],"skins":[{"unified":"2639-fe0f","native":"☹️"}],"version":1},"open_mouth":{"id":"open_mouth","name":"Face with Open Mouth","emoticons":[":o",":-o",":O",":-O"],"keywords":["surprise","impressed","wow","whoa",":O"],"skins":[{"unified":"1f62e","native":"😮"}],"version":1},"hushed":{"id":"hushed","name":"Hushed Face","keywords":["woo","shh"],"skins":[{"unified":"1f62f","native":"😯"}],"version":1},"astonished":{"id":"astonished","name":"Astonished Face","keywords":["xox","surprised","poisoned"],"skins":[{"unified":"1f632","native":"😲"}],"version":1},"flushed":{"id":"flushed","name":"Flushed Face","keywords":["blush","shy","flattered"],"skins":[{"unified":"1f633","native":"😳"}],"version":1},"pleading_face":{"id":"pleading_face","name":"Pleading Face","keywords":["begging","mercy","cry","tears","sad","grievance"],"skins":[{"unified":"1f97a","native":"🥺"}],"version":11},"face_holding_back_tears":{"id":"face_holding_back_tears","name":"Face Holding Back Tears","keywords":["touched","gratitude","cry"],"skins":[{"unified":"1f979","native":"🥹"}],"version":14},"frowning":{"id":"frowning","name":"Frowning Face with Open Mouth","keywords":["aw","what"],"skins":[{"unified":"1f626","native":"😦"}],"version":1},"anguished":{"id":"anguished","name":"Anguished Face","emoticons":["D:"],"keywords":["stunned","nervous"],"skins":[{"unified":"1f627","native":"😧"}],"version":1},"fearful":{"id":"fearful","name":"Fearful Face","keywords":["scared","terrified","nervous"],"skins":[{"unified":"1f628","native":"😨"}],"version":1},"cold_sweat":{"id":"cold_sweat","name":"Anxious Face with Sweat","keywords":["cold","nervous"],"skins":[{"unified":"1f630","native":"😰"}],"version":1},"disappointed_relieved":{"id":"disappointed_relieved","name":"Sad but Relieved Face","keywords":["disappointed","phew","sweat","nervous"],"skins":[{"unified":"1f625","native":"😥"}],"version":1},"cry":{"id":"cry","name":"Crying Face","emoticons":[":'("],"keywords":["cry","tears","sad","depressed","upset",":'("],"skins":[{"unified":"1f622","native":"😢"}],"version":1},"sob":{"id":"sob","name":"Loudly Crying Face","emoticons":[":'("],"keywords":["sob","cry","tears","sad","upset","depressed"],"skins":[{"unified":"1f62d","native":"😭"}],"version":1},"scream":{"id":"scream","name":"Face Screaming in Fear","keywords":["scream","munch","scared","omg"],"skins":[{"unified":"1f631","native":"😱"}],"version":1},"confounded":{"id":"confounded","name":"Confounded Face","keywords":["confused","sick","unwell","oops",":S"],"skins":[{"unified":"1f616","native":"😖"}],"version":1},"persevere":{"id":"persevere","name":"Persevering Face","keywords":["persevere","sick","no","upset","oops"],"skins":[{"unified":"1f623","native":"😣"}],"version":1},"disappointed":{"id":"disappointed","name":"Disappointed Face","emoticons":["):",":(",":-("],"keywords":["sad","upset","depressed",":("],"skins":[{"unified":"1f61e","native":"😞"}],"version":1},"sweat":{"id":"sweat","name":"Face with Cold Sweat","keywords":["downcast","hot","sad","tired","exercise"],"skins":[{"unified":"1f613","native":"😓"}],"version":1},"weary":{"id":"weary","name":"Weary Face","keywords":["tired","sleepy","sad","frustrated","upset"],"skins":[{"unified":"1f629","native":"😩"}],"version":1},"tired_face":{"id":"tired_face","name":"Tired Face","keywords":["sick","whine","upset","frustrated"],"skins":[{"unified":"1f62b","native":"😫"}],"version":1},"yawning_face":{"id":"yawning_face","name":"Yawning Face","keywords":["tired","sleepy"],"skins":[{"unified":"1f971","native":"🥱"}],"version":12},"triumph":{"id":"triumph","name":"Face with Look of Triumph","keywords":["steam","from","nose","gas","phew","proud","pride"],"skins":[{"unified":"1f624","native":"😤"}],"version":1},"rage":{"id":"rage","name":"Pouting Face","keywords":["rage","angry","mad","hate","despise"],"skins":[{"unified":"1f621","native":"😡"}],"version":1},"angry":{"id":"angry","name":"Angry Face","emoticons":[">:(",">:-("],"keywords":["mad","annoyed","frustrated"],"skins":[{"unified":"1f620","native":"😠"}],"version":1},"face_with_symbols_on_mouth":{"id":"face_with_symbols_on_mouth","name":"Face with Symbols on Mouth","keywords":["serious","covering","swearing","cursing","cussing","profanity","expletive"],"skins":[{"unified":"1f92c","native":"🤬"}],"version":5},"smiling_imp":{"id":"smiling_imp","name":"Smiling Face with Horns","keywords":["imp","devil"],"skins":[{"unified":"1f608","native":"😈"}],"version":1},"imp":{"id":"imp","name":"Imp","keywords":["angry","face","with","horns","devil"],"skins":[{"unified":"1f47f","native":"👿"}],"version":1},"skull":{"id":"skull","name":"Skull","keywords":["dead","skeleton","creepy","death"],"skins":[{"unified":"1f480","native":"💀"}],"version":1},"skull_and_crossbones":{"id":"skull_and_crossbones","name":"Skull and Crossbones","keywords":["poison","danger","deadly","scary","death","pirate","evil"],"skins":[{"unified":"2620-fe0f","native":"☠️"}],"version":1},"hankey":{"id":"hankey","name":"Pile of Poo","keywords":["hankey","poop","shit","shitface","fail","turd"],"skins":[{"unified":"1f4a9","native":"💩"}],"version":1},"clown_face":{"id":"clown_face","name":"Clown Face","keywords":[],"skins":[{"unified":"1f921","native":"🤡"}],"version":3},"japanese_ogre":{"id":"japanese_ogre","name":"Ogre","keywords":["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],"skins":[{"unified":"1f479","native":"👹"}],"version":1},"japanese_goblin":{"id":"japanese_goblin","name":"Goblin","keywords":["japanese","red","evil","mask","monster","scary","creepy"],"skins":[{"unified":"1f47a","native":"👺"}],"version":1},"ghost":{"id":"ghost","name":"Ghost","keywords":["halloween","spooky","scary"],"skins":[{"unified":"1f47b","native":"👻"}],"version":1},"alien":{"id":"alien","name":"Alien","keywords":["UFO","paul","weird","outer","space"],"skins":[{"unified":"1f47d","native":"👽"}],"version":1},"space_invader":{"id":"space_invader","name":"Alien Monster","keywords":["space","invader","game","arcade","play"],"skins":[{"unified":"1f47e","native":"👾"}],"version":1},"robot_face":{"id":"robot_face","name":"Robot","keywords":["face","computer","machine","bot"],"skins":[{"unified":"1f916","native":"🤖"}],"version":1},"smiley_cat":{"id":"smiley_cat","name":"Grinning Cat","keywords":["smiley","animal","cats","happy","smile"],"skins":[{"unified":"1f63a","native":"😺"}],"version":1},"smile_cat":{"id":"smile_cat","name":"Grinning Cat with Smiling Eyes","keywords":["smile","animal","cats"],"skins":[{"unified":"1f638","native":"😸"}],"version":1},"joy_cat":{"id":"joy_cat","name":"Cat with Tears of Joy","keywords":["animal","cats","haha","happy"],"skins":[{"unified":"1f639","native":"😹"}],"version":1},"heart_eyes_cat":{"id":"heart_eyes_cat","name":"Smiling Cat with Heart-Eyes","keywords":["heart","eyes","animal","love","like","affection","cats","valentines"],"skins":[{"unified":"1f63b","native":"😻"}],"version":1},"smirk_cat":{"id":"smirk_cat","name":"Cat with Wry Smile","keywords":["smirk","animal","cats"],"skins":[{"unified":"1f63c","native":"😼"}],"version":1},"kissing_cat":{"id":"kissing_cat","name":"Kissing Cat","keywords":["animal","cats","kiss"],"skins":[{"unified":"1f63d","native":"😽"}],"version":1},"scream_cat":{"id":"scream_cat","name":"Weary Cat","keywords":["scream","animal","cats","munch","scared"],"skins":[{"unified":"1f640","native":"🙀"}],"version":1},"crying_cat_face":{"id":"crying_cat_face","name":"Crying Cat","keywords":["face","animal","tears","weep","sad","cats","upset","cry"],"skins":[{"unified":"1f63f","native":"😿"}],"version":1},"pouting_cat":{"id":"pouting_cat","name":"Pouting Cat","keywords":["animal","cats"],"skins":[{"unified":"1f63e","native":"😾"}],"version":1},"see_no_evil":{"id":"see_no_evil","name":"See-No-Evil Monkey","keywords":["see","no","evil","animal","nature","haha"],"skins":[{"unified":"1f648","native":"🙈"}],"version":1},"hear_no_evil":{"id":"hear_no_evil","name":"Hear-No-Evil Monkey","keywords":["hear","no","evil","animal","nature"],"skins":[{"unified":"1f649","native":"🙉"}],"version":1},"speak_no_evil":{"id":"speak_no_evil","name":"Speak-No-Evil Monkey","keywords":["speak","no","evil","animal","nature","omg"],"skins":[{"unified":"1f64a","native":"🙊"}],"version":1},"love_letter":{"id":"love_letter","name":"Love Letter","keywords":["email","like","affection","envelope","valentines"],"skins":[{"unified":"1f48c","native":"💌"}],"version":1},"cupid":{"id":"cupid","name":"Heart with Arrow","keywords":["cupid","love","like","affection","valentines"],"skins":[{"unified":"1f498","native":"💘"}],"version":1},"gift_heart":{"id":"gift_heart","name":"Heart with Ribbon","keywords":["gift","love","valentines"],"skins":[{"unified":"1f49d","native":"💝"}],"version":1},"sparkling_heart":{"id":"sparkling_heart","name":"Sparkling Heart","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f496","native":"💖"}],"version":1},"heartpulse":{"id":"heartpulse","name":"Growing Heart","keywords":["heartpulse","like","love","affection","valentines","pink"],"skins":[{"unified":"1f497","native":"💗"}],"version":1},"heartbeat":{"id":"heartbeat","name":"Beating Heart","keywords":["heartbeat","love","like","affection","valentines","pink"],"skins":[{"unified":"1f493","native":"💓"}],"version":1},"revolving_hearts":{"id":"revolving_hearts","name":"Revolving Hearts","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f49e","native":"💞"}],"version":1},"two_hearts":{"id":"two_hearts","name":"Two Hearts","keywords":["love","like","affection","valentines","heart"],"skins":[{"unified":"1f495","native":"💕"}],"version":1},"heart_decoration":{"id":"heart_decoration","name":"Heart Decoration","keywords":["purple","square","love","like"],"skins":[{"unified":"1f49f","native":"💟"}],"version":1},"heavy_heart_exclamation_mark_ornament":{"id":"heavy_heart_exclamation_mark_ornament","name":"Heart Exclamation","keywords":["heavy","mark","ornament","decoration","love"],"skins":[{"unified":"2763-fe0f","native":"❣️"}],"version":1},"broken_heart":{"id":"broken_heart","name":"Broken Heart","emoticons":["2&&(o.children=arguments.length>3?D0.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return ag(e,o,i,r,null)}function ag(e,n,t,i,r){var a={type:e,props:n,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++sW};return r==null&&gn.vnode!=null&&gn.vnode(a),a}function No(){return{current:null}}function mc(e){return e.children}function no(e,n){this.props=e,this.context=n}function pc(e,n){if(n==null)return e.__?pc(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?ag(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=t,v.__b=t.__b+1,(p=_[h])===null||p&&v.key==p.key&&v.type===p.type)_[h]=void 0;else for(d=0;d{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const n=25,t=20,i=Math.floor(n/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=t*2,e.canvas.height=n,r=>{e.clearRect(0,0,t*2,n),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,t,22);const a=e.getImageData(0,0,t,n).data,o=a.length;let l=0;for(;l=o)return!1;const f=t+l/4%t,c=Math.floor(l/4/t),h=e.getImageData(f,c,1,1).data;return!(a[l]!==h[0]||a[l+2]!==h[2]||e.measureText(r).width>=t)}})();var C$={latestVersion:CCe,noCountryFlags:ACe};const t6=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Di=null;function ECe(e){Di||(Di=Qs.get("frequently")||{});const n=e.id||e;n&&(Di[n]||(Di[n]=0),Di[n]+=1,Qs.set("last",n),Qs.set("frequently",Di))}function TCe({maxFrequentRows:e,perLine:n}){if(!e)return[];Di||(Di=Qs.get("frequently"));let t=[];if(!Di){Di={};for(let a in t6.slice(0,n)){const o=t6[a];Di[o]=n-a,t.push(o)}return t}const i=e*n,r=Qs.get("last");for(let a in Di)t.push(a);if(t.sort((a,o)=>{const l=Di[o],f=Di[a];return l==f?a.localeCompare(o):l-f}),t.length>i){const a=t.slice(i);t=t.slice(0,i);for(let o of a)o!=r&&delete Di[o];r&&t.indexOf(r)==-1&&(delete Di[t[t.length-1]],t.splice(-1,1,r)),Qs.set("frequently",Di)}return t}var wW={add:ECe,get:TCe,DEFAULTS:t6},kW={};kW=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var zo={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Ii=null,Un=null;const H3={};async function A$(e){if(H3[e])return H3[e];const t=await(await fetch(e)).json();return H3[e]=t,t}let U3=null,_W=null,xW=!1;function R0(e,{caller:n}={}){return U3||(U3=new Promise(t=>{_W=t})),e?MCe(e):n&&!xW&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),U3}async function MCe(e){xW=!0;let{emojiVersion:n,set:t,locale:i}=e;if(n||(n=zo.emojiVersion.value),t||(t=zo.set.value),i||(i=zo.locale.value),Un)Un.categories=Un.categories.filter(f=>!f.name);else{Un=(typeof e.data=="function"?await e.data():e.data)||await A$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),Un.emoticons={},Un.natives={},Un.categories.unshift({id:"frequent",emojis:[]});for(const f in Un.aliases){const c=Un.aliases[f],h=Un.emojis[c];h&&(h.aliases||(h.aliases=[]),h.aliases.push(f))}Un.originalCategories=Un.categories}if(Ii=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?oW(kW):await A$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let f in e.custom){f=parseInt(f);const c=e.custom[f],h=e.custom[f-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${f+1}`),c.name||(c.name=Ii.categories.custom),h&&!c.icon&&(c.target=h.target||h),Un.categories.push(c);for(const d of c.emojis)Un.emojis[d.id]=d}}e.categories&&(Un.categories=Un.originalCategories.filter(f=>e.categories.indexOf(f.id)!=-1).sort((f,c)=>{const h=e.categories.indexOf(f.id),d=e.categories.indexOf(c.id);return h-d}));let r=null,a=null;t=="native"&&(r=C$.latestVersion(),a=e.noCountryFlags||C$.noCountryFlags());let o=Un.categories.length,l=!1;for(;o--;){const f=Un.categories[o];if(f.id=="frequent"){let{maxFrequentRows:d,perLine:p}=e;d=d>=0?d:zo.maxFrequentRows.value,p||(p=zo.perLine.value),f.emojis=wW.get({maxFrequentRows:d,perLine:p})}if(!f.emojis||!f.emojis.length){Un.categories.splice(o,1);continue}const{categoryIcons:c}=e;if(c){const d=c[f.id];d&&!f.icon&&(f.icon=d)}let h=f.emojis.length;for(;h--;){const d=f.emojis[h],p=d.id?d:Un.emojis[d],v=()=>{f.emojis.splice(h,1)};if(!p||e.exceptEmojis&&e.exceptEmojis.includes(p.id)){v();continue}if(r&&p.version>r){v();continue}if(a&&f.id=="flags"&&!NCe.includes(p.id)){v();continue}if(!p.search){if(l=!0,p.search=","+[[p.id,!1],[p.name,!0],[p.keywords,!1],[p.emoticons,!1]].map(([b,w])=>{if(b)return(Array.isArray(b)?b:[b]).map(_=>(w?_.split(/[-|_|\s]+/):[_]).map(S=>S.toLowerCase())).flat()}).flat().filter(b=>b&&b.trim()).join(","),p.emoticons)for(const b of p.emoticons)Un.emoticons[b]||(Un.emoticons[b]=p.id);let y=0;for(const b of p.skins){if(!b)continue;y++;const{native:w}=b;w&&(Un.natives[w]=p.id,p.search+=`,${w}`);const _=y==1?"":`:skin-tone-${y}:`;b.shortcodes=`:${p.id}:${_}`}}}}l&&Lf.reset(),_W()}function SW(e,n,t){e||(e={});const i={};for(let r in n)i[r]=CW(r,e,n,t);return i}function CW(e,n,t,i){const r=t[e];let a=i&&i.getAttribute(e)||(n[e]!=null&&n[e]!=null?n[e]:null);return r&&(a!=null&&r.value&&typeof r.value!=typeof a&&(typeof r.value=="boolean"?a=a!="false":a=r.value.constructor(a)),r.transform&&a&&(a=r.transform(a)),(a==null||r.choices&&r.choices.indexOf(a)==-1)&&(a=r.value)),a}const jCe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let i6=null;function DCe(e){return e.id?e:Un.emojis[e]||Un.emojis[Un.aliases[e]]||Un.emojis[Un.natives[e]]}function RCe(){i6=null}async function PCe(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await R0(null,{caller:t||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,f,c)=>l.trim()&&c.indexOf(l)==f);if(!i.length)return;let r=i6||(i6=Object.values(Un.emojis)),a,o;for(const l of i){if(!r.length)break;a=[],o={};for(const f of r){if(!f.search)continue;const c=f.search.indexOf(`,${l}`);c!=-1&&(a.push(f),o[f.id]||(o[f.id]=0),o[f.id]+=f.id==l?0:c+1)}r=a}return a.length<2||(a.sort((l,f)=>{const c=o[l.id],h=o[f.id];return c==h?l.id.localeCompare(f.id):c-h}),a.length>n&&(a=a.slice(0,n))),a}var Lf={search:PCe,get:DCe,reset:RCe,SHORTCODES_REGEX:jCe};const NCe=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function $Ce(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,i)=>t==n[i])}async function zCe(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function LCe(e,{skinIndex:n=0}={}){const t=e.skins[n]||(n=0,e.skins[n]),i={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=n+1),t.src&&(i.src=t.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}const ICe={activity:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Ne("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Ne("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Ne("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Ne("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Ne("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Ne("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Ne("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Ne("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},BCe={loupe:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ne("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ne("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var P1={categories:ICe,search:BCe};function r6(e){let{id:n,skin:t,emoji:i}=e;if(e.shortcodes){const l=e.shortcodes.match(Lf.SHORTCODES_REGEX);l&&(n=l[1],l[2]&&(t=l[2]))}if(i||(i=Lf.get(n||e.native)),!i)return e.fallback;const r=i.skins[t-1]||i.skins[0],a=r.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${r.unified}.png`:void 0),o=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return Ne("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?Ne("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:a}):e.set=="native"?Ne("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):Ne("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${o})`,backgroundSize:`${100*Un.sheet.cols}% ${100*Un.sheet.rows}%`,backgroundPosition:`${100/(Un.sheet.cols-1)*r.x}% ${100/(Un.sheet.rows-1)*r.y}%`}})})}const FCe=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class AW extends FCe{static get observedAttributes(){return Object.keys(this.Props)}update(n={}){for(let t in n)this.attributeChangedCallback(t,null,n[t])}attributeChangedCallback(n,t,i){if(!this.component)return;const r=CW(n,{[n]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[n]:r}):(this.component.props[n]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(n={}){if(super(),this.props=n,n.parent||n.ref){let t=null;const i=n.parent||(t=n.ref&&n.ref.current);t&&(t.innerHTML=""),i&&i.appendChild(this)}}}class qCe extends AW{setShadow(){this.attachShadow({mode:"open"})}injectStyles(n){if(!n)return;const t=document.createElement("style");t.textContent=n,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(n,{styles:t}={}){super(n),this.setShadow(),this.injectStyles(t)}}var OW={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:zo.set,skin:zo.skin};class EW extends AW{async connectedCallback(){const n=SW(this.props,OW,this);n.element=this,n.ref=t=>{this.component=t},await R0(),!this.disconnected&&yW(Ne(r6,{...n}),this)}constructor(n){super(n)}}ta(EW,"Props",OW);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",EW);var O$,a6=[],E$=gn.__b,T$=gn.__r,M$=gn.diffed,j$=gn.__c,D$=gn.unmount;function HCe(){var e;for(a6.sort(function(n,t){return n.__v.__b-t.__v.__b});e=a6.pop();)if(e.__P)try{e.__H.__h.forEach(og),e.__H.__h.forEach(o6),e.__H.__h=[]}catch(n){e.__H.__h=[],gn.__e(n,e.__v)}}gn.__b=function(e){E$&&E$(e)},gn.__r=function(e){T$&&T$(e);var n=e.__c.__H;n&&(n.__h.forEach(og),n.__h.forEach(o6),n.__h=[])},gn.diffed=function(e){M$&&M$(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(a6.push(n)!==1&&O$===gn.requestAnimationFrame||((O$=gn.requestAnimationFrame)||function(t){var i,r=function(){clearTimeout(a),R$&&cancelAnimationFrame(i),setTimeout(t)},a=setTimeout(r,100);R$&&(i=requestAnimationFrame(r))})(HCe))},gn.__c=function(e,n){n.some(function(t){try{t.__h.forEach(og),t.__h=t.__h.filter(function(i){return!i.__||o6(i)})}catch(i){n.some(function(r){r.__h&&(r.__h=[])}),n=[],gn.__e(i,t.__v)}}),j$&&j$(e,n)},gn.unmount=function(e){D$&&D$(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{og(i)}catch(r){n=r}}),n&&gn.__e(n,t.__v))};var R$=typeof requestAnimationFrame=="function";function og(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function o6(e){e.__c=e.__()}function UCe(e,n){for(var t in n)e[t]=n[t];return e}function P$(e,n){for(var t in e)if(t!=="__source"&&!(t in n))return!0;for(var i in n)if(i!=="__source"&&e[i]!==n[i])return!0;return!1}function N1(e){this.props=e}(N1.prototype=new no).isPureReactComponent=!0,N1.prototype.shouldComponentUpdate=function(e,n){return P$(this.props,e)||P$(this.state,n)};var N$=gn.__b;gn.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),N$&&N$(e)};var VCe=gn.__e;gn.__e=function(e,n,t){if(e.then){for(var i,r=n;r=r.__;)if((i=r.__c)&&i.__c)return n.__e==null&&(n.__e=t.__e,n.__k=t.__k),i.__c(e,n)}VCe(e,n,t)};var $$=gn.unmount;function V3(){this.__u=0,this.t=null,this.__b=null}function TW(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Uv(){this.u=null,this.o=null}gn.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),$$&&$$(e)},(V3.prototype=new no).__c=function(e,n){var t=n.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var r=TW(i.__v),a=!1,o=function(){a||(a=!0,t.__R=null,r?r(l):l())};t.__R=o;var l=function(){if(!--i.__u){if(i.state.__e){var c=i.state.__e;i.__v.__k[0]=(function d(p,v,y){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(b){return d(b,v,y)}),p.__c&&p.__c.__P===v&&(p.__e&&y.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=y)),p})(c,c.__c.__P,c.__c.__O)}var h;for(i.setState({__e:i.__b=null});h=i.t.pop();)h.forceUpdate()}},f=n.__h===!0;i.__u++||f||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(o,o)},V3.prototype.componentWillUnmount=function(){this.t=[]},V3.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=(function a(o,l,f){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),o.__c.__H=null),(o=UCe({},o)).__c!=null&&(o.__c.__P===f&&(o.__c.__P=l),o.__c=null),o.__k=o.__k&&o.__k.map(function(c){return a(c,l,f)})),o})(this.__b,t,i.__O=i.__P)}this.__b=null}var r=n.__e&&n6(mc,null,e.fallback);return r&&(r.__h=null),[n6(mc,null,n.__e?null:e.children),r]};var z$=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]{const r=t.name||Ii.categories[t.id],a=!this.props.unfocused&&t.id==this.state.categoryId;return a&&(n=i),Ne("button",{"aria-label":r,"aria-selected":a||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:o=>o.preventDefault(),onClick:()=>{this.props.onClick({category:t,i})},children:this.renderIcon(t)})}),Ne("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:n==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${n*100}%)`:`translateX(${n*100}%)`}})]})})}constructor(){super(),this.categories=Un.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class n9e extends N1{shouldComponentUpdate(n){for(let t in n)if(t!="children"&&n[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const Vv={rowsPerRender:10};class t9e extends no{getInitialState(n=this.props){return{skin:Qs.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=Ii.rtl?"rtl":"ltr",this.refs={menu:No(),navigation:No(),scroll:No(),search:No(),searchInput:No(),skinToneButton:No(),skinToneRadio:No()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:n}=this.refs;n.current&&n.current.focus()}}componentWillReceiveProps(n){this.nextState||(this.nextState={});for(const t in n)this.nextState[t]=n[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let t=!1;for(const r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(t=!0);delete this.nextState;const i=this.getInitialState();if(t)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(n={}){await R0(this.props),this.initGrid(),this.unobserve(),this.setState(n,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var n;document.removeEventListener("click",this.handleClickOutside),(n=this.darkMedia)==null||n.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:n=[]}={}){Array.isArray(n)||(n=[n]);for(const t of this.observers)n.includes(t)||t.disconnect();this.observers=[].concat(n)}initGrid(){const{categories:n}=Un;this.refs.categories=new Map;const t=Un.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const i=(r,a)=>{const o=[];o.__categoryId=a.id,o.__index=r.length,this.grid.push(o);const l=this.grid.length-1,f=l%Vv.rowsPerRender?{}:No();return f.index=l,f.posinset=this.grid.setsize+1,r.push(f),o};for(let r of n){const a=[];let o=i(a,r);for(let l of r.emojis)o.length==this.getPerLine()&&(o=i(a,r)),this.grid.setsize+=1,o.push(l);this.refs.categories.set(r.id,{root:No(),rows:a})}}initTheme(n){if(n!="auto")return n;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(n=this.props){if(!n.dynamicWidth)return;const{element:t,emojiButtonSize:i}=n,r=()=>{const{width:o}=t.getBoundingClientRect();return Math.floor(o/i)},a=new ResizeObserver(()=>{this.unobserve({except:a}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return a.observe(t),this.observers.push(a),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([n,t]){const i=this.state.searchResults||this.grid,r=i[n]&&i[n][t];if(r)return Lf.get(r)}observeCategories(){const n=this.refs.navigation.current;if(!n)return;const t=new Map,i=o=>{o!=n.state.categoryId&&n.setState({categoryId:o})},r={root:this.refs.scroll.current,threshold:[0,1]},a=new IntersectionObserver(o=>{for(const f of o){const c=f.target.dataset.id;t.set(c,f.intersectionRatio)}const l=[...t];for(const[f,c]of l)if(c){i(f);break}},r);for(const{root:o}of this.refs.categories.values())a.observe(o.current);this.observers.push(a)}observeRows(){const n={...this.state.visibleRows},t=new IntersectionObserver(i=>{for(const r of i){const a=parseInt(r.target.dataset.index);r.isIntersecting?n[a]=!0:delete n[a]}this.setState({visibleRows:n})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(Vv.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*Vv.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const r of i)r.current&&t.observe(r.current);this.observers.push(t)}preventDefault(n){n.preventDefault()}unfocusSearch(){const n=this.refs.searchInput.current;n&&n.blur()}navigate({e:n,input:t,left:i,right:r,up:a,down:o}){const l=this.state.searchResults||this.grid;if(!l.length)return;let[f,c]=this.state.pos;const h=(()=>{if(f==0&&c==0&&!n.repeat&&(i||a))return null;if(f==-1)return!n.repeat&&(r||o)&&t.selectionStart==t.value.length?[0,0]:null;if(i||r){let d=l[f];const p=i?-1:1;if(c+=p,!d[c]){if(f+=p,d=l[f],!d)return f=i?0:l.length-1,c=i?0:l[f].length-1,[f,c];c=i?d.length-1:0}return[f,c]}if(a||o){f+=a?-1:1;const d=l[f];return d?(d[c]||(c=d.length-1),[f,c]):(f=a?0:l.length-1,c=a?0:l[f].length-1,[f,c])}})();if(h)n.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:h,keyboard:!0},()=>{this.scrollTo({row:h[0]})})}scrollTo({categoryId:n,row:t}){const i=this.state.searchResults||this.grid;if(!i.length)return;const r=this.refs.scroll.current,a=r.getBoundingClientRect();let o=0;if(t>=0&&(n=i[t].__categoryId),n&&(o=(this.refs[n]||this.refs.categories.get(n).root).current.getBoundingClientRect().top-(a.top-r.scrollTop)+1),t>=0)if(!t)o=0;else{const l=i[t].__index,f=o+l*this.props.emojiButtonSize,c=f+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(fr.scrollTop+a.height)o=c-a.height;else return}this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(n){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:n||[-1,-1],keyboard:!1})}handleEmojiClick({e:n,emoji:t,pos:i}){if(this.props.onEmojiSelect&&(!t&&i&&(t=this.getEmojiByPos(i)),t)){const r=LCe(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&wW.add(r,this.props),this.props.onEmojiSelect(r,n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(n){this.setState({tempSkin:n})}handleSkinClick(n){this.ignoreMouse(),this.closeSkins(),this.setState({skin:n,tempSkin:null}),Qs.set("skin",n)}renderNav(){return Ne(e9e,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const n=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return Ne("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Ne("div",{class:"flex flex-middle flex-grow",children:[Ne("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Ne(r6,{emoji:n,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Ne("div",{class:`margin-${this.dir[0]}`,children:n||t?Ne("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Ne("div",{class:"preview-title ellipsis",children:n?n.name:Ii.search_no_results_1}),Ne("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:Ii.search_no_results_2})]}):Ne("div",{class:"preview-placeholder color-c",children:Ii.pick})})]}),!n&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(n,{pos:t,posinset:i,grid:r}){const a=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,f=(n.skins[o-1]||n.skins[0]).native,c=$Ce(this.state.pos,t),h=t.concat(n.id).join("");return Ne(n9e,{selected:c,skin:o,size:a,children:Ne("button",{"aria-label":f,"aria-selected":c||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?n.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:n}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Ne("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),Ne(r6,{emoji:n,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},h)}renderSearch(){const n=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return Ne("div",{children:[Ne("div",{class:"spacer"}),Ne("div",{class:"flex flex-middle",children:[Ne("div",{class:"search relative flex-grow",children:[Ne("input",{type:"search",ref:this.refs.searchInput,placeholder:Ii.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Ne("span",{class:"icon loupe flex",children:P1.search.loupe}),this.state.searchResults&&Ne("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:P1.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?Ne("div",{class:"category",ref:this.refs.search,children:[Ne("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Ii.categories.search}),Ne("div",{children:n.length?n.map((t,i)=>Ne("div",{class:"flex",children:t.map((r,a)=>this.renderEmojiButton(r,{pos:[i,a],posinset:i*this.props.perLine+a+1,grid:n}))})):Ne("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Ne("a",{onClick:this.props.onAddCustomEmoji,children:Ii.add_custom})})})]}):null}renderCategories(){const{categories:n}=Un,t=!!this.state.searchResults,i=this.getPerLine();return Ne("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0,height:"100%"},children:n.map(r=>{const{root:a,rows:o}=this.refs.categories.get(r.id);return Ne("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:a,children:[Ne("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Ii.categories[r.id]}),Ne("div",{class:"relative",style:{height:o.length*this.props.emojiButtonSize},children:o.map((l,f)=>{const c=l.index-l.index%Vv.rowsPerRender,h=this.state.visibleRows[c],d="current"in l?l:void 0;if(!h&&!d)return null;const p=f*i,v=p+i,y=r.emojis.slice(p,v);return y.length{if(!b)return Ne("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const _=Lf.get(b);return this.renderEmojiButton(_,{pos:[l.index,w],posinset:l.posinset+w,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Ne("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Ne("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Ii.skins.choose,title:Ii.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Ne("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return Ne("div",{"aria-live":"polite",class:"sr-only",children:t})}renderSkins(){const t=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),r={};return this.dir=="ltr"?r.right=i.right-t.right-3:r.left=t.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?r.bottom=i.bottom-t.top+6:(r.top=t.bottom-i.top+3,r.bottom="auto"),Ne("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Ii.skins.choose,class:"menu hidden","data-position":r.top?"top":"bottom",style:r,children:[...Array(6).keys()].map(a=>{const o=a+1,l=this.state.skin==o;return Ne("div",{children:[Ne("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Ii.skins[o],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:f=>{(f.code=="Enter"||f.code=="Space"||f.code=="Tab")&&(f.preventDefault(),this.handleSkinClick(o))}}),Ne("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(o),onMouseEnter:()=>this.handleSkinMouseOver(o),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Ne("span",{class:`skin-tone skin-tone-${o}`}),Ne("span",{class:"margin-small-lr",children:Ii.skins[o]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return Ne("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${n}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&Ne("div",{class:"padding-lr",children:this.renderSearch()}),Ne("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Ne("div",{style:{width:this.props.dynamicWidth?"100%":n,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(n){super(),ta(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),ta(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),ta(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),ta(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),ta(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),ta(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,r=await Lf.search(i),a=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},a);const o=t.selectionStart==t.value.length?[0,0]:[-1,-1],l=[];l.setsize=r.length;let f=null;for(let c of r)(!l.length||f.length==this.getPerLine())&&(f=[],f.__categoryId="search",f.__index=l.length,l.push(f)),f.push(c);this.ignoreMouse(),this.setState({searchResults:l,pos:o},a)}),ta(this,"handleSearchKeyDown",t=>{const i=t.currentTarget;switch(t.stopImmediatePropagation(),t.key){case"ArrowLeft":this.navigate({e:t,input:i,left:!0});break;case"ArrowRight":this.navigate({e:t,input:i,right:!0});break;case"ArrowUp":this.navigate({e:t,input:i,up:!0});break;case"ArrowDown":this.navigate({e:t,input:i,down:!0});break;case"Enter":t.preventDefault(),this.handleEmojiClick({e:t,pos:this.state.pos});break;case"Escape":t.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),ta(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),ta(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),ta(this,"openSkins",t=>{const{currentTarget:i}=t,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await zCe(2);const a=this.refs.menu.current;a&&(a.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(n),visibleRows:{0:!0},...this.getInitialState(n)}}}class mA extends qCe{async connectedCallback(){const n=SW(this.props,zo,this);n.element=this,n.ref=t=>{this.component=t},await R0(n),!this.disconnected&&yW(Ne(t9e,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:oW(MW)})}}ta(mA,"Props",zo);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",mA);var MW={};MW=`:host { + width: min-content; + height: 435px; + min-height: 230px; + border-radius: var(--border-radius); + box-shadow: var(--shadow); + --border-radius: 10px; + --category-icon-size: 18px; + --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; + --font-size: 15px; + --preview-placeholder-size: 21px; + --preview-title-size: 1.1em; + --preview-subtitle-size: .9em; + --shadow-color: 0deg 0% 0%; + --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); + display: flex; +} + +[data-theme="light"] { + --em-rgb-color: var(--rgb-color, 34, 36, 39); + --em-rgb-accent: var(--rgb-accent, 34, 102, 237); + --em-rgb-background: var(--rgb-background, 255, 255, 255); + --em-rgb-input: var(--rgb-input, 255, 255, 255); + --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); + --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); +} + +[data-theme="dark"] { + --em-rgb-color: var(--rgb-color, 222, 222, 221); + --em-rgb-accent: var(--rgb-accent, 58, 130, 247); + --em-rgb-background: var(--rgb-background, 21, 22, 23); + --em-rgb-input: var(--rgb-input, 0, 0, 0); + --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); + --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); +} + +#root { + --color-a: rgb(var(--em-rgb-color)); + --color-b: rgba(var(--em-rgb-color), .65); + --color-c: rgba(var(--em-rgb-color), .45); + --padding: 12px; + --padding-small: calc(var(--padding) / 2); + --sidebar-width: 16px; + --duration: 225ms; + --duration-fast: 125ms; + --duration-instant: 50ms; + --easing: cubic-bezier(.4, 0, .2, 1); + width: 100%; + text-align: left; + border-radius: var(--border-radius); + background-color: rgb(var(--em-rgb-background)); + position: relative; +} + +@media (prefers-reduced-motion) { + #root { + --duration: 0; + --duration-fast: 0; + --duration-instant: 0; + } +} + +#root[data-menu] button { + cursor: auto; +} + +#root[data-menu] .menu button { + cursor: pointer; +} + +:host, #root, input, button { + color: rgb(var(--em-rgb-color)); + font-family: var(--font-family); + font-size: var(--font-size); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + line-height: normal; +} + +*, :before, :after { + box-sizing: border-box; + min-width: 0; + margin: 0; + padding: 0; +} + +.relative { + position: relative; +} + +.flex { + display: flex; +} + +.flex-auto { + flex: none; +} + +.flex-center { + justify-content: center; +} + +.flex-column { + flex-direction: column; +} + +.flex-grow { + flex: auto; +} + +.flex-middle { + align-items: center; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.padding { + padding: var(--padding); +} + +.padding-t { + padding-top: var(--padding); +} + +.padding-lr { + padding-left: var(--padding); + padding-right: var(--padding); +} + +.padding-r { + padding-right: var(--padding); +} + +.padding-small { + padding: var(--padding-small); +} + +.padding-small-b { + padding-bottom: var(--padding-small); +} + +.padding-small-lr { + padding-left: var(--padding-small); + padding-right: var(--padding-small); +} + +.margin { + margin: var(--padding); +} + +.margin-r { + margin-right: var(--padding); +} + +.margin-l { + margin-left: var(--padding); +} + +.margin-small-l { + margin-left: var(--padding-small); +} + +.margin-small-lr { + margin-left: var(--padding-small); + margin-right: var(--padding-small); +} + +.align-l { + text-align: left; +} + +.align-r { + text-align: right; +} + +.color-a { + color: var(--color-a); +} + +.color-b { + color: var(--color-b); +} + +.color-c { + color: var(--color-c); +} + +.ellipsis { + white-space: nowrap; + max-width: 100%; + width: auto; + text-overflow: ellipsis; + overflow: hidden; +} + +.sr-only { + width: 1px; + height: 1px; + position: absolute; + top: auto; + left: -10000px; + overflow: hidden; +} + +a { + cursor: pointer; + color: rgb(var(--em-rgb-accent)); +} + +a:hover { + text-decoration: underline; +} + +.spacer { + height: 10px; +} + +[dir="rtl"] .scroll { + padding-left: 0; + padding-right: var(--padding); +} + +.scroll { + padding-right: 0; + overflow-x: hidden; + overflow-y: auto; +} + +.scroll::-webkit-scrollbar { + width: var(--sidebar-width); + height: var(--sidebar-width); +} + +.scroll::-webkit-scrollbar-track { + border: 0; +} + +.scroll::-webkit-scrollbar-button { + width: 0; + height: 0; + display: none; +} + +.scroll::-webkit-scrollbar-corner { + background-color: rgba(0, 0, 0, 0); +} + +.scroll::-webkit-scrollbar-thumb { + min-height: 20%; + min-height: 65px; + border: 4px solid rgb(var(--em-rgb-background)); + border-radius: 8px; +} + +.scroll::-webkit-scrollbar-thumb:hover { + background-color: var(--em-color-border-over) !important; +} + +.scroll:hover::-webkit-scrollbar-thumb { + background-color: var(--em-color-border); +} + +.sticky { + z-index: 1; + background-color: rgba(var(--em-rgb-background), .9); + -webkit-backdrop-filter: blur(4px); + backdrop-filter: blur(4px); + font-weight: 500; + position: sticky; + top: -1px; +} + +[dir="rtl"] .search input[type="search"] { + padding: 10px 2.2em 10px 2em; +} + +[dir="rtl"] .search .loupe { + left: auto; + right: .7em; +} + +[dir="rtl"] .search .delete { + left: .7em; + right: auto; +} + +.search { + z-index: 2; + position: relative; +} + +.search input, .search button { + font-size: calc(var(--font-size) - 1px); +} + +.search input[type="search"] { + width: 100%; + background-color: var(--em-color-border); + transition-duration: var(--duration); + transition-property: background-color, box-shadow; + transition-timing-function: var(--easing); + border: 0; + border-radius: 10px; + outline: 0; + padding: 10px 2em 10px 2.2em; + display: block; +} + +.search input[type="search"]::-ms-input-placeholder { + color: inherit; + opacity: .6; +} + +.search input[type="search"]::placeholder { + color: inherit; + opacity: .6; +} + +.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; +} + +.search input[type="search"]:focus { + background-color: rgb(var(--em-rgb-input)); + box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); +} + +.search .icon { + z-index: 1; + color: rgba(var(--em-rgb-color), .7); + position: absolute; + top: 50%; + transform: translateY(-50%); +} + +.search .loupe { + pointer-events: none; + left: .7em; +} + +.search .delete { + right: .7em; +} + +svg { + fill: currentColor; + width: 1em; + height: 1em; +} + +button { + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + cursor: pointer; + color: currentColor; + background-color: rgba(0, 0, 0, 0); + border: 0; +} + +#nav { + z-index: 2; + padding-top: 12px; + padding-bottom: 12px; + padding-right: var(--sidebar-width); + position: relative; +} + +#nav button { + color: var(--color-b); + transition: color var(--duration) var(--easing); +} + +#nav button:hover { + color: var(--color-a); +} + +#nav svg, #nav img { + width: var(--category-icon-size); + height: var(--category-icon-size); +} + +#nav[dir="rtl"] .bar { + left: auto; + right: 0; +} + +#nav .bar { + width: 100%; + height: 3px; + background-color: rgb(var(--em-rgb-accent)); + transition: transform var(--duration) var(--easing); + border-radius: 3px 3px 0 0; + position: absolute; + bottom: -12px; + left: 0; +} + +#nav button[aria-selected] { + color: rgb(var(--em-rgb-accent)); +} + +#preview { + z-index: 2; + padding: calc(var(--padding) + 4px) var(--padding); + padding-right: var(--sidebar-width); + position: relative; +} + +#preview .preview-placeholder { + font-size: var(--preview-placeholder-size); +} + +#preview .preview-title { + font-size: var(--preview-title-size); +} + +#preview .preview-subtitle { + font-size: var(--preview-subtitle-size); +} + +#nav:before, #preview:before { + content: ""; + height: 2px; + position: absolute; + left: 0; + right: 0; +} + +#nav[data-position="top"]:before, #preview[data-position="top"]:before { + background: linear-gradient(to bottom, var(--em-color-border), transparent); + top: 100%; +} + +#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { + background: linear-gradient(to top, var(--em-color-border), transparent); + bottom: 100%; +} + +.category:last-child { + min-height: calc(100% + 1px); +} + +.category button { + font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; + position: relative; +} + +.category button > * { + position: relative; +} + +.category button .background { + opacity: 0; + background-color: var(--em-color-border); + transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} + +.category button:hover .background { + transition-duration: var(--duration-instant); + transition-delay: 0s; +} + +.category button[aria-selected] .background { + opacity: 1; +} + +.category button[data-keyboard] .background { + transition: none; +} + +.row { + width: 100%; + position: absolute; + top: 0; + left: 0; +} + +.skin-tone-button { + border: 1px solid rgba(0, 0, 0, 0); + border-radius: 100%; +} + +.skin-tone-button:hover { + border-color: var(--em-color-border); +} + +.skin-tone-button:active .skin-tone { + transform: scale(.85) !important; +} + +.skin-tone-button .skin-tone { + transition: transform var(--duration) var(--easing); +} + +.skin-tone-button[aria-selected] { + background-color: var(--em-color-border); + border-top-color: rgba(0, 0, 0, .05); + border-bottom-color: rgba(0, 0, 0, 0); + border-left-width: 0; + border-right-width: 0; +} + +.skin-tone-button[aria-selected] .skin-tone { + transform: scale(.9); +} + +.menu { + z-index: 2; + white-space: nowrap; + border: 1px solid var(--em-color-border); + background-color: rgba(var(--em-rgb-background), .9); + -webkit-backdrop-filter: blur(4px); + backdrop-filter: blur(4px); + transition-property: opacity, transform; + transition-duration: var(--duration); + transition-timing-function: var(--easing); + border-radius: 10px; + padding: 4px; + position: absolute; + box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); +} + +.menu.hidden { + opacity: 0; +} + +.menu[data-position="bottom"] { + transform-origin: 100% 100%; +} + +.menu[data-position="bottom"].hidden { + transform: scale(.9)rotate(-3deg)translateY(5%); +} + +.menu[data-position="top"] { + transform-origin: 100% 0; +} + +.menu[data-position="top"].hidden { + transform: scale(.9)rotate(3deg)translateY(-5%); +} + +.menu input[type="radio"] { + clip: rect(0 0 0 0); + width: 1px; + height: 1px; + border: 0; + margin: 0; + padding: 0; + position: absolute; + overflow: hidden; +} + +.menu input[type="radio"]:checked + .option { + box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); +} + +.option { + width: 100%; + border-radius: 6px; + padding: 4px 6px; +} + +.option:hover { + color: #fff; + background-color: rgb(var(--em-rgb-accent)); +} + +.skin-tone { + width: 16px; + height: 16px; + border-radius: 100%; + display: inline-block; + position: relative; + overflow: hidden; +} + +.skin-tone:after { + content: ""; + mix-blend-mode: overlay; + background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); + border: 1px solid rgba(0, 0, 0, .8); + border-radius: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; +} + +.skin-tone-1 { + background-color: #ffc93a; +} + +.skin-tone-2 { + background-color: #ffdab7; +} + +.skin-tone-3 { + background-color: #e7b98f; +} + +.skin-tone-4 { + background-color: #c88c61; +} + +.skin-tone-5 { + background-color: #a46134; +} + +.skin-tone-6 { + background-color: #5d4437; +} + +[data-index] { + justify-content: space-between; +} + +[data-emoji-set="twitter"] .skin-tone:after { + box-shadow: none; + border-color: rgba(0, 0, 0, .5); +} + +[data-emoji-set="twitter"] .skin-tone-1 { + background-color: #fade72; +} + +[data-emoji-set="twitter"] .skin-tone-2 { + background-color: #f3dfd0; +} + +[data-emoji-set="twitter"] .skin-tone-3 { + background-color: #eed3a8; +} + +[data-emoji-set="twitter"] .skin-tone-4 { + background-color: #cfad8d; +} + +[data-emoji-set="twitter"] .skin-tone-5 { + background-color: #a8805d; +} + +[data-emoji-set="twitter"] .skin-tone-6 { + background-color: #765542; +} + +[data-emoji-set="google"] .skin-tone:after { + box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); +} + +[data-emoji-set="google"] .skin-tone-1 { + background-color: #f5c748; +} + +[data-emoji-set="google"] .skin-tone-2 { + background-color: #f1d5aa; +} + +[data-emoji-set="google"] .skin-tone-3 { + background-color: #d4b48d; +} + +[data-emoji-set="google"] .skin-tone-4 { + background-color: #aa876b; +} + +[data-emoji-set="google"] .skin-tone-5 { + background-color: #916544; +} + +[data-emoji-set="google"] .skin-tone-6 { + background-color: #61493f; +} + +[data-emoji-set="facebook"] .skin-tone:after { + border-color: rgba(0, 0, 0, .4); + box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; +} + +[data-emoji-set="facebook"] .skin-tone-1 { + background-color: #f5c748; +} + +[data-emoji-set="facebook"] .skin-tone-2 { + background-color: #f1d5aa; +} + +[data-emoji-set="facebook"] .skin-tone-3 { + background-color: #d4b48d; +} + +[data-emoji-set="facebook"] .skin-tone-4 { + background-color: #aa876b; +} + +[data-emoji-set="facebook"] .skin-tone-5 { + background-color: #916544; +} + +[data-emoji-set="facebook"] .skin-tone-6 { + background-color: #61493f; +} + +`;function i9e({opened:e,onClose:n,onSelect:t,target:i}){return k.jsxs(Tn,{opened:e,onChange:r=>{r||n()},onDismiss:n,position:"bottom-start",withArrow:!0,shadow:"md",withinPortal:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!1,children:[k.jsx(Tn.Target,{children:i}),k.jsx(Tn.Dropdown,{p:0,style:{background:"transparent",border:"none"},children:k.jsx(r9e,{onSelect:r=>{t(r),n()}})})]})}function r9e({onSelect:e}){const n=O.useRef(null),t=O.useRef(null),i=O.useRef(e);return i.current=e,O.useEffect(()=>{if(n.current)return t.current=new mA({data:vCe,onEmojiSelect:r=>{const a=i.current;r.native?a(r.native):r.shortcodes&&a(r.shortcodes)},theme:"dark",previewPosition:"none",skinTonePosition:"search",autoFocus:!0,maxFrequentRows:2,ref:n}),()=>{n.current&&(n.current.innerHTML=""),t.current=null}},[]),k.jsx("div",{ref:n})}const uh="column-";function a9e(e){return e==="column"?n=>{const t=n.droppableContainers.filter(r=>String(r.id).startsWith(uh)),i=DB({...n,droppableContainers:t});return i.length>0?i:Mie({...n,droppableContainers:t})}:n=>{const t=Rie(n);return t.length>0?t:jB(n)}}function o9e(){const e=AC(),[n,t]=O.useState(null),[i,r]=O.useState([]),[a,o]=O.useState(null),[l,f]=O.useState(null),[c,h]=O.useState(void 0),[d,p]=O.useState(!1),[v,y]=O.useState(""),[b,w]=O.useState(Date.now()),[_,S]=O.useState(!1),[C,E]=O.useState("board"),[A,T]=O.useState([]),[j,N]=O.useState(!1),[q,R]=O.useState([]),[L,B]=O.useState([]),[G,H]=O.useState(""),[U,P]=O.useState(null),[z,F]=O.useState(null),[Y,D]=O.useState([]),[V,W]=O.useState(!1),[$,X]=O.useState(null),[te,ae]=O.useState(null),[le,ye]=O.useState(!1),[oe,ue]=O.useState(null),[ke,ie]=O.useState(!1),[Re,pe]=O.useState(null),[Ce,De]=O.useState(!1),[be,_e]=O.useState("#888888"),[Me,Be]=O.useState(null),[Ve,He]=O.useState(!1),[We,Ye]=O.useState(()=>{const ee=localStorage.getItem("kanban_nav_width"),Oe=ee?parseInt(ee,10):NaN;return Number.isFinite(Oe)&&Oe>=180&&Oe<=600?Oe:240}),rn=O.useRef(We);O.useEffect(()=>{rn.current=We,localStorage.setItem("kanban_nav_width",String(We))},[We]);const Q=ee=>{ee.preventDefault();const Oe=ee.clientX,Ee=rn.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ue=Mt=>{const wt=Mt.clientX-Oe,Wt=Math.min(600,Math.max(180,Ee+wt));Ye(Wt)},Fn=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ue),window.removeEventListener("mouseup",Fn)};window.addEventListener("mousemove",Ue),window.addEventListener("mouseup",Fn)},me=Oie(_M(PC,{activationConstraint:{distance:5}}),_M(DC,{coordinateGetter:aae})),xe=O.useCallback(async()=>{try{const ee=await Kte();t(ee)}catch(ee){et.show({color:"red",message:ee.message})}},[]);O.useEffect(()=>{xe()},[xe]);const Xe=O.useCallback(async()=>{try{const ee=await xB();r(ee)}catch(ee){console.warn("listUsers failed",ee)}},[]),ne=O.useCallback(async()=>{try{const ee=await nie();T(ee)}catch(ee){console.warn("listTrash failed",ee)}},[]),Le=O.useCallback(async()=>{try{const ee=await SB();R(ee)}catch(ee){console.warn("listTags failed",ee)}},[]),en=O.useCallback(async()=>{try{const ee=await cie();B(ee)}catch(ee){console.warn("listRequesters failed",ee)}},[]);O.useEffect(()=>{Xe()},[Xe]),O.useEffect(()=>{ne()},[ne]),O.useEffect(()=>{Le(),en()},[Le,en]),O.useEffect(()=>{const ee=setInterval(()=>w(Date.now()),1e3);return()=>clearInterval(ee)},[]),O.useEffect(()=>{if(!Re)return;const ee=Oe=>{Oe.key==="Escape"&&pe(null)};return window.addEventListener("keydown",ee),()=>window.removeEventListener("keydown",ee)},[Re]);const hn=O.useMemo(()=>{const ee=new Map;for(const Oe of i)ee.set(Oe.id,Oe);return ee},[i]),fn=O.useMemo(()=>n?[...n.columns].sort((ee,Oe)=>ee.position-Oe.position):[],[n]),Ze=O.useMemo(()=>fn.filter(ee=>ee.location!=="sidebar"),[fn]),Ke=O.useMemo(()=>fn.filter(ee=>ee.location==="sidebar"),[fn]),An=O.useMemo(()=>Ze.map(ee=>`${uh}${ee.id}`),[Ze]),on=O.useMemo(()=>Ke.map(ee=>`${uh}${ee.id}`),[Ke]),ht=O.useCallback(ee=>{const Oe=G.trim().toLowerCase();if(Oe&&![ee.title,ee.description,ee.requester,...ee.tags||[]].filter(Boolean).join(" ").toLowerCase().includes(Oe)||U&&ee.assignee_id!==U||V&&ee.assignee_id||z&&ee.requester!==z)return!1;if(Y.length>0){const Ee=new Set(ee.tags||[]);for(const Ue of Y)if(!Ee.has(Ue))return!1}if(le&&!ee.deadline)return!1;if($||te){const Ee=$?new Date($).setHours(0,0,0,0):-1/0,Ue=te?new Date(te).setHours(23,59,59,999):1/0,Fn=ee.created_at?new Date(ee.created_at).getTime():NaN,Mt=ee.entered_at?new Date(ee.entered_at).getTime():NaN,wt=Wt=>!isNaN(Wt)&&Wt>=Ee&&Wt<=Ue;if(!wt(Fn)&&!wt(Mt))return!1}return!0},[G,U,V,z,Y,$,te,le]),mt=O.useMemo(()=>{const ee=new Map;if(!n)return ee;for(const Oe of n.columns)ee.set(Oe.id,[]);for(const Oe of[...n.cards].sort((Ee,Ue)=>Ee.position-Ue.position)){if(!ht(Oe))continue;const Ee=ee.get(Oe.column_id);Ee&&Ee.push(Oe)}return ee},[n,ht]),zn=!!G.trim()||!!U||V||!!z||Y.length>0||!!$||!!te||le,yn=ee=>n==null?void 0:n.cards.find(Oe=>Oe.id===ee),kn=ee=>n==null?void 0:n.columns.find(Oe=>Oe.id===ee),tt=ee=>{var Oe;return(Oe=yn(ee))==null?void 0:Oe.column_id},At=ee=>ee.startsWith(uh),$e=ee=>ee.slice(uh.length),Fe=ee=>{if(n)return At(ee)?$e(ee):tt(ee)},jn=ee=>{var Fn;const Oe=ee.active.id,Ee=(Fn=ee.active.data.current)==null?void 0:Fn.type;if(h(Ee),Ee==="column"){f($e(Oe));return}const Ue=yn(Oe);Ue&&o(Ue)},Jn=ee=>{var Mt,wt;if(!n||((Mt=ee.active.data.current)==null?void 0:Mt.type)!=="card")return;const Oe=ee.active.id,Ee=(wt=ee.over)==null?void 0:wt.id;if(!Ee)return;const Ue=tt(Oe),Fn=Fe(Ee);!Ue||!Fn||Ue===Fn||t(Wt=>{if(!Wt)return Wt;const ar=Wt.cards.map(Ba=>Ba.id===Oe?{...Ba,column_id:Fn}:Ba);return{...Wt,cards:ar}})},On=async ee=>{var Ba,Xi;const Oe=(Ba=ee.active.data.current)==null?void 0:Ba.type,Ee=ee.active.id,Ue=(Xi=ee.over)==null?void 0:Xi.id;if(o(null),f(null),h(void 0),!n||!Ue)return;if(Oe==="column"){if(!At(Ue))return;const st=$e(Ee),Zi=$e(Ue);if(st===Zi)return;const ds=kn(st),Ci=kn(Zi);if(!ds||!Ci)return;const po=Ci.location,xr=fn.filter(Ai=>Ai.location===po).map(Ai=>Ai.id),Uc=xr.indexOf(st),gl=xr.indexOf(Zi);let yl;if(Uc===-1){const Ai=gl===-1?xr.length:gl;yl=[...xr.slice(0,Ai),st,...xr.slice(Ai)]}else{if(Uc===gl)return;yl=Sg(xr,Uc,gl)}t(Ai=>{if(!Ai)return Ai;const Vc=new Map(yl.map((Qi,ba)=>[Qi,ba])),$0=Ai.columns.map(Qi=>Qi.id===st?{...Qi,location:po,position:Vc.get(Qi.id)??Qi.position}:Vc.has(Qi.id)?{...Qi,position:Vc.get(Qi.id)}:Qi);return{...Ai,columns:$0}});try{ds.location!==po&&await pf(st,{location:po}),await Qte(yl)}catch(Ai){et.show({color:"red",message:Ai.message})}xe();return}const Fn=Fe(Ue);if(!Fn)return;const Mt=n.cards.find(st=>st.id===Ee);if(Mt!=null&&Mt.locked&&Mt.column_id!==Fn){et.show({color:"yellow",message:"Card bloqueada: no se puede mover entre columnas"}),xe();return}const wt=n.cards.filter(st=>st.column_id===Fn).sort((st,Zi)=>st.position-Zi.position),Wt=wt.findIndex(st=>st.id===Ee);let ar;if(At(Ue)||Wt===-1)ar=[...wt.filter(st=>st.id!==Ee).map(st=>st.id),Ee];else{const st=wt.findIndex(Zi=>Zi.id===Ue);ar=Sg(wt.map(Zi=>Zi.id),Wt,st)}t(st=>{if(!st)return st;const Zi=new Map(ar.map((Ci,po)=>[Ci,po])),ds=st.cards.map(Ci=>Ci.column_id===Fn&&Zi.has(Ci.id)?{...Ci,position:Zi.get(Ci.id)}:Ci);return{...st,cards:ds}});try{await rie(Ee,Fn,ar)}catch(st){et.show({color:"red",message:st.message})}xe()},Qe=async()=>{const ee=v.trim();if(ee)try{await Xte(ee),y(""),p(!1),xe()}catch(Oe){et.show({color:"red",message:Oe.message})}},Je=O.useCallback(async(ee,Oe)=>{try{await pf(ee,{name:Oe}),xe()}catch(Ee){et.show({color:"red",message:Ee.message})}},[xe]),nn=O.useCallback(async(ee,Oe)=>{try{await pf(ee,{width:Oe}),xe()}catch(Ee){et.show({color:"red",message:Ee.message})}},[xe]),Ln=O.useCallback(async(ee,Oe)=>{try{await pf(ee,{location:Oe}),xe()}catch(Ee){et.show({color:"red",message:Ee.message})}},[xe]),In=O.useCallback(ee=>{Ro.openConfirmModal({title:"Eliminar columna",children:k.jsx(un,{size:"sm",children:"Se borraran todas sus tarjetas. Continuar?"}),labels:{confirm:"Eliminar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await Zte(ee),xe()}catch(Oe){et.show({color:"red",message:Oe.message})}}})},[xe]),bt=O.useCallback(ee=>{var Ee,Ue;const Oe=Ro.open({title:"Nueva tarjeta",size:"md",children:k.jsx(HM,{users:i,requesterOptions:L,tagOptions:q,initial:{requester:((Ee=e.user)==null?void 0:Ee.display_name)||((Ue=e.user)==null?void 0:Ue.username)||""},submitLabel:"Crear",onCancel:()=>Ro.close(Oe),onSubmit:async Fn=>{try{await Jte({column_id:ee,requester:Fn.requester,title:Fn.title,description:Fn.description,assignee_id:Fn.assignee_id,tags:Fn.tags}),Ro.close(Oe),xe(),Le(),en()}catch(Mt){et.show({color:"red",message:Mt.message})}}})})},[xe,i,e.user,L,q]),xn=O.useCallback(ee=>{const Oe=Ro.open({title:"Editar tarjeta",size:"md",children:k.jsx(HM,{users:i,requesterOptions:L,tagOptions:q,initial:{requester:ee.requester,title:ee.title,description:ee.description,assignee_id:ee.assignee_id,tags:ee.tags||[]},submitLabel:"Guardar",onCancel:()=>Ro.close(Oe),onSubmit:async Ee=>{try{await vf(ee.id,{requester:Ee.requester,title:Ee.title,description:Ee.description,assignee_id:Ee.assignee_id,tags:Ee.tags}),Ro.close(Oe),xe(),Le(),en()}catch(Ue){et.show({color:"red",message:Ue.message})}}})})},[xe,i,L,q]),_n=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,requester:Oe}:Ue)});try{await vf(ee,{requester:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),Wn=O.useCallback(ee=>{E("board"),ue(ee),window.setTimeout(()=>ue(null),3e3)},[]),Lt=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,deadline:Oe}:Ue)});try{await vf(ee,{deadline:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),di=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,assignee_id:Oe}:Ue)});try{await vf(ee,{assignee_id:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),Ki=O.useCallback(async ee=>{try{await eie(ee),xe(),ne()}catch(Oe){et.show({color:"red",message:Oe.message})}},[xe,ne]),za=O.useCallback(async ee=>{try{await tie(ee),xe(),ne()}catch(Oe){et.show({color:"red",message:Oe.message})}},[xe,ne]),mo=O.useCallback(async ee=>{Ro.openConfirmModal({title:"Borrar permanentemente",children:k.jsx(un,{size:"sm",children:"Esta accion no se puede deshacer."}),labels:{confirm:"Borrar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await iie(ee),ne()}catch(Oe){et.show({color:"red",message:Oe.message})}}})},[ne]),Br=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,color:Oe}:Ue)});try{await vf(ee,{color:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),Fr=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,stickers:Oe}:Ue)});try{await kk(ee,Oe)}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),La=O.useCallback((ee,Oe,Ee)=>{Re&&t(Ue=>{if(!Ue)return Ue;const Fn=Ue.cards.map(Mt=>{if(Mt.id!==ee)return Mt;const wt=[...Mt.stickers||[],{emoji:Re,x:Oe,y:Ee}];return kk(ee,wt).catch(Wt=>{et.show({color:"red",message:Wt.message}),xe()}),{...Mt,stickers:wt}});return{...Ue,cards:Fn}})},[Re,xe]),wr=O.useCallback((ee,Oe)=>{t(Ee=>{if(!Ee)return Ee;const Ue=Ee.cards.map(Fn=>{if(Fn.id!==ee)return Fn;const Mt=(Fn.stickers||[]).filter((wt,Wt)=>Wt!==Oe);return kk(ee,Mt).catch(wt=>{et.show({color:"red",message:wt.message}),xe()}),{...Fn,stickers:Mt}});return{...Ee,cards:Ue}})},[xe]),kr=O.useCallback((ee,Oe,Ee,Ue)=>{t(Fn=>{if(!Fn)return Fn;const Mt=Fn.cards.map(wt=>{if(wt.id!==ee)return wt;const Wt=(wt.stickers||[]).map((ar,Ba)=>Ba===Oe?{...ar,x:Ee,y:Ue}:ar);return{...wt,stickers:Wt}});return{...Fn,cards:Mt}})},[]),dn=O.useCallback(ee=>{t(Oe=>{if(!Oe)return Oe;const Ee=Oe.cards.find(Ue=>Ue.id===ee);return Ee&&Fr(ee,Ee.stickers||[]),Oe})},[Fr]),ti=O.useCallback(ee=>{Ro.open({title:ee.title,size:"md",children:k.jsx(aCe,{card:ee})})},[]),sn=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ue=>Ue.id===ee?{...Ue,locked:Oe}:Ue)});try{await vf(ee,{locked:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),_r=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,columns:Ee.columns.map(Ue=>Ue.id===ee?{...Ue,wip_limit:Oe}:Ue)});try{await pf(ee,{wip_limit:Oe})}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),Ia=O.useCallback(async(ee,Oe)=>{t(Ee=>Ee&&{...Ee,columns:Ee.columns.map(Ue=>Ue.id===ee?{...Ue,is_done:Oe}:Ue)});try{await pf(ee,{is_done:Oe}),xe()}catch(Ee){et.show({color:"red",message:Ee.message}),xe()}},[xe]),qr=O.useMemo(()=>({height:50}),[]),Hr=O.useMemo(()=>({width:We,breakpoint:"md",collapsed:{mobile:!Ve,desktop:!Ve}}),[We,Ve]),P0=O.useMemo(()=>({width:380,breakpoint:"md",collapsed:{mobile:!_,desktop:!_}}),[_]),rp=O.useMemo(()=>({main:{paddingInlineStart:0,paddingInlineEnd:0}}),[]);if(!n)return k.jsx(wn,{justify:"center",p:"xl",children:k.jsx(Wi,{})});const vl=a,Du=l?kn(l):null;return k.jsxs(Cre,{sensors:me,collisionDetection:a9e(c),onDragStart:jn,onDragOver:Jn,onDragEnd:On,children:[k.jsxs(mr,{header:qr,navbar:Hr,aside:P0,padding:0,styles:rp,children:[k.jsx(mr.Header,{children:k.jsxs(wn,{h:"100%",px:"md",justify:"space-between",children:[k.jsxs(wn,{gap:6,children:[k.jsx(Ht,{variant:Ve?"filled":"subtle",onClick:()=>He(ee=>!ee),"aria-label":"Toggle sidebar",children:k.jsx(Noe,{size:16})}),k.jsx(_S,{size:22}),k.jsx(_u,{order:4,children:"Kanban"}),k.jsx(Aa,{value:C,onChange:ee=>ee&&E(ee),variant:"pills",ml:"md",children:k.jsxs(Aa.List,{children:[k.jsx(Aa.Tab,{value:"board",leftSection:k.jsx(_S,{size:14}),children:"Tablero"}),k.jsx(Aa.Tab,{value:"dashboard",leftSection:k.jsx(doe,{size:14}),children:"Dashboard"}),k.jsx(Aa.Tab,{value:"calendar",leftSection:k.jsx(foe,{size:14}),children:"Calendario"})]})})]}),k.jsxs(wn,{gap:4,children:[k.jsx(Ht,{variant:"subtle",onClick:xe,"aria-label":"Refresh",children:k.jsx(Uoe,{size:16})}),k.jsx(Ht,{variant:_?"filled":"subtle",onClick:()=>S(ee=>!ee),"aria-label":"Toggle chat",children:k.jsx(zF,{size:16})}),e.user&&k.jsxs(Kn,{position:"bottom-end",shadow:"md",withArrow:!0,closeOnItemClick:!1,children:[k.jsx(Kn.Target,{children:k.jsx(Ht,{variant:"subtle","aria-label":"Usuario",children:k.jsx(ou,{size:26,radius:"xl",color:e.user.color||"blue",children:(e.user.display_name||e.user.username).slice(0,2).toUpperCase()})})}),k.jsxs(Kn.Dropdown,{children:[k.jsx(Kn.Label,{children:e.user.display_name||e.user.username}),k.jsxs(we,{p:"xs",children:[k.jsx(un,{size:"xs",c:"dimmed",mb:4,children:"Color del avatar"}),k.jsx(rW,{value:e.user.color||"",onChange:async ee=>{try{const Oe=await wM({color:ee});e.setUser(Oe)}catch(Oe){et.show({color:"red",message:Oe.message})}},options:lCe,onOpenCustom:()=>{var ee,Oe;_e((Oe=(ee=e.user)==null?void 0:ee.color)!=null&&Oe.startsWith("#")?e.user.color:"#888888"),De(!0)}})]}),k.jsx(Kn.Divider,{}),k.jsx(Kn.Item,{leftSection:k.jsx(Roe,{size:14}),color:"red",onClick:()=>e.logout(),children:"Cerrar sesion"})]})]})]})]})}),k.jsxs(mr.Navbar,{p:"xs",children:[k.jsx(we,{onMouseDown:Q,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:10},"aria-label":"Resize sidebar"}),k.jsxs($t,{gap:"xs",h:"100%",children:[k.jsx(un,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",children:"Columnas parqueadas"}),k.jsx(we,{style:{flex:1,overflowY:"auto"},children:k.jsx(wS,{items:on,strategy:XB,children:k.jsxs($t,{gap:"xs",children:[Ke.length===0&&k.jsx(un,{size:"xs",c:"dimmed",children:'Vacio. Mueve columnas aqui con el icono "archivar" en su cabecera.'}),Ke.map(ee=>k.jsx(b$,{column:ee,cards:mt.get(ee.id)??[],now:b,collapsed:!0,onAddCard:bt,onRenameColumn:Je,onResizeColumn:nn,onMoveColumnLocation:Ln,onDeleteColumn:In,onSetWIPLimit:_r,onToggleDone:Ia,onEditCard:xn,onDeleteCard:Ki,onChangeCardColor:Br,onShowHistory:ti,onToggleCardLock:sn,onAssignCard:di,onSetCardDeadline:Lt,highlightCardId:oe,onSetRequester:_n,requesterOptions:L,onOpenCustomCardColor:(Oe,Ee)=>Be({cardId:Oe,color:Ee}),activeSticker:Re,onAddSticker:La,onRemoveSticker:wr,onMoveSticker:kr,onCommitSticker:dn,users:i,usersById:hn},ee.id))]})})}),k.jsxs(we,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[k.jsx(Bt,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:k.jsx(Lh,{size:14}),rightSection:k.jsxs(wn,{gap:4,children:[k.jsx(ui,{size:"xs",variant:"light",color:A.length>0?"red":"gray",children:A.length}),j?k.jsx(jF,{size:12}):k.jsx(DF,{size:12})]}),onClick:()=>N(ee=>!ee),children:"Papelera"}),j&&k.jsxs($t,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[A.length===0&&k.jsx(un,{size:"xs",c:"dimmed",px:"xs",children:"Vacia."}),A.map(ee=>k.jsx(ei,{p:6,withBorder:!0,radius:"sm",bg:"dark.7",children:k.jsxs(wn,{justify:"space-between",gap:4,wrap:"nowrap",children:[k.jsx(un,{size:"xs",truncate:!0,style:{flex:1},title:ee.title,children:ee.title}),k.jsx(Vi,{label:"Restaurar",withArrow:!0,children:k.jsx(Ht,{size:"xs",variant:"subtle",color:"green",onClick:()=>za(ee.id),children:k.jsx(ioe,{size:12})})}),k.jsx(Vi,{label:"Borrar permanentemente",withArrow:!0,children:k.jsx(Ht,{size:"xs",variant:"subtle",color:"red",onClick:()=>mo(ee.id),children:k.jsx(Qoe,{size:12})})})]})},ee.id))]})]})]})]}),k.jsx(mr.Aside,{children:k.jsx(Lhe,{onBoardChange:xe})}),k.jsx(mr.Main,{children:C==="dashboard"?k.jsx(we,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:k.jsx(tCe,{users:i})}):C==="calendar"?k.jsx(we,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:k.jsx(Bhe,{users:i,cards:n.cards,onJumpToCard:Wn})}):k.jsxs(we,{style:{height:"calc(100vh - 50px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:[k.jsxs(wn,{gap:"xs",p:"xs",wrap:"wrap",align:"end",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[k.jsx(il,{leftSection:k.jsx(Woe,{size:14}),placeholder:"Buscar (titulo, descripcion, solicitante, tag)",value:G,onChange:ee=>H(ee.currentTarget.value),rightSection:G?k.jsx(Ht,{size:"sm",variant:"subtle",color:"gray",onClick:()=>H(""),"aria-label":"Limpiar",children:k.jsx(rh,{size:14})}):null,style:{minWidth:280,flex:1},size:"xs"}),k.jsx(Zo,{placeholder:"Asignado",value:U,onChange:P,data:i.map(ee=>({value:ee.id,label:ee.display_name||ee.username})),clearable:!0,searchable:!0,size:"xs",style:{minWidth:160},disabled:V}),k.jsx(nl,{size:"xs",label:"Sin asignar",checked:V,onChange:ee=>{const Oe=ee.currentTarget.checked;W(Oe),Oe&&P(null)}}),k.jsx(nl,{size:"xs",label:"Con deadline",checked:le,onChange:ee=>ye(ee.currentTarget.checked)}),k.jsx(Zo,{placeholder:"Solicitante",value:z,onChange:F,data:L,clearable:!0,searchable:!0,size:"xs",style:{minWidth:160}}),k.jsx(_y,{placeholder:"Tags",value:Y,onChange:D,data:q,clearable:!0,searchable:!0,size:"xs",style:{minWidth:200}}),k.jsx(lu,{placeholder:"Desde",value:$,onChange:ee=>X(ee?new Date(ee):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),k.jsx(lu,{placeholder:"Hasta",value:te,onChange:ee=>ae(ee?new Date(ee):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),k.jsxs(wn,{gap:4,children:[k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const ee=new Date;X(ee),ae(ee)},children:"Hoy"}),k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const ee=new Date,Oe=new Date;Oe.setDate(Oe.getDate()-7),X(Oe),ae(ee)},children:"7d"}),k.jsx(Bt,{size:"xs",variant:"default",onClick:()=>{const ee=new Date,Oe=new Date;Oe.setDate(Oe.getDate()-30),X(Oe),ae(ee)},children:"30d"})]}),k.jsx(i9e,{opened:ke,onClose:()=>ie(!1),onSelect:ee=>pe(ee),target:k.jsx(Bt,{size:"xs",variant:Re?"filled":"default",color:Re?"yellow":void 0,leftSection:k.jsx(Loe,{size:14}),onClick:()=>{Re?ie(ee=>!ee):pe("😀")},children:Re?`Modo sticker: ${Re}`:"Stickers"})}),Re&&k.jsx(Bt,{size:"xs",variant:"subtle",color:"gray",leftSection:k.jsx(rh,{size:12}),onClick:()=>pe(null),children:"ESC"}),zn&&k.jsx(Bt,{size:"xs",variant:"subtle",color:"gray",leftSection:k.jsx(rh,{size:12}),onClick:()=>{H(""),P(null),W(!1),F(null),D([]),X(null),ae(null),ye(!1)},children:"Limpiar"})]}),k.jsx(wS,{items:An,strategy:Yre,children:k.jsxs(wn,{align:"stretch",wrap:"nowrap",gap:"md",p:"md",style:{flex:1,overflowX:"auto",overflowY:"hidden"},children:[Ze.map(ee=>k.jsx(b$,{column:ee,cards:mt.get(ee.id)??[],now:b,onAddCard:bt,onRenameColumn:Je,onResizeColumn:nn,onMoveColumnLocation:Ln,onDeleteColumn:In,onSetWIPLimit:_r,onToggleDone:Ia,onEditCard:xn,onDeleteCard:Ki,onChangeCardColor:Br,onShowHistory:ti,onToggleCardLock:sn,onAssignCard:di,onSetCardDeadline:Lt,highlightCardId:oe,onSetRequester:_n,requesterOptions:L,activeSticker:Re,onAddSticker:La,onRemoveSticker:wr,onMoveSticker:kr,onCommitSticker:dn,users:i,usersById:hn},ee.id)),k.jsx(we,{style:{minWidth:280,maxWidth:320},children:d?k.jsxs($t,{gap:4,children:[k.jsx(il,{size:"xs",placeholder:"Nombre de columna...",value:v,onChange:ee=>y(ee.currentTarget.value),autoFocus:!0,onKeyDown:ee=>{ee.key==="Enter"&&Qe(),ee.key==="Escape"&&(p(!1),y(""))}}),k.jsxs(wn,{gap:4,children:[k.jsx(Bt,{size:"xs",onClick:Qe,children:"Anadir"}),k.jsx(Ht,{variant:"subtle",color:"gray",onClick:()=>p(!1),children:k.jsx(rh,{size:14})})]})]}):k.jsx(Bt,{variant:"light",color:"gray",leftSection:k.jsx(zh,{size:14}),onClick:()=>p(!0),children:"Anadir columna"})})]})})]})})]}),k.jsx(Ure,{children:vl?k.jsx(aW,{card:vl,now:b,onDelete:()=>{},onEdit:()=>{},onChangeColor:()=>{},onShowHistory:()=>{},onToggleLock:()=>{},onAssign:()=>{},users:i,assignee:vl.assignee_id?hn.get(vl.assignee_id):void 0,isOverlay:!0}):Du?k.jsx(we,{style:{width:Du.location==="sidebar"?220:Du.width,padding:8,background:tW(""),border:`1px solid ${dA("")}`,borderRadius:8,opacity:.9},children:k.jsx(un,{fw:600,size:"sm",children:Du.name})}):null}),k.jsx(e6,{opened:Ce,onClose:()=>De(!1),value:be,onAccept:async ee=>{_e(ee);try{const Oe=await wM({color:ee});e.setUser(Oe)}catch(Oe){et.show({color:"red",message:Oe.message})}}}),k.jsx(e6,{opened:!!Me,onClose:()=>Be(null),value:(Me==null?void 0:Me.color)||"#888888",onAccept:ee=>{Me&&Br(Me.cardId,ee)}})]})}function s9e(){const e=AC(),[n,t]=O.useState("login"),[i,r]=O.useState(""),[a,o]=O.useState(""),[l,f]=O.useState(""),[c,h]=O.useState(!1),[d,p]=O.useState(null),v=async y=>{y.preventDefault(),p(null),h(!0);try{n==="login"?await e.login(i.trim(),a):await e.register(i.trim(),a,l.trim()||i.trim())}catch(b){p(b.message)}finally{h(!1)}};return k.jsx(_c,{style:{minHeight:"100vh"},p:"md",children:k.jsx(ei,{p:"xl",withBorder:!0,radius:"md",shadow:"md",style:{width:360,maxWidth:"100%"},children:k.jsx("form",{onSubmit:v,children:k.jsxs($t,{gap:"md",children:[k.jsxs($t,{gap:4,align:"center",children:[k.jsx(_S,{size:36}),k.jsx(_u,{order:3,children:"Kanban"}),k.jsx(un,{size:"sm",c:"dimmed",children:n==="login"?"Inicia sesion":"Crea una cuenta"})]}),k.jsx(il,{label:"Usuario",value:i,onChange:y=>r(y.currentTarget.value),required:!0,autoFocus:!0,autoComplete:"username"}),n==="register"&&k.jsx(il,{label:"Nombre (opcional)",value:l,onChange:y=>f(y.currentTarget.value),autoComplete:"name"}),k.jsx(Ay,{label:"Contrasena",value:a,onChange:y=>o(y.currentTarget.value),required:!0,autoComplete:n==="login"?"current-password":"new-password"}),d&&k.jsx(un,{size:"sm",c:"red",children:d}),k.jsx(Bt,{type:"submit",loading:c,fullWidth:!0,children:n==="login"?"Entrar":"Registrar"}),k.jsxs(un,{size:"xs",c:"dimmed",ta:"center",children:[n==="login"?"No tienes cuenta?":"Ya tienes cuenta?"," ",k.jsx(z6,{component:"button",type:"button",size:"xs",onClick:()=>{p(null),t(n==="login"?"register":"login")},children:n==="login"?"Registrate":"Inicia sesion"})]})]})})})})}function l9e(){const{user:e,loading:n}=AC();return n?k.jsx(_c,{style:{minHeight:"100vh"},children:k.jsx(Wi,{})}):e?k.jsx(o9e,{}):k.jsx(s9e,{})}const u9e={primaryColor:"blue",fontFamily:"system-ui, -apple-system, sans-serif"};Wte.createRoot(document.getElementById("root")).render(k.jsx(sz,{theme:u9e,defaultColorScheme:"dark",children:k.jsxs(pte,{children:[k.jsx(fo,{position:"top-right"}),k.jsx(die,{children:k.jsx(l9e,{})})]})})); diff --git a/backend/dist/index.html b/backend/dist/index.html index c92b3b3..66e3a7d 100644 --- a/backend/dist/index.html +++ b/backend/dist/index.html @@ -4,7 +4,7 @@ Kanban - + diff --git a/backend/handlers.go b/backend/handlers.go index 179f767..5b467c1 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -330,7 +330,7 @@ func handlePurgeCard(db *DB) http.HandlerFunc { } } -func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger) []infra.Route { +func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken string) []infra.Route { return []infra.Route{ {Method: "POST", Path: "/api/auth/register", Handler: handleRegister(db)}, {Method: "POST", Path: "/api/auth/login", Handler: handleLogin(db)}, @@ -353,6 +353,8 @@ func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger) []infra.Route { {Method: "POST", Path: "/api/cards/{id}/restore", Handler: handleRestoreCard(db)}, {Method: "DELETE", Path: "/api/cards/{id}/purge", Handler: handlePurgeCard(db)}, {Method: "POST", Path: "/api/chat", Handler: handleChat(db, chatWorkdir, logger)}, + {Method: "GET", Path: "/api/chat/ws", Handler: handleChatWS(db, chatWorkdir, logger, internalToken)}, + {Method: "POST", Path: "/api/tool/{name}", Handler: handleInternalTool(db, internalToken, logger)}, {Method: "GET", Path: "/api/metrics", Handler: handleMetrics(db)}, {Method: "GET", Path: "/api/tags", Handler: handleListTags(db)}, {Method: "GET", Path: "/api/requesters", Handler: handleListRequesters(db)}, diff --git a/backend/internal_tool.go b/backend/internal_tool.go new file mode 100644 index 0000000..521228e --- /dev/null +++ b/backend/internal_tool.go @@ -0,0 +1,60 @@ +package main + +import ( + "crypto/rand" + "crypto/subtle" + "encoding/hex" + "encoding/json" + "io" + "net/http" + + "fn-registry/functions/infra" +) + +const internalTokenHeader = "X-Internal-Token" + +// generateInternalToken returns a 32-byte hex token used by the kanban-mcp +// subprocess to call back into /api/tool/{name}. Generated fresh per process. +func generateInternalToken() string { + b := make([]byte, 32) + if _, err := rand.Read(b); err != nil { + panic("rand.Read: " + err.Error()) + } + return hex.EncodeToString(b) +} + +// handleInternalTool exposes executeTool via HTTP for the MCP subprocess. +// Auth: shared internal token in X-Internal-Token header. Constant-time compare. +func handleInternalTool(db *DB, expectedToken string, logger *ChatLogger) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + got := r.Header.Get(internalTokenHeader) + if subtle.ConstantTimeCompare([]byte(got), []byte(expectedToken)) != 1 { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusUnauthorized, Code: "unauthorized", Message: "invalid internal token"}) + return + } + name := r.PathValue("name") + if name == "" { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusBadRequest, Code: "bad_request", Message: "tool name required"}) + return + } + body, err := io.ReadAll(http.MaxBytesReader(w, r.Body, maxBodyBytes)) + if err != nil { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusBadRequest, Code: "bad_request", Message: err.Error()}) + return + } + if len(body) == 0 { + body = []byte("{}") + } + input := json.RawMessage(body) + if err := validateToolName(name); err != nil { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusNotFound, Code: "unknown_tool", Message: err.Error()}) + return + } + res := executeTool(db, name, input) + if logger != nil { + logger.Log(name, input, res) + } + // Always 200 — MCP-side maps res.OK to MCP isError. + infra.HTTPJSONResponse(w, http.StatusOK, res) + } +} diff --git a/backend/main.go b/backend/main.go index cc9dc79..8dcde06 100644 --- a/backend/main.go +++ b/backend/main.go @@ -22,6 +22,15 @@ import ( var frontendDist embed.FS func main() { + // Subcommand `kanban mcp` runs as MCP server over stdio (spawned by claude -p). + if len(os.Args) > 1 && os.Args[1] == "mcp" { + if err := runMCPServer(os.Args[2:]); err != nil { + fmt.Fprintf(os.Stderr, "kanban mcp: %v\n", err) + os.Exit(1) + } + return + } + flags := flag.NewFlagSet("kanban", flag.ExitOnError) port := flags.Int("port", 8095, "HTTP port") dbPath := flags.String("db", "operations.db", "SQLite database path") @@ -37,10 +46,15 @@ func main() { bootstrapAdmin(db, *initialAdmin) startSessionCleanup(db) + internalToken := os.Getenv("KANBAN_INTERNAL_TOKEN") + if internalToken == "" { + internalToken = generateInternalToken() + } + wd := chatWorkdir(*dbPath) logger := newChatLogger(filepath.Join(wd, "chat.log")) log.Printf("chat tool log: %s", logger.path) - mux := infra.HTTPRouter(apiRoutes(db, wd, logger)) + mux := infra.HTTPRouter(apiRoutes(db, wd, logger, internalToken)) feHandler := frontendHandler() if feHandler != nil { @@ -53,7 +67,7 @@ func main() { authMW := infra.HTTPSessionCookieMiddleware(infra.SessionCookieConfig{ DB: db.conn, CookieName: cookieName, - SkipPaths: []string{"/api/auth/", "/health", "/assets/", "/index.html"}, + SkipPaths: []string{"/api/auth/", "/api/tool/", "/health", "/assets/", "/index.html"}, UserCtxKey: userCtxKey, }) diff --git a/backend/mcp.go b/backend/mcp.go new file mode 100644 index 0000000..a07f394 --- /dev/null +++ b/backend/mcp.go @@ -0,0 +1,302 @@ +package main + +import ( + "bytes" + "context" + "encoding/json" + "flag" + "fmt" + "io" + "net/http" + "os" + "os/signal" + "syscall" + "time" + + "fn-registry/functions/infra" +) + +// runMCPServer is the entry point for the `kanban mcp` subcommand. It runs +// stdio JSON-RPC and forwards each tool call to the kanban backend's +// /api/tool/{name} endpoint, authenticated with a shared internal token. +// +// Required env vars (set by the parent kanban process when generating mcp.json): +// KANBAN_BACKEND_URL — e.g. http://127.0.0.1:8095 +// KANBAN_INTERNAL_TOKEN — token to send in X-Internal-Token header +func runMCPServer(args []string) error { + fs := flag.NewFlagSet("kanban mcp", flag.ContinueOnError) + urlFlag := fs.String("url", os.Getenv("KANBAN_BACKEND_URL"), "kanban backend URL") + tokenFlag := fs.String("token", os.Getenv("KANBAN_INTERNAL_TOKEN"), "internal token") + if err := fs.Parse(args); err != nil { + return err + } + if *urlFlag == "" { + return fmt.Errorf("--url or KANBAN_BACKEND_URL required") + } + if *tokenFlag == "" { + return fmt.Errorf("--token or KANBAN_INTERNAL_TOKEN required") + } + + httpClient := &http.Client{Timeout: 30 * time.Second} + + tools := mcpToolDefs() + handler := func(ctx context.Context, name string, input json.RawMessage) (any, bool, error) { + body := []byte(input) + if len(body) == 0 { + body = []byte("{}") + } + req, err := http.NewRequestWithContext(ctx, "POST", *urlFlag+"/api/tool/"+name, bytes.NewReader(body)) + if err != nil { + return nil, false, err + } + req.Header.Set("Content-Type", "application/json") + req.Header.Set(internalTokenHeader, *tokenFlag) + resp, err := httpClient.Do(req) + if err != nil { + return nil, false, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + return nil, false, err + } + if resp.StatusCode >= 500 { + return nil, false, fmt.Errorf("backend %d: %s", resp.StatusCode, string(buf)) + } + // 4xx and 2xx both serialize as ToolResult JSON. Decode and map. + var tr ToolResult + if err := json.Unmarshal(buf, &tr); err != nil { + // Non-ToolResult body (e.g. unauthorized error envelope from infra). + return string(buf), resp.StatusCode >= 400, nil + } + if !tr.OK { + return tr.Error, true, nil + } + return tr.Result, false, nil + } + + ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) + defer cancel() + + return infra.ServeMCP(ctx, infra.MCPServerOpts{ + Name: "kanban", + Version: "1.0.0", + Tools: tools, + Handler: handler, + In: os.Stdin, + Out: os.Stdout, + Logger: os.Stderr, + }) +} + +// mcpToolDefs returns the JSON-Schema definitions for every kanban tool. +// Names match the executeTool dispatch table in tools.go. +func mcpToolDefs() []infra.MCPToolDef { + return []infra.MCPToolDef{ + { + Name: "list_board", + Description: "Lista columnas y tarjetas del tablero. Sin argumentos. Devuelve {columns, cards}.", + InputSchema: rawSchema(map[string]any{"type": "object", "properties": map[string]any{}}), + }, + { + Name: "create_column", + Description: "Crea una columna nueva. Devuelve la columna creada con su id.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "name": map[string]any{"type": "string", "description": "Nombre de la columna"}, + }, + "required": []string{"name"}, + }), + }, + { + Name: "update_column", + Description: "Modifica una columna existente. Pasa al menos uno: name, location ('board'|'sidebar'), width (200..800 px), wip_limit (0=sin limite), is_done (terminal: cards cuentan como completadas).", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{"type": "string"}, + "name": map[string]any{"type": "string"}, + "location": map[string]any{"type": "string", "enum": []string{"board", "sidebar"}}, + "width": map[string]any{"type": "integer"}, + "wip_limit": map[string]any{"type": "integer"}, + "is_done": map[string]any{"type": "boolean"}, + }, + "required": []string{"id"}, + }), + }, + { + Name: "rename_column", + Description: "Alias de update_column con solo {id, name}.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{"type": "string"}, + "name": map[string]any{"type": "string"}, + }, + "required": []string{"id", "name"}, + }), + }, + { + Name: "delete_column", + Description: "Elimina una columna y todas sus tarjetas (las envia a la papelera).", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{"type": "string"}, + }, + "required": []string{"id"}, + }), + }, + { + Name: "reorder_columns", + Description: "Reordena columnas. ids es el array completo de columnas en el nuevo orden.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "ids": map[string]any{"type": "array", "items": map[string]any{"type": "string"}}, + }, + "required": []string{"ids"}, + }), + }, + { + Name: "create_card", + Description: "Crea una tarjeta en una columna. column_id y title obligatorios.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "column_id": map[string]any{"type": "string"}, + "requester": map[string]any{"type": "string"}, + "title": map[string]any{"type": "string"}, + "description": map[string]any{"type": "string"}, + }, + "required": []string{"column_id", "title"}, + }), + }, + { + Name: "update_card", + Description: "Edita campos de una tarjeta. Color: blue|teal|violet|pink|orange|green|yellow|red|''. locked bloquea movimiento. assignee_id null para desasignar.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{"type": "string"}, + "requester": map[string]any{"type": "string"}, + "title": map[string]any{"type": "string"}, + "description": map[string]any{"type": "string"}, + "color": map[string]any{"type": "string"}, + "locked": map[string]any{"type": "boolean"}, + "assignee_id": map[string]any{"type": []string{"string", "null"}}, + }, + "required": []string{"id"}, + }), + }, + { + Name: "delete_card", + Description: "Envia una tarjeta a la papelera.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{"type": "string"}, + }, + "required": []string{"id"}, + }), + }, + { + Name: "move_card", + Description: "Mueve una tarjeta a otra columna. Si omites ordered_ids, se anade al final.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{"type": "string"}, + "column_id": map[string]any{"type": "string"}, + "ordered_ids": map[string]any{"type": "array", "items": map[string]any{"type": "string"}}, + }, + "required": []string{"id", "column_id"}, + }), + }, + { + Name: "card_history", + Description: "Devuelve el historial de cambios de una tarjeta.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{"type": "string"}, + }, + "required": []string{"id"}, + }), + }, + { + Name: "find_cards", + Description: "Busca tarjetas. query (texto en title/description/requester), column_id (filtra por columna), requester (filtra por solicitante).", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "query": map[string]any{"type": "string"}, + "column_id": map[string]any{"type": "string"}, + "requester": map[string]any{"type": "string"}, + }, + }), + }, + { + Name: "list_users", + Description: "Lista usuarios disponibles para asignar tarjetas.", + InputSchema: rawSchema(map[string]any{"type": "object", "properties": map[string]any{}}), + }, + { + Name: "assign_card", + Description: "Asigna o desasigna una tarjeta. assignee_id null para desasignar.", + InputSchema: rawSchema(map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{"type": "string"}, + "assignee_id": map[string]any{"type": []string{"string", "null"}}, + }, + "required": []string{"id"}, + }), + }, + } +} + +func rawSchema(s map[string]any) json.RawMessage { + b, err := json.Marshal(s) + if err != nil { + panic(err) + } + return b +} + +// writeMCPConfig writes a temporary mcp.json that points to this binary's +// `mcp` subcommand with the given URL and token. Returns the absolute path of +// the file created. Caller is responsible for removing it. +func writeMCPConfig(binPath, backendURL, token string) (string, error) { + cfg := map[string]any{ + "mcpServers": map[string]any{ + "kanban": map[string]any{ + "command": binPath, + "args": []string{"mcp"}, + "env": map[string]string{ + "KANBAN_BACKEND_URL": backendURL, + "KANBAN_INTERNAL_TOKEN": token, + }, + }, + }, + } + b, err := json.MarshalIndent(cfg, "", " ") + if err != nil { + return "", err + } + f, err := os.CreateTemp("", "kanban-mcp-*.json") + if err != nil { + return "", err + } + if _, err := f.Write(b); err != nil { + f.Close() + os.Remove(f.Name()) + return "", err + } + if err := f.Close(); err != nil { + os.Remove(f.Name()) + return "", err + } + return f.Name(), nil +} diff --git a/backend/tools.go b/backend/tools.go index 6b60250..68d6896 100644 --- a/backend/tools.go +++ b/backend/tools.go @@ -339,27 +339,6 @@ func toolFindCards(db *DB, input json.RawMessage) ToolResult { return okResult(out) } -// chatActionsRegex matches an ... block (DOTALL mode). -// Used by chat.go to extract tool invocations from the assistant's response. -var actionsBlockMarker = struct{ Open, Close string }{Open: "", Close: ""} - -func extractActions(text string) (jsonBlock string, stripped string, found bool) { - openIdx := strings.Index(text, actionsBlockMarker.Open) - if openIdx < 0 { - return "", text, false - } - closeIdx := strings.Index(text[openIdx:], actionsBlockMarker.Close) - if closeIdx < 0 { - return "", text, false - } - closeIdx += openIdx - jsonBlock = strings.TrimSpace(text[openIdx+len(actionsBlockMarker.Open) : closeIdx]) - before := strings.TrimRight(text[:openIdx], " \n\t") - after := strings.TrimLeft(text[closeIdx+len(actionsBlockMarker.Close):], " \n\t") - stripped = strings.TrimSpace(before + "\n" + after) - return jsonBlock, stripped, true -} - // validateToolName fails fast with clearer error than the dispatch's default. func validateToolName(name string) error { known := map[string]bool{ diff --git a/backend/tools_test.go b/backend/tools_test.go index f3f9c2f..8d50f31 100644 --- a/backend/tools_test.go +++ b/backend/tools_test.go @@ -340,37 +340,6 @@ func TestExecuteTool_Unknown(t *testing.T) { mustErr(t, res, "unknown tool") } -// --- extractActions --- - -func TestExtractActions(t *testing.T) { - cases := []struct { - name string - in string - want string - stripOK string - found bool - }{ - {"with block", "Hola\n[{\"tool\":\"x\"}]\nHecho", `[{"tool":"x"}]`, "Hola\nHecho", true}, - {"only block", "[]", `[]`, "", true}, - {"no block", "Solo texto", "", "Solo texto", false}, - {"unclosed", "foo", "", "foo", false}, - } - for _, c := range cases { - t.Run(c.name, func(t *testing.T) { - got, stripped, found := extractActions(c.in) - if found != c.found { - t.Fatalf("found = %v want %v", found, c.found) - } - if got != c.want { - t.Fatalf("got %q want %q", got, c.want) - } - if stripped != c.stripOK { - t.Fatalf("stripped = %q want %q", stripped, c.stripOK) - } - }) - } -} - // --- chat logger --- func TestChatLogger_AppendsJSONLines(t *testing.T) { diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 1f24d20..71ad66e 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -121,17 +121,73 @@ export interface ChatToolCall { tool: string; ok: boolean; error?: string; + input?: unknown; } -export interface ChatResponse { - role: "assistant"; - content: string; - board_changed: boolean; - tool_calls?: ChatToolCall[]; +// WebSocket streaming events emitted by /api/chat/ws. +export type ChatStreamEvent = + | { type: "delta"; text: string } + | { type: "tool_use"; tool_id: string; tool: string; input?: unknown } + | { type: "tool_result"; tool_id: string; result?: string; is_error?: boolean } + | { type: "result"; text?: string; is_error?: boolean } + | { type: "done"; board_changed?: boolean } + | { type: "error"; error: string }; + +// chatWSURL builds the absolute ws:// or wss:// URL of the streaming endpoint. +export function chatWSURL(): string { + const proto = window.location.protocol === "https:" ? "wss:" : "ws:"; + return `${proto}//${window.location.host}/api/chat/ws`; } -export function sendChat(messages: ChatMessage[]): Promise { - return fetchJSON("/chat", { method: "POST", body: JSON.stringify({ messages }) }); +// streamChat opens a WebSocket, sends the message history, and streams events +// to onEvent. Returns a Promise that resolves when the server closes the +// connection (after a "done" event) and rejects on transport errors. +export function streamChat( + messages: ChatMessage[], + onEvent: (ev: ChatStreamEvent) => void, + signal?: AbortSignal +): Promise { + return new Promise((resolve, reject) => { + const ws = new WebSocket(chatWSURL()); + let settled = false; + const finish = (err?: Error) => { + if (settled) return; + settled = true; + try { + ws.close(); + } catch { + /* ignore */ + } + if (err) reject(err); + else resolve(); + }; + + if (signal) { + const abort = () => finish(new Error("aborted")); + if (signal.aborted) { + abort(); + return; + } + signal.addEventListener("abort", abort, { once: true }); + } + + ws.onopen = () => { + ws.send(JSON.stringify({ messages })); + }; + ws.onmessage = (e) => { + try { + const ev = JSON.parse(typeof e.data === "string" ? e.data : "") as ChatStreamEvent; + onEvent(ev); + if (ev.type === "done" || ev.type === "error") { + finish(ev.type === "error" ? new Error(ev.error) : undefined); + } + } catch (err) { + finish(err as Error); + } + }; + ws.onerror = () => finish(new Error("websocket error")); + ws.onclose = () => finish(); + }); } export function login(username: string, password: string): Promise { diff --git a/frontend/src/components/ChatPanel.tsx b/frontend/src/components/ChatPanel.tsx index 0e69e57..51caab4 100644 --- a/frontend/src/components/ChatPanel.tsx +++ b/frontend/src/components/ChatPanel.tsx @@ -16,7 +16,7 @@ import { IconMessageChatbot, IconSend, IconTrash } from "@tabler/icons-react"; import { KeyboardEvent, useEffect, useRef, useState } from "react"; import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; -import { ChatMessage, ChatToolCall, sendChat } from "../api"; +import { ChatMessage, ChatStreamEvent, ChatToolCall, streamChat } from "../api"; const STORAGE_KEY = "kanban_chat_v1"; @@ -44,7 +44,11 @@ function loadStored(): StoredMessage[] { export function ChatPanel({ onBoardChange }: Props) { const [messages, setMessages] = useState(() => loadStored()); const [input, setInput] = useState(""); - const [loading, setLoading] = useState(false); + const [streaming, setStreaming] = useState(false); + // Live in-flight assistant turn: incremental text + tool calls collected so + // far. When the turn finishes (done/error) it is committed to messages. + const [liveText, setLiveText] = useState(""); + const [liveCalls, setLiveCalls] = useState([]); const scrollRef = useRef(null); useEffect(() => { @@ -53,35 +57,89 @@ export function ChatPanel({ onBoardChange }: Props) { useEffect(() => { scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight, behavior: "smooth" }); - }, [messages, loading]); + }, [messages, liveText, liveCalls, streaming]); const send = async () => { const text = input.trim(); - if (!text || loading) return; + if (!text || streaming) return; const userMsg: StoredMessage = { role: "user", content: text, ts: Date.now() }; const next = [...messages, userMsg]; setMessages(next); setInput(""); - setLoading(true); + setStreaming(true); + setLiveText(""); + setLiveCalls([]); + + let accumulatedText = ""; + const accumulatedCalls: ChatToolCall[] = []; + let boardChanged = false; + + const onEvent = (ev: ChatStreamEvent) => { + switch (ev.type) { + case "delta": + accumulatedText += ev.text; + setLiveText(accumulatedText); + break; + case "tool_use": { + const call: ChatToolCall = { tool: ev.tool, ok: true, input: ev.input }; + accumulatedCalls.push(call); + setLiveCalls([...accumulatedCalls]); + break; + } + case "tool_result": { + // Map by reverse order: the latest tool_use without is_error set. + for (let i = accumulatedCalls.length - 1; i >= 0; i--) { + const c = accumulatedCalls[i]; + if (c.error === undefined && c.ok) { + if (ev.is_error) { + c.ok = false; + c.error = ev.result || "tool error"; + } + break; + } + } + setLiveCalls([...accumulatedCalls]); + break; + } + case "result": + if (ev.text) { + // Final result text replaces the streamed delta only when no + // delta was emitted (some claude paths only emit the final). + if (accumulatedText.trim() === "") { + accumulatedText = ev.text; + setLiveText(accumulatedText); + } + } + break; + case "done": + if (ev.board_changed) boardChanged = true; + break; + case "error": + accumulatedText = `Error: ${ev.error}`; + setLiveText(accumulatedText); + break; + } + }; + try { const payload: ChatMessage[] = next.map((m) => ({ role: m.role, content: m.content })); - const res = await sendChat(payload); + await streamChat(payload, onEvent); + } catch (e) { + const msg = (e as Error).message; + notifications.show({ color: "red", message: msg }); + accumulatedText = accumulatedText || `Error: ${msg}`; + } finally { const assistant: StoredMessage = { role: "assistant", - content: res.content, + content: accumulatedText, ts: Date.now(), - tool_calls: res.tool_calls, + tool_calls: accumulatedCalls.length > 0 ? accumulatedCalls : undefined, }; setMessages((prev) => [...prev, assistant]); - if (res.board_changed) onBoardChange(); - } catch (e) { - notifications.show({ color: "red", message: (e as Error).message }); - setMessages((prev) => [ - ...prev, - { role: "assistant", content: `Error: ${(e as Error).message}`, ts: Date.now() }, - ]); - } finally { - setLoading(false); + setLiveText(""); + setLiveCalls([]); + setStreaming(false); + if (boardChanged) onBoardChange(); } }; @@ -115,7 +173,7 @@ export function ChatPanel({ onBoardChange }: Props) { - {messages.length === 0 && ( + {messages.length === 0 && !streaming && ( Escribe algo. Ejemplos:
- "crea columna Backlog" @@ -126,7 +184,18 @@ export function ChatPanel({ onBoardChange }: Props) { {messages.map((m, i) => ( ))} - {loading && ( + {streaming && ( + 0 ? liveCalls : undefined, + }} + streaming + /> + )} + {streaming && liveText === "" && liveCalls.length === 0 && ( @@ -144,7 +213,7 @@ export function ChatPanel({ onBoardChange }: Props) { value={input} onChange={(e) => setInput(e.currentTarget.value)} onKeyDown={onKey} - disabled={loading} + disabled={streaming} autosize minRows={1} maxRows={6} @@ -154,10 +223,10 @@ export function ChatPanel({ onBoardChange }: Props) { size="lg" variant="filled" onClick={send} - disabled={!input.trim() || loading} + disabled={!input.trim() || streaming} aria-label="Send" > - {loading ? : } + {streaming ? : }
@@ -165,7 +234,7 @@ export function ChatPanel({ onBoardChange }: Props) { ); } -function ChatBubble({ msg }: { msg: StoredMessage }) { +function ChatBubble({ msg, streaming = false }: { msg: StoredMessage; streaming?: boolean }) { const isUser = msg.role === "user"; return ( {msg.content} )} + {streaming && msg.content && ( + + )} {msg.tool_calls && msg.tool_calls.length > 0 && ( {msg.tool_calls.map((c, i) => ( @@ -193,6 +265,7 @@ function ChatBubble({ msg }: { msg: StoredMessage }) { color={c.ok ? "teal" : "red"} variant="light" title={c.error || ""} + leftSection={c.ok && streaming ? : null} > {c.tool} {!c.ok && c.error ? `: ${c.error}` : ""}