@vibeflow-tools/cli 0.1.1 → 0.2.0
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/chunk-BKTZSHJS.js +2 -0
- package/dist/cli/chunk-BKTZSHJS.js +2 -0
- package/dist/cli/files-3RDDXUOS.js +2 -0
- package/dist/cli/index.js +381 -180
- package/dist/client/kanban-browser.js +12 -12
- package/dist/client/kanban.css +1 -1
- package/dist/client/overlay-browser.js +31 -16
- package/dist/files-3RDDXUOS.js +2 -0
- package/dist/index.js +381 -180
- package/dist/overlay.css +13 -0
- package/package.json +9 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as
|
|
3
|
-
`+
|
|
4
|
-
`+r}import{watch as
|
|
2
|
+
import{a as ce,b as Ie,c as bn,d as kn,e as Te,f as wn,g as we,h as xe,i as Ce,j as ee,k as ue,l as z,m as De,n as Ae,o as xn,q as ne,r as Cn,s as Sn,t as En,u as _e}from"./chunk-BKTZSHJS.js";import{a as J,b as Pn}from"./chunk-KJ5LYG6A.js";import{Command as vo}from"commander";import{execSync as yn,execFileSync as Ge}from"child_process";import{readFileSync as yr,readdirSync as br,statSync as kr,existsSync as wr,writeFileSync as Xn,mkdirSync as Jn,unlinkSync as tt}from"fs";import{createRequire as xr}from"module";import{join as ae,resolve as Cr,basename as me,extname as Sr,dirname as Er}from"path";import{createServer as rt}from"http";import{spawn as Pr,execSync as ot}from"child_process";import{networkInterfaces as Ir}from"os";import de from"express";import{WebSocketServer as at,WebSocket as it}from"ws";import g from"chalk";import{createExpressMiddleware as Tr}from"@trpc/server/adapters/express";import*as Ht from"cheerio";import{readdirSync as So,statSync as Eo}from"fs";import{join as Io,extname as To}from"path";function In(t,e){let r=`<script data-vibeflow-overlay>${e}</script>`,i=t.lastIndexOf("</body>");return i!==-1?t.slice(0,i)+r+`
|
|
3
|
+
`+t.slice(i):t+`
|
|
4
|
+
`+r}import{watch as Ut}from"chokidar";function Xe(t,e){let r=Ut(t,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});return r.on("change",i=>{e.onChange(i)}),e.onAdd&&r.on("add",e.onAdd),e.onUnlink&&r.on("unlink",e.onUnlink),r}function Je(t,e){return Xe(t,{onChange:e.onChanged,onAdd:e.onChanged,onUnlink:e.onDeleted})}var Ze=`"use strict";
|
|
5
5
|
(() => {
|
|
6
6
|
var __create = Object.create;
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
@@ -1922,7 +1922,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
1922
1922
|
if (true) {
|
|
1923
1923
|
(function() {
|
|
1924
1924
|
"use strict";
|
|
1925
|
-
var
|
|
1925
|
+
var React23 = require_react();
|
|
1926
1926
|
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
|
|
1927
1927
|
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
1928
1928
|
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
@@ -1948,7 +1948,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
1948
1948
|
}
|
|
1949
1949
|
return null;
|
|
1950
1950
|
}
|
|
1951
|
-
var ReactSharedInternals =
|
|
1951
|
+
var ReactSharedInternals = React23.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1952
1952
|
function error(format) {
|
|
1953
1953
|
{
|
|
1954
1954
|
{
|
|
@@ -2798,11 +2798,11 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
2798
2798
|
return jsxWithValidation(type, props, key, false);
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
|
-
var
|
|
2802
|
-
var
|
|
2801
|
+
var jsx31 = jsxWithValidationDynamic;
|
|
2802
|
+
var jsxs26 = jsxWithValidationStatic;
|
|
2803
2803
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
2804
|
-
exports.jsx =
|
|
2805
|
-
exports.jsxs =
|
|
2804
|
+
exports.jsx = jsx31;
|
|
2805
|
+
exports.jsxs = jsxs26;
|
|
2806
2806
|
})();
|
|
2807
2807
|
}
|
|
2808
2808
|
}
|
|
@@ -3292,9 +3292,9 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
3292
3292
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
3293
3293
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
3294
3294
|
}
|
|
3295
|
-
var
|
|
3295
|
+
var React23 = require_react();
|
|
3296
3296
|
var Scheduler = require_scheduler();
|
|
3297
|
-
var ReactSharedInternals =
|
|
3297
|
+
var ReactSharedInternals = React23.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
3298
3298
|
var suppressWarning = false;
|
|
3299
3299
|
function setSuppressWarning(newSuppressWarning) {
|
|
3300
3300
|
{
|
|
@@ -4901,7 +4901,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
4901
4901
|
{
|
|
4902
4902
|
if (props.value == null) {
|
|
4903
4903
|
if (typeof props.children === "object" && props.children !== null) {
|
|
4904
|
-
|
|
4904
|
+
React23.Children.forEach(props.children, function(child) {
|
|
4905
4905
|
if (child == null) {
|
|
4906
4906
|
return;
|
|
4907
4907
|
}
|
|
@@ -24674,6 +24674,19 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
24674
24674
|
border-color: #3b82f6;
|
|
24675
24675
|
}
|
|
24676
24676
|
|
|
24677
|
+
.vibeflow-popover input[type="text"].input-error {
|
|
24678
|
+
border-color: #ef4444;
|
|
24679
|
+
outline: 2px solid rgba(239, 68, 68, 0.35);
|
|
24680
|
+
outline-offset: 1px;
|
|
24681
|
+
animation: input-shake 0.28s ease;
|
|
24682
|
+
}
|
|
24683
|
+
|
|
24684
|
+
@keyframes input-shake {
|
|
24685
|
+
0%, 100% { transform: translateX(0); }
|
|
24686
|
+
25% { transform: translateX(-4px); }
|
|
24687
|
+
75% { transform: translateX(4px); }
|
|
24688
|
+
}
|
|
24689
|
+
|
|
24677
24690
|
.vibeflow-popover input[type="text"]::placeholder { color: #64748b; }
|
|
24678
24691
|
|
|
24679
24692
|
.vibeflow-popover select {
|
|
@@ -26652,7 +26665,74 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
26652
26665
|
return ((_a = fiber == null ? void 0 : fiber._debugStack) == null ? void 0 : _a.stack) ?? null;
|
|
26653
26666
|
}
|
|
26654
26667
|
function cleanSourcePath(raw) {
|
|
26655
|
-
return raw.replace(/^file:\\/\\/\\/app\\//, "").replace(/^file:\\/\\/\\//, "").replace(/\\[project\\]\\//g, "").replace(/%28/g, "(").replace(/%29/g, ")").replace(/%20/g, " ");
|
|
26668
|
+
return raw.replace(/\\?.*$/, "").replace(/^https?:\\/\\/[^/]+\\/@fs/, "").replace(/^https?:\\/\\/[^/]+/, "").replace(/^file:\\/\\/\\/app\\//, "").replace(/^file:\\/\\/\\//, "").replace(/\\[project\\]\\//g, "").replace(/%28/g, "(").replace(/%29/g, ")").replace(/%20/g, " ");
|
|
26669
|
+
}
|
|
26670
|
+
var DIRECT_SRC_EXT_RE = /\\.m?[tj]sx?(\\?[^)]*)?$/;
|
|
26671
|
+
var BUNDLE_CHUNK_RE = /chunk[-_.][0-9a-f]{6,}|\\.chunk\\.[0-9a-f]|webpack|_next\\/(?:static\\/chunks|dist)|rollup/i;
|
|
26672
|
+
function isDirectSourceUrl(url) {
|
|
26673
|
+
if (!url) return false;
|
|
26674
|
+
if (!DIRECT_SRC_EXT_RE.test(url)) return false;
|
|
26675
|
+
if (BUNDLE_CHUNK_RE.test(url)) return false;
|
|
26676
|
+
if (SKIP_FRAME_RE.test(url)) return false;
|
|
26677
|
+
return true;
|
|
26678
|
+
}
|
|
26679
|
+
function captureV8CallSites(err) {
|
|
26680
|
+
if (typeof Error.captureStackTrace !== "function") return null;
|
|
26681
|
+
const prev = Error.prepareStackTrace;
|
|
26682
|
+
let captured = null;
|
|
26683
|
+
try {
|
|
26684
|
+
Error.prepareStackTrace = (_, sites) => {
|
|
26685
|
+
captured = sites;
|
|
26686
|
+
return sites.map((s) => \` at \${s.getFunctionName() ?? "<anonymous>"} (\${s.getFileName()}:\${s.getLineNumber()}:\${s.getColumnNumber()})\`).join("\\n");
|
|
26687
|
+
};
|
|
26688
|
+
void err.stack;
|
|
26689
|
+
} finally {
|
|
26690
|
+
Error.prepareStackTrace = prev;
|
|
26691
|
+
}
|
|
26692
|
+
return captured;
|
|
26693
|
+
}
|
|
26694
|
+
function getDebugStackError(el2) {
|
|
26695
|
+
const fiberKey = Object.keys(el2).find(
|
|
26696
|
+
(k) => k.startsWith("__reactFiber") || k.startsWith("__reactInternalInstance")
|
|
26697
|
+
);
|
|
26698
|
+
if (!fiberKey) return null;
|
|
26699
|
+
const fiber = el2[fiberKey];
|
|
26700
|
+
const ds = fiber == null ? void 0 : fiber._debugStack;
|
|
26701
|
+
return ds instanceof Error ? ds : null;
|
|
26702
|
+
}
|
|
26703
|
+
function resolveDirectSourceFromStack(el2) {
|
|
26704
|
+
var _a, _b, _c, _d;
|
|
26705
|
+
const stackErr = getDebugStackError(el2);
|
|
26706
|
+
if (!stackErr) return null;
|
|
26707
|
+
const callSites = captureV8CallSites(stackErr);
|
|
26708
|
+
if (callSites) {
|
|
26709
|
+
for (const site of callSites) {
|
|
26710
|
+
const fileName = ((_a = site.getFileName) == null ? void 0 : _a.call(site)) ?? null;
|
|
26711
|
+
if (!fileName || SKIP_FRAME_RE.test(fileName)) continue;
|
|
26712
|
+
if (!isDirectSourceUrl(fileName)) continue;
|
|
26713
|
+
return {
|
|
26714
|
+
file: cleanSourcePath(fileName),
|
|
26715
|
+
line: ((_b = site.getLineNumber) == null ? void 0 : _b.call(site)) ?? 1,
|
|
26716
|
+
col: ((_c = site.getColumnNumber) == null ? void 0 : _c.call(site)) ?? 1,
|
|
26717
|
+
fnName: ((_d = site.getFunctionName) == null ? void 0 : _d.call(site)) ?? void 0
|
|
26718
|
+
};
|
|
26719
|
+
}
|
|
26720
|
+
}
|
|
26721
|
+
const stack = typeof stackErr.stack === "string" ? stackErr.stack : null;
|
|
26722
|
+
if (!stack) return null;
|
|
26723
|
+
for (const raw of stack.split("\\n")) {
|
|
26724
|
+
const m = raw.match(/^\\s*at [^(]+ \\(([^)]+):(\\d+):(\\d+)\\)$/) ?? raw.match(/^\\s*at ((?:https?|file):\\/\\/[^:]+):(\\d+):(\\d+)$/);
|
|
26725
|
+
if (!m) continue;
|
|
26726
|
+
const [, url, lineStr, colStr] = m;
|
|
26727
|
+
if (!isDirectSourceUrl(url)) continue;
|
|
26728
|
+
if (SKIP_FRAME_RE.test(url)) continue;
|
|
26729
|
+
return {
|
|
26730
|
+
file: cleanSourcePath(url),
|
|
26731
|
+
line: parseInt(lineStr, 10),
|
|
26732
|
+
col: parseInt(colStr, 10)
|
|
26733
|
+
};
|
|
26734
|
+
}
|
|
26735
|
+
return null;
|
|
26656
26736
|
}
|
|
26657
26737
|
async function resolveSourceFromStack(el2) {
|
|
26658
26738
|
const stack = getDebugStackStr(el2);
|
|
@@ -26668,6 +26748,16 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
26668
26748
|
async function buildSourcePointerAsync(element) {
|
|
26669
26749
|
const pointer = buildSourcePointer(element);
|
|
26670
26750
|
if (pointer.file) return pointer;
|
|
26751
|
+
const direct = resolveDirectSourceFromStack(element);
|
|
26752
|
+
if (direct) {
|
|
26753
|
+
pointer.file = direct.file;
|
|
26754
|
+
pointer.line = direct.line;
|
|
26755
|
+
pointer.col = direct.col;
|
|
26756
|
+
const fileName2 = direct.file.replace(/\\\\/g, "/").split("/").pop() ?? direct.file;
|
|
26757
|
+
pointer.selector = \`\${direct.file}:\${direct.line}\`;
|
|
26758
|
+
pointer.display = \`\${fileName2}:\${direct.line}\`;
|
|
26759
|
+
return pointer;
|
|
26760
|
+
}
|
|
26671
26761
|
const resolved = await resolveSourceFromStack(element);
|
|
26672
26762
|
if (!resolved) return pointer;
|
|
26673
26763
|
pointer.file = resolved.file;
|
|
@@ -26680,7 +26770,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
26680
26770
|
}
|
|
26681
26771
|
|
|
26682
26772
|
// src/client/overlay-react/OverlayApp.tsx
|
|
26683
|
-
var
|
|
26773
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
26684
26774
|
|
|
26685
26775
|
// ../ui/src/VibeflowIcon.tsx
|
|
26686
26776
|
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
@@ -27157,6 +27247,8 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27157
27247
|
return false;
|
|
27158
27248
|
}
|
|
27159
27249
|
}
|
|
27250
|
+
var KEY_DIGITS = 16;
|
|
27251
|
+
var MAX_INT = BigInt("9".repeat(KEY_DIGITS));
|
|
27160
27252
|
|
|
27161
27253
|
// ../ui/src/kanban/components/KanbanBoard.tsx
|
|
27162
27254
|
var import_react8 = __toESM(require_react(), 1);
|
|
@@ -27164,7 +27256,82 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27164
27256
|
// ../ui/src/kanban/components/TaskCard.tsx
|
|
27165
27257
|
var import_react7 = __toESM(require_react(), 1);
|
|
27166
27258
|
var import_react_dom = __toESM(require_react_dom(), 1);
|
|
27259
|
+
|
|
27260
|
+
// ../ui/src/kanban/tag-colors.ts
|
|
27261
|
+
var TAG_PALETTE = [
|
|
27262
|
+
{ bg: "color-mix(in srgb, var(--p-blue) 14%, transparent)", text: "var(--p-blue-200)", border: "color-mix(in srgb, var(--p-blue) 30%, transparent)" },
|
|
27263
|
+
{ bg: "color-mix(in srgb, var(--p-green) 14%, transparent)", text: "var(--p-green-300)", border: "color-mix(in srgb, var(--p-green) 30%, transparent)" },
|
|
27264
|
+
{ bg: "color-mix(in srgb, var(--p-purple) 14%, transparent)", text: "var(--p-purple-300)", border: "color-mix(in srgb, var(--p-purple) 30%, transparent)" },
|
|
27265
|
+
{ bg: "color-mix(in srgb, var(--p-amber) 14%, transparent)", text: "var(--p-amber-300)", border: "color-mix(in srgb, var(--p-amber) 30%, transparent)" },
|
|
27266
|
+
{ bg: "color-mix(in srgb, #f472b6 14%, transparent)", text: "#f9a8d4", border: "color-mix(in srgb, #f472b6 30%, transparent)" },
|
|
27267
|
+
{ bg: "color-mix(in srgb, var(--p-cyan) 14%, transparent)", text: "var(--p-cyan-300)", border: "color-mix(in srgb, var(--p-cyan) 30%, transparent)" },
|
|
27268
|
+
{ bg: "color-mix(in srgb, #f87171 14%, transparent)", text: "#fca5a5", border: "color-mix(in srgb, #f87171 30%, transparent)" },
|
|
27269
|
+
{ bg: "color-mix(in srgb, var(--p-text-g) 14%, transparent)", text: "var(--p-text-m)", border: "color-mix(in srgb, var(--p-text-g) 30%, transparent)" }
|
|
27270
|
+
];
|
|
27271
|
+
function hashTagName(name) {
|
|
27272
|
+
let hash = 0;
|
|
27273
|
+
for (let i = 0; i < name.length; i++) {
|
|
27274
|
+
hash = hash * 31 + name.charCodeAt(i) >>> 0;
|
|
27275
|
+
}
|
|
27276
|
+
return hash % TAG_PALETTE.length;
|
|
27277
|
+
}
|
|
27278
|
+
function getTagColors(name) {
|
|
27279
|
+
return TAG_PALETTE[hashTagName(name)];
|
|
27280
|
+
}
|
|
27281
|
+
|
|
27282
|
+
// ../ui/src/kanban/components/shared/TagPills.tsx
|
|
27167
27283
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
27284
|
+
function TagPills({ tags, onRemove, size = "sm" }) {
|
|
27285
|
+
if (!tags.length) return null;
|
|
27286
|
+
const padding = size === "xs" ? "1px 6px" : "2px 7px";
|
|
27287
|
+
const fontSize = size === "xs" ? 9 : 10;
|
|
27288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: 3, alignItems: "center" }, children: tags.map((tag) => {
|
|
27289
|
+
const { bg, text, border } = getTagColors(tag);
|
|
27290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
27291
|
+
"span",
|
|
27292
|
+
{
|
|
27293
|
+
style: {
|
|
27294
|
+
display: "inline-flex",
|
|
27295
|
+
alignItems: "center",
|
|
27296
|
+
gap: 3,
|
|
27297
|
+
padding,
|
|
27298
|
+
borderRadius: 100,
|
|
27299
|
+
background: bg,
|
|
27300
|
+
border: \`1px solid \${border}\`,
|
|
27301
|
+
color: text,
|
|
27302
|
+
fontSize,
|
|
27303
|
+
fontWeight: 600,
|
|
27304
|
+
whiteSpace: "nowrap"
|
|
27305
|
+
},
|
|
27306
|
+
children: [
|
|
27307
|
+
tag,
|
|
27308
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27309
|
+
"button",
|
|
27310
|
+
{
|
|
27311
|
+
type: "button",
|
|
27312
|
+
onClick: (e) => {
|
|
27313
|
+
e.stopPropagation();
|
|
27314
|
+
onRemove(tag);
|
|
27315
|
+
},
|
|
27316
|
+
style: { display: "flex", background: "none", border: "none", color: text, cursor: "pointer", padding: 0, lineHeight: 1, opacity: 0.7 },
|
|
27317
|
+
onMouseEnter: (e) => {
|
|
27318
|
+
e.currentTarget.style.opacity = "1";
|
|
27319
|
+
},
|
|
27320
|
+
onMouseLeave: (e) => {
|
|
27321
|
+
e.currentTarget.style.opacity = "0.7";
|
|
27322
|
+
},
|
|
27323
|
+
children: "\\xD7"
|
|
27324
|
+
}
|
|
27325
|
+
)
|
|
27326
|
+
]
|
|
27327
|
+
},
|
|
27328
|
+
tag
|
|
27329
|
+
);
|
|
27330
|
+
}) });
|
|
27331
|
+
}
|
|
27332
|
+
|
|
27333
|
+
// ../ui/src/kanban/components/TaskCard.tsx
|
|
27334
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
27168
27335
|
function isImageFileName(name) {
|
|
27169
27336
|
return /\\.(png|jpe?g|gif|webp|svg|avif)$/i.test(name);
|
|
27170
27337
|
}
|
|
@@ -27217,7 +27384,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27217
27384
|
e.currentTarget.classList.remove("dragging");
|
|
27218
27385
|
}
|
|
27219
27386
|
if (isDone) {
|
|
27220
|
-
return /* @__PURE__ */ (0,
|
|
27387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
27221
27388
|
"article",
|
|
27222
27389
|
{
|
|
27223
27390
|
className: "task-card",
|
|
@@ -27227,14 +27394,14 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27227
27394
|
onDragStart: handleDragStart,
|
|
27228
27395
|
onDragEnd: handleDragEnd,
|
|
27229
27396
|
onClick: () => onOpen(task),
|
|
27230
|
-
children: /* @__PURE__ */ (0,
|
|
27231
|
-
/* @__PURE__ */ (0,
|
|
27232
|
-
/* @__PURE__ */ (0,
|
|
27397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: DONE_INNER_ROW_STYLE, children: [
|
|
27398
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CircleCheckBig, { style: DONE_CHECK_ICON_STYLE }),
|
|
27399
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: DONE_TITLE_STYLE, children: task.title })
|
|
27233
27400
|
] })
|
|
27234
27401
|
}
|
|
27235
27402
|
);
|
|
27236
27403
|
}
|
|
27237
|
-
return /* @__PURE__ */ (0,
|
|
27404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
27238
27405
|
"article",
|
|
27239
27406
|
{
|
|
27240
27407
|
className: \`task-card\${liveActivity ? " task-live-edit" : ""}\`,
|
|
@@ -27251,13 +27418,13 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27251
27418
|
onDragEnd: handleDragEnd,
|
|
27252
27419
|
onClick: () => onOpen(task),
|
|
27253
27420
|
children: [
|
|
27254
|
-
/* @__PURE__ */ (0,
|
|
27255
|
-
isInProgress && /* @__PURE__ */ (0,
|
|
27256
|
-
/* @__PURE__ */ (0,
|
|
27421
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: CARD_TITLE_ROW_STYLE, children: [
|
|
27422
|
+
isInProgress && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "spinner", style: SPINNER_SHRINK_STYLE }),
|
|
27423
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: CARD_TITLE_TEXT_STYLE, children: task.title })
|
|
27257
27424
|
] }),
|
|
27258
|
-
(task.description || thumbnailUrl) && /* @__PURE__ */ (0,
|
|
27259
|
-
task.description && /* @__PURE__ */ (0,
|
|
27260
|
-
thumbnailUrl && /* @__PURE__ */ (0,
|
|
27425
|
+
(task.description || thumbnailUrl) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: DESC_THUMB_ROW_STYLE, children: [
|
|
27426
|
+
task.description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: DESC_TEXT_STYLE, children: task.description }),
|
|
27427
|
+
thumbnailUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
27261
27428
|
"div",
|
|
27262
27429
|
{
|
|
27263
27430
|
style: THUMB_WRAPPER_STYLE,
|
|
@@ -27273,7 +27440,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27273
27440
|
setThumbRect(null);
|
|
27274
27441
|
},
|
|
27275
27442
|
children: [
|
|
27276
|
-
/* @__PURE__ */ (0,
|
|
27443
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
27277
27444
|
"img",
|
|
27278
27445
|
{
|
|
27279
27446
|
ref: thumbRef,
|
|
@@ -27284,7 +27451,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27284
27451
|
}
|
|
27285
27452
|
),
|
|
27286
27453
|
showThumbPreview && thumbRect && import_react_dom.default.createPortal(
|
|
27287
|
-
/* @__PURE__ */ (0,
|
|
27454
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
27288
27455
|
"img",
|
|
27289
27456
|
{
|
|
27290
27457
|
src: thumbnailUrl,
|
|
@@ -27312,10 +27479,10 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27312
27479
|
}
|
|
27313
27480
|
)
|
|
27314
27481
|
] }),
|
|
27315
|
-
/* @__PURE__ */ (0,
|
|
27316
|
-
/* @__PURE__ */ (0,
|
|
27317
|
-
task.priority && /* @__PURE__ */ (0,
|
|
27318
|
-
isInProgress && task.assigneeName && /* @__PURE__ */ (0,
|
|
27482
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center", style: CARD_FOOTER_STYLE, children: [
|
|
27483
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TypeBadge, { type: task.type }),
|
|
27484
|
+
task.priority && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PriorityBadge, { priority: task.priority }),
|
|
27485
|
+
isInProgress && task.assigneeName && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: {
|
|
27319
27486
|
fontSize: 10,
|
|
27320
27487
|
fontWeight: 600,
|
|
27321
27488
|
padding: "1px 6px",
|
|
@@ -27327,12 +27494,13 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27327
27494
|
textOverflow: "ellipsis",
|
|
27328
27495
|
maxWidth: 80
|
|
27329
27496
|
}, children: task.assigneeName }),
|
|
27330
|
-
/* @__PURE__ */ (0,
|
|
27331
|
-
|
|
27332
|
-
/* @__PURE__ */ (0,
|
|
27497
|
+
task.tags && task.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TagPills, { tags: task.tags, size: "xs" }),
|
|
27498
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: SPACER_STYLE }),
|
|
27499
|
+
liveActivity && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LiveActivityBadge, { activity: liveActivity }),
|
|
27500
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
27333
27501
|
CardIconButton,
|
|
27334
27502
|
{
|
|
27335
|
-
icon: /* @__PURE__ */ (0,
|
|
27503
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MessageCircle, { style: { width: 9, height: 9 } }),
|
|
27336
27504
|
label: commentCount > 0 ? String(commentCount) : "",
|
|
27337
27505
|
color: hasNewComments ? "var(--p-purple)" : commentCount > 0 ? "var(--p-text-m)" : "var(--p-border-t)",
|
|
27338
27506
|
hoverColor: hasNewComments ? "var(--p-purple-300)" : "var(--p-text)",
|
|
@@ -27345,10 +27513,10 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27345
27513
|
}
|
|
27346
27514
|
}
|
|
27347
27515
|
),
|
|
27348
|
-
/* @__PURE__ */ (0,
|
|
27516
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
27349
27517
|
CardIconButton,
|
|
27350
27518
|
{
|
|
27351
|
-
icon: /* @__PURE__ */ (0,
|
|
27519
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Paperclip, { style: { width: 9, height: 9 } }),
|
|
27352
27520
|
label: fileCount > 0 ? String(fileCount) : "",
|
|
27353
27521
|
color: fileCount > 0 ? "var(--p-blue-300)" : "var(--p-border-t)",
|
|
27354
27522
|
hoverColor: fileCount > 0 ? "var(--p-cyan-300)" : "var(--p-text-sub)",
|
|
@@ -27366,7 +27534,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27366
27534
|
});
|
|
27367
27535
|
function CardIconButton({ icon, label, color, hoverColor, title, badge, badgeColor, onClick }) {
|
|
27368
27536
|
const [hovered, setHovered] = import_react7.default.useState(false);
|
|
27369
|
-
return /* @__PURE__ */ (0,
|
|
27537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
27370
27538
|
"button",
|
|
27371
27539
|
{
|
|
27372
27540
|
style: {
|
|
@@ -27388,15 +27556,15 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27388
27556
|
onClick,
|
|
27389
27557
|
children: [
|
|
27390
27558
|
icon,
|
|
27391
|
-
label && /* @__PURE__ */ (0,
|
|
27392
|
-
badge && /* @__PURE__ */ (0,
|
|
27559
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: label }),
|
|
27560
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { width: 4, height: 4, background: badgeColor ?? color, borderRadius: "50%", flexShrink: 0 } })
|
|
27393
27561
|
]
|
|
27394
27562
|
}
|
|
27395
27563
|
);
|
|
27396
27564
|
}
|
|
27397
27565
|
function LiveActivityBadge({ activity }) {
|
|
27398
27566
|
const isLocked = activity.state === "locked" || activity.state === "editing";
|
|
27399
|
-
const icon = isLocked ? /* @__PURE__ */ (0,
|
|
27567
|
+
const icon = isLocked ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Lock, { style: { width: 8, height: 8 } }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Eye, { style: { width: 8, height: 8 } });
|
|
27400
27568
|
const label = isLocked ? \`Locked by \${activity.user}\` : \`\${activity.user} viewing\`;
|
|
27401
27569
|
const badgeStyle = isLocked ? {
|
|
27402
27570
|
display: "inline-flex",
|
|
@@ -27431,37 +27599,37 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27431
27599
|
whiteSpace: "nowrap",
|
|
27432
27600
|
flexWrap: "nowrap"
|
|
27433
27601
|
};
|
|
27434
|
-
return /* @__PURE__ */ (0,
|
|
27602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { style: badgeStyle, title: label, "data-testid": "live-activity-badge", children: [
|
|
27435
27603
|
icon,
|
|
27436
|
-
/* @__PURE__ */ (0,
|
|
27604
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { overflow: "hidden", textOverflow: "ellipsis", minWidth: 0, flex: "1 1 0" }, children: activity.user })
|
|
27437
27605
|
] });
|
|
27438
27606
|
}
|
|
27439
27607
|
|
|
27440
27608
|
// ../ui/src/kanban/components/KanbanBoard.tsx
|
|
27441
|
-
var
|
|
27609
|
+
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
27442
27610
|
|
|
27443
27611
|
// ../ui/src/kanban/components/KanbanListView.tsx
|
|
27444
27612
|
var import_react9 = __toESM(require_react(), 1);
|
|
27445
|
-
var
|
|
27613
|
+
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
|
|
27446
27614
|
|
|
27447
27615
|
// ../ui/src/kanban/components/Header.tsx
|
|
27448
27616
|
var import_react10 = __toESM(require_react(), 1);
|
|
27449
27617
|
|
|
27450
27618
|
// ../ui/src/kanban/components/shared/HeaderActionButton.tsx
|
|
27451
|
-
var
|
|
27619
|
+
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
|
|
27452
27620
|
|
|
27453
27621
|
// ../ui/src/kanban/components/Header.tsx
|
|
27454
|
-
var
|
|
27622
|
+
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
27455
27623
|
|
|
27456
27624
|
// ../ui/src/kanban/components/DetailPanel.tsx
|
|
27457
|
-
var
|
|
27625
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
27458
27626
|
|
|
27459
27627
|
// ../ui/src/kanban/components/shared/CommentsList.tsx
|
|
27460
27628
|
var import_react14 = __toESM(require_react(), 1);
|
|
27461
27629
|
|
|
27462
27630
|
// ../ui/src/AutoExpandTextarea.tsx
|
|
27463
27631
|
var import_react11 = __toESM(require_react(), 1);
|
|
27464
|
-
var
|
|
27632
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
27465
27633
|
var AutoExpandTextarea = import_react11.default.forwardRef(function AutoExpandTextarea2({
|
|
27466
27634
|
value,
|
|
27467
27635
|
onChange,
|
|
@@ -27489,7 +27657,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27489
27657
|
import_react11.default.useLayoutEffect(() => {
|
|
27490
27658
|
resize();
|
|
27491
27659
|
}, [value, resize]);
|
|
27492
|
-
return /* @__PURE__ */ (0,
|
|
27660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
27493
27661
|
"textarea",
|
|
27494
27662
|
{
|
|
27495
27663
|
...rest,
|
|
@@ -27515,50 +27683,54 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27515
27683
|
// ../ui/src/kanban/components/ModalBase.tsx
|
|
27516
27684
|
var import_react12 = __toESM(require_react(), 1);
|
|
27517
27685
|
var import_react_dom2 = __toESM(require_react_dom(), 1);
|
|
27518
|
-
var
|
|
27686
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
27519
27687
|
|
|
27520
27688
|
// ../ui/src/kanban/components/ConfirmModal.tsx
|
|
27521
|
-
var
|
|
27689
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
27522
27690
|
|
|
27523
27691
|
// ../ui/src/kanban/components/shared/FileItem.tsx
|
|
27524
|
-
var
|
|
27692
|
+
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
27525
27693
|
|
|
27526
27694
|
// ../ui/src/kanban/components/shared/CommentsList.tsx
|
|
27527
|
-
var
|
|
27695
|
+
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
27528
27696
|
|
|
27529
27697
|
// ../ui/src/kanban/components/shared/FilesList.tsx
|
|
27530
27698
|
var import_react15 = __toESM(require_react(), 1);
|
|
27531
|
-
var
|
|
27699
|
+
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
27532
27700
|
|
|
27533
27701
|
// ../ui/src/kanban/components/shared/TaskDetailsTab.tsx
|
|
27534
|
-
var
|
|
27702
|
+
var import_react18 = __toESM(require_react(), 1);
|
|
27535
27703
|
|
|
27536
27704
|
// ../ui/src/kanban/components/shared/MarkdownEditableField.tsx
|
|
27537
27705
|
var import_react16 = __toESM(require_react(), 1);
|
|
27538
27706
|
var import_react_dom3 = __toESM(require_react_dom(), 1);
|
|
27539
|
-
var
|
|
27707
|
+
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
27708
|
+
|
|
27709
|
+
// ../ui/src/kanban/components/shared/TagInput.tsx
|
|
27710
|
+
var import_react17 = __toESM(require_react(), 1);
|
|
27711
|
+
var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
|
|
27540
27712
|
|
|
27541
27713
|
// ../ui/src/kanban/components/shared/TaskDetailsTab.tsx
|
|
27542
|
-
var
|
|
27714
|
+
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
|
|
27543
27715
|
|
|
27544
27716
|
// ../ui/src/kanban/components/shared/CommentsInputArea.tsx
|
|
27545
|
-
var
|
|
27717
|
+
var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
|
|
27546
27718
|
|
|
27547
27719
|
// ../ui/src/kanban/components/DetailPanel.tsx
|
|
27548
|
-
var
|
|
27720
|
+
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
|
|
27549
27721
|
var MAX_UPLOAD_BYTES = 5 * 1024 * 1024;
|
|
27550
27722
|
|
|
27551
27723
|
// ../ui/src/kanban/components/FilterBar.tsx
|
|
27552
|
-
var
|
|
27553
|
-
var
|
|
27724
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
27725
|
+
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
|
|
27554
27726
|
|
|
27555
27727
|
// ../ui/src/kanban/components/SettingsModal.tsx
|
|
27556
|
-
var
|
|
27557
|
-
var
|
|
27728
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
27729
|
+
var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
|
|
27558
27730
|
|
|
27559
27731
|
// ../ui/src/kanban/components/FilePreviewModal.tsx
|
|
27560
|
-
var
|
|
27561
|
-
var
|
|
27732
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
27733
|
+
var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
|
|
27562
27734
|
|
|
27563
27735
|
// src/client/overlay-browser/error-recorder.ts
|
|
27564
27736
|
var MAX_ENTRIES = 50;
|
|
@@ -27619,7 +27791,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27619
27791
|
}
|
|
27620
27792
|
|
|
27621
27793
|
// src/client/overlay-react/OverlayApp.tsx
|
|
27622
|
-
var
|
|
27794
|
+
var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
|
|
27623
27795
|
var _externalShowAddModal = null;
|
|
27624
27796
|
var _externalFlashTrigger = null;
|
|
27625
27797
|
function flashFavicon(durationMs = 2200) {
|
|
@@ -27657,20 +27829,20 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27657
27829
|
onClick,
|
|
27658
27830
|
flashing
|
|
27659
27831
|
}) {
|
|
27660
|
-
const svgIcon = /* @__PURE__ */ (0,
|
|
27661
|
-
/* @__PURE__ */ (0,
|
|
27662
|
-
/* @__PURE__ */ (0,
|
|
27663
|
-
/* @__PURE__ */ (0,
|
|
27664
|
-
/* @__PURE__ */ (0,
|
|
27832
|
+
const svgIcon = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: [
|
|
27833
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("rect", { x: "2.5", y: "5", width: "2", height: "8", rx: "1", fill: "currentColor", opacity: "0.7" }),
|
|
27834
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("rect", { x: "6.5", y: "2", width: "2", height: "14", rx: "1", fill: "currentColor" }),
|
|
27835
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("rect", { x: "10.5", y: "6", width: "2", height: "6", rx: "1", fill: "currentColor", opacity: "0.7" }),
|
|
27836
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("rect", { x: "14.5", y: "4", width: "2", height: "10", rx: "1", fill: "currentColor", opacity: "0.85" })
|
|
27665
27837
|
] });
|
|
27666
|
-
const [pos, setPos] =
|
|
27667
|
-
const [isDragging, setIsDragging] =
|
|
27668
|
-
const [isHolding, setIsHolding] =
|
|
27669
|
-
const dragOrigin =
|
|
27670
|
-
const holdTimer =
|
|
27671
|
-
const didDrag =
|
|
27672
|
-
const buttonRef =
|
|
27673
|
-
const posRef =
|
|
27838
|
+
const [pos, setPos] = import_react23.default.useState(null);
|
|
27839
|
+
const [isDragging, setIsDragging] = import_react23.default.useState(false);
|
|
27840
|
+
const [isHolding, setIsHolding] = import_react23.default.useState(false);
|
|
27841
|
+
const dragOrigin = import_react23.default.useRef(null);
|
|
27842
|
+
const holdTimer = import_react23.default.useRef(null);
|
|
27843
|
+
const didDrag = import_react23.default.useRef(false);
|
|
27844
|
+
const buttonRef = import_react23.default.useRef(null);
|
|
27845
|
+
const posRef = import_react23.default.useRef(null);
|
|
27674
27846
|
posRef.current = pos;
|
|
27675
27847
|
function getInitialPos(el2) {
|
|
27676
27848
|
const rect = el2.getBoundingClientRect();
|
|
@@ -27736,7 +27908,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27736
27908
|
isDragging ? "trigger-dragging" : ""
|
|
27737
27909
|
].filter(Boolean).join(" ");
|
|
27738
27910
|
const title = isDragging ? "Drag to reposition" : isHolding ? "Drag to reposition \\xB7 Release to open" : "Open Kanban board \\xB7 Hold to drag";
|
|
27739
|
-
return /* @__PURE__ */ (0,
|
|
27911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
27740
27912
|
"button",
|
|
27741
27913
|
{
|
|
27742
27914
|
ref: buttonRef,
|
|
@@ -27761,15 +27933,16 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27761
27933
|
done: { background: "rgba(52,211,153,0.12)", borderColor: "rgba(52,211,153,0.4)", color: "#6ee7b7" }
|
|
27762
27934
|
};
|
|
27763
27935
|
function OverlayAddModal({ opts, onClose, onSubmit }) {
|
|
27764
|
-
const [title, setTitle] =
|
|
27765
|
-
const [description, setDescription] =
|
|
27766
|
-
const [status, setStatus] =
|
|
27767
|
-
const [type, setType] =
|
|
27768
|
-
const [showPreview, setShowPreview] =
|
|
27769
|
-
const
|
|
27770
|
-
const
|
|
27771
|
-
const [
|
|
27772
|
-
const
|
|
27936
|
+
const [title, setTitle] = import_react23.default.useState(opts.initialTitle ?? "");
|
|
27937
|
+
const [description, setDescription] = import_react23.default.useState(opts.initialDescription ?? "");
|
|
27938
|
+
const [status, setStatus] = import_react23.default.useState("todo");
|
|
27939
|
+
const [type, setType] = import_react23.default.useState("Task");
|
|
27940
|
+
const [showPreview, setShowPreview] = import_react23.default.useState(false);
|
|
27941
|
+
const [titleError, setTitleError] = import_react23.default.useState(false);
|
|
27942
|
+
const titleRef = import_react23.default.useRef(null);
|
|
27943
|
+
const [dragPos, setDragPos] = import_react23.default.useState(null);
|
|
27944
|
+
const [isDragging, setIsDragging] = import_react23.default.useState(false);
|
|
27945
|
+
const dragOrigin = import_react23.default.useRef(null);
|
|
27773
27946
|
function onHeaderPointerDown(e) {
|
|
27774
27947
|
if (e.target.closest("button, input, select, textarea, a")) return;
|
|
27775
27948
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
@@ -27788,7 +27961,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27788
27961
|
dragOrigin.current = null;
|
|
27789
27962
|
setIsDragging(false);
|
|
27790
27963
|
}
|
|
27791
|
-
|
|
27964
|
+
import_react23.default.useEffect(() => {
|
|
27792
27965
|
setTimeout(() => {
|
|
27793
27966
|
var _a;
|
|
27794
27967
|
return (_a = titleRef.current) == null ? void 0 : _a.focus();
|
|
@@ -27805,9 +27978,11 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27805
27978
|
var _a;
|
|
27806
27979
|
const t = title.trim();
|
|
27807
27980
|
if (!t) {
|
|
27981
|
+
setTitleError(true);
|
|
27808
27982
|
(_a = titleRef.current) == null ? void 0 : _a.focus();
|
|
27809
27983
|
return;
|
|
27810
27984
|
}
|
|
27985
|
+
setTitleError(false);
|
|
27811
27986
|
let desc = description.trim() || t;
|
|
27812
27987
|
if (type === "Bug") {
|
|
27813
27988
|
const logs = getRecordedLogs();
|
|
@@ -27846,23 +28021,23 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27846
28021
|
cursor: isDragging ? "grabbing" : "grab",
|
|
27847
28022
|
userSelect: "none"
|
|
27848
28023
|
};
|
|
27849
|
-
const DragHandle = /* @__PURE__ */ (0,
|
|
28024
|
+
const DragHandle = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
27850
28025
|
"span",
|
|
27851
28026
|
{
|
|
27852
28027
|
title: "Drag to move",
|
|
27853
28028
|
style: { display: "flex", alignItems: "center", color: "var(--vibeflow-text-muted)", opacity: 0.5, flexShrink: 0, pointerEvents: "none" },
|
|
27854
|
-
children: /* @__PURE__ */ (0,
|
|
27855
|
-
/* @__PURE__ */ (0,
|
|
27856
|
-
/* @__PURE__ */ (0,
|
|
27857
|
-
/* @__PURE__ */ (0,
|
|
27858
|
-
/* @__PURE__ */ (0,
|
|
27859
|
-
/* @__PURE__ */ (0,
|
|
27860
|
-
/* @__PURE__ */ (0,
|
|
28029
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("svg", { width: "12", height: "16", viewBox: "0 0 12 16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
28030
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("circle", { cx: "3", cy: "3", r: "1.5" }),
|
|
28031
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("circle", { cx: "9", cy: "3", r: "1.5" }),
|
|
28032
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("circle", { cx: "3", cy: "8", r: "1.5" }),
|
|
28033
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("circle", { cx: "9", cy: "8", r: "1.5" }),
|
|
28034
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("circle", { cx: "3", cy: "13", r: "1.5" }),
|
|
28035
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("circle", { cx: "9", cy: "13", r: "1.5" })
|
|
27861
28036
|
] })
|
|
27862
28037
|
}
|
|
27863
28038
|
);
|
|
27864
|
-
return /* @__PURE__ */ (0,
|
|
27865
|
-
/* @__PURE__ */ (0,
|
|
28039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "vibeflow-modal-backdrop", onClick: handleBackdropClick, onKeyDown: handleKeyDown, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "vibeflow-modal overlay-add-modal", role: "dialog", "aria-modal": "true", style: modalStyle, children: [
|
|
28040
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
27866
28041
|
"div",
|
|
27867
28042
|
{
|
|
27868
28043
|
className: "modal-header overlay-modal-header",
|
|
@@ -27872,23 +28047,30 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27872
28047
|
onPointerUp: onHeaderPointerUp,
|
|
27873
28048
|
children: [
|
|
27874
28049
|
DragHandle,
|
|
27875
|
-
/* @__PURE__ */ (0,
|
|
27876
|
-
/* @__PURE__ */ (0,
|
|
28050
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TypePicker, { value: type, onChange: setType }),
|
|
28051
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
27877
28052
|
"input",
|
|
27878
28053
|
{
|
|
27879
28054
|
ref: titleRef,
|
|
27880
28055
|
type: "text",
|
|
27881
28056
|
placeholder: "Task title\\u2026",
|
|
27882
28057
|
value: title,
|
|
27883
|
-
onChange: (e) =>
|
|
27884
|
-
|
|
28058
|
+
onChange: (e) => {
|
|
28059
|
+
setTitle(e.target.value);
|
|
28060
|
+
if (titleError && e.target.value.trim()) setTitleError(false);
|
|
28061
|
+
},
|
|
28062
|
+
style: { flex: 1, fontSize: 14, fontWeight: 600, padding: "4px 8px", border: \`1px solid \${titleError ? "rgba(239,68,68,0.7)" : "transparent"}\`, borderRadius: 6, background: titleError ? "rgba(239,68,68,0.07)" : "transparent", color: "var(--vibeflow-text-primary)", fontFamily: "inherit", outline: "none", cursor: "text" },
|
|
27885
28063
|
onFocus: (e) => {
|
|
27886
|
-
|
|
27887
|
-
|
|
28064
|
+
if (!titleError) {
|
|
28065
|
+
e.currentTarget.style.borderColor = "var(--vibeflow-accent-strong)";
|
|
28066
|
+
e.currentTarget.style.background = "var(--vibeflow-surface-elevated)";
|
|
28067
|
+
}
|
|
27888
28068
|
},
|
|
27889
28069
|
onBlur: (e) => {
|
|
27890
|
-
|
|
27891
|
-
|
|
28070
|
+
if (!titleError) {
|
|
28071
|
+
e.currentTarget.style.borderColor = "transparent";
|
|
28072
|
+
e.currentTarget.style.background = "transparent";
|
|
28073
|
+
}
|
|
27892
28074
|
},
|
|
27893
28075
|
onKeyDown: (e) => {
|
|
27894
28076
|
if (e.key === "Enter") handleSave();
|
|
@@ -27896,7 +28078,8 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27896
28078
|
}
|
|
27897
28079
|
}
|
|
27898
28080
|
),
|
|
27899
|
-
/* @__PURE__ */ (0,
|
|
28081
|
+
titleError && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { style: { fontSize: 11, color: "rgba(239,68,68,0.9)", flexShrink: 0, whiteSpace: "nowrap" }, children: "Title is required" }),
|
|
28082
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
27900
28083
|
"button",
|
|
27901
28084
|
{
|
|
27902
28085
|
type: "button",
|
|
@@ -27917,9 +28100,9 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27917
28100
|
]
|
|
27918
28101
|
}
|
|
27919
28102
|
),
|
|
27920
|
-
/* @__PURE__ */ (0,
|
|
27921
|
-
/* @__PURE__ */ (0,
|
|
27922
|
-
STATUS_OPTIONS.map((s) => /* @__PURE__ */ (0,
|
|
28103
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 16px", borderBottom: "1px solid var(--vibeflow-border-strong)" }, children: [
|
|
28104
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { style: { fontSize: 10, color: "var(--vibeflow-text-muted)", fontWeight: 500, textTransform: "uppercase", letterSpacing: "0.04em", flexShrink: 0 }, children: "Status" }),
|
|
28105
|
+
STATUS_OPTIONS.map((s) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
27923
28106
|
"button",
|
|
27924
28107
|
{
|
|
27925
28108
|
type: "button",
|
|
@@ -27942,8 +28125,8 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27942
28125
|
s
|
|
27943
28126
|
))
|
|
27944
28127
|
] }),
|
|
27945
|
-
(opts.file || opts.component) && /* @__PURE__ */ (0,
|
|
27946
|
-
opts.file && /* @__PURE__ */ (0,
|
|
28128
|
+
(opts.file || opts.component) && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "6px 16px", background: "var(--vibeflow-surface-elevated)", borderBottom: "1px solid var(--vibeflow-border-subtle)", fontSize: 11, color: "var(--vibeflow-text-muted)" }, children: [
|
|
28129
|
+
opts.file && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
27947
28130
|
"a",
|
|
27948
28131
|
{
|
|
27949
28132
|
href: \`vscode://file\${opts.file}\${opts.line != null ? \`:\${opts.line}\` : ""}\`,
|
|
@@ -27957,16 +28140,16 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27957
28140
|
]
|
|
27958
28141
|
}
|
|
27959
28142
|
),
|
|
27960
|
-
opts.component && /* @__PURE__ */ (0,
|
|
28143
|
+
opts.component && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { style: { display: "inline-flex", alignItems: "center", gap: 4, padding: "2px 6px", borderRadius: 4, background: "rgba(139,92,246,0.08)", border: "1px solid rgba(139,92,246,0.25)", color: "#8b5cf6", fontSize: 11 }, children: [
|
|
27961
28144
|
"\\u2B21 ",
|
|
27962
28145
|
opts.component
|
|
27963
28146
|
] })
|
|
27964
28147
|
] }),
|
|
27965
|
-
/* @__PURE__ */ (0,
|
|
27966
|
-
/* @__PURE__ */ (0,
|
|
27967
|
-
/* @__PURE__ */ (0,
|
|
28148
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "modal-tabs", children: [
|
|
28149
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: \`modal-tab\${!showPreview ? " active" : ""}\`, onClick: () => setShowPreview(false), children: "Edit" }),
|
|
28150
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: \`modal-tab\${showPreview ? " active" : ""}\`, onClick: () => setShowPreview(true), children: "Preview" })
|
|
27968
28151
|
] }),
|
|
27969
|
-
/* @__PURE__ */ (0,
|
|
28152
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "modal-body", children: !showPreview ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "modal-editor-pane", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
27970
28153
|
AutoExpandTextarea,
|
|
27971
28154
|
{
|
|
27972
28155
|
className: "dp-textarea",
|
|
@@ -27976,30 +28159,30 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
27976
28159
|
baseRows: 5,
|
|
27977
28160
|
maxRows: 14
|
|
27978
28161
|
}
|
|
27979
|
-
) }) : /* @__PURE__ */ (0,
|
|
28162
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
27980
28163
|
MarkdownPreview,
|
|
27981
28164
|
{
|
|
27982
28165
|
markdown: description,
|
|
27983
28166
|
className: "modal-preview-pane"
|
|
27984
28167
|
}
|
|
27985
28168
|
) }),
|
|
27986
|
-
type === "Bug" && /* @__PURE__ */ (0,
|
|
27987
|
-
/* @__PURE__ */ (0,
|
|
27988
|
-
/* @__PURE__ */ (0,
|
|
28169
|
+
type === "Bug" && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 6, padding: "6px 16px", background: "rgba(239,68,68,0.06)", borderTop: "1px solid rgba(239,68,68,0.18)", fontSize: 11, color: "rgba(239,68,68,0.75)" }, children: [
|
|
28170
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "\\u{1F534}" }),
|
|
28171
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Console errors & warnings will be attached to this report" })
|
|
27989
28172
|
] }),
|
|
27990
|
-
/* @__PURE__ */ (0,
|
|
27991
|
-
/* @__PURE__ */ (0,
|
|
27992
|
-
/* @__PURE__ */ (0,
|
|
27993
|
-
/* @__PURE__ */ (0,
|
|
28173
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "modal-footer", children: [
|
|
28174
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "modal-footer-left", children: [
|
|
28175
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", className: "btn-primary", onClick: handleSave, disabled: !title.trim(), style: { opacity: title.trim() ? 1 : 0.45, cursor: title.trim() ? "pointer" : "not-allowed" }, children: "Add Task" }),
|
|
28176
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { type: "button", className: "btn-ghost", onClick: onClose, children: "Cancel" })
|
|
27994
28177
|
] }),
|
|
27995
|
-
/* @__PURE__ */ (0,
|
|
28178
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "modal-footer-center" })
|
|
27996
28179
|
] })
|
|
27997
28180
|
] }) });
|
|
27998
28181
|
}
|
|
27999
28182
|
function OverlayApp({ onOpenKanban, onSubmitTask }) {
|
|
28000
|
-
const [addModalOpts, setAddModalOpts] =
|
|
28001
|
-
const [triggerFlashing, setTriggerFlashing] =
|
|
28002
|
-
|
|
28183
|
+
const [addModalOpts, setAddModalOpts] = import_react23.default.useState(null);
|
|
28184
|
+
const [triggerFlashing, setTriggerFlashing] = import_react23.default.useState(false);
|
|
28185
|
+
import_react23.default.useEffect(() => {
|
|
28003
28186
|
_externalShowAddModal = (opts) => setAddModalOpts(opts);
|
|
28004
28187
|
_externalFlashTrigger = () => {
|
|
28005
28188
|
setTriggerFlashing(true);
|
|
@@ -28012,15 +28195,15 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
28012
28195
|
};
|
|
28013
28196
|
}, []);
|
|
28014
28197
|
const isKanbanPage = typeof document !== "undefined" && document.body.hasAttribute("data-vibeflow-cli-kanban");
|
|
28015
|
-
return /* @__PURE__ */ (0,
|
|
28016
|
-
!isKanbanPage && /* @__PURE__ */ (0,
|
|
28198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
28199
|
+
!isKanbanPage && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
28017
28200
|
CornerTrigger,
|
|
28018
28201
|
{
|
|
28019
28202
|
onClick: onOpenKanban,
|
|
28020
28203
|
flashing: triggerFlashing
|
|
28021
28204
|
}
|
|
28022
28205
|
),
|
|
28023
|
-
addModalOpts !== null && /* @__PURE__ */ (0,
|
|
28206
|
+
addModalOpts !== null && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
28024
28207
|
OverlayAddModal,
|
|
28025
28208
|
{
|
|
28026
28209
|
opts: addModalOpts,
|
|
@@ -28833,7 +29016,20 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
28833
29016
|
btnSave.addEventListener("click", () => {
|
|
28834
29017
|
var _a, _b;
|
|
28835
29018
|
const text = textarea.value.trim();
|
|
28836
|
-
const
|
|
29019
|
+
const rawTitle = titleInput.value.trim();
|
|
29020
|
+
if (!rawTitle) {
|
|
29021
|
+
titleInput.classList.remove("input-error");
|
|
29022
|
+
void titleInput.offsetWidth;
|
|
29023
|
+
titleInput.classList.add("input-error");
|
|
29024
|
+
titleInput.focus();
|
|
29025
|
+
const clear = () => {
|
|
29026
|
+
titleInput.classList.remove("input-error");
|
|
29027
|
+
titleInput.removeEventListener("input", clear);
|
|
29028
|
+
};
|
|
29029
|
+
titleInput.addEventListener("input", clear);
|
|
29030
|
+
return;
|
|
29031
|
+
}
|
|
29032
|
+
const title = rawTitle;
|
|
28837
29033
|
if (!text && !title) return;
|
|
28838
29034
|
const rawInnerText = ((_a = element.innerText) == null ? void 0 : _a.trim()) ?? "";
|
|
28839
29035
|
const capturedHtmlText = rawInnerText ? rawInnerText.slice(0, 300) : void 0;
|
|
@@ -28991,7 +29187,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
28991
29187
|
}
|
|
28992
29188
|
|
|
28993
29189
|
// src/client/overlay-browser/index.ts
|
|
28994
|
-
var
|
|
29190
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
28995
29191
|
var import_client = __toESM(require_client(), 1);
|
|
28996
29192
|
function main() {
|
|
28997
29193
|
startRecording();
|
|
@@ -29022,7 +29218,7 @@ import{a as oe,b as ye,c as ln,d as un,e as be,f as cn,g as fe,h as me,i as ge,j
|
|
|
29022
29218
|
root.appendChild(reactContainer);
|
|
29023
29219
|
const reactRoot = (0, import_client.createRoot)(reactContainer);
|
|
29024
29220
|
reactRoot.render(
|
|
29025
|
-
|
|
29221
|
+
import_react24.default.createElement(OverlayApp, {
|
|
29026
29222
|
onOpenKanban: () => {
|
|
29027
29223
|
if (PROTO_CONFIG.boardId) {
|
|
29028
29224
|
const origin = new URL(PROTO_CONFIG.apiUrl).origin;
|
|
@@ -29135,27 +29331,27 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
29135
29331
|
* See the LICENSE file in the root directory of this source tree.
|
|
29136
29332
|
*)
|
|
29137
29333
|
*/
|
|
29138
|
-
`;function
|
|
29139
|
-
|
|
29140
|
-
|
|
29141
|
-
/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.\\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-3{left:.75rem}.right-2{right:.5rem}.top-1\\/2{top:50%}.mb-0\\.5{margin-bottom:.125rem}.ml-1\\.5{margin-left:.375rem}.mt-0\\.5{margin-top:.125rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-7{height:1.75rem}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-7{width:1.75rem}.w-full{width:100%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.border-slate-700\\/60{border-color:rgba(51,65,85,.6)}.border-slate-800\\/60{border-color:rgba(30,41,59,.6)}.border-violet-700\\/50{border-color:rgba(109,40,217,.5)}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.bg-violet-900\\/30{background-color:rgba(76,29,149,.3)}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-9{padding-left:2.25rem}.pr-8{padding-right:2rem}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\\[10px\\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.leading-tight{line-height:1.25}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(100 116 139/var(--tw-placeholder-opacity,1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity:1;color:rgb(100 116 139/var(--tw-placeholder-opacity,1))}.opacity-0{opacity:0}.opacity-40{opacity:.4}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--p-bg:#020c1b;--p-surface:#080f1e;--p-card:#0a0f1e;--p-input:#050d1a;--p-hover:#0d1f38;--p-border:#1e293b;--p-border-s:#1e3a5f;--p-border-t:#334155;--p-text:#e2e8f0;--p-text-sub:#cbd5e1;--p-text-m:#94a3b8;--p-text-f:#64748b;--p-text-g:#475569;--p-white:#fff;--p-blue:#2563eb;--p-blue-700:#1d4ed8;--p-blue-300:#60a5fa;--p-blue-200:#93c5fd;--p-purple:#a78bfa;--p-purple-300:#c4b5fd;--p-cyan-300:#7dd3fc;--p-amber:#f59e0b;--p-amber-300:#fcd34d;--p-green:#22c55e;--p-green-300:#6ee7b7;--p-red:#f87171;--p-red-500:#ef4444;--p-shadow-lg:0 8px 24px rgba(2,6,23,.28);--p-overlay:rgba(15,23,42,.2)}body,html{height:100%;margin:0;padding:0}body{font-family:Inter,sans-serif;background:var(--p-bg);color:var(--p-text)}#root{height:100%;display:flex;flex-direction:column;overflow:hidden}*{scrollbar-width:thin;scrollbar-color:var(--p-border-t) transparent}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--p-border-t);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--p-text-g)}#kanban-board{scrollbar-width:none;-ms-overflow-style:none;overflow-x:auto;overflow-y:hidden}#kanban-board::-webkit-scrollbar{display:none}#kanban-scroll-track{position:fixed;bottom:0;left:0;right:0;height:6px;background:transparent;z-index:40;pointer-events:none}#kanban-scroll-thumb{position:absolute;top:1px;height:4px;border-radius:2px;background:var(--p-border-t);cursor:pointer;pointer-events:auto;transition:background .15s}#kanban-scroll-thumb.dragging,#kanban-scroll-thumb:hover{background:var(--p-text-g)}.board-column{flex:1 0 260px;max-width:420px;display:flex;flex-direction:column;gap:6px;min-height:0}.column-header{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:8px;background:var(--p-surface);border:1px solid var(--p-border)}.column-scroll{flex:1;overflow-y:auto;min-height:0;gap:5px;padding-bottom:8px}.column-scroll,.task-card{display:flex;flex-direction:column}.task-card{background:var(--p-card);border:1px solid var(--p-border);border-radius:10px;padding:11px 13px;cursor:grab;transition:border-color .12s,background .12s,box-shadow .12s,transform .12s;gap:7px}.task-card:hover{border-color:var(--p-border-s);background:var(--p-hover);box-shadow:0 4px 16px rgba(0,0,0,.3);transform:translateY(-1px)}.task-card:active{cursor:grabbing;transform:scale(.98)}.task-card.dragging{opacity:.4}.drag-over{outline:2px dashed rgba(59,130,246,.5);outline-offset:-3px;border-radius:10px;background:rgba(59,130,246,.04)}.file-compact-actions{opacity:0}.group\\/file-compact:hover .file-compact-actions{opacity:1}.file-normal-actions,.group\\/file-compact:hover .file-compact-ts{opacity:0}.group\\/file:hover .file-normal-actions{opacity:1}.group\\/file:hover{background:rgba(30,41,59,.6)}.status-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}.sd-backlog{background:#475569}.sd-todo{background:#f59e0b}.sd-inprogress{background:#3b82f6;animation:pulse-prog 2s ease-in-out infinite}.sd-review{background:#a855f7}.sd-done{background:#22c55e}@keyframes pulse-prog{0%,to{box-shadow:0 0 0 0 rgba(59,130,246,.5)}50%{box-shadow:0 0 0 4px rgba(59,130,246,0)}}.type-badge{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:20px;font-size:10px;font-weight:500;border:1px solid}.type-bug{color:#fca5a5;background:rgba(239,68,68,.1);border-color:rgba(239,68,68,.25)}.type-feature{color:#86efac;background:rgba(34,197,94,.08);border-color:rgba(34,197,94,.2)}.type-enhancement{color:#93c5fd;background:rgba(59,130,246,.08);border-color:rgba(59,130,246,.2)}.type-task{color:#cbd5e1;background:rgba(148,163,184,.08);border-color:rgba(148,163,184,.2)}.type-research{color:#c4b5fd;background:rgba(139,92,246,.08);border-color:rgba(139,92,246,.2)}.source-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:6px;font-size:10px;font-family:JetBrains Mono,monospace;background:rgba(59,130,246,.06);border:1px solid rgba(59,130,246,.15);color:#60a5fa;cursor:pointer;text-decoration:none;transition:background .1s,border-color .1s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.source-pill:hover{background:rgba(59,130,246,.12);border-color:rgba(59,130,246,.3)}@keyframes spin{to{transform:rotate(1turn)}}.spinner{display:inline-block;width:11px;height:11px;border:2px solid rgba(96,165,250,.3);border-top-color:#60a5fa;border-radius:50%;animation:spin .7s linear infinite}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:50;display:flex;align-items:center;justify-content:center}.modal-box{background:var(--p-card);border:1px solid var(--p-border);border-radius:14px;width:520px;max-width:95vw;overflow:hidden}.type-picker{display:flex;align-items:center;gap:6px}.type-picker-trigger{display:flex;align-items:center;gap:4px;width:auto;height:30px;padding:0 8px;border-radius:8px;border:1px solid var(--p-border-t);background:var(--p-card);color:var(--p-text-sub);font-size:13px;cursor:pointer;white-space:nowrap}.type-picker-label{font-size:11px;font-weight:500;color:var(--p-text-m);letter-spacing:.02em}.type-picker-trigger:hover{border-color:var(--p-text-g);color:var(--p-text)}.type-picker-options{display:none;align-items:center;gap:4px}.type-picker-options.open{display:flex}.type-picker-option{width:28px;height:28px;border-radius:7px;border:1px solid var(--p-border-t);background:var(--p-card);color:var(--p-text-sub);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:13px}.type-picker-option:hover{border-color:#60a5fa;color:#bfdbfe}#detail-panel-container{min-width:360px;max-width:min(860px,100%);position:absolute;right:0;top:0;bottom:0;display:flex;flex-direction:column;overflow:hidden;border-left:1px solid #1e293b;animation:panel-slide-in .18s ease-out}#detail-panel-container.resizing{box-shadow:-12px 0 32px rgba(2,8,23,.6)}#detail-panel-resize-handle{position:absolute;left:0;top:0;width:12px;height:100%;cursor:ew-resize;z-index:5}#detail-panel-resize-handle:hover{background:linear-gradient(90deg,rgba(59,130,246,.22),rgba(59,130,246,0))}body.proto-resizing-panel{cursor:ew-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}#detail-panel{flex:1;background:var(--p-card);display:flex;flex-direction:column;overflow:hidden}@keyframes panel-slide-in{0%{width:0;opacity:0}to{width:420px;opacity:1}}.dp-header{padding:14px 16px 10px}.dp-header,.dp-tabs{border-bottom:1px solid var(--p-border);background:var(--p-surface);flex-shrink:0}.dp-tabs{display:flex;gap:0}.dp-tab{padding:8px 14px;font-size:12px;font-weight:500;color:var(--p-text-g);cursor:pointer;transition:color .12s,border-color .12s;background:none;border:none;border-bottom:2px solid transparent}.dp-tab:hover{color:var(--p-text-m)}.dp-tab.active{color:#93c5fd;border-bottom-color:#3b82f6}.dp-body{overflow:hidden}.dp-body,.dp-body>.dp-pane{flex:1;display:flex;flex-direction:column;gap:12px;min-height:0}.dp-body>.dp-pane{padding:14px 16px}#dp-details-pane,.dp-body>.dp-pane{overflow-y:auto;background:var(--p-card)}.dp-footer{padding:10px 16px 12px;border-top:1px solid var(--p-border);flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--p-card)}.dp-source-pill{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:6px;font-size:10px;font-family:monospace;background:rgba(59,130,246,.06);border:1px solid rgba(59,130,246,.15);color:#60a5fa;white-space:nowrap}.dp-source-pill:hover{background:rgba(59,130,246,.12);border-color:rgba(59,130,246,.3)}.dp-status-btn{padding:3px 10px;border-radius:6px;font-size:10px;font-weight:500;border:1px solid var(--p-border-t);color:var(--p-text-f);background:transparent;cursor:pointer;transition:background .12s,border-color .12s,color .12s}.dp-status-btn:hover{border-color:var(--p-text-g);color:var(--p-text-m)}.dp-status-btn.active-backlog{border-color:#475569;background:rgba(100,116,139,.1);color:#94a3b8}.dp-status-btn.active-todo{border-color:rgba(245,158,11,.5);background:rgba(245,158,11,.1);color:#f59e0b}.dp-status-btn.active-in-progress{border-color:rgba(59,130,246,.5);background:rgba(59,130,246,.1);color:#60a5fa}.dp-status-btn.active-review{border-color:rgba(168,85,247,.5);background:rgba(168,85,247,.1);color:#a855f7}.dp-status-btn.active-done{border-color:rgba(34,197,94,.4);background:rgba(34,197,94,.08);color:#22c55e}.dp-input{width:100%;padding:7px 10px;border:1px solid var(--p-border-s);border-radius:8px;background:var(--p-input);color:var(--p-text);font-size:13px;font-family:inherit;outline:none;transition:border-color .12s,box-shadow .12s;box-sizing:border-box}.dp-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.1)}.dp-input::-moz-placeholder{color:var(--p-border-t)}.dp-input::placeholder{color:var(--p-border-t)}.dp-textarea{width:100%;padding:8px 10px;border:1px solid var(--p-border-s);border-radius:8px;background:var(--p-input);color:var(--p-text);font-size:12px;font-family:monospace;line-height:1.6;resize:vertical;outline:none;box-sizing:border-box;transition:border-color .12s,box-shadow .12s}.dp-textarea:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.1)}.dp-textarea::-moz-placeholder{color:var(--p-border-t)}.dp-textarea::placeholder{color:var(--p-border-t)}.dp-meta-label{font-size:10px;font-weight:600;color:var(--p-text-g);text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}@keyframes pulse-live{0%,to{box-shadow:0 0 0 0 rgba(74,222,128,.4)}50%{box-shadow:0 0 0 4px rgba(74,222,128,0)}}@keyframes agent-pulse{0%,to{opacity:.5}50%{opacity:1}}@keyframes skeleton-pulse{0%,to{opacity:1}50%{opacity:.4}}@keyframes away-glow{0%,to{box-shadow:0 0 0 0 rgba(37,99,235,.45),0 0 24px rgba(37,99,235,.1);border-color:rgba(37,99,235,.35)}50%{box-shadow:0 0 0 14px rgba(37,99,235,0),0 0 48px rgba(37,99,235,.2);border-color:rgba(96,165,250,.6)}}@keyframes away-fade-in{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.hover\\:bg-red-900\\/40:hover{background-color:rgba(127,29,29,.4)}.hover\\:bg-slate-700:hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.hover\\:bg-slate-700\\/50:hover{background-color:rgba(51,65,85,.5)}.hover\\:bg-slate-700\\/60:hover{background-color:rgba(51,65,85,.6)}.hover\\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.hover\\:bg-violet-800\\/30:hover{background-color:rgba(91,33,182,.3)}.hover\\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\\:text-slate-300:hover{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.hover\\:text-violet-300:hover{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.group\\/comment:hover .group-hover\\/comment\\:opacity-100{opacity:1}`;var Be='"use strict";(()=>{var Am=Object.create;var Yi=Object.defineProperty;var Mm=Object.getOwnPropertyDescriptor;var Fm=Object.getOwnPropertyNames;var Em=Object.getPrototypeOf,Bm=Object.prototype.hasOwnProperty;var Qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Om=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fm(t))!Bm.call(e,o)&&o!==a&&Yi(e,o,{get:()=>t[o],enumerable:!(r=Mm(t,o))||r.enumerable});return e};var D=(e,t,a)=>(a=e!=null?Am(Em(e)):{},Om(t||!e||!e.__esModule?Yi(a,"default",{value:e,enumerable:!0}):a,e));var id=Qt(J=>{"use strict";var no=Symbol.for("react.element"),zm=Symbol.for("react.portal"),Um=Symbol.for("react.fragment"),Nm=Symbol.for("react.strict_mode"),Hm=Symbol.for("react.profiler"),_m=Symbol.for("react.provider"),qm=Symbol.for("react.context"),Wm=Symbol.for("react.forward_ref"),Vm=Symbol.for("react.suspense"),$m=Symbol.for("react.memo"),Gm=Symbol.for("react.lazy"),Zi=Symbol.iterator;function jm(e){return e===null||typeof e!="object"?null:(e=Zi&&e[Zi]||e["@@iterator"],typeof e=="function"?e:null)}var td={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ad=Object.assign,rd={};function xr(e,t,a){this.props=e,this.context=t,this.refs=rd,this.updater=a||td}xr.prototype.isReactComponent={};xr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function od(){}od.prototype=xr.prototype;function cu(e,t,a){this.props=e,this.context=t,this.refs=rd,this.updater=a||td}var pu=cu.prototype=new od;pu.constructor=cu;ad(pu,xr.prototype);pu.isPureReactComponent=!0;var Ji=Array.isArray,nd=Object.prototype.hasOwnProperty,mu={current:null},ld={key:!0,ref:!0,__self:!0,__source:!0};function ud(e,t,a){var r,o={},n=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(n=""+t.key),t)nd.call(t,r)&&!ld.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(u===1)o.children=a;else if(1<u){for(var s=Array(u),f=0;f<u;f++)s[f]=arguments[f+2];o.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)o[r]===void 0&&(o[r]=u[r]);return{$$typeof:no,type:e,key:n,ref:l,props:o,_owner:mu.current}}function Km(e,t){return{$$typeof:no,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gu(e){return typeof e=="object"&&e!==null&&e.$$typeof===no}function Xm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var ed=/\\/+/g;function fu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Xm(""+e.key):t.toString(36)}function bn(e,t,a,r,o){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(n){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case no:case zm:l=!0}}if(l)return l=e,o=o(l),e=r===""?"."+fu(l,0):r,Ji(o)?(a="",e!=null&&(a=e.replace(ed,"$&/")+"/"),bn(o,t,a,"",function(f){return f})):o!=null&&(gu(o)&&(o=Km(o,a+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(ed,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=r===""?".":r+":",Ji(e))for(var u=0;u<e.length;u++){n=e[u];var s=r+fu(n,u);l+=bn(n,t,a,s,o)}else if(s=jm(e),typeof s=="function")for(e=s.call(e),u=0;!(n=e.next()).done;)n=n.value,s=r+fu(n,u++),l+=bn(n,t,a,s,o);else if(n==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function kn(e,t,a){if(e==null)return e;var r=[],o=0;return bn(e,r,"","",function(n){return t.call(a,n,o++)}),r}function Qm(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var je={current:null},Pn={transition:null},Ym={ReactCurrentDispatcher:je,ReactCurrentBatchConfig:Pn,ReactCurrentOwner:mu};function sd(){throw Error("act(...) is not supported in production builds of React.")}J.Children={map:kn,forEach:function(e,t,a){kn(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return kn(e,function(){t++}),t},toArray:function(e){return kn(e,function(t){return t})||[]},only:function(e){if(!gu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};J.Component=xr;J.Fragment=Um;J.Profiler=Hm;J.PureComponent=cu;J.StrictMode=Nm;J.Suspense=Vm;J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ym;J.act=sd;J.cloneElement=function(e,t,a){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ad({},e.props),o=e.key,n=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(n=t.ref,l=mu.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)nd.call(t,s)&&!ld.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&u!==void 0?u[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=a;else if(1<s){u=Array(s);for(var f=0;f<s;f++)u[f]=arguments[f+2];r.children=u}return{$$typeof:no,type:e.type,key:o,ref:n,props:r,_owner:l}};J.createContext=function(e){return e={$$typeof:qm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:_m,_context:e},e.Consumer=e};J.createElement=ud;J.createFactory=function(e){var t=ud.bind(null,e);return t.type=e,t};J.createRef=function(){return{current:null}};J.forwardRef=function(e){return{$$typeof:Wm,render:e}};J.isValidElement=gu;J.lazy=function(e){return{$$typeof:Gm,_payload:{_status:-1,_result:e},_init:Qm}};J.memo=function(e,t){return{$$typeof:$m,type:e,compare:t===void 0?null:t}};J.startTransition=function(e){var t=Pn.transition;Pn.transition={};try{e()}finally{Pn.transition=t}};J.unstable_act=sd;J.useCallback=function(e,t){return je.current.useCallback(e,t)};J.useContext=function(e){return je.current.useContext(e)};J.useDebugValue=function(){};J.useDeferredValue=function(e){return je.current.useDeferredValue(e)};J.useEffect=function(e,t){return je.current.useEffect(e,t)};J.useId=function(){return je.current.useId()};J.useImperativeHandle=function(e,t,a){return je.current.useImperativeHandle(e,t,a)};J.useInsertionEffect=function(e,t){return je.current.useInsertionEffect(e,t)};J.useLayoutEffect=function(e,t){return je.current.useLayoutEffect(e,t)};J.useMemo=function(e,t){return je.current.useMemo(e,t)};J.useReducer=function(e,t,a){return je.current.useReducer(e,t,a)};J.useRef=function(e){return je.current.useRef(e)};J.useState=function(e){return je.current.useState(e)};J.useSyncExternalStore=function(e,t,a){return je.current.useSyncExternalStore(e,t,a)};J.useTransition=function(){return je.current.useTransition()};J.version="18.3.1"});var Ie=Qt((Zx,dd)=>{"use strict";dd.exports=id()});var yd=Qt(me=>{"use strict";function Lu(e,t){var a=e.length;e.push(t);e:for(;0<a;){var r=a-1>>>1,o=e[r];if(0<Tn(o,t))e[r]=t,e[a]=o,a=r;else break e}}function kt(e){return e.length===0?null:e[0]}function Dn(e){if(e.length===0)return null;var t=e[0],a=e.pop();if(a!==t){e[0]=a;e:for(var r=0,o=e.length,n=o>>>1;r<n;){var l=2*(r+1)-1,u=e[l],s=l+1,f=e[s];if(0>Tn(u,a))s<o&&0>Tn(f,u)?(e[r]=f,e[s]=a,r=s):(e[r]=u,e[l]=a,r=l);else if(s<o&&0>Tn(f,a))e[r]=f,e[s]=a,r=s;else break e}}return t}function Tn(e,t){var a=e.sortIndex-t.sortIndex;return a!==0?a:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(fd=performance,me.unstable_now=function(){return fd.now()}):(hu=Date,cd=hu.now(),me.unstable_now=function(){return hu.now()-cd});var fd,hu,cd,Ut=[],da=[],Zm=1,mt=null,He=3,An=!1,Va=!1,uo=!1,gd=typeof setTimeout=="function"?setTimeout:null,hd=typeof clearTimeout=="function"?clearTimeout:null,pd=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function yu(e){for(var t=kt(da);t!==null;){if(t.callback===null)Dn(da);else if(t.startTime<=e)Dn(da),t.sortIndex=t.expirationTime,Lu(Ut,t);else break;t=kt(da)}}function Su(e){if(uo=!1,yu(e),!Va)if(kt(Ut)!==null)Va=!0,Cu(Iu);else{var t=kt(da);t!==null&&wu(Su,t.startTime-e)}}function Iu(e,t){Va=!1,uo&&(uo=!1,hd(so),so=-1),An=!0;var a=He;try{for(yu(t),mt=kt(Ut);mt!==null&&(!(mt.expirationTime>t)||e&&!Ld());){var r=mt.callback;if(typeof r=="function"){mt.callback=null,He=mt.priorityLevel;var o=r(mt.expirationTime<=t);t=me.unstable_now(),typeof o=="function"?mt.callback=o:mt===kt(Ut)&&Dn(Ut),yu(t)}else Dn(Ut);mt=kt(Ut)}if(mt!==null)var n=!0;else{var l=kt(da);l!==null&&wu(Su,l.startTime-t),n=!1}return n}finally{mt=null,He=a,An=!1}}var Mn=!1,Rn=null,so=-1,xd=5,vd=-1;function Ld(){return!(me.unstable_now()-vd<xd)}function xu(){if(Rn!==null){var e=me.unstable_now();vd=e;var t=!0;try{t=Rn(!0,e)}finally{t?lo():(Mn=!1,Rn=null)}}else Mn=!1}var lo;typeof pd=="function"?lo=function(){pd(xu)}:typeof MessageChannel<"u"?(vu=new MessageChannel,md=vu.port2,vu.port1.onmessage=xu,lo=function(){md.postMessage(null)}):lo=function(){gd(xu,0)};var vu,md;function Cu(e){Rn=e,Mn||(Mn=!0,lo())}function wu(e,t){so=gd(function(){e(me.unstable_now())},t)}me.unstable_IdlePriority=5;me.unstable_ImmediatePriority=1;me.unstable_LowPriority=4;me.unstable_NormalPriority=3;me.unstable_Profiling=null;me.unstable_UserBlockingPriority=2;me.unstable_cancelCallback=function(e){e.callback=null};me.unstable_continueExecution=function(){Va||An||(Va=!0,Cu(Iu))};me.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xd=0<e?Math.floor(1e3/e):5};me.unstable_getCurrentPriorityLevel=function(){return He};me.unstable_getFirstCallbackNode=function(){return kt(Ut)};me.unstable_next=function(e){switch(He){case 1:case 2:case 3:var t=3;break;default:t=He}var a=He;He=t;try{return e()}finally{He=a}};me.unstable_pauseExecution=function(){};me.unstable_requestPaint=function(){};me.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=He;He=e;try{return t()}finally{He=a}};me.unstable_scheduleCallback=function(e,t,a){var r=me.unstable_now();switch(typeof a=="object"&&a!==null?(a=a.delay,a=typeof a=="number"&&0<a?r+a:r):a=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=a+o,e={id:Zm++,callback:t,priorityLevel:e,startTime:a,expirationTime:o,sortIndex:-1},a>r?(e.sortIndex=a,Lu(da,e),kt(Ut)===null&&e===kt(da)&&(uo?(hd(so),so=-1):uo=!0,wu(Su,a-r))):(e.sortIndex=o,Lu(Ut,e),Va||An||(Va=!0,Cu(Iu))),e};me.unstable_shouldYield=Ld;me.unstable_wrapCallback=function(e){var t=He;return function(){var a=He;He=t;try{return e.apply(this,arguments)}finally{He=a}}}});var Id=Qt((ev,Sd)=>{"use strict";Sd.exports=yd()});var Pp=Qt(ct=>{"use strict";var Jm=Ie(),dt=Id();function w(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Df=new Set,Ao={};function rr(e,t){Ur(e,t),Ur(e+"Capture",t)}function Ur(e,t){for(Ao[e]=t,e=0;e<t.length;e++)Df.add(t[e])}var aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ju=Object.prototype.hasOwnProperty,eg=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,Cd={},wd={};function tg(e){return ju.call(wd,e)?!0:ju.call(Cd,e)?!1:eg.test(e)?wd[e]=!0:(Cd[e]=!0,!1)}function ag(e,t,a,r){if(a!==null&&a.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rg(e,t,a,r){if(t===null||typeof t>"u"||ag(e,t,a,r))return!0;if(r)return!1;if(a!==null)switch(a.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qe(e,t,a,r,o,n,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=a,this.propertyName=e,this.type=t,this.sanitizeURL=n,this.removeEmptyString=l}var Ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ue[e]=new Qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ue[t]=new Qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ue[e]=new Qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ue[e]=new Qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ue[e]=new Qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ue[e]=new Qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ue[e]=new Qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ue[e]=new Qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ue[e]=new Qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ns=/[\\-:]([a-z])/g;function Hs(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ns,Hs);Ue[t]=new Qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ns,Hs);Ue[t]=new Qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ns,Hs);Ue[t]=new Qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ue[e]=new Qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ue.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ue[e]=new Qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function _s(e,t,a,r){var o=Ue.hasOwnProperty(t)?Ue[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(rg(t,a,o,r)&&(a=null),r||o===null?tg(t)&&(a===null?e.removeAttribute(t):e.setAttribute(t,""+a)):o.mustUseProperty?e[o.propertyName]=a===null?o.type===3?!1:"":a:(t=o.attributeName,r=o.attributeNamespace,a===null?e.removeAttribute(t):(o=o.type,a=o===3||o===4&&a===!0?"":""+a,r?e.setAttributeNS(r,t,a):e.setAttribute(t,a))))}var la=Jm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fn=Symbol.for("react.element"),yr=Symbol.for("react.portal"),Sr=Symbol.for("react.fragment"),qs=Symbol.for("react.strict_mode"),Ku=Symbol.for("react.profiler"),Af=Symbol.for("react.provider"),Mf=Symbol.for("react.context"),Ws=Symbol.for("react.forward_ref"),Xu=Symbol.for("react.suspense"),Qu=Symbol.for("react.suspense_list"),Vs=Symbol.for("react.memo"),ca=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var Ff=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var kd=Symbol.iterator;function io(e){return e===null||typeof e!="object"?null:(e=kd&&e[kd]||e["@@iterator"],typeof e=="function"?e:null)}var ke=Object.assign,ku;function vo(e){if(ku===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\\n( *(at )?)/);ku=t&&t[1]||""}return`\n`+ku+e}var bu=!1;function Pu(e,t){if(!e||bu)return"";bu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var o=f.stack.split(`\n`),n=r.stack.split(`\n`),l=o.length-1,u=n.length-1;1<=l&&0<=u&&o[l]!==n[u];)u--;for(;1<=l&&0<=u;l--,u--)if(o[l]!==n[u]){if(l!==1||u!==1)do if(l--,u--,0>u||o[l]!==n[u]){var s=`\n`+o[l].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=l&&0<=u);break}}}finally{bu=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?vo(e):""}function og(e){switch(e.tag){case 5:return vo(e.type);case 16:return vo("Lazy");case 13:return vo("Suspense");case 19:return vo("SuspenseList");case 0:case 2:case 15:return e=Pu(e.type,!1),e;case 11:return e=Pu(e.type.render,!1),e;case 1:return e=Pu(e.type,!0),e;default:return""}}function Yu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sr:return"Fragment";case yr:return"Portal";case Ku:return"Profiler";case qs:return"StrictMode";case Xu:return"Suspense";case Qu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mf:return(e.displayName||"Context")+".Consumer";case Af:return(e._context.displayName||"Context")+".Provider";case Ws:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vs:return t=e.displayName||null,t!==null?t:Yu(e.type)||"Memo";case ca:t=e._payload,e=e._init;try{return Yu(e(t))}catch{}}return null}function ng(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Yu(t);case 8:return t===qs?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ba(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ef(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lg(e){var t=Ef(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,n=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,n.call(this,l)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function En(e){e._valueTracker||(e._valueTracker=lg(e))}function Bf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=Ef(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function sl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Zu(e,t){var a=t.checked;return ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function bd(e,t){var a=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;a=ba(t.value!=null?t.value:a),e._wrapperState={initialChecked:r,initialValue:a,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Of(e,t){t=t.checked,t!=null&&_s(e,"checked",t,!1)}function Ju(e,t){Of(e,t);var a=ba(t.value),r=t.type;if(a!=null)r==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?es(e,t.type,a):t.hasOwnProperty("defaultValue")&&es(e,t.type,ba(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Pd(e,t,a){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,a||t===e.value||(e.value=t),e.defaultValue=t}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function es(e,t,a){(t!=="number"||sl(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}var Lo=Array.isArray;function Mr(e,t,a,r){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&r&&(e[a].defaultSelected=!0)}else{for(a=""+ba(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ts(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(w(91));return ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Td(e,t){var a=t.value;if(a==null){if(a=t.children,t=t.defaultValue,a!=null){if(t!=null)throw Error(w(92));if(Lo(a)){if(1<a.length)throw Error(w(93));a=a[0]}t=a}t==null&&(t=""),a=t}e._wrapperState={initialValue:ba(a)}}function zf(e,t){var a=ba(t.value),r=ba(t.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),t.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),r!=null&&(e.defaultValue=""+r)}function Rd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Uf(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function as(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Uf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Bn,Nf=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,a,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,a,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Bn=Bn||document.createElement("div"),Bn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Bn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mo(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Io={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ug=["Webkit","ms","Moz","O"];Object.keys(Io).forEach(function(e){ug.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Io[t]=Io[e]})});function Hf(e,t,a){return t==null||typeof t=="boolean"||t===""?"":a||typeof t!="number"||t===0||Io.hasOwnProperty(e)&&Io[e]?(""+t).trim():t+"px"}function _f(e,t){e=e.style;for(var a in t)if(t.hasOwnProperty(a)){var r=a.indexOf("--")===0,o=Hf(a,t[a],r);a==="float"&&(a="cssFloat"),r?e.setProperty(a,o):e[a]=o}}var sg=ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rs(e,t){if(t){if(sg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(w(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(w(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(w(61))}if(t.style!=null&&typeof t.style!="object")throw Error(w(62))}}function os(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ns=null;function $s(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ls=null,Fr=null,Er=null;function Dd(e){if(e=Qo(e)){if(typeof ls!="function")throw Error(w(280));var t=e.stateNode;t&&(t=Ol(t),ls(e.stateNode,e.type,t))}}function qf(e){Fr?Er?Er.push(e):Er=[e]:Fr=e}function Wf(){if(Fr){var e=Fr,t=Er;if(Er=Fr=null,Dd(e),t)for(e=0;e<t.length;e++)Dd(t[e])}}function Vf(e,t){return e(t)}function $f(){}var Tu=!1;function Gf(e,t,a){if(Tu)return e(t,a);Tu=!0;try{return Vf(e,t,a)}finally{Tu=!1,(Fr!==null||Er!==null)&&($f(),Wf())}}function Fo(e,t){var a=e.stateNode;if(a===null)return null;var r=Ol(a);if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(w(231,t,typeof a));return a}var us=!1;if(aa)try{vr={},Object.defineProperty(vr,"passive",{get:function(){us=!0}}),window.addEventListener("test",vr,vr),window.removeEventListener("test",vr,vr)}catch{us=!1}var vr;function ig(e,t,a,r,o,n,l,u,s){var f=Array.prototype.slice.call(arguments,3);try{t.apply(a,f)}catch(g){this.onError(g)}}var Co=!1,il=null,dl=!1,ss=null,dg={onError:function(e){Co=!0,il=e}};function fg(e,t,a,r,o,n,l,u,s){Co=!1,il=null,ig.apply(dg,arguments)}function cg(e,t,a,r,o,n,l,u,s){if(fg.apply(this,arguments),Co){if(Co){var f=il;Co=!1,il=null}else throw Error(w(198));dl||(dl=!0,ss=f)}}function or(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function jf(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ad(e){if(or(e)!==e)throw Error(w(188))}function pg(e){var t=e.alternate;if(!t){if(t=or(e),t===null)throw Error(w(188));return t!==e?null:e}for(var a=e,r=t;;){var o=a.return;if(o===null)break;var n=o.alternate;if(n===null){if(r=o.return,r!==null){a=r;continue}break}if(o.child===n.child){for(n=o.child;n;){if(n===a)return Ad(o),e;if(n===r)return Ad(o),t;n=n.sibling}throw Error(w(188))}if(a.return!==r.return)a=o,r=n;else{for(var l=!1,u=o.child;u;){if(u===a){l=!0,a=o,r=n;break}if(u===r){l=!0,r=o,a=n;break}u=u.sibling}if(!l){for(u=n.child;u;){if(u===a){l=!0,a=n,r=o;break}if(u===r){l=!0,r=n,a=o;break}u=u.sibling}if(!l)throw Error(w(189))}}if(a.alternate!==r)throw Error(w(190))}if(a.tag!==3)throw Error(w(188));return a.stateNode.current===a?e:t}function Kf(e){return e=pg(e),e!==null?Xf(e):null}function Xf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Xf(e);if(t!==null)return t;e=e.sibling}return null}var Qf=dt.unstable_scheduleCallback,Md=dt.unstable_cancelCallback,mg=dt.unstable_shouldYield,gg=dt.unstable_requestPaint,Pe=dt.unstable_now,hg=dt.unstable_getCurrentPriorityLevel,Gs=dt.unstable_ImmediatePriority,Yf=dt.unstable_UserBlockingPriority,fl=dt.unstable_NormalPriority,xg=dt.unstable_LowPriority,Zf=dt.unstable_IdlePriority,Ml=null,qt=null;function vg(e){if(qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(Ml,e,void 0,(e.current.flags&128)===128)}catch{}}var Dt=Math.clz32?Math.clz32:Sg,Lg=Math.log,yg=Math.LN2;function Sg(e){return e>>>=0,e===0?32:31-(Lg(e)/yg|0)|0}var On=64,zn=4194304;function yo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function cl(e,t){var a=e.pendingLanes;if(a===0)return 0;var r=0,o=e.suspendedLanes,n=e.pingedLanes,l=a&268435455;if(l!==0){var u=l&~o;u!==0?r=yo(u):(n&=l,n!==0&&(r=yo(n)))}else l=a&~o,l!==0?r=yo(l):n!==0&&(r=yo(n));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,n=t&-t,o>=n||o===16&&(n&4194240)!==0))return t;if((r&4)!==0&&(r|=a&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)a=31-Dt(t),o=1<<a,r|=e[a],t&=~o;return r}function Ig(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Cg(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,n=e.pendingLanes;0<n;){var l=31-Dt(n),u=1<<l,s=o[l];s===-1?((u&a)===0||(u&r)!==0)&&(o[l]=Ig(u,t)):s<=t&&(e.expiredLanes|=u),n&=~u}}function is(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Jf(){var e=On;return On<<=1,(On&4194240)===0&&(On=64),e}function Ru(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ko(e,t,a){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dt(t),e[t]=a}function wg(e,t){var a=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<a;){var o=31-Dt(a),n=1<<o;t[o]=0,r[o]=-1,e[o]=-1,a&=~n}}function js(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-Dt(a),o=1<<r;o&t|e[r]&t&&(e[r]|=t),a&=~o}}var ie=0;function ec(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var tc,Ks,ac,rc,oc,ds=!1,Un=[],va=null,La=null,ya=null,Eo=new Map,Bo=new Map,ma=[],kg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Fd(e,t){switch(e){case"focusin":case"focusout":va=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":ya=null;break;case"pointerover":case"pointerout":Eo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bo.delete(t.pointerId)}}function fo(e,t,a,r,o,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:n,targetContainers:[o]},t!==null&&(t=Qo(t),t!==null&&Ks(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function bg(e,t,a,r,o){switch(t){case"focusin":return va=fo(va,e,t,a,r,o),!0;case"dragenter":return La=fo(La,e,t,a,r,o),!0;case"mouseover":return ya=fo(ya,e,t,a,r,o),!0;case"pointerover":var n=o.pointerId;return Eo.set(n,fo(Eo.get(n)||null,e,t,a,r,o)),!0;case"gotpointercapture":return n=o.pointerId,Bo.set(n,fo(Bo.get(n)||null,e,t,a,r,o)),!0}return!1}function nc(e){var t=ja(e.target);if(t!==null){var a=or(t);if(a!==null){if(t=a.tag,t===13){if(t=jf(a),t!==null){e.blockedOn=t,oc(e.priority,function(){ac(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=fs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);ns=r,a.target.dispatchEvent(r),ns=null}else return t=Qo(a),t!==null&&Ks(t),e.blockedOn=a,!1;t.shift()}return!0}function Ed(e,t,a){Zn(e)&&a.delete(t)}function Pg(){ds=!1,va!==null&&Zn(va)&&(va=null),La!==null&&Zn(La)&&(La=null),ya!==null&&Zn(ya)&&(ya=null),Eo.forEach(Ed),Bo.forEach(Ed)}function co(e,t){e.blockedOn===t&&(e.blockedOn=null,ds||(ds=!0,dt.unstable_scheduleCallback(dt.unstable_NormalPriority,Pg)))}function Oo(e){function t(o){return co(o,e)}if(0<Un.length){co(Un[0],e);for(var a=1;a<Un.length;a++){var r=Un[a];r.blockedOn===e&&(r.blockedOn=null)}}for(va!==null&&co(va,e),La!==null&&co(La,e),ya!==null&&co(ya,e),Eo.forEach(t),Bo.forEach(t),a=0;a<ma.length;a++)r=ma[a],r.blockedOn===e&&(r.blockedOn=null);for(;0<ma.length&&(a=ma[0],a.blockedOn===null);)nc(a),a.blockedOn===null&&ma.shift()}var Br=la.ReactCurrentBatchConfig,pl=!0;function Tg(e,t,a,r){var o=ie,n=Br.transition;Br.transition=null;try{ie=1,Xs(e,t,a,r)}finally{ie=o,Br.transition=n}}function Rg(e,t,a,r){var o=ie,n=Br.transition;Br.transition=null;try{ie=4,Xs(e,t,a,r)}finally{ie=o,Br.transition=n}}function Xs(e,t,a,r){if(pl){var o=fs(e,t,a,r);if(o===null)Ou(e,t,r,ml,a),Fd(e,r);else if(bg(o,e,t,a,r))r.stopPropagation();else if(Fd(e,r),t&4&&-1<kg.indexOf(e)){for(;o!==null;){var n=Qo(o);if(n!==null&&tc(n),n=fs(e,t,a,r),n===null&&Ou(e,t,r,ml,a),n===o)break;o=n}o!==null&&r.stopPropagation()}else Ou(e,t,r,null,a)}}var ml=null;function fs(e,t,a,r){if(ml=null,e=$s(r),e=ja(e),e!==null)if(t=or(e),t===null)e=null;else if(a=t.tag,a===13){if(e=jf(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ml=e,null}function lc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(hg()){case Gs:return 1;case Yf:return 4;case fl:case xg:return 16;case Zf:return 536870912;default:return 16}default:return 16}}var ha=null,Qs=null,Jn=null;function uc(){if(Jn)return Jn;var e,t=Qs,a=t.length,r,o="value"in ha?ha.value:ha.textContent,n=o.length;for(e=0;e<a&&t[e]===o[e];e++);var l=a-e;for(r=1;r<=l&&t[a-r]===o[n-r];r++);return Jn=o.slice(e,1<r?1-r:void 0)}function el(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nn(){return!0}function Bd(){return!1}function ft(e){function t(a,r,o,n,l){this._reactName=a,this._targetInst=o,this.type=r,this.nativeEvent=n,this.target=l,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(a=e[u],this[u]=a?a(n):n[u]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?Nn:Bd,this.isPropagationStopped=Bd,this}return ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var $r={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ys=ft($r),Xo=ke({},$r,{view:0,detail:0}),Dg=ft(Xo),Du,Au,po,Fl=ke({},Xo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==po&&(po&&e.type==="mousemove"?(Du=e.screenX-po.screenX,Au=e.screenY-po.screenY):Au=Du=0,po=e),Du)},movementY:function(e){return"movementY"in e?e.movementY:Au}}),Od=ft(Fl),Ag=ke({},Fl,{dataTransfer:0}),Mg=ft(Ag),Fg=ke({},Xo,{relatedTarget:0}),Mu=ft(Fg),Eg=ke({},$r,{animationName:0,elapsedTime:0,pseudoElement:0}),Bg=ft(Eg),Og=ke({},$r,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zg=ft(Og),Ug=ke({},$r,{data:0}),zd=ft(Ug),Ng={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_g={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_g[e])?!!t[e]:!1}function Zs(){return qg}var Wg=ke({},Xo,{key:function(e){if(e.key){var t=Ng[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=el(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zs,charCode:function(e){return e.type==="keypress"?el(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?el(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vg=ft(Wg),$g=ke({},Fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ud=ft($g),Gg=ke({},Xo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zs}),jg=ft(Gg),Kg=ke({},$r,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xg=ft(Kg),Qg=ke({},Fl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Yg=ft(Qg),Zg=[9,13,27,32],Js=aa&&"CompositionEvent"in window,wo=null;aa&&"documentMode"in document&&(wo=document.documentMode);var Jg=aa&&"TextEvent"in window&&!wo,sc=aa&&(!Js||wo&&8<wo&&11>=wo),Nd=" ",Hd=!1;function ic(e,t){switch(e){case"keyup":return Zg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ir=!1;function eh(e,t){switch(e){case"compositionend":return dc(t);case"keypress":return t.which!==32?null:(Hd=!0,Nd);case"textInput":return e=t.data,e===Nd&&Hd?null:e;default:return null}}function th(e,t){if(Ir)return e==="compositionend"||!Js&&ic(e,t)?(e=uc(),Jn=Qs=ha=null,Ir=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return sc&&t.locale!=="ko"?null:t.data;default:return null}}var ah={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _d(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ah[e.type]:t==="textarea"}function fc(e,t,a,r){qf(r),t=gl(t,"onChange"),0<t.length&&(a=new Ys("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var ko=null,zo=null;function rh(e){Ic(e,0)}function El(e){var t=kr(e);if(Bf(t))return e}function oh(e,t){if(e==="change")return t}var cc=!1;aa&&(aa?(_n="oninput"in document,_n||(Fu=document.createElement("div"),Fu.setAttribute("oninput","return;"),_n=typeof Fu.oninput=="function"),Hn=_n):Hn=!1,cc=Hn&&(!document.documentMode||9<document.documentMode));var Hn,_n,Fu;function qd(){ko&&(ko.detachEvent("onpropertychange",pc),zo=ko=null)}function pc(e){if(e.propertyName==="value"&&El(zo)){var t=[];fc(t,zo,e,$s(e)),Gf(rh,t)}}function nh(e,t,a){e==="focusin"?(qd(),ko=t,zo=a,ko.attachEvent("onpropertychange",pc)):e==="focusout"&&qd()}function lh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return El(zo)}function uh(e,t){if(e==="click")return El(t)}function sh(e,t){if(e==="input"||e==="change")return El(t)}function ih(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:ih;function Uo(e,t){if(Mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var o=a[r];if(!ju.call(t,o)||!Mt(e[o],t[o]))return!1}return!0}function Wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vd(e,t){var a=Wd(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Wd(a)}}function mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gc(){for(var e=window,t=sl();t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=sl(e.document)}return t}function ei(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function dh(e){var t=gc(),a=e.focusedElem,r=e.selectionRange;if(t!==a&&a&&a.ownerDocument&&mc(a.ownerDocument.documentElement,a)){if(r!==null&&ei(a)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in a)a.selectionStart=t,a.selectionEnd=Math.min(e,a.value.length);else if(e=(t=a.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=a.textContent.length,n=Math.min(r.start,o);r=r.end===void 0?n:Math.min(r.end,o),!e.extend&&n>r&&(o=r,r=n,n=o),o=Vd(a,n);var l=Vd(a,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),n>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=a;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<t.length;a++)e=t[a],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fh=aa&&"documentMode"in document&&11>=document.documentMode,Cr=null,cs=null,bo=null,ps=!1;function $d(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ps||Cr==null||Cr!==sl(r)||(r=Cr,"selectionStart"in r&&ei(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),bo&&Uo(bo,r)||(bo=r,r=gl(cs,"onSelect"),0<r.length&&(t=new Ys("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=Cr)))}function qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var wr={animationend:qn("Animation","AnimationEnd"),animationiteration:qn("Animation","AnimationIteration"),animationstart:qn("Animation","AnimationStart"),transitionend:qn("Transition","TransitionEnd")},Eu={},hc={};aa&&(hc=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);function Bl(e){if(Eu[e])return Eu[e];if(!wr[e])return e;var t=wr[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in hc)return Eu[e]=t[a];return e}var xc=Bl("animationend"),vc=Bl("animationiteration"),Lc=Bl("animationstart"),yc=Bl("transitionend"),Sc=new Map,Gd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ta(e,t){Sc.set(e,t),rr(t,[e])}for(Wn=0;Wn<Gd.length;Wn++)Vn=Gd[Wn],jd=Vn.toLowerCase(),Kd=Vn[0].toUpperCase()+Vn.slice(1),Ta(jd,"on"+Kd);var Vn,jd,Kd,Wn;Ta(xc,"onAnimationEnd");Ta(vc,"onAnimationIteration");Ta(Lc,"onAnimationStart");Ta("dblclick","onDoubleClick");Ta("focusin","onFocus");Ta("focusout","onBlur");Ta(yc,"onTransitionEnd");Ur("onMouseEnter",["mouseout","mouseover"]);Ur("onMouseLeave",["mouseout","mouseover"]);Ur("onPointerEnter",["pointerout","pointerover"]);Ur("onPointerLeave",["pointerout","pointerover"]);rr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));rr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));rr("onBeforeInput",["compositionend","keypress","textInput","paste"]);rr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));rr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));rr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var So="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ch=new Set("cancel close invalid load scroll toggle".split(" ").concat(So));function Xd(e,t,a){var r=e.type||"unknown-event";e.currentTarget=a,cg(r,t,void 0,e),e.currentTarget=null}function Ic(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],o=r.event;r=r.listeners;e:{var n=void 0;if(t)for(var l=r.length-1;0<=l;l--){var u=r[l],s=u.instance,f=u.currentTarget;if(u=u.listener,s!==n&&o.isPropagationStopped())break e;Xd(o,u,f),n=s}else for(l=0;l<r.length;l++){if(u=r[l],s=u.instance,f=u.currentTarget,u=u.listener,s!==n&&o.isPropagationStopped())break e;Xd(o,u,f),n=s}}}if(dl)throw e=ss,dl=!1,ss=null,e}function ve(e,t){var a=t[vs];a===void 0&&(a=t[vs]=new Set);var r=e+"__bubble";a.has(r)||(Cc(t,e,2,!1),a.add(r))}function Bu(e,t,a){var r=0;t&&(r|=4),Cc(a,e,r,t)}var $n="_reactListening"+Math.random().toString(36).slice(2);function No(e){if(!e[$n]){e[$n]=!0,Df.forEach(function(a){a!=="selectionchange"&&(ch.has(a)||Bu(a,!1,e),Bu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$n]||(t[$n]=!0,Bu("selectionchange",!1,t))}}function Cc(e,t,a,r){switch(lc(t)){case 1:var o=Tg;break;case 4:o=Rg;break;default:o=Xs}a=o.bind(null,t,a,e),o=void 0,!us||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Ou(e,t,a,r,o){var n=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var u=r.stateNode.containerInfo;if(u===o||u.nodeType===8&&u.parentNode===o)break;if(l===4)for(l=r.return;l!==null;){var s=l.tag;if((s===3||s===4)&&(s=l.stateNode.containerInfo,s===o||s.nodeType===8&&s.parentNode===o))return;l=l.return}for(;u!==null;){if(l=ja(u),l===null)return;if(s=l.tag,s===5||s===6){r=n=l;continue e}u=u.parentNode}}r=r.return}Gf(function(){var f=n,g=$s(a),h=[];e:{var p=Sc.get(e);if(p!==void 0){var L=Ys,v=e;switch(e){case"keypress":if(el(a)===0)break e;case"keydown":case"keyup":L=Vg;break;case"focusin":v="focus",L=Mu;break;case"focusout":v="blur",L=Mu;break;case"beforeblur":case"afterblur":L=Mu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Od;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=Mg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=jg;break;case xc:case vc:case Lc:L=Bg;break;case yc:L=Xg;break;case"scroll":L=Dg;break;case"wheel":L=Yg;break;case"copy":case"cut":case"paste":L=zg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Ud}var y=(t&4)!==0,M=!y&&e==="scroll",c=y?p!==null?p+"Capture":null:p;y=[];for(var d=f,i;d!==null;){i=d;var m=i.stateNode;if(i.tag===5&&m!==null&&(i=m,c!==null&&(m=Fo(d,c),m!=null&&y.push(Ho(d,m,i)))),M)break;d=d.return}0<y.length&&(p=new L(p,v,null,a,g),h.push({event:p,listeners:y}))}}if((t&7)===0){e:{if(p=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",p&&a!==ns&&(v=a.relatedTarget||a.fromElement)&&(ja(v)||v[ra]))break e;if((L||p)&&(p=g.window===g?g:(p=g.ownerDocument)?p.defaultView||p.parentWindow:window,L?(v=a.relatedTarget||a.toElement,L=f,v=v?ja(v):null,v!==null&&(M=or(v),v!==M||v.tag!==5&&v.tag!==6)&&(v=null)):(L=null,v=f),L!==v)){if(y=Od,m="onMouseLeave",c="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(y=Ud,m="onPointerLeave",c="onPointerEnter",d="pointer"),M=L==null?p:kr(L),i=v==null?p:kr(v),p=new y(m,d+"leave",L,a,g),p.target=M,p.relatedTarget=i,m=null,ja(g)===f&&(y=new y(c,d+"enter",v,a,g),y.target=i,y.relatedTarget=M,m=y),M=m,L&&v)t:{for(y=L,c=v,d=0,i=y;i;i=Lr(i))d++;for(i=0,m=c;m;m=Lr(m))i++;for(;0<d-i;)y=Lr(y),d--;for(;0<i-d;)c=Lr(c),i--;for(;d--;){if(y===c||c!==null&&y===c.alternate)break t;y=Lr(y),c=Lr(c)}y=null}else y=null;L!==null&&Qd(h,p,L,y,!1),v!==null&&M!==null&&Qd(h,M,v,y,!0)}}e:{if(p=f?kr(f):window,L=p.nodeName&&p.nodeName.toLowerCase(),L==="select"||L==="input"&&p.type==="file")var C=oh;else if(_d(p))if(cc)C=sh;else{C=lh;var I=nh}else(L=p.nodeName)&&L.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=uh);if(C&&(C=C(e,f))){fc(h,C,a,g);break e}I&&I(e,p,f),e==="focusout"&&(I=p._wrapperState)&&I.controlled&&p.type==="number"&&es(p,"number",p.value)}switch(I=f?kr(f):window,e){case"focusin":(_d(I)||I.contentEditable==="true")&&(Cr=I,cs=f,bo=null);break;case"focusout":bo=cs=Cr=null;break;case"mousedown":ps=!0;break;case"contextmenu":case"mouseup":case"dragend":ps=!1,$d(h,a,g);break;case"selectionchange":if(fh)break;case"keydown":case"keyup":$d(h,a,g)}var b;if(Js)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Ir?ic(e,a)&&(P="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(P="onCompositionStart");P&&(sc&&a.locale!=="ko"&&(Ir||P!=="onCompositionStart"?P==="onCompositionEnd"&&Ir&&(b=uc()):(ha=g,Qs="value"in ha?ha.value:ha.textContent,Ir=!0)),I=gl(f,P),0<I.length&&(P=new zd(P,e,null,a,g),h.push({event:P,listeners:I}),b?P.data=b:(b=dc(a),b!==null&&(P.data=b)))),(b=Jg?eh(e,a):th(e,a))&&(f=gl(f,"onBeforeInput"),0<f.length&&(g=new zd("onBeforeInput","beforeinput",null,a,g),h.push({event:g,listeners:f}),g.data=b))}Ic(h,t)})}function Ho(e,t,a){return{instance:e,listener:t,currentTarget:a}}function gl(e,t){for(var a=t+"Capture",r=[];e!==null;){var o=e,n=o.stateNode;o.tag===5&&n!==null&&(o=n,n=Fo(e,a),n!=null&&r.unshift(Ho(e,n,o)),n=Fo(e,t),n!=null&&r.push(Ho(e,n,o))),e=e.return}return r}function Lr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qd(e,t,a,r,o){for(var n=t._reactName,l=[];a!==null&&a!==r;){var u=a,s=u.alternate,f=u.stateNode;if(s!==null&&s===r)break;u.tag===5&&f!==null&&(u=f,o?(s=Fo(a,n),s!=null&&l.unshift(Ho(a,s,u))):o||(s=Fo(a,n),s!=null&&l.push(Ho(a,s,u)))),a=a.return}l.length!==0&&e.push({event:t,listeners:l})}var ph=/\\r\\n?/g,mh=/\\u0000|\\uFFFD/g;function Yd(e){return(typeof e=="string"?e:""+e).replace(ph,`\n`).replace(mh,"")}function Gn(e,t,a){if(t=Yd(t),Yd(e)!==t&&a)throw Error(w(425))}function hl(){}var ms=null,gs=null;function hs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xs=typeof setTimeout=="function"?setTimeout:void 0,gh=typeof clearTimeout=="function"?clearTimeout:void 0,Zd=typeof Promise=="function"?Promise:void 0,hh=typeof queueMicrotask=="function"?queueMicrotask:typeof Zd<"u"?function(e){return Zd.resolve(null).then(e).catch(xh)}:xs;function xh(e){setTimeout(function(){throw e})}function zu(e,t){var a=t,r=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(r===0){e.removeChild(o),Oo(t);return}r--}else a!=="$"&&a!=="$?"&&a!=="$!"||r++;a=o}while(a);Oo(t)}function Sa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Jd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}var Gr=Math.random().toString(36).slice(2),_t="__reactFiber$"+Gr,_o="__reactProps$"+Gr,ra="__reactContainer$"+Gr,vs="__reactEvents$"+Gr,vh="__reactListeners$"+Gr,Lh="__reactHandles$"+Gr;function ja(e){var t=e[_t];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ra]||a[_t]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Jd(e);e!==null;){if(a=e[_t])return a;e=Jd(e)}return t}e=a,a=e.parentNode}return null}function Qo(e){return e=e[_t]||e[ra],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function kr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(w(33))}function Ol(e){return e[_o]||null}var Ls=[],br=-1;function Ra(e){return{current:e}}function Le(e){0>br||(e.current=Ls[br],Ls[br]=null,br--)}function ge(e,t){br++,Ls[br]=e.current,e.current=t}var Pa={},Ve=Ra(Pa),at=Ra(!1),Za=Pa;function Nr(e,t){var a=e.type.contextTypes;if(!a)return Pa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},n;for(n in a)o[n]=t[n];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function rt(e){return e=e.childContextTypes,e!=null}function xl(){Le(at),Le(Ve)}function ef(e,t,a){if(Ve.current!==Pa)throw Error(w(168));ge(Ve,t),ge(at,a)}function wc(e,t,a){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return a;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(w(108,ng(e)||"Unknown",o));return ke({},a,r)}function vl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pa,Za=Ve.current,ge(Ve,e),ge(at,at.current),!0}function tf(e,t,a){var r=e.stateNode;if(!r)throw Error(w(169));a?(e=wc(e,t,Za),r.__reactInternalMemoizedMergedChildContext=e,Le(at),Le(Ve),ge(Ve,e)):Le(at),ge(at,a)}var Zt=null,zl=!1,Uu=!1;function kc(e){Zt===null?Zt=[e]:Zt.push(e)}function yh(e){zl=!0,kc(e)}function Da(){if(!Uu&&Zt!==null){Uu=!0;var e=0,t=ie;try{var a=Zt;for(ie=1;e<a.length;e++){var r=a[e];do r=r(!0);while(r!==null)}Zt=null,zl=!1}catch(o){throw Zt!==null&&(Zt=Zt.slice(e+1)),Qf(Gs,Da),o}finally{ie=t,Uu=!1}}return null}var Pr=[],Tr=0,Ll=null,yl=0,gt=[],ht=0,Ja=null,Jt=1,ea="";function $a(e,t){Pr[Tr++]=yl,Pr[Tr++]=Ll,Ll=e,yl=t}function bc(e,t,a){gt[ht++]=Jt,gt[ht++]=ea,gt[ht++]=Ja,Ja=e;var r=Jt;e=ea;var o=32-Dt(r)-1;r&=~(1<<o),a+=1;var n=32-Dt(t)+o;if(30<n){var l=o-o%5;n=(r&(1<<l)-1).toString(32),r>>=l,o-=l,Jt=1<<32-Dt(t)+o|a<<o|r,ea=n+e}else Jt=1<<n|a<<o|r,ea=e}function ti(e){e.return!==null&&($a(e,1),bc(e,1,0))}function ai(e){for(;e===Ll;)Ll=Pr[--Tr],Pr[Tr]=null,yl=Pr[--Tr],Pr[Tr]=null;for(;e===Ja;)Ja=gt[--ht],gt[ht]=null,ea=gt[--ht],gt[ht]=null,Jt=gt[--ht],gt[ht]=null}var it=null,st=null,ye=!1,Rt=null;function Pc(e,t){var a=xt(5,null,null,0);a.elementType="DELETED",a.stateNode=t,a.return=e,t=e.deletions,t===null?(e.deletions=[a],e.flags|=16):t.push(a)}function af(e,t){switch(e.tag){case 5:var a=e.type;return t=t.nodeType!==1||a.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,it=e,st=Sa(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,it=e,st=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(a=Ja!==null?{id:Jt,overflow:ea}:null,e.memoizedState={dehydrated:t,treeContext:a,retryLane:1073741824},a=xt(18,null,null,0),a.stateNode=t,a.return=e,e.child=a,it=e,st=null,!0):!1;default:return!1}}function ys(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ss(e){if(ye){var t=st;if(t){var a=t;if(!af(e,t)){if(ys(e))throw Error(w(418));t=Sa(a.nextSibling);var r=it;t&&af(e,t)?Pc(r,a):(e.flags=e.flags&-4097|2,ye=!1,it=e)}}else{if(ys(e))throw Error(w(418));e.flags=e.flags&-4097|2,ye=!1,it=e}}}function rf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;it=e}function jn(e){if(e!==it)return!1;if(!ye)return rf(e),ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!hs(e.type,e.memoizedProps)),t&&(t=st)){if(ys(e))throw Tc(),Error(w(418));for(;t;)Pc(e,t),t=Sa(t.nextSibling)}if(rf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(w(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(t===0){st=Sa(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++}e=e.nextSibling}st=null}}else st=it?Sa(e.stateNode.nextSibling):null;return!0}function Tc(){for(var e=st;e;)e=Sa(e.nextSibling)}function Hr(){st=it=null,ye=!1}function ri(e){Rt===null?Rt=[e]:Rt.push(e)}var Sh=la.ReactCurrentBatchConfig;function mo(e,t,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(w(309));var r=a.stateNode}if(!r)throw Error(w(147,e));var o=r,n=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===n?t.ref:(t=function(l){var u=o.refs;l===null?delete u[n]:u[n]=l},t._stringRef=n,t)}if(typeof e!="string")throw Error(w(284));if(!a._owner)throw Error(w(290,e))}return e}function Kn(e,t){throw e=Object.prototype.toString.call(t),Error(w(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function of(e){var t=e._init;return t(e._payload)}function Rc(e){function t(c,d){if(e){var i=c.deletions;i===null?(c.deletions=[d],c.flags|=16):i.push(d)}}function a(c,d){if(!e)return null;for(;d!==null;)t(c,d),d=d.sibling;return null}function r(c,d){for(c=new Map;d!==null;)d.key!==null?c.set(d.key,d):c.set(d.index,d),d=d.sibling;return c}function o(c,d){return c=ka(c,d),c.index=0,c.sibling=null,c}function n(c,d,i){return c.index=i,e?(i=c.alternate,i!==null?(i=i.index,i<d?(c.flags|=2,d):i):(c.flags|=2,d)):(c.flags|=1048576,d)}function l(c){return e&&c.alternate===null&&(c.flags|=2),c}function u(c,d,i,m){return d===null||d.tag!==6?(d=$u(i,c.mode,m),d.return=c,d):(d=o(d,i),d.return=c,d)}function s(c,d,i,m){var C=i.type;return C===Sr?g(c,d,i.props.children,m,i.key):d!==null&&(d.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ca&&of(C)===d.type)?(m=o(d,i.props),m.ref=mo(c,d,i),m.return=c,m):(m=ul(i.type,i.key,i.props,null,c.mode,m),m.ref=mo(c,d,i),m.return=c,m)}function f(c,d,i,m){return d===null||d.tag!==4||d.stateNode.containerInfo!==i.containerInfo||d.stateNode.implementation!==i.implementation?(d=Gu(i,c.mode,m),d.return=c,d):(d=o(d,i.children||[]),d.return=c,d)}function g(c,d,i,m,C){return d===null||d.tag!==7?(d=Ya(i,c.mode,m,C),d.return=c,d):(d=o(d,i),d.return=c,d)}function h(c,d,i){if(typeof d=="string"&&d!==""||typeof d=="number")return d=$u(""+d,c.mode,i),d.return=c,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Fn:return i=ul(d.type,d.key,d.props,null,c.mode,i),i.ref=mo(c,null,d),i.return=c,i;case yr:return d=Gu(d,c.mode,i),d.return=c,d;case ca:var m=d._init;return h(c,m(d._payload),i)}if(Lo(d)||io(d))return d=Ya(d,c.mode,i,null),d.return=c,d;Kn(c,d)}return null}function p(c,d,i,m){var C=d!==null?d.key:null;if(typeof i=="string"&&i!==""||typeof i=="number")return C!==null?null:u(c,d,""+i,m);if(typeof i=="object"&&i!==null){switch(i.$$typeof){case Fn:return i.key===C?s(c,d,i,m):null;case yr:return i.key===C?f(c,d,i,m):null;case ca:return C=i._init,p(c,d,C(i._payload),m)}if(Lo(i)||io(i))return C!==null?null:g(c,d,i,m,null);Kn(c,i)}return null}function L(c,d,i,m,C){if(typeof m=="string"&&m!==""||typeof m=="number")return c=c.get(i)||null,u(d,c,""+m,C);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Fn:return c=c.get(m.key===null?i:m.key)||null,s(d,c,m,C);case yr:return c=c.get(m.key===null?i:m.key)||null,f(d,c,m,C);case ca:var I=m._init;return L(c,d,i,I(m._payload),C)}if(Lo(m)||io(m))return c=c.get(i)||null,g(d,c,m,C,null);Kn(d,m)}return null}function v(c,d,i,m){for(var C=null,I=null,b=d,P=d=0,B=null;b!==null&&P<i.length;P++){b.index>P?(B=b,b=null):B=b.sibling;var q=p(c,b,i[P],m);if(q===null){b===null&&(b=B);break}e&&b&&q.alternate===null&&t(c,b),d=n(q,d,P),I===null?C=q:I.sibling=q,I=q,b=B}if(P===i.length)return a(c,b),ye&&$a(c,P),C;if(b===null){for(;P<i.length;P++)b=h(c,i[P],m),b!==null&&(d=n(b,d,P),I===null?C=b:I.sibling=b,I=b);return ye&&$a(c,P),C}for(b=r(c,b);P<i.length;P++)B=L(b,c,P,i[P],m),B!==null&&(e&&B.alternate!==null&&b.delete(B.key===null?P:B.key),d=n(B,d,P),I===null?C=B:I.sibling=B,I=B);return e&&b.forEach(function(V){return t(c,V)}),ye&&$a(c,P),C}function y(c,d,i,m){var C=io(i);if(typeof C!="function")throw Error(w(150));if(i=C.call(i),i==null)throw Error(w(151));for(var I=C=null,b=d,P=d=0,B=null,q=i.next();b!==null&&!q.done;P++,q=i.next()){b.index>P?(B=b,b=null):B=b.sibling;var V=p(c,b,q.value,m);if(V===null){b===null&&(b=B);break}e&&b&&V.alternate===null&&t(c,b),d=n(V,d,P),I===null?C=V:I.sibling=V,I=V,b=B}if(q.done)return a(c,b),ye&&$a(c,P),C;if(b===null){for(;!q.done;P++,q=i.next())q=h(c,q.value,m),q!==null&&(d=n(q,d,P),I===null?C=q:I.sibling=q,I=q);return ye&&$a(c,P),C}for(b=r(c,b);!q.done;P++,q=i.next())q=L(b,c,P,q.value,m),q!==null&&(e&&q.alternate!==null&&b.delete(q.key===null?P:q.key),d=n(q,d,P),I===null?C=q:I.sibling=q,I=q);return e&&b.forEach(function(G){return t(c,G)}),ye&&$a(c,P),C}function M(c,d,i,m){if(typeof i=="object"&&i!==null&&i.type===Sr&&i.key===null&&(i=i.props.children),typeof i=="object"&&i!==null){switch(i.$$typeof){case Fn:e:{for(var C=i.key,I=d;I!==null;){if(I.key===C){if(C=i.type,C===Sr){if(I.tag===7){a(c,I.sibling),d=o(I,i.props.children),d.return=c,c=d;break e}}else if(I.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ca&&of(C)===I.type){a(c,I.sibling),d=o(I,i.props),d.ref=mo(c,I,i),d.return=c,c=d;break e}a(c,I);break}else t(c,I);I=I.sibling}i.type===Sr?(d=Ya(i.props.children,c.mode,m,i.key),d.return=c,c=d):(m=ul(i.type,i.key,i.props,null,c.mode,m),m.ref=mo(c,d,i),m.return=c,c=m)}return l(c);case yr:e:{for(I=i.key;d!==null;){if(d.key===I)if(d.tag===4&&d.stateNode.containerInfo===i.containerInfo&&d.stateNode.implementation===i.implementation){a(c,d.sibling),d=o(d,i.children||[]),d.return=c,c=d;break e}else{a(c,d);break}else t(c,d);d=d.sibling}d=Gu(i,c.mode,m),d.return=c,c=d}return l(c);case ca:return I=i._init,M(c,d,I(i._payload),m)}if(Lo(i))return v(c,d,i,m);if(io(i))return y(c,d,i,m);Kn(c,i)}return typeof i=="string"&&i!==""||typeof i=="number"?(i=""+i,d!==null&&d.tag===6?(a(c,d.sibling),d=o(d,i),d.return=c,c=d):(a(c,d),d=$u(i,c.mode,m),d.return=c,c=d),l(c)):a(c,d)}return M}var _r=Rc(!0),Dc=Rc(!1),Sl=Ra(null),Il=null,Rr=null,oi=null;function ni(){oi=Rr=Il=null}function li(e){var t=Sl.current;Le(Sl),e._currentValue=t}function Is(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function Or(e,t){Il=e,oi=Rr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(tt=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(oi!==e)if(e={context:e,memoizedValue:t,next:null},Rr===null){if(Il===null)throw Error(w(308));Rr=e,Il.dependencies={lanes:0,firstContext:e}}else Rr=Rr.next=e;return t}var Ka=null;function ui(e){Ka===null?Ka=[e]:Ka.push(e)}function Ac(e,t,a,r){var o=t.interleaved;return o===null?(a.next=a,ui(t)):(a.next=o.next,o.next=a),t.interleaved=a,oa(e,r)}function oa(e,t){e.lanes|=t;var a=e.alternate;for(a!==null&&(a.lanes|=t),a=e,e=e.return;e!==null;)e.childLanes|=t,a=e.alternate,a!==null&&(a.childLanes|=t),a=e,e=e.return;return a.tag===3?a.stateNode:null}var pa=!1;function si(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ta(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ae&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,oa(e,a)}return o=r.interleaved,o===null?(t.next=t,ui(r)):(t.next=o.next,o.next=t),r.interleaved=t,oa(e,a)}function tl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,js(e,a)}}function nf(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var o=null,n=null;if(a=a.firstBaseUpdate,a!==null){do{var l={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};n===null?o=n=l:n=n.next=l,a=a.next}while(a!==null);n===null?o=n=t:n=n.next=t}else o=n=t;a={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:n,shared:r.shared,effects:r.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}function Cl(e,t,a,r){var o=e.updateQueue;pa=!1;var n=o.firstBaseUpdate,l=o.lastBaseUpdate,u=o.shared.pending;if(u!==null){o.shared.pending=null;var s=u,f=s.next;s.next=null,l===null?n=f:l.next=f,l=s;var g=e.alternate;g!==null&&(g=g.updateQueue,u=g.lastBaseUpdate,u!==l&&(u===null?g.firstBaseUpdate=f:u.next=f,g.lastBaseUpdate=s))}if(n!==null){var h=o.baseState;l=0,g=f=s=null,u=n;do{var p=u.lane,L=u.eventTime;if((r&p)===p){g!==null&&(g=g.next={eventTime:L,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var v=e,y=u;switch(p=t,L=a,y.tag){case 1:if(v=y.payload,typeof v=="function"){h=v.call(L,h,p);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,p=typeof v=="function"?v.call(L,h,p):v,p==null)break e;h=ke({},h,p);break e;case 2:pa=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[u]:p.push(u))}else L={eventTime:L,lane:p,tag:u.tag,payload:u.payload,callback:u.callback,next:null},g===null?(f=g=L,s=h):g=g.next=L,l|=p;if(u=u.next,u===null){if(u=o.shared.pending,u===null)break;p=u,u=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(g===null&&(s=h),o.baseState=s,o.firstBaseUpdate=f,o.lastBaseUpdate=g,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else n===null&&(o.shared.lanes=0);tr|=l,e.lanes=l,e.memoizedState=h}}function lf(e,t,a){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=a,typeof o!="function")throw Error(w(191,o));o.call(r)}}}var Yo={},Wt=Ra(Yo),qo=Ra(Yo),Wo=Ra(Yo);function Xa(e){if(e===Yo)throw Error(w(174));return e}function ii(e,t){switch(ge(Wo,t),ge(qo,e),ge(Wt,Yo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:as(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=as(t,e)}Le(Wt),ge(Wt,t)}function qr(){Le(Wt),Le(qo),Le(Wo)}function Fc(e){Xa(Wo.current);var t=Xa(Wt.current),a=as(t,e.type);t!==a&&(ge(qo,e),ge(Wt,a))}function di(e){qo.current===e&&(Le(Wt),Le(qo))}var Ce=Ra(0);function wl(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Nu=[];function fi(){for(var e=0;e<Nu.length;e++)Nu[e]._workInProgressVersionPrimary=null;Nu.length=0}var al=la.ReactCurrentDispatcher,Hu=la.ReactCurrentBatchConfig,er=0,we=null,Ae=null,Ee=null,kl=!1,Po=!1,Vo=0,Ih=0;function _e(){throw Error(w(321))}function ci(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Mt(e[a],t[a]))return!1;return!0}function pi(e,t,a,r,o,n){if(er=n,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,al.current=e===null||e.memoizedState===null?bh:Ph,e=a(r,o),Po){n=0;do{if(Po=!1,Vo=0,25<=n)throw Error(w(301));n+=1,Ee=Ae=null,t.updateQueue=null,al.current=Th,e=a(r,o)}while(Po)}if(al.current=bl,t=Ae!==null&&Ae.next!==null,er=0,Ee=Ae=we=null,kl=!1,t)throw Error(w(300));return e}function mi(){var e=Vo!==0;return Vo=0,e}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?we.memoizedState=Ee=e:Ee=Ee.next=e,Ee}function yt(){if(Ae===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Ee===null?we.memoizedState:Ee.next;if(t!==null)Ee=t,Ae=e;else{if(e===null)throw Error(w(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Ee===null?we.memoizedState=Ee=e:Ee=Ee.next=e}return Ee}function $o(e,t){return typeof t=="function"?t(e):t}function _u(e){var t=yt(),a=t.queue;if(a===null)throw Error(w(311));a.lastRenderedReducer=e;var r=Ae,o=r.baseQueue,n=a.pending;if(n!==null){if(o!==null){var l=o.next;o.next=n.next,n.next=l}r.baseQueue=o=n,a.pending=null}if(o!==null){n=o.next,r=r.baseState;var u=l=null,s=null,f=n;do{var g=f.lane;if((er&g)===g)s!==null&&(s=s.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var h={lane:g,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};s===null?(u=s=h,l=r):s=s.next=h,we.lanes|=g,tr|=g}f=f.next}while(f!==null&&f!==n);s===null?l=r:s.next=u,Mt(r,t.memoizedState)||(tt=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=s,a.lastRenderedState=r}if(e=a.interleaved,e!==null){o=e;do n=o.lane,we.lanes|=n,tr|=n,o=o.next;while(o!==e)}else o===null&&(a.lanes=0);return[t.memoizedState,a.dispatch]}function qu(e){var t=yt(),a=t.queue;if(a===null)throw Error(w(311));a.lastRenderedReducer=e;var r=a.dispatch,o=a.pending,n=t.memoizedState;if(o!==null){a.pending=null;var l=o=o.next;do n=e(n,l.action),l=l.next;while(l!==o);Mt(n,t.memoizedState)||(tt=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),a.lastRenderedState=n}return[n,r]}function Ec(){}function Bc(e,t){var a=we,r=yt(),o=t(),n=!Mt(r.memoizedState,o);if(n&&(r.memoizedState=o,tt=!0),r=r.queue,gi(Uc.bind(null,a,r,e),[e]),r.getSnapshot!==t||n||Ee!==null&&Ee.memoizedState.tag&1){if(a.flags|=2048,Go(9,zc.bind(null,a,r,o,t),void 0,null),Be===null)throw Error(w(349));(er&30)!==0||Oc(a,t,o)}return o}function Oc(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function zc(e,t,a,r){t.value=a,t.getSnapshot=r,Nc(t)&&Hc(e)}function Uc(e,t,a){return a(function(){Nc(t)&&Hc(e)})}function Nc(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Mt(e,a)}catch{return!0}}function Hc(e){var t=oa(e,1);t!==null&&At(t,e,1,-1)}function uf(e){var t=Ht();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t.queue=e,e=e.dispatch=kh.bind(null,we,e),[t.memoizedState,e]}function Go(e,t,a,r){return e={tag:e,create:t,destroy:a,deps:r,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.lastEffect=e.next=e):(a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e)),e}function _c(){return yt().memoizedState}function rl(e,t,a,r){var o=Ht();we.flags|=e,o.memoizedState=Go(1|t,a,void 0,r===void 0?null:r)}function Ul(e,t,a,r){var o=yt();r=r===void 0?null:r;var n=void 0;if(Ae!==null){var l=Ae.memoizedState;if(n=l.destroy,r!==null&&ci(r,l.deps)){o.memoizedState=Go(t,a,n,r);return}}we.flags|=e,o.memoizedState=Go(1|t,a,n,r)}function sf(e,t){return rl(8390656,8,e,t)}function gi(e,t){return Ul(2048,8,e,t)}function qc(e,t){return Ul(4,2,e,t)}function Wc(e,t){return Ul(4,4,e,t)}function Vc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $c(e,t,a){return a=a!=null?a.concat([e]):null,Ul(4,4,Vc.bind(null,t,e),a)}function hi(){}function Gc(e,t){var a=yt();t=t===void 0?null:t;var r=a.memoizedState;return r!==null&&t!==null&&ci(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function jc(e,t){var a=yt();t=t===void 0?null:t;var r=a.memoizedState;return r!==null&&t!==null&&ci(t,r[1])?r[0]:(e=e(),a.memoizedState=[e,t],e)}function Kc(e,t,a){return(er&21)===0?(e.baseState&&(e.baseState=!1,tt=!0),e.memoizedState=a):(Mt(a,t)||(a=Jf(),we.lanes|=a,tr|=a,e.baseState=!0),t)}function Ch(e,t){var a=ie;ie=a!==0&&4>a?a:4,e(!0);var r=Hu.transition;Hu.transition={};try{e(!1),t()}finally{ie=a,Hu.transition=r}}function Xc(){return yt().memoizedState}function wh(e,t,a){var r=wa(e);if(a={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null},Qc(e))Yc(t,a);else if(a=Ac(e,t,a,r),a!==null){var o=Xe();At(a,e,r,o),Zc(a,t,r)}}function kh(e,t,a){var r=wa(e),o={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null};if(Qc(e))Yc(t,o);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var l=t.lastRenderedState,u=n(l,a);if(o.hasEagerState=!0,o.eagerState=u,Mt(u,l)){var s=t.interleaved;s===null?(o.next=o,ui(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}a=Ac(e,t,o,r),a!==null&&(o=Xe(),At(a,e,r,o),Zc(a,t,r))}}function Qc(e){var t=e.alternate;return e===we||t!==null&&t===we}function Yc(e,t){Po=kl=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Zc(e,t,a){if((a&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,js(e,a)}}var bl={readContext:Lt,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},bh={readContext:Lt,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:sf,useImperativeHandle:function(e,t,a){return a=a!=null?a.concat([e]):null,rl(4194308,4,Vc.bind(null,t,e),a)},useLayoutEffect:function(e,t){return rl(4194308,4,e,t)},useInsertionEffect:function(e,t){return rl(4,2,e,t)},useMemo:function(e,t){var a=Ht();return t=t===void 0?null:t,e=e(),a.memoizedState=[e,t],e},useReducer:function(e,t,a){var r=Ht();return t=a!==void 0?a(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=wh.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:uf,useDebugValue:hi,useDeferredValue:function(e){return Ht().memoizedState=e},useTransition:function(){var e=uf(!1),t=e[0];return e=Ch.bind(null,e[1]),Ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,a){var r=we,o=Ht();if(ye){if(a===void 0)throw Error(w(407));a=a()}else{if(a=t(),Be===null)throw Error(w(349));(er&30)!==0||Oc(r,t,a)}o.memoizedState=a;var n={value:a,getSnapshot:t};return o.queue=n,sf(Uc.bind(null,r,n,e),[e]),r.flags|=2048,Go(9,zc.bind(null,r,n,a,t),void 0,null),a},useId:function(){var e=Ht(),t=Be.identifierPrefix;if(ye){var a=ea,r=Jt;a=(r&~(1<<32-Dt(r)-1)).toString(32)+a,t=":"+t+"R"+a,a=Vo++,0<a&&(t+="H"+a.toString(32)),t+=":"}else a=Ih++,t=":"+t+"r"+a.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ph={readContext:Lt,useCallback:Gc,useContext:Lt,useEffect:gi,useImperativeHandle:$c,useInsertionEffect:qc,useLayoutEffect:Wc,useMemo:jc,useReducer:_u,useRef:_c,useState:function(){return _u($o)},useDebugValue:hi,useDeferredValue:function(e){var t=yt();return Kc(t,Ae.memoizedState,e)},useTransition:function(){var e=_u($o)[0],t=yt().memoizedState;return[e,t]},useMutableSource:Ec,useSyncExternalStore:Bc,useId:Xc,unstable_isNewReconciler:!1},Th={readContext:Lt,useCallback:Gc,useContext:Lt,useEffect:gi,useImperativeHandle:$c,useInsertionEffect:qc,useLayoutEffect:Wc,useMemo:jc,useReducer:qu,useRef:_c,useState:function(){return qu($o)},useDebugValue:hi,useDeferredValue:function(e){var t=yt();return Ae===null?t.memoizedState=e:Kc(t,Ae.memoizedState,e)},useTransition:function(){var e=qu($o)[0],t=yt().memoizedState;return[e,t]},useMutableSource:Ec,useSyncExternalStore:Bc,useId:Xc,unstable_isNewReconciler:!1};function Pt(e,t){if(e&&e.defaultProps){t=ke({},t),e=e.defaultProps;for(var a in e)t[a]===void 0&&(t[a]=e[a]);return t}return t}function Cs(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:ke({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Nl={isMounted:function(e){return(e=e._reactInternals)?or(e)===e:!1},enqueueSetState:function(e,t,a){e=e._reactInternals;var r=Xe(),o=wa(e),n=ta(r,o);n.payload=t,a!=null&&(n.callback=a),t=Ia(e,n,o),t!==null&&(At(t,e,o,r),tl(t,e,o))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=Xe(),o=wa(e),n=ta(r,o);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=Ia(e,n,o),t!==null&&(At(t,e,o,r),tl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Xe(),r=wa(e),o=ta(a,r);o.tag=2,t!=null&&(o.callback=t),t=Ia(e,o,r),t!==null&&(At(t,e,r,a),tl(t,e,r))}};function df(e,t,a,r,o,n,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,n,l):t.prototype&&t.prototype.isPureReactComponent?!Uo(a,r)||!Uo(o,n):!0}function Jc(e,t,a){var r=!1,o=Pa,n=t.contextType;return typeof n=="object"&&n!==null?n=Lt(n):(o=rt(t)?Za:Ve.current,r=t.contextTypes,n=(r=r!=null)?Nr(e,o):Pa),t=new t(a,n),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Nl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=n),t}function ff(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&Nl.enqueueReplaceState(t,t.state,null)}function ws(e,t,a,r){var o=e.stateNode;o.props=a,o.state=e.memoizedState,o.refs={},si(e);var n=t.contextType;typeof n=="object"&&n!==null?o.context=Lt(n):(n=rt(t)?Za:Ve.current,o.context=Nr(e,n)),o.state=e.memoizedState,n=t.getDerivedStateFromProps,typeof n=="function"&&(Cs(e,t,n,a),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Nl.enqueueReplaceState(o,o.state,null),Cl(e,a,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Wr(e,t){try{var a="",r=t;do a+=og(r),r=r.return;while(r);var o=a}catch(n){o=`\nError generating stack: `+n.message+`\n`+n.stack}return{value:e,source:t,stack:o,digest:null}}function Wu(e,t,a){return{value:e,source:null,stack:a??null,digest:t??null}}function ks(e,t){try{console.error(t.value)}catch(a){setTimeout(function(){throw a})}}var Rh=typeof WeakMap=="function"?WeakMap:Map;function ep(e,t,a){a=ta(-1,a),a.tag=3,a.payload={element:null};var r=t.value;return a.callback=function(){Tl||(Tl=!0,Bs=r),ks(e,t)},a}function tp(e,t,a){a=ta(-1,a),a.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;a.payload=function(){return r(o)},a.callback=function(){ks(e,t)}}var n=e.stateNode;return n!==null&&typeof n.componentDidCatch=="function"&&(a.callback=function(){ks(e,t),typeof r!="function"&&(Ca===null?Ca=new Set([this]):Ca.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),a}function cf(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new Rh;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(a)||(o.add(a),e=Wh.bind(null,e,t,a),t.then(e,e))}function pf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function mf(e,t,a,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(t=ta(-1,1),t.tag=2,Ia(a,t,1))),a.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Dh=la.ReactCurrentOwner,tt=!1;function Ke(e,t,a,r){t.child=e===null?Dc(t,null,a,r):_r(t,e.child,a,r)}function gf(e,t,a,r,o){a=a.render;var n=t.ref;return Or(t,o),r=pi(e,t,a,r,n,o),a=mi(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,na(e,t,o)):(ye&&a&&ti(t),t.flags|=1,Ke(e,t,r,o),t.child)}function hf(e,t,a,r,o){if(e===null){var n=a.type;return typeof n=="function"&&!wi(n)&&n.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(t.tag=15,t.type=n,ap(e,t,n,r,o)):(e=ul(a.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,(e.lanes&o)===0){var l=n.memoizedProps;if(a=a.compare,a=a!==null?a:Uo,a(l,r)&&e.ref===t.ref)return na(e,t,o)}return t.flags|=1,e=ka(n,r),e.ref=t.ref,e.return=t,t.child=e}function ap(e,t,a,r,o){if(e!==null){var n=e.memoizedProps;if(Uo(n,r)&&e.ref===t.ref)if(tt=!1,t.pendingProps=r=n,(e.lanes&o)!==0)(e.flags&131072)!==0&&(tt=!0);else return t.lanes=e.lanes,na(e,t,o)}return bs(e,t,a,r,o)}function rp(e,t,a){var r=t.pendingProps,o=r.children,n=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(Ar,ut),ut|=a;else{if((a&1073741824)===0)return e=n!==null?n.baseLanes|a:a,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(Ar,ut),ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=n!==null?n.baseLanes:a,ge(Ar,ut),ut|=r}else n!==null?(r=n.baseLanes|a,t.memoizedState=null):r=a,ge(Ar,ut),ut|=r;return Ke(e,t,o,a),t.child}function op(e,t){var a=t.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(t.flags|=512,t.flags|=2097152)}function bs(e,t,a,r,o){var n=rt(a)?Za:Ve.current;return n=Nr(t,n),Or(t,o),a=pi(e,t,a,r,n,o),r=mi(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,na(e,t,o)):(ye&&r&&ti(t),t.flags|=1,Ke(e,t,a,o),t.child)}function xf(e,t,a,r,o){if(rt(a)){var n=!0;vl(t)}else n=!1;if(Or(t,o),t.stateNode===null)ol(e,t),Jc(t,a,r),ws(t,a,r,o),r=!0;else if(e===null){var l=t.stateNode,u=t.memoizedProps;l.props=u;var s=l.context,f=a.contextType;typeof f=="object"&&f!==null?f=Lt(f):(f=rt(a)?Za:Ve.current,f=Nr(t,f));var g=a.getDerivedStateFromProps,h=typeof g=="function"||typeof l.getSnapshotBeforeUpdate=="function";h||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==r||s!==f)&&ff(t,l,r,f),pa=!1;var p=t.memoizedState;l.state=p,Cl(t,r,l,o),s=t.memoizedState,u!==r||p!==s||at.current||pa?(typeof g=="function"&&(Cs(t,a,g,r),s=t.memoizedState),(u=pa||df(t,a,u,r,p,s,f))?(h||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),l.props=r,l.state=s,l.context=f,r=u):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Mc(e,t),u=t.memoizedProps,f=t.type===t.elementType?u:Pt(t.type,u),l.props=f,h=t.pendingProps,p=l.context,s=a.contextType,typeof s=="object"&&s!==null?s=Lt(s):(s=rt(a)?Za:Ve.current,s=Nr(t,s));var L=a.getDerivedStateFromProps;(g=typeof L=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==h||p!==s)&&ff(t,l,r,s),pa=!1,p=t.memoizedState,l.state=p,Cl(t,r,l,o);var v=t.memoizedState;u!==h||p!==v||at.current||pa?(typeof L=="function"&&(Cs(t,a,L,r),v=t.memoizedState),(f=pa||df(t,a,f,r,p,v,s)||!1)?(g||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,v,s),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,v,s)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),l.props=r,l.state=v,l.context=s,r=f):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ps(e,t,a,r,n,o)}function Ps(e,t,a,r,o,n){op(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return o&&tf(t,a,!1),na(e,t,n);r=t.stateNode,Dh.current=t;var u=l&&typeof a.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=_r(t,e.child,null,n),t.child=_r(t,null,u,n)):Ke(e,t,u,n),t.memoizedState=r.state,o&&tf(t,a,!0),t.child}function np(e){var t=e.stateNode;t.pendingContext?ef(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ef(e,t.context,!1),ii(e,t.containerInfo)}function vf(e,t,a,r,o){return Hr(),ri(o),t.flags|=256,Ke(e,t,a,r),t.child}var Ts={dehydrated:null,treeContext:null,retryLane:0};function Rs(e){return{baseLanes:e,cachePool:null,transitions:null}}function lp(e,t,a){var r=t.pendingProps,o=Ce.current,n=!1,l=(t.flags&128)!==0,u;if((u=l)||(u=e!==null&&e.memoizedState===null?!1:(o&2)!==0),u?(n=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ge(Ce,o&1),e===null)return Ss(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(l=r.children,e=r.fallback,n?(r=t.mode,n=t.child,l={mode:"hidden",children:l},(r&1)===0&&n!==null?(n.childLanes=0,n.pendingProps=l):n=ql(l,r,0,null),e=Ya(e,r,a,null),n.return=t,e.return=t,n.sibling=e,t.child=n,t.child.memoizedState=Rs(a),t.memoizedState=Ts,e):xi(t,l));if(o=e.memoizedState,o!==null&&(u=o.dehydrated,u!==null))return Ah(e,t,l,r,u,o,a);if(n){n=r.fallback,l=t.mode,o=e.child,u=o.sibling;var s={mode:"hidden",children:r.children};return(l&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=ka(o,s),r.subtreeFlags=o.subtreeFlags&14680064),u!==null?n=ka(u,n):(n=Ya(n,l,a,null),n.flags|=2),n.return=t,r.return=t,r.sibling=n,t.child=r,r=n,n=t.child,l=e.child.memoizedState,l=l===null?Rs(a):{baseLanes:l.baseLanes|a,cachePool:null,transitions:l.transitions},n.memoizedState=l,n.childLanes=e.childLanes&~a,t.memoizedState=Ts,r}return n=e.child,e=n.sibling,r=ka(n,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=a),r.return=t,r.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=r,t.memoizedState=null,r}function xi(e,t){return t=ql({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Xn(e,t,a,r){return r!==null&&ri(r),_r(t,e.child,null,a),e=xi(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ah(e,t,a,r,o,n,l){if(a)return t.flags&256?(t.flags&=-257,r=Wu(Error(w(422))),Xn(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(n=r.fallback,o=t.mode,r=ql({mode:"visible",children:r.children},o,0,null),n=Ya(n,o,l,null),n.flags|=2,r.return=t,n.return=t,r.sibling=n,t.child=r,(t.mode&1)!==0&&_r(t,e.child,null,l),t.child.memoizedState=Rs(l),t.memoizedState=Ts,n);if((t.mode&1)===0)return Xn(e,t,l,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var u=r.dgst;return r=u,n=Error(w(419)),r=Wu(n,r,void 0),Xn(e,t,l,r)}if(u=(l&e.childLanes)!==0,tt||u){if(r=Be,r!==null){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|l))!==0?0:o,o!==0&&o!==n.retryLane&&(n.retryLane=o,oa(e,o),At(r,e,o,-1))}return Ci(),r=Wu(Error(w(421))),Xn(e,t,l,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Vh.bind(null,e),o._reactRetry=t,null):(e=n.treeContext,st=Sa(o.nextSibling),it=t,ye=!0,Rt=null,e!==null&&(gt[ht++]=Jt,gt[ht++]=ea,gt[ht++]=Ja,Jt=e.id,ea=e.overflow,Ja=t),t=xi(t,r.children),t.flags|=4096,t)}function Lf(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Is(e.return,t,a)}function Vu(e,t,a,r,o){var n=e.memoizedState;n===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:o}:(n.isBackwards=t,n.rendering=null,n.renderingStartTime=0,n.last=r,n.tail=a,n.tailMode=o)}function up(e,t,a){var r=t.pendingProps,o=r.revealOrder,n=r.tail;if(Ke(e,t,r.children,a),r=Ce.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lf(e,a,t);else if(e.tag===19)Lf(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ge(Ce,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&wl(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Vu(t,!1,o,a,n);break;case"backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&wl(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Vu(t,!0,a,null,n);break;case"together":Vu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ol(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function na(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),tr|=t.lanes,(a&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(w(153));if(t.child!==null){for(e=t.child,a=ka(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ka(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Mh(e,t,a){switch(t.tag){case 3:np(t),Hr();break;case 5:Fc(t);break;case 1:rt(t.type)&&vl(t);break;case 4:ii(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ge(Sl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(Ce,Ce.current&1),t.flags|=128,null):(a&t.child.childLanes)!==0?lp(e,t,a):(ge(Ce,Ce.current&1),e=na(e,t,a),e!==null?e.sibling:null);ge(Ce,Ce.current&1);break;case 19:if(r=(a&t.childLanes)!==0,(e.flags&128)!==0){if(r)return up(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ge(Ce,Ce.current),r)break;return null;case 22:case 23:return t.lanes=0,rp(e,t,a)}return na(e,t,a)}var sp,Ds,ip,dp;sp=function(e,t){for(var a=t.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}};Ds=function(){};ip=function(e,t,a,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Xa(Wt.current);var n=null;switch(a){case"input":o=Zu(e,o),r=Zu(e,r),n=[];break;case"select":o=ke({},o,{value:void 0}),r=ke({},r,{value:void 0}),n=[];break;case"textarea":o=ts(e,o),r=ts(e,r),n=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hl)}rs(a,r);var l;a=null;for(f in o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&o[f]!=null)if(f==="style"){var u=o[f];for(l in u)u.hasOwnProperty(l)&&(a||(a={}),a[l]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Ao.hasOwnProperty(f)?n||(n=[]):(n=n||[]).push(f,null));for(f in r){var s=r[f];if(u=o!=null?o[f]:void 0,r.hasOwnProperty(f)&&s!==u&&(s!=null||u!=null))if(f==="style")if(u){for(l in u)!u.hasOwnProperty(l)||s&&s.hasOwnProperty(l)||(a||(a={}),a[l]="");for(l in s)s.hasOwnProperty(l)&&u[l]!==s[l]&&(a||(a={}),a[l]=s[l])}else a||(n||(n=[]),n.push(f,a)),a=s;else f==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(n=n||[]).push(f,s)):f==="children"?typeof s!="string"&&typeof s!="number"||(n=n||[]).push(f,""+s):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(Ao.hasOwnProperty(f)?(s!=null&&f==="onScroll"&&ve("scroll",e),n||u===s||(n=[])):(n=n||[]).push(f,s))}a&&(n=n||[]).push("style",a);var f=n;(t.updateQueue=f)&&(t.flags|=4)}};dp=function(e,t,a,r){a!==r&&(t.flags|=4)};function go(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function Fh(e,t,a){var r=t.pendingProps;switch(ai(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return rt(t.type)&&xl(),qe(t),null;case 3:return r=t.stateNode,qr(),Le(at),Le(Ve),fi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(jn(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Rt!==null&&(Us(Rt),Rt=null))),Ds(e,t),qe(t),null;case 5:di(t);var o=Xa(Wo.current);if(a=t.type,e!==null&&t.stateNode!=null)ip(e,t,a,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(w(166));return qe(t),null}if(e=Xa(Wt.current),jn(t)){r=t.stateNode,a=t.type;var n=t.memoizedProps;switch(r[_t]=t,r[_o]=n,e=(t.mode&1)!==0,a){case"dialog":ve("cancel",r),ve("close",r);break;case"iframe":case"object":case"embed":ve("load",r);break;case"video":case"audio":for(o=0;o<So.length;o++)ve(So[o],r);break;case"source":ve("error",r);break;case"img":case"image":case"link":ve("error",r),ve("load",r);break;case"details":ve("toggle",r);break;case"input":bd(r,n),ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!n.multiple},ve("invalid",r);break;case"textarea":Td(r,n),ve("invalid",r)}rs(a,n),o=null;for(var l in n)if(n.hasOwnProperty(l)){var u=n[l];l==="children"?typeof u=="string"?r.textContent!==u&&(n.suppressHydrationWarning!==!0&&Gn(r.textContent,u,e),o=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(n.suppressHydrationWarning!==!0&&Gn(r.textContent,u,e),o=["children",""+u]):Ao.hasOwnProperty(l)&&u!=null&&l==="onScroll"&&ve("scroll",r)}switch(a){case"input":En(r),Pd(r,n,!0);break;case"textarea":En(r),Rd(r);break;case"select":case"option":break;default:typeof n.onClick=="function"&&(r.onclick=hl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Uf(a)),e==="http://www.w3.org/1999/xhtml"?a==="script"?(e=l.createElement("div"),e.innerHTML="<script><\\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(a,{is:r.is}):(e=l.createElement(a),a==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,a),e[_t]=t,e[_o]=r,sp(e,t,!1,!1),t.stateNode=e;e:{switch(l=os(a,r),a){case"dialog":ve("cancel",e),ve("close",e),o=r;break;case"iframe":case"object":case"embed":ve("load",e),o=r;break;case"video":case"audio":for(o=0;o<So.length;o++)ve(So[o],e);o=r;break;case"source":ve("error",e),o=r;break;case"img":case"image":case"link":ve("error",e),ve("load",e),o=r;break;case"details":ve("toggle",e),o=r;break;case"input":bd(e,r),o=Zu(e,r),ve("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ke({},r,{value:void 0}),ve("invalid",e);break;case"textarea":Td(e,r),o=ts(e,r),ve("invalid",e);break;default:o=r}rs(a,o),u=o;for(n in u)if(u.hasOwnProperty(n)){var s=u[n];n==="style"?_f(e,s):n==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Nf(e,s)):n==="children"?typeof s=="string"?(a!=="textarea"||s!=="")&&Mo(e,s):typeof s=="number"&&Mo(e,""+s):n!=="suppressContentEditableWarning"&&n!=="suppressHydrationWarning"&&n!=="autoFocus"&&(Ao.hasOwnProperty(n)?s!=null&&n==="onScroll"&&ve("scroll",e):s!=null&&_s(e,n,s,l))}switch(a){case"input":En(e),Pd(e,r,!1);break;case"textarea":En(e),Rd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ba(r.value));break;case"select":e.multiple=!!r.multiple,n=r.value,n!=null?Mr(e,!!r.multiple,n,!1):r.defaultValue!=null&&Mr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=hl)}switch(a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return qe(t),null;case 6:if(e&&t.stateNode!=null)dp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(w(166));if(a=Xa(Wo.current),Xa(Wt.current),jn(t)){if(r=t.stateNode,a=t.memoizedProps,r[_t]=t,(n=r.nodeValue!==a)&&(e=it,e!==null))switch(e.tag){case 3:Gn(r.nodeValue,a,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Gn(r.nodeValue,a,(e.mode&1)!==0)}n&&(t.flags|=4)}else r=(a.nodeType===9?a:a.ownerDocument).createTextNode(r),r[_t]=t,t.stateNode=r}return qe(t),null;case 13:if(Le(Ce),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ye&&st!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Tc(),Hr(),t.flags|=98560,n=!1;else if(n=jn(t),r!==null&&r.dehydrated!==null){if(e===null){if(!n)throw Error(w(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(w(317));n[_t]=t}else Hr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),n=!1}else Rt!==null&&(Us(Rt),Rt=null),n=!0;if(!n)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=a,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ce.current&1)!==0?Me===0&&(Me=3):Ci())),t.updateQueue!==null&&(t.flags|=4),qe(t),null);case 4:return qr(),Ds(e,t),e===null&&No(t.stateNode.containerInfo),qe(t),null;case 10:return li(t.type._context),qe(t),null;case 17:return rt(t.type)&&xl(),qe(t),null;case 19:if(Le(Ce),n=t.memoizedState,n===null)return qe(t),null;if(r=(t.flags&128)!==0,l=n.rendering,l===null)if(r)go(n,!1);else{if(Me!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(l=wl(e),l!==null){for(t.flags|=128,go(n,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=a,a=t.child;a!==null;)n=a,e=r,n.flags&=14680066,l=n.alternate,l===null?(n.childLanes=0,n.lanes=e,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,e=l.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return ge(Ce,Ce.current&1|2),t.child}e=e.sibling}n.tail!==null&&Pe()>Vr&&(t.flags|=128,r=!0,go(n,!1),t.lanes=4194304)}else{if(!r)if(e=wl(l),e!==null){if(t.flags|=128,r=!0,a=e.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),go(n,!0),n.tail===null&&n.tailMode==="hidden"&&!l.alternate&&!ye)return qe(t),null}else 2*Pe()-n.renderingStartTime>Vr&&a!==1073741824&&(t.flags|=128,r=!0,go(n,!1),t.lanes=4194304);n.isBackwards?(l.sibling=t.child,t.child=l):(a=n.last,a!==null?a.sibling=l:t.child=l,n.last=l)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=Pe(),t.sibling=null,a=Ce.current,ge(Ce,r?a&1|2:a&1),t):(qe(t),null);case 22:case 23:return Ii(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ut&1073741824)!==0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),null;case 24:return null;case 25:return null}throw Error(w(156,t.tag))}function Eh(e,t){switch(ai(t),t.tag){case 1:return rt(t.type)&&xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qr(),Le(at),Le(Ve),fi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return di(t),null;case 13:if(Le(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(w(340));Hr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Le(Ce),null;case 4:return qr(),null;case 10:return li(t.type._context),null;case 22:case 23:return Ii(),null;case 24:return null;default:return null}}var Qn=!1,We=!1,Bh=typeof WeakSet=="function"?WeakSet:Set,F=null;function Dr(e,t){var a=e.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(r){be(e,t,r)}else a.current=null}function As(e,t,a){try{a()}catch(r){be(e,t,r)}}var yf=!1;function Oh(e,t){if(ms=pl,e=gc(),ei(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var o=r.anchorOffset,n=r.focusNode;r=r.focusOffset;try{a.nodeType,n.nodeType}catch{a=null;break e}var l=0,u=-1,s=-1,f=0,g=0,h=e,p=null;t:for(;;){for(var L;h!==a||o!==0&&h.nodeType!==3||(u=l+o),h!==n||r!==0&&h.nodeType!==3||(s=l+r),h.nodeType===3&&(l+=h.nodeValue.length),(L=h.firstChild)!==null;)p=h,h=L;for(;;){if(h===e)break t;if(p===a&&++f===o&&(u=l),p===n&&++g===r&&(s=l),(L=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=L}a=u===-1||s===-1?null:{start:u,end:s}}else a=null}a=a||{start:0,end:0}}else a=null;for(gs={focusedElem:e,selectionRange:a},pl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,M=v.memoizedState,c=t.stateNode,d=c.getSnapshotBeforeUpdate(t.elementType===t.type?y:Pt(t.type,y),M);c.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var i=t.stateNode.containerInfo;i.nodeType===1?i.textContent="":i.nodeType===9&&i.documentElement&&i.removeChild(i.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(w(163))}}catch(m){be(t,t.return,m)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return v=yf,yf=!1,v}function To(e,t,a){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var n=o.destroy;o.destroy=void 0,n!==void 0&&As(t,a,n)}o=o.next}while(o!==r)}}function Hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var a=t=t.next;do{if((a.tag&e)===e){var r=a.create;a.destroy=r()}a=a.next}while(a!==t)}}function Ms(e){var t=e.ref;if(t!==null){var a=e.stateNode;switch(e.tag){case 5:e=a;break;default:e=a}typeof t=="function"?t(e):t.current=e}}function fp(e){var t=e.alternate;t!==null&&(e.alternate=null,fp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_t],delete t[_o],delete t[vs],delete t[vh],delete t[Lh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cp(e){return e.tag===5||e.tag===3||e.tag===4}function Sf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fs(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.nodeType===8?a.parentNode.insertBefore(e,t):a.insertBefore(e,t):(a.nodeType===8?(t=a.parentNode,t.insertBefore(e,a)):(t=a,t.appendChild(e)),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=hl));else if(r!==4&&(e=e.child,e!==null))for(Fs(e,t,a),e=e.sibling;e!==null;)Fs(e,t,a),e=e.sibling}function Es(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Es(e,t,a),e=e.sibling;e!==null;)Es(e,t,a),e=e.sibling}var Oe=null,Tt=!1;function fa(e,t,a){for(a=a.child;a!==null;)pp(e,t,a),a=a.sibling}function pp(e,t,a){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(Ml,a)}catch{}switch(a.tag){case 5:We||Dr(a,t);case 6:var r=Oe,o=Tt;Oe=null,fa(e,t,a),Oe=r,Tt=o,Oe!==null&&(Tt?(e=Oe,a=a.stateNode,e.nodeType===8?e.parentNode.removeChild(a):e.removeChild(a)):Oe.removeChild(a.stateNode));break;case 18:Oe!==null&&(Tt?(e=Oe,a=a.stateNode,e.nodeType===8?zu(e.parentNode,a):e.nodeType===1&&zu(e,a),Oo(e)):zu(Oe,a.stateNode));break;case 4:r=Oe,o=Tt,Oe=a.stateNode.containerInfo,Tt=!0,fa(e,t,a),Oe=r,Tt=o;break;case 0:case 11:case 14:case 15:if(!We&&(r=a.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var n=o,l=n.destroy;n=n.tag,l!==void 0&&((n&2)!==0||(n&4)!==0)&&As(a,t,l),o=o.next}while(o!==r)}fa(e,t,a);break;case 1:if(!We&&(Dr(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=a.memoizedProps,r.state=a.memoizedState,r.componentWillUnmount()}catch(u){be(a,t,u)}fa(e,t,a);break;case 21:fa(e,t,a);break;case 22:a.mode&1?(We=(r=We)||a.memoizedState!==null,fa(e,t,a),We=r):fa(e,t,a);break;default:fa(e,t,a)}}function If(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new Bh),t.forEach(function(r){var o=$h.bind(null,e,r);a.has(r)||(a.add(r),r.then(o,o))})}}function bt(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var o=a[r];try{var n=e,l=t,u=l;e:for(;u!==null;){switch(u.tag){case 5:Oe=u.stateNode,Tt=!1;break e;case 3:Oe=u.stateNode.containerInfo,Tt=!0;break e;case 4:Oe=u.stateNode.containerInfo,Tt=!0;break e}u=u.return}if(Oe===null)throw Error(w(160));pp(n,l,o),Oe=null,Tt=!1;var s=o.alternate;s!==null&&(s.return=null),o.return=null}catch(f){be(o,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)mp(t,e),t=t.sibling}function mp(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bt(t,e),Nt(e),r&4){try{To(3,e,e.return),Hl(3,e)}catch(y){be(e,e.return,y)}try{To(5,e,e.return)}catch(y){be(e,e.return,y)}}break;case 1:bt(t,e),Nt(e),r&512&&a!==null&&Dr(a,a.return);break;case 5:if(bt(t,e),Nt(e),r&512&&a!==null&&Dr(a,a.return),e.flags&32){var o=e.stateNode;try{Mo(o,"")}catch(y){be(e,e.return,y)}}if(r&4&&(o=e.stateNode,o!=null)){var n=e.memoizedProps,l=a!==null?a.memoizedProps:n,u=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{u==="input"&&n.type==="radio"&&n.name!=null&&Of(o,n),os(u,l);var f=os(u,n);for(l=0;l<s.length;l+=2){var g=s[l],h=s[l+1];g==="style"?_f(o,h):g==="dangerouslySetInnerHTML"?Nf(o,h):g==="children"?Mo(o,h):_s(o,g,h,f)}switch(u){case"input":Ju(o,n);break;case"textarea":zf(o,n);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!n.multiple;var L=n.value;L!=null?Mr(o,!!n.multiple,L,!1):p!==!!n.multiple&&(n.defaultValue!=null?Mr(o,!!n.multiple,n.defaultValue,!0):Mr(o,!!n.multiple,n.multiple?[]:"",!1))}o[_o]=n}catch(y){be(e,e.return,y)}}break;case 6:if(bt(t,e),Nt(e),r&4){if(e.stateNode===null)throw Error(w(162));o=e.stateNode,n=e.memoizedProps;try{o.nodeValue=n}catch(y){be(e,e.return,y)}}break;case 3:if(bt(t,e),Nt(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Oo(t.containerInfo)}catch(y){be(e,e.return,y)}break;case 4:bt(t,e),Nt(e);break;case 13:bt(t,e),Nt(e),o=e.child,o.flags&8192&&(n=o.memoizedState!==null,o.stateNode.isHidden=n,!n||o.alternate!==null&&o.alternate.memoizedState!==null||(yi=Pe())),r&4&&If(e);break;case 22:if(g=a!==null&&a.memoizedState!==null,e.mode&1?(We=(f=We)||g,bt(t,e),We=f):bt(t,e),Nt(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!g&&(e.mode&1)!==0)for(F=e,g=e.child;g!==null;){for(h=F=g;F!==null;){switch(p=F,L=p.child,p.tag){case 0:case 11:case 14:case 15:To(4,p,p.return);break;case 1:Dr(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,a=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){be(r,a,y)}}break;case 5:Dr(p,p.return);break;case 22:if(p.memoizedState!==null){wf(h);continue}}L!==null?(L.return=p,F=L):wf(h)}g=g.sibling}e:for(g=null,h=e;;){if(h.tag===5){if(g===null){g=h;try{o=h.stateNode,f?(n=o.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"):(u=h.stateNode,s=h.memoizedProps.style,l=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=Hf("display",l))}catch(y){be(e,e.return,y)}}}else if(h.tag===6){if(g===null)try{h.stateNode.nodeValue=f?"":h.memoizedProps}catch(y){be(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;g===h&&(g=null),h=h.return}g===h&&(g=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:bt(t,e),Nt(e),r&4&&If(e);break;case 21:break;default:bt(t,e),Nt(e)}}function Nt(e){var t=e.flags;if(t&2){try{e:{for(var a=e.return;a!==null;){if(cp(a)){var r=a;break e}a=a.return}throw Error(w(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Mo(o,""),r.flags&=-33);var n=Sf(e);Es(e,n,o);break;case 3:case 4:var l=r.stateNode.containerInfo,u=Sf(e);Fs(e,u,l);break;default:throw Error(w(161))}}catch(s){be(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zh(e,t,a){F=e,gp(e,t,a)}function gp(e,t,a){for(var r=(e.mode&1)!==0;F!==null;){var o=F,n=o.child;if(o.tag===22&&r){var l=o.memoizedState!==null||Qn;if(!l){var u=o.alternate,s=u!==null&&u.memoizedState!==null||We;u=Qn;var f=We;if(Qn=l,(We=s)&&!f)for(F=o;F!==null;)l=F,s=l.child,l.tag===22&&l.memoizedState!==null?kf(o):s!==null?(s.return=l,F=s):kf(o);for(;n!==null;)F=n,gp(n,t,a),n=n.sibling;F=o,Qn=u,We=f}Cf(e,t,a)}else(o.subtreeFlags&8772)!==0&&n!==null?(n.return=o,F=n):Cf(e,t,a)}}function Cf(e){for(;F!==null;){var t=F;if((t.flags&8772)!==0){var a=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:We||Hl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!We)if(a===null)r.componentDidMount();else{var o=t.elementType===t.type?a.memoizedProps:Pt(t.type,a.memoizedProps);r.componentDidUpdate(o,a.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var n=t.updateQueue;n!==null&&lf(t,n,r);break;case 3:var l=t.updateQueue;if(l!==null){if(a=null,t.child!==null)switch(t.child.tag){case 5:a=t.child.stateNode;break;case 1:a=t.child.stateNode}lf(t,l,a)}break;case 5:var u=t.stateNode;if(a===null&&t.flags&4){a=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&a.focus();break;case"img":s.src&&(a.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var g=f.memoizedState;if(g!==null){var h=g.dehydrated;h!==null&&Oo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(w(163))}We||t.flags&512&&Ms(t)}catch(p){be(t,t.return,p)}}if(t===e){F=null;break}if(a=t.sibling,a!==null){a.return=t.return,F=a;break}F=t.return}}function wf(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}function kf(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var a=t.return;try{Hl(4,t)}catch(s){be(t,a,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(s){be(t,o,s)}}var n=t.return;try{Ms(t)}catch(s){be(t,n,s)}break;case 5:var l=t.return;try{Ms(t)}catch(s){be(t,l,s)}}}catch(s){be(t,t.return,s)}if(t===e){F=null;break}var u=t.sibling;if(u!==null){u.return=t.return,F=u;break}F=t.return}}var Uh=Math.ceil,Pl=la.ReactCurrentDispatcher,vi=la.ReactCurrentOwner,vt=la.ReactCurrentBatchConfig,ae=0,Be=null,Te=null,ze=0,ut=0,Ar=Ra(0),Me=0,jo=null,tr=0,_l=0,Li=0,Ro=null,et=null,yi=0,Vr=1/0,Yt=null,Tl=!1,Bs=null,Ca=null,Yn=!1,xa=null,Rl=0,Do=0,Os=null,nl=-1,ll=0;function Xe(){return(ae&6)!==0?Pe():nl!==-1?nl:nl=Pe()}function wa(e){return(e.mode&1)===0?1:(ae&2)!==0&&ze!==0?ze&-ze:Sh.transition!==null?(ll===0&&(ll=Jf()),ll):(e=ie,e!==0||(e=window.event,e=e===void 0?16:lc(e.type)),e)}function At(e,t,a,r){if(50<Do)throw Do=0,Os=null,Error(w(185));Ko(e,a,r),((ae&2)===0||e!==Be)&&(e===Be&&((ae&2)===0&&(_l|=a),Me===4&&ga(e,ze)),ot(e,r),a===1&&ae===0&&(t.mode&1)===0&&(Vr=Pe()+500,zl&&Da()))}function ot(e,t){var a=e.callbackNode;Cg(e,t);var r=cl(e,e===Be?ze:0);if(r===0)a!==null&&Md(a),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(a!=null&&Md(a),t===1)e.tag===0?yh(bf.bind(null,e)):kc(bf.bind(null,e)),hh(function(){(ae&6)===0&&Da()}),a=null;else{switch(ec(r)){case 1:a=Gs;break;case 4:a=Yf;break;case 16:a=fl;break;case 536870912:a=Zf;break;default:a=fl}a=Cp(a,hp.bind(null,e))}e.callbackPriority=t,e.callbackNode=a}}function hp(e,t){if(nl=-1,ll=0,(ae&6)!==0)throw Error(w(327));var a=e.callbackNode;if(zr()&&e.callbackNode!==a)return null;var r=cl(e,e===Be?ze:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Dl(e,r);else{t=r;var o=ae;ae|=2;var n=vp();(Be!==e||ze!==t)&&(Yt=null,Vr=Pe()+500,Qa(e,t));do try{_h();break}catch(u){xp(e,u)}while(!0);ni(),Pl.current=n,ae=o,Te!==null?t=0:(Be=null,ze=0,t=Me)}if(t!==0){if(t===2&&(o=is(e),o!==0&&(r=o,t=zs(e,o))),t===1)throw a=jo,Qa(e,0),ga(e,r),ot(e,Pe()),a;if(t===6)ga(e,r);else{if(o=e.current.alternate,(r&30)===0&&!Nh(o)&&(t=Dl(e,r),t===2&&(n=is(e),n!==0&&(r=n,t=zs(e,n))),t===1))throw a=jo,Qa(e,0),ga(e,r),ot(e,Pe()),a;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(w(345));case 2:Ga(e,et,Yt);break;case 3:if(ga(e,r),(r&130023424)===r&&(t=yi+500-Pe(),10<t)){if(cl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Xe(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=xs(Ga.bind(null,e,et,Yt),t);break}Ga(e,et,Yt);break;case 4:if(ga(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-Dt(r);n=1<<l,l=t[l],l>o&&(o=l),r&=~n}if(r=o,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Uh(r/1960))-r,10<r){e.timeoutHandle=xs(Ga.bind(null,e,et,Yt),r);break}Ga(e,et,Yt);break;case 5:Ga(e,et,Yt);break;default:throw Error(w(329))}}}return ot(e,Pe()),e.callbackNode===a?hp.bind(null,e):null}function zs(e,t){var a=Ro;return e.current.memoizedState.isDehydrated&&(Qa(e,t).flags|=256),e=Dl(e,t),e!==2&&(t=et,et=a,t!==null&&Us(t)),e}function Us(e){et===null?et=e:et.push.apply(et,e)}function Nh(e){for(var t=e;;){if(t.flags&16384){var a=t.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var r=0;r<a.length;r++){var o=a[r],n=o.getSnapshot;o=o.value;try{if(!Mt(n(),o))return!1}catch{return!1}}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ga(e,t){for(t&=~Li,t&=~_l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var a=31-Dt(t),r=1<<a;e[a]=-1,t&=~r}}function bf(e){if((ae&6)!==0)throw Error(w(327));zr();var t=cl(e,0);if((t&1)===0)return ot(e,Pe()),null;var a=Dl(e,t);if(e.tag!==0&&a===2){var r=is(e);r!==0&&(t=r,a=zs(e,r))}if(a===1)throw a=jo,Qa(e,0),ga(e,t),ot(e,Pe()),a;if(a===6)throw Error(w(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ga(e,et,Yt),ot(e,Pe()),null}function Si(e,t){var a=ae;ae|=1;try{return e(t)}finally{ae=a,ae===0&&(Vr=Pe()+500,zl&&Da())}}function ar(e){xa!==null&&xa.tag===0&&(ae&6)===0&&zr();var t=ae;ae|=1;var a=vt.transition,r=ie;try{if(vt.transition=null,ie=1,e)return e()}finally{ie=r,vt.transition=a,ae=t,(ae&6)===0&&Da()}}function Ii(){ut=Ar.current,Le(Ar)}function Qa(e,t){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,gh(a)),Te!==null)for(a=Te.return;a!==null;){var r=a;switch(ai(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&xl();break;case 3:qr(),Le(at),Le(Ve),fi();break;case 5:di(r);break;case 4:qr();break;case 13:Le(Ce);break;case 19:Le(Ce);break;case 10:li(r.type._context);break;case 22:case 23:Ii()}a=a.return}if(Be=e,Te=e=ka(e.current,null),ze=ut=t,Me=0,jo=null,Li=_l=tr=0,et=Ro=null,Ka!==null){for(t=0;t<Ka.length;t++)if(a=Ka[t],r=a.interleaved,r!==null){a.interleaved=null;var o=r.next,n=a.pending;if(n!==null){var l=n.next;n.next=o,r.next=l}a.pending=r}Ka=null}return e}function xp(e,t){do{var a=Te;try{if(ni(),al.current=bl,kl){for(var r=we.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}kl=!1}if(er=0,Ee=Ae=we=null,Po=!1,Vo=0,vi.current=null,a===null||a.return===null){Me=1,jo=t,Te=null;break}e:{var n=e,l=a.return,u=a,s=t;if(t=ze,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var f=s,g=u,h=g.tag;if((g.mode&1)===0&&(h===0||h===11||h===15)){var p=g.alternate;p?(g.updateQueue=p.updateQueue,g.memoizedState=p.memoizedState,g.lanes=p.lanes):(g.updateQueue=null,g.memoizedState=null)}var L=pf(l);if(L!==null){L.flags&=-257,mf(L,l,u,n,t),L.mode&1&&cf(n,f,t),t=L,s=f;var v=t.updateQueue;if(v===null){var y=new Set;y.add(s),t.updateQueue=y}else v.add(s);break e}else{if((t&1)===0){cf(n,f,t),Ci();break e}s=Error(w(426))}}else if(ye&&u.mode&1){var M=pf(l);if(M!==null){(M.flags&65536)===0&&(M.flags|=256),mf(M,l,u,n,t),ri(Wr(s,u));break e}}n=s=Wr(s,u),Me!==4&&(Me=2),Ro===null?Ro=[n]:Ro.push(n),n=l;do{switch(n.tag){case 3:n.flags|=65536,t&=-t,n.lanes|=t;var c=ep(n,s,t);nf(n,c);break e;case 1:u=s;var d=n.type,i=n.stateNode;if((n.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ca===null||!Ca.has(i)))){n.flags|=65536,t&=-t,n.lanes|=t;var m=tp(n,u,t);nf(n,m);break e}}n=n.return}while(n!==null)}yp(a)}catch(C){t=C,Te===a&&a!==null&&(Te=a=a.return);continue}break}while(!0)}function vp(){var e=Pl.current;return Pl.current=bl,e===null?bl:e}function Ci(){(Me===0||Me===3||Me===2)&&(Me=4),Be===null||(tr&268435455)===0&&(_l&268435455)===0||ga(Be,ze)}function Dl(e,t){var a=ae;ae|=2;var r=vp();(Be!==e||ze!==t)&&(Yt=null,Qa(e,t));do try{Hh();break}catch(o){xp(e,o)}while(!0);if(ni(),ae=a,Pl.current=r,Te!==null)throw Error(w(261));return Be=null,ze=0,Me}function Hh(){for(;Te!==null;)Lp(Te)}function _h(){for(;Te!==null&&!mg();)Lp(Te)}function Lp(e){var t=Ip(e.alternate,e,ut);e.memoizedProps=e.pendingProps,t===null?yp(e):Te=t,vi.current=null}function yp(e){var t=e;do{var a=t.alternate;if(e=t.return,(t.flags&32768)===0){if(a=Fh(a,t,ut),a!==null){Te=a;return}}else{if(a=Eh(a,t),a!==null){a.flags&=32767,Te=a;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Te=null;return}}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);Me===0&&(Me=5)}function Ga(e,t,a){var r=ie,o=vt.transition;try{vt.transition=null,ie=1,qh(e,t,a,r)}finally{vt.transition=o,ie=r}return null}function qh(e,t,a,r){do zr();while(xa!==null);if((ae&6)!==0)throw Error(w(327));a=e.finishedWork;var o=e.finishedLanes;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(w(177));e.callbackNode=null,e.callbackPriority=0;var n=a.lanes|a.childLanes;if(wg(e,n),e===Be&&(Te=Be=null,ze=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Yn||(Yn=!0,Cp(fl,function(){return zr(),null})),n=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||n){n=vt.transition,vt.transition=null;var l=ie;ie=1;var u=ae;ae|=4,vi.current=null,Oh(e,a),mp(a,e),dh(gs),pl=!!ms,gs=ms=null,e.current=a,zh(a,e,o),gg(),ae=u,ie=l,vt.transition=n}else e.current=a;if(Yn&&(Yn=!1,xa=e,Rl=o),n=e.pendingLanes,n===0&&(Ca=null),vg(a.stateNode,r),ot(e,Pe()),t!==null)for(r=e.onRecoverableError,a=0;a<t.length;a++)o=t[a],r(o.value,{componentStack:o.stack,digest:o.digest});if(Tl)throw Tl=!1,e=Bs,Bs=null,e;return(Rl&1)!==0&&e.tag!==0&&zr(),n=e.pendingLanes,(n&1)!==0?e===Os?Do++:(Do=0,Os=e):Do=0,Da(),null}function zr(){if(xa!==null){var e=ec(Rl),t=vt.transition,a=ie;try{if(vt.transition=null,ie=16>e?16:e,xa===null)var r=!1;else{if(e=xa,xa=null,Rl=0,(ae&6)!==0)throw Error(w(331));var o=ae;for(ae|=4,F=e.current;F!==null;){var n=F,l=n.child;if((F.flags&16)!==0){var u=n.deletions;if(u!==null){for(var s=0;s<u.length;s++){var f=u[s];for(F=f;F!==null;){var g=F;switch(g.tag){case 0:case 11:case 15:To(8,g,n)}var h=g.child;if(h!==null)h.return=g,F=h;else for(;F!==null;){g=F;var p=g.sibling,L=g.return;if(fp(g),g===f){F=null;break}if(p!==null){p.return=L,F=p;break}F=L}}}var v=n.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var M=y.sibling;y.sibling=null,y=M}while(y!==null)}}F=n}}if((n.subtreeFlags&2064)!==0&&l!==null)l.return=n,F=l;else e:for(;F!==null;){if(n=F,(n.flags&2048)!==0)switch(n.tag){case 0:case 11:case 15:To(9,n,n.return)}var c=n.sibling;if(c!==null){c.return=n.return,F=c;break e}F=n.return}}var d=e.current;for(F=d;F!==null;){l=F;var i=l.child;if((l.subtreeFlags&2064)!==0&&i!==null)i.return=l,F=i;else e:for(l=d;F!==null;){if(u=F,(u.flags&2048)!==0)try{switch(u.tag){case 0:case 11:case 15:Hl(9,u)}}catch(C){be(u,u.return,C)}if(u===l){F=null;break e}var m=u.sibling;if(m!==null){m.return=u.return,F=m;break e}F=u.return}}if(ae=o,Da(),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(Ml,e)}catch{}r=!0}return r}finally{ie=a,vt.transition=t}}return!1}function Pf(e,t,a){t=Wr(a,t),t=ep(e,t,1),e=Ia(e,t,1),t=Xe(),e!==null&&(Ko(e,1,t),ot(e,t))}function be(e,t,a){if(e.tag===3)Pf(e,e,a);else for(;t!==null;){if(t.tag===3){Pf(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ca===null||!Ca.has(r))){e=Wr(a,e),e=tp(t,e,1),t=Ia(t,e,1),e=Xe(),t!==null&&(Ko(t,1,e),ot(t,e));break}}t=t.return}}function Wh(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),t=Xe(),e.pingedLanes|=e.suspendedLanes&a,Be===e&&(ze&a)===a&&(Me===4||Me===3&&(ze&130023424)===ze&&500>Pe()-yi?Qa(e,0):Li|=a),ot(e,t)}function Sp(e,t){t===0&&((e.mode&1)===0?t=1:(t=zn,zn<<=1,(zn&130023424)===0&&(zn=4194304)));var a=Xe();e=oa(e,t),e!==null&&(Ko(e,t,a),ot(e,a))}function Vh(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Sp(e,a)}function $h(e,t){var a=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(w(314))}r!==null&&r.delete(t),Sp(e,a)}var Ip;Ip=function(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps||at.current)tt=!0;else{if((e.lanes&a)===0&&(t.flags&128)===0)return tt=!1,Mh(e,t,a);tt=(e.flags&131072)!==0}else tt=!1,ye&&(t.flags&1048576)!==0&&bc(t,yl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ol(e,t),e=t.pendingProps;var o=Nr(t,Ve.current);Or(t,a),o=pi(null,t,r,e,o,a);var n=mi();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rt(r)?(n=!0,vl(t)):n=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,si(t),o.updater=Nl,t.stateNode=o,o._reactInternals=t,ws(t,r,e,a),t=Ps(null,t,r,!0,n,a)):(t.tag=0,ye&&n&&ti(t),Ke(null,t,o,a),t=t.child),t;case 16:r=t.elementType;e:{switch(ol(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=jh(r),e=Pt(r,e),o){case 0:t=bs(null,t,r,e,a);break e;case 1:t=xf(null,t,r,e,a);break e;case 11:t=gf(null,t,r,e,a);break e;case 14:t=hf(null,t,r,Pt(r.type,e),a);break e}throw Error(w(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),bs(e,t,r,o,a);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),xf(e,t,r,o,a);case 3:e:{if(np(t),e===null)throw Error(w(387));r=t.pendingProps,n=t.memoizedState,o=n.element,Mc(e,t),Cl(t,r,null,a);var l=t.memoizedState;if(r=l.element,n.isDehydrated)if(n={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){o=Wr(Error(w(423)),t),t=vf(e,t,r,a,o);break e}else if(r!==o){o=Wr(Error(w(424)),t),t=vf(e,t,r,a,o);break e}else for(st=Sa(t.stateNode.containerInfo.firstChild),it=t,ye=!0,Rt=null,a=Dc(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Hr(),r===o){t=na(e,t,a);break e}Ke(e,t,r,a)}t=t.child}return t;case 5:return Fc(t),e===null&&Ss(t),r=t.type,o=t.pendingProps,n=e!==null?e.memoizedProps:null,l=o.children,hs(r,o)?l=null:n!==null&&hs(r,n)&&(t.flags|=32),op(e,t),Ke(e,t,l,a),t.child;case 6:return e===null&&Ss(t),null;case 13:return lp(e,t,a);case 4:return ii(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_r(t,null,r,a):Ke(e,t,r,a),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),gf(e,t,r,o,a);case 7:return Ke(e,t,t.pendingProps,a),t.child;case 8:return Ke(e,t,t.pendingProps.children,a),t.child;case 12:return Ke(e,t,t.pendingProps.children,a),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,n=t.memoizedProps,l=o.value,ge(Sl,r._currentValue),r._currentValue=l,n!==null)if(Mt(n.value,l)){if(n.children===o.children&&!at.current){t=na(e,t,a);break e}}else for(n=t.child,n!==null&&(n.return=t);n!==null;){var u=n.dependencies;if(u!==null){l=n.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(n.tag===1){s=ta(-1,a&-a),s.tag=2;var f=n.updateQueue;if(f!==null){f=f.shared;var g=f.pending;g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s}}n.lanes|=a,s=n.alternate,s!==null&&(s.lanes|=a),Is(n.return,a,t),u.lanes|=a;break}s=s.next}}else if(n.tag===10)l=n.type===t.type?null:n.child;else if(n.tag===18){if(l=n.return,l===null)throw Error(w(341));l.lanes|=a,u=l.alternate,u!==null&&(u.lanes|=a),Is(l,a,t),l=n.sibling}else l=n.child;if(l!==null)l.return=n;else for(l=n;l!==null;){if(l===t){l=null;break}if(n=l.sibling,n!==null){n.return=l.return,l=n;break}l=l.return}n=l}Ke(e,t,o.children,a),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Or(t,a),o=Lt(o),r=r(o),t.flags|=1,Ke(e,t,r,a),t.child;case 14:return r=t.type,o=Pt(r,t.pendingProps),o=Pt(r.type,o),hf(e,t,r,o,a);case 15:return ap(e,t,t.type,t.pendingProps,a);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),ol(e,t),t.tag=1,rt(r)?(e=!0,vl(t)):e=!1,Or(t,a),Jc(t,r,o),ws(t,r,o,a),Ps(null,t,r,!0,e,a);case 19:return up(e,t,a);case 22:return rp(e,t,a)}throw Error(w(156,t.tag))};function Cp(e,t){return Qf(e,t)}function Gh(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,a,r){return new Gh(e,t,a,r)}function wi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jh(e){if(typeof e=="function")return wi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ws)return 11;if(e===Vs)return 14}return 2}function ka(e,t){var a=e.alternate;return a===null?(a=xt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&14680064,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function ul(e,t,a,r,o,n){var l=2;if(r=e,typeof e=="function")wi(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Sr:return Ya(a.children,o,n,t);case qs:l=8,o|=8;break;case Ku:return e=xt(12,a,t,o|2),e.elementType=Ku,e.lanes=n,e;case Xu:return e=xt(13,a,t,o),e.elementType=Xu,e.lanes=n,e;case Qu:return e=xt(19,a,t,o),e.elementType=Qu,e.lanes=n,e;case Ff:return ql(a,o,n,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Af:l=10;break e;case Mf:l=9;break e;case Ws:l=11;break e;case Vs:l=14;break e;case ca:l=16,r=null;break e}throw Error(w(130,e==null?e:typeof e,""))}return t=xt(l,a,t,o),t.elementType=e,t.type=r,t.lanes=n,t}function Ya(e,t,a,r){return e=xt(7,e,r,t),e.lanes=a,e}function ql(e,t,a,r){return e=xt(22,e,r,t),e.elementType=Ff,e.lanes=a,e.stateNode={isHidden:!1},e}function $u(e,t,a){return e=xt(6,e,null,t),e.lanes=a,e}function Gu(e,t,a){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kh(e,t,a,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ru(0),this.expirationTimes=Ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ru(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ki(e,t,a,r,o,n,l,u,s){return e=new Kh(e,t,a,u,s),t===1?(t=1,n===!0&&(t|=8)):t=0,n=xt(3,null,null,t),e.current=n,n.stateNode=e,n.memoizedState={element:r,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},si(n),e}function Xh(e,t,a){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:a}}function wp(e){if(!e)return Pa;e=e._reactInternals;e:{if(or(e)!==e||e.tag!==1)throw Error(w(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(rt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(w(171))}if(e.tag===1){var a=e.type;if(rt(a))return wc(e,a,t)}return t}function kp(e,t,a,r,o,n,l,u,s){return e=ki(a,r,!0,e,o,n,l,u,s),e.context=wp(null),a=e.current,r=Xe(),o=wa(a),n=ta(r,o),n.callback=t??null,Ia(a,n,o),e.current.lanes=o,Ko(e,o,r),ot(e,r),e}function Wl(e,t,a,r){var o=t.current,n=Xe(),l=wa(o);return a=wp(a),t.context===null?t.context=a:t.pendingContext=a,t=ta(n,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ia(o,t,l),e!==null&&(At(e,o,l,n),tl(e,o,l)),l}function Al(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Tf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function bi(e,t){Tf(e,t),(e=e.alternate)&&Tf(e,t)}function Qh(){return null}var bp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Pi(e){this._internalRoot=e}Vl.prototype.render=Pi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(w(409));Wl(e,t,null,null)};Vl.prototype.unmount=Pi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ar(function(){Wl(null,e,null,null)}),t[ra]=null}};function Vl(e){this._internalRoot=e}Vl.prototype.unstable_scheduleHydration=function(e){if(e){var t=rc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ma.length&&t!==0&&t<ma[a].priority;a++);ma.splice(a,0,e),a===0&&nc(e)}};function Ti(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Rf(){}function Yh(e,t,a,r,o){if(o){if(typeof r=="function"){var n=r;r=function(){var f=Al(l);n.call(f)}}var l=kp(t,r,e,0,null,!1,!1,"",Rf);return e._reactRootContainer=l,e[ra]=l.current,No(e.nodeType===8?e.parentNode:e),ar(),l}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var u=r;r=function(){var f=Al(s);u.call(f)}}var s=ki(e,0,!1,null,null,!1,!1,"",Rf);return e._reactRootContainer=s,e[ra]=s.current,No(e.nodeType===8?e.parentNode:e),ar(function(){Wl(t,s,a,r)}),s}function Gl(e,t,a,r,o){var n=a._reactRootContainer;if(n){var l=n;if(typeof o=="function"){var u=o;o=function(){var s=Al(l);u.call(s)}}Wl(t,l,e,o)}else l=Yh(a,t,e,o,r);return Al(l)}tc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var a=yo(t.pendingLanes);a!==0&&(js(t,a|1),ot(t,Pe()),(ae&6)===0&&(Vr=Pe()+500,Da()))}break;case 13:ar(function(){var r=oa(e,1);if(r!==null){var o=Xe();At(r,e,1,o)}}),bi(e,1)}};Ks=function(e){if(e.tag===13){var t=oa(e,134217728);if(t!==null){var a=Xe();At(t,e,134217728,a)}bi(e,134217728)}};ac=function(e){if(e.tag===13){var t=wa(e),a=oa(e,t);if(a!==null){var r=Xe();At(a,e,t,r)}bi(e,t)}};rc=function(){return ie};oc=function(e,t){var a=ie;try{return ie=e,t()}finally{ie=a}};ls=function(e,t,a){switch(t){case"input":if(Ju(e,a),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+t)+\'][type="radio"]\'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var o=Ol(r);if(!o)throw Error(w(90));Bf(r),Ju(r,o)}}}break;case"textarea":zf(e,a);break;case"select":t=a.value,t!=null&&Mr(e,!!a.multiple,t,!1)}};Vf=Si;$f=ar;var Zh={usingClientEntryPoint:!1,Events:[Qo,kr,Ol,qf,Wf,Si]},ho={findFiberByHostInstance:ja,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Jh={bundleType:ho.bundleType,version:ho.version,rendererPackageName:ho.rendererPackageName,rendererConfig:ho.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:la.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Kf(e),e===null?null:e.stateNode},findFiberByHostInstance:ho.findFiberByHostInstance||Qh,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(xo=__REACT_DEVTOOLS_GLOBAL_HOOK__,!xo.isDisabled&&xo.supportsFiber))try{Ml=xo.inject(Jh),qt=xo}catch{}var xo;ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zh;ct.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ti(t))throw Error(w(200));return Xh(e,t,null,a)};ct.createRoot=function(e,t){if(!Ti(e))throw Error(w(299));var a=!1,r="",o=bp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ki(e,1,!1,null,null,a,!1,r,o),e[ra]=t.current,No(e.nodeType===8?e.parentNode:e),new Pi(t)};ct.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(w(188)):(e=Object.keys(e).join(","),Error(w(268,e)));return e=Kf(t),e=e===null?null:e.stateNode,e};ct.flushSync=function(e){return ar(e)};ct.hydrate=function(e,t,a){if(!$l(t))throw Error(w(200));return Gl(null,e,t,!0,a)};ct.hydrateRoot=function(e,t,a){if(!Ti(e))throw Error(w(405));var r=a!=null&&a.hydratedSources||null,o=!1,n="",l=bp;if(a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onRecoverableError!==void 0&&(l=a.onRecoverableError)),t=kp(t,null,e,1,a??null,o,!1,n,l),e[ra]=t.current,No(e),r)for(e=0;e<r.length;e++)a=r[e],o=a._getVersion,o=o(a._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[a,o]:t.mutableSourceEagerHydrationData.push(a,o);return new Vl(t)};ct.render=function(e,t,a){if(!$l(t))throw Error(w(200));return Gl(null,e,t,!1,a)};ct.unmountComponentAtNode=function(e){if(!$l(e))throw Error(w(40));return e._reactRootContainer?(ar(function(){Gl(null,null,e,!1,function(){e._reactRootContainer=null,e[ra]=null})}),!0):!1};ct.unstable_batchedUpdates=Si;ct.unstable_renderSubtreeIntoContainer=function(e,t,a,r){if(!$l(a))throw Error(w(200));if(e==null||e._reactInternals===void 0)throw Error(w(38));return Gl(e,t,a,!1,r)};ct.version="18.3.1-next-f1338f8080-20240426"});var jr=Qt((av,Rp)=>{"use strict";function Tp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tp)}catch(e){console.error(e)}}Tp(),Rp.exports=Pp()});var Ap=Qt(Ri=>{"use strict";var Dp=jr();Ri.createRoot=Dp.createRoot,Ri.hydrateRoot=Dp.hydrateRoot;var rv});var zp=Qt(Ql=>{"use strict";var rx=Ie(),ox=Symbol.for("react.element"),nx=Symbol.for("react.fragment"),lx=Object.prototype.hasOwnProperty,ux=rx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sx={key:!0,ref:!0,__self:!0,__source:!0};function Op(e,t,a){var r,o={},n=null,l=null;a!==void 0&&(n=""+a),t.key!==void 0&&(n=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)lx.call(t,r)&&!sx.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:ox,type:e,key:n,ref:l,props:o,_owner:ux.current}}Ql.Fragment=nx;Ql.jsx=Op;Ql.jsxs=Op});var N=Qt((DL,Up)=>{"use strict";Up.exports=zp()});var hm=D(Ap(),1);var X=D(Ie(),1),cm=D(jr(),1);function Mp(e){return e.trim().replace(/^\\|/,"").replace(/\\|$/,"").split("|").map(a=>a.trim())}function ex(e){return/^\\s*\\|?\\s*:?-{3,}:?\\s*(\\|\\s*:?-{3,}:?\\s*)+\\|?\\s*$/.test(e)}function tx(e){let t=e.split(`\n`),a=[],r=0;for(;r<t.length;){let o=t[r]??"",n=t[r+1]??"";if(o.includes("|")&&ex(n)){let l=Mp(o),u=[];for(r+=2;r<t.length&&t[r].includes("|")&&t[r].trim()!=="";)u.push(Mp(t[r])),r+=1;let s=`<tr>${l.map(g=>`<th style="text-align:left;padding:7px 10px;border:1px solid #334155;color:#e2e8f0;background:#0f172a;">${g}</th>`).join("")}</tr>`,f=u.map(g=>`<tr>${g.map(h=>`<td style="padding:7px 10px;border:1px solid #334155;color:#cbd5e1;vertical-align:top;">${h}</td>`).join("")}</tr>`).join("");a.push(`<div style="overflow-x:auto;margin:0.65em 0;"><table style="border-collapse:collapse;min-width:360px;width:100%;font-size:12px;"><thead>${s}</thead><tbody>${f}</tbody></table></div>`);continue}a.push(t[r]),r+=1}return a.join(`\n`)}function jl(e){if(!e)return\'<span style="color:#475569;font-style:italic;">No description yet</span>\';let t=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return tx(t).replace(/^### (.+)$/gm,\'<h3 style="font-weight:700;margin:0.8em 0 0.3em;font-size:1.05em;color:#cbd5e1;">$1</h3>\').replace(/^## (.+)$/gm,\'<h2 style="font-weight:700;margin:0.8em 0 0.3em;font-size:1.2em;color:#f1f5f9;">$1</h2>\').replace(/^# (.+)$/gm,\'<h1 style="font-weight:700;margin:0.8em 0 0.3em;font-size:1.4em;color:#f1f5f9;">$1</h1>\').replace(/[*][*]([^\\n]+?)[*][*]/g,\'<strong style="font-weight:700;color:#f1f5f9;">$1</strong>\').replace(/__([^\\n]+?)__/g,\'<strong style="font-weight:700;color:#f1f5f9;">$1</strong>\').replace(/[*]([^\\n*]+?)[*]/g,\'<em style="font-style:italic;color:#94a3b8;">$1</em>\').replace(/(?<![a-zA-Z0-9])_([^_\\n]+?)_(?![a-zA-Z0-9])/g,\'<em style="font-style:italic;color:#94a3b8;">$1</em>\').replace(/`(.+?)`/g,\'<code style="font-family:Menlo,monospace;font-size:12px;background:#1e293b;padding:1px 5px;border-radius:3px;color:#7dd3fc;">$1</code>\').replace(/\\[([^\\]]+)\\]\\((https?:\\/\\/[^)]+)\\)/g,\'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#60a5fa;text-decoration:underline;">$1</a>\').replace(/(^|[\\s(>])((https?:\\/\\/)[^\\s<>"\']+)/g,\'$1<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#60a5fa;text-decoration:underline;word-break:break-all;">$2</a>\').replace(/(^|[^\\w])#([a-f0-9]{30})(?![a-f0-9])/gi,\'$1<a href="#task-$2" data-task-ref="$2" style="color:#60a5fa;text-decoration:underline;font-family:Menlo,monospace;">#$2</a>\').replace(/^[-*] (.+)$/gm,\'<li style="margin:0.2em 0;display:list-item;">$1</li>\').replace(/^---$/gm,\'<hr style="border:none;border-top:1px solid #334155;margin:0.8em 0;">\').replace(/(<li[^>]*>[\\s\\S]*?<\\/li>\\n?)+/g,r=>`<ul style="padding-left:1.5em;margin:0.4em 0;list-style-type:disc;">${r}</ul>`).replace(/^(?!<[a-z]|$).+$/gm,r=>`<p style="margin:0.5em 0;">${r}</p>`)}var ax="proto-comments-seen";function Di(e,t){try{let a=localStorage.getItem(ax),r=a?JSON.parse(a):{};return t>(r[e]??0)}catch{return!1}}function Ai(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function nt(e){try{return new Date(e).toLocaleString()}catch{return e}}var dr=D(Ie(),1);var Xl=D(Ie());var Fp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kl=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim();var Zo=D(Ie());var Ep={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Bp=(0,Zo.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:o="",children:n,iconNode:l,...u},s)=>(0,Zo.createElement)("svg",{ref:s,...Ep,width:t,height:t,stroke:e,strokeWidth:r?Number(a)*24/Number(t):a,className:Kl("lucide",o),...u},[...l.map(([f,g])=>(0,Zo.createElement)(f,g)),...Array.isArray(n)?n:[n]]));var $=(e,t)=>{let a=(0,Xl.forwardRef)(({className:r,...o},n)=>(0,Xl.createElement)(Bp,{ref:n,iconNode:t,className:Kl(`lucide-${Fp(e)}`,r),...o}));return a.displayName=`${e}`,a};var Kr=$("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var Jo=$("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var Aa=$("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var nr=$("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var en=$("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var Xr=$("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var tn=$("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);var an=$("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);var rn=$("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);var on=$("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var lr=$("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);var Ma=$("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);var ur=$("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);var nn=$("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var ln=$("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var sr=$("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var un=$("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var Fa=$("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var Qr=$("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var sn=$("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);var dn=$("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var $e=$("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Yr=D(Ie(),1),Kp=D(jr(),1);var _p=D(N(),1),Np={Bug:{background:"rgba(239,68,68,0.12)",color:"#f87171",border:"rgba(239,68,68,0.25)"},Research:{background:"rgba(192,132,252,0.12)",color:"#c084fc",border:"rgba(139,92,246,0.2)"},Task:{background:"rgba(148,163,184,0.1)",color:"#94a3b8",border:"rgba(148,163,184,0.2)"}};function Hp({type:e,style:t}){let a=typeof e=="string"&&e.trim()&&e!=="[object Object]"&&Np[e]?e:"Task",r=Np[a];return(0,_p.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",padding:"1px 5px",borderRadius:3,flexShrink:0,textTransform:"uppercase",background:r.background,color:r.color,border:`1px solid ${r.border}`,lineHeight:"1.5",...t},children:a})}var Vp=D(N(),1),qp={Critical:{background:"rgba(239,68,68,0.15)",color:"#f87171",border:"rgba(239,68,68,0.3)"},High:{background:"rgba(249,115,22,0.12)",color:"#fb923c",border:"rgba(249,115,22,0.25)"},Medium:{background:"rgba(234,179,8,0.12)",color:"#facc15",border:"rgba(234,179,8,0.25)"},Low:{background:"rgba(148,163,184,0.1)",color:"#94a3b8",border:"rgba(148,163,184,0.2)"}};function Wp({priority:e,style:t}){if(!e||!qp[e])return null;let a=qp[e];return(0,Vp.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",padding:"1px 5px",borderRadius:3,flexShrink:0,textTransform:"uppercase",background:a.background,color:a.color,border:`1px solid ${a.border}`,lineHeight:"1.5",...t},children:e})}var ir=[{value:"Task",icon:"\\u2611",label:"Task",css:"type-task",tooltip:"A general task or feature to implement."},{value:"Bug",icon:"\\u{1F41E}",label:"Bug",css:"type-bug",tooltip:"A defect \\u2014 annotator collects page errors and console logs to help reproduce it."},{value:"Research",icon:"\\u{1F52C}",label:"Research",css:"type-research",tooltip:"A research task \\u2014 agent will NOT write code but must attach a findings report."}],FL=ir.map(e=>e.value),Gp=Object.fromEntries(ir.map(e=>[e.value,e.icon])),EL=Object.fromEntries(ir.map(e=>[e.value,e.css])),$p={Task:"#94a3b8",Bug:"#ef4444",Research:"#a855f7"};function fn(e){return $p[e??"Task"]??$p.Task}var le=D(N(),1);function ix(e){return/\\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function Xp(e,t){if(!/^#[0-9a-fA-F]{6}$/.test(e))return;let a=Math.max(0,Math.min(1,t)),r=Math.round(a*255).toString(16).padStart(2,"0");return`${e}${r}`}function Qp(e,t){return Xp(e,t==="Critical"?.36:t==="High"?.3:.24)??"color-mix(in srgb, var(--p-text-g) 40%, transparent)"}function dx(e){return Xp(e,.05)??"transparent"}var fx={padding:"7px 8px",gap:4,opacity:.45,userSelect:"none"},cx={display:"flex",alignItems:"center",gap:5},px={width:12,height:12,color:"color-mix(in srgb, var(--p-green) 55%, transparent)",flexShrink:0},mx={fontSize:11.5,fontWeight:600,color:"var(--p-text-g)",textDecoration:"line-through",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},gx={display:"flex",alignItems:"center",gap:5,minWidth:0},hx={flexShrink:0},xx={fontSize:11.5,fontWeight:600,color:"var(--p-text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},vx={display:"flex",alignItems:"flex-start",gap:8},Lx={fontSize:10,color:"var(--p-text-g)",lineHeight:"1.45",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,flex:1,minWidth:0},yx={position:"relative",flexShrink:0},Sx={width:52,height:34,borderRadius:6,objectFit:"cover",border:"1px solid color-mix(in srgb, var(--p-border) 90%, transparent)",display:"block",cursor:"pointer"},Ix={display:"flex",alignItems:"center",gap:2,marginTop:1},Cx={flex:1},Mi=Yr.default.memo(function({task:t,col:a,liveActivity:r,onOpen:o,onDragStart:n}){var b;let l=a.id==="in-progress",u=a.id==="done",[s,f]=Yr.default.useState(!1),[g,h]=Yr.default.useState(null),p=Yr.default.useRef(null),L=t.commentCount??0,v=t.fileCount??0,y=L>0&&Di(t.id,L),M=Qp(a.color,t.priority),c=fn(t.type),d=dx(c),i=(b=t.files)==null?void 0:b.find(P=>ix(P.name)),m=i?`/api/tasks/${t.id}/files/${encodeURIComponent(i.name)}`:null;function C(P){n(P,t.id),P.currentTarget.classList.add("dragging")}function I(P){P.currentTarget.classList.remove("dragging")}return u?(0,le.jsx)("article",{className:"task-card",draggable:!0,"data-task-id":t.id,style:fx,onDragStart:C,onDragEnd:I,onClick:()=>o(t),children:(0,le.jsxs)("div",{style:cx,children:[(0,le.jsx)(Aa,{style:px}),(0,le.jsx)("span",{style:mx,children:t.title})]})}):(0,le.jsxs)("article",{className:`task-card${r?" task-live-edit":""}`,draggable:!0,"data-task-id":t.id,style:{padding:"7px 8px",gap:4,userSelect:"none",background:r?"rgba(59,130,246,0.08)":d,...r?{borderColor:"rgba(59,130,246,0.5)",boxShadow:"0 0 0 2px rgba(59,130,246,0.14)"}:M?{borderColor:M}:{}},onDragStart:C,onDragEnd:I,onClick:()=>o(t),children:[(0,le.jsxs)("div",{style:gx,children:[l&&(0,le.jsx)("span",{className:"spinner",style:hx}),(0,le.jsx)("span",{style:xx,children:t.title})]}),(t.description||m)&&(0,le.jsxs)("div",{style:vx,children:[t.description&&(0,le.jsx)("div",{style:Lx,children:t.description}),m&&(0,le.jsxs)("div",{style:yx,onMouseEnter:()=>{if(p.current){let P=p.current.getBoundingClientRect();h({top:P.top,right:P.right})}f(!0)},onMouseLeave:()=>{f(!1),h(null)},children:[(0,le.jsx)("img",{ref:p,src:m,alt:"Task screenshot","data-role":"task-thumb",style:Sx}),s&&g&&Kp.default.createPortal((0,le.jsx)("img",{src:m,alt:"Task screenshot enlarged preview","data-role":"task-thumb-preview",style:{position:"fixed",right:window.innerWidth-g.right,bottom:window.innerHeight-g.top+8,width:220,height:138,borderRadius:8,objectFit:"cover",border:"1px solid color-mix(in srgb, var(--p-border) 96%, transparent)",boxShadow:"0 10px 24px color-mix(in srgb, var(--p-bg) 75%, transparent)",pointerEvents:"none",zIndex:9999,background:"var(--p-bg)"}}),document.body)]})]}),(0,le.jsxs)("div",{className:"flex items-center",style:Ix,children:[(0,le.jsx)(Hp,{type:t.type}),t.priority&&(0,le.jsx)(Wp,{priority:t.priority}),l&&t.assigneeName&&(0,le.jsx)("span",{style:{fontSize:10,fontWeight:600,padding:"1px 6px",borderRadius:6,background:"rgba(59,130,246,0.12)",color:"#60a5fa",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:80},children:t.assigneeName}),(0,le.jsx)("div",{style:Cx}),r&&(0,le.jsx)(Fi,{activity:r}),(0,le.jsx)(jp,{icon:(0,le.jsx)(lr,{style:{width:9,height:9}}),label:L>0?String(L):"",color:y?"var(--p-purple)":L>0?"var(--p-text-m)":"var(--p-border-t)",hoverColor:y?"var(--p-purple-300)":"var(--p-text)",title:L>0?`${L} comment(s)`:"Add comment",badge:y,badgeColor:"var(--p-purple)",onClick:P=>{P.stopPropagation(),o(t,"comments")}}),(0,le.jsx)(jp,{icon:(0,le.jsx)(ur,{style:{width:9,height:9}}),label:v>0?String(v):"",color:v>0?"var(--p-blue-300)":"var(--p-border-t)",hoverColor:v>0?"var(--p-cyan-300)":"var(--p-text-sub)",title:v>0?`${v} file(s) attached`:"Files",onClick:P=>{P.stopPropagation(),o(t,"files")}})]})]})});function jp({icon:e,label:t,color:a,hoverColor:r,title:o,badge:n,badgeColor:l,onClick:u}){let[s,f]=Yr.default.useState(!1);return(0,le.jsxs)("button",{style:{display:"inline-flex",alignItems:"center",gap:2,padding:"2px 3px",borderRadius:3,border:"none",background:s?"color-mix(in srgb, var(--p-text-m) 10%, transparent)":"transparent",cursor:"pointer",fontSize:9,color:s?r:a,transition:"color .1s, background .1s"},title:o,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onClick:u,children:[e,t&&(0,le.jsx)("span",{children:t}),n&&(0,le.jsx)("span",{style:{width:4,height:4,background:l??a,borderRadius:"50%",flexShrink:0}})]})}function Fi({activity:e}){let t=e.state==="locked"||e.state==="editing",a=t?(0,le.jsx)(on,{style:{width:8,height:8}}):(0,le.jsx)(en,{style:{width:8,height:8}}),r=t?`Locked by ${e.user}`:`${e.user} viewing`;return(0,le.jsxs)("span",{style:t?{display:"inline-flex",alignItems:"center",gap:3,borderRadius:999,padding:"1px 5px",fontSize:9,fontWeight:600,border:"1px solid rgba(244,114,182,0.35)",color:"#f9a8d4",background:"rgba(157,23,77,0.28)",flexShrink:0,maxWidth:110,overflow:"hidden",whiteSpace:"nowrap",flexWrap:"nowrap"}:{display:"inline-flex",alignItems:"center",gap:3,borderRadius:999,padding:"1px 5px",fontSize:9,fontWeight:600,border:"1px solid rgba(59,130,246,0.35)",color:"#93c5fd",background:"rgba(30,58,138,0.28)",flexShrink:0,maxWidth:110,overflow:"hidden",whiteSpace:"nowrap",flexWrap:"nowrap"},title:r,"data-testid":"live-activity-badge",children:[a,(0,le.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",minWidth:0,flex:"1 1 0"},children:e.user})]})}var de=D(N(),1),Ea=[{id:"backlog",label:"Backlog",color:"var(--p-text-f)",accent:"color-mix(in srgb, var(--p-text-g) 20%, transparent)"},{id:"todo",label:"Todo",color:"var(--p-amber)",accent:"color-mix(in srgb, var(--p-amber) 12%, transparent)"},{id:"in-progress",label:"In Progress",color:"var(--p-blue)",accent:"color-mix(in srgb, var(--p-blue) 12%, transparent)",glow:!0},{id:"review",label:"Review",color:"var(--p-purple)",accent:"color-mix(in srgb, var(--p-purple) 12%, transparent)"},{id:"done",label:"Done",color:"var(--p-green)",accent:"color-mix(in srgb, var(--p-green) 10%, transparent)"}];var wx=3;function kx(){return(0,de.jsxs)("div",{style:{borderRadius:8,border:"1px solid var(--p-border-t)",padding:"10px 12px",background:"var(--p-bg-2)",marginBottom:6,animation:"skeleton-pulse 1.5s ease-in-out infinite"},children:[(0,de.jsx)("div",{style:{height:12,borderRadius:4,background:"var(--p-border-s)",width:"75%",marginBottom:8}}),(0,de.jsx)("div",{style:{height:10,borderRadius:4,background:"var(--p-border-s)",width:"50%",marginBottom:8}}),(0,de.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,de.jsx)("div",{style:{height:18,borderRadius:10,background:"var(--p-border-s)",width:48}}),(0,de.jsx)("div",{style:{height:18,borderRadius:10,background:"var(--p-border-s)",width:36}})]})]})}function Ei({tasks:e,visibleCols:t,searchQuery:a,isLoading:r,liveActivities:o,onOpenPanel:n,onDrop:l}){let u=dr.default.useRef(null),s=dr.default.useRef(null),[f,g]=dr.default.useState(null),[h,p]=dr.default.useState(null),L=a?e.filter(i=>(i.title??"").toLowerCase().includes(a.toLowerCase())||(i.description??"").toLowerCase().includes(a.toLowerCase())):e,v=Ea.filter(i=>t.includes(i.id));dr.default.useEffect(()=>{let i=u.current,m=s.current;if(!i||!m)return;function C(){if(!i||!m)return;let oe=i.scrollWidth>i.clientWidth?i.clientWidth/i.scrollWidth:1,ee=Math.max(40,i.clientWidth*oe);m.style.width=`${ee}px`;let De=i.scrollWidth-i.clientWidth,z=i.clientWidth-ee;m.style.left=`${De>0?i.scrollLeft/De*z:0}px`,m.style.opacity=oe<1?"1":"0"}i.addEventListener("scroll",C);let I=new ResizeObserver(C);I.observe(i),C();let b=!1,P=0,B=0;function q(oe){b=!0,P=oe.clientX,B=i.scrollLeft,m.classList.add("dragging"),document.addEventListener("mousemove",V),document.addEventListener("mouseup",G)}function V(oe){if(!b||!i||!m)return;let ee=i.scrollWidth>i.clientWidth?i.scrollWidth/i.clientWidth:1;i.scrollLeft=B+(oe.clientX-P)*ee}function G(){b=!1,m==null||m.classList.remove("dragging"),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",G)}return m.addEventListener("mousedown",q),()=>{i.removeEventListener("scroll",C),I.disconnect(),m.removeEventListener("mousedown",q)}},[v.length]);function y(i,m){g(m),i.dataTransfer.effectAllowed="move"}function M(i,m){i.preventDefault(),p(m)}function c(i,m){i.preventDefault(),p(null),f&&f&&l(f,m),g(null)}function d(){g(null),p(null)}return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("main",{id:"kanban-board",ref:u,className:"flex-1 flex overflow-x-auto overflow-y-hidden",style:{padding:"16px 20px",gap:16},onDragEnd:d,children:v.map(i=>{let m=r?[]:L.filter(C=>C.status===i.id).sort((C,I)=>(I.updatedAt??I.createdAt??"").localeCompare(C.updatedAt??C.createdAt??""));return(0,de.jsx)(bx,{col:i,tasks:m,isLoading:r,liveActivities:o,isDragOver:h===i.id,onDragOver:C=>M(C,i.id),onDrop:C=>c(C,i.id),onDragLeave:()=>p(null),onStatusChange:(C,I)=>l(C,I),onAddTask:()=>n(null,"details",i.id),onOpenTask:n,onDragStart:y},i.id)})}),(0,de.jsx)("div",{id:"kanban-scroll-track",style:{position:"fixed",bottom:0,left:0,right:0,height:6,background:"transparent",zIndex:40,pointerEvents:"none"},children:(0,de.jsx)("div",{id:"kanban-scroll-thumb",ref:s,style:{position:"absolute",top:1,height:4,borderRadius:2,background:"var(--p-border-t)",cursor:"pointer",pointerEvents:"auto",transition:"background 0.15s",opacity:0},onMouseEnter:i=>{i.currentTarget.style.background="var(--p-text-g)"},onMouseLeave:i=>{i.currentTarget.classList.contains("dragging")||(i.currentTarget.style.background="var(--p-border-t)")}})})]})}function bx({col:e,tasks:t,isLoading:a,liveActivities:r,isDragOver:o,onDragOver:n,onDrop:l,onDragLeave:u,onStatusChange:s,onAddTask:f,onOpenTask:g,onDragStart:h}){let[p,L]=dr.default.useState(!1),v=e.id==="in-progress"?"sd-inprogress":`sd-${e.id}`,y=20,M=e.id==="done",c=M&&t.length>y?t.length-y:0,d=M?t.slice(0,y):t;return(0,de.jsxs)("section",{className:"board-column","data-column-id":e.id,style:{outline:o?`2px dashed ${e.color}66`:void 0,outlineOffset:-2,borderRadius:8},onDragOver:n,onDragLeave:u,onDrop:l,children:[(0,de.jsxs)("div",{className:"column-header",style:{background:e.accent,borderColor:`color-mix(in srgb, ${e.color} 30%, transparent)`},children:[(0,de.jsx)("div",{className:`status-dot ${v}`}),(0,de.jsxs)("span",{style:{fontSize:12,fontWeight:600,color:e.id==="done"?`${e.color}b3`:e.color},children:[e.label,a?"":` \\xB7 ${t.length}`]}),(0,de.jsx)("span",{style:{marginLeft:"auto"}}),(0,de.jsx)("button",{type:"button",title:`Add task to ${e.label}`,style:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,border:"none",background:"transparent",color:p?e.color:"var(--p-text-g)",cursor:"pointer",transition:"color .15s",padding:0},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),onClick:f,children:(0,de.jsx)(nn,{style:{width:14,height:14}})})]}),(0,de.jsx)("div",{className:"column-scroll","data-status":e.id,children:a?Array.from({length:wx}).map((i,m)=>(0,de.jsx)(kx,{},m)):t.length===0?(0,de.jsxs)("div",{style:{border:"1px dashed var(--p-border-t)",borderRadius:8,padding:"10px 8px",fontSize:11,color:"var(--p-text-f)",textAlign:"center"},children:["No tasks in ",e.label.toLowerCase(),"."]}):(0,de.jsxs)(de.Fragment,{children:[d.map(i=>(0,de.jsx)(Mi,{task:i,col:e,liveActivity:r==null?void 0:r.get(i.id),onOpen:g,onDragStart:h},i.id)),c>0&&(0,de.jsxs)("div",{style:{margin:"4px 0 2px",padding:"6px 8px",borderRadius:6,border:"1px dashed var(--p-border-t)",fontSize:11,color:"var(--p-text-g)",textAlign:"center",lineHeight:1.4},children:["+",c," older ",c===1?"task":"tasks"," not shown"]})]})})]})}var fr=D(Ie(),1);var K=D(N(),1),Yp={backlog:{text:"var(--p-text-m)",bg:"color-mix(in srgb, var(--p-text-g) 14%, transparent)",border:"color-mix(in srgb, var(--p-text-g) 30%, transparent)"},todo:{text:"var(--p-amber-300)",bg:"color-mix(in srgb, var(--p-amber) 14%, transparent)",border:"color-mix(in srgb, var(--p-amber) 30%, transparent)"},"in-progress":{text:"var(--p-blue-200)",bg:"color-mix(in srgb, var(--p-blue) 14%, transparent)",border:"color-mix(in srgb, var(--p-blue) 30%, transparent)"},review:{text:"var(--p-purple-300)",bg:"color-mix(in srgb, var(--p-purple) 14%, transparent)",border:"color-mix(in srgb, var(--p-purple) 30%, transparent)"},done:{text:"var(--p-green-300)",bg:"color-mix(in srgb, var(--p-green) 12%, transparent)",border:"color-mix(in srgb, var(--p-green) 30%, transparent)"}},Px=Gp,Zp={Critical:"var(--p-red)",High:"var(--p-amber-300)",Medium:"var(--p-text-m)",Low:"var(--p-text-f)"},Bi=["in-progress","review","todo","backlog","done"];function Tx(){return(0,K.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"18px 1fr auto auto",alignItems:"center",gap:10,padding:"6px 10px",borderRadius:8,border:"1px solid var(--p-border-t)",background:"var(--p-bg-2)",animation:"skeleton-pulse 1.5s ease-in-out infinite"},children:[(0,K.jsx)("div",{style:{width:14,height:14,borderRadius:3,background:"var(--p-border-s)"}}),(0,K.jsx)("div",{style:{height:12,borderRadius:4,background:"var(--p-border-s)",width:"60%"}}),(0,K.jsx)("div",{style:{height:18,borderRadius:10,background:"var(--p-border-s)",width:44}}),(0,K.jsx)("div",{style:{height:18,borderRadius:10,background:"var(--p-border-s)",width:36}})]})}function Oi({tasks:e,searchQuery:t,isLoading:a,liveActivities:r,onOpenPanel:o,onAddTask:n,onDrop:l}){let[u,s]=fr.default.useState(null),[f,g]=fr.default.useState(null),[h,p]=fr.default.useState(null),[L,v]=fr.default.useState({backlog:!1,todo:!1,"in-progress":!1,review:!1,done:!1}),y=t?e.filter(c=>(c.title??"").toLowerCase().includes(t.toLowerCase())||(c.description??"").toLowerCase().includes(t.toLowerCase())):e,M=fr.default.useMemo(()=>{let c=new Map;for(let d of Bi)c.set(d,[]);for(let d of y)(c.get(d.status)??[]).push(d);return c},[y]);return(0,K.jsxs)("div",{id:"kanban-list-view",style:{flex:1,overflowY:"auto",padding:"16px 24px",minHeight:0},children:[a?Bi.slice(0,3).map(c=>{let d=Yp[c];return(0,K.jsxs)("div",{style:{marginBottom:24},children:[(0,K.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,K.jsx)("div",{style:{width:18,height:18,borderRadius:5,background:"var(--p-border-s)",animation:"skeleton-pulse 1.5s ease-in-out infinite"}}),(0,K.jsx)("div",{style:{height:18,borderRadius:6,background:d.bg,border:`1px solid ${d.border}`,width:72,animation:"skeleton-pulse 1.5s ease-in-out infinite"}}),(0,K.jsx)("div",{style:{height:14,borderRadius:4,background:"var(--p-border-s)",width:16,animation:"skeleton-pulse 1.5s ease-in-out infinite"}})]}),(0,K.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:Array.from({length:3}).map((i,m)=>(0,K.jsx)(Tx,{},m))})]},c)}):Bi.map(c=>{let d=M.get(c)??[];if(d.length===0)return null;let i=Yp[c];return(0,K.jsxs)("div",{style:{marginBottom:24},children:[(0,K.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8,padding:"4px 6px",borderRadius:6,transition:"background .1s",background:f===c?i.bg:"transparent",outline:f===c?`1px dashed ${i.border}`:void 0},onDragOver:m=>{m.preventDefault(),g(c)},onDragLeave:()=>g(null),onDrop:m=>{m.preventDefault(),g(null),p(null),u&&l(u,c),s(null)},children:[(0,K.jsx)("button",{type:"button",title:L[c]?"Expand":"Collapse",onClick:m=>{m.stopPropagation(),v(C=>({...C,[c]:!C[c]}))},style:{width:18,height:18,borderRadius:5,border:"1px solid var(--p-border-t)",background:"var(--p-surface)",color:"var(--p-text-m)",fontSize:10,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:L[c]?"+":"\\u2212"}),(0,K.jsx)("span",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",padding:"2px 8px",borderRadius:6,background:i.bg,border:`1px solid ${i.border}`,color:i.text},children:c}),(0,K.jsx)("span",{style:{fontSize:11,color:"var(--p-text-g)"},children:d.length}),(0,K.jsx)("button",{type:"button",title:`Add task to ${c}`,onClick:m=>{m.stopPropagation(),n(c)},style:{marginLeft:"auto",width:22,height:22,borderRadius:7,border:`1px solid ${i.border}`,background:i.bg,color:i.text,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:600},children:"+"})]}),(0,K.jsx)("div",{style:{display:L[c]?"none":"flex",flexDirection:"column",gap:2},children:d.map(m=>(0,K.jsx)(Rx,{task:m,liveActivity:r==null?void 0:r.get(m.id),onOpen:o,onDragStart:C=>s(C),dragOver:h===m.id,onDragOver:()=>p(m.id),onDragLeave:()=>p(C=>C===m.id?null:C),onDropToStatus:()=>{u&&l(u,m.status),s(null),p(null)}},m.id))})]},c)}),!a&&y.length===0&&(0,K.jsx)("div",{style:{textAlign:"center",color:"var(--p-text-g)",fontSize:13,marginTop:60},children:"No tasks found"})]})}function Rx({task:e,liveActivity:t,onOpen:a,onDragStart:r,dragOver:o,onDragOver:n,onDragLeave:l,onDropToStatus:u}){let[s,f]=fr.default.useState(!1),g=Px[e.type??"Task"]??"\\u2611",h=e.commentCount??0,p=e.fileCount??0;return(0,K.jsxs)("div",{"data-task-id":e.id,"data-proto-id":"list-row",draggable:!0,style:{display:"grid",gridTemplateColumns:"18px 1fr auto auto auto",alignItems:"center",gap:10,padding:"6px 10px",borderRadius:8,background:o?"color-mix(in srgb, var(--p-blue) 10%, transparent)":s?"var(--p-hover)":"transparent",border:`1px solid ${o?"color-mix(in srgb, var(--p-blue) 40%, transparent)":s?"var(--p-border)":"transparent"}`,cursor:"grab",transition:"background .1s,border-color .1s",userSelect:"none"},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onClick:()=>a(e),onDragStart:L=>{L.dataTransfer.effectAllowed="move",r(e.id),L.currentTarget.style.opacity="0.4"},onDragEnd:L=>{L.currentTarget.style.opacity="1"},onDragOver:L=>{L.preventDefault(),n()},onDragLeave:l,onDrop:L=>{L.preventDefault(),u()},children:[(0,K.jsx)("span",{style:{fontSize:12,textAlign:"center",flexShrink:0},children:g}),(0,K.jsxs)("div",{style:{minWidth:0},children:[(0,K.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,K.jsx)("span",{style:{fontSize:13,fontWeight:500,color:"var(--p-text)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.title}),e.priority&&Zp[e.priority]&&(0,K.jsx)(tn,{className:"w-2.5 h-2.5 flex-shrink-0",style:{color:Zp[e.priority]}}),e.component&&(0,K.jsx)("span",{style:{fontSize:10,padding:"1px 6px",borderRadius:10,background:"color-mix(in srgb, var(--p-purple) 14%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 30%, transparent)",color:"var(--p-purple-300)",flexShrink:0,fontFamily:"monospace"},children:e.component})]}),e.description&&(0,K.jsx)("div",{style:{fontSize:11,color:"var(--p-text-g)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:1,maxWidth:"100%"},children:e.description.replace(/\\s+/g," ").trim()})]}),(0,K.jsxs)("button",{title:h>0?`${h} comment(s)`:"Add comment",style:{display:"flex",alignItems:"center",gap:3,fontSize:11,color:h>0?"var(--p-text-m)":"var(--p-border-t)",background:"none",border:"none",cursor:"pointer",padding:"0 2px",flexShrink:0},onClick:L=>{L.stopPropagation(),a(e,"comments")},children:[(0,K.jsx)(lr,{className:"w-3 h-3"}),h>0&&(0,K.jsx)("span",{children:h})]}),p>0&&(0,K.jsxs)("button",{title:`${p} file(s)`,style:{display:"flex",alignItems:"center",gap:3,fontSize:11,color:"var(--p-blue-300)",background:"none",border:"none",cursor:"pointer",padding:"0 2px",flexShrink:0},onClick:L=>{L.stopPropagation(),a(e,"files")},children:[(0,K.jsx)(ur,{className:"w-3 h-3"}),(0,K.jsx)("span",{children:p})]}),t&&(0,K.jsx)(Fi,{activity:t})]})}var em=D(Ie(),1);var Ba=D(N(),1);function Jp({size:e=32,style:t,className:a}){return(0,Ba.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,className:a,"aria-label":"Vibeflow",children:[(0,Ba.jsx)("rect",{width:"32",height:"32",rx:"7",fill:"#2563eb"}),(0,Ba.jsx)("rect",{x:"7",y:"13",width:"3.5",height:"10",rx:"1.5",fill:"white",opacity:"0.75"}),(0,Ba.jsx)("rect",{x:"12.25",y:"8.5",width:"3.5",height:"15",rx:"1.5",fill:"white"}),(0,Ba.jsx)("rect",{x:"17.5",y:"14.5",width:"3.5",height:"8",rx:"1.5",fill:"white",opacity:"0.75"}),(0,Ba.jsx)("rect",{x:"22.5",y:"11",width:"2.5",height:"11",rx:"1.25",fill:"white",opacity:"0.85"})]})}var Zl=D(N(),1);function Yl({id:e,title:t,onClick:a,label:r,icon:o,variant:n="neutral"}){return(0,Zl.jsxs)("button",{id:e,onClick:a,title:t,className:`h-7 inline-flex items-center justify-center rounded-lg border transition-colors ${n==="accent"?"border-violet-700/50 bg-violet-900/30 text-violet-300 hover:bg-violet-800/30":"border-slate-700/60 bg-slate-800 text-slate-400 hover:bg-slate-700/50 hover:text-slate-200"} ${r?"gap-1.5 px-3 text-xs font-medium":"w-7"}`,type:"button",children:[o,r&&(0,Zl.jsx)("span",{children:r})]})}var j=D(N(),1);function zi({projectName:e,projectIcon:t,missingProjectIconStyle:a="initial",wsConnected:r,port:o,searchQuery:n,premiumUsage:l,isLoading:u,backHref:s,backLabel:f,onSearchChange:g,onSettings:h,extraActions:p,taskSummary:L}){let[v,y]=em.default.useState(!1),M=(t??"").trim(),c=e?e.charAt(0).toUpperCase()+e.slice(1):"Vibeflow Board";return(0,j.jsxs)("header",{className:"px-5 py-3 flex items-center gap-3 border-b border-slate-800/60 flex-shrink-0",children:[(0,j.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[s&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("a",{id:"header-back-link",href:s,className:"text-xs text-slate-400 hover:text-slate-200 transition-colors no-underline",style:{textDecoration:"none",fontWeight:500},children:f??"Back"}),(0,j.jsx)(Jo,{className:"w-3 h-3 text-slate-600 flex-shrink-0"})]}),(0,j.jsx)("div",{className:"flex-shrink-0",style:M?{fontSize:20}:void 0,children:M||(a==="vibeflow"?(0,j.jsx)(Jp,{size:32}):(0,j.jsx)("div",{style:{width:32,height:32,borderRadius:8,flexShrink:0,background:"linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%)",border:"1px solid rgba(37,99,235,0.3)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:"#93c5fd",letterSpacing:"-0.01em"},title:c,children:c.charAt(0).toUpperCase()}))}),(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{className:"flex items-center gap-2",children:[(0,j.jsx)("h1",{id:"header-project-name",className:"text-sm font-semibold text-white leading-tight",children:c}),r&&(0,j.jsxs)("div",{id:"header-live-pill",className:"flex items-center gap-1.5 rounded-full px-2 py-0.5",style:{background:"color-mix(in srgb, var(--p-green) 30%, transparent)",border:"1px solid color-mix(in srgb, var(--p-green) 28%, transparent)"},children:[(0,j.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-green-400",style:{animation:"pulse-live 2s ease-in-out infinite"}}),(0,j.jsxs)("span",{className:"text-[10px] font-medium text-green-400",children:["live \\xB7 :",o]})]})]}),(0,j.jsxs)("p",{className:"text-[10px] text-slate-500 font-mono mt-0.5",children:[L,u&&(0,j.jsx)("span",{id:"header-loading-indicator",className:"inline-block ml-1.5 w-1 h-1 rounded-full bg-blue-400",style:{animation:"pulse-live 1.4s ease-in-out infinite",verticalAlign:"middle"}})]})]})]}),(0,j.jsx)("div",{className:"flex-1 flex justify-center px-4",children:(0,j.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,j.jsx)(ln,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-slate-500 pointer-events-none"}),(0,j.jsx)("input",{id:"global-search",type:"text",placeholder:"Search tasks, files, components\\u2026",value:n,onChange:d=>g(d.target.value),className:"w-full pl-9 pr-8 py-1.5 rounded-lg bg-slate-800 border border-slate-700/60 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-blue-500 transition-colors",autoComplete:"off",spellCheck:!1}),n&&(0,j.jsx)("button",{id:"global-search-clear",onClick:()=>g(""),className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500 hover:text-slate-300 transition-colors",title:"Clear search",children:(0,j.jsx)($e,{className:"w-4 h-4"})})]})}),(0,j.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[p,(0,j.jsx)(Yl,{id:"header-shortcuts-hint",title:"Click to see keyboard shortcuts",onClick:()=>y(!0),label:"? shortcuts"}),(0,j.jsx)(Yl,{id:"btn-settings",title:"Settings",onClick:h,icon:(0,j.jsx)(sr,{className:"w-3.5 h-3.5"})})]}),v&&(0,j.jsx)("div",{style:{position:"fixed",inset:0,background:"rgba(2,12,27,0.80)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",zIndex:200,display:"flex",alignItems:"center",justifyContent:"center"},onClick:()=>y(!1),children:(0,j.jsxs)("div",{id:"shortcuts-modal",style:{background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:14,padding:"20px 24px",minWidth:320,maxWidth:420,boxShadow:"var(--p-shadow-lg)"},onClick:d=>d.stopPropagation(),children:[(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[(0,j.jsx)("span",{style:{fontSize:13,fontWeight:700,color:"var(--p-text)"},children:"Keyboard Shortcuts"}),(0,j.jsx)("button",{onClick:()=>y(!1),style:{background:"none",border:"none",cursor:"pointer",color:"var(--p-text-f)",padding:2},children:(0,j.jsx)($e,{style:{width:14,height:14}})})]}),(0,j.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[["Alt+N","Open new task panel"],["Esc","Close panel / modal"],["?","Show this shortcuts overlay"],["Alt+F","Focus task search"]].map(([d,i])=>(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,j.jsx)("kbd",{style:{fontSize:10,fontFamily:"monospace",background:"var(--p-surface)",border:"1px solid var(--p-border-t)",borderRadius:4,padding:"2px 7px",color:"var(--p-text-sub)",flexShrink:0},children:d}),(0,j.jsx)("span",{style:{fontSize:12,color:"var(--p-text-m)"},children:i})]},d))})]})})]})}var W=D(Ie(),1);var Jl=D(Ie(),1);var Vt=D(N(),1);function eu({id:e,value:t,onChange:a,disabled:r}){let[o,n]=Jl.default.useState(!1),l=Jl.default.useRef(null),u=ir.find(s=>s.value===t)??ir[0];return Jl.default.useEffect(()=>{let s=f=>{var g;(g=l.current)!=null&&g.contains(f.target)||n(!1)};return document.addEventListener("click",s),()=>document.removeEventListener("click",s)},[]),(0,Vt.jsxs)("div",{id:e,ref:l,style:{position:"relative",display:"inline-block"},children:[(0,Vt.jsxs)("button",{type:"button",title:u==null?void 0:u.tooltip,onClick:s=>{s.preventDefault(),r||n(f=>!f)},style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:6,border:"1px solid var(--p-border, rgba(255,255,255,0.08))",background:"var(--p-hover, rgba(255,255,255,0.05))",color:"var(--p-text-m, rgba(255,255,255,0.7))",fontSize:12,cursor:"pointer",whiteSpace:"nowrap"},children:[(0,Vt.jsx)("span",{style:{fontSize:13},children:u==null?void 0:u.icon}),(0,Vt.jsx)("span",{children:u==null?void 0:u.label})]}),o&&(0,Vt.jsx)("div",{style:{position:"absolute",top:"100%",left:0,marginTop:4,background:"var(--p-card, #1e293b)",border:"1px solid var(--p-border-s, rgba(255,255,255,0.12))",borderRadius:8,padding:"4px 0",zIndex:200,minWidth:140,boxShadow:"0 8px 24px rgba(0,0,0,0.4)"},children:ir.map(s=>(0,Vt.jsxs)("button",{type:"button",title:s.tooltip,onClick:()=>{a(s.value),n(!1)},style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"6px 12px",border:"none",background:s.value===t?"var(--p-hover, rgba(255,255,255,0.06))":"transparent",color:s.value===t?"var(--p-text, #fff)":"var(--p-text-f, rgba(255,255,255,0.55))",fontSize:12,cursor:"pointer",textAlign:"left"},children:[(0,Vt.jsx)("span",{style:{fontSize:14,lineHeight:1},children:s.icon}),(0,Vt.jsx)("span",{children:s.label})]},s.value))})]})}var Ye=D(Ie(),1);var cn=D(Ie(),1);var Oa=D(N(),1);function za({markdown:e,className:t,style:a}){let r=cn.default.useRef(null),o=cn.default.useRef({}),[n,l]=cn.default.useState(null);return cn.default.useEffect(()=>{let u=r.current;if(!u)return;function s(){l(null)}async function f(h){let p=h.target,L=p==null?void 0:p.closest("a[data-task-ref]");if(!L){s();return}h.preventDefault();let v=L.getAttribute("data-task-ref");if(!v)return;let y=L.getBoundingClientRect(),M=o.current[v];if(M){l({id:v,title:M.title,status:M.status,x:y.left,y:y.bottom+6});return}try{let d=await(await fetch(`/api/tasks/${v}`)).json(),i={title:d.title??`Task ${v}`,status:d.status??"unknown"};o.current[v]=i,l({id:v,title:i.title,status:i.status,x:y.left,y:y.bottom+6})}catch{l({id:v,title:`Task ${v}`,status:"unknown",x:y.left,y:y.bottom+6})}}function g(h){var v,y;let p=(y=(v=h.target)==null?void 0:v.closest)==null?void 0:y.call(v,"a[data-task-ref]");if(!p)return;let L=p.getAttribute("data-task-ref");L&&window.dispatchEvent(new CustomEvent("vibeflow-task-ref-click",{detail:{refId:L}}))}return u.addEventListener("mouseover",f),u.addEventListener("mouseleave",s),u.addEventListener("click",g),()=>{u.removeEventListener("mouseover",f),u.removeEventListener("mouseleave",s),u.removeEventListener("click",g)}},[]),(0,Oa.jsxs)("div",{style:{position:"relative"},children:[(0,Oa.jsx)("div",{ref:r,className:t,style:a,dangerouslySetInnerHTML:{__html:jl(e)}}),n&&(0,Oa.jsxs)("div",{style:{position:"fixed",left:n.x,top:n.y,background:"#0f172a",border:"1px solid rgba(59,130,246,0.4)",color:"#e2e8f0",borderRadius:8,padding:"8px 10px",fontSize:11,boxShadow:"0 10px 24px rgba(2,6,23,0.55)",zIndex:60,pointerEvents:"none",minWidth:180},children:[(0,Oa.jsxs)("div",{style:{color:"#60a5fa",fontFamily:"Menlo,monospace",marginBottom:3},children:["#",n.id]}),(0,Oa.jsx)("div",{style:{fontWeight:600,marginBottom:3},children:n.title}),(0,Oa.jsxs)("div",{style:{color:"#94a3b8"},children:["status: ",n.status]})]})]})}var pn=D(Ie(),1),tm=D(N(),1),Zr=pn.default.forwardRef(function({value:t,onChange:a,baseRows:r=4,maxRows:o,style:n,...l},u){let s=pn.default.useRef(null),f=o??r*2,g=pn.default.useCallback(()=>{let h=s.current;if(!h)return;h.style.height="auto";let p=window.getComputedStyle(h),L=Number.parseFloat(p.lineHeight||"0")||18,v=Number.parseFloat(p.paddingTop||"0")+Number.parseFloat(p.paddingBottom||"0"),y=Number.parseFloat(p.borderTopWidth||"0")+Number.parseFloat(p.borderBottomWidth||"0"),M=r*L+v+y,c=f*L+v+y,d=Math.max(M,Math.min(h.scrollHeight,c));h.style.height=`${d}px`,h.style.overflowY=h.scrollHeight>c?"auto":"hidden"},[r,f]);return pn.default.useLayoutEffect(()=>{g()},[t,g]),(0,tm.jsx)("textarea",{...l,ref:h=>{s.current=h,typeof u=="function"?u(h):u&&(u.current=h)},rows:r,value:t,onChange:h=>a(h.target.value),style:{...n,resize:"none"}})});var rm=D(Ie(),1);var tu=D(Ie(),1),am=D(jr(),1),ua=D(N(),1);function cr({open:e,onClose:t,icon:a,title:r,headerActions:o,width:n,maxHeight:l,id:u,children:s,footer:f,boxStyle:g,onKeyDown:h}){let[p,L]=tu.default.useState(!1);if(tu.default.useEffect(()=>(L(!0),()=>L(!1)),[]),tu.default.useEffect(()=>{if(!e)return;function M(c){c.key==="Escape"&&t(),h==null||h(c)}return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[e,t,h]),!e||!p)return null;let v=!!(a||r||o),y=(0,ua.jsx)("div",{id:u,className:"modal-backdrop",onClick:M=>{M.target===M.currentTarget&&t()},onMouseDown:M=>M.stopPropagation(),children:(0,ua.jsxs)("div",{className:"modal-box",style:{width:n??"min(420px, 95vw)",maxHeight:l,...g},children:[v&&(0,ua.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--p-border)",flexShrink:0},children:[a&&(0,ua.jsx)("span",{style:{flexShrink:0,display:"flex",alignItems:"center"},children:a}),r&&(0,ua.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"var(--p-text)",flex:1,minWidth:0},children:r}),o&&(0,ua.jsx)("div",{style:{display:"flex",alignItems:"center",gap:4,flexShrink:0,marginLeft:"auto"},children:o})]}),s,f&&(0,ua.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:8,padding:"10px 18px",borderTop:"1px solid var(--p-border)",flexShrink:0},children:f})]})});return(0,am.createPortal)(y,document.body)}var St=D(N(),1);function $t({open:e,message:t,title:a="Confirm",confirmLabel:r="Delete",cancelLabel:o="Cancel",loading:n,error:l,onConfirm:u,onCancel:s}){let f=rm.default.useCallback(g=>{g.key==="Enter"&&u()},[u]);return(0,St.jsx)(cr,{open:e,onClose:s,id:"confirm-modal",width:"min(380px, 95vw)",icon:(0,St.jsx)(Fa,{style:{width:20,height:20,color:"#f87171"}}),title:a,onKeyDown:f,footer:(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)("button",{id:"confirm-modal-cancel",onClick:s,disabled:n,style:{padding:"7px 16px",borderRadius:8,background:"var(--p-hover)",border:"1px solid var(--p-border)",color:"var(--p-text-m)",fontSize:13,cursor:"pointer",transition:"background 0.15s"},children:o}),(0,St.jsx)("button",{id:"confirm-modal-confirm",onClick:u,disabled:n,style:{padding:"7px 16px",borderRadius:8,background:"#dc2626",border:"none",color:"#fff",fontSize:13,fontWeight:600,cursor:n?"wait":"pointer",opacity:n?.6:1,transition:"background 0.15s"},children:n?"Deleting\\u2026":r})]}),children:(0,St.jsxs)("div",{style:{padding:"16px 18px"},children:[typeof t=="string"?(0,St.jsx)("p",{style:{margin:0,fontSize:13,color:"var(--p-text-f)",lineHeight:1.6},children:t}):t,l&&(0,St.jsx)("p",{style:{margin:"8px 0 0",fontSize:12,color:"var(--p-red)"},children:l})]})})}var Re=D(N(),1);function om(e){return e.linkedPath?"\\u{1F517}":/\\.(png|jpe?g|gif|webp|svg)$/i.test(e.name)?"\\u{1F5BC}\\uFE0F":/\\.html?$/i.test(e.name)?"\\u{1F310}":/\\.md$/i.test(e.name)||/\\.pdf$/i.test(e.name)?"\\u{1F4C4}":"\\u{1F4CE}"}function Dx(e){return/\\.(png|jpe?g|gif|webp|svg|html?)$/i.test(e.name)}function Ax(e){return/\\.html?$/i.test(e.name)}function au({file:e,url:t,variant:a,onPreview:r,onDelete:o}){let n=Dx(e),l=Ax(e);function u(){r?r(e,t):window.open(t,"_blank")}return a==="compact"?(0,Re.jsxs)("div",{className:"group/file-compact",style:{display:"flex",alignItems:"center",gap:8,padding:"4px 8px",borderRadius:8,background:"var(--p-card)",border:"1px solid var(--p-border)",position:"relative"},children:[(0,Re.jsx)("span",{style:{fontSize:14,flexShrink:0},children:om(e)}),(0,Re.jsx)("div",{style:{flex:1,minWidth:0},children:(0,Re.jsx)("button",{onClick:u,style:{fontSize:12,color:"var(--p-blue-300)",background:"none",border:"none",cursor:"pointer",padding:0,textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},title:e.name,children:e.name})}),(0,Re.jsx)("span",{className:"file-compact-ts",style:{fontSize:10,color:"var(--p-border-t)",flexShrink:0,marginLeft:2},children:e.createdAt?nt(e.createdAt):"attached"}),(0,Re.jsxs)("div",{className:"file-compact-actions",style:{position:"absolute",right:6,top:0,bottom:0,display:"flex",alignItems:"center",gap:4,transition:"opacity 0.15s",background:"var(--p-card)",paddingLeft:8},children:[n&&(0,Re.jsx)("button",{onClick:u,style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)"},title:l?"Open in new tab":"Preview",children:l?"\\u2197":"\\u{1F441}"}),(0,Re.jsx)("a",{href:t,download:e.name,style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)",textDecoration:"none"},title:"Download",onClick:s=>s.stopPropagation(),children:"\\u2193"}),o&&(0,Re.jsx)("button",{onClick:()=>void o(e),style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)"},title:"Delete",children:"\\u2715"})]})]}):(0,Re.jsxs)("div",{className:"group/file",style:{display:"flex",alignItems:"center",gap:10,padding:8,borderRadius:8,border:"1px solid var(--p-border)",transition:"background 0.15s",position:"relative"},children:[(0,Re.jsx)("span",{style:{fontSize:18,flexShrink:0},children:om(e)}),(0,Re.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,Re.jsx)("p",{style:{fontSize:12,fontWeight:500,color:"var(--p-text)",margin:0,cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:e.name,onClick:u,children:e.name}),(0,Re.jsx)("p",{style:{fontSize:10,color:"var(--p-text-f)",margin:0},children:e.linkedPath?`linked: ${e.linkedPath}`:Ai(e.size??0)})]}),(0,Re.jsxs)("div",{className:"file-normal-actions",style:{display:"flex",alignItems:"center",gap:4,transition:"opacity 0.15s"},children:[n&&(0,Re.jsx)("button",{onClick:u,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)"},title:l?"Open in new tab":"Preview",children:l?"\\u2197":"\\u{1F441}"}),(0,Re.jsx)("a",{href:t,download:e.name,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)",textDecoration:"none"},title:"Download",onClick:s=>s.stopPropagation(),children:"\\u2193"}),o&&(0,Re.jsx)("button",{onClick:()=>void o(e),style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)"},title:"Delete",children:"\\u2715"})]})]})}var A=D(N(),1);function nm({source:e}){return e!=="cli"?null:(0,A.jsx)("span",{title:"Via CLI (agent)",style:{fontSize:9,color:"var(--p-green-300)",background:"rgba(34,197,94,0.1)",border:"1px solid rgba(34,197,94,0.2)",borderRadius:4,padding:"0 4px",fontFamily:"monospace",lineHeight:"16px",flexShrink:0},children:">_"})}function Mx(e,t){if(e.kind==="lifecycle")return e.author??null;if(e.kind==="comment"){let a=e.comment;return a.type==="system"?null:a.author==="agent"?"\\u{1F916} Agent":a.authorName??t}return e.kind==="change"?e.actor:null}function Fx(e,t){let a=[];for(let r of e){let o=Mx(r,t),n=a[a.length-1];o&&n&&n.author===o?(n.items.push(r),r.sortKey>n.newestSortKey&&(n.newestSortKey=r.sortKey),r.sortKey<n.oldestSortKey&&(n.oldestSortKey=r.sortKey)):a.push({author:o,newestSortKey:r.sortKey,oldestSortKey:r.sortKey,items:[r]})}return a}function Ui({comments:e,files:t=[],localChanges:a=[],loading:r,error:o,gitUserName:n="You",taskAuthorName:l,baseUrl:u="",taskId:s,taskCreatedAt:f,taskUpdatedAt:g,onEdit:h,onDelete:p,onDeleteFile:L,onFilePreview:v}){let y=Ye.default.useRef(null),M=Ye.default.useRef(null),[c,d]=Ye.default.useState(null),[i,m]=Ye.default.useState(""),[C,I]=Ye.default.useState(null),[b,P]=Ye.default.useState(null),[B,q]=Ye.default.useState(()=>{try{return localStorage.getItem("vibeflow-show-updates")!=="false"}catch{return!0}}),V=Ye.default.useRef(r),G=Ye.default.useMemo(()=>{let z=[];f&&z.push({kind:"lifecycle",sortKey:f,label:"Task created",icon:"\\u2726",author:l??n}),g&&g!==f&&z.push({kind:"lifecycle",sortKey:g,label:"Task edited",icon:"\\u270E"});let Fe=e.map(Q=>({kind:"comment",sortKey:Q.createdAt,comment:Q})),he=t.map(Q=>{let Se=Q.url.startsWith("http")?Q.url:`${u}${Q.url}`;return{kind:"file",sortKey:Q.createdAt??"9999",file:Q,url:Se}}),fe=a.map(Q=>({kind:"change",sortKey:Q.timestamp,field:Q.field,from:Q.from,to:Q.to,actor:Q.actor,source:Q.source}));return[...z,...Fe,...he,...fe].sort((Q,Se)=>Se.sortKey.localeCompare(Q.sortKey))},[e,t,a,u,f,g]),oe=Ye.default.useMemo(()=>G.filter(z=>z.kind==="lifecycle"||z.kind==="change").length,[G]),ee=Ye.default.useMemo(()=>B?G:G.filter(z=>z.kind==="comment"||z.kind==="file"),[G,B]),De=Ye.default.useMemo(()=>Fx(ee,n),[ee,n]);return Ye.default.useEffect(()=>{let z=V.current&&!r;V.current=r,y.current&&z&&requestAnimationFrame(()=>{y.current&&(y.current.scrollTop=0)})},[r]),Ye.default.useEffect(()=>{c&&M.current&&(M.current.focus(),M.current.scrollIntoView({block:"nearest"}))},[c]),r?(0,A.jsx)("p",{style:{color:"var(--p-text-g)",fontSize:12,textAlign:"center",padding:"16px 0"},children:"Loading\\u2026"}):o?(0,A.jsx)("p",{style:{color:"var(--p-red-500)",fontSize:12,textAlign:"center",padding:"8px 0"},children:"Failed to load."}):G.length===0?(0,A.jsx)("p",{style:{color:"var(--p-text-g)",fontSize:12,textAlign:"center",padding:"16px 0"},children:"No activity yet."}):(0,A.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",minHeight:0},children:[oe>0&&(0,A.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0 4px",flexShrink:0,borderBottom:"1px solid var(--p-border)",marginBottom:4},children:[(0,A.jsx)("span",{style:{fontSize:9,color:"var(--p-text-g)",flex:1,letterSpacing:"0.04em"},children:B?"":`${oe} system event${oe!==1?"s":""} hidden`}),(0,A.jsx)("button",{id:"dp-toggle-updates",onClick:()=>q(z=>{let Fe=!z;try{localStorage.setItem("vibeflow-show-updates",String(Fe))}catch{}return Fe}),style:{all:"unset",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:5,color:B?"var(--p-text-m)":"var(--p-text-g)",transition:"color .12s, background .12s"},title:B?"Hide system events":`Show ${oe} system event${oe!==1?"s":""}`,onMouseEnter:z=>{z.currentTarget.style.color="var(--p-text)",z.currentTarget.style.background="var(--p-hover)"},onMouseLeave:z=>{z.currentTarget.style.color=B?"var(--p-text-m)":"var(--p-text-g)",z.currentTarget.style.background="transparent"},children:B?(0,A.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,A.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,A.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}):(0,A.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,A.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,A.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})})]}),(0,A.jsx)("div",{ref:y,style:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:2,minHeight:0},children:De.map((z,Fe)=>{let he=z.author!==null&&z.items.length>1,fe=he,Q=z.author==="\\u{1F916} Agent";return(0,A.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[fe&&(0,A.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 0 2px",marginTop:4},children:[(0,A.jsx)("span",{style:{fontSize:11,fontWeight:600,color:Q?"var(--p-purple)":"var(--p-blue-300)",flexShrink:0},children:z.author}),(0,A.jsx)("span",{style:{fontSize:10,color:"var(--p-text-g)",flexShrink:0},children:`${nt(z.oldestSortKey)} \\u2013 ${nt(z.newestSortKey)}`}),(0,A.jsxs)("span",{style:{fontSize:10,color:"var(--p-border-t)",flexShrink:0,marginLeft:2},children:["(",z.items.length," activities)"]})]}),(0,A.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:he?4:8,paddingLeft:he?8:0,borderLeft:he?"1.5px solid var(--p-border)":"none",marginLeft:he?4:0},children:z.items.map((Se,Ze)=>Ex(Se,Ze,Fe,he,n,c,i,M,d,m,h,I,L?P:null,v))})]},`group-${Fe}`)})}),(0,A.jsx)($t,{open:C!==null,message:"Delete this comment? This action cannot be undone.",onConfirm:()=>{C&&p(C),I(null)},onCancel:()=>I(null)}),L&&(0,A.jsx)($t,{open:b!==null,message:b?`Delete "${b.name}"? This action cannot be undone.`:"",onConfirm:()=>{b&&L(b),P(null)},onCancel:()=>P(null)})]})}function Ex(e,t,a,r,o,n,l,u,s,f,g,h,p,L){if(e.kind==="lifecycle")return(0,A.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:6,padding:"2px 0"},children:[(0,A.jsx)("span",{style:{fontSize:11,color:"var(--p-purple)",fontWeight:600,flexShrink:0,minWidth:18,paddingTop:1},children:e.icon}),(0,A.jsx)("div",{style:{flex:1,minWidth:0},children:(0,A.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,A.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)",fontStyle:"italic"},children:e.label}),!r&&(0,A.jsx)("span",{style:{fontSize:10,color:"var(--p-text-g)",marginLeft:"auto",flexShrink:0},children:nt(e.sortKey)})]})})]},`lifecycle-${e.sortKey}-${a}-${t}`);if(e.kind==="change"){let C=e.from.length>28?e.from.slice(0,28)+"\\u2026":e.from,I=e.to.length>28?e.to.slice(0,28)+"\\u2026":e.to,b=e.from.length>28||e.to.length>28;return(0,A.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:6,padding:"2px 0"},children:[(0,A.jsx)("span",{style:{fontSize:11,color:"var(--p-blue)",fontWeight:600,flexShrink:0,minWidth:18,paddingTop:1},children:"\\u270E"}),(0,A.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,A.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[!r&&(0,A.jsxs)("span",{style:{fontSize:11,fontWeight:600,color:"var(--p-blue-300)"},children:["\\u{1F464} ",e.actor]}),!r&&(0,A.jsx)(nm,{source:e.source}),(0,A.jsxs)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:["changed ",(0,A.jsx)("strong",{style:{color:"var(--p-text)"},children:e.field})]}),!r&&(0,A.jsx)("span",{style:{fontSize:10,color:"var(--p-text-g)",marginLeft:"auto",flexShrink:0},children:nt(e.sortKey)})]}),(0,A.jsxs)("div",{title:b?`${e.from} \\u2192 ${e.to}`:void 0,style:{marginTop:2,fontSize:11,color:"var(--p-text-g)",display:"flex",alignItems:"center",gap:4,cursor:b?"help":"default"},children:[(0,A.jsx)("span",{style:{color:"var(--p-red)",background:"rgba(239,68,68,0.1)",borderRadius:4,padding:"1px 5px",maxWidth:120,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C}),(0,A.jsx)("span",{style:{color:"var(--p-text-g)"},children:"\\u2192"}),(0,A.jsx)("span",{style:{color:"var(--p-green)",background:"rgba(34,197,94,0.1)",borderRadius:4,padding:"1px 5px",maxWidth:120,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:I})]})]})]},`change-${e.sortKey}-${a}-${t}`)}if(e.kind==="file"){let{file:m,url:C}=e;return(0,A.jsx)(au,{file:m,url:C,variant:"compact",onPreview:L?(I,b)=>L(I.name,b):void 0,onDelete:p?I=>(p(I),Promise.resolve()):void 0},`file-${m.name}-${a}-${t}`)}let v=e.comment,y=v.author==="agent",M=v.type==="system",c=v.deleted===!0,d=!!v.id&&!y&&!M&&!c&&v.isOwnComment!==!1,i=n===v.id;return M?(0,A.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"2px 0",fontSize:11,color:"var(--p-text-g)",fontStyle:"italic"},children:[(0,A.jsx)("span",{style:{opacity:.6},children:"\\u2B21"}),(0,A.jsx)("span",{children:v.text}),!r&&(0,A.jsx)("span",{style:{marginLeft:"auto",flexShrink:0,opacity:.6},children:nt(v.createdAt)})]},v.id):(0,A.jsxs)("div",{className:"flex flex-col gap-1 group/comment",style:{paddingTop:r?2:4},children:[!r&&(0,A.jsxs)("div",{className:"flex items-center justify-between gap-1.5 text-xs mb-0.5",children:[(0,A.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,A.jsx)("span",{style:{color:c?"var(--p-text-g)":y?"var(--p-purple)":"var(--p-blue-300)"},children:y?"\\u{1F916} Agent":`\\u{1F464} ${v.authorName??o}`}),(0,A.jsx)(nm,{source:v.source}),(0,A.jsxs)("span",{style:{color:"var(--p-text-g)"},children:[nt(v.createdAt),!c&&v.updatedAt?" \\xB7 edited":"",c?" \\xB7 deleted":""]})]}),d&&(0,A.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover/comment:opacity-100 transition-opacity",children:[(0,A.jsx)("button",{onClick:()=>{s(v.id),f(v.text)},className:"p-1 rounded hover:bg-slate-700 transition-colors",title:"Edit",children:(0,A.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:"\\u270E"})}),(0,A.jsx)("button",{onClick:()=>h(v),className:"p-1 rounded hover:bg-red-900/40 transition-colors",title:"Delete",children:(0,A.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:"\\u2715"})})]})]}),r&&(0,A.jsxs)("div",{className:"flex items-center justify-between gap-1.5",style:{marginBottom:2},children:[(0,A.jsxs)("span",{style:{fontSize:10,color:"var(--p-text-g)"},children:[nt(v.createdAt),!c&&v.updatedAt?" \\xB7 edited":"",c?" \\xB7 deleted":""]}),d&&(0,A.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover/comment:opacity-100 transition-opacity",children:[(0,A.jsx)("button",{onClick:()=>{s(v.id),f(v.text)},className:"p-1 rounded hover:bg-slate-700 transition-colors",title:"Edit",children:(0,A.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:"\\u270E"})}),(0,A.jsx)("button",{onClick:()=>h(v),className:"p-1 rounded hover:bg-red-900/40 transition-colors",title:"Delete",children:(0,A.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:"\\u2715"})})]})]}),i?(0,A.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,A.jsx)(Zr,{ref:u,value:l,onChange:f,baseRows:4,maxRows:12,onKeyDown:m=>{m.key==="Enter"&&(m.ctrlKey||m.metaKey)&&(m.preventDefault(),g(v,l).then(()=>s(null)))},style:{width:"100%",background:"var(--p-input)",border:"1px solid var(--p-border-s)",borderRadius:6,padding:"8px 10px",fontSize:12,color:"var(--p-text)",outline:"none",fontFamily:"inherit",boxSizing:"border-box"}}),(0,A.jsxs)("div",{style:{display:"flex",gap:6,justifyContent:"flex-end"},children:[(0,A.jsx)("button",{onClick:()=>s(null),style:{padding:"4px 10px",background:"var(--p-surface)",border:"none",borderRadius:5,fontSize:11,color:"var(--p-text-sub)",cursor:"pointer"},children:"Cancel"}),(0,A.jsx)("button",{onClick:async()=>{await g(v,l),s(null)},style:{padding:"4px 10px",background:"var(--p-blue)",border:"none",borderRadius:5,fontSize:11,color:"var(--p-white)",cursor:"pointer"},children:"Save"})]})]}):c?(0,A.jsx)("div",{style:{padding:"8px 14px",fontSize:12,color:"var(--p-text-g)",fontStyle:"italic",background:"var(--p-input)",border:"1px dashed var(--p-border)",borderRadius:8},children:"Comment deleted"}):(0,A.jsx)(za,{markdown:v.text,style:{background:"var(--p-input)",border:"1px solid var(--p-border)",borderRadius:8,padding:"10px 14px",fontSize:12,color:"var(--p-text-sub)",lineHeight:1.6}})]},v.id)}var lm=D(Ie(),1);var Ua=D(N(),1);function Ni({files:e,loading:t,error:a,baseUrl:r,onPreview:o,onDelete:n}){let[l,u]=lm.default.useState(null);return t?(0,Ua.jsx)("p",{style:{color:"var(--p-text-g)",fontSize:12,textAlign:"center",padding:"16px 0"},children:"Loading\\u2026"}):a?(0,Ua.jsx)("p",{style:{color:"var(--p-red-500)",fontSize:12,textAlign:"center",padding:"8px 0"},children:"Failed to load."}):e.length===0?(0,Ua.jsx)("p",{style:{color:"var(--p-text-g)",fontSize:12,textAlign:"center",padding:"16px 0"},children:"No files attached."}):(0,Ua.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[e.map(s=>{let f=s.url??`${r}/api/files/${encodeURIComponent(s.name)}`;return(0,Ua.jsx)(au,{file:s,url:f,variant:"normal",onPreview:g=>o(g),onDelete:n?g=>(u(g),Promise.resolve()):void 0},s.name)}),n&&(0,Ua.jsx)($t,{open:l!==null,message:l?`Delete "${l.name}"? This action cannot be undone.`:"",onConfirm:()=>{l&&n(l),u(null)},onCancel:()=>u(null)})]})}var _i=D(Ie(),1);var Jr=D(Ie(),1),um=D(jr(),1);var Ft=D(N(),1);function mn({value:e,onChange:t,previewValue:a,showPreview:r,setShowPreview:o,previewId:n,textareaId:l,placeholder:u,previewEmptyText:s,previewMinHeight:f=54,previewMaxHeight:g=220,baseRows:h=5,maxRows:p=12,autoFocus:L=!1,textareaRef:v,onKeyDown:y,afterTextarea:M,onBlur:c}){let d=Jr.default.useRef(null),[i,m]=Jr.default.useState([]),[C,I]=Jr.default.useState(null),[b,P]=Jr.default.useState(null);Jr.default.useEffect(()=>{let V=!0;return fetch("/api/tasks").then(G=>G.json()).then(G=>{if(!V)return;let oe=(G.tasks??[]).map(ee=>({id:String(ee.id??""),title:String(ee.title??"")})).filter(ee=>ee.id.length>0);m(oe)}).catch(()=>{}),()=>{V=!1}},[]);function B(V){let G=d.current;if(!G){I(null);return}let oe=G.selectionStart??V.length,ee=V.slice(0,oe),De=-1;for(let fe=ee.length-1;fe>=0;fe--){if(ee[fe]!=="#")continue;let Q=fe>0?ee[fe-1]:"";if(Q&&!/\\s/.test(Q))continue;let Se=ee.slice(fe+1);if(!Se.includes("#")){if(Se.length>80)return;De=fe;break}}if(De===-1){I(null);return}let z=ee.slice(De+1).trim().toLowerCase(),Fe=i.filter(fe=>{if(!z)return!0;let Q=fe.id.toLowerCase(),Se=fe.title.toLowerCase();return Q.includes(z)||Se.includes(z)}).sort((fe,Q)=>{let Se=fe.id.toLowerCase().startsWith(z)?1:0,Ze=Q.id.toLowerCase().startsWith(z)?1:0;if(Se!==Ze)return Ze-Se;let Ct=fe.title.toLowerCase().startsWith(z)?1:0,Ge=Q.title.toLowerCase().startsWith(z)?1:0;return Ct!==Ge?Ge-Ct:fe.id.localeCompare(Q.id)}).slice(0,6);if(!Fe.length){I(null),P(null);return}let he=G.getBoundingClientRect();P({top:he.top,left:he.left,width:he.width}),I({queryStart:De,queryEnd:oe,items:Fe})}function q(V){let G=C;if(!G)return;let oe=`${e.slice(0,G.queryStart)}#${V} ${e.slice(G.queryEnd)}`;t(oe),I(null),P(null),requestAnimationFrame(()=>{let ee=d.current;if(!ee)return;let De=G.queryStart+V.length+2;ee.focus(),ee.setSelectionRange(De,De)})}return r?(0,Ft.jsx)("div",{id:n,onClick:V=>{V.target.closest("a")||o(!1)},title:"Click to edit",style:{cursor:"text",minHeight:f,background:"var(--p-input)",border:"1px solid var(--p-border-s)",borderRadius:8,padding:10,fontSize:12,color:"var(--p-text-sub)",lineHeight:1.7,overflow:"auto",maxHeight:g},children:(a??e).trim()?(0,Ft.jsx)(za,{markdown:a??e}):(0,Ft.jsx)("span",{style:{color:"var(--p-border-t)"},children:s??u})}):(0,Ft.jsxs)("div",{style:{position:"relative"},children:[(0,Ft.jsx)(Zr,{id:l,ref:V=>{d.current=V,v&&(v.current=V)},className:"dp-textarea",placeholder:u,value:e,onChange:V=>{t(V),B(V)},onFocus:()=>o(!1),onBlur:()=>{I(null),P(null),o(!0),c==null||c()},baseRows:h,maxRows:p,autoFocus:L,onKeyDown:V=>{V.key==="Escape"&&(I(null),P(null)),y==null||y(V)}}),C&&b&&(0,um.createPortal)((0,Ft.jsx)("div",{"data-task-ref-suggest":"true",style:{position:"fixed",left:b.left+8,width:b.width-16,top:b.top,transform:"translateY(-100%)",border:"1px solid var(--p-border-s)",background:"var(--p-card)",borderRadius:8,boxShadow:"var(--p-shadow-lg)",overflow:"hidden",zIndex:9999},children:C.items.map(V=>(0,Ft.jsxs)("button",{type:"button",onMouseDown:G=>{G.preventDefault(),q(V.id)},style:{width:"100%",display:"flex",alignItems:"center",gap:8,textAlign:"left",border:"none",borderBottom:"1px solid var(--p-border)",background:"transparent",color:"var(--p-text-sub)",padding:"7px 10px",fontSize:11,cursor:"pointer"},onMouseEnter:G=>{G.currentTarget.style.background="var(--p-hover)"},onMouseLeave:G=>{G.currentTarget.style.background="transparent"},children:[(0,Ft.jsxs)("span",{style:{fontFamily:"monospace",color:"var(--p-blue-300)"},children:["#",V.id]}),(0,Ft.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:V.title})]},V.id))}),document.body),M]})}var H=D(N(),1);function qi({task:e,description:t,setDescription:a,showDescPreview:r,setShowDescPreview:o,priority:n,setPriority:l,onDescriptionBlur:u,onDescriptionDiscard:s,originalDescription:f,onPriorityChange:g,githubUrl:h,onFilePreview:p,onPatch:L,onDeleteScreenshot:v,liveFiles:y}){let M=(e==null?void 0:e.files)??[],c=y?y.map(B=>({name:B.name,linkedPath:B.linkedPath,addedAt:B.createdAt,url:B.url})):M,d=c==null?void 0:c.find(B=>/\\.(png|jpe?g|gif|webp|svg|avif)$/i.test(B.name)),i=e&&d?d.url||`/api/tasks/${e.id}/files/${encodeURIComponent(d.name)}`:null,m=_i.default.useRef(null),[C,I]=_i.default.useState(null),{userPart:b,consolePart:P}=Ox(t);return(0,H.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,H.jsxs)("div",{children:[(0,H.jsx)("div",{className:"dp-meta-label",style:{marginBottom:4},children:"Description"}),(0,H.jsx)(mn,{value:t,previewValue:P?b:void 0,onChange:a,onBlur:u,showPreview:r,setShowPreview:o,previewId:"dp-desc-preview",textareaId:"dp-desc",placeholder:"Description (markdown)\\u2026",previewMinHeight:80,previewMaxHeight:220,baseRows:6,maxRows:12,autoFocus:!0,textareaRef:m,afterTextarea:s&&f!==void 0&&t!==f?(0,H.jsx)("button",{type:"button",onMouseDown:B=>{B.preventDefault(),s()},title:"Discard changes and restore saved description",style:{marginTop:4,display:"flex",alignItems:"center",gap:4,fontSize:11,color:"var(--p-text-g)",background:"none",border:"1px solid var(--p-border-t)",borderRadius:6,padding:"3px 8px",cursor:"pointer",transition:"color .12s, border-color .12s"},onMouseEnter:B=>{B.currentTarget.style.color="var(--p-amber-300)",B.currentTarget.style.borderColor="var(--p-amber-300)"},onMouseLeave:B=>{B.currentTarget.style.color="var(--p-text-g)",B.currentTarget.style.borderColor="var(--p-border-t)"},children:"\\u21A9 Discard changes"}):void 0})]}),P&&(0,H.jsx)(zx,{logs:P}),e&&d&&i&&(0,H.jsxs)("div",{children:[(0,H.jsx)("div",{className:"dp-meta-label",children:"Screenshot"}),(0,H.jsxs)("div",{id:"dp-screenshot-preview",style:{border:"1px solid color-mix(in srgb, var(--p-border-t) 70%, transparent)",borderRadius:10,overflow:"hidden",background:"var(--p-card)"},children:[(0,H.jsx)("button",{onClick:()=>p(d.name,i),style:{width:"100%",height:112,border:"none",padding:0,background:"linear-gradient(135deg, var(--p-border), var(--p-bg))",cursor:"pointer",display:"block",overflow:"hidden"},title:"Preview screenshot",children:(0,H.jsx)("img",{src:i,alt:"Task screenshot",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})}),(0,H.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",borderTop:"1px solid var(--p-border)",background:"var(--p-surface)"},children:[(0,H.jsx)("span",{style:{fontSize:10,color:"var(--p-text-f)",flex:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:d.addedAt?`Captured ${nt(d.addedAt)}`:"Screenshot attached"}),(0,H.jsx)("button",{onClick:()=>p(d.name,i),style:{fontSize:10,color:"var(--p-text-m)",background:"transparent",border:"none",cursor:"pointer",padding:0},title:"Preview screenshot",children:"Preview"}),(0,H.jsx)("button",{onClick:()=>I(d.name),style:{fontSize:10,color:"var(--p-red)",background:"transparent",border:"none",cursor:"pointer",padding:0},title:"Remove screenshot",children:"Remove"})]})]})]}),(0,H.jsxs)("div",{children:[(0,H.jsx)("div",{className:"dp-meta-label",children:"Priority"}),(0,H.jsxs)("select",{id:"dp-priority",className:"dp-input",value:n,onChange:B=>{let q=B.target.value;l(q),g==null||g(q)},style:{padding:"5px 8px",fontSize:12,cursor:"pointer",width:"auto"},children:[(0,H.jsx)("option",{value:"",children:"\\u2014"}),(0,H.jsx)("option",{value:"Critical",children:"Critical"}),(0,H.jsx)("option",{value:"High",children:"High"}),(0,H.jsx)("option",{value:"Medium",children:"Medium"}),(0,H.jsx)("option",{value:"Low",children:"Low"})]})]}),e&&(0,H.jsxs)("div",{id:"dp-metadata",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[(0,H.jsx)(Hi,{label:"Created",id:"dp-created",children:e.createdAt?nt(e.createdAt):"\\u2014"}),(0,H.jsx)(Hi,{label:"ID",id:"dp-id",children:(0,H.jsx)("span",{style:{fontFamily:"monospace"},children:e.id})}),(0,H.jsx)(Hi,{label:"Author",id:"dp-author",children:e.authorName??e.author??"\\u2014"}),e.commit&&(0,H.jsx)(Bx,{task:e,githubUrl:h}),e.annotatedElementText&&(0,H.jsxs)("div",{id:"dp-annotated-text",style:{gridColumn:"1 / -1",background:"var(--p-card)",borderRadius:8,padding:"8px 10px"},children:[(0,H.jsx)("div",{style:{fontSize:9,color:"var(--p-border-t)",marginBottom:2,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Annotated element text"}),(0,H.jsx)("div",{style:{fontSize:11,color:"var(--p-text-f)",fontStyle:"italic",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.annotatedElementText})]})]}),(0,H.jsx)($t,{open:C!==null,message:"Remove this screenshot? This action cannot be undone.",confirmLabel:"Remove",onConfirm:()=>{C&&v(C),I(null)},onCancel:()=>I(null)})]})}function Hi({label:e,id:t,children:a}){return(0,H.jsxs)("div",{id:t,style:{background:"var(--p-card)",borderRadius:8,padding:"8px 10px"},children:[(0,H.jsx)("div",{style:{fontSize:9,color:"var(--p-border-t)",marginBottom:2,textTransform:"uppercase",letterSpacing:"0.04em"},children:e}),(0,H.jsx)("div",{style:{fontSize:11,color:"var(--p-text-f)",borderBottom:"1px solid var(--p-border)",paddingBottom:4,display:"flex",alignItems:"center",minHeight:16},children:a})]})}function Bx({task:e,githubUrl:t}){var n;let a=(n=e.commits)!=null&&n.length?e.commits:[{sha:e.commit,message:e.title??"",timestamp:e.createdAt??""}],r=a[a.length-1],o=a.map(l=>`${l.sha.slice(0,8)} ${l.timestamp?new Date(l.timestamp).toLocaleString():""} ${l.message.slice(0,60)}`).join(`\n`);return(0,H.jsxs)("div",{id:"dp-commit",style:{background:"var(--p-card)",borderRadius:8,padding:"8px 10px",cursor:"default"},title:a.length>1?`All commits:\n${o}`:`${r.sha}\n${r.message}`,children:[(0,H.jsxs)("div",{style:{fontSize:9,color:"var(--p-border-t)",marginBottom:2,textTransform:"uppercase",letterSpacing:"0.04em"},children:["Commit",a.length>1?"s":""]}),(0,H.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[t&&e.commitPushed!==!1?(0,H.jsxs)("a",{href:`${t}/commit/${r.sha}`,target:"_blank",rel:"noopener noreferrer",style:{fontSize:10,color:"var(--p-blue-300)",fontFamily:"monospace",textDecoration:"none"},title:"Open diff on GitHub",onClick:l=>l.stopPropagation(),children:[r.sha.slice(0,8)," \\u2197"]}):(0,H.jsxs)("span",{style:{fontSize:10,color:"var(--p-text-f)",fontFamily:"monospace"},title:e.commitPushed===!1?"Commit not pushed to remote yet":void 0,children:[r.sha.slice(0,8),e.commitPushed===!1?" \\u23F3":""]}),a.length>1&&(0,H.jsxs)("span",{style:{fontSize:9,color:"var(--p-blue)",background:"color-mix(in srgb, var(--p-blue) 12%, transparent)",border:"1px solid color-mix(in srgb, var(--p-blue) 25%, transparent)",borderRadius:10,padding:"0 5px",fontWeight:600},children:["+",a.length-1]})]})]})}function Ox(e){let a=e.indexOf(`\n---\n**Console logs**`);return a===-1?{userPart:e,consolePart:null}:{userPart:e.slice(0,a).trim(),consolePart:e.slice(a+1).trim()}}function zx({logs:e}){let t=e.replace(/^---\\s*\\n/,"").split(`\n`).filter(a=>a.trim());return(0,H.jsxs)("div",{id:"dp-console-logs",style:{borderRadius:8,border:"1px solid color-mix(in srgb, var(--p-red) 30%, var(--p-border))",background:"color-mix(in srgb, var(--p-red) 4%, var(--p-card))",overflow:"hidden"},children:[(0,H.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 10px",borderBottom:"1px solid color-mix(in srgb, var(--p-red) 20%, var(--p-border))",background:"color-mix(in srgb, var(--p-red) 8%, var(--p-card))"},children:[(0,H.jsx)("span",{style:{fontSize:10,fontWeight:700,color:"color-mix(in srgb, var(--p-red) 80%, var(--p-text-sub))",letterSpacing:"0.05em",textTransform:"uppercase"},children:"Console Logs"}),(0,H.jsx)("span",{style:{fontSize:9,color:"var(--p-text-g)",marginLeft:"auto"},children:"captured at submission"})]}),(0,H.jsxs)("div",{style:{padding:"6px 10px",maxHeight:200,overflowY:"auto",display:"flex",flexDirection:"column",gap:3},children:[t.map((a,r)=>{let o=a.includes("\\u{1F534}"),n=a.includes("\\u{1F7E1}"),l=a.replace(/^[-*]\\s*/,"");return(0,H.jsx)("div",{style:{fontFamily:"Menlo, monospace",fontSize:10,lineHeight:1.5,color:o?"var(--p-red)":n?"var(--p-amber-300)":"var(--p-text-f)",wordBreak:"break-all"},children:l},r)}),t.length===0&&(0,H.jsx)("div",{style:{fontSize:10,color:"var(--p-text-g)",fontStyle:"italic"},children:"No log entries captured."})]})]})}var eo=D(N(),1);function Wi({commentInput:e,setCommentInput:t,commentSubmitting:a,onSubmit:r,baseRows:o=4}){return(0,eo.jsx)("div",{id:"dp-comment-input-area",children:(0,eo.jsx)(mn,{value:e,onChange:t,showPreview:!1,setShowPreview:()=>{},previewId:"dp-comment-tab-edit",textareaId:"dp-comment-input",placeholder:"Add a comment\\u2026 (markdown)",previewEmptyText:"Leave a comment (markdown)\\u2026",previewMinHeight:o<=2?36:54,previewMaxHeight:140,baseRows:o,maxRows:10,autoFocus:!0,onKeyDown:n=>{n.key==="Enter"&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),r())},afterTextarea:(0,eo.jsx)("button",{id:"dp-comment-submit",disabled:a,onMouseDown:n=>{n.preventDefault(),r()},title:"Send (Ctrl+Enter)",style:{position:"absolute",bottom:16,right:8,width:26,height:26,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--p-blue)",border:"none",borderRadius:6,cursor:"pointer",color:"var(--p-white)",transition:"background .15s"},children:(0,eo.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block"},children:(0,eo.jsx)("path",{d:"M2 8L14 2L10 8L14 14L2 8Z",fill:"currentColor"})})})})})}var T=D(N(),1),Ux="vibeflow-paste-hint-dismissed";function Nx({storageKey:e=Ux}){let[t,a]=W.default.useState(()=>{try{return!localStorage.getItem(e)}catch{return!0}});if(!t)return null;function r(){try{localStorage.setItem(e,"1")}catch{}a(!1)}return(0,T.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",margin:"0 0 6px",borderRadius:6,background:"rgba(37,99,235,0.08)",border:"1px solid rgba(37,99,235,0.18)",fontSize:11,color:"var(--p-blue-300)",flexShrink:0},children:[(0,T.jsxs)("span",{style:{flex:1,lineHeight:1.4},children:["\\u{1F4A1} ",(0,T.jsx)("strong",{children:"Tip:"})," Paste screenshots or files anywhere in this panel \\u2014 they attach automatically."]}),(0,T.jsx)("button",{onClick:r,title:"Dismiss",style:{flexShrink:0,background:"none",border:"none",cursor:"pointer",padding:2,color:"var(--p-blue-300)",opacity:.7,display:"flex",alignItems:"center"},onMouseEnter:o=>{o.currentTarget.style.opacity="1"},onMouseLeave:o=>{o.currentTarget.style.opacity="0.7"},children:(0,T.jsx)($e,{style:{width:12,height:12}})})]})}var Hx=[{id:"backlog",label:"backlog"},{id:"todo",label:"todo"},{id:"in-progress",label:"in-progress"},{id:"review",label:"review"},{id:"done",label:"done"}],_x=5*1024*1024;function Vi(e,t=.8){return new Promise((a,r)=>{let o=new Image,n=URL.createObjectURL(e);o.onload=()=>{let l=document.createElement("canvas");l.width=o.naturalWidth,l.height=o.naturalHeight;let u=l.getContext("2d");if(!u){URL.revokeObjectURL(n),r(new Error("canvas unavailable"));return}u.drawImage(o,0,0),URL.revokeObjectURL(n),l.toBlob(s=>{s?a(s):r(new Error("canvas.toBlob failed"))},"image/jpeg",t)},o.onerror=()=>{URL.revokeObjectURL(n),r(new Error("image load failed"))},o.src=n})}function $i({open:e,task:t,tab:a,addColumnId:r="todo",gitUserName:o="You",githubUrl:n,baseUrl:l,isResizing:u,api:s,onClose:f,onSave:g,onCreate:h,onDelete:p,onPatch:L,onFilePreview:v,onActivityChange:y,externalLocalChanges:M=[],showLockIndicator:c=!0,lockedByUser:d,onGoBack:i,navBackLabel:m,commentVersion:C}){let I=!t,b=t?fn(t.type):fn("Task"),P=W.default.useRef(null),[B,q]=W.default.useState([]),V=W.default.useRef(!1),G=W.default.useRef(""),oe=W.default.useRef(""),[ee,De]=W.default.useState(a),[z,Fe]=W.default.useState(""),[he,fe]=W.default.useState(""),[Q,Se]=W.default.useState(r),[Ze,Ct]=W.default.useState("Task"),[Ge,Gt]=W.default.useState(""),[pr,Ha]=W.default.useState(!1),[Bt,mr]=W.default.useState(!1),[ao,Ot]=W.default.useState(!1),[sa,hn]=W.default.useState([]),[uu,xn]=W.default.useState(!1),[su,vn]=W.default.useState(null),[jt,Kt]=W.default.useState(""),[iu,Ln]=W.default.useState(!1),[Xt,yn]=W.default.useState([]),[Sn,In]=W.default.useState(!1),[du,Cn]=W.default.useState(null),[ro,oo]=W.default.useState(0),_a=W.default.useRef(0),[x,k]=W.default.useState(0),[O,te]=W.default.useState(null),[ce,Y]=W.default.useState([]),Z=W.default.useRef(null),ne=W.default.useRef(()=>{}),Ne=W.default.useRef(""),Je=W.default.useRef(!1);W.default.useEffect(()=>{Ne.current=jt},[jt]),W.default.useEffect(()=>{Je.current=ao},[ao]),W.default.useEffect(()=>{V.current=u??!1},[u]),W.default.useEffect(()=>{e||y==null||y(null,"viewing")},[e]),W.default.useEffect(()=>{if(!e||!t)return;z!==G.current||he!==oe.current?y==null||y(t.id,"locked"):y==null||y(t.id,"viewing")},[z,he,e,t==null?void 0:t.id]),W.default.useEffect(()=>{if(!e)return;function S(E){var U,xe,se,wt;if(!V.current&&!((xe=(U=E.target)==null?void 0:U.closest)!=null&&xe.call(U,"[data-task-ref-suggest]"))&&!((wt=(se=E.target)==null?void 0:se.closest)!=null&&wt.call(se,".modal-backdrop"))&&P.current&&!P.current.contains(E.target)){if(Je.current)return;if(Ne.current.trim().length>0){ne.current(),Ot(!0);return}ne.current(),f()}}return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[e,f]),W.default.useEffect(()=>{if(!e)return;function S(E){if(E.key==="Escape"){if(Je.current){Ot(!1),E.stopPropagation();return}if(Ne.current.trim().length>0){E.stopPropagation(),ne.current(),Ot(!0);return}}}return document.addEventListener("keydown",S,{capture:!0}),()=>document.removeEventListener("keydown",S,{capture:!0})},[e]),W.default.useEffect(()=>{if(e){if(De(a),Ha(!!t),Kt(""),hn([]),yn([]),oo(0),k(0),Y([]),t){let S=(t.title??"").trim(),E=(t.description??"").trim();Fe(S),fe(E),Se(t.status),Ct(t.type??"Task"),Gt(t.priority??""),G.current=S,oe.current=E,y==null||y(t.id,"viewing")}else Fe(""),fe(""),Se(r),Ct("Task"),Gt("");t&&(lt(t.id),zt(t.id)),setTimeout(()=>{var S;return(S=Z.current)==null?void 0:S.focus()},50)}},[e,t==null?void 0:t.id,a]),W.default.useEffect(()=>{!e||!t||(ee==="comments"?(R(t.id),zt(t.id)):ee==="files"&&zt(t.id))},[ee,e,t==null?void 0:t.id]),W.default.useEffect(()=>{if(!e||!t||z!==G.current||he!==oe.current)return;let E=(t.title??"").trim(),U=(t.description??"").trim();(E!==G.current||U!==oe.current)&&(Fe(E),fe(U),G.current=E,oe.current=U),t.status&&t.status!==Q&&Se(t.status),t.type&&t.type!==Ze&&Ct(t.type),t.priority!==void 0&&t.priority!==Ge&&Gt(t.priority??"")},[t==null?void 0:t.title,t==null?void 0:t.description,t==null?void 0:t.status,t==null?void 0:t.type,t==null?void 0:t.priority]),W.default.useEffect(()=>{!e||!t||C===void 0||(ee==="comments"?R(t.id):lt(t.id))},[C]);async function lt(S){var E,U;try{let[xe,se]=await Promise.all([s.getComments(S),s.getFiles(S)]);oo(((E=xe.comments)==null?void 0:E.length)??0),k(((U=se.files)==null?void 0:U.length)??0)}catch{}}async function R(S){var U;let E=++_a.current;xn(!0),vn(null);try{let xe=await s.getComments(S);if(_a.current!==E)return;hn(xe.comments??[]),oo(((U=xe.comments)==null?void 0:U.length)??0)}catch{if(_a.current!==E)return;vn("failed")}finally{_a.current===E&&xn(!1)}}async function zt(S){var E;In(!0),Cn(null);try{let U=await s.getFiles(S);yn(U.files??[]),k(((E=U.files)==null?void 0:E.length)??0)}catch{Cn("failed")}finally{In(!1)}}async function qa(){var S;if(!z.trim()){(S=Z.current)==null||S.focus();return}if(!I&&jt.trim()&&await gr(),I){let E=await h({title:z.trim(),description:he.trim()||z.trim(),status:Q,type:Ze,priority:Ge||void 0,selector:"/"});if(E&&B.length>0){for(let U of B)await s.uploadFile(E,U).catch(()=>null);q([])}f()}else pt()}function pt(){if(!t||I)return;let S=z.trim();if(!S)return;let E=G.current,U=oe.current,xe=S!==E,se=he.trim()!==U;!xe&&!se||(xe&&ia("title",E,S),se&&ia("description",U,he.trim()),L(t.id,{title:S,description:he.trim(),type:Ze,priority:Ge||void 0}),G.current=S,oe.current=he.trim())}ne.current=pt;function ia(S,E,U){E!==U&&Y(xe=>[...xe,{field:S,from:E,to:U,actor:o,timestamp:new Date().toISOString()}])}async function gr(){if(!(!t||!jt.trim())){Ln(!0);try{await s.addComment(t.id,jt.trim()),Kt(""),await R(t.id)}finally{Ln(!1)}}}async function wn(S,E){t&&(await s.updateComment(t.id,S.id,E),await R(t.id))}async function vm(S){t&&(await s.deleteComment(t.id,S.id),await R(t.id))}async function Lm(S){if(!t)return;let E=t.id;te(null);for(let U of Array.from(S.target.files??[])){if(!U.type.startsWith("image/")&&U.size>_x){te(`"${U.name}" exceeds the 5 MB limit and was skipped.`);continue}let xe;if(U.type.startsWith("image/")){let se=await Vi(U),wt=U.name.replace(/\\.(png|bmp|gif|webp|tiff?)$/i,".jpg");xe=new File([se],wt,{type:"image/jpeg"})}else xe=U;await s.uploadFile(E,xe)}S.target.value="",await zt(E),lt(E)}async function ym(S){if(!t)return;te(null);let E=await Vi(S),xe=`paste-${new Date().toISOString().replace(/[:.]/g,"-").slice(0,19)}.jpg`,se=new File([E],xe,{type:"image/jpeg"});await s.uploadFile(t.id,se),await zt(t.id),lt(t.id)}async function Sm(S){if(!t)return;let E=Array.from(S.items),U=E.find(se=>se.type.startsWith("image/"));if(U){let se=U.getAsFile();se&&await ym(se);return}let xe=E.filter(se=>se.kind==="file"&&!se.type.startsWith("image/"));if(xe.length>0){for(let se of xe){let wt=se.getAsFile();wt&&await s.uploadFile(t.id,wt)}await zt(t.id),lt(t.id);return}}W.default.useEffect(()=>{if(!e)return;function S(E){if(!E.clipboardData)return;let U=E.target;if(!((U.tagName==="TEXTAREA"||U.tagName==="INPUT"||U.isContentEditable)&&!Array.from(E.clipboardData.items).some(hr=>hr.kind==="file"))){if(E.preventDefault(),!t){let wt=Array.from(E.clipboardData.items).find(hr=>hr.type.startsWith("image/"));if(wt){let hr=wt.getAsFile();hr&&(async()=>{let Pm=await Vi(hr),Tm=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),Rm=new File([Pm],`paste-${Tm}.jpg`,{type:"image/jpeg"});q(Dm=>[...Dm,Rm])})()}return}Sm(E.clipboardData)}}return document.addEventListener("paste",S),()=>document.removeEventListener("paste",S)},[e,t==null?void 0:t.id]);async function Xi(S){t&&(await s.deleteFile(t.id,S.name),await zt(t.id),lt(t.id))}async function Im(S){if(!t)return;await s.deleteFile(t.id,S);let E=(t.files??[]).filter(U=>U.name!==S);L(t.id,{files:E}),await zt(t.id),lt(t.id)}function Cm(S){Se(S),!I&&t&&L(t.id,{status:S})}let wm=S=>S!==Q?"dp-status-btn":`dp-status-btn active-${S}`;function Qi(){if(!Je.current){if(Ne.current.trim().length>0){ne.current(),Ot(!0);return}ne.current(),f()}}let km=e&&t!=null&&(z!==G.current||he!==oe.current),bm=W.default.useMemo(()=>{let S=[...M,...ce].sort((U,xe)=>new Date(U.timestamp).getTime()-new Date(xe.timestamp).getTime()),E=[];for(let U of S)E.some(se=>se.field===U.field&&se.from.toLowerCase()===U.from.toLowerCase()&&se.to.toLowerCase()===U.to.toLowerCase()&&se.actor===U.actor&&Math.abs(new Date(se.timestamp).getTime()-new Date(U.timestamp).getTime())<=3e3)||E.push(U);return E},[M,ce]),Wa=!I&&!!d;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)("aside",{id:"detail-panel",className:"open",ref:P,children:[Wa&&(0,T.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:"rgba(234,88,12,0.12)",border:"1px solid rgba(234,88,12,0.25)",borderRadius:6,margin:"8px 12px 0",fontSize:12,color:"#f97316",fontWeight:500},children:["\\u{1F512} Locked by ",(0,T.jsx)("strong",{children:d})," \\u2014 editing disabled until they finish."]}),(0,T.jsxs)("div",{className:"dp-header",children:[(0,T.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10},children:[i&&(0,T.jsx)("button",{id:"dp-back",onClick:i,title:m?`Back to: ${m}`:"Go back",style:{width:26,height:26,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,border:"1px solid var(--p-border-t)",background:"transparent",color:"var(--p-text-g)",cursor:"pointer",transition:"background .12s,color .12s",fontSize:14,lineHeight:1},onMouseOver:S=>{S.currentTarget.style.background="var(--p-border)",S.currentTarget.style.color="var(--p-blue-300)",S.currentTarget.style.borderColor="var(--p-blue)"},onMouseOut:S=>{S.currentTarget.style.background="transparent",S.currentTarget.style.color="var(--p-text-g)",S.currentTarget.style.borderColor="var(--p-border-t)"},children:"\\u2190"}),(0,T.jsx)(eu,{id:"dp-type-picker",value:Ze,disabled:Wa,onChange:S=>{!I&&t&&S!==Ze&&ia("type",Ze,S),Ct(S),!I&&t&&L(t.id,{type:S})}}),(0,T.jsx)("input",{id:"dp-title",ref:Z,className:"dp-input",type:"text",placeholder:"Task title\\u2026",value:z,readOnly:Wa,onChange:S=>Fe(S.target.value),onKeyDown:S=>{S.key==="Escape"&&(S.stopPropagation(),Qi()),S.key==="Enter"&&I&&qa()},style:{flex:1,fontSize:14,fontWeight:600,padding:"4px 8px",borderColor:"transparent",background:"transparent"},onFocus:S=>{S.currentTarget.style.borderColor="var(--p-blue)",S.currentTarget.style.background="var(--p-input)"},onBlur:S=>{S.currentTarget.style.borderColor="transparent",S.currentTarget.style.background="transparent",I||pt()}}),!I&&z!==G.current&&z.trim()!==""&&(0,T.jsx)("button",{type:"button",title:"Discard title changes",onMouseDown:S=>{S.preventDefault(),Fe(G.current)},style:{width:20,height:20,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,border:"1px solid var(--p-border-t)",background:"none",color:"var(--p-text-g)",cursor:"pointer",fontSize:13,lineHeight:1},onMouseEnter:S=>{S.currentTarget.style.color="var(--p-amber-300)",S.currentTarget.style.borderColor="var(--p-amber-300)"},onMouseLeave:S=>{S.currentTarget.style.color="var(--p-text-g)",S.currentTarget.style.borderColor="var(--p-border-t)"},children:"\\u21A9"}),(0,T.jsx)("button",{id:"dp-close",onClick:Qi,style:{width:26,height:26,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,border:"none",background:"transparent",color:"var(--p-text-g)",cursor:"pointer",transition:"background .12s,color .12s",pointerEvents:"auto"},onMouseOver:S=>{S.currentTarget.style.background="var(--p-border)",S.currentTarget.style.color="var(--p-text-m)"},onMouseOut:S=>{S.currentTarget.style.background="transparent",S.currentTarget.style.color="var(--p-text-g)"},children:(0,T.jsx)($e,{style:{width:14,height:14}})}),c&&km&&t&&(0,T.jsx)("span",{id:"dp-lock-indicator",title:`Locked by ${o} \\u2014 unsaved changes`,style:{display:"inline-flex",alignItems:"center",gap:3,flexShrink:0,borderRadius:999,padding:"2px 7px",fontSize:10,fontWeight:600,border:"1px solid rgba(244,114,182,0.35)",color:"#f9a8d4",background:"rgba(157,23,77,0.28)"},children:"\\u{1F512} Locked"})]}),(0,T.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",...Wa?{pointerEvents:"none",opacity:.6}:{}},children:[(0,T.jsx)("span",{style:{fontSize:10,color:"var(--p-text-g)",fontWeight:500,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Status"}),Hx.map(S=>(0,T.jsx)("button",{className:wm(S.id),"data-status":S.id,onClick:()=>Cm(S.id),children:S.label},S.id))]})]}),!I&&(0,T.jsxs)("div",{className:"dp-tabs",id:"dp-tabs-row",children:[(0,T.jsx)("button",{className:`dp-tab${ee==="details"?" active":""}`,id:"dp-tab-details",onClick:()=>De("details"),children:"Details"}),(0,T.jsxs)("button",{className:`dp-tab${ee==="comments"?" active":""}`,id:"dp-tab-activity",onClick:()=>De("comments"),children:["Activity ",ro>0&&(0,T.jsxs)("span",{id:"dp-activity-count",style:{color:"var(--p-text-g)",fontSize:10},children:["(",ro,")"]})]}),(0,T.jsxs)("button",{className:`dp-tab${ee==="files"?" active":""}`,id:"dp-tab-files",onClick:()=>De("files"),children:["Files ",x>0&&(0,T.jsxs)("span",{id:"dp-file-count",style:{color:"var(--p-text-g)",fontSize:10},children:["(",x,")"]})]})]}),(0,T.jsxs)("div",{className:"dp-body",children:[!I&&(0,T.jsx)(Nx,{}),(0,T.jsxs)("div",{className:"dp-pane",id:"dp-details-pane",style:{display:!t||ee==="details"?"":"none"},children:[(0,T.jsx)("div",{style:Wa?{pointerEvents:"none",opacity:.6}:void 0,children:(0,T.jsx)(qi,{task:t,description:he,setDescription:fe,showDescPreview:pr,setShowDescPreview:Ha,priority:Ge,setPriority:Gt,onDescriptionBlur:I?void 0:pt,onDescriptionDiscard:I?void 0:()=>{fe(oe.current),Ha(!0)},originalDescription:I?void 0:oe.current,onPriorityChange:I?void 0:S=>{t&&(S!==Ge&&ia("priority",Ge||"\\u2014",S||"\\u2014"),L(t.id,{priority:S||void 0}))},githubUrl:n,onFilePreview:v,onDeleteScreenshot:Im,onPatch:L,liveFiles:Xt.length>0||Sn?Xt:void 0})}),!I&&t&&(0,T.jsx)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",flexShrink:0,marginTop:12,borderTop:"1px solid var(--p-border)",paddingTop:10},children:(0,T.jsx)(qx,{task:t})})]}),(0,T.jsxs)("div",{className:"dp-pane",id:"dp-activity-pane",style:{display:ee==="comments"&&!I?"":"none"},children:[(0,T.jsx)("div",{style:{borderBottom:"1px solid var(--p-border)",paddingBottom:8,flexShrink:0},children:(0,T.jsx)(Wi,{commentInput:jt,setCommentInput:Kt,commentSubmitting:iu,onSubmit:()=>void gr(),baseRows:2})}),(0,T.jsx)(Ui,{comments:sa,files:Xt,localChanges:bm,loading:uu,error:su,gitUserName:o,taskAuthorName:t==null?void 0:t.authorName,baseUrl:l,taskId:t==null?void 0:t.id,taskCreatedAt:t==null?void 0:t.createdAt,taskUpdatedAt:t==null?void 0:t.updatedAt,onEdit:wn,onDelete:vm,onDeleteFile:Xi,onFilePreview:v})]}),(0,T.jsxs)("div",{className:"dp-pane",id:"dp-files-pane",style:{display:ee==="files"&&!I?"":"none"},children:[(0,T.jsx)(Ni,{files:Xt,loading:Sn,error:du,baseUrl:l,onPreview:S=>v(S.name,S.linkedPath?`${l}/api/tasks/${t==null?void 0:t.id}/files/${encodeURIComponent(S.name)}`:`${l}${S.url}`),onDelete:Wa?void 0:Xi}),(0,T.jsxs)("div",{style:{borderTop:"1px solid var(--p-border)",paddingTop:8,flexShrink:0,display:"flex",gap:8,flexWrap:"wrap",alignItems:"center",...Wa?{pointerEvents:"none",opacity:.5}:{}},children:[O&&(0,T.jsx)("div",{style:{width:"100%",fontSize:11,color:"var(--p-red)",background:"rgba(255,80,80,0.08)",border:"1px solid rgba(255,80,80,0.2)",borderRadius:5,padding:"4px 8px"},children:O}),(0,T.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"6px 10px",background:"var(--p-card)",border:"1px solid var(--p-border)",borderRadius:8,color:"var(--p-text-m)",fontSize:12,transition:"all .15s"},onMouseOver:S=>{S.currentTarget.style.borderColor="var(--p-border-t)",S.currentTarget.style.color="var(--p-text)"},onMouseOut:S=>{S.currentTarget.style.borderColor="var(--p-border)",S.currentTarget.style.color="var(--p-text-m)"},children:[(0,T.jsx)(Qr,{style:{width:12,height:12}}),"Upload",(0,T.jsx)("input",{id:"dp-file-upload",type:"file",style:{display:"none"},multiple:!0,onChange:Lm})]}),(0,T.jsx)("span",{style:{fontSize:11,color:"var(--p-border-t)",marginLeft:"auto"},children:"or paste image"})]})]})]}),(0,T.jsxs)("div",{className:"dp-footer",children:[!I&&(0,T.jsx)("button",{id:"dp-delete",onClick:()=>mr(!0),style:{color:"var(--p-red)",background:"none",border:"1px solid var(--p-border-t)",borderRadius:7,padding:"5px 12px",fontSize:12,cursor:"pointer",fontFamily:"inherit",transition:"all .15s"},onMouseOver:S=>{S.currentTarget.style.borderColor="var(--p-red)"},onMouseOut:S=>{S.currentTarget.style.borderColor="var(--p-border-t)"},children:"Delete"}),(0,T.jsx)("div",{style:{flex:1}}),I?(0,T.jsxs)(T.Fragment,{children:[B.length>0&&(0,T.jsxs)("span",{style:{fontSize:11,color:"var(--p-blue-300)",marginRight:8,background:"rgba(37,99,235,0.1)",border:"1px solid rgba(37,99,235,0.25)",borderRadius:6,padding:"3px 8px"},children:["\\u{1F4CE} ",B.length," screenshot",B.length!==1?"s":""," will attach on save"]}),(0,T.jsx)("button",{id:"dp-cancel",onClick:f,style:{padding:"5px 14px",borderRadius:7,fontSize:12,fontWeight:500,cursor:"pointer",border:"1px solid var(--p-border-t)",background:"var(--p-border)",color:"var(--p-text-sub)",fontFamily:"inherit",transition:"all .15s"},onMouseOver:S=>{S.currentTarget.style.borderColor="var(--p-text-g)"},onMouseOut:S=>{S.currentTarget.style.borderColor="var(--p-border-t)"},children:"Cancel"}),(0,T.jsx)("button",{id:"dp-save",onClick:()=>void qa(),style:{padding:"5px 18px",borderRadius:7,fontSize:12,fontWeight:500,cursor:"pointer",border:"1px solid var(--p-blue-700)",background:"var(--p-blue)",color:"var(--p-white)",fontFamily:"inherit",transition:"background .15s"},onMouseOver:S=>{S.currentTarget.style.background="var(--p-blue-700)"},onMouseOut:S=>{S.currentTarget.style.background="var(--p-blue)"},children:"Add Task"})]}):(0,T.jsx)("span",{style:{fontSize:11,color:"var(--p-text-g)",padding:"5px 4px"},children:"Changes are saved automatically"})]}),(0,T.jsx)($t,{open:Bt,title:"Delete task?",message:`You are about to permanently delete "${(t==null?void 0:t.title)||"this task"}". This action cannot be undone.`,confirmLabel:"Delete task",onConfirm:()=>{mr(!1),p(t.id),f()},onCancel:()=>mr(!1)})]}),ao&&(0,T.jsx)("div",{style:{position:"fixed",inset:0,zIndex:201,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",background:"rgba(2,12,27,0.80)"},children:(0,T.jsxs)("div",{style:{background:"var(--p-surface)",border:"1px solid var(--p-border-s)",borderRadius:16,padding:"28px 32px",width:"100%",maxWidth:480,boxShadow:"var(--p-shadow-lg)",position:"relative"},children:[(0,T.jsx)("div",{style:{width:44,height:44,borderRadius:12,background:"rgba(139,92,246,0.12)",border:"1px solid rgba(139,92,246,0.25)",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:16},children:(0,T.jsx)(Qr,{style:{width:20,height:20,color:"var(--p-purple)"}})}),(0,T.jsx)("h2",{style:{margin:"0 0 8px",fontSize:17,fontWeight:700,color:"var(--p-text)"},children:"Send comment?"}),(0,T.jsx)("p",{style:{margin:"0 0 22px",fontSize:13,color:"var(--p-text-f)",lineHeight:1.6},children:"You have an unsent comment. Do you want to send it before closing?"}),(0,T.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,T.jsx)("button",{onClick:()=>{Ot(!1),gr().then(()=>f())},style:{flex:1,padding:"9px 14px",borderRadius:8,background:"var(--p-purple)",border:"none",color:"#fff",fontSize:13,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap"},children:"Send & Close"}),(0,T.jsx)("button",{type:"button",onClick:()=>{Ot(!1),Kt(""),f()},style:{padding:"9px 16px",borderRadius:8,background:"var(--p-hover)",border:"1px solid var(--p-border)",color:"var(--p-text-m)",fontSize:13,cursor:"pointer"},children:"Discard & Close"}),(0,T.jsx)("button",{type:"button",onClick:()=>Ot(!1),style:{padding:"9px 16px",borderRadius:8,background:"var(--p-hover)",border:"1px solid var(--p-border)",color:"var(--p-text-m)",fontSize:13,cursor:"pointer"},children:"Keep editing"})]})]})})]})}function qx({task:e}){let t=[];if(e.component&&t.push((0,T.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",background:"color-mix(in srgb, var(--p-purple) 14%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 36%, transparent)",borderRadius:100,fontSize:10,color:"var(--p-purple-300)",fontFamily:"monospace"},children:["\\u2B21 ",e.component]},"component")),e.file||e.selector&&e.selector!=="/"||e.cssSelector){let r=e.file??"";e.line!=null&&(r+=`:${e.line}`),e.col!=null&&(r+=`:${e.col}`);let o=e.cssSelector??(e.selector&&e.selector!=="/"?e.selector:""),n=r||o;if(n){let l=n.length>40?`\\u2026${n.slice(-40)}`:n,u=e.url?e.url.length>30?`\\u2026${e.url.slice(-30)}`:e.url:"";t.push((0,T.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:0,borderRadius:6,overflow:"hidden",border:"1px solid color-mix(in srgb, var(--p-blue) 15%, transparent)",fontSize:10,fontFamily:"monospace",whiteSpace:"nowrap"},children:[(0,T.jsx)("span",{title:[r,o].filter(Boolean).join(" \\xB7 "),style:{padding:"2px 6px",background:"color-mix(in srgb, var(--p-blue) 10%, transparent)",color:"var(--p-blue-300)"},children:l}),u&&(0,T.jsx)("span",{title:e.url,style:{padding:"2px 6px",background:"color-mix(in srgb, var(--p-border) 72%, transparent)",color:"var(--p-text-g)",borderLeft:"1px solid color-mix(in srgb, var(--p-blue) 18%, transparent)"},children:u})]},"source"))}}else if(e.url){let r=e.url.length>40?`\\u2026${e.url.slice(-40)}`:e.url;t.push((0,T.jsx)("span",{className:"dp-source-pill",title:e.url,children:r},"url"))}return e.reportBack&&t.push((0,T.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",background:"color-mix(in srgb, var(--p-purple) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 24%, transparent)",borderRadius:100,fontSize:10,color:"var(--p-purple-300)"},children:"\\u21A9 report back"},"rb")),(0,T.jsx)("div",{id:"dp-meta-row",style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",flex:1},children:t})}var gn=D(Ie(),1);var re=D(N(),1),Wx=[{id:"all",label:"All",dot:""},{id:"todo",label:"Todo",dot:"var(--p-amber)"},{id:"in-progress",label:"In Progress",dot:"var(--p-blue)"},{id:"review",label:"Review",dot:"var(--p-purple)"}],Vx={todo:{background:"color-mix(in srgb, var(--p-amber) 16%, transparent)",border:"1px solid color-mix(in srgb, var(--p-amber) 38%, transparent)",color:"var(--p-amber-300)"},"in-progress":{background:"color-mix(in srgb, var(--p-blue) 16%, transparent)",border:"1px solid color-mix(in srgb, var(--p-blue) 38%, transparent)",color:"var(--p-blue-200)"},review:{background:"color-mix(in srgb, var(--p-purple) 16%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 38%, transparent)",color:"var(--p-purple-300)"},done:{background:"color-mix(in srgb, var(--p-green) 14%, transparent)",border:"1px solid color-mix(in srgb, var(--p-green) 32%, transparent)",color:"var(--p-green-300)"},backlog:{background:"color-mix(in srgb, var(--p-text-g) 16%, transparent)",border:"1px solid color-mix(in srgb, var(--p-text-g) 32%, transparent)",color:"var(--p-text-m)"},all:{background:"color-mix(in srgb, var(--p-blue) 12%, transparent)",border:"1px solid color-mix(in srgb, var(--p-blue) 32%, transparent)",color:"var(--p-blue-200)"}};function Gi({tasks:e,filter:t,onFilter:a,view:r="board",onViewChange:o,activityCounter:n}){let[l,u]=gn.default.useState(!1),[s,f]=gn.default.useState(!1),g=gn.default.useMemo(()=>[...new Set(e.map(i=>i.type).filter(Boolean))].sort(),[e]),h=gn.default.useMemo(()=>[...new Set(e.map(i=>i.author).filter(Boolean))].sort(),[e]);function p(i){return e.filter(m=>m.status===i).length}function L(i){a({...t,status:i}),u(!1),f(!1)}function v(i){a({...t,type:i}),u(!1)}function y(i){a({...t,user:i}),f(!1)}function M(i){i.stopPropagation();let m=i.currentTarget.dataset.status;m&&L(m)}let c={display:"flex",alignItems:"center",gap:5,padding:"3px 10px",borderRadius:6,fontSize:11,cursor:"pointer",border:"1px solid transparent",background:"transparent",color:"var(--p-text-f)",transition:"all .12s",fontFamily:"inherit",fontWeight:500},d={...c,background:"var(--p-card)",border:"1px solid var(--p-border)",color:"var(--p-text-f)",padding:"3px 10px",position:"relative"};return(0,re.jsxs)("div",{"data-proto-id":"filter-bar",style:{display:"flex",alignItems:"center",gap:6,padding:"7px 16px",background:"var(--p-surface)",borderBottom:"1px solid var(--p-border)",flexShrink:0},onClick:()=>{u(!1),f(!1)},children:[(0,re.jsx)("div",{style:{display:"flex",alignItems:"center",gap:2},children:Wx.map(i=>{let m=t.status===i.id,C=i.id!=="all"?p(i.id):null,I=m?Vx[i.id]:{};return(0,re.jsxs)("button",{"data-status":i.id,style:{...c,...I},onMouseOver:b=>{m||(b.currentTarget.style.background="var(--p-hover)",b.currentTarget.style.color="var(--p-text-m)")},onMouseOut:b=>{m||(b.currentTarget.style.background="transparent",b.currentTarget.style.color="var(--p-text-f)")},onClick:M,children:[i.dot&&(0,re.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:i.dot,flexShrink:0,display:"inline-block"}}),i.label,C!=null&&(0,re.jsx)("span",{style:{color:m?"inherit":"var(--p-border-t)",fontSize:10,opacity:.8},children:C})]},i.id)})}),(0,re.jsx)("div",{style:{flex:1}}),n,t.user&&(0,re.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:100,background:"color-mix(in srgb, var(--p-purple) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 24%, transparent)",fontSize:10,color:"var(--p-purple-300)"},children:[t.user,(0,re.jsx)("button",{onClick:()=>y(null),style:{display:"flex",background:"none",border:"none",color:"var(--p-purple-300)",cursor:"pointer",padding:0,lineHeight:1},children:(0,re.jsx)($e,{style:{width:10,height:10}})})]}),t.type&&(0,re.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:100,background:"color-mix(in srgb, var(--p-blue) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--p-blue) 24%, transparent)",fontSize:10,color:"var(--p-cyan-300)"},children:[t.type,(0,re.jsx)("button",{onClick:()=>v(null),style:{display:"flex",background:"none",border:"none",color:"var(--p-cyan-300)",cursor:"pointer",padding:0,lineHeight:1},children:(0,re.jsx)($e,{style:{width:10,height:10}})})]}),(0,re.jsxs)("div",{style:{position:"relative"},children:[(0,re.jsxs)("button",{style:{...d,color:t.user?"var(--p-purple-300)":"var(--p-text-f)",borderColor:t.user?"color-mix(in srgb, var(--p-purple) 36%, transparent)":"var(--p-border)",opacity:h.length?1:.55},onClick:i=>{i.stopPropagation(),h.length&&(u(!1),f(m=>!m))},children:[(0,re.jsx)(sn,{style:{width:12,height:12}}),"User",(0,re.jsx)(Kr,{style:{width:12,height:12}})]}),s&&h.length>0&&(0,re.jsxs)("div",{style:{position:"absolute",top:"calc(100% + 4px)",right:0,minWidth:160,background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:8,boxShadow:"0 8px 24px rgba(0,0,0,0.25)",zIndex:50,overflow:"hidden"},onClick:i=>i.stopPropagation(),children:[(0,re.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:"var(--p-text-f)",background:"none",border:"none",cursor:"pointer",borderBottom:"1px solid var(--p-border)"},onClick:()=>y(null),children:"All users"}),h.map(i=>(0,re.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:t.user===i?"var(--p-purple-300)":"var(--p-text-m)",background:t.user===i?"color-mix(in srgb, var(--p-purple) 12%, transparent)":"none",border:"none",cursor:"pointer"},onMouseOver:m=>{t.user!==i&&(m.currentTarget.style.background="var(--p-hover)")},onMouseOut:m=>{t.user!==i&&(m.currentTarget.style.background="none")},onClick:()=>y(i),children:i},i))]})]}),(0,re.jsxs)("div",{style:{position:"relative"},children:[(0,re.jsxs)("button",{style:{...d,color:t.type?"var(--p-cyan-300)":"var(--p-text-f)",borderColor:t.type?"color-mix(in srgb, var(--p-blue) 36%, transparent)":"var(--p-border)",opacity:g.length?1:.55},onClick:i=>{i.stopPropagation(),g.length&&u(m=>!m)},children:[(0,re.jsx)(un,{style:{width:12,height:12}}),"Type",(0,re.jsx)(Kr,{style:{width:12,height:12}})]}),l&&g.length>0&&(0,re.jsxs)("div",{style:{position:"absolute",top:"calc(100% + 4px)",right:0,minWidth:140,background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:8,boxShadow:"0 8px 24px rgba(0,0,0,0.25)",zIndex:50,overflow:"hidden"},onClick:i=>i.stopPropagation(),children:[(0,re.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:"var(--p-text-f)",background:"none",border:"none",cursor:"pointer",borderBottom:"1px solid var(--p-border)"},onClick:()=>v(null),children:"All types"}),g.map(i=>(0,re.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:t.type===i?"var(--p-cyan-300)":"var(--p-text-m)",background:t.type===i?"color-mix(in srgb, var(--p-blue) 12%, transparent)":"none",border:"none",cursor:"pointer"},onMouseOver:m=>{t.type!==i&&(m.currentTarget.style.background="var(--p-hover)")},onMouseOut:m=>{t.type!==i&&(m.currentTarget.style.background="none")},onClick:()=>v(i),children:i},i))]})]}),(0,re.jsxs)("div",{style:{display:"flex",alignItems:"center",background:"var(--p-card)",border:"1px solid var(--p-border)",borderRadius:8,padding:2,gap:0},children:[(0,re.jsx)("button",{title:"Board view",style:{padding:"4px 7px",borderRadius:5,background:r==="board"?"var(--p-surface)":"none",color:r==="board"?"var(--p-text-sub)":"var(--p-text-g)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",transition:"background .12s,color .12s"},onClick:i=>{i.stopPropagation(),o==null||o("board")},children:(0,re.jsx)(an,{style:{width:13,height:13}})}),(0,re.jsx)("button",{title:"List view",style:{padding:"4px 7px",borderRadius:5,background:r==="list"?"var(--p-surface)":"none",color:r==="list"?"var(--p-text-sub)":"var(--p-text-g)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",transition:"background .12s,color .12s"},onClick:i=>{i.stopPropagation(),o==null||o("list")},children:(0,re.jsx)(rn,{style:{width:13,height:13}})})]})]})}var Na=D(Ie(),1);var ue=D(N(),1),$x=[{id:"board",label:"Board",icon:(0,ue.jsx)(Ma,{className:"w-3.5 h-3.5"})},{id:"workflow",label:"Workflow",icon:(0,ue.jsx)(dn,{className:"w-3.5 h-3.5"})}];function ji({open:e,visibleCols:t,settings:a,onClose:r,onSave:o}){let[n,l]=Na.default.useState("board"),[u,s]=Na.default.useState({}),[f,g]=Na.default.useState(a.autoCommit??!1),[h,p]=Na.default.useState(a.autoComment??!1),[L,v]=Na.default.useState(a.autoPush??!1),[y,M]=Na.default.useState(a.createBranch??!1);Na.default.useEffect(()=>{if(!e)return;let i={};Ea.forEach(m=>{i[m.id]=t.includes(m.id)}),s(i),g(a.autoCommit??!1),p(a.autoComment??!1),v(a.autoPush??!1),M(a.createBranch??!1),l("board")},[e,t,a]);function c(){let i=Ea.filter(m=>u[m.id]).map(m=>m.id);o(i,{autoCommit:f,autoComment:h,autoPush:L,createBranch:y}),r()}function d(i){s(m=>({...m,[i]:!m[i]}))}return(0,ue.jsxs)(cr,{open:e,onClose:r,id:"settings-modal",width:"min(460px, 95vw)",icon:(0,ue.jsx)(sr,{style:{width:14,height:14,color:"var(--p-text-g)"}}),title:"Settings",headerActions:(0,ue.jsx)("button",{id:"settings-close",onClick:r,style:{width:26,height:26,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,border:"none",background:"transparent",color:"var(--p-text-g)",cursor:"pointer",transition:"background .12s,color .12s"},onMouseOver:i=>{i.currentTarget.style.background="var(--p-surface)",i.currentTarget.style.color="var(--p-text-m)"},onMouseOut:i=>{i.currentTarget.style.background="transparent",i.currentTarget.style.color="var(--p-text-g)"},children:(0,ue.jsx)($e,{style:{width:14,height:14}})}),footer:(0,ue.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,ue.jsx)("button",{id:"settings-cancel",onClick:r,className:"dp-status-btn",style:{padding:"5px 14px",fontSize:12},children:"Cancel"}),(0,ue.jsx)("button",{id:"settings-apply",onClick:c,style:{padding:"5px 14px",fontSize:12,fontWeight:500,borderRadius:6,border:"1px solid color-mix(in srgb, var(--p-purple) 55%, transparent)",background:"color-mix(in srgb, var(--p-purple) 18%, transparent)",color:"var(--p-purple-300)",cursor:"pointer",transition:"background .12s"},onMouseOver:i=>{i.currentTarget.style.background="color-mix(in srgb, var(--p-purple) 28%, transparent)"},onMouseOut:i=>{i.currentTarget.style.background="color-mix(in srgb, var(--p-purple) 18%, transparent)"},children:"Apply"})]}),children:[(0,ue.jsx)("div",{className:"dp-tabs",children:$x.map(i=>(0,ue.jsxs)("button",{onClick:()=>l(i.id),className:`dp-tab${n===i.id?" active":""}`,style:{display:"flex",alignItems:"center",gap:6},children:[i.icon,i.label]},i.id))}),n==="board"&&(0,ue.jsxs)("div",{style:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:10},children:[(0,ue.jsx)("div",{className:"dp-meta-label",children:"Visible Columns"}),Ea.map(i=>(0,ue.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer",userSelect:"none"},children:[(0,ue.jsx)("input",{id:`settings-col-${i.id}`,type:"checkbox",checked:u[i.id]??!0,onChange:()=>d(i.id),style:{width:14,height:14,accentColor:i.color,cursor:"pointer"}}),(0,ue.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:i.color,flexShrink:0}}),(0,ue.jsx)("span",{style:{fontSize:13,color:"var(--p-text-m)"},children:i.label})]},i.id))]}),n==="workflow"&&(0,ue.jsxs)("div",{style:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:16},children:[(0,ue.jsx)(ru,{id:"settings-auto-commit",label:"Commit after task implementation",description:"Agent is instructed to stage and commit changes after each task.",value:f,onChange:g}),(0,ue.jsx)(ru,{id:"settings-auto-push",label:"Push after task commit",description:`Agent is instructed to push after every commit. Requires \'Commit\' to be ON.${f?"":" (Enable Commit first)"}`,value:L&&f,onChange:i=>v(i&&f)}),(0,ue.jsx)(ru,{id:"settings-auto-comment",label:"Comment after task implementation",description:"Agent is instructed to add a summary comment after completing a task.",value:h,onChange:p}),(0,ue.jsx)(ru,{id:"settings-create-branch",label:"Create branch at end of session",description:"Agent creates a descriptive branch after all session tasks are done (e.g. fix/bug-errors, feat/eye-toggle). Name reflects the work: lowercase, kebab-case, 2\\u20135 words, prefix fix/feat/chore/docs.",value:y,onChange:M})]})]})}function ru({id:e,label:t,description:a,value:r,onChange:o}){return(0,ue.jsxs)("div",{children:[(0,ue.jsx)("div",{className:"dp-meta-label",style:{marginBottom:4},children:t}),(0,ue.jsx)("div",{style:{fontSize:11,color:"var(--p-text-g)",marginBottom:10},children:a}),(0,ue.jsxs)("div",{id:e,style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer"},onClick:()=>o(!r),children:[(0,ue.jsxs)("div",{style:{position:"relative",width:36,height:20,flexShrink:0},children:[(0,ue.jsx)("div",{style:{width:36,height:20,borderRadius:10,background:r?"var(--p-purple)":"var(--p-card)",border:`1px solid ${r?"var(--p-purple-300)":"var(--p-border)"}`,transition:"all .15s"}}),(0,ue.jsx)("div",{style:{position:"absolute",top:3,left:r?18:3,width:14,height:14,borderRadius:"50%",background:r?"var(--p-purple-300)":"var(--p-text-muted)",transition:"all .15s"}})]}),(0,ue.jsx)("span",{style:{fontSize:12,color:"var(--p-text-g)"},children:r?"On":"Off"})]})]})}var nu=D(Ie(),1);var pe=D(N(),1);function sm(e){return/\\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function ou(e){return/\\.md$/i.test(e)}function Ki({open:e,name:t,url:a,onClose:r}){let[o,n]=nu.default.useState(null),[l,u]=nu.default.useState(!1);return nu.default.useEffect(()=>{!e||!a||(ou(t)?(u(!0),n(null),fetch(a).then(s=>s.text()).then(s=>{n(s),u(!1)}).catch(()=>{n("Error loading file."),u(!1)})):n(null))},[e,t,a]),(0,pe.jsx)(cr,{open:e,onClose:r,id:"file-preview-modal",width:"min(700px, 95vw)",maxHeight:"88vh",boxStyle:{display:"flex",flexDirection:"column"},icon:(0,pe.jsx)(Xr,{className:"w-4 h-4 text-slate-400"}),title:t,headerActions:(0,pe.jsxs)(pe.Fragment,{children:[(0,pe.jsx)("a",{href:a,download:t,className:"text-slate-400 hover:text-slate-200 transition-colors p-1.5 rounded-md hover:bg-slate-700/60",title:"Download",children:(0,pe.jsx)(nr,{className:"w-4 h-4"})}),(0,pe.jsx)("button",{id:"file-preview-close",onClick:r,className:"text-slate-400 hover:text-slate-200 transition-colors p-1.5 rounded-md hover:bg-slate-700/60",title:"Close",children:(0,pe.jsx)($e,{className:"w-4 h-4"})})]}),footer:(0,pe.jsxs)(pe.Fragment,{children:[(0,pe.jsxs)("a",{href:a,download:t,className:"flex items-center gap-1.5 border border-slate-700 hover:bg-slate-800 text-slate-300 text-sm px-3 py-1.5 rounded-lg transition-colors",children:[(0,pe.jsx)(nr,{className:"w-3.5 h-3.5"}),"Download"]}),(0,pe.jsx)("button",{id:"file-preview-close-footer",onClick:r,className:"border border-slate-700 hover:bg-slate-800 text-slate-300 text-sm px-4 py-1.5 rounded-lg transition-colors",children:"Close"})]}),children:(0,pe.jsxs)("div",{className:"flex-1 overflow-auto",style:{minHeight:0,padding:"16px 20px"},children:[sm(t)&&(0,pe.jsx)("div",{style:{borderRadius:8,overflow:"hidden",border:"1px solid var(--p-border)",background:"var(--p-card)",display:"inline-block",width:"100%"},children:(0,pe.jsx)("img",{src:a,alt:t,style:{maxWidth:"100%",display:"block",margin:"0 auto",objectFit:"contain"}})}),ou(t)&&l&&(0,pe.jsx)("p",{className:"text-xs text-slate-500 py-4",children:"Loading\\u2026"}),ou(t)&&!l&&o!==null&&(0,pe.jsx)("div",{id:"file-preview-md",style:{background:"var(--p-input)",border:"1px solid var(--p-border-s)",borderRadius:8,padding:"10px 14px",fontSize:13,color:"var(--p-text-sub)",lineHeight:1.65},children:(0,pe.jsx)(za,{markdown:o})}),!sm(t)&&!ou(t)&&(0,pe.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-slate-500",children:[(0,pe.jsx)(Xr,{className:"w-10 h-10 opacity-40"}),(0,pe.jsx)("p",{className:"text-sm",children:"Preview not available for this file type."}),(0,pe.jsxs)("a",{href:a,download:t,className:"flex items-center gap-1.5 text-violet-400 hover:text-violet-300 hover:underline text-sm transition-colors",children:[(0,pe.jsx)(nr,{className:"w-3.5 h-3.5"}),"Download file"]})]})]})})}var im=window.__PORT__??3700,to=`http://localhost:${im}`,Et=`${to}/api/tasks`,It={async getTasks(){return(await fetch(`${Et}?_=${Date.now()}`,{cache:"no-store"})).json()},async createTask(e){return(await fetch(Et,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()},async updateTask(e,t){return(await fetch(`${Et}/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()},async deleteTask(e){await fetch(`${Et}/${e}`,{method:"DELETE"})},async getComments(e){return(await fetch(`${Et}/${e}/comments`)).json()},async addComment(e,t){await fetch(`${Et}/${e}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({author:"user",text:t,source:"web"})})},async updateComment(e,t,a){await fetch(`${Et}/${e}/comments/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:a})})},async deleteComment(e,t){await fetch(`${Et}/${e}/comments/${t}`,{method:"DELETE"})},async getFiles(e){return(await fetch(`${Et}/${e}/files`)).json()},async uploadFile(e,t){let a=await t.arrayBuffer();await fetch(`${Et}/${e}/files/${encodeURIComponent(t.name)}`,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:a})},async deleteFile(e,t){await fetch(`${Et}/${e}/files/${encodeURIComponent(t)}`,{method:"DELETE"})},async getProject(){return(await fetch(`${to}/api/project`)).json()},async getCopilotStatus(){return(await fetch(`${to}/api/copilot/status`)).json()},async copilotLogin(){return(await fetch(`${to}/api/copilot/login`,{method:"POST"})).json().catch(()=>({}))},async getSettings(){return(await fetch(`${to}/api/settings`,{cache:"no-store"})).json()},async saveSettings(e){await fetch(`${to}/api/settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},wsUrl(){return`ws://localhost:${im}`}};var _=D(N(),1),lu=window.__PORT__??3700,Gx=window.__SAAS_MODE__??!1,dm=window.__BOARD_URL__??"",jx=window.__BOARD_NAME__??"",pm=window.__IS_ADMIN__??!1;function Kx({onClose:e}){let t=`http://localhost:${lu}`,[a,r]=X.default.useState("idle"),[o,n]=X.default.useState(!0),[l,u]=X.default.useState(null),[s,f]=X.default.useState("");async function g(){r("pushing"),f("");try{let p=await fetch(`${t}/api/push`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepLocalFiles:o})}),L=await p.json();if(!p.ok){f(L.error??"Push failed"),r("error");return}u({imported:L.imported??0,skipped:L.skipped}),r("done")}catch(p){f(p instanceof Error?p.message:"Network error"),r("error")}}let h=a==="pushing";return(0,_.jsx)("div",{style:{position:"fixed",inset:0,zIndex:9999,background:"rgba(5, 8, 18, 0.72)",backdropFilter:"blur(10px)",display:"flex",alignItems:"center",justifyContent:"center",padding:20,fontFamily:"Inter, system-ui, -apple-system, sans-serif"},children:(0,_.jsxs)("div",{style:{background:"#101827",border:"1px solid rgba(255,255,255,0.07)",borderRadius:24,maxWidth:380,width:"100%",boxShadow:"0 0 0 1px rgba(59,130,246,0.07), 0 40px 80px rgba(0,0,0,0.75)",overflow:"hidden",position:"relative"},children:[(0,_.jsx)("div",{style:{position:"absolute",top:0,left:"20%",right:"20%",height:1,background:"linear-gradient(90deg, transparent, rgba(59,130,246,0.5), transparent)"}}),(0,_.jsxs)("div",{style:{padding:"36px 36px 20px",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"},children:[(0,_.jsx)("div",{style:{position:"relative",width:52,height:52,marginBottom:22},children:(0,_.jsxs)("svg",{width:"52",height:"52",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_.jsx)("rect",{width:"18",height:"18",rx:"4",fill:"#2563eb"}),(0,_.jsx)("rect",{x:"2.5",y:"5",width:"2",height:"8",rx:"1",fill:"white",opacity:"0.7"}),(0,_.jsx)("rect",{x:"6.5",y:"2",width:"2",height:"14",rx:"1",fill:"white"}),(0,_.jsx)("rect",{x:"10.5",y:"6",width:"2",height:"6",rx:"1",fill:"white",opacity:"0.7"}),(0,_.jsx)("rect",{x:"14.5",y:"4",width:"2",height:"10",rx:"1",fill:"white",opacity:"0.85"})]})}),(0,_.jsx)("h1",{style:{fontSize:18,fontWeight:700,color:"#f1f5f9",letterSpacing:"-0.3px",margin:"0 0 7px"},children:"Online Mode Active"}),(0,_.jsxs)("p",{style:{fontSize:12,color:"rgba(255,255,255,0.36)",lineHeight:1.5,margin:0},children:["Connected to"," ",(0,_.jsx)("strong",{style:{color:"rgba(255,255,255,0.55)",fontWeight:500},children:jx||"Vibeflow SaaS"})]})]}),a==="done"&&l&&(0,_.jsxs)("div",{style:{margin:"0 28px 0",padding:"10px 14px",borderRadius:9,fontSize:12,display:"flex",alignItems:"center",gap:9,background:"rgba(16,185,129,0.08)",border:"1px solid rgba(16,185,129,0.18)",color:"#34d399"},children:[(0,_.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",children:(0,_.jsx)("path",{d:"M13 5L6.5 11.5 3 8",stroke:"#34d399",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),l.imported," task",l.imported!==1?"s":""," pushed to board",l.skipped!=null&&l.skipped>0?` \\xB7 ${l.skipped} already existed`:""]}),a==="error"&&s&&(0,_.jsx)("div",{style:{margin:"0 28px 0",padding:"10px 14px",borderRadius:9,fontSize:12,display:"flex",alignItems:"center",gap:9,background:"rgba(239,68,68,0.08)",border:"1px solid rgba(239,68,68,0.18)",color:"#f87171"},children:s}),(0,_.jsxs)("div",{style:{padding:"20px 24px 28px",display:"flex",flexDirection:"column",gap:8},children:[dm&&(0,_.jsx)("a",{href:dm,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:9,padding:14,background:"#2563eb",border:"none",borderRadius:12,color:"#fff",fontSize:14,fontWeight:600,cursor:"pointer",textDecoration:"none",letterSpacing:"-0.1px",transition:"background 0.15s, transform 0.1s"},onMouseEnter:p=>{p.currentTarget.style.background="#3b82f6",p.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:p=>{p.currentTarget.style.background="#2563eb",p.currentTarget.style.transform="none"},children:"Open Web App \\u2192"}),a!=="done"&&(0,_.jsx)("button",{onClick:()=>void g(),disabled:h,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:9,padding:12,background:"transparent",border:"1px solid rgba(255,255,255,0.08)",borderRadius:12,color:h?"rgba(255,255,255,0.25)":"rgba(255,255,255,0.4)",fontSize:13,fontWeight:500,cursor:h?"not-allowed":"pointer",transition:"border-color 0.15s, color 0.15s, background 0.15s"},onMouseEnter:p=>{h||(p.currentTarget.style.borderColor="rgba(255,255,255,0.15)",p.currentTarget.style.color="rgba(255,255,255,0.65)",p.currentTarget.style.background="rgba(255,255,255,0.03)")},onMouseLeave:p=>{h||(p.currentTarget.style.borderColor="rgba(255,255,255,0.08)",p.currentTarget.style.color="rgba(255,255,255,0.4)",p.currentTarget.style.background="transparent")},children:h?"\\u23F3 Pushing\\u2026":"\\u2191 Push local tasks"})]}),(0,_.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 24px 20px"},children:[(0,_.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:7,cursor:"pointer"},children:[(0,_.jsx)("input",{type:"checkbox",checked:o,onChange:p=>n(p.target.checked),style:{accentColor:"#2563eb",width:13,height:13,cursor:"pointer"}}),(0,_.jsx)("span",{style:{fontSize:11.5,color:"rgba(255,255,255,0.28)"},children:"Keep local files"})]}),pm&&e&&(0,_.jsx)("button",{onClick:e,style:{fontSize:11,color:"rgba(255,255,255,0.2)",background:"none",border:"none",cursor:"pointer",textDecoration:"underline",textUnderlineOffset:2,transition:"color 0.15s"},onMouseEnter:p=>{p.currentTarget.style.color="rgba(255,255,255,0.45)"},onMouseLeave:p=>{p.currentTarget.style.color="rgba(255,255,255,0.2)"},children:"Dismiss (admin)"})]})]})})}var fm={backlog:"Backlog",todo:"Todo","in-progress":"In Progress",review:"Review",done:"Done"};function Xx(e,t,a){let r=a?e.filter(u=>{var s,f;return((s=u.title)==null?void 0:s.toLowerCase().includes(a))||((f=u.description)==null?void 0:f.toLowerCase().includes(a))}):e;if(a)return`${r.length} of ${e.length} tasks`;let o=r.filter(u=>u.status!=="done").length,n=r.filter(u=>u.status==="in-progress").length,l=r.filter(u=>u.status==="review").length;return`${o} open \\xB7 ${n} in-progress \\xB7 ${l} in review`}function mm(){var _a;let[e,t]=X.default.useState([]),[a,r]=X.default.useState(!0),[o,n]=X.default.useState(!1),[l,u]=X.default.useState({open:!1,task:null,tab:"details"}),[s,f]=X.default.useState("board"),[g,h]=X.default.useState(!1),[p,L]=X.default.useState({open:!1,name:"",url:""}),[v,y]=X.default.useState(420),[M,c]=X.default.useState(!1),[d,i]=X.default.useState(""),[m,C]=X.default.useState(Ea.map(x=>x.id)),[I,b]=X.default.useState({status:"all",component:null,type:null,user:null}),[P,B]=X.default.useState("Proto Board"),[q,V]=X.default.useState(!1),[G,oe]=X.default.useState(!1),[ee,De]=X.default.useState("You"),[z,Fe]=X.default.useState(null),[he,fe]=X.default.useState(""),[Q,Se]=X.default.useState({}),Ze=X.default.useRef(null),Ct=X.default.useRef(null),Ge=X.default.useRef(null),[Gt,pr]=X.default.useState([]),Ha=X.default.useRef(!1),Bt=X.default.useRef([]),[mr,ao]=X.default.useState([]);X.default.useEffect(()=>(sa(),uu(),su(),vn(),xn(),jt(),()=>{var x;Ct.current&&clearTimeout(Ct.current),(x=Ze.current)==null||x.close()}),[]),X.default.useEffect(()=>{document.body.setAttribute("data-theme","dark")},[]),X.default.useEffect(()=>{function x(){let te=window.location.hash.match(/^#task-([a-f0-9]{30})$/i);if(!te){Ge.current=null;return}let ce=te[1].toLowerCase();if(Ge.current===ce)return;let Y=e.find(Z=>Z.id.toLowerCase()===ce);Y&&(Ge.current=ce,Ha.current?u(Z=>({...Z,open:!0,task:Y,tab:"details"})):u(Z=>(Z.task&&Z.task.id!==Y.id&&pr(ne=>[...ne,Z.task]),{...Z,open:!0,task:Y,tab:"details"})),Ha.current=!1)}function k(){}x();let O=()=>{Ge.current=null,x()};return window.addEventListener("hashchange",O),window.addEventListener("vibeflow-task-ref-click",k),()=>{window.removeEventListener("hashchange",O),window.removeEventListener("vibeflow-task-ref-click",k)}},[e]),X.default.useEffect(()=>{function x(k){var ce,Y,Z;let O=(ce=k.target)==null?void 0:ce.tagName,te=O==="INPUT"||O==="TEXTAREA"||((Y=k.target)==null?void 0:Y.isContentEditable);if(k.key==="Escape"){if(p.open){L(ne=>({...ne,open:!1}));return}if(l.open){u(ne=>({...ne,open:!1}));return}if(g){h(!1);return}}if(!te&&((k.key==="?"||k.key==="/"&&k.shiftKey)&&((Z=document.getElementById("header-shortcuts-hint"))==null||Z.click()),k.altKey&&!k.ctrlKey&&!k.metaKey&&(k.key==="n"||k.key==="N")&&(k.preventDefault(),Xt(null,"details")),k.altKey&&!k.ctrlKey&&!k.metaKey&&(k.key==="f"||k.key==="F"))){k.preventDefault();let ne=document.getElementById("global-search");ne==null||ne.focus(),ne==null||ne.select()}}return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[p.open,l.open,g]);function Ot(x,k,O,te,ce){let Y=new Date().toISOString(),Z=fm[k]??k,ne=fm[O]??O,Ne=Date.now()-3e3;ao(Je=>Je.some(R=>R.taskId===x&&R.to===ne&&new Date(R.timestamp).getTime()>Ne)?Je:[...Je,{taskId:x,field:"status",from:Z,to:ne,actor:te,timestamp:Y,source:ce}].slice(-500))}async function sa(){try{let x=await It.getTasks();Bt.current=x.tasks??[],t(x.tasks??[])}catch{}finally{r(!1)}}let hn=X.default.useCallback((x,k,O)=>{let te=String(x.id??"");if(!te)return;let ce=x.created??x.createdAt,Y=x.updated?String(x.updated):void 0,Z=Array.isArray(x.comments)?x.comments.length:void 0,ne=Array.isArray(x.files)?x.files.length:void 0,Ne=x.status?String(x.status):void 0,Je=Bt.current.find(lt=>lt.id===te);Ne&&Je&&Je.status!==Ne&&Ot(te,Je.status,Ne,k??"Someone",O),t(lt=>{let R=lt.find(pt=>pt.id===te),zt={id:te,title:x.title?String(x.title):(R==null?void 0:R.title)??"Untitled",description:x.description!=null?String(x.description):(R==null?void 0:R.description)??"",status:Ne??(R==null?void 0:R.status)??"todo",type:x.type?String(x.type):R==null?void 0:R.type,priority:x.priority?String(x.priority):R==null?void 0:R.priority,agent:x.agent?String(x.agent):R==null?void 0:R.agent,model:x.model?String(x.model):R==null?void 0:R.model,selector:x.selector?String(x.selector):R==null?void 0:R.selector,cssSelector:x.cssSelector?String(x.cssSelector):R==null?void 0:R.cssSelector,file:x.file?String(x.file):R==null?void 0:R.file,line:typeof x.line=="number"?x.line:R==null?void 0:R.line,col:typeof x.col=="number"?x.col:R==null?void 0:R.col,component:x.component?String(x.component):R==null?void 0:R.component,url:x.url?String(x.url):R==null?void 0:R.url,reportBack:x.reportBack===!0||(R==null?void 0:R.reportBack)===!0,commit:x.commit?String(x.commit):R==null?void 0:R.commit,commits:Array.isArray(x.commits)?x.commits:R==null?void 0:R.commits,commentCount:Z??(R==null?void 0:R.commentCount),fileCount:ne??(R==null?void 0:R.fileCount),createdAt:ce?String(ce):(R==null?void 0:R.createdAt)??new Date().toISOString(),updatedAt:Y??(R==null?void 0:R.updatedAt),author:x.author?String(x.author):R==null?void 0:R.author},qa=lt.filter(pt=>pt.id!==te);return qa.push(zt),qa.sort((pt,ia)=>{let gr=new Date(pt.updatedAt??pt.createdAt??"").getTime(),wn=new Date(ia.updatedAt??ia.createdAt??"").getTime();return gr===wn?pt.id.localeCompare(ia.id):wn-gr}),Bt.current=qa,qa})},[]);async function uu(){try{let x=await It.getProject();x.name&&B(x.name),x.gitUserName&&De(x.gitUserName)}catch{}}async function xn(){try{let x=await fetch("/api/github-url").then(k=>k.json());Fe(x.githubUrl??null)}catch{}}async function su(){var x;try{let O=await It.getSettings();Se(O),(x=O.visibleCols)!=null&&x.length&&C(O.visibleCols),O.viewMode&&f(O.viewMode),O.panelWidth&&O.panelWidth>=280&&O.panelWidth<=900&&y(O.panelWidth)}catch{}}async function vn(){try{let x=await It.getCopilotStatus();x!=null&&x.authenticated&&(x!=null&&x.username)?fe(`Copilot: ${x.username}`):fe("Copilot: not logged in")}catch{}}function jt(){let x=`ws://localhost:${lu}`,k=new WebSocket(x);Ze.current=k,k.addEventListener("open",()=>{V(!0),oe(!0),sa()}),k.addEventListener("close",()=>{V(!1),Ct.current=setTimeout(jt,1500)}),k.addEventListener("message",te=>{var ce;try{let Y=JSON.parse(te.data);if(Y.type==="tasks-updated"||(ce=Y.type)!=null&&ce.startsWith("task:")){sa();return}if(Y.type==="task-changed"&&Y.task){let Z=Y.task,ne=typeof Z.alteredBy=="string"?Z.alteredBy:typeof Z.author=="string"?Z.author:"Someone",Ne=Y.source==="cli"?"cli":void 0;hn(Z,ne,Ne);return}if(Y.type==="task-deleted"&&Y.taskId){let Z=String(Y.taskId);t(ne=>{let Ne=ne.filter(Je=>Je.id!==Z);return Bt.current=Ne,Ne})}}catch{}});let O=setInterval(()=>{k.readyState===WebSocket.OPEN&&k.send(JSON.stringify({type:"ping"}))},2e4);k.addEventListener("close",()=>clearInterval(O))}async function Kt(x,k){let O=Bt.current.find(te=>te.id===x);t(te=>{let ce=te.map(Y=>Y.id===x?{...Y,...k}:Y);return Bt.current=ce,ce}),k.status&&(O!=null&&O.status)&&k.status!==O.status&&Ot(x,O.status,k.status,ee);try{let te=await It.updateTask(x,k);te.task&&t(ce=>{let Y=ce.map(Z=>Z.id===x?te.task:Z);return Bt.current=Y,Y})}catch{sa()}}async function iu(x){t(k=>{let O=k.filter(te=>te.id!==x);return Bt.current=O,O});try{await It.deleteTask(x)}catch{sa()}}async function Ln(x){var k;try{let O=await It.createTask(x);return await sa(),(k=O==null?void 0:O.task)==null?void 0:k.id}catch{}}function Xt(x,k="details",O){pr([]),u({open:!0,task:x,tab:k,addColumnId:O})}function yn(){pr(x=>{if(x.length===0)return x;let k=x[x.length-1],O=x.slice(0,-1);return Ha.current=!0,Ge.current=null,window.location.hash=`#task-${k.id}`,u(te=>({...te,open:!0,task:k,tab:"details"})),O})}function Sn(x,k){if(/\\.html?$/i.test(x)){window.open(k,"_blank","noopener,noreferrer");return}L({open:!0,name:x,url:k})}let In=Xx(e,m,d.toLowerCase()),du=`http://localhost:${lu}`,Cn=X.default.useMemo(()=>{var k;let x=(k=l.task)==null?void 0:k.id;return x?mr.filter(O=>O.taskId===x).map(({field:O,from:te,to:ce,actor:Y,timestamp:Z,source:ne})=>({field:O,from:te,to:ce,actor:Y,timestamp:Z,source:ne})):[]},[(_a=l.task)==null?void 0:_a.id,mr]),ro=X.default.useMemo(()=>{let x=e;return I.status!=="all"&&(x=x.filter(k=>k.status===I.status)),I.component&&(x=x.filter(k=>k.component===I.component)),I.type&&(x=x.filter(k=>k.type===I.type)),I.user&&(x=x.filter(k=>k.author===I.user)),x},[e,I]),oo=G&&!q;return(0,_.jsxs)(_.Fragment,{children:[Gx&&!o&&(0,_.jsx)(Kx,{onClose:pm?()=>n(!0):void 0}),(0,_.jsx)(zi,{projectName:P,missingProjectIconStyle:"vibeflow",wsConnected:q,port:lu,searchQuery:d,premiumUsage:he,isLoading:a,taskSummary:In,onSearchChange:i,onSettings:()=>h(!0)}),(0,_.jsx)(Gi,{tasks:e,filter:I,view:s,onFilter:b,onViewChange:x=>{f(x),It.saveSettings({...Q,viewMode:x}),Se(k=>({...k,viewMode:x}))}}),(0,_.jsxs)("div",{className:"flex flex-1 overflow-hidden",style:{minHeight:0,position:"relative"},children:[s==="list"?(0,_.jsx)(Oi,{tasks:ro,searchQuery:d,isLoading:a,onOpenPanel:(x,k)=>Xt(x,k),onAddTask:x=>Xt(null,"details",x),onDrop:(x,k)=>Kt(x,{status:k})}):(0,_.jsx)(Ei,{tasks:ro,visibleCols:m,searchQuery:d,isLoading:a,onOpenPanel:(x,k,O)=>Xt(x,k,O),onDrop:(x,k)=>Kt(x,{status:k})}),l.open&&(0,_.jsxs)("div",{id:"detail-panel-container",style:{width:v,zIndex:M?30:10},className:M?"resizing":"",children:[(0,_.jsx)("div",{id:"detail-panel-resize-handle",onMouseDown:x=>{x.preventDefault(),c(!0),document.body.classList.add("vibeflow-resizing-panel");let k=x.clientX,O=v,te=Y=>{let Z=O-(Y.clientX-k);y(Math.max(360,Math.min(860,Z)))},ce=Y=>{c(!1),document.body.classList.remove("vibeflow-resizing-panel");let Z=Math.max(360,Math.min(860,O-(Y.clientX-k)));It.saveSettings({...Q,panelWidth:Z}),Se(ne=>({...ne,panelWidth:Z})),window.removeEventListener("mousemove",te),window.removeEventListener("mouseup",ce)};window.addEventListener("mousemove",te),window.addEventListener("mouseup",ce)}}),(0,_.jsx)($i,{open:l.open,task:l.task,tab:l.tab,showLockIndicator:!1,addColumnId:l.addColumnId,gitUserName:ee,githubUrl:z,baseUrl:du,isResizing:M,api:It,onClose:()=>{pr([]),u(x=>({...x,open:!1}))},onSave:async x=>{l.task&&await Kt(l.task.id,x),u(k=>({...k,open:!1}))},onCreate:async x=>{let k=await Ln(x);return u(O=>({...O,open:!1})),k},onDelete:async x=>{await iu(x),u(k=>({...k,open:!1}))},onPatch:Kt,onFilePreview:Sn,onGoBack:Gt.length>0?yn:void 0,navBackLabel:Gt.length>0?Gt[Gt.length-1].title:void 0,externalLocalChanges:Cn})]})]}),oo&&(0,cm.createPortal)((0,_.jsx)("div",{id:"ws-lost-overlay",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:99999,background:"rgba(2, 6, 23, 0.88)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",padding:16,pointerEvents:"all",cursor:"not-allowed"},children:(0,_.jsxs)("div",{style:{width:"min(420px, 92vw)",borderRadius:14,border:"1px solid var(--p-border-s)",background:"var(--p-card)",boxShadow:"0 16px 40px rgba(2,6,23,0.7)",padding:"20px 22px",display:"flex",flexDirection:"column",gap:10,cursor:"default",pointerEvents:"auto"},children:[(0,_.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,_.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--p-text-m)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"spin 1.1s linear infinite",flexShrink:0},children:(0,_.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),(0,_.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--p-text)"},children:"Connection Lost"})]}),(0,_.jsx)("div",{style:{fontSize:12,color:"var(--p-text-m)",lineHeight:1.6},children:"Real-time connection to the server was interrupted. Reconnecting in the background\\u2026"})]})}),document.body),(0,_.jsx)(ji,{open:g,visibleCols:m,settings:Q,onClose:()=>h(!1),onSave:(x,k)=>{C(x);let O={...Q,...k,visibleCols:x};Se(O),It.saveSettings(O)}}),(0,_.jsx)(Ki,{open:p.open,name:p.name,url:p.url,onClose:()=>L(x=>({...x,open:!1}))})]})}var xm=D(N(),1),gm=document.getElementById("root");gm&&(0,hm.createRoot)(gm).render((0,xm.jsx)(mm,{}));})();\n/*! Bundled license information:\n\nreact/cjs/react.production.min.js:\n (**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nscheduler/cjs/scheduler.production.min.js:\n (**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact-dom/cjs/react-dom.production.min.js:\n (**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact/cjs/react-jsx-runtime.production.min.js:\n (**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nlucide-react/dist/esm/shared/src/utils.js:\nlucide-react/dist/esm/defaultAttributes.js:\nlucide-react/dist/esm/Icon.js:\nlucide-react/dist/esm/createLucideIcon.js:\nlucide-react/dist/esm/icons/chevron-down.js:\nlucide-react/dist/esm/icons/chevron-right.js:\nlucide-react/dist/esm/icons/circle-check-big.js:\nlucide-react/dist/esm/icons/download.js:\nlucide-react/dist/esm/icons/eye.js:\nlucide-react/dist/esm/icons/file-text.js:\nlucide-react/dist/esm/icons/flag.js:\nlucide-react/dist/esm/icons/layout-dashboard.js:\nlucide-react/dist/esm/icons/list.js:\nlucide-react/dist/esm/icons/lock.js:\nlucide-react/dist/esm/icons/message-circle.js:\nlucide-react/dist/esm/icons/panels-top-left.js:\nlucide-react/dist/esm/icons/paperclip.js:\nlucide-react/dist/esm/icons/plus.js:\nlucide-react/dist/esm/icons/search.js:\nlucide-react/dist/esm/icons/settings.js:\nlucide-react/dist/esm/icons/tag.js:\nlucide-react/dist/esm/icons/triangle-alert.js:\nlucide-react/dist/esm/icons/upload.js:\nlucide-react/dist/esm/icons/user.js:\nlucide-react/dist/esm/icons/workflow.js:\nlucide-react/dist/esm/icons/x.js:\nlucide-react/dist/esm/lucide-react.js:\n (**\n * @license lucide-react v0.468.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n *)\n*/\n';var Tt=It(import.meta.url),_t=Pt(Tt),Rt=[Ve(_t,"kanban-template.html"),Ve(process.cwd(),"src","server","kanban-template.html"),Ve(process.cwd(),"dist","server","kanban-template.html")];function Nt(n){let e=Rt.find(r=>St(r));if(!e)throw new Error("kanban-template.html not found in expected locations");return Et(e,"utf8").replaceAll("__PORT__",String(n))}function Ft(n){return n.saasMode?`window.__SAAS_MODE__ = true; window.__BOARD_URL__ = ${JSON.stringify(n.boardUrl??"")}; window.__BOARD_NAME__ = ${JSON.stringify(n.boardName??"")}; window.__IS_ADMIN__ = ${n.isAdmin?"true":"false"};`:""}var Lt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSI+PHJlY3Qgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiByeD0iNCIgZmlsbD0iIzI1NjNlYiIvPjxyZWN0IHg9IjIuNSIgeT0iNSIgd2lkdGg9IjIiIGhlaWdodD0iOCIgcng9IjEiIGZpbGw9IndoaXRlIiBvcGFjaXR5PSIwLjciLz48cmVjdCB4PSI2LjUiIHk9IjIiIHdpZHRoPSIyIiBoZWlnaHQ9IjE0IiByeD0iMSIgZmlsbD0id2hpdGUiLz48cmVjdCB4PSIxMC41IiB5PSI2IiB3aWR0aD0iMiIgaGVpZ2h0PSI2IiByeD0iMSIgZmlsbD0id2hpdGUiIG9wYWNpdHk9IjAuNyIvPjxyZWN0IHg9IjE0LjUiIHk9IjQiIHdpZHRoPSIyIiBoZWlnaHQ9IjEwIiByeD0iMSIgZmlsbD0id2hpdGUiIG9wYWNpdHk9IjAuODUiLz48L3N2Zz4=";function Dt(n){return`<!DOCTYPE html>
|
|
29334
|
+
`;function en(t){return`var PROTO_CONFIG = ${JSON.stringify({port:t,wsUrl:`ws://localhost:${t}`,apiUrl:`http://localhost:${t}/api/tasks`,pagesUrl:`http://localhost:${t}/api/pages`,screenshotsUrl:`http://localhost:${t}/screenshots/`})};
|
|
29335
|
+
`+Ze}function Tn(t){return`var PROTO_CONFIG = ${JSON.stringify({port:0,wsUrl:"",apiUrl:`${t}/api/overlay/tasks`,pagesUrl:"",screenshotsUrl:""})};
|
|
29336
|
+
`+Ze}import{existsSync as Wt,readFileSync as jt}from"fs";import{dirname as $t,join as tn}from"path";import{fileURLToPath as zt}from"url";var _n=`*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
|
|
29337
|
+
/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.\\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.mb-0\\.5{margin-bottom:.125rem}.ml-1\\.5{margin-left:.375rem}.mr-0\\.5{margin-right:.125rem}.mt-0\\.5{margin-top:.125rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-7{height:1.75rem}.min-h-\\[30px\\]{min-height:30px}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-10{width:2.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-7{width:1.75rem}.w-full{width:100%}.min-w-\\[100px\\]{min-width:100px}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-text{cursor:text}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-none{border-style:none}.border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.border-slate-700\\/60{border-color:rgba(51,65,85,.6)}.border-slate-800\\/60{border-color:rgba(30,41,59,.6)}.border-violet-700\\/50{border-color:rgba(109,40,217,.5)}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-violet-900\\/30{background-color:rgba(76,29,149,.3)}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\\[10px\\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.leading-tight{line-height:1.25}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(100 116 139/var(--tw-placeholder-opacity,1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity:1;color:rgb(100 116 139/var(--tw-placeholder-opacity,1))}.opacity-0{opacity:0}.opacity-40{opacity:.4}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--p-bg:#020c1b;--p-surface:#080f1e;--p-card:#0a0f1e;--p-input:#050d1a;--p-hover:#0d1f38;--p-border:#1e293b;--p-border-s:#1e3a5f;--p-border-t:#334155;--p-text:#e2e8f0;--p-text-sub:#cbd5e1;--p-text-m:#94a3b8;--p-text-f:#64748b;--p-text-g:#475569;--p-white:#fff;--p-blue:#2563eb;--p-blue-700:#1d4ed8;--p-blue-300:#60a5fa;--p-blue-200:#93c5fd;--p-purple:#a78bfa;--p-purple-300:#c4b5fd;--p-cyan-300:#7dd3fc;--p-amber:#f59e0b;--p-amber-300:#fcd34d;--p-green:#22c55e;--p-green-300:#6ee7b7;--p-red:#f87171;--p-red-500:#ef4444;--p-shadow-lg:0 8px 24px rgba(2,6,23,.28);--p-overlay:rgba(15,23,42,.2)}body,html{height:100%;margin:0;padding:0}body{font-family:Inter,sans-serif;background:var(--p-bg);color:var(--p-text)}#root{height:100%;display:flex;flex-direction:column;overflow:hidden}*{scrollbar-width:thin;scrollbar-color:var(--p-border-t) transparent}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--p-border-t);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--p-text-g)}#kanban-board{scrollbar-width:none;-ms-overflow-style:none;overflow-x:auto;overflow-y:hidden}#kanban-board::-webkit-scrollbar{display:none}#kanban-scroll-track{position:fixed;bottom:0;left:0;right:0;height:6px;background:transparent;z-index:40;pointer-events:none}#kanban-scroll-thumb{position:absolute;top:1px;height:4px;border-radius:2px;background:var(--p-border-t);cursor:pointer;pointer-events:auto;transition:background .15s}#kanban-scroll-thumb.dragging,#kanban-scroll-thumb:hover{background:var(--p-text-g)}.board-column{flex:1 0 260px;max-width:420px;display:flex;flex-direction:column;gap:6px;min-height:0}.column-header{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:8px;background:var(--p-surface);border:1px solid var(--p-border)}.column-scroll{flex:1;overflow-y:auto;min-height:0;gap:5px;padding-bottom:8px}.column-scroll,.task-card{display:flex;flex-direction:column}.task-card{background:var(--p-card);border:1px solid var(--p-border);border-radius:10px;padding:11px 13px;cursor:grab;transition:border-color .12s,background .12s,box-shadow .12s,transform .12s;gap:7px}.task-card:hover{border-color:var(--p-border-s);background:var(--p-hover);box-shadow:0 4px 16px rgba(0,0,0,.3);transform:translateY(-1px)}.task-card:active{cursor:grabbing;transform:scale(.98)}.task-card.dragging{opacity:.4}.drag-over{outline:2px dashed rgba(59,130,246,.5);outline-offset:-3px;border-radius:10px;background:rgba(59,130,246,.04)}.file-compact-actions{opacity:0}.group\\/file-compact:hover .file-compact-actions{opacity:1}.file-normal-actions,.group\\/file-compact:hover .file-compact-ts{opacity:0}.group\\/file:hover .file-normal-actions{opacity:1}.group\\/file:hover{background:rgba(30,41,59,.6)}.status-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}.sd-backlog{background:#475569}.sd-todo{background:#f59e0b}.sd-inprogress{background:#3b82f6;animation:pulse-prog 2s ease-in-out infinite}.sd-review{background:#a855f7}.sd-done{background:#22c55e}@keyframes pulse-prog{0%,to{box-shadow:0 0 0 0 rgba(59,130,246,.5)}50%{box-shadow:0 0 0 4px rgba(59,130,246,0)}}.type-badge{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:20px;font-size:10px;font-weight:500;border:1px solid}.type-bug{color:#fca5a5;background:rgba(239,68,68,.1);border-color:rgba(239,68,68,.25)}.type-feature{color:#86efac;background:rgba(34,197,94,.08);border-color:rgba(34,197,94,.2)}.type-enhancement{color:#93c5fd;background:rgba(59,130,246,.08);border-color:rgba(59,130,246,.2)}.type-task{color:#cbd5e1;background:rgba(148,163,184,.08);border-color:rgba(148,163,184,.2)}.type-research{color:#c4b5fd;background:rgba(139,92,246,.08);border-color:rgba(139,92,246,.2)}.source-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:6px;font-size:10px;font-family:JetBrains Mono,monospace;background:rgba(59,130,246,.06);border:1px solid rgba(59,130,246,.15);color:#60a5fa;cursor:pointer;text-decoration:none;transition:background .1s,border-color .1s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.source-pill:hover{background:rgba(59,130,246,.12);border-color:rgba(59,130,246,.3)}@keyframes spin{to{transform:rotate(1turn)}}.spinner{display:inline-block;width:11px;height:11px;border:2px solid rgba(96,165,250,.3);border-top-color:#60a5fa;border-radius:50%;animation:spin .7s linear infinite}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:50;display:flex;align-items:center;justify-content:center}.modal-box{background:var(--p-card);border:1px solid var(--p-border);border-radius:14px;width:520px;max-width:95vw;overflow:hidden}.type-picker{display:flex;align-items:center;gap:6px}.type-picker-trigger{display:flex;align-items:center;gap:4px;width:auto;height:30px;padding:0 8px;border-radius:8px;border:1px solid var(--p-border-t);background:var(--p-card);color:var(--p-text-sub);font-size:13px;cursor:pointer;white-space:nowrap}.type-picker-label{font-size:11px;font-weight:500;color:var(--p-text-m);letter-spacing:.02em}.type-picker-trigger:hover{border-color:var(--p-text-g);color:var(--p-text)}.type-picker-options{display:none;align-items:center;gap:4px}.type-picker-options.open{display:flex}.type-picker-option{width:28px;height:28px;border-radius:7px;border:1px solid var(--p-border-t);background:var(--p-card);color:var(--p-text-sub);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:13px}.type-picker-option:hover{border-color:#60a5fa;color:#bfdbfe}#detail-panel-container{min-width:360px;max-width:min(860px,100%);position:absolute;right:0;top:0;bottom:0;display:flex;flex-direction:column;overflow:hidden;border-left:1px solid #1e293b;animation:panel-slide-in .18s ease-out}#detail-panel-container.resizing{box-shadow:-12px 0 32px rgba(2,8,23,.6)}#detail-panel-resize-handle{position:absolute;left:0;top:0;width:12px;height:100%;cursor:ew-resize;z-index:5}#detail-panel-resize-handle:hover{background:linear-gradient(90deg,rgba(59,130,246,.22),rgba(59,130,246,0))}body.proto-resizing-panel{cursor:ew-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}#detail-panel{flex:1;background:var(--p-card);display:flex;flex-direction:column;overflow:hidden}@keyframes panel-slide-in{0%{width:0;opacity:0}to{width:420px;opacity:1}}.dp-header{padding:14px 16px 10px}.dp-header,.dp-tabs{border-bottom:1px solid var(--p-border);background:var(--p-surface);flex-shrink:0}.dp-tabs{display:flex;gap:0}.dp-tab{padding:8px 14px;font-size:12px;font-weight:500;color:var(--p-text-g);cursor:pointer;transition:color .12s,border-color .12s;background:none;border:none;border-bottom:2px solid transparent}.dp-tab:hover{color:var(--p-text-m)}.dp-tab.active{color:#93c5fd;border-bottom-color:#3b82f6}.dp-body{overflow:hidden}.dp-body,.dp-body>.dp-pane{flex:1;display:flex;flex-direction:column;gap:12px;min-height:0}.dp-body>.dp-pane{padding:14px 16px}#dp-details-pane,.dp-body>.dp-pane{overflow-y:auto;background:var(--p-card)}.dp-footer{padding:10px 16px 12px;border-top:1px solid var(--p-border);flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--p-card)}.dp-source-pill{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:6px;font-size:10px;font-family:monospace;background:rgba(59,130,246,.06);border:1px solid rgba(59,130,246,.15);color:#60a5fa;white-space:nowrap}.dp-source-pill:hover{background:rgba(59,130,246,.12);border-color:rgba(59,130,246,.3)}.dp-status-btn{padding:3px 10px;border-radius:6px;font-size:10px;font-weight:500;border:1px solid var(--p-border-t);color:var(--p-text-f);background:transparent;cursor:pointer;transition:background .12s,border-color .12s,color .12s}.dp-status-btn:hover{border-color:var(--p-text-g);color:var(--p-text-m)}.dp-status-btn.active-backlog{border-color:#475569;background:rgba(100,116,139,.1);color:#94a3b8}.dp-status-btn.active-todo{border-color:rgba(245,158,11,.5);background:rgba(245,158,11,.1);color:#f59e0b}.dp-status-btn.active-in-progress{border-color:rgba(59,130,246,.5);background:rgba(59,130,246,.1);color:#60a5fa}.dp-status-btn.active-review{border-color:rgba(168,85,247,.5);background:rgba(168,85,247,.1);color:#a855f7}.dp-status-btn.active-done{border-color:rgba(34,197,94,.4);background:rgba(34,197,94,.08);color:#22c55e}.dp-input{width:100%;padding:7px 10px;border:1px solid var(--p-border-s);border-radius:8px;background:var(--p-input);color:var(--p-text);font-size:13px;font-family:inherit;outline:none;transition:border-color .12s,box-shadow .12s;box-sizing:border-box}.dp-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.1)}.dp-input::-moz-placeholder{color:var(--p-border-t)}.dp-input::placeholder{color:var(--p-border-t)}.dp-textarea{width:100%;padding:8px 10px;border:1px solid var(--p-border-s);border-radius:8px;background:var(--p-input);color:var(--p-text);font-size:12px;font-family:monospace;line-height:1.6;resize:vertical;outline:none;box-sizing:border-box;transition:border-color .12s,box-shadow .12s}.dp-textarea:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.1)}.dp-textarea::-moz-placeholder{color:var(--p-border-t)}.dp-textarea::placeholder{color:var(--p-border-t)}.dp-meta-label{font-size:10px;font-weight:600;color:var(--p-text-g);text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}@keyframes pulse-live{0%,to{box-shadow:0 0 0 0 rgba(74,222,128,.4)}50%{box-shadow:0 0 0 4px rgba(74,222,128,0)}}@keyframes agent-pulse{0%,to{opacity:.5}50%{opacity:1}}@keyframes skeleton-pulse{0%,to{opacity:1}50%{opacity:.4}}@keyframes away-glow{0%,to{box-shadow:0 0 0 0 rgba(37,99,235,.45),0 0 24px rgba(37,99,235,.1);border-color:rgba(37,99,235,.35)}50%{box-shadow:0 0 0 14px rgba(37,99,235,0),0 0 48px rgba(37,99,235,.2);border-color:rgba(96,165,250,.6)}}@keyframes away-fade-in{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.focus-within\\:border-blue-500:focus-within{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\\:bg-red-900\\/40:hover{background-color:rgba(127,29,29,.4)}.hover\\:bg-slate-700:hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.hover\\:bg-slate-700\\/50:hover{background-color:rgba(51,65,85,.5)}.hover\\:bg-slate-700\\/60:hover{background-color:rgba(51,65,85,.6)}.hover\\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.hover\\:bg-violet-800\\/30:hover{background-color:rgba(91,33,182,.3)}.hover\\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\\:text-slate-300:hover{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.hover\\:text-violet-300:hover{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.hover\\:underline:hover{text-decoration-line:underline}.group\\/comment:hover .group-hover\\/comment\\:opacity-100{opacity:1}`;var nn='"use strict";(()=>{var _m=Object.create;var ld=Object.defineProperty;var qm=Object.getOwnPropertyDescriptor;var Wm=Object.getOwnPropertyNames;var Vm=Object.getPrototypeOf,$m=Object.prototype.hasOwnProperty;var Yt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Gm=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wm(t))!$m.call(e,o)&&o!==a&&ld(e,o,{get:()=>t[o],enumerable:!(r=qm(t,o))||r.enumerable});return e};var D=(e,t,a)=>(a=e!=null?_m(Vm(e)):{},Gm(t||!e||!e.__esModule?ld(a,"default",{value:e,enumerable:!0}):a,e));var vd=Yt(ne=>{"use strict";var mo=Symbol.for("react.element"),Km=Symbol.for("react.portal"),jm=Symbol.for("react.fragment"),Xm=Symbol.for("react.strict_mode"),Qm=Symbol.for("react.profiler"),Ym=Symbol.for("react.provider"),Zm=Symbol.for("react.context"),Jm=Symbol.for("react.forward_ref"),eg=Symbol.for("react.suspense"),tg=Symbol.for("react.memo"),ag=Symbol.for("react.lazy"),sd=Symbol.iterator;function rg(e){return e===null||typeof e!="object"?null:(e=sd&&e[sd]||e["@@iterator"],typeof e=="function"?e:null)}var dd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fd=Object.assign,cd={};function br(e,t,a){this.props=e,this.context=t,this.refs=cd,this.updater=a||dd}br.prototype.isReactComponent={};br.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};br.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function pd(){}pd.prototype=br.prototype;function Ls(e,t,a){this.props=e,this.context=t,this.refs=cd,this.updater=a||dd}var ys=Ls.prototype=new pd;ys.constructor=Ls;fd(ys,br.prototype);ys.isPureReactComponent=!0;var ud=Array.isArray,md=Object.prototype.hasOwnProperty,Ss={current:null},gd={key:!0,ref:!0,__self:!0,__source:!0};function hd(e,t,a){var r,o={},n=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(n=""+t.key),t)md.call(t,r)&&!gd.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=a;else if(1<s){for(var u=Array(s),d=0;d<s;d++)u[d]=arguments[d+2];o.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:mo,type:e,key:n,ref:l,props:o,_owner:Ss.current}}function og(e,t){return{$$typeof:mo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Is(e){return typeof e=="object"&&e!==null&&e.$$typeof===mo}function ng(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var id=/\\/+/g;function vs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ng(""+e.key):t.toString(36)}function Fn(e,t,a,r,o){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(n){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case mo:case Km:l=!0}}if(l)return l=e,o=o(l),e=r===""?"."+vs(l,0):r,ud(o)?(a="",e!=null&&(a=e.replace(id,"$&/")+"/"),Fn(o,t,a,"",function(d){return d})):o!=null&&(Is(o)&&(o=og(o,a+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(id,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=r===""?".":r+":",ud(e))for(var s=0;s<e.length;s++){n=e[s];var u=r+vs(n,s);l+=Fn(n,t,a,u,o)}else if(u=rg(e),typeof u=="function")for(e=u.call(e),s=0;!(n=e.next()).done;)n=n.value,u=r+vs(n,s++),l+=Fn(n,t,a,u,o);else if(n==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function En(e,t,a){if(e==null)return e;var r=[],o=0;return Fn(e,r,"","",function(n){return t.call(a,n,o++)}),r}function lg(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ke={current:null},Bn={transition:null},sg={ReactCurrentDispatcher:Ke,ReactCurrentBatchConfig:Bn,ReactCurrentOwner:Ss};function xd(){throw Error("act(...) is not supported in production builds of React.")}ne.Children={map:En,forEach:function(e,t,a){En(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return En(e,function(){t++}),t},toArray:function(e){return En(e,function(t){return t})||[]},only:function(e){if(!Is(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ne.Component=br;ne.Fragment=jm;ne.Profiler=Qm;ne.PureComponent=Ls;ne.StrictMode=Xm;ne.Suspense=eg;ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sg;ne.act=xd;ne.cloneElement=function(e,t,a){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=fd({},e.props),o=e.key,n=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(n=t.ref,l=Ss.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)md.call(t,u)&&!gd.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&s!==void 0?s[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=a;else if(1<u){s=Array(u);for(var d=0;d<u;d++)s[d]=arguments[d+2];r.children=s}return{$$typeof:mo,type:e.type,key:o,ref:n,props:r,_owner:l}};ne.createContext=function(e){return e={$$typeof:Zm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ym,_context:e},e.Consumer=e};ne.createElement=hd;ne.createFactory=function(e){var t=hd.bind(null,e);return t.type=e,t};ne.createRef=function(){return{current:null}};ne.forwardRef=function(e){return{$$typeof:Jm,render:e}};ne.isValidElement=Is;ne.lazy=function(e){return{$$typeof:ag,_payload:{_status:-1,_result:e},_init:lg}};ne.memo=function(e,t){return{$$typeof:tg,type:e,compare:t===void 0?null:t}};ne.startTransition=function(e){var t=Bn.transition;Bn.transition={};try{e()}finally{Bn.transition=t}};ne.unstable_act=xd;ne.useCallback=function(e,t){return Ke.current.useCallback(e,t)};ne.useContext=function(e){return Ke.current.useContext(e)};ne.useDebugValue=function(){};ne.useDeferredValue=function(e){return Ke.current.useDeferredValue(e)};ne.useEffect=function(e,t){return Ke.current.useEffect(e,t)};ne.useId=function(){return Ke.current.useId()};ne.useImperativeHandle=function(e,t,a){return Ke.current.useImperativeHandle(e,t,a)};ne.useInsertionEffect=function(e,t){return Ke.current.useInsertionEffect(e,t)};ne.useLayoutEffect=function(e,t){return Ke.current.useLayoutEffect(e,t)};ne.useMemo=function(e,t){return Ke.current.useMemo(e,t)};ne.useReducer=function(e,t,a){return Ke.current.useReducer(e,t,a)};ne.useRef=function(e){return Ke.current.useRef(e)};ne.useState=function(e){return Ke.current.useState(e)};ne.useSyncExternalStore=function(e,t,a){return Ke.current.useSyncExternalStore(e,t,a)};ne.useTransition=function(){return Ke.current.useTransition()};ne.version="18.3.1"});var Ie=Yt((dv,Ld)=>{"use strict";Ld.exports=vd()});var Rd=Yt(xe=>{"use strict";function bs(e,t){var a=e.length;e.push(t);e:for(;0<a;){var r=a-1>>>1,o=e[r];if(0<On(o,t))e[r]=t,e[a]=o,a=r;else break e}}function Pt(e){return e.length===0?null:e[0]}function Un(e){if(e.length===0)return null;var t=e[0],a=e.pop();if(a!==t){e[0]=a;e:for(var r=0,o=e.length,n=o>>>1;r<n;){var l=2*(r+1)-1,s=e[l],u=l+1,d=e[u];if(0>On(s,a))u<o&&0>On(d,s)?(e[r]=d,e[u]=a,r=u):(e[r]=s,e[l]=a,r=l);else if(u<o&&0>On(d,a))e[r]=d,e[u]=a,r=u;else break e}}return t}function On(e,t){var a=e.sortIndex-t.sortIndex;return a!==0?a:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(yd=performance,xe.unstable_now=function(){return yd.now()}):(Cs=Date,Sd=Cs.now(),xe.unstable_now=function(){return Cs.now()-Sd});var yd,Cs,Sd,_t=[],ca=[],ug=1,mt=null,_e=3,Nn=!1,Ka=!1,ho=!1,wd=typeof setTimeout=="function"?setTimeout:null,kd=typeof clearTimeout=="function"?clearTimeout:null,Id=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ps(e){for(var t=Pt(ca);t!==null;){if(t.callback===null)Un(ca);else if(t.startTime<=e)Un(ca),t.sortIndex=t.expirationTime,bs(_t,t);else break;t=Pt(ca)}}function Ts(e){if(ho=!1,Ps(e),!Ka)if(Pt(_t)!==null)Ka=!0,Ds(Rs);else{var t=Pt(ca);t!==null&&As(Ts,t.startTime-e)}}function Rs(e,t){Ka=!1,ho&&(ho=!1,kd(xo),xo=-1),Nn=!0;var a=_e;try{for(Ps(t),mt=Pt(_t);mt!==null&&(!(mt.expirationTime>t)||e&&!Td());){var r=mt.callback;if(typeof r=="function"){mt.callback=null,_e=mt.priorityLevel;var o=r(mt.expirationTime<=t);t=xe.unstable_now(),typeof o=="function"?mt.callback=o:mt===Pt(_t)&&Un(_t),Ps(t)}else Un(_t);mt=Pt(_t)}if(mt!==null)var n=!0;else{var l=Pt(ca);l!==null&&As(Ts,l.startTime-t),n=!1}return n}finally{mt=null,_e=a,Nn=!1}}var Hn=!1,zn=null,xo=-1,bd=5,Pd=-1;function Td(){return!(xe.unstable_now()-Pd<bd)}function ws(){if(zn!==null){var e=xe.unstable_now();Pd=e;var t=!0;try{t=zn(!0,e)}finally{t?go():(Hn=!1,zn=null)}}else Hn=!1}var go;typeof Id=="function"?go=function(){Id(ws)}:typeof MessageChannel<"u"?(ks=new MessageChannel,Cd=ks.port2,ks.port1.onmessage=ws,go=function(){Cd.postMessage(null)}):go=function(){wd(ws,0)};var ks,Cd;function Ds(e){zn=e,Hn||(Hn=!0,go())}function As(e,t){xo=wd(function(){e(xe.unstable_now())},t)}xe.unstable_IdlePriority=5;xe.unstable_ImmediatePriority=1;xe.unstable_LowPriority=4;xe.unstable_NormalPriority=3;xe.unstable_Profiling=null;xe.unstable_UserBlockingPriority=2;xe.unstable_cancelCallback=function(e){e.callback=null};xe.unstable_continueExecution=function(){Ka||Nn||(Ka=!0,Ds(Rs))};xe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):bd=0<e?Math.floor(1e3/e):5};xe.unstable_getCurrentPriorityLevel=function(){return _e};xe.unstable_getFirstCallbackNode=function(){return Pt(_t)};xe.unstable_next=function(e){switch(_e){case 1:case 2:case 3:var t=3;break;default:t=_e}var a=_e;_e=t;try{return e()}finally{_e=a}};xe.unstable_pauseExecution=function(){};xe.unstable_requestPaint=function(){};xe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=_e;_e=e;try{return t()}finally{_e=a}};xe.unstable_scheduleCallback=function(e,t,a){var r=xe.unstable_now();switch(typeof a=="object"&&a!==null?(a=a.delay,a=typeof a=="number"&&0<a?r+a:r):a=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=a+o,e={id:ug++,callback:t,priorityLevel:e,startTime:a,expirationTime:o,sortIndex:-1},a>r?(e.sortIndex=a,bs(ca,e),Pt(_t)===null&&e===Pt(ca)&&(ho?(kd(xo),xo=-1):ho=!0,As(Ts,a-r))):(e.sortIndex=o,bs(_t,e),Ka||Nn||(Ka=!0,Ds(Rs))),e};xe.unstable_shouldYield=Td;xe.unstable_wrapCallback=function(e){var t=_e;return function(){var a=_e;_e=t;try{return e.apply(this,arguments)}finally{_e=a}}}});var Ad=Yt((cv,Dd)=>{"use strict";Dd.exports=Rd()});var Op=Yt(ct=>{"use strict";var ig=Ie(),dt=Ad();function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Nf=new Set,No={};function lr(e,t){Kr(e,t),Kr(e+"Capture",t)}function Kr(e,t){for(No[e]=t,e=0;e<t.length;e++)Nf.add(t[e])}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=Object.prototype.hasOwnProperty,dg=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,Md={},Ed={};function fg(e){return eu.call(Ed,e)?!0:eu.call(Md,e)?!1:dg.test(e)?Ed[e]=!0:(Md[e]=!0,!1)}function cg(e,t,a,r){if(a!==null&&a.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pg(e,t,a,r){if(t===null||typeof t>"u"||cg(e,t,a,r))return!0;if(r)return!1;if(a!==null)switch(a.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qe(e,t,a,r,o,n,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=a,this.propertyName=e,this.type=t,this.sanitizeURL=n,this.removeEmptyString=l}var Ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ne[e]=new Qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ne[t]=new Qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ne[e]=new Qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ne[e]=new Qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ne[e]=new Qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ne[e]=new Qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ne[e]=new Qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ne[e]=new Qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ne[e]=new Qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gu=/[\\-:]([a-z])/g;function Ku(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Gu,Ku);Ne[t]=new Qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Gu,Ku);Ne[t]=new Qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Gu,Ku);Ne[t]=new Qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ne[e]=new Qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ne.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ne[e]=new Qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ju(e,t,a,r){var o=Ne.hasOwnProperty(t)?Ne[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(pg(t,a,o,r)&&(a=null),r||o===null?fg(t)&&(a===null?e.removeAttribute(t):e.setAttribute(t,""+a)):o.mustUseProperty?e[o.propertyName]=a===null?o.type===3?!1:"":a:(t=o.attributeName,r=o.attributeNamespace,a===null?e.removeAttribute(t):(o=o.type,a=o===3||o===4&&a===!0?"":""+a,r?e.setAttributeNS(r,t,a):e.setAttribute(t,a))))}var sa=ig.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_n=Symbol.for("react.element"),Rr=Symbol.for("react.portal"),Dr=Symbol.for("react.fragment"),Xu=Symbol.for("react.strict_mode"),tu=Symbol.for("react.profiler"),Hf=Symbol.for("react.provider"),_f=Symbol.for("react.context"),Qu=Symbol.for("react.forward_ref"),au=Symbol.for("react.suspense"),ru=Symbol.for("react.suspense_list"),Yu=Symbol.for("react.memo"),ma=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var qf=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Fd=Symbol.iterator;function vo(e){return e===null||typeof e!="object"?null:(e=Fd&&e[Fd]||e["@@iterator"],typeof e=="function"?e:null)}var be=Object.assign,Ms;function bo(e){if(Ms===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\\n( *(at )?)/);Ms=t&&t[1]||""}return`\n`+Ms+e}var Es=!1;function Fs(e,t){if(!e||Es)return"";Es=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var o=d.stack.split(`\n`),n=r.stack.split(`\n`),l=o.length-1,s=n.length-1;1<=l&&0<=s&&o[l]!==n[s];)s--;for(;1<=l&&0<=s;l--,s--)if(o[l]!==n[s]){if(l!==1||s!==1)do if(l--,s--,0>s||o[l]!==n[s]){var u=`\n`+o[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=l&&0<=s);break}}}finally{Es=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?bo(e):""}function mg(e){switch(e.tag){case 5:return bo(e.type);case 16:return bo("Lazy");case 13:return bo("Suspense");case 19:return bo("SuspenseList");case 0:case 2:case 15:return e=Fs(e.type,!1),e;case 11:return e=Fs(e.type.render,!1),e;case 1:return e=Fs(e.type,!0),e;default:return""}}function ou(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dr:return"Fragment";case Rr:return"Portal";case tu:return"Profiler";case Xu:return"StrictMode";case au:return"Suspense";case ru:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _f:return(e.displayName||"Context")+".Consumer";case Hf:return(e._context.displayName||"Context")+".Provider";case Qu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yu:return t=e.displayName||null,t!==null?t:ou(e.type)||"Memo";case ma:t=e._payload,e=e._init;try{return ou(e(t))}catch{}}return null}function gg(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ou(t);case 8:return t===Xu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ta(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hg(e){var t=Wf(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,n=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,n.call(this,l)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qn(e){e._valueTracker||(e._valueTracker=hg(e))}function Vf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=Wf(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function hl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nu(e,t){var a=t.checked;return be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function Bd(e,t){var a=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;a=Ta(t.value!=null?t.value:a),e._wrapperState={initialChecked:r,initialValue:a,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $f(e,t){t=t.checked,t!=null&&ju(e,"checked",t,!1)}function lu(e,t){$f(e,t);var a=Ta(t.value),r=t.type;if(a!=null)r==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?su(e,t.type,a):t.hasOwnProperty("defaultValue")&&su(e,t.type,Ta(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Od(e,t,a){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,a||t===e.value||(e.value=t),e.defaultValue=t}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function su(e,t,a){(t!=="number"||hl(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}var Po=Array.isArray;function _r(e,t,a,r){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&r&&(e[a].defaultSelected=!0)}else{for(a=""+Ta(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function uu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return be({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function zd(e,t){var a=t.value;if(a==null){if(a=t.children,t=t.defaultValue,a!=null){if(t!=null)throw Error(P(92));if(Po(a)){if(1<a.length)throw Error(P(93));a=a[0]}t=a}t==null&&(t=""),a=t}e._wrapperState={initialValue:Ta(a)}}function Gf(e,t){var a=Ta(t.value),r=Ta(t.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),t.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),r!=null&&(e.defaultValue=""+r)}function Ud(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Kf(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function iu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Kf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wn,jf=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,a,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,a,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wn=Wn||document.createElement("div"),Wn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ho(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Do={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xg=["Webkit","ms","Moz","O"];Object.keys(Do).forEach(function(e){xg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Do[t]=Do[e]})});function Xf(e,t,a){return t==null||typeof t=="boolean"||t===""?"":a||typeof t!="number"||t===0||Do.hasOwnProperty(e)&&Do[e]?(""+t).trim():t+"px"}function Qf(e,t){e=e.style;for(var a in t)if(t.hasOwnProperty(a)){var r=a.indexOf("--")===0,o=Xf(a,t[a],r);a==="float"&&(a="cssFloat"),r?e.setProperty(a,o):e[a]=o}}var vg=be({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function du(e,t){if(t){if(vg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function fu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var cu=null;function Zu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pu=null,qr=null,Wr=null;function Nd(e){if(e=on(e)){if(typeof pu!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Vl(t),pu(e.stateNode,e.type,t))}}function Yf(e){qr?Wr?Wr.push(e):Wr=[e]:qr=e}function Zf(){if(qr){var e=qr,t=Wr;if(Wr=qr=null,Nd(e),t)for(e=0;e<t.length;e++)Nd(t[e])}}function Jf(e,t){return e(t)}function ec(){}var Bs=!1;function tc(e,t,a){if(Bs)return e(t,a);Bs=!0;try{return Jf(e,t,a)}finally{Bs=!1,(qr!==null||Wr!==null)&&(ec(),Zf())}}function _o(e,t){var a=e.stateNode;if(a===null)return null;var r=Vl(a);if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(P(231,t,typeof a));return a}var mu=!1;if(ra)try{Pr={},Object.defineProperty(Pr,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Pr,Pr),window.removeEventListener("test",Pr,Pr)}catch{mu=!1}var Pr;function Lg(e,t,a,r,o,n,l,s,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(a,d)}catch(g){this.onError(g)}}var Ao=!1,xl=null,vl=!1,gu=null,yg={onError:function(e){Ao=!0,xl=e}};function Sg(e,t,a,r,o,n,l,s,u){Ao=!1,xl=null,Lg.apply(yg,arguments)}function Ig(e,t,a,r,o,n,l,s,u){if(Sg.apply(this,arguments),Ao){if(Ao){var d=xl;Ao=!1,xl=null}else throw Error(P(198));vl||(vl=!0,gu=d)}}function sr(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function ac(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Hd(e){if(sr(e)!==e)throw Error(P(188))}function Cg(e){var t=e.alternate;if(!t){if(t=sr(e),t===null)throw Error(P(188));return t!==e?null:e}for(var a=e,r=t;;){var o=a.return;if(o===null)break;var n=o.alternate;if(n===null){if(r=o.return,r!==null){a=r;continue}break}if(o.child===n.child){for(n=o.child;n;){if(n===a)return Hd(o),e;if(n===r)return Hd(o),t;n=n.sibling}throw Error(P(188))}if(a.return!==r.return)a=o,r=n;else{for(var l=!1,s=o.child;s;){if(s===a){l=!0,a=o,r=n;break}if(s===r){l=!0,r=o,a=n;break}s=s.sibling}if(!l){for(s=n.child;s;){if(s===a){l=!0,a=n,r=o;break}if(s===r){l=!0,r=n,a=o;break}s=s.sibling}if(!l)throw Error(P(189))}}if(a.alternate!==r)throw Error(P(190))}if(a.tag!==3)throw Error(P(188));return a.stateNode.current===a?e:t}function rc(e){return e=Cg(e),e!==null?oc(e):null}function oc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=oc(e);if(t!==null)return t;e=e.sibling}return null}var nc=dt.unstable_scheduleCallback,_d=dt.unstable_cancelCallback,wg=dt.unstable_shouldYield,kg=dt.unstable_requestPaint,Te=dt.unstable_now,bg=dt.unstable_getCurrentPriorityLevel,Ju=dt.unstable_ImmediatePriority,lc=dt.unstable_UserBlockingPriority,Ll=dt.unstable_NormalPriority,Pg=dt.unstable_LowPriority,sc=dt.unstable_IdlePriority,Hl=null,$t=null;function Tg(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(Hl,e,void 0,(e.current.flags&128)===128)}catch{}}var Mt=Math.clz32?Math.clz32:Ag,Rg=Math.log,Dg=Math.LN2;function Ag(e){return e>>>=0,e===0?32:31-(Rg(e)/Dg|0)|0}var Vn=64,$n=4194304;function To(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function yl(e,t){var a=e.pendingLanes;if(a===0)return 0;var r=0,o=e.suspendedLanes,n=e.pingedLanes,l=a&268435455;if(l!==0){var s=l&~o;s!==0?r=To(s):(n&=l,n!==0&&(r=To(n)))}else l=a&~o,l!==0?r=To(l):n!==0&&(r=To(n));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,n=t&-t,o>=n||o===16&&(n&4194240)!==0))return t;if((r&4)!==0&&(r|=a&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)a=31-Mt(t),o=1<<a,r|=e[a],t&=~o;return r}function Mg(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Eg(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,n=e.pendingLanes;0<n;){var l=31-Mt(n),s=1<<l,u=o[l];u===-1?((s&a)===0||(s&r)!==0)&&(o[l]=Mg(s,t)):u<=t&&(e.expiredLanes|=s),n&=~s}}function hu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function uc(){var e=Vn;return Vn<<=1,(Vn&4194240)===0&&(Vn=64),e}function Os(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function an(e,t,a){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mt(t),e[t]=a}function Fg(e,t){var a=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<a;){var o=31-Mt(a),n=1<<o;t[o]=0,r[o]=-1,e[o]=-1,a&=~n}}function ei(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-Mt(a),o=1<<r;o&t|e[r]&t&&(e[r]|=t),a&=~o}}var pe=0;function ic(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var dc,ti,fc,cc,pc,xu=!1,Gn=[],ya=null,Sa=null,Ia=null,qo=new Map,Wo=new Map,ha=[],Bg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function qd(e,t){switch(e){case"focusin":case"focusout":ya=null;break;case"dragenter":case"dragleave":Sa=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":qo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wo.delete(t.pointerId)}}function Lo(e,t,a,r,o,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:n,targetContainers:[o]},t!==null&&(t=on(t),t!==null&&ti(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Og(e,t,a,r,o){switch(t){case"focusin":return ya=Lo(ya,e,t,a,r,o),!0;case"dragenter":return Sa=Lo(Sa,e,t,a,r,o),!0;case"mouseover":return Ia=Lo(Ia,e,t,a,r,o),!0;case"pointerover":var n=o.pointerId;return qo.set(n,Lo(qo.get(n)||null,e,t,a,r,o)),!0;case"gotpointercapture":return n=o.pointerId,Wo.set(n,Lo(Wo.get(n)||null,e,t,a,r,o)),!0}return!1}function mc(e){var t=Qa(e.target);if(t!==null){var a=sr(t);if(a!==null){if(t=a.tag,t===13){if(t=ac(a),t!==null){e.blockedOn=t,pc(e.priority,function(){fc(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ll(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=vu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);cu=r,a.target.dispatchEvent(r),cu=null}else return t=on(a),t!==null&&ti(t),e.blockedOn=a,!1;t.shift()}return!0}function Wd(e,t,a){ll(e)&&a.delete(t)}function zg(){xu=!1,ya!==null&&ll(ya)&&(ya=null),Sa!==null&&ll(Sa)&&(Sa=null),Ia!==null&&ll(Ia)&&(Ia=null),qo.forEach(Wd),Wo.forEach(Wd)}function yo(e,t){e.blockedOn===t&&(e.blockedOn=null,xu||(xu=!0,dt.unstable_scheduleCallback(dt.unstable_NormalPriority,zg)))}function Vo(e){function t(o){return yo(o,e)}if(0<Gn.length){yo(Gn[0],e);for(var a=1;a<Gn.length;a++){var r=Gn[a];r.blockedOn===e&&(r.blockedOn=null)}}for(ya!==null&&yo(ya,e),Sa!==null&&yo(Sa,e),Ia!==null&&yo(Ia,e),qo.forEach(t),Wo.forEach(t),a=0;a<ha.length;a++)r=ha[a],r.blockedOn===e&&(r.blockedOn=null);for(;0<ha.length&&(a=ha[0],a.blockedOn===null);)mc(a),a.blockedOn===null&&ha.shift()}var Vr=sa.ReactCurrentBatchConfig,Sl=!0;function Ug(e,t,a,r){var o=pe,n=Vr.transition;Vr.transition=null;try{pe=1,ai(e,t,a,r)}finally{pe=o,Vr.transition=n}}function Ng(e,t,a,r){var o=pe,n=Vr.transition;Vr.transition=null;try{pe=4,ai(e,t,a,r)}finally{pe=o,Vr.transition=n}}function ai(e,t,a,r){if(Sl){var o=vu(e,t,a,r);if(o===null)Ws(e,t,r,Il,a),qd(e,r);else if(Og(o,e,t,a,r))r.stopPropagation();else if(qd(e,r),t&4&&-1<Bg.indexOf(e)){for(;o!==null;){var n=on(o);if(n!==null&&dc(n),n=vu(e,t,a,r),n===null&&Ws(e,t,r,Il,a),n===o)break;o=n}o!==null&&r.stopPropagation()}else Ws(e,t,r,null,a)}}var Il=null;function vu(e,t,a,r){if(Il=null,e=Zu(r),e=Qa(e),e!==null)if(t=sr(e),t===null)e=null;else if(a=t.tag,a===13){if(e=ac(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Il=e,null}function gc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(bg()){case Ju:return 1;case lc:return 4;case Ll:case Pg:return 16;case sc:return 536870912;default:return 16}default:return 16}}var va=null,ri=null,sl=null;function hc(){if(sl)return sl;var e,t=ri,a=t.length,r,o="value"in va?va.value:va.textContent,n=o.length;for(e=0;e<a&&t[e]===o[e];e++);var l=a-e;for(r=1;r<=l&&t[a-r]===o[n-r];r++);return sl=o.slice(e,1<r?1-r:void 0)}function ul(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Kn(){return!0}function Vd(){return!1}function ft(e){function t(a,r,o,n,l){this._reactName=a,this._targetInst=o,this.type=r,this.nativeEvent=n,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(a=e[s],this[s]=a?a(n):n[s]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?Kn:Vd,this.isPropagationStopped=Vd,this}return be(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Kn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Kn)},persist:function(){},isPersistent:Kn}),t}var eo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oi=ft(eo),rn=be({},eo,{view:0,detail:0}),Hg=ft(rn),zs,Us,So,_l=be({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ni,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==So&&(So&&e.type==="mousemove"?(zs=e.screenX-So.screenX,Us=e.screenY-So.screenY):Us=zs=0,So=e),zs)},movementY:function(e){return"movementY"in e?e.movementY:Us}}),$d=ft(_l),_g=be({},_l,{dataTransfer:0}),qg=ft(_g),Wg=be({},rn,{relatedTarget:0}),Ns=ft(Wg),Vg=be({},eo,{animationName:0,elapsedTime:0,pseudoElement:0}),$g=ft(Vg),Gg=be({},eo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kg=ft(Gg),jg=be({},eo,{data:0}),Gd=ft(jg),Xg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Yg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yg[e])?!!t[e]:!1}function ni(){return Zg}var Jg=be({},rn,{key:function(e){if(e.key){var t=Xg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ul(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ni,charCode:function(e){return e.type==="keypress"?ul(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ul(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eh=ft(Jg),th=be({},_l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kd=ft(th),ah=be({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ni}),rh=ft(ah),oh=be({},eo,{propertyName:0,elapsedTime:0,pseudoElement:0}),nh=ft(oh),lh=be({},_l,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),sh=ft(lh),uh=[9,13,27,32],li=ra&&"CompositionEvent"in window,Mo=null;ra&&"documentMode"in document&&(Mo=document.documentMode);var ih=ra&&"TextEvent"in window&&!Mo,xc=ra&&(!li||Mo&&8<Mo&&11>=Mo),jd=" ",Xd=!1;function vc(e,t){switch(e){case"keyup":return uh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ar=!1;function dh(e,t){switch(e){case"compositionend":return Lc(t);case"keypress":return t.which!==32?null:(Xd=!0,jd);case"textInput":return e=t.data,e===jd&&Xd?null:e;default:return null}}function fh(e,t){if(Ar)return e==="compositionend"||!li&&vc(e,t)?(e=hc(),sl=ri=va=null,Ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return xc&&t.locale!=="ko"?null:t.data;default:return null}}var ch={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ch[e.type]:t==="textarea"}function yc(e,t,a,r){Yf(r),t=Cl(t,"onChange"),0<t.length&&(a=new oi("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var Eo=null,$o=null;function ph(e){Ac(e,0)}function ql(e){var t=Fr(e);if(Vf(t))return e}function mh(e,t){if(e==="change")return t}var Sc=!1;ra&&(ra?(Xn="oninput"in document,Xn||(Hs=document.createElement("div"),Hs.setAttribute("oninput","return;"),Xn=typeof Hs.oninput=="function"),jn=Xn):jn=!1,Sc=jn&&(!document.documentMode||9<document.documentMode));var jn,Xn,Hs;function Yd(){Eo&&(Eo.detachEvent("onpropertychange",Ic),$o=Eo=null)}function Ic(e){if(e.propertyName==="value"&&ql($o)){var t=[];yc(t,$o,e,Zu(e)),tc(ph,t)}}function gh(e,t,a){e==="focusin"?(Yd(),Eo=t,$o=a,Eo.attachEvent("onpropertychange",Ic)):e==="focusout"&&Yd()}function hh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ql($o)}function xh(e,t){if(e==="click")return ql(t)}function vh(e,t){if(e==="input"||e==="change")return ql(t)}function Lh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ft=typeof Object.is=="function"?Object.is:Lh;function Go(e,t){if(Ft(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var o=a[r];if(!eu.call(t,o)||!Ft(e[o],t[o]))return!1}return!0}function Zd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jd(e,t){var a=Zd(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zd(a)}}function Cc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wc(){for(var e=window,t=hl();t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=hl(e.document)}return t}function si(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function yh(e){var t=wc(),a=e.focusedElem,r=e.selectionRange;if(t!==a&&a&&a.ownerDocument&&Cc(a.ownerDocument.documentElement,a)){if(r!==null&&si(a)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in a)a.selectionStart=t,a.selectionEnd=Math.min(e,a.value.length);else if(e=(t=a.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=a.textContent.length,n=Math.min(r.start,o);r=r.end===void 0?n:Math.min(r.end,o),!e.extend&&n>r&&(o=r,r=n,n=o),o=Jd(a,n);var l=Jd(a,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),n>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=a;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<t.length;a++)e=t[a],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sh=ra&&"documentMode"in document&&11>=document.documentMode,Mr=null,Lu=null,Fo=null,yu=!1;function ef(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;yu||Mr==null||Mr!==hl(r)||(r=Mr,"selectionStart"in r&&si(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fo&&Go(Fo,r)||(Fo=r,r=Cl(Lu,"onSelect"),0<r.length&&(t=new oi("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=Mr)))}function Qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Er={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionend:Qn("Transition","TransitionEnd")},_s={},kc={};ra&&(kc=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);function Wl(e){if(_s[e])return _s[e];if(!Er[e])return e;var t=Er[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in kc)return _s[e]=t[a];return e}var bc=Wl("animationend"),Pc=Wl("animationiteration"),Tc=Wl("animationstart"),Rc=Wl("transitionend"),Dc=new Map,tf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Da(e,t){Dc.set(e,t),lr(t,[e])}for(Yn=0;Yn<tf.length;Yn++)Zn=tf[Yn],af=Zn.toLowerCase(),rf=Zn[0].toUpperCase()+Zn.slice(1),Da(af,"on"+rf);var Zn,af,rf,Yn;Da(bc,"onAnimationEnd");Da(Pc,"onAnimationIteration");Da(Tc,"onAnimationStart");Da("dblclick","onDoubleClick");Da("focusin","onFocus");Da("focusout","onBlur");Da(Rc,"onTransitionEnd");Kr("onMouseEnter",["mouseout","mouseover"]);Kr("onMouseLeave",["mouseout","mouseover"]);Kr("onPointerEnter",["pointerout","pointerover"]);Kr("onPointerLeave",["pointerout","pointerover"]);lr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));lr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));lr("onBeforeInput",["compositionend","keypress","textInput","paste"]);lr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));lr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));lr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ih=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ro));function of(e,t,a){var r=e.type||"unknown-event";e.currentTarget=a,Ig(r,t,void 0,e),e.currentTarget=null}function Ac(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],o=r.event;r=r.listeners;e:{var n=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],u=s.instance,d=s.currentTarget;if(s=s.listener,u!==n&&o.isPropagationStopped())break e;of(o,s,d),n=u}else for(l=0;l<r.length;l++){if(s=r[l],u=s.instance,d=s.currentTarget,s=s.listener,u!==n&&o.isPropagationStopped())break e;of(o,s,d),n=u}}}if(vl)throw e=gu,vl=!1,gu=null,e}function ye(e,t){var a=t[ku];a===void 0&&(a=t[ku]=new Set);var r=e+"__bubble";a.has(r)||(Mc(t,e,2,!1),a.add(r))}function qs(e,t,a){var r=0;t&&(r|=4),Mc(a,e,r,t)}var Jn="_reactListening"+Math.random().toString(36).slice(2);function Ko(e){if(!e[Jn]){e[Jn]=!0,Nf.forEach(function(a){a!=="selectionchange"&&(Ih.has(a)||qs(a,!1,e),qs(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jn]||(t[Jn]=!0,qs("selectionchange",!1,t))}}function Mc(e,t,a,r){switch(gc(t)){case 1:var o=Ug;break;case 4:o=Ng;break;default:o=ai}a=o.bind(null,t,a,e),o=void 0,!mu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Ws(e,t,a,r,o){var n=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(l===4)for(l=r.return;l!==null;){var u=l.tag;if((u===3||u===4)&&(u=l.stateNode.containerInfo,u===o||u.nodeType===8&&u.parentNode===o))return;l=l.return}for(;s!==null;){if(l=Qa(s),l===null)return;if(u=l.tag,u===5||u===6){r=n=l;continue e}s=s.parentNode}}r=r.return}tc(function(){var d=n,g=Zu(a),h=[];e:{var m=Dc.get(e);if(m!==void 0){var L=oi,y=e;switch(e){case"keypress":if(ul(a)===0)break e;case"keydown":case"keyup":L=eh;break;case"focusin":y="focus",L=Ns;break;case"focusout":y="blur",L=Ns;break;case"beforeblur":case"afterblur":L=Ns;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=$d;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=qg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=rh;break;case bc:case Pc:case Tc:L=$g;break;case Rc:L=nh;break;case"scroll":L=Hg;break;case"wheel":L=sh;break;case"copy":case"cut":case"paste":L=Kg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Kd}var I=(t&4)!==0,O=!I&&e==="scroll",c=I?m!==null?m+"Capture":null:m;I=[];for(var i=d,f;i!==null;){f=i;var v=f.stateNode;if(f.tag===5&&v!==null&&(f=v,c!==null&&(v=_o(i,c),v!=null&&I.push(jo(i,v,f)))),O)break;i=i.return}0<I.length&&(m=new L(m,y,null,a,g),h.push({event:m,listeners:I}))}}if((t&7)===0){e:{if(m=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",m&&a!==cu&&(y=a.relatedTarget||a.fromElement)&&(Qa(y)||y[oa]))break e;if((L||m)&&(m=g.window===g?g:(m=g.ownerDocument)?m.defaultView||m.parentWindow:window,L?(y=a.relatedTarget||a.toElement,L=d,y=y?Qa(y):null,y!==null&&(O=sr(y),y!==O||y.tag!==5&&y.tag!==6)&&(y=null)):(L=null,y=d),L!==y)){if(I=$d,v="onMouseLeave",c="onMouseEnter",i="mouse",(e==="pointerout"||e==="pointerover")&&(I=Kd,v="onPointerLeave",c="onPointerEnter",i="pointer"),O=L==null?m:Fr(L),f=y==null?m:Fr(y),m=new I(v,i+"leave",L,a,g),m.target=O,m.relatedTarget=f,v=null,Qa(g)===d&&(I=new I(c,i+"enter",y,a,g),I.target=f,I.relatedTarget=O,v=I),O=v,L&&y)t:{for(I=L,c=y,i=0,f=I;f;f=Tr(f))i++;for(f=0,v=c;v;v=Tr(v))f++;for(;0<i-f;)I=Tr(I),i--;for(;0<f-i;)c=Tr(c),f--;for(;i--;){if(I===c||c!==null&&I===c.alternate)break t;I=Tr(I),c=Tr(c)}I=null}else I=null;L!==null&&nf(h,m,L,I,!1),y!==null&&O!==null&&nf(h,O,y,I,!0)}}e:{if(m=d?Fr(d):window,L=m.nodeName&&m.nodeName.toLowerCase(),L==="select"||L==="input"&&m.type==="file")var k=mh;else if(Qd(m))if(Sc)k=vh;else{k=hh;var w=gh}else(L=m.nodeName)&&L.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(k=xh);if(k&&(k=k(e,d))){yc(h,k,a,g);break e}w&&w(e,m,d),e==="focusout"&&(w=m._wrapperState)&&w.controlled&&m.type==="number"&&su(m,"number",m.value)}switch(w=d?Fr(d):window,e){case"focusin":(Qd(w)||w.contentEditable==="true")&&(Mr=w,Lu=d,Fo=null);break;case"focusout":Fo=Lu=Mr=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,ef(h,a,g);break;case"selectionchange":if(Sh)break;case"keydown":case"keyup":ef(h,a,g)}var p;if(li)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Ar?vc(e,a)&&(S="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(S="onCompositionStart");S&&(xc&&a.locale!=="ko"&&(Ar||S!=="onCompositionStart"?S==="onCompositionEnd"&&Ar&&(p=hc()):(va=g,ri="value"in va?va.value:va.textContent,Ar=!0)),w=Cl(d,S),0<w.length&&(S=new Gd(S,e,null,a,g),h.push({event:S,listeners:w}),p?S.data=p:(p=Lc(a),p!==null&&(S.data=p)))),(p=ih?dh(e,a):fh(e,a))&&(d=Cl(d,"onBeforeInput"),0<d.length&&(g=new Gd("onBeforeInput","beforeinput",null,a,g),h.push({event:g,listeners:d}),g.data=p))}Ac(h,t)})}function jo(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Cl(e,t){for(var a=t+"Capture",r=[];e!==null;){var o=e,n=o.stateNode;o.tag===5&&n!==null&&(o=n,n=_o(e,a),n!=null&&r.unshift(jo(e,n,o)),n=_o(e,t),n!=null&&r.push(jo(e,n,o))),e=e.return}return r}function Tr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nf(e,t,a,r,o){for(var n=t._reactName,l=[];a!==null&&a!==r;){var s=a,u=s.alternate,d=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&d!==null&&(s=d,o?(u=_o(a,n),u!=null&&l.unshift(jo(a,u,s))):o||(u=_o(a,n),u!=null&&l.push(jo(a,u,s)))),a=a.return}l.length!==0&&e.push({event:t,listeners:l})}var Ch=/\\r\\n?/g,wh=/\\u0000|\\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(Ch,`\n`).replace(wh,"")}function el(e,t,a){if(t=lf(t),lf(e)!==t&&a)throw Error(P(425))}function wl(){}var Su=null,Iu=null;function Cu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wu=typeof setTimeout=="function"?setTimeout:void 0,kh=typeof clearTimeout=="function"?clearTimeout:void 0,sf=typeof Promise=="function"?Promise:void 0,bh=typeof queueMicrotask=="function"?queueMicrotask:typeof sf<"u"?function(e){return sf.resolve(null).then(e).catch(Ph)}:wu;function Ph(e){setTimeout(function(){throw e})}function Vs(e,t){var a=t,r=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(r===0){e.removeChild(o),Vo(t);return}r--}else a!=="$"&&a!=="$?"&&a!=="$!"||r++;a=o}while(a);Vo(t)}function Ca(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function uf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}var to=Math.random().toString(36).slice(2),Vt="__reactFiber$"+to,Xo="__reactProps$"+to,oa="__reactContainer$"+to,ku="__reactEvents$"+to,Th="__reactListeners$"+to,Rh="__reactHandles$"+to;function Qa(e){var t=e[Vt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[oa]||a[Vt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=uf(e);e!==null;){if(a=e[Vt])return a;e=uf(e)}return t}e=a,a=e.parentNode}return null}function on(e){return e=e[Vt]||e[oa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function Vl(e){return e[Xo]||null}var bu=[],Br=-1;function Aa(e){return{current:e}}function Se(e){0>Br||(e.current=bu[Br],bu[Br]=null,Br--)}function ve(e,t){Br++,bu[Br]=e.current,e.current=t}var Ra={},$e=Aa(Ra),tt=Aa(!1),tr=Ra;function jr(e,t){var a=e.type.contextTypes;if(!a)return Ra;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},n;for(n in a)o[n]=t[n];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function at(e){return e=e.childContextTypes,e!=null}function kl(){Se(tt),Se($e)}function df(e,t,a){if($e.current!==Ra)throw Error(P(168));ve($e,t),ve(tt,a)}function Ec(e,t,a){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return a;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(P(108,gg(e)||"Unknown",o));return be({},a,r)}function bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ra,tr=$e.current,ve($e,e),ve(tt,tt.current),!0}function ff(e,t,a){var r=e.stateNode;if(!r)throw Error(P(169));a?(e=Ec(e,t,tr),r.__reactInternalMemoizedMergedChildContext=e,Se(tt),Se($e),ve($e,e)):Se(tt),ve(tt,a)}var Jt=null,$l=!1,$s=!1;function Fc(e){Jt===null?Jt=[e]:Jt.push(e)}function Dh(e){$l=!0,Fc(e)}function Ma(){if(!$s&&Jt!==null){$s=!0;var e=0,t=pe;try{var a=Jt;for(pe=1;e<a.length;e++){var r=a[e];do r=r(!0);while(r!==null)}Jt=null,$l=!1}catch(o){throw Jt!==null&&(Jt=Jt.slice(e+1)),nc(Ju,Ma),o}finally{pe=t,$s=!1}}return null}var Or=[],zr=0,Pl=null,Tl=0,gt=[],ht=0,ar=null,ea=1,ta="";function ja(e,t){Or[zr++]=Tl,Or[zr++]=Pl,Pl=e,Tl=t}function Bc(e,t,a){gt[ht++]=ea,gt[ht++]=ta,gt[ht++]=ar,ar=e;var r=ea;e=ta;var o=32-Mt(r)-1;r&=~(1<<o),a+=1;var n=32-Mt(t)+o;if(30<n){var l=o-o%5;n=(r&(1<<l)-1).toString(32),r>>=l,o-=l,ea=1<<32-Mt(t)+o|a<<o|r,ta=n+e}else ea=1<<n|a<<o|r,ta=e}function ui(e){e.return!==null&&(ja(e,1),Bc(e,1,0))}function ii(e){for(;e===Pl;)Pl=Or[--zr],Or[zr]=null,Tl=Or[--zr],Or[zr]=null;for(;e===ar;)ar=gt[--ht],gt[ht]=null,ta=gt[--ht],gt[ht]=null,ea=gt[--ht],gt[ht]=null}var it=null,ut=null,Ce=!1,At=null;function Oc(e,t){var a=xt(5,null,null,0);a.elementType="DELETED",a.stateNode=t,a.return=e,t=e.deletions,t===null?(e.deletions=[a],e.flags|=16):t.push(a)}function cf(e,t){switch(e.tag){case 5:var a=e.type;return t=t.nodeType!==1||a.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,it=e,ut=Ca(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,it=e,ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(a=ar!==null?{id:ea,overflow:ta}:null,e.memoizedState={dehydrated:t,treeContext:a,retryLane:1073741824},a=xt(18,null,null,0),a.stateNode=t,a.return=e,e.child=a,it=e,ut=null,!0):!1;default:return!1}}function Pu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Tu(e){if(Ce){var t=ut;if(t){var a=t;if(!cf(e,t)){if(Pu(e))throw Error(P(418));t=Ca(a.nextSibling);var r=it;t&&cf(e,t)?Oc(r,a):(e.flags=e.flags&-4097|2,Ce=!1,it=e)}}else{if(Pu(e))throw Error(P(418));e.flags=e.flags&-4097|2,Ce=!1,it=e}}}function pf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;it=e}function tl(e){if(e!==it)return!1;if(!Ce)return pf(e),Ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Cu(e.type,e.memoizedProps)),t&&(t=ut)){if(Pu(e))throw zc(),Error(P(418));for(;t;)Oc(e,t),t=Ca(t.nextSibling)}if(pf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(t===0){ut=Ca(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++}e=e.nextSibling}ut=null}}else ut=it?Ca(e.stateNode.nextSibling):null;return!0}function zc(){for(var e=ut;e;)e=Ca(e.nextSibling)}function Xr(){ut=it=null,Ce=!1}function di(e){At===null?At=[e]:At.push(e)}var Ah=sa.ReactCurrentBatchConfig;function Io(e,t,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(P(309));var r=a.stateNode}if(!r)throw Error(P(147,e));var o=r,n=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===n?t.ref:(t=function(l){var s=o.refs;l===null?delete s[n]:s[n]=l},t._stringRef=n,t)}if(typeof e!="string")throw Error(P(284));if(!a._owner)throw Error(P(290,e))}return e}function al(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mf(e){var t=e._init;return t(e._payload)}function Uc(e){function t(c,i){if(e){var f=c.deletions;f===null?(c.deletions=[i],c.flags|=16):f.push(i)}}function a(c,i){if(!e)return null;for(;i!==null;)t(c,i),i=i.sibling;return null}function r(c,i){for(c=new Map;i!==null;)i.key!==null?c.set(i.key,i):c.set(i.index,i),i=i.sibling;return c}function o(c,i){return c=Pa(c,i),c.index=0,c.sibling=null,c}function n(c,i,f){return c.index=f,e?(f=c.alternate,f!==null?(f=f.index,f<i?(c.flags|=2,i):f):(c.flags|=2,i)):(c.flags|=1048576,i)}function l(c){return e&&c.alternate===null&&(c.flags|=2),c}function s(c,i,f,v){return i===null||i.tag!==6?(i=Zs(f,c.mode,v),i.return=c,i):(i=o(i,f),i.return=c,i)}function u(c,i,f,v){var k=f.type;return k===Dr?g(c,i,f.props.children,v,f.key):i!==null&&(i.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ma&&mf(k)===i.type)?(v=o(i,f.props),v.ref=Io(c,i,f),v.return=c,v):(v=gl(f.type,f.key,f.props,null,c.mode,v),v.ref=Io(c,i,f),v.return=c,v)}function d(c,i,f,v){return i===null||i.tag!==4||i.stateNode.containerInfo!==f.containerInfo||i.stateNode.implementation!==f.implementation?(i=Js(f,c.mode,v),i.return=c,i):(i=o(i,f.children||[]),i.return=c,i)}function g(c,i,f,v,k){return i===null||i.tag!==7?(i=er(f,c.mode,v,k),i.return=c,i):(i=o(i,f),i.return=c,i)}function h(c,i,f){if(typeof i=="string"&&i!==""||typeof i=="number")return i=Zs(""+i,c.mode,f),i.return=c,i;if(typeof i=="object"&&i!==null){switch(i.$$typeof){case _n:return f=gl(i.type,i.key,i.props,null,c.mode,f),f.ref=Io(c,null,i),f.return=c,f;case Rr:return i=Js(i,c.mode,f),i.return=c,i;case ma:var v=i._init;return h(c,v(i._payload),f)}if(Po(i)||vo(i))return i=er(i,c.mode,f,null),i.return=c,i;al(c,i)}return null}function m(c,i,f,v){var k=i!==null?i.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return k!==null?null:s(c,i,""+f,v);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case _n:return f.key===k?u(c,i,f,v):null;case Rr:return f.key===k?d(c,i,f,v):null;case ma:return k=f._init,m(c,i,k(f._payload),v)}if(Po(f)||vo(f))return k!==null?null:g(c,i,f,v,null);al(c,f)}return null}function L(c,i,f,v,k){if(typeof v=="string"&&v!==""||typeof v=="number")return c=c.get(f)||null,s(i,c,""+v,k);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case _n:return c=c.get(v.key===null?f:v.key)||null,u(i,c,v,k);case Rr:return c=c.get(v.key===null?f:v.key)||null,d(i,c,v,k);case ma:var w=v._init;return L(c,i,f,w(v._payload),k)}if(Po(v)||vo(v))return c=c.get(f)||null,g(i,c,v,k,null);al(i,v)}return null}function y(c,i,f,v){for(var k=null,w=null,p=i,S=i=0,A=null;p!==null&&S<f.length;S++){p.index>S?(A=p,p=null):A=p.sibling;var T=m(c,p,f[S],v);if(T===null){p===null&&(p=A);break}e&&p&&T.alternate===null&&t(c,p),i=n(T,i,S),w===null?k=T:w.sibling=T,w=T,p=A}if(S===f.length)return a(c,p),Ce&&ja(c,S),k;if(p===null){for(;S<f.length;S++)p=h(c,f[S],v),p!==null&&(i=n(p,i,S),w===null?k=p:w.sibling=p,w=p);return Ce&&ja(c,S),k}for(p=r(c,p);S<f.length;S++)A=L(p,c,S,f[S],v),A!==null&&(e&&A.alternate!==null&&p.delete(A.key===null?S:A.key),i=n(A,i,S),w===null?k=A:w.sibling=A,w=A);return e&&p.forEach(function(M){return t(c,M)}),Ce&&ja(c,S),k}function I(c,i,f,v){var k=vo(f);if(typeof k!="function")throw Error(P(150));if(f=k.call(f),f==null)throw Error(P(151));for(var w=k=null,p=i,S=i=0,A=null,T=f.next();p!==null&&!T.done;S++,T=f.next()){p.index>S?(A=p,p=null):A=p.sibling;var M=m(c,p,T.value,v);if(M===null){p===null&&(p=A);break}e&&p&&M.alternate===null&&t(c,p),i=n(M,i,S),w===null?k=M:w.sibling=M,w=M,p=A}if(T.done)return a(c,p),Ce&&ja(c,S),k;if(p===null){for(;!T.done;S++,T=f.next())T=h(c,T.value,v),T!==null&&(i=n(T,i,S),w===null?k=T:w.sibling=T,w=T);return Ce&&ja(c,S),k}for(p=r(c,p);!T.done;S++,T=f.next())T=L(p,c,S,T.value,v),T!==null&&(e&&T.alternate!==null&&p.delete(T.key===null?S:T.key),i=n(T,i,S),w===null?k=T:w.sibling=T,w=T);return e&&p.forEach(function(X){return t(c,X)}),Ce&&ja(c,S),k}function O(c,i,f,v){if(typeof f=="object"&&f!==null&&f.type===Dr&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case _n:e:{for(var k=f.key,w=i;w!==null;){if(w.key===k){if(k=f.type,k===Dr){if(w.tag===7){a(c,w.sibling),i=o(w,f.props.children),i.return=c,c=i;break e}}else if(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ma&&mf(k)===w.type){a(c,w.sibling),i=o(w,f.props),i.ref=Io(c,w,f),i.return=c,c=i;break e}a(c,w);break}else t(c,w);w=w.sibling}f.type===Dr?(i=er(f.props.children,c.mode,v,f.key),i.return=c,c=i):(v=gl(f.type,f.key,f.props,null,c.mode,v),v.ref=Io(c,i,f),v.return=c,c=v)}return l(c);case Rr:e:{for(w=f.key;i!==null;){if(i.key===w)if(i.tag===4&&i.stateNode.containerInfo===f.containerInfo&&i.stateNode.implementation===f.implementation){a(c,i.sibling),i=o(i,f.children||[]),i.return=c,c=i;break e}else{a(c,i);break}else t(c,i);i=i.sibling}i=Js(f,c.mode,v),i.return=c,c=i}return l(c);case ma:return w=f._init,O(c,i,w(f._payload),v)}if(Po(f))return y(c,i,f,v);if(vo(f))return I(c,i,f,v);al(c,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,i!==null&&i.tag===6?(a(c,i.sibling),i=o(i,f),i.return=c,c=i):(a(c,i),i=Zs(f,c.mode,v),i.return=c,c=i),l(c)):a(c,i)}return O}var Qr=Uc(!0),Nc=Uc(!1),Rl=Aa(null),Dl=null,Ur=null,fi=null;function ci(){fi=Ur=Dl=null}function pi(e){var t=Rl.current;Se(Rl),e._currentValue=t}function Ru(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function $r(e,t){Dl=e,fi=Ur=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(et=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(fi!==e)if(e={context:e,memoizedValue:t,next:null},Ur===null){if(Dl===null)throw Error(P(308));Ur=e,Dl.dependencies={lanes:0,firstContext:e}}else Ur=Ur.next=e;return t}var Ya=null;function mi(e){Ya===null?Ya=[e]:Ya.push(e)}function Hc(e,t,a,r){var o=t.interleaved;return o===null?(a.next=a,mi(t)):(a.next=o.next,o.next=a),t.interleaved=a,na(e,r)}function na(e,t){e.lanes|=t;var a=e.alternate;for(a!==null&&(a.lanes|=t),a=e,e=e.return;e!==null;)e.childLanes|=t,a=e.alternate,a!==null&&(a.childLanes|=t),a=e,e=e.return;return a.tag===3?a.stateNode:null}var ga=!1;function gi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _c(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function aa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wa(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(se&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,na(e,a)}return o=r.interleaved,o===null?(t.next=t,mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,na(e,a)}function il(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,ei(e,a)}}function gf(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var o=null,n=null;if(a=a.firstBaseUpdate,a!==null){do{var l={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};n===null?o=n=l:n=n.next=l,a=a.next}while(a!==null);n===null?o=n=t:n=n.next=t}else o=n=t;a={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:n,shared:r.shared,effects:r.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}function Al(e,t,a,r){var o=e.updateQueue;ga=!1;var n=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var u=s,d=u.next;u.next=null,l===null?n=d:l.next=d,l=u;var g=e.alternate;g!==null&&(g=g.updateQueue,s=g.lastBaseUpdate,s!==l&&(s===null?g.firstBaseUpdate=d:s.next=d,g.lastBaseUpdate=u))}if(n!==null){var h=o.baseState;l=0,g=d=u=null,s=n;do{var m=s.lane,L=s.eventTime;if((r&m)===m){g!==null&&(g=g.next={eventTime:L,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=e,I=s;switch(m=t,L=a,I.tag){case 1:if(y=I.payload,typeof y=="function"){h=y.call(L,h,m);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=I.payload,m=typeof y=="function"?y.call(L,h,m):y,m==null)break e;h=be({},h,m);break e;case 2:ga=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=o.effects,m===null?o.effects=[s]:m.push(s))}else L={eventTime:L,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},g===null?(d=g=L,u=h):g=g.next=L,l|=m;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;m=s,s=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(!0);if(g===null&&(u=h),o.baseState=u,o.firstBaseUpdate=d,o.lastBaseUpdate=g,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else n===null&&(o.shared.lanes=0);or|=l,e.lanes=l,e.memoizedState=h}}function hf(e,t,a){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=a,typeof o!="function")throw Error(P(191,o));o.call(r)}}}var nn={},Gt=Aa(nn),Qo=Aa(nn),Yo=Aa(nn);function Za(e){if(e===nn)throw Error(P(174));return e}function hi(e,t){switch(ve(Yo,t),ve(Qo,e),ve(Gt,nn),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:iu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=iu(t,e)}Se(Gt),ve(Gt,t)}function Yr(){Se(Gt),Se(Qo),Se(Yo)}function qc(e){Za(Yo.current);var t=Za(Gt.current),a=iu(t,e.type);t!==a&&(ve(Qo,e),ve(Gt,a))}function xi(e){Qo.current===e&&(Se(Gt),Se(Qo))}var we=Aa(0);function Ml(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Gs=[];function vi(){for(var e=0;e<Gs.length;e++)Gs[e]._workInProgressVersionPrimary=null;Gs.length=0}var dl=sa.ReactCurrentDispatcher,Ks=sa.ReactCurrentBatchConfig,rr=0,ke=null,Me=null,Fe=null,El=!1,Bo=!1,Zo=0,Mh=0;function qe(){throw Error(P(321))}function Li(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ft(e[a],t[a]))return!1;return!0}function yi(e,t,a,r,o,n){if(rr=n,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dl.current=e===null||e.memoizedState===null?Oh:zh,e=a(r,o),Bo){n=0;do{if(Bo=!1,Zo=0,25<=n)throw Error(P(301));n+=1,Fe=Me=null,t.updateQueue=null,dl.current=Uh,e=a(r,o)}while(Bo)}if(dl.current=Fl,t=Me!==null&&Me.next!==null,rr=0,Fe=Me=ke=null,El=!1,t)throw Error(P(300));return e}function Si(){var e=Zo!==0;return Zo=0,e}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?ke.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function yt(){if(Me===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Fe===null?ke.memoizedState:Fe.next;if(t!==null)Fe=t,Me=e;else{if(e===null)throw Error(P(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Fe===null?ke.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Jo(e,t){return typeof t=="function"?t(e):t}function js(e){var t=yt(),a=t.queue;if(a===null)throw Error(P(311));a.lastRenderedReducer=e;var r=Me,o=r.baseQueue,n=a.pending;if(n!==null){if(o!==null){var l=o.next;o.next=n.next,n.next=l}r.baseQueue=o=n,a.pending=null}if(o!==null){n=o.next,r=r.baseState;var s=l=null,u=null,d=n;do{var g=d.lane;if((rr&g)===g)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var h={lane:g,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(s=u=h,l=r):u=u.next=h,ke.lanes|=g,or|=g}d=d.next}while(d!==null&&d!==n);u===null?l=r:u.next=s,Ft(r,t.memoizedState)||(et=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,a.lastRenderedState=r}if(e=a.interleaved,e!==null){o=e;do n=o.lane,ke.lanes|=n,or|=n,o=o.next;while(o!==e)}else o===null&&(a.lanes=0);return[t.memoizedState,a.dispatch]}function Xs(e){var t=yt(),a=t.queue;if(a===null)throw Error(P(311));a.lastRenderedReducer=e;var r=a.dispatch,o=a.pending,n=t.memoizedState;if(o!==null){a.pending=null;var l=o=o.next;do n=e(n,l.action),l=l.next;while(l!==o);Ft(n,t.memoizedState)||(et=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),a.lastRenderedState=n}return[n,r]}function Wc(){}function Vc(e,t){var a=ke,r=yt(),o=t(),n=!Ft(r.memoizedState,o);if(n&&(r.memoizedState=o,et=!0),r=r.queue,Ii(Kc.bind(null,a,r,e),[e]),r.getSnapshot!==t||n||Fe!==null&&Fe.memoizedState.tag&1){if(a.flags|=2048,en(9,Gc.bind(null,a,r,o,t),void 0,null),Be===null)throw Error(P(349));(rr&30)!==0||$c(a,t,o)}return o}function $c(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Gc(e,t,a,r){t.value=a,t.getSnapshot=r,jc(t)&&Xc(e)}function Kc(e,t,a){return a(function(){jc(t)&&Xc(e)})}function jc(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ft(e,a)}catch{return!0}}function Xc(e){var t=na(e,1);t!==null&&Et(t,e,1,-1)}function xf(e){var t=Wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:e},t.queue=e,e=e.dispatch=Bh.bind(null,ke,e),[t.memoizedState,e]}function en(e,t,a,r){return e={tag:e,create:t,destroy:a,deps:r,next:null},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.lastEffect=e.next=e):(a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e)),e}function Qc(){return yt().memoizedState}function fl(e,t,a,r){var o=Wt();ke.flags|=e,o.memoizedState=en(1|t,a,void 0,r===void 0?null:r)}function Gl(e,t,a,r){var o=yt();r=r===void 0?null:r;var n=void 0;if(Me!==null){var l=Me.memoizedState;if(n=l.destroy,r!==null&&Li(r,l.deps)){o.memoizedState=en(t,a,n,r);return}}ke.flags|=e,o.memoizedState=en(1|t,a,n,r)}function vf(e,t){return fl(8390656,8,e,t)}function Ii(e,t){return Gl(2048,8,e,t)}function Yc(e,t){return Gl(4,2,e,t)}function Zc(e,t){return Gl(4,4,e,t)}function Jc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ep(e,t,a){return a=a!=null?a.concat([e]):null,Gl(4,4,Jc.bind(null,t,e),a)}function Ci(){}function tp(e,t){var a=yt();t=t===void 0?null:t;var r=a.memoizedState;return r!==null&&t!==null&&Li(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function ap(e,t){var a=yt();t=t===void 0?null:t;var r=a.memoizedState;return r!==null&&t!==null&&Li(t,r[1])?r[0]:(e=e(),a.memoizedState=[e,t],e)}function rp(e,t,a){return(rr&21)===0?(e.baseState&&(e.baseState=!1,et=!0),e.memoizedState=a):(Ft(a,t)||(a=uc(),ke.lanes|=a,or|=a,e.baseState=!0),t)}function Eh(e,t){var a=pe;pe=a!==0&&4>a?a:4,e(!0);var r=Ks.transition;Ks.transition={};try{e(!1),t()}finally{pe=a,Ks.transition=r}}function op(){return yt().memoizedState}function Fh(e,t,a){var r=ba(e);if(a={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null},np(e))lp(t,a);else if(a=Hc(e,t,a,r),a!==null){var o=Xe();Et(a,e,r,o),sp(a,t,r)}}function Bh(e,t,a){var r=ba(e),o={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null};if(np(e))lp(t,o);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var l=t.lastRenderedState,s=n(l,a);if(o.hasEagerState=!0,o.eagerState=s,Ft(s,l)){var u=t.interleaved;u===null?(o.next=o,mi(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}a=Hc(e,t,o,r),a!==null&&(o=Xe(),Et(a,e,r,o),sp(a,t,r))}}function np(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function lp(e,t){Bo=El=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function sp(e,t,a){if((a&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,ei(e,a)}}var Fl={readContext:Lt,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},Oh={readContext:Lt,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:vf,useImperativeHandle:function(e,t,a){return a=a!=null?a.concat([e]):null,fl(4194308,4,Jc.bind(null,t,e),a)},useLayoutEffect:function(e,t){return fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return fl(4,2,e,t)},useMemo:function(e,t){var a=Wt();return t=t===void 0?null:t,e=e(),a.memoizedState=[e,t],e},useReducer:function(e,t,a){var r=Wt();return t=a!==void 0?a(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Fh.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:xf,useDebugValue:Ci,useDeferredValue:function(e){return Wt().memoizedState=e},useTransition:function(){var e=xf(!1),t=e[0];return e=Eh.bind(null,e[1]),Wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,a){var r=ke,o=Wt();if(Ce){if(a===void 0)throw Error(P(407));a=a()}else{if(a=t(),Be===null)throw Error(P(349));(rr&30)!==0||$c(r,t,a)}o.memoizedState=a;var n={value:a,getSnapshot:t};return o.queue=n,vf(Kc.bind(null,r,n,e),[e]),r.flags|=2048,en(9,Gc.bind(null,r,n,a,t),void 0,null),a},useId:function(){var e=Wt(),t=Be.identifierPrefix;if(Ce){var a=ta,r=ea;a=(r&~(1<<32-Mt(r)-1)).toString(32)+a,t=":"+t+"R"+a,a=Zo++,0<a&&(t+="H"+a.toString(32)),t+=":"}else a=Mh++,t=":"+t+"r"+a.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},zh={readContext:Lt,useCallback:tp,useContext:Lt,useEffect:Ii,useImperativeHandle:ep,useInsertionEffect:Yc,useLayoutEffect:Zc,useMemo:ap,useReducer:js,useRef:Qc,useState:function(){return js(Jo)},useDebugValue:Ci,useDeferredValue:function(e){var t=yt();return rp(t,Me.memoizedState,e)},useTransition:function(){var e=js(Jo)[0],t=yt().memoizedState;return[e,t]},useMutableSource:Wc,useSyncExternalStore:Vc,useId:op,unstable_isNewReconciler:!1},Uh={readContext:Lt,useCallback:tp,useContext:Lt,useEffect:Ii,useImperativeHandle:ep,useInsertionEffect:Yc,useLayoutEffect:Zc,useMemo:ap,useReducer:Xs,useRef:Qc,useState:function(){return Xs(Jo)},useDebugValue:Ci,useDeferredValue:function(e){var t=yt();return Me===null?t.memoizedState=e:rp(t,Me.memoizedState,e)},useTransition:function(){var e=Xs(Jo)[0],t=yt().memoizedState;return[e,t]},useMutableSource:Wc,useSyncExternalStore:Vc,useId:op,unstable_isNewReconciler:!1};function Rt(e,t){if(e&&e.defaultProps){t=be({},t),e=e.defaultProps;for(var a in e)t[a]===void 0&&(t[a]=e[a]);return t}return t}function Du(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:be({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Kl={isMounted:function(e){return(e=e._reactInternals)?sr(e)===e:!1},enqueueSetState:function(e,t,a){e=e._reactInternals;var r=Xe(),o=ba(e),n=aa(r,o);n.payload=t,a!=null&&(n.callback=a),t=wa(e,n,o),t!==null&&(Et(t,e,o,r),il(t,e,o))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=Xe(),o=ba(e),n=aa(r,o);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=wa(e,n,o),t!==null&&(Et(t,e,o,r),il(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Xe(),r=ba(e),o=aa(a,r);o.tag=2,t!=null&&(o.callback=t),t=wa(e,o,r),t!==null&&(Et(t,e,r,a),il(t,e,r))}};function Lf(e,t,a,r,o,n,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,n,l):t.prototype&&t.prototype.isPureReactComponent?!Go(a,r)||!Go(o,n):!0}function up(e,t,a){var r=!1,o=Ra,n=t.contextType;return typeof n=="object"&&n!==null?n=Lt(n):(o=at(t)?tr:$e.current,r=t.contextTypes,n=(r=r!=null)?jr(e,o):Ra),t=new t(a,n),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Kl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=n),t}function yf(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&Kl.enqueueReplaceState(t,t.state,null)}function Au(e,t,a,r){var o=e.stateNode;o.props=a,o.state=e.memoizedState,o.refs={},gi(e);var n=t.contextType;typeof n=="object"&&n!==null?o.context=Lt(n):(n=at(t)?tr:$e.current,o.context=jr(e,n)),o.state=e.memoizedState,n=t.getDerivedStateFromProps,typeof n=="function"&&(Du(e,t,n,a),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Kl.enqueueReplaceState(o,o.state,null),Al(e,a,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Zr(e,t){try{var a="",r=t;do a+=mg(r),r=r.return;while(r);var o=a}catch(n){o=`\nError generating stack: `+n.message+`\n`+n.stack}return{value:e,source:t,stack:o,digest:null}}function Qs(e,t,a){return{value:e,source:null,stack:a??null,digest:t??null}}function Mu(e,t){try{console.error(t.value)}catch(a){setTimeout(function(){throw a})}}var Nh=typeof WeakMap=="function"?WeakMap:Map;function ip(e,t,a){a=aa(-1,a),a.tag=3,a.payload={element:null};var r=t.value;return a.callback=function(){Ol||(Ol=!0,qu=r),Mu(e,t)},a}function dp(e,t,a){a=aa(-1,a),a.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;a.payload=function(){return r(o)},a.callback=function(){Mu(e,t)}}var n=e.stateNode;return n!==null&&typeof n.componentDidCatch=="function"&&(a.callback=function(){Mu(e,t),typeof r!="function"&&(ka===null?ka=new Set([this]):ka.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),a}function Sf(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new Nh;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(a)||(o.add(a),e=Jh.bind(null,e,t,a),t.then(e,e))}function If(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Cf(e,t,a,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(t=aa(-1,1),t.tag=2,wa(a,t,1))),a.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Hh=sa.ReactCurrentOwner,et=!1;function je(e,t,a,r){t.child=e===null?Nc(t,null,a,r):Qr(t,e.child,a,r)}function wf(e,t,a,r,o){a=a.render;var n=t.ref;return $r(t,o),r=yi(e,t,a,r,n,o),a=Si(),e!==null&&!et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,la(e,t,o)):(Ce&&a&&ui(t),t.flags|=1,je(e,t,r,o),t.child)}function kf(e,t,a,r,o){if(e===null){var n=a.type;return typeof n=="function"&&!Ai(n)&&n.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(t.tag=15,t.type=n,fp(e,t,n,r,o)):(e=gl(a.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,(e.lanes&o)===0){var l=n.memoizedProps;if(a=a.compare,a=a!==null?a:Go,a(l,r)&&e.ref===t.ref)return la(e,t,o)}return t.flags|=1,e=Pa(n,r),e.ref=t.ref,e.return=t,t.child=e}function fp(e,t,a,r,o){if(e!==null){var n=e.memoizedProps;if(Go(n,r)&&e.ref===t.ref)if(et=!1,t.pendingProps=r=n,(e.lanes&o)!==0)(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,la(e,t,o)}return Eu(e,t,a,r,o)}function cp(e,t,a){var r=t.pendingProps,o=r.children,n=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ve(Hr,st),st|=a;else{if((a&1073741824)===0)return e=n!==null?n.baseLanes|a:a,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ve(Hr,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=n!==null?n.baseLanes:a,ve(Hr,st),st|=r}else n!==null?(r=n.baseLanes|a,t.memoizedState=null):r=a,ve(Hr,st),st|=r;return je(e,t,o,a),t.child}function pp(e,t){var a=t.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(t.flags|=512,t.flags|=2097152)}function Eu(e,t,a,r,o){var n=at(a)?tr:$e.current;return n=jr(t,n),$r(t,o),a=yi(e,t,a,r,n,o),r=Si(),e!==null&&!et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,la(e,t,o)):(Ce&&r&&ui(t),t.flags|=1,je(e,t,a,o),t.child)}function bf(e,t,a,r,o){if(at(a)){var n=!0;bl(t)}else n=!1;if($r(t,o),t.stateNode===null)cl(e,t),up(t,a,r),Au(t,a,r,o),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var u=l.context,d=a.contextType;typeof d=="object"&&d!==null?d=Lt(d):(d=at(a)?tr:$e.current,d=jr(t,d));var g=a.getDerivedStateFromProps,h=typeof g=="function"||typeof l.getSnapshotBeforeUpdate=="function";h||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||u!==d)&&yf(t,l,r,d),ga=!1;var m=t.memoizedState;l.state=m,Al(t,r,l,o),u=t.memoizedState,s!==r||m!==u||tt.current||ga?(typeof g=="function"&&(Du(t,a,g,r),u=t.memoizedState),(s=ga||Lf(t,a,s,r,m,u,d))?(h||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),l.props=r,l.state=u,l.context=d,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,_c(e,t),s=t.memoizedProps,d=t.type===t.elementType?s:Rt(t.type,s),l.props=d,h=t.pendingProps,m=l.context,u=a.contextType,typeof u=="object"&&u!==null?u=Lt(u):(u=at(a)?tr:$e.current,u=jr(t,u));var L=a.getDerivedStateFromProps;(g=typeof L=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==h||m!==u)&&yf(t,l,r,u),ga=!1,m=t.memoizedState,l.state=m,Al(t,r,l,o);var y=t.memoizedState;s!==h||m!==y||tt.current||ga?(typeof L=="function"&&(Du(t,a,L,r),y=t.memoizedState),(d=ga||Lf(t,a,d,r,m,y,u)||!1)?(g||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,y,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,y,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),l.props=r,l.state=y,l.context=u,r=d):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Fu(e,t,a,r,n,o)}function Fu(e,t,a,r,o,n){pp(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return o&&ff(t,a,!1),la(e,t,n);r=t.stateNode,Hh.current=t;var s=l&&typeof a.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Qr(t,e.child,null,n),t.child=Qr(t,null,s,n)):je(e,t,s,n),t.memoizedState=r.state,o&&ff(t,a,!0),t.child}function mp(e){var t=e.stateNode;t.pendingContext?df(e,t.pendingContext,t.pendingContext!==t.context):t.context&&df(e,t.context,!1),hi(e,t.containerInfo)}function Pf(e,t,a,r,o){return Xr(),di(o),t.flags|=256,je(e,t,a,r),t.child}var Bu={dehydrated:null,treeContext:null,retryLane:0};function Ou(e){return{baseLanes:e,cachePool:null,transitions:null}}function gp(e,t,a){var r=t.pendingProps,o=we.current,n=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(n=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ve(we,o&1),e===null)return Tu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(l=r.children,e=r.fallback,n?(r=t.mode,n=t.child,l={mode:"hidden",children:l},(r&1)===0&&n!==null?(n.childLanes=0,n.pendingProps=l):n=Ql(l,r,0,null),e=er(e,r,a,null),n.return=t,e.return=t,n.sibling=e,t.child=n,t.child.memoizedState=Ou(a),t.memoizedState=Bu,e):wi(t,l));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return _h(e,t,l,r,s,o,a);if(n){n=r.fallback,l=t.mode,o=e.child,s=o.sibling;var u={mode:"hidden",children:r.children};return(l&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Pa(o,u),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?n=Pa(s,n):(n=er(n,l,a,null),n.flags|=2),n.return=t,r.return=t,r.sibling=n,t.child=r,r=n,n=t.child,l=e.child.memoizedState,l=l===null?Ou(a):{baseLanes:l.baseLanes|a,cachePool:null,transitions:l.transitions},n.memoizedState=l,n.childLanes=e.childLanes&~a,t.memoizedState=Bu,r}return n=e.child,e=n.sibling,r=Pa(n,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=a),r.return=t,r.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=r,t.memoizedState=null,r}function wi(e,t){return t=Ql({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rl(e,t,a,r){return r!==null&&di(r),Qr(t,e.child,null,a),e=wi(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _h(e,t,a,r,o,n,l){if(a)return t.flags&256?(t.flags&=-257,r=Qs(Error(P(422))),rl(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(n=r.fallback,o=t.mode,r=Ql({mode:"visible",children:r.children},o,0,null),n=er(n,o,l,null),n.flags|=2,r.return=t,n.return=t,r.sibling=n,t.child=r,(t.mode&1)!==0&&Qr(t,e.child,null,l),t.child.memoizedState=Ou(l),t.memoizedState=Bu,n);if((t.mode&1)===0)return rl(e,t,l,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,n=Error(P(419)),r=Qs(n,r,void 0),rl(e,t,l,r)}if(s=(l&e.childLanes)!==0,et||s){if(r=Be,r!==null){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|l))!==0?0:o,o!==0&&o!==n.retryLane&&(n.retryLane=o,na(e,o),Et(r,e,o,-1))}return Di(),r=Qs(Error(P(421))),rl(e,t,l,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=ex.bind(null,e),o._reactRetry=t,null):(e=n.treeContext,ut=Ca(o.nextSibling),it=t,Ce=!0,At=null,e!==null&&(gt[ht++]=ea,gt[ht++]=ta,gt[ht++]=ar,ea=e.id,ta=e.overflow,ar=t),t=wi(t,r.children),t.flags|=4096,t)}function Tf(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ru(e.return,t,a)}function Ys(e,t,a,r,o){var n=e.memoizedState;n===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:o}:(n.isBackwards=t,n.rendering=null,n.renderingStartTime=0,n.last=r,n.tail=a,n.tailMode=o)}function hp(e,t,a){var r=t.pendingProps,o=r.revealOrder,n=r.tail;if(je(e,t,r.children,a),r=we.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tf(e,a,t);else if(e.tag===19)Tf(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ve(we,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Ml(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Ys(t,!1,o,a,n);break;case"backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ml(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Ys(t,!0,a,null,n);break;case"together":Ys(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function la(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),or|=t.lanes,(a&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,a=Pa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Pa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function qh(e,t,a){switch(t.tag){case 3:mp(t),Xr();break;case 5:qc(t);break;case 1:at(t.type)&&bl(t);break;case 4:hi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ve(Rl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ve(we,we.current&1),t.flags|=128,null):(a&t.child.childLanes)!==0?gp(e,t,a):(ve(we,we.current&1),e=la(e,t,a),e!==null?e.sibling:null);ve(we,we.current&1);break;case 19:if(r=(a&t.childLanes)!==0,(e.flags&128)!==0){if(r)return hp(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ve(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,cp(e,t,a)}return la(e,t,a)}var xp,zu,vp,Lp;xp=function(e,t){for(var a=t.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}};zu=function(){};vp=function(e,t,a,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Za(Gt.current);var n=null;switch(a){case"input":o=nu(e,o),r=nu(e,r),n=[];break;case"select":o=be({},o,{value:void 0}),r=be({},r,{value:void 0}),n=[];break;case"textarea":o=uu(e,o),r=uu(e,r),n=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=wl)}du(a,r);var l;a=null;for(d in o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&o[d]!=null)if(d==="style"){var s=o[d];for(l in s)s.hasOwnProperty(l)&&(a||(a={}),a[l]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(No.hasOwnProperty(d)?n||(n=[]):(n=n||[]).push(d,null));for(d in r){var u=r[d];if(s=o!=null?o[d]:void 0,r.hasOwnProperty(d)&&u!==s&&(u!=null||s!=null))if(d==="style")if(s){for(l in s)!s.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(a||(a={}),a[l]="");for(l in u)u.hasOwnProperty(l)&&s[l]!==u[l]&&(a||(a={}),a[l]=u[l])}else a||(n||(n=[]),n.push(d,a)),a=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(n=n||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(n=n||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(No.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&ye("scroll",e),n||s===u||(n=[])):(n=n||[]).push(d,u))}a&&(n=n||[]).push("style",a);var d=n;(t.updateQueue=d)&&(t.flags|=4)}};Lp=function(e,t,a,r){a!==r&&(t.flags|=4)};function Co(e,t){if(!Ce)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function Wh(e,t,a){var r=t.pendingProps;switch(ii(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return at(t.type)&&kl(),We(t),null;case 3:return r=t.stateNode,Yr(),Se(tt),Se($e),vi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,At!==null&&($u(At),At=null))),zu(e,t),We(t),null;case 5:xi(t);var o=Za(Yo.current);if(a=t.type,e!==null&&t.stateNode!=null)vp(e,t,a,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(P(166));return We(t),null}if(e=Za(Gt.current),tl(t)){r=t.stateNode,a=t.type;var n=t.memoizedProps;switch(r[Vt]=t,r[Xo]=n,e=(t.mode&1)!==0,a){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(o=0;o<Ro.length;o++)ye(Ro[o],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":Bd(r,n),ye("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!n.multiple},ye("invalid",r);break;case"textarea":zd(r,n),ye("invalid",r)}du(a,n),o=null;for(var l in n)if(n.hasOwnProperty(l)){var s=n[l];l==="children"?typeof s=="string"?r.textContent!==s&&(n.suppressHydrationWarning!==!0&&el(r.textContent,s,e),o=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(n.suppressHydrationWarning!==!0&&el(r.textContent,s,e),o=["children",""+s]):No.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&ye("scroll",r)}switch(a){case"input":qn(r),Od(r,n,!0);break;case"textarea":qn(r),Ud(r);break;case"select":case"option":break;default:typeof n.onClick=="function"&&(r.onclick=wl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Kf(a)),e==="http://www.w3.org/1999/xhtml"?a==="script"?(e=l.createElement("div"),e.innerHTML="<script><\\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(a,{is:r.is}):(e=l.createElement(a),a==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,a),e[Vt]=t,e[Xo]=r,xp(e,t,!1,!1),t.stateNode=e;e:{switch(l=fu(a,r),a){case"dialog":ye("cancel",e),ye("close",e),o=r;break;case"iframe":case"object":case"embed":ye("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ro.length;o++)ye(Ro[o],e);o=r;break;case"source":ye("error",e),o=r;break;case"img":case"image":case"link":ye("error",e),ye("load",e),o=r;break;case"details":ye("toggle",e),o=r;break;case"input":Bd(e,r),o=nu(e,r),ye("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=be({},r,{value:void 0}),ye("invalid",e);break;case"textarea":zd(e,r),o=uu(e,r),ye("invalid",e);break;default:o=r}du(a,o),s=o;for(n in s)if(s.hasOwnProperty(n)){var u=s[n];n==="style"?Qf(e,u):n==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&jf(e,u)):n==="children"?typeof u=="string"?(a!=="textarea"||u!=="")&&Ho(e,u):typeof u=="number"&&Ho(e,""+u):n!=="suppressContentEditableWarning"&&n!=="suppressHydrationWarning"&&n!=="autoFocus"&&(No.hasOwnProperty(n)?u!=null&&n==="onScroll"&&ye("scroll",e):u!=null&&ju(e,n,u,l))}switch(a){case"input":qn(e),Od(e,r,!1);break;case"textarea":qn(e),Ud(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ta(r.value));break;case"select":e.multiple=!!r.multiple,n=r.value,n!=null?_r(e,!!r.multiple,n,!1):r.defaultValue!=null&&_r(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=wl)}switch(a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return We(t),null;case 6:if(e&&t.stateNode!=null)Lp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(a=Za(Yo.current),Za(Gt.current),tl(t)){if(r=t.stateNode,a=t.memoizedProps,r[Vt]=t,(n=r.nodeValue!==a)&&(e=it,e!==null))switch(e.tag){case 3:el(r.nodeValue,a,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&el(r.nodeValue,a,(e.mode&1)!==0)}n&&(t.flags|=4)}else r=(a.nodeType===9?a:a.ownerDocument).createTextNode(r),r[Vt]=t,t.stateNode=r}return We(t),null;case 13:if(Se(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ce&&ut!==null&&(t.mode&1)!==0&&(t.flags&128)===0)zc(),Xr(),t.flags|=98560,n=!1;else if(n=tl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!n)throw Error(P(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(P(317));n[Vt]=t}else Xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),n=!1}else At!==null&&($u(At),At=null),n=!0;if(!n)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=a,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(we.current&1)!==0?Ee===0&&(Ee=3):Di())),t.updateQueue!==null&&(t.flags|=4),We(t),null);case 4:return Yr(),zu(e,t),e===null&&Ko(t.stateNode.containerInfo),We(t),null;case 10:return pi(t.type._context),We(t),null;case 17:return at(t.type)&&kl(),We(t),null;case 19:if(Se(we),n=t.memoizedState,n===null)return We(t),null;if(r=(t.flags&128)!==0,l=n.rendering,l===null)if(r)Co(n,!1);else{if(Ee!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(l=Ml(e),l!==null){for(t.flags|=128,Co(n,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=a,a=t.child;a!==null;)n=a,e=r,n.flags&=14680066,l=n.alternate,l===null?(n.childLanes=0,n.lanes=e,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,e=l.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return ve(we,we.current&1|2),t.child}e=e.sibling}n.tail!==null&&Te()>Jr&&(t.flags|=128,r=!0,Co(n,!1),t.lanes=4194304)}else{if(!r)if(e=Ml(l),e!==null){if(t.flags|=128,r=!0,a=e.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),Co(n,!0),n.tail===null&&n.tailMode==="hidden"&&!l.alternate&&!Ce)return We(t),null}else 2*Te()-n.renderingStartTime>Jr&&a!==1073741824&&(t.flags|=128,r=!0,Co(n,!1),t.lanes=4194304);n.isBackwards?(l.sibling=t.child,t.child=l):(a=n.last,a!==null?a.sibling=l:t.child=l,n.last=l)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=Te(),t.sibling=null,a=we.current,ve(we,r?a&1|2:a&1),t):(We(t),null);case 22:case 23:return Ri(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(st&1073741824)!==0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Vh(e,t){switch(ii(t),t.tag){case 1:return at(t.type)&&kl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yr(),Se(tt),Se($e),vi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return xi(t),null;case 13:if(Se(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(we),null;case 4:return Yr(),null;case 10:return pi(t.type._context),null;case 22:case 23:return Ri(),null;case 24:return null;default:return null}}var ol=!1,Ve=!1,$h=typeof WeakSet=="function"?WeakSet:Set,B=null;function Nr(e,t){var a=e.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(r){Pe(e,t,r)}else a.current=null}function Uu(e,t,a){try{a()}catch(r){Pe(e,t,r)}}var Rf=!1;function Gh(e,t){if(Su=Sl,e=wc(),si(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var o=r.anchorOffset,n=r.focusNode;r=r.focusOffset;try{a.nodeType,n.nodeType}catch{a=null;break e}var l=0,s=-1,u=-1,d=0,g=0,h=e,m=null;t:for(;;){for(var L;h!==a||o!==0&&h.nodeType!==3||(s=l+o),h!==n||r!==0&&h.nodeType!==3||(u=l+r),h.nodeType===3&&(l+=h.nodeValue.length),(L=h.firstChild)!==null;)m=h,h=L;for(;;){if(h===e)break t;if(m===a&&++d===o&&(s=l),m===n&&++g===r&&(u=l),(L=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=L}a=s===-1||u===-1?null:{start:s,end:u}}else a=null}a=a||{start:0,end:0}}else a=null;for(Iu={focusedElem:e,selectionRange:a},Sl=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var I=y.memoizedProps,O=y.memoizedState,c=t.stateNode,i=c.getSnapshotBeforeUpdate(t.elementType===t.type?I:Rt(t.type,I),O);c.__reactInternalSnapshotBeforeUpdate=i}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(v){Pe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return y=Rf,Rf=!1,y}function Oo(e,t,a){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var n=o.destroy;o.destroy=void 0,n!==void 0&&Uu(t,a,n)}o=o.next}while(o!==r)}}function jl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var a=t=t.next;do{if((a.tag&e)===e){var r=a.create;a.destroy=r()}a=a.next}while(a!==t)}}function Nu(e){var t=e.ref;if(t!==null){var a=e.stateNode;switch(e.tag){case 5:e=a;break;default:e=a}typeof t=="function"?t(e):t.current=e}}function yp(e){var t=e.alternate;t!==null&&(e.alternate=null,yp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vt],delete t[Xo],delete t[ku],delete t[Th],delete t[Rh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Sp(e){return e.tag===5||e.tag===3||e.tag===4}function Df(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hu(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.nodeType===8?a.parentNode.insertBefore(e,t):a.insertBefore(e,t):(a.nodeType===8?(t=a.parentNode,t.insertBefore(e,a)):(t=a,t.appendChild(e)),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=wl));else if(r!==4&&(e=e.child,e!==null))for(Hu(e,t,a),e=e.sibling;e!==null;)Hu(e,t,a),e=e.sibling}function _u(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(_u(e,t,a),e=e.sibling;e!==null;)_u(e,t,a),e=e.sibling}var ze=null,Dt=!1;function pa(e,t,a){for(a=a.child;a!==null;)Ip(e,t,a),a=a.sibling}function Ip(e,t,a){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(Hl,a)}catch{}switch(a.tag){case 5:Ve||Nr(a,t);case 6:var r=ze,o=Dt;ze=null,pa(e,t,a),ze=r,Dt=o,ze!==null&&(Dt?(e=ze,a=a.stateNode,e.nodeType===8?e.parentNode.removeChild(a):e.removeChild(a)):ze.removeChild(a.stateNode));break;case 18:ze!==null&&(Dt?(e=ze,a=a.stateNode,e.nodeType===8?Vs(e.parentNode,a):e.nodeType===1&&Vs(e,a),Vo(e)):Vs(ze,a.stateNode));break;case 4:r=ze,o=Dt,ze=a.stateNode.containerInfo,Dt=!0,pa(e,t,a),ze=r,Dt=o;break;case 0:case 11:case 14:case 15:if(!Ve&&(r=a.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var n=o,l=n.destroy;n=n.tag,l!==void 0&&((n&2)!==0||(n&4)!==0)&&Uu(a,t,l),o=o.next}while(o!==r)}pa(e,t,a);break;case 1:if(!Ve&&(Nr(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=a.memoizedProps,r.state=a.memoizedState,r.componentWillUnmount()}catch(s){Pe(a,t,s)}pa(e,t,a);break;case 21:pa(e,t,a);break;case 22:a.mode&1?(Ve=(r=Ve)||a.memoizedState!==null,pa(e,t,a),Ve=r):pa(e,t,a);break;default:pa(e,t,a)}}function Af(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new $h),t.forEach(function(r){var o=tx.bind(null,e,r);a.has(r)||(a.add(r),r.then(o,o))})}}function Tt(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var o=a[r];try{var n=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:ze=s.stateNode,Dt=!1;break e;case 3:ze=s.stateNode.containerInfo,Dt=!0;break e;case 4:ze=s.stateNode.containerInfo,Dt=!0;break e}s=s.return}if(ze===null)throw Error(P(160));Ip(n,l,o),ze=null,Dt=!1;var u=o.alternate;u!==null&&(u.return=null),o.return=null}catch(d){Pe(o,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Cp(t,e),t=t.sibling}function Cp(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tt(t,e),qt(e),r&4){try{Oo(3,e,e.return),jl(3,e)}catch(I){Pe(e,e.return,I)}try{Oo(5,e,e.return)}catch(I){Pe(e,e.return,I)}}break;case 1:Tt(t,e),qt(e),r&512&&a!==null&&Nr(a,a.return);break;case 5:if(Tt(t,e),qt(e),r&512&&a!==null&&Nr(a,a.return),e.flags&32){var o=e.stateNode;try{Ho(o,"")}catch(I){Pe(e,e.return,I)}}if(r&4&&(o=e.stateNode,o!=null)){var n=e.memoizedProps,l=a!==null?a.memoizedProps:n,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&n.type==="radio"&&n.name!=null&&$f(o,n),fu(s,l);var d=fu(s,n);for(l=0;l<u.length;l+=2){var g=u[l],h=u[l+1];g==="style"?Qf(o,h):g==="dangerouslySetInnerHTML"?jf(o,h):g==="children"?Ho(o,h):ju(o,g,h,d)}switch(s){case"input":lu(o,n);break;case"textarea":Gf(o,n);break;case"select":var m=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!n.multiple;var L=n.value;L!=null?_r(o,!!n.multiple,L,!1):m!==!!n.multiple&&(n.defaultValue!=null?_r(o,!!n.multiple,n.defaultValue,!0):_r(o,!!n.multiple,n.multiple?[]:"",!1))}o[Xo]=n}catch(I){Pe(e,e.return,I)}}break;case 6:if(Tt(t,e),qt(e),r&4){if(e.stateNode===null)throw Error(P(162));o=e.stateNode,n=e.memoizedProps;try{o.nodeValue=n}catch(I){Pe(e,e.return,I)}}break;case 3:if(Tt(t,e),qt(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Vo(t.containerInfo)}catch(I){Pe(e,e.return,I)}break;case 4:Tt(t,e),qt(e);break;case 13:Tt(t,e),qt(e),o=e.child,o.flags&8192&&(n=o.memoizedState!==null,o.stateNode.isHidden=n,!n||o.alternate!==null&&o.alternate.memoizedState!==null||(Pi=Te())),r&4&&Af(e);break;case 22:if(g=a!==null&&a.memoizedState!==null,e.mode&1?(Ve=(d=Ve)||g,Tt(t,e),Ve=d):Tt(t,e),qt(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!g&&(e.mode&1)!==0)for(B=e,g=e.child;g!==null;){for(h=B=g;B!==null;){switch(m=B,L=m.child,m.tag){case 0:case 11:case 14:case 15:Oo(4,m,m.return);break;case 1:Nr(m,m.return);var y=m.stateNode;if(typeof y.componentWillUnmount=="function"){r=m,a=m.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(I){Pe(r,a,I)}}break;case 5:Nr(m,m.return);break;case 22:if(m.memoizedState!==null){Ef(h);continue}}L!==null?(L.return=m,B=L):Ef(h)}g=g.sibling}e:for(g=null,h=e;;){if(h.tag===5){if(g===null){g=h;try{o=h.stateNode,d?(n=o.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"):(s=h.stateNode,u=h.memoizedProps.style,l=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Xf("display",l))}catch(I){Pe(e,e.return,I)}}}else if(h.tag===6){if(g===null)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(I){Pe(e,e.return,I)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;g===h&&(g=null),h=h.return}g===h&&(g=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Tt(t,e),qt(e),r&4&&Af(e);break;case 21:break;default:Tt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{e:{for(var a=e.return;a!==null;){if(Sp(a)){var r=a;break e}a=a.return}throw Error(P(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Ho(o,""),r.flags&=-33);var n=Df(e);_u(e,n,o);break;case 3:case 4:var l=r.stateNode.containerInfo,s=Df(e);Hu(e,s,l);break;default:throw Error(P(161))}}catch(u){Pe(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kh(e,t,a){B=e,wp(e,t,a)}function wp(e,t,a){for(var r=(e.mode&1)!==0;B!==null;){var o=B,n=o.child;if(o.tag===22&&r){var l=o.memoizedState!==null||ol;if(!l){var s=o.alternate,u=s!==null&&s.memoizedState!==null||Ve;s=ol;var d=Ve;if(ol=l,(Ve=u)&&!d)for(B=o;B!==null;)l=B,u=l.child,l.tag===22&&l.memoizedState!==null?Ff(o):u!==null?(u.return=l,B=u):Ff(o);for(;n!==null;)B=n,wp(n,t,a),n=n.sibling;B=o,ol=s,Ve=d}Mf(e,t,a)}else(o.subtreeFlags&8772)!==0&&n!==null?(n.return=o,B=n):Mf(e,t,a)}}function Mf(e){for(;B!==null;){var t=B;if((t.flags&8772)!==0){var a=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ve||jl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ve)if(a===null)r.componentDidMount();else{var o=t.elementType===t.type?a.memoizedProps:Rt(t.type,a.memoizedProps);r.componentDidUpdate(o,a.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var n=t.updateQueue;n!==null&&hf(t,n,r);break;case 3:var l=t.updateQueue;if(l!==null){if(a=null,t.child!==null)switch(t.child.tag){case 5:a=t.child.stateNode;break;case 1:a=t.child.stateNode}hf(t,l,a)}break;case 5:var s=t.stateNode;if(a===null&&t.flags&4){a=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&a.focus();break;case"img":u.src&&(a.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var g=d.memoizedState;if(g!==null){var h=g.dehydrated;h!==null&&Vo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}Ve||t.flags&512&&Nu(t)}catch(m){Pe(t,t.return,m)}}if(t===e){B=null;break}if(a=t.sibling,a!==null){a.return=t.return,B=a;break}B=t.return}}function Ef(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var a=t.sibling;if(a!==null){a.return=t.return,B=a;break}B=t.return}}function Ff(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var a=t.return;try{jl(4,t)}catch(u){Pe(t,a,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(u){Pe(t,o,u)}}var n=t.return;try{Nu(t)}catch(u){Pe(t,n,u)}break;case 5:var l=t.return;try{Nu(t)}catch(u){Pe(t,l,u)}}}catch(u){Pe(t,t.return,u)}if(t===e){B=null;break}var s=t.sibling;if(s!==null){s.return=t.return,B=s;break}B=t.return}}var jh=Math.ceil,Bl=sa.ReactCurrentDispatcher,ki=sa.ReactCurrentOwner,vt=sa.ReactCurrentBatchConfig,se=0,Be=null,De=null,Ue=0,st=0,Hr=Aa(0),Ee=0,tn=null,or=0,Xl=0,bi=0,zo=null,Je=null,Pi=0,Jr=1/0,Zt=null,Ol=!1,qu=null,ka=null,nl=!1,La=null,zl=0,Uo=0,Wu=null,pl=-1,ml=0;function Xe(){return(se&6)!==0?Te():pl!==-1?pl:pl=Te()}function ba(e){return(e.mode&1)===0?1:(se&2)!==0&&Ue!==0?Ue&-Ue:Ah.transition!==null?(ml===0&&(ml=uc()),ml):(e=pe,e!==0||(e=window.event,e=e===void 0?16:gc(e.type)),e)}function Et(e,t,a,r){if(50<Uo)throw Uo=0,Wu=null,Error(P(185));an(e,a,r),((se&2)===0||e!==Be)&&(e===Be&&((se&2)===0&&(Xl|=a),Ee===4&&xa(e,Ue)),rt(e,r),a===1&&se===0&&(t.mode&1)===0&&(Jr=Te()+500,$l&&Ma()))}function rt(e,t){var a=e.callbackNode;Eg(e,t);var r=yl(e,e===Be?Ue:0);if(r===0)a!==null&&_d(a),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(a!=null&&_d(a),t===1)e.tag===0?Dh(Bf.bind(null,e)):Fc(Bf.bind(null,e)),bh(function(){(se&6)===0&&Ma()}),a=null;else{switch(ic(r)){case 1:a=Ju;break;case 4:a=lc;break;case 16:a=Ll;break;case 536870912:a=sc;break;default:a=Ll}a=Mp(a,kp.bind(null,e))}e.callbackPriority=t,e.callbackNode=a}}function kp(e,t){if(pl=-1,ml=0,(se&6)!==0)throw Error(P(327));var a=e.callbackNode;if(Gr()&&e.callbackNode!==a)return null;var r=yl(e,e===Be?Ue:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Ul(e,r);else{t=r;var o=se;se|=2;var n=Pp();(Be!==e||Ue!==t)&&(Zt=null,Jr=Te()+500,Ja(e,t));do try{Yh();break}catch(s){bp(e,s)}while(!0);ci(),Bl.current=n,se=o,De!==null?t=0:(Be=null,Ue=0,t=Ee)}if(t!==0){if(t===2&&(o=hu(e),o!==0&&(r=o,t=Vu(e,o))),t===1)throw a=tn,Ja(e,0),xa(e,r),rt(e,Te()),a;if(t===6)xa(e,r);else{if(o=e.current.alternate,(r&30)===0&&!Xh(o)&&(t=Ul(e,r),t===2&&(n=hu(e),n!==0&&(r=n,t=Vu(e,n))),t===1))throw a=tn,Ja(e,0),xa(e,r),rt(e,Te()),a;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(P(345));case 2:Xa(e,Je,Zt);break;case 3:if(xa(e,r),(r&130023424)===r&&(t=Pi+500-Te(),10<t)){if(yl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Xe(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=wu(Xa.bind(null,e,Je,Zt),t);break}Xa(e,Je,Zt);break;case 4:if(xa(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-Mt(r);n=1<<l,l=t[l],l>o&&(o=l),r&=~n}if(r=o,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jh(r/1960))-r,10<r){e.timeoutHandle=wu(Xa.bind(null,e,Je,Zt),r);break}Xa(e,Je,Zt);break;case 5:Xa(e,Je,Zt);break;default:throw Error(P(329))}}}return rt(e,Te()),e.callbackNode===a?kp.bind(null,e):null}function Vu(e,t){var a=zo;return e.current.memoizedState.isDehydrated&&(Ja(e,t).flags|=256),e=Ul(e,t),e!==2&&(t=Je,Je=a,t!==null&&$u(t)),e}function $u(e){Je===null?Je=e:Je.push.apply(Je,e)}function Xh(e){for(var t=e;;){if(t.flags&16384){var a=t.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var r=0;r<a.length;r++){var o=a[r],n=o.getSnapshot;o=o.value;try{if(!Ft(n(),o))return!1}catch{return!1}}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xa(e,t){for(t&=~bi,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var a=31-Mt(t),r=1<<a;e[a]=-1,t&=~r}}function Bf(e){if((se&6)!==0)throw Error(P(327));Gr();var t=yl(e,0);if((t&1)===0)return rt(e,Te()),null;var a=Ul(e,t);if(e.tag!==0&&a===2){var r=hu(e);r!==0&&(t=r,a=Vu(e,r))}if(a===1)throw a=tn,Ja(e,0),xa(e,t),rt(e,Te()),a;if(a===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xa(e,Je,Zt),rt(e,Te()),null}function Ti(e,t){var a=se;se|=1;try{return e(t)}finally{se=a,se===0&&(Jr=Te()+500,$l&&Ma())}}function nr(e){La!==null&&La.tag===0&&(se&6)===0&&Gr();var t=se;se|=1;var a=vt.transition,r=pe;try{if(vt.transition=null,pe=1,e)return e()}finally{pe=r,vt.transition=a,se=t,(se&6)===0&&Ma()}}function Ri(){st=Hr.current,Se(Hr)}function Ja(e,t){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,kh(a)),De!==null)for(a=De.return;a!==null;){var r=a;switch(ii(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&kl();break;case 3:Yr(),Se(tt),Se($e),vi();break;case 5:xi(r);break;case 4:Yr();break;case 13:Se(we);break;case 19:Se(we);break;case 10:pi(r.type._context);break;case 22:case 23:Ri()}a=a.return}if(Be=e,De=e=Pa(e.current,null),Ue=st=t,Ee=0,tn=null,bi=Xl=or=0,Je=zo=null,Ya!==null){for(t=0;t<Ya.length;t++)if(a=Ya[t],r=a.interleaved,r!==null){a.interleaved=null;var o=r.next,n=a.pending;if(n!==null){var l=n.next;n.next=o,r.next=l}a.pending=r}Ya=null}return e}function bp(e,t){do{var a=De;try{if(ci(),dl.current=Fl,El){for(var r=ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}El=!1}if(rr=0,Fe=Me=ke=null,Bo=!1,Zo=0,ki.current=null,a===null||a.return===null){Ee=1,tn=t,De=null;break}e:{var n=e,l=a.return,s=a,u=t;if(t=Ue,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,g=s,h=g.tag;if((g.mode&1)===0&&(h===0||h===11||h===15)){var m=g.alternate;m?(g.updateQueue=m.updateQueue,g.memoizedState=m.memoizedState,g.lanes=m.lanes):(g.updateQueue=null,g.memoizedState=null)}var L=If(l);if(L!==null){L.flags&=-257,Cf(L,l,s,n,t),L.mode&1&&Sf(n,d,t),t=L,u=d;var y=t.updateQueue;if(y===null){var I=new Set;I.add(u),t.updateQueue=I}else y.add(u);break e}else{if((t&1)===0){Sf(n,d,t),Di();break e}u=Error(P(426))}}else if(Ce&&s.mode&1){var O=If(l);if(O!==null){(O.flags&65536)===0&&(O.flags|=256),Cf(O,l,s,n,t),di(Zr(u,s));break e}}n=u=Zr(u,s),Ee!==4&&(Ee=2),zo===null?zo=[n]:zo.push(n),n=l;do{switch(n.tag){case 3:n.flags|=65536,t&=-t,n.lanes|=t;var c=ip(n,u,t);gf(n,c);break e;case 1:s=u;var i=n.type,f=n.stateNode;if((n.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(ka===null||!ka.has(f)))){n.flags|=65536,t&=-t,n.lanes|=t;var v=dp(n,s,t);gf(n,v);break e}}n=n.return}while(n!==null)}Rp(a)}catch(k){t=k,De===a&&a!==null&&(De=a=a.return);continue}break}while(!0)}function Pp(){var e=Bl.current;return Bl.current=Fl,e===null?Fl:e}function Di(){(Ee===0||Ee===3||Ee===2)&&(Ee=4),Be===null||(or&268435455)===0&&(Xl&268435455)===0||xa(Be,Ue)}function Ul(e,t){var a=se;se|=2;var r=Pp();(Be!==e||Ue!==t)&&(Zt=null,Ja(e,t));do try{Qh();break}catch(o){bp(e,o)}while(!0);if(ci(),se=a,Bl.current=r,De!==null)throw Error(P(261));return Be=null,Ue=0,Ee}function Qh(){for(;De!==null;)Tp(De)}function Yh(){for(;De!==null&&!wg();)Tp(De)}function Tp(e){var t=Ap(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?Rp(e):De=t,ki.current=null}function Rp(e){var t=e;do{var a=t.alternate;if(e=t.return,(t.flags&32768)===0){if(a=Wh(a,t,st),a!==null){De=a;return}}else{if(a=Vh(a,t),a!==null){a.flags&=32767,De=a;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ee=6,De=null;return}}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);Ee===0&&(Ee=5)}function Xa(e,t,a){var r=pe,o=vt.transition;try{vt.transition=null,pe=1,Zh(e,t,a,r)}finally{vt.transition=o,pe=r}return null}function Zh(e,t,a,r){do Gr();while(La!==null);if((se&6)!==0)throw Error(P(327));a=e.finishedWork;var o=e.finishedLanes;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var n=a.lanes|a.childLanes;if(Fg(e,n),e===Be&&(De=Be=null,Ue=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||nl||(nl=!0,Mp(Ll,function(){return Gr(),null})),n=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||n){n=vt.transition,vt.transition=null;var l=pe;pe=1;var s=se;se|=4,ki.current=null,Gh(e,a),Cp(a,e),yh(Iu),Sl=!!Su,Iu=Su=null,e.current=a,Kh(a,e,o),kg(),se=s,pe=l,vt.transition=n}else e.current=a;if(nl&&(nl=!1,La=e,zl=o),n=e.pendingLanes,n===0&&(ka=null),Tg(a.stateNode,r),rt(e,Te()),t!==null)for(r=e.onRecoverableError,a=0;a<t.length;a++)o=t[a],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ol)throw Ol=!1,e=qu,qu=null,e;return(zl&1)!==0&&e.tag!==0&&Gr(),n=e.pendingLanes,(n&1)!==0?e===Wu?Uo++:(Uo=0,Wu=e):Uo=0,Ma(),null}function Gr(){if(La!==null){var e=ic(zl),t=vt.transition,a=pe;try{if(vt.transition=null,pe=16>e?16:e,La===null)var r=!1;else{if(e=La,La=null,zl=0,(se&6)!==0)throw Error(P(331));var o=se;for(se|=4,B=e.current;B!==null;){var n=B,l=n.child;if((B.flags&16)!==0){var s=n.deletions;if(s!==null){for(var u=0;u<s.length;u++){var d=s[u];for(B=d;B!==null;){var g=B;switch(g.tag){case 0:case 11:case 15:Oo(8,g,n)}var h=g.child;if(h!==null)h.return=g,B=h;else for(;B!==null;){g=B;var m=g.sibling,L=g.return;if(yp(g),g===d){B=null;break}if(m!==null){m.return=L,B=m;break}B=L}}}var y=n.alternate;if(y!==null){var I=y.child;if(I!==null){y.child=null;do{var O=I.sibling;I.sibling=null,I=O}while(I!==null)}}B=n}}if((n.subtreeFlags&2064)!==0&&l!==null)l.return=n,B=l;else e:for(;B!==null;){if(n=B,(n.flags&2048)!==0)switch(n.tag){case 0:case 11:case 15:Oo(9,n,n.return)}var c=n.sibling;if(c!==null){c.return=n.return,B=c;break e}B=n.return}}var i=e.current;for(B=i;B!==null;){l=B;var f=l.child;if((l.subtreeFlags&2064)!==0&&f!==null)f.return=l,B=f;else e:for(l=i;B!==null;){if(s=B,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:jl(9,s)}}catch(k){Pe(s,s.return,k)}if(s===l){B=null;break e}var v=s.sibling;if(v!==null){v.return=s.return,B=v;break e}B=s.return}}if(se=o,Ma(),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(Hl,e)}catch{}r=!0}return r}finally{pe=a,vt.transition=t}}return!1}function Of(e,t,a){t=Zr(a,t),t=ip(e,t,1),e=wa(e,t,1),t=Xe(),e!==null&&(an(e,1,t),rt(e,t))}function Pe(e,t,a){if(e.tag===3)Of(e,e,a);else for(;t!==null;){if(t.tag===3){Of(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ka===null||!ka.has(r))){e=Zr(a,e),e=dp(t,e,1),t=wa(t,e,1),e=Xe(),t!==null&&(an(t,1,e),rt(t,e));break}}t=t.return}}function Jh(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),t=Xe(),e.pingedLanes|=e.suspendedLanes&a,Be===e&&(Ue&a)===a&&(Ee===4||Ee===3&&(Ue&130023424)===Ue&&500>Te()-Pi?Ja(e,0):bi|=a),rt(e,t)}function Dp(e,t){t===0&&((e.mode&1)===0?t=1:(t=$n,$n<<=1,($n&130023424)===0&&($n=4194304)));var a=Xe();e=na(e,t),e!==null&&(an(e,t,a),rt(e,a))}function ex(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Dp(e,a)}function tx(e,t){var a=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),Dp(e,a)}var Ap;Ap=function(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps||tt.current)et=!0;else{if((e.lanes&a)===0&&(t.flags&128)===0)return et=!1,qh(e,t,a);et=(e.flags&131072)!==0}else et=!1,Ce&&(t.flags&1048576)!==0&&Bc(t,Tl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cl(e,t),e=t.pendingProps;var o=jr(t,$e.current);$r(t,a),o=yi(null,t,r,e,o,a);var n=Si();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,at(r)?(n=!0,bl(t)):n=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,gi(t),o.updater=Kl,t.stateNode=o,o._reactInternals=t,Au(t,r,e,a),t=Fu(null,t,r,!0,n,a)):(t.tag=0,Ce&&n&&ui(t),je(null,t,o,a),t=t.child),t;case 16:r=t.elementType;e:{switch(cl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=rx(r),e=Rt(r,e),o){case 0:t=Eu(null,t,r,e,a);break e;case 1:t=bf(null,t,r,e,a);break e;case 11:t=wf(null,t,r,e,a);break e;case 14:t=kf(null,t,r,Rt(r.type,e),a);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Rt(r,o),Eu(e,t,r,o,a);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Rt(r,o),bf(e,t,r,o,a);case 3:e:{if(mp(t),e===null)throw Error(P(387));r=t.pendingProps,n=t.memoizedState,o=n.element,_c(e,t),Al(t,r,null,a);var l=t.memoizedState;if(r=l.element,n.isDehydrated)if(n={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){o=Zr(Error(P(423)),t),t=Pf(e,t,r,a,o);break e}else if(r!==o){o=Zr(Error(P(424)),t),t=Pf(e,t,r,a,o);break e}else for(ut=Ca(t.stateNode.containerInfo.firstChild),it=t,Ce=!0,At=null,a=Nc(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Xr(),r===o){t=la(e,t,a);break e}je(e,t,r,a)}t=t.child}return t;case 5:return qc(t),e===null&&Tu(t),r=t.type,o=t.pendingProps,n=e!==null?e.memoizedProps:null,l=o.children,Cu(r,o)?l=null:n!==null&&Cu(r,n)&&(t.flags|=32),pp(e,t),je(e,t,l,a),t.child;case 6:return e===null&&Tu(t),null;case 13:return gp(e,t,a);case 4:return hi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qr(t,null,r,a):je(e,t,r,a),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Rt(r,o),wf(e,t,r,o,a);case 7:return je(e,t,t.pendingProps,a),t.child;case 8:return je(e,t,t.pendingProps.children,a),t.child;case 12:return je(e,t,t.pendingProps.children,a),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,n=t.memoizedProps,l=o.value,ve(Rl,r._currentValue),r._currentValue=l,n!==null)if(Ft(n.value,l)){if(n.children===o.children&&!tt.current){t=la(e,t,a);break e}}else for(n=t.child,n!==null&&(n.return=t);n!==null;){var s=n.dependencies;if(s!==null){l=n.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(n.tag===1){u=aa(-1,a&-a),u.tag=2;var d=n.updateQueue;if(d!==null){d=d.shared;var g=d.pending;g===null?u.next=u:(u.next=g.next,g.next=u),d.pending=u}}n.lanes|=a,u=n.alternate,u!==null&&(u.lanes|=a),Ru(n.return,a,t),s.lanes|=a;break}u=u.next}}else if(n.tag===10)l=n.type===t.type?null:n.child;else if(n.tag===18){if(l=n.return,l===null)throw Error(P(341));l.lanes|=a,s=l.alternate,s!==null&&(s.lanes|=a),Ru(l,a,t),l=n.sibling}else l=n.child;if(l!==null)l.return=n;else for(l=n;l!==null;){if(l===t){l=null;break}if(n=l.sibling,n!==null){n.return=l.return,l=n;break}l=l.return}n=l}je(e,t,o.children,a),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,$r(t,a),o=Lt(o),r=r(o),t.flags|=1,je(e,t,r,a),t.child;case 14:return r=t.type,o=Rt(r,t.pendingProps),o=Rt(r.type,o),kf(e,t,r,o,a);case 15:return fp(e,t,t.type,t.pendingProps,a);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Rt(r,o),cl(e,t),t.tag=1,at(r)?(e=!0,bl(t)):e=!1,$r(t,a),up(t,r,o),Au(t,r,o,a),Fu(null,t,r,!0,e,a);case 19:return hp(e,t,a);case 22:return cp(e,t,a)}throw Error(P(156,t.tag))};function Mp(e,t){return nc(e,t)}function ax(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,a,r){return new ax(e,t,a,r)}function Ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rx(e){if(typeof e=="function")return Ai(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qu)return 11;if(e===Yu)return 14}return 2}function Pa(e,t){var a=e.alternate;return a===null?(a=xt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&14680064,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function gl(e,t,a,r,o,n){var l=2;if(r=e,typeof e=="function")Ai(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Dr:return er(a.children,o,n,t);case Xu:l=8,o|=8;break;case tu:return e=xt(12,a,t,o|2),e.elementType=tu,e.lanes=n,e;case au:return e=xt(13,a,t,o),e.elementType=au,e.lanes=n,e;case ru:return e=xt(19,a,t,o),e.elementType=ru,e.lanes=n,e;case qf:return Ql(a,o,n,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hf:l=10;break e;case _f:l=9;break e;case Qu:l=11;break e;case Yu:l=14;break e;case ma:l=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=xt(l,a,t,o),t.elementType=e,t.type=r,t.lanes=n,t}function er(e,t,a,r){return e=xt(7,e,r,t),e.lanes=a,e}function Ql(e,t,a,r){return e=xt(22,e,r,t),e.elementType=qf,e.lanes=a,e.stateNode={isHidden:!1},e}function Zs(e,t,a){return e=xt(6,e,null,t),e.lanes=a,e}function Js(e,t,a){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ox(e,t,a,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Os(0),this.expirationTimes=Os(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Os(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Mi(e,t,a,r,o,n,l,s,u){return e=new ox(e,t,a,s,u),t===1?(t=1,n===!0&&(t|=8)):t=0,n=xt(3,null,null,t),e.current=n,n.stateNode=e,n.memoizedState={element:r,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},gi(n),e}function nx(e,t,a){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Rr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:a}}function Ep(e){if(!e)return Ra;e=e._reactInternals;e:{if(sr(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(at(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var a=e.type;if(at(a))return Ec(e,a,t)}return t}function Fp(e,t,a,r,o,n,l,s,u){return e=Mi(a,r,!0,e,o,n,l,s,u),e.context=Ep(null),a=e.current,r=Xe(),o=ba(a),n=aa(r,o),n.callback=t??null,wa(a,n,o),e.current.lanes=o,an(e,o,r),rt(e,r),e}function Yl(e,t,a,r){var o=t.current,n=Xe(),l=ba(o);return a=Ep(a),t.context===null?t.context=a:t.pendingContext=a,t=aa(n,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wa(o,t,l),e!==null&&(Et(e,o,l,n),il(e,o,l)),l}function Nl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function zf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Ei(e,t){zf(e,t),(e=e.alternate)&&zf(e,t)}function lx(){return null}var Bp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Fi(e){this._internalRoot=e}Zl.prototype.render=Fi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));Yl(e,t,null,null)};Zl.prototype.unmount=Fi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;nr(function(){Yl(null,e,null,null)}),t[oa]=null}};function Zl(e){this._internalRoot=e}Zl.prototype.unstable_scheduleHydration=function(e){if(e){var t=cc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ha.length&&t!==0&&t<ha[a].priority;a++);ha.splice(a,0,e),a===0&&mc(e)}};function Bi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Jl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Uf(){}function sx(e,t,a,r,o){if(o){if(typeof r=="function"){var n=r;r=function(){var d=Nl(l);n.call(d)}}var l=Fp(t,r,e,0,null,!1,!1,"",Uf);return e._reactRootContainer=l,e[oa]=l.current,Ko(e.nodeType===8?e.parentNode:e),nr(),l}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var s=r;r=function(){var d=Nl(u);s.call(d)}}var u=Mi(e,0,!1,null,null,!1,!1,"",Uf);return e._reactRootContainer=u,e[oa]=u.current,Ko(e.nodeType===8?e.parentNode:e),nr(function(){Yl(t,u,a,r)}),u}function es(e,t,a,r,o){var n=a._reactRootContainer;if(n){var l=n;if(typeof o=="function"){var s=o;o=function(){var u=Nl(l);s.call(u)}}Yl(t,l,e,o)}else l=sx(a,t,e,o,r);return Nl(l)}dc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var a=To(t.pendingLanes);a!==0&&(ei(t,a|1),rt(t,Te()),(se&6)===0&&(Jr=Te()+500,Ma()))}break;case 13:nr(function(){var r=na(e,1);if(r!==null){var o=Xe();Et(r,e,1,o)}}),Ei(e,1)}};ti=function(e){if(e.tag===13){var t=na(e,134217728);if(t!==null){var a=Xe();Et(t,e,134217728,a)}Ei(e,134217728)}};fc=function(e){if(e.tag===13){var t=ba(e),a=na(e,t);if(a!==null){var r=Xe();Et(a,e,t,r)}Ei(e,t)}};cc=function(){return pe};pc=function(e,t){var a=pe;try{return pe=e,t()}finally{pe=a}};pu=function(e,t,a){switch(t){case"input":if(lu(e,a),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+t)+\'][type="radio"]\'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var o=Vl(r);if(!o)throw Error(P(90));Vf(r),lu(r,o)}}}break;case"textarea":Gf(e,a);break;case"select":t=a.value,t!=null&&_r(e,!!a.multiple,t,!1)}};Jf=Ti;ec=nr;var ux={usingClientEntryPoint:!1,Events:[on,Fr,Vl,Yf,Zf,Ti]},wo={findFiberByHostInstance:Qa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ix={bundleType:wo.bundleType,version:wo.version,rendererPackageName:wo.rendererPackageName,rendererConfig:wo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rc(e),e===null?null:e.stateNode},findFiberByHostInstance:wo.findFiberByHostInstance||lx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ko=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ko.isDisabled&&ko.supportsFiber))try{Hl=ko.inject(ix),$t=ko}catch{}var ko;ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ux;ct.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bi(t))throw Error(P(200));return nx(e,t,null,a)};ct.createRoot=function(e,t){if(!Bi(e))throw Error(P(299));var a=!1,r="",o=Bp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Mi(e,1,!1,null,null,a,!1,r,o),e[oa]=t.current,Ko(e.nodeType===8?e.parentNode:e),new Fi(t)};ct.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=rc(t),e=e===null?null:e.stateNode,e};ct.flushSync=function(e){return nr(e)};ct.hydrate=function(e,t,a){if(!Jl(t))throw Error(P(200));return es(null,e,t,!0,a)};ct.hydrateRoot=function(e,t,a){if(!Bi(e))throw Error(P(405));var r=a!=null&&a.hydratedSources||null,o=!1,n="",l=Bp;if(a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onRecoverableError!==void 0&&(l=a.onRecoverableError)),t=Fp(t,null,e,1,a??null,o,!1,n,l),e[oa]=t.current,Ko(e),r)for(e=0;e<r.length;e++)a=r[e],o=a._getVersion,o=o(a._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[a,o]:t.mutableSourceEagerHydrationData.push(a,o);return new Zl(t)};ct.render=function(e,t,a){if(!Jl(t))throw Error(P(200));return es(null,e,t,!1,a)};ct.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(P(40));return e._reactRootContainer?(nr(function(){es(null,null,e,!1,function(){e._reactRootContainer=null,e[oa]=null})}),!0):!1};ct.unstable_batchedUpdates=Ti;ct.unstable_renderSubtreeIntoContainer=function(e,t,a,r){if(!Jl(a))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return es(e,t,a,!1,r)};ct.version="18.3.1-next-f1338f8080-20240426"});var ao=Yt((mv,Up)=>{"use strict";function zp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zp)}catch(e){console.error(e)}}zp(),Up.exports=Op()});var Hp=Yt(Oi=>{"use strict";var Np=ao();Oi.createRoot=Np.createRoot,Oi.hydrateRoot=Np.hydrateRoot;var gv});var Gp=Yt(os=>{"use strict";var mx=Ie(),gx=Symbol.for("react.element"),hx=Symbol.for("react.fragment"),xx=Object.prototype.hasOwnProperty,vx=mx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Lx={key:!0,ref:!0,__self:!0,__source:!0};function $p(e,t,a){var r,o={},n=null,l=null;a!==void 0&&(n=""+a),t.key!==void 0&&(n=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)xx.call(t,r)&&!Lx.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:gx,type:e,key:n,ref:l,props:o,_owner:vx.current}}os.Fragment=hx;os.jsx=$p;os.jsxs=$p});var H=Yt((WL,Kp)=>{"use strict";Kp.exports=Gp()});var bm=D(Hp(),1);var ee=D(Ie(),1),Im=D(ao(),1);function _p(e){return e.trim().replace(/^\\|/,"").replace(/\\|$/,"").split("|").map(a=>a.trim())}function dx(e){return/^\\s*\\|?\\s*:?-{3,}:?\\s*(\\|\\s*:?-{3,}:?\\s*)+\\|?\\s*$/.test(e)}function fx(e){let t=e.split(`\n`),a=[],r=0;for(;r<t.length;){let o=t[r]??"",n=t[r+1]??"";if(o.includes("|")&&dx(n)){let l=_p(o),s=[];for(r+=2;r<t.length&&t[r].includes("|")&&t[r].trim()!=="";)s.push(_p(t[r])),r+=1;let u=`<tr>${l.map(g=>`<th style="text-align:left;padding:7px 10px;border:1px solid #334155;color:#e2e8f0;background:#0f172a;">${g}</th>`).join("")}</tr>`,d=s.map(g=>`<tr>${g.map(h=>`<td style="padding:7px 10px;border:1px solid #334155;color:#cbd5e1;vertical-align:top;">${h}</td>`).join("")}</tr>`).join("");a.push(`<div style="overflow-x:auto;margin:0.65em 0;"><table style="border-collapse:collapse;min-width:360px;width:100%;font-size:12px;"><thead>${u}</thead><tbody>${d}</tbody></table></div>`);continue}a.push(t[r]),r+=1}return a.join(`\n`)}function ts(e){if(!e)return\'<span style="color:#475569;font-style:italic;">No description yet</span>\';let t=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return fx(t).replace(/^### (.+)$/gm,\'<h3 style="font-weight:700;margin:0.8em 0 0.3em;font-size:1.05em;color:#cbd5e1;">$1</h3>\').replace(/^## (.+)$/gm,\'<h2 style="font-weight:700;margin:0.8em 0 0.3em;font-size:1.2em;color:#f1f5f9;">$1</h2>\').replace(/^# (.+)$/gm,\'<h1 style="font-weight:700;margin:0.8em 0 0.3em;font-size:1.4em;color:#f1f5f9;">$1</h1>\').replace(/[*][*]([^\\n]+?)[*][*]/g,\'<strong style="font-weight:700;color:#f1f5f9;">$1</strong>\').replace(/__([^\\n]+?)__/g,\'<strong style="font-weight:700;color:#f1f5f9;">$1</strong>\').replace(/[*]([^\\n*]+?)[*]/g,\'<em style="font-style:italic;color:#94a3b8;">$1</em>\').replace(/(?<![a-zA-Z0-9])_([^_\\n]+?)_(?![a-zA-Z0-9])/g,\'<em style="font-style:italic;color:#94a3b8;">$1</em>\').replace(/`(.+?)`/g,\'<code style="font-family:Menlo,monospace;font-size:12px;background:#1e293b;padding:1px 5px;border-radius:3px;color:#7dd3fc;">$1</code>\').replace(/\\[([^\\]]+)\\]\\((https?:\\/\\/[^)]+)\\)/g,\'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#60a5fa;text-decoration:underline;">$1</a>\').replace(/(^|[\\s(>])((https?:\\/\\/)[^\\s<>"\']+)/g,\'$1<a href="$2" target="_blank" rel="noopener noreferrer" style="color:#60a5fa;text-decoration:underline;word-break:break-all;">$2</a>\').replace(/(^|[^\\w])#([a-f0-9]{30})(?![a-f0-9])/gi,\'$1<a href="#task-$2" data-task-ref="$2" style="color:#60a5fa;text-decoration:underline;font-family:Menlo,monospace;">#$2</a>\').replace(/^[-*] (.+)$/gm,\'<li style="margin:0.2em 0;display:list-item;">$1</li>\').replace(/^---$/gm,\'<hr style="border:none;border-top:1px solid #334155;margin:0.8em 0;">\').replace(/(<li[^>]*>[\\s\\S]*?<\\/li>\\n?)+/g,r=>`<ul style="padding-left:1.5em;margin:0.4em 0;list-style-type:disc;">${r}</ul>`).replace(/^(?!<[a-z]|$).+$/gm,r=>`<p style="margin:0.5em 0;">${r}</p>`)}var cx="proto-comments-seen";function zi(e,t){try{let a=localStorage.getItem(cx),r=a?JSON.parse(a):{};return t>(r[e]??0)}catch{return!1}}function Ui(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function ot(e){try{return new Date(e).toLocaleString()}catch{return e}}var px=16;var vv=BigInt("9".repeat(px));function Ni(e,t){return e.sortKey&&t.sortKey?e.sortKey<t.sortKey?-1:e.sortKey>t.sortKey?1:0:e.sortKey?-1:t.sortKey?1:(t.updatedAt??t.createdAt??"").localeCompare(e.updatedAt??e.createdAt??"")}var Oa=D(Ie(),1);var rs=D(Ie());var qp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),as=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim();var ln=D(Ie());var Wp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Vp=(0,ln.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:o="",children:n,iconNode:l,...s},u)=>(0,ln.createElement)("svg",{ref:u,...Wp,width:t,height:t,stroke:e,strokeWidth:r?Number(a)*24/Number(t):a,className:as("lucide",o),...s},[...l.map(([d,g])=>(0,ln.createElement)(d,g)),...Array.isArray(n)?n:[n]]));var Z=(e,t)=>{let a=(0,rs.forwardRef)(({className:r,...o},n)=>(0,rs.createElement)(Vp,{ref:n,iconNode:t,className:as(`lucide-${qp(e)}`,r),...o}));return a.displayName=`${e}`,a};var ur=Z("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var sn=Z("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var Ea=Z("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var ir=Z("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var un=Z("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var ro=Z("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var dn=Z("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);var fn=Z("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);var cn=Z("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);var pn=Z("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var dr=Z("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);var Fa=Z("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);var fr=Z("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);var mn=Z("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var gn=Z("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var cr=Z("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var oo=Z("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var Ba=Z("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var no=Z("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var hn=Z("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);var xn=Z("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var Oe=Z("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var lo=D(Ie(),1),om=D(ao(),1);var Qp=D(H(),1),jp={Bug:{background:"rgba(239,68,68,0.12)",color:"#f87171",border:"rgba(239,68,68,0.25)"},Research:{background:"rgba(192,132,252,0.12)",color:"#c084fc",border:"rgba(139,92,246,0.2)"},Task:{background:"rgba(148,163,184,0.1)",color:"#94a3b8",border:"rgba(148,163,184,0.2)"}};function Xp({type:e,style:t}){let a=typeof e=="string"&&e.trim()&&e!=="[object Object]"&&jp[e]?e:"Task",r=jp[a];return(0,Qp.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",padding:"1px 5px",borderRadius:3,flexShrink:0,textTransform:"uppercase",background:r.background,color:r.color,border:`1px solid ${r.border}`,lineHeight:"1.5",...t},children:a})}var Jp=D(H(),1),Yp={Critical:{background:"rgba(239,68,68,0.15)",color:"#f87171",border:"rgba(239,68,68,0.3)"},High:{background:"rgba(249,115,22,0.12)",color:"#fb923c",border:"rgba(249,115,22,0.25)"},Medium:{background:"rgba(234,179,8,0.12)",color:"#facc15",border:"rgba(234,179,8,0.25)"},Low:{background:"rgba(148,163,184,0.1)",color:"#94a3b8",border:"rgba(148,163,184,0.2)"}};function Zp({priority:e,style:t}){if(!e||!Yp[e])return null;let a=Yp[e];return(0,Jp.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",padding:"1px 5px",borderRadius:3,flexShrink:0,textTransform:"uppercase",background:a.background,color:a.color,border:`1px solid ${a.border}`,lineHeight:"1.5",...t},children:e})}var pr=[{value:"Task",icon:"\\u2611",label:"Task",css:"type-task",tooltip:"A general task or feature to implement."},{value:"Bug",icon:"\\u{1F41E}",label:"Bug",css:"type-bug",tooltip:"A defect \\u2014 annotator collects page errors and console logs to help reproduce it."},{value:"Research",icon:"\\u{1F52C}",label:"Research",css:"type-research",tooltip:"A research task \\u2014 agent will NOT write code but must attach a findings report."}],GL=pr.map(e=>e.value),tm=Object.fromEntries(pr.map(e=>[e.value,e.icon])),KL=Object.fromEntries(pr.map(e=>[e.value,e.css])),em={Task:"#94a3b8",Bug:"#ef4444",Research:"#a855f7"};function vn(e){return em[e??"Task"]??em.Task}var am=[{bg:"color-mix(in srgb, var(--p-blue) 14%, transparent)",text:"var(--p-blue-200)",border:"color-mix(in srgb, var(--p-blue) 30%, transparent)"},{bg:"color-mix(in srgb, var(--p-green) 14%, transparent)",text:"var(--p-green-300)",border:"color-mix(in srgb, var(--p-green) 30%, transparent)"},{bg:"color-mix(in srgb, var(--p-purple) 14%, transparent)",text:"var(--p-purple-300)",border:"color-mix(in srgb, var(--p-purple) 30%, transparent)"},{bg:"color-mix(in srgb, var(--p-amber) 14%, transparent)",text:"var(--p-amber-300)",border:"color-mix(in srgb, var(--p-amber) 30%, transparent)"},{bg:"color-mix(in srgb, #f472b6 14%, transparent)",text:"#f9a8d4",border:"color-mix(in srgb, #f472b6 30%, transparent)"},{bg:"color-mix(in srgb, var(--p-cyan) 14%, transparent)",text:"var(--p-cyan-300)",border:"color-mix(in srgb, var(--p-cyan) 30%, transparent)"},{bg:"color-mix(in srgb, #f87171 14%, transparent)",text:"#fca5a5",border:"color-mix(in srgb, #f87171 30%, transparent)"},{bg:"color-mix(in srgb, var(--p-text-g) 14%, transparent)",text:"var(--p-text-m)",border:"color-mix(in srgb, var(--p-text-g) 30%, transparent)"}];function yx(e){let t=0;for(let a=0;a<e.length;a++)t=t*31+e.charCodeAt(a)>>>0;return t%am.length}function Bt(e){return am[yx(e)]}var Ln=D(H(),1);function yn({tags:e,onRemove:t,size:a="sm"}){if(!e.length)return null;let r=a==="xs"?"1px 6px":"2px 7px",o=a==="xs"?9:10;return(0,Ln.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:3,alignItems:"center"},children:e.map(n=>{let{bg:l,text:s,border:u}=Bt(n);return(0,Ln.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3,padding:r,borderRadius:100,background:l,border:`1px solid ${u}`,color:s,fontSize:o,fontWeight:600,whiteSpace:"nowrap"},children:[n,t&&(0,Ln.jsx)("button",{type:"button",onClick:d=>{d.stopPropagation(),t(n)},style:{display:"flex",background:"none",border:"none",color:s,cursor:"pointer",padding:0,lineHeight:1,opacity:.7},onMouseEnter:d=>{d.currentTarget.style.opacity="1"},onMouseLeave:d=>{d.currentTarget.style.opacity="0.7"},children:"\\xD7"})]},n)})})}var ue=D(H(),1);function Sx(e){return/\\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function nm(e,t){if(!/^#[0-9a-fA-F]{6}$/.test(e))return;let a=Math.max(0,Math.min(1,t)),r=Math.round(a*255).toString(16).padStart(2,"0");return`${e}${r}`}function lm(e,t){return nm(e,t==="Critical"?.36:t==="High"?.3:.24)??"color-mix(in srgb, var(--p-text-g) 40%, transparent)"}function Ix(e){return nm(e,.05)??"transparent"}var Cx={padding:"7px 8px",gap:4,opacity:.45,userSelect:"none"},wx={display:"flex",alignItems:"center",gap:5},kx={width:12,height:12,color:"color-mix(in srgb, var(--p-green) 55%, transparent)",flexShrink:0},bx={fontSize:11.5,fontWeight:600,color:"var(--p-text-g)",textDecoration:"line-through",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},Px={display:"flex",alignItems:"center",gap:5,minWidth:0},Tx={flexShrink:0},Rx={fontSize:11.5,fontWeight:600,color:"var(--p-text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},Dx={display:"flex",alignItems:"flex-start",gap:8},Ax={fontSize:10,color:"var(--p-text-g)",lineHeight:"1.45",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,flex:1,minWidth:0},Mx={position:"relative",flexShrink:0},Ex={width:52,height:34,borderRadius:6,objectFit:"cover",border:"1px solid color-mix(in srgb, var(--p-border) 90%, transparent)",display:"block",cursor:"pointer"},Fx={display:"flex",alignItems:"center",gap:2,marginTop:1},Bx={flex:1},Hi=lo.default.memo(function({task:t,col:a,liveActivity:r,onOpen:o,onDragStart:n}){var p;let l=a.id==="in-progress",s=a.id==="done",[u,d]=lo.default.useState(!1),[g,h]=lo.default.useState(null),m=lo.default.useRef(null),L=t.commentCount??0,y=t.fileCount??0,I=L>0&&zi(t.id,L),O=lm(a.color,t.priority),c=vn(t.type),i=Ix(c),f=(p=t.files)==null?void 0:p.find(S=>Sx(S.name)),v=f?`/api/tasks/${t.id}/files/${encodeURIComponent(f.name)}`:null;function k(S){n(S,t.id),S.currentTarget.classList.add("dragging")}function w(S){S.currentTarget.classList.remove("dragging")}return s?(0,ue.jsx)("article",{className:"task-card",draggable:!0,"data-task-id":t.id,style:Cx,onDragStart:k,onDragEnd:w,onClick:()=>o(t),children:(0,ue.jsxs)("div",{style:wx,children:[(0,ue.jsx)(Ea,{style:kx}),(0,ue.jsx)("span",{style:bx,children:t.title})]})}):(0,ue.jsxs)("article",{className:`task-card${r?" task-live-edit":""}`,draggable:!0,"data-task-id":t.id,style:{padding:"7px 8px",gap:4,userSelect:"none",background:r?"rgba(59,130,246,0.08)":i,...r?{borderColor:"rgba(59,130,246,0.5)",boxShadow:"0 0 0 2px rgba(59,130,246,0.14)"}:O?{borderColor:O}:{}},onDragStart:k,onDragEnd:w,onClick:()=>o(t),children:[(0,ue.jsxs)("div",{style:Px,children:[l&&(0,ue.jsx)("span",{className:"spinner",style:Tx}),(0,ue.jsx)("span",{style:Rx,children:t.title})]}),(t.description||v)&&(0,ue.jsxs)("div",{style:Dx,children:[t.description&&(0,ue.jsx)("div",{style:Ax,children:t.description}),v&&(0,ue.jsxs)("div",{style:Mx,onMouseEnter:()=>{if(m.current){let S=m.current.getBoundingClientRect();h({top:S.top,right:S.right})}d(!0)},onMouseLeave:()=>{d(!1),h(null)},children:[(0,ue.jsx)("img",{ref:m,src:v,alt:"Task screenshot","data-role":"task-thumb",style:Ex}),u&&g&&om.default.createPortal((0,ue.jsx)("img",{src:v,alt:"Task screenshot enlarged preview","data-role":"task-thumb-preview",style:{position:"fixed",right:window.innerWidth-g.right,bottom:window.innerHeight-g.top+8,width:220,height:138,borderRadius:8,objectFit:"cover",border:"1px solid color-mix(in srgb, var(--p-border) 96%, transparent)",boxShadow:"0 10px 24px color-mix(in srgb, var(--p-bg) 75%, transparent)",pointerEvents:"none",zIndex:9999,background:"var(--p-bg)"}}),document.body)]})]}),(0,ue.jsxs)("div",{className:"flex items-center",style:Fx,children:[(0,ue.jsx)(Xp,{type:t.type}),t.priority&&(0,ue.jsx)(Zp,{priority:t.priority}),l&&t.assigneeName&&(0,ue.jsx)("span",{style:{fontSize:10,fontWeight:600,padding:"1px 6px",borderRadius:6,background:"rgba(59,130,246,0.12)",color:"#60a5fa",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:80},children:t.assigneeName}),t.tags&&t.tags.length>0&&(0,ue.jsx)(yn,{tags:t.tags,size:"xs"}),(0,ue.jsx)("div",{style:Bx}),r&&(0,ue.jsx)(_i,{activity:r}),(0,ue.jsx)(rm,{icon:(0,ue.jsx)(dr,{style:{width:9,height:9}}),label:L>0?String(L):"",color:I?"var(--p-purple)":L>0?"var(--p-text-m)":"var(--p-border-t)",hoverColor:I?"var(--p-purple-300)":"var(--p-text)",title:L>0?`${L} comment(s)`:"Add comment",badge:I,badgeColor:"var(--p-purple)",onClick:S=>{S.stopPropagation(),o(t,"comments")}}),(0,ue.jsx)(rm,{icon:(0,ue.jsx)(fr,{style:{width:9,height:9}}),label:y>0?String(y):"",color:y>0?"var(--p-blue-300)":"var(--p-border-t)",hoverColor:y>0?"var(--p-cyan-300)":"var(--p-text-sub)",title:y>0?`${y} file(s) attached`:"Files",onClick:S=>{S.stopPropagation(),o(t,"files")}})]})]})});function rm({icon:e,label:t,color:a,hoverColor:r,title:o,badge:n,badgeColor:l,onClick:s}){let[u,d]=lo.default.useState(!1);return(0,ue.jsxs)("button",{style:{display:"inline-flex",alignItems:"center",gap:2,padding:"2px 3px",borderRadius:3,border:"none",background:u?"color-mix(in srgb, var(--p-text-m) 10%, transparent)":"transparent",cursor:"pointer",fontSize:9,color:u?r:a,transition:"color .1s, background .1s"},title:o,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:s,children:[e,t&&(0,ue.jsx)("span",{children:t}),n&&(0,ue.jsx)("span",{style:{width:4,height:4,background:l??a,borderRadius:"50%",flexShrink:0}})]})}function _i({activity:e}){let t=e.state==="locked"||e.state==="editing",a=t?(0,ue.jsx)(pn,{style:{width:8,height:8}}):(0,ue.jsx)(un,{style:{width:8,height:8}}),r=t?`Locked by ${e.user}`:`${e.user} viewing`;return(0,ue.jsxs)("span",{style:t?{display:"inline-flex",alignItems:"center",gap:3,borderRadius:999,padding:"1px 5px",fontSize:9,fontWeight:600,border:"1px solid rgba(244,114,182,0.35)",color:"#f9a8d4",background:"rgba(157,23,77,0.28)",flexShrink:0,maxWidth:110,overflow:"hidden",whiteSpace:"nowrap",flexWrap:"nowrap"}:{display:"inline-flex",alignItems:"center",gap:3,borderRadius:999,padding:"1px 5px",fontSize:9,fontWeight:600,border:"1px solid rgba(59,130,246,0.35)",color:"#93c5fd",background:"rgba(30,58,138,0.28)",flexShrink:0,maxWidth:110,overflow:"hidden",whiteSpace:"nowrap",flexWrap:"nowrap"},title:r,"data-testid":"live-activity-badge",children:[a,(0,ue.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",minWidth:0,flex:"1 1 0"},children:e.user})]})}var de=D(H(),1),za=[{id:"backlog",label:"Backlog",color:"var(--p-text-f)",accent:"color-mix(in srgb, var(--p-text-g) 20%, transparent)"},{id:"todo",label:"Todo",color:"var(--p-amber)",accent:"color-mix(in srgb, var(--p-amber) 12%, transparent)"},{id:"in-progress",label:"In Progress",color:"var(--p-blue)",accent:"color-mix(in srgb, var(--p-blue) 12%, transparent)",glow:!0},{id:"review",label:"Review",color:"var(--p-purple)",accent:"color-mix(in srgb, var(--p-purple) 12%, transparent)"},{id:"done",label:"Done",color:"var(--p-green)",accent:"color-mix(in srgb, var(--p-green) 10%, transparent)"}];var Ox=3;function zx(){return(0,de.jsxs)("div",{style:{borderRadius:8,border:"1px solid var(--p-border-t)",padding:"10px 12px",background:"var(--p-bg-2)",marginBottom:6,animation:"skeleton-pulse 1.5s ease-in-out infinite"},children:[(0,de.jsx)("div",{style:{height:12,borderRadius:4,background:"var(--p-border-s)",width:"75%",marginBottom:8}}),(0,de.jsx)("div",{style:{height:10,borderRadius:4,background:"var(--p-border-s)",width:"50%",marginBottom:8}}),(0,de.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,de.jsx)("div",{style:{height:18,borderRadius:10,background:"var(--p-border-s)",width:48}}),(0,de.jsx)("div",{style:{height:18,borderRadius:10,background:"var(--p-border-s)",width:36}})]})]})}function qi({tasks:e,visibleCols:t,searchQuery:a,isLoading:r,liveActivities:o,onOpenPanel:n,onDrop:l,onReorder:s}){let u=Oa.default.useRef(null),d=Oa.default.useRef(null),[g,h]=Oa.default.useState(null),[m,L]=Oa.default.useState(null),[y,I]=Oa.default.useState(null),O=a?e.filter(p=>(p.title??"").toLowerCase().includes(a.toLowerCase())||(p.description??"").toLowerCase().includes(a.toLowerCase())):e,c=za.filter(p=>t.includes(p.id));Oa.default.useEffect(()=>{let p=u.current,S=d.current;if(!p||!S)return;function A(){if(!p||!S)return;let U=p.scrollWidth>p.clientWidth?p.clientWidth/p.scrollWidth:1,Q=Math.max(40,p.clientWidth*U);S.style.width=`${Q}px`;let ae=p.scrollWidth-p.clientWidth,V=p.clientWidth-Q;S.style.left=`${ae>0?p.scrollLeft/ae*V:0}px`,S.style.opacity=U<1?"1":"0"}p.addEventListener("scroll",A);let T=new ResizeObserver(A);T.observe(p),A();let M=!1,X=0,le=0;function J(U){M=!0,X=U.clientX,le=p.scrollLeft,S.classList.add("dragging"),document.addEventListener("mousemove",Re),document.addEventListener("mouseup",_)}function Re(U){if(!M||!p||!S)return;let Q=p.scrollWidth>p.clientWidth?p.scrollWidth/p.clientWidth:1;p.scrollLeft=le+(U.clientX-X)*Q}function _(){M=!1,S==null||S.classList.remove("dragging"),document.removeEventListener("mousemove",Re),document.removeEventListener("mouseup",_)}return S.addEventListener("mousedown",J),()=>{p.removeEventListener("scroll",A),T.disconnect(),S.removeEventListener("mousedown",J)}},[c.length]);function i(p,S){h(S),p.dataTransfer.effectAllowed="move"}function f(p,S){p.preventDefault(),L(S)}function v(p,S){p.preventDefault(),p.stopPropagation();let A=p.currentTarget.getBoundingClientRect(),T=p.clientY<A.top+A.height/2?"before":"after";I(M=>(M==null?void 0:M.taskId)===S&&M.position===T?M:{taskId:S,position:T})}function k(p,S,A){p.preventDefault(),L(null);let T=y;if(I(null),!g){h(null);return}if(s&&T){let M=A.findIndex(J=>J.id===T.taskId),X=null,le=null;T.position==="before"?(le=T.taskId,X=M>0?A[M-1].id:null):(X=T.taskId,le=M<A.length-1?A[M+1].id:null),s(g,S,X,le)}else l(g,S);h(null)}function w(){h(null),L(null),I(null)}return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("main",{id:"kanban-board",ref:u,className:"flex-1 flex overflow-x-auto overflow-y-hidden",style:{padding:"16px 20px",gap:16},onDragEnd:w,children:c.map(p=>{let S=r?[]:O.filter(A=>A.status===p.id).sort(Ni);return(0,de.jsx)(Ux,{col:p,tasks:S,isLoading:r,liveActivities:o,isDragOver:m===p.id&&!y,onDragOver:A=>f(A,p.id),onDrop:A=>k(A,p.id,S),onDragLeave:()=>{L(null),I(null)},onStatusChange:(A,T)=>l(A,T),onAddTask:()=>n(null,"details",p.id),onOpenTask:n,onDragStart:i,onCardDragOver:v,cardDropTarget:y},p.id)})}),(0,de.jsx)("div",{id:"kanban-scroll-track",style:{position:"fixed",bottom:0,left:0,right:0,height:6,background:"transparent",zIndex:40,pointerEvents:"none"},children:(0,de.jsx)("div",{id:"kanban-scroll-thumb",ref:d,style:{position:"absolute",top:1,height:4,borderRadius:2,background:"var(--p-border-t)",cursor:"pointer",pointerEvents:"auto",transition:"background 0.15s",opacity:0},onMouseEnter:p=>{p.currentTarget.style.background="var(--p-text-g)"},onMouseLeave:p=>{p.currentTarget.classList.contains("dragging")||(p.currentTarget.style.background="var(--p-border-t)")}})})]})}function Ux({col:e,tasks:t,isLoading:a,liveActivities:r,isDragOver:o,onDragOver:n,onDrop:l,onDragLeave:s,onStatusChange:u,onAddTask:d,onOpenTask:g,onDragStart:h,onCardDragOver:m,cardDropTarget:L}){let[y,I]=Oa.default.useState(!1),O=e.id==="in-progress"?"sd-inprogress":`sd-${e.id}`,c=20,i=e.id==="done",f=i&&t.length>c?t.length-c:0,v=i?t.slice(0,c):t;return(0,de.jsxs)("section",{className:"board-column","data-column-id":e.id,style:{outline:o?`2px dashed ${e.color}66`:void 0,outlineOffset:-2,borderRadius:8},onDragOver:n,onDragLeave:s,onDrop:l,children:[(0,de.jsxs)("div",{className:"column-header",style:{background:e.accent,borderColor:`color-mix(in srgb, ${e.color} 30%, transparent)`},children:[(0,de.jsx)("div",{className:`status-dot ${O}`}),(0,de.jsxs)("span",{style:{fontSize:12,fontWeight:600,color:e.id==="done"?`${e.color}b3`:e.color},children:[e.label,a?"":` \\xB7 ${t.length}`]}),(0,de.jsx)("span",{style:{marginLeft:"auto"}}),(0,de.jsx)("button",{type:"button",title:`Add task to ${e.label}`,style:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,border:"none",background:"transparent",color:y?e.color:"var(--p-text-g)",cursor:"pointer",transition:"color .15s",padding:0},onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),onClick:d,children:(0,de.jsx)(mn,{style:{width:14,height:14}})})]}),(0,de.jsx)("div",{className:"column-scroll","data-status":e.id,children:a?Array.from({length:Ox}).map((k,w)=>(0,de.jsx)(zx,{},w)):t.length===0?(0,de.jsxs)("div",{style:{border:"1px dashed var(--p-border-t)",borderRadius:8,padding:"10px 8px",fontSize:11,color:"var(--p-text-f)",textAlign:"center"},children:["No tasks in ",e.label.toLowerCase(),"."]}):(0,de.jsxs)(de.Fragment,{children:[v.map(k=>(0,de.jsxs)("div",{style:{position:"relative"},onDragOver:w=>m(w,k.id),children:[(L==null?void 0:L.taskId)===k.id&&L.position==="before"&&(0,de.jsx)("div",{style:{height:2,borderRadius:1,background:e.color,margin:"2px 0"}}),(0,de.jsx)(Hi,{task:k,col:e,liveActivity:r==null?void 0:r.get(k.id),onOpen:g,onDragStart:h}),(L==null?void 0:L.taskId)===k.id&&L.position==="after"&&(0,de.jsx)("div",{style:{height:2,borderRadius:1,background:e.color,margin:"2px 0"}})]},k.id)),f>0&&(0,de.jsxs)("div",{style:{margin:"4px 0 2px",padding:"6px 8px",borderRadius:6,border:"1px dashed var(--p-border-t)",fontSize:11,color:"var(--p-text-g)",textAlign:"center",lineHeight:1.4},children:["+",f," older ",f===1?"task":"tasks"," not shown"]})]})})]})}var mr=D(Ie(),1);var te=D(H(),1),sm={backlog:{text:"var(--p-text-m)",bg:"color-mix(in srgb, var(--p-text-g) 14%, transparent)",border:"color-mix(in srgb, var(--p-text-g) 30%, transparent)"},todo:{text:"var(--p-amber-300)",bg:"color-mix(in srgb, var(--p-amber) 14%, transparent)",border:"color-mix(in srgb, var(--p-amber) 30%, transparent)"},"in-progress":{text:"var(--p-blue-200)",bg:"color-mix(in srgb, var(--p-blue) 14%, transparent)",border:"color-mix(in srgb, var(--p-blue) 30%, transparent)"},review:{text:"var(--p-purple-300)",bg:"color-mix(in srgb, var(--p-purple) 14%, transparent)",border:"color-mix(in srgb, var(--p-purple) 30%, transparent)"},done:{text:"var(--p-green-300)",bg:"color-mix(in srgb, var(--p-green) 12%, transparent)",border:"color-mix(in srgb, var(--p-green) 30%, transparent)"}},Nx=tm,um={Critical:"var(--p-red)",High:"var(--p-amber-300)",Medium:"var(--p-text-m)",Low:"var(--p-text-f)"},Wi=["in-progress","review","todo","backlog","done"];function Hx(){return(0,te.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"18px 1fr auto auto",alignItems:"center",gap:10,padding:"6px 10px",borderRadius:8,border:"1px solid var(--p-border-t)",background:"var(--p-bg-2)",animation:"skeleton-pulse 1.5s ease-in-out infinite"},children:[(0,te.jsx)("div",{style:{width:14,height:14,borderRadius:3,background:"var(--p-border-s)"}}),(0,te.jsx)("div",{style:{height:12,borderRadius:4,background:"var(--p-border-s)",width:"60%"}}),(0,te.jsx)("div",{style:{height:18,borderRadius:10,background:"var(--p-border-s)",width:44}}),(0,te.jsx)("div",{style:{height:18,borderRadius:10,background:"var(--p-border-s)",width:36}})]})}function Vi({tasks:e,searchQuery:t,isLoading:a,liveActivities:r,onOpenPanel:o,onAddTask:n,onDrop:l}){let[s,u]=mr.default.useState(null),[d,g]=mr.default.useState(null),[h,m]=mr.default.useState(null),[L,y]=mr.default.useState({backlog:!1,todo:!1,"in-progress":!1,review:!1,done:!1}),I=t?e.filter(c=>(c.title??"").toLowerCase().includes(t.toLowerCase())||(c.description??"").toLowerCase().includes(t.toLowerCase())):e,O=mr.default.useMemo(()=>{let c=new Map;for(let i of Wi)c.set(i,[]);for(let i of I)(c.get(i.status)??[]).push(i);return c},[I]);return(0,te.jsxs)("div",{id:"kanban-list-view",style:{flex:1,overflowY:"auto",padding:"16px 24px",minHeight:0},children:[a?Wi.slice(0,3).map(c=>{let i=sm[c];return(0,te.jsxs)("div",{style:{marginBottom:24},children:[(0,te.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,te.jsx)("div",{style:{width:18,height:18,borderRadius:5,background:"var(--p-border-s)",animation:"skeleton-pulse 1.5s ease-in-out infinite"}}),(0,te.jsx)("div",{style:{height:18,borderRadius:6,background:i.bg,border:`1px solid ${i.border}`,width:72,animation:"skeleton-pulse 1.5s ease-in-out infinite"}}),(0,te.jsx)("div",{style:{height:14,borderRadius:4,background:"var(--p-border-s)",width:16,animation:"skeleton-pulse 1.5s ease-in-out infinite"}})]}),(0,te.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:Array.from({length:3}).map((f,v)=>(0,te.jsx)(Hx,{},v))})]},c)}):Wi.map(c=>{let i=O.get(c)??[];if(i.length===0)return null;let f=sm[c];return(0,te.jsxs)("div",{style:{marginBottom:24},children:[(0,te.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8,padding:"4px 6px",borderRadius:6,transition:"background .1s",background:d===c?f.bg:"transparent",outline:d===c?`1px dashed ${f.border}`:void 0},onDragOver:v=>{v.preventDefault(),g(c)},onDragLeave:()=>g(null),onDrop:v=>{v.preventDefault(),g(null),m(null),s&&l(s,c),u(null)},children:[(0,te.jsx)("button",{type:"button",title:L[c]?"Expand":"Collapse",onClick:v=>{v.stopPropagation(),y(k=>({...k,[c]:!k[c]}))},style:{width:18,height:18,borderRadius:5,border:"1px solid var(--p-border-t)",background:"var(--p-surface)",color:"var(--p-text-m)",fontSize:10,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:L[c]?"+":"\\u2212"}),(0,te.jsx)("span",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",padding:"2px 8px",borderRadius:6,background:f.bg,border:`1px solid ${f.border}`,color:f.text},children:c}),(0,te.jsx)("span",{style:{fontSize:11,color:"var(--p-text-g)"},children:i.length}),(0,te.jsx)("button",{type:"button",title:`Add task to ${c}`,onClick:v=>{v.stopPropagation(),n(c)},style:{marginLeft:"auto",width:22,height:22,borderRadius:7,border:`1px solid ${f.border}`,background:f.bg,color:f.text,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:600},children:"+"})]}),(0,te.jsx)("div",{style:{display:L[c]?"none":"flex",flexDirection:"column",gap:2},children:i.map(v=>(0,te.jsx)(_x,{task:v,liveActivity:r==null?void 0:r.get(v.id),onOpen:o,onDragStart:k=>u(k),dragOver:h===v.id,onDragOver:()=>m(v.id),onDragLeave:()=>m(k=>k===v.id?null:k),onDropToStatus:()=>{s&&l(s,v.status),u(null),m(null)}},v.id))})]},c)}),!a&&I.length===0&&(0,te.jsx)("div",{style:{textAlign:"center",color:"var(--p-text-g)",fontSize:13,marginTop:60},children:"No tasks found"})]})}function _x({task:e,liveActivity:t,onOpen:a,onDragStart:r,dragOver:o,onDragOver:n,onDragLeave:l,onDropToStatus:s}){let[u,d]=mr.default.useState(!1),g=Nx[e.type??"Task"]??"\\u2611",h=e.commentCount??0,m=e.fileCount??0;return(0,te.jsxs)("div",{"data-task-id":e.id,"data-proto-id":"list-row",draggable:!0,style:{display:"grid",gridTemplateColumns:"18px 1fr auto auto auto",alignItems:"center",gap:10,padding:"6px 10px",borderRadius:8,background:o?"color-mix(in srgb, var(--p-blue) 10%, transparent)":u?"var(--p-hover)":"transparent",border:`1px solid ${o?"color-mix(in srgb, var(--p-blue) 40%, transparent)":u?"var(--p-border)":"transparent"}`,cursor:"grab",transition:"background .1s,border-color .1s",userSelect:"none"},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:()=>a(e),onDragStart:L=>{L.dataTransfer.effectAllowed="move",r(e.id),L.currentTarget.style.opacity="0.4"},onDragEnd:L=>{L.currentTarget.style.opacity="1"},onDragOver:L=>{L.preventDefault(),n()},onDragLeave:l,onDrop:L=>{L.preventDefault(),s()},children:[(0,te.jsx)("span",{style:{fontSize:12,textAlign:"center",flexShrink:0},children:g}),(0,te.jsxs)("div",{style:{minWidth:0},children:[(0,te.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,te.jsx)("span",{style:{fontSize:13,fontWeight:500,color:"var(--p-text)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.title}),e.priority&&um[e.priority]&&(0,te.jsx)(dn,{className:"w-2.5 h-2.5 flex-shrink-0",style:{color:um[e.priority]}}),e.component&&(0,te.jsx)("span",{style:{fontSize:10,padding:"1px 6px",borderRadius:10,background:"color-mix(in srgb, var(--p-purple) 14%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 30%, transparent)",color:"var(--p-purple-300)",flexShrink:0,fontFamily:"monospace"},children:e.component})]}),e.description&&(0,te.jsx)("div",{style:{fontSize:11,color:"var(--p-text-g)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:1,maxWidth:"100%"},children:e.description.replace(/\\s+/g," ").trim()})]}),(0,te.jsxs)("button",{title:h>0?`${h} comment(s)`:"Add comment",style:{display:"flex",alignItems:"center",gap:3,fontSize:11,color:h>0?"var(--p-text-m)":"var(--p-border-t)",background:"none",border:"none",cursor:"pointer",padding:"0 2px",flexShrink:0},onClick:L=>{L.stopPropagation(),a(e,"comments")},children:[(0,te.jsx)(dr,{className:"w-3 h-3"}),h>0&&(0,te.jsx)("span",{children:h})]}),m>0&&(0,te.jsxs)("button",{title:`${m} file(s)`,style:{display:"flex",alignItems:"center",gap:3,fontSize:11,color:"var(--p-blue-300)",background:"none",border:"none",cursor:"pointer",padding:"0 2px",flexShrink:0},onClick:L=>{L.stopPropagation(),a(e,"files")},children:[(0,te.jsx)(fr,{className:"w-3 h-3"}),(0,te.jsx)("span",{children:m})]}),t&&(0,te.jsx)(_i,{activity:t})]})}var so=D(Ie(),1);var Ua=D(H(),1);function im({size:e=32,style:t,className:a}){return(0,Ua.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,className:a,"aria-label":"Vibeflow",children:[(0,Ua.jsx)("rect",{width:"32",height:"32",rx:"7",fill:"#2563eb"}),(0,Ua.jsx)("rect",{x:"7",y:"13",width:"3.5",height:"10",rx:"1.5",fill:"white",opacity:"0.75"}),(0,Ua.jsx)("rect",{x:"12.25",y:"8.5",width:"3.5",height:"15",rx:"1.5",fill:"white"}),(0,Ua.jsx)("rect",{x:"17.5",y:"14.5",width:"3.5",height:"8",rx:"1.5",fill:"white",opacity:"0.75"}),(0,Ua.jsx)("rect",{x:"22.5",y:"11",width:"2.5",height:"11",rx:"1.25",fill:"white",opacity:"0.85"})]})}var ls=D(H(),1);function ns({id:e,title:t,onClick:a,label:r,icon:o,variant:n="neutral"}){return(0,ls.jsxs)("button",{id:e,onClick:a,title:t,className:`h-7 inline-flex items-center justify-center rounded-lg border transition-colors ${n==="accent"?"border-violet-700/50 bg-violet-900/30 text-violet-300 hover:bg-violet-800/30":"border-slate-700/60 bg-slate-800 text-slate-400 hover:bg-slate-700/50 hover:text-slate-200"} ${r?"gap-1.5 px-3 text-xs font-medium":"w-7"}`,type:"button",children:[o,r&&(0,ls.jsx)("span",{children:r})]})}var $=D(H(),1);function $i({projectName:e,projectIcon:t,missingProjectIconStyle:a="initial",wsConnected:r,port:o,searchQuery:n,premiumUsage:l,isLoading:s,filterTags:u,allTags:d,onToggleTag:g,backHref:h,backLabel:m,onSearchChange:L,onSettings:y,extraActions:I,taskSummary:O}){let[c,i]=so.default.useState(!1),[f,v]=so.default.useState(0),k=so.default.useRef(null),w=so.default.useRef(null),p=n.match(/(?:^|\\s)#(\\S*)$/),S=p?p[1]:null,A=u??[],T=(d??[]).filter(U=>!A.includes(U)),M=S!==null?T.filter(U=>U.toLowerCase().includes(S.toLowerCase())):[];so.default.useEffect(()=>{v(0)},[M.length]);function X(U){var ae;let Q=n.replace(/\\s*#\\S*$/,"");L(Q),g==null||g(U),(ae=k.current)==null||ae.focus()}function le(U){if(!(S===null||M.length===0)){if(U.key==="ArrowDown")U.preventDefault(),v(Q=>Math.min(Q+1,M.length-1));else if(U.key==="ArrowUp")U.preventDefault(),v(Q=>Math.max(Q-1,0));else if(U.key==="Enter")U.preventDefault(),M[f]&&X(M[f]);else if(U.key==="Escape"){let Q=n.replace(/\\s*#\\S*$/,"");L(Q)}}}let J=(t??"").trim(),Re=e?e.charAt(0).toUpperCase()+e.slice(1):"Vibeflow Board",_=n||A.length>0;return(0,$.jsxs)("header",{className:"px-5 py-3 flex items-center gap-3 border-b border-slate-800/60 flex-shrink-0",children:[(0,$.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[h&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("a",{id:"header-back-link",href:h,className:"text-xs text-slate-400 hover:text-slate-200 transition-colors no-underline",style:{textDecoration:"none",fontWeight:500},children:m??"Back"}),(0,$.jsx)(sn,{className:"w-3 h-3 text-slate-600 flex-shrink-0"})]}),(0,$.jsx)("div",{className:"flex-shrink-0",style:J?{fontSize:20}:void 0,children:J||(a==="vibeflow"?(0,$.jsx)(im,{size:32}):(0,$.jsx)("div",{style:{width:32,height:32,borderRadius:8,flexShrink:0,background:"linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%)",border:"1px solid rgba(37,99,235,0.3)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:"#93c5fd",letterSpacing:"-0.01em"},title:Re,children:Re.charAt(0).toUpperCase()}))}),(0,$.jsxs)("div",{children:[(0,$.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$.jsx)("h1",{id:"header-project-name",className:"text-sm font-semibold text-white leading-tight",children:Re}),r&&(0,$.jsxs)("div",{id:"header-live-pill",className:"flex items-center gap-1.5 rounded-full px-2 py-0.5",style:{background:"color-mix(in srgb, var(--p-green) 30%, transparent)",border:"1px solid color-mix(in srgb, var(--p-green) 28%, transparent)"},children:[(0,$.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-green-400",style:{animation:"pulse-live 2s ease-in-out infinite"}}),(0,$.jsxs)("span",{className:"text-[10px] font-medium text-green-400",children:["live \\xB7 :",o]})]})]}),(0,$.jsxs)("p",{className:"text-[10px] text-slate-500 font-mono mt-0.5",children:[O,s&&(0,$.jsx)("span",{id:"header-loading-indicator",className:"inline-block ml-1.5 w-1 h-1 rounded-full bg-blue-400",style:{animation:"pulse-live 1.4s ease-in-out infinite",verticalAlign:"middle"}})]})]})]}),(0,$.jsx)("div",{className:"flex-1 flex justify-center px-4",children:(0,$.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,$.jsxs)("div",{className:"flex flex-wrap items-center gap-1 w-full min-h-[30px] rounded-lg bg-slate-800 border border-slate-700/60 px-2 py-1 cursor-text transition-colors focus-within:border-blue-500",onClick:()=>{var U;return(U=k.current)==null?void 0:U.focus()},children:[(0,$.jsx)(gn,{className:"w-3.5 h-3.5 text-slate-500 flex-shrink-0 mr-0.5"}),A.map(U=>{let{bg:Q,text:ae,border:V}=Bt(U);return(0,$.jsxs)("span",{style:{background:Q,color:ae,border:`1px solid ${V}`,display:"inline-flex",alignItems:"center",gap:3,padding:"1px 7px",borderRadius:100,fontSize:11,fontWeight:500,whiteSpace:"nowrap"},children:[U,(0,$.jsx)("button",{onClick:me=>{me.stopPropagation(),g==null||g(U)},style:{background:"none",border:"none",cursor:"pointer",padding:0,lineHeight:1,color:"inherit",opacity:.7,display:"flex"},children:(0,$.jsx)(Oe,{style:{width:9,height:9}})})]},U)}),(0,$.jsx)("input",{ref:k,id:"global-search",type:"text",placeholder:A.length===0?"Search\\u2026 or type #tag":"#tag or search\\u2026",value:n,onChange:U=>L(U.target.value),onKeyDown:le,className:"flex-1 min-w-[100px] bg-transparent border-none outline-none text-xs text-slate-200 placeholder-slate-500",autoComplete:"off",spellCheck:!1}),_&&(0,$.jsx)("button",{id:"global-search-clear",onClick:()=>{L(""),A.forEach(U=>g==null?void 0:g(U))},className:"text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0 flex",title:"Clear search and tag filters",children:(0,$.jsx)(Oe,{className:"w-3.5 h-3.5"})})]}),S!==null&&M.length>0&&(0,$.jsxs)("div",{ref:w,style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:8,boxShadow:"0 8px 24px rgba(0,0,0,0.3)",zIndex:50,overflow:"hidden"},children:[(0,$.jsx)("div",{style:{padding:"5px 10px",fontSize:10,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--p-text-g)",borderBottom:"1px solid var(--p-border)"},children:"Tags"}),M.map((U,Q)=>{let{bg:ae,text:V,border:me}=Bt(U);return(0,$.jsxs)("button",{onMouseDown:nt=>{nt.preventDefault(),X(U)},onMouseEnter:()=>v(Q),style:{width:"100%",textAlign:"left",display:"flex",alignItems:"center",gap:8,padding:"7px 12px",background:Q===f?"var(--p-hover)":"none",border:"none",cursor:"pointer"},children:[(0,$.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:V,flexShrink:0}}),(0,$.jsx)("span",{style:{fontSize:12,color:"var(--p-text-m)"},children:U}),(0,$.jsx)("span",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:100,fontSize:10,background:ae,color:V,border:`1px solid ${me}`},children:"tag"})]},U)}),(0,$.jsx)("div",{style:{padding:"5px 10px",fontSize:10,color:"var(--p-text-g)",borderTop:"1px solid var(--p-border)"},children:"\\u2191\\u2193 navigate \\xB7 Enter select \\xB7 Esc close"})]})]})}),(0,$.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[I,(0,$.jsx)(ns,{id:"header-shortcuts-hint",title:"Click to see keyboard shortcuts",onClick:()=>i(!0),label:"? shortcuts"}),(0,$.jsx)(ns,{id:"btn-settings",title:"Settings",onClick:y,icon:(0,$.jsx)(cr,{className:"w-3.5 h-3.5"})})]}),c&&(0,$.jsx)("div",{style:{position:"fixed",inset:0,background:"rgba(2,12,27,0.80)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",zIndex:200,display:"flex",alignItems:"center",justifyContent:"center"},onClick:()=>i(!1),children:(0,$.jsxs)("div",{id:"shortcuts-modal",style:{background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:14,padding:"20px 24px",minWidth:320,maxWidth:420,boxShadow:"var(--p-shadow-lg)"},onClick:U=>U.stopPropagation(),children:[(0,$.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[(0,$.jsx)("span",{style:{fontSize:13,fontWeight:700,color:"var(--p-text)"},children:"Keyboard Shortcuts"}),(0,$.jsx)("button",{onClick:()=>i(!1),style:{background:"none",border:"none",cursor:"pointer",color:"var(--p-text-f)",padding:2},children:(0,$.jsx)(Oe,{style:{width:14,height:14}})})]}),(0,$.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[["Alt+N","Open new task panel"],["Esc","Close panel / modal"],["?","Show this shortcuts overlay"],["Alt+F","Focus task search"]].map(([U,Q])=>(0,$.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,$.jsx)("kbd",{style:{fontSize:10,fontFamily:"monospace",background:"var(--p-surface)",border:"1px solid var(--p-border-t)",borderRadius:4,padding:"2px 7px",color:"var(--p-text-sub)",flexShrink:0},children:U}),(0,$.jsx)("span",{style:{fontSize:12,color:"var(--p-text-m)"},children:Q})]},U))})]})})]})}var K=D(Ie(),1);var ss=D(Ie(),1);var Kt=D(H(),1);function us({id:e,value:t,onChange:a,disabled:r}){let[o,n]=ss.default.useState(!1),l=ss.default.useRef(null),s=pr.find(u=>u.value===t)??pr[0];return ss.default.useEffect(()=>{let u=d=>{var g;(g=l.current)!=null&&g.contains(d.target)||n(!1)};return document.addEventListener("click",u),()=>document.removeEventListener("click",u)},[]),(0,Kt.jsxs)("div",{id:e,ref:l,style:{position:"relative",display:"inline-block"},children:[(0,Kt.jsxs)("button",{type:"button",title:s==null?void 0:s.tooltip,onClick:u=>{u.preventDefault(),r||n(d=>!d)},style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:6,border:"1px solid var(--p-border, rgba(255,255,255,0.08))",background:"var(--p-hover, rgba(255,255,255,0.05))",color:"var(--p-text-m, rgba(255,255,255,0.7))",fontSize:12,cursor:"pointer",whiteSpace:"nowrap"},children:[(0,Kt.jsx)("span",{style:{fontSize:13},children:s==null?void 0:s.icon}),(0,Kt.jsx)("span",{children:s==null?void 0:s.label})]}),o&&(0,Kt.jsx)("div",{style:{position:"absolute",top:"100%",left:0,marginTop:4,background:"var(--p-card, #1e293b)",border:"1px solid var(--p-border-s, rgba(255,255,255,0.12))",borderRadius:8,padding:"4px 0",zIndex:200,minWidth:140,boxShadow:"0 8px 24px rgba(0,0,0,0.4)"},children:pr.map(u=>(0,Kt.jsxs)("button",{type:"button",title:u.tooltip,onClick:()=>{a(u.value),n(!1)},style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"6px 12px",border:"none",background:u.value===t?"var(--p-hover, rgba(255,255,255,0.06))":"transparent",color:u.value===t?"var(--p-text, #fff)":"var(--p-text-f, rgba(255,255,255,0.55))",fontSize:12,cursor:"pointer",textAlign:"left"},children:[(0,Kt.jsx)("span",{style:{fontSize:14,lineHeight:1},children:u.icon}),(0,Kt.jsx)("span",{children:u.label})]},u.value))})]})}var Ye=D(Ie(),1);var Sn=D(Ie(),1);var Na=D(H(),1);function Ha({markdown:e,className:t,style:a}){let r=Sn.default.useRef(null),o=Sn.default.useRef({}),[n,l]=Sn.default.useState(null);return Sn.default.useEffect(()=>{let s=r.current;if(!s)return;function u(){l(null)}async function d(h){let m=h.target,L=m==null?void 0:m.closest("a[data-task-ref]");if(!L){u();return}h.preventDefault();let y=L.getAttribute("data-task-ref");if(!y)return;let I=L.getBoundingClientRect(),O=o.current[y];if(O){l({id:y,title:O.title,status:O.status,x:I.left,y:I.bottom+6});return}try{let i=await(await fetch(`/api/tasks/${y}`)).json(),f={title:i.title??`Task ${y}`,status:i.status??"unknown"};o.current[y]=f,l({id:y,title:f.title,status:f.status,x:I.left,y:I.bottom+6})}catch{l({id:y,title:`Task ${y}`,status:"unknown",x:I.left,y:I.bottom+6})}}function g(h){var y,I;let m=(I=(y=h.target)==null?void 0:y.closest)==null?void 0:I.call(y,"a[data-task-ref]");if(!m)return;let L=m.getAttribute("data-task-ref");L&&window.dispatchEvent(new CustomEvent("vibeflow-task-ref-click",{detail:{refId:L}}))}return s.addEventListener("mouseover",d),s.addEventListener("mouseleave",u),s.addEventListener("click",g),()=>{s.removeEventListener("mouseover",d),s.removeEventListener("mouseleave",u),s.removeEventListener("click",g)}},[]),(0,Na.jsxs)("div",{style:{position:"relative"},children:[(0,Na.jsx)("div",{ref:r,className:t,style:a,dangerouslySetInnerHTML:{__html:ts(e)}}),n&&(0,Na.jsxs)("div",{style:{position:"fixed",left:n.x,top:n.y,background:"#0f172a",border:"1px solid rgba(59,130,246,0.4)",color:"#e2e8f0",borderRadius:8,padding:"8px 10px",fontSize:11,boxShadow:"0 10px 24px rgba(2,6,23,0.55)",zIndex:60,pointerEvents:"none",minWidth:180},children:[(0,Na.jsxs)("div",{style:{color:"#60a5fa",fontFamily:"Menlo,monospace",marginBottom:3},children:["#",n.id]}),(0,Na.jsx)("div",{style:{fontWeight:600,marginBottom:3},children:n.title}),(0,Na.jsxs)("div",{style:{color:"#94a3b8"},children:["status: ",n.status]})]})]})}var In=D(Ie(),1),dm=D(H(),1),uo=In.default.forwardRef(function({value:t,onChange:a,baseRows:r=4,maxRows:o,style:n,...l},s){let u=In.default.useRef(null),d=o??r*2,g=In.default.useCallback(()=>{let h=u.current;if(!h)return;h.style.height="auto";let m=window.getComputedStyle(h),L=Number.parseFloat(m.lineHeight||"0")||18,y=Number.parseFloat(m.paddingTop||"0")+Number.parseFloat(m.paddingBottom||"0"),I=Number.parseFloat(m.borderTopWidth||"0")+Number.parseFloat(m.borderBottomWidth||"0"),O=r*L+y+I,c=d*L+y+I,i=Math.max(O,Math.min(h.scrollHeight,c));h.style.height=`${i}px`,h.style.overflowY=h.scrollHeight>c?"auto":"hidden"},[r,d]);return In.default.useLayoutEffect(()=>{g()},[t,g]),(0,dm.jsx)("textarea",{...l,ref:h=>{u.current=h,typeof s=="function"?s(h):s&&(s.current=h)},rows:r,value:t,onChange:h=>a(h.target.value),style:{...n,resize:"none"}})});var pm=D(Ie(),1);var fm=D(Ie(),1),cm=D(ao(),1),ua=D(H(),1);function gr({open:e,onClose:t,icon:a,title:r,headerActions:o,width:n,maxHeight:l,id:s,children:u,footer:d,boxStyle:g,onKeyDown:h}){if(fm.default.useEffect(()=>{if(!e)return;function y(I){I.key==="Escape"&&t(),h==null||h(I)}return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[e,t,h]),!e)return null;let m=!!(a||r||o),L=(0,ua.jsx)("div",{id:s,className:"modal-backdrop",onClick:y=>{y.target===y.currentTarget&&t()},onMouseDown:y=>y.stopPropagation(),children:(0,ua.jsxs)("div",{className:"modal-box",style:{width:n??"min(420px, 95vw)",maxHeight:l,...g},children:[m&&(0,ua.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--p-border)",flexShrink:0},children:[a&&(0,ua.jsx)("span",{style:{flexShrink:0,display:"flex",alignItems:"center"},children:a}),r&&(0,ua.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"var(--p-text)",flex:1,minWidth:0},children:r}),o&&(0,ua.jsx)("div",{style:{display:"flex",alignItems:"center",gap:4,flexShrink:0,marginLeft:"auto"},children:o})]}),u,d&&(0,ua.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:8,padding:"10px 18px",borderTop:"1px solid var(--p-border)",flexShrink:0},children:d})]})});return(0,cm.createPortal)(L,document.body)}var St=D(H(),1);function jt({open:e,message:t,title:a="Confirm",confirmLabel:r="Delete",cancelLabel:o="Cancel",loading:n,error:l,onConfirm:s,onCancel:u}){let d=pm.default.useCallback(g=>{g.key==="Enter"&&s()},[s]);return(0,St.jsx)(gr,{open:e,onClose:u,id:"confirm-modal",width:"min(380px, 95vw)",icon:(0,St.jsx)(Ba,{style:{width:20,height:20,color:"#f87171"}}),title:a,onKeyDown:d,footer:(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)("button",{id:"confirm-modal-cancel",onClick:u,disabled:n,style:{padding:"7px 16px",borderRadius:8,background:"var(--p-hover)",border:"1px solid var(--p-border)",color:"var(--p-text-m)",fontSize:13,cursor:"pointer",transition:"background 0.15s"},children:o}),(0,St.jsx)("button",{id:"confirm-modal-confirm",onClick:s,disabled:n,style:{padding:"7px 16px",borderRadius:8,background:"#dc2626",border:"none",color:"#fff",fontSize:13,fontWeight:600,cursor:n?"wait":"pointer",opacity:n?.6:1,transition:"background 0.15s"},children:n?"Deleting\\u2026":r})]}),children:(0,St.jsxs)("div",{style:{padding:"16px 18px"},children:[typeof t=="string"?(0,St.jsx)("p",{style:{margin:0,fontSize:13,color:"var(--p-text-f)",lineHeight:1.6},children:t}):t,l&&(0,St.jsx)("p",{style:{margin:"8px 0 0",fontSize:12,color:"var(--p-red)"},children:l})]})})}var Ae=D(H(),1);function mm(e){return e.linkedPath?"\\u{1F517}":/\\.(png|jpe?g|gif|webp|svg)$/i.test(e.name)?"\\u{1F5BC}\\uFE0F":/\\.html?$/i.test(e.name)?"\\u{1F310}":/\\.md$/i.test(e.name)||/\\.pdf$/i.test(e.name)?"\\u{1F4C4}":"\\u{1F4CE}"}function qx(e){return/\\.(png|jpe?g|gif|webp|svg|html?)$/i.test(e.name)}function Wx(e){return/\\.html?$/i.test(e.name)}function is({file:e,url:t,variant:a,onPreview:r,onDelete:o}){let n=qx(e),l=Wx(e);function s(){r?r(e,t):window.open(t,"_blank")}return a==="compact"?(0,Ae.jsxs)("div",{className:"group/file-compact",style:{display:"flex",alignItems:"center",gap:8,padding:"4px 8px",borderRadius:8,background:"var(--p-card)",border:"1px solid var(--p-border)",position:"relative"},children:[(0,Ae.jsx)("span",{style:{fontSize:14,flexShrink:0},children:mm(e)}),(0,Ae.jsx)("div",{style:{flex:1,minWidth:0},children:(0,Ae.jsx)("button",{onClick:s,style:{fontSize:12,color:"var(--p-blue-300)",background:"none",border:"none",cursor:"pointer",padding:0,textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},title:e.name,children:e.name})}),(0,Ae.jsx)("span",{className:"file-compact-ts",style:{fontSize:10,color:"var(--p-border-t)",flexShrink:0,marginLeft:2},children:e.createdAt?ot(e.createdAt):"attached"}),(0,Ae.jsxs)("div",{className:"file-compact-actions",style:{position:"absolute",right:6,top:0,bottom:0,display:"flex",alignItems:"center",gap:4,transition:"opacity 0.15s",background:"var(--p-card)",paddingLeft:8},children:[n&&(0,Ae.jsx)("button",{onClick:s,style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)"},title:l?"Open in new tab":"Preview",children:l?"\\u2197":"\\u{1F441}"}),(0,Ae.jsx)("a",{href:t,download:e.name,style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)",textDecoration:"none"},title:"Download",onClick:u=>u.stopPropagation(),children:"\\u2193"}),o&&(0,Ae.jsx)("button",{onClick:()=>void o(e),style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)"},title:"Delete",children:"\\u2715"})]})]}):(0,Ae.jsxs)("div",{className:"group/file",style:{display:"flex",alignItems:"center",gap:10,padding:8,borderRadius:8,border:"1px solid var(--p-border)",transition:"background 0.15s",position:"relative"},children:[(0,Ae.jsx)("span",{style:{fontSize:18,flexShrink:0},children:mm(e)}),(0,Ae.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,Ae.jsx)("p",{style:{fontSize:12,fontWeight:500,color:"var(--p-text)",margin:0,cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:e.name,onClick:s,children:e.name}),(0,Ae.jsx)("p",{style:{fontSize:10,color:"var(--p-text-f)",margin:0},children:e.linkedPath?`linked: ${e.linkedPath}`:Ui(e.size??0)})]}),(0,Ae.jsxs)("div",{className:"file-normal-actions",style:{display:"flex",alignItems:"center",gap:4,transition:"opacity 0.15s"},children:[n&&(0,Ae.jsx)("button",{onClick:s,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)"},title:l?"Open in new tab":"Preview",children:l?"\\u2197":"\\u{1F441}"}),(0,Ae.jsx)("a",{href:t,download:e.name,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)",textDecoration:"none"},title:"Download",onClick:u=>u.stopPropagation(),children:"\\u2193"}),o&&(0,Ae.jsx)("button",{onClick:()=>void o(e),style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:4,fontSize:11,color:"var(--p-text-m)"},title:"Delete",children:"\\u2715"})]})]})}var F=D(H(),1);function gm({source:e}){return e!=="cli"?null:(0,F.jsx)("span",{title:"Via CLI (agent)",style:{fontSize:9,color:"var(--p-green-300)",background:"rgba(34,197,94,0.1)",border:"1px solid rgba(34,197,94,0.2)",borderRadius:4,padding:"0 4px",fontFamily:"monospace",lineHeight:"16px",flexShrink:0},children:">_"})}function Vx(e,t){if(e.kind==="lifecycle")return e.author??null;if(e.kind==="comment"){let a=e.comment;return a.type==="system"?null:a.author==="agent"?"\\u{1F916} Agent":a.authorName??t}return e.kind==="change"?e.actor:null}function $x(e,t){let a=[];for(let r of e){let o=Vx(r,t),n=a[a.length-1];o&&n&&n.author===o?(n.items.push(r),r.sortKey>n.newestSortKey&&(n.newestSortKey=r.sortKey),r.sortKey<n.oldestSortKey&&(n.oldestSortKey=r.sortKey)):a.push({author:o,newestSortKey:r.sortKey,oldestSortKey:r.sortKey,items:[r]})}return a}function Gi({comments:e,files:t=[],localChanges:a=[],loading:r,error:o,gitUserName:n="You",taskAuthorName:l,baseUrl:s="",taskId:u,taskCreatedAt:d,taskUpdatedAt:g,onEdit:h,onDelete:m,onDeleteFile:L,onFilePreview:y}){let I=Ye.default.useRef(null),O=Ye.default.useRef(null),[c,i]=Ye.default.useState(null),[f,v]=Ye.default.useState(""),[k,w]=Ye.default.useState(null),[p,S]=Ye.default.useState(null),[A,T]=Ye.default.useState(()=>{try{return localStorage.getItem("vibeflow-show-updates")!=="false"}catch{return!0}}),M=Ye.default.useRef(r),X=Ye.default.useMemo(()=>{let _=[];d&&_.push({kind:"lifecycle",sortKey:d,label:"Task created",icon:"\\u2726",author:l??n}),g&&g!==d&&_.push({kind:"lifecycle",sortKey:g,label:"Task edited",icon:"\\u270E"});let U=e.map(V=>({kind:"comment",sortKey:V.createdAt,comment:V})),Q=t.map(V=>{let me=V.url.startsWith("http")?V.url:`${s}${V.url}`;return{kind:"file",sortKey:V.createdAt??"9999",file:V,url:me}}),ae=a.map(V=>({kind:"change",sortKey:V.timestamp,field:V.field,from:V.from,to:V.to,actor:V.actor,source:V.source}));return[..._,...U,...Q,...ae].sort((V,me)=>me.sortKey.localeCompare(V.sortKey))},[e,t,a,s,d,g]),le=Ye.default.useMemo(()=>X.filter(_=>_.kind==="lifecycle"||_.kind==="change").length,[X]),J=Ye.default.useMemo(()=>A?X:X.filter(_=>_.kind==="comment"||_.kind==="file"),[X,A]),Re=Ye.default.useMemo(()=>$x(J,n),[J,n]);return Ye.default.useEffect(()=>{let _=M.current&&!r;M.current=r,I.current&&_&&requestAnimationFrame(()=>{I.current&&(I.current.scrollTop=0)})},[r]),Ye.default.useEffect(()=>{c&&O.current&&(O.current.focus(),O.current.scrollIntoView({block:"nearest"}))},[c]),r?(0,F.jsx)("p",{style:{color:"var(--p-text-g)",fontSize:12,textAlign:"center",padding:"16px 0"},children:"Loading\\u2026"}):o?(0,F.jsx)("p",{style:{color:"var(--p-red-500)",fontSize:12,textAlign:"center",padding:"8px 0"},children:"Failed to load."}):X.length===0?(0,F.jsx)("p",{style:{color:"var(--p-text-g)",fontSize:12,textAlign:"center",padding:"16px 0"},children:"No activity yet."}):(0,F.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",minHeight:0},children:[le>0&&(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0 4px",flexShrink:0,borderBottom:"1px solid var(--p-border)",marginBottom:4},children:[(0,F.jsx)("span",{style:{fontSize:9,color:"var(--p-text-g)",flex:1,letterSpacing:"0.04em"},children:A?"":`${le} system event${le!==1?"s":""} hidden`}),(0,F.jsx)("button",{id:"dp-toggle-updates",onClick:()=>T(_=>{let U=!_;try{localStorage.setItem("vibeflow-show-updates",String(U))}catch{}return U}),style:{all:"unset",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:5,color:A?"var(--p-text-m)":"var(--p-text-g)",transition:"color .12s, background .12s"},title:A?"Hide system events":`Show ${le} system event${le!==1?"s":""}`,onMouseEnter:_=>{_.currentTarget.style.color="var(--p-text)",_.currentTarget.style.background="var(--p-hover)"},onMouseLeave:_=>{_.currentTarget.style.color=A?"var(--p-text-m)":"var(--p-text-g)",_.currentTarget.style.background="transparent"},children:A?(0,F.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,F.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,F.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}):(0,F.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,F.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,F.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})})]}),(0,F.jsx)("div",{ref:I,style:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:2,minHeight:0},children:Re.map((_,U)=>{let Q=_.author!==null&&_.items.length>1,ae=Q,V=_.author==="\\u{1F916} Agent";return(0,F.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[ae&&(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 0 2px",marginTop:4},children:[(0,F.jsx)("span",{style:{fontSize:11,fontWeight:600,color:V?"var(--p-purple)":"var(--p-blue-300)",flexShrink:0},children:_.author}),(0,F.jsx)("span",{style:{fontSize:10,color:"var(--p-text-g)",flexShrink:0},children:`${ot(_.oldestSortKey)} \\u2013 ${ot(_.newestSortKey)}`}),(0,F.jsxs)("span",{style:{fontSize:10,color:"var(--p-border-t)",flexShrink:0,marginLeft:2},children:["(",_.items.length," activities)"]})]}),(0,F.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:Q?4:8,paddingLeft:Q?8:0,borderLeft:Q?"1.5px solid var(--p-border)":"none",marginLeft:Q?4:0},children:_.items.map((me,nt)=>Gx(me,nt,U,Q,n,c,f,O,i,v,h,w,L?S:null,y))})]},`group-${U}`)})}),(0,F.jsx)(jt,{open:k!==null,message:"Delete this comment? This action cannot be undone.",onConfirm:()=>{k&&m(k),w(null)},onCancel:()=>w(null)}),L&&(0,F.jsx)(jt,{open:p!==null,message:p?`Delete "${p.name}"? This action cannot be undone.`:"",onConfirm:()=>{p&&L(p),S(null)},onCancel:()=>S(null)})]})}function Gx(e,t,a,r,o,n,l,s,u,d,g,h,m,L){if(e.kind==="lifecycle")return(0,F.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:6,padding:"2px 0"},children:[(0,F.jsx)("span",{style:{fontSize:11,color:"var(--p-purple)",fontWeight:600,flexShrink:0,minWidth:18,paddingTop:1},children:e.icon}),(0,F.jsx)("div",{style:{flex:1,minWidth:0},children:(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,F.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)",fontStyle:"italic"},children:e.label}),!r&&(0,F.jsx)("span",{style:{fontSize:10,color:"var(--p-text-g)",marginLeft:"auto",flexShrink:0},children:ot(e.sortKey)})]})})]},`lifecycle-${e.sortKey}-${a}-${t}`);if(e.kind==="change"){let k=e.from.length>28?e.from.slice(0,28)+"\\u2026":e.from,w=e.to.length>28?e.to.slice(0,28)+"\\u2026":e.to,p=e.from.length>28||e.to.length>28;return(0,F.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:6,padding:"2px 0"},children:[(0,F.jsx)("span",{style:{fontSize:11,color:"var(--p-blue)",fontWeight:600,flexShrink:0,minWidth:18,paddingTop:1},children:"\\u270E"}),(0,F.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[!r&&(0,F.jsxs)("span",{style:{fontSize:11,fontWeight:600,color:"var(--p-blue-300)"},children:["\\u{1F464} ",e.actor]}),!r&&(0,F.jsx)(gm,{source:e.source}),(0,F.jsxs)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:["changed ",(0,F.jsx)("strong",{style:{color:"var(--p-text)"},children:e.field})]}),!r&&(0,F.jsx)("span",{style:{fontSize:10,color:"var(--p-text-g)",marginLeft:"auto",flexShrink:0},children:ot(e.sortKey)})]}),(0,F.jsxs)("div",{title:p?`${e.from} \\u2192 ${e.to}`:void 0,style:{marginTop:2,fontSize:11,color:"var(--p-text-g)",display:"flex",alignItems:"center",gap:4,cursor:p?"help":"default"},children:[(0,F.jsx)("span",{style:{color:"var(--p-red)",background:"rgba(239,68,68,0.1)",borderRadius:4,padding:"1px 5px",maxWidth:120,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k}),(0,F.jsx)("span",{style:{color:"var(--p-text-g)"},children:"\\u2192"}),(0,F.jsx)("span",{style:{color:"var(--p-green)",background:"rgba(34,197,94,0.1)",borderRadius:4,padding:"1px 5px",maxWidth:120,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w})]})]})]},`change-${e.sortKey}-${a}-${t}`)}if(e.kind==="file"){let{file:v,url:k}=e;return(0,F.jsx)(is,{file:v,url:k,variant:"compact",onPreview:L?(w,p)=>L(w.name,p):void 0,onDelete:m?w=>(m(w),Promise.resolve()):void 0},`file-${v.name}-${a}-${t}`)}let y=e.comment,I=y.author==="agent",O=y.type==="system",c=y.deleted===!0,i=!!y.id&&!I&&!O&&!c&&y.isOwnComment!==!1,f=n===y.id;return O?(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"2px 0",fontSize:11,color:"var(--p-text-g)",fontStyle:"italic"},children:[(0,F.jsx)("span",{style:{opacity:.6},children:"\\u2B21"}),(0,F.jsx)("span",{children:y.text}),!r&&(0,F.jsx)("span",{style:{marginLeft:"auto",flexShrink:0,opacity:.6},children:ot(y.createdAt)})]},y.id):(0,F.jsxs)("div",{className:"flex flex-col gap-1 group/comment",style:{paddingTop:r?2:4},children:[!r&&(0,F.jsxs)("div",{className:"flex items-center justify-between gap-1.5 text-xs mb-0.5",children:[(0,F.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,F.jsx)("span",{style:{color:c?"var(--p-text-g)":I?"var(--p-purple)":"var(--p-blue-300)"},children:I?"\\u{1F916} Agent":`\\u{1F464} ${y.authorName??o}`}),(0,F.jsx)(gm,{source:y.source}),(0,F.jsxs)("span",{style:{color:"var(--p-text-g)"},children:[ot(y.createdAt),!c&&y.updatedAt?" \\xB7 edited":"",c?" \\xB7 deleted":""]})]}),i&&(0,F.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover/comment:opacity-100 transition-opacity",children:[(0,F.jsx)("button",{onClick:()=>{u(y.id),d(y.text)},className:"p-1 rounded hover:bg-slate-700 transition-colors",title:"Edit",children:(0,F.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:"\\u270E"})}),(0,F.jsx)("button",{onClick:()=>h(y),className:"p-1 rounded hover:bg-red-900/40 transition-colors",title:"Delete",children:(0,F.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:"\\u2715"})})]})]}),r&&(0,F.jsxs)("div",{className:"flex items-center justify-between gap-1.5",style:{marginBottom:2},children:[(0,F.jsxs)("span",{style:{fontSize:10,color:"var(--p-text-g)"},children:[ot(y.createdAt),!c&&y.updatedAt?" \\xB7 edited":"",c?" \\xB7 deleted":""]}),i&&(0,F.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover/comment:opacity-100 transition-opacity",children:[(0,F.jsx)("button",{onClick:()=>{u(y.id),d(y.text)},className:"p-1 rounded hover:bg-slate-700 transition-colors",title:"Edit",children:(0,F.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:"\\u270E"})}),(0,F.jsx)("button",{onClick:()=>h(y),className:"p-1 rounded hover:bg-red-900/40 transition-colors",title:"Delete",children:(0,F.jsx)("span",{style:{fontSize:11,color:"var(--p-text-m)"},children:"\\u2715"})})]})]}),f?(0,F.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,F.jsx)(uo,{ref:s,value:l,onChange:d,baseRows:4,maxRows:12,onKeyDown:v=>{v.key==="Enter"&&(v.ctrlKey||v.metaKey)&&(v.preventDefault(),g(y,l).then(()=>u(null)))},style:{width:"100%",background:"var(--p-input)",border:"1px solid var(--p-border-s)",borderRadius:6,padding:"8px 10px",fontSize:12,color:"var(--p-text)",outline:"none",fontFamily:"inherit",boxSizing:"border-box"}}),(0,F.jsxs)("div",{style:{display:"flex",gap:6,justifyContent:"flex-end"},children:[(0,F.jsx)("button",{onClick:()=>u(null),style:{padding:"4px 10px",background:"var(--p-surface)",border:"none",borderRadius:5,fontSize:11,color:"var(--p-text-sub)",cursor:"pointer"},children:"Cancel"}),(0,F.jsx)("button",{onClick:async()=>{await g(y,l),u(null)},style:{padding:"4px 10px",background:"var(--p-blue)",border:"none",borderRadius:5,fontSize:11,color:"var(--p-white)",cursor:"pointer"},children:"Save"})]})]}):c?(0,F.jsx)("div",{style:{padding:"8px 14px",fontSize:12,color:"var(--p-text-g)",fontStyle:"italic",background:"var(--p-input)",border:"1px dashed var(--p-border)",borderRadius:8},children:"Comment deleted"}):(0,F.jsx)(Ha,{markdown:y.text,style:{background:"var(--p-input)",border:"1px solid var(--p-border)",borderRadius:8,padding:"10px 14px",fontSize:12,color:"var(--p-text-sub)",lineHeight:1.6}})]},y.id)}var hm=D(Ie(),1);var _a=D(H(),1);function Ki({files:e,loading:t,error:a,baseUrl:r,onPreview:o,onDelete:n}){let[l,s]=hm.default.useState(null);return t?(0,_a.jsx)("p",{style:{color:"var(--p-text-g)",fontSize:12,textAlign:"center",padding:"16px 0"},children:"Loading\\u2026"}):a?(0,_a.jsx)("p",{style:{color:"var(--p-red-500)",fontSize:12,textAlign:"center",padding:"8px 0"},children:"Failed to load."}):e.length===0?(0,_a.jsx)("p",{style:{color:"var(--p-text-g)",fontSize:12,textAlign:"center",padding:"16px 0"},children:"No files attached."}):(0,_a.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[e.map(u=>{let d=u.url??`${r}/api/files/${encodeURIComponent(u.name)}`;return(0,_a.jsx)(is,{file:u,url:d,variant:"normal",onPreview:g=>o(g),onDelete:n?g=>(s(g),Promise.resolve()):void 0},u.name)}),n&&(0,_a.jsx)(jt,{open:l!==null,message:l?`Delete "${l.name}"? This action cannot be undone.`:"",onConfirm:()=>{l&&n(l),s(null)},onCancel:()=>s(null)})]})}var Qi=D(Ie(),1);var io=D(Ie(),1),xm=D(ao(),1);var Ot=D(H(),1);function Cn({value:e,onChange:t,previewValue:a,showPreview:r,setShowPreview:o,previewId:n,textareaId:l,placeholder:s,previewEmptyText:u,previewMinHeight:d=54,previewMaxHeight:g=220,baseRows:h=5,maxRows:m=12,autoFocus:L=!1,textareaRef:y,onKeyDown:I,afterTextarea:O,onBlur:c}){let i=io.default.useRef(null),[f,v]=io.default.useState([]),[k,w]=io.default.useState(null),[p,S]=io.default.useState(null);io.default.useEffect(()=>{let M=!0;return fetch("/api/tasks").then(X=>X.json()).then(X=>{if(!M)return;let le=(X.tasks??[]).map(J=>({id:String(J.id??""),title:String(J.title??"")})).filter(J=>J.id.length>0);v(le)}).catch(()=>{}),()=>{M=!1}},[]);function A(M){let X=i.current;if(!X){w(null);return}let le=X.selectionStart??M.length,J=M.slice(0,le),Re=-1;for(let ae=J.length-1;ae>=0;ae--){if(J[ae]!=="#")continue;let V=ae>0?J[ae-1]:"";if(V&&!/\\s/.test(V))continue;let me=J.slice(ae+1);if(!me.includes("#")){if(me.length>80)return;Re=ae;break}}if(Re===-1){w(null);return}let _=J.slice(Re+1).trim().toLowerCase(),U=f.filter(ae=>{if(!_)return!0;let V=ae.id.toLowerCase(),me=ae.title.toLowerCase();return V.includes(_)||me.includes(_)}).sort((ae,V)=>{let me=ae.id.toLowerCase().startsWith(_)?1:0,nt=V.id.toLowerCase().startsWith(_)?1:0;if(me!==nt)return nt-me;let wt=ae.title.toLowerCase().startsWith(_)?1:0,Ge=V.title.toLowerCase().startsWith(_)?1:0;return wt!==Ge?Ge-wt:ae.id.localeCompare(V.id)}).slice(0,6);if(!U.length){w(null),S(null);return}let Q=X.getBoundingClientRect();S({top:Q.top,left:Q.left,width:Q.width}),w({queryStart:Re,queryEnd:le,items:U})}function T(M){let X=k;if(!X)return;let le=`${e.slice(0,X.queryStart)}#${M} ${e.slice(X.queryEnd)}`;t(le),w(null),S(null),requestAnimationFrame(()=>{let J=i.current;if(!J)return;let Re=X.queryStart+M.length+2;J.focus(),J.setSelectionRange(Re,Re)})}return r?(0,Ot.jsx)("div",{id:n,onClick:M=>{M.target.closest("a")||o(!1)},title:"Click to edit",style:{cursor:"text",minHeight:d,background:"var(--p-input)",border:"1px solid var(--p-border-s)",borderRadius:8,padding:10,fontSize:12,color:"var(--p-text-sub)",lineHeight:1.7,overflow:"auto",maxHeight:g},children:(a??e).trim()?(0,Ot.jsx)(Ha,{markdown:a??e}):(0,Ot.jsx)("span",{style:{color:"var(--p-border-t)"},children:u??s})}):(0,Ot.jsxs)("div",{style:{position:"relative"},children:[(0,Ot.jsx)(uo,{id:l,ref:M=>{i.current=M,y&&(y.current=M)},className:"dp-textarea",placeholder:s,value:e,onChange:M=>{t(M),A(M)},onFocus:()=>o(!1),onBlur:()=>{w(null),S(null),o(!0),c==null||c()},baseRows:h,maxRows:m,autoFocus:L,onKeyDown:M=>{M.key==="Escape"&&(w(null),S(null)),I==null||I(M)}}),k&&p&&(0,xm.createPortal)((0,Ot.jsx)("div",{"data-task-ref-suggest":"true",style:{position:"fixed",left:p.left+8,width:p.width-16,top:p.top,transform:"translateY(-100%)",border:"1px solid var(--p-border-s)",background:"var(--p-card)",borderRadius:8,boxShadow:"var(--p-shadow-lg)",overflow:"hidden",zIndex:9999},children:k.items.map(M=>(0,Ot.jsxs)("button",{type:"button",onMouseDown:X=>{X.preventDefault(),T(M.id)},style:{width:"100%",display:"flex",alignItems:"center",gap:8,textAlign:"left",border:"none",borderBottom:"1px solid var(--p-border)",background:"transparent",color:"var(--p-text-sub)",padding:"7px 10px",fontSize:11,cursor:"pointer"},onMouseEnter:X=>{X.currentTarget.style.background="var(--p-hover)"},onMouseLeave:X=>{X.currentTarget.style.background="transparent"},children:[(0,Ot.jsxs)("span",{style:{fontFamily:"monospace",color:"var(--p-blue-300)"},children:["#",M.id]}),(0,Ot.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M.title})]},M.id))}),document.body),O]})}var hr=D(Ie(),1);var It=D(H(),1);function ji({tags:e,allTags:t,onChange:a,disabled:r}){let[o,n]=hr.default.useState(""),[l,s]=hr.default.useState(!1),u=hr.default.useRef(null),d=hr.default.useRef(null),g=o.trim().toLowerCase(),h=hr.default.useMemo(()=>t.filter(f=>!e.includes(f)&&f.toLowerCase().includes(g)).slice(0,8),[t,e,g]),m=g.length>0&&!t.some(i=>i.toLowerCase()===g)&&!e.some(i=>i.toLowerCase()===g),L=g.length>0&&t.some(i=>i.toLowerCase()===g)&&!e.some(i=>i.toLowerCase()===g);function y(i){var v;let f=i.trim();!f||e.includes(f)||(a([...e,f]),n(""),s(!1),(v=u.current)==null||v.focus())}function I(i){a(e.filter(f=>f!==i))}function O(i){if(i.key==="Enter")if(i.preventDefault(),m||L){let f=t.find(v=>v.toLowerCase()===g);y(f??o.trim())}else h.length>0&&y(h[0]);i.key==="Escape"&&(s(!1),n("")),i.key==="Backspace"&&!o&&e.length>0&&I(e[e.length-1])}hr.default.useEffect(()=>{function i(f){d.current&&!d.current.contains(f.target)&&s(!1)}return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[]);let c=l&&(h.length>0||m);return(0,It.jsxs)("div",{ref:d,style:{position:"relative"},children:[(0,It.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center",padding:"5px 8px",borderRadius:8,border:`1px solid ${l?"var(--p-blue)":"var(--p-border)"}`,background:"var(--p-input)",cursor:r?"not-allowed":"text",opacity:r?.6:1,minHeight:34,transition:"border-color .12s"},onClick:()=>{var i;r||(i=u.current)==null||i.focus()},children:[(0,It.jsx)(yn,{tags:e,onRemove:r?void 0:I,size:"sm"}),!r&&(0,It.jsx)("input",{ref:u,type:"text",value:o,placeholder:e.length?"":"Add tags\\u2026",onChange:i=>{n(i.target.value),s(!0)},onFocus:()=>s(!0),onKeyDown:O,style:{background:"none",border:"none",outline:"none",fontSize:12,color:"var(--p-text)",minWidth:80,flex:1,padding:0,lineHeight:"1.4"}})]}),c&&(0,It.jsxs)("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:8,boxShadow:"0 8px 24px rgba(0,0,0,0.25)",zIndex:50,overflow:"hidden"},onMouseDown:i=>i.preventDefault(),children:[h.map(i=>{let{bg:f,text:v,border:k}=Bt(i);return(0,It.jsxs)("button",{type:"button",onClick:()=>y(i),style:{width:"100%",textAlign:"left",padding:"6px 10px",display:"flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",fontSize:12,color:"var(--p-text-m)"},onMouseEnter:w=>{w.currentTarget.style.background="var(--p-hover)"},onMouseLeave:w=>{w.currentTarget.style.background="none"},children:[(0,It.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:v,border:`1px solid ${k}`,flexShrink:0}}),i]},i)}),m&&(0,It.jsxs)("button",{type:"button",onClick:()=>y(o.trim()),style:{width:"100%",textAlign:"left",padding:"6px 10px",display:"flex",alignItems:"center",gap:6,background:"none",border:h.length>0?"1px solid var(--p-border)":"none",borderLeft:"none",borderRight:"none",borderBottom:"none",cursor:"pointer",fontSize:12,color:"var(--p-text-g)"},onMouseEnter:i=>{i.currentTarget.style.background="var(--p-hover)",i.currentTarget.style.color="var(--p-text-m)"},onMouseLeave:i=>{i.currentTarget.style.background="none",i.currentTarget.style.color="var(--p-text-g)"},children:[(0,It.jsx)("span",{style:{fontSize:14,lineHeight:1},children:"+"}),\'Create "\',(0,It.jsx)("strong",{style:{color:"var(--p-text)"},children:o.trim()}),\'"\']})]})]})}var W=D(H(),1);function Yi({task:e,description:t,setDescription:a,showDescPreview:r,setShowDescPreview:o,priority:n,setPriority:l,onDescriptionBlur:s,onDescriptionDiscard:u,originalDescription:d,onPriorityChange:g,githubUrl:h,onFilePreview:m,onPatch:L,onDeleteScreenshot:y,liveFiles:I,allTags:O=[]}){let c=(e==null?void 0:e.files)??[],i=I?I.map(T=>({name:T.name,linkedPath:T.linkedPath,addedAt:T.createdAt,url:T.url})):c,f=i==null?void 0:i.find(T=>/\\.(png|jpe?g|gif|webp|svg|avif)$/i.test(T.name)),v=e&&f?f.url||`/api/tasks/${e.id}/files/${encodeURIComponent(f.name)}`:null,k=Qi.default.useRef(null),[w,p]=Qi.default.useState(null),{userPart:S,consolePart:A}=jx(t);return(0,W.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,W.jsxs)("div",{children:[(0,W.jsx)("div",{className:"dp-meta-label",style:{marginBottom:4},children:"Description"}),(0,W.jsx)(Cn,{value:t,previewValue:A?S:void 0,onChange:a,onBlur:s,showPreview:r,setShowPreview:o,previewId:"dp-desc-preview",textareaId:"dp-desc",placeholder:"Description (markdown)\\u2026",previewMinHeight:80,previewMaxHeight:220,baseRows:6,maxRows:12,autoFocus:!0,textareaRef:k,afterTextarea:u&&d!==void 0&&t!==d?(0,W.jsx)("button",{type:"button",onMouseDown:T=>{T.preventDefault(),u()},title:"Discard changes and restore saved description",style:{marginTop:4,display:"flex",alignItems:"center",gap:4,fontSize:11,color:"var(--p-text-g)",background:"none",border:"1px solid var(--p-border-t)",borderRadius:6,padding:"3px 8px",cursor:"pointer",transition:"color .12s, border-color .12s"},onMouseEnter:T=>{T.currentTarget.style.color="var(--p-amber-300)",T.currentTarget.style.borderColor="var(--p-amber-300)"},onMouseLeave:T=>{T.currentTarget.style.color="var(--p-text-g)",T.currentTarget.style.borderColor="var(--p-border-t)"},children:"\\u21A9 Discard changes"}):void 0})]}),A&&(0,W.jsx)(Xx,{logs:A}),e&&f&&v&&(0,W.jsxs)("div",{children:[(0,W.jsx)("div",{className:"dp-meta-label",children:"Screenshot"}),(0,W.jsxs)("div",{id:"dp-screenshot-preview",style:{border:"1px solid color-mix(in srgb, var(--p-border-t) 70%, transparent)",borderRadius:10,overflow:"hidden",background:"var(--p-card)"},children:[(0,W.jsx)("button",{onClick:()=>m(f.name,v),style:{width:"100%",height:112,border:"none",padding:0,background:"linear-gradient(135deg, var(--p-border), var(--p-bg))",cursor:"pointer",display:"block",overflow:"hidden"},title:"Preview screenshot",children:(0,W.jsx)("img",{src:v,alt:"Task screenshot",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})}),(0,W.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",borderTop:"1px solid var(--p-border)",background:"var(--p-surface)"},children:[(0,W.jsx)("span",{style:{fontSize:10,color:"var(--p-text-f)",flex:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:f.addedAt?`Captured ${ot(f.addedAt)}`:"Screenshot attached"}),(0,W.jsx)("button",{onClick:()=>m(f.name,v),style:{fontSize:10,color:"var(--p-text-m)",background:"transparent",border:"none",cursor:"pointer",padding:0},title:"Preview screenshot",children:"Preview"}),(0,W.jsx)("button",{onClick:()=>p(f.name),style:{fontSize:10,color:"var(--p-red)",background:"transparent",border:"none",cursor:"pointer",padding:0},title:"Remove screenshot",children:"Remove"})]})]})]}),(0,W.jsxs)("div",{children:[(0,W.jsx)("div",{className:"dp-meta-label",children:"Tags"}),(0,W.jsx)(ji,{tags:(e==null?void 0:e.tags)??[],allTags:O,disabled:!e,onChange:T=>{e&&L(e.id,{tags:T})}})]}),(0,W.jsxs)("div",{children:[(0,W.jsx)("div",{className:"dp-meta-label",children:"Priority"}),(0,W.jsxs)("select",{id:"dp-priority",className:"dp-input",value:n,onChange:T=>{let M=T.target.value;l(M),g==null||g(M)},style:{padding:"5px 8px",fontSize:12,cursor:"pointer",width:"auto"},children:[(0,W.jsx)("option",{value:"",children:"\\u2014"}),(0,W.jsx)("option",{value:"Critical",children:"Critical"}),(0,W.jsx)("option",{value:"High",children:"High"}),(0,W.jsx)("option",{value:"Medium",children:"Medium"}),(0,W.jsx)("option",{value:"Low",children:"Low"})]})]}),e&&(0,W.jsxs)("div",{id:"dp-metadata",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[(0,W.jsx)(Xi,{label:"Created",id:"dp-created",children:e.createdAt?ot(e.createdAt):"\\u2014"}),(0,W.jsx)(Xi,{label:"ID",id:"dp-id",children:(0,W.jsx)("span",{style:{fontFamily:"monospace"},children:e.id})}),(0,W.jsx)(Xi,{label:"Author",id:"dp-author",children:e.authorName??e.author??"\\u2014"}),e.commit&&(0,W.jsx)(Kx,{task:e,githubUrl:h}),e.annotatedElementText&&(0,W.jsxs)("div",{id:"dp-annotated-text",style:{gridColumn:"1 / -1",background:"var(--p-card)",borderRadius:8,padding:"8px 10px"},children:[(0,W.jsx)("div",{style:{fontSize:9,color:"var(--p-border-t)",marginBottom:2,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Annotated element text"}),(0,W.jsx)("div",{style:{fontSize:11,color:"var(--p-text-f)",fontStyle:"italic",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.annotatedElementText})]})]}),(0,W.jsx)(jt,{open:w!==null,message:"Remove this screenshot? This action cannot be undone.",confirmLabel:"Remove",onConfirm:()=>{w&&y(w),p(null)},onCancel:()=>p(null)})]})}function Xi({label:e,id:t,children:a}){return(0,W.jsxs)("div",{id:t,style:{background:"var(--p-card)",borderRadius:8,padding:"8px 10px"},children:[(0,W.jsx)("div",{style:{fontSize:9,color:"var(--p-border-t)",marginBottom:2,textTransform:"uppercase",letterSpacing:"0.04em"},children:e}),(0,W.jsx)("div",{style:{fontSize:11,color:"var(--p-text-f)",borderBottom:"1px solid var(--p-border)",paddingBottom:4,display:"flex",alignItems:"center",minHeight:16},children:a})]})}function Kx({task:e,githubUrl:t}){var n;let a=(n=e.commits)!=null&&n.length?e.commits:[{sha:e.commit,message:e.title??"",timestamp:e.createdAt??""}],r=a[a.length-1],o=a.map(l=>`${l.sha.slice(0,8)} ${l.timestamp?new Date(l.timestamp).toLocaleString():""} ${l.message.slice(0,60)}`).join(`\n`);return(0,W.jsxs)("div",{id:"dp-commit",style:{background:"var(--p-card)",borderRadius:8,padding:"8px 10px",cursor:"default"},title:a.length>1?`All commits:\n${o}`:`${r.sha}\n${r.message}`,children:[(0,W.jsxs)("div",{style:{fontSize:9,color:"var(--p-border-t)",marginBottom:2,textTransform:"uppercase",letterSpacing:"0.04em"},children:["Commit",a.length>1?"s":""]}),(0,W.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[t&&e.commitPushed!==!1?(0,W.jsxs)("a",{href:`${t}/commit/${r.sha}`,target:"_blank",rel:"noopener noreferrer",style:{fontSize:10,color:"var(--p-blue-300)",fontFamily:"monospace",textDecoration:"none"},title:"Open diff on GitHub",onClick:l=>l.stopPropagation(),children:[r.sha.slice(0,8)," \\u2197"]}):(0,W.jsxs)("span",{style:{fontSize:10,color:"var(--p-text-f)",fontFamily:"monospace"},title:e.commitPushed===!1?"Commit not pushed to remote yet":void 0,children:[r.sha.slice(0,8),e.commitPushed===!1?" \\u23F3":""]}),a.length>1&&(0,W.jsxs)("span",{style:{fontSize:9,color:"var(--p-blue)",background:"color-mix(in srgb, var(--p-blue) 12%, transparent)",border:"1px solid color-mix(in srgb, var(--p-blue) 25%, transparent)",borderRadius:10,padding:"0 5px",fontWeight:600},children:["+",a.length-1]})]})]})}function jx(e){let a=e.indexOf(`\n---\n**Console logs**`);return a===-1?{userPart:e,consolePart:null}:{userPart:e.slice(0,a).trim(),consolePart:e.slice(a+1).trim()}}function Xx({logs:e}){let t=e.replace(/^---\\s*\\n/,"").split(`\n`).filter(a=>a.trim());return(0,W.jsxs)("div",{id:"dp-console-logs",style:{borderRadius:8,border:"1px solid color-mix(in srgb, var(--p-red) 30%, var(--p-border))",background:"color-mix(in srgb, var(--p-red) 4%, var(--p-card))",overflow:"hidden"},children:[(0,W.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 10px",borderBottom:"1px solid color-mix(in srgb, var(--p-red) 20%, var(--p-border))",background:"color-mix(in srgb, var(--p-red) 8%, var(--p-card))"},children:[(0,W.jsx)("span",{style:{fontSize:10,fontWeight:700,color:"color-mix(in srgb, var(--p-red) 80%, var(--p-text-sub))",letterSpacing:"0.05em",textTransform:"uppercase"},children:"Console Logs"}),(0,W.jsx)("span",{style:{fontSize:9,color:"var(--p-text-g)",marginLeft:"auto"},children:"captured at submission"})]}),(0,W.jsxs)("div",{style:{padding:"6px 10px",maxHeight:200,overflowY:"auto",display:"flex",flexDirection:"column",gap:3},children:[t.map((a,r)=>{let o=a.includes("\\u{1F534}"),n=a.includes("\\u{1F7E1}"),l=a.replace(/^[-*]\\s*/,"");return(0,W.jsx)("div",{style:{fontFamily:"Menlo, monospace",fontSize:10,lineHeight:1.5,color:o?"var(--p-red)":n?"var(--p-amber-300)":"var(--p-text-f)",wordBreak:"break-all"},children:l},r)}),t.length===0&&(0,W.jsx)("div",{style:{fontSize:10,color:"var(--p-text-g)",fontStyle:"italic"},children:"No log entries captured."})]})]})}var fo=D(H(),1);function Zi({commentInput:e,setCommentInput:t,commentSubmitting:a,onSubmit:r,baseRows:o=4}){return(0,fo.jsx)("div",{id:"dp-comment-input-area",children:(0,fo.jsx)(Cn,{value:e,onChange:t,showPreview:!1,setShowPreview:()=>{},previewId:"dp-comment-tab-edit",textareaId:"dp-comment-input",placeholder:"Add a comment\\u2026 (markdown)",previewEmptyText:"Leave a comment (markdown)\\u2026",previewMinHeight:o<=2?36:54,previewMaxHeight:140,baseRows:o,maxRows:10,autoFocus:!0,onKeyDown:n=>{n.key==="Enter"&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),r())},afterTextarea:(0,fo.jsx)("button",{id:"dp-comment-submit",disabled:a,onMouseDown:n=>{n.preventDefault(),r()},title:"Send (Ctrl+Enter)",style:{position:"absolute",bottom:16,right:8,width:26,height:26,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--p-blue)",border:"none",borderRadius:6,cursor:"pointer",color:"var(--p-white)",transition:"background .15s"},children:(0,fo.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block"},children:(0,fo.jsx)("path",{d:"M2 8L14 2L10 8L14 14L2 8Z",fill:"currentColor"})})})})})}var E=D(H(),1),Qx="vibeflow-paste-hint-dismissed";function Yx({storageKey:e=Qx}){let[t,a]=K.default.useState(()=>{try{return!localStorage.getItem(e)}catch{return!0}});if(!t)return null;function r(){try{localStorage.setItem(e,"1")}catch{}a(!1)}return(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",margin:"0 0 6px",borderRadius:6,background:"rgba(37,99,235,0.08)",border:"1px solid rgba(37,99,235,0.18)",fontSize:11,color:"var(--p-blue-300)",flexShrink:0},children:[(0,E.jsxs)("span",{style:{flex:1,lineHeight:1.4},children:["\\u{1F4A1} ",(0,E.jsx)("strong",{children:"Tip:"})," Paste screenshots or files anywhere in this panel \\u2014 they attach automatically."]}),(0,E.jsx)("button",{onClick:r,title:"Dismiss",style:{flexShrink:0,background:"none",border:"none",cursor:"pointer",padding:2,color:"var(--p-blue-300)",opacity:.7,display:"flex",alignItems:"center"},onMouseEnter:o=>{o.currentTarget.style.opacity="1"},onMouseLeave:o=>{o.currentTarget.style.opacity="0.7"},children:(0,E.jsx)(Oe,{style:{width:12,height:12}})})]})}var Zx=[{id:"backlog",label:"backlog"},{id:"todo",label:"todo"},{id:"in-progress",label:"in-progress"},{id:"review",label:"review"},{id:"done",label:"done"}],Jx=5*1024*1024;function Ji(e,t=.8){return new Promise((a,r)=>{let o=new Image,n=URL.createObjectURL(e);o.onload=()=>{let l=document.createElement("canvas");l.width=o.naturalWidth,l.height=o.naturalHeight;let s=l.getContext("2d");if(!s){URL.revokeObjectURL(n),r(new Error("canvas unavailable"));return}s.drawImage(o,0,0),URL.revokeObjectURL(n),l.toBlob(u=>{u?a(u):r(new Error("canvas.toBlob failed"))},"image/jpeg",t)},o.onerror=()=>{URL.revokeObjectURL(n),r(new Error("image load failed"))},o.src=n})}function ed({open:e,task:t,tab:a,addColumnId:r="todo",gitUserName:o="You",githubUrl:n,baseUrl:l,isResizing:s,api:u,onClose:d,onSave:g,onCreate:h,onDelete:m,onPatch:L,onFilePreview:y,onActivityChange:I,externalLocalChanges:O=[],showLockIndicator:c=!0,lockedByUser:i,onGoBack:f,navBackLabel:v,commentVersion:k,allTasks:w=[]}){let p=!t,S=t?vn(t.type):vn("Task"),A=K.default.useRef(null),[T,M]=K.default.useState([]),X=K.default.useRef(!1),le=K.default.useRef(""),J=K.default.useRef(""),Re=K.default.useMemo(()=>{let C=new Set;for(let N of w)for(let q of N.tags??[])C.add(q);return[...C].sort()},[w]),[_,U]=K.default.useState(a),[Q,ae]=K.default.useState(""),[V,me]=K.default.useState(""),[nt,wt]=K.default.useState(r),[Ge,Xt]=K.default.useState("Task"),[kt,ia]=K.default.useState(""),[Ut,vr]=K.default.useState(!1),[ms,Lr]=K.default.useState(!1),[Nt,Qt]=K.default.useState(!1),[gs,wn]=K.default.useState([]),[hs,kn]=K.default.useState(!1),[bn,Wa]=K.default.useState(null),[da,yr]=K.default.useState(""),[Sr,Pn]=K.default.useState(!1),[Ir,Tn]=K.default.useState([]),[Rn,Dn]=K.default.useState(!1),[xs,po]=K.default.useState(null),[An,Cr]=K.default.useState(0),Va=K.default.useRef(0),[x,b]=K.default.useState(0),[z,Y]=K.default.useState(null),[ge,re]=K.default.useState([]),oe=K.default.useRef(null),ie=K.default.useRef(()=>{}),He=K.default.useRef(""),Ze=K.default.useRef(!1);K.default.useEffect(()=>{He.current=da},[da]),K.default.useEffect(()=>{Ze.current=Nt},[Nt]),K.default.useEffect(()=>{X.current=s??!1},[s]),K.default.useEffect(()=>{e||I==null||I(null,"viewing")},[e]),K.default.useEffect(()=>{if(!e||!t)return;Q!==le.current||V!==J.current?I==null||I(t.id,"locked"):I==null||I(t.id,"viewing")},[Q,V,e,t==null?void 0:t.id]),K.default.useEffect(()=>{if(!e)return;function C(N){var q,Le,ce,bt;if(!X.current&&!((Le=(q=N.target)==null?void 0:q.closest)!=null&&Le.call(q,"[data-task-ref-suggest]"))&&!((bt=(ce=N.target)==null?void 0:ce.closest)!=null&&bt.call(ce,".modal-backdrop"))&&A.current&&!A.current.contains(N.target)){if(Ze.current)return;if(He.current.trim().length>0){ie.current(),Qt(!0);return}ie.current(),d()}}return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[e,d]),K.default.useEffect(()=>{if(!e)return;function C(N){if(N.key==="Escape"){if(Ze.current){Qt(!1),N.stopPropagation();return}if(He.current.trim().length>0){N.stopPropagation(),ie.current(),Qt(!0);return}}}return document.addEventListener("keydown",C,{capture:!0}),()=>document.removeEventListener("keydown",C,{capture:!0})},[e]),K.default.useEffect(()=>{if(e){if(U(a),vr(!!t),yr(""),wn([]),Tn([]),Cr(0),b(0),re([]),t){let C=(t.title??"").trim(),N=(t.description??"").trim();ae(C),me(N),wt(t.status),Xt(t.type??"Task"),ia(t.priority??""),le.current=C,J.current=N,I==null||I(t.id,"viewing")}else ae(""),me(""),wt(r),Xt("Task"),ia("");t&&(lt(t.id),Ht(t.id)),setTimeout(()=>{var C;return(C=oe.current)==null?void 0:C.focus()},50)}},[e,t==null?void 0:t.id,a]),K.default.useEffect(()=>{!e||!t||(_==="comments"?(R(t.id),Ht(t.id)):_==="files"&&Ht(t.id))},[_,e,t==null?void 0:t.id]),K.default.useEffect(()=>{if(!e||!t||Q!==le.current||V!==J.current)return;let N=(t.title??"").trim(),q=(t.description??"").trim();(N!==le.current||q!==J.current)&&(ae(N),me(q),le.current=N,J.current=q),t.status&&t.status!==nt&&wt(t.status),t.type&&t.type!==Ge&&Xt(t.type),t.priority!==void 0&&t.priority!==kt&&ia(t.priority??"")},[t==null?void 0:t.title,t==null?void 0:t.description,t==null?void 0:t.status,t==null?void 0:t.type,t==null?void 0:t.priority]),K.default.useEffect(()=>{!e||!t||k===void 0||(_==="comments"?R(t.id):lt(t.id))},[k]);async function lt(C){var N,q;try{let[Le,ce]=await Promise.all([u.getComments(C),u.getFiles(C)]);Cr(((N=Le.comments)==null?void 0:N.length)??0),b(((q=ce.files)==null?void 0:q.length)??0)}catch{}}async function R(C){var q;let N=++Va.current;kn(!0),Wa(null);try{let Le=await u.getComments(C);if(Va.current!==N)return;wn(Le.comments??[]),Cr(((q=Le.comments)==null?void 0:q.length)??0)}catch{if(Va.current!==N)return;Wa("failed")}finally{Va.current===N&&kn(!1)}}async function Ht(C){var N;Dn(!0),po(null);try{let q=await u.getFiles(C);Tn(q.files??[]),b(((N=q.files)==null?void 0:N.length)??0)}catch{po("failed")}finally{Dn(!1)}}async function $a(){var C;if(!Q.trim()){(C=oe.current)==null||C.focus();return}if(!p&&da.trim()&&await wr(),p){let N=await h({title:Q.trim(),description:V.trim()||Q.trim(),status:nt,type:Ge,priority:kt||void 0,selector:"/"});if(N&&T.length>0){for(let q of T)await u.uploadFile(N,q).catch(()=>null);M([])}d()}else pt()}function pt(){if(!t||p)return;let C=Q.trim();if(!C)return;let N=le.current,q=J.current,Le=C!==N,ce=V.trim()!==q;!Le&&!ce||(Le&&fa("title",N,C),ce&&fa("description",q,V.trim()),L(t.id,{title:C,description:V.trim(),type:Ge,priority:kt||void 0}),le.current=C,J.current=V.trim())}ie.current=pt;function fa(C,N,q){N!==q&&re(Le=>[...Le,{field:C,from:N,to:q,actor:o,timestamp:new Date().toISOString()}])}async function wr(){if(!(!t||!da.trim())){Pn(!0);try{await u.addComment(t.id,da.trim()),yr(""),await R(t.id)}finally{Pn(!1)}}}async function Mn(C,N){t&&(await u.updateComment(t.id,C.id,N),await R(t.id))}async function Tm(C){t&&(await u.deleteComment(t.id,C.id),await R(t.id))}async function Rm(C){if(!t)return;let N=t.id;Y(null);for(let q of Array.from(C.target.files??[])){if(!q.type.startsWith("image/")&&q.size>Jx){Y(`"${q.name}" exceeds the 5 MB limit and was skipped.`);continue}let Le;if(q.type.startsWith("image/")){let ce=await Ji(q),bt=q.name.replace(/\\.(png|bmp|gif|webp|tiff?)$/i,".jpg");Le=new File([ce],bt,{type:"image/jpeg"})}else Le=q;await u.uploadFile(N,Le)}C.target.value="",await Ht(N),lt(N)}async function Dm(C){if(!t)return;Y(null);let N=await Ji(C),Le=`paste-${new Date().toISOString().replace(/[:.]/g,"-").slice(0,19)}.jpg`,ce=new File([N],Le,{type:"image/jpeg"});await u.uploadFile(t.id,ce),await Ht(t.id),lt(t.id)}async function Am(C){if(!t)return;let N=Array.from(C.items),q=N.find(ce=>ce.type.startsWith("image/"));if(q){let ce=q.getAsFile();ce&&await Dm(ce);return}let Le=N.filter(ce=>ce.kind==="file"&&!ce.type.startsWith("image/"));if(Le.length>0){for(let ce of Le){let bt=ce.getAsFile();bt&&await u.uploadFile(t.id,bt)}await Ht(t.id),lt(t.id);return}}K.default.useEffect(()=>{if(!e)return;function C(N){if(!N.clipboardData)return;let q=N.target;if(!((q.tagName==="TEXTAREA"||q.tagName==="INPUT"||q.isContentEditable)&&!Array.from(N.clipboardData.items).some(kr=>kr.kind==="file"))){if(N.preventDefault(),!t){let bt=Array.from(N.clipboardData.items).find(kr=>kr.type.startsWith("image/"));if(bt){let kr=bt.getAsFile();kr&&(async()=>{let zm=await Ji(kr),Um=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),Nm=new File([zm],`paste-${Um}.jpg`,{type:"image/jpeg"});M(Hm=>[...Hm,Nm])})()}return}Am(N.clipboardData)}}return document.addEventListener("paste",C),()=>document.removeEventListener("paste",C)},[e,t==null?void 0:t.id]);async function od(C){t&&(await u.deleteFile(t.id,C.name),await Ht(t.id),lt(t.id))}async function Mm(C){if(!t)return;await u.deleteFile(t.id,C);let N=(t.files??[]).filter(q=>q.name!==C);L(t.id,{files:N}),await Ht(t.id),lt(t.id)}function Em(C){wt(C),!p&&t&&L(t.id,{status:C})}let Fm=C=>C!==nt?"dp-status-btn":`dp-status-btn active-${C}`;function nd(){if(!Ze.current){if(He.current.trim().length>0){ie.current(),Qt(!0);return}ie.current(),d()}}let Bm=e&&t!=null&&(Q!==le.current||V!==J.current),Om=K.default.useMemo(()=>{let C=[...O,...ge].sort((q,Le)=>new Date(q.timestamp).getTime()-new Date(Le.timestamp).getTime()),N=[];for(let q of C)N.some(ce=>ce.field===q.field&&ce.from.toLowerCase()===q.from.toLowerCase()&&ce.to.toLowerCase()===q.to.toLowerCase()&&ce.actor===q.actor&&Math.abs(new Date(ce.timestamp).getTime()-new Date(q.timestamp).getTime())<=3e3)||N.push(q);return N},[O,ge]),Ga=!p&&!!i;return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("aside",{id:"detail-panel",className:"open",ref:A,children:[Ga&&(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:"rgba(234,88,12,0.12)",border:"1px solid rgba(234,88,12,0.25)",borderRadius:6,margin:"8px 12px 0",fontSize:12,color:"#f97316",fontWeight:500},children:["\\u{1F512} Locked by ",(0,E.jsx)("strong",{children:i})," \\u2014 editing disabled until they finish."]}),(0,E.jsxs)("div",{className:"dp-header",children:[(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10},children:[f&&(0,E.jsx)("button",{id:"dp-back",onClick:f,title:v?`Back to: ${v}`:"Go back",style:{width:26,height:26,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,border:"1px solid var(--p-border-t)",background:"transparent",color:"var(--p-text-g)",cursor:"pointer",transition:"background .12s,color .12s",fontSize:14,lineHeight:1},onMouseOver:C=>{C.currentTarget.style.background="var(--p-border)",C.currentTarget.style.color="var(--p-blue-300)",C.currentTarget.style.borderColor="var(--p-blue)"},onMouseOut:C=>{C.currentTarget.style.background="transparent",C.currentTarget.style.color="var(--p-text-g)",C.currentTarget.style.borderColor="var(--p-border-t)"},children:"\\u2190"}),(0,E.jsx)(us,{id:"dp-type-picker",value:Ge,disabled:Ga,onChange:C=>{!p&&t&&C!==Ge&&fa("type",Ge,C),Xt(C),!p&&t&&L(t.id,{type:C})}}),(0,E.jsx)("input",{id:"dp-title",ref:oe,className:"dp-input",type:"text",placeholder:"Task title\\u2026",value:Q,readOnly:Ga,onChange:C=>ae(C.target.value),onKeyDown:C=>{C.key==="Escape"&&(C.stopPropagation(),nd()),C.key==="Enter"&&p&&$a()},style:{flex:1,fontSize:14,fontWeight:600,padding:"4px 8px",borderColor:"transparent",background:"transparent"},onFocus:C=>{C.currentTarget.style.borderColor="var(--p-blue)",C.currentTarget.style.background="var(--p-input)"},onBlur:C=>{C.currentTarget.style.borderColor="transparent",C.currentTarget.style.background="transparent",p||pt()}}),!p&&Q!==le.current&&Q.trim()!==""&&(0,E.jsx)("button",{type:"button",title:"Discard title changes",onMouseDown:C=>{C.preventDefault(),ae(le.current)},style:{width:20,height:20,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,border:"1px solid var(--p-border-t)",background:"none",color:"var(--p-text-g)",cursor:"pointer",fontSize:13,lineHeight:1},onMouseEnter:C=>{C.currentTarget.style.color="var(--p-amber-300)",C.currentTarget.style.borderColor="var(--p-amber-300)"},onMouseLeave:C=>{C.currentTarget.style.color="var(--p-text-g)",C.currentTarget.style.borderColor="var(--p-border-t)"},children:"\\u21A9"}),(0,E.jsx)("button",{id:"dp-close",onClick:nd,style:{width:26,height:26,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,border:"none",background:"transparent",color:"var(--p-text-g)",cursor:"pointer",transition:"background .12s,color .12s",pointerEvents:"auto"},onMouseOver:C=>{C.currentTarget.style.background="var(--p-border)",C.currentTarget.style.color="var(--p-text-m)"},onMouseOut:C=>{C.currentTarget.style.background="transparent",C.currentTarget.style.color="var(--p-text-g)"},children:(0,E.jsx)(Oe,{style:{width:14,height:14}})}),c&&Bm&&t&&(0,E.jsx)("span",{id:"dp-lock-indicator",title:`Locked by ${o} \\u2014 unsaved changes`,style:{display:"inline-flex",alignItems:"center",gap:3,flexShrink:0,borderRadius:999,padding:"2px 7px",fontSize:10,fontWeight:600,border:"1px solid rgba(244,114,182,0.35)",color:"#f9a8d4",background:"rgba(157,23,77,0.28)"},children:"\\u{1F512} Locked"})]}),(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",...Ga?{pointerEvents:"none",opacity:.6}:{}},children:[(0,E.jsx)("span",{style:{fontSize:10,color:"var(--p-text-g)",fontWeight:500,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Status"}),Zx.map(C=>(0,E.jsx)("button",{className:Fm(C.id),"data-status":C.id,onClick:()=>Em(C.id),children:C.label},C.id))]})]}),!p&&(0,E.jsxs)("div",{className:"dp-tabs",id:"dp-tabs-row",children:[(0,E.jsx)("button",{className:`dp-tab${_==="details"?" active":""}`,id:"dp-tab-details",onClick:()=>U("details"),children:"Details"}),(0,E.jsxs)("button",{className:`dp-tab${_==="comments"?" active":""}`,id:"dp-tab-activity",onClick:()=>U("comments"),children:["Activity ",An>0&&(0,E.jsxs)("span",{id:"dp-activity-count",style:{color:"var(--p-text-g)",fontSize:10},children:["(",An,")"]})]}),(0,E.jsxs)("button",{className:`dp-tab${_==="files"?" active":""}`,id:"dp-tab-files",onClick:()=>U("files"),children:["Files ",x>0&&(0,E.jsxs)("span",{id:"dp-file-count",style:{color:"var(--p-text-g)",fontSize:10},children:["(",x,")"]})]})]}),(0,E.jsxs)("div",{className:"dp-body",children:[!p&&(0,E.jsx)(Yx,{}),(0,E.jsxs)("div",{className:"dp-pane",id:"dp-details-pane",style:{display:!t||_==="details"?"":"none"},children:[(0,E.jsx)("div",{style:Ga?{pointerEvents:"none",opacity:.6}:void 0,children:(0,E.jsx)(Yi,{task:t,description:V,setDescription:me,showDescPreview:Ut,setShowDescPreview:vr,priority:kt,setPriority:ia,onDescriptionBlur:p?void 0:pt,onDescriptionDiscard:p?void 0:()=>{me(J.current),vr(!0)},originalDescription:p?void 0:J.current,onPriorityChange:p?void 0:C=>{t&&(C!==kt&&fa("priority",kt||"\\u2014",C||"\\u2014"),L(t.id,{priority:C||void 0}))},githubUrl:n,onFilePreview:y,onDeleteScreenshot:Mm,onPatch:L,liveFiles:Ir.length>0||Rn?Ir:void 0,allTags:Re})}),!p&&t&&(0,E.jsx)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",flexShrink:0,marginTop:12,borderTop:"1px solid var(--p-border)",paddingTop:10},children:(0,E.jsx)(ev,{task:t})})]}),(0,E.jsxs)("div",{className:"dp-pane",id:"dp-activity-pane",style:{display:_==="comments"&&!p?"":"none"},children:[(0,E.jsx)("div",{style:{borderBottom:"1px solid var(--p-border)",paddingBottom:8,flexShrink:0},children:(0,E.jsx)(Zi,{commentInput:da,setCommentInput:yr,commentSubmitting:Sr,onSubmit:()=>void wr(),baseRows:2})}),(0,E.jsx)(Gi,{comments:gs,files:Ir,localChanges:Om,loading:hs,error:bn,gitUserName:o,taskAuthorName:t==null?void 0:t.authorName,baseUrl:l,taskId:t==null?void 0:t.id,taskCreatedAt:t==null?void 0:t.createdAt,taskUpdatedAt:t==null?void 0:t.updatedAt,onEdit:Mn,onDelete:Tm,onDeleteFile:od,onFilePreview:y})]}),(0,E.jsxs)("div",{className:"dp-pane",id:"dp-files-pane",style:{display:_==="files"&&!p?"":"none"},children:[(0,E.jsx)(Ki,{files:Ir,loading:Rn,error:xs,baseUrl:l,onPreview:C=>y(C.name,C.linkedPath?`${l}/api/tasks/${t==null?void 0:t.id}/files/${encodeURIComponent(C.name)}`:`${l}${C.url}`),onDelete:Ga?void 0:od}),(0,E.jsxs)("div",{style:{borderTop:"1px solid var(--p-border)",paddingTop:8,flexShrink:0,display:"flex",gap:8,flexWrap:"wrap",alignItems:"center",...Ga?{pointerEvents:"none",opacity:.5}:{}},children:[z&&(0,E.jsx)("div",{style:{width:"100%",fontSize:11,color:"var(--p-red)",background:"rgba(255,80,80,0.08)",border:"1px solid rgba(255,80,80,0.2)",borderRadius:5,padding:"4px 8px"},children:z}),(0,E.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"6px 10px",background:"var(--p-card)",border:"1px solid var(--p-border)",borderRadius:8,color:"var(--p-text-m)",fontSize:12,transition:"all .15s"},onMouseOver:C=>{C.currentTarget.style.borderColor="var(--p-border-t)",C.currentTarget.style.color="var(--p-text)"},onMouseOut:C=>{C.currentTarget.style.borderColor="var(--p-border)",C.currentTarget.style.color="var(--p-text-m)"},children:[(0,E.jsx)(no,{style:{width:12,height:12}}),"Upload",(0,E.jsx)("input",{id:"dp-file-upload",type:"file",style:{display:"none"},multiple:!0,onChange:Rm})]}),(0,E.jsx)("span",{style:{fontSize:11,color:"var(--p-border-t)",marginLeft:"auto"},children:"or paste image"})]})]})]}),(0,E.jsxs)("div",{className:"dp-footer",children:[!p&&(0,E.jsx)("button",{id:"dp-delete",onClick:()=>Lr(!0),style:{color:"var(--p-red)",background:"none",border:"1px solid var(--p-border-t)",borderRadius:7,padding:"5px 12px",fontSize:12,cursor:"pointer",fontFamily:"inherit",transition:"all .15s"},onMouseOver:C=>{C.currentTarget.style.borderColor="var(--p-red)"},onMouseOut:C=>{C.currentTarget.style.borderColor="var(--p-border-t)"},children:"Delete"}),(0,E.jsx)("div",{style:{flex:1}}),p?(0,E.jsxs)(E.Fragment,{children:[T.length>0&&(0,E.jsxs)("span",{style:{fontSize:11,color:"var(--p-blue-300)",marginRight:8,background:"rgba(37,99,235,0.1)",border:"1px solid rgba(37,99,235,0.25)",borderRadius:6,padding:"3px 8px"},children:["\\u{1F4CE} ",T.length," screenshot",T.length!==1?"s":""," will attach on save"]}),(0,E.jsx)("button",{id:"dp-cancel",onClick:d,style:{padding:"5px 14px",borderRadius:7,fontSize:12,fontWeight:500,cursor:"pointer",border:"1px solid var(--p-border-t)",background:"var(--p-border)",color:"var(--p-text-sub)",fontFamily:"inherit",transition:"all .15s"},onMouseOver:C=>{C.currentTarget.style.borderColor="var(--p-text-g)"},onMouseOut:C=>{C.currentTarget.style.borderColor="var(--p-border-t)"},children:"Cancel"}),(0,E.jsx)("button",{id:"dp-save",onClick:()=>void $a(),style:{padding:"5px 18px",borderRadius:7,fontSize:12,fontWeight:500,cursor:"pointer",border:"1px solid var(--p-blue-700)",background:"var(--p-blue)",color:"var(--p-white)",fontFamily:"inherit",transition:"background .15s"},onMouseOver:C=>{C.currentTarget.style.background="var(--p-blue-700)"},onMouseOut:C=>{C.currentTarget.style.background="var(--p-blue)"},children:"Add Task"})]}):(0,E.jsx)("span",{style:{fontSize:11,color:"var(--p-text-g)",padding:"5px 4px"},children:"Changes are saved automatically"})]}),(0,E.jsx)(jt,{open:ms,title:"Delete task?",message:`You are about to permanently delete "${(t==null?void 0:t.title)||"this task"}". This action cannot be undone.`,confirmLabel:"Delete task",onConfirm:()=>{Lr(!1),m(t.id),d()},onCancel:()=>Lr(!1)})]}),Nt&&(0,E.jsx)("div",{style:{position:"fixed",inset:0,zIndex:201,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",background:"rgba(2,12,27,0.80)"},children:(0,E.jsxs)("div",{style:{background:"var(--p-surface)",border:"1px solid var(--p-border-s)",borderRadius:16,padding:"28px 32px",width:"100%",maxWidth:480,boxShadow:"var(--p-shadow-lg)",position:"relative"},children:[(0,E.jsx)("div",{style:{width:44,height:44,borderRadius:12,background:"rgba(139,92,246,0.12)",border:"1px solid rgba(139,92,246,0.25)",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:16},children:(0,E.jsx)(no,{style:{width:20,height:20,color:"var(--p-purple)"}})}),(0,E.jsx)("h2",{style:{margin:"0 0 8px",fontSize:17,fontWeight:700,color:"var(--p-text)"},children:"Send comment?"}),(0,E.jsx)("p",{style:{margin:"0 0 22px",fontSize:13,color:"var(--p-text-f)",lineHeight:1.6},children:"You have an unsent comment. Do you want to send it before closing?"}),(0,E.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,E.jsx)("button",{onClick:()=>{Qt(!1),wr().then(()=>d())},style:{flex:1,padding:"9px 14px",borderRadius:8,background:"var(--p-purple)",border:"none",color:"#fff",fontSize:13,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap"},children:"Send & Close"}),(0,E.jsx)("button",{type:"button",onClick:()=>{Qt(!1),yr(""),d()},style:{padding:"9px 16px",borderRadius:8,background:"var(--p-hover)",border:"1px solid var(--p-border)",color:"var(--p-text-m)",fontSize:13,cursor:"pointer"},children:"Discard & Close"}),(0,E.jsx)("button",{type:"button",onClick:()=>Qt(!1),style:{padding:"9px 16px",borderRadius:8,background:"var(--p-hover)",border:"1px solid var(--p-border)",color:"var(--p-text-m)",fontSize:13,cursor:"pointer"},children:"Keep editing"})]})]})})]})}function ev({task:e}){let t=[];if(e.component&&t.push((0,E.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",background:"color-mix(in srgb, var(--p-purple) 14%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 36%, transparent)",borderRadius:100,fontSize:10,color:"var(--p-purple-300)",fontFamily:"monospace"},children:["\\u2B21 ",e.component]},"component")),e.file||e.selector&&e.selector!=="/"||e.cssSelector){let r=e.file??"";e.line!=null&&(r+=`:${e.line}`),e.col!=null&&(r+=`:${e.col}`);let o=e.cssSelector??(e.selector&&e.selector!=="/"?e.selector:""),n=r||o;if(n){let l=n.length>40?`\\u2026${n.slice(-40)}`:n,s=e.url?e.url.length>30?`\\u2026${e.url.slice(-30)}`:e.url:"";t.push((0,E.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:0,borderRadius:6,overflow:"hidden",border:"1px solid color-mix(in srgb, var(--p-blue) 15%, transparent)",fontSize:10,fontFamily:"monospace",whiteSpace:"nowrap"},children:[(0,E.jsx)("span",{title:[r,o].filter(Boolean).join(" \\xB7 "),style:{padding:"2px 6px",background:"color-mix(in srgb, var(--p-blue) 10%, transparent)",color:"var(--p-blue-300)"},children:l}),s&&(0,E.jsx)("span",{title:e.url,style:{padding:"2px 6px",background:"color-mix(in srgb, var(--p-border) 72%, transparent)",color:"var(--p-text-g)",borderLeft:"1px solid color-mix(in srgb, var(--p-blue) 18%, transparent)"},children:s})]},"source"))}}else if(e.url){let r=e.url.length>40?`\\u2026${e.url.slice(-40)}`:e.url;t.push((0,E.jsx)("span",{className:"dp-source-pill",title:e.url,children:r},"url"))}return e.reportBack&&t.push((0,E.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",background:"color-mix(in srgb, var(--p-purple) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 24%, transparent)",borderRadius:100,fontSize:10,color:"var(--p-purple-300)"},children:"\\u21A9 report back"},"rb")),(0,E.jsx)("div",{id:"dp-meta-row",style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",flex:1},children:t})}var xr=D(Ie(),1);var j=D(H(),1),tv=[{id:"all",label:"All",dot:""},{id:"todo",label:"Todo",dot:"var(--p-amber)"},{id:"in-progress",label:"In Progress",dot:"var(--p-blue)"},{id:"review",label:"Review",dot:"var(--p-purple)"}],av={todo:{background:"color-mix(in srgb, var(--p-amber) 16%, transparent)",border:"1px solid color-mix(in srgb, var(--p-amber) 38%, transparent)",color:"var(--p-amber-300)"},"in-progress":{background:"color-mix(in srgb, var(--p-blue) 16%, transparent)",border:"1px solid color-mix(in srgb, var(--p-blue) 38%, transparent)",color:"var(--p-blue-200)"},review:{background:"color-mix(in srgb, var(--p-purple) 16%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 38%, transparent)",color:"var(--p-purple-300)"},done:{background:"color-mix(in srgb, var(--p-green) 14%, transparent)",border:"1px solid color-mix(in srgb, var(--p-green) 32%, transparent)",color:"var(--p-green-300)"},backlog:{background:"color-mix(in srgb, var(--p-text-g) 16%, transparent)",border:"1px solid color-mix(in srgb, var(--p-text-g) 32%, transparent)",color:"var(--p-text-m)"},all:{background:"color-mix(in srgb, var(--p-blue) 12%, transparent)",border:"1px solid color-mix(in srgb, var(--p-blue) 32%, transparent)",color:"var(--p-blue-200)"}};function td({tasks:e,filter:t,onFilter:a,view:r="board",onViewChange:o,activityCounter:n}){let[l,s]=xr.default.useState(!1),[u,d]=xr.default.useState(!1),[g,h]=xr.default.useState(!1),m=xr.default.useMemo(()=>[...new Set(e.map(p=>p.type).filter(Boolean))].sort(),[e]),L=xr.default.useMemo(()=>[...new Set(e.map(p=>p.author).filter(Boolean))].sort(),[e]),y=xr.default.useMemo(()=>{let p=new Set;for(let S of e)for(let A of S.tags??[])p.add(A);return[...p].sort()},[e]);function I(p){return e.filter(S=>S.status===p).length}function O(p){a({...t,status:p}),s(!1),d(!1),h(!1)}function c(p){a({...t,type:p}),s(!1)}function i(p){a({...t,user:p}),d(!1)}function f(p){let S=t.tags??[],A=S.includes(p)?S.filter(T=>T!==p):[...S,p];a({...t,tags:A})}function v(p){p.stopPropagation();let S=p.currentTarget.dataset.status;S&&O(S)}let k={display:"flex",alignItems:"center",gap:5,padding:"3px 10px",borderRadius:6,fontSize:11,cursor:"pointer",border:"1px solid transparent",background:"transparent",color:"var(--p-text-f)",transition:"all .12s",fontFamily:"inherit",fontWeight:500},w={...k,background:"var(--p-card)",border:"1px solid var(--p-border)",color:"var(--p-text-f)",padding:"3px 10px",position:"relative"};return(0,j.jsxs)("div",{"data-proto-id":"filter-bar",style:{display:"flex",alignItems:"center",gap:6,padding:"7px 16px",background:"var(--p-surface)",borderBottom:"1px solid var(--p-border)",flexShrink:0},onClick:()=>{s(!1),d(!1),h(!1)},children:[(0,j.jsx)("div",{style:{display:"flex",alignItems:"center",gap:2},children:tv.map(p=>{let S=t.status===p.id,A=p.id!=="all"?I(p.id):null,T=S?av[p.id]:{};return(0,j.jsxs)("button",{"data-status":p.id,style:{...k,...T},onMouseOver:M=>{S||(M.currentTarget.style.background="var(--p-hover)",M.currentTarget.style.color="var(--p-text-m)")},onMouseOut:M=>{S||(M.currentTarget.style.background="transparent",M.currentTarget.style.color="var(--p-text-f)")},onClick:v,children:[p.dot&&(0,j.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:p.dot,flexShrink:0,display:"inline-block"}}),p.label,A!=null&&(0,j.jsx)("span",{style:{color:S?"inherit":"var(--p-border-t)",fontSize:10,opacity:.8},children:A})]},p.id)})}),(0,j.jsx)("div",{style:{flex:1}}),n,t.user&&(0,j.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:100,background:"color-mix(in srgb, var(--p-purple) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--p-purple) 24%, transparent)",fontSize:10,color:"var(--p-purple-300)"},children:[t.user,(0,j.jsx)("button",{onClick:()=>i(null),style:{display:"flex",background:"none",border:"none",color:"var(--p-purple-300)",cursor:"pointer",padding:0,lineHeight:1},children:(0,j.jsx)(Oe,{style:{width:10,height:10}})})]}),t.type&&(0,j.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:100,background:"color-mix(in srgb, var(--p-blue) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--p-blue) 24%, transparent)",fontSize:10,color:"var(--p-cyan-300)"},children:[t.type,(0,j.jsx)("button",{onClick:()=>c(null),style:{display:"flex",background:"none",border:"none",color:"var(--p-cyan-300)",cursor:"pointer",padding:0,lineHeight:1},children:(0,j.jsx)(Oe,{style:{width:10,height:10}})})]}),(t.tags??[]).map(p=>{let{bg:S,text:A,border:T}=Bt(p);return(0,j.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:100,background:S,border:`1px solid ${T}`,fontSize:10,color:A,fontWeight:600},children:[p,(0,j.jsx)("button",{onClick:()=>f(p),style:{display:"flex",background:"none",border:"none",color:A,cursor:"pointer",padding:0,lineHeight:1},children:(0,j.jsx)(Oe,{style:{width:10,height:10}})})]},p)}),(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsxs)("button",{style:{...w,color:(t.tags??[]).length?"var(--p-green-300)":"var(--p-text-f)",borderColor:(t.tags??[]).length?"color-mix(in srgb, var(--p-green) 36%, transparent)":"var(--p-border)",opacity:y.length?1:.55},onClick:p=>{p.stopPropagation(),y.length&&(d(!1),s(!1),h(S=>!S))},children:[(0,j.jsx)(oo,{style:{width:12,height:12}}),"Tags",(t.tags??[]).length>0&&(0,j.jsx)("span",{style:{fontSize:9,background:"color-mix(in srgb, var(--p-green) 20%, transparent)",color:"var(--p-green-300)",borderRadius:100,padding:"0 4px"},children:(t.tags??[]).length}),(0,j.jsx)(ur,{style:{width:12,height:12}})]}),g&&y.length>0&&(0,j.jsxs)("div",{style:{position:"absolute",top:"calc(100% + 4px)",right:0,minWidth:160,background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:8,boxShadow:"0 8px 24px rgba(0,0,0,0.25)",zIndex:50,overflow:"hidden"},onClick:p=>p.stopPropagation(),children:[(t.tags??[]).length>0&&(0,j.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:"var(--p-text-f)",background:"none",border:"none",cursor:"pointer",borderBottom:"1px solid var(--p-border)"},onClick:()=>a({...t,tags:[]}),children:"Clear tag filters"}),y.map(p=>{let{bg:S,text:A,border:T}=Bt(p),M=(t.tags??[]).includes(p);return(0,j.jsxs)("button",{style:{width:"100%",textAlign:"left",padding:"6px 12px",fontSize:11,color:"var(--p-text-m)",background:M?"var(--p-hover)":"none",border:"none",cursor:"pointer",display:"flex",alignItems:"center",gap:6},onMouseEnter:X=>{X.currentTarget.style.background="var(--p-hover)"},onMouseLeave:X=>{X.currentTarget.style.background=M?"var(--p-hover)":"none"},onClick:()=>f(p),children:[(0,j.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:A,border:`1px solid ${T}`,flexShrink:0}}),(0,j.jsx)("span",{style:{flex:1},children:p}),M&&(0,j.jsx)("span",{style:{color:A,fontSize:12,lineHeight:1},children:"\\u2713"})]},p)})]})]}),(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsxs)("button",{style:{...w,color:t.user?"var(--p-purple-300)":"var(--p-text-f)",borderColor:t.user?"color-mix(in srgb, var(--p-purple) 36%, transparent)":"var(--p-border)",opacity:L.length?1:.55},onClick:p=>{p.stopPropagation(),L.length&&(s(!1),d(S=>!S))},children:[(0,j.jsx)(hn,{style:{width:12,height:12}}),"User",(0,j.jsx)(ur,{style:{width:12,height:12}})]}),u&&L.length>0&&(0,j.jsxs)("div",{style:{position:"absolute",top:"calc(100% + 4px)",right:0,minWidth:160,background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:8,boxShadow:"0 8px 24px rgba(0,0,0,0.25)",zIndex:50,overflow:"hidden"},onClick:p=>p.stopPropagation(),children:[(0,j.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:"var(--p-text-f)",background:"none",border:"none",cursor:"pointer",borderBottom:"1px solid var(--p-border)"},onClick:()=>i(null),children:"All users"}),L.map(p=>(0,j.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:t.user===p?"var(--p-purple-300)":"var(--p-text-m)",background:t.user===p?"color-mix(in srgb, var(--p-purple) 12%, transparent)":"none",border:"none",cursor:"pointer"},onMouseOver:S=>{t.user!==p&&(S.currentTarget.style.background="var(--p-hover)")},onMouseOut:S=>{t.user!==p&&(S.currentTarget.style.background="none")},onClick:()=>i(p),children:p},p))]})]}),(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsxs)("button",{style:{...w,color:t.type?"var(--p-cyan-300)":"var(--p-text-f)",borderColor:t.type?"color-mix(in srgb, var(--p-blue) 36%, transparent)":"var(--p-border)",opacity:m.length?1:.55},onClick:p=>{p.stopPropagation(),m.length&&s(S=>!S)},children:[(0,j.jsx)(oo,{style:{width:12,height:12}}),"Type",(0,j.jsx)(ur,{style:{width:12,height:12}})]}),l&&m.length>0&&(0,j.jsxs)("div",{style:{position:"absolute",top:"calc(100% + 4px)",right:0,minWidth:140,background:"var(--p-card)",border:"1px solid var(--p-border-s)",borderRadius:8,boxShadow:"0 8px 24px rgba(0,0,0,0.25)",zIndex:50,overflow:"hidden"},onClick:p=>p.stopPropagation(),children:[(0,j.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:"var(--p-text-f)",background:"none",border:"none",cursor:"pointer",borderBottom:"1px solid var(--p-border)"},onClick:()=>c(null),children:"All types"}),m.map(p=>(0,j.jsx)("button",{style:{width:"100%",textAlign:"left",padding:"7px 12px",fontSize:11,color:t.type===p?"var(--p-cyan-300)":"var(--p-text-m)",background:t.type===p?"color-mix(in srgb, var(--p-blue) 12%, transparent)":"none",border:"none",cursor:"pointer"},onMouseOver:S=>{t.type!==p&&(S.currentTarget.style.background="var(--p-hover)")},onMouseOut:S=>{t.type!==p&&(S.currentTarget.style.background="none")},onClick:()=>c(p),children:p},p))]})]}),(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",background:"var(--p-card)",border:"1px solid var(--p-border)",borderRadius:8,padding:2,gap:0},children:[(0,j.jsx)("button",{title:"Board view",style:{padding:"4px 7px",borderRadius:5,background:r==="board"?"var(--p-surface)":"none",color:r==="board"?"var(--p-text-sub)":"var(--p-text-g)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",transition:"background .12s,color .12s"},onClick:p=>{p.stopPropagation(),o==null||o("board")},children:(0,j.jsx)(fn,{style:{width:13,height:13}})}),(0,j.jsx)("button",{title:"List view",style:{padding:"4px 7px",borderRadius:5,background:r==="list"?"var(--p-surface)":"none",color:r==="list"?"var(--p-text-sub)":"var(--p-text-g)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",transition:"background .12s,color .12s"},onClick:p=>{p.stopPropagation(),o==null||o("list")},children:(0,j.jsx)(cn,{style:{width:13,height:13}})})]})]})}var qa=D(Ie(),1);var fe=D(H(),1),rv=[{id:"board",label:"Board",icon:(0,fe.jsx)(Fa,{className:"w-3.5 h-3.5"})},{id:"workflow",label:"Workflow",icon:(0,fe.jsx)(xn,{className:"w-3.5 h-3.5"})}];function ad({open:e,visibleCols:t,settings:a,onClose:r,onSave:o}){let[n,l]=qa.default.useState("board"),[s,u]=qa.default.useState({}),[d,g]=qa.default.useState(a.autoCommit??!1),[h,m]=qa.default.useState(a.autoComment??!1),[L,y]=qa.default.useState(a.autoPush??!1),[I,O]=qa.default.useState(a.createBranch??!1);qa.default.useEffect(()=>{if(!e)return;let f={};za.forEach(v=>{f[v.id]=t.includes(v.id)}),u(f),g(a.autoCommit??!1),m(a.autoComment??!1),y(a.autoPush??!1),O(a.createBranch??!1),l("board")},[e,t,a]);function c(){let f=za.filter(v=>s[v.id]).map(v=>v.id);o(f,{autoCommit:d,autoComment:h,autoPush:L,createBranch:I}),r()}function i(f){u(v=>({...v,[f]:!v[f]}))}return(0,fe.jsxs)(gr,{open:e,onClose:r,id:"settings-modal",width:"min(460px, 95vw)",icon:(0,fe.jsx)(cr,{style:{width:14,height:14,color:"var(--p-text-g)"}}),title:"Settings",headerActions:(0,fe.jsx)("button",{id:"settings-close",onClick:r,style:{width:26,height:26,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,border:"none",background:"transparent",color:"var(--p-text-g)",cursor:"pointer",transition:"background .12s,color .12s"},onMouseOver:f=>{f.currentTarget.style.background="var(--p-surface)",f.currentTarget.style.color="var(--p-text-m)"},onMouseOut:f=>{f.currentTarget.style.background="transparent",f.currentTarget.style.color="var(--p-text-g)"},children:(0,fe.jsx)(Oe,{style:{width:14,height:14}})}),footer:(0,fe.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,fe.jsx)("button",{id:"settings-cancel",onClick:r,className:"dp-status-btn",style:{padding:"5px 14px",fontSize:12},children:"Cancel"}),(0,fe.jsx)("button",{id:"settings-apply",onClick:c,style:{padding:"5px 14px",fontSize:12,fontWeight:500,borderRadius:6,border:"1px solid color-mix(in srgb, var(--p-purple) 55%, transparent)",background:"color-mix(in srgb, var(--p-purple) 18%, transparent)",color:"var(--p-purple-300)",cursor:"pointer",transition:"background .12s"},onMouseOver:f=>{f.currentTarget.style.background="color-mix(in srgb, var(--p-purple) 28%, transparent)"},onMouseOut:f=>{f.currentTarget.style.background="color-mix(in srgb, var(--p-purple) 18%, transparent)"},children:"Apply"})]}),children:[(0,fe.jsx)("div",{className:"dp-tabs",children:rv.map(f=>(0,fe.jsxs)("button",{onClick:()=>l(f.id),className:`dp-tab${n===f.id?" active":""}`,style:{display:"flex",alignItems:"center",gap:6},children:[f.icon,f.label]},f.id))}),n==="board"&&(0,fe.jsxs)("div",{style:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:10},children:[(0,fe.jsx)("div",{className:"dp-meta-label",children:"Visible Columns"}),za.map(f=>(0,fe.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer",userSelect:"none"},children:[(0,fe.jsx)("input",{id:`settings-col-${f.id}`,type:"checkbox",checked:s[f.id]??!0,onChange:()=>i(f.id),style:{width:14,height:14,accentColor:f.color,cursor:"pointer"}}),(0,fe.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:f.color,flexShrink:0}}),(0,fe.jsx)("span",{style:{fontSize:13,color:"var(--p-text-m)"},children:f.label})]},f.id))]}),n==="workflow"&&(0,fe.jsxs)("div",{style:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:16},children:[(0,fe.jsx)(ds,{id:"settings-auto-commit",label:"Commit after task implementation",description:"Agent is instructed to stage and commit changes after each task.",value:d,onChange:g}),(0,fe.jsx)(ds,{id:"settings-auto-push",label:"Push after task commit",description:`Agent is instructed to push after every commit. Requires \'Commit\' to be ON.${d?"":" (Enable Commit first)"}`,value:L&&d,onChange:f=>y(f&&d)}),(0,fe.jsx)(ds,{id:"settings-auto-comment",label:"Comment after task implementation",description:"Agent is instructed to add a summary comment after completing a task.",value:h,onChange:m}),(0,fe.jsx)(ds,{id:"settings-create-branch",label:"Create branch at end of session",description:"Agent creates a descriptive branch after all session tasks are done (e.g. fix/bug-errors, feat/eye-toggle). Name reflects the work: lowercase, kebab-case, 2\\u20135 words, prefix fix/feat/chore/docs.",value:I,onChange:O})]})]})}function ds({id:e,label:t,description:a,value:r,onChange:o}){return(0,fe.jsxs)("div",{children:[(0,fe.jsx)("div",{className:"dp-meta-label",style:{marginBottom:4},children:t}),(0,fe.jsx)("div",{style:{fontSize:11,color:"var(--p-text-g)",marginBottom:10},children:a}),(0,fe.jsxs)("div",{id:e,style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer"},onClick:()=>o(!r),children:[(0,fe.jsxs)("div",{style:{position:"relative",width:36,height:20,flexShrink:0},children:[(0,fe.jsx)("div",{style:{width:36,height:20,borderRadius:10,background:r?"var(--p-purple)":"var(--p-card)",border:`1px solid ${r?"var(--p-purple-300)":"var(--p-border)"}`,transition:"all .15s"}}),(0,fe.jsx)("div",{style:{position:"absolute",top:3,left:r?18:3,width:14,height:14,borderRadius:"50%",background:r?"var(--p-purple-300)":"var(--p-text-muted)",transition:"all .15s"}})]}),(0,fe.jsx)("span",{style:{fontSize:12,color:"var(--p-text-g)"},children:r?"On":"Off"})]})]})}var cs=D(Ie(),1);var he=D(H(),1);function vm(e){return/\\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function fs(e){return/\\.md$/i.test(e)}function rd({open:e,name:t,url:a,onClose:r}){let[o,n]=cs.default.useState(null),[l,s]=cs.default.useState(!1);return cs.default.useEffect(()=>{!e||!a||(fs(t)?(s(!0),n(null),fetch(a).then(u=>u.text()).then(u=>{n(u),s(!1)}).catch(()=>{n("Error loading file."),s(!1)})):n(null))},[e,t,a]),(0,he.jsx)(gr,{open:e,onClose:r,id:"file-preview-modal",width:"min(700px, 95vw)",maxHeight:"88vh",boxStyle:{display:"flex",flexDirection:"column"},icon:(0,he.jsx)(ro,{className:"w-4 h-4 text-slate-400"}),title:t,headerActions:(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)("a",{href:a,download:t,className:"text-slate-400 hover:text-slate-200 transition-colors p-1.5 rounded-md hover:bg-slate-700/60",title:"Download",children:(0,he.jsx)(ir,{className:"w-4 h-4"})}),(0,he.jsx)("button",{id:"file-preview-close",onClick:r,className:"text-slate-400 hover:text-slate-200 transition-colors p-1.5 rounded-md hover:bg-slate-700/60",title:"Close",children:(0,he.jsx)(Oe,{className:"w-4 h-4"})})]}),footer:(0,he.jsxs)(he.Fragment,{children:[(0,he.jsxs)("a",{href:a,download:t,className:"flex items-center gap-1.5 border border-slate-700 hover:bg-slate-800 text-slate-300 text-sm px-3 py-1.5 rounded-lg transition-colors",children:[(0,he.jsx)(ir,{className:"w-3.5 h-3.5"}),"Download"]}),(0,he.jsx)("button",{id:"file-preview-close-footer",onClick:r,className:"border border-slate-700 hover:bg-slate-800 text-slate-300 text-sm px-4 py-1.5 rounded-lg transition-colors",children:"Close"})]}),children:(0,he.jsxs)("div",{className:"flex-1 overflow-auto",style:{minHeight:0,padding:"16px 20px"},children:[vm(t)&&(0,he.jsx)("div",{style:{borderRadius:8,overflow:"hidden",border:"1px solid var(--p-border)",background:"var(--p-card)",display:"inline-block",width:"100%"},children:(0,he.jsx)("img",{src:a,alt:t,style:{maxWidth:"100%",display:"block",margin:"0 auto",objectFit:"contain"}})}),fs(t)&&l&&(0,he.jsx)("p",{className:"text-xs text-slate-500 py-4",children:"Loading\\u2026"}),fs(t)&&!l&&o!==null&&(0,he.jsx)("div",{id:"file-preview-md",style:{background:"var(--p-input)",border:"1px solid var(--p-border-s)",borderRadius:8,padding:"10px 14px",fontSize:13,color:"var(--p-text-sub)",lineHeight:1.65},children:(0,he.jsx)(Ha,{markdown:o})}),!vm(t)&&!fs(t)&&(0,he.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-slate-500",children:[(0,he.jsx)(ro,{className:"w-10 h-10 opacity-40"}),(0,he.jsx)("p",{className:"text-sm",children:"Preview not available for this file type."}),(0,he.jsxs)("a",{href:a,download:t,className:"flex items-center gap-1.5 text-violet-400 hover:text-violet-300 hover:underline text-sm transition-colors",children:[(0,he.jsx)(ir,{className:"w-3.5 h-3.5"}),"Download file"]})]})]})})}var Lm=window.__PORT__??3700,co=`http://localhost:${Lm}`,zt=`${co}/api/tasks`,Ct={async getTasks(){return(await fetch(`${zt}?_=${Date.now()}`,{cache:"no-store"})).json()},async createTask(e){return(await fetch(zt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()},async updateTask(e,t){return(await fetch(`${zt}/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()},async deleteTask(e){await fetch(`${zt}/${e}`,{method:"DELETE"})},async getComments(e){return(await fetch(`${zt}/${e}/comments`)).json()},async addComment(e,t){await fetch(`${zt}/${e}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({author:"user",text:t,source:"web"})})},async updateComment(e,t,a){await fetch(`${zt}/${e}/comments/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:a})})},async deleteComment(e,t){await fetch(`${zt}/${e}/comments/${t}`,{method:"DELETE"})},async getFiles(e){return(await fetch(`${zt}/${e}/files`)).json()},async uploadFile(e,t){let a=await t.arrayBuffer();await fetch(`${zt}/${e}/files/${encodeURIComponent(t.name)}`,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:a})},async deleteFile(e,t){await fetch(`${zt}/${e}/files/${encodeURIComponent(t)}`,{method:"DELETE"})},async getProject(){return(await fetch(`${co}/api/project`)).json()},async getCopilotStatus(){return(await fetch(`${co}/api/copilot/status`)).json()},async copilotLogin(){return(await fetch(`${co}/api/copilot/login`,{method:"POST"})).json().catch(()=>({}))},async getSettings(){return(await fetch(`${co}/api/settings`,{cache:"no-store"})).json()},async saveSettings(e){await fetch(`${co}/api/settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},wsUrl(){return`ws://localhost:${Lm}`}};var G=D(H(),1),ps=window.__PORT__??3700,ov=window.__SAAS_MODE__??!1,ym=window.__BOARD_URL__??"",nv=window.__BOARD_NAME__??"",Cm=window.__IS_ADMIN__??!1;function lv({onClose:e}){let t=`http://localhost:${ps}`,[a,r]=ee.default.useState("idle"),[o,n]=ee.default.useState(!0),[l,s]=ee.default.useState(null),[u,d]=ee.default.useState("");async function g(){r("pushing"),d("");try{let m=await fetch(`${t}/api/push`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepLocalFiles:o})}),L=await m.json();if(!m.ok){d(L.error??"Push failed"),r("error");return}s({imported:L.imported??0,skipped:L.skipped}),r("done")}catch(m){d(m instanceof Error?m.message:"Network error"),r("error")}}let h=a==="pushing";return(0,G.jsx)("div",{style:{position:"fixed",inset:0,zIndex:9999,background:"rgba(5, 8, 18, 0.72)",backdropFilter:"blur(10px)",display:"flex",alignItems:"center",justifyContent:"center",padding:20,fontFamily:"Inter, system-ui, -apple-system, sans-serif"},children:(0,G.jsxs)("div",{style:{background:"#101827",border:"1px solid rgba(255,255,255,0.07)",borderRadius:24,maxWidth:380,width:"100%",boxShadow:"0 0 0 1px rgba(59,130,246,0.07), 0 40px 80px rgba(0,0,0,0.75)",overflow:"hidden",position:"relative"},children:[(0,G.jsx)("div",{style:{position:"absolute",top:0,left:"20%",right:"20%",height:1,background:"linear-gradient(90deg, transparent, rgba(59,130,246,0.5), transparent)"}}),(0,G.jsxs)("div",{style:{padding:"36px 36px 20px",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center"},children:[(0,G.jsx)("div",{style:{position:"relative",width:52,height:52,marginBottom:22},children:(0,G.jsxs)("svg",{width:"52",height:"52",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,G.jsx)("rect",{width:"18",height:"18",rx:"4",fill:"#2563eb"}),(0,G.jsx)("rect",{x:"2.5",y:"5",width:"2",height:"8",rx:"1",fill:"white",opacity:"0.7"}),(0,G.jsx)("rect",{x:"6.5",y:"2",width:"2",height:"14",rx:"1",fill:"white"}),(0,G.jsx)("rect",{x:"10.5",y:"6",width:"2",height:"6",rx:"1",fill:"white",opacity:"0.7"}),(0,G.jsx)("rect",{x:"14.5",y:"4",width:"2",height:"10",rx:"1",fill:"white",opacity:"0.85"})]})}),(0,G.jsx)("h1",{style:{fontSize:18,fontWeight:700,color:"#f1f5f9",letterSpacing:"-0.3px",margin:"0 0 7px"},children:"Online Mode Active"}),(0,G.jsxs)("p",{style:{fontSize:12,color:"rgba(255,255,255,0.36)",lineHeight:1.5,margin:0},children:["Connected to"," ",(0,G.jsx)("strong",{style:{color:"rgba(255,255,255,0.55)",fontWeight:500},children:nv||"Vibeflow SaaS"})]})]}),a==="done"&&l&&(0,G.jsxs)("div",{style:{margin:"0 28px 0",padding:"10px 14px",borderRadius:9,fontSize:12,display:"flex",alignItems:"center",gap:9,background:"rgba(16,185,129,0.08)",border:"1px solid rgba(16,185,129,0.18)",color:"#34d399"},children:[(0,G.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",children:(0,G.jsx)("path",{d:"M13 5L6.5 11.5 3 8",stroke:"#34d399",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),l.imported," task",l.imported!==1?"s":""," pushed to board",l.skipped!=null&&l.skipped>0?` \\xB7 ${l.skipped} already existed`:""]}),a==="error"&&u&&(0,G.jsx)("div",{style:{margin:"0 28px 0",padding:"10px 14px",borderRadius:9,fontSize:12,display:"flex",alignItems:"center",gap:9,background:"rgba(239,68,68,0.08)",border:"1px solid rgba(239,68,68,0.18)",color:"#f87171"},children:u}),(0,G.jsxs)("div",{style:{padding:"20px 24px 28px",display:"flex",flexDirection:"column",gap:8},children:[ym&&(0,G.jsx)("a",{href:ym,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:9,padding:14,background:"#2563eb",border:"none",borderRadius:12,color:"#fff",fontSize:14,fontWeight:600,cursor:"pointer",textDecoration:"none",letterSpacing:"-0.1px",transition:"background 0.15s, transform 0.1s"},onMouseEnter:m=>{m.currentTarget.style.background="#3b82f6",m.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:m=>{m.currentTarget.style.background="#2563eb",m.currentTarget.style.transform="none"},children:"Open Web App \\u2192"}),a!=="done"&&(0,G.jsx)("button",{onClick:()=>void g(),disabled:h,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:9,padding:12,background:"transparent",border:"1px solid rgba(255,255,255,0.08)",borderRadius:12,color:h?"rgba(255,255,255,0.25)":"rgba(255,255,255,0.4)",fontSize:13,fontWeight:500,cursor:h?"not-allowed":"pointer",transition:"border-color 0.15s, color 0.15s, background 0.15s"},onMouseEnter:m=>{h||(m.currentTarget.style.borderColor="rgba(255,255,255,0.15)",m.currentTarget.style.color="rgba(255,255,255,0.65)",m.currentTarget.style.background="rgba(255,255,255,0.03)")},onMouseLeave:m=>{h||(m.currentTarget.style.borderColor="rgba(255,255,255,0.08)",m.currentTarget.style.color="rgba(255,255,255,0.4)",m.currentTarget.style.background="transparent")},children:h?"\\u23F3 Pushing\\u2026":"\\u2191 Push local tasks"})]}),(0,G.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 24px 20px"},children:[(0,G.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:7,cursor:"pointer"},children:[(0,G.jsx)("input",{type:"checkbox",checked:o,onChange:m=>n(m.target.checked),style:{accentColor:"#2563eb",width:13,height:13,cursor:"pointer"}}),(0,G.jsx)("span",{style:{fontSize:11.5,color:"rgba(255,255,255,0.28)"},children:"Keep local files"})]}),Cm&&e&&(0,G.jsx)("button",{onClick:e,style:{fontSize:11,color:"rgba(255,255,255,0.2)",background:"none",border:"none",cursor:"pointer",textDecoration:"underline",textUnderlineOffset:2,transition:"color 0.15s"},onMouseEnter:m=>{m.currentTarget.style.color="rgba(255,255,255,0.45)"},onMouseLeave:m=>{m.currentTarget.style.color="rgba(255,255,255,0.2)"},children:"Dismiss (admin)"})]})]})})}var Sm={backlog:"Backlog",todo:"Todo","in-progress":"In Progress",review:"Review",done:"Done"};function sv(e,t,a){let r=a?e.filter(s=>{var u,d;return((u=s.title)==null?void 0:u.toLowerCase().includes(a))||((d=s.description)==null?void 0:d.toLowerCase().includes(a))}):e;if(a)return`${r.length} of ${e.length} tasks`;let o=r.filter(s=>s.status!=="done").length,n=r.filter(s=>s.status==="in-progress").length,l=r.filter(s=>s.status==="review").length;return`${o} open \\xB7 ${n} in-progress \\xB7 ${l} in review`}function wm(){var Cr,Va;let[e,t]=ee.default.useState([]),[a,r]=ee.default.useState(!0),[o,n]=ee.default.useState(!1),[l,s]=ee.default.useState({open:!1,task:null,tab:"details"}),[u,d]=ee.default.useState("board"),[g,h]=ee.default.useState(!1),[m,L]=ee.default.useState({open:!1,name:"",url:""}),[y,I]=ee.default.useState(420),[O,c]=ee.default.useState(!1),[i,f]=ee.default.useState(""),[v,k]=ee.default.useState(za.map(x=>x.id)),[w,p]=ee.default.useState({status:"all",component:null,type:null,user:null,tags:[]}),[S,A]=ee.default.useState("Proto Board"),[T,M]=ee.default.useState(!1),[X,le]=ee.default.useState(!1),[J,Re]=ee.default.useState("You"),[_,U]=ee.default.useState(null),[Q,ae]=ee.default.useState(""),[V,me]=ee.default.useState({}),nt=ee.default.useRef(null),wt=ee.default.useRef(null),Ge=ee.default.useRef(null),[Xt,kt]=ee.default.useState([]),ia=ee.default.useRef(!1),Ut=ee.default.useRef([]),[vr,ms]=ee.default.useState([]);ee.default.useEffect(()=>(Nt(),gs(),hs(),kn(),wn(),bn(),()=>{var x;wt.current&&clearTimeout(wt.current),(x=nt.current)==null||x.close()}),[]),ee.default.useEffect(()=>{document.body.setAttribute("data-theme","dark")},[]),ee.default.useEffect(()=>{function x(){let Y=window.location.hash.match(/^#task-([a-f0-9]{30})$/i);if(!Y){Ge.current=null;return}let ge=Y[1].toLowerCase();if(Ge.current===ge)return;let re=e.find(oe=>oe.id.toLowerCase()===ge);re&&(Ge.current=ge,ia.current?s(oe=>({...oe,open:!0,task:re,tab:"details"})):s(oe=>(oe.task&&oe.task.id!==re.id&&kt(ie=>[...ie,oe.task]),{...oe,open:!0,task:re,tab:"details"})),ia.current=!1)}function b(){}x();let z=()=>{Ge.current=null,x()};return window.addEventListener("hashchange",z),window.addEventListener("vibeflow-task-ref-click",b),()=>{window.removeEventListener("hashchange",z),window.removeEventListener("vibeflow-task-ref-click",b)}},[e]),ee.default.useEffect(()=>{if(!l.open||!l.task)return;let x=e.find(Y=>Y.id===l.task.id);if(!x)return;let b=l.task;Object.keys(x).some(Y=>x[Y]!==b[Y])&&s(Y=>({...Y,task:x}))},[e,l.open,(Cr=l.task)==null?void 0:Cr.id]),ee.default.useEffect(()=>{function x(b){var ge,re,oe;let z=(ge=b.target)==null?void 0:ge.tagName,Y=z==="INPUT"||z==="TEXTAREA"||((re=b.target)==null?void 0:re.isContentEditable);if(b.key==="Escape"){if(m.open){L(ie=>({...ie,open:!1}));return}if(l.open){s(ie=>({...ie,open:!1}));return}if(g){h(!1);return}}if(!Y&&((b.key==="?"||b.key==="/"&&b.shiftKey)&&((oe=document.getElementById("header-shortcuts-hint"))==null||oe.click()),b.altKey&&!b.ctrlKey&&!b.metaKey&&(b.key==="n"||b.key==="N")&&(b.preventDefault(),Sr(null,"details")),b.altKey&&!b.ctrlKey&&!b.metaKey&&(b.key==="f"||b.key==="F"))){b.preventDefault();let ie=document.getElementById("global-search");ie==null||ie.focus(),ie==null||ie.select()}}return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[m.open,l.open,g]);function Lr(x,b,z,Y,ge){let re=new Date().toISOString(),oe=Sm[b]??b,ie=Sm[z]??z,He=Date.now()-3e3;ms(Ze=>Ze.some(R=>R.taskId===x&&R.to===ie&&new Date(R.timestamp).getTime()>He)?Ze:[...Ze,{taskId:x,field:"status",from:oe,to:ie,actor:Y,timestamp:re,source:ge}].slice(-500))}async function Nt(){try{let x=await Ct.getTasks();Ut.current=x.tasks??[],t(x.tasks??[])}catch{}finally{r(!1)}}let Qt=ee.default.useCallback((x,b,z)=>{let Y=String(x.id??"");if(!Y)return;let ge=x.created??x.createdAt,re=x.updated?String(x.updated):void 0,oe=Array.isArray(x.comments)?x.comments.length:void 0,ie=Array.isArray(x.files)?x.files.length:void 0,He=x.status?String(x.status):void 0,Ze=Ut.current.find(lt=>lt.id===Y);He&&Ze&&Ze.status!==He&&Lr(Y,Ze.status,He,b??"Someone",z),t(lt=>{let R=lt.find(pt=>pt.id===Y),Ht={id:Y,title:x.title?String(x.title):(R==null?void 0:R.title)??"Untitled",description:x.description!=null?String(x.description):(R==null?void 0:R.description)??"",status:He??(R==null?void 0:R.status)??"todo",type:x.type?String(x.type):R==null?void 0:R.type,priority:x.priority?String(x.priority):R==null?void 0:R.priority,agent:x.agent?String(x.agent):R==null?void 0:R.agent,model:x.model?String(x.model):R==null?void 0:R.model,selector:x.selector?String(x.selector):R==null?void 0:R.selector,cssSelector:x.cssSelector?String(x.cssSelector):R==null?void 0:R.cssSelector,file:x.file?String(x.file):R==null?void 0:R.file,line:typeof x.line=="number"?x.line:R==null?void 0:R.line,col:typeof x.col=="number"?x.col:R==null?void 0:R.col,component:x.component?String(x.component):R==null?void 0:R.component,url:x.url?String(x.url):R==null?void 0:R.url,reportBack:x.reportBack===!0||(R==null?void 0:R.reportBack)===!0,commit:x.commit?String(x.commit):R==null?void 0:R.commit,commits:Array.isArray(x.commits)?x.commits:R==null?void 0:R.commits,commentCount:oe??(R==null?void 0:R.commentCount),fileCount:ie??(R==null?void 0:R.fileCount),createdAt:ge?String(ge):(R==null?void 0:R.createdAt)??new Date().toISOString(),updatedAt:re??(R==null?void 0:R.updatedAt),author:x.author?String(x.author):R==null?void 0:R.author,tags:Array.isArray(x.tags)?x.tags:R==null?void 0:R.tags,sortKey:x.sortKey?String(x.sortKey):R==null?void 0:R.sortKey},$a=lt.filter(pt=>pt.id!==Y);return $a.push(Ht),$a.sort((pt,fa)=>{let wr=new Date(pt.updatedAt??pt.createdAt??"").getTime(),Mn=new Date(fa.updatedAt??fa.createdAt??"").getTime();return wr===Mn?pt.id.localeCompare(fa.id):Mn-wr}),Ut.current=$a,$a})},[]);async function gs(){try{let x=await Ct.getProject();x.name&&A(x.name),x.gitUserName&&Re(x.gitUserName)}catch{}}async function wn(){try{let x=await fetch("/api/github-url").then(b=>b.json());U(x.githubUrl??null)}catch{}}async function hs(){var x;try{let z=await Ct.getSettings();me(z),(x=z.visibleCols)!=null&&x.length&&k(z.visibleCols),z.viewMode&&d(z.viewMode),z.panelWidth&&z.panelWidth>=280&&z.panelWidth<=900&&I(z.panelWidth)}catch{}}async function kn(){try{let x=await Ct.getCopilotStatus();x!=null&&x.authenticated&&(x!=null&&x.username)?ae(`Copilot: ${x.username}`):ae("Copilot: not logged in")}catch{}}function bn(){let x=`ws://localhost:${ps}`,b=new WebSocket(x);nt.current=b,b.addEventListener("open",()=>{M(!0),le(!0),Nt()}),b.addEventListener("close",()=>{M(!1),wt.current=setTimeout(bn,1500)}),b.addEventListener("message",Y=>{var ge;try{let re=JSON.parse(Y.data);if(re.type==="tasks-updated"||(ge=re.type)!=null&&ge.startsWith("task:")){Nt();return}if(re.type==="task-changed"&&re.task){let oe=re.task,ie=typeof oe.alteredBy=="string"?oe.alteredBy:typeof oe.author=="string"?oe.author:"Someone",He=re.source==="cli"?"cli":void 0;Qt(oe,ie,He);return}if(re.type==="task-deleted"&&re.taskId){let oe=String(re.taskId);t(ie=>{let He=ie.filter(Ze=>Ze.id!==oe);return Ut.current=He,He})}}catch{}});let z=setInterval(()=>{b.readyState===WebSocket.OPEN&&b.send(JSON.stringify({type:"ping"}))},2e4);b.addEventListener("close",()=>clearInterval(z))}async function Wa(x,b){let z=Ut.current.find(Y=>Y.id===x);t(Y=>{let ge=Y.map(re=>re.id===x?{...re,...b}:re);return Ut.current=ge,ge}),b.status&&(z!=null&&z.status)&&b.status!==z.status&&Lr(x,z.status,b.status,J);try{let Y=await Ct.updateTask(x,b);Y.task&&t(ge=>{let re=ge.map(oe=>oe.id===x?Y.task:oe);return Ut.current=re,re})}catch{Nt()}}async function da(x){t(b=>{let z=b.filter(Y=>Y.id!==x);return Ut.current=z,z});try{await Ct.deleteTask(x)}catch{Nt()}}async function yr(x){var b;try{let z=await Ct.createTask(x);return await Nt(),(b=z==null?void 0:z.task)==null?void 0:b.id}catch{}}function Sr(x,b="details",z){kt([]),s({open:!0,task:x,tab:b,addColumnId:z})}function Pn(){kt(x=>{if(x.length===0)return x;let b=x[x.length-1],z=x.slice(0,-1);return ia.current=!0,Ge.current=null,window.location.hash=`#task-${b.id}`,s(Y=>({...Y,open:!0,task:b,tab:"details"})),z})}function Ir(x,b){if(/\\.html?$/i.test(x)){window.open(b,"_blank","noopener,noreferrer");return}L({open:!0,name:x,url:b})}let Tn=sv(e,v,i.toLowerCase()),Rn=`http://localhost:${ps}`,Dn=ee.default.useMemo(()=>{let x=new Set;return e.forEach(b=>(b.tags??[]).forEach(z=>x.add(z))),Array.from(x).sort()},[e]),xs=ee.default.useMemo(()=>{var b;let x=(b=l.task)==null?void 0:b.id;return x?vr.filter(z=>z.taskId===x).map(({field:z,from:Y,to:ge,actor:re,timestamp:oe,source:ie})=>({field:z,from:Y,to:ge,actor:re,timestamp:oe,source:ie})):[]},[(Va=l.task)==null?void 0:Va.id,vr]),po=ee.default.useMemo(()=>{let x=e;return w.status!=="all"&&(x=x.filter(b=>b.status===w.status)),w.component&&(x=x.filter(b=>b.component===w.component)),w.type&&(x=x.filter(b=>b.type===w.type)),w.user&&(x=x.filter(b=>b.author===w.user)),w.tags&&w.tags.length>0&&(x=x.filter(b=>w.tags.every(z=>(b.tags??[]).includes(z)))),x},[e,w]),An=X&&!T;return(0,G.jsxs)(G.Fragment,{children:[ov&&!o&&(0,G.jsx)(lv,{onClose:Cm?()=>n(!0):void 0}),(0,G.jsx)($i,{projectName:S,missingProjectIconStyle:"vibeflow",wsConnected:T,port:ps,searchQuery:i,filterTags:w.tags,allTags:Dn,onToggleTag:x=>{let b=w.tags??[],z=b.includes(x)?b.filter(Y=>Y!==x):[...b,x];p(Y=>({...Y,tags:z}))},premiumUsage:Q,isLoading:a,taskSummary:Tn,onSearchChange:f,onSettings:()=>h(!0)}),(0,G.jsx)(td,{tasks:e,filter:w,view:u,onFilter:p,onViewChange:x=>{d(x),Ct.saveSettings({...V,viewMode:x}),me(b=>({...b,viewMode:x}))}}),(0,G.jsxs)("div",{className:"flex flex-1 overflow-hidden",style:{minHeight:0,position:"relative"},children:[u==="list"?(0,G.jsx)(Vi,{tasks:po,searchQuery:i,isLoading:a,onOpenPanel:(x,b)=>Sr(x,b),onAddTask:x=>Sr(null,"details",x),onDrop:(x,b)=>Wa(x,{status:b})}):(0,G.jsx)(qi,{tasks:po,visibleCols:v,searchQuery:i,isLoading:a,onOpenPanel:(x,b,z)=>Sr(x,b,z),onDrop:(x,b)=>Wa(x,{status:b})}),l.open&&(0,G.jsxs)("div",{id:"detail-panel-container",style:{width:y,zIndex:O?30:10},className:O?"resizing":"",children:[(0,G.jsx)("div",{id:"detail-panel-resize-handle",onMouseDown:x=>{x.preventDefault(),c(!0),document.body.classList.add("vibeflow-resizing-panel");let b=x.clientX,z=y,Y=re=>{let oe=z-(re.clientX-b);I(Math.max(360,Math.min(860,oe)))},ge=re=>{c(!1),document.body.classList.remove("vibeflow-resizing-panel");let oe=Math.max(360,Math.min(860,z-(re.clientX-b)));Ct.saveSettings({...V,panelWidth:oe}),me(ie=>({...ie,panelWidth:oe})),window.removeEventListener("mousemove",Y),window.removeEventListener("mouseup",ge)};window.addEventListener("mousemove",Y),window.addEventListener("mouseup",ge)}}),(0,G.jsx)(ed,{open:l.open,task:l.task,tab:l.tab,showLockIndicator:!1,addColumnId:l.addColumnId,gitUserName:J,githubUrl:_,baseUrl:Rn,isResizing:O,api:Ct,onClose:()=>{kt([]),s(x=>({...x,open:!1}))},onSave:async x=>{l.task&&await Wa(l.task.id,x),s(b=>({...b,open:!1}))},onCreate:async x=>{let b=await yr(x);return s(z=>({...z,open:!1})),b},onDelete:async x=>{await da(x),s(b=>({...b,open:!1}))},onPatch:Wa,onFilePreview:Ir,onGoBack:Xt.length>0?Pn:void 0,navBackLabel:Xt.length>0?Xt[Xt.length-1].title:void 0,externalLocalChanges:xs,allTasks:e})]})]}),An&&(0,Im.createPortal)((0,G.jsx)("div",{id:"ws-lost-overlay",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:99999,background:"rgba(2, 6, 23, 0.88)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",padding:16,pointerEvents:"all",cursor:"not-allowed"},children:(0,G.jsxs)("div",{style:{width:"min(420px, 92vw)",borderRadius:14,border:"1px solid var(--p-border-s)",background:"var(--p-card)",boxShadow:"0 16px 40px rgba(2,6,23,0.7)",padding:"20px 22px",display:"flex",flexDirection:"column",gap:10,cursor:"default",pointerEvents:"auto"},children:[(0,G.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,G.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--p-text-m)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"spin 1.1s linear infinite",flexShrink:0},children:(0,G.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),(0,G.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--p-text)"},children:"Connection Lost"})]}),(0,G.jsx)("div",{style:{fontSize:12,color:"var(--p-text-m)",lineHeight:1.6},children:"Real-time connection to the server was interrupted. Reconnecting in the background\\u2026"})]})}),document.body),(0,G.jsx)(ad,{open:g,visibleCols:v,settings:V,onClose:()=>h(!1),onSave:(x,b)=>{k(x);let z={...V,...b,visibleCols:x};me(z),Ct.saveSettings(z)}}),(0,G.jsx)(rd,{open:m.open,name:m.name,url:m.url,onClose:()=>L(x=>({...x,open:!1}))})]})}var Pm=D(H(),1),km=document.getElementById("root");km&&(0,bm.createRoot)(km).render((0,Pm.jsx)(wm,{}));})();\n/*! Bundled license information:\n\nreact/cjs/react.production.min.js:\n (**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nscheduler/cjs/scheduler.production.min.js:\n (**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact-dom/cjs/react-dom.production.min.js:\n (**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact/cjs/react-jsx-runtime.production.min.js:\n (**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nlucide-react/dist/esm/shared/src/utils.js:\nlucide-react/dist/esm/defaultAttributes.js:\nlucide-react/dist/esm/Icon.js:\nlucide-react/dist/esm/createLucideIcon.js:\nlucide-react/dist/esm/icons/chevron-down.js:\nlucide-react/dist/esm/icons/chevron-right.js:\nlucide-react/dist/esm/icons/circle-check-big.js:\nlucide-react/dist/esm/icons/download.js:\nlucide-react/dist/esm/icons/eye.js:\nlucide-react/dist/esm/icons/file-text.js:\nlucide-react/dist/esm/icons/flag.js:\nlucide-react/dist/esm/icons/layout-dashboard.js:\nlucide-react/dist/esm/icons/list.js:\nlucide-react/dist/esm/icons/lock.js:\nlucide-react/dist/esm/icons/message-circle.js:\nlucide-react/dist/esm/icons/panels-top-left.js:\nlucide-react/dist/esm/icons/paperclip.js:\nlucide-react/dist/esm/icons/plus.js:\nlucide-react/dist/esm/icons/search.js:\nlucide-react/dist/esm/icons/settings.js:\nlucide-react/dist/esm/icons/tag.js:\nlucide-react/dist/esm/icons/triangle-alert.js:\nlucide-react/dist/esm/icons/upload.js:\nlucide-react/dist/esm/icons/user.js:\nlucide-react/dist/esm/icons/workflow.js:\nlucide-react/dist/esm/icons/x.js:\nlucide-react/dist/esm/lucide-react.js:\n (**\n * @license lucide-react v0.468.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n *)\n*/\n';var Bt=zt(import.meta.url),Vt=$t(Bt),qt=[tn(Vt,"kanban-template.html"),tn(process.cwd(),"src","server","kanban-template.html"),tn(process.cwd(),"dist","server","kanban-template.html")];function Yt(t){let e=qt.find(r=>Wt(r));if(!e)throw new Error("kanban-template.html not found in expected locations");return jt(e,"utf8").replaceAll("__PORT__",String(t))}function Kt(t){return t.saasMode?`window.__SAAS_MODE__ = true; window.__BOARD_URL__ = ${JSON.stringify(t.boardUrl??"")}; window.__BOARD_NAME__ = ${JSON.stringify(t.boardName??"")}; window.__IS_ADMIN__ = ${t.isAdmin?"true":"false"};`:""}var Qt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSI+PHJlY3Qgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiByeD0iNCIgZmlsbD0iIzI1NjNlYiIvPjxyZWN0IHg9IjIuNSIgeT0iNSIgd2lkdGg9IjIiIGhlaWdodD0iOCIgcng9IjEiIGZpbGw9IndoaXRlIiBvcGFjaXR5PSIwLjciLz48cmVjdCB4PSI2LjUiIHk9IjIiIHdpZHRoPSIyIiBoZWlnaHQ9IjE0IiByeD0iMSIgZmlsbD0id2hpdGUiLz48cmVjdCB4PSIxMC41IiB5PSI2IiB3aWR0aD0iMiIgaGVpZ2h0PSI2IiByeD0iMSIgZmlsbD0id2hpdGUiIG9wYWNpdHk9IjAuNyIvPjxyZWN0IHg9IjE0LjUiIHk9IjQiIHdpZHRoPSIyIiBoZWlnaHQ9IjEwIiByeD0iMSIgZmlsbD0id2hpdGUiIG9wYWNpdHk9IjAuODUiLz48L3N2Zz4=";function Gt(t){return`<!DOCTYPE html>
|
|
29142
29338
|
<html lang="en" class="dark">
|
|
29143
29339
|
<head>
|
|
29144
29340
|
<meta charset="UTF-8">
|
|
29145
29341
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
29146
29342
|
<title>Vibeflow \u2014 Board</title>
|
|
29147
|
-
<link rel="icon" href="${
|
|
29343
|
+
<link rel="icon" href="${Qt}" type="image/svg+xml">
|
|
29148
29344
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
29149
|
-
<style>${
|
|
29345
|
+
<style>${_n}</style>
|
|
29150
29346
|
</head>
|
|
29151
29347
|
<body class="h-screen overflow-hidden flex flex-col" style="background:#020c1b;">
|
|
29152
29348
|
<div id="root"></div>
|
|
29153
|
-
<script>window.__PORT__ = ${
|
|
29154
|
-
<script>${
|
|
29349
|
+
<script>window.__PORT__ = ${t.port}; ${Kt(t)}</script>
|
|
29350
|
+
<script>${nn}</script>
|
|
29155
29351
|
</body>
|
|
29156
|
-
</html>`}function
|
|
29157
|
-
`;case"t":return" ";case"r":return"\r";case"\\":return"\\";default:return r}})}function
|
|
29158
|
-
`):[]);return
|
|
29352
|
+
</html>`}function rn(t){let e=typeof t=="number"?{port:t}:t;return nn?Gt(e):Yt(e.port)}import{readFileSync as Nn,writeFileSync as Bo,mkdirSync as Vo,existsSync as Ln}from"fs";import{join as Fn,basename as Xt}from"path";var Rn={port:3700};function Jt(t){return Fn(t,ce,bn)}function Oe(t){let e=Jt(t);if(!Ln(e))return{...Rn};let r=Nn(e,"utf-8"),i=JSON.parse(r);return{...Rn,...i}}function Me(t){let e=Fn(t,"package.json");if(Ln(e))try{let r=JSON.parse(Nn(e,"utf-8"));if(r.name)return r.name}catch{}return Xt(t)}import{mkdirSync as Zt,writeFileSync as er}from"fs";import{dirname as nr}from"path";function tr(t){let e=t;return{...t,text:t.text||e.body||"",author:t.author??"agent"}}function te(t,e){let r=we(t,e);return((r?Ce(r):null)?.comments??[]).filter(s=>!s.deleted).map(tr)}function Dn(t){return t.replace(/\\(n|t|r|\\)/g,(e,r)=>{switch(r){case"n":return`
|
|
29353
|
+
`;case"t":return" ";case"r":return"\r";case"\\":return"\\";default:return r}})}function he(t,e,r,i,s,o,a){i=Dn(i);let c=te(t,e),l={id:Date.now().toString(36)+Math.random().toString(36).slice(2,7),author:r,text:i,...s&&s.length>0?{files:s}:{},...o&&o!=="comment"?{type:o}:{},createdAt:new Date().toISOString(),source:a??"cli"},u=[...c,l];if(!z(t,e,{comments:u})){let P=wn(t,e,new Date().toISOString());Zt(nr(P),{recursive:!0}),er(P,JSON.stringify({id:e,comments:u},null,2),"utf-8")}return l}function He(t,e,r,i){let s=te(t,e),o=s.find(a=>a.id===r);return o?(o.text=Dn(i),o.updatedAt=new Date().toISOString(),z(t,e,{comments:s}),o):null}function Ue(t,e,r){let i=te(t,e),s=i.findIndex(o=>o.id===r);return s===-1?!1:(i[s]={...i[s],deleted:!0,text:"[Comment deleted]",updatedAt:new Date().toISOString()},z(t,e,{comments:i}),!0)}import{execSync as An}from"child_process";import{existsSync as rr,readFileSync as or,writeFileSync as na,mkdirSync as ta}from"fs";import{join as ar}from"path";var ir="config.json";function sr(t){return ar(t,ce,ir)}function lr(t){let e=sr(t);if(!rr(e))return{};try{return JSON.parse(or(e,"utf-8"))}catch{return{}}}function cr(t){return t.length<=8?"***":t.slice(0,6)+"..."+t.slice(-4)}function ur(){try{return An("gh auth token --hostname github.com 2>/dev/null",{encoding:"utf-8",timeout:5e3,stdio:["pipe","pipe","pipe"]}).trim()||null}catch{return null}}async function dr(t){try{let e=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${t}`,"User-Agent":"proto-studio-cli",Accept:"application/vnd.github+json"},signal:AbortSignal.timeout(5e3)});return e.ok?(await e.json()).login??null:null}catch{return null}}function pr(t){let e=process.env.GITHUB_TOKEN;if(e?.trim())return{token:e.trim(),source:"env"};let i=lr(t).copilotToken;if(typeof i=="string"&&i.trim())return{token:i.trim(),source:"config"};let s=ur();return s?{token:s,source:"gh-cli"}:null}async function Re(t){let e=pr(t);if(!e)return{authenticated:!1,source:null,tokenHint:null,username:null};let r=await dr(e.token).catch(()=>null);return{authenticated:!0,source:e.source,tokenHint:cr(e.token),username:r}}function We(){try{return An("gh --version 2>/dev/null",{encoding:"utf-8",timeout:3e3,stdio:["pipe","pipe","pipe"]}),!0}catch{return!1}}import{existsSync as on,readFileSync as On,writeFileSync as Mn,mkdirSync as Hn}from"fs";import{join as je}from"path";import Un from"os";var fr="settings.json",Wn=".vibeflow";function jn(){return je(Un.homedir(),".vibeflow","settings.json")}function $n(t){return je(t,Wn,fr)}function an(){try{return JSON.parse(On(jn(),"utf-8"))}catch{return{}}}function zn(t){let e=je(Un.homedir(),".vibeflow");on(e)||Hn(e,{recursive:!0}),Mn(jn(),JSON.stringify(t,null,2),"utf-8")}function G(t){let e=an(),r=$n(t);if(!on(r))return e;try{let i=JSON.parse(On(r,"utf-8"));return{...e,...i}}catch{return e}}function Bn(t,e){let r=je(t,Wn);on(r)||Hn(r,{recursive:!0});let i=$n(t),o={...G(t),...e};return Mn(i,JSON.stringify(o,null,2),"utf-8"),o}import $e from"fs/promises";import mr from"os";import sn from"path";var gr=sn.join(mr.homedir(),".vibeflow"),ze=sn.join(gr,"token");async function Q(){try{return(await $e.readFile(ze,"utf8")).trim()||null}catch{return null}}async function Vn(t){await $e.mkdir(sn.dirname(ze),{recursive:!0}),await $e.writeFile(ze,t,{mode:384})}async function qn(){try{await $e.unlink(ze)}catch{}}import{initTRPC as hr,TRPCError as ln}from"@trpc/server";import{z as I}from"zod";var Kn=hr.context().create(),vr=Kn.router,Z=Kn.procedure,Yn=I.enum(["backlog","todo","in-progress","review","done"]),cn=I.object({id:I.string().min(1)}),Qn=vr({project:Z.query(({ctx:t})=>({name:Me(t.projectDir),projectDir:t.projectDir})),copilotStatus:Z.query(async({ctx:t})=>await We()?await Re(t.projectDir):{authenticated:!1,reason:"gh CLI not found"}),tasks:Z.query(({ctx:t})=>({tasks:ee(t.projectDir).map(i=>({...i,createdAt:i.created,commentCount:(i.comments??[]).length,fileCount:_e(t.projectDir,i.id)}))})),searchTasks:Z.input(I.object({query:I.string().min(1),limit:I.number().int().min(1).max(100).optional(),pageScope:I.string().optional()})).query(({ctx:t,input:e})=>{let r=ee(t.projectDir),i=Math.max(1,e.limit??10),s=e.query.toLowerCase();return{results:r.filter(a=>`${a.title} ${a.description??""} ${a.type??""} ${a.component??""}`.toLowerCase().includes(s)).slice(0,i).map(a=>({score:1,task:a,commentCount:(a.comments??[]).length,fileCount:_e(t.projectDir,a.id)}))}}),createTask:Z.input(I.object({title:I.string().min(1),selector:I.string().min(1),description:I.string().optional(),cssSelector:I.string().optional(),url:I.string().optional(),type:I.string().optional(),priority:I.string().optional(),file:I.string().optional(),line:I.number().int().positive().optional(),col:I.number().int().positive().optional(),component:I.string().optional(),status:Yn.optional(),agent:I.string().optional(),model:I.string().optional(),author:I.string().optional(),annotatedElementText:I.string().max(300).optional()})).mutation(({ctx:t,input:e})=>{let r=xe(t.projectDir,{title:e.title,description:e.description??"",selector:e.selector,cssSelector:e.cssSelector,url:e.url,status:e.status??"todo",screenshot:void 0,file:e.file,line:e.line,col:e.col,component:e.component,type:e.type,priority:e.priority,author:e.author??"Unknown",agent:e.agent,model:e.model,annotatedElementText:e.annotatedElementText});return t.broadcast({type:"tasks-updated"}),{success:!0,task:r}}),updateTask:Z.input(I.object({id:I.string().min(1),updates:I.object({status:Yn.optional(),title:I.string().min(1).optional(),description:I.string().optional(),type:I.string().optional(),priority:I.string().optional(),reportBack:I.boolean().optional(),agent:I.string().optional(),model:I.string().optional()})})).mutation(({ctx:t,input:e})=>{let r=z(t.projectDir,e.id,e.updates);if(!r)throw new ln({code:"NOT_FOUND",message:"Task not found"});return t.broadcast({type:"tasks-updated"}),{success:!0,task:r}}),deleteTask:Z.input(cn).mutation(({ctx:t,input:e})=>{if(!De(t.projectDir,e.id))throw new ln({code:"NOT_FOUND",message:"Task not found"});return t.broadcast({type:"tasks-updated"}),{success:!0}}),comments:Z.input(cn).query(({ctx:t,input:e})=>({comments:te(t.projectDir,e.id)})),addComment:Z.input(I.object({taskId:I.string().min(1),text:I.string().min(1),author:I.enum(["user","agent"]).optional().default("user"),files:I.array(I.string()).optional(),source:I.enum(["cli","web"]).optional().default("web")})).mutation(({ctx:t,input:e})=>{let r=he(t.projectDir,e.taskId,e.author,e.text.trim(),e.files,void 0,e.source);return t.broadcast({type:"tasks-updated"}),{success:!0,comment:r}}),updateComment:Z.input(I.object({taskId:I.string().min(1),commentId:I.string().min(1),text:I.string().min(1)})).mutation(({ctx:t,input:e})=>{let r=He(t.projectDir,e.taskId,e.commentId,e.text.trim());if(!r)throw new ln({code:"NOT_FOUND",message:"Comment not found"});return{success:!0,comment:r}}),deleteComment:Z.input(I.object({taskId:I.string().min(1),commentId:I.string().min(1)})).mutation(({ctx:t,input:e})=>(Ue(t.projectDir,e.taskId,e.commentId),t.broadcast({type:"tasks-updated"}),{success:!0})),files:Z.input(cn).query(({ctx:t,input:e})=>({files:ne(t.projectDir,e.id)}))});import{execSync as Gn}from"child_process";function un(t){try{let e=Gn("git config user.name",{cwd:t,encoding:"utf8",stdio:["pipe","pipe","pipe"]}).trim(),r=Gn("git config user.email",{cwd:t,encoding:"utf8",stdio:["pipe","pipe","pipe"]}).trim();return{name:e||"Unknown",email:r||""}}catch{return{name:"Unknown",email:""}}}function _r(t){return/^[a-f0-9]{30}$/.test(t)}var Qa=xr(import.meta.url);function Rr(){for(let t of Object.values(Ir()))for(let e of t??[])if(e.family==="IPv4"&&!e.internal)return e.address;return null}function st(t,e){t.get("/api/pages",(r,i)=>{i.json({pages:e})})}var Be=null;function Zn(t){if(Be&&Date.now()-Be.fetchedAt<3e5)return Be.shas;try{let r=ot("git log --remotes --format=%H",{cwd:t,timeout:5e3}).toString().trim(),i=new Set(r?r.split(`
|
|
29354
|
+
`):[]);return Be={shas:i,fetchedAt:Date.now()},i}catch{return new Set}}function et(t,e){return t?e.has(t):null}function lt(t,e,r){t.get("/api/project",(s,o)=>{o.json({name:Me(e),projectDir:e})}),t.get("/api/tasks",(s,o)=>{let a=ee(e),c=Zn(e),l=a.map(u=>{let C=u.commits?.length?u.commits[u.commits.length-1].sha:u.commit;return{...u,createdAt:u.created,commentCount:(u.comments??[]).length,fileCount:_e(e,u.id),commitPushed:et(C,c)}});o.json({tasks:l})}),t.param("id",(s,o,a,c)=>{if(!_r(c)){o.status(400).json({error:"Invalid task id"});return}a()}),t.get("/api/tasks/:id",(s,o)=>{let{id:a}=s.params,c=we(e,a),l=c?Ce(c):null;if(!l){o.status(404).json({error:"Task not found"});return}let u=Zn(e),C=l.commits?.length?l.commits[l.commits.length-1].sha:l.commit;o.json({...l,commitPushed:et(C,u)})}),t.post("/api/tasks",(s,o)=>{let{title:a,description:c,selector:l,cssSelector:u,url:C,type:P,priority:k,file:w,line:_,col:L,component:m,status:N,agent:H,model:K,screenshot:O,annotatedElementText:q}=s.body;if(!a||!l){o.status(400).json({error:"Missing required fields: title, selector"});return}let ie=un(e),oe=xe(e,{title:a,description:c||"",selector:l,cssSelector:u||void 0,url:C||void 0,status:["backlog","todo","in-progress","review","done"].includes(N)?N:"todo",file:w||void 0,line:_!=null?Number(_):void 0,col:L!=null?Number(L):void 0,component:m||void 0,type:P||void 0,priority:k||void 0,author:ie.name,agent:H||void 0,model:K||void 0,annotatedElementText:q?String(q).slice(0,300):void 0});if(O){let Le=ae(e,ce,Ie);Jn(Le,{recursive:!0});let p=`${oe.id}.png`;Xn(ae(Le,p),Buffer.from(O,"base64")),z(e,oe.id,{screenshot:p}),oe.screenshot=p}console.log(`[Proto] Task created: "${oe.title}" (${oe.id})`),r({type:"tasks-updated"}),o.json({success:!0,task:oe})}),t.patch("/api/tasks/:id",(s,o)=>{let{id:a}=s.params,c=s.body,l=z(e,a,c);if(!l){o.status(404).json({error:"Task not found"});return}console.log(`[Proto] Task updated: "${l.title}" (${l.id}) \u2192 status:${l.status}`),r({type:"task-changed",taskId:l.id,action:"update",task:l}),o.json({success:!0,task:l})}),t.delete("/api/tasks/:id",(s,o)=>{let{id:a}=s.params;if(!De(e,a)){o.status(404).json({error:"Task not found"});return}console.log(`[Proto] Task deleted: ${a}`),r({type:"task-deleted",taskId:a}),o.json({success:!0})}),t.get("/api/tasks/:id/comments",(s,o)=>{let{id:a}=s.params,c=te(e,a);o.json({comments:c})}),t.post("/api/tasks/:id/comments",(s,o)=>{let{id:a}=s.params,{author:c,text:l,files:u,source:C}=s.body;if(!l||!l.trim()){o.status(400).json({error:"Missing required field: text"});return}let P=c==="agent"?"agent":"user",k=C==="cli"?"cli":"web",w=he(e,a,P,l.trim(),Array.isArray(u)?u:void 0,void 0,k);r({type:"tasks-updated"}),o.json({success:!0,comment:w})}),t.patch("/api/tasks/:id/comments/:commentId",(s,o)=>{let{id:a,commentId:c}=s.params,{text:l}=s.body;if(!l||!l.trim()){o.status(400).json({error:"Missing required field: text"});return}let u=He(e,a,c,l.trim());if(!u){o.status(404).json({error:"Comment not found"});return}o.json({success:!0,comment:u})}),t.delete("/api/tasks/:id/comments/:commentId",(s,o)=>{let{id:a,commentId:c}=s.params;if(!Ue(e,a,c)){o.status(404).json({error:"Comment not found"});return}r({type:"tasks-updated"}),o.json({success:!0})}),t.get("/api/tasks/:id/files",(s,o)=>{let{id:a}=s.params,c=ne(e,a);o.json({files:c})}),t.get("/api/tasks/:id/files/:filename",(s,o)=>{let{id:a,filename:c}=s.params,l=En(e,a,c);if(!l){o.status(404).json({error:"File not found"});return}o.sendFile(l)}),t.post("/api/tasks/:id/files/:filename",de.raw({type:"*/*",limit:"50mb"}),(s,o)=>{let{id:a,filename:c}=s.params;if(!c||c.includes("/")||c.includes("\\")){o.status(400).json({error:"Invalid filename"});return}let l=s.body;if(!Buffer.isBuffer(l)||l.length===0){o.status(400).json({error:"Empty file body"});return}let u=Cn(e,a,decodeURIComponent(c),l);r({type:"tasks-updated"}),o.json({success:!0,file:u})}),t.delete("/api/tasks/:id/files/:filename",(s,o)=>{let{id:a,filename:c}=s.params;if(!Sn(e,a,c)){o.status(404).json({error:"File not found"});return}he(e,a,"user",`\u{1F5D1}\uFE0F File removed: \`${c}\``,void 0,"system","web"),r({type:"tasks-updated"}),o.json({success:!0})});let i=ae(e,ce,Ie);t.post("/api/tasks/:id/screenshot",de.json(),(s,o)=>{let{id:a}=s.params,{screenshot:c}=s.body;if(!we(e,a)){o.status(404).json({error:"Task not found"});return}if(!c){o.status(400).json({error:"Missing screenshot"});return}Jn(i,{recursive:!0});let l=`${a}.png`;Xn(ae(i,l),Buffer.from(c,"base64")),z(e,a,{screenshot:l}),r({type:"tasks-updated"}),o.json({success:!0,screenshot:l})}),t.delete("/api/tasks/:id/screenshot",(s,o)=>{let{id:a}=s.params;if(!we(e,a)){o.status(404).json({error:"Task not found"});return}let c=`${a}.png`,l=ae(i,c);wr(l)&&tt(l),z(e,a,{screenshot:void 0}),r({type:"tasks-updated"}),o.json({success:!0})})}function ct(t,e,r){t.get("/api/user",(s,o)=>{o.json(un(e))}),t.get("/api/settings",(s,o)=>{o.json(G(e))}),t.post("/api/settings",(s,o)=>{let a=s.body,c=Bn(e,a);o.json({success:!0,settings:c})}),t.get("/api/push/workspaces",async(s,o)=>{let a=await Q().catch(()=>null);if(!a){o.status(401).json({error:"Not logged in"});return}let c=process.env.SPOTA_API_URL??"http://localhost:3000";try{let l=await fetch(`${c}/api/cli/workspaces`,{headers:{Authorization:`Bearer ${a}`}});if(!l.ok){let C=(await l.json().catch(()=>({}))).error??`HTTP ${l.status} from ${c}`;console.error(`[Proto] GET /api/push/workspaces failed: ${C}`),o.status(l.status).json({error:C});return}o.json(await l.json())}catch(l){let u=l instanceof Error?l.message:String(l);console.error(`[Proto] GET /api/push/workspaces network error: ${u}`),o.status(502).json({error:`Network error contacting SaaS API: ${u}`})}}),t.post("/api/push",de.json(),async(s,o)=>{let{workspaceId:a,keepLocalFiles:c}=s.body,l=await Q().catch(()=>null);if(!l){o.status(401).json({error:"Not logged in"});return}let u=ue(e);if(u.length===0){o.json({imported:0,message:"No local tasks found"});return}let C=process.env.SPOTA_API_URL??"http://localhost:3000",P={tasks:u};a&&(P.workspaceId=a);try{let k=await fetch(`${C}/api/cli/import`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${l}`},body:JSON.stringify(P)});if(!k.ok){let _=await k.json().catch(()=>({}));o.status(k.status).json({error:_.error??"Import failed"});return}let w=await k.json();if(!c){for(let _ of u)try{tt(_.filePath)}catch{}r?.({type:"tasks-updated"})}o.json({imported:w.imported,skipped:w.skipped??0,workspaceId:w.workspaceId,boardId:w.boardId})}catch(k){let w=k instanceof Error?k.message:String(k);console.error(`[Proto] POST /api/push network error: ${w}`),o.status(502).json({error:`Network error contacting SaaS API: ${w}`})}}),t.get("/api/copilot/status",(s,o)=>{Re(e).then(a=>o.json(a)).catch(a=>{console.error(`[Proto] GET /api/copilot/status error: ${a instanceof Error?a.message:String(a)}`),o.json({authenticated:!1,source:null,tokenHint:null,username:null})})}),t.post("/api/copilot/login",async(s,o)=>{try{let a=await Re(e);if(a.authenticated){o.json({launched:!1,alreadyAuthenticated:!0,username:a.username??null});return}if(!We()){o.status(400).json({launched:!1,error:"GitHub CLI is not installed. Install gh and authenticate with 'gh auth login'."});return}Pr("gh",["auth","login","--web","--hostname","github.com","--git-protocol","https","--scopes","read:user,copilot"],{cwd:e,detached:!0,stdio:"ignore"}).unref(),o.json({launched:!0})}catch(a){let c=a instanceof Error?a.message:String(a);console.error(`[Proto] POST /api/copilot/login error: ${c}`),o.status(500).json({launched:!1,error:c})}});let i=null;t.get("/api/agent-status",(s,o)=>{o.json(i??{message:"",active:!1,updatedAt:null})}),t.post("/api/agent-status",(s,o)=>{let{message:a,active:c}=s.body;i={message:(a??"").slice(0,200),active:c!==!1,updatedAt:new Date().toISOString()},r?.({type:"agent-status",...i}),o.json({ok:!0})}),t.delete("/api/agent-status",(s,o)=>{i=null,r?.({type:"agent-status",message:"",active:!1,updatedAt:null}),o.json({ok:!0})}),t.get("/api/github-url",(s,o)=>{try{let a=ot("git remote get-url origin",{cwd:e,timeout:3e3}).toString().trim(),c=a.match(/^git@github\.com:(.+?)(?:\.git)?$/);if(c){o.json({githubUrl:`https://github.com/${c[1]}`});return}let l=a.match(/^(https?:\/\/github\.com\/[^/]+\/[^/]+?)(?:\.git)?$/);if(l){o.json({githubUrl:l[1]});return}}catch{}o.json({githubUrl:null})})}function ut(t,e){let r=process.env.SPOTA_ADMIN_EMAIL??"",i=process.env.SPOTA_API_URL??"http://localhost:3000";t.get("/kanban",async(s,o)=>{let a=await Q().catch(()=>null);if(!a){o.type("html").send(rn({port:e}));return}let c=await J().catch(()=>null),l=!1;if(r)try{let C=await fetch(`${i}/api/cli/profile`,{headers:{Authorization:`Bearer ${a}`}}).catch(()=>null);C?.ok&&(l=(await C.json()).email===r)}catch{}let u={port:e,saasMode:!0,boardUrl:c?.url??`${i}/kanban`,boardName:c?.name,isAdmin:l};o.type("html").send(rn(u))})}var Nr=`*{box-sizing:border-box;margin:0;padding:0}
|
|
29159
29355
|
body{font-family:system-ui,sans-serif;background:#0f172a;color:#e2e8f0;padding:32px;max-width:700px;margin:0 auto}
|
|
29160
29356
|
h1{font-size:22px;font-weight:700;color:#f1f5f9;margin-bottom:6px}
|
|
29161
29357
|
h2{font-size:14px;font-weight:600;color:#94a3b8;margin:24px 0 8px;text-transform:uppercase;letter-spacing:.06em}
|
|
@@ -29168,50 +29364,51 @@ code{font-family:monospace;font-size:12px;color:#a5b4fc;word-break:break-all}
|
|
|
29168
29364
|
.badge{display:inline-block;padding:2px 8px;background:rgba(59,130,246,.15);border:1px solid rgba(59,130,246,.3);border-radius:10px;font-size:11px;color:#60a5fa;margin-left:6px}
|
|
29169
29365
|
.badge.green{background:rgba(34,197,94,.15);border-color:rgba(34,197,94,.3);color:#4ade80}
|
|
29170
29366
|
pre{background:#050d1a;border:1px solid #1e293b;border-radius:6px;padding:12px;overflow-x:auto;font-family:monospace;font-size:12px;color:#a5b4fc;margin-top:8px}
|
|
29171
|
-
.note{font-size:11px;color:#64748b;margin-top:8px;padding:8px 10px;background:#0a0f1e;border-radius:6px;border-left:3px solid #334155}`;function
|
|
29367
|
+
.note{font-size:11px;color:#64748b;margin-top:8px;padding:8px 10px;background:#0a0f1e;border-radius:6px;border-left:3px solid #334155}`;function dn(t){return t.replace(/</g,"<").replace(/>/g,">")}var Lr="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none'%3E%3Crect width='32' height='32' rx='7' fill='%232563eb'/%3E%3Crect x='7' y='13' width='3.5' height='10' rx='1.5' fill='white' opacity='.75'/%3E%3Crect x='12.25' y='8.5' width='3.5' height='15' rx='1.5' fill='white'/%3E%3Crect x='17.5' y='14.5' width='3.5' height='8' rx='1.5' fill='white' opacity='.75'/%3E%3Crect x='22.5' y='11' width='2.5' height='11' rx='1.25' fill='white' opacity='.85'/%3E%3C/svg%3E";function nt(t,e){return`<!DOCTYPE html>
|
|
29172
29368
|
<html lang="en">
|
|
29173
|
-
<head><meta charset="UTF-8"><title>Vibeflow \u2014 Inject Overlay</title><link rel="icon" type="image/svg+xml" href="${
|
|
29369
|
+
<head><meta charset="UTF-8"><title>Vibeflow \u2014 Inject Overlay</title><link rel="icon" type="image/svg+xml" href="${Lr}"><style>${Nr}</style></head>
|
|
29174
29370
|
<body>
|
|
29175
29371
|
<h1>Vibeflow \u2014 Inject Overlay</h1>
|
|
29176
|
-
<p style="margin-top:6px">${
|
|
29372
|
+
<p style="margin-top:6px">${t}</p>
|
|
29177
29373
|
${e.join(`
|
|
29178
29374
|
`)}
|
|
29179
|
-
</body></html>`}function
|
|
29375
|
+
</body></html>`}function dt(t,e,r,i){if(i){let u=`${i}/api/overlay.js`,C=r?`window.__PROTO_BOARD_ID='${r}';`:"",P=`javascript:(function(){if(document.getElementById('vibeflow-studio-root')){alert('Vibeflow overlay is already active.')}else{${C}fetch('${u}').then(function(r){return r.text()}).then(function(code){eval(code)}).catch(function(){alert('Failed to load Vibeflow overlay')})}})()`,k=`${C}fetch('${u}').then(r=>r.text()).then(code=>eval(code));`,w=r?`<script src="${u}" data-vibeflow-overlay data-board-id="${r}"></script>`:`<script src="${u}" data-vibeflow-overlay></script>`;t.get("/inject",(_,L)=>{L.type("html").send(nt(`Add the Vibeflow overlay to any page to annotate and create tasks.${r?`<br><span style="font-size:12px;color:#64748b">Connected to board <code style="background:#1e293b;padding:2px 6px;border-radius:4px">${r}</code> via SaaS.</span>`:""}`,[`<h2>Option 1 \u2014 Bookmarklet <span class="badge green">CSP-safe</span> <span class="badge">recommended</span></h2>
|
|
29180
29376
|
<div class="card"><p>Drag this link to your bookmarks bar, then click it on any page to activate the overlay:</p>
|
|
29181
|
-
<a class="bookmarklet" href="${
|
|
29377
|
+
<a class="bookmarklet" href="${P}"><svg class='bookmarklet-icon' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='7' y='13' width='3.5' height='10' rx='1.5' fill='white' opacity='.75'/><rect x='12.25' y='8.5' width='3.5' height='15' rx='1.5' fill='white'/><rect x='17.5' y='14.5' width='3.5' height='8' rx='1.5' fill='white' opacity='.75'/><rect x='22.5' y='11' width='2.5' height='11' rx='1.25' fill='white' opacity='.85'/></svg>Vibeflow annotate</a>
|
|
29182
29378
|
<div class="note">\u2705 Works on pages with strict Content-Security-Policy (uses fetch + eval instead of <script src>).<br>\u26A0\uFE0F Do not click the link here \u2014 drag it to your bookmarks bar first, then use it on your target page.</div></div>`,`<h2>Option 2 \u2014 Browser console <span class="badge green">CSP-safe</span></h2>
|
|
29183
29379
|
<div class="card"><p>Open browser DevTools console on your target page and paste:</p>
|
|
29184
|
-
<pre>${
|
|
29380
|
+
<pre>${dn(k)}</pre>
|
|
29185
29381
|
<div class="note">\u2705 Works on most pages \u2014 uses fetch + eval which respects <code>connect-src https:</code> and <code>unsafe-eval</code>.</div></div>`,`<h2>Option 3 \u2014 Script tag</h2>
|
|
29186
29382
|
<div class="card"><p>Add this tag to your HTML (before <code></body></code>):</p>
|
|
29187
|
-
<pre>${
|
|
29188
|
-
<div class="note">Requires your CSP to allow loading scripts from <code>${
|
|
29383
|
+
<pre>${dn(w)}</pre>
|
|
29384
|
+
<div class="note">Requires your CSP to allow loading scripts from <code>${i}</code>. Suitable when you control the page's HTML.</div></div>`]))});return}let s=`http://localhost:${e}/vibeflow-overlay.js`,o=r?` data-board-id="${r}"`:"",a=`<script src="${s}" data-vibeflow-overlay${o}></script>`,c=r?`s.setAttribute('data-board-id','${r}');`:"",l=`javascript:(function(){if(document.getElementById('vibeflow-studio-root')){alert('Vibeflow overlay is already active on this page.');}else{var s=document.createElement('script');s.src='${s}';s.setAttribute('data-vibeflow-overlay','');${c}document.head.appendChild(s);}})()`;t.get("/inject",(u,C)=>{C.type("html").send(nt("Add the Vibeflow overlay to any page without modifying source code.",[`<h2>Option 1 \u2014 Bookmarklet <span class="badge">recommended</span></h2>
|
|
29189
29385
|
<div class="card"><p>Drag this link to your bookmarks bar, then click it on any page to activate the overlay:</p>
|
|
29190
|
-
<a class="bookmarklet" href="${
|
|
29386
|
+
<a class="bookmarklet" href="${l}"><svg class='bookmarklet-icon' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='7' y='13' width='3.5' height='10' rx='1.5' fill='white' opacity='.75'/><rect x='12.25' y='8.5' width='3.5' height='15' rx='1.5' fill='white'/><rect x='17.5' y='14.5' width='3.5' height='8' rx='1.5' fill='white' opacity='.75'/><rect x='22.5' y='11' width='2.5' height='11' rx='1.25' fill='white' opacity='.85'/></svg>Vibeflow annotate</a>
|
|
29191
29387
|
<div class="note">\u26A0\uFE0F Do not click the link here \u2014 drag it to your bookmarks bar first, then use it on your target page.</div></div>`,`<h2>Option 2 \u2014 Script tag</h2>
|
|
29192
29388
|
<div class="card"><p>Add this tag to your HTML (before <code></body></code>):</p>
|
|
29193
|
-
<pre>${
|
|
29389
|
+
<pre>${dn(a)}</pre>
|
|
29194
29390
|
<div class="note">Requires the proto server to be running at port ${e}. Works without the Chrome extension.</div></div>`,`<h2>Option 3 \u2014 Browser console</h2>
|
|
29195
29391
|
<div class="card"><p>Open browser DevTools console and paste:</p>
|
|
29196
|
-
<pre>var s=document.createElement('script');s.src='${
|
|
29392
|
+
<pre>var s=document.createElement('script');s.src='${s}';s.setAttribute('data-vibeflow-overlay','');${r?`s.setAttribute('data-board-id','${r}');`:""}document.head.appendChild(s);</pre></div>`,'<div class="note" style="margin-top:20px">\u2699\uFE0F <strong>CSP note:</strong> If your app sets a strict Content-Security-Policy, use the Chrome extension instead \u2014 it bypasses CSP by injecting in the main world.</div>']))})}function pt(t,e,r){t.use("/trpc",Tr({router:Qn,createContext:()=>({projectDir:e,broadcast:r})}))}function ft(t){t.use((e,r,i,s)=>{console.error("[Proto] Unhandled error:",e.message),i.status(500).json({error:"Internal server error"})})}function mt(t){t.use((e,r,i)=>{if(r.setHeader("Access-Control-Allow-Origin","*"),r.setHeader("Access-Control-Allow-Methods","GET, POST, PATCH, DELETE, OPTIONS"),r.setHeader("Access-Control-Allow-Headers","Content-Type"),e.method==="OPTIONS"){r.status(204).end();return}i()})}function gt(t){t.disable("x-powered-by"),t.use((e,r,i)=>{r.setHeader("Content-Security-Policy",["default-src 'self'","script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://cdn.tailwindcss.com https://unpkg.com","style-src 'self' 'unsafe-inline' https://fonts.googleapis.com","font-src 'self' https://fonts.gstatic.com","img-src 'self' data: blob:","connect-src 'self' ws://localhost:* ws://127.0.0.1:* wss://localhost:* wss://127.0.0.1:*","frame-ancestors 'none'","object-src 'none'","base-uri 'self'","form-action 'self'","worker-src 'self' blob:"].join("; ")),r.setHeader("Permissions-Policy","camera=(), microphone=(), geolocation=()"),r.setHeader("X-Content-Type-Options","nosniff"),r.setHeader("X-Frame-Options","DENY"),r.setHeader("Referrer-Policy","strict-origin-when-cross-origin"),r.setHeader("Cross-Origin-Embedder-Policy","unsafe-none"),r.setHeader("Cross-Origin-Opener-Policy","same-origin"),i()})}async function Fr(t,e){let r=e._testToken!==void 0?e._testToken:await Q().catch(()=>null),i=e._testWorkspace!==void 0?e._testWorkspace:r?await J().catch(()=>null):null,s=!!(r&&i),o=de();mt(o),gt(o),o.use(de.json({limit:"10mb"}));let a=rt(o),c=new at({server:a}),l=k=>{let w=JSON.stringify(k);for(let _ of c.clients)_.readyState===it.OPEN&&_.send(w)};c.on("connection",k=>{k.on("message",w=>{try{JSON.parse(w.toString()).type==="ping"&&k.send(JSON.stringify({type:"pong"}))}catch{}})});let C=(i?.url?(()=>{try{return new URL(i.url).origin}catch{return null}})():null)??process.env.SPOTA_API_URL??"http://localhost:3000";if(s){o.use(["/api/tasks","/api/push","/trpc"],(w,_)=>{_.status(503).json({error:"Online mode active \u2014 local task API is disabled. All task operations go through the SaaS backend."})});let k=Tn(C);o.get("/vibeflow-overlay.js",(w,_)=>{_.type("application/javascript").send(k)})}else{Te(t);let k=en(e.port);o.get("/vibeflow-overlay.js",(w,_)=>{_.type("application/javascript").send(k)}),o.use("/screenshots",de.static(ae(t,ce,Ie))),st(o,[]),lt(o,t,l),pt(o,t,l),ct(o,t,l)}ut(o,e.port),dt(o,e.port,s?i?.id:void 0,s?C:void 0);let P=s?null:Je(ae(t,".vibeflow","tasks"),{onChanged:k=>{let w=Ce(k);l(w?{type:"task-changed",taskId:w.id,action:"update",task:w,source:"cli"}:{type:"tasks-updated"})},onDeleted:k=>{let w=me(k,".json");l({type:"task-deleted",taskId:w})}});return ft(o),new Promise((k,w)=>{a.listen(e.port,()=>{let _=`http://localhost:${e.port}`,L=g.dim(" "+"\u2500".repeat(62));console.log(),console.log(g.green(" \u2713 Vibeflow running")+g.dim(" \xB7 ")+g.cyan(_)),console.log(L),s?(console.log(g.dim(" Mode: ")+g.green("\u25CF Online")+g.dim(" \u2014 connected to Vibeflow SaaS")),console.log(g.dim(" Board: ")+g.white(i.name??"your board")),console.log(g.dim(" Web: ")+g.cyan(i.url)),console.log(L),console.log(g.dim(" Overlay script: ")+g.cyan(`${_}/vibeflow-overlay.js`)),console.log(),console.log(g.dim(" \u250C\u2500 Add to your HTML ")+g.dim("\u2500".repeat(43)+"\u2510")),console.log(g.dim(" \u2502 ")+g.yellow(`<script src="${_}/vibeflow-overlay.js" data-vibeflow-overlay></script>`)+g.dim(" \u2502")),console.log(g.dim(" \u2502 ")+g.dim("Or drag the bookmarklet: ")+g.cyan(`${_}/inject`)+g.dim(" \u2502")),console.log(g.dim(" \u2514"+"\u2500".repeat(63)+"\u2518"))):(console.log(g.dim(" Mode: ")+g.yellow("\u25CE Local")+g.dim(" \u2014 no account needed")),console.log(L),console.log(g.bold.white(" BOARDS & APIS")),console.log(g.dim(" Kanban board ")+g.cyan(`${_}/kanban`)),console.log(g.dim(" Task API ")+g.cyan(`${_}/api/tasks`)),console.log(L),console.log(g.bold.white(" INTEGRATE INTO YOUR APP")+g.dim(` (full guide: ${_}/inject)`)),console.log(g.dim(" 1. Add this script tag to your HTML:")),console.log(g.dim(" ")+g.yellow(`<script src="${_}/vibeflow-overlay.js" data-vibeflow-overlay></script>`)),console.log(g.dim(" 2. Reload your page \u2014 the overlay appears automatically.")),console.log(g.dim(" 3. Click anything to annotate it.")),console.log(L),console.log(g.dim(" Bookmarklet \u2014 no code changes needed:")),console.log(g.dim(" Visit and drag the bookmarklet from ")+g.cyan(`${_}/inject`)+g.dim(" to your bookmarks bar."))),console.log(),console.log(g.dim(" Press Ctrl+C to stop")),console.log(),k({url:_,close:async()=>{P&&await P.close(),c.close(),await new Promise(m=>a.close(()=>m()))}})}),a.on("error",w)})}async function pn(t,e){if(!t)return Fr(e.projectDir??process.cwd(),e);if(t.startsWith("http://")||t.startsWith("https://"))throw new Error(`Proxy mode is no longer supported.
|
|
29197
29393
|
To annotate an existing app, run: proto serve (API-only mode)
|
|
29198
|
-
Then install the Chrome extension and navigate to your app.`);let r=
|
|
29199
|
-
`);
|
|
29394
|
+
Then install the Chrome extension and navigate to your app.`);let r=Cr(t),s=kr(r).isDirectory(),o=s?br(r).filter(m=>Sr(m)===".html").map(m=>ae(r,m)):[r];if(o.length===0)throw new Error("No HTML files found at "+t);let a=s?r:Er(r);Te(a);let c=de();mt(c),gt(c),c.use(de.json({limit:"10mb"}));let l=rt(c),u=new at({server:l}),C=m=>{let N=JSON.stringify(m);for(let H of u.clients)H.readyState===it.OPEN&&H.send(N)};u.on("connection",m=>{m.on("message",N=>{try{JSON.parse(N.toString()).type==="ping"&&m.send(JSON.stringify({type:"pong"}))}catch{}})});let P=e.noOverlay?null:en(e.port);P&&c.get("/vibeflow-overlay.js",(m,N)=>{N.type("application/javascript").send(P)}),c.use("/screenshots",de.static(ae(a,ce,Ie))),s&&c.get("/",(m,N)=>{let H=o.map(K=>{let O=me(K);return`<li><a href="/${O}">${O}</a></li>`}).join(`
|
|
29395
|
+
`);N.send(`<!DOCTYPE html><html><head><title>Vibeflow Studio</title>
|
|
29200
29396
|
<style>body{font-family:system-ui;max-width:600px;margin:40px auto;padding:0 20px}
|
|
29201
29397
|
a{color:#2563eb;text-decoration:none}a:hover{text-decoration:underline}
|
|
29202
29398
|
li{margin:8px 0}</style></head>
|
|
29203
29399
|
<body><h1>Vibeflow Studio</h1>
|
|
29204
29400
|
<p>Select a prototype to review:</p>
|
|
29205
|
-
<ul>${
|
|
29206
|
-
Push them to your board now? [Y/n]: `),async
|
|
29207
|
-
Login timed out. Please try again.`)),process.exit(1)}import
|
|
29208
|
-
Uploading ${o} file(s) (${
|
|
29209
|
-
`),{uploaded:l,failed:u,failedFiles:y}}async function pt(n,e){let r=Rr(n),s=await z();if(!s&&(console.log(H.yellow(" Not logged in. Starting login flow...")),await Fe(),s=await z(),!s)){console.error(H.red(" Login failed. Please run `vibeflow login` and try again.")),process.exitCode=1;return}let a=se(r);if(a.length===0){console.log(H.dim(" No local tasks found. Nothing to push."));return}console.log(H.cyan(` Found ${a.length} local task(s). Pushing to SaaS...`));let o=Lr(),i=e.workspace;if(!i){let m=await G();m&&(i=m.id,console.log(H.dim(` Using board: ${m.icon??""} ${m.name}`)))}let l={tasks:a};i&&(l.workspaceId=i);let u;try{let m=await fetch(`${o}/api/cli/import`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`},body:JSON.stringify(l)});if(!m.ok){let T=await m.json().catch(()=>({}));console.error(H.red(` Import failed: ${m.status} ${T.error??m.statusText}`)),process.exitCode=1;return}u=await m.json()}catch(m){let T=m instanceof Error?m.message:String(m);console.error(H.red(` Network error: ${T}`)),process.exitCode=1;return}console.log(H.green(` \u2713 Pushed ${u.imported} task(s) to SaaS`)),u.skipped&&u.skipped>0&&console.log(H.dim(` Skipped ${u.skipped} already-imported task(s).`));let d=(await G())?.name??u.workspaceId;console.log(H.dim(` Board: ${d}`));let h=u.idMap??{},y=a.filter(m=>m.id&&h[m.id]).map(m=>({localId:m.id,remoteId:h[m.id]})),{uploaded:k,failed:v,failedFiles:x}=await Ar(o,s,r,y);if(k>0&&console.log(H.green(` \u2713 Uploaded ${k} file(s) to storage`)),v>0){console.log(H.yellow(` \u26A0 ${v} file(s) failed to upload`));for(let m of x)console.log(H.dim(` - ${m.name}: ${m.reason}`))}if(e.keepLocalFiles){console.log(H.dim(" Local task files kept (--keep-local-files)."));return}let N=0;for(let m of a)try{Ir(m.filePath),N++}catch{}console.log(H.dim(` Deleted ${N} local task file(s).`))}var Or="http://localhost:3000";function Le(){return process.env.SPOTA_API_URL??Or}var Mr={backlog:"backlog",todo:"todo","in-progress":"in_progress",review:"review",done:"done"},Hr={backlog:"backlog",todo:"todo",in_progress:"in-progress",review:"review",done:"done",cancelled:"done"};function ue(n){return Hr[n]??"todo"}function Ur(n){return Mr[n]??"todo"}async function De(){let n=await z();return n?{Authorization:`Bearer ${n}`}:null}async function xe(n){let e=await De();if(!e)return null;let r=new URL(`${Le()}/api/cli/tasks`);n&&r.searchParams.set("boardId",n);try{let s=await fetch(r.toString(),{headers:e});return s.ok?s.json():null}catch{return null}}async function ft(n){let e=await xe();return e?e.tasks.find(r=>r.id===n)??null:null}async function mt(n,e){let r=await De();if(!r)return null;let s={};e.status!==void 0&&(s.status=Ur(e.status)),e.title!==void 0&&(s.title=e.title),e.description!==void 0&&(s.description=e.description),e.priority!==void 0&&(s.priority=e.priority);try{let a=await fetch(`${Le()}/api/cli/tasks/${encodeURIComponent(n)}`,{method:"PATCH",headers:{...r,"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok)return null;let o=await a.json();return{task:o.task,warning:o.warning}}catch{return null}}async function gt(n,e){let r=await De();if(!r)return null;try{let s=await fetch(`${Le()}/api/cli/tasks/${encodeURIComponent(n)}/comments`,{method:"POST",headers:{...r,"Content-Type":"application/json"},body:JSON.stringify({body:e})});return s.ok?(await s.json()).comment:null}catch{return null}}async function ht(n){let e=await De();if(!e)return null;try{let r=await fetch(`${Le()}/api/cli/tasks`,{method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(n)});return r.ok?(await r.json()).task:null}catch{return null}}import{readFileSync as rn,existsSync as on,unlinkSync as jr}from"fs";import{resolve as B,join as vt,basename as yt}from"path";import t from"chalk";ut();var de={backlog:t.gray,todo:t.yellow,"in-progress":t.blue,review:t.magenta,done:t.green},$r=new Set(["Task","Bug","Research"]);function zr(n){if(n){for(let e of $r)if(e.toLowerCase()===n.toLowerCase())return e}}function Ae(n){let e=(n??"Medium").trim().toLowerCase();return e==="critical"?0:e==="high"?1:e==="low"?3:2}function bt(n){try{return Me("git",["push"],{cwd:n,stdio:"inherit"}),{ok:!0}}catch{try{let e=an("git rev-parse --abbrev-ref HEAD",{cwd:n}).toString().trim();return Me("git",["push","--set-upstream","origin",e],{cwd:n,stdio:"inherit"}),{ok:!0}}catch(e){return{ok:!1,error:(e instanceof Error?e.message:String(e)).slice(0,220)}}}}function Oe(n){let{autoCommit:e,autoPush:r,autoComment:s,createBranch:a}=n;if(console.log(t.bold("Agent instructions (concise):")),console.log(t.dim(" Discover: vibeflow tasks --status todo | vibeflow tasks --type Research | vibeflow tasks --user <email>")),console.log(t.dim(" Details: vibeflow tasks --get <id> (full task info with comments and files)")),console.log(t.dim(' Create: vibeflow tasks --add --title "..." --description "..."')),console.log(),console.log(t.dim(" Workflow:")),console.log(t.yellow(" \u26A0 IMMEDIATELY set in-progress BEFORE any implementation work:")),console.log(t.dim(" 1. vibeflow tasks --edit <id> --set-status in-progress \u2190 DO THIS FIRST")),console.log(t.dim(" 2. <implement the change>")),e){console.log(t.dim(" 3. git add <files> (stage your changes first)"));let o=["--set-status review"];e&&o.push('--commit-message "<one-line summary>"'),s&&o.push('--comment "<report>"'),console.log(t.dim(` 4. vibeflow tasks --edit <id> ${o.join(" ")}`)),console.log(t.dim(" CLI will commit staged changes and link the commit SHA automatically."))}else{console.log(t.dim(' 3. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"'));let o=["--set-status review"];s&&o.push('--comment "<report>"'),console.log(t.dim(` 4. vibeflow tasks --edit <id> ${o.join(" ")}`))}s&&(console.log(t.dim("")),console.log(t.dim(" Comment format (--comment):")),console.log(t.dim(" \xB7 Plain text for concise one-liners.")),console.log(t.dim(" \xB7 Markdown for multi-section reports. Use **bold**, bullet lists, code fences.")),console.log(t.dim(" \xB7 Must cover: what changed, why, key decisions, anything future agents should know.")),console.log(t.dim(" \xB7 For long reports, attach a .md file and reference it in the comment."))),console.log(),e&&console.log(t.dim(" [setting] Auto-commit ON: provide --commit-message when setting status to review; CLI commits.")),r&&console.log(t.dim(" [setting] Auto-push ON: CLI pushes after the commit automatically.")),s&&console.log(t.dim(" [setting] Auto-comment ON: --comment is required when setting status to review.")),a&&(console.log(t.dim(" [setting] Create branch ON: after ALL tasks in this session are done, create and push a descriptive branch:")),console.log(t.dim(" git checkout -b <short-name> (e.g. fix/annotation-errors, feat/eye-toggle, chore/cleanup-extension)")),console.log(t.dim(" git push -u origin HEAD")),console.log(t.dim(" Branch name rules: lowercase, kebab-case, 2-5 words, prefix fix/feat/chore/docs.")),console.log(t.dim(" Describe the WORK done (not dates). Bad: agent/2026-04-16. Good: fix/bug-errors-visibility."))),n.hasResearchTasks&&(console.log(t.dim(" Research tasks: NEVER generate code \u2014 research only.")),console.log(t.dim(" Attach a .md report before marking Research tasks as review.")),console.log(t.dim(" CLI ENFORCES: cannot mark Research as review without an attached .md report.")),console.log(t.dim(" Use --report-file <path> to upload your .md report when marking as review:")),console.log(t.dim(' vibeflow tasks --edit <id> --set-status review --report-file ./report.md --comment "..."')),console.log(t.dim(" The file is uploaded to the task and deleted from the local filesystem automatically."))),n.hasBugTasks&&(console.log(t.dim(" Bug tasks: Include error logs / stack traces in the commit comment.")),console.log(t.dim(" Describe: the symptom, the console error, what triggered it, and how it was fixed."))),console.log(t.red(" CRITICAL: NEVER edit .vibeflow/ task files directly.")),console.log(t.dim(" All task operations (status, comments, commits) must go through CLI commands.")),console.log(t.red(" CRITICAL: Set in-progress BEFORE reading/planning. Other agents may pick the same task.")),console.log(t.dim(" The in-progress transition signals ownership. Skip it and another agent may duplicate your work.")),console.log(t.dim(" Sequence: discover tasks \u2192 pick one \u2192 set in-progress \u2192 THEN read details and implement.")),console.log(t.red(' CRITICAL: NEVER set a task status to "done".')),console.log(t.dim(' When your implementation is complete, set the status to "review" \u2014 not "done".')),console.log(t.dim(" Only humans can mark tasks as done after reviewing the work.")),console.log(t.dim(" The CLI will warn you and still allow the change \u2014 but agents must not use it.")),console.log()}var re=new Wr;re.name("vibeflow").description("Vibeflow \u2014 CLI tool for frontend prototyping with LLM assistance").version("1.0.0");re.addHelpText("after",`
|
|
29401
|
+
<ul>${H}</ul></body></html>`)});for(let m of o){let N=s?`/${me(m)}`:"/";c.get(N,(H,K)=>{let O=yr(m,"utf-8"),q=P?In(O,P):O;K.type("html").send(q)})}let k=o.map(m=>`/${me(m)}`);st(c,s?k:[]),lt(c,a,C),pt(c,a,C),ct(c,a,C),ut(c,e.port),dt(c,e.port);let w=null;w=Xe(r,{onChange:m=>{let N=me(m);console.log(g.dim(` File changed: ${N}`)),C({type:"reload",file:N})}});let _=ae(a,".vibeflow","tasks"),L=Je(_,{onChanged:m=>{let N=Ce(m);C(N?{type:"task-changed",taskId:N.id,action:"update",task:N,source:"cli"}:{type:"tasks-updated"})},onDeleted:m=>{let N=me(m,".json");C({type:"task-deleted",taskId:N})}});return ft(c),new Promise((m,N)=>{let H=e.host??"localhost";l.listen(e.port,H,()=>{let K=H==="0.0.0.0"?Rr()??"localhost":H,O=`http://localhost:${e.port}`,q=H==="0.0.0.0"?`http://${K}:${e.port}`:null,ie=g.dim(" "+"\u2500".repeat(62));console.log(),console.log(g.green(" \u2713 Vibeflow running")+g.dim(" \xB7 ")+g.cyan(O)),q&&console.log(g.dim(" LAN access: ")+g.cyan(q)),console.log(ie);for(let se of o){let oe=s?`/${me(se)}`:"/";console.log(g.dim(" File: ")+g.cyan(`${O}${oe}`)+g.dim(` (${me(se)})`))}console.log(g.dim(" Kanban board: ")+g.cyan(`${O}/kanban`)),console.log(g.dim(" Task API: ")+g.cyan(`${O}/api/tasks`)),console.log(ie),console.log(g.bold.white(" INTEGRATE INTO YOUR APP")+g.dim(` (full guide: ${O}/inject)`)),console.log(g.dim(" 1. Add this script tag to your HTML:")),console.log(g.dim(" ")+g.yellow(`<script src="${O}/vibeflow-overlay.js" data-vibeflow-overlay></script>`)),console.log(g.dim(" 2. Reload your page \u2014 the overlay appears automatically.")),console.log(g.dim(" 3. Click anything to annotate it.")),console.log(),console.log(g.dim(" Press Ctrl+C to stop")),console.log(),e.open&&import("open").then(se=>se.default(O)).catch(()=>{}),m({url:O,close:async()=>{w&&await w.close(),await L.close(),u.close(),await new Promise(se=>l.close(()=>se()))}})}),l.on("error",N)})}async function ve(){return await Q()?"saas":"local"}import F from"chalk";import Dr from"open";import ht from"readline";import Ar from"@inquirer/select";import{existsSync as Or,readdirSync as vt,readFileSync as Mr}from"fs";import{join as fn}from"path";var Hr="http://localhost:3000",Ur=300*1e3;function yt(){return process.env.SPOTA_API_URL??Hr}async function Wr(t){return new Promise(e=>setTimeout(e,t))}async function jr(t){return t.length===1?(console.log(F.dim(` Using board: ${t[0].icon??""} ${t[0].name}`)),t[0]):await Ar({message:"Select a board to use:",choices:t.map(r=>({name:`${r.icon??""} ${r.name}`,value:r}))})}async function bt(t,e){try{let r=await fetch(`${t}/api/cli/settings`,{headers:{Authorization:`Bearer ${e}`}});if(!r.ok)return;let i=await r.json();i.settings&&Object.keys(i.settings).length>0&&zn({...i.settings,_settingsRefreshedAt:Date.now()})}catch{}}async function kt(){try{let t=await Q();if(!t)return;let r=an()._settingsRefreshedAt??0;if(Date.now()-r<Ur)return;let i=yt();bt(i,t)}catch{}}async function $r(t,e){try{let[r,i]=await Promise.all([fetch(`${t}/api/cli/workspaces`,{headers:{Authorization:`Bearer ${e}`}}),fetch(`${t}/api/cli/profile`,{headers:{Authorization:`Bearer ${e}`}})]);if(!r.ok)return;let s=await r.json();if(!s.workspaces?.length){console.log(F.yellow(" No boards found. Create a board in the web app first."));return}let o=i.ok?await i.json():null,a=await jr(s.workspaces);await Pn({...a,email:o?.email??null}),console.log(F.green(` Board set: ${a.icon??""} ${a.name}`)),console.log(F.dim(` Open at: ${a.url}`))}catch{}}async function zr(t,e,r){let i=fn(process.cwd(),".vibeflow","tasks");if(!Or(i))return;let s=[];try{for(let u of vt(i))if(!u.startsWith(".")){let C=fn(i,u);for(let P of vt(C).filter(k=>k.endsWith(".json")))s.push(fn(C,P))}}catch{return}if(s.length===0)return;let o=s.flatMap(u=>{try{return[JSON.parse(Mr(u,"utf-8"))]}catch{return[]}}),a=new Set;try{let u=await fetch(`${t}/api/cli/tasks?boardId=${r.id}`,{headers:{Authorization:`Bearer ${e}`}}).catch(()=>null);if(u?.ok){let C=await u.json();a=new Set((C.tasks??[]).flatMap(P=>[P.id,...P.cliId?[P.cliId]:[]]))}}catch{}let c=o.filter(u=>!a.has(u.id));if(c.length===0)return;console.log(),console.log(F.bold(` ${c.length} local task${c.length!==1?"s are":" is"} not yet synced to the board:`));let l=c.slice(0,10);for(let u of l){let C=u.status?F.dim(` [${u.status}]`):"";console.log(F.dim(` \u2022 ${u.title??u.id}${C}`))}return c.length>10&&console.log(F.dim(` \u2026 and ${c.length-10} more`)),new Promise(u=>{let C=ht.createInterface({input:process.stdin,output:process.stdout});C.question(F.cyan(`
|
|
29402
|
+
Push them to your board now? [Y/n]: `),async P=>{if(C.close(),P.trim().toLowerCase()==="n"){console.log(F.dim(" Skipped. You can push later with: vibeflow push")),u();return}let k=ht.createInterface({input:process.stdin,output:process.stdout});k.question(F.cyan(" Delete local task files after push? [y/N]: "),async w=>{k.close();let _=w.trim().toLowerCase()!=="y";try{let L=await fetch(`${t}/api/cli/import`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({boardId:r.id,tasks:c,keepLocalFiles:_})}),m={};try{m=await L.json()}catch{}L.ok?(console.log(F.green(` \u2713 Pushed ${m.imported??0} task${(m.imported??0)!==1?"s":""} to ${r.name}`)),(m.skipped??0)>0&&console.log(F.dim(` (${m.skipped} already existed and were skipped)`))):console.log(F.red(` Push failed: ${m.error??`HTTP ${L.status}`}`))}catch(L){console.log(F.red(` Push failed: ${L instanceof Error?L.message:"Network error"}`))}u()})})})}async function Ve(){let t=yt();console.log(F.cyan(" Initiating device login flow..."));let e=await fetch(`${t}/api/cli/auth/device-init`,{method:"POST",headers:{"Content-Type":"application/json"}});e.ok||(console.error(F.red(` Failed to initiate login: ${e.status} ${e.statusText}`)),process.exit(1));let{deviceCode:r,userCode:i,verificationUrl:s,expiresIn:o}=await e.json();console.log(),console.log(F.bold(" Open this URL in your browser to authorize:")),console.log(F.underline(` ${s}`)),console.log();try{await Dr(s),console.log(F.dim(" (Browser opened automatically)"))}catch{}let a=Date.now()+o*1e3,c=3e3;for(;Date.now()<a;){await Wr(c);let l=await fetch(`${t}/api/cli/auth/device-poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:r})});if(!l.ok){console.error(F.red(" Poll request failed. Retrying..."));continue}let u=await l.json();if("token"in u){await Vn(u.token),console.log(),console.log(F.green(" Logged in successfully. Now operating in SaaS mode.")),await Promise.all([$r(t,u.token),bt(t,u.token)]);let{readWorkspace:C}=await import("./workspace-KGOQ67YV.js"),P=await C();P&&await zr(t,u.token,P);return}"expired"in u&&(console.error(F.red(" Device code expired. Please try again.")),process.exit(1)),process.stdout.write(F.dim("."))}console.error(F.red(`
|
|
29403
|
+
Login timed out. Please try again.`)),process.exit(1)}import Br from"chalk";async function wt(){await qn(),console.log(Br.green(" Logged out. Now operating in local mode."))}import B from"chalk";import{unlinkSync as Vr,readFileSync as qr,existsSync as Yr}from"fs";import{resolve as Kr,join as Qr}from"path";var Gr="http://localhost:3000";function Xr(){return process.env.SPOTA_API_URL??Gr}function Jr(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function xt(t,e,r=24){let i=Math.round(t/e*r);return`[${"\u2588".repeat(i)+"\u2591".repeat(r-i)}]`}async function Zr(t,e,r,i){let s=[];for(let{localId:w,remoteId:_}of i){let L=ne(r,w);for(let m of L){let N=m.linkedPath??Qr(xn(r,w),m.name);Yr(N)&&s.push({remoteId:_,name:m.name,filePath:N,size:m.size})}}if(s.length===0)return{uploaded:0,failed:0,failedFiles:[]};let o=s.length,a=s.reduce((w,_)=>w+_.size,0);console.log(B.cyan(`
|
|
29404
|
+
Uploading ${o} file(s) (${Jr(a)})...`));let c=0,l=0,u=0,C=Date.now(),P=[];for(let w of s){let _=Math.round(c/o*100),L=xt(c,o),m=(Date.now()-C)/1e3,N=u/Math.max(m,.01),H=a-u,K=N>0?Math.ceil(H/N):0,O=K>60?`${Math.ceil(K/60)}m`:`${K}s`;process.stdout.write(`\r ${L} ${_}% ${w.name.slice(0,28)} ETA: ${O} `);try{let q=qr(w.filePath),ie=await fetch(`${t}/api/tasks/${encodeURIComponent(w.remoteId)}/files`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/octet-stream","x-filename":encodeURIComponent(w.name)},body:q});ie.ok?(c++,u+=w.size):(l++,P.push({name:w.name,reason:`HTTP ${ie.status}`}))}catch(q){l++,P.push({name:w.name,reason:q instanceof Error?q.message:String(q)})}}let k=xt(o,o);return process.stdout.write(`\r ${k} 100% Done${" ".repeat(40)}
|
|
29405
|
+
`),{uploaded:c,failed:l,failedFiles:P}}async function Ct(t,e){let r=Kr(t),i=await Q();if(!i&&(console.log(B.yellow(" Not logged in. Starting login flow...")),await Ve(),i=await Q(),!i)){console.error(B.red(" Login failed. Please run `vibeflow login` and try again.")),process.exitCode=1;return}let s=ue(r);if(s.length===0){console.log(B.dim(" No local tasks found. Nothing to push."));return}console.log(B.cyan(` Found ${s.length} local task(s). Pushing to SaaS...`));let o=Xr(),a=e.workspace;if(!a){let m=await J();m&&(a=m.id,console.log(B.dim(` Using board: ${m.icon??""} ${m.name}`)))}let c={tasks:s};a&&(c.workspaceId=a);let l;try{let m=await fetch(`${o}/api/cli/import`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(c)});if(!m.ok){let N=await m.json().catch(()=>({}));console.error(B.red(` Import failed: ${m.status} ${N.error??m.statusText}`)),process.exitCode=1;return}l=await m.json()}catch(m){let N=m instanceof Error?m.message:String(m);console.error(B.red(` Network error: ${N}`)),process.exitCode=1;return}console.log(B.green(` \u2713 Pushed ${l.imported} task(s) to SaaS`)),l.skipped&&l.skipped>0&&console.log(B.dim(` Skipped ${l.skipped} already-imported task(s).`));let u=(await J())?.name??l.workspaceId;console.log(B.dim(` Board: ${u}`));let C=l.idMap??{},P=s.filter(m=>m.id&&C[m.id]).map(m=>({localId:m.id,remoteId:C[m.id]})),{uploaded:k,failed:w,failedFiles:_}=await Zr(o,i,r,P);if(k>0&&console.log(B.green(` \u2713 Uploaded ${k} file(s) to storage`)),w>0){console.log(B.yellow(` \u26A0 ${w} file(s) failed to upload`));for(let m of _)console.log(B.dim(` - ${m.name}: ${m.reason}`))}if(e.keepLocalFiles){console.log(B.dim(" Local task files kept (--keep-local-files)."));return}let L=0;for(let m of s)try{Vr(m.filePath),L++}catch{}console.log(B.dim(` Deleted ${L} local task file(s).`))}var eo="http://localhost:3000";function qe(){return process.env.SPOTA_API_URL??eo}var no={backlog:"backlog",todo:"todo","in-progress":"in_progress",review:"review",done:"done"},to={backlog:"backlog",todo:"todo",in_progress:"in-progress",review:"review",done:"done",cancelled:"done"};function pe(t){return to[t]??"todo"}function ro(t){return no[t]??"todo"}async function Ye(){let t=await Q();return t?{Authorization:`Bearer ${t}`}:null}async function Se(t){let e=await Ye();if(!e)return null;let r=new URL(`${qe()}/api/cli/tasks`);t&&r.searchParams.set("boardId",t);try{let i=await fetch(r.toString(),{headers:e});return i.ok?i.json():null}catch{return null}}async function St(t){let e=await Se();return e?e.tasks.find(r=>r.id===t)??null:null}async function mn(t,e){let r=await Ye();if(!r)return null;let i={};e.status!==void 0&&(i.status=ro(e.status)),e.title!==void 0&&(i.title=e.title),e.description!==void 0&&(i.description=e.description),e.priority!==void 0&&(i.priority=e.priority);try{let s=await fetch(`${qe()}/api/cli/tasks/${encodeURIComponent(t)}`,{method:"PATCH",headers:{...r,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)return null;let o=await s.json();return{task:o.task,warning:o.warning}}catch{return null}}async function Et(t,e){let r=await Ye();if(!r)return null;try{let i=await fetch(`${qe()}/api/cli/tasks/${encodeURIComponent(t)}/comments`,{method:"POST",headers:{...r,"Content-Type":"application/json"},body:JSON.stringify({body:e})});return i.ok?(await i.json()).comment:null}catch{return null}}async function Pt(t){let e=await Ye();if(!e)return null;try{let r=await fetch(`${qe()}/api/cli/tasks`,{method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(t)});return r.ok?(await r.json()).task:null}catch{return null}}import{readFileSync as hn,existsSync as vn,unlinkSync as yo}from"fs";import{resolve as V,join as Dt,basename as At}from"path";import n from"chalk";import{createHash as oo,randomUUID as ao}from"crypto";import{existsSync as io,readFileSync as so,writeFileSync as lo,mkdirSync as co}from"fs";import{join as It}from"path";import Tt from"os";import{PostHog as uo}from"posthog-node";var po="phc_C9AUV3rnayLfVvxgHtvj6AXcwsd8FKWUfJ9262zWsCvM",fo="https://eu.i.posthog.com";function _t(){return It(process.env.HOME??Tt.homedir(),".vibeflow")}function Rt(){return It(_t(),"config.json")}function Ke(){try{return JSON.parse(so(Rt(),"utf-8"))}catch{return{}}}function Nt(t){let e=_t();io(e)||co(e,{recursive:!0});let r=Ke();lo(Rt(),JSON.stringify({...r,...t},null,2),"utf-8")}function Lt(){return process.env.VIBEFLOW_TELEMETRY==="0"?!1:Ke().disabled!==!0}function gn(t){Nt({disabled:!t})}function Ft(){let t=Lt(),e=Ke();return{enabled:t,anonymousId:e.anonymousId??null}}function mo(){let t=Ke();if(t.anonymousId)return t.anonymousId;let e=ao();return Nt({anonymousId:e}),e}function go(){let t=Tt.userInfo().username;return oo("sha256").update(t).digest("hex").slice(0,16)}var Ne=null;function ho(){return Lt()?(Ne||(Ne=new uo(po,{host:fo,flushAt:1,flushInterval:0})),Ne):null}function ye(t,e){let r=ho();if(!r)return;let i=mo();r.capture({distinctId:i,event:t,properties:{...e,$user_id:go()}})}async function be(){if(Ne)try{await Ne.shutdown()}catch{}}function bo(t,e){let r=u=>u.replace(/[^0-9.]/g,"").split(".").map(Number),[i=0,s=0,o=0]=r(t),[a=0,c=0,l=0]=r(e);return i!==a?i>a:s!==c?s>c:o>l}function ko(){let t="0.2.0";if(!t)return;let e="@vibeflow-tools/cli";import("https").then(({default:r})=>{let i=r.get(`https://registry.npmjs.org/${encodeURIComponent(e)}/latest`,{timeout:5e3},s=>{let o="";s.on("data",a=>{o+=a.toString()}),s.on("end",()=>{try{let{version:a}=JSON.parse(o);a&&bo(a,t)&&(console.log(),console.log(n.bgYellow.black.bold(` \u2191 Update available: ${t} \u2192 ${a} `)),console.log(n.dim(" Run: ")+n.cyan(`npm install -g ${e}@${a}`)+n.dim(" to update")),console.log())}catch{}})});i.on("error",()=>{}),i.on("timeout",()=>{i.destroy()})}).catch(()=>{})}kt();var ke={backlog:n.gray,todo:n.yellow,"in-progress":n.blue,review:n.magenta,done:n.green},wo=new Set(["Task","Bug","Research"]);function xo(t){if(t){for(let e of wo)if(e.toLowerCase()===t.toLowerCase())return e}}function ge(t){let e=(t??"Medium").trim().toLowerCase();return e==="critical"?0:e==="high"?1:e==="low"?3:2}var Ot=["in-progress","review","todo","backlog","done"];function Qe(t){let e=Ot.indexOf(t);return e===-1?Ot.length:e}function Mt(t){try{return Ge("git",["push"],{cwd:t,stdio:"inherit"}),{ok:!0}}catch{try{let e=yn("git rev-parse --abbrev-ref HEAD",{cwd:t}).toString().trim();return Ge("git",["push","--set-upstream","origin",e],{cwd:t,stdio:"inherit"}),{ok:!0}}catch(e){return{ok:!1,error:(e instanceof Error?e.message:String(e)).slice(0,220)}}}}function Ee(t){let{autoCommit:e,autoPush:r,autoComment:i,createBranch:s}=t;if(console.log(n.bold("Agent instructions (concise):")),console.log(n.dim(" Discover: vibeflow tasks --status todo | vibeflow tasks --type Research | vibeflow tasks --user <email> | vibeflow tasks --tag <tag>")),console.log(n.dim(" Details: vibeflow tasks --get <id> (full task info with comments and files)")),console.log(n.dim(' Create: vibeflow tasks --add --title "..." --description "..."')),console.log(),console.log(n.dim(" Workflow:")),console.log(n.yellow(" \u26A0 IMMEDIATELY set in-progress BEFORE any implementation work:")),console.log(n.dim(" 1. vibeflow tasks --edit <id> --set-status in-progress \u2190 DO THIS FIRST")),console.log(n.dim(" 2. <implement the change>")),e){console.log(n.dim(" 3. git add <files> (stage your changes first)"));let o=["--set-status review"];e&&o.push('--commit-message "<one-line summary>"'),i&&o.push('--comment "<report>"'),console.log(n.dim(` 4. vibeflow tasks --edit <id> ${o.join(" ")}`)),console.log(n.dim(" CLI will commit staged changes and link the commit SHA automatically."))}else{console.log(n.dim(' 3. git add <files> && vibeflow tasks --commit --task <id> --message "<one-line summary>"'));let o=["--set-status review"];i&&o.push('--comment "<report>"'),console.log(n.dim(` 4. vibeflow tasks --edit <id> ${o.join(" ")}`))}i&&(console.log(n.dim("")),console.log(n.dim(" Comment format (--comment):")),console.log(n.dim(" \xB7 Plain text for concise one-liners.")),console.log(n.dim(" \xB7 Markdown for multi-section reports. Use **bold**, bullet lists, code fences.")),console.log(n.dim(" \xB7 Must cover: what changed, why, key decisions, anything future agents should know.")),console.log(n.dim(" \xB7 For long reports, attach a .md file and reference it in the comment."))),console.log(),e&&console.log(n.dim(" [setting] Auto-commit ON: provide --commit-message when setting status to review; CLI commits.")),r&&console.log(n.dim(" [setting] Auto-push ON: CLI pushes after the commit automatically.")),i&&console.log(n.dim(" [setting] Auto-comment ON: --comment is required when setting status to review.")),s&&(console.log(n.dim(" [setting] Create branch ON: after ALL tasks in this session are done, create and push a descriptive branch:")),console.log(n.dim(" git checkout -b <short-name> (e.g. fix/annotation-errors, feat/eye-toggle, chore/cleanup-extension)")),console.log(n.dim(" git push -u origin HEAD")),console.log(n.dim(" Branch name rules: lowercase, kebab-case, 2-5 words, prefix fix/feat/chore/docs.")),console.log(n.dim(" Describe the WORK done (not dates). Bad: agent/2026-04-16. Good: fix/bug-errors-visibility."))),t.hasResearchTasks&&(console.log(n.dim(" Research tasks: NEVER generate code \u2014 research only.")),console.log(n.dim(" Attach a .md report before marking Research tasks as review.")),console.log(n.dim(" CLI ENFORCES: cannot mark Research as review without an attached .md report.")),console.log(n.dim(" Use --report-file <path> to upload your .md report when marking as review:")),console.log(n.dim(' vibeflow tasks --edit <id> --set-status review --report-file ./report.md --comment "..."')),console.log(n.dim(" The file is uploaded to the task and deleted from the local filesystem automatically."))),t.hasBugTasks&&(console.log(n.dim(" Bug tasks: Include error logs / stack traces in the commit comment.")),console.log(n.dim(" Describe: the symptom, the console error, what triggered it, and how it was fixed."))),console.log(n.red(" CRITICAL: NEVER edit .vibeflow/ task files directly.")),console.log(n.dim(" All task operations (status, comments, commits) must go through CLI commands.")),console.log(n.red(" CRITICAL: Set in-progress BEFORE reading/planning. Other agents may pick the same task.")),console.log(n.dim(" The in-progress transition signals ownership. Skip it and another agent may duplicate your work.")),console.log(n.dim(" Sequence: discover tasks \u2192 pick one \u2192 set in-progress \u2192 THEN read details and implement.")),console.log(n.red(' CRITICAL: NEVER set a task status to "done".')),console.log(n.dim(' When your implementation is complete, set the status to "review" \u2014 not "done".')),console.log(n.dim(" Only humans can mark tasks as done after reviewing the work.")),console.log(n.dim(" The CLI will warn you and still allow the change \u2014 but agents must not use it.")),console.log()}var re=new vo;re.name("vibeflow").description("Vibeflow \u2014 CLI tool for frontend prototyping with LLM assistance").version("0.2.0");re.addHelpText("after",`
|
|
29210
29406
|
${"\u2500".repeat(60)}
|
|
29211
29407
|
For coding agents \u2014 quick reference:
|
|
29212
29408
|
|
|
29213
29409
|
vibeflow tasks List all tasks
|
|
29214
29410
|
vibeflow tasks --status todo Filter to open tasks
|
|
29411
|
+
vibeflow tasks --tag <tag> Filter by tag (repeatable for AND)
|
|
29215
29412
|
vibeflow tasks --get <id> Full task details
|
|
29216
29413
|
vibeflow tasks --edit <id> --set-status in-progress
|
|
29217
29414
|
vibeflow serve [target] Start local server / prototype viewer
|
|
@@ -29237,16 +29434,20 @@ File attachments:
|
|
|
29237
29434
|
<file binary body>
|
|
29238
29435
|
List: GET /api/tasks/<id>/files
|
|
29239
29436
|
Delete: DELETE /api/tasks/<id>/files/<filename>
|
|
29240
|
-
`);re.command("serve").description("Serve HTML prototype(s) with live overlay, or start API-only task server for existing apps").argument("[target]","HTML file or directory of HTML files").option("-p, --port <port>","Port number","3700").option("--no-open","Do not open browser automatically").action(async(
|
|
29241
|
-
`))console.log(
|
|
29242
|
-
`))console.log(
|
|
29243
|
-
`))console.log(
|
|
29244
|
-
`))console.log(
|
|
29245
|
-
`))console.log(
|
|
29246
|
-
`))console.log(t.dim(` \u2502 ${K}`));console.log(t.dim(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"))}catch{}}}let P=X(I),$=(p.type??"").toLowerCase()==="research",J=(p.type??"").toLowerCase()==="bug";Oe({hasResearchTasks:$,hasBugTasks:J,autoCommit:P.autoCommit,autoPush:P.autoPush,autoComment:P.autoComment,createBranch:P.createBranch});return}if(e.add){if(!e.title?.trim()){console.log(t.red("\u2717 --title is required with --add")),console.log(t.dim(' Example: vibeflow tasks --add --title "Fix CTA spacing" --description "Button overflows on mobile"')),process.exitCode=1;return}if(await he()==="saas"){let E=await G(),f=["backlog","todo","in-progress","review","done"].includes(e.setStatus??"")?e.setStatus:"todo",F=un(),P=await ht({id:F,title:e.title.trim(),description:e.description?.trim(),status:f,boardId:E?.id});if(!P){console.log(t.red("\u2717 Failed to create task in online board.")),console.log(t.yellow(" Check your connection or run 'vibeflow login'.")),process.exitCode=1;return}e.json?console.log(JSON.stringify(P,null,2)):(console.log(t.green(`\u2713 Task created: ${P.title}`)),console.log(t.dim(` id: ${P.id} | status: ${ue(P.status)}`)));return}let I=B(n);be(I);let O=["backlog","todo","in-progress","review","done"].includes(e.setStatus??"")?e.setStatus:"todo",p=me(I,{title:e.title.trim(),description:e.description?.trim()??"",status:O,selector:"/"});e.json?console.log(JSON.stringify(p,null,2)):(console.log(t.green(`\u2713 Task created: ${p.title}`)),console.log(t.dim(` id: ${p.id} | status: ${p.status}`)));return}if(e.commit){if(!e.task){console.log(t.red("\u2717 --task <task-id> is required with --commit")),console.log(t.dim(' Example: vibeflow tasks --commit --task abc12345 --message "fix button alignment"')),process.exitCode=1;return}let c=B(n),S=Q(c).find(E=>E.id===e.task||E.id.startsWith(e.task));if(!S){console.log(t.red(`\u2717 Task not found: ${e.task}`)),console.log(t.dim(" Run 'vibeflow tasks' to see available task IDs.")),process.exitCode=1;return}let O=e.message?.trim()||S.title;(S.type??"").toLowerCase()==="research"&&(console.log(t.yellow("\u26A0 WARNING: This is a Research task. Research tasks must NOT produce code changes.")),console.log(t.yellow(" Only commit research report files (.md). Do not commit code changes.")),console.log());let p=`${O} [proto:${S.id}]`;try{Me("git",["commit","-m",p],{cwd:c,stdio:"inherit"});let E=an("git rev-parse HEAD",{cwd:c}).toString().trim(),b={sha:E,message:O,timestamp:new Date().toISOString()},f=S.commits??[];if(U(c,S.id,{commits:[...f,b]}),console.log(t.green(`\u2713 Committed and linked to task: ${S.title}`)),console.log(t.dim(` commit: ${E}`)),console.log(t.dim(` proto: ${S.id}`)),X(c).autoPush){console.log(t.dim(" auto-push: pushing commit to remote..."));let P=bt(c);P.ok?console.log(t.green("\u2713 Auto-push complete")):(console.log(t.yellow("\u26A0 Auto-push failed. Commit is local; run 'git push' manually.")),P.error&&console.log(t.dim(` reason: ${P.error}`)))}}catch{console.log(t.red("\u2717 git commit failed \u2014 ensure changes are staged with 'git add'")),process.exitCode=1}return}if(e.edit!==void 0){let c=typeof e.edit=="string"?e.edit:void 0,I=e.title||e.setStatus||e.description;if(!c||!I){if(e.type&&!i(e.type))return;let b=Q(n);if(e.status&&(b=b.filter(f=>f.status===e.status)),e.type&&(b=b.filter(f=>(f.type??"Task").toLowerCase()===e.type.toLowerCase())),e.user&&!l(e.user,b))return;if(e.user&&(b=b.filter(f=>a(f.author,e.user))),console.log(t.bold("vibeflow tasks --edit \u2014 LLM Usage Instructions")),console.log(),console.log("Edit a task:"),console.log(t.cyan(' vibeflow tasks [dir] --edit <task-id> [--title "new title"] [--set-status backlog|todo|in-progress|review|done] [--description "new description"]')),console.log(),console.log("Examples:"),console.log(t.dim(" vibeflow tasks --edit abc12345 --set-status done")),console.log(t.dim(" vibeflow tasks --edit abc12345 --set-status in-progress")),console.log(t.dim(' vibeflow tasks --edit abc12345 --title "Updated title" --description "More detail"')),console.log(),b.length===0)console.log(t.dim("No tasks found."));else{console.log("Available tasks:");for(let f of b){let F=de[f.status]??t.white;console.log(` ${F(`[${f.status}]`)} ${t.bold(f.id)} \u2014 ${f.title}`)}}return}let S=["backlog","todo","in-progress","review","done"];if(e.setStatus==="done"&&(console.log(t.yellow('\u26A0 WARNING: Agents should NEVER set a task status to "done".')),console.log(t.yellow(" Only humans should mark tasks as done after reviewing.")),console.log(t.dim(" If you are an agent, use --set-status review instead.")),console.log()),e.setStatus&&!S.includes(e.setStatus)){console.log(t.red(`\u2717 Invalid status: "${e.setStatus}"`)),console.log(t.yellow(` Valid statuses: ${S.join(" | ")}`)),console.log(t.dim(` Example: vibeflow tasks --edit ${c} --set-status in-progress`)),process.exitCode=1;return}if(e.setStatus==="review"&&!e.comment?.trim()){console.log(t.red("\u2717 --comment is required when setting status to review")),console.log(t.dim(" Provide a concise implementation report explaining:")),console.log(t.dim(" \xB7 what was changed and why")),console.log(t.dim(" \xB7 key decisions and trade-offs")),console.log(t.dim(" \xB7 anything future agents should know")),console.log(t.dim(` Example: vibeflow tasks --edit ${c} --set-status review --comment "Implemented X by doing Y. Key decision: Z."`)),process.exitCode=1;return}let O=await he();if(e.setStatus==="review"){let b=B(n),f=X(b);if(f.autoComment&&!e.comment?.trim()){console.log(t.red("\u2717 --comment is required (auto-comment setting is ON)")),console.log(t.dim(" Provide: what changed, why, key decisions, anything future agents should know.")),console.log(t.dim(" Plain text for short notes; Markdown for multi-section reports.")),console.log(t.dim(` Example: vibeflow tasks --edit ${c} --set-status review --comment "Implemented X by doing Y."`)),process.exitCode=1;return}if(f.autoCommit&&!e.commitMessage?.trim()){console.log(t.red("\u2717 --commit-message is required (auto-commit setting is ON)")),console.log(t.dim(" Stage your changes first, then provide a one-line commit summary.")),console.log(t.dim(` Example: vibeflow tasks --edit ${c} --set-status review --commit-message "fix: add hover effect" --comment "..."`)),process.exitCode=1;return}}if(O==="saas"){let b={};if(e.setStatus&&(b.status=e.setStatus),e.title&&(b.title=e.title),e.description&&(b.description=e.description),e.setStatus==="in-progress"){let F=await ft(c);if(F&&ue(F.status)==="in-progress"){let P=F.author??"another user";console.log(t.yellow(`\u26A0 Task is already in-progress (last updated by: ${P})`)),console.log(t.yellow(" Another agent or user may be working on this task.")),console.log(t.yellow(" Proceeding \u2014 but verify the task is not being worked on elsewhere.")),console.log()}}let f=await mt(c,b);if(!f){console.log(t.red(`\u2717 Failed to update task: ${c}`)),console.log(t.yellow(" Ensure you are connected and the task ID exists in the online board.")),process.exitCode=1;return}f.warning&&console.log(t.yellow(`\u26A0 Server warning: ${f.warning}`)),e.setStatus==="review"&&e.comment?.trim()&&await gt(c,e.comment.trim())&&console.log(t.dim(" comment: added")),console.log(t.green(`\u2713 Task updated: ${f.task.title}`)),console.log(t.dim(` id: ${f.task.id} | status: ${ue(f.task.status)}`));return}let p={};if(e.title&&(p.title=e.title),e.setStatus&&(p.status=e.setStatus),e.description&&(p.description=e.description),e.setStatus==="in-progress"){let b=B(n),F=Q(b).find(P=>P.id===c||P.id.startsWith(c));if(F&&((F.type??"").toLowerCase()==="research"&&(console.log(t.yellow("\u26A0 WARNING: This is a Research task. Policy: do NOT implement code.")),console.log(t.yellow(" Research only \u2014 attach a .md report file, leave a summary comment, mark as review.")),console.log()),F.status==="in-progress")){let P=F.updated?new Date(F.updated).toLocaleString():"unknown",$=F.author??"another user";console.log(t.yellow(`\u26A0 Task is already in-progress (author: ${$}, last updated: ${P})`)),console.log(t.yellow(" Another agent or user may be working on this task.")),console.log(t.yellow(" Proceeding \u2014 but verify the task is not being worked on elsewhere.")),console.log()}}if(e.setStatus==="review"){let b=B(n),F=Q(b).find(P=>P.id===c||P.id.startsWith(c));if(F&&(F.type??"").toLowerCase()==="research"){if(e.reportFile){let P=B(e.reportFile);if(!on(P)){console.log(t.red(`\u2717 Report file not found: ${P}`)),process.exitCode=1;return}if(!/\.md$/i.test(P)){console.log(t.red("\u2717 Report file must be a Markdown (.md) file")),process.exitCode=1;return}let $=rn(P),{saveFile:J}=await import("./files-UWZP7P6B.js");J(b,F.id,yt(P),$),jr(P),console.log(t.green(`\u2713 Report uploaded: ${yt(P)} (local file removed)`))}else if(!ee(b,F.id).some(J=>/\.md$/i.test(J.name))){console.log(t.red("\u2717 Cannot mark Research task as review: no .md report file attached.")),console.log(t.dim(" Provide a research report:")),console.log(t.dim(` vibeflow tasks --edit ${c} --set-status review --report-file ./my-research.md --comment "..."`)),process.exitCode=1;return}}}let E=U(n,c,p);if(!E){console.log(t.red(`\u2717 Task not found: ${c}`)),console.log(t.yellow(" Run 'vibeflow tasks' to see available task IDs.")),process.exitCode=1;return}if(e.setStatus==="review"&&e.comment?.trim()&&(ce(B(n),c,"agent",e.comment.trim()),console.log(t.dim(" comment: added"))),console.log(t.green(`\u2713 Task updated: ${E.title}`)),console.log(t.dim(` id: ${E.id} | status: ${E.status}`)),e.setStatus==="review"){let b=B(n),f=X(b);if(f.autoCommit&&e.commitMessage?.trim()){let P=Q(b).find($=>$.id===c||$.id.startsWith(c));if(P){let $=`${e.commitMessage.trim()} [proto:${P.id}]`;try{Me("git",["commit","-m",$],{cwd:b,stdio:"inherit"});let J=an("git rev-parse HEAD",{cwd:b}).toString().trim(),R={sha:J,message:e.commitMessage.trim(),timestamp:new Date().toISOString()},C=P.commits??[];if(U(b,P.id,{commits:[...C,R]}),console.log(t.green(`\u2713 Committed: ${$}`)),console.log(t.dim(` sha: ${J}`)),f.autoPush){console.log(t.dim(" pushing..."));let _=bt(b);_.ok?console.log(t.green("\u2713 Pushed")):(console.log(t.yellow("\u26A0 Push failed. Run 'git push' manually.")),_.error&&console.log(t.dim(` reason: ${_.error}`)))}}catch{console.log(t.red("\u2717 git commit failed \u2014 ensure changes are staged with 'git add'")),process.exitCode=1}}}}return}let u=["backlog","todo","in-progress","review","done"];if(e.status&&!u.includes(e.status)){console.log(t.red(`\u2717 Invalid status filter: "${e.status}"`)),console.log(t.yellow(` Valid statuses: ${u.join(" | ")}`)),console.log(t.dim(" Example: vibeflow tasks --status todo")),process.exitCode=1;return}if(e.type&&!i(e.type))return;if(await he()==="saas"){let c=await G(),I=await xe(c?.id);if(!I){console.log(t.red("\u2717 Unable to reach the online backend.")),console.log(t.yellow(" Check your connection or run 'vibeflow login' if your session expired.")),process.exitCode=1;return}let S=I.tasks.map(f=>({...f,status:ue(f.status)}));if(e.status&&(S=S.filter(f=>f.status===e.status)),e.type&&(S=S.filter(f=>(f.type??"Task").toLowerCase()===e.type.toLowerCase())),e.user&&!l(e.user,S))return;e.user&&(S=S.filter(f=>a(f.author,e.user)));let O=e.limit!==void 0?parseInt(e.limit,10):20;if(!isNaN(O)&&O>0&&(S=S.slice(0,O)),e.json){console.log(JSON.stringify(S,null,2));return}let p=S.some(f=>(f.type??"").toLowerCase()==="research"),E=S.some(f=>(f.type??"").toLowerCase()==="bug"),b=X(B(n));if(Oe({hasResearchTasks:p,hasBugTasks:E,autoCommit:b.autoCommit,autoPush:b.autoPush,autoComment:b.autoComment,createBranch:b.createBranch}),S.length===0)console.log(t.dim("No tasks found."));else{S=S.sort((C,_)=>{let K=Ae(C.priority??void 0)-Ae(_.priority??void 0);return K!==0?K:new Date(_.updatedAt).getTime()-new Date(C.updatedAt).getTime()});for(let C of S){let _=de[C.status]??t.white,K=zr(C.type);if(console.log(` ${_(`[${C.status}]`)} ${C.title}`),console.log(t.dim(` id: ${C.id}`)),console.log(t.dim(" selector: /")),K&&console.log(t.dim(` type: ${K}`)),C.priority&&console.log(t.dim(` priority: ${C.priority}`)),console.log(t.dim(` created: ${C.createdAt}`)),C.description){console.log(t.dim(" description:"));for(let V of C.description.split(`
|
|
29247
|
-
`))console.log(
|
|
29248
|
-
`))console.log(
|
|
29249
|
-
`))console.log(
|
|
29250
|
-
`))console.log(t.dim(` ${E}`))}if(p.structuredComments&&p.structuredComments.length>0){console.log(t.dim(` comments (${p.structuredComments.length}):`));for(let E of p.structuredComments){let b=E.updatedAt?` (edited ${E.updatedAt})`:"";console.log(t.dim(` [${E.author??"agent"}] ${E.createdAt}${b}`));for(let f of E.text.split(`
|
|
29251
|
-
`))console.log(
|
|
29252
|
-
`))console.log(
|
|
29437
|
+
`);re.command("serve").description("Serve HTML prototype(s) with live overlay, or start API-only task server for existing apps").argument("[target]","HTML file or directory of HTML files").option("-p, --port <port>","Port number","3700").option("--host <host>","Bind hostname (default: localhost; use 0.0.0.0 for LAN sharing)").option("--no-open","Do not open browser automatically").action(async(t,e)=>{ye("command_run",{command:"serve"}),await be(),await pn(t,{port:parseInt(e.port,10),host:e.host,open:e.open})});re.command("kanban").description("Start the Vibeflow server and open the live Kanban board in the browser").argument("[dir]","Project root directory",".").option("-p, --port <port>","Port number","3700").option("--host <host>","Bind hostname (default: localhost; use 0.0.0.0 for LAN sharing)").action(async(t,e)=>{ye("command_run",{command:"kanban"}),await be();let r=parseInt(e.port,10),s=(await pn(void 0,{port:r,host:e.host,open:!1,projectDir:V(t)})).url+"/kanban";console.log(),console.log(n.green(" \u2713 Kanban board ready")),console.log(n.dim(" ")+n.cyan(s)),console.log(),console.log(n.bold("Agent prompt:")),console.log(n.dim(" Get new tasks from `npx @vibeflow-tools/cli tasks --status todo` and implement them.")),console.log(),import("open").then(o=>o.default(s)).catch(()=>{console.log(n.dim(" Visit: ")+n.cyan(s))}),ko()});re.command("tasks").description("List or edit tasks in the project").argument("[dir]","Project root directory",".").option("--status <status>","Filter by status (backlog, todo, in-progress, review, done)").option("--type <type>","Filter by type (Task, Bug, Feature, Enhancement, Research)").option("--user <user>","Filter by exact task author email (case-insensitive)").option("--edit [task-id]","Edit a task by ID (LLM-friendly). Omit task-id to see usage instructions.").option("--add","Create a task (requires --title)").option("--title <title>","New title for the task (use with --edit)").option("--set-status <status>","New status: backlog | todo | in-progress | review | done (use with --edit)").option("--description <text>","New description for the task (use with --edit)").option("--json","Output machine-readable JSON").option("--commit","Commit staged changes and link the commit SHA to a task (use with --task)").option("--task <task-id>","Task ID to link with the commit (use with --commit)").option("--message <msg>","Commit message (use with --commit; task ID is appended automatically)").option("--comment <text>","Implementation report comment (required when setting status to review)").option("--commit-message <msg>","Commit message for auto-commit on review (required when auto-commit setting is ON)").option("--get <task-id>","Get full details of a single task by ID (supports partial ID prefix)").option("--next","Pick the next available todo task, move it to in-progress, and output it ready to work on").option("--tag <tag>","Filter by tag (can be specified multiple times for AND matching)",(t,e)=>[...e,t],[]).option("--report-file <path>","Path to a local .md file to upload as the research report (use with --set-status review on Research tasks; file is uploaded and deleted locally)").option("--limit <n>","Limit how many tasks are returned in list mode (default: 20; use 0 for unlimited)").action((t,e)=>{(async()=>{let r=e.add?"add":e.next?"next":e.edit?"edit":e.get?"get":"list";ye("command_run",{command:"tasks",subcommand:r});let i=["Task","Bug","Feature","Enhancement","Research"],s=p=>p.trim().toLowerCase(),o=(p,b)=>{let E=s(b);return E?s(p??"")===E:!0},a=p=>[...new Set(p.map(b=>b.author?.trim()).filter(b=>!!b))].sort((b,E)=>b.localeCompare(E)),c=p=>i.map(b=>b.toLowerCase()).includes(p.toLowerCase())?!0:(console.log(n.red(`\u2717 Invalid type filter: "${p}"`)),console.log(n.yellow(` Available types: ${i.join(" | ")}`)),console.log(n.dim(" Type filter is exact (example: --type Bug)")),process.exitCode=1,!1),l=(p,b)=>{let E=a(b);return E.length===0?(console.log(n.red("\u2717 Cannot filter by user: no task authors are available on this board.")),process.exitCode=1,!1):E.some(M=>o(M,p))?!0:(console.log(n.red(`\u2717 User not found: "${p}"`)),console.log(n.yellow(` Available users: ${E.join(" | ")}`)),console.log(n.dim(" User filter is exact email match (case-insensitive).")),process.exitCode=1,!1)};if(e.get){if(await ve()==="saas"){let y=await J(),x=await Se(y?.id);if(!x){console.log(n.red("\u2717 Unable to reach the online backend.")),process.exitCode=1;return}let v=x.tasks.find(U=>U.id===e.get||U.id.startsWith(e.get));if(!v){console.log(n.red(`\u2717 Task not found: ${e.get}`)),process.exitCode=1;return}let W=pe(v.status);if(e.json){console.log(JSON.stringify({...v,status:W},null,2));return}let D=ke[W]??n.white;if(console.log(` ${D(`[${W}]`)} ${n.bold(v.title)}`),console.log(n.dim(` id: ${v.id}`)),console.log(n.dim(" selector: /")),v.type&&console.log(n.dim(` type: ${v.type}`)),v.priority&&console.log(n.dim(` priority: ${v.priority}`)),console.log(n.dim(` created: ${v.createdAt}`)),v.description){console.log(n.dim(" description:"));for(let U of v.description.split(`
|
|
29438
|
+
`))console.log(n.dim(` ${U}`))}v.annotatedElementText&&console.log(n.dim(` element text: ${v.annotatedElementText}`));let Y=[...v.comments??[]].sort((U,A)=>new Date(U.createdAt).getTime()-new Date(A.createdAt).getTime());if(Y.length>0){console.log(n.dim(` comments (${Y.length}):`));for(let U of Y){console.log(n.dim(` [${U.author??"agent"}] ${U.createdAt}`));for(let A of U.body.split(`
|
|
29439
|
+
`))console.log(n.dim(` ${A}`))}}if(v.files&&v.files.length>0){console.log(n.dim(` linked files (${v.files.length}):`));for(let U of v.files){let A=U.url??`${process.env.SPOTA_API_URL??"http://localhost:3000"}/api/tasks/${v.id}/files/${encodeURIComponent(U.name)}`;if(console.log(n.dim(` - ${U.name} ${A}`)),U.content){console.log(n.dim(" \u250C\u2500\u2500 content \u2500\u2500"));for(let fe of U.content.split(`
|
|
29440
|
+
`))console.log(n.dim(` \u2502 ${fe}`));console.log(n.dim(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"))}}}let j=G(V(t)),le=(v.type??"").toLowerCase()==="research",Pe=(v.type??"").toLowerCase()==="bug";Ee({hasResearchTasks:le,hasBugTasks:Pe,autoCommit:j.autoCommit,autoPush:j.autoPush,autoComment:j.autoComment,createBranch:j.createBranch});return}let b=V(t),E=Oe(b),S=ue(b).find(y=>y.id===e.get||y.id.startsWith(e.get));if(!S){console.log(n.red(`\u2717 Task not found: ${e.get}`)),console.log(n.dim(" Run 'vibeflow tasks' to see available task IDs.")),process.exitCode=1;return}let h=te(b,S.id).sort((y,x)=>new Date(y.createdAt).getTime()-new Date(x.createdAt).getTime()),f=ne(b,S.id).map(y=>({...y,url:`http://localhost:${E.port}${y.url}`})),d=Ae(S,h,f);if(e.json){console.log(JSON.stringify({...S,comments:h,files:f},null,2));return}let R=ke[S.status]??n.white;if(console.log(` ${R(`[${d.status}]`)} ${n.bold(d.title)}`),console.log(n.dim(` id: ${d.id}`)),console.log(n.dim(` file: ${S.filePath}`)),d.file&&console.log(n.dim(` source: ${d.file}${d.line!=null?`:${d.line}`:""}${d.col!=null?`:${d.col}`:""}`)),d.component&&console.log(n.dim(` component: ${d.component}`)),console.log(n.dim(` selector: ${d.selector}`)),S.cssSelector&&console.log(n.dim(` css: ${S.cssSelector}`)),d.url&&console.log(n.dim(` url: ${d.url}`)),S.commits&&S.commits.length>0)if(S.commits.length===1)console.log(n.dim(` commit: ${S.commits[0].sha}`));else{console.log(n.dim(` commits (${S.commits.length}):`));for(let y of S.commits)console.log(n.dim(` ${y.sha.slice(0,8)} ${y.timestamp} ${y.message.slice(0,60)}`))}if(console.log(n.dim(` created: ${d.created}`)),S.type&&console.log(n.dim(` type: ${S.type}`)),S.priority&&console.log(n.dim(` priority: ${S.priority}`)),S.author&&console.log(n.dim(` author: ${S.author}`)),d.description){console.log(n.dim(" description:"));for(let y of d.description.split(`
|
|
29441
|
+
`))console.log(n.dim(` ${y}`))}if(S.annotatedElementText&&console.log(n.dim(` element text: ${S.annotatedElementText}`)),h.length>0){console.log(n.dim(` comments (${h.length}):`));for(let y of h){let x=y.updatedAt?` (edited ${y.updatedAt})`:"";console.log(n.dim(` [${y.author??"user"}] ${y.createdAt}${x}`));for(let v of y.text.split(`
|
|
29442
|
+
`))console.log(n.dim(` ${v}`))}}if(f.length>0){console.log(n.dim(` linked files (${f.length}):`));for(let y of f){let x=y.linkedPath??Dt(b,".vibeflow","files",S.id,y.name);if(console.log(n.dim(` - ${y.name} ${y.url}`)),/\.(md|txt)$/i.test(y.name)&&y.size<1e5&&vn(x))try{let v=hn(x,"utf-8");console.log(n.dim(" \u250C\u2500\u2500 content \u2500\u2500"));for(let W of v.split(`
|
|
29443
|
+
`))console.log(n.dim(` \u2502 ${W}`));console.log(n.dim(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"))}catch{}}}let T=G(b),$=(S.type??"").toLowerCase()==="research",X=(S.type??"").toLowerCase()==="bug";Ee({hasResearchTasks:$,hasBugTasks:X,autoCommit:T.autoCommit,autoPush:T.autoPush,autoComment:T.autoComment,createBranch:T.createBranch});return}if(e.next){if(await ve()==="saas"){let x=await J(),v=await Se(x?.id);if(!v){console.log(n.red("\u2717 Unable to reach the online backend.")),process.exitCode=1;return}let W=v.tasks.map(A=>({...A,status:pe(A.status)})).filter(A=>A.status==="todo").sort((A,fe)=>{let Fe=ge(A.priority??void 0)-ge(fe.priority??void 0);return Fe!==0?Fe:new Date(A.createdAt).getTime()-new Date(fe.createdAt).getTime()});if(W.length===0){console.log(n.dim("No todo tasks found. Nothing to work on."));return}let D=W[0];if(!await mn(D.id,{status:"in-progress"})){console.log(n.red(`\u2717 Failed to move task to in-progress: ${D.id}`)),process.exitCode=1;return}if(e.json){console.log(JSON.stringify({...D,status:"in-progress"},null,2));return}let j=G(V(t)),le=(D.type??"").toLowerCase()==="research",Pe=(D.type??"").toLowerCase()==="bug";if(Ee({hasResearchTasks:le,hasBugTasks:Pe,autoCommit:j.autoCommit,autoPush:j.autoPush,autoComment:j.autoComment,createBranch:j.createBranch}),console.log(n.green.bold("\u25B6 NEXT TASK \u2014 Status moved to in-progress. Implement this now:")),console.log(),console.log(` ${n.blue("[in-progress]")} ${n.bold(D.title)}`),console.log(n.dim(` id: ${D.id}`)),D.type&&console.log(n.dim(` type: ${D.type}`)),D.priority&&console.log(n.dim(` priority: ${D.priority}`)),console.log(n.dim(` created: ${D.createdAt}`)),D.description){console.log(n.dim(" description:"));for(let A of D.description.split(`
|
|
29444
|
+
`))console.log(n.dim(` ${A}`))}let U=[...D.comments??[]].sort((A,fe)=>new Date(A.createdAt).getTime()-new Date(fe.createdAt).getTime());if(U.length>0){console.log(n.dim(` comments (${U.length}):`));for(let A of U){let fe=A.authorId?`user:${A.authorId.slice(0,8)}`:"agent";console.log(n.dim(` [${fe}] ${A.createdAt}`));for(let Fe of A.body.split(`
|
|
29445
|
+
`))console.log(n.dim(` ${Fe}`))}}console.log(),console.log(n.yellow(" \u26A1 This task is already in-progress. Implement it now and mark as review when done."));return}let b=V(t),M=ue(b).filter(x=>x.status==="todo").sort((x,v)=>{let W=ge(x.priority)-ge(v.priority);return W!==0?W:new Date(x.created).getTime()-new Date(v.created).getTime()});if(M.length===0){console.log(n.dim("No todo tasks found. Nothing to work on."));return}let S=M[0],h=z(b,S.id,{status:"in-progress"});if(!h){console.log(n.red(`\u2717 Failed to update task: ${S.id}`)),process.exitCode=1;return}if(e.json){console.log(JSON.stringify({...h,filePath:S.filePath},null,2));return}let f=G(b),d=(h.type??"").toLowerCase()==="research",R=(h.type??"").toLowerCase()==="bug";Ee({hasResearchTasks:d,hasBugTasks:R,autoCommit:f.autoCommit,autoPush:f.autoPush,autoComment:f.autoComment,createBranch:f.createBranch});let T=Oe(b),$=te(b,h.id).sort((x,v)=>new Date(x.createdAt).getTime()-new Date(v.createdAt).getTime()),X=ne(b,h.id).map(x=>({...x,url:`http://localhost:${T.port}${x.url}`})),y=Ae(h,$,X);if(console.log(n.green.bold("\u25B6 NEXT TASK \u2014 Status moved to in-progress. Implement this now:")),console.log(),console.log(` ${n.blue("[in-progress]")} ${n.bold(y.title)}`),console.log(n.dim(` id: ${y.id}`)),console.log(n.dim(` file: ${S.filePath}`)),y.file&&console.log(n.dim(` source: ${y.file}${y.line!=null?`:${y.line}`:""}${y.col!=null?`:${y.col}`:""}`)),y.component&&console.log(n.dim(` component: ${y.component}`)),console.log(n.dim(` selector: ${y.selector}`)),h.cssSelector&&console.log(n.dim(` css: ${h.cssSelector}`)),y.url&&console.log(n.dim(` url: ${y.url}`)),console.log(n.dim(` created: ${y.created}`)),y.type&&console.log(n.dim(` type: ${y.type}`)),y.priority&&console.log(n.dim(` priority: ${y.priority}`)),y.description){console.log(n.dim(" description:"));for(let x of y.description.split(`
|
|
29446
|
+
`))console.log(n.dim(` ${x}`))}if(y.structuredComments&&y.structuredComments.length>0){console.log(n.dim(` comments (${y.structuredComments.length}):`));for(let x of y.structuredComments){let v=x.updatedAt?` (edited ${x.updatedAt})`:"";console.log(n.dim(` [${x.author??"agent"}] ${x.createdAt}${v}`));for(let W of x.text.split(`
|
|
29447
|
+
`))console.log(n.dim(` ${W}`))}}if(y.linkedFiles&&y.linkedFiles.length>0){console.log(n.dim(` linked files (${y.linkedFiles.length}):`));for(let x of y.linkedFiles)console.log(n.dim(` - ${x.name} ${x.url}`))}console.log(),console.log(n.yellow(" \u26A1 This task is already in-progress. Implement it now and mark as review when done."));return}if(e.add){if(!e.title?.trim()){console.log(n.red("\u2717 --title is required with --add")),console.log(n.dim(' Example: vibeflow tasks --add --title "Fix CTA spacing" --description "Button overflows on mobile"')),process.exitCode=1;return}if(await ve()==="saas"){let h=await J(),d=["backlog","todo","in-progress","review","done"].includes(e.setStatus??"")?e.setStatus:"todo",R=kn(),T=await Pt({id:R,title:e.title.trim(),description:e.description?.trim(),status:d,boardId:h?.id});if(!T){console.log(n.red("\u2717 Failed to create task in online board.")),console.log(n.yellow(" Check your connection or run 'vibeflow login'.")),process.exitCode=1;return}e.json?console.log(JSON.stringify(T,null,2)):(console.log(n.green(`\u2713 Task created: ${T.title}`)),console.log(n.dim(` id: ${T.id} | status: ${pe(T.status)}`)));return}let b=V(t);Te(b);let M=["backlog","todo","in-progress","review","done"].includes(e.setStatus??"")?e.setStatus:"todo",S=xe(b,{title:e.title.trim(),description:e.description?.trim()??"",status:M,selector:"/"});e.json?console.log(JSON.stringify(S,null,2)):(console.log(n.green(`\u2713 Task created: ${S.title}`)),console.log(n.dim(` id: ${S.id} | status: ${S.status}`)));return}if(e.commit){if(!e.task){console.log(n.red("\u2717 --task <task-id> is required with --commit")),console.log(n.dim(' Example: vibeflow tasks --commit --task abc12345 --message "fix button alignment"')),process.exitCode=1;return}let p=V(t),E=ee(p).find(h=>h.id===e.task||h.id.startsWith(e.task));if(!E){console.log(n.red(`\u2717 Task not found: ${e.task}`)),console.log(n.dim(" Run 'vibeflow tasks' to see available task IDs.")),process.exitCode=1;return}let M=e.message?.trim()||E.title;(E.type??"").toLowerCase()==="research"&&(console.log(n.yellow("\u26A0 WARNING: This is a Research task. Research tasks must NOT produce code changes.")),console.log(n.yellow(" Only commit research report files (.md). Do not commit code changes.")),console.log());let S=`${M} [proto:${E.id}]`;try{Ge("git",["commit","-m",S],{cwd:p,stdio:"inherit"});let h=yn("git rev-parse HEAD",{cwd:p}).toString().trim(),f={sha:h,message:M,timestamp:new Date().toISOString()},d=E.commits??[];if(z(p,E.id,{commits:[...d,f]}),console.log(n.green(`\u2713 Committed and linked to task: ${E.title}`)),console.log(n.dim(` commit: ${h}`)),console.log(n.dim(` proto: ${E.id}`)),G(p).autoPush){console.log(n.dim(" auto-push: pushing commit to remote..."));let T=Mt(p);T.ok?console.log(n.green("\u2713 Auto-push complete")):(console.log(n.yellow("\u26A0 Auto-push failed. Commit is local; run 'git push' manually.")),T.error&&console.log(n.dim(` reason: ${T.error}`)))}}catch{console.log(n.red("\u2717 git commit failed \u2014 ensure changes are staged with 'git add'")),process.exitCode=1}return}if(e.edit!==void 0){let p=typeof e.edit=="string"?e.edit:void 0,b=e.title||e.setStatus||e.description;if(!p||!b){if(e.type&&!c(e.type))return;let f=ee(t);if(e.status&&(f=f.filter(d=>d.status===e.status)),e.type&&(f=f.filter(d=>(d.type??"Task").toLowerCase()===e.type.toLowerCase())),e.user&&!l(e.user,f))return;if(e.user&&(f=f.filter(d=>o(d.author,e.user))),e.tag&&e.tag.length>0&&(f=f.filter(d=>e.tag.every(R=>(d.tags??[]).includes(R)))),console.log(n.bold("vibeflow tasks --edit \u2014 LLM Usage Instructions")),console.log(),console.log("Edit a task:"),console.log(n.cyan(' vibeflow tasks [dir] --edit <task-id> [--title "new title"] [--set-status backlog|todo|in-progress|review|done] [--description "new description"]')),console.log(),console.log("Examples:"),console.log(n.dim(" vibeflow tasks --edit abc12345 --set-status done")),console.log(n.dim(" vibeflow tasks --edit abc12345 --set-status in-progress")),console.log(n.dim(' vibeflow tasks --edit abc12345 --title "Updated title" --description "More detail"')),console.log(),f.length===0)console.log(n.dim("No tasks found."));else{console.log("Available tasks:");for(let d of f){let R=ke[d.status]??n.white;console.log(` ${R(`[${d.status}]`)} ${n.bold(d.id)} \u2014 ${d.title}`)}}return}let E=["backlog","todo","in-progress","review","done"];if(e.setStatus==="done"&&(console.log(n.yellow('\u26A0 WARNING: Agents should NEVER set a task status to "done".')),console.log(n.yellow(" Only humans should mark tasks as done after reviewing.")),console.log(n.dim(" If you are an agent, use --set-status review instead.")),console.log()),e.setStatus&&!E.includes(e.setStatus)){console.log(n.red(`\u2717 Invalid status: "${e.setStatus}"`)),console.log(n.yellow(` Valid statuses: ${E.join(" | ")}`)),console.log(n.dim(` Example: vibeflow tasks --edit ${p} --set-status in-progress`)),process.exitCode=1;return}if(e.setStatus==="review"&&!e.comment?.trim()){console.log(n.red("\u2717 --comment is required when setting status to review")),console.log(n.dim(" Provide a concise implementation report explaining:")),console.log(n.dim(" \xB7 what was changed and why")),console.log(n.dim(" \xB7 key decisions and trade-offs")),console.log(n.dim(" \xB7 anything future agents should know")),console.log(n.dim(` Example: vibeflow tasks --edit ${p} --set-status review --comment "Implemented X by doing Y. Key decision: Z."`)),process.exitCode=1;return}let M=await ve();if(e.setStatus==="review"){let f=V(t),d=G(f);if(d.autoComment&&!e.comment?.trim()){console.log(n.red("\u2717 --comment is required (auto-comment setting is ON)")),console.log(n.dim(" Provide: what changed, why, key decisions, anything future agents should know.")),console.log(n.dim(" Plain text for short notes; Markdown for multi-section reports.")),console.log(n.dim(` Example: vibeflow tasks --edit ${p} --set-status review --comment "Implemented X by doing Y."`)),process.exitCode=1;return}if(d.autoCommit&&!e.commitMessage?.trim()){console.log(n.red("\u2717 --commit-message is required (auto-commit setting is ON)")),console.log(n.dim(" Stage your changes first, then provide a one-line commit summary.")),console.log(n.dim(` Example: vibeflow tasks --edit ${p} --set-status review --commit-message "fix: add hover effect" --comment "..."`)),process.exitCode=1;return}}if(M==="saas"){let f={};if(e.setStatus&&(f.status=e.setStatus),e.title&&(f.title=e.title),e.description&&(f.description=e.description),e.setStatus==="in-progress"){let R=await St(p);if(R&&pe(R.status)==="in-progress"){let T=R.author??"another user";console.log(n.yellow(`\u26A0 Task is already in-progress (last updated by: ${T})`)),console.log(n.yellow(" Another agent or user may be working on this task.")),console.log(n.yellow(" Proceeding \u2014 but verify the task is not being worked on elsewhere.")),console.log()}}let d=await mn(p,f);if(!d){console.log(n.red(`\u2717 Failed to update task: ${p}`)),console.log(n.yellow(" Ensure you are connected and the task ID exists in the online board.")),process.exitCode=1;return}d.warning&&console.log(n.yellow(`\u26A0 Server warning: ${d.warning}`)),e.setStatus==="review"&&e.comment?.trim()&&await Et(p,e.comment.trim())&&console.log(n.dim(" comment: added")),console.log(n.green(`\u2713 Task updated: ${d.task.title}`)),console.log(n.dim(` id: ${d.task.id} | status: ${pe(d.task.status)}`));return}let S={};if(e.title&&(S.title=e.title),e.setStatus&&(S.status=e.setStatus),e.description&&(S.description=e.description),e.setStatus==="in-progress"){let f=V(t),R=ee(f).find(T=>T.id===p||T.id.startsWith(p));if(R&&((R.type??"").toLowerCase()==="research"&&(console.log(n.yellow("\u26A0 WARNING: This is a Research task. Policy: do NOT implement code.")),console.log(n.yellow(" Research only \u2014 attach a .md report file, leave a summary comment, mark as review.")),console.log()),R.status==="in-progress")){let T=R.updated?new Date(R.updated).toLocaleString():"unknown",$=R.author??"another user";console.log(n.yellow(`\u26A0 Task is already in-progress (author: ${$}, last updated: ${T})`)),console.log(n.yellow(" Another agent or user may be working on this task.")),console.log(n.yellow(" Proceeding \u2014 but verify the task is not being worked on elsewhere.")),console.log()}}if(e.setStatus==="review"){let f=V(t),R=ee(f).find(T=>T.id===p||T.id.startsWith(p));if(R&&(R.type??"").toLowerCase()==="research"){if(e.reportFile){let T=V(e.reportFile);if(!vn(T)){console.log(n.red(`\u2717 Report file not found: ${T}`)),process.exitCode=1;return}if(!/\.md$/i.test(T)){console.log(n.red("\u2717 Report file must be a Markdown (.md) file")),process.exitCode=1;return}let $=hn(T),{saveFile:X}=await import("./files-3RDDXUOS.js");X(f,R.id,At(T),$),yo(T),console.log(n.green(`\u2713 Report uploaded: ${At(T)} (local file removed)`))}else if(!ne(f,R.id).some(X=>/\.md$/i.test(X.name))){console.log(n.red("\u2717 Cannot mark Research task as review: no .md report file attached.")),console.log(n.dim(" Provide a research report:")),console.log(n.dim(` vibeflow tasks --edit ${p} --set-status review --report-file ./my-research.md --comment "..."`)),process.exitCode=1;return}}}let h=z(t,p,S);if(!h){console.log(n.red(`\u2717 Task not found: ${p}`)),console.log(n.yellow(" Run 'vibeflow tasks' to see available task IDs.")),process.exitCode=1;return}if(e.setStatus==="review"&&e.comment?.trim()&&(he(V(t),p,"agent",e.comment.trim()),console.log(n.dim(" comment: added"))),console.log(n.green(`\u2713 Task updated: ${h.title}`)),console.log(n.dim(` id: ${h.id} | status: ${h.status}`)),e.setStatus==="review"){let f=V(t),d=G(f);if(d.autoCommit&&e.commitMessage?.trim()){let T=ee(f).find($=>$.id===p||$.id.startsWith(p));if(T){let $=`${e.commitMessage.trim()} [proto:${T.id}]`;try{Ge("git",["commit","-m",$],{cwd:f,stdio:"inherit"});let X=yn("git rev-parse HEAD",{cwd:f}).toString().trim(),y={sha:X,message:e.commitMessage.trim(),timestamp:new Date().toISOString()},x=T.commits??[];if(z(f,T.id,{commits:[...x,y]}),console.log(n.green(`\u2713 Committed: ${$}`)),console.log(n.dim(` sha: ${X}`)),d.autoPush){console.log(n.dim(" pushing..."));let v=Mt(f);v.ok?console.log(n.green("\u2713 Pushed")):(console.log(n.yellow("\u26A0 Push failed. Run 'git push' manually.")),v.error&&console.log(n.dim(` reason: ${v.error}`)))}}catch{console.log(n.red("\u2717 git commit failed \u2014 ensure changes are staged with 'git add'")),process.exitCode=1}}}}return}let u=["backlog","todo","in-progress","review","done"];if(e.status&&!u.includes(e.status)){console.log(n.red(`\u2717 Invalid status filter: "${e.status}"`)),console.log(n.yellow(` Valid statuses: ${u.join(" | ")}`)),console.log(n.dim(" Example: vibeflow tasks --status todo")),process.exitCode=1;return}if(e.type&&!c(e.type))return;if(await ve()==="saas"){let p=await J(),b=await Se(p?.id);if(!b){console.log(n.red("\u2717 Unable to reach the online backend.")),console.log(n.yellow(" Check your connection or run 'vibeflow login' if your session expired.")),process.exitCode=1;return}let E=b.tasks.map(d=>({...d,status:pe(d.status)}));if(e.status&&(E=E.filter(d=>d.status===e.status)),e.type&&(E=E.filter(d=>(d.type??"Task").toLowerCase()===e.type.toLowerCase())),e.user&&!l(e.user,E))return;e.user&&(E=E.filter(d=>o(d.author,e.user))),e.tag&&e.tag.length>0&&(E=E.filter(d=>e.tag.every(R=>(d.tags??[]).includes(R))));let M=e.limit!==void 0?parseInt(e.limit,10):20;if(!isNaN(M)&&M>0&&(E=E.slice(0,M)),e.json){console.log(JSON.stringify(E,null,2));return}let S=E.some(d=>(d.type??"").toLowerCase()==="research"),h=E.some(d=>(d.type??"").toLowerCase()==="bug"),f=G(V(t));if(Ee({hasResearchTasks:S,hasBugTasks:h,autoCommit:f.autoCommit,autoPush:f.autoPush,autoComment:f.autoComment,createBranch:f.createBranch}),E.length===0)console.log(n.dim("No tasks found."));else{E=E.sort((x,v)=>{let W=Qe(x.status)-Qe(v.status);if(W!==0)return W;let D=ge(x.priority??void 0)-ge(v.priority??void 0);return D!==0?D:new Date(v.updatedAt).getTime()-new Date(x.updatedAt).getTime()});for(let[x,v]of E.entries()){let W=ke[v.status]??n.white,D=xo(v.type);if(console.log(` ${n.dim(`${x+1}.`)} ${W(`[${v.status}]`)} ${v.title}`),console.log(n.dim(` id: ${v.id}`)),console.log(n.dim(" selector: /")),D&&console.log(n.dim(` type: ${D}`)),v.priority&&console.log(n.dim(` priority: ${v.priority}`)),console.log(n.dim(` created: ${v.createdAt}`)),v.description){console.log(n.dim(" description:"));for(let Y of v.description.split(`
|
|
29448
|
+
`))console.log(n.dim(` ${Y}`))}if(v.comments&&v.comments.length>0){let Y=[...v.comments].sort((j,le)=>new Date(j.createdAt).getTime()-new Date(le.createdAt).getTime());console.log(n.dim(` comments (${Y.length}):`));for(let j of Y){let le=j.authorId?`user:${j.authorId.slice(0,8)}`:"agent";console.log(n.dim(` [${le}] ${j.createdAt}`));for(let Pe of j.body.split(`
|
|
29449
|
+
`))console.log(n.dim(` ${Pe}`))}}if(v.files&&v.files.length>0){console.log(n.dim(` linked files (${v.files.length}):`));for(let Y of v.files){let j=Y.url??`${process.env.SPOTA_API_URL??"http://localhost:3000"}/api/tasks/${v.id}/files/${encodeURIComponent(Y.name)}`;if(console.log(n.dim(` - ${Y.name} ${j}`)),Y.content){console.log(n.dim(" \u250C\u2500\u2500 content \u2500\u2500"));for(let le of Y.content.split(`
|
|
29450
|
+
`))console.log(n.dim(` \u2502 ${le}`));console.log(n.dim(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"))}}}console.log()}let d=b.tasks.map(x=>({...x,status:pe(x.status)})),R=d.filter(x=>x.status==="backlog").length,T=d.filter(x=>x.status==="todo").length,$=d.filter(x=>x.status==="in-progress").length,X=d.filter(x=>x.status==="review").length,y=d.filter(x=>x.status==="done").length;console.log(n.dim(` Total: ${d.length} | Backlog: ${R} | Todo: ${T} | In Progress: ${$} | Review: ${X} | Done: ${y}`))}return}let P=ue(t);if(e.user&&!l(e.user,P))return;let k=e.status?P.filter(p=>p.status===e.status):P;e.type&&(k=k.filter(p=>(p.type??"Task").toLowerCase()===e.type.toLowerCase())),e.user&&(k=k.filter(p=>o(p.author,e.user))),e.tag&&e.tag.length>0&&(k=k.filter(p=>e.tag.every(b=>(p.tags??[]).includes(b))));let w=e.limit!==void 0?parseInt(e.limit,10):20;if(e.json){console.log(JSON.stringify(k,null,2));return}k=k.sort((p,b)=>{let E=Qe(p.status)-Qe(b.status);if(E!==0)return E;let M=ge(p.priority)-ge(b.priority);if(M!==0)return M;let S=new Date(p.updated??p.created).getTime(),h=new Date(b.updated??b.created).getTime();return S!==h?h-S:p.id.localeCompare(b.id)});let _=k.length;if(!isNaN(w)&&w>0&&(k=k.slice(0,w)),k.length===0){console.log(n.dim("No tasks found."));return}let L=V(t),m=k.some(p=>(p.type??"").toLowerCase()==="research"),N=k.some(p=>(p.type??"").toLowerCase()==="bug"),H=G(L);Ee({hasResearchTasks:m,hasBugTasks:N,autoCommit:H.autoCommit,autoPush:H.autoPush,autoComment:H.autoComment,createBranch:H.createBranch});let K=Oe(L);for(let[p,b]of k.entries()){let E=ke[b.status]??n.white,M=te(L,b.id).sort((f,d)=>new Date(f.createdAt).getTime()-new Date(d.createdAt).getTime()),S=ne(L,b.id).map(f=>({...f,url:`http://localhost:${K.port}${f.url}`})),h=Ae(b,M,S);if(console.log(` ${n.dim(`${p+1}.`)} ${E(`[${h.status}]`)} ${h.title}`),console.log(n.dim(` id: ${h.id}`)),console.log(n.dim(` file: ${b.filePath}`)),h.file&&console.log(n.dim(` source: ${h.file}${h.line!=null?`:${h.line}`:""}${h.col!=null?`:${h.col}`:""}`)),h.component&&console.log(n.dim(` component: ${h.component}`)),console.log(n.dim(` selector: ${h.selector}`)),b.cssSelector&&console.log(n.dim(` css: ${b.cssSelector}`)),h.url&&console.log(n.dim(` url: ${h.url}`)),b.screenshot&&console.log(n.dim(` screenshot: http://localhost:${K.port}/screenshots/${b.screenshot}`)),b.commits&&b.commits.length>0)if(b.commits.length===1)console.log(n.dim(` commit: ${b.commits[0].sha}`));else{console.log(n.dim(` commits (${b.commits.length}):`));for(let f of b.commits)console.log(n.dim(` ${f.sha.slice(0,8)} ${f.timestamp} ${f.message.slice(0,60)}`))}if(console.log(n.dim(` created: ${h.created}`)),h.type&&console.log(n.dim(` type: ${h.type}`)),h.priority&&console.log(n.dim(` priority: ${h.priority}`)),h.description){console.log(n.dim(" description:"));for(let f of h.description.split(`
|
|
29451
|
+
`))console.log(n.dim(` ${f}`))}if(h.structuredComments&&h.structuredComments.length>0){console.log(n.dim(` comments (${h.structuredComments.length}):`));for(let f of h.structuredComments){let d=f.updatedAt?` (edited ${f.updatedAt})`:"";console.log(n.dim(` [${f.author??"agent"}] ${f.createdAt}${d}`));for(let R of f.text.split(`
|
|
29452
|
+
`))console.log(n.dim(` ${R}`))}}if(h.linkedFiles&&h.linkedFiles.length>0){console.log(n.dim(` linked files (${h.linkedFiles.length}):`));for(let f of h.linkedFiles){let d=f.linkedPath??Dt(L,".vibeflow","files",b.id,f.name);if(console.log(n.dim(` - ${f.name} ${f.url}`)),/\.(md|txt)$/i.test(f.name)&&f.size<1e5&&vn(d))try{let R=hn(d,"utf-8");console.log(n.dim(" \u250C\u2500\u2500 content \u2500\u2500"));for(let T of R.split(`
|
|
29453
|
+
`))console.log(n.dim(` \u2502 ${T}`));console.log(n.dim(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"))}catch{}}}console.log()}let O=P.filter(p=>p.status==="backlog").length,q=P.filter(p=>p.status==="todo").length,ie=P.filter(p=>p.status==="in-progress").length,se=P.filter(p=>p.status==="review").length,oe=P.filter(p=>p.status==="done").length,Le=!isNaN(w)&&w>0&&_>w?n.yellow(` (showing ${w} of ${_} matching \u2014 use --limit 0 for all)`):"";console.log(n.dim(` Total: ${P.length} | Backlog: ${O} | Todo: ${q} | In Progress: ${ie} | Review: ${se} | Done: ${oe}`)+Le),await be()})()});re.command("login",{hidden:!0}).description("Authenticate CLI against the Vibeflow SaaS backend (device flow)").action(async()=>{ye("command_run",{command:"login"}),await be(),await Ve()});re.command("logout",{hidden:!0}).description("Remove stored auth token and switch to local mode").action(async()=>{ye("command_run",{command:"logout"}),await be(),await wt()});re.command("status",{hidden:!0}).description("Show login status, connection info, and task statistics").action(async()=>{if(await ve()==="local"){console.log(n.yellow("\u25CF Not logged in")+n.dim(" (local mode)")),console.log(n.dim(" Run ")+n.cyan("vibeflow login")+n.dim(" to connect to the Vibeflow cloud.")),console.log();let o=V("."),a=ue(o);if(a.length>0){let c=a.reduce((l,u)=>(l[u.status]=(l[u.status]??0)+1,l),{});console.log(n.bold(" Local task statistics:"));for(let[l,u]of Object.entries(c)){let C=ke[l]??n.white;console.log(` ${C(l.padEnd(12))} ${u}`)}console.log(n.dim(` ${"total".padEnd(12)} ${a.length}`))}else console.log(n.dim(" No local tasks found."));return}let e=await J();console.log(n.green("\u25CF Online")+n.dim(" (SaaS mode)")),e&&(console.log(n.dim(` Board: ${e.icon?e.icon+" ":""}${e.name}`)),e.email&&console.log(n.dim(` Email: ${e.email}`)),console.log(n.dim(" URL: ")+n.cyan(e.url))),console.log();let r=await Se(e?.id);if(!r){console.log(n.yellow(" \u26A0 Could not reach SaaS backend. Check your connection."));return}let i=r.tasks.map(o=>({...o,status:pe(o.status)}));if(i.length===0){console.log(n.dim(" No tasks found."));return}let s=i.reduce((o,a)=>(o[a.status]=(o[a.status]??0)+1,o),{});console.log(n.bold(" Task statistics:"));for(let[o,a]of Object.entries(s)){let c=ke[o]??n.white;console.log(` ${c(o.padEnd(12))} ${a}`)}console.log(n.dim(` ${"total".padEnd(12)} ${i.length}`))});re.command("push",{hidden:!0}).description("Push all local tasks to the Vibeflow SaaS app and delete them locally").argument("[dir]","Project root directory",".").option("--workspace <id>","Target workspace ID (defaults to your first workspace)").option("--keep-local-files","Keep local task files after pushing (do not delete them)").action(async(t,e)=>{ye("command_run",{command:"push"}),await Ct(t,e),await be()});re.command("telemetry").description("Manage CLI usage telemetry (opt-out at any time)").option("--enable","Enable usage telemetry (default)").option("--disable","Disable usage telemetry").option("--status","Show current telemetry status").action(async t=>{if(t.disable){gn(!1),console.log(n.yellow("Telemetry disabled. No usage data will be collected.")),console.log(n.dim("Run `vibeflow telemetry --enable` to re-enable at any time."));return}if(t.enable){gn(!0),console.log(n.green("Telemetry enabled. Thank you for helping improve Vibeflow!"));return}let{enabled:e,anonymousId:r}=Ft(),i=process.env.VIBEFLOW_TELEMETRY==="0";console.log(n.bold("Telemetry status:")),console.log(` Enabled: ${e?n.green("yes"):n.yellow("no")}`),i&&console.log(n.dim(" (disabled via VIBEFLOW_TELEMETRY=0 environment variable)")),r&&console.log(n.dim(` Anonymous ID: ${r}`)),console.log(),console.log(n.dim(" vibeflow telemetry --disable Opt out of usage tracking")),console.log(n.dim(" vibeflow telemetry --enable Opt back in")),console.log(n.dim(" No PII is ever collected. User identity is hashed."))});re.parse();
|