claude-alfred 0.3.18 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +2 -2
- package/dist/{directives-BtMZZnDe.mjs → directives-jCRY8FPs.mjs} +1 -1
- package/dist/{dispatcher-Bl7px8hy.mjs → dispatcher-CUM_UdiH.mjs} +6 -6
- package/dist/{post-tool-BL5YKl-j.mjs → post-tool-BFjB7Vfy.mjs} +4 -4
- package/dist/{post-tool-BRoelm73.mjs → post-tool-BiEyDlxA.mjs} +5 -5
- package/dist/{pre-compact-DEqTQ_7v.mjs → pre-compact-D7W4O3Y_.mjs} +1 -1
- package/dist/{pre-tool-YJGmHuiU.mjs → pre-tool-BpWBnQvU.mjs} +14 -5
- package/dist/{review-gate-0cGEW7jx.mjs → review-gate-7Pfe_A-8.mjs} +1 -1
- package/dist/{server-D6O26zY4.mjs → server-BWopwmFf.mjs} +22 -8
- package/dist/{session-start-CrZszyvc.mjs → session-start-CP1IZ6YR.mjs} +3 -3
- package/dist/{state-XSGGyez_.mjs → state-Cih-8_Zc.mjs} +1 -1
- package/dist/{stop-gh3SchT6.mjs → stop-CGv96IQd.mjs} +2 -2
- package/dist/{user-prompt-la6CpECb.mjs → user-prompt-CGXinE9K.mjs} +3 -3
- package/package.json +1 -1
- package/web/dist/assets/activity-BMH0Gseq.js +3 -0
- package/web/dist/assets/alert-dialog-Df-NKKik.js +20 -0
- package/web/dist/assets/badge-C_nJR3_P.js +201033 -0
- package/web/dist/assets/button-BC81_2hy.js +1 -0
- package/web/dist/assets/card-D-KKTUrZ.js +1 -0
- package/web/dist/assets/dist-CCslGrjS.js +1 -0
- package/web/dist/assets/dist-CbLvV7YE.js +1 -0
- package/web/dist/assets/es2015-C0wv2Iox.js +41 -0
- package/web/dist/assets/index-BedjjxO2.css +1 -0
- package/web/dist/assets/index-ClD5S_3_.js +138 -0
- package/web/dist/assets/{knowledge-LD7oJZlx.js → knowledge-Cf76s4T9.js} +15 -16
- package/web/dist/assets/link-CfxeT0ji.js +1 -0
- package/web/dist/assets/progress-3fcfVnZl.js +6 -0
- package/web/dist/assets/routes-DZR7VbL6.js +1 -0
- package/web/dist/assets/skeleton-ByYY54GV.js +1 -0
- package/web/dist/assets/stagger-container-ClpnejW9.js +9 -0
- package/web/dist/assets/tasks-Byg4aFbV.js +1 -0
- package/web/dist/assets/tasks._slug-jxqMGzVd.js +44 -0
- package/web/dist/assets/types-CkMKNgId.js +2 -0
- package/web/dist/assets/useParams-BHiGLTRd.js +1 -0
- package/web/dist/index.html +7 -8
- package/web/dist/assets/activity-CzZrE_QY.js +0 -3
- package/web/dist/assets/alert-dialog-D5PKR53z.js +0 -20
- package/web/dist/assets/badge-DgM3iKyt.js +0 -1
- package/web/dist/assets/button-DkTXEcD5.js +0 -1
- package/web/dist/assets/card-vK2sRsj-.js +0 -1
- package/web/dist/assets/circle-check-BKE9ARzZ.js +0 -1
- package/web/dist/assets/circle-dot-BJ3OE8c_.js +0 -1
- package/web/dist/assets/circle-x-Dm6UzSAN.js +0 -1
- package/web/dist/assets/dist--CtOhrF2.js +0 -1
- package/web/dist/assets/dist-Cf6nVN8I.js +0 -1
- package/web/dist/assets/dist-DE962N_y.js +0 -45
- package/web/dist/assets/dist-DLwb6UpP.js +0 -1
- package/web/dist/assets/index-DfH7KeDV.js +0 -10
- package/web/dist/assets/index-DrLAcxuP.css +0 -1
- package/web/dist/assets/link-CAi43xT3.js +0 -1
- package/web/dist/assets/pagination-BqkDMZUB.js +0 -1
- package/web/dist/assets/progress-DYmlPvUc.js +0 -6
- package/web/dist/assets/routes-gxkj1JSU.js +0 -1
- package/web/dist/assets/skeleton-buYY2z2y.js +0 -1
- package/web/dist/assets/tasks-Bkob94PT.js +0 -1
- package/web/dist/assets/tasks._slug-BgkUKQbV.js +0 -44
- package/web/dist/assets/tooltip-Dm8Qh6uo.js +0 -1
- package/web/dist/assets/types-DYpjOjcU.js +0 -1
- package/web/dist/assets/useParams-8NE9ytei.js +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -371,7 +371,7 @@ const main = defineCommand({
|
|
|
371
371
|
async run() {
|
|
372
372
|
const { Store } = await import("./store-BffM-bi-.mjs").then((n) => (n.t(), n.r));
|
|
373
373
|
const { Embedder } = await import("./embedder-D3hJoryD.mjs");
|
|
374
|
-
const { serveMCP } = await import("./server-
|
|
374
|
+
const { serveMCP } = await import("./server-BWopwmFf.mjs");
|
|
375
375
|
const store = Store.openDefault();
|
|
376
376
|
let emb = null;
|
|
377
377
|
try {
|
|
@@ -422,7 +422,7 @@ const main = defineCommand({
|
|
|
422
422
|
description: "Event name"
|
|
423
423
|
} },
|
|
424
424
|
async run({ args }) {
|
|
425
|
-
const { runHook } = await import("./dispatcher-
|
|
425
|
+
const { runHook } = await import("./dispatcher-CUM_UdiH.mjs").then((n) => (n.i(), n.t));
|
|
426
426
|
await runHook(args.event);
|
|
427
427
|
}
|
|
428
428
|
}),
|
|
@@ -3,7 +3,7 @@ import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
|
|
|
3
3
|
import { c as incrementHitCount, f as searchKnowledgeKeyword, i as getKnowledgeByIDs, l as init_knowledge } from "./knowledge-C7rEfFSX.mjs";
|
|
4
4
|
import { r as vectorSearchKnowledge, t as init_vectors } from "./vectors-DHZGQ096.mjs";
|
|
5
5
|
import { a as subTypeBoost, i as searchKnowledgeFTS, o as subTypeHalfLife, r as init_fts } from "./fts-DICqcpG_.mjs";
|
|
6
|
-
import { i as init_dispatcher, n as emitAdditionalContext } from "./dispatcher-
|
|
6
|
+
import { i as init_dispatcher, n as emitAdditionalContext } from "./dispatcher-CUM_UdiH.mjs";
|
|
7
7
|
//#region src/mcp/helpers.ts
|
|
8
8
|
function truncate(s, maxLen) {
|
|
9
9
|
const runes = [...s];
|
|
@@ -89,27 +89,27 @@ async function runHook(event) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
async function handleSessionStart(ev, signal) {
|
|
92
|
-
const { sessionStart } = await import("./session-start-
|
|
92
|
+
const { sessionStart } = await import("./session-start-CP1IZ6YR.mjs");
|
|
93
93
|
await sessionStart(ev, signal);
|
|
94
94
|
}
|
|
95
95
|
async function handlePreCompact(ev, signal) {
|
|
96
|
-
const { preCompact } = await import("./pre-compact-
|
|
96
|
+
const { preCompact } = await import("./pre-compact-D7W4O3Y_.mjs");
|
|
97
97
|
await preCompact(ev, signal);
|
|
98
98
|
}
|
|
99
99
|
async function handleUserPromptSubmit(ev, signal) {
|
|
100
|
-
const { userPromptSubmit } = await import("./user-prompt-
|
|
100
|
+
const { userPromptSubmit } = await import("./user-prompt-CGXinE9K.mjs");
|
|
101
101
|
await userPromptSubmit(ev, signal);
|
|
102
102
|
}
|
|
103
103
|
async function handlePostToolUse(ev, signal) {
|
|
104
|
-
const { postToolUse } = await import("./post-tool-
|
|
104
|
+
const { postToolUse } = await import("./post-tool-BiEyDlxA.mjs");
|
|
105
105
|
await postToolUse(ev, signal);
|
|
106
106
|
}
|
|
107
107
|
async function handlePreToolUse(ev, _signal) {
|
|
108
|
-
const { preToolUse } = await import("./pre-tool-
|
|
108
|
+
const { preToolUse } = await import("./pre-tool-BpWBnQvU.mjs");
|
|
109
109
|
await preToolUse(ev);
|
|
110
110
|
}
|
|
111
111
|
async function handleStop(ev, _signal) {
|
|
112
|
-
const { stop } = await import("./stop-
|
|
112
|
+
const { stop } = await import("./stop-CGv96IQd.mjs");
|
|
113
113
|
await stop(ev);
|
|
114
114
|
}
|
|
115
115
|
var init_dispatcher = __esmMin((() => {}));
|
|
@@ -5,11 +5,11 @@ import { n as init_audit, t as appendAudit } from "./audit-e13xK9Fr.mjs";
|
|
|
5
5
|
import { a as getKnowledgeStats, d as promoteSubType, l as init_knowledge, m as upsertKnowledge, o as getPromotionCandidates, r as getKnowledgeByID } from "./knowledge-C7rEfFSX.mjs";
|
|
6
6
|
import { i as searchKnowledgeFTS, r as init_fts, t as detectKnowledgeConflicts } from "./fts-DICqcpG_.mjs";
|
|
7
7
|
import { n as init_project, t as detectProject } from "./project-DCKke4_Q.mjs";
|
|
8
|
-
import { a as notifyUser, i as init_dispatcher } from "./dispatcher-
|
|
9
|
-
import { a as trackHitCounts, i as searchPipeline, n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-
|
|
8
|
+
import { a as notifyUser, i as init_dispatcher } from "./dispatcher-CUM_UdiH.mjs";
|
|
9
|
+
import { a as trackHitCounts, i as searchPipeline, n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-jCRY8FPs.mjs";
|
|
10
10
|
import { n as openDefaultCached, t as init_store } from "./store-BffM-bi-.mjs";
|
|
11
|
-
import { a as writeReviewGate, d as init_spec_guard, n as init_review_gate, p as isSpecFilePath } from "./review-gate-
|
|
12
|
-
import {
|
|
11
|
+
import { a as writeReviewGate, d as init_spec_guard, n as init_review_gate, p as isSpecFilePath } from "./review-gate-7Pfe_A-8.mjs";
|
|
12
|
+
import { f as writeStateText, i as parseWaveProgress, o as readStateText, p as writeWaveProgress, r as init_state, s as readWaveProgress, t as addWorkedSlug } from "./state-Cih-8_Zc.mjs";
|
|
13
13
|
import { mkdirSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
14
14
|
import { join } from "node:path";
|
|
15
15
|
import { createHash } from "node:crypto";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./types-K2jxpWyU.mjs";
|
|
3
3
|
import "./audit-e13xK9Fr.mjs";
|
|
4
|
-
import "./dispatcher-
|
|
5
|
-
import "./directives-
|
|
6
|
-
import { a as postToolUse, n as init_post_tool } from "./post-tool-
|
|
4
|
+
import "./dispatcher-CUM_UdiH.mjs";
|
|
5
|
+
import "./directives-jCRY8FPs.mjs";
|
|
6
|
+
import { a as postToolUse, n as init_post_tool } from "./post-tool-BFjB7Vfy.mjs";
|
|
7
7
|
import "./store-BffM-bi-.mjs";
|
|
8
|
-
import "./review-gate-
|
|
9
|
-
import "./state-
|
|
8
|
+
import "./review-gate-7Pfe_A-8.mjs";
|
|
9
|
+
import "./state-Cih-8_Zc.mjs";
|
|
10
10
|
init_post_tool();
|
|
11
11
|
export { postToolUse };
|
|
@@ -5,7 +5,7 @@ import { r as init_epic, s as syncTaskStatus } from "./epic-CfxJ13zy.mjs";
|
|
|
5
5
|
import { n as init_audit, t as appendAudit } from "./audit-e13xK9Fr.mjs";
|
|
6
6
|
import { l as init_knowledge, m as upsertKnowledge } from "./knowledge-C7rEfFSX.mjs";
|
|
7
7
|
import { n as init_project, t as detectProject } from "./project-DCKke4_Q.mjs";
|
|
8
|
-
import { a as notifyUser, i as init_dispatcher } from "./dispatcher-
|
|
8
|
+
import { a as notifyUser, i as init_dispatcher } from "./dispatcher-CUM_UdiH.mjs";
|
|
9
9
|
import { n as openDefaultCached, t as init_store } from "./store-BffM-bi-.mjs";
|
|
10
10
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
11
11
|
import { join } from "node:path";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
|
|
3
3
|
import { a as effectiveStatus, s as init_types } from "./types-K2jxpWyU.mjs";
|
|
4
|
-
import { d as init_spec_guard, f as isActiveSpecMalformed, l as denyTool, m as tryReadActiveSpec, n as init_review_gate, o as allowTool, p as isSpecFilePath, r as isGateActive } from "./review-gate-
|
|
5
|
-
import "./state-
|
|
4
|
+
import { d as init_spec_guard, f as isActiveSpecMalformed, l as denyTool, m as tryReadActiveSpec, n as init_review_gate, o as allowTool, p as isSpecFilePath, r as isGateActive } from "./review-gate-7Pfe_A-8.mjs";
|
|
5
|
+
import { a as readStateJSON, r as init_state } from "./state-Cih-8_Zc.mjs";
|
|
6
6
|
//#region src/hooks/pre-tool.ts
|
|
7
7
|
/**
|
|
8
8
|
* PreToolUse handler: block Edit/Write on review-gate or unapproved spec.
|
|
9
9
|
* Enforcement order: .alfred/ exempt → malformed check → review-gate → approval gate.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Uses allowTool() for: .alfred/ files, deferred/cancelled specs, and active specs with cleared gates.
|
|
11
|
+
* Only falls through to prompt hook (LLM judge) when NO active spec exists.
|
|
12
12
|
*/
|
|
13
13
|
async function preToolUse(ev) {
|
|
14
14
|
const toolName = ev.tool_name ?? "";
|
|
@@ -40,7 +40,14 @@ async function preToolUse(ev) {
|
|
|
40
40
|
].join("\n"));
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
if (!spec)
|
|
43
|
+
if (!spec) {
|
|
44
|
+
const polish = readStateJSON(ev.cwd, "polish.json", {});
|
|
45
|
+
if (polish.slug) {
|
|
46
|
+
allowTool(`Polish mode (post-complete '${polish.slug}')`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
44
51
|
if ([
|
|
45
52
|
"M",
|
|
46
53
|
"L",
|
|
@@ -53,6 +60,7 @@ async function preToolUse(ev) {
|
|
|
53
60
|
].join("\n"));
|
|
54
61
|
return;
|
|
55
62
|
}
|
|
63
|
+
allowTool(`Active spec '${spec.slug}' (${spec.size}), gates clear`);
|
|
56
64
|
}
|
|
57
65
|
var BLOCKABLE_TOOLS;
|
|
58
66
|
//#endregion
|
|
@@ -60,6 +68,7 @@ __esmMin((() => {
|
|
|
60
68
|
init_types();
|
|
61
69
|
init_review_gate();
|
|
62
70
|
init_spec_guard();
|
|
71
|
+
init_state();
|
|
63
72
|
BLOCKABLE_TOOLS = new Set(["Edit", "Write"]);
|
|
64
73
|
}))();
|
|
65
74
|
export { preToolUse };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
|
|
3
3
|
import { l as readActiveState, s as init_types } from "./types-K2jxpWyU.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { a as readStateJSON, d as writeStateJSON, r as init_state } from "./state-Cih-8_Zc.mjs";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { join, resolve } from "node:path";
|
|
7
7
|
//#region src/hooks/spec-guard.ts
|
|
@@ -6,13 +6,13 @@ import { n as init_audit, t as appendAudit } from "./audit-e13xK9Fr.mjs";
|
|
|
6
6
|
import { i as getKnowledgeByIDs, l as init_knowledge } from "./knowledge-C7rEfFSX.mjs";
|
|
7
7
|
import { r as vectorSearchKnowledge, t as init_vectors } from "./vectors-DHZGQ096.mjs";
|
|
8
8
|
import { a as subTypeBoost, i as searchKnowledgeFTS, r as init_fts } from "./fts-DICqcpG_.mjs";
|
|
9
|
-
import "./dispatcher-
|
|
10
|
-
import { o as truncate, r as init_helpers } from "./directives-
|
|
11
|
-
import { c as updateTaskStatus, l as handleLedger, n as init_post_tool, o as post_tool_exports, s as init_status, u as init_ledger } from "./post-tool-
|
|
9
|
+
import "./dispatcher-CUM_UdiH.mjs";
|
|
10
|
+
import { o as truncate, r as init_helpers } from "./directives-jCRY8FPs.mjs";
|
|
11
|
+
import { c as updateTaskStatus, l as handleLedger, n as init_post_tool, o as post_tool_exports, s as init_status, u as init_ledger } from "./post-tool-BFjB7Vfy.mjs";
|
|
12
12
|
import "./store-BffM-bi-.mjs";
|
|
13
|
-
import { a as writeReviewGate, i as readReviewGate, n as init_review_gate, t as clearReviewGate } from "./review-gate-
|
|
14
|
-
import { d as
|
|
15
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
13
|
+
import { a as writeReviewGate, i as readReviewGate, n as init_review_gate, t as clearReviewGate } from "./review-gate-7Pfe_A-8.mjs";
|
|
14
|
+
import { d as writeStateJSON, n as ensureStateDir, p as writeWaveProgress, r as init_state, s as readWaveProgress, u as stateDir } from "./state-Cih-8_Zc.mjs";
|
|
15
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { join, resolve } from "node:path";
|
|
17
17
|
import process$1 from "node:process";
|
|
18
18
|
//#region node_modules/zod/v3/helpers/util.js
|
|
@@ -18359,9 +18359,9 @@ function validateSpec(projectPath, taskSlug, size, specType, opts) {
|
|
|
18359
18359
|
const lines = testSpecsContent.split("\n");
|
|
18360
18360
|
let currentTS = "";
|
|
18361
18361
|
for (const line of lines) {
|
|
18362
|
-
const tsMatch = line.match(
|
|
18362
|
+
const tsMatch = line.match(/#{2,3}\s+(TS-\d+\.\d+)/);
|
|
18363
18363
|
if (tsMatch) currentTS = tsMatch[1];
|
|
18364
|
-
if (currentTS && /^-\s*Source:\s*(FR-\d+|NFR-\d+)/i.test(line)) tsWithSource.add(currentTS);
|
|
18364
|
+
if (currentTS && (/^-\s*Source:\s*(FR-\d+|NFR-\d+)/i.test(line) || /<!--\s*source:\s*(FR-\d+|NFR-\d+)/i.test(line))) tsWithSource.add(currentTS);
|
|
18365
18365
|
}
|
|
18366
18366
|
const noSource = tsIDs.filter((ts) => !tsWithSource.has(ts));
|
|
18367
18367
|
checks.push(noSource.length === 0 ? {
|
|
@@ -18970,6 +18970,9 @@ async function dossierInit(projectPath, store, emb, params) {
|
|
|
18970
18970
|
detail: params.description,
|
|
18971
18971
|
user: "mcp"
|
|
18972
18972
|
});
|
|
18973
|
+
try {
|
|
18974
|
+
unlinkSync(join(stateDir(projectPath), "polish.json"));
|
|
18975
|
+
} catch {}
|
|
18973
18976
|
const result = {
|
|
18974
18977
|
task_slug: params.task_slug,
|
|
18975
18978
|
spec_dir: initResult.specDir.dir(),
|
|
@@ -19046,10 +19049,18 @@ async function searchRelatedKnowledge(store, emb, description, limit) {
|
|
|
19046
19049
|
//#region src/mcp/dossier/lifecycle.ts
|
|
19047
19050
|
init_epic();
|
|
19048
19051
|
init_review_gate();
|
|
19052
|
+
init_state();
|
|
19049
19053
|
init_audit();
|
|
19050
19054
|
init_status();
|
|
19051
19055
|
init_types();
|
|
19052
19056
|
init_helpers();
|
|
19057
|
+
function ensurePolishState(projectPath, slug) {
|
|
19058
|
+
ensureStateDir(projectPath);
|
|
19059
|
+
writeStateJSON(projectPath, "polish.json", {
|
|
19060
|
+
slug,
|
|
19061
|
+
completed_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
19062
|
+
});
|
|
19063
|
+
}
|
|
19053
19064
|
function dossierComplete(projectPath, store, params) {
|
|
19054
19065
|
let taskSlug = params.task_slug;
|
|
19055
19066
|
if (!taskSlug) try {
|
|
@@ -19098,6 +19109,9 @@ function dossierComplete(projectPath, store, params) {
|
|
|
19098
19109
|
detail: `${currentStatus} → done (dossier:complete)`
|
|
19099
19110
|
});
|
|
19100
19111
|
syncTaskStatus(projectPath, taskSlug, "done");
|
|
19112
|
+
try {
|
|
19113
|
+
ensurePolishState(projectPath, taskSlug);
|
|
19114
|
+
} catch {}
|
|
19101
19115
|
const result = {
|
|
19102
19116
|
task_slug: taskSlug,
|
|
19103
19117
|
completed: true,
|
|
@@ -3,10 +3,10 @@ import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
|
|
|
3
3
|
import { c as readActive, l as readActiveState, s as init_types, t as SpecDir } from "./types-K2jxpWyU.mjs";
|
|
4
4
|
import { l as init_knowledge, m as upsertKnowledge, n as deleteOrphanKnowledge, s as getRecentDecisions, t as countKnowledge } from "./knowledge-C7rEfFSX.mjs";
|
|
5
5
|
import { n as init_project, t as detectProject } from "./project-DCKke4_Q.mjs";
|
|
6
|
-
import { a as notifyUser, i as init_dispatcher, r as extractSection } from "./dispatcher-
|
|
7
|
-
import { n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-
|
|
6
|
+
import { a as notifyUser, i as init_dispatcher, r as extractSection } from "./dispatcher-CUM_UdiH.mjs";
|
|
7
|
+
import { n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-jCRY8FPs.mjs";
|
|
8
8
|
import { n as openDefaultCached, t as init_store } from "./store-BffM-bi-.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { l as resetWorkedSlugs, r as init_state } from "./state-Cih-8_Zc.mjs";
|
|
10
10
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
//#region src/hooks/session-start.ts
|
|
@@ -128,4 +128,4 @@ var init_state = __esmMin((() => {
|
|
|
128
128
|
WAVE_PROGRESS_FILE = "wave-progress.json";
|
|
129
129
|
}));
|
|
130
130
|
//#endregion
|
|
131
|
-
export {
|
|
131
|
+
export { readStateJSON as a, readWorkedSlugs as c, writeStateJSON as d, writeStateText as f, parseWaveProgress as i, resetWorkedSlugs as l, ensureStateDir as n, readStateText as o, writeWaveProgress as p, init_state as r, readWaveProgress as s, addWorkedSlug as t, stateDir as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
|
|
3
3
|
import "./types-K2jxpWyU.mjs";
|
|
4
|
-
import { c as countUncheckedTasks, d as init_spec_guard, m as tryReadActiveSpec, n as init_review_gate, r as isGateActive, s as blockStop, u as hasUncheckedSelfReview } from "./review-gate-
|
|
5
|
-
import {
|
|
4
|
+
import { c as countUncheckedTasks, d as init_spec_guard, m as tryReadActiveSpec, n as init_review_gate, r as isGateActive, s as blockStop, u as hasUncheckedSelfReview } from "./review-gate-7Pfe_A-8.mjs";
|
|
5
|
+
import { c as readWorkedSlugs, r as init_state } from "./state-Cih-8_Zc.mjs";
|
|
6
6
|
//#region src/hooks/stop.ts
|
|
7
7
|
/**
|
|
8
8
|
* Stop handler:
|
|
@@ -3,10 +3,10 @@ import { n as __esmMin } from "./chunk-CAm0Jl7e.mjs";
|
|
|
3
3
|
import { l as readActiveState, s as init_types } from "./types-K2jxpWyU.mjs";
|
|
4
4
|
import { a as subTypeBoost, r as init_fts } from "./fts-DICqcpG_.mjs";
|
|
5
5
|
import { Embedder, t as init_embedder } from "./embedder-D3hJoryD.mjs";
|
|
6
|
-
import "./dispatcher-
|
|
7
|
-
import { a as trackHitCounts, i as searchPipeline, n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-
|
|
6
|
+
import "./dispatcher-CUM_UdiH.mjs";
|
|
7
|
+
import { a as trackHitCounts, i as searchPipeline, n as init_directives, o as truncate, r as init_helpers, t as emitDirectives } from "./directives-jCRY8FPs.mjs";
|
|
8
8
|
import { n as openDefaultCached, t as init_store } from "./store-BffM-bi-.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { a as readStateJSON, c as readWorkedSlugs, d as writeStateJSON, r as init_state } from "./state-Cih-8_Zc.mjs";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
//#region src/hooks/user-prompt.ts
|
package/package.json
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{$t as e,Et as t,Ht as n,Nt as r,Rt as i,Tn as a,Tt as o,a as s,c,d as l,en as u,i as d,j as f,n as p,p as m,t as h,u as g,wn as _,wt as v,zt as y}from"./badge-C_nJR3_P.js";import{n as b,r as x,t as S}from"./dist-CCslGrjS.js";import{a as ee,c as te,d as C,f as w,h as T,i as ne,l as re,n as ie,o as ae,p as oe,r as se,s as ce,t as E}from"./button-BC81_2hy.js";import{t as D}from"./dist-CbLvV7YE.js";import{i as O,n as le,r as ue,t as de}from"./es2015-C0wv2Iox.js";import{t as fe}from"./progress-3fcfVnZl.js";import{S as pe}from"./index-ClD5S_3_.js";import{i as me,n as he,r as ge,t as _e}from"./card-D-KKTUrZ.js";import{t as ve}from"./skeleton-ByYY54GV.js";var k=a(u(),1),A=e(),ye=`Popover`,[be,xe]=d(ye,[ce]),j=ce(),[Se,M]=be(ye),Ce=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=j(t),c=k.useRef(null),[l,u]=k.useState(!1),[d,f]=oe({prop:r,defaultProp:i??!1,onChange:a,caller:ye});return(0,A.jsx)(ae,{...s,children:(0,A.jsx)(Se,{scope:t,contentId:C(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:k.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:k.useCallback(()=>u(!0),[]),onCustomAnchorRemove:k.useCallback(()=>u(!1),[]),modal:o,children:n})})};Ce.displayName=ye;var we=`PopoverAnchor`,Te=k.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=M(we,n),a=j(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return k.useEffect(()=>(o(),()=>s()),[o,s]),(0,A.jsx)(se,{...a,...r,ref:t})});Te.displayName=we;var Ee=`PopoverTrigger`,De=k.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=M(Ee,n),a=j(n),o=g(t,i.triggerRef),c=(0,A.jsx)(s.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Be(i.open),...r,ref:o,onClick:T(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?c:(0,A.jsx)(se,{asChild:!0,...a,children:c})});De.displayName=Ee;var N=`PopoverPortal`,[Oe,ke]=be(N,{forceMount:void 0}),Ae=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=M(N,t);return(0,A.jsx)(Oe,{scope:t,forceMount:n,children:(0,A.jsx)(w,{present:n||a.open,children:(0,A.jsx)(te,{asChild:!0,container:i,children:r})})})};Ae.displayName=N;var P=`PopoverContent`,je=k.forwardRef((e,t)=>{let n=ke(P,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=M(P,e.__scopePopover);return(0,A.jsx)(w,{present:r||a.open,children:a.modal?(0,A.jsx)(Ne,{...i,ref:t}):(0,A.jsx)(Pe,{...i,ref:t})})});je.displayName=P;var Me=c(`PopoverContent.RemoveScroll`),Ne=k.forwardRef((e,t)=>{let n=M(P,e.__scopePopover),r=k.useRef(null),i=g(t,r),a=k.useRef(!1);return k.useEffect(()=>{let e=r.current;if(e)return de(e)},[]),(0,A.jsx)(le,{as:Me,allowPinchZoom:!0,children:(0,A.jsx)(Fe,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:T(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:T(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:T(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Pe=k.forwardRef((e,t)=>{let n=M(P,e.__scopePopover),r=k.useRef(!1),i=k.useRef(!1);return(0,A.jsx)(Fe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Fe=k.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=M(P,n),p=j(n);return ue(),(0,A.jsx)(O,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,A.jsx)(re,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,A.jsx)(ee,{"data-state":Be(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Ie=`PopoverClose`,Le=k.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=M(Ie,n);return(0,A.jsx)(s.button,{type:`button`,...r,ref:t,onClick:T(e.onClick,()=>i.onOpenChange(!1))})});Le.displayName=Ie;var Re=`PopoverArrow`,ze=k.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=j(n);return(0,A.jsx)(ne,{...i,...r,ref:t})});ze.displayName=Re;function Be(e){return e?`open`:`closed`}var Ve=Ce,He=De,Ue=Ae,We=je,Ge=`Tabs`,[Ke,qe]=d(Ge,[x]),Je=x(),[Ye,Xe]=Ke(Ge),Ze=k.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:c,activationMode:l=`automatic`,...u}=e,d=D(c),[f,p]=oe({prop:r,onChange:i,defaultProp:a??``,caller:Ge});return(0,A.jsx)(Ye,{scope:n,baseId:C(),value:f,onValueChange:p,orientation:o,dir:d,activationMode:l,children:(0,A.jsx)(s.div,{dir:d,"data-orientation":o,...u,ref:t})})});Ze.displayName=Ge;var Qe=`TabsList`,$e=k.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Xe(Qe,n),o=Je(n);return(0,A.jsx)(b,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,A.jsx)(s.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});$e.displayName=Qe;var et=`TabsTrigger`,tt=k.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Xe(et,n),c=Je(n),l=it(o.baseId,r),u=at(o.baseId,r),d=r===o.value;return(0,A.jsx)(S,{asChild:!0,...c,focusable:!i,active:d,children:(0,A.jsx)(s.button,{type:`button`,role:`tab`,"aria-selected":d,"aria-controls":u,"data-state":d?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:l,...a,ref:t,onMouseDown:T(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:T(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:T(e.onFocus,()=>{let e=o.activationMode!==`manual`;!d&&!i&&e&&o.onValueChange(r)})})})});tt.displayName=et;var nt=`TabsContent`,rt=k.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,c=Xe(nt,n),l=it(c.baseId,r),u=at(c.baseId,r),d=r===c.value,f=k.useRef(d);return k.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,A.jsx)(w,{present:i||d,children:({present:n})=>(0,A.jsx)(s.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})});rt.displayName=nt;function it(e,t){return`${e}-trigger-${t}`}function at(e,t){return`${e}-content-${t}`}var ot=Ze,st=$e,ct=tt;function lt({epic:e}){let{t}=y(),n=e.tasks??[];return n.some(e=>(e.depends_on?.length??0)>0)?(0,A.jsxs)(`div`,{className:`mt-2 space-y-1`,children:[(0,A.jsx)(`p`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:t(`epic.dependencies`)}),(0,A.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1`,children:n.filter(e=>(e.depends_on?.length??0)>0).map(e=>(0,A.jsxs)(`div`,{className:`flex items-center gap-1 text-xs`,children:[e.depends_on.map((e,t)=>(0,A.jsxs)(`span`,{className:`flex items-center gap-1`,children:[t>0&&(0,A.jsx)(`span`,{className:`text-muted-foreground`,children:`+`}),(0,A.jsx)(`span`,{className:f(`rounded-full px-1.5 py-0 border text-[10px]`,n.find(t=>t.slug===e)?.status===`completed`?`border-green-300 text-green-700 dark:border-green-800 dark:text-green-400`:`border-border text-muted-foreground`),children:e})]},e)),(0,A.jsx)(r,{className:`size-3 text-muted-foreground`}),(0,A.jsx)(`span`,{className:f(`rounded-full px-1.5 py-0 border text-[10px] font-medium`,e.status===`completed`?`border-green-300 text-green-700 dark:border-green-800 dark:text-green-400`:`border-border text-foreground`),children:e.slug})]},e.slug))})]}):null}function ut({className:e,...t}){return(0,A.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,A.jsx)(`table`,{"data-slot":`table`,className:f(`w-full caption-bottom text-sm`,e),...t})})}function dt({className:e,...t}){return(0,A.jsx)(`thead`,{"data-slot":`table-header`,className:f(`[&_tr]:border-b`,e),...t})}function ft({className:e,...t}){return(0,A.jsx)(`tbody`,{"data-slot":`table-body`,className:f(`[&_tr:last-child]:border-0`,e),...t})}function pt({className:e,...t}){return(0,A.jsx)(`tr`,{"data-slot":`table-row`,className:f(`border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function mt({className:e,...t}){return(0,A.jsx)(`th`,{"data-slot":`table-head`,className:f(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}function ht({className:e,...t}){return(0,A.jsx)(`td`,{"data-slot":`table-cell`,className:f(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}function gt({className:e,orientation:t=`horizontal`,...n}){return(0,A.jsx)(ot,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:f(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var _t=p(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function vt({className:e,variant:t=`default`,...n}){return(0,A.jsx)(st,{"data-slot":`tabs-list`,"data-variant":t,className:f(_t({variant:t}),e),...n})}function yt({className:e,...t}){return(0,A.jsx)(ct,{"data-slot":`tabs-trigger`,className:f(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-colors group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function bt(e,t,n=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(` `)}var xt={},St={};function F(e,t){try{let n=(xt[e]||=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).format)(t).split(`GMT`)[1];return n in St?St[n]:wt(n,n.split(`:`))}catch{if(e in St)return St[e];let t=e?.match(Ct);return t?wt(e,t.slice(1)):NaN}}var Ct=/([+-]\d\d):?(\d\d)?/;function wt(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return St[e]=n*60+r>0?n*60+r+i:n*60-r-i}var Tt=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(F(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),kt(this,NaN),Dt(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-F(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Dt(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},Et=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Et.test(e))return;let t=e.replace(Et,`$1UTC`);Tt.prototype[t]&&(e.startsWith(`get`)?Tt.prototype[e]=function(){return this.internal[t]()}:(Tt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Ot(this),+this},Tt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Dt(this),+this}))});function Dt(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-F(e.timeZone,e)*60))}function Ot(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),kt(e)}function kt(e){let t=F(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);let i=-new Date(+e).getTimezoneOffset(),a=i- -new Date(+r).getTimezoneOffset(),o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);let s=i-n;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);let c=new Date(+e);c.setUTCSeconds(0);let l=i>0?c.getSeconds():(c.getSeconds()-60)%60,u=Math.round(-(F(e.timeZone,e)*60))%60;(u||l)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+l));let d=F(e.timeZone,e),f=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-f,m=f!==n,h=p-s;if(m&&h){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+h);let t=F(e.timeZone,e),n=f-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}var I=class e extends Tt{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${bt(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset();return[e>0?`-`:`+`,String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),String(Math.abs(e)%60).padStart(2,`0`)]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},At=365.2425,jt=6048e5,Mt=864e5,Nt=3600*24;Nt*7,Nt*At/12*3;var Pt=Symbol.for(`constructDateFrom`);function L(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Pt in e?e[Pt](t):e instanceof Date?new e.constructor(t):new Date(t)}function R(e,t){return L(t||e,e)}function Ft(e,t,n){let r=R(e,n?.in);return isNaN(t)?L(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function It(e,t,n){let r=R(e,n?.in);if(isNaN(t))return L(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=L(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}var Lt={};function Rt(){return Lt}function z(e,t){let n=Rt(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=R(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function zt(e,t){return z(e,{...t,weekStartsOn:1})}function Bt(e,t){let n=R(e,t?.in),r=n.getFullYear(),i=L(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=zt(i),o=L(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=zt(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Vt(e){let t=R(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function Ht(e,...t){let n=L.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function Ut(e,t){let n=R(e,t?.in);return n.setHours(0,0,0,0),n}function Wt(e,t,n){let[r,i]=Ht(n?.in,e,t),a=Ut(r),o=Ut(i),s=+a-Vt(a),c=+o-Vt(o);return Math.round((s-c)/Mt)}function Gt(e,t){let n=Bt(e,t),r=L(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),zt(r)}function Kt(e,t,n){return Ft(e,t*7,n)}function qt(e,t,n){return It(e,t*12,n)}function Jt(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=L.bind(null,e));let t=R(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),L(r,n||NaN)}function Yt(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=L.bind(null,e));let t=R(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),L(r,n||NaN)}function Xt(e,t,n){let[r,i]=Ht(n?.in,e,t);return+Ut(r)==+Ut(i)}function Zt(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Qt(e){return!(!Zt(e)&&typeof e!=`number`||isNaN(+R(e)))}function $t(e,t,n){let[r,i]=Ht(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}function en(e,t){let n=R(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function tn(e,t){let[n,r]=Ht(e,t.start,t.end);return{start:n,end:r}}function nn(e,t){let{start:n,end:r}=tn(t?.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);let c=[];for(;+o<=a;)c.push(L(n,o)),o.setMonth(o.getMonth()+s);return i?c.reverse():c}function rn(e,t){let n=R(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function an(e,t){let n=R(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function on(e,t){let n=R(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function sn(e,t){let{start:n,end:r}=tn(t?.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setMonth(0,1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);let c=[];for(;+o<=a;)c.push(L(n,o)),o.setFullYear(o.getFullYear()+s);return i?c.reverse():c}function cn(e,t){let n=Rt(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=R(e,t?.in),a=i.getDay(),o=(a<r?-7:0)+6-(a-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}function ln(e,t){return cn(e,{...t,weekStartsOn:1})}var un={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},dn=(e,t,n)=>{let r,i=un[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function fn(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var pn={date:fn({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:fn({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:fn({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},mn={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},hn=(e,t,n,r)=>mn[e];function gn(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var _n={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:gn({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:gn({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:gn({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:gn({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:gn({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function vn(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?bn(s,e=>e.test(o)):yn(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function yn(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function bn(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function xn(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var Sn={code:`en-US`,formatDistance:dn,formatLong:pn,formatRelative:hn,localize:_n,match:{ordinalNumber:xn({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:vn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:vn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:vn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:vn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:vn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Cn(e,t){let n=R(e,t?.in);return Wt(n,on(n))+1}function wn(e,t){let n=R(e,t?.in),r=zt(n)-+Gt(n);return Math.round(r/jt)+1}function Tn(e,t){let n=R(e,t?.in),r=n.getFullYear(),i=Rt(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=L(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=z(o,t),c=L(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=z(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function En(e,t){let n=Rt(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Tn(e,t),a=L(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),z(a,t)}function Dn(e,t){let n=R(e,t?.in),r=z(n,t)-+En(n,t);return Math.round(r/jt)+1}function B(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var V={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return B(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):B(n+1,2)},d(e,t){return B(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return B(e.getHours()%12||12,t.length)},H(e,t){return B(e.getHours(),t.length)},m(e,t){return B(e.getMinutes(),t.length)},s(e,t){return B(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return B(Math.trunc(r*10**(n-3)),t.length)}},On={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},kn={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return V.y(e,t)},Y:function(e,t,n,r){let i=Tn(e,r),a=i>0?i:1-i;return t===`YY`?B(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):B(a,t.length)},R:function(e,t){return B(Bt(e),t.length)},u:function(e,t){return B(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return B(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return B(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return V.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return B(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=Dn(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):B(i,t.length)},I:function(e,t,n){let r=wn(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):B(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):V.d(e,t)},D:function(e,t,n){let r=Cn(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):B(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return B(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return B(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return B(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?On.noon:r===0?On.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?On.evening:r>=12?On.afternoon:r>=4?On.morning:On.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return V.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):V.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):B(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):B(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):V.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):V.s(e,t)},S:function(e,t){return V.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return jn(r);case`XXXX`:case`XX`:return H(r);default:return H(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return jn(r);case`xxxx`:case`xx`:return H(r);default:return H(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+An(r,`:`);default:return`GMT`+H(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+An(r,`:`);default:return`GMT`+H(r,`:`)}},t:function(e,t,n){return B(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return B(+e,t.length)}};function An(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+B(a,2)}function jn(e,t){return e%60==0?(e>0?`-`:`+`)+B(Math.abs(e)/60,2):H(e,t)}function H(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=B(Math.trunc(r/60),2),a=B(r%60,2);return n+i+t+a}var Mn=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},Nn=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},Pn={p:Nn,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Mn(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,Mn(r,t)).replace(`{{time}}`,Nn(i,t))}},Fn=/^D+$/,In=/^Y+$/,Ln=[`D`,`DD`,`YY`,`YYYY`];function Rn(e){return Fn.test(e)}function zn(e){return In.test(e)}function Bn(e,t,n){let r=Vn(e,t,n);if(console.warn(r),Ln.includes(e))throw RangeError(r)}function Vn(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Hn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Un=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wn=/^'([^]*?)'?$/,Gn=/''/g,Kn=/[a-zA-Z]/;function qn(e,t,n){let r=Rt(),i=n?.locale??r.locale??Sn,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=R(e,n?.in);if(!Qt(s))throw RangeError(`Invalid time value`);let c=t.match(Un).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=Pn[t];return n(e,i.formatLong)}return e}).join(``).match(Hn).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:Jn(e)};if(kn[t])return{isToken:!0,value:e};if(t.match(Kn))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&zn(a)||!n?.useAdditionalDayOfYearTokens&&Rn(a))&&Bn(a,t,String(e));let o=kn[a[0]];return o(s,a,i.localize,l)}).join(``)}function Jn(e){let t=e.match(Wn);return t?t[1].replace(Gn,`'`):e}function Yn(e,t){let n=R(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=L(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function Xn(e,t){return R(e,t?.in).getMonth()}function Zn(e,t){return R(e,t?.in).getFullYear()}function Qn(e,t){return+R(e)>+R(t)}function $n(e,t){return+R(e)<+R(t)}function er(e,t,n){let[r,i]=Ht(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function tr(e,t,n){let[r,i]=Ht(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function nr(e,t,n){let r=R(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=L(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=Yn(o);return r.setMonth(t,Math.min(a,s)),r}function rr(e,t,n){let r=R(e,n?.in);return isNaN(+r)?L(n?.in||e,NaN):(r.setFullYear(t),r)}var ir=5,ar=4;function or(e,t){let n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),a=t.addDays(i,ir*7-1);return t.getMonth(e)===t.getMonth(a)?ir:ar}function sr(e,t){let n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function cr(e,t){let n=sr(e,t),r=or(e,t);return t.addDays(n,r*7-1)}var lr={...Sn,labels:{labelDayButton:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>qn(e,t,{locale:Sn,...n});let a=i(e,`PPPP`);return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:`Choose the Month`,labelNext:`Go to the Next Month`,labelPrevious:`Go to the Previous Month`,labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:`Choose the Year`,labelGrid:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>qn(e,n,{locale:Sn,...t}),r(e,`LLLL yyyy`)},labelGridcell:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>qn(e,t,{locale:Sn,...n});let a=i(e,`PPPP`);return t?.today&&(a=`Today, ${a}`),a},labelNav:`Navigation bar`,labelWeekNumberHeader:`Week Number`,labelWeekday:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>qn(e,n,{locale:Sn,...t}),r(e,`cccc`)}}},U=class e{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?I.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new I(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):Ft(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):It(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):Kt(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):qt(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Wt(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):$t(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):nn(e),this.eachYearOfInterval=e=>{let t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):sn(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;let r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):cr(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):ln(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):en(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):cn(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):an(e),this.format=(e,t,n)=>{let r=this.overrides?.format?this.overrides.format(e,t,this.options):qn(e,t,this.options);return this.options.numerals&&this.options.numerals!==`latn`?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):wn(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):Xn(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):Zn(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):Dn(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):Qn(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):$n(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Zt(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):Xt(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):er(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):tr(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):Jt(e),this.min=e=>this.overrides?.min?this.overrides.min(e):Yt(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):nr(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):rr(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):sr(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Ut(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):zt(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):rn(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):z(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):on(e),this.options={locale:lr,...e},this.overrides=t}getDigitMap(){let{numerals:e=`latn`}=this.options,t=new Intl.NumberFormat(`en-US`,{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){let t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){let t=this.options.locale?.code;return t&&e.yearFirstLocales.has(t)?`year-first`:`month-first`}formatMonthYear(t){let{locale:n,timeZone:r,numerals:i}=this.options,a=n?.code;if(a&&e.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:`long`,year:`numeric`,timeZone:r,numberingSystem:i}).format(t)}catch{}let o=this.getMonthYearOrder()===`year-first`?`y LLLL`:`LLLL y`;return this.format(t,o)}};U.yearFirstLocales=new Set([`eu`,`hu`,`ja`,`ja-Hira`,`ja-JP`,`ko`,`ko-KR`,`lt`,`lt-LT`,`lv`,`lv-LV`,`mn`,`mn-MN`,`zh`,`zh-CN`,`zh-HK`,`zh-TW`]);var W=new U,ur=class{constructor(e,t,n=W){this.date=e,this.displayMonth=t,this.outside=!!(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,`yyyy-MM-dd`),this.displayMonthId=n.format(t,`yyyy-MM`),this.dateMonthId=n.format(e,`yyyy-MM`)}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}},dr=class{constructor(e,t){this.date=e,this.weeks=t}},fr=class{constructor(e,t){this.days=t,this.weekNumber=e}};function pr(e){return k.createElement(`button`,{...e})}function mr(e){return k.createElement(`span`,{...e})}function hr(e){let{size:t=24,orientation:n=`left`,className:r}=e;return k.createElement(`svg`,{className:r,width:t,height:t,viewBox:`0 0 24 24`},n===`up`&&k.createElement(`polygon`,{points:`6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28`}),n===`down`&&k.createElement(`polygon`,{points:`6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72`}),n===`left`&&k.createElement(`polygon`,{points:`16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20`}),n===`right`&&k.createElement(`polygon`,{points:`8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20`}))}function gr(e){let{day:t,modifiers:n,...r}=e;return k.createElement(`td`,{...r})}function _r(e){let{day:t,modifiers:n,...r}=e,i=k.useRef(null);return k.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),k.createElement(`button`,{ref:i,...r})}var G;(function(e){e.Root=`root`,e.Chevron=`chevron`,e.Day=`day`,e.DayButton=`day_button`,e.CaptionLabel=`caption_label`,e.Dropdowns=`dropdowns`,e.Dropdown=`dropdown`,e.DropdownRoot=`dropdown_root`,e.Footer=`footer`,e.MonthGrid=`month_grid`,e.MonthCaption=`month_caption`,e.MonthsDropdown=`months_dropdown`,e.Month=`month`,e.Months=`months`,e.Nav=`nav`,e.NextMonthButton=`button_next`,e.PreviousMonthButton=`button_previous`,e.Week=`week`,e.Weeks=`weeks`,e.Weekday=`weekday`,e.Weekdays=`weekdays`,e.WeekNumber=`week_number`,e.WeekNumberHeader=`week_number_header`,e.YearsDropdown=`years_dropdown`})(G||={});var K;(function(e){e.disabled=`disabled`,e.hidden=`hidden`,e.outside=`outside`,e.focused=`focused`,e.today=`today`})(K||={});var q;(function(e){e.range_end=`range_end`,e.range_middle=`range_middle`,e.range_start=`range_start`,e.selected=`selected`})(q||={});var J;(function(e){e.weeks_before_enter=`weeks_before_enter`,e.weeks_before_exit=`weeks_before_exit`,e.weeks_after_enter=`weeks_after_enter`,e.weeks_after_exit=`weeks_after_exit`,e.caption_after_enter=`caption_after_enter`,e.caption_after_exit=`caption_after_exit`,e.caption_before_enter=`caption_before_enter`,e.caption_before_exit=`caption_before_exit`})(J||={});function vr(e){let{options:t,className:n,components:r,classNames:i,...a}=e,o=[i[G.Dropdown],n].join(` `),s=t?.find(({value:e})=>e===a.value);return k.createElement(`span`,{"data-disabled":a.disabled,className:i[G.DropdownRoot]},k.createElement(r.Select,{className:o,...a},t?.map(({value:e,label:t,disabled:n})=>k.createElement(r.Option,{key:e,value:e,disabled:n},t))),k.createElement(`span`,{className:i[G.CaptionLabel],"aria-hidden":!0},s?.label,k.createElement(r.Chevron,{orientation:`down`,size:18,className:i[G.Chevron]})))}function yr(e){return k.createElement(`div`,{...e})}function br(e){return k.createElement(`div`,{...e})}function xr(e){let{calendarMonth:t,displayIndex:n,...r}=e;return k.createElement(`div`,{...r},e.children)}function Sr(e){let{calendarMonth:t,displayIndex:n,...r}=e;return k.createElement(`div`,{...r})}function Cr(e){return k.createElement(`table`,{...e})}function wr(e){return k.createElement(`div`,{...e})}var Tr=(0,k.createContext)(void 0);function Er(){let e=(0,k.useContext)(Tr);if(e===void 0)throw Error(`useDayPicker() must be used within a custom component.`);return e}function Dr(e){let{components:t}=Er();return k.createElement(t.Dropdown,{...e})}function Or(e){let{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...a}=e,{components:o,classNames:s,labels:{labelPrevious:c,labelNext:l}}=Er(),u=(0,k.useCallback)(e=>{i&&n?.(e)},[i,n]),d=(0,k.useCallback)(e=>{r&&t?.(e)},[r,t]);return k.createElement(`nav`,{...a},k.createElement(o.PreviousMonthButton,{type:`button`,className:s[G.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:d},k.createElement(o.Chevron,{disabled:r?void 0:!0,className:s[G.Chevron],orientation:`left`})),k.createElement(o.NextMonthButton,{type:`button`,className:s[G.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":i?void 0:!0,"aria-label":l(i),onClick:u},k.createElement(o.Chevron,{disabled:i?void 0:!0,orientation:`right`,className:s[G.Chevron]})))}function kr(e){let{components:t}=Er();return k.createElement(t.Button,{...e})}function Ar(e){return k.createElement(`option`,{...e})}function jr(e){let{components:t}=Er();return k.createElement(t.Button,{...e})}function Mr(e){let{rootRef:t,...n}=e;return k.createElement(`div`,{...n,ref:t})}function Nr(e){return k.createElement(`select`,{...e})}function Pr(e){let{week:t,...n}=e;return k.createElement(`tr`,{...n})}function Fr(e){return k.createElement(`th`,{...e})}function Ir(e){return k.createElement(`thead`,{"aria-hidden":!0},k.createElement(`tr`,{...e}))}function Lr(e){let{week:t,...n}=e;return k.createElement(`th`,{...n})}function Rr(e){return k.createElement(`th`,{...e})}function zr(e){return k.createElement(`tbody`,{...e})}function Br(e){let{components:t}=Er();return k.createElement(t.Dropdown,{...e})}var Vr=_({Button:()=>pr,CaptionLabel:()=>mr,Chevron:()=>hr,Day:()=>gr,DayButton:()=>_r,Dropdown:()=>vr,DropdownNav:()=>yr,Footer:()=>br,Month:()=>xr,MonthCaption:()=>Sr,MonthGrid:()=>Cr,Months:()=>wr,MonthsDropdown:()=>Dr,Nav:()=>Or,NextMonthButton:()=>kr,Option:()=>Ar,PreviousMonthButton:()=>jr,Root:()=>Mr,Select:()=>Nr,Week:()=>Pr,WeekNumber:()=>Lr,WeekNumberHeader:()=>Rr,Weekday:()=>Fr,Weekdays:()=>Ir,Weeks:()=>zr,YearsDropdown:()=>Br});function Y(e,t,n=!1,r=W){let{from:i,to:a}=e,{differenceInCalendarDays:o,isSameDay:s}=r;return i&&a?(o(a,i)<0&&([i,a]=[a,i]),o(t,i)>=(n?1:0)&&o(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&i?s(i,t):!1}function Hr(e){return!!(e&&typeof e==`object`&&`before`in e&&`after`in e)}function Ur(e){return!!(e&&typeof e==`object`&&`from`in e)}function Wr(e){return!!(e&&typeof e==`object`&&`after`in e)}function Gr(e){return!!(e&&typeof e==`object`&&`before`in e)}function Kr(e){return!!(e&&typeof e==`object`&&`dayOfWeek`in e)}function qr(e,t){return Array.isArray(e)&&e.every(t.isDate)}function X(e,t,n=W){let r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:a,isAfter:o}=n;return r.some(t=>{if(typeof t==`boolean`)return t;if(n.isDate(t))return i(e,t);if(qr(t,n))return t.some(t=>i(e,t));if(Ur(t))return Y(t,e,!1,n);if(Kr(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(Hr(t)){let n=a(t.before,e),r=a(t.after,e),i=n>0,s=r<0;return o(t.before,t.after)?s&&i:i||s}return Wr(t)?a(e,t.after)>0:Gr(t)?a(t.before,e)>0:typeof t==`function`?t(e):!1})}function Jr(e,t,n,r,i){let{disabled:a,hidden:o,modifiers:s,showOutsideDays:c,broadcastCalendar:l,today:u=i.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:h,isAfter:g}=i,_=n&&p(n),v=r&&h(r),y={[K.focused]:[],[K.outside]:[],[K.disabled]:[],[K.hidden]:[],[K.today]:[]},b={};for(let t of e){let{date:e,displayMonth:n}=t,r=!!(n&&!f(e,n)),p=!!(_&&m(e,_)),h=!!(v&&g(e,v)),x=!!(a&&X(e,a,i)),S=!!(o&&X(e,o,i))||p||h||!l&&!c&&r||l&&c===!1&&r,ee=d(e,u);r&&y.outside.push(t),x&&y.disabled.push(t),S&&y.hidden.push(t),ee&&y.today.push(t),s&&Object.keys(s).forEach(n=>{let r=s?.[n];r&&X(e,r,i)&&(b[n]?b[n].push(t):b[n]=[t])})}return e=>{let t={[K.focused]:!1,[K.disabled]:!1,[K.hidden]:!1,[K.outside]:!1,[K.today]:!1},n={};for(let n in y)t[n]=y[n].some(t=>t===e);for(let t in b)n[t]=b[t].some(t=>t===e);return{...t,...n}}}function Yr(e,t,n={}){return Object.entries(e).filter(([,e])=>e===!0).reduce((e,[r])=>(n[r]?e.push(n[r]):t[K[r]]?e.push(t[K[r]]):t[q[r]]&&e.push(t[q[r]]),e),[t[G.Day]])}function Xr(e){return{...Vr,...e}}function Zr(e){let t={"data-mode":e.mode??void 0,"data-required":`required`in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith(`data-`)&&(t[e]=n)}),t}function Qr(){let e={};for(let t in G)e[G[t]]=`rdp-${G[t]}`;for(let t in K)e[K[t]]=`rdp-${K[t]}`;for(let t in q)e[q[t]]=`rdp-${q[t]}`;for(let t in J)e[J[t]]=`rdp-${J[t]}`;return e}function $r(e,t,n){return(n??new U(t)).formatMonthYear(e)}var ei=$r;function ti(e,t,n){return(n??new U(t)).format(e,`d`)}function ni(e,t=W){return t.format(e,`LLLL`)}function ri(e,t,n){return(n??new U(t)).format(e,`cccccc`)}function ii(e,t=W){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function ai(){return``}function oi(e,t=W){return t.format(e,`yyyy`)}var si=oi,ci=_({formatCaption:()=>$r,formatDay:()=>ti,formatMonthCaption:()=>ei,formatMonthDropdown:()=>ni,formatWeekNumber:()=>ii,formatWeekNumberHeader:()=>ai,formatWeekdayName:()=>ri,formatYearCaption:()=>si,formatYearDropdown:()=>oi});function li(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ci,...e}}function ui(e,t,n,r){let i=(r??new U(n)).format(e,`PPPP`);return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}var di=ui;function fi(e,t,n){return(n??new U(t)).formatMonthYear(e)}var pi=fi;function mi(e,t,n,r){let i=(r??new U(n)).format(e,`PPPP`);return t?.today&&(i=`Today, ${i}`),i}function hi(e){return`Choose the Month`}function gi(){return``}var _i=`Go to the Next Month`;function vi(e,t){return _i}function yi(e){return`Go to the Previous Month`}function bi(e,t,n){return(n??new U(t)).format(e,`cccc`)}function xi(e,t){return`Week ${e}`}function Si(e){return`Week Number`}function Ci(e){return`Choose the Year`}var wi=_({labelCaption:()=>pi,labelDay:()=>di,labelDayButton:()=>ui,labelGrid:()=>fi,labelGridcell:()=>mi,labelMonthDropdown:()=>hi,labelNav:()=>gi,labelNext:()=>vi,labelPrevious:()=>yi,labelWeekNumber:()=>xi,labelWeekNumberHeader:()=>Si,labelWeekday:()=>bi,labelYearDropdown:()=>Ci}),Z=(e,t,n)=>t||(n?typeof n==`function`?n:(...e)=>n:e);function Ti(e,t){let n=t.locale?.labels??{};return{...wi,...e??{},labelDayButton:Z(ui,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Z(hi,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Z(vi,e?.labelNext,n.labelNext),labelPrevious:Z(yi,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Z(xi,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Z(Ci,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Z(fi,e?.labelGrid,n.labelGrid),labelGridcell:Z(mi,e?.labelGridcell,n.labelGridcell),labelNav:Z(gi,e?.labelNav,n.labelNav),labelWeekNumberHeader:Z(Si,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Z(bi,e?.labelWeekday,n.labelWeekday)}}function Ei(e,t,n,r,i){let{startOfMonth:a,startOfYear:o,endOfYear:s,eachMonthOfInterval:c,getMonth:l}=i;return c({start:o(e),end:s(e)}).map(e=>{let o=r.formatMonthDropdown(e,i);return{value:l(e),label:o,disabled:t&&e<a(t)||n&&e>a(n)||!1}})}function Di(e,t={},n={}){let r={...t?.[G.Day]};return Object.entries(e).filter(([,e])=>e===!0).forEach(([e])=>{r={...r,...n?.[e]}}),r}function Oi(e,t,n,r){let i=r??e.today(),a=n?e.startOfBroadcastWeek(i,e):t?e.startOfISOWeek(i):e.startOfWeek(i),o=[];for(let t=0;t<7;t++){let n=e.addDays(a,t);o.push(n)}return o}function ki(e,t,n,r,i=!1){if(!e||!t)return;let{startOfYear:a,endOfYear:o,eachYearOfInterval:s,getYear:c}=r,l=s({start:a(e),end:o(t)});return i&&l.reverse(),l.map(e=>{let t=n.formatYearDropdown(e,r);return{value:c(e),label:t,disabled:!1}})}function Ai(e,t={}){let{weekStartsOn:n,locale:r}=t,i=n??r?.options?.weekStartsOn??0,a=t=>{let n=typeof t==`number`||typeof t==`string`?new Date(t):t;return new I(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},o=e=>{let t=a(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>a(I.tz(e)),newDate:(t,n,r)=>new I(t,n,r,12,0,0,e),startOfDay:e=>a(e),startOfWeek:(e,t)=>{let n=a(e),r=t?.weekStartsOn??i,o=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-o),n},startOfISOWeek:e=>{let t=a(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{let t=a(e);return t.setDate(1),t},startOfYear:e=>{let t=a(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{let n=a(e),r=(((t?.weekStartsOn??i)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{let t=a(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{let t=a(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{let t=a(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{let n=a(t.start),r=a(t.end),i=[],o=new I(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=r.getFullYear()*12+r.getMonth();for(;o.getFullYear()*12+o.getMonth()<=s;)i.push(new I(o,e)),o.setMonth(o.getMonth()+1,1);return i},addDays:(e,t)=>{let n=a(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{let n=a(e);return n.setDate(n.getDate()+t*7),n},addMonths:(e,t)=>{let n=a(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{let n=a(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{let n=a(t.start),r=a(t.end),i=[],o=new I(n.getFullYear(),0,1,12,0,0,e);for(;o.getFullYear()<=r.getFullYear();)i.push(new I(o,e)),o.setFullYear(o.getFullYear()+1,0,1);return i},getWeek:(e,t)=>Dn(o(e),{weekStartsOn:t?.weekStartsOn??i,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>wn(o(e)),differenceInCalendarDays:(e,t)=>Wt(o(e),o(t)),differenceInCalendarMonths:(e,t)=>$t(o(e),o(t))}}var ji=e=>e instanceof HTMLElement?e:null,Mi=e=>[...e.querySelectorAll(`[data-animated-month]`)??[]],Ni=e=>ji(e.querySelector(`[data-animated-month]`)),Pi=e=>ji(e.querySelector(`[data-animated-caption]`)),Fi=e=>ji(e.querySelector(`[data-animated-weeks]`)),Ii=e=>ji(e.querySelector(`[data-animated-nav]`)),Li=e=>ji(e.querySelector(`[data-animated-weekdays]`));function Ri(e,t,{classNames:n,months:r,focused:i,dateLib:a}){let o=(0,k.useRef)(null),s=(0,k.useRef)(r),c=(0,k.useRef)(!1);(0,k.useLayoutEffect)(()=>{let l=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||l.length===0||r.length!==l.length)return;let u=a.isSameMonth(r[0].date,l[0].date),d=a.isAfter(r[0].date,l[0].date),f=d?n[J.caption_after_enter]:n[J.caption_before_enter],p=d?n[J.weeks_after_enter]:n[J.weeks_before_enter],m=o.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(Mi(h).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=Ni(e);t&&e.contains(t)&&e.removeChild(t);let n=Pi(e);n&&n.classList.remove(f);let r=Fi(e);r&&r.classList.remove(p)}),o.current=h):o.current=null,c.current||u||i)return;let g=m instanceof HTMLElement?Mi(m):[],_=Mi(e.current);if(_?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){c.current=!0;let t=[];e.current.style.isolation=`isolate`;let r=Ii(e.current);r&&(r.style.zIndex=`1`),_.forEach((i,a)=>{let o=g[a];if(!o)return;i.style.position=`relative`,i.style.overflow=`hidden`;let s=Pi(i);s&&s.classList.add(f);let l=Fi(i);l&&l.classList.add(p);let u=()=>{c.current=!1,e.current&&(e.current.style.isolation=``),r&&(r.style.zIndex=``),s&&s.classList.remove(f),l&&l.classList.remove(p),i.style.position=``,i.style.overflow=``,i.contains(o)&&i.removeChild(o)};t.push(u),o.style.pointerEvents=`none`,o.style.position=`absolute`,o.style.overflow=`hidden`,o.setAttribute(`aria-hidden`,`true`);let m=Li(o);m&&(m.style.opacity=`0`);let h=Pi(o);h&&(h.classList.add(d?n[J.caption_before_exit]:n[J.caption_after_exit]),h.addEventListener(`animationend`,u));let _=Fi(o);_&&_.classList.add(d?n[J.weeks_before_exit]:n[J.weeks_after_exit]),i.insertBefore(o,i.firstChild)})}})}function zi(e,t,n,r){let i=e[0],a=e[e.length-1],{ISOWeek:o,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:h,isAfter:g,startOfBroadcastWeek:_,startOfISOWeek:v,startOfWeek:y}=r,b=c?_(i,r):o?v(i):y(i),x=c?f(a):o?p(m(a)):h(m(a)),S=t&&(c?f(t):o?p(t):h(t)),ee=u(S&&g(x,S)?S:x,b),te=d(a,i)+1,C=[];for(let e=0;e<=ee;e++){let t=l(b,e);C.push(t)}let w=(c?35:42)*te;if(s&&C.length<w){let e=w-C.length;for(let t=0;t<e;t++){let e=l(C[C.length-1],1);C.push(e)}}return C}function Bi(e){let t=[];return e.reduce((e,n)=>{let r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}function Vi(e,t,n,r){let{numberOfMonths:i=1}=n,a=[];for(let n=0;n<i;n++){let i=r.addMonths(e,n);if(t&&i>t)break;a.push(i)}return a}function Hi(e,t,n,r){let{month:i,defaultMonth:a,today:o=r.today(),numberOfMonths:s=1}=e,c=i||a||o,{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=r;return n&&l(n,c)<s-1&&(c=u(n,-1*(s-1))),t&&l(c,t)<0&&(c=t),d(c)}function Ui(e,t,n,r){let{addDays:i,endOfBroadcastWeek:a,endOfISOWeek:o,endOfMonth:s,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((e,m)=>{let h=n.broadcastCalendar?d(m,r):n.ISOWeek?f(m):p(m),g=n.broadcastCalendar?a(m):n.ISOWeek?o(s(m)):c(s(m)),_=t.filter(e=>e>=h&&e<=g),v=n.broadcastCalendar?35:42;if(n.fixedWeeks&&_.length<v){let e=t.filter(e=>{let t=v-_.length;return e>g&&e<=i(g,t)});_.push(...e)}let y=new dr(m,_.reduce((e,t)=>{let i=n.ISOWeek?l(t):u(t),a=e.find(e=>e.weekNumber===i),o=new ur(t,m,r);return a?a.days.push(o):e.push(new fr(i,[o])),e},[]));return e.push(y),e},[]);return n.reverseMonths?m.reverse():m}function Wi(e,t){let{startMonth:n,endMonth:r}=e,{startOfYear:i,startOfDay:a,startOfMonth:o,endOfMonth:s,addYears:c,endOfYear:l,newDate:u,today:d}=t,{fromYear:f,toYear:p,fromMonth:m,toMonth:h}=e;!n&&m&&(n=m),!n&&f&&(n=t.newDate(f,0,1)),!r&&h&&(r=h),!r&&p&&(r=u(p,11,31));let g=e.captionLayout===`dropdown`||e.captionLayout===`dropdown-years`;return n?n=o(n):f?n=u(f,0,1):!n&&g&&(n=i(c(e.today??d(),-100))),r?r=s(r):p?r=u(p,11,31):!r&&g&&(r=l(e.today??d())),[n&&a(n),r&&a(r)]}function Gi(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a=1}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:c}=r,l=i?a:1,u=o(e);if(!t||!(c(t,e)<a))return s(u,l)}function Ki(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:c}=r,l=i?a??1:1,u=o(e);if(!t||!(c(u,t)<=0))return s(u,-l)}function qi(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}function Ji(e,t){let[n,r]=(0,k.useState)(e);return[t===void 0?n:t,r]}function Yi(e,t){let[n,r]=Wi(e,t),{startOfMonth:i,endOfMonth:a}=t,o=Hi(e,n,r,t),[s,c]=Ji(o,e.month?o:void 0);(0,k.useEffect)(()=>{c(Hi(e,n,r,t))},[e.timeZone]);let{months:l,weeks:u,days:d,previousMonth:f,nextMonth:p}=(0,k.useMemo)(()=>{let i=Vi(s,r,{numberOfMonths:e.numberOfMonths},t),o=Ui(i,zi(i,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t);return{months:o,weeks:qi(o),days:Bi(o),previousMonth:Ki(s,n,e,t),nextMonth:Gi(s,r,e,t)}},[t,s.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:h}=e,g=e=>u.some(t=>t.days.some(t=>t.isEqualTo(e))),_=e=>{if(m)return;let t=i(e);n&&t<i(n)&&(t=i(n)),r&&t>i(r)&&(t=i(r)),c(t),h?.(t)};return{months:l,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:p,goToMonth:_,goToDay:e=>{g(e)||_(e.date)}}}var Q;(function(e){e[e.Today=0]=`Today`,e[e.Selected=1]=`Selected`,e[e.LastFocused=2]=`LastFocused`,e[e.FocusedModifier=3]=`FocusedModifier`})(Q||={});function Xi(e){return!e[K.disabled]&&!e[K.hidden]&&!e[K.outside]}function Zi(e,t,n,r){let i,a=-1;for(let o of e){let e=t(o);Xi(e)&&(e[K.focused]&&a<Q.FocusedModifier?(i=o,a=Q.FocusedModifier):r?.isEqualTo(o)&&a<Q.LastFocused?(i=o,a=Q.LastFocused):n(o.date)&&a<Q.Selected?(i=o,a=Q.Selected):e[K.today]&&a<Q.Today&&(i=o,a=Q.Today))}return i||=e.find(e=>Xi(t(e))),i}function Qi(e,t,n,r,i,a,o){let{ISOWeek:s,broadcastCalendar:c}=a,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:h,max:g,min:_,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=o,x={day:l,week:d,month:u,year:f,startOfWeek:e=>c?v(e,o):s?y(e):b(e),endOfWeek:e=>c?p(e):s?m(e):h(e)}[e](n,t===`after`?1:-1);return t===`before`&&r?x=g([r,x]):t===`after`&&i&&(x=_([i,x])),x}function $i(e,t,n,r,i,a,o,s=0){if(s>365)return;let c=Qi(e,t,n.date,r,i,a,o),l=!!(a.disabled&&X(c,a.disabled,o)),u=!!(a.hidden&&X(c,a.hidden,o)),d=new ur(c,c,o);return!l&&!u?d:$i(e,t,d,r,i,a,o,s+1)}function ea(e,t,n,r,i){let{autoFocus:a}=e,[o,s]=(0,k.useState)(),c=Zi(t.days,n,r||(()=>!1),o),[l,u]=(0,k.useState)(a?c:void 0);return{isFocusTarget:e=>!!c?.isEqualTo(e),setFocused:u,focused:l,blur:()=>{s(l),u(void 0)},moveFocus:(n,r)=>{if(!l)return;let a=$i(n,r,l,t.navStart,t.navEnd,e,i);a&&(e.disableNavigation&&!t.days.some(e=>e.isEqualTo(a))||(t.goToDay(a),u(a)))}}}function ta(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=Ji(n,i?n:void 0),s=i?n:a,{isSameDay:c}=t,l=e=>s?.some(t=>c(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(l(e)){if(s?.length===u||r&&s?.length===1)return;a=s?.filter(t=>!c(t,e))}else a=s?.length===d?[e]:[...a,e];return i||o(a),i?.(a,e,t,n),a},isSelected:l}}function na(e,t,n=0,r=0,i=!1,a=W){let{from:o,to:s}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=a,d;if(!o&&!s)d={from:e,to:n>0?void 0:e};else if(o&&!s)d=c(o,e)?n===0?{from:o,to:e}:i?{from:o,to:void 0}:void 0:u(e,o)?{from:e,to:o}:{from:o,to:e};else if(o&&s)if(c(o,e)&&c(s,e))d=i?{from:o,to:s}:void 0;else if(c(o,e))d={from:o,to:n>0?void 0:e};else if(c(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,o))d={from:e,to:s};else if(l(e,o))d={from:o,to:e};else if(l(e,s))d={from:o,to:e};else throw Error(`Invalid range`);if(d?.from&&d?.to){let t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}function ra(e,t,n=W){let r=Array.isArray(t)?t:[t],i=e.from,a=n.differenceInCalendarDays(e.to,e.from),o=Math.min(a,6);for(let e=0;e<=o;e++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}function ia(e,t,n=W){return Y(e,t.from,!1,n)||Y(e,t.to,!1,n)||Y(t,e.from,!1,n)||Y(t,e.to,!1,n)}function aa(e,t,n=W){let r=Array.isArray(t)?t:[t];if(r.filter(e=>typeof e!=`function`).some(t=>typeof t==`boolean`?t:n.isDate(t)?Y(e,t,!1,n):qr(t,n)?t.some(t=>Y(e,t,!1,n)):Ur(t)?t.from&&t.to?ia(e,{from:t.from,to:t.to},n):!1:Kr(t)?ra(e,t.dayOfWeek,n):Hr(t)?n.isAfter(t.before,t.after)?ia(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):X(e.from,t,n)||X(e.to,t,n):Wr(t)||Gr(t)?X(e.from,t,n)||X(e.to,t,n):!1))return!0;let i=r.filter(e=>typeof e==`function`);if(i.length){let t=e.from,r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}function oa(e,t){let{disabled:n,excludeDisabled:r,resetOnSelect:i,selected:a,required:o,onSelect:s}=e,[c,l]=Ji(a,s?a:void 0),u=s?a:c;return{selected:u,select:(a,c,d)=>{let{min:f,max:p}=e,m;if(a){let e=u?.from,n=u?.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(a,e);m=i&&(r||!u?.from)?!o&&s?void 0:{from:a,to:void 0}:na(a,u,f,p,o,t)}return r&&n&&m?.from&&m.to&&aa({from:m.from,to:m.to},n,t)&&(m.from=a,m.to=void 0),s||l(m),s?.(m,a,c,d),m},isSelected:e=>u&&Y(u,e,!1,t)}}function sa(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=Ji(n,i?n:void 0),s=i?n:a,{isSameDay:c}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!r&&s&&s&&c(e,s)&&(a=void 0),i||o(a),i?.(a,e,t,n),a},isSelected:e=>s?c(s,e):!1}}function ca(e,t){let n=sa(e,t),r=ta(e,t),i=oa(e,t);switch(e.mode){case`single`:return n;case`multiple`:return r;case`range`:return i;default:return}}function $(e,t){return e instanceof I&&e.timeZone===t?e:new I(e,t)}function la(e,t,n){if(!n)return $(e,t);let r=$(e,t),i=new I(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(i.getTime())}function ua(e,t,n){return typeof e==`boolean`||typeof e==`function`?e:e instanceof Date?la(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?la(e,t,n):e):Ur(e)?{...e,from:e.from?$(e.from,t):e.from,to:e.to?$(e.to,t):e.to}:Hr(e)?{before:la(e.before,t,n),after:la(e.after,t,n)}:Wr(e)?{after:la(e.after,t,n)}:Gr(e)?{before:la(e.before,t,n)}:e}function da(e,t,n){return e&&(Array.isArray(e)?e.map(e=>ua(e,t,n)):ua(e,t,n))}function fa(e){let t=e,n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&=$(t.today,n),t.month&&=$(t.month,n),t.defaultMonth&&=$(t.defaultMonth,n),t.startMonth&&=$(t.startMonth,n),t.endMonth&&=$(t.endMonth,n),t.mode===`single`&&t.selected?t.selected=$(t.selected,n):t.mode===`multiple`&&t.selected?t.selected=t.selected?.map(e=>$(e,n)):t.mode===`range`&&t.selected&&(t.selected={from:t.selected.from?$(t.selected.from,n):t.selected.from,to:t.selected.to?$(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=da(t.disabled,n)),t.hidden!==void 0&&(t.hidden=da(t.hidden,n)),t.modifiers)){let e={};Object.keys(t.modifiers).forEach(r=>{e[r]=da(t.modifiers?.[r],n)}),t.modifiers=e}let{components:r,formatters:i,labels:a,dateLib:o,locale:s,classNames:c}=(0,k.useMemo)(()=>{let e={...lr,...t.locale},n=t.broadcastCalendar?1:t.weekStartsOn,r=t.noonSafe&&t.timeZone?Ai(t.timeZone,{weekStartsOn:n,locale:e}):void 0,i=t.dateLib&&r?{...r,...t.dateLib}:t.dateLib??r,a=new U({locale:e,weekStartsOn:n,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},i);return{dateLib:a,components:Xr(t.components),formatters:li(t.formatters),labels:Ti(t.labels,a.options),locale:e,classNames:{...Qr(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:o.today()});let{captionLayout:l,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:m,onDayFocus:h,onDayKeyDown:g,onDayMouseEnter:_,onDayMouseLeave:v,onNextClick:y,onPrevClick:b,showWeekNumber:x,styles:S}=t,{formatCaption:ee,formatDay:te,formatMonthDropdown:C,formatWeekNumber:w,formatWeekNumberHeader:T,formatWeekdayName:ne,formatYearDropdown:re}=i,ie=Yi(t,o),{days:ae,months:oe,navStart:se,navEnd:ce,previousMonth:E,nextMonth:D,goToMonth:O}=ie,le=Jr(ae,t,se,ce,o),{isSelected:ue,select:de,selected:fe}=ca(t,o)??{},{blur:pe,focused:me,isFocusTarget:he,moveFocus:ge,setFocused:_e}=ea(t,ie,le,ue??(()=>!1),o),{labelDayButton:ve,labelGridcell:A,labelGrid:ye,labelMonthDropdown:be,labelNav:xe,labelPrevious:j,labelNext:Se,labelWeekday:M,labelWeekNumber:Ce,labelWeekNumberHeader:we,labelYearDropdown:Te}=a,Ee=(0,k.useMemo)(()=>Oi(o,t.ISOWeek,t.broadcastCalendar,t.today),[o,t.ISOWeek,t.broadcastCalendar,t.today]),De=u!==void 0||m!==void 0,N=(0,k.useCallback)(()=>{E&&(O(E),b?.(E))},[E,O,b]),Oe=(0,k.useCallback)(()=>{D&&(O(D),y?.(D))},[O,D,y]),ke=(0,k.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),_e(e),!t.disabled&&(de?.(e.date,t,n),m?.(e.date,t,n))},[de,m,_e]),Ae=(0,k.useCallback)((e,t)=>n=>{_e(e),h?.(e.date,t,n)},[h,_e]),P=(0,k.useCallback)((e,t)=>n=>{pe(),p?.(e.date,t,n)},[pe,p]),je=(0,k.useCallback)((e,n)=>r=>{let i={ArrowLeft:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`after`:`before`],ArrowRight:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`before`:`after`],ArrowDown:[r.shiftKey?`year`:`week`,`after`],ArrowUp:[r.shiftKey?`year`:`week`,`before`],PageUp:[r.shiftKey?`year`:`month`,`before`],PageDown:[r.shiftKey?`year`:`month`,`after`],Home:[`startOfWeek`,`before`],End:[`endOfWeek`,`after`]};if(i[r.key]){r.preventDefault(),r.stopPropagation();let[e,t]=i[r.key];ge(e,t)}g?.(e.date,n,r)},[ge,g,t.dir]),Me=(0,k.useCallback)((e,t)=>n=>{_?.(e.date,t,n)},[_]),Ne=(0,k.useCallback)((e,t)=>n=>{v?.(e.date,t,n)},[v]),Pe=(0,k.useCallback)(e=>t=>{let n=Number(t.target.value);O(o.setMonth(o.startOfMonth(e),n))},[o,O]),Fe=(0,k.useCallback)(e=>t=>{let n=Number(t.target.value);O(o.setYear(o.startOfMonth(e),n))},[o,O]),{className:Ie,style:Le}=(0,k.useMemo)(()=>({className:[c[G.Root],t.className].filter(Boolean).join(` `),style:{...S?.[G.Root],...t.style}}),[c,t.className,t.style,S]),Re=Zr(t),ze=(0,k.useRef)(null);Ri(ze,!!t.animate,{classNames:c,months:oe,focused:me,dateLib:o});let Be={dayPickerProps:t,selected:fe,select:de,isSelected:ue,months:oe,nextMonth:D,previousMonth:E,goToMonth:O,getModifiers:le,components:r,classNames:c,styles:S,labels:a,formatters:i};return k.createElement(Tr.Provider,{value:Be},k.createElement(r.Root,{rootRef:t.animate?ze:void 0,className:Ie,style:Le,dir:t.dir,id:t.id,lang:t.lang??s.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t[`aria-label`],"aria-labelledby":t[`aria-labelledby`],...Re},k.createElement(r.Months,{className:c[G.Months],style:S?.[G.Months]},!t.hideNavigation&&!d&&k.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[G.Nav],style:S?.[G.Nav],"aria-label":xe(),onPreviousClick:N,onNextClick:Oe,previousMonth:E,nextMonth:D}),oe.map((e,n)=>k.createElement(r.Month,{"data-animated-month":t.animate?`true`:void 0,className:c[G.Month],style:S?.[G.Month],key:n,displayIndex:n,calendarMonth:e},d===`around`&&!t.hideNavigation&&n===0&&k.createElement(r.PreviousMonthButton,{type:`button`,className:c[G.PreviousMonthButton],tabIndex:E?void 0:-1,"aria-disabled":E?void 0:!0,"aria-label":j(E),onClick:N,"data-animated-button":t.animate?`true`:void 0},k.createElement(r.Chevron,{disabled:E?void 0:!0,className:c[G.Chevron],orientation:t.dir===`rtl`?`right`:`left`})),k.createElement(r.MonthCaption,{"data-animated-caption":t.animate?`true`:void 0,className:c[G.MonthCaption],style:S?.[G.MonthCaption],calendarMonth:e,displayIndex:n},l?.startsWith(`dropdown`)?k.createElement(r.DropdownNav,{className:c[G.Dropdowns],style:S?.[G.Dropdowns]},(()=>{let n=l===`dropdown`||l===`dropdown-months`?k.createElement(r.MonthsDropdown,{key:`month`,className:c[G.MonthsDropdown],"aria-label":be(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Pe(e.date),options:Ei(e.date,se,ce,i,o),style:S?.[G.Dropdown],value:o.getMonth(e.date)}):k.createElement(`span`,{key:`month`},C(e.date,o)),a=l===`dropdown`||l===`dropdown-years`?k.createElement(r.YearsDropdown,{key:`year`,className:c[G.YearsDropdown],"aria-label":Te(o.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Fe(e.date),options:ki(se,ce,i,o,!!t.reverseYears),style:S?.[G.Dropdown],value:o.getYear(e.date)}):k.createElement(`span`,{key:`year`},re(e.date,o));return o.getMonthYearOrder()===`year-first`?[a,n]:[n,a]})(),k.createElement(`span`,{role:`status`,"aria-live":`polite`,style:{border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}},ee(e.date,o.options,o))):k.createElement(r.CaptionLabel,{className:c[G.CaptionLabel],role:`status`,"aria-live":`polite`},ee(e.date,o.options,o))),d===`around`&&!t.hideNavigation&&n===f-1&&k.createElement(r.NextMonthButton,{type:`button`,className:c[G.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":Se(D),onClick:Oe,"data-animated-button":t.animate?`true`:void 0},k.createElement(r.Chevron,{disabled:D?void 0:!0,className:c[G.Chevron],orientation:t.dir===`rtl`?`left`:`right`})),n===f-1&&d===`after`&&!t.hideNavigation&&k.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[G.Nav],style:S?.[G.Nav],"aria-label":xe(),onPreviousClick:N,onNextClick:Oe,previousMonth:E,nextMonth:D}),k.createElement(r.MonthGrid,{role:`grid`,"aria-multiselectable":u===`multiple`||u===`range`,"aria-label":ye(e.date,o.options,o)||void 0,className:c[G.MonthGrid],style:S?.[G.MonthGrid]},!t.hideWeekdays&&k.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?`true`:void 0,className:c[G.Weekdays],style:S?.[G.Weekdays]},x&&k.createElement(r.WeekNumberHeader,{"aria-label":we(o.options),className:c[G.WeekNumberHeader],style:S?.[G.WeekNumberHeader],scope:`col`},T()),Ee.map(e=>k.createElement(r.Weekday,{"aria-label":M(e,o.options,o),className:c[G.Weekday],key:String(e),style:S?.[G.Weekday],scope:`col`},ne(e,o.options,o)))),k.createElement(r.Weeks,{"data-animated-weeks":t.animate?`true`:void 0,className:c[G.Weeks],style:S?.[G.Weeks]},e.weeks.map(e=>k.createElement(r.Week,{className:c[G.Week],key:e.weekNumber,style:S?.[G.Week],week:e},x&&k.createElement(r.WeekNumber,{week:e,style:S?.[G.WeekNumber],"aria-label":Ce(e.weekNumber,{locale:s}),className:c[G.WeekNumber],scope:`row`,role:`rowheader`},w(e.weekNumber,o)),e.days.map(e=>{let{date:n}=e,i=le(e);if(i[K.focused]=!i.hidden&&!!me?.isEqualTo(e),i[q.selected]=ue?.(n)||i.selected,Ur(fe)){let{from:e,to:t}=fe;i[q.range_start]=!!(e&&t&&o.isSameDay(n,e)),i[q.range_end]=!!(e&&t&&o.isSameDay(n,t)),i[q.range_middle]=Y(fe,n,!0,o)}let a=Di(i,S,t.modifiersStyles),s=Yr(i,c,t.modifiersClassNames),l=!De&&!i.hidden?A(n,i,o.options,o):void 0;return k.createElement(r.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:i,className:s.join(` `),style:a,role:`gridcell`,"aria-selected":i.selected||void 0,"aria-label":l,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":i.selected||void 0,"data-disabled":i.disabled||void 0,"data-hidden":i.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":i.focused||void 0,"data-today":i.today||void 0},!i.hidden&&De?k.createElement(r.DayButton,{className:c[G.DayButton],style:S?.[G.DayButton],type:`button`,day:e,modifiers:i,disabled:!i.focused&&i.disabled||void 0,"aria-disabled":i.focused&&i.disabled||void 0,tabIndex:he(e)?0:-1,"aria-label":ve(n,i,o.options,o),onClick:ke(e,i),onBlur:P(e,i),onFocus:Ae(e,i),onKeyDown:je(e,i),onMouseEnter:Me(e,i),onMouseLeave:Ne(e,i)},te(n,o.options,o)):!i.hidden&&te(e.date,o.options,o))})))))))),t.footer&&k.createElement(r.Footer,{className:c[G.Footer],style:S?.[G.Footer],role:`status`,"aria-live":`polite`},t.footer)))}function pa({className:e,classNames:n,showOutsideDays:r=!0,captionLayout:i=`label`,buttonVariant:a=`ghost`,formatters:s,components:c,...l}){let u=Qr();return(0,A.jsx)(fa,{showOutsideDays:r,className:f(`group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent`,String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:i,formatters:{formatMonthDropdown:e=>e.toLocaleString(`default`,{month:`short`}),...s},classNames:{root:f(`w-fit`,u.root),months:f(`relative flex flex-col gap-4 md:flex-row`,u.months),month:f(`flex w-full flex-col gap-4`,u.month),nav:f(`absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1`,u.nav),button_previous:f(ie({variant:a}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,u.button_previous),button_next:f(ie({variant:a}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,u.button_next),month_caption:f(`flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)`,u.month_caption),dropdowns:f(`flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium`,u.dropdowns),dropdown_root:f(`relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50`,u.dropdown_root),dropdown:f(`absolute inset-0 bg-popover opacity-0`,u.dropdown),caption_label:f(`font-medium select-none`,i===`label`?`text-sm`:`flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground`,u.caption_label),table:`w-full border-collapse`,weekdays:f(`flex`,u.weekdays),weekday:f(`flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none`,u.weekday),week:f(`mt-2 flex w-full`,u.week),week_number_header:f(`w-(--cell-size) select-none`,u.week_number_header),week_number:f(`text-[0.8rem] text-muted-foreground select-none`,u.week_number),day:f(`group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md`,l.showWeekNumber?`[&:nth-child(2)[data-selected=true]_button]:rounded-l-md`:`[&:first-child[data-selected=true]_button]:rounded-l-md`,u.day),range_start:f(`rounded-l-md bg-accent`,u.range_start),range_middle:f(`rounded-none`,u.range_middle),range_end:f(`rounded-r-md bg-accent`,u.range_end),today:f(`rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none`,u.today),outside:f(`text-muted-foreground aria-selected:text-muted-foreground`,u.outside),disabled:f(`text-muted-foreground opacity-50`,u.disabled),hidden:f(`invisible`,u.hidden),...n},components:{Root:({className:e,rootRef:t,...n})=>(0,A.jsx)(`div`,{"data-slot":`calendar`,ref:t,className:f(e),...n}),Chevron:({className:e,orientation:n,...r})=>n===`left`?(0,A.jsx)(o,{className:f(`size-4`,e),...r}):n===`right`?(0,A.jsx)(v,{className:f(`size-4`,e),...r}):(0,A.jsx)(t,{className:f(`size-4`,e),...r}),DayButton:ma,WeekNumber:({children:e,...t})=>(0,A.jsx)(`td`,{...t,children:(0,A.jsx)(`div`,{className:`flex size-(--cell-size) items-center justify-center text-center`,children:e})}),...c},...l})}function ma({className:e,day:t,modifiers:n,...r}){let i=Qr(),a=k.useRef(null);return k.useEffect(()=>{n.focused&&a.current?.focus()},[n.focused]),(0,A.jsx)(E,{ref:a,variant:`ghost`,size:`icon`,"data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:f(`flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70`,i.day,e),...r})}function ha({...e}){return(0,A.jsx)(Ve,{"data-slot":`popover`,...e})}function ga({...e}){return(0,A.jsx)(He,{"data-slot":`popover-trigger`,...e})}function _a({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,A.jsx)(Ue,{children:(0,A.jsx)(We,{"data-slot":`popover-content`,align:t,sideOffset:n,className:f(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r})})}var va=[`all`,`spec.init`,`spec.complete`,`review.submit`],ya=10080*60*1e3;function ba(){let{t:e}=y(),[t,r]=(0,k.useState)(`all`),[i,a]=(0,k.useState)(!1),[o,s]=(0,k.useState)(``),[c,u]=(0,k.useState)(``),{data:d,isLoading:f}=n(l(100,t===`all`?void 0:t)),{data:p}=n(m()),h=d?.entries??[],g=(0,k.useMemo)(()=>{let e=h;if(!i&&!o&&!c){let t=Date.now()-ya;e=e.filter(e=>{try{return new Date(e.timestamp).getTime()>=t}catch{return!0}})}if(o){let t=new Date(o).getTime();e=e.filter(e=>{try{return new Date(e.timestamp).getTime()>=t}catch{return!0}})}if(c){let t=new Date(c).getTime()+864e5;e=e.filter(e=>{try{return new Date(e.timestamp).getTime()<t}catch{return!0}})}return e},[h,i,o,c]),_=!i&&g.length<h.length,v=(p?.epics??[]).filter(e=>e.status!==`completed`&&e.status!==`done`);return(0,A.jsxs)(`div`,{className:`space-y-6`,children:[(0,A.jsxs)(`div`,{className:`sticky top-14 z-10 pt-6 pb-3 -mt-6 flex items-center gap-4 backdrop-blur-sm`,children:[(0,A.jsx)(gt,{value:t,onValueChange:r,children:(0,A.jsx)(vt,{children:va.map(t=>(0,A.jsx)(yt,{value:t,className:`text-xs`,children:t===`all`?e(`activity.all`):t},t))})}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2 text-xs ml-auto`,children:[(0,A.jsxs)(ha,{children:[(0,A.jsx)(ga,{asChild:!0,children:(0,A.jsx)(E,{size:`sm`,variant:`outline`,className:`h-7 text-xs gap-1`,children:o||e(`activity.fromDate`)})}),(0,A.jsx)(_a,{className:`w-auto p-0`,align:`start`,children:(0,A.jsx)(pa,{mode:`single`,selected:o?new Date(o):void 0,onSelect:e=>s(e?e.toISOString().slice(0,10):``)})})]}),(0,A.jsx)(`span`,{className:`text-muted-foreground`,children:`—`}),(0,A.jsxs)(ha,{children:[(0,A.jsx)(ga,{asChild:!0,children:(0,A.jsx)(E,{size:`sm`,variant:`outline`,className:`h-7 text-xs gap-1`,children:c||e(`activity.toDate`)})}),(0,A.jsx)(_a,{className:`w-auto p-0`,align:`end`,children:(0,A.jsx)(pa,{mode:`single`,selected:c?new Date(c):void 0,onSelect:e=>u(e?e.toISOString().slice(0,10):``)})})]}),(0,A.jsx)(E,{size:`sm`,variant:`outline`,className:`h-7 text-xs gap-1`,onClick:()=>{let e=g.map(e=>`${e.timestamp},${e.action},${e.target},"${(e.detail??``).replace(/"/g,`""`)}"`).join(`
|
|
2
|
+
`),t=new Blob([`timestamp,action,target,detail
|
|
3
|
+
`+e],{type:`text/csv`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`activity.csv`,r.click(),URL.revokeObjectURL(n)},children:e(`activity.exportCsv`)})]})]}),f?(0,A.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:5}).map((e,t)=>(0,A.jsx)(ve,{className:`h-10 w-full`},`skel-${t}`))}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(xa,{entries:g}),_&&(0,A.jsx)(`div`,{className:`flex justify-center`,children:(0,A.jsx)(E,{variant:`outline`,size:`sm`,onClick:()=>a(!0),children:e(`activity.showOlder`)})})]}),v.length>0&&(0,A.jsx)(wa,{epics:v})]})}function xa({entries:e}){let{t,locale:n}=y(),[r,i]=(0,k.useState)(null);return(0,A.jsxs)(ut,{children:[(0,A.jsx)(dt,{children:(0,A.jsxs)(pt,{children:[(0,A.jsx)(mt,{className:`w-44`,children:t(`activity.timestamp`)}),(0,A.jsx)(mt,{className:`w-32`,children:t(`activity.action`)}),(0,A.jsx)(mt,{children:t(`activity.target`)}),(0,A.jsx)(mt,{children:t(`activity.detail`)})]})}),(0,A.jsxs)(ft,{children:[e.map((e,t)=>{let a=r===t,o=!!e.detail&&e.detail.length>40;return(0,A.jsxs)(pt,{className:o?`cursor-pointer hover:bg-accent/50`:``,onClick:()=>o&&i(a?null:t),children:[(0,A.jsx)(ht,{className:`text-xs text-muted-foreground font-mono align-top`,children:Ta(e.timestamp,n)}),(0,A.jsx)(ht,{className:`align-top`,children:(0,A.jsx)(Ca,{action:e.action})}),(0,A.jsx)(ht,{className:`text-sm align-top`,children:e.target}),(0,A.jsx)(ht,{className:`text-xs text-muted-foreground`,children:a?(0,A.jsx)(`div`,{className:`whitespace-pre-wrap break-words max-w-lg`,children:e.detail}):(0,A.jsx)(`div`,{className:`max-w-xs truncate`,children:e.detail})})]},`${e.timestamp}-${t}`)}),e.length===0&&(0,A.jsx)(pt,{children:(0,A.jsx)(ht,{colSpan:4,children:(0,A.jsx)(pe,{scene:`bow`,messageKey:`empty.noActivity`})})})]})]})}var Sa={"spec.init":`#40513b`,"spec.complete":`#2d8b7a`,"spec.delete":`#c0392b`,"review.submit":`#628141`,"living-spec.update":`#7b6b8d`};function Ca({action:e}){let t=Sa[e]??`#6b7280`;return(0,A.jsx)(h,{variant:`outline`,className:`text-xs`,style:{borderColor:`${t}40`,color:t},children:e})}function wa({epics:e}){let{t}=y();return(0,A.jsxs)(`div`,{className:`space-y-3`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:t(`activity.epics`)}),(0,A.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:e.map(e=>{let t=e.total>0?e.completed/e.total*100:0;return(0,A.jsxs)(_e,{children:[(0,A.jsx)(ge,{className:`pb-2`,children:(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsx)(me,{className:`text-sm`,children:e.name}),(0,A.jsx)(h,{variant:`outline`,className:`text-xs`,children:e.status})]})}),(0,A.jsxs)(he,{className:`space-y-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(fe,{value:t,className:`flex-1`}),(0,A.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[e.completed,`/`,e.total]})]}),e.tasks&&e.tasks.length>0&&(0,A.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.tasks.map(e=>(0,A.jsx)(h,{variant:`outline`,className:`text-[10px]`,style:{borderColor:e.status===`completed`||e.status===`done`?`rgba(45,139,122,0.3)`:`rgba(107,114,128,0.3)`,color:e.status===`completed`||e.status===`done`?`#2d8b7a`:`#6b7280`},children:e.slug},e.slug))}),(0,A.jsx)(lt,{epic:e})]})]},e.slug)})})]})}function Ta(e,t=`en`){try{return new Date(e).toLocaleString(i(t),{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}catch{return e}}export{ba as component};
|