From d6c80b4a158590430382fab90fd40669d63e6686 Mon Sep 17 00:00:00 2001 From: Pilipilis Date: Mon, 25 May 2026 12:35:22 +0000 Subject: [PATCH] test: add dashboard frontend tests --- .github/workflows/release.yml | 15 + .github/workflows/tests.yml | 21 + dashboard/package-lock.json | 1273 ++++++++++++++++- dashboard/package.json | 10 +- dashboard/src/main.test.tsx | 102 ++ dashboard/src/main.tsx | 27 +- dashboard/src/test/setup.ts | 1 + dashboard/vite.config.ts | 6 +- .../{index-CwTu66TQ.js => index-Bh6F9yTT.js} | 42 +- .../assets/index-DZ0faviD.css | 1 + .../assets/index-O_wrzEHH.css | 1 - .../dashboard_static/index.html | 4 +- 12 files changed, 1415 insertions(+), 88 deletions(-) create mode 100644 dashboard/src/main.test.tsx create mode 100644 dashboard/src/test/setup.ts rename src/github_agent_bridge/dashboard_static/assets/{index-CwTu66TQ.js => index-Bh6F9yTT.js} (84%) create mode 100644 src/github_agent_bridge/dashboard_static/assets/index-DZ0faviD.css delete mode 100644 src/github_agent_bridge/dashboard_static/assets/index-O_wrzEHH.css diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de224a3..f2fe7d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,9 +34,24 @@ jobs: with: python-version: '3.12' cache: pip + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: npm + cache-dependency-path: dashboard/package-lock.json - name: Install package with test dependencies run: python -m pip install -e '.[test]' + - name: Install dashboard dependencies + run: npm ci + working-directory: dashboard + - name: Run dashboard tests + run: npm test + working-directory: dashboard + - name: Build dashboard + run: npm run build + working-directory: dashboard - name: Run tests before release run: pytest -q diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c25d93b..885864a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,27 @@ on: pull_request: jobs: + dashboard: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: npm + cache-dependency-path: dashboard/package-lock.json + - name: Install dashboard dependencies + run: npm ci + working-directory: dashboard + - name: Run dashboard tests + run: npm test + working-directory: dashboard + - name: Build dashboard + run: npm run build + working-directory: dashboard + pytest: runs-on: ubuntu-latest strategy: diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json index 802bc6e..92bdd9d 100644 --- a/dashboard/package-lock.json +++ b/dashboard/package-lock.json @@ -18,16 +18,28 @@ "tailwind-merge": "^2.6.0" }, "devDependencies": { + "@testing-library/jest-dom": "^6.9.1", + "@testing-library/react": "^16.3.2", + "@testing-library/user-event": "^14.6.1", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", + "jsdom": "^29.1.1", "postcss": "^8.4.49", "tailwindcss": "^3.4.16", "typescript": "^5.7.2", - "vite": "^6.0.3" + "vite": "^6.0.3", + "vitest": "^4.1.7" } }, + "node_modules/@adobe/css-tools": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.5.0.tgz", + "integrity": "sha512-6OzddxPio9UiWTCemp4N8cYLV2ZN1ncRnV1cVGtve7dhPOtRkleRyx32GQCYSwDYgaHU3USMm84tNsvKzRCa1Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -41,6 +53,57 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@asamuzakjp/css-color": { + "version": "5.1.11", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", + "integrity": "sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/generational-cache": "^1.0.1", + "@csstools/css-calc": "^3.2.0", + "@csstools/css-color-parser": "^4.1.0", + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/@asamuzakjp/dom-selector": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-7.1.1.tgz", + "integrity": "sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/generational-cache": "^1.0.1", + "@asamuzakjp/nwsapi": "^2.3.9", + "bidi-js": "^1.0.3", + "css-tree": "^3.2.1", + "is-potential-custom-element-name": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/@asamuzakjp/generational-cache": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/generational-cache/-/generational-cache-1.0.1.tgz", + "integrity": "sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/@asamuzakjp/nwsapi": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@asamuzakjp/nwsapi/-/nwsapi-2.3.9.tgz", + "integrity": "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@babel/code-frame": { "version": "7.29.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", @@ -332,6 +395,159 @@ "node": ">=6.9.0" } }, + "node_modules/@bramus/specificity": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.2.tgz", + "integrity": "sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "css-tree": "^3.0.0" + }, + "bin": { + "specificity": "bin/cli.js" + } + }, + "node_modules/@csstools/color-helpers": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.0.2.tgz", + "integrity": "sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=20.19.0" + } + }, + "node_modules/@csstools/css-calc": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.2.1.tgz", + "integrity": "sha512-DtdHlgXh5ZkA43cwBcAm+huzgJiwx3ZTWVjBs94kwz2xKqSimDA3lBgCjphYgwgVUMWatSM0pDd8TILB1yrVVg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=20.19.0" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" + } + }, + "node_modules/@csstools/css-color-parser": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.1.1.tgz", + "integrity": "sha512-eZ5XOtyhK+mggRafYUWzA0tvaYOFgdY8AkgQiCJF9qNAePnUo/zmsqqYubBBb3sQ8uNUaSKTY9s9klfRaAXL0g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/color-helpers": "^6.0.2", + "@csstools/css-calc": "^3.2.1" + }, + "engines": { + "node": ">=20.19.0" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz", + "integrity": "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=20.19.0" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^4.0.0" + } + }, + "node_modules/@csstools/css-syntax-patches-for-csstree": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.4.tgz", + "integrity": "sha512-wgsqt92b7C7tQhIdPNxj0n9zuUbQlvAuI1exyzeNrOKOi62SD7ren8zqszmpVREjAOqg8cD2FqYhQfAuKjk4sw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "peerDependencies": { + "css-tree": "^3.2.1" + }, + "peerDependenciesMeta": { + "css-tree": { + "optional": true + } + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.0.tgz", + "integrity": "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=20.19.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.12", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", @@ -774,6 +990,24 @@ "node": ">=18" } }, + "node_modules/@exodus/bytes": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.1.tgz", + "integrity": "sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + }, + "peerDependencies": { + "@noble/hashes": "^1.8.0 || ^2.0.0" + }, + "peerDependenciesMeta": { + "@noble/hashes": { + "optional": true + } + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -1219,6 +1453,13 @@ "win32" ] }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, "node_modules/@tanstack/query-core": { "version": "5.100.11", "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.100.11.tgz", @@ -1245,6 +1486,104 @@ "react": "^18 || ^19" } }, + "node_modules/@testing-library/dom": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz", + "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "picocolors": "1.1.1", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/jest-dom": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz", + "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@adobe/css-tools": "^4.4.0", + "aria-query": "^5.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "picocolors": "^1.1.1", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/react": { + "version": "16.3.2", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.2.tgz", + "integrity": "sha512-XU5/SytQM+ykqMnAnvB2umaJNIOsLF3PVv//1Ew4CTcpz0/BRyy/af40qqrt7SjKpDdT1saBMc42CUok5gaw+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@testing-library/user-event": { + "version": "14.6.1", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.1.tgz", + "integrity": "sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" + } + }, + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1290,6 +1629,17 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, "node_modules/@types/d3-array": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", @@ -1353,6 +1703,13 @@ "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", "license": "MIT" }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -1409,72 +1766,230 @@ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true, - "license": "MIT" - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "node_modules/@vitest/expect": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.7.tgz", + "integrity": "sha512-1R+tw0ortHEbZDGMymm+pN7/AFQ/RkFFdtd7EN+VBpynKmLbP8A3rpEXdshBJ7+8hQ9zBJh/i1s0yKNtxAnU7w==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.7", + "@vitest/utils": "4.1.7", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" }, - "engines": { - "node": ">= 8" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true, - "license": "MIT" - }, - "node_modules/autoprefixer": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.0.tgz", - "integrity": "sha512-FMhOoZV4+qR6aTUALKX2rEqGG+oyATvwBt9IIzVR5rMa2HRWPkxf+P+PAJLD1I/H5/II+HuZcBJYEFBpq39ong==", + "node_modules/@vitest/mocker": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.7.tgz", + "integrity": "sha512-vY7nuamKgfvpA1Koa3oYIw/k7D6kZnpGyNMZW8loow2bsBYla1TFdqTaXncWdRn4pgwNs+90RhnXhJScDwQeJA==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], "license": "MIT", "dependencies": { - "browserslist": "^4.28.2", - "caniuse-lite": "^1.0.30001787", - "fraction.js": "^5.3.4", - "picocolors": "^1.1.1", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" + "@vitest/spy": "4.1.7", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" }, - "engines": { - "node": "^10 || ^12 || >=14" + "funding": { + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "postcss": "^8.1.0" + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } } }, - "node_modules/baseline-browser-mapping": { + "node_modules/@vitest/pretty-format": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.7.tgz", + "integrity": "sha512-umgCarTOYQWIaDMvGDRZij+6b9oVeLIyJzfN+AS88e0ZOU3QTgNNSTtjQOpcvWr3np1N0j4WgZj+sb3oYBDscw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.7.tgz", + "integrity": "sha512-BapjmAQ2aI78WdMEfeUWivnfVzB+VPGwWRQcJE0OUq7qEeEcBsCSf+0T5iREBNE5nBb4wA5Ya0W6IA+sghdEFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.1.7", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.7.tgz", + "integrity": "sha512-ZacLzja+TmJeZ1h14xW2FB/WpeimUD3haBXQPyJqxvo8jQTmfeA8zv58mtjN2C7EHXZDYVcVYdYmAxjkWVvKCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.7", + "@vitest/utils": "4.1.7", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.7.tgz", + "integrity": "sha512-kbkI5LMWakyuTIvs6fUJ5qdIVb1XVKsYJAT4OJ938cHMROYMSfmoQdZy0aaAnjbbc8F61vkoTqz/Az+/HiIu5Q==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.7.tgz", + "integrity": "sha512-T532WBu791cBxJlCl6SO+J14l81DQx6uQHm1bQbmCDY7nqlEIgkza/UFnSBNaUtSf41unldDFjdOBYEQC4b5Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.7", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true, + "license": "MIT" + }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/autoprefixer": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.0.tgz", + "integrity": "sha512-FMhOoZV4+qR6aTUALKX2rEqGG+oyATvwBt9IIzVR5rMa2HRWPkxf+P+PAJLD1I/H5/II+HuZcBJYEFBpq39ong==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.2", + "caniuse-lite": "^1.0.30001787", + "fraction.js": "^5.3.4", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/baseline-browser-mapping": { "version": "2.10.31", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.31.tgz", "integrity": "sha512-MujYO3eP72uvmSE0i4wltsodRfIpZATP3jvzRNRGGxgzId7aVocVJJV3nf01qnzzKFGxQVC9bpWxl5cjxTr/7Q==", @@ -1487,6 +2002,16 @@ "node": ">=6.0.0" } }, + "node_modules/bidi-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", + "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "require-from-string": "^2.0.2" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -1578,6 +2103,16 @@ ], "license": "CC-BY-4.0" }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -1654,6 +2189,27 @@ "dev": true, "license": "MIT" }, + "node_modules/css-tree": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", + "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.27.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true, + "license": "MIT" + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -1794,6 +2350,20 @@ "node": ">=12" } }, + "node_modules/data-urls": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-7.0.0.tgz", + "integrity": "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^16.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -1812,12 +2382,29 @@ } } }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "dev": true, + "license": "MIT" + }, "node_modules/decimal.js-light": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==", "license": "MIT" }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -1832,6 +2419,14 @@ "dev": true, "license": "MIT" }, + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/dom-helpers": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", @@ -1849,6 +2444,19 @@ "dev": true, "license": "ISC" }, + "node_modules/entities": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-8.0.0.tgz", + "integrity": "sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", @@ -1859,6 +2467,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", + "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", + "dev": true, + "license": "MIT" + }, "node_modules/esbuild": { "version": "0.25.12", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", @@ -1911,12 +2526,32 @@ "node": ">=6" } }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "license": "MIT" }, + "node_modules/expect-type": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", + "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/fast-equals": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.4.0.tgz", @@ -2054,6 +2689,29 @@ "node": ">= 0.4" } }, + "node_modules/html-encoding-sniffer": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz", + "integrity": "sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@exodus/bytes": "^1.6.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/internmap": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", @@ -2125,6 +2783,13 @@ "node": ">=0.12.0" } }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true, + "license": "MIT" + }, "node_modules/jiti": { "version": "1.21.7", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", @@ -2141,6 +2806,57 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, + "node_modules/jsdom": { + "version": "29.1.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-29.1.1.tgz", + "integrity": "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@asamuzakjp/css-color": "^5.1.11", + "@asamuzakjp/dom-selector": "^7.1.1", + "@bramus/specificity": "^2.4.2", + "@csstools/css-syntax-patches-for-csstree": "^1.1.3", + "@exodus/bytes": "^1.15.0", + "css-tree": "^3.2.1", + "data-urls": "^7.0.0", + "decimal.js": "^10.6.0", + "html-encoding-sniffer": "^6.0.0", + "is-potential-custom-element-name": "^1.0.1", + "lru-cache": "^11.3.5", + "parse5": "^8.0.1", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^6.0.1", + "undici": "^7.25.0", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^8.0.1", + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^16.0.1", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24.0.0" + }, + "peerDependencies": { + "canvas": "^3.0.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jsdom/node_modules/lru-cache": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.0.tgz", + "integrity": "sha512-5YgH9UJd7wVb9hIouI2adWpgqrrICkt070Dnj8EUY1+B4B2P9eRLPAkAAo6NICA7CEhOIeBHl46u9zSNpNu7zA==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -2224,6 +2940,34 @@ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" } }, + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "lz-string": "bin/bin.js" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mdn-data": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", + "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", + "dev": true, + "license": "CC0-1.0" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2248,6 +2992,16 @@ "node": ">=8.6" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2325,6 +3079,30 @@ "node": ">= 6" } }, + "node_modules/obug": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT" + }, + "node_modules/parse5": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz", + "integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^8.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -2332,6 +3110,13 @@ "dev": true, "license": "MIT" }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -2535,6 +3320,30 @@ "dev": true, "license": "MIT" }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -2552,6 +3361,16 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "license": "MIT" }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2700,6 +3519,30 @@ "decimal.js-light": "^2.4.1" } }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.12", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", @@ -2802,6 +3645,19 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, "node_modules/scheduler": { "version": "0.23.2", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", @@ -2821,6 +3677,13 @@ "semver": "bin/semver.js" } }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -2831,6 +3694,33 @@ "node": ">=0.10.0" } }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", + "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/sucrase": { "version": "3.35.1", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", @@ -2867,6 +3757,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true, + "license": "MIT" + }, "node_modules/tailwind-merge": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.1.tgz", @@ -2944,6 +3841,23 @@ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", "license": "MIT" }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.2.tgz", + "integrity": "sha512-M/Q0B2cp4K7kynaT/vnED1j8TlLY+Pp7C6Wl2bl/7u/F0mUVwdyOpwomQb8JpYLitHUssAJRmLZdMCGsrx7i+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/tinyglobby": { "version": "0.2.16", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", @@ -2992,6 +3906,36 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/tinyrainbow": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", + "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tldts": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.3.0.tgz", + "integrity": "sha512-J6Pfd7TrW18RudBT/2J0p2ufKh0xr+pEe8lM5eYhYG8CRC7lhsUk8UjzcD25vtyhs8AC2/5IahXuC/X0y0pKHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^7.3.0" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.3.0.tgz", + "integrity": "sha512-vO+0KOlqXKs+Vb27iDcbPcAMVInMpGdIBrPKzVxb1LyTbvHi1LTPzaxRFleSfAPGEN89yG6Z6iLTpm410Wxl3w==", + "dev": true, + "license": "MIT" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3005,6 +3949,32 @@ "node": ">=8.0" } }, + "node_modules/tough-cookie": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", + "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^7.0.5" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz", + "integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -3026,6 +3996,16 @@ "node": ">=14.17" } }, + "node_modules/undici": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", + "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, "node_modules/update-browserslist-db": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", @@ -3192,6 +4172,191 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/vitest": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.7.tgz", + "integrity": "sha512-flYyaFd2CgoCoU+0UKt3pxksgC+S02iTDN0n3LtqaMeXsI9SBcdNujc2k0DeFLzUn/0k538yNjOSdwgCqcrwJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.7", + "@vitest/mocker": "4.1.7", + "@vitest/pretty-format": "4.1.7", + "@vitest/runner": "4.1.7", + "@vitest/snapshot": "4.1.7", + "@vitest/spy": "4.1.7", + "@vitest/utils": "4.1.7", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.7", + "@vitest/browser-preview": "4.1.7", + "@vitest/browser-webdriverio": "4.1.7", + "@vitest/coverage-istanbul": "4.1.7", + "@vitest/coverage-v8": "4.1.7", + "@vitest/ui": "4.1.7", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/webidl-conversions": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", + "integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=20" + } + }, + "node_modules/whatwg-mimetype": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", + "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/whatwg-url": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.1.tgz", + "integrity": "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@exodus/bytes": "^1.11.0", + "tr46": "^6.0.0", + "webidl-conversions": "^8.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true, + "license": "MIT" + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/dashboard/package.json b/dashboard/package.json index e1e2b8d..0b846e2 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -6,7 +6,8 @@ "scripts": { "build": "tsc --noEmit && vite build", "dev": "vite --host 127.0.0.1", - "lint": "tsc --noEmit --pretty false" + "lint": "tsc --noEmit --pretty false", + "test": "vitest run" }, "dependencies": { "@tanstack/react-query": "^5.90.11", @@ -19,13 +20,18 @@ "tailwind-merge": "^2.6.0" }, "devDependencies": { + "@testing-library/jest-dom": "^6.9.1", + "@testing-library/react": "^16.3.2", + "@testing-library/user-event": "^14.6.1", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", + "jsdom": "^29.1.1", "postcss": "^8.4.49", "tailwindcss": "^3.4.16", "typescript": "^5.7.2", - "vite": "^6.0.3" + "vite": "^6.0.3", + "vitest": "^4.1.7" } } diff --git a/dashboard/src/main.test.tsx b/dashboard/src/main.test.tsx new file mode 100644 index 0000000..df98bd5 --- /dev/null +++ b/dashboard/src/main.test.tsx @@ -0,0 +1,102 @@ +import { fireEvent, render, screen } from "@testing-library/react"; +import userEvent from "@testing-library/user-event"; +import { describe, expect, it } from "vitest"; +import { + ActorFilter, + StatusBadge, + buildJobQuery, + groupSessionEvents, + groupTranscriptEntries, + selectedJobIdFromPath, +} from "./main"; + +describe("dashboard routing and API query helpers", () => { + it("builds trimmed job queries and preserves the requested limit", () => { + expect( + buildJobQuery( + { + status: " pending ", + repo: " pilipilisbot/github-agent-bridge ", + thread: "", + action: " open_issue ", + intent: " work_allowed ", + actor: " ecarreras ", + }, + 24, + ), + ).toBe("/api/jobs?status=pending&repo=pilipilisbot%2Fgithub-agent-bridge&action=open_issue&intent=work_allowed&actor=ecarreras&limit=24"); + }); + + it("recognizes only canonical job detail routes", () => { + expect(selectedJobIdFromPath("/jobs/45")).toBe(45); + expect(selectedJobIdFromPath("/jobs/45/")).toBe(45); + expect(selectedJobIdFromPath("/jobs/not-a-number")).toBeNull(); + expect(selectedJobIdFromPath("/jobs/45/activity")).toBeNull(); + }); +}); + +describe("status badges", () => { + it("pulses pending and running jobs, but leaves waiting approval static", () => { + const { rerender } = render(); + expect(screen.getByText("pending").querySelector("span")).toHaveClass("animate-live-pulse"); + + rerender(); + expect(screen.getByText("running").querySelector("span")).toHaveClass("animate-live-pulse"); + + rerender(); + expect(screen.getByText("waiting_approval").querySelector("span")).not.toHaveClass("animate-live-pulse"); + }); +}); + +describe("actor filter", () => { + it("filters actors, selects a suggestion, and clears the selection", async () => { + const user = userEvent.setup(); + let value = ""; + const options = [ + { login: "ecarreras", avatar_url: "https://example.com/ecarreras.png", job_count: 7, last_seen: "2026-05-25T12:00:00Z" }, + { login: "octocat", avatar_url: null, job_count: 2, last_seen: null }, + ]; + const onChange = (actor: string) => { + value = actor; + rerender(); + }; + const { rerender } = render(); + + await user.type(screen.getByPlaceholderText("@login"), "eca"); + expect(screen.getByText("@ecarreras")).toBeInTheDocument(); + expect(screen.queryByText("@octocat")).not.toBeInTheDocument(); + + await user.click(screen.getByText("@ecarreras")); + expect(screen.getByPlaceholderText("@login")).toHaveValue("ecarreras"); + + fireEvent.click(screen.getByLabelText("Clear actor filter")); + expect(screen.getByPlaceholderText("@login")).toHaveValue(""); + }); +}); + +describe("log grouping", () => { + it("collapses consecutive OpenClaw CLI events while preserving boundaries", () => { + const grouped = groupSessionEvents([ + { id: 1, ts: "2026-05-25T12:00:00Z", job_id: 45, work_key: "repo#45", session_id: "s1", event_type: "openclaw_stdout", summary: "stdout", detail: "first line" }, + { id: 2, ts: "2026-05-25T12:00:01Z", job_id: 45, work_key: "repo#45", session_id: "s1", event_type: "openclaw_stdout", summary: "stdout", detail: "second line" }, + { id: 3, ts: "2026-05-25T12:00:02Z", job_id: 45, work_key: "repo#45", session_id: "s1", event_type: "agent_message", summary: "done", detail: null }, + ]); + + expect(grouped).toHaveLength(2); + expect(grouped[0]).toMatchObject({ count: 2, summary: "stdout (2): first line" }); + expect(grouped[0].detail).toBe("first line\nsecond line"); + expect(grouped[1]).toMatchObject({ count: 1, summary: "done" }); + }); + + it("collapses consecutive transcript CLI entries", () => { + const grouped = groupTranscriptEntries([ + { timestamp: "2026-05-25T12:00:00Z", role: "assistant", kind: "openclaw_stderr", title: "stderr", text: "warning" }, + { timestamp: "2026-05-25T12:00:01Z", role: "assistant", kind: "openclaw_stderr", title: "stderr", text: "details" }, + { timestamp: "2026-05-25T12:00:02Z", role: "assistant", kind: "message", title: "message", text: "finished" }, + ]); + + expect(grouped).toHaveLength(2); + expect(grouped[0]).toMatchObject({ count: 2, summary: "assistant · openclaw_stderr (2): warning" }); + expect(grouped[0].text).toBe("warning\ndetails"); + }); +}); diff --git a/dashboard/src/main.tsx b/dashboard/src/main.tsx index 71c28a9..afc3b45 100644 --- a/dashboard/src/main.tsx +++ b/dashboard/src/main.tsx @@ -1442,10 +1442,23 @@ function RefreshButton({ onClick, compactOnMobile = false }: { onClick: () => vo ); } -ReactDOM.createRoot(document.getElementById("root")!).render( - - - - - , -); +export { + ActorFilter, + StatusBadge, + buildJobQuery, + groupSessionEvents, + groupTranscriptEntries, + selectedJobIdFromPath, +}; + +const root = document.getElementById("root"); + +if (root) { + ReactDOM.createRoot(root).render( + + + + + , + ); +} diff --git a/dashboard/src/test/setup.ts b/dashboard/src/test/setup.ts new file mode 100644 index 0000000..f149f27 --- /dev/null +++ b/dashboard/src/test/setup.ts @@ -0,0 +1 @@ +import "@testing-library/jest-dom/vitest"; diff --git a/dashboard/vite.config.ts b/dashboard/vite.config.ts index 46b66a7..67c82d2 100644 --- a/dashboard/vite.config.ts +++ b/dashboard/vite.config.ts @@ -1,8 +1,12 @@ -import { defineConfig } from "vite"; +import { defineConfig } from "vitest/config"; import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], + test: { + environment: "jsdom", + setupFiles: "./src/test/setup.ts", + }, build: { outDir: "../src/github_agent_bridge/dashboard_static", emptyOutDir: true, diff --git a/src/github_agent_bridge/dashboard_static/assets/index-CwTu66TQ.js b/src/github_agent_bridge/dashboard_static/assets/index-Bh6F9yTT.js similarity index 84% rename from src/github_agent_bridge/dashboard_static/assets/index-CwTu66TQ.js rename to src/github_agent_bridge/dashboard_static/assets/index-Bh6F9yTT.js index 3384b00..5517f23 100644 --- a/src/github_agent_bridge/dashboard_static/assets/index-CwTu66TQ.js +++ b/src/github_agent_bridge/dashboard_static/assets/index-Bh6F9yTT.js @@ -1,4 +1,4 @@ -var ys=e=>{throw TypeError(e)};var Lt=(e,t,s)=>t.has(e)||ys("Cannot "+s);var a=(e,t,s)=>(Lt(e,t,"read from private field"),s?s.call(e):t.get(e)),w=(e,t,s)=>t.has(e)?ys("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),f=(e,t,s,r)=>(Lt(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),S=(e,t,s)=>(Lt(e,t,"access private method"),s);var St=(e,t,s,r)=>({set _(i){f(e,t,i,s)},get _(){return a(e,t,r)}});import{e as Pr,f as Mr,g as Or,r as Q,R as J,c as rs,b as Er,C as ns,X as is,Y as as,T as os,L as Fr,a as Zs,B as Ys,d as Tr}from"./charts-DRWoArYU.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();var Dt={exports:{}},dt={};/** +var ys=e=>{throw TypeError(e)};var Lt=(e,t,s)=>t.has(e)||ys("Cannot "+s);var a=(e,t,s)=>(Lt(e,t,"read from private field"),s?s.call(e):t.get(e)),w=(e,t,s)=>t.has(e)?ys("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),f=(e,t,s,r)=>(Lt(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),S=(e,t,s)=>(Lt(e,t,"access private method"),s);var St=(e,t,s,r)=>({set _(i){f(e,t,i,s)},get _(){return a(e,t,r)}});import{e as Mr,f as Or,g as Er,r as Q,R as J,c as rs,b as Fr,C as ns,X as is,Y as as,T as os,L as Tr,a as Ys,B as er,d as Ar}from"./charts-DRWoArYU.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();var Dt={exports:{}},dt={};/** * @license React * react-jsx-runtime.production.min.js * @@ -6,47 +6,47 @@ var ys=e=>{throw TypeError(e)};var Lt=(e,t,s)=>t.has(e)||ys("Cannot "+s);var a=( * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var vs;function Ar(){if(vs)return dt;vs=1;var e=Pr(),t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(l,d,u){var h,y={},j=null,b=null;u!==void 0&&(j=""+u),d.key!==void 0&&(j=""+d.key),d.ref!==void 0&&(b=d.ref);for(h in d)r.call(d,h)&&!o.hasOwnProperty(h)&&(y[h]=d[h]);if(l&&l.defaultProps)for(h in d=l.defaultProps,d)y[h]===void 0&&(y[h]=d[h]);return{$$typeof:t,type:l,key:j,ref:b,props:y,_owner:i.current}}return dt.Fragment=s,dt.jsx=c,dt.jsxs=c,dt}var ws;function Ir(){return ws||(ws=1,Dt.exports=Ar()),Dt.exports}var n=Ir(),Rt={},js;function Lr(){if(js)return Rt;js=1;var e=Mr();return Rt.createRoot=e.createRoot,Rt.hydrateRoot=e.hydrateRoot,Rt}var Dr=Lr();const qr=Or(Dr);var kt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Te,we,Je,Us,Qr=(Us=class extends kt{constructor(){super();w(this,Te);w(this,we);w(this,Je);f(this,Je,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){a(this,we)||this.setEventListener(a(this,Je))}onUnsubscribe(){var t;this.hasListeners()||((t=a(this,we))==null||t.call(this),f(this,we,void 0))}setEventListener(t){var s;f(this,Je,t),(s=a(this,we))==null||s.call(this),f(this,we,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){a(this,Te)!==t&&(f(this,Te,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof a(this,Te)=="boolean"?a(this,Te):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Te=new WeakMap,we=new WeakMap,Je=new WeakMap,Us),ls=new Qr,$r={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},je,ss,zs,Ur=(zs=class{constructor(){w(this,je,$r);w(this,ss,!1)}setTimeoutProvider(e){f(this,je,e)}setTimeout(e,t){return a(this,je).setTimeout(e,t)}clearTimeout(e){a(this,je).clearTimeout(e)}setInterval(e,t){return a(this,je).setInterval(e,t)}clearInterval(e){a(this,je).clearInterval(e)}},je=new WeakMap,ss=new WeakMap,zs),Fe=new Ur;function zr(e){setTimeout(e,0)}var Kr=typeof window>"u"||"Deno"in globalThis;function H(){}function Gr(e,t){return typeof e=="function"?e(t):e}function $t(e){return typeof e=="number"&&e>=0&&e!==1/0}function er(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pe(e,t){return typeof e=="function"?e(t):e}function X(e,t){return typeof e=="function"?e(t):e}function Ns(e,t){const{type:s="all",exact:r,fetchStatus:i,predicate:o,queryKey:c,stale:l}=e;if(c){if(r){if(t.queryHash!==cs(c,t.options))return!1}else if(!xt(t.queryKey,c))return!1}if(s!=="all"){const d=t.isActive();if(s==="active"&&!d||s==="inactive"&&d)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function ks(e,t){const{exact:s,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(s){if(pt(t.options.mutationKey)!==pt(o))return!1}else if(!xt(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function cs(e,t){return((t==null?void 0:t.queryKeyHashFn)||pt)(e)}function pt(e){return JSON.stringify(e,(t,s)=>zt(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function xt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>xt(e[s],t[s])):!1}var Br=Object.prototype.hasOwnProperty;function tr(e,t,s=0){if(e===t)return e;if(s>500)return t;const r=Cs(e)&&Cs(t);if(!r&&!(zt(e)&&zt(t)))return t;const o=(r?e:Object.keys(e)).length,c=r?t:Object.keys(t),l=c.length,d=r?new Array(l):{};let u=0;for(let h=0;h{Fe.setTimeout(t,e)})}function Kt(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?tr(e,t):t}function Jr(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function Wr(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var ds=Symbol();function sr(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ds?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function rr(e,t){return typeof e=="function"?e(...t):!!e}function Vr(e,t,s){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),e}var gt=(()=>{let e=()=>Kr;return{isServer(){return e()},setIsServer(t){e=t}}})();function Gt(){let e,t;const s=new Promise((i,o)=>{e=i,t=o});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},s.reject=i=>{r({status:"rejected",reason:i}),t(i)},s}var Xr=zr;function Zr(){let e=[],t=0,s=l=>{l()},r=l=>{l()},i=Xr;const o=l=>{t?e.push(l):i(()=>{s(l)})},c=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(d=>{s(d)})})})};return{batch:l=>{let d;t++;try{d=l()}finally{t--,t||c()}return d},batchCalls:l=>(...d)=>{o(()=>{l(...d)})},schedule:o,setNotifyFunction:l=>{s=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var q=Zr(),We,Ne,Ve,Ks,Yr=(Ks=class extends kt{constructor(){super();w(this,We,!0);w(this,Ne);w(this,Ve);f(this,Ve,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){a(this,Ne)||this.setEventListener(a(this,Ve))}onUnsubscribe(){var t;this.hasListeners()||((t=a(this,Ne))==null||t.call(this),f(this,Ne,void 0))}setEventListener(t){var s;f(this,Ve,t),(s=a(this,Ne))==null||s.call(this),f(this,Ne,t(this.setOnline.bind(this)))}setOnline(t){a(this,We)!==t&&(f(this,We,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return a(this,We)}},We=new WeakMap,Ne=new WeakMap,Ve=new WeakMap,Ks),Ot=new Yr;function en(e){return Math.min(1e3*2**e,3e4)}function nr(e){return(e??"online")==="online"?Ot.isOnline():!0}var Bt=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ir(e){let t=!1,s=0,r;const i=Gt(),o=()=>i.status!=="pending",c=p=>{var g;if(!o()){const m=new Bt(p);j(m),(g=e.onCancel)==null||g.call(e,m)}},l=()=>{t=!0},d=()=>{t=!1},u=()=>ls.isFocused()&&(e.networkMode==="always"||Ot.isOnline())&&e.canRun(),h=()=>nr(e.networkMode)&&e.canRun(),y=p=>{o()||(r==null||r(),i.resolve(p))},j=p=>{o()||(r==null||r(),i.reject(p))},b=()=>new Promise(p=>{var g;r=m=>{(o()||u())&&p(m)},(g=e.onPause)==null||g.call(e)}).then(()=>{var p;r=void 0,o()||(p=e.onContinue)==null||p.call(e)}),x=()=>{if(o())return;let p;const g=s===0?e.initialPromise:void 0;try{p=g??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(y).catch(m=>{var A;if(o())return;const k=e.retry??(gt.isServer()?0:3),_=e.retryDelay??en,v=typeof _=="function"?_(s,m):_,O=k===!0||typeof k=="number"&&su()?void 0:b()).then(()=>{t?j(m):x()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:d,canStart:h,start:()=>(h()?x():b().then(x),i)}}var Ae,Gs,ar=(Gs=class{constructor(){w(this,Ae)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$t(this.gcTime)&&f(this,Ae,Fe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gt.isServer()?1/0:300*1e3))}clearGcTimeout(){a(this,Ae)!==void 0&&(Fe.clearTimeout(a(this,Ae)),f(this,Ae,void 0))}},Ae=new WeakMap,Gs);function tn(e){return{onFetch:(t,s)=>{var h,y,j,b,x;const r=t.options,i=(j=(y=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:y.fetchMore)==null?void 0:j.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],c=((x=t.state.data)==null?void 0:x.pageParams)||[];let l={pages:[],pageParams:[]},d=0;const u=async()=>{let p=!1;const g=_=>{Vr(_,()=>t.signal,()=>p=!0)},m=sr(t.options,t.fetchOptions),k=async(_,v,O)=>{if(p)return Promise.reject(t.signal.reason);if(v==null&&_.pages.length)return Promise.resolve(_);const W=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:v,direction:O?"backward":"forward",meta:t.options.meta};return g(G),G})(),C=await m(W),{maxPages:F}=t.options,T=O?Wr:Jr;return{pages:T(_.pages,C,F),pageParams:T(_.pageParams,v,F)}};if(i&&o.length){const _=i==="backward",v=_?sn:Rs,O={pages:o,pageParams:c},A=v(r,O);l=await k(O,A,_)}else{const _=e??o.length;do{const v=d===0?c[0]??r.initialPageParam:Rs(r,l);if(d>0&&v==null)break;l=await k(l,v),d++}while(d<_)}return l};t.options.persister?t.fetchFn=()=>{var p,g;return(g=(p=t.options).persister)==null?void 0:g.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=u}}}function Rs(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function sn(e,{pages:t,pageParams:s}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,s[0],s):void 0}var Xe,Ie,Ze,te,Le,L,yt,De,V,or,he,Bs,rn=(Bs=class extends ar{constructor(t){super();w(this,V);w(this,Xe);w(this,Ie);w(this,Ze);w(this,te);w(this,Le);w(this,L);w(this,yt);w(this,De);f(this,De,!1),f(this,yt,t.defaultOptions),this.setOptions(t.options),this.observers=[],f(this,Le,t.client),f(this,te,a(this,Le).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,f(this,Ie,Ps(this.options)),this.state=t.state??a(this,Ie),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return a(this,Xe)}get promise(){var t;return(t=a(this,L))==null?void 0:t.promise}setOptions(t){if(this.options={...a(this,yt),...t},t!=null&&t._type&&f(this,Xe,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Ps(this.options);s.data!==void 0&&(this.setState(_s(s.data,s.dataUpdatedAt)),f(this,Ie,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&a(this,te).remove(this)}setData(t,s){const r=Kt(this.state.data,t,this.options);return S(this,V,he).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(t){S(this,V,he).call(this,{type:"setState",state:t})}cancel(t){var r,i;const s=(r=a(this,L))==null?void 0:r.promise;return(i=a(this,L))==null||i.cancel(t),s?s.then(H).catch(H):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return a(this,Ie)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>X(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ds||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Pe(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!er(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=a(this,L))==null||s.continue()}onOnline(){var s;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=a(this,L))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),a(this,te).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(a(this,L)&&(a(this,De)||S(this,V,or).call(this)?a(this,L).cancel({revert:!0}):a(this,L).cancelRetry()),this.scheduleGc()),a(this,te).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||S(this,V,he).call(this,{type:"invalidate"})}async fetch(t,s){var u,h,y,j,b,x,p,g,m,k,_;if(this.state.fetchStatus!=="idle"&&((u=a(this,L))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(a(this,L))return a(this,L).continueRetry(),a(this,L).promise}if(t&&this.setOptions(t),!this.options.queryFn){const v=this.observers.find(O=>O.options.queryFn);v&&this.setOptions(v.options)}const r=new AbortController,i=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(f(this,De,!0),r.signal)})},o=()=>{const v=sr(this.options,s),A=(()=>{const W={client:a(this,Le),queryKey:this.queryKey,meta:this.meta};return i(W),W})();return f(this,De,!1),this.options.persister?this.options.persister(v,A,this):v(A)},l=(()=>{const v={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:a(this,Le),state:this.state,fetchFn:o};return i(v),v})(),d=a(this,Xe)==="infinite"?tn(this.options.pages):this.options.behavior;d==null||d.onFetch(l,this),f(this,Ze,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&S(this,V,he).call(this,{type:"fetch",meta:(y=l.fetchOptions)==null?void 0:y.meta}),f(this,L,ir({initialPromise:s==null?void 0:s.initialPromise,fn:l.fetchFn,onCancel:v=>{v instanceof Bt&&v.revert&&this.setState({...a(this,Ze),fetchStatus:"idle"}),r.abort()},onFail:(v,O)=>{S(this,V,he).call(this,{type:"failed",failureCount:v,error:O})},onPause:()=>{S(this,V,he).call(this,{type:"pause"})},onContinue:()=>{S(this,V,he).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const v=await a(this,L).start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),(b=(j=a(this,te).config).onSuccess)==null||b.call(j,v,this),(p=(x=a(this,te).config).onSettled)==null||p.call(x,v,this.state.error,this),v}catch(v){if(v instanceof Bt){if(v.silent)return a(this,L).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw S(this,V,he).call(this,{type:"error",error:v}),(m=(g=a(this,te).config).onError)==null||m.call(g,v,this),(_=(k=a(this,te).config).onSettled)==null||_.call(k,this.state.data,v,this),v}finally{this.scheduleGc()}}},Xe=new WeakMap,Ie=new WeakMap,Ze=new WeakMap,te=new WeakMap,Le=new WeakMap,L=new WeakMap,yt=new WeakMap,De=new WeakMap,V=new WeakSet,or=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},he=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...lr(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,..._s(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return f(this,Ze,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),q.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),a(this,te).notify({query:this,type:"updated",action:t})})},Bs);function lr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nr(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _s(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ps(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var B,R,vt,K,qe,Ye,fe,ke,wt,et,tt,Qe,$e,Ce,st,M,ft,Ht,Jt,Wt,Vt,Xt,Zt,Yt,cr,Hs,nn=(Hs=class extends kt{constructor(t,s){super();w(this,M);w(this,B);w(this,R);w(this,vt);w(this,K);w(this,qe);w(this,Ye);w(this,fe);w(this,ke);w(this,wt);w(this,et);w(this,tt);w(this,Qe);w(this,$e);w(this,Ce);w(this,st,new Set);this.options=s,f(this,B,t),f(this,ke,null),f(this,fe,Gt()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(a(this,R).addObserver(this),Ms(a(this,R),this.options)?S(this,M,ft).call(this):this.updateResult(),S(this,M,Vt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return es(a(this,R),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return es(a(this,R),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,S(this,M,Xt).call(this),S(this,M,Zt).call(this),a(this,R).removeObserver(this)}setOptions(t){const s=this.options,r=a(this,R);if(this.options=a(this,B).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof X(this.options.enabled,a(this,R))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");S(this,M,Yt).call(this),a(this,R).setOptions(this.options),s._defaulted&&!Ut(this.options,s)&&a(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:a(this,R),observer:this});const i=this.hasListeners();i&&Os(a(this,R),r,this.options,s)&&S(this,M,ft).call(this),this.updateResult(),i&&(a(this,R)!==r||X(this.options.enabled,a(this,R))!==X(s.enabled,a(this,R))||Pe(this.options.staleTime,a(this,R))!==Pe(s.staleTime,a(this,R)))&&S(this,M,Ht).call(this);const o=S(this,M,Jt).call(this);i&&(a(this,R)!==r||X(this.options.enabled,a(this,R))!==X(s.enabled,a(this,R))||o!==a(this,Ce))&&S(this,M,Wt).call(this,o)}getOptimisticResult(t){const s=a(this,B).getQueryCache().build(a(this,B),t),r=this.createResult(s,t);return on(this,r)&&(f(this,K,r),f(this,Ye,this.options),f(this,qe,a(this,R).state)),r}getCurrentResult(){return a(this,K)}trackResult(t,s){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),s==null||s(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&a(this,fe).status==="pending"&&a(this,fe).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){a(this,st).add(t)}getCurrentQuery(){return a(this,R)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=a(this,B).defaultQueryOptions(t),r=a(this,B).getQueryCache().build(a(this,B),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return S(this,M,ft).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),a(this,K)))}createResult(t,s){var F;const r=a(this,R),i=this.options,o=a(this,K),c=a(this,qe),l=a(this,Ye),u=t!==r?t.state:a(this,vt),{state:h}=t;let y={...h},j=!1,b;if(s._optimisticResults){const T=this.hasListeners(),G=!T&&Ms(t,s),P=T&&Os(t,r,s,i);(G||P)&&(y={...y,...lr(h.data,t.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:x,errorUpdatedAt:p,status:g}=y;b=y.data;let m=!1;if(s.placeholderData!==void 0&&b===void 0&&g==="pending"){let T;o!=null&&o.isPlaceholderData&&s.placeholderData===(l==null?void 0:l.placeholderData)?(T=o.data,m=!0):T=typeof s.placeholderData=="function"?s.placeholderData((F=a(this,tt))==null?void 0:F.state.data,a(this,tt)):s.placeholderData,T!==void 0&&(g="success",b=Kt(o==null?void 0:o.data,T,s),j=!0)}if(s.select&&b!==void 0&&!m)if(o&&b===(c==null?void 0:c.data)&&s.select===a(this,wt))b=a(this,et);else try{f(this,wt,s.select),b=s.select(b),b=Kt(o==null?void 0:o.data,b,s),f(this,et,b),f(this,ke,null)}catch(T){f(this,ke,T)}a(this,ke)&&(x=a(this,ke),b=a(this,et),p=Date.now(),g="error");const k=y.fetchStatus==="fetching",_=g==="pending",v=g==="error",O=_&&k,A=b!==void 0,C={status:g,fetchStatus:y.fetchStatus,isPending:_,isSuccess:g==="success",isError:v,isInitialLoading:O,isLoading:O,data:b,dataUpdatedAt:y.dataUpdatedAt,error:x,errorUpdatedAt:p,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>u.dataUpdateCount||y.errorUpdateCount>u.errorUpdateCount,isFetching:k,isRefetching:k&&!_,isLoadingError:v&&!A,isPaused:y.fetchStatus==="paused",isPlaceholderData:j,isRefetchError:v&&A,isStale:us(t,s),refetch:this.refetch,promise:a(this,fe),isEnabled:X(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=C.data!==void 0,G=C.status==="error"&&!T,P=ie=>{G?ie.reject(C.error):T&&ie.resolve(C.data)},xe=()=>{const ie=f(this,fe,C.promise=Gt());P(ie)},Z=a(this,fe);switch(Z.status){case"pending":t.queryHash===r.queryHash&&P(Z);break;case"fulfilled":(G||C.data!==Z.value)&&xe();break;case"rejected":(!G||C.error!==Z.reason)&&xe();break}}return C}updateResult(){const t=a(this,K),s=this.createResult(a(this,R),this.options);if(f(this,qe,a(this,R).state),f(this,Ye,this.options),a(this,qe).data!==void 0&&f(this,tt,a(this,R)),Ut(s,t))return;f(this,K,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!a(this,st).size)return!0;const c=new Set(o??a(this,st));return this.options.throwOnError&&c.add("error"),Object.keys(a(this,K)).some(l=>{const d=l;return a(this,K)[d]!==t[d]&&c.has(d)})};S(this,M,cr).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&S(this,M,Vt).call(this)}},B=new WeakMap,R=new WeakMap,vt=new WeakMap,K=new WeakMap,qe=new WeakMap,Ye=new WeakMap,fe=new WeakMap,ke=new WeakMap,wt=new WeakMap,et=new WeakMap,tt=new WeakMap,Qe=new WeakMap,$e=new WeakMap,Ce=new WeakMap,st=new WeakMap,M=new WeakSet,ft=function(t){S(this,M,Yt).call(this);let s=a(this,R).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(H)),s},Ht=function(){S(this,M,Xt).call(this);const t=Pe(this.options.staleTime,a(this,R));if(gt.isServer()||a(this,K).isStale||!$t(t))return;const r=er(a(this,K).dataUpdatedAt,t)+1;f(this,Qe,Fe.setTimeout(()=>{a(this,K).isStale||this.updateResult()},r))},Jt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(a(this,R)):this.options.refetchInterval)??!1},Wt=function(t){S(this,M,Zt).call(this),f(this,Ce,t),!(gt.isServer()||X(this.options.enabled,a(this,R))===!1||!$t(a(this,Ce))||a(this,Ce)===0)&&f(this,$e,Fe.setInterval(()=>{(this.options.refetchIntervalInBackground||ls.isFocused())&&S(this,M,ft).call(this)},a(this,Ce)))},Vt=function(){S(this,M,Ht).call(this),S(this,M,Wt).call(this,S(this,M,Jt).call(this))},Xt=function(){a(this,Qe)!==void 0&&(Fe.clearTimeout(a(this,Qe)),f(this,Qe,void 0))},Zt=function(){a(this,$e)!==void 0&&(Fe.clearInterval(a(this,$e)),f(this,$e,void 0))},Yt=function(){const t=a(this,B).getQueryCache().build(a(this,B),this.options);if(t===a(this,R))return;const s=a(this,R);f(this,R,t),f(this,vt,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},cr=function(t){q.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(a(this,K))}),a(this,B).getQueryCache().notify({query:a(this,R),type:"observerResultsUpdated"})})},Hs);function an(e,t){return X(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&X(t.retryOnMount,e)===!1)}function Ms(e,t){return an(e,t)||e.state.data!==void 0&&es(e,t,t.refetchOnMount)}function es(e,t,s){if(X(t.enabled,e)!==!1&&Pe(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&us(e,t)}return!1}function Os(e,t,s,r){return(e!==t||X(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&us(e,s)}function us(e,t){return X(t.enabled,e)!==!1&&e.isStaleByTime(Pe(t.staleTime,e))}function on(e,t){return!Ut(e.getCurrentResult(),t)}var jt,le,$,Ue,ce,ve,Js,ln=(Js=class extends ar{constructor(t){super();w(this,ce);w(this,jt);w(this,le);w(this,$);w(this,Ue);f(this,jt,t.client),this.mutationId=t.mutationId,f(this,$,t.mutationCache),f(this,le,[]),this.state=t.state||cn(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){a(this,le).includes(t)||(a(this,le).push(t),this.clearGcTimeout(),a(this,$).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){f(this,le,a(this,le).filter(s=>s!==t)),this.scheduleGc(),a(this,$).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){a(this,le).length||(this.state.status==="pending"?this.scheduleGc():a(this,$).remove(this))}continue(){var t;return((t=a(this,Ue))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,l,d,u,h,y,j,b,x,p,g,m,k,_,v,O,A,W;const s=()=>{S(this,ce,ve).call(this,{type:"continue"})},r={client:a(this,jt),meta:this.options.meta,mutationKey:this.options.mutationKey};f(this,Ue,ir({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(C,F)=>{S(this,ce,ve).call(this,{type:"failed",failureCount:C,error:F})},onPause:()=>{S(this,ce,ve).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>a(this,$).canRun(this)}));const i=this.state.status==="pending",o=!a(this,Ue).canStart();try{if(i)s();else{S(this,ce,ve).call(this,{type:"pending",variables:t,isPaused:o}),a(this,$).config.onMutate&&await a(this,$).config.onMutate(t,this,r);const F=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,r));F!==this.state.context&&S(this,ce,ve).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const C=await a(this,Ue).start();return await((u=(d=a(this,$).config).onSuccess)==null?void 0:u.call(d,C,t,this.state.context,this,r)),await((y=(h=this.options).onSuccess)==null?void 0:y.call(h,C,t,this.state.context,r)),await((b=(j=a(this,$).config).onSettled)==null?void 0:b.call(j,C,null,this.state.variables,this.state.context,this,r)),await((p=(x=this.options).onSettled)==null?void 0:p.call(x,C,null,t,this.state.context,r)),S(this,ce,ve).call(this,{type:"success",data:C}),C}catch(C){try{await((m=(g=a(this,$).config).onError)==null?void 0:m.call(g,C,t,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((_=(k=this.options).onError)==null?void 0:_.call(k,C,t,this.state.context,r))}catch(F){Promise.reject(F)}try{await((O=(v=a(this,$).config).onSettled)==null?void 0:O.call(v,void 0,C,this.state.variables,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((W=(A=this.options).onSettled)==null?void 0:W.call(A,void 0,C,t,this.state.context,r))}catch(F){Promise.reject(F)}throw S(this,ce,ve).call(this,{type:"error",error:C}),C}finally{a(this,$).runNext(this)}}},jt=new WeakMap,le=new WeakMap,$=new WeakMap,Ue=new WeakMap,ce=new WeakSet,ve=function(t){const s=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),q.batch(()=>{a(this,le).forEach(r=>{r.onMutationUpdate(t)}),a(this,$).notify({mutation:this,type:"updated",action:t})})},Js);function cn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var me,se,Nt,Ws,dn=(Ws=class extends kt{constructor(t={}){super();w(this,me);w(this,se);w(this,Nt);this.config=t,f(this,me,new Set),f(this,se,new Map),f(this,Nt,0)}build(t,s,r){const i=new ln({client:t,mutationCache:this,mutationId:++St(this,Nt)._,options:t.defaultMutationOptions(s),state:r});return this.add(i),i}add(t){a(this,me).add(t);const s=_t(t);if(typeof s=="string"){const r=a(this,se).get(s);r?r.push(t):a(this,se).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(a(this,me).delete(t)){const s=_t(t);if(typeof s=="string"){const r=a(this,se).get(s);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&a(this,se).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=_t(t);if(typeof s=="string"){const r=a(this,se).get(s),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const s=_t(t);if(typeof s=="string"){const i=(r=a(this,se).get(s))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){q.batch(()=>{a(this,me).forEach(t=>{this.notify({type:"removed",mutation:t})}),a(this,me).clear(),a(this,se).clear()})}getAll(){return Array.from(a(this,me))}find(t){const s={exact:!0,...t};return this.getAll().find(r=>ks(s,r))}findAll(t={}){return this.getAll().filter(s=>ks(t,s))}notify(t){q.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return q.batch(()=>Promise.all(t.map(s=>s.continue().catch(H))))}},me=new WeakMap,se=new WeakMap,Nt=new WeakMap,Ws);function _t(e){var t;return(t=e.options.scope)==null?void 0:t.id}var de,Vs,un=(Vs=class extends kt{constructor(t={}){super();w(this,de);this.config=t,f(this,de,new Map)}build(t,s,r){const i=s.queryKey,o=s.queryHash??cs(i,s);let c=this.get(o);return c||(c=new rn({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(c)),c}add(t){a(this,de).has(t.queryHash)||(a(this,de).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=a(this,de).get(t.queryHash);s&&(t.destroy(),s===t&&a(this,de).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){q.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return a(this,de).get(t)}getAll(){return[...a(this,de).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Ns(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>Ns(t,r)):s}notify(t){q.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){q.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){q.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},de=new WeakMap,Vs),I,Se,Re,rt,nt,_e,it,at,Xs,hn=(Xs=class{constructor(e={}){w(this,I);w(this,Se);w(this,Re);w(this,rt);w(this,nt);w(this,_e);w(this,it);w(this,at);f(this,I,e.queryCache||new un),f(this,Se,e.mutationCache||new dn),f(this,Re,e.defaultOptions||{}),f(this,rt,new Map),f(this,nt,new Map),f(this,_e,0)}mount(){St(this,_e)._++,a(this,_e)===1&&(f(this,it,ls.subscribe(async e=>{e&&(await this.resumePausedMutations(),a(this,I).onFocus())})),f(this,at,Ot.subscribe(async e=>{e&&(await this.resumePausedMutations(),a(this,I).onOnline())})))}unmount(){var e,t;St(this,_e)._--,a(this,_e)===0&&((e=a(this,it))==null||e.call(this),f(this,it,void 0),(t=a(this,at))==null||t.call(this),f(this,at,void 0))}isFetching(e){return a(this,I).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return a(this,Se).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=a(this,I).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=a(this,I).build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Pe(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return a(this,I).findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),i=a(this,I).get(r.queryHash),o=i==null?void 0:i.state.data,c=Gr(t,o);if(c!==void 0)return a(this,I).build(this,r).setData(c,{...s,manual:!0})}setQueriesData(e,t,s){return q.batch(()=>a(this,I).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=a(this,I).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=a(this,I);q.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=a(this,I);return q.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=q.batch(()=>a(this,I).findAll(e).map(i=>i.cancel(s)));return Promise.all(r).then(H).catch(H)}invalidateQueries(e,t={}){return q.batch(()=>(a(this,I).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=q.batch(()=>a(this,I).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,s);return s.throwOnError||(o=o.catch(H)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(H)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=a(this,I).build(this,t);return s.isStaleByTime(Pe(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(H).catch(H)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(H).catch(H)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ot.isOnline()?a(this,Se).resumePausedMutations():Promise.resolve()}getQueryCache(){return a(this,I)}getMutationCache(){return a(this,Se)}getDefaultOptions(){return a(this,Re)}setDefaultOptions(e){f(this,Re,e)}setQueryDefaults(e,t){a(this,rt).set(pt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...a(this,rt).values()],s={};return t.forEach(r=>{xt(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){a(this,nt).set(pt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...a(this,nt).values()],s={};return t.forEach(r=>{xt(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...a(this,Re).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cs(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ds&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...a(this,Re).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){a(this,I).clear(),a(this,Se).clear()}},I=new WeakMap,Se=new WeakMap,Re=new WeakMap,rt=new WeakMap,nt=new WeakMap,_e=new WeakMap,it=new WeakMap,at=new WeakMap,Xs),dr=Q.createContext(void 0),ur=e=>{const t=Q.useContext(dr);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},fn=({client:e,children:t})=>(Q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(dr.Provider,{value:e,children:t})),hr=Q.createContext(!1),mn=()=>Q.useContext(hr);hr.Provider;function pn(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var xn=Q.createContext(pn()),gn=()=>Q.useContext(xn),bn=(e,t,s)=>{const r=s!=null&&s.state.error&&typeof e.throwOnError=="function"?rr(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},yn=e=>{Q.useEffect(()=>{e.clearReset()},[e])},vn=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||rr(s,[e.error,r])),wn=e=>{if(e.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},jn=(e,t)=>e.isLoading&&e.isFetching&&!t,Nn=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Es=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function kn(e,t,s){var j,b,x,p;const r=mn(),i=gn(),o=ur(),c=o.defaultQueryOptions(e);(b=(j=o.getDefaultOptions().queries)==null?void 0:j._experimental_beforeQuery)==null||b.call(j,c);const l=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",wn(c),bn(c,i,l),yn(i);const d=!o.getQueryCache().get(c.queryHash),[u]=Q.useState(()=>new t(o,c)),h=u.getOptimisticResult(c),y=!r&&e.subscribed!==!1;if(Q.useSyncExternalStore(Q.useCallback(g=>{const m=y?u.subscribe(q.batchCalls(g)):H;return u.updateResult(),m},[u,y]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),Q.useEffect(()=>{u.setOptions(c)},[c,u]),Nn(c,h))throw Es(c,u,i);if(vn({result:h,errorResetBoundary:i,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw h.error;if((p=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||p.call(x,c,h),c.experimental_prefetchInRender&&!gt.isServer()&&jn(h,r)){const g=d?Es(c,u,i):l==null?void 0:l.promise;g==null||g.catch(H).finally(()=>{u.updateResult()})}return c.notifyOnChangeProps?h:u.trackResult(h)}function ae(e,t){return kn(e,nn)}/** + */var vs;function Ir(){if(vs)return dt;vs=1;var e=Mr(),t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(l,d,u){var h,y={},j=null,b=null;u!==void 0&&(j=""+u),d.key!==void 0&&(j=""+d.key),d.ref!==void 0&&(b=d.ref);for(h in d)r.call(d,h)&&!o.hasOwnProperty(h)&&(y[h]=d[h]);if(l&&l.defaultProps)for(h in d=l.defaultProps,d)y[h]===void 0&&(y[h]=d[h]);return{$$typeof:t,type:l,key:j,ref:b,props:y,_owner:i.current}}return dt.Fragment=s,dt.jsx=c,dt.jsxs=c,dt}var ws;function Lr(){return ws||(ws=1,Dt.exports=Ir()),Dt.exports}var n=Lr(),Rt={},js;function Dr(){if(js)return Rt;js=1;var e=Or();return Rt.createRoot=e.createRoot,Rt.hydrateRoot=e.hydrateRoot,Rt}var qr=Dr();const Qr=Er(qr);var kt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Te,we,Je,zs,$r=(zs=class extends kt{constructor(){super();w(this,Te);w(this,we);w(this,Je);f(this,Je,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){a(this,we)||this.setEventListener(a(this,Je))}onUnsubscribe(){var t;this.hasListeners()||((t=a(this,we))==null||t.call(this),f(this,we,void 0))}setEventListener(t){var s;f(this,Je,t),(s=a(this,we))==null||s.call(this),f(this,we,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){a(this,Te)!==t&&(f(this,Te,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof a(this,Te)=="boolean"?a(this,Te):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Te=new WeakMap,we=new WeakMap,Je=new WeakMap,zs),ls=new $r,Ur={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},je,ss,Ks,zr=(Ks=class{constructor(){w(this,je,Ur);w(this,ss,!1)}setTimeoutProvider(e){f(this,je,e)}setTimeout(e,t){return a(this,je).setTimeout(e,t)}clearTimeout(e){a(this,je).clearTimeout(e)}setInterval(e,t){return a(this,je).setInterval(e,t)}clearInterval(e){a(this,je).clearInterval(e)}},je=new WeakMap,ss=new WeakMap,Ks),Fe=new zr;function Kr(e){setTimeout(e,0)}var Gr=typeof window>"u"||"Deno"in globalThis;function H(){}function Br(e,t){return typeof e=="function"?e(t):e}function $t(e){return typeof e=="number"&&e>=0&&e!==1/0}function tr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pe(e,t){return typeof e=="function"?e(t):e}function X(e,t){return typeof e=="function"?e(t):e}function Ns(e,t){const{type:s="all",exact:r,fetchStatus:i,predicate:o,queryKey:c,stale:l}=e;if(c){if(r){if(t.queryHash!==cs(c,t.options))return!1}else if(!xt(t.queryKey,c))return!1}if(s!=="all"){const d=t.isActive();if(s==="active"&&!d||s==="inactive"&&d)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function ks(e,t){const{exact:s,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(s){if(pt(t.options.mutationKey)!==pt(o))return!1}else if(!xt(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function cs(e,t){return((t==null?void 0:t.queryKeyHashFn)||pt)(e)}function pt(e){return JSON.stringify(e,(t,s)=>zt(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function xt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>xt(e[s],t[s])):!1}var Hr=Object.prototype.hasOwnProperty;function sr(e,t,s=0){if(e===t)return e;if(s>500)return t;const r=Cs(e)&&Cs(t);if(!r&&!(zt(e)&&zt(t)))return t;const o=(r?e:Object.keys(e)).length,c=r?t:Object.keys(t),l=c.length,d=r?new Array(l):{};let u=0;for(let h=0;h{Fe.setTimeout(t,e)})}function Kt(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?sr(e,t):t}function Wr(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function Vr(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var ds=Symbol();function rr(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ds?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function nr(e,t){return typeof e=="function"?e(...t):!!e}function Xr(e,t,s){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),e}var gt=(()=>{let e=()=>Gr;return{isServer(){return e()},setIsServer(t){e=t}}})();function Gt(){let e,t;const s=new Promise((i,o)=>{e=i,t=o});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},s.reject=i=>{r({status:"rejected",reason:i}),t(i)},s}var Zr=Kr;function Yr(){let e=[],t=0,s=l=>{l()},r=l=>{l()},i=Zr;const o=l=>{t?e.push(l):i(()=>{s(l)})},c=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(d=>{s(d)})})})};return{batch:l=>{let d;t++;try{d=l()}finally{t--,t||c()}return d},batchCalls:l=>(...d)=>{o(()=>{l(...d)})},schedule:o,setNotifyFunction:l=>{s=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var q=Yr(),We,Ne,Ve,Gs,en=(Gs=class extends kt{constructor(){super();w(this,We,!0);w(this,Ne);w(this,Ve);f(this,Ve,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){a(this,Ne)||this.setEventListener(a(this,Ve))}onUnsubscribe(){var t;this.hasListeners()||((t=a(this,Ne))==null||t.call(this),f(this,Ne,void 0))}setEventListener(t){var s;f(this,Ve,t),(s=a(this,Ne))==null||s.call(this),f(this,Ne,t(this.setOnline.bind(this)))}setOnline(t){a(this,We)!==t&&(f(this,We,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return a(this,We)}},We=new WeakMap,Ne=new WeakMap,Ve=new WeakMap,Gs),Ot=new en;function tn(e){return Math.min(1e3*2**e,3e4)}function ir(e){return(e??"online")==="online"?Ot.isOnline():!0}var Bt=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ar(e){let t=!1,s=0,r;const i=Gt(),o=()=>i.status!=="pending",c=p=>{var g;if(!o()){const m=new Bt(p);j(m),(g=e.onCancel)==null||g.call(e,m)}},l=()=>{t=!0},d=()=>{t=!1},u=()=>ls.isFocused()&&(e.networkMode==="always"||Ot.isOnline())&&e.canRun(),h=()=>ir(e.networkMode)&&e.canRun(),y=p=>{o()||(r==null||r(),i.resolve(p))},j=p=>{o()||(r==null||r(),i.reject(p))},b=()=>new Promise(p=>{var g;r=m=>{(o()||u())&&p(m)},(g=e.onPause)==null||g.call(e)}).then(()=>{var p;r=void 0,o()||(p=e.onContinue)==null||p.call(e)}),x=()=>{if(o())return;let p;const g=s===0?e.initialPromise:void 0;try{p=g??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(y).catch(m=>{var A;if(o())return;const k=e.retry??(gt.isServer()?0:3),_=e.retryDelay??tn,v=typeof _=="function"?_(s,m):_,O=k===!0||typeof k=="number"&&su()?void 0:b()).then(()=>{t?j(m):x()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:d,canStart:h,start:()=>(h()?x():b().then(x),i)}}var Ae,Bs,or=(Bs=class{constructor(){w(this,Ae)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$t(this.gcTime)&&f(this,Ae,Fe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gt.isServer()?1/0:300*1e3))}clearGcTimeout(){a(this,Ae)!==void 0&&(Fe.clearTimeout(a(this,Ae)),f(this,Ae,void 0))}},Ae=new WeakMap,Bs);function sn(e){return{onFetch:(t,s)=>{var h,y,j,b,x;const r=t.options,i=(j=(y=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:y.fetchMore)==null?void 0:j.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],c=((x=t.state.data)==null?void 0:x.pageParams)||[];let l={pages:[],pageParams:[]},d=0;const u=async()=>{let p=!1;const g=_=>{Xr(_,()=>t.signal,()=>p=!0)},m=rr(t.options,t.fetchOptions),k=async(_,v,O)=>{if(p)return Promise.reject(t.signal.reason);if(v==null&&_.pages.length)return Promise.resolve(_);const W=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:v,direction:O?"backward":"forward",meta:t.options.meta};return g(G),G})(),C=await m(W),{maxPages:F}=t.options,T=O?Vr:Wr;return{pages:T(_.pages,C,F),pageParams:T(_.pageParams,v,F)}};if(i&&o.length){const _=i==="backward",v=_?rn:Rs,O={pages:o,pageParams:c},A=v(r,O);l=await k(O,A,_)}else{const _=e??o.length;do{const v=d===0?c[0]??r.initialPageParam:Rs(r,l);if(d>0&&v==null)break;l=await k(l,v),d++}while(d<_)}return l};t.options.persister?t.fetchFn=()=>{var p,g;return(g=(p=t.options).persister)==null?void 0:g.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=u}}}function Rs(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function rn(e,{pages:t,pageParams:s}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,s[0],s):void 0}var Xe,Ie,Ze,te,Le,L,yt,De,V,lr,he,Hs,nn=(Hs=class extends or{constructor(t){super();w(this,V);w(this,Xe);w(this,Ie);w(this,Ze);w(this,te);w(this,Le);w(this,L);w(this,yt);w(this,De);f(this,De,!1),f(this,yt,t.defaultOptions),this.setOptions(t.options),this.observers=[],f(this,Le,t.client),f(this,te,a(this,Le).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,f(this,Ie,Ps(this.options)),this.state=t.state??a(this,Ie),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return a(this,Xe)}get promise(){var t;return(t=a(this,L))==null?void 0:t.promise}setOptions(t){if(this.options={...a(this,yt),...t},t!=null&&t._type&&f(this,Xe,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Ps(this.options);s.data!==void 0&&(this.setState(_s(s.data,s.dataUpdatedAt)),f(this,Ie,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&a(this,te).remove(this)}setData(t,s){const r=Kt(this.state.data,t,this.options);return S(this,V,he).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(t){S(this,V,he).call(this,{type:"setState",state:t})}cancel(t){var r,i;const s=(r=a(this,L))==null?void 0:r.promise;return(i=a(this,L))==null||i.cancel(t),s?s.then(H).catch(H):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return a(this,Ie)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>X(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ds||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Pe(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!tr(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=a(this,L))==null||s.continue()}onOnline(){var s;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=a(this,L))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),a(this,te).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(a(this,L)&&(a(this,De)||S(this,V,lr).call(this)?a(this,L).cancel({revert:!0}):a(this,L).cancelRetry()),this.scheduleGc()),a(this,te).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||S(this,V,he).call(this,{type:"invalidate"})}async fetch(t,s){var u,h,y,j,b,x,p,g,m,k,_;if(this.state.fetchStatus!=="idle"&&((u=a(this,L))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(a(this,L))return a(this,L).continueRetry(),a(this,L).promise}if(t&&this.setOptions(t),!this.options.queryFn){const v=this.observers.find(O=>O.options.queryFn);v&&this.setOptions(v.options)}const r=new AbortController,i=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(f(this,De,!0),r.signal)})},o=()=>{const v=rr(this.options,s),A=(()=>{const W={client:a(this,Le),queryKey:this.queryKey,meta:this.meta};return i(W),W})();return f(this,De,!1),this.options.persister?this.options.persister(v,A,this):v(A)},l=(()=>{const v={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:a(this,Le),state:this.state,fetchFn:o};return i(v),v})(),d=a(this,Xe)==="infinite"?sn(this.options.pages):this.options.behavior;d==null||d.onFetch(l,this),f(this,Ze,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&S(this,V,he).call(this,{type:"fetch",meta:(y=l.fetchOptions)==null?void 0:y.meta}),f(this,L,ar({initialPromise:s==null?void 0:s.initialPromise,fn:l.fetchFn,onCancel:v=>{v instanceof Bt&&v.revert&&this.setState({...a(this,Ze),fetchStatus:"idle"}),r.abort()},onFail:(v,O)=>{S(this,V,he).call(this,{type:"failed",failureCount:v,error:O})},onPause:()=>{S(this,V,he).call(this,{type:"pause"})},onContinue:()=>{S(this,V,he).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const v=await a(this,L).start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),(b=(j=a(this,te).config).onSuccess)==null||b.call(j,v,this),(p=(x=a(this,te).config).onSettled)==null||p.call(x,v,this.state.error,this),v}catch(v){if(v instanceof Bt){if(v.silent)return a(this,L).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw S(this,V,he).call(this,{type:"error",error:v}),(m=(g=a(this,te).config).onError)==null||m.call(g,v,this),(_=(k=a(this,te).config).onSettled)==null||_.call(k,this.state.data,v,this),v}finally{this.scheduleGc()}}},Xe=new WeakMap,Ie=new WeakMap,Ze=new WeakMap,te=new WeakMap,Le=new WeakMap,L=new WeakMap,yt=new WeakMap,De=new WeakMap,V=new WeakSet,lr=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},he=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...cr(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,..._s(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return f(this,Ze,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),q.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),a(this,te).notify({query:this,type:"updated",action:t})})},Hs);function cr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ir(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _s(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ps(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var B,R,vt,K,qe,Ye,fe,ke,wt,et,tt,Qe,$e,Ce,st,M,ft,Ht,Jt,Wt,Vt,Xt,Zt,Yt,dr,Js,an=(Js=class extends kt{constructor(t,s){super();w(this,M);w(this,B);w(this,R);w(this,vt);w(this,K);w(this,qe);w(this,Ye);w(this,fe);w(this,ke);w(this,wt);w(this,et);w(this,tt);w(this,Qe);w(this,$e);w(this,Ce);w(this,st,new Set);this.options=s,f(this,B,t),f(this,ke,null),f(this,fe,Gt()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(a(this,R).addObserver(this),Ms(a(this,R),this.options)?S(this,M,ft).call(this):this.updateResult(),S(this,M,Vt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return es(a(this,R),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return es(a(this,R),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,S(this,M,Xt).call(this),S(this,M,Zt).call(this),a(this,R).removeObserver(this)}setOptions(t){const s=this.options,r=a(this,R);if(this.options=a(this,B).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof X(this.options.enabled,a(this,R))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");S(this,M,Yt).call(this),a(this,R).setOptions(this.options),s._defaulted&&!Ut(this.options,s)&&a(this,B).getQueryCache().notify({type:"observerOptionsUpdated",query:a(this,R),observer:this});const i=this.hasListeners();i&&Os(a(this,R),r,this.options,s)&&S(this,M,ft).call(this),this.updateResult(),i&&(a(this,R)!==r||X(this.options.enabled,a(this,R))!==X(s.enabled,a(this,R))||Pe(this.options.staleTime,a(this,R))!==Pe(s.staleTime,a(this,R)))&&S(this,M,Ht).call(this);const o=S(this,M,Jt).call(this);i&&(a(this,R)!==r||X(this.options.enabled,a(this,R))!==X(s.enabled,a(this,R))||o!==a(this,Ce))&&S(this,M,Wt).call(this,o)}getOptimisticResult(t){const s=a(this,B).getQueryCache().build(a(this,B),t),r=this.createResult(s,t);return ln(this,r)&&(f(this,K,r),f(this,Ye,this.options),f(this,qe,a(this,R).state)),r}getCurrentResult(){return a(this,K)}trackResult(t,s){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),s==null||s(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&a(this,fe).status==="pending"&&a(this,fe).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){a(this,st).add(t)}getCurrentQuery(){return a(this,R)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=a(this,B).defaultQueryOptions(t),r=a(this,B).getQueryCache().build(a(this,B),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return S(this,M,ft).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),a(this,K)))}createResult(t,s){var F;const r=a(this,R),i=this.options,o=a(this,K),c=a(this,qe),l=a(this,Ye),u=t!==r?t.state:a(this,vt),{state:h}=t;let y={...h},j=!1,b;if(s._optimisticResults){const T=this.hasListeners(),G=!T&&Ms(t,s),P=T&&Os(t,r,s,i);(G||P)&&(y={...y,...cr(h.data,t.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:x,errorUpdatedAt:p,status:g}=y;b=y.data;let m=!1;if(s.placeholderData!==void 0&&b===void 0&&g==="pending"){let T;o!=null&&o.isPlaceholderData&&s.placeholderData===(l==null?void 0:l.placeholderData)?(T=o.data,m=!0):T=typeof s.placeholderData=="function"?s.placeholderData((F=a(this,tt))==null?void 0:F.state.data,a(this,tt)):s.placeholderData,T!==void 0&&(g="success",b=Kt(o==null?void 0:o.data,T,s),j=!0)}if(s.select&&b!==void 0&&!m)if(o&&b===(c==null?void 0:c.data)&&s.select===a(this,wt))b=a(this,et);else try{f(this,wt,s.select),b=s.select(b),b=Kt(o==null?void 0:o.data,b,s),f(this,et,b),f(this,ke,null)}catch(T){f(this,ke,T)}a(this,ke)&&(x=a(this,ke),b=a(this,et),p=Date.now(),g="error");const k=y.fetchStatus==="fetching",_=g==="pending",v=g==="error",O=_&&k,A=b!==void 0,C={status:g,fetchStatus:y.fetchStatus,isPending:_,isSuccess:g==="success",isError:v,isInitialLoading:O,isLoading:O,data:b,dataUpdatedAt:y.dataUpdatedAt,error:x,errorUpdatedAt:p,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>u.dataUpdateCount||y.errorUpdateCount>u.errorUpdateCount,isFetching:k,isRefetching:k&&!_,isLoadingError:v&&!A,isPaused:y.fetchStatus==="paused",isPlaceholderData:j,isRefetchError:v&&A,isStale:us(t,s),refetch:this.refetch,promise:a(this,fe),isEnabled:X(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=C.data!==void 0,G=C.status==="error"&&!T,P=ie=>{G?ie.reject(C.error):T&&ie.resolve(C.data)},xe=()=>{const ie=f(this,fe,C.promise=Gt());P(ie)},Z=a(this,fe);switch(Z.status){case"pending":t.queryHash===r.queryHash&&P(Z);break;case"fulfilled":(G||C.data!==Z.value)&&xe();break;case"rejected":(!G||C.error!==Z.reason)&&xe();break}}return C}updateResult(){const t=a(this,K),s=this.createResult(a(this,R),this.options);if(f(this,qe,a(this,R).state),f(this,Ye,this.options),a(this,qe).data!==void 0&&f(this,tt,a(this,R)),Ut(s,t))return;f(this,K,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!a(this,st).size)return!0;const c=new Set(o??a(this,st));return this.options.throwOnError&&c.add("error"),Object.keys(a(this,K)).some(l=>{const d=l;return a(this,K)[d]!==t[d]&&c.has(d)})};S(this,M,dr).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&S(this,M,Vt).call(this)}},B=new WeakMap,R=new WeakMap,vt=new WeakMap,K=new WeakMap,qe=new WeakMap,Ye=new WeakMap,fe=new WeakMap,ke=new WeakMap,wt=new WeakMap,et=new WeakMap,tt=new WeakMap,Qe=new WeakMap,$e=new WeakMap,Ce=new WeakMap,st=new WeakMap,M=new WeakSet,ft=function(t){S(this,M,Yt).call(this);let s=a(this,R).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(H)),s},Ht=function(){S(this,M,Xt).call(this);const t=Pe(this.options.staleTime,a(this,R));if(gt.isServer()||a(this,K).isStale||!$t(t))return;const r=tr(a(this,K).dataUpdatedAt,t)+1;f(this,Qe,Fe.setTimeout(()=>{a(this,K).isStale||this.updateResult()},r))},Jt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(a(this,R)):this.options.refetchInterval)??!1},Wt=function(t){S(this,M,Zt).call(this),f(this,Ce,t),!(gt.isServer()||X(this.options.enabled,a(this,R))===!1||!$t(a(this,Ce))||a(this,Ce)===0)&&f(this,$e,Fe.setInterval(()=>{(this.options.refetchIntervalInBackground||ls.isFocused())&&S(this,M,ft).call(this)},a(this,Ce)))},Vt=function(){S(this,M,Ht).call(this),S(this,M,Wt).call(this,S(this,M,Jt).call(this))},Xt=function(){a(this,Qe)!==void 0&&(Fe.clearTimeout(a(this,Qe)),f(this,Qe,void 0))},Zt=function(){a(this,$e)!==void 0&&(Fe.clearInterval(a(this,$e)),f(this,$e,void 0))},Yt=function(){const t=a(this,B).getQueryCache().build(a(this,B),this.options);if(t===a(this,R))return;const s=a(this,R);f(this,R,t),f(this,vt,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},dr=function(t){q.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(a(this,K))}),a(this,B).getQueryCache().notify({query:a(this,R),type:"observerResultsUpdated"})})},Js);function on(e,t){return X(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&X(t.retryOnMount,e)===!1)}function Ms(e,t){return on(e,t)||e.state.data!==void 0&&es(e,t,t.refetchOnMount)}function es(e,t,s){if(X(t.enabled,e)!==!1&&Pe(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&us(e,t)}return!1}function Os(e,t,s,r){return(e!==t||X(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&us(e,s)}function us(e,t){return X(t.enabled,e)!==!1&&e.isStaleByTime(Pe(t.staleTime,e))}function ln(e,t){return!Ut(e.getCurrentResult(),t)}var jt,le,$,Ue,ce,ve,Ws,cn=(Ws=class extends or{constructor(t){super();w(this,ce);w(this,jt);w(this,le);w(this,$);w(this,Ue);f(this,jt,t.client),this.mutationId=t.mutationId,f(this,$,t.mutationCache),f(this,le,[]),this.state=t.state||dn(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){a(this,le).includes(t)||(a(this,le).push(t),this.clearGcTimeout(),a(this,$).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){f(this,le,a(this,le).filter(s=>s!==t)),this.scheduleGc(),a(this,$).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){a(this,le).length||(this.state.status==="pending"?this.scheduleGc():a(this,$).remove(this))}continue(){var t;return((t=a(this,Ue))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,l,d,u,h,y,j,b,x,p,g,m,k,_,v,O,A,W;const s=()=>{S(this,ce,ve).call(this,{type:"continue"})},r={client:a(this,jt),meta:this.options.meta,mutationKey:this.options.mutationKey};f(this,Ue,ar({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(C,F)=>{S(this,ce,ve).call(this,{type:"failed",failureCount:C,error:F})},onPause:()=>{S(this,ce,ve).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>a(this,$).canRun(this)}));const i=this.state.status==="pending",o=!a(this,Ue).canStart();try{if(i)s();else{S(this,ce,ve).call(this,{type:"pending",variables:t,isPaused:o}),a(this,$).config.onMutate&&await a(this,$).config.onMutate(t,this,r);const F=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,r));F!==this.state.context&&S(this,ce,ve).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const C=await a(this,Ue).start();return await((u=(d=a(this,$).config).onSuccess)==null?void 0:u.call(d,C,t,this.state.context,this,r)),await((y=(h=this.options).onSuccess)==null?void 0:y.call(h,C,t,this.state.context,r)),await((b=(j=a(this,$).config).onSettled)==null?void 0:b.call(j,C,null,this.state.variables,this.state.context,this,r)),await((p=(x=this.options).onSettled)==null?void 0:p.call(x,C,null,t,this.state.context,r)),S(this,ce,ve).call(this,{type:"success",data:C}),C}catch(C){try{await((m=(g=a(this,$).config).onError)==null?void 0:m.call(g,C,t,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((_=(k=this.options).onError)==null?void 0:_.call(k,C,t,this.state.context,r))}catch(F){Promise.reject(F)}try{await((O=(v=a(this,$).config).onSettled)==null?void 0:O.call(v,void 0,C,this.state.variables,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((W=(A=this.options).onSettled)==null?void 0:W.call(A,void 0,C,t,this.state.context,r))}catch(F){Promise.reject(F)}throw S(this,ce,ve).call(this,{type:"error",error:C}),C}finally{a(this,$).runNext(this)}}},jt=new WeakMap,le=new WeakMap,$=new WeakMap,Ue=new WeakMap,ce=new WeakSet,ve=function(t){const s=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),q.batch(()=>{a(this,le).forEach(r=>{r.onMutationUpdate(t)}),a(this,$).notify({mutation:this,type:"updated",action:t})})},Ws);function dn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var me,se,Nt,Vs,un=(Vs=class extends kt{constructor(t={}){super();w(this,me);w(this,se);w(this,Nt);this.config=t,f(this,me,new Set),f(this,se,new Map),f(this,Nt,0)}build(t,s,r){const i=new cn({client:t,mutationCache:this,mutationId:++St(this,Nt)._,options:t.defaultMutationOptions(s),state:r});return this.add(i),i}add(t){a(this,me).add(t);const s=_t(t);if(typeof s=="string"){const r=a(this,se).get(s);r?r.push(t):a(this,se).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(a(this,me).delete(t)){const s=_t(t);if(typeof s=="string"){const r=a(this,se).get(s);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&a(this,se).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=_t(t);if(typeof s=="string"){const r=a(this,se).get(s),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const s=_t(t);if(typeof s=="string"){const i=(r=a(this,se).get(s))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){q.batch(()=>{a(this,me).forEach(t=>{this.notify({type:"removed",mutation:t})}),a(this,me).clear(),a(this,se).clear()})}getAll(){return Array.from(a(this,me))}find(t){const s={exact:!0,...t};return this.getAll().find(r=>ks(s,r))}findAll(t={}){return this.getAll().filter(s=>ks(t,s))}notify(t){q.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return q.batch(()=>Promise.all(t.map(s=>s.continue().catch(H))))}},me=new WeakMap,se=new WeakMap,Nt=new WeakMap,Vs);function _t(e){var t;return(t=e.options.scope)==null?void 0:t.id}var de,Xs,hn=(Xs=class extends kt{constructor(t={}){super();w(this,de);this.config=t,f(this,de,new Map)}build(t,s,r){const i=s.queryKey,o=s.queryHash??cs(i,s);let c=this.get(o);return c||(c=new nn({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(c)),c}add(t){a(this,de).has(t.queryHash)||(a(this,de).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=a(this,de).get(t.queryHash);s&&(t.destroy(),s===t&&a(this,de).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){q.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return a(this,de).get(t)}getAll(){return[...a(this,de).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Ns(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>Ns(t,r)):s}notify(t){q.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){q.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){q.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},de=new WeakMap,Xs),I,Se,Re,rt,nt,_e,it,at,Zs,fn=(Zs=class{constructor(e={}){w(this,I);w(this,Se);w(this,Re);w(this,rt);w(this,nt);w(this,_e);w(this,it);w(this,at);f(this,I,e.queryCache||new hn),f(this,Se,e.mutationCache||new un),f(this,Re,e.defaultOptions||{}),f(this,rt,new Map),f(this,nt,new Map),f(this,_e,0)}mount(){St(this,_e)._++,a(this,_e)===1&&(f(this,it,ls.subscribe(async e=>{e&&(await this.resumePausedMutations(),a(this,I).onFocus())})),f(this,at,Ot.subscribe(async e=>{e&&(await this.resumePausedMutations(),a(this,I).onOnline())})))}unmount(){var e,t;St(this,_e)._--,a(this,_e)===0&&((e=a(this,it))==null||e.call(this),f(this,it,void 0),(t=a(this,at))==null||t.call(this),f(this,at,void 0))}isFetching(e){return a(this,I).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return a(this,Se).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=a(this,I).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=a(this,I).build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Pe(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return a(this,I).findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),i=a(this,I).get(r.queryHash),o=i==null?void 0:i.state.data,c=Br(t,o);if(c!==void 0)return a(this,I).build(this,r).setData(c,{...s,manual:!0})}setQueriesData(e,t,s){return q.batch(()=>a(this,I).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=a(this,I).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=a(this,I);q.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=a(this,I);return q.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=q.batch(()=>a(this,I).findAll(e).map(i=>i.cancel(s)));return Promise.all(r).then(H).catch(H)}invalidateQueries(e,t={}){return q.batch(()=>(a(this,I).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=q.batch(()=>a(this,I).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,s);return s.throwOnError||(o=o.catch(H)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(H)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=a(this,I).build(this,t);return s.isStaleByTime(Pe(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(H).catch(H)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(H).catch(H)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ot.isOnline()?a(this,Se).resumePausedMutations():Promise.resolve()}getQueryCache(){return a(this,I)}getMutationCache(){return a(this,Se)}getDefaultOptions(){return a(this,Re)}setDefaultOptions(e){f(this,Re,e)}setQueryDefaults(e,t){a(this,rt).set(pt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...a(this,rt).values()],s={};return t.forEach(r=>{xt(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){a(this,nt).set(pt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...a(this,nt).values()],s={};return t.forEach(r=>{xt(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...a(this,Re).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cs(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ds&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...a(this,Re).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){a(this,I).clear(),a(this,Se).clear()}},I=new WeakMap,Se=new WeakMap,Re=new WeakMap,rt=new WeakMap,nt=new WeakMap,_e=new WeakMap,it=new WeakMap,at=new WeakMap,Zs),ur=Q.createContext(void 0),hr=e=>{const t=Q.useContext(ur);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mn=({client:e,children:t})=>(Q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(ur.Provider,{value:e,children:t})),fr=Q.createContext(!1),pn=()=>Q.useContext(fr);fr.Provider;function xn(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gn=Q.createContext(xn()),bn=()=>Q.useContext(gn),yn=(e,t,s)=>{const r=s!=null&&s.state.error&&typeof e.throwOnError=="function"?nr(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},vn=e=>{Q.useEffect(()=>{e.clearReset()},[e])},wn=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||nr(s,[e.error,r])),jn=e=>{if(e.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Nn=(e,t)=>e.isLoading&&e.isFetching&&!t,kn=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Es=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Cn(e,t,s){var j,b,x,p;const r=pn(),i=bn(),o=hr(),c=o.defaultQueryOptions(e);(b=(j=o.getDefaultOptions().queries)==null?void 0:j._experimental_beforeQuery)==null||b.call(j,c);const l=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",jn(c),yn(c,i,l),vn(i);const d=!o.getQueryCache().get(c.queryHash),[u]=Q.useState(()=>new t(o,c)),h=u.getOptimisticResult(c),y=!r&&e.subscribed!==!1;if(Q.useSyncExternalStore(Q.useCallback(g=>{const m=y?u.subscribe(q.batchCalls(g)):H;return u.updateResult(),m},[u,y]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),Q.useEffect(()=>{u.setOptions(c)},[c,u]),kn(c,h))throw Es(c,u,i);if(wn({result:h,errorResetBoundary:i,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw h.error;if((p=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||p.call(x,c,h),c.experimental_prefetchInRender&&!gt.isServer()&&Nn(h,r)){const g=d?Es(c,u,i):l==null?void 0:l.promise;g==null||g.catch(H).finally(()=>{u.updateResult()})}return c.notifyOnChangeProps?h:u.trackResult(h)}function ae(e,t){return Cn(e,an)}/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Cn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fr=(...e)=>e.filter((t,s,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===s).join(" ").trim();/** + */const Sn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mr=(...e)=>e.filter((t,s,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var Sn={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 Rn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Rn=Q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:c,...l},d)=>Q.createElement("svg",{ref:d,...Sn,width:t,height:t,stroke:e,strokeWidth:r?Number(s)*24/Number(t):s,className:fr("lucide",i),...l},[...c.map(([u,h])=>Q.createElement(u,h)),...Array.isArray(o)?o:[o]]));/** + */const _n=Q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:c,...l},d)=>Q.createElement("svg",{ref:d,...Rn,width:t,height:t,stroke:e,strokeWidth:r?Number(s)*24/Number(t):s,className:mr("lucide",i),...l},[...c.map(([u,h])=>Q.createElement(u,h)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const z=(e,t)=>{const s=Q.forwardRef(({className:r,...i},o)=>Q.createElement(Rn,{ref:o,iconNode:t,className:fr(`lucide-${Cn(e)}`,r),...i}));return s.displayName=`${e}`,s};/** + */const z=(e,t)=>{const s=Q.forwardRef(({className:r,...i},o)=>Q.createElement(_n,{ref:o,iconNode:t,className:mr(`lucide-${Sn(e)}`,r),...i}));return s.displayName=`${e}`,s};/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _n=z("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + */const Pn=z("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pn=z("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** + */const Mn=z("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mr=z("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const pr=z("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Mn=z("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const On=z("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. @@ -56,7 +56,7 @@ var ys=e=>{throw TypeError(e)};var Lt=(e,t,s)=>t.has(e)||ys("Cannot "+s);var a=( * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const On=z("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/** + */const En=z("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. @@ -66,45 +66,45 @@ var ys=e=>{throw TypeError(e)};var Lt=(e,t,s)=>t.has(e)||ys("Cannot "+s);var a=( * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const En=z("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + */const Fn=z("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Fn=z("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** + */const Tn=z("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Tn=z("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** + */const An=z("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const An=z("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + */const In=z("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const In=z("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const Ln=z("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ln=z("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const Dn=z("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Dn=z("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** + */const qn=z("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pr=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"}]]);/** + */const xr=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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qn=z("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),hs="-",Qn=e=>{const t=Un(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const l=c.split(hs);return l[0]===""&&l.length!==1&&l.shift(),xr(l,t)||$n(c)},getConflictingClassGroupIds:(c,l)=>{const d=s[c]||[];return l&&r[c]?[...d,...r[c]]:d}}},xr=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const s=e[0],r=t.nextPart.get(s),i=r?xr(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(hs);return(c=t.validators.find(({validator:l})=>l(o)))==null?void 0:c.classGroupId},Ts=/^\[(.+)\]$/,$n=e=>{if(Ts.test(e)){const t=Ts.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},Un=e=>{const{theme:t,prefix:s}=e,r={nextPart:new Map,validators:[]};return Kn(Object.entries(e.classGroups),s).forEach(([o,c])=>{ts(c,r,o,t)}),r},ts=(e,t,s,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:As(t,i);o.classGroupId=s;return}if(typeof i=="function"){if(zn(i)){ts(i(r),t,s,r);return}t.validators.push({validator:i,classGroupId:s});return}Object.entries(i).forEach(([o,c])=>{ts(c,As(t,o),s,r)})})},As=(e,t)=>{let s=e;return t.split(hs).forEach(r=>{s.nextPart.has(r)||s.nextPart.set(r,{nextPart:new Map,validators:[]}),s=s.nextPart.get(r)}),s},zn=e=>e.isThemeGetter,Kn=(e,t)=>t?e.map(([s,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([c,l])=>[t+c,l])):o);return[s,i]}):e,Gn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,r=new Map;const i=(o,c)=>{s.set(o,c),t++,t>e&&(t=0,r=s,s=new Map)};return{get(o){let c=s.get(o);if(c!==void 0)return c;if((c=r.get(o))!==void 0)return i(o,c),c},set(o,c){s.has(o)?s.set(o,c):i(o,c)}}},gr="!",Bn=e=>{const{separator:t,experimentalParseClassName:s}=e,r=t.length===1,i=t[0],o=t.length,c=l=>{const d=[];let u=0,h=0,y;for(let g=0;gh?y-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:p}};return s?l=>s({className:l,parseClassName:c}):c},Hn=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(r=>{r[0]==="["?(t.push(...s.sort(),r),s=[]):s.push(r)}),t.push(...s.sort()),t},Jn=e=>({cache:Gn(e.cacheSize),parseClassName:Bn(e),...Qn(e)}),Wn=/\s+/,Vn=(e,t)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],c=e.trim().split(Wn);let l="";for(let d=c.length-1;d>=0;d-=1){const u=c[d],{modifiers:h,hasImportantModifier:y,baseClassName:j,maybePostfixModifierPosition:b}=s(u);let x=!!b,p=r(x?j.substring(0,b):j);if(!p){if(!x){l=u+(l.length>0?" "+l:l);continue}if(p=r(j),!p){l=u+(l.length>0?" "+l:l);continue}x=!1}const g=Hn(h).join(":"),m=y?g+gr:g,k=m+p;if(o.includes(k))continue;o.push(k);const _=i(p,x);for(let v=0;v<_.length;++v){const O=_[v];o.push(m+O)}l=u+(l.length>0?" "+l:l)}return l};function Xn(){let e=0,t,s,r="";for(;e{if(typeof e=="string")return e;let t,s="";for(let r=0;ry(h),e());return s=Jn(u),r=s.cache.get,i=s.cache.set,o=l,l(d)}function l(d){const u=r(d);if(u)return u;const h=Vn(d,s);return i(d,h),h}return function(){return o(Xn.apply(null,arguments))}}const E=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},yr=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yn=/^\d+\/\d+$/,ei=new Set(["px","full","screen"]),ti=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,si=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ri=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ni=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ii=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ue=e=>He(e)||ei.has(e)||Yn.test(e),be=e=>ot(e,"length",fi),He=e=>!!e&&!Number.isNaN(Number(e)),qt=e=>ot(e,"number",He),ut=e=>!!e&&Number.isInteger(Number(e)),ai=e=>e.endsWith("%")&&He(e.slice(0,-1)),N=e=>yr.test(e),ye=e=>ti.test(e),oi=new Set(["length","size","percentage"]),li=e=>ot(e,oi,vr),ci=e=>ot(e,"position",vr),di=new Set(["image","url"]),ui=e=>ot(e,di,pi),hi=e=>ot(e,"",mi),ht=()=>!0,ot=(e,t,s)=>{const r=yr.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):s(r[2]):!1},fi=e=>si.test(e)&&!ri.test(e),vr=()=>!1,mi=e=>ni.test(e),pi=e=>ii.test(e),xi=()=>{const e=E("colors"),t=E("spacing"),s=E("blur"),r=E("brightness"),i=E("borderColor"),o=E("borderRadius"),c=E("borderSpacing"),l=E("borderWidth"),d=E("contrast"),u=E("grayscale"),h=E("hueRotate"),y=E("invert"),j=E("gap"),b=E("gradientColorStops"),x=E("gradientColorStopPositions"),p=E("inset"),g=E("margin"),m=E("opacity"),k=E("padding"),_=E("saturate"),v=E("scale"),O=E("sepia"),A=E("skew"),W=E("space"),C=E("translate"),F=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",N,t],P=()=>[N,t],xe=()=>["",ue,be],Z=()=>["auto",He,N],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Me=()=>["solid","dashed","dotted","double","none"],lt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ze=()=>["start","end","center","between","around","evenly","stretch"],ge=()=>["","0",N],ct=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[He,N];return{cacheSize:500,separator:":",theme:{colors:[ht],spacing:[ue,be],blur:["none","",ye,N],brightness:Y(),borderColor:[e],borderRadius:["none","","full",ye,N],borderSpacing:P(),borderWidth:xe(),contrast:Y(),grayscale:ge(),hueRotate:Y(),invert:ge(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[ai,be],inset:G(),margin:G(),opacity:Y(),padding:P(),saturate:Y(),scale:Y(),sepia:ge(),skew:Y(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[ye]}],"break-after":[{"break-after":ct()}],"break-before":[{"break-before":ct()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ie(),N]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ut,N]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:ge()}],shrink:[{shrink:ge()}],order:[{order:["first","last","none",ut,N]}],"grid-cols":[{"grid-cols":[ht]}],"col-start-end":[{col:["auto",{span:["full",ut,N]},N]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[ht]}],"row-start-end":[{row:["auto",{span:[ut,N]},N]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[j]}],"gap-x":[{"gap-x":[j]}],"gap-y":[{"gap-y":[j]}],"justify-content":[{justify:["normal",...ze()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ze(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ze(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[ye]},ye]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ye,be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",qt]}],"font-family":[{font:[ht]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",He,qt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ue,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ue,be]}],"underline-offset":[{"underline-offset":["auto",ue,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),ci]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",li]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ui]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...Me(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:Me()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Me()]}],"outline-offset":[{"outline-offset":[ue,N]}],"outline-w":[{outline:[ue,be]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[ue,be]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ye,hi]}],"shadow-color":[{shadow:[ht]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...lt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":lt()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",ye,N]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[y]}],saturate:[{saturate:[_]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[v]}],"scale-x":[{"scale-x":[v]}],"scale-y":[{"scale-y":[v]}],rotate:[{rotate:[ut,N]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ue,be,qt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},gi=Zn(xi),bi=new hn({defaultOptions:{queries:{retry:1}}}),Is=12,yi=12,vi=10080*60*1e3,wi=1e3;function re(...e){return gi(Tr(e))}async function oe(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}function ne(e){if(e==null)return"n/a";const t=Math.max(0,Math.floor(e));if(t<60)return`${t}s`;const s=Math.floor(t/60);return s<60?`${s}m ${t%60}s`:`${Math.floor(s/60)}h ${s%60}m`}const ji=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}),Ni=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function Ct(e){if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t}function ki(e){const t=Ct(e);return t?ji.format(t):e??""}function mt(e){const t=Ct(e);return t?Ni.format(t):e??""}function wr(e,t){const s=Ct(e);if(!s)return e??"";const r=t-s.getTime(),i=Math.abs(r);if(i>vi)return mt(e);const o=r>=0?"ago":"from now",c=Math.round(i/1e3);if(c<45)return r>=0?"just now":"soon";if(c<90)return`1m ${o}`;const l=Math.round(c/60);if(l<60)return`${l}m ${o}`;if(l<90)return`1h ${o}`;const d=Math.round(l/60);return d<24?`${d}h ${o}`:d<36?`1d ${o}`:`${Math.round(d/24)}d ${o}`}function pe({value:e,compact:t=!1,relative:s=!1,now:r=Date.now()}){const i=Ct(e);return i?n.jsx("time",{dateTime:i.toISOString(),title:`UTC: ${i.toISOString()}`,children:s?wr(e,r):t?mt(e):ki(e)}):n.jsx(n.Fragment,{children:e??""})}function jr(e,t){const s=Ct(e);return s?Math.max(0,Math.floor((t-s.getTime())/1e3)):null}function fs(e,t){return e.status==="running"?jr(e.started_at,t)??e.runtime_seconds:e.runtime_seconds}function ms(e,t){return e.status==="pending"?jr(e.created_at,t)??e.queue_wait_seconds:e.queue_wait_seconds}function Ci(e){const[t,s]=J.useState(()=>Date.now());return J.useEffect(()=>{if(!e)return;s(Date.now());const r=window.setInterval(()=>s(Date.now()),wi);return()=>window.clearInterval(r)},[e]),t}function Si(e){return(e??"").split(/\r?\n/).map(s=>s.trim()).find(Boolean)??""}function Ft(e,t,s=1){const r=Si(t),i=s>1?` (${s})`:"";return r?`${e}${i}: ${r}`:`${e}${i}`}function Tt(e){return e==="openclaw_stdout"||e==="openclaw_stderr"}function Nr(e){return e.map(t=>t==null?void 0:t.trim()).filter(Boolean).join(` -`)}function Ri(e){const t=[];for(const s of e){const r=t[t.length-1];if(r&&Tt(s.event_type)&&r.eventType===s.event_type){r.count+=1,r.meta=s.ts,r.detail=Nr([r.detail,s.detail]),r.summary=Ft(s.summary,r.detail,r.count);continue}t.push({id:String(s.id),badge:s.event_type,meta:s.ts,summary:Tt(s.event_type)?Ft(s.summary,s.detail):s.summary,detail:s.detail,eventType:s.event_type,count:1})}return t}function _i(e){const t=[];return e.forEach((s,r)=>{const i=t[t.length-1];if(i&&Tt(s.kind)&&i.kind===s.kind){i.count+=1,i.meta=s.timestamp,i.text=Nr([i.text,s.text]),i.summary=Ft(`${s.role} · ${s.kind}`,i.text,i.count);return}t.push({id:`${s.timestamp??"entry"}-${r}`,badge:s.title,meta:s.timestamp,summary:Tt(s.kind)?Ft(`${s.role} · ${s.kind}`,s.text):`${s.role} · ${s.kind}`,text:s.text,kind:s.kind,count:1})}),t}function Ls(e,t,s,r){return e==="openclaw_stdout"?!1:t||s>=r-2}function Pi(e){return{pending:{badge:"border-amber-300 bg-amber-50 text-amber-800",dot:"bg-amber-500"},running:{badge:"border-blue-300 bg-blue-50 text-blue-700",dot:"bg-blue-600"},blocked:{badge:"border-red-300 bg-red-50 text-red-700",dot:"bg-red-600"},denied:{badge:"border-red-300 bg-red-50 text-red-700",dot:"bg-red-600"},done:{badge:"border-emerald-300 bg-emerald-50 text-emerald-700",dot:"bg-emerald-600"},waiting_approval:{badge:"border-slate-300 bg-slate-50 text-slate-700",dot:"bg-slate-500"}}[e]??{badge:"border-slate-300 bg-slate-50 text-slate-700",dot:"bg-slate-500"}}function Mi(e,t){const s=new URLSearchParams;for(const[r,i]of Object.entries(e))i.trim()&&s.set(r,i.trim());return s.set("limit",String(t)),`/api/jobs?${s.toString()}`}function bt(e){try{const t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"?t.href:"#"}catch{return"#"}}function kr(e){return`/jobs/${e}`}function Ds(e){try{return JSON.parse(e.data)}catch{return null}}function Oi(e,t){return e.some(s=>s.id===t.id)?e:[...e,t]}function Ei(e,t){const s=qs(t);return e.some(r=>qs(r)===s)?e:[...e,t]}function qs(e){return`${e.timestamp??""}:${e.role}:${e.kind}:${e.title}:${e.text}`}function Fi(e=window.location.pathname){const t=e.match(/^\/jobs\/(\d+)\/?$/);return t?Number(t[1]):null}function Ti(){var P,xe,Z,ie,Me,lt,ze,ge,ct,Y,gs,bs;const e=ur(),[t,s]=J.useState({status:"",repo:"",thread:"",action:"",intent:"",actor:""}),[r,i]=J.useState(Is),[o,c]=J.useState(()=>window.location.pathname),l=Fi(o),d=l!==null,u=l,h=ae({queryKey:["metrics"],queryFn:()=>oe("/api/metrics/summary"),enabled:!d}),y=ae({queryKey:["me"],queryFn:()=>oe("/api/me"),refetchInterval:!1}),j=ae({queryKey:["job-actors"],queryFn:()=>oe("/api/jobs/actors"),enabled:!d}),b=ae({queryKey:["jobs",t,r],queryFn:()=>oe(Mi(t,r)),enabled:!d}),x=ae({queryKey:["processes"],queryFn:()=>oe("/api/processes"),enabled:!d}),p=ae({queryKey:["alerts"],queryFn:()=>oe("/api/alerts"),enabled:!d}),g=ae({queryKey:["job",u],queryFn:()=>oe(`/api/jobs/${u}`),enabled:u!==null}),m=ae({queryKey:["job-session",u],queryFn:()=>oe(`/api/jobs/${u}/session`),enabled:u!==null}),k=ae({queryKey:["job-session-events",u],queryFn:()=>oe(`/api/jobs/${u}/session/events`),enabled:u!==null}),_=ae({queryKey:["job-session-transcript",u],queryFn:()=>oe(`/api/jobs/${u}/session/transcript`),enabled:u!==null});J.useEffect(()=>{if(u===null)return;const D=new EventSource(`/api/jobs/${u}/session/stream`);return D.addEventListener("session_event",It=>{const Ke=Ds(It);Ke&&(e.setQueryData(["job-session-events",u],Oe=>({events:Oi((Oe==null?void 0:Oe.events)??[],Ke)})),e.invalidateQueries({queryKey:["job",u]}),e.invalidateQueries({queryKey:["jobs"]}))}),D.addEventListener("transcript_entry",It=>{const Ke=Ds(It);!Ke||Ke.job_id!==u||e.setQueryData(["job-session-transcript",u],Oe=>({entries:Ei((Oe==null?void 0:Oe.entries)??[],Ke.entry)}))}),D.onerror=()=>{D.close()},()=>D.close()},[u,e]),J.useEffect(()=>{const D=()=>{c(window.location.pathname)};return window.addEventListener("popstate",D),()=>window.removeEventListener("popstate",D)},[]);const v=J.useCallback(D=>{window.history.pushState({},"",kr(D)),c(window.location.pathname)},[]),O=((P=h.data)==null?void 0:P.metrics.status_counts)??{},A=((xe=b.data)==null?void 0:xe.jobs)??[],W=J.useCallback(D=>{s(D),i(Is)},[]),C=u?((Z=g.data)==null?void 0:Z.job)??null:null,F=A.some(D=>D.status==="running"||D.status==="pending")||(C==null?void 0:C.status)==="running"||(C==null?void 0:C.status)==="pending",T=Ci(F),G=n.jsx(Ii,{selectedJobId:u,selectedJob:C,loading:g.isLoading,error:g.error,session:(ie=m.data)==null?void 0:ie.session,sessionEvents:(Me=k.data)==null?void 0:Me.events,transcript:(lt=_.data)==null?void 0:lt.entries,now:T});return n.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[n.jsx("header",{className:"border-b border-slate-800 bg-slate-950 text-white",children:n.jsxs("div",{className:"mx-auto flex w-full max-w-[1440px] items-center justify-between gap-3 px-4 py-4 md:px-6",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("h1",{className:"truncate text-xl font-semibold",children:"GitHub Agent Bridge"}),n.jsx("p",{className:"text-sm text-slate-300",children:"Read-only operational dashboard"})]}),n.jsx(Li,{user:(ze=y.data)==null?void 0:ze.user,loading:y.isLoading})]})}),n.jsx("main",{className:"mx-auto grid w-full max-w-[1440px] gap-4 px-3 py-4 sm:px-4 md:px-6 md:py-5",children:l!==null?n.jsx(Ai,{jobId:l,detail:G,onRefresh:()=>{g.refetch(),m.refetch(),k.refetch(),_.refetch()}}):n.jsxs(n.Fragment,{children:[h.error?n.jsx(Be,{tone:"error",text:h.error.message}):null,n.jsxs("section",{className:"grid grid-cols-2 gap-3 xl:grid-cols-4","aria-label":"Summary metrics",children:[n.jsx(Pt,{title:"Pending",value:O.pending??0,icon:n.jsx(On,{className:"h-5 w-5"})}),n.jsx(Pt,{title:"Running",value:O.running??0,icon:n.jsx(_n,{className:"h-5 w-5"})}),n.jsx(Pt,{title:"Blocked",value:O.blocked??0,icon:n.jsx(pr,{className:"h-5 w-5"})}),n.jsx(Pt,{title:"Done",value:O.done??0,icon:n.jsx(Mn,{className:"h-5 w-5"})})]}),n.jsxs("section",{className:"grid gap-3",children:[n.jsx(Di,{count:A.length,limit:r,loading:b.isLoading,onRefresh:()=>b.refetch()}),n.jsxs(Ee,{title:"Recent jobs",flushHeader:!0,children:[n.jsx(qi,{filters:t,actorOptions:((ge=j.data)==null?void 0:ge.actors)??[],onChange:W}),b.error?n.jsx(Be,{tone:"error",text:b.error.message}):null,n.jsx($i,{jobs:A,loading:b.isLoading,onViewJob:v,now:T}),A.length>=r?n.jsx("div",{className:"mt-3 flex justify-center",children:n.jsx("button",{className:"inline-flex h-9 items-center justify-center rounded-md border border-border px-3 text-sm font-semibold text-foreground hover:bg-slate-50",type:"button",onClick:()=>i(D=>D+yi),children:"Load more jobs"})}):null]})]}),n.jsxs("section",{className:"grid gap-4",children:[n.jsxs(Ee,{title:"Process activity",action:n.jsx(At,{onClick:()=>x.refetch()}),children:[x.error?n.jsx(Be,{tone:"error",text:x.error.message}):null,n.jsx(Ji,{data:x.data,loading:x.isLoading})]}),n.jsxs(Ee,{title:"Monitor alerts",action:n.jsx(At,{onClick:()=>p.refetch()}),children:[p.error?n.jsx(Be,{tone:"error",text:p.error.message}):null,n.jsx(Wi,{alerts:(ct=p.data)==null?void 0:ct.alerts,loading:p.isLoading,now:T})]})]}),n.jsxs("section",{className:"grid gap-4 xl:grid-cols-3",children:[n.jsx(Ee,{title:"Runtime percentiles",children:n.jsx(Qs,{label:"runtime",values:(Y=h.data)==null?void 0:Y.metrics.runtime_seconds})}),n.jsx(Ee,{title:"Jobs per day",children:n.jsx(Bi,{values:(gs=h.data)==null?void 0:gs.metrics.by_created_day,loading:h.isLoading,totalJobs:Hi(O)})}),n.jsx(Ee,{title:"Queue wait percentiles",children:n.jsx(Qs,{label:"queue wait",values:(bs=h.data)==null?void 0:bs.metrics.queue_wait_seconds})})]})]})})]})}function Ai({jobId:e,detail:t,onRefresh:s}){return n.jsxs("div",{className:"grid min-w-0 gap-3 sm:gap-4",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("a",{className:"inline-flex h-9 items-center gap-2 rounded-md border border-border px-3 text-sm font-semibold text-foreground hover:bg-slate-50",href:"/",children:[n.jsx(Pn,{className:"h-4 w-4","aria-hidden":!0}),"Dashboard"]}),n.jsx(At,{onClick:s})]}),n.jsx(Ee,{title:`Job #${e}`,className:"p-3 sm:p-4",children:t})]})}function Ii({selectedJobId:e,selectedJob:t,loading:s,error:r,session:i,sessionEvents:o,transcript:c,now:l}){return t?n.jsx(zi,{job:t,session:i,sessionEvents:o,transcript:c,now:l}):e!==null&&s?n.jsx(U,{text:"Loading selected job..."}):e!==null&&r?n.jsx(Be,{tone:"error",text:`Job #${e}: ${r.message}`}):n.jsx(U,{text:"Select a job to inspect its timeline, worklog and GitHub links."})}function Li({user:e,loading:t}){const s=e!=null&&e.login?`@${e.login}`:t?"Loading profile...":"GitHub OAuth",r=e!=null&&e.avatar_url?n.jsx("img",{className:"h-10 w-10 rounded-full border border-slate-700 bg-slate-800",src:e.avatar_url,alt:e.login?`${e.login} avatar`:"",referrerPolicy:"no-referrer"}):n.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full border border-slate-700 bg-slate-900",children:n.jsx(Et,{className:"h-5 w-5","aria-hidden":!0})}),i=e!=null&&e.html_url?n.jsx("a",{className:"truncate font-semibold text-white hover:underline",href:bt(e.html_url),rel:"noreferrer",target:"_blank",children:s}):n.jsx("div",{className:"truncate font-semibold text-white",children:s});return n.jsxs("div",{className:"flex max-w-full shrink-0 items-center gap-3 text-sm text-slate-300","aria-label":e!=null&&e.login?`Signed in as ${e.login}`:"Dashboard account",children:[n.jsx(Ln,{className:"hidden h-4 w-4 shrink-0 sm:block","aria-hidden":!0}),n.jsxs("div",{className:"hidden min-w-0 text-right sm:block",children:[i,n.jsx("div",{className:"text-xs text-slate-400",children:"Signed in · read-only"})]}),r]})}function Di({count:e,limit:t,loading:s,onRefresh:r}){return n.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 rounded-lg border border-border bg-white px-3 py-3 shadow-sm md:px-4",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("h2",{className:"text-base font-semibold",children:"Jobs"}),n.jsx("p",{className:"text-xs text-muted",children:s?"Refreshing latest jobs...":`Showing ${e} of the latest ${t} requested jobs`})]}),n.jsx(At,{onClick:r,compactOnMobile:!0})]})}function Ee({title:e,action:t,children:s,className:r,flushHeader:i=!1}){return n.jsxs("section",{className:re("min-w-0 rounded-lg border border-border bg-panel p-4 shadow-sm",r),children:[n.jsxs("div",{className:re("flex items-center justify-between gap-3",!i&&"mb-4"),children:[n.jsx("h2",{className:"text-sm font-semibold",children:e}),t]}),s]})}function Pt({title:e,value:t,icon:s}){return n.jsxs("div",{className:"rounded-lg border border-border bg-panel p-3 shadow-sm md:p-4",children:[n.jsxs("div",{className:"flex items-center justify-between text-muted",children:[n.jsx("span",{className:"text-sm font-medium",children:e}),s]}),n.jsx("strong",{className:"mt-3 block text-2xl leading-none md:mt-4 md:text-3xl",children:t})]})}function qi({filters:e,actorOptions:t,onChange:s}){const[r,i]=J.useState(e);return J.useEffect(()=>i(e),[e]),n.jsxs("details",{className:"my-3 rounded-md border border-border bg-slate-50/70",children:[n.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 px-3 py-2 text-sm font-semibold marker:hidden",children:[n.jsxs("span",{className:"inline-flex items-center gap-2",children:[n.jsx(Fn,{className:"h-4 w-4 text-muted","aria-hidden":!0}),"Filters"]}),n.jsx(mr,{className:"h-4 w-4 text-muted","aria-hidden":!0})]}),n.jsxs("form",{className:"grid gap-3 border-t border-border bg-white p-3 md:grid-cols-3 xl:grid-cols-8",onSubmit:o=>{o.preventDefault(),s(r)},children:[n.jsx(Ge,{label:"Status",children:n.jsxs("select",{className:"control",value:r.status,onChange:o=>i({...r,status:o.target.value}),children:[n.jsx("option",{value:"",children:"All"}),n.jsx("option",{value:"pending",children:"pending"}),n.jsx("option",{value:"running",children:"running"}),n.jsx("option",{value:"blocked",children:"blocked"}),n.jsx("option",{value:"done",children:"done"}),n.jsx("option",{value:"denied",children:"denied"}),n.jsx("option",{value:"waiting_approval",children:"waiting_approval"})]})}),n.jsx(Ge,{label:"Repository",children:n.jsx("input",{className:"control",value:r.repo,placeholder:"owner/repo",onChange:o=>i({...r,repo:o.target.value})})}),n.jsx(Ge,{label:"Thread",children:n.jsx("input",{className:"control",value:r.thread,inputMode:"numeric",placeholder:"issue or PR",onChange:o=>i({...r,thread:o.target.value})})}),n.jsx(Ge,{label:"Action",children:n.jsx("input",{className:"control",value:r.action,placeholder:"reply_comment",onChange:o=>i({...r,action:o.target.value})})}),n.jsx(Ge,{label:"Actor",className:"xl:col-span-2",children:n.jsx(Qi,{value:r.actor,options:t,onChange:o=>i({...r,actor:o})})}),n.jsx(Ge,{label:"Intent",children:n.jsxs("select",{className:"control",value:r.intent,onChange:o=>i({...r,intent:o.target.value}),children:[n.jsx("option",{value:"",children:"All"}),n.jsx("option",{value:"review_only",children:"review_only"}),n.jsx("option",{value:"work_allowed",children:"work_allowed"})]})}),n.jsxs("button",{className:"inline-flex h-9 items-center justify-center gap-2 self-end rounded-md bg-primary px-3 text-sm font-semibold text-white",type:"submit",children:[n.jsx(In,{className:"h-4 w-4","aria-hidden":!0}),"Apply"]})]})]})}function Qi({value:e,options:t,onChange:s}){const[r,i]=J.useState(!1),o=e.trim().replace(/^@/,"").toLowerCase(),c=t.filter(d=>!o||d.login.toLowerCase().includes(o)).slice(0,8),l=t.find(d=>d.login.toLowerCase()===o);return n.jsxs("div",{className:"relative min-w-0",children:[n.jsxs("div",{className:"control flex items-center gap-2 px-2",children:[l?n.jsx("img",{className:"h-5 w-5 shrink-0 rounded-full bg-slate-100",src:bt(l.avatar_url??""),alt:`${l.login} avatar`,referrerPolicy:"no-referrer"}):n.jsx(Et,{className:"h-4 w-4 shrink-0 text-muted","aria-hidden":!0}),n.jsx("input",{className:"min-w-0 flex-1 bg-transparent font-mono text-sm outline-none",value:e,placeholder:"@login",onChange:d=>{s(d.target.value),i(!0)},onFocus:()=>i(!0),onBlur:()=>window.setTimeout(()=>i(!1),100)}),e?n.jsx("button",{className:"rounded-sm p-1 text-muted hover:bg-slate-100",type:"button","aria-label":"Clear actor filter",onClick:()=>s(""),children:n.jsx(qn,{className:"h-3.5 w-3.5","aria-hidden":!0})}):null]}),r&&c.length>0?n.jsx("div",{className:"absolute left-0 right-0 z-20 mt-1 max-h-72 overflow-auto rounded-md border border-border bg-white p-1 shadow-lg",children:c.map(d=>n.jsxs("button",{className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left hover:bg-slate-50",type:"button",onMouseDown:u=>u.preventDefault(),onClick:()=>{s(d.login),i(!1)},children:[d.avatar_url?n.jsx("img",{className:"h-6 w-6 shrink-0 rounded-full bg-slate-100",src:bt(d.avatar_url),alt:`${d.login} avatar`,referrerPolicy:"no-referrer"}):n.jsx(Et,{className:"h-5 w-5 shrink-0 text-muted","aria-hidden":!0}),n.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",children:["@",d.login]}),n.jsx("span",{className:"shrink-0 rounded-full bg-slate-100 px-1.5 py-0.5 text-[10px] font-semibold text-muted",children:d.job_count})]},d.login))}):null]})}function Ge({label:e,children:t,className:s}){return n.jsxs("label",{className:re("grid min-w-0 gap-1 text-xs font-semibold text-muted",s),children:[e,t]})}function $i({jobs:e,loading:t,onViewJob:s,now:r}){return t&&e.length===0?n.jsx(U,{text:"Loading jobs..."}):e.length===0?n.jsx(U,{text:"No jobs match the current filters."}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"grid gap-2 md:hidden",children:e.map(i=>n.jsx(Ui,{job:i,onViewJob:s,now:r},i.id))}),n.jsx("div",{className:"hidden max-h-[640px] overflow-auto rounded-md border border-border md:block",children:n.jsxs("table",{className:"min-w-full border-collapse text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"sticky top-0 border-b border-border bg-panel text-left text-xs text-muted",children:[n.jsx("th",{className:"px-2 py-2 font-semibold",children:"ID"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Status"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Repo / thread"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Action"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Actor"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Attempts"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Queue wait"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Runtime"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Updated"})]})}),n.jsx("tbody",{children:e.map(i=>n.jsxs("tr",{className:"cursor-pointer border-b border-border hover:bg-slate-50",onClick:()=>s(i.id),children:[n.jsxs("td",{className:"px-2 py-3 font-mono",children:["#",i.id]}),n.jsx("td",{className:"px-2 py-3",children:n.jsx(xs,{status:i.status})}),n.jsxs("td",{className:"px-2 py-3",children:[n.jsx("div",{className:"font-mono",children:i.repo??i.work_key}),n.jsxs("div",{className:"text-xs text-muted",children:["thread ",i.thread??"n/a"]})]}),n.jsxs("td",{className:"px-2 py-3",children:[n.jsx("div",{children:i.action}),n.jsx("div",{className:"text-xs text-muted",children:i.intent})]}),n.jsx("td",{className:"px-2 py-3",children:n.jsx(ps,{actor:i.trigger_actor,avatarUrl:i.trigger_actor_avatar_url})}),n.jsx("td",{className:"px-2 py-3",children:i.attempts}),n.jsx("td",{className:"px-2 py-3",children:ne(ms(i,r))}),n.jsx("td",{className:"px-2 py-3",children:ne(fs(i,r))}),n.jsx("td",{className:"px-2 py-3 font-mono text-xs",children:n.jsx(pe,{value:i.updated_at,compact:!0,relative:!0,now:r})})]},i.id))})]})})]})}function Ui({job:e,onViewJob:t,now:s}){return n.jsx("article",{className:"rounded-md border border-border bg-white shadow-[0_1px_0_rgba(15,23,42,0.03)]",children:n.jsxs("button",{className:"grid w-full gap-2 p-3 text-left hover:bg-slate-50",type:"button",onClick:()=>t(e.id),children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsxs("div",{className:"min-w-0 space-y-1",children:[n.jsxs("div",{className:"grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-2",children:[n.jsxs("span",{className:"shrink-0 font-mono text-xs font-semibold text-muted",children:["#",e.id]}),n.jsx("span",{className:"truncate font-mono text-sm",children:e.repo??e.work_key})]}),n.jsx("div",{className:"line-clamp-2 text-sm leading-snug text-foreground",children:e.subject}),n.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted",children:[n.jsxs("span",{children:["thread ",e.thread??"n/a"," · ",e.action]}),n.jsx(ps,{actor:e.trigger_actor,avatarUrl:e.trigger_actor_avatar_url})]})]}),n.jsx(xs,{status:e.status})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[n.jsx(ee,{label:"Wait",value:ne(ms(e,s))}),n.jsx(ee,{label:"Runtime",value:ne(fs(e,s))}),n.jsx(ee,{label:"Updated",value:n.jsx(pe,{value:e.updated_at,compact:!0,relative:!0,now:s})})]})]})})}function ps({actor:e,avatarUrl:t,framed:s=!1}){const r=t?n.jsx("img",{className:"h-4 w-4 shrink-0 rounded-full bg-slate-100",src:bt(t),alt:e?`${e} avatar`:"",referrerPolicy:"no-referrer"}):n.jsx(Et,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),i=n.jsxs(n.Fragment,{children:[r,n.jsx("span",{className:"min-w-0 truncate",children:e?`@${e}`:"unknown actor"})]});return s?n.jsx("span",{className:"inline-flex h-7 max-w-full items-center gap-1 rounded-md border border-border px-2 text-xs font-semibold text-muted",children:i}):n.jsx("span",{className:"inline-flex min-w-0 max-w-full items-center gap-1 font-mono text-xs text-muted",children:i})}function zi({job:e,session:t,sessionEvents:s,transcript:r,now:i,compact:o=!1}){var b;const c=kr(e.id),l=s??[],d=r??[],u=Ri(l),h=_i(d),y=fs(e,i),j=ms(e,i);return n.jsxs("div",{className:"grid min-w-0 gap-4",children:[n.jsxs("div",{className:"grid gap-2",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(xs,{status:e.status}),n.jsxs("a",{className:"inline-flex h-7 items-center gap-1 rounded-md border border-border px-2 text-xs font-semibold text-foreground hover:bg-slate-50",href:c,children:[n.jsx(Tn,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Job #",e.id]}),n.jsx(ps,{actor:e.trigger_actor,avatarUrl:e.trigger_actor_avatar_url,framed:!0})]}),n.jsx("div",{className:"min-w-0 break-words font-mono text-sm [overflow-wrap:anywhere]",children:e.work_key}),n.jsx("p",{className:"min-w-0 break-words text-sm text-muted [overflow-wrap:anywhere]",children:e.subject})]}),n.jsxs("div",{className:re("grid gap-2 text-sm sm:gap-3",o?"grid-cols-1":"grid-cols-3"),children:[n.jsx(ee,{label:"Queue wait",value:ne(j)}),n.jsx(ee,{label:e.status==="running"?"Running for":"Runtime",value:ne(y)}),n.jsx(ee,{label:"Coalesced",value:String(e.coalesced_count)})]}),n.jsxs("div",{className:re("grid gap-2 text-sm sm:gap-3",o?"grid-cols-1":"grid-cols-2 xl:grid-cols-4"),children:[n.jsx(ee,{label:"Created",value:n.jsx(pe,{value:e.created_at,compact:!0,relative:!0,now:i})}),n.jsx(ee,{label:"Started",value:e.started_at?n.jsx(pe,{value:e.started_at,compact:!0,relative:!0,now:i}):"n/a"}),n.jsx(ee,{label:"Updated",value:n.jsx(pe,{value:e.updated_at,compact:!0,relative:!0,now:i})}),n.jsx(ee,{label:"Finished",value:e.finished_at?n.jsx(pe,{value:e.finished_at,compact:!0,relative:!0,now:i}):"n/a"})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"mb-2 text-sm font-semibold",children:"Timeline"}),n.jsx("div",{className:"grid min-w-0 gap-3",children:(e.worklog??[]).length>0?(b=e.worklog)==null?void 0:b.map(x=>n.jsxs("div",{className:"min-w-0 border-l-2 border-primary pl-3",children:[n.jsx("div",{className:"text-sm font-semibold",children:x.phase}),n.jsx("div",{className:"font-mono text-xs text-muted",children:n.jsx(pe,{value:x.ts,relative:!0,now:i})}),n.jsx("div",{className:"break-words text-sm [overflow-wrap:anywhere]",children:x.summary}),x.detail?n.jsx("div",{className:"mt-1 break-words font-mono text-xs text-muted [overflow-wrap:anywhere]",children:x.detail}):null]},x.id)):n.jsx(U,{text:"No worklog entries."})})]}),n.jsxs("div",{children:[n.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[n.jsx(Dn,{className:"h-4 w-4","aria-hidden":!0}),"OpenClaw session"]}),t?n.jsxs("div",{className:"grid gap-3",children:[n.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.jsx(ee,{label:"Session ID",value:t.id}),n.jsx(ee,{label:"Source",value:t.source})]}),n.jsx("p",{className:"break-words text-xs text-muted [overflow-wrap:anywhere]",children:t.detail})]}):n.jsx(U,{text:"Session correlation is loading."})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"mb-2 text-sm font-semibold",children:"Agent activity"}),n.jsx("div",{className:"grid max-h-[460px] min-w-0 gap-2 overflow-auto pr-1",children:u.length>0?u.map((x,p)=>n.jsx(Gi,{event:x,defaultOpen:Ls(x.eventType,e.status==="running",p,u.length),now:i},x.id)):n.jsx(U,{text:e.status==="running"?"Waiting for live agent output...":"No agent activity has been recorded for this session."})})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"mb-2 text-sm font-semibold",children:"Session transcript"}),n.jsx("div",{className:"grid max-h-[620px] min-w-0 gap-2 overflow-auto pr-1",children:h.length>0?h.map((x,p)=>n.jsx(Ki,{entry:x,defaultOpen:Ls(x.kind,e.status==="running",p,h.length),now:i},x.id)):n.jsx(U,{text:e.status==="running"?"Waiting for live transcript entries...":"No OpenClaw transcript entries are available for this session."})})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"mb-2 text-sm font-semibold",children:"GitHub links"}),n.jsx("ul",{className:"grid gap-2 text-sm",children:e.github_urls.length>0?e.github_urls.map(x=>n.jsx("li",{children:n.jsxs("a",{className:"break-all text-primary hover:underline [overflow-wrap:anywhere]",href:bt(x),rel:"noreferrer",target:"_blank",children:[n.jsx(En,{className:"mr-1 inline h-3.5 w-3.5 align-[-2px]","aria-hidden":!0}),x]})},x)):n.jsx("li",{className:"text-muted",children:"No links recorded."})})]})]})}function Ki({entry:e,defaultOpen:t,now:s}){return n.jsx(Cr,{badge:e.badge,meta:n.jsx(pe,{value:e.meta,relative:!0,now:s}),count:e.count,summary:e.summary,defaultOpen:t,children:n.jsx("pre",{className:"max-h-72 max-w-full overflow-auto whitespace-pre-wrap break-words rounded bg-slate-950 px-2 py-1.5 font-mono text-xs leading-relaxed text-slate-100 [overflow-wrap:anywhere]",children:e.text})})}function Gi({event:e,defaultOpen:t,now:s}){return n.jsx(Cr,{badge:e.badge,meta:n.jsx(pe,{value:e.meta,relative:!0,now:s}),count:e.count,summary:e.summary,defaultOpen:t,children:e.detail?n.jsx("pre",{className:"max-h-56 max-w-full overflow-auto whitespace-pre-wrap break-words rounded bg-slate-950 px-2 py-1.5 font-mono text-xs leading-relaxed text-slate-100 [overflow-wrap:anywhere]",children:e.detail}):null})}function Cr({badge:e,meta:t,count:s,summary:r,defaultOpen:i,children:o}){const[c,l]=J.useState(!!i);return n.jsxs("details",{className:"group min-w-0 rounded border border-border bg-slate-50/60",open:c,onToggle:d=>l(d.currentTarget.open),children:[n.jsxs("summary",{className:"grid cursor-pointer list-none gap-1 px-2 py-1.5 marker:hidden hover:bg-white",children:[n.jsxs("div",{className:"grid min-w-0 gap-1 sm:flex sm:items-center sm:justify-between sm:gap-2",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[n.jsx(mr,{className:"h-3.5 w-3.5 shrink-0 text-muted transition-transform group-open:rotate-180","aria-hidden":!0}),n.jsx("span",{className:"truncate font-mono text-[11px] font-semibold text-muted",children:e}),s&&s>1?n.jsx("span",{className:"rounded-sm border border-border px-1 font-mono text-[10px] text-muted",children:s}):null]}),n.jsx("span",{className:"min-w-0 truncate pl-5 font-mono text-[11px] text-muted sm:shrink-0 sm:pl-0",children:t})]}),n.jsx("div",{className:"min-w-0 break-words pl-5 text-xs text-foreground [overflow-wrap:anywhere] sm:truncate",children:r})]}),n.jsx("div",{className:"min-w-0 border-t border-border bg-white px-2 py-2",children:o})]})}function Qs({label:e,values:t}){const s=[{name:"median",seconds:(t==null?void 0:t.median)??0},{name:"p90",seconds:(t==null?void 0:t.p90)??0},{name:"p99",seconds:(t==null?void 0:t.p99)??0}];return n.jsx("div",{className:"h-56",children:n.jsx(rs,{width:"100%",height:"100%",children:n.jsxs(Zs,{data:s,children:[n.jsx(ns,{strokeDasharray:"3 3"}),n.jsx(is,{dataKey:"name"}),n.jsx(as,{tickFormatter:ne}),n.jsx(os,{formatter:r=>[ne(Number(r)),e]}),n.jsx(Ys,{dataKey:"seconds",fill:"#0969da",radius:[4,4,0,0]})]})})})}function Bi({values:e,loading:t,totalJobs:s}){const r=Object.entries(e??{}).map(([i,o])=>({day:i,count:o}));return t&&r.length===0?n.jsx(U,{text:"Loading job history..."}):r.length===0?n.jsx(U,{text:s>0?"Job history has no valid creation dates.":"No job history available."}):n.jsx("div",{className:"h-56",children:n.jsx(rs,{width:"100%",height:"100%",children:n.jsxs(Zs,{data:r,children:[n.jsx(ns,{strokeDasharray:"3 3"}),n.jsx(is,{dataKey:"day",minTickGap:16}),n.jsx(as,{allowDecimals:!1}),n.jsx(os,{formatter:i=>[Number(i),"jobs"]}),n.jsx(Ys,{dataKey:"count",fill:"#16a34a",radius:[4,4,0,0]})]})})})}function Hi(e){return Object.values(e).reduce((t,s)=>t+s,0)}function Ji({data:e,loading:t}){var y,j,b,x,p,g;if(t&&!e)return n.jsx(U,{text:"Loading process activity..."});if(!e)return n.jsx(U,{text:"No process snapshot available."});const s=e.executor.children??[],r=s.flatMap(m=>Rr(m)),i=r.reduce((m,k)=>m+k.cpu_ticks,0),o=r.reduce((m,k)=>m+Vi(k),0),c=e.executor.service==="active",l=r.slice(0,8).map(m=>({label:`pid ${m.pid}`,ticks:m.cpu_ticks})),d=(e.samples??[]).map(m=>({label:mt(m.ts),ticks:m.cpu_ticks,io:m.io_bytes,active:m.active_since_last_sample?"active":"quiet"})),u=d.length>0?d:l,h=(y=e.samples)==null?void 0:y[e.samples.length-1];return n.jsxs("div",{className:"grid gap-4",children:[n.jsx("div",{className:"rounded-md border border-slate-200 bg-slate-50 p-3",children:n.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("span",{className:re("inline-flex h-6 items-center rounded-full border px-2 text-xs font-semibold",c?"border-emerald-300 bg-emerald-50 text-emerald-700":"border-slate-300 bg-white text-slate-600"),children:c?"active":"idle"}),n.jsxs("span",{className:"font-mono text-xs text-muted",children:["service ",e.executor.service]})]}),n.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:e.running_jobs.length>0?`${e.running_jobs.length} running job${e.running_jobs.length===1?"":"s"}`:"No running jobs"}),e.running_jobs.length>0?n.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:e.running_jobs.slice(0,4).map(m=>n.jsxs("span",{className:"inline-flex min-h-6 items-center gap-1.5 rounded-full border border-blue-200 bg-white px-2 font-mono text-[11px] font-semibold text-blue-700",children:[n.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-600 animate-live-pulse","aria-hidden":!0}),"#",m.id," ",ne(m.age_seconds)]},m.id))}):null,h?n.jsxs("p",{className:"mt-1 text-xs text-muted",children:["Last persisted sample ",mt(h.ts)," · ",h.active_since_last_sample?"activity observed":`quiet ${ne(h.idle_seconds)}`]}):null,n.jsx("p",{className:"mt-1 text-xs text-muted",children:e.detail})]}),n.jsxs("div",{className:"grid min-w-[190px] grid-cols-3 gap-2 text-center text-xs",children:[n.jsx(Qt,{label:"PID",value:e.executor.pid?String(e.executor.pid):"n/a"}),n.jsx(Qt,{label:"Children",value:String(r.length)}),n.jsx(Qt,{label:"CPU ticks",value:String(i)})]})]})}),n.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[n.jsx(Mt,{label:"Live process",value:((j=e.signals)==null?void 0:j.live_process.state)??(r.length>0?"live":"no_child_process"),detail:`${((b=e.signals)==null?void 0:b.live_process.child_count)??r.length} children`}),n.jsx(Mt,{label:"Process activity",value:((x=e.signals)==null?void 0:x.process_activity.state)??(h!=null&&h.active_since_last_sample?"active":"quiet"),detail:h?`sample ${mt(h.ts)}`:"no sample"}),n.jsx(Mt,{label:"Semantic progress",value:(p=e.signals)!=null&&p.semantic_progress.length?"recent":"none",detail:$s(e.running_jobs,"semantic_progress")}),n.jsx(Mt,{label:"Visible progress",value:(g=e.signals)!=null&&g.visible_progress.length?"streaming":"none",detail:$s(e.running_jobs,"visible_progress")})]}),e.alerts.length>0?n.jsx(Be,{tone:"error",text:e.alerts[0]}):null,n.jsxs("div",{className:"grid gap-4 lg:grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)]",children:[n.jsxs("div",{className:"min-w-0 rounded-md border border-border p-3",children:[n.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[n.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[n.jsx(Fs,{className:"h-4 w-4","aria-hidden":!0}),d.length>0?"CPU history":"CPU ticks"]}),n.jsxs("span",{className:"font-mono text-xs text-muted",children:[_r(o)," I/O"]})]}),u.length>0?n.jsx("div",{className:"h-40",children:n.jsx(rs,{width:"100%",height:"100%",children:n.jsxs(Er,{data:u,children:[n.jsx(ns,{strokeDasharray:"3 3"}),n.jsx(is,{dataKey:"label",tick:!1}),n.jsx(as,{allowDecimals:!1,tick:{fontSize:11}}),n.jsx(os,{formatter:m=>[Number(m),"cpu ticks"]}),n.jsx(Fr,{type:"monotone",dataKey:"ticks",stroke:"#0f766e",strokeWidth:2,dot:{r:3},activeDot:{r:5},isAnimationActive:!1})]})})}):n.jsx(U,{text:"No executor CPU samples available."})]}),n.jsxs("div",{className:"min-w-0",children:[n.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[n.jsx(Fs,{className:"h-4 w-4","aria-hidden":!0}),"Executor children"]}),s.length>0?n.jsx("div",{className:"grid gap-2",children:s.map(m=>n.jsx(Sr,{process:m},m.pid))}):n.jsx(U,{text:"No child process detected for the executor."})]})]})]})}function Wi({alerts:e,loading:t,now:s}){if(t&&!e)return n.jsx(U,{text:"Loading monitor alerts..."});const r=e??[];return r.length===0?n.jsx(U,{text:"No active monitor alerts."}):n.jsx("div",{className:"grid gap-2",children:r.slice(0,5).map(i=>n.jsxs("div",{className:"rounded-md border border-red-200 bg-red-50 p-2.5",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs font-semibold text-red-700",children:[n.jsx(pr,{className:"h-3.5 w-3.5","aria-hidden":!0}),n.jsx("span",{children:i.severity}),n.jsx("span",{className:"font-normal text-red-600",children:wr(i.last_seen,s)}),i.observations>1?n.jsxs("span",{className:"rounded-full border border-red-200 bg-white px-1.5",children:[i.observations,"x"]}):null]}),n.jsx("p",{className:"mt-1 break-words text-sm font-medium text-red-950 [overflow-wrap:anywhere]",children:i.message})]},i.fingerprint))})}function Sr({process:e}){var r,i;const t=((r=e.io_bytes)==null?void 0:r.read_bytes)??0,s=((i=e.io_bytes)==null?void 0:i.write_bytes)??0;return n.jsxs("div",{className:"rounded-md border border-border bg-white p-2.5",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[n.jsxs("span",{className:"font-mono",children:["pid ",e.pid]}),n.jsxs("span",{className:"rounded-full border border-border px-2 text-xs text-muted",children:["state ",e.state]}),n.jsxs("span",{className:"rounded-full border border-border px-2 text-xs text-muted",children:["cpu ",e.cpu_ticks]}),n.jsxs("span",{className:"rounded-full border border-border px-2 text-xs text-muted",children:["I/O ",_r(t+s)]})]}),n.jsx("div",{className:"mt-2 break-words font-mono text-xs text-muted",children:e.cmd||"unknown command"}),e.children&&e.children.length>0?n.jsx("div",{className:"mt-3 border-l-2 border-border pl-3",children:e.children.map(o=>n.jsx(Sr,{process:o},o.pid))}):null]})}function Qt({label:e,value:t}){return n.jsxs("div",{className:"rounded-md border border-border bg-white px-2 py-2",children:[n.jsx("div",{className:"font-mono text-sm font-semibold text-foreground",children:t}),n.jsx("div",{className:"mt-0.5 text-[11px] font-semibold uppercase text-muted",children:e})]})}function Mt({label:e,value:t,detail:s}){return n.jsxs("div",{className:"min-w-0 rounded-md border border-border bg-white p-2.5",children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase text-muted",children:e}),n.jsx("div",{className:"mt-1 truncate text-sm font-semibold text-foreground",children:t}),n.jsx("div",{className:"mt-1 truncate font-mono text-[11px] text-muted",children:s})]})}function $s(e,t){const s=e.find(i=>i[t]),r=s==null?void 0:s[t];return!s||!r?"no running heartbeat":`#${s.id} ${r.phase} ${ne(r.age_seconds??null)}`}function Rr(e){return[e,...(e.children??[]).flatMap(t=>Rr(t))]}function Vi(e){var t,s;return(((t=e.io_bytes)==null?void 0:t.read_bytes)??0)+(((s=e.io_bytes)==null?void 0:s.write_bytes)??0)}function _r(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function ee({label:e,value:t}){return n.jsxs("div",{className:"min-w-0 rounded-md border border-border p-3",children:[n.jsx("div",{className:"text-xs font-semibold text-muted",children:e}),n.jsx("div",{className:"mt-1 min-w-0 break-words text-sm [overflow-wrap:anywhere]",children:t})]})}function xs({status:e}){const t=Pi(e),s=e==="running"||e==="pending";return n.jsxs("span",{className:re("inline-flex min-h-6 items-center gap-1.5 rounded-full border px-2 text-xs font-semibold",t.badge),children:[n.jsx("span",{className:re("h-2.5 w-2.5 rounded-full",t.dot,s&&"animate-live-pulse"),"aria-hidden":!0}),e]})}function U({text:e}){return n.jsx("div",{className:"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted",children:e})}function Be({tone:e,text:t}){return n.jsx("div",{className:re("rounded-md border p-3 text-sm",e==="error"&&"border-red-300 bg-red-50 text-red-700"),children:t})}function At({onClick:e,compactOnMobile:t=!1}){return n.jsxs("button",{className:re("inline-flex h-8 items-center justify-center gap-2 rounded-md border border-border text-sm font-semibold text-foreground hover:bg-slate-50",t?"w-8 px-0 sm:w-auto sm:px-3":"px-3"),onClick:e,type:"button","aria-label":"Refresh",children:[n.jsx(An,{className:"h-4 w-4","aria-hidden":!0}),n.jsx("span",{className:re(t&&"hidden sm:inline"),children:"Refresh"})]})}qr.createRoot(document.getElementById("root")).render(n.jsx(J.StrictMode,{children:n.jsx(fn,{client:bi,children:n.jsx(Ti,{})})})); + */const Qn=z("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),hs="-",$n=e=>{const t=zn(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const l=c.split(hs);return l[0]===""&&l.length!==1&&l.shift(),gr(l,t)||Un(c)},getConflictingClassGroupIds:(c,l)=>{const d=s[c]||[];return l&&r[c]?[...d,...r[c]]:d}}},gr=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const s=e[0],r=t.nextPart.get(s),i=r?gr(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(hs);return(c=t.validators.find(({validator:l})=>l(o)))==null?void 0:c.classGroupId},Ts=/^\[(.+)\]$/,Un=e=>{if(Ts.test(e)){const t=Ts.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},zn=e=>{const{theme:t,prefix:s}=e,r={nextPart:new Map,validators:[]};return Gn(Object.entries(e.classGroups),s).forEach(([o,c])=>{ts(c,r,o,t)}),r},ts=(e,t,s,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:As(t,i);o.classGroupId=s;return}if(typeof i=="function"){if(Kn(i)){ts(i(r),t,s,r);return}t.validators.push({validator:i,classGroupId:s});return}Object.entries(i).forEach(([o,c])=>{ts(c,As(t,o),s,r)})})},As=(e,t)=>{let s=e;return t.split(hs).forEach(r=>{s.nextPart.has(r)||s.nextPart.set(r,{nextPart:new Map,validators:[]}),s=s.nextPart.get(r)}),s},Kn=e=>e.isThemeGetter,Gn=(e,t)=>t?e.map(([s,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([c,l])=>[t+c,l])):o);return[s,i]}):e,Bn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,r=new Map;const i=(o,c)=>{s.set(o,c),t++,t>e&&(t=0,r=s,s=new Map)};return{get(o){let c=s.get(o);if(c!==void 0)return c;if((c=r.get(o))!==void 0)return i(o,c),c},set(o,c){s.has(o)?s.set(o,c):i(o,c)}}},br="!",Hn=e=>{const{separator:t,experimentalParseClassName:s}=e,r=t.length===1,i=t[0],o=t.length,c=l=>{const d=[];let u=0,h=0,y;for(let g=0;gh?y-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:p}};return s?l=>s({className:l,parseClassName:c}):c},Jn=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(r=>{r[0]==="["?(t.push(...s.sort(),r),s=[]):s.push(r)}),t.push(...s.sort()),t},Wn=e=>({cache:Bn(e.cacheSize),parseClassName:Hn(e),...$n(e)}),Vn=/\s+/,Xn=(e,t)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],c=e.trim().split(Vn);let l="";for(let d=c.length-1;d>=0;d-=1){const u=c[d],{modifiers:h,hasImportantModifier:y,baseClassName:j,maybePostfixModifierPosition:b}=s(u);let x=!!b,p=r(x?j.substring(0,b):j);if(!p){if(!x){l=u+(l.length>0?" "+l:l);continue}if(p=r(j),!p){l=u+(l.length>0?" "+l:l);continue}x=!1}const g=Jn(h).join(":"),m=y?g+br:g,k=m+p;if(o.includes(k))continue;o.push(k);const _=i(p,x);for(let v=0;v<_.length;++v){const O=_[v];o.push(m+O)}l=u+(l.length>0?" "+l:l)}return l};function Zn(){let e=0,t,s,r="";for(;e{if(typeof e=="string")return e;let t,s="";for(let r=0;ry(h),e());return s=Wn(u),r=s.cache.get,i=s.cache.set,o=l,l(d)}function l(d){const u=r(d);if(u)return u;const h=Xn(d,s);return i(d,h),h}return function(){return o(Zn.apply(null,arguments))}}const E=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},vr=/^\[(?:([a-z-]+):)?(.+)\]$/i,ei=/^\d+\/\d+$/,ti=new Set(["px","full","screen"]),si=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ri=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ni=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ii=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ai=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ue=e=>He(e)||ti.has(e)||ei.test(e),be=e=>ot(e,"length",mi),He=e=>!!e&&!Number.isNaN(Number(e)),qt=e=>ot(e,"number",He),ut=e=>!!e&&Number.isInteger(Number(e)),oi=e=>e.endsWith("%")&&He(e.slice(0,-1)),N=e=>vr.test(e),ye=e=>si.test(e),li=new Set(["length","size","percentage"]),ci=e=>ot(e,li,wr),di=e=>ot(e,"position",wr),ui=new Set(["image","url"]),hi=e=>ot(e,ui,xi),fi=e=>ot(e,"",pi),ht=()=>!0,ot=(e,t,s)=>{const r=vr.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):s(r[2]):!1},mi=e=>ri.test(e)&&!ni.test(e),wr=()=>!1,pi=e=>ii.test(e),xi=e=>ai.test(e),gi=()=>{const e=E("colors"),t=E("spacing"),s=E("blur"),r=E("brightness"),i=E("borderColor"),o=E("borderRadius"),c=E("borderSpacing"),l=E("borderWidth"),d=E("contrast"),u=E("grayscale"),h=E("hueRotate"),y=E("invert"),j=E("gap"),b=E("gradientColorStops"),x=E("gradientColorStopPositions"),p=E("inset"),g=E("margin"),m=E("opacity"),k=E("padding"),_=E("saturate"),v=E("scale"),O=E("sepia"),A=E("skew"),W=E("space"),C=E("translate"),F=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",N,t],P=()=>[N,t],xe=()=>["",ue,be],Z=()=>["auto",He,N],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Me=()=>["solid","dashed","dotted","double","none"],lt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ze=()=>["start","end","center","between","around","evenly","stretch"],ge=()=>["","0",N],ct=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[He,N];return{cacheSize:500,separator:":",theme:{colors:[ht],spacing:[ue,be],blur:["none","",ye,N],brightness:Y(),borderColor:[e],borderRadius:["none","","full",ye,N],borderSpacing:P(),borderWidth:xe(),contrast:Y(),grayscale:ge(),hueRotate:Y(),invert:ge(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[oi,be],inset:G(),margin:G(),opacity:Y(),padding:P(),saturate:Y(),scale:Y(),sepia:ge(),skew:Y(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[ye]}],"break-after":[{"break-after":ct()}],"break-before":[{"break-before":ct()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ie(),N]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ut,N]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:ge()}],shrink:[{shrink:ge()}],order:[{order:["first","last","none",ut,N]}],"grid-cols":[{"grid-cols":[ht]}],"col-start-end":[{col:["auto",{span:["full",ut,N]},N]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[ht]}],"row-start-end":[{row:["auto",{span:[ut,N]},N]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[j]}],"gap-x":[{"gap-x":[j]}],"gap-y":[{"gap-y":[j]}],"justify-content":[{justify:["normal",...ze()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ze(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ze(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[ye]},ye]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ye,be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",qt]}],"font-family":[{font:[ht]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",He,qt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ue,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ue,be]}],"underline-offset":[{"underline-offset":["auto",ue,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),di]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ci]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...Me(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:Me()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Me()]}],"outline-offset":[{"outline-offset":[ue,N]}],"outline-w":[{outline:[ue,be]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[ue,be]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ye,fi]}],"shadow-color":[{shadow:[ht]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...lt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":lt()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",ye,N]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[y]}],saturate:[{saturate:[_]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[v]}],"scale-x":[{"scale-x":[v]}],"scale-y":[{"scale-y":[v]}],rotate:[{rotate:[ut,N]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ue,be,qt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},bi=Yn(gi),yi=new fn({defaultOptions:{queries:{retry:1}}}),Is=12,vi=12,wi=10080*60*1e3,ji=1e3;function re(...e){return bi(Ar(e))}async function oe(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}function ne(e){if(e==null)return"n/a";const t=Math.max(0,Math.floor(e));if(t<60)return`${t}s`;const s=Math.floor(t/60);return s<60?`${s}m ${t%60}s`:`${Math.floor(s/60)}h ${s%60}m`}const Ni=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}),ki=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function Ct(e){if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t}function Ci(e){const t=Ct(e);return t?Ni.format(t):e??""}function mt(e){const t=Ct(e);return t?ki.format(t):e??""}function jr(e,t){const s=Ct(e);if(!s)return e??"";const r=t-s.getTime(),i=Math.abs(r);if(i>wi)return mt(e);const o=r>=0?"ago":"from now",c=Math.round(i/1e3);if(c<45)return r>=0?"just now":"soon";if(c<90)return`1m ${o}`;const l=Math.round(c/60);if(l<60)return`${l}m ${o}`;if(l<90)return`1h ${o}`;const d=Math.round(l/60);return d<24?`${d}h ${o}`:d<36?`1d ${o}`:`${Math.round(d/24)}d ${o}`}function pe({value:e,compact:t=!1,relative:s=!1,now:r=Date.now()}){const i=Ct(e);return i?n.jsx("time",{dateTime:i.toISOString(),title:`UTC: ${i.toISOString()}`,children:s?jr(e,r):t?mt(e):Ci(e)}):n.jsx(n.Fragment,{children:e??""})}function Nr(e,t){const s=Ct(e);return s?Math.max(0,Math.floor((t-s.getTime())/1e3)):null}function fs(e,t){return e.status==="running"?Nr(e.started_at,t)??e.runtime_seconds:e.runtime_seconds}function ms(e,t){return e.status==="pending"?Nr(e.created_at,t)??e.queue_wait_seconds:e.queue_wait_seconds}function Si(e){const[t,s]=J.useState(()=>Date.now());return J.useEffect(()=>{if(!e)return;s(Date.now());const r=window.setInterval(()=>s(Date.now()),ji);return()=>window.clearInterval(r)},[e]),t}function Ri(e){return(e??"").split(/\r?\n/).map(s=>s.trim()).find(Boolean)??""}function Ft(e,t,s=1){const r=Ri(t),i=s>1?` (${s})`:"";return r?`${e}${i}: ${r}`:`${e}${i}`}function Tt(e){return e==="openclaw_stdout"||e==="openclaw_stderr"}function kr(e){return e.map(t=>t==null?void 0:t.trim()).filter(Boolean).join(` +`)}function _i(e){const t=[];for(const s of e){const r=t[t.length-1];if(r&&Tt(s.event_type)&&r.eventType===s.event_type){r.count+=1,r.meta=s.ts,r.detail=kr([r.detail,s.detail]),r.summary=Ft(s.summary,r.detail,r.count);continue}t.push({id:String(s.id),badge:s.event_type,meta:s.ts,summary:Tt(s.event_type)?Ft(s.summary,s.detail):s.summary,detail:s.detail,eventType:s.event_type,count:1})}return t}function Pi(e){const t=[];return e.forEach((s,r)=>{const i=t[t.length-1];if(i&&Tt(s.kind)&&i.kind===s.kind){i.count+=1,i.meta=s.timestamp,i.text=kr([i.text,s.text]),i.summary=Ft(`${s.role} · ${s.kind}`,i.text,i.count);return}t.push({id:`${s.timestamp??"entry"}-${r}`,badge:s.title,meta:s.timestamp,summary:Tt(s.kind)?Ft(`${s.role} · ${s.kind}`,s.text):`${s.role} · ${s.kind}`,text:s.text,kind:s.kind,count:1})}),t}function Ls(e,t,s,r){return e==="openclaw_stdout"?!1:t||s>=r-2}function Mi(e){return{pending:{badge:"border-amber-300 bg-amber-50 text-amber-800",dot:"bg-amber-500"},running:{badge:"border-blue-300 bg-blue-50 text-blue-700",dot:"bg-blue-600"},blocked:{badge:"border-red-300 bg-red-50 text-red-700",dot:"bg-red-600"},denied:{badge:"border-red-300 bg-red-50 text-red-700",dot:"bg-red-600"},done:{badge:"border-emerald-300 bg-emerald-50 text-emerald-700",dot:"bg-emerald-600"},waiting_approval:{badge:"border-slate-300 bg-slate-50 text-slate-700",dot:"bg-slate-500"}}[e]??{badge:"border-slate-300 bg-slate-50 text-slate-700",dot:"bg-slate-500"}}function Oi(e,t){const s=new URLSearchParams;for(const[r,i]of Object.entries(e))i.trim()&&s.set(r,i.trim());return s.set("limit",String(t)),`/api/jobs?${s.toString()}`}function bt(e){try{const t=new URL(e);return t.protocol==="https:"||t.protocol==="http:"?t.href:"#"}catch{return"#"}}function Cr(e){return`/jobs/${e}`}function Ds(e){try{return JSON.parse(e.data)}catch{return null}}function Ei(e,t){return e.some(s=>s.id===t.id)?e:[...e,t]}function Fi(e,t){const s=qs(t);return e.some(r=>qs(r)===s)?e:[...e,t]}function qs(e){return`${e.timestamp??""}:${e.role}:${e.kind}:${e.title}:${e.text}`}function Ti(e=window.location.pathname){const t=e.match(/^\/jobs\/(\d+)\/?$/);return t?Number(t[1]):null}function Ai(){var P,xe,Z,ie,Me,lt,ze,ge,ct,Y,gs,bs;const e=hr(),[t,s]=J.useState({status:"",repo:"",thread:"",action:"",intent:"",actor:""}),[r,i]=J.useState(Is),[o,c]=J.useState(()=>window.location.pathname),l=Ti(o),d=l!==null,u=l,h=ae({queryKey:["metrics"],queryFn:()=>oe("/api/metrics/summary"),enabled:!d}),y=ae({queryKey:["me"],queryFn:()=>oe("/api/me"),refetchInterval:!1}),j=ae({queryKey:["job-actors"],queryFn:()=>oe("/api/jobs/actors"),enabled:!d}),b=ae({queryKey:["jobs",t,r],queryFn:()=>oe(Oi(t,r)),enabled:!d}),x=ae({queryKey:["processes"],queryFn:()=>oe("/api/processes"),enabled:!d}),p=ae({queryKey:["alerts"],queryFn:()=>oe("/api/alerts"),enabled:!d}),g=ae({queryKey:["job",u],queryFn:()=>oe(`/api/jobs/${u}`),enabled:u!==null}),m=ae({queryKey:["job-session",u],queryFn:()=>oe(`/api/jobs/${u}/session`),enabled:u!==null}),k=ae({queryKey:["job-session-events",u],queryFn:()=>oe(`/api/jobs/${u}/session/events`),enabled:u!==null}),_=ae({queryKey:["job-session-transcript",u],queryFn:()=>oe(`/api/jobs/${u}/session/transcript`),enabled:u!==null});J.useEffect(()=>{if(u===null)return;const D=new EventSource(`/api/jobs/${u}/session/stream`);return D.addEventListener("session_event",It=>{const Ke=Ds(It);Ke&&(e.setQueryData(["job-session-events",u],Oe=>({events:Ei((Oe==null?void 0:Oe.events)??[],Ke)})),e.invalidateQueries({queryKey:["job",u]}),e.invalidateQueries({queryKey:["jobs"]}))}),D.addEventListener("transcript_entry",It=>{const Ke=Ds(It);!Ke||Ke.job_id!==u||e.setQueryData(["job-session-transcript",u],Oe=>({entries:Fi((Oe==null?void 0:Oe.entries)??[],Ke.entry)}))}),D.onerror=()=>{D.close()},()=>D.close()},[u,e]),J.useEffect(()=>{const D=()=>{c(window.location.pathname)};return window.addEventListener("popstate",D),()=>window.removeEventListener("popstate",D)},[]);const v=J.useCallback(D=>{window.history.pushState({},"",Cr(D)),c(window.location.pathname)},[]),O=((P=h.data)==null?void 0:P.metrics.status_counts)??{},A=((xe=b.data)==null?void 0:xe.jobs)??[],W=J.useCallback(D=>{s(D),i(Is)},[]),C=u?((Z=g.data)==null?void 0:Z.job)??null:null,F=A.some(D=>D.status==="running"||D.status==="pending")||(C==null?void 0:C.status)==="running"||(C==null?void 0:C.status)==="pending",T=Si(F),G=n.jsx(Li,{selectedJobId:u,selectedJob:C,loading:g.isLoading,error:g.error,session:(ie=m.data)==null?void 0:ie.session,sessionEvents:(Me=k.data)==null?void 0:Me.events,transcript:(lt=_.data)==null?void 0:lt.entries,now:T});return n.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[n.jsx("header",{className:"border-b border-slate-800 bg-slate-950 text-white",children:n.jsxs("div",{className:"mx-auto flex w-full max-w-[1440px] items-center justify-between gap-3 px-4 py-4 md:px-6",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("h1",{className:"truncate text-xl font-semibold",children:"GitHub Agent Bridge"}),n.jsx("p",{className:"text-sm text-slate-300",children:"Read-only operational dashboard"})]}),n.jsx(Di,{user:(ze=y.data)==null?void 0:ze.user,loading:y.isLoading})]})}),n.jsx("main",{className:"mx-auto grid w-full max-w-[1440px] gap-4 px-3 py-4 sm:px-4 md:px-6 md:py-5",children:l!==null?n.jsx(Ii,{jobId:l,detail:G,onRefresh:()=>{g.refetch(),m.refetch(),k.refetch(),_.refetch()}}):n.jsxs(n.Fragment,{children:[h.error?n.jsx(Be,{tone:"error",text:h.error.message}):null,n.jsxs("section",{className:"grid grid-cols-2 gap-3 xl:grid-cols-4","aria-label":"Summary metrics",children:[n.jsx(Pt,{title:"Pending",value:O.pending??0,icon:n.jsx(En,{className:"h-5 w-5"})}),n.jsx(Pt,{title:"Running",value:O.running??0,icon:n.jsx(Pn,{className:"h-5 w-5"})}),n.jsx(Pt,{title:"Blocked",value:O.blocked??0,icon:n.jsx(xr,{className:"h-5 w-5"})}),n.jsx(Pt,{title:"Done",value:O.done??0,icon:n.jsx(On,{className:"h-5 w-5"})})]}),n.jsxs("section",{className:"grid gap-3",children:[n.jsx(qi,{count:A.length,limit:r,loading:b.isLoading,onRefresh:()=>b.refetch()}),n.jsxs(Ee,{title:"Recent jobs",flushHeader:!0,children:[n.jsx(Qi,{filters:t,actorOptions:((ge=j.data)==null?void 0:ge.actors)??[],onChange:W}),b.error?n.jsx(Be,{tone:"error",text:b.error.message}):null,n.jsx(Ui,{jobs:A,loading:b.isLoading,onViewJob:v,now:T}),A.length>=r?n.jsx("div",{className:"mt-3 flex justify-center",children:n.jsx("button",{className:"inline-flex h-9 items-center justify-center rounded-md border border-border px-3 text-sm font-semibold text-foreground hover:bg-slate-50",type:"button",onClick:()=>i(D=>D+vi),children:"Load more jobs"})}):null]})]}),n.jsxs("section",{className:"grid gap-4",children:[n.jsxs(Ee,{title:"Process activity",action:n.jsx(At,{onClick:()=>x.refetch()}),children:[x.error?n.jsx(Be,{tone:"error",text:x.error.message}):null,n.jsx(Wi,{data:x.data,loading:x.isLoading})]}),n.jsxs(Ee,{title:"Monitor alerts",action:n.jsx(At,{onClick:()=>p.refetch()}),children:[p.error?n.jsx(Be,{tone:"error",text:p.error.message}):null,n.jsx(Vi,{alerts:(ct=p.data)==null?void 0:ct.alerts,loading:p.isLoading,now:T})]})]}),n.jsxs("section",{className:"grid gap-4 xl:grid-cols-3",children:[n.jsx(Ee,{title:"Runtime percentiles",children:n.jsx(Qs,{label:"runtime",values:(Y=h.data)==null?void 0:Y.metrics.runtime_seconds})}),n.jsx(Ee,{title:"Jobs per day",children:n.jsx(Hi,{values:(gs=h.data)==null?void 0:gs.metrics.by_created_day,loading:h.isLoading,totalJobs:Ji(O)})}),n.jsx(Ee,{title:"Queue wait percentiles",children:n.jsx(Qs,{label:"queue wait",values:(bs=h.data)==null?void 0:bs.metrics.queue_wait_seconds})})]})]})})]})}function Ii({jobId:e,detail:t,onRefresh:s}){return n.jsxs("div",{className:"grid min-w-0 gap-3 sm:gap-4",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("a",{className:"inline-flex h-9 items-center gap-2 rounded-md border border-border px-3 text-sm font-semibold text-foreground hover:bg-slate-50",href:"/",children:[n.jsx(Mn,{className:"h-4 w-4","aria-hidden":!0}),"Dashboard"]}),n.jsx(At,{onClick:s})]}),n.jsx(Ee,{title:`Job #${e}`,className:"p-3 sm:p-4",children:t})]})}function Li({selectedJobId:e,selectedJob:t,loading:s,error:r,session:i,sessionEvents:o,transcript:c,now:l}){return t?n.jsx(Ki,{job:t,session:i,sessionEvents:o,transcript:c,now:l}):e!==null&&s?n.jsx(U,{text:"Loading selected job..."}):e!==null&&r?n.jsx(Be,{tone:"error",text:`Job #${e}: ${r.message}`}):n.jsx(U,{text:"Select a job to inspect its timeline, worklog and GitHub links."})}function Di({user:e,loading:t}){const s=e!=null&&e.login?`@${e.login}`:t?"Loading profile...":"GitHub OAuth",r=e!=null&&e.avatar_url?n.jsx("img",{className:"h-10 w-10 rounded-full border border-slate-700 bg-slate-800",src:e.avatar_url,alt:e.login?`${e.login} avatar`:"",referrerPolicy:"no-referrer"}):n.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full border border-slate-700 bg-slate-900",children:n.jsx(Et,{className:"h-5 w-5","aria-hidden":!0})}),i=e!=null&&e.html_url?n.jsx("a",{className:"truncate font-semibold text-white hover:underline",href:bt(e.html_url),rel:"noreferrer",target:"_blank",children:s}):n.jsx("div",{className:"truncate font-semibold text-white",children:s});return n.jsxs("div",{className:"flex max-w-full shrink-0 items-center gap-3 text-sm text-slate-300","aria-label":e!=null&&e.login?`Signed in as ${e.login}`:"Dashboard account",children:[n.jsx(Dn,{className:"hidden h-4 w-4 shrink-0 sm:block","aria-hidden":!0}),n.jsxs("div",{className:"hidden min-w-0 text-right sm:block",children:[i,n.jsx("div",{className:"text-xs text-slate-400",children:"Signed in · read-only"})]}),r]})}function qi({count:e,limit:t,loading:s,onRefresh:r}){return n.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 rounded-lg border border-border bg-white px-3 py-3 shadow-sm md:px-4",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("h2",{className:"text-base font-semibold",children:"Jobs"}),n.jsx("p",{className:"text-xs text-muted",children:s?"Refreshing latest jobs...":`Showing ${e} of the latest ${t} requested jobs`})]}),n.jsx(At,{onClick:r,compactOnMobile:!0})]})}function Ee({title:e,action:t,children:s,className:r,flushHeader:i=!1}){return n.jsxs("section",{className:re("min-w-0 rounded-lg border border-border bg-panel p-4 shadow-sm",r),children:[n.jsxs("div",{className:re("flex items-center justify-between gap-3",!i&&"mb-4"),children:[n.jsx("h2",{className:"text-sm font-semibold",children:e}),t]}),s]})}function Pt({title:e,value:t,icon:s}){return n.jsxs("div",{className:"rounded-lg border border-border bg-panel p-3 shadow-sm md:p-4",children:[n.jsxs("div",{className:"flex items-center justify-between text-muted",children:[n.jsx("span",{className:"text-sm font-medium",children:e}),s]}),n.jsx("strong",{className:"mt-3 block text-2xl leading-none md:mt-4 md:text-3xl",children:t})]})}function Qi({filters:e,actorOptions:t,onChange:s}){const[r,i]=J.useState(e);return J.useEffect(()=>i(e),[e]),n.jsxs("details",{className:"my-3 rounded-md border border-border bg-slate-50/70",children:[n.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 px-3 py-2 text-sm font-semibold marker:hidden",children:[n.jsxs("span",{className:"inline-flex items-center gap-2",children:[n.jsx(Tn,{className:"h-4 w-4 text-muted","aria-hidden":!0}),"Filters"]}),n.jsx(pr,{className:"h-4 w-4 text-muted","aria-hidden":!0})]}),n.jsxs("form",{className:"grid gap-3 border-t border-border bg-white p-3 md:grid-cols-3 xl:grid-cols-8",onSubmit:o=>{o.preventDefault(),s(r)},children:[n.jsx(Ge,{label:"Status",children:n.jsxs("select",{className:"control",value:r.status,onChange:o=>i({...r,status:o.target.value}),children:[n.jsx("option",{value:"",children:"All"}),n.jsx("option",{value:"pending",children:"pending"}),n.jsx("option",{value:"running",children:"running"}),n.jsx("option",{value:"blocked",children:"blocked"}),n.jsx("option",{value:"done",children:"done"}),n.jsx("option",{value:"denied",children:"denied"}),n.jsx("option",{value:"waiting_approval",children:"waiting_approval"})]})}),n.jsx(Ge,{label:"Repository",children:n.jsx("input",{className:"control",value:r.repo,placeholder:"owner/repo",onChange:o=>i({...r,repo:o.target.value})})}),n.jsx(Ge,{label:"Thread",children:n.jsx("input",{className:"control",value:r.thread,inputMode:"numeric",placeholder:"issue or PR",onChange:o=>i({...r,thread:o.target.value})})}),n.jsx(Ge,{label:"Action",children:n.jsx("input",{className:"control",value:r.action,placeholder:"reply_comment",onChange:o=>i({...r,action:o.target.value})})}),n.jsx(Ge,{label:"Actor",className:"xl:col-span-2",children:n.jsx($i,{value:r.actor,options:t,onChange:o=>i({...r,actor:o})})}),n.jsx(Ge,{label:"Intent",children:n.jsxs("select",{className:"control",value:r.intent,onChange:o=>i({...r,intent:o.target.value}),children:[n.jsx("option",{value:"",children:"All"}),n.jsx("option",{value:"review_only",children:"review_only"}),n.jsx("option",{value:"work_allowed",children:"work_allowed"})]})}),n.jsxs("button",{className:"inline-flex h-9 items-center justify-center gap-2 self-end rounded-md bg-primary px-3 text-sm font-semibold text-white",type:"submit",children:[n.jsx(Ln,{className:"h-4 w-4","aria-hidden":!0}),"Apply"]})]})]})}function $i({value:e,options:t,onChange:s}){const[r,i]=J.useState(!1),o=e.trim().replace(/^@/,"").toLowerCase(),c=t.filter(d=>!o||d.login.toLowerCase().includes(o)).slice(0,8),l=t.find(d=>d.login.toLowerCase()===o);return n.jsxs("div",{className:"relative min-w-0",children:[n.jsxs("div",{className:"control flex items-center gap-2 px-2",children:[l?n.jsx("img",{className:"h-5 w-5 shrink-0 rounded-full bg-slate-100",src:bt(l.avatar_url??""),alt:`${l.login} avatar`,referrerPolicy:"no-referrer"}):n.jsx(Et,{className:"h-4 w-4 shrink-0 text-muted","aria-hidden":!0}),n.jsx("input",{className:"min-w-0 flex-1 bg-transparent font-mono text-sm outline-none",value:e,placeholder:"@login",onChange:d=>{s(d.target.value),i(!0)},onFocus:()=>i(!0),onBlur:()=>window.setTimeout(()=>i(!1),100)}),e?n.jsx("button",{className:"rounded-sm p-1 text-muted hover:bg-slate-100",type:"button","aria-label":"Clear actor filter",onClick:()=>s(""),children:n.jsx(Qn,{className:"h-3.5 w-3.5","aria-hidden":!0})}):null]}),r&&c.length>0?n.jsx("div",{className:"absolute left-0 right-0 z-20 mt-1 max-h-72 overflow-auto rounded-md border border-border bg-white p-1 shadow-lg",children:c.map(d=>n.jsxs("button",{className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left hover:bg-slate-50",type:"button",onMouseDown:u=>u.preventDefault(),onClick:()=>{s(d.login),i(!1)},children:[d.avatar_url?n.jsx("img",{className:"h-6 w-6 shrink-0 rounded-full bg-slate-100",src:bt(d.avatar_url),alt:`${d.login} avatar`,referrerPolicy:"no-referrer"}):n.jsx(Et,{className:"h-5 w-5 shrink-0 text-muted","aria-hidden":!0}),n.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",children:["@",d.login]}),n.jsx("span",{className:"shrink-0 rounded-full bg-slate-100 px-1.5 py-0.5 text-[10px] font-semibold text-muted",children:d.job_count})]},d.login))}):null]})}function Ge({label:e,children:t,className:s}){return n.jsxs("label",{className:re("grid min-w-0 gap-1 text-xs font-semibold text-muted",s),children:[e,t]})}function Ui({jobs:e,loading:t,onViewJob:s,now:r}){return t&&e.length===0?n.jsx(U,{text:"Loading jobs..."}):e.length===0?n.jsx(U,{text:"No jobs match the current filters."}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"grid gap-2 md:hidden",children:e.map(i=>n.jsx(zi,{job:i,onViewJob:s,now:r},i.id))}),n.jsx("div",{className:"hidden max-h-[640px] overflow-auto rounded-md border border-border md:block",children:n.jsxs("table",{className:"min-w-full border-collapse text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"sticky top-0 border-b border-border bg-panel text-left text-xs text-muted",children:[n.jsx("th",{className:"px-2 py-2 font-semibold",children:"ID"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Status"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Repo / thread"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Action"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Actor"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Attempts"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Queue wait"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Runtime"}),n.jsx("th",{className:"px-2 py-2 font-semibold",children:"Updated"})]})}),n.jsx("tbody",{children:e.map(i=>n.jsxs("tr",{className:"cursor-pointer border-b border-border hover:bg-slate-50",onClick:()=>s(i.id),children:[n.jsxs("td",{className:"px-2 py-3 font-mono",children:["#",i.id]}),n.jsx("td",{className:"px-2 py-3",children:n.jsx(xs,{status:i.status})}),n.jsxs("td",{className:"px-2 py-3",children:[n.jsx("div",{className:"font-mono",children:i.repo??i.work_key}),n.jsxs("div",{className:"text-xs text-muted",children:["thread ",i.thread??"n/a"]})]}),n.jsxs("td",{className:"px-2 py-3",children:[n.jsx("div",{children:i.action}),n.jsx("div",{className:"text-xs text-muted",children:i.intent})]}),n.jsx("td",{className:"px-2 py-3",children:n.jsx(ps,{actor:i.trigger_actor,avatarUrl:i.trigger_actor_avatar_url})}),n.jsx("td",{className:"px-2 py-3",children:i.attempts}),n.jsx("td",{className:"px-2 py-3",children:ne(ms(i,r))}),n.jsx("td",{className:"px-2 py-3",children:ne(fs(i,r))}),n.jsx("td",{className:"px-2 py-3 font-mono text-xs",children:n.jsx(pe,{value:i.updated_at,compact:!0,relative:!0,now:r})})]},i.id))})]})})]})}function zi({job:e,onViewJob:t,now:s}){return n.jsx("article",{className:"rounded-md border border-border bg-white shadow-[0_1px_0_rgba(15,23,42,0.03)]",children:n.jsxs("button",{className:"grid w-full gap-2 p-3 text-left hover:bg-slate-50",type:"button",onClick:()=>t(e.id),children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsxs("div",{className:"min-w-0 space-y-1",children:[n.jsxs("div",{className:"grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-2",children:[n.jsxs("span",{className:"shrink-0 font-mono text-xs font-semibold text-muted",children:["#",e.id]}),n.jsx("span",{className:"truncate font-mono text-sm",children:e.repo??e.work_key})]}),n.jsx("div",{className:"line-clamp-2 text-sm leading-snug text-foreground",children:e.subject}),n.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted",children:[n.jsxs("span",{children:["thread ",e.thread??"n/a"," · ",e.action]}),n.jsx(ps,{actor:e.trigger_actor,avatarUrl:e.trigger_actor_avatar_url})]})]}),n.jsx(xs,{status:e.status})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[n.jsx(ee,{label:"Wait",value:ne(ms(e,s))}),n.jsx(ee,{label:"Runtime",value:ne(fs(e,s))}),n.jsx(ee,{label:"Updated",value:n.jsx(pe,{value:e.updated_at,compact:!0,relative:!0,now:s})})]})]})})}function ps({actor:e,avatarUrl:t,framed:s=!1}){const r=t?n.jsx("img",{className:"h-4 w-4 shrink-0 rounded-full bg-slate-100",src:bt(t),alt:e?`${e} avatar`:"",referrerPolicy:"no-referrer"}):n.jsx(Et,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),i=n.jsxs(n.Fragment,{children:[r,n.jsx("span",{className:"min-w-0 truncate",children:e?`@${e}`:"unknown actor"})]});return s?n.jsx("span",{className:"inline-flex h-7 max-w-full items-center gap-1 rounded-md border border-border px-2 text-xs font-semibold text-muted",children:i}):n.jsx("span",{className:"inline-flex min-w-0 max-w-full items-center gap-1 font-mono text-xs text-muted",children:i})}function Ki({job:e,session:t,sessionEvents:s,transcript:r,now:i,compact:o=!1}){var b;const c=Cr(e.id),l=s??[],d=r??[],u=_i(l),h=Pi(d),y=fs(e,i),j=ms(e,i);return n.jsxs("div",{className:"grid min-w-0 gap-4",children:[n.jsxs("div",{className:"grid gap-2",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(xs,{status:e.status}),n.jsxs("a",{className:"inline-flex h-7 items-center gap-1 rounded-md border border-border px-2 text-xs font-semibold text-foreground hover:bg-slate-50",href:c,children:[n.jsx(An,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Job #",e.id]}),n.jsx(ps,{actor:e.trigger_actor,avatarUrl:e.trigger_actor_avatar_url,framed:!0})]}),n.jsx("div",{className:"min-w-0 break-words font-mono text-sm [overflow-wrap:anywhere]",children:e.work_key}),n.jsx("p",{className:"min-w-0 break-words text-sm text-muted [overflow-wrap:anywhere]",children:e.subject})]}),n.jsxs("div",{className:re("grid gap-2 text-sm sm:gap-3",o?"grid-cols-1":"grid-cols-3"),children:[n.jsx(ee,{label:"Queue wait",value:ne(j)}),n.jsx(ee,{label:e.status==="running"?"Running for":"Runtime",value:ne(y)}),n.jsx(ee,{label:"Coalesced",value:String(e.coalesced_count)})]}),n.jsxs("div",{className:re("grid gap-2 text-sm sm:gap-3",o?"grid-cols-1":"grid-cols-2 xl:grid-cols-4"),children:[n.jsx(ee,{label:"Created",value:n.jsx(pe,{value:e.created_at,compact:!0,relative:!0,now:i})}),n.jsx(ee,{label:"Started",value:e.started_at?n.jsx(pe,{value:e.started_at,compact:!0,relative:!0,now:i}):"n/a"}),n.jsx(ee,{label:"Updated",value:n.jsx(pe,{value:e.updated_at,compact:!0,relative:!0,now:i})}),n.jsx(ee,{label:"Finished",value:e.finished_at?n.jsx(pe,{value:e.finished_at,compact:!0,relative:!0,now:i}):"n/a"})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"mb-2 text-sm font-semibold",children:"Timeline"}),n.jsx("div",{className:"grid min-w-0 gap-3",children:(e.worklog??[]).length>0?(b=e.worklog)==null?void 0:b.map(x=>n.jsxs("div",{className:"min-w-0 border-l-2 border-primary pl-3",children:[n.jsx("div",{className:"text-sm font-semibold",children:x.phase}),n.jsx("div",{className:"font-mono text-xs text-muted",children:n.jsx(pe,{value:x.ts,relative:!0,now:i})}),n.jsx("div",{className:"break-words text-sm [overflow-wrap:anywhere]",children:x.summary}),x.detail?n.jsx("div",{className:"mt-1 break-words font-mono text-xs text-muted [overflow-wrap:anywhere]",children:x.detail}):null]},x.id)):n.jsx(U,{text:"No worklog entries."})})]}),n.jsxs("div",{children:[n.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[n.jsx(qn,{className:"h-4 w-4","aria-hidden":!0}),"OpenClaw session"]}),t?n.jsxs("div",{className:"grid gap-3",children:[n.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[n.jsx(ee,{label:"Session ID",value:t.id}),n.jsx(ee,{label:"Source",value:t.source})]}),n.jsx("p",{className:"break-words text-xs text-muted [overflow-wrap:anywhere]",children:t.detail})]}):n.jsx(U,{text:"Session correlation is loading."})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"mb-2 text-sm font-semibold",children:"Agent activity"}),n.jsx("div",{className:"grid max-h-[460px] min-w-0 gap-2 overflow-auto pr-1",children:u.length>0?u.map((x,p)=>n.jsx(Bi,{event:x,defaultOpen:Ls(x.eventType,e.status==="running",p,u.length),now:i},x.id)):n.jsx(U,{text:e.status==="running"?"Waiting for live agent output...":"No agent activity has been recorded for this session."})})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"mb-2 text-sm font-semibold",children:"Session transcript"}),n.jsx("div",{className:"grid max-h-[620px] min-w-0 gap-2 overflow-auto pr-1",children:h.length>0?h.map((x,p)=>n.jsx(Gi,{entry:x,defaultOpen:Ls(x.kind,e.status==="running",p,h.length),now:i},x.id)):n.jsx(U,{text:e.status==="running"?"Waiting for live transcript entries...":"No OpenClaw transcript entries are available for this session."})})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"mb-2 text-sm font-semibold",children:"GitHub links"}),n.jsx("ul",{className:"grid gap-2 text-sm",children:e.github_urls.length>0?e.github_urls.map(x=>n.jsx("li",{children:n.jsxs("a",{className:"break-all text-primary hover:underline [overflow-wrap:anywhere]",href:bt(x),rel:"noreferrer",target:"_blank",children:[n.jsx(Fn,{className:"mr-1 inline h-3.5 w-3.5 align-[-2px]","aria-hidden":!0}),x]})},x)):n.jsx("li",{className:"text-muted",children:"No links recorded."})})]})]})}function Gi({entry:e,defaultOpen:t,now:s}){return n.jsx(Sr,{badge:e.badge,meta:n.jsx(pe,{value:e.meta,relative:!0,now:s}),count:e.count,summary:e.summary,defaultOpen:t,children:n.jsx("pre",{className:"max-h-72 max-w-full overflow-auto whitespace-pre-wrap break-words rounded bg-slate-950 px-2 py-1.5 font-mono text-xs leading-relaxed text-slate-100 [overflow-wrap:anywhere]",children:e.text})})}function Bi({event:e,defaultOpen:t,now:s}){return n.jsx(Sr,{badge:e.badge,meta:n.jsx(pe,{value:e.meta,relative:!0,now:s}),count:e.count,summary:e.summary,defaultOpen:t,children:e.detail?n.jsx("pre",{className:"max-h-56 max-w-full overflow-auto whitespace-pre-wrap break-words rounded bg-slate-950 px-2 py-1.5 font-mono text-xs leading-relaxed text-slate-100 [overflow-wrap:anywhere]",children:e.detail}):null})}function Sr({badge:e,meta:t,count:s,summary:r,defaultOpen:i,children:o}){const[c,l]=J.useState(!!i);return n.jsxs("details",{className:"group min-w-0 rounded border border-border bg-slate-50/60",open:c,onToggle:d=>l(d.currentTarget.open),children:[n.jsxs("summary",{className:"grid cursor-pointer list-none gap-1 px-2 py-1.5 marker:hidden hover:bg-white",children:[n.jsxs("div",{className:"grid min-w-0 gap-1 sm:flex sm:items-center sm:justify-between sm:gap-2",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[n.jsx(pr,{className:"h-3.5 w-3.5 shrink-0 text-muted transition-transform group-open:rotate-180","aria-hidden":!0}),n.jsx("span",{className:"truncate font-mono text-[11px] font-semibold text-muted",children:e}),s&&s>1?n.jsx("span",{className:"rounded-sm border border-border px-1 font-mono text-[10px] text-muted",children:s}):null]}),n.jsx("span",{className:"min-w-0 truncate pl-5 font-mono text-[11px] text-muted sm:shrink-0 sm:pl-0",children:t})]}),n.jsx("div",{className:"min-w-0 break-words pl-5 text-xs text-foreground [overflow-wrap:anywhere] sm:truncate",children:r})]}),n.jsx("div",{className:"min-w-0 border-t border-border bg-white px-2 py-2",children:o})]})}function Qs({label:e,values:t}){const s=[{name:"median",seconds:(t==null?void 0:t.median)??0},{name:"p90",seconds:(t==null?void 0:t.p90)??0},{name:"p99",seconds:(t==null?void 0:t.p99)??0}];return n.jsx("div",{className:"h-56",children:n.jsx(rs,{width:"100%",height:"100%",children:n.jsxs(Ys,{data:s,children:[n.jsx(ns,{strokeDasharray:"3 3"}),n.jsx(is,{dataKey:"name"}),n.jsx(as,{tickFormatter:ne}),n.jsx(os,{formatter:r=>[ne(Number(r)),e]}),n.jsx(er,{dataKey:"seconds",fill:"#0969da",radius:[4,4,0,0]})]})})})}function Hi({values:e,loading:t,totalJobs:s}){const r=Object.entries(e??{}).map(([i,o])=>({day:i,count:o}));return t&&r.length===0?n.jsx(U,{text:"Loading job history..."}):r.length===0?n.jsx(U,{text:s>0?"Job history has no valid creation dates.":"No job history available."}):n.jsx("div",{className:"h-56",children:n.jsx(rs,{width:"100%",height:"100%",children:n.jsxs(Ys,{data:r,children:[n.jsx(ns,{strokeDasharray:"3 3"}),n.jsx(is,{dataKey:"day",minTickGap:16}),n.jsx(as,{allowDecimals:!1}),n.jsx(os,{formatter:i=>[Number(i),"jobs"]}),n.jsx(er,{dataKey:"count",fill:"#16a34a",radius:[4,4,0,0]})]})})})}function Ji(e){return Object.values(e).reduce((t,s)=>t+s,0)}function Wi({data:e,loading:t}){var y,j,b,x,p,g;if(t&&!e)return n.jsx(U,{text:"Loading process activity..."});if(!e)return n.jsx(U,{text:"No process snapshot available."});const s=e.executor.children??[],r=s.flatMap(m=>_r(m)),i=r.reduce((m,k)=>m+k.cpu_ticks,0),o=r.reduce((m,k)=>m+Xi(k),0),c=e.executor.service==="active",l=r.slice(0,8).map(m=>({label:`pid ${m.pid}`,ticks:m.cpu_ticks})),d=(e.samples??[]).map(m=>({label:mt(m.ts),ticks:m.cpu_ticks,io:m.io_bytes,active:m.active_since_last_sample?"active":"quiet"})),u=d.length>0?d:l,h=(y=e.samples)==null?void 0:y[e.samples.length-1];return n.jsxs("div",{className:"grid gap-4",children:[n.jsx("div",{className:"rounded-md border border-slate-200 bg-slate-50 p-3",children:n.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("span",{className:re("inline-flex h-6 items-center rounded-full border px-2 text-xs font-semibold",c?"border-emerald-300 bg-emerald-50 text-emerald-700":"border-slate-300 bg-white text-slate-600"),children:c?"active":"idle"}),n.jsxs("span",{className:"font-mono text-xs text-muted",children:["service ",e.executor.service]})]}),n.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:e.running_jobs.length>0?`${e.running_jobs.length} running job${e.running_jobs.length===1?"":"s"}`:"No running jobs"}),e.running_jobs.length>0?n.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:e.running_jobs.slice(0,4).map(m=>n.jsxs("span",{className:"inline-flex min-h-6 items-center gap-1.5 rounded-full border border-blue-200 bg-white px-2 font-mono text-[11px] font-semibold text-blue-700",children:[n.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-600 animate-live-pulse","aria-hidden":!0}),"#",m.id," ",ne(m.age_seconds)]},m.id))}):null,h?n.jsxs("p",{className:"mt-1 text-xs text-muted",children:["Last persisted sample ",mt(h.ts)," · ",h.active_since_last_sample?"activity observed":`quiet ${ne(h.idle_seconds)}`]}):null,n.jsx("p",{className:"mt-1 text-xs text-muted",children:e.detail})]}),n.jsxs("div",{className:"grid min-w-[190px] grid-cols-3 gap-2 text-center text-xs",children:[n.jsx(Qt,{label:"PID",value:e.executor.pid?String(e.executor.pid):"n/a"}),n.jsx(Qt,{label:"Children",value:String(r.length)}),n.jsx(Qt,{label:"CPU ticks",value:String(i)})]})]})}),n.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[n.jsx(Mt,{label:"Live process",value:((j=e.signals)==null?void 0:j.live_process.state)??(r.length>0?"live":"no_child_process"),detail:`${((b=e.signals)==null?void 0:b.live_process.child_count)??r.length} children`}),n.jsx(Mt,{label:"Process activity",value:((x=e.signals)==null?void 0:x.process_activity.state)??(h!=null&&h.active_since_last_sample?"active":"quiet"),detail:h?`sample ${mt(h.ts)}`:"no sample"}),n.jsx(Mt,{label:"Semantic progress",value:(p=e.signals)!=null&&p.semantic_progress.length?"recent":"none",detail:$s(e.running_jobs,"semantic_progress")}),n.jsx(Mt,{label:"Visible progress",value:(g=e.signals)!=null&&g.visible_progress.length?"streaming":"none",detail:$s(e.running_jobs,"visible_progress")})]}),e.alerts.length>0?n.jsx(Be,{tone:"error",text:e.alerts[0]}):null,n.jsxs("div",{className:"grid gap-4 lg:grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)]",children:[n.jsxs("div",{className:"min-w-0 rounded-md border border-border p-3",children:[n.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[n.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[n.jsx(Fs,{className:"h-4 w-4","aria-hidden":!0}),d.length>0?"CPU history":"CPU ticks"]}),n.jsxs("span",{className:"font-mono text-xs text-muted",children:[Pr(o)," I/O"]})]}),u.length>0?n.jsx("div",{className:"h-40",children:n.jsx(rs,{width:"100%",height:"100%",children:n.jsxs(Fr,{data:u,children:[n.jsx(ns,{strokeDasharray:"3 3"}),n.jsx(is,{dataKey:"label",tick:!1}),n.jsx(as,{allowDecimals:!1,tick:{fontSize:11}}),n.jsx(os,{formatter:m=>[Number(m),"cpu ticks"]}),n.jsx(Tr,{type:"monotone",dataKey:"ticks",stroke:"#0f766e",strokeWidth:2,dot:{r:3},activeDot:{r:5},isAnimationActive:!1})]})})}):n.jsx(U,{text:"No executor CPU samples available."})]}),n.jsxs("div",{className:"min-w-0",children:[n.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[n.jsx(Fs,{className:"h-4 w-4","aria-hidden":!0}),"Executor children"]}),s.length>0?n.jsx("div",{className:"grid gap-2",children:s.map(m=>n.jsx(Rr,{process:m},m.pid))}):n.jsx(U,{text:"No child process detected for the executor."})]})]})]})}function Vi({alerts:e,loading:t,now:s}){if(t&&!e)return n.jsx(U,{text:"Loading monitor alerts..."});const r=e??[];return r.length===0?n.jsx(U,{text:"No active monitor alerts."}):n.jsx("div",{className:"grid gap-2",children:r.slice(0,5).map(i=>n.jsxs("div",{className:"rounded-md border border-red-200 bg-red-50 p-2.5",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs font-semibold text-red-700",children:[n.jsx(xr,{className:"h-3.5 w-3.5","aria-hidden":!0}),n.jsx("span",{children:i.severity}),n.jsx("span",{className:"font-normal text-red-600",children:jr(i.last_seen,s)}),i.observations>1?n.jsxs("span",{className:"rounded-full border border-red-200 bg-white px-1.5",children:[i.observations,"x"]}):null]}),n.jsx("p",{className:"mt-1 break-words text-sm font-medium text-red-950 [overflow-wrap:anywhere]",children:i.message})]},i.fingerprint))})}function Rr({process:e}){var r,i;const t=((r=e.io_bytes)==null?void 0:r.read_bytes)??0,s=((i=e.io_bytes)==null?void 0:i.write_bytes)??0;return n.jsxs("div",{className:"rounded-md border border-border bg-white p-2.5",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[n.jsxs("span",{className:"font-mono",children:["pid ",e.pid]}),n.jsxs("span",{className:"rounded-full border border-border px-2 text-xs text-muted",children:["state ",e.state]}),n.jsxs("span",{className:"rounded-full border border-border px-2 text-xs text-muted",children:["cpu ",e.cpu_ticks]}),n.jsxs("span",{className:"rounded-full border border-border px-2 text-xs text-muted",children:["I/O ",Pr(t+s)]})]}),n.jsx("div",{className:"mt-2 break-words font-mono text-xs text-muted",children:e.cmd||"unknown command"}),e.children&&e.children.length>0?n.jsx("div",{className:"mt-3 border-l-2 border-border pl-3",children:e.children.map(o=>n.jsx(Rr,{process:o},o.pid))}):null]})}function Qt({label:e,value:t}){return n.jsxs("div",{className:"rounded-md border border-border bg-white px-2 py-2",children:[n.jsx("div",{className:"font-mono text-sm font-semibold text-foreground",children:t}),n.jsx("div",{className:"mt-0.5 text-[11px] font-semibold uppercase text-muted",children:e})]})}function Mt({label:e,value:t,detail:s}){return n.jsxs("div",{className:"min-w-0 rounded-md border border-border bg-white p-2.5",children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase text-muted",children:e}),n.jsx("div",{className:"mt-1 truncate text-sm font-semibold text-foreground",children:t}),n.jsx("div",{className:"mt-1 truncate font-mono text-[11px] text-muted",children:s})]})}function $s(e,t){const s=e.find(i=>i[t]),r=s==null?void 0:s[t];return!s||!r?"no running heartbeat":`#${s.id} ${r.phase} ${ne(r.age_seconds??null)}`}function _r(e){return[e,...(e.children??[]).flatMap(t=>_r(t))]}function Xi(e){var t,s;return(((t=e.io_bytes)==null?void 0:t.read_bytes)??0)+(((s=e.io_bytes)==null?void 0:s.write_bytes)??0)}function Pr(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function ee({label:e,value:t}){return n.jsxs("div",{className:"min-w-0 rounded-md border border-border p-3",children:[n.jsx("div",{className:"text-xs font-semibold text-muted",children:e}),n.jsx("div",{className:"mt-1 min-w-0 break-words text-sm [overflow-wrap:anywhere]",children:t})]})}function xs({status:e}){const t=Mi(e),s=e==="running"||e==="pending";return n.jsxs("span",{className:re("inline-flex min-h-6 items-center gap-1.5 rounded-full border px-2 text-xs font-semibold",t.badge),children:[n.jsx("span",{className:re("h-2.5 w-2.5 rounded-full",t.dot,s&&"animate-live-pulse"),"aria-hidden":!0}),e]})}function U({text:e}){return n.jsx("div",{className:"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted",children:e})}function Be({tone:e,text:t}){return n.jsx("div",{className:re("rounded-md border p-3 text-sm",e==="error"&&"border-red-300 bg-red-50 text-red-700"),children:t})}function At({onClick:e,compactOnMobile:t=!1}){return n.jsxs("button",{className:re("inline-flex h-8 items-center justify-center gap-2 rounded-md border border-border text-sm font-semibold text-foreground hover:bg-slate-50",t?"w-8 px-0 sm:w-auto sm:px-3":"px-3"),onClick:e,type:"button","aria-label":"Refresh",children:[n.jsx(In,{className:"h-4 w-4","aria-hidden":!0}),n.jsx("span",{className:re(t&&"hidden sm:inline"),children:"Refresh"})]})}const Us=document.getElementById("root");Us&&Qr.createRoot(Us).render(n.jsx(J.StrictMode,{children:n.jsx(mn,{client:yi,children:n.jsx(Ai,{})})})); diff --git a/src/github_agent_bridge/dashboard_static/assets/index-DZ0faviD.css b/src/github_agent_bridge/dashboard_static/assets/index-DZ0faviD.css new file mode 100644 index 0000000..859153d --- /dev/null +++ b/src/github_agent_bridge/dashboard_static/assets/index-DZ0faviD.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{box-sizing:border-box}body{margin:0;min-width:320px;overflow-x:hidden;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;letter-spacing:0}#root{overflow-x:hidden}.animate-live-pulse{animation:live-pulse 1.25s ease-in-out infinite}.control{height:36px;width:100%;border-radius:6px;border:1px solid hsl(214 20% 88%);background:#fff;padding:0 10px;color:#1a222e;font:inherit}.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-20{z-index:20}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.max-h-56{max-height:14rem}.max-h-72{max-height:18rem}.max-h-\[460px\]{max-height:460px}.max-h-\[620px\]{max-height:620px}.max-h-\[640px\]{max-height:640px}.min-h-6{min-height:1.5rem}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[190px\]{min-width:190px}.min-w-full{min-width:100%}.max-w-\[1440px\]{max-width:1440px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.cursor-pointer{cursor:pointer}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[auto_minmax\(0\,1fr\)\]{grid-template-columns:auto minmax(0,1fr)}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.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}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-1{row-gap:.25rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:hsl(214 20% 88% / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-primary{--tw-border-opacity: 1;border-color:hsl(212 92% 42% / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{--tw-bg-opacity: 1;background-color:hsl(210 20% 98% / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-panel{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:hsl(212 92% 42% / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-50\/60{background-color:#f8fafc99}.bg-slate-50\/70{background-color:#f8fafcb3}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-1{padding:.25rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.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}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-5{padding-left:1.25rem}.pr-1{padding-right:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-\[-2px\]{vertical-align:-2px}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{--tw-text-opacity: 1;color:hsl(216 28% 14% / var(--tw-text-opacity, 1))}.text-muted{--tw-text-opacity: 1;color:hsl(215 16% 47% / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:hsl(212 92% 42% / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-950{--tw-text-opacity: 1;color:rgb(69 10 10 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / 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-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.shadow-\[0_1px_0_rgba\(15\,23\,42\,0\.03\)\]{--tw-shadow: 0 1px 0 rgba(15,23,42,.03);--tw-shadow-colored: 0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.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-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}@keyframes live-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.72)}}@media(prefers-reduced-motion:reduce){.animate-live-pulse{animation:none}}.marker\:hidden *::marker{display:none}.marker\:hidden::marker{display:none}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.group[open] .group-open\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media(min-width:640px){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:w-auto{width:auto}.sm\:shrink-0{flex-shrink:0}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:.5rem}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:p-4{padding:1rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:pl-0{padding-left:0}}@media(min-width:768px){.md\:mt-4{margin-top:1rem}.md\:block{display:block}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:p-4{padding:1rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media(min-width:1024px){.lg\:grid-cols-\[minmax\(0\,0\.9fr\)_minmax\(0\,1\.1fr\)\]{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}}@media(min-width:1280px){.xl\:col-span-2{grid-column:span 2 / span 2}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}} diff --git a/src/github_agent_bridge/dashboard_static/assets/index-O_wrzEHH.css b/src/github_agent_bridge/dashboard_static/assets/index-O_wrzEHH.css deleted file mode 100644 index 7921a13..0000000 --- a/src/github_agent_bridge/dashboard_static/assets/index-O_wrzEHH.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{box-sizing:border-box}body{margin:0;min-width:320px;overflow-x:hidden;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;letter-spacing:0}#root{overflow-x:hidden}.animate-live-pulse{animation:live-pulse 1.25s ease-in-out infinite}.control{height:36px;width:100%;border-radius:6px;border:1px solid hsl(214 20% 88%);background:#fff;padding:0 10px;color:#1a222e;font:inherit}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-20{z-index:20}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.max-h-56{max-height:14rem}.max-h-72{max-height:18rem}.max-h-\[460px\]{max-height:460px}.max-h-\[620px\]{max-height:620px}.max-h-\[640px\]{max-height:640px}.min-h-6{min-height:1.5rem}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[190px\]{min-width:190px}.min-w-full{min-width:100%}.max-w-\[1440px\]{max-width:1440px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.cursor-pointer{cursor:pointer}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[auto_minmax\(0\,1fr\)\]{grid-template-columns:auto minmax(0,1fr)}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.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}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-1{row-gap:.25rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.self-end{align-self:flex-end}.overflow-auto{overflow:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:hsl(214 20% 88% / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-primary{--tw-border-opacity: 1;border-color:hsl(212 92% 42% / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{--tw-bg-opacity: 1;background-color:hsl(210 20% 98% / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-panel{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:hsl(212 92% 42% / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-50\/60{background-color:#f8fafc99}.bg-slate-50\/70{background-color:#f8fafcb3}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-1{padding:.25rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.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}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-5{padding-left:1.25rem}.pr-1{padding-right:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-\[-2px\]{vertical-align:-2px}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{--tw-text-opacity: 1;color:hsl(216 28% 14% / var(--tw-text-opacity, 1))}.text-muted{--tw-text-opacity: 1;color:hsl(215 16% 47% / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:hsl(212 92% 42% / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-950{--tw-text-opacity: 1;color:rgb(69 10 10 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / 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-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.shadow-\[0_1px_0_rgba\(15\,23\,42\,0\.03\)\]{--tw-shadow: 0 1px 0 rgba(15,23,42,.03);--tw-shadow-colored: 0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.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-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}@keyframes live-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.72)}}@media(prefers-reduced-motion:reduce){.animate-live-pulse{animation:none}}.marker\:hidden *::marker{display:none}.marker\:hidden::marker{display:none}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.group[open] .group-open\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media(min-width:640px){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:w-auto{width:auto}.sm\:shrink-0{flex-shrink:0}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:.5rem}.sm\:gap-3{gap:.75rem}.sm\:gap-4{gap:1rem}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:p-4{padding:1rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:pl-0{padding-left:0}}@media(min-width:768px){.md\:mt-4{margin-top:1rem}.md\:block{display:block}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:p-4{padding:1rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media(min-width:1024px){.lg\:grid-cols-\[minmax\(0\,0\.9fr\)_minmax\(0\,1\.1fr\)\]{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}}@media(min-width:1280px){.xl\:col-span-2{grid-column:span 2 / span 2}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}} diff --git a/src/github_agent_bridge/dashboard_static/index.html b/src/github_agent_bridge/dashboard_static/index.html index ce0c0ca..f8710f4 100644 --- a/src/github_agent_bridge/dashboard_static/index.html +++ b/src/github_agent_bridge/dashboard_static/index.html @@ -4,9 +4,9 @@ GitHub Agent Bridge Dashboard - + - +