@cartanova/qgrid-cli 1.5.4 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dist/application/qgrid/worker.js +10 -4
- package/bundle/src/application/qgrid/worker.ts +8 -2
- package/bundle/web-dist/client/assets/{index-CiLfNFWG.js → index-DLrkHIo2.js} +2 -2
- package/bundle/web-dist/client/assets/logs-CQDBOCud.js +1 -0
- package/bundle/web-dist/client/assets/{show-DaKh4LaA.js → show--z3WxDb0.js} +1 -1
- package/bundle/web-dist/client/assets/{tokens-FnhMN5oT.js → tokens-Bch6XO9K.js} +1 -1
- package/bundle/web-dist/client/index.html +1 -1
- package/bundle/web-dist/server/assets/{logs-Dcv1XCUK.js → logs-BV6gEe15.js} +26 -6
- package/bundle/web-dist/server/entry-server.generated.js +1 -1
- package/package.json +1 -1
- package/bundle/web-dist/client/assets/logs-9Q-LQWWo.js +0 -1
|
@@ -8,7 +8,7 @@ import { mkdirSync } from "node:fs";
|
|
|
8
8
|
*
|
|
9
9
|
* 기존 SocratsAI ClaudeCliService에서 추출 + 리팩터:
|
|
10
10
|
* - 토큰/모델을 생성자에서 주입
|
|
11
|
-
* - env allowlist (PATH,
|
|
11
|
+
* - env allowlist (PATH, TMPDIR, CLAUDE_CODE_OAUTH_TOKEN + CLAUDE_CODE_DISABLE_* )
|
|
12
12
|
* - callCount 추적 + maxCalls 도달 시 프로세스 재활용
|
|
13
13
|
* - QuotaError/TimeoutError/ProcessError 구분
|
|
14
14
|
*/
|
|
@@ -44,9 +44,11 @@ var Worker = class {
|
|
|
44
44
|
}
|
|
45
45
|
const env = {
|
|
46
46
|
PATH: process.env.PATH,
|
|
47
|
-
HOME: process.env.HOME,
|
|
48
47
|
TMPDIR: process.env.TMPDIR,
|
|
49
|
-
CLAUDE_CODE_OAUTH_TOKEN: this.config.token
|
|
48
|
+
CLAUDE_CODE_OAUTH_TOKEN: this.config.token,
|
|
49
|
+
CLAUDE_CODE_DISABLE_AUTO_MEMORY: "1",
|
|
50
|
+
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING: "1",
|
|
51
|
+
CLAUDE_CODE_DISABLE_1M_CONTEXT: "1"
|
|
50
52
|
};
|
|
51
53
|
const { cwd } = this.config;
|
|
52
54
|
if (!this.cwdCreated) {
|
|
@@ -62,6 +64,10 @@ var Worker = class {
|
|
|
62
64
|
"--verbose",
|
|
63
65
|
"--max-turns",
|
|
64
66
|
"1",
|
|
67
|
+
"--permission-mode",
|
|
68
|
+
"bypassPermissions",
|
|
69
|
+
"--setting-sources",
|
|
70
|
+
"project",
|
|
65
71
|
"--model",
|
|
66
72
|
this.config.model
|
|
67
73
|
], {
|
|
@@ -180,4 +186,4 @@ var Worker = class {
|
|
|
180
186
|
//#endregion
|
|
181
187
|
export { Worker };
|
|
182
188
|
|
|
183
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyLmpzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHBsaWNhdGlvbi9xZ3JpZC93b3JrZXIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBXb3JrZXIg4oCUIENsYXVkZSBDTEkgc3RyZWFtLWpzb24g7ZSE66Gc7IS47IqkIO2VmOuCmOulvCDqtIDrpqwuXG4gKlxuICog6riw7KG0IFNvY3JhdHNBSSBDbGF1ZGVDbGlTZXJ2aWNl7JeQ7IScIOy2lOy2nCArIOumrO2Mqe2EsDpcbiAqIC0g7Yag7YGwL+uqqOuNuOydhCDsg53shLHsnpDsl5DshJwg7KO87J6FXG4gKiAtIGVudiBhbGxvd2xpc3QgKFBBVEgsIEhPTUUsIFRNUERJUiwgQ0xBVURFX0NPREVfT0FVVEhfVE9LRU7rp4wpXG4gKiAtIGNhbGxDb3VudCDstpTsoIEgKyBtYXhDYWxscyDrj4Tri6wg7IucIO2UhOuhnOyEuOyKpCDsnqztmZzsmqlcbiAqIC0gUXVvdGFFcnJvci9UaW1lb3V0RXJyb3IvUHJvY2Vzc0Vycm9yIOq1rOu2hFxuICovXG5pbXBvcnQgeyB0eXBlIENoaWxkUHJvY2Vzcywgc3Bhd24gfSBmcm9tIFwibm9kZTpjaGlsZF9wcm9jZXNzXCI7XG5pbXBvcnQgeyBta2RpclN5bmMgfSBmcm9tIFwibm9kZTpmc1wiO1xuXG5pbXBvcnQgeyB0eXBlIENsaVJlc3VsdCwgdHlwZSBRdWVyeUlucHV0IH0gZnJvbSBcIi4vcWdyaWQudHlwZXNcIjtcbmltcG9ydCB7IG1hc2tUb2tlbiwgUHJvY2Vzc0Vycm9yLCBRdW90YUVycm9yLCBUaW1lb3V0RXJyb3IgfSBmcm9tIFwiLi9xZ3JpZC50eXBlc1wiO1xuXG50eXBlIFBlbmRpbmdSZXF1ZXN0ID0ge1xuICByZXNvbHZlOiAodmFsdWU6IENsaVJlc3VsdCkgPT4gdm9pZDtcbiAgcmVqZWN0OiAocmVhc29uOiBFcnJvcikgPT4gdm9pZDtcbiAgdGltZXI6IFJldHVyblR5cGU8dHlwZW9mIHNldFRpbWVvdXQ+O1xufTtcblxuZXhwb3J0IHR5cGUgV29ya2VyQ29uZmlnID0ge1xuICB0b2tlbjogc3RyaW5nO1xuICBtb2RlbDogc3RyaW5nO1xuICB0aW1lb3V0OiBudW1iZXI7XG4gIGN3ZDogc3RyaW5nO1xuICBtYXhDYWxsczogbnVtYmVyO1xufTtcblxuZXhwb3J0IGNsYXNzIFdvcmtlciB7XG4gIHRva2VuSWQ6IHN0cmluZztcbiAgY29uZmlnOiBXb3JrZXJDb25maWc7XG4gIHByb2Nlc3M6IENoaWxkUHJvY2VzcyB8IG51bGwgPSBudWxsO1xuICBidWZmZXIgPSBcIlwiO1xuICBwZW5kaW5nOiBQZW5kaW5nUmVxdWVzdCB8IG51bGwgPSBudWxsO1xuICBzZXNzaW9uSWQ6IHN0cmluZyB8IG51bGwgPSBudWxsO1xuICBxdWV1ZTogQXJyYXk8KCkgPT4gdm9pZD4gPSBbXTtcbiAgY3dkQ3JlYXRlZCA9IGZhbHNlO1xuICBjYWxsQ291bnQgPSAwO1xuICBuZWVkc1JlY3ljbGUgPSBmYWxzZTtcblxuICBjb25zdHJ1Y3Rvcihjb25maWc6IFdvcmtlckNvbmZpZykge1xuICAgIHRoaXMuY29uZmlnID0gY29uZmlnO1xuICAgIHRoaXMudG9rZW5JZCA9IGNvbmZpZy50b2tlbjtcbiAgfVxuXG4gIGdldFF1ZXVlRGVwdGgoKTogbnVtYmVyIHtcbiAgICByZXR1cm4gdGhpcy5xdWV1ZS5sZW5ndGggKyAodGhpcy5wZW5kaW5nID8gMSA6IDApO1xuICB9XG5cbiAgcmVqZWN0UGVuZGluZyhlcnI6IEVycm9yKTogdm9pZCB7XG4gICAgaWYgKCF0aGlzLnBlbmRpbmcpIHJldHVybjtcbiAgICB0aGlzLnBlbmRpbmcucmVqZWN0KGVycik7XG4gICAgY2xlYXJUaW1lb3V0KHRoaXMucGVuZGluZy50aW1lcik7XG4gICAgdGhpcy5wZW5kaW5nID0gbnVsbDtcbiAgfVxuXG4gIGVuc3VyZVByb2Nlc3MoKTogQ2hpbGRQcm9jZXNzIHtcbiAgICBpZiAodGhpcy5wcm9jZXNzICYmIHRoaXMucHJvY2Vzcy5leGl0Q29kZSA9PT0gbnVsbCAmJiAhdGhpcy5uZWVkc1JlY3ljbGUpIHtcbiAgICAgIHJldHVybiB0aGlzLnByb2Nlc3M7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMucHJvY2VzcyAmJiB0aGlzLnByb2Nlc3MuZXhpdENvZGUgPT09IG51bGwpIHtcbiAgICAgIHRoaXMucHJvY2Vzcy5raWxsKCk7XG4gICAgICB0aGlzLnByb2Nlc3MgPSBudWxsO1xuICAgIH1cblxuICAgIGNvbnN0IGVudjogTm9kZUpTLlByb2Nlc3NFbnYgPSB7XG4gICAgICBQQVRIOiBwcm9jZXNzLmVudi5QQVRILFxuICAgICAgSE9NRTogcHJvY2Vzcy5lbnYuSE9NRSxcbiAgICAgIFRNUERJUjogcHJvY2Vzcy5lbnYuVE1QRElSLFxuICAgICAgQ0xBVURFX0NPREVfT0FVVEhfVE9LRU46IHRoaXMuY29uZmlnLnRva2VuLFxuICAgIH07XG5cbiAgICBjb25zdCB7IGN3ZCB9ID0gdGhpcy5jb25maWc7XG4gICAgaWYgKCF0aGlzLmN3ZENyZWF0ZWQpIHtcbiAgICAgIG1rZGlyU3luYyhjd2QsIHsgcmVjdXJzaXZlOiB0cnVlIH0pO1xuICAgICAgdGhpcy5jd2RDcmVhdGVkID0gdHJ1ZTtcbiAgICB9XG5cbiAgICBjb25zdCBjaGlsZCA9IHNwYXduKFxuICAgICAgXCJjbGF1ZGVcIixcbiAgICAgIFtcbiAgICAgICAgXCItcFwiLFxuICAgICAgICBcIi0taW5wdXQtZm9ybWF0XCIsXG4gICAgICAgIFwic3RyZWFtLWpzb25cIixcbiAgICAgICAgXCItLW91dHB1dC1mb3JtYXRcIixcbiAgICAgICAgXCJzdHJlYW0tanNvblwiLFxuICAgICAgICBcIi0tdmVyYm9zZVwiLFxuICAgICAgICBcIi0tbWF4LXR1cm5zXCIsXG4gICAgICAgIFwiMVwiLFxuICAgICAgICBcIi0tbW9kZWxcIixcbiAgICAgICAgdGhpcy5jb25maWcubW9kZWwsXG4gICAgICBdLFxuICAgICAgeyBzdGRpbzogW1wicGlwZVwiLCBcInBpcGVcIiwgXCJpZ25vcmVcIl0sIGVudiwgY3dkIH0sXG4gICAgKTtcblxuICAgIGNoaWxkLnN0ZG91dD8ub24oXCJkYXRhXCIsIChkOiBCdWZmZXIpID0+IHtcbiAgICAgIHRoaXMuYnVmZmVyICs9IGQudG9TdHJpbmcoKTtcbiAgICAgIHRoaXMucHJvY2Vzc0J1ZmZlcigpO1xuICAgIH0pO1xuXG4gICAgY2hpbGQub24oXCJjbG9zZVwiLCAoKSA9PiB7XG4gICAgICB0aGlzLnByb2Nlc3MgPSBudWxsO1xuICAgICAgdGhpcy5yZWplY3RQZW5kaW5nKFxuICAgICAgICBuZXcgUHJvY2Vzc0Vycm9yKGBDTEkgcHJvY2VzcyBjbG9zZWQgKHRva2VuOiAke21hc2tUb2tlbih0aGlzLnRva2VuSWQpfSlgKSxcbiAgICAgICk7XG4gICAgICB0aGlzLmRyYWluUXVldWUoKTtcbiAgICB9KTtcblxuICAgIGNoaWxkLm9uKFwiZXJyb3JcIiwgKGVycikgPT4ge1xuICAgICAgdGhpcy5wcm9jZXNzID0gbnVsbDtcbiAgICAgIHRoaXMucmVqZWN0UGVuZGluZyhcbiAgICAgICAgbmV3IFByb2Nlc3NFcnJvcihgQ0xJIHByb2Nlc3MgZXJyb3I6ICR7ZXJyLm1lc3NhZ2V9ICh0b2tlbjogJHttYXNrVG9rZW4odGhpcy50b2tlbklkKX0pYCksXG4gICAgICApO1xuICAgICAgdGhpcy5kcmFpblF1ZXVlKCk7XG4gICAgfSk7XG5cbiAgICB0aGlzLnByb2Nlc3MgPSBjaGlsZDtcbiAgICB0aGlzLmJ1ZmZlciA9IFwiXCI7XG4gICAgdGhpcy5zZXNzaW9uSWQgPSBudWxsO1xuICAgIHRoaXMuY2FsbENvdW50ID0gMDtcbiAgICB0aGlzLm5lZWRzUmVjeWNsZSA9IGZhbHNlO1xuICAgIHJldHVybiBjaGlsZDtcbiAgfVxuXG4gIHByb2Nlc3NCdWZmZXIoKTogdm9pZCB7XG4gICAgY29uc3QgbGluZXMgPSB0aGlzLmJ1ZmZlci5zcGxpdChcIlxcblwiKTtcbiAgICB0aGlzLmJ1ZmZlciA9IGxpbmVzLnBvcCgpID8/IFwiXCI7XG5cbiAgICBsaW5lc1xuICAgICAgLmZpbHRlcigobGluZSkgPT4gbGluZS50cmltKCkgIT09IFwiXCIpXG4gICAgICAuZm9yRWFjaCgobGluZSkgPT4ge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGogPSBKU09OLnBhcnNlKGxpbmUpO1xuXG4gICAgICAgICAgaWYgKGoudHlwZSA9PT0gXCJzeXN0ZW1cIiAmJiBqLnN1YnR5cGUgPT09IFwiaW5pdFwiICYmIGouc2Vzc2lvbl9pZCkge1xuICAgICAgICAgICAgdGhpcy5zZXNzaW9uSWQgPSBqLnNlc3Npb25faWQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGoudHlwZSA9PT0gXCJyZXN1bHRcIiAmJiB0aGlzLnBlbmRpbmcpIHtcbiAgICAgICAgICAgIGxldCB0ZXh0OiBzdHJpbmcgPSBqLnJlc3VsdCA/PyBcIlwiO1xuICAgICAgICAgICAgdGV4dCA9IHRleHQucmVwbGFjZSgvXmBgYCg/Ompzb24pP1xccypcXG4/L2ksIFwiXCIpLnJlcGxhY2UoL1xcbj9gYGBcXHMqJC9pLCBcIlwiKTtcblxuICAgICAgICAgICAgaWYgKHRleHQuc3RhcnRzV2l0aChcIllvdSd2ZSBoaXRcIikpIHtcbiAgICAgICAgICAgICAgdGhpcy5wZW5kaW5nLnJlamVjdChcbiAgICAgICAgICAgICAgICBuZXcgUXVvdGFFcnJvcihgUXVvdGEgZXhoYXVzdGVkICh0b2tlbjogJHttYXNrVG9rZW4odGhpcy50b2tlbklkKX0pYCksXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLnBlbmRpbmcudGltZXIpO1xuICAgICAgICAgICAgICB0aGlzLnBlbmRpbmcgPSBudWxsO1xuICAgICAgICAgICAgICB0aGlzLmRyYWluUXVldWUoKTtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCB1ID0gai51c2FnZSA/PyB7fTtcbiAgICAgICAgICAgIHRoaXMucGVuZGluZy5yZXNvbHZlKHtcbiAgICAgICAgICAgICAgdGV4dCxcbiAgICAgICAgICAgICAgdXNhZ2U6IHtcbiAgICAgICAgICAgICAgICBpbnB1dF90b2tlbnM6IHUuaW5wdXRfdG9rZW5zID8/IDAsXG4gICAgICAgICAgICAgICAgb3V0cHV0X3Rva2VuczogdS5vdXRwdXRfdG9rZW5zID8/IDAsXG4gICAgICAgICAgICAgICAgY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zOiB1LmNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyA/PyAwLFxuICAgICAgICAgICAgICAgIGNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zOiB1LmNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zID8/IDAsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGR1cmF0aW9uTXM6IGouZHVyYXRpb25fbXMgPz8gMCxcbiAgICAgICAgICAgICAgY29zdFVzZDogai50b3RhbF9jb3N0X3VzZCA/PyAwLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5wZW5kaW5nLnRpbWVyKTtcbiAgICAgICAgICAgIHRoaXMucGVuZGluZyA9IG51bGw7XG4gICAgICAgICAgICB0aGlzLmRyYWluUXVldWUoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2gge1xuICAgICAgICAgIC8vIHNraXAgbm9uLWpzb24gbGluZXNcbiAgICAgICAgfVxuICAgICAgfSk7XG4gIH1cblxuICBkcmFpblF1ZXVlKCk6IHZvaWQge1xuICAgIGlmICh0aGlzLnBlbmRpbmcpIHJldHVybjtcbiAgICBjb25zdCBuZXh0ID0gdGhpcy5xdWV1ZS5zaGlmdCgpO1xuICAgIGlmIChuZXh0KSBuZXh0KCk7XG4gIH1cblxuICBhc3luYyBxdWVyeShpbnB1dDogUXVlcnlJbnB1dCwgdGltZW91dE1zPzogbnVtYmVyKTogUHJvbWlzZTxDbGlSZXN1bHQ+IHtcbiAgICBpZiAodGhpcy5wZW5kaW5nKSB7XG4gICAgICBhd2FpdCBuZXcgUHJvbWlzZTx2b2lkPigocmVzb2x2ZSkgPT4ge1xuICAgICAgICB0aGlzLnF1ZXVlLnB1c2gocmVzb2x2ZSk7XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICBjb25zdCBjaGlsZCA9IHRoaXMuZW5zdXJlUHJvY2VzcygpO1xuICAgIGNvbnN0IHRpbWVvdXQgPSB0aW1lb3V0TXMgPz8gdGhpcy5jb25maWcudGltZW91dDtcblxuICAgIHRoaXMuY2FsbENvdW50Kys7XG4gICAgaWYgKHRoaXMuY2FsbENvdW50ID49IHRoaXMuY29uZmlnLm1heENhbGxzKSB7XG4gICAgICB0aGlzLm5lZWRzUmVjeWNsZSA9IHRydWU7XG4gICAgfVxuXG4gICAgY29uc3QgcHJvbXB0ID0gaW5wdXQuc3lzdGVtID8gYCR7aW5wdXQuc3lzdGVtfVxcblxcbiR7aW5wdXQucHJvbXB0fWAgOiBpbnB1dC5wcm9tcHQ7XG5cbiAgICByZXR1cm4gbmV3IFByb21pc2U8Q2xpUmVzdWx0PigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICBjb25zdCB0aW1lciA9IHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICB0aGlzLnBlbmRpbmcgPSBudWxsO1xuICAgICAgICByZWplY3QoXG4gICAgICAgICAgbmV3IFRpbWVvdXRFcnJvcihgVGltZW91dCBhZnRlciAke3RpbWVvdXQgLyAxMDAwfXMgKHRva2VuOiAke21hc2tUb2tlbih0aGlzLnRva2VuSWQpfSlgKSxcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5raWxsKCk7XG4gICAgICB9LCB0aW1lb3V0KTtcblxuICAgICAgdGhpcy5wZW5kaW5nID0geyByZXNvbHZlLCByZWplY3QsIHRpbWVyIH07XG5cbiAgICAgIGNvbnN0IG1zZyA9IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgdHlwZTogXCJ1c2VyXCIsXG4gICAgICAgIG1lc3NhZ2U6IHsgcm9sZTogXCJ1c2VyXCIsIGNvbnRlbnQ6IHByb21wdCB9LFxuICAgICAgICBzZXNzaW9uX2lkOiB0aGlzLnNlc3Npb25JZCA/PyBcImRlZmF1bHRcIixcbiAgICAgICAgcGFyZW50X3Rvb2xfdXNlX2lkOiBudWxsLFxuICAgICAgfSk7XG5cbiAgICAgIGNoaWxkLnN0ZGluPy53cml0ZShgJHttc2d9XFxuYCk7XG4gICAgfSk7XG4gIH1cblxuICBraWxsKCk6IHZvaWQge1xuICAgIGlmICh0aGlzLnByb2Nlc3MgJiYgdGhpcy5wcm9jZXNzLmV4aXRDb2RlID09PSBudWxsKSB7XG4gICAgICB0aGlzLnByb2Nlc3Mua2lsbCgpO1xuICAgIH1cbiAgICB0aGlzLnByb2Nlc3MgPSBudWxsO1xuICAgIHRoaXMuYnVmZmVyID0gXCJcIjtcbiAgICB0aGlzLnNlc3Npb25JZCA9IG51bGw7XG4gICAgdGhpcy5jYWxsQ291bnQgPSAwO1xuICAgIHRoaXMubmVlZHNSZWN5Y2xlID0gZmFsc2U7XG4gICAgdGhpcy5yZWplY3RQZW5kaW5nKG5ldyBQcm9jZXNzRXJyb3IoYFdvcmtlciBraWxsZWQgKHRva2VuOiAke21hc2tUb2tlbih0aGlzLnRva2VuSWQpfSlgKSk7XG4gICAgdGhpcy5kcmFpblF1ZXVlKCk7XG4gIH1cbn1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUE2QkEsSUFBYSxTQUFiLE1BQW9CO0NBQ2xCO0NBQ0E7Q0FDQSxVQUErQjtDQUMvQixTQUFTO0NBQ1QsVUFBaUM7Q0FDakMsWUFBMkI7Q0FDM0IsUUFBMkIsRUFBRTtDQUM3QixhQUFhO0NBQ2IsWUFBWTtDQUNaLGVBQWU7Q0FFZixZQUFZLFFBQXNCO0FBQ2hDLE9BQUssU0FBUztBQUNkLE9BQUssVUFBVSxPQUFPOztDQUd4QixnQkFBd0I7QUFDdEIsU0FBTyxLQUFLLE1BQU0sVUFBVSxLQUFLLFVBQVUsSUFBSTs7Q0FHakQsY0FBYyxLQUFrQjtBQUM5QixNQUFJLENBQUMsS0FBSyxRQUFTO0FBQ25CLE9BQUssUUFBUSxPQUFPLElBQUk7QUFDeEIsZUFBYSxLQUFLLFFBQVEsTUFBTTtBQUNoQyxPQUFLLFVBQVU7O0NBR2pCLGdCQUE4QjtBQUM1QixNQUFJLEtBQUssV0FBVyxLQUFLLFFBQVEsYUFBYSxRQUFRLENBQUMsS0FBSyxhQUMxRCxRQUFPLEtBQUs7QUFHZCxNQUFJLEtBQUssV0FBVyxLQUFLLFFBQVEsYUFBYSxNQUFNO0FBQ2xELFFBQUssUUFBUSxNQUFNO0FBQ25CLFFBQUssVUFBVTs7RUFHakIsTUFBTSxNQUF5QjtHQUM3QixNQUFNLFFBQVEsSUFBSTtHQUNsQixNQUFNLFFBQVEsSUFBSTtHQUNsQixRQUFRLFFBQVEsSUFBSTtHQUNwQix5QkFBeUIsS0FBSyxPQUFPO0dBQ3RDO0VBRUQsTUFBTSxFQUFFLFFBQVEsS0FBSztBQUNyQixNQUFJLENBQUMsS0FBSyxZQUFZO0FBQ3BCLGFBQVUsS0FBSyxFQUFFLFdBQVcsTUFBTSxDQUFDO0FBQ25DLFFBQUssYUFBYTs7RUFHcEIsTUFBTSxRQUFRLE1BQ1osVUFDQTtHQUNFO0dBQ0E7R0FDQTtHQUNBO0dBQ0E7R0FDQTtHQUNBO0dBQ0E7R0FDQTtHQUNBLEtBQUssT0FBTztHQUNiLEVBQ0Q7R0FBRSxPQUFPO0lBQUM7SUFBUTtJQUFRO0lBQVM7R0FBRTtHQUFLO0dBQUssQ0FDaEQ7QUFFRCxRQUFNLFFBQVEsR0FBRyxTQUFTLE1BQWM7QUFDdEMsUUFBSyxVQUFVLEVBQUUsVUFBVTtBQUMzQixRQUFLLGVBQWU7SUFDcEI7QUFFRixRQUFNLEdBQUcsZUFBZTtBQUN0QixRQUFLLFVBQVU7QUFDZixRQUFLLGNBQ0gsSUFBSSxhQUFhLDhCQUE4QixVQUFVLEtBQUssUUFBUSxDQUFDLEdBQUcsQ0FDM0U7QUFDRCxRQUFLLFlBQVk7SUFDakI7QUFFRixRQUFNLEdBQUcsVUFBVSxRQUFRO0FBQ3pCLFFBQUssVUFBVTtBQUNmLFFBQUssY0FDSCxJQUFJLGFBQWEsc0JBQXNCLElBQUksUUFBUSxXQUFXLFVBQVUsS0FBSyxRQUFRLENBQUMsR0FBRyxDQUMxRjtBQUNELFFBQUssWUFBWTtJQUNqQjtBQUVGLE9BQUssVUFBVTtBQUNmLE9BQUssU0FBUztBQUNkLE9BQUssWUFBWTtBQUNqQixPQUFLLFlBQVk7QUFDakIsT0FBSyxlQUFlO0FBQ3BCLFNBQU87O0NBR1QsZ0JBQXNCO0VBQ3BCLE1BQU0sUUFBUSxLQUFLLE9BQU8sTUFBTSxLQUFLO0FBQ3JDLE9BQUssU0FBUyxNQUFNLEtBQUssSUFBSTtBQUU3QixRQUNHLFFBQVEsU0FBUyxLQUFLLE1BQU0sS0FBSyxHQUFHLENBQ3BDLFNBQVMsU0FBUztBQUNqQixPQUFJO0lBQ0YsTUFBTSxJQUFJLEtBQUssTUFBTSxLQUFLO0FBRTFCLFFBQUksRUFBRSxTQUFTLFlBQVksRUFBRSxZQUFZLFVBQVUsRUFBRSxXQUNuRCxNQUFLLFlBQVksRUFBRTtBQUdyQixRQUFJLEVBQUUsU0FBUyxZQUFZLEtBQUssU0FBUztLQUN2QyxJQUFJLE9BQWUsRUFBRSxVQUFVO0FBQy9CLFlBQU8sS0FBSyxRQUFRLHdCQUF3QixHQUFHLENBQUMsUUFBUSxlQUFlLEdBQUc7QUFFMUUsU0FBSSxLQUFLLFdBQVcsYUFBYSxFQUFFO0FBQ2pDLFdBQUssUUFBUSxPQUNYLElBQUksV0FBVywyQkFBMkIsVUFBVSxLQUFLLFFBQVEsQ0FBQyxHQUFHLENBQ3RFO0FBQ0QsbUJBQWEsS0FBSyxRQUFRLE1BQU07QUFDaEMsV0FBSyxVQUFVO0FBQ2YsV0FBSyxZQUFZO0FBQ2pCOztLQUdGLE1BQU0sSUFBSSxFQUFFLFNBQVMsRUFBRTtBQUN2QixVQUFLLFFBQVEsUUFBUTtNQUNuQjtNQUNBLE9BQU87T0FDTCxjQUFjLEVBQUUsZ0JBQWdCO09BQ2hDLGVBQWUsRUFBRSxpQkFBaUI7T0FDbEMsNkJBQTZCLEVBQUUsK0JBQStCO09BQzlELHlCQUF5QixFQUFFLDJCQUEyQjtPQUN2RDtNQUNELFlBQVksRUFBRSxlQUFlO01BQzdCLFNBQVMsRUFBRSxrQkFBa0I7TUFDOUIsQ0FBQztBQUNGLGtCQUFhLEtBQUssUUFBUSxNQUFNO0FBQ2hDLFVBQUssVUFBVTtBQUNmLFVBQUssWUFBWTs7V0FFYjtJQUdSOztDQUdOLGFBQW1CO0FBQ2pCLE1BQUksS0FBSyxRQUFTO0VBQ2xCLE1BQU0sT0FBTyxLQUFLLE1BQU0sT0FBTztBQUMvQixNQUFJLEtBQU0sT0FBTTs7Q0FHbEIsTUFBTSxNQUFNLE9BQW1CLFdBQXdDO0FBQ3JFLE1BQUksS0FBSyxRQUNQLE9BQU0sSUFBSSxTQUFlLFlBQVk7QUFDbkMsUUFBSyxNQUFNLEtBQUssUUFBUTtJQUN4QjtFQUdKLE1BQU0sUUFBUSxLQUFLLGVBQWU7RUFDbEMsTUFBTSxVQUFVLGFBQWEsS0FBSyxPQUFPO0FBRXpDLE9BQUs7QUFDTCxNQUFJLEtBQUssYUFBYSxLQUFLLE9BQU8sU0FDaEMsTUFBSyxlQUFlO0VBR3RCLE1BQU0sU0FBUyxNQUFNLFNBQVMsR0FBRyxNQUFNLE9BQU8sTUFBTSxNQUFNLFdBQVcsTUFBTTtBQUUzRSxTQUFPLElBQUksU0FBb0IsU0FBUyxXQUFXO0FBU2pELFFBQUssVUFBVTtJQUFFO0lBQVM7SUFBUSxPQVJwQixpQkFBaUI7QUFDN0IsVUFBSyxVQUFVO0FBQ2YsWUFDRSxJQUFJLGFBQWEsaUJBQWlCLFVBQVUsSUFBSyxZQUFZLFVBQVUsS0FBSyxRQUFRLENBQUMsR0FBRyxDQUN6RjtBQUNELFVBQUssTUFBTTtPQUNWLFFBQVE7SUFFOEI7R0FFekMsTUFBTSxNQUFNLEtBQUssVUFBVTtJQUN6QixNQUFNO0lBQ04sU0FBUztLQUFFLE1BQU07S0FBUSxTQUFTO0tBQVE7SUFDMUMsWUFBWSxLQUFLLGFBQWE7SUFDOUIsb0JBQW9CO0lBQ3JCLENBQUM7QUFFRixTQUFNLE9BQU8sTUFBTSxHQUFHLElBQUksSUFBSTtJQUM5Qjs7Q0FHSixPQUFhO0FBQ1gsTUFBSSxLQUFLLFdBQVcsS0FBSyxRQUFRLGFBQWEsS0FDNUMsTUFBSyxRQUFRLE1BQU07QUFFckIsT0FBSyxVQUFVO0FBQ2YsT0FBSyxTQUFTO0FBQ2QsT0FBSyxZQUFZO0FBQ2pCLE9BQUssWUFBWTtBQUNqQixPQUFLLGVBQWU7QUFDcEIsT0FBSyxjQUFjLElBQUksYUFBYSx5QkFBeUIsVUFBVSxLQUFLLFFBQVEsQ0FBQyxHQUFHLENBQUM7QUFDekYsT0FBSyxZQUFZIn0=
|
|
189
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyLmpzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHBsaWNhdGlvbi9xZ3JpZC93b3JrZXIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBXb3JrZXIg4oCUIENsYXVkZSBDTEkgc3RyZWFtLWpzb24g7ZSE66Gc7IS47IqkIO2VmOuCmOulvCDqtIDrpqwuXG4gKlxuICog6riw7KG0IFNvY3JhdHNBSSBDbGF1ZGVDbGlTZXJ2aWNl7JeQ7IScIOy2lOy2nCArIOumrO2Mqe2EsDpcbiAqIC0g7Yag7YGwL+uqqOuNuOydhCDsg53shLHsnpDsl5DshJwg7KO87J6FXG4gKiAtIGVudiBhbGxvd2xpc3QgKFBBVEgsIFRNUERJUiwgQ0xBVURFX0NPREVfT0FVVEhfVE9LRU4gKyBDTEFVREVfQ09ERV9ESVNBQkxFXyogKVxuICogLSBjYWxsQ291bnQg7LaU7KCBICsgbWF4Q2FsbHMg64+E64usIOyLnCDtlITroZzshLjsiqQg7J6s7Zmc7JqpXG4gKiAtIFF1b3RhRXJyb3IvVGltZW91dEVycm9yL1Byb2Nlc3NFcnJvciDqtazrtoRcbiAqL1xuaW1wb3J0IHsgdHlwZSBDaGlsZFByb2Nlc3MsIHNwYXduIH0gZnJvbSBcIm5vZGU6Y2hpbGRfcHJvY2Vzc1wiO1xuaW1wb3J0IHsgbWtkaXJTeW5jIH0gZnJvbSBcIm5vZGU6ZnNcIjtcblxuaW1wb3J0IHsgdHlwZSBDbGlSZXN1bHQsIHR5cGUgUXVlcnlJbnB1dCB9IGZyb20gXCIuL3FncmlkLnR5cGVzXCI7XG5pbXBvcnQgeyBtYXNrVG9rZW4sIFByb2Nlc3NFcnJvciwgUXVvdGFFcnJvciwgVGltZW91dEVycm9yIH0gZnJvbSBcIi4vcWdyaWQudHlwZXNcIjtcblxudHlwZSBQZW5kaW5nUmVxdWVzdCA9IHtcbiAgcmVzb2x2ZTogKHZhbHVlOiBDbGlSZXN1bHQpID0+IHZvaWQ7XG4gIHJlamVjdDogKHJlYXNvbjogRXJyb3IpID0+IHZvaWQ7XG4gIHRpbWVyOiBSZXR1cm5UeXBlPHR5cGVvZiBzZXRUaW1lb3V0Pjtcbn07XG5cbmV4cG9ydCB0eXBlIFdvcmtlckNvbmZpZyA9IHtcbiAgdG9rZW46IHN0cmluZztcbiAgbW9kZWw6IHN0cmluZztcbiAgdGltZW91dDogbnVtYmVyO1xuICBjd2Q6IHN0cmluZztcbiAgbWF4Q2FsbHM6IG51bWJlcjtcbn07XG5cbmV4cG9ydCBjbGFzcyBXb3JrZXIge1xuICB0b2tlbklkOiBzdHJpbmc7XG4gIGNvbmZpZzogV29ya2VyQ29uZmlnO1xuICBwcm9jZXNzOiBDaGlsZFByb2Nlc3MgfCBudWxsID0gbnVsbDtcbiAgYnVmZmVyID0gXCJcIjtcbiAgcGVuZGluZzogUGVuZGluZ1JlcXVlc3QgfCBudWxsID0gbnVsbDtcbiAgc2Vzc2lvbklkOiBzdHJpbmcgfCBudWxsID0gbnVsbDtcbiAgcXVldWU6IEFycmF5PCgpID0+IHZvaWQ+ID0gW107XG4gIGN3ZENyZWF0ZWQgPSBmYWxzZTtcbiAgY2FsbENvdW50ID0gMDtcbiAgbmVlZHNSZWN5Y2xlID0gZmFsc2U7XG5cbiAgY29uc3RydWN0b3IoY29uZmlnOiBXb3JrZXJDb25maWcpIHtcbiAgICB0aGlzLmNvbmZpZyA9IGNvbmZpZztcbiAgICB0aGlzLnRva2VuSWQgPSBjb25maWcudG9rZW47XG4gIH1cblxuICBnZXRRdWV1ZURlcHRoKCk6IG51bWJlciB7XG4gICAgcmV0dXJuIHRoaXMucXVldWUubGVuZ3RoICsgKHRoaXMucGVuZGluZyA/IDEgOiAwKTtcbiAgfVxuXG4gIHJlamVjdFBlbmRpbmcoZXJyOiBFcnJvcik6IHZvaWQge1xuICAgIGlmICghdGhpcy5wZW5kaW5nKSByZXR1cm47XG4gICAgdGhpcy5wZW5kaW5nLnJlamVjdChlcnIpO1xuICAgIGNsZWFyVGltZW91dCh0aGlzLnBlbmRpbmcudGltZXIpO1xuICAgIHRoaXMucGVuZGluZyA9IG51bGw7XG4gIH1cblxuICBlbnN1cmVQcm9jZXNzKCk6IENoaWxkUHJvY2VzcyB7XG4gICAgaWYgKHRoaXMucHJvY2VzcyAmJiB0aGlzLnByb2Nlc3MuZXhpdENvZGUgPT09IG51bGwgJiYgIXRoaXMubmVlZHNSZWN5Y2xlKSB7XG4gICAgICByZXR1cm4gdGhpcy5wcm9jZXNzO1xuICAgIH1cblxuICAgIGlmICh0aGlzLnByb2Nlc3MgJiYgdGhpcy5wcm9jZXNzLmV4aXRDb2RlID09PSBudWxsKSB7XG4gICAgICB0aGlzLnByb2Nlc3Mua2lsbCgpO1xuICAgICAgdGhpcy5wcm9jZXNzID0gbnVsbDtcbiAgICB9XG5cbiAgICBjb25zdCBlbnY6IE5vZGVKUy5Qcm9jZXNzRW52ID0ge1xuICAgICAgUEFUSDogcHJvY2Vzcy5lbnYuUEFUSCxcbiAgICAgIFRNUERJUjogcHJvY2Vzcy5lbnYuVE1QRElSLFxuICAgICAgQ0xBVURFX0NPREVfT0FVVEhfVE9LRU46IHRoaXMuY29uZmlnLnRva2VuLFxuICAgICAgQ0xBVURFX0NPREVfRElTQUJMRV9BVVRPX01FTU9SWTogXCIxXCIsXG4gICAgICBDTEFVREVfQ09ERV9ESVNBQkxFX0FEQVBUSVZFX1RISU5LSU5HOiBcIjFcIixcbiAgICAgIENMQVVERV9DT0RFX0RJU0FCTEVfMU1fQ09OVEVYVDogXCIxXCIsXG4gICAgfTtcblxuICAgIGNvbnN0IHsgY3dkIH0gPSB0aGlzLmNvbmZpZztcbiAgICBpZiAoIXRoaXMuY3dkQ3JlYXRlZCkge1xuICAgICAgbWtkaXJTeW5jKGN3ZCwgeyByZWN1cnNpdmU6IHRydWUgfSk7XG4gICAgICB0aGlzLmN3ZENyZWF0ZWQgPSB0cnVlO1xuICAgIH1cblxuICAgIGNvbnN0IGNoaWxkID0gc3Bhd24oXG4gICAgICBcImNsYXVkZVwiLFxuICAgICAgW1xuICAgICAgICBcIi1wXCIsXG4gICAgICAgIFwiLS1pbnB1dC1mb3JtYXRcIixcbiAgICAgICAgXCJzdHJlYW0tanNvblwiLFxuICAgICAgICBcIi0tb3V0cHV0LWZvcm1hdFwiLFxuICAgICAgICBcInN0cmVhbS1qc29uXCIsXG4gICAgICAgIFwiLS12ZXJib3NlXCIsXG4gICAgICAgIFwiLS1tYXgtdHVybnNcIixcbiAgICAgICAgXCIxXCIsXG4gICAgICAgIFwiLS1wZXJtaXNzaW9uLW1vZGVcIixcbiAgICAgICAgXCJieXBhc3NQZXJtaXNzaW9uc1wiLFxuICAgICAgICBcIi0tc2V0dGluZy1zb3VyY2VzXCIsXG4gICAgICAgIFwicHJvamVjdFwiLFxuICAgICAgICBcIi0tbW9kZWxcIixcbiAgICAgICAgdGhpcy5jb25maWcubW9kZWwsXG4gICAgICBdLFxuICAgICAgeyBzdGRpbzogW1wicGlwZVwiLCBcInBpcGVcIiwgXCJpZ25vcmVcIl0sIGVudiwgY3dkIH0sXG4gICAgKTtcblxuICAgIGNoaWxkLnN0ZG91dD8ub24oXCJkYXRhXCIsIChkOiBCdWZmZXIpID0+IHtcbiAgICAgIHRoaXMuYnVmZmVyICs9IGQudG9TdHJpbmcoKTtcbiAgICAgIHRoaXMucHJvY2Vzc0J1ZmZlcigpO1xuICAgIH0pO1xuXG4gICAgY2hpbGQub24oXCJjbG9zZVwiLCAoKSA9PiB7XG4gICAgICB0aGlzLnByb2Nlc3MgPSBudWxsO1xuICAgICAgdGhpcy5yZWplY3RQZW5kaW5nKFxuICAgICAgICBuZXcgUHJvY2Vzc0Vycm9yKGBDTEkgcHJvY2VzcyBjbG9zZWQgKHRva2VuOiAke21hc2tUb2tlbih0aGlzLnRva2VuSWQpfSlgKSxcbiAgICAgICk7XG4gICAgICB0aGlzLmRyYWluUXVldWUoKTtcbiAgICB9KTtcblxuICAgIGNoaWxkLm9uKFwiZXJyb3JcIiwgKGVycikgPT4ge1xuICAgICAgdGhpcy5wcm9jZXNzID0gbnVsbDtcbiAgICAgIHRoaXMucmVqZWN0UGVuZGluZyhcbiAgICAgICAgbmV3IFByb2Nlc3NFcnJvcihgQ0xJIHByb2Nlc3MgZXJyb3I6ICR7ZXJyLm1lc3NhZ2V9ICh0b2tlbjogJHttYXNrVG9rZW4odGhpcy50b2tlbklkKX0pYCksXG4gICAgICApO1xuICAgICAgdGhpcy5kcmFpblF1ZXVlKCk7XG4gICAgfSk7XG5cbiAgICB0aGlzLnByb2Nlc3MgPSBjaGlsZDtcbiAgICB0aGlzLmJ1ZmZlciA9IFwiXCI7XG4gICAgdGhpcy5zZXNzaW9uSWQgPSBudWxsO1xuICAgIHRoaXMuY2FsbENvdW50ID0gMDtcbiAgICB0aGlzLm5lZWRzUmVjeWNsZSA9IGZhbHNlO1xuICAgIHJldHVybiBjaGlsZDtcbiAgfVxuXG4gIHByb2Nlc3NCdWZmZXIoKTogdm9pZCB7XG4gICAgY29uc3QgbGluZXMgPSB0aGlzLmJ1ZmZlci5zcGxpdChcIlxcblwiKTtcbiAgICB0aGlzLmJ1ZmZlciA9IGxpbmVzLnBvcCgpID8/IFwiXCI7XG5cbiAgICBsaW5lc1xuICAgICAgLmZpbHRlcigobGluZSkgPT4gbGluZS50cmltKCkgIT09IFwiXCIpXG4gICAgICAuZm9yRWFjaCgobGluZSkgPT4ge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGogPSBKU09OLnBhcnNlKGxpbmUpO1xuXG4gICAgICAgICAgaWYgKGoudHlwZSA9PT0gXCJzeXN0ZW1cIiAmJiBqLnN1YnR5cGUgPT09IFwiaW5pdFwiICYmIGouc2Vzc2lvbl9pZCkge1xuICAgICAgICAgICAgdGhpcy5zZXNzaW9uSWQgPSBqLnNlc3Npb25faWQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGoudHlwZSA9PT0gXCJyZXN1bHRcIiAmJiB0aGlzLnBlbmRpbmcpIHtcbiAgICAgICAgICAgIGxldCB0ZXh0OiBzdHJpbmcgPSBqLnJlc3VsdCA/PyBcIlwiO1xuICAgICAgICAgICAgdGV4dCA9IHRleHQucmVwbGFjZSgvXmBgYCg/Ompzb24pP1xccypcXG4/L2ksIFwiXCIpLnJlcGxhY2UoL1xcbj9gYGBcXHMqJC9pLCBcIlwiKTtcblxuICAgICAgICAgICAgaWYgKHRleHQuc3RhcnRzV2l0aChcIllvdSd2ZSBoaXRcIikpIHtcbiAgICAgICAgICAgICAgdGhpcy5wZW5kaW5nLnJlamVjdChcbiAgICAgICAgICAgICAgICBuZXcgUXVvdGFFcnJvcihgUXVvdGEgZXhoYXVzdGVkICh0b2tlbjogJHttYXNrVG9rZW4odGhpcy50b2tlbklkKX0pYCksXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLnBlbmRpbmcudGltZXIpO1xuICAgICAgICAgICAgICB0aGlzLnBlbmRpbmcgPSBudWxsO1xuICAgICAgICAgICAgICB0aGlzLmRyYWluUXVldWUoKTtcbiAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCB1ID0gai51c2FnZSA/PyB7fTtcbiAgICAgICAgICAgIHRoaXMucGVuZGluZy5yZXNvbHZlKHtcbiAgICAgICAgICAgICAgdGV4dCxcbiAgICAgICAgICAgICAgdXNhZ2U6IHtcbiAgICAgICAgICAgICAgICBpbnB1dF90b2tlbnM6IHUuaW5wdXRfdG9rZW5zID8/IDAsXG4gICAgICAgICAgICAgICAgb3V0cHV0X3Rva2VuczogdS5vdXRwdXRfdG9rZW5zID8/IDAsXG4gICAgICAgICAgICAgICAgY2FjaGVfY3JlYXRpb25faW5wdXRfdG9rZW5zOiB1LmNhY2hlX2NyZWF0aW9uX2lucHV0X3Rva2VucyA/PyAwLFxuICAgICAgICAgICAgICAgIGNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zOiB1LmNhY2hlX3JlYWRfaW5wdXRfdG9rZW5zID8/IDAsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGR1cmF0aW9uTXM6IGouZHVyYXRpb25fbXMgPz8gMCxcbiAgICAgICAgICAgICAgY29zdFVzZDogai50b3RhbF9jb3N0X3VzZCA/PyAwLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5wZW5kaW5nLnRpbWVyKTtcbiAgICAgICAgICAgIHRoaXMucGVuZGluZyA9IG51bGw7XG4gICAgICAgICAgICB0aGlzLmRyYWluUXVldWUoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2gge1xuICAgICAgICAgIC8vIHNraXAgbm9uLWpzb24gbGluZXNcbiAgICAgICAgfVxuICAgICAgfSk7XG4gIH1cblxuICBkcmFpblF1ZXVlKCk6IHZvaWQge1xuICAgIGlmICh0aGlzLnBlbmRpbmcpIHJldHVybjtcbiAgICBjb25zdCBuZXh0ID0gdGhpcy5xdWV1ZS5zaGlmdCgpO1xuICAgIGlmIChuZXh0KSBuZXh0KCk7XG4gIH1cblxuICBhc3luYyBxdWVyeShpbnB1dDogUXVlcnlJbnB1dCwgdGltZW91dE1zPzogbnVtYmVyKTogUHJvbWlzZTxDbGlSZXN1bHQ+IHtcbiAgICBpZiAodGhpcy5wZW5kaW5nKSB7XG4gICAgICBhd2FpdCBuZXcgUHJvbWlzZTx2b2lkPigocmVzb2x2ZSkgPT4ge1xuICAgICAgICB0aGlzLnF1ZXVlLnB1c2gocmVzb2x2ZSk7XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICBjb25zdCBjaGlsZCA9IHRoaXMuZW5zdXJlUHJvY2VzcygpO1xuICAgIGNvbnN0IHRpbWVvdXQgPSB0aW1lb3V0TXMgPz8gdGhpcy5jb25maWcudGltZW91dDtcblxuICAgIHRoaXMuY2FsbENvdW50Kys7XG4gICAgaWYgKHRoaXMuY2FsbENvdW50ID49IHRoaXMuY29uZmlnLm1heENhbGxzKSB7XG4gICAgICB0aGlzLm5lZWRzUmVjeWNsZSA9IHRydWU7XG4gICAgfVxuXG4gICAgY29uc3QgcHJvbXB0ID0gaW5wdXQuc3lzdGVtID8gYCR7aW5wdXQuc3lzdGVtfVxcblxcbiR7aW5wdXQucHJvbXB0fWAgOiBpbnB1dC5wcm9tcHQ7XG5cbiAgICByZXR1cm4gbmV3IFByb21pc2U8Q2xpUmVzdWx0PigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICBjb25zdCB0aW1lciA9IHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICB0aGlzLnBlbmRpbmcgPSBudWxsO1xuICAgICAgICByZWplY3QoXG4gICAgICAgICAgbmV3IFRpbWVvdXRFcnJvcihgVGltZW91dCBhZnRlciAke3RpbWVvdXQgLyAxMDAwfXMgKHRva2VuOiAke21hc2tUb2tlbih0aGlzLnRva2VuSWQpfSlgKSxcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5raWxsKCk7XG4gICAgICB9LCB0aW1lb3V0KTtcblxuICAgICAgdGhpcy5wZW5kaW5nID0geyByZXNvbHZlLCByZWplY3QsIHRpbWVyIH07XG5cbiAgICAgIGNvbnN0IG1zZyA9IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgdHlwZTogXCJ1c2VyXCIsXG4gICAgICAgIG1lc3NhZ2U6IHsgcm9sZTogXCJ1c2VyXCIsIGNvbnRlbnQ6IHByb21wdCB9LFxuICAgICAgICBzZXNzaW9uX2lkOiB0aGlzLnNlc3Npb25JZCA/PyBcImRlZmF1bHRcIixcbiAgICAgICAgcGFyZW50X3Rvb2xfdXNlX2lkOiBudWxsLFxuICAgICAgfSk7XG5cbiAgICAgIGNoaWxkLnN0ZGluPy53cml0ZShgJHttc2d9XFxuYCk7XG4gICAgfSk7XG4gIH1cblxuICBraWxsKCk6IHZvaWQge1xuICAgIGlmICh0aGlzLnByb2Nlc3MgJiYgdGhpcy5wcm9jZXNzLmV4aXRDb2RlID09PSBudWxsKSB7XG4gICAgICB0aGlzLnByb2Nlc3Mua2lsbCgpO1xuICAgIH1cbiAgICB0aGlzLnByb2Nlc3MgPSBudWxsO1xuICAgIHRoaXMuYnVmZmVyID0gXCJcIjtcbiAgICB0aGlzLnNlc3Npb25JZCA9IG51bGw7XG4gICAgdGhpcy5jYWxsQ291bnQgPSAwO1xuICAgIHRoaXMubmVlZHNSZWN5Y2xlID0gZmFsc2U7XG4gICAgdGhpcy5yZWplY3RQZW5kaW5nKG5ldyBQcm9jZXNzRXJyb3IoYFdvcmtlciBraWxsZWQgKHRva2VuOiAke21hc2tUb2tlbih0aGlzLnRva2VuSWQpfSlgKSk7XG4gICAgdGhpcy5kcmFpblF1ZXVlKCk7XG4gIH1cbn1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUE2QkEsSUFBYSxTQUFiLE1BQW9CO0NBQ2xCO0NBQ0E7Q0FDQSxVQUErQjtDQUMvQixTQUFTO0NBQ1QsVUFBaUM7Q0FDakMsWUFBMkI7Q0FDM0IsUUFBMkIsRUFBRTtDQUM3QixhQUFhO0NBQ2IsWUFBWTtDQUNaLGVBQWU7Q0FFZixZQUFZLFFBQXNCO0FBQ2hDLE9BQUssU0FBUztBQUNkLE9BQUssVUFBVSxPQUFPOztDQUd4QixnQkFBd0I7QUFDdEIsU0FBTyxLQUFLLE1BQU0sVUFBVSxLQUFLLFVBQVUsSUFBSTs7Q0FHakQsY0FBYyxLQUFrQjtBQUM5QixNQUFJLENBQUMsS0FBSyxRQUFTO0FBQ25CLE9BQUssUUFBUSxPQUFPLElBQUk7QUFDeEIsZUFBYSxLQUFLLFFBQVEsTUFBTTtBQUNoQyxPQUFLLFVBQVU7O0NBR2pCLGdCQUE4QjtBQUM1QixNQUFJLEtBQUssV0FBVyxLQUFLLFFBQVEsYUFBYSxRQUFRLENBQUMsS0FBSyxhQUMxRCxRQUFPLEtBQUs7QUFHZCxNQUFJLEtBQUssV0FBVyxLQUFLLFFBQVEsYUFBYSxNQUFNO0FBQ2xELFFBQUssUUFBUSxNQUFNO0FBQ25CLFFBQUssVUFBVTs7RUFHakIsTUFBTSxNQUF5QjtHQUM3QixNQUFNLFFBQVEsSUFBSTtHQUNsQixRQUFRLFFBQVEsSUFBSTtHQUNwQix5QkFBeUIsS0FBSyxPQUFPO0dBQ3JDLGlDQUFpQztHQUNqQyx1Q0FBdUM7R0FDdkMsZ0NBQWdDO0dBQ2pDO0VBRUQsTUFBTSxFQUFFLFFBQVEsS0FBSztBQUNyQixNQUFJLENBQUMsS0FBSyxZQUFZO0FBQ3BCLGFBQVUsS0FBSyxFQUFFLFdBQVcsTUFBTSxDQUFDO0FBQ25DLFFBQUssYUFBYTs7RUFHcEIsTUFBTSxRQUFRLE1BQ1osVUFDQTtHQUNFO0dBQ0E7R0FDQTtHQUNBO0dBQ0E7R0FDQTtHQUNBO0dBQ0E7R0FDQTtHQUNBO0dBQ0E7R0FDQTtHQUNBO0dBQ0EsS0FBSyxPQUFPO0dBQ2IsRUFDRDtHQUFFLE9BQU87SUFBQztJQUFRO0lBQVE7SUFBUztHQUFFO0dBQUs7R0FBSyxDQUNoRDtBQUVELFFBQU0sUUFBUSxHQUFHLFNBQVMsTUFBYztBQUN0QyxRQUFLLFVBQVUsRUFBRSxVQUFVO0FBQzNCLFFBQUssZUFBZTtJQUNwQjtBQUVGLFFBQU0sR0FBRyxlQUFlO0FBQ3RCLFFBQUssVUFBVTtBQUNmLFFBQUssY0FDSCxJQUFJLGFBQWEsOEJBQThCLFVBQVUsS0FBSyxRQUFRLENBQUMsR0FBRyxDQUMzRTtBQUNELFFBQUssWUFBWTtJQUNqQjtBQUVGLFFBQU0sR0FBRyxVQUFVLFFBQVE7QUFDekIsUUFBSyxVQUFVO0FBQ2YsUUFBSyxjQUNILElBQUksYUFBYSxzQkFBc0IsSUFBSSxRQUFRLFdBQVcsVUFBVSxLQUFLLFFBQVEsQ0FBQyxHQUFHLENBQzFGO0FBQ0QsUUFBSyxZQUFZO0lBQ2pCO0FBRUYsT0FBSyxVQUFVO0FBQ2YsT0FBSyxTQUFTO0FBQ2QsT0FBSyxZQUFZO0FBQ2pCLE9BQUssWUFBWTtBQUNqQixPQUFLLGVBQWU7QUFDcEIsU0FBTzs7Q0FHVCxnQkFBc0I7RUFDcEIsTUFBTSxRQUFRLEtBQUssT0FBTyxNQUFNLEtBQUs7QUFDckMsT0FBSyxTQUFTLE1BQU0sS0FBSyxJQUFJO0FBRTdCLFFBQ0csUUFBUSxTQUFTLEtBQUssTUFBTSxLQUFLLEdBQUcsQ0FDcEMsU0FBUyxTQUFTO0FBQ2pCLE9BQUk7SUFDRixNQUFNLElBQUksS0FBSyxNQUFNLEtBQUs7QUFFMUIsUUFBSSxFQUFFLFNBQVMsWUFBWSxFQUFFLFlBQVksVUFBVSxFQUFFLFdBQ25ELE1BQUssWUFBWSxFQUFFO0FBR3JCLFFBQUksRUFBRSxTQUFTLFlBQVksS0FBSyxTQUFTO0tBQ3ZDLElBQUksT0FBZSxFQUFFLFVBQVU7QUFDL0IsWUFBTyxLQUFLLFFBQVEsd0JBQXdCLEdBQUcsQ0FBQyxRQUFRLGVBQWUsR0FBRztBQUUxRSxTQUFJLEtBQUssV0FBVyxhQUFhLEVBQUU7QUFDakMsV0FBSyxRQUFRLE9BQ1gsSUFBSSxXQUFXLDJCQUEyQixVQUFVLEtBQUssUUFBUSxDQUFDLEdBQUcsQ0FDdEU7QUFDRCxtQkFBYSxLQUFLLFFBQVEsTUFBTTtBQUNoQyxXQUFLLFVBQVU7QUFDZixXQUFLLFlBQVk7QUFDakI7O0tBR0YsTUFBTSxJQUFJLEVBQUUsU0FBUyxFQUFFO0FBQ3ZCLFVBQUssUUFBUSxRQUFRO01BQ25CO01BQ0EsT0FBTztPQUNMLGNBQWMsRUFBRSxnQkFBZ0I7T0FDaEMsZUFBZSxFQUFFLGlCQUFpQjtPQUNsQyw2QkFBNkIsRUFBRSwrQkFBK0I7T0FDOUQseUJBQXlCLEVBQUUsMkJBQTJCO09BQ3ZEO01BQ0QsWUFBWSxFQUFFLGVBQWU7TUFDN0IsU0FBUyxFQUFFLGtCQUFrQjtNQUM5QixDQUFDO0FBQ0Ysa0JBQWEsS0FBSyxRQUFRLE1BQU07QUFDaEMsVUFBSyxVQUFVO0FBQ2YsVUFBSyxZQUFZOztXQUViO0lBR1I7O0NBR04sYUFBbUI7QUFDakIsTUFBSSxLQUFLLFFBQVM7RUFDbEIsTUFBTSxPQUFPLEtBQUssTUFBTSxPQUFPO0FBQy9CLE1BQUksS0FBTSxPQUFNOztDQUdsQixNQUFNLE1BQU0sT0FBbUIsV0FBd0M7QUFDckUsTUFBSSxLQUFLLFFBQ1AsT0FBTSxJQUFJLFNBQWUsWUFBWTtBQUNuQyxRQUFLLE1BQU0sS0FBSyxRQUFRO0lBQ3hCO0VBR0osTUFBTSxRQUFRLEtBQUssZUFBZTtFQUNsQyxNQUFNLFVBQVUsYUFBYSxLQUFLLE9BQU87QUFFekMsT0FBSztBQUNMLE1BQUksS0FBSyxhQUFhLEtBQUssT0FBTyxTQUNoQyxNQUFLLGVBQWU7RUFHdEIsTUFBTSxTQUFTLE1BQU0sU0FBUyxHQUFHLE1BQU0sT0FBTyxNQUFNLE1BQU0sV0FBVyxNQUFNO0FBRTNFLFNBQU8sSUFBSSxTQUFvQixTQUFTLFdBQVc7QUFTakQsUUFBSyxVQUFVO0lBQUU7SUFBUztJQUFRLE9BUnBCLGlCQUFpQjtBQUM3QixVQUFLLFVBQVU7QUFDZixZQUNFLElBQUksYUFBYSxpQkFBaUIsVUFBVSxJQUFLLFlBQVksVUFBVSxLQUFLLFFBQVEsQ0FBQyxHQUFHLENBQ3pGO0FBQ0QsVUFBSyxNQUFNO09BQ1YsUUFBUTtJQUU4QjtHQUV6QyxNQUFNLE1BQU0sS0FBSyxVQUFVO0lBQ3pCLE1BQU07SUFDTixTQUFTO0tBQUUsTUFBTTtLQUFRLFNBQVM7S0FBUTtJQUMxQyxZQUFZLEtBQUssYUFBYTtJQUM5QixvQkFBb0I7SUFDckIsQ0FBQztBQUVGLFNBQU0sT0FBTyxNQUFNLEdBQUcsSUFBSSxJQUFJO0lBQzlCOztDQUdKLE9BQWE7QUFDWCxNQUFJLEtBQUssV0FBVyxLQUFLLFFBQVEsYUFBYSxLQUM1QyxNQUFLLFFBQVEsTUFBTTtBQUVyQixPQUFLLFVBQVU7QUFDZixPQUFLLFNBQVM7QUFDZCxPQUFLLFlBQVk7QUFDakIsT0FBSyxZQUFZO0FBQ2pCLE9BQUssZUFBZTtBQUNwQixPQUFLLGNBQWMsSUFBSSxhQUFhLHlCQUF5QixVQUFVLEtBQUssUUFBUSxDQUFDLEdBQUcsQ0FBQztBQUN6RixPQUFLLFlBQVkifQ==
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 기존 SocratsAI ClaudeCliService에서 추출 + 리팩터:
|
|
5
5
|
* - 토큰/모델을 생성자에서 주입
|
|
6
|
-
* - env allowlist (PATH,
|
|
6
|
+
* - env allowlist (PATH, TMPDIR, CLAUDE_CODE_OAUTH_TOKEN + CLAUDE_CODE_DISABLE_* )
|
|
7
7
|
* - callCount 추적 + maxCalls 도달 시 프로세스 재활용
|
|
8
8
|
* - QuotaError/TimeoutError/ProcessError 구분
|
|
9
9
|
*/
|
|
@@ -67,9 +67,11 @@ export class Worker {
|
|
|
67
67
|
|
|
68
68
|
const env: NodeJS.ProcessEnv = {
|
|
69
69
|
PATH: process.env.PATH,
|
|
70
|
-
HOME: process.env.HOME,
|
|
71
70
|
TMPDIR: process.env.TMPDIR,
|
|
72
71
|
CLAUDE_CODE_OAUTH_TOKEN: this.config.token,
|
|
72
|
+
CLAUDE_CODE_DISABLE_AUTO_MEMORY: "1",
|
|
73
|
+
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING: "1",
|
|
74
|
+
CLAUDE_CODE_DISABLE_1M_CONTEXT: "1",
|
|
73
75
|
};
|
|
74
76
|
|
|
75
77
|
const { cwd } = this.config;
|
|
@@ -89,6 +91,10 @@ export class Worker {
|
|
|
89
91
|
"--verbose",
|
|
90
92
|
"--max-turns",
|
|
91
93
|
"1",
|
|
94
|
+
"--permission-mode",
|
|
95
|
+
"bypassPermissions",
|
|
96
|
+
"--setting-sources",
|
|
97
|
+
"project",
|
|
92
98
|
"--model",
|
|
93
99
|
this.config.model,
|
|
94
100
|
],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tokens-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tokens-Bch6XO9K.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-tanstack-CUxlo6YN.js","assets/vendor-react-DH4kUfK2.js","assets/sd.generated-DXtkTTGn.js","assets/services.generated-C0OpNm5q.js","assets/copy-DdGJDXSK.js","assets/logs-CQDBOCud.js","assets/cost-DE_8cLD-.js","assets/routes-MR1DKizN.js","assets/show--z3WxDb0.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{A as t,C as n,D as r,E as i,F as a,I as o,M as s,N as c,O as l,P as u,S as d,T as f,_ as p,a as m,b as h,c as g,d as _,h as v,i as y,j as b,k as x,l as S,n as C,o as w,r as T,s as E,t as D,v as O,w as k,x as A,y as j}from"./vendor-tanstack-CUxlo6YN.js";import{i as M,n as N,r as P,t as ee}from"./vendor-react-DH4kUfK2.js";import{a as te,g as F,h as ne,n as I,r as re,t as ie}from"./sd.generated-DXtkTTGn.js";import{t as ae}from"./preload-helper-ca-nBW7U.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function L(e){return e}function oe(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??L,o=t.mutations||[],s=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),s.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l})=>{let u=c?A(c):void 0,d=r.data===void 0?u?.data:r.data,f=d===void 0?d:a(d),p=i.get(o),m=p?.state.status===`pending`,h=p?.state.fetchStatus===`fetching`;if(p){let e=u&&l!==void 0&&l>p.state.dataUpdatedAt;if(r.dataUpdatedAt>p.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;p.setState({...t,data:f})}}else p=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s},{...r,data:f,fetchStatus:`idle`,status:f===void 0?r.status:`success`});c&&!m&&!h&&(l===void 0||l>p.state.dataUpdatedAt)&&p.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(b)})}function se(e){return{onFetch:(t,r)=>{let i=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},l=0,u=async()=>{let r=!1,u=e=>{d(e,()=>t.signal,()=>r=!0)},p=f(t.options,t.fetchOptions),m=async(e,i,a)=>{if(r)return Promise.reject();if(i==null&&e.pages.length)return Promise.resolve(e);let o=await p((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:a?`backward`:`forward`,meta:t.options.meta};return u(e),e})()),{maxPages:s}=t.options,c=a?k:n;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,i,s)}};if(a&&o.length){let e=a===`backward`,t=e?le:ce,n={pages:o,pageParams:s};c=await m(n,t(i,n),e)}else{let t=e??o.length;do{let e=l===0?s[0]??i.initialPageParam:ce(i,c);if(l>0&&e==null)break;c=await m(c,e),l++}while(l<t)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=u}}}function ce(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function le(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var R=class extends o{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new p({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ue(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ue(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ue(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ue(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){h.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>x(t,e))}findAll(e={}){return this.getAll().filter(t=>x(e,t))}notify(e){h.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return h.batch(()=>Promise.all(e.map(e=>e.continue().catch(b))))}};function ue(e){return e.options.scope?.id}var de=class extends o{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??l(r,t),a=this.get(i);return a||(a=new O({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){h.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let n={exact:!0,...e};return this.getAll().find(e=>t(n,e))}findAll(e={}){let n=this.getAll();return Object.keys(e).length>0?n.filter(n=>t(e,n)):n}notify(e){h.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){h.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){h.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},fe=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new de,this.#t=e.mutationCache||new R,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=a.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(c(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(r.queryHash)?.state.data,o=i(t,a);if(o!==void 0)return this.#e.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return h.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;h.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return h.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=h.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(b).catch(b)}invalidateQueries(e,t={}){return h.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=h.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(b)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(b)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(c(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(b).catch(b)}fetchInfiniteQuery(e){return e.behavior=se(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(b).catch(b)}ensureInfiniteQueryData(e){return e.behavior=se(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return j.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(r(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{s(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(r(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{s(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=l(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===u&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},pe=e(ee(),1),z=e(M()),B=P(),me=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}),(0,B.jsx)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8`})]})}),he=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}),(0,B.jsx)(`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`})]})}),ge=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`}),(0,B.jsx)(`circle`,{cx:16.5,cy:7.5,r:.5,fill:`currentColor`})]})}),_e=[{title:`Dashboard`,path:`/`,icon:he},{title:`Tokens`,path:`/tokens`,icon:ge},{title:`Request Logs`,path:`/logs`,icon:me}];function ve({className:e}){let t=_({select:e=>e.location.pathname}),n=e=>e===`/`?t===`/`||t===``:t.startsWith(e);return(0,B.jsxs)(`aside`,{className:`hidden md:flex w-56 bg-sand-50 flex-col shrink-0 border-r border-sand-200 ${e??``}`,children:[(0,B.jsxs)(`div`,{className:`px-5 py-5 border-b border-sand-200`,children:[(0,B.jsx)(`span`,{className:`text-base font-semibold text-sand-900`,children:`Qgrid`}),(0,B.jsx)(`p`,{className:`text-[11px] text-sand-400 mt-0.5`,children:`Token Management`})]}),(0,B.jsx)(`nav`,{className:`flex-1 px-3 py-3 space-y-1`,children:_e.map(e=>{let t=n(e.path);return(0,B.jsxs)(S,{to:e.path,className:`flex items-center gap-2.5 px-3 py-2 rounded-md text-sm no-underline transition-colors duration-150 ${t?`bg-sand-100 text-sand-800 font-medium`:`text-sand-500 hover:bg-sand-100/60 hover:text-sand-700`}`,children:[e.icon&&(0,B.jsx)(e.icon,{className:`size-4 ${t?`text-sienna-400`:``}`}),(0,B.jsx)(`span`,{children:e.title})]},e.path)})})]})}var ye=[`/login`,`/signup`];function be({children:e}){(0,z.useEffect)(()=>{let e=navigator.language.split(`-`)[0];I.includes(e)&&re(e)},[]);let t=_({select:e=>e.location.pathname});return(0,B.jsxs)(`div`,{className:`flex h-screen w-full bg-white overflow-hidden`,children:[!ye.includes(t)&&(0,B.jsx)(ve,{}),(0,B.jsx)(`main`,{className:`flex-1 p-4 md:p-8 overflow-y-auto`,children:(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{className:`text-sand-400 text-center py-8 text-sm`,children:`로딩 중...`}),children:e})})]})}var xe=e(N(),1),Se=Object.create(null),Ce=e=>({}),we=new Proxy(Se,{get(e,t){return Ce()[t]??Se[t]},has(e,t){return t in Ce()||t in Se},set(e,t,n){let r=Ce(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=Ce(!0);return delete n[t],!0},ownKeys(){let e=Ce(!0);return Object.keys(e)}});function V(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return V(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return V(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return V(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return V(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return V(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return V(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return V(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var Te=1,Ee=4,De=8,Oe=24,ke={eterm:Ee,cons25:Ee,console:Ee,cygwin:Ee,dtterm:Ee,gnome:Ee,hurd:Ee,jfbterm:Ee,konsole:Ee,kterm:Ee,mlterm:Ee,mosh:Oe,putty:Ee,st:Ee,"rxvt-unicode-24bit":Oe,terminator:Oe,"xterm-kitty":Oe},Ae=new Map(Object.entries({APPVEYOR:De,BUILDKITE:De,CIRCLECI:Oe,DRONE:De,GITEA_ACTIONS:Oe,GITHUB_ACTIONS:Oe,GITLAB_CI:De,TRAVIS:De})),je=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Me(){if(V(`FORCE_COLOR`)!==void 0)switch(V(`FORCE_COLOR`)){case``:case`1`:case`true`:return Ee;case`2`:return De;case`3`:return Oe;default:return Te}if(V(`NODE_DISABLE_COLORS`)!==void 0&&V(`NODE_DISABLE_COLORS`)!==``||V(`NO_COLOR`)!==void 0&&V(`NO_COLOR`)!==``||V(`TERM`)===`dumb`)return Te;if(V(`TMUX`))return Oe;if(`TF_BUILD`in we&&`AGENT_NAME`in we)return Ee;if(`CI`in we){for(let{0:e,1:t}of Ae)if(e in we)return t;return V(`CI_NAME`)===`codeship`?De:Te}if(`TEAMCITY_VERSION`in we)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(V(`TEAMCITY_VERSION`))===null?Te:Ee;switch(V(`TERM_PROGRAM`)){case`iTerm.app`:return!V(`TERM_PROGRAM_VERSION`)||/^[0-2]\./.exec(V(`TERM_PROGRAM_VERSION`))!==null?De:Oe;case`HyperTerm`:case`MacTerm`:return Oe;case`Apple_Terminal`:return De}if(V(`COLORTERM`)===`truecolor`||V(`COLORTERM`)===`24bit`)return Oe;if(V(`TERM`)){if(/truecolor/.exec(V(`TERM`))!==null)return Oe;if(/^xterm-256/.exec(V(`TERM`))!==null)return De;let e=V(`TERM`).toLowerCase();if(ke[e])return ke[e];if(je.some(t=>t.exec(e)!==null))return Ee}return V(`COLORTERM`)?Ee:Te}var Ne={reset:`\x1B[0m`,bright:`\x1B[1m`,dim:`\x1B[2m`,undim:`\x1B[22m`,underscore:`\x1B[4m`,blink:`\x1B[5m`,reverse:`\x1B[7m`,hidden:`\x1B[8m`,fg:{black:`\x1B[30m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,magenta:`\x1B[35m`,cyan:`\x1B[36m`,white:`\x1B[37m`},bg:{black:`\x1B[40m`,red:`\x1B[41m`,green:`\x1B[42m`,yellow:`\x1B[43m`,blue:`\x1B[44m`,magenta:`\x1B[45m`,cyan:`\x1B[46m`,white:`\x1B[47m`}},Pe=[`debug`,`info`,`success`,`warn`,`error`];function Fe(e,t){return Pe.indexOf(t)>=Pe.indexOf(e)}var Ie={info:Ne.fg.blue,success:Ne.fg.green,warn:Ne.fg.yellow,error:Ne.fg.red,debug:Ne.fg.magenta},Le=(e,t,n)=>{let r=new Date().toISOString();return n?`${Ne.dim}${r}${Ne.reset} ${Ie[e]}${e.toUpperCase()}${Ne.reset} ${Ne.bright}[Better Auth]:${Ne.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`};(e=>{let t=e?.disabled!==!0,n=e?.level??`warn`,r=e?.disableColors===void 0?Me()!==1:!e.disableColors,i=(i,a,o=[])=>{if(!t||!Fe(n,i))return;let s=Le(i,a,r);if(!e||typeof e.log!=`function`){i===`error`?console.error(s,...o):i===`warn`?console.warn(s,...o):console.log(s,...o);return}e.log(i===`success`?`info`:i,a,...o)};return{...Object.fromEntries(Pe.map(e=>[e,(...[t,...n])=>i(e,t,n)])),get level(){return n}}})();function Re(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ze=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function Be(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new ze(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Ve(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new ze(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof ze?t:new ze(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function He(e,t=`/api/auth`){if(Ve(e),Be(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function Ue(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function We(e,t,n,r,i){if(e)return He(e,t);if(r!==!1){let e=we.BETTER_AUTH_URL||we.NEXT_PUBLIC_BETTER_AUTH_URL||we.PUBLIC_BETTER_AUTH_URL||we.NUXT_PUBLIC_BETTER_AUTH_URL||we.NUXT_PUBLIC_AUTH_URL||(we.BASE_URL===`/`?void 0:we.BASE_URL);if(e)return He(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&Ue(o,`proto`)&&Ue(a,`host`))try{return He(`${o}://${a}`,t)}catch{}if(n){let e=Ge(n.url);if(!e)throw new ze(`Could not get origin from request. Please provide a valid base URL.`);return He(e,t)}if(typeof window<`u`&&window.location)return He(window.location.origin,t)}function Ge(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Ke={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},qe={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},Je=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Ye={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},Xe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Ze(e){return e instanceof Date&&!isNaN(e.getTime())}function Qe(e){let t=Xe.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return Ze(f)?f:null}function $e(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in Ye)return Ye[s];if(!Je.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(qe).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=Qe(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function et(e,t={strict:!0}){return $e(e,t)}var tt=[],nt=0,rt=4,it=0,at=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=nt+rt;t<tt.length;)tt[t]===e?tt.splice(t,rt):t+=rt;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){it++;let i=!tt.length;for(let i of t)tt.push(i,n.value,e,r);if(i){for(nt=0;nt<tt.length;nt+=rt)tt[nt](tt[nt+1],tt[nt+2],tt[nt+3]);tt.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},ot=5,st=6,ct=10,lt=(e,t,n,r)=>(e.events=e.events||{},e.events[n+ct]||(e.events[n+ct]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+ct](),delete e.events[n+ct])}),ut=1e3,dt=(e,t)=>lt(e,n=>{let r=t(n);r&&e.events[st].push(r)},ot,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[st]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[st])t();e.events[st]=[]}},ut)},()=>{e.listen=n,e.off=r}});function ft(e,t,n){let r=new Set(t).add(void 0);return e.listen((e,t,i)=>{r.has(i)&&n(e,t,i)})}var pt=()=>typeof window>`u`,mt=(e,t,n,r)=>{let i=at({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;n&&r<n||(i.set({error:e.error,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e))},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{pt()||(o?await a():dt(i,()=>{let e=setTimeout(async()=>{o||=(await a(),!0)},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},ht=Symbol.for(`better-auth:broadcast-channel`),gt=()=>Math.floor(Date.now()/1e3),_t=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:gt()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function vt(e=`better-auth.message`){return globalThis[ht]||(globalThis[ht]=new _t(e)),globalThis[ht]}var yt=Symbol.for(`better-auth:focus-manager`),bt=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function xt(){return globalThis[yt]||(globalThis[yt]=new bt),globalThis[yt]}var St=Symbol.for(`better-auth:online-manager`),Ct=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function wt(){return globalThis[St]||(globalThis[St]=new Ct),globalThis[St]}var Tt=()=>Math.floor(Date.now()/1e3),Et=5;function Dt(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||wt().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=Tt(),n.set(!n.get());return}let i=t.get();if(e?.event===`poll`){c.lastSessionRequest=Tt(),r(`/get-session`).then(e=>{e.error?t.set({...i,data:null,error:e.error}):t.set({...i,data:e.data,error:null}),c.lastSync=Tt(),n.set(!n.get())}).catch(()=>{});return}if(e?.event===`visibilitychange`){if(Tt()-c.lastSessionRequest<Et)return;c.lastSessionRequest=Tt()}(i?.data===null||i?.data===void 0||e?.event===`visibilitychange`)&&(c.lastSync=Tt(),n.set(!n.get()))},d=e=>{vt().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=vt().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=xt().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=wt().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),vt().setup(),xt().setup(),wt().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}function Ot(e,t){let n=at(!1),r=mt(n,`/get-session`,e,{method:`GET`});return dt(r,()=>{let i=Dt({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:r,$sessionSignal:n}}function kt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function At(e,t,n=`.`,r){if(!kt(t))return At(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:kt(a)&&kt(i[t])?i[t]=At(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function jt(e){return(...t)=>t.reduce((t,n)=>At(t,n,``,e),{})}var Mt=jt(),Nt=Object.defineProperty,Pt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,zt=(e,t,n)=>t in e?Nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bt=(e,t)=>{for(var n in t||={})Lt.call(t,n)&&zt(e,n,t[n]);if(It)for(var n of It(t))Rt.call(t,n)&&zt(e,n,t[n]);return e},Vt=(e,t)=>Pt(e,Ft(t)),Ht=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},Ut=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},Wt=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Gt=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Kt(e){if(typeof e==`number`)return new Wt({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new Wt(e);case`exponential`:return new Gt(e);default:throw Error(`Invalid retry strategy`)}}var qt=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},Jt=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Yt(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return Jt.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function Xt(e){try{return JSON.parse(e),!0}catch{return!1}}function Zt(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function Qt(e){try{return JSON.parse(e)}catch{return e}}function $t(e){return typeof e==`function`}function en(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&$t(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&$t(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function tn(e){let t=new Headers(e?.headers),n=await qt(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=nn(e?.body);n&&t.set(`content-type`,n)}return t}function nn(e){return Zt(e)?`application/json`:null}function rn(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(Zt(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&Zt(e.body)?new URLSearchParams(e.body).toString():e.body}function an(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return ln.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function on(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var sn=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function cn(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new sn(n.issues);return n.value}var ln=[`get`,`post`,`put`,`patch`,`delete`],un=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=Vt(Bt({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=Vt(Bt({},e),{body:i.input?await cn(i.input,n?.body):n?.body,params:i.params?await cn(i.params,n?.params):n?.params,query:i.query?await cn(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),dn=e=>{async function t(t,n){let r=Vt(Bt(Bt({},e),n),{plugins:[...e?.plugins||[],un(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await pn(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await pn(t,r)}return t};function fn(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];ln.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var pn=async(e,t)=>{let{hooks:n,url:r,options:i}=await Ut(e,t),a=en(i),o=new AbortController,s=i.signal??o.signal,c=fn(r,i),l=rn(i),u=await tn(i),d=an(r,i),f=Vt(Bt({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=on(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(Vt(Bt({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=Yt(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??Qt)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await cn(f.output,r.data));for(let e of n.onSuccess)e&&await e(Vt(Bt({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??Qt,_=await m.text(),v=Xt(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:Vt(Bt({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(Vt(Bt({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=Kt(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await pn(e,Vt(Bt({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new Ht(m.status,m.statusText,v?y:_);return{data:null,error:Vt(Bt({},y),{status:m.status,statusText:m.statusText})}},mn=(e,t)=>{let n=`credentials`in Request.prototype,r=We(e?.baseURL,e?.basePath,void 0,t)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=dn({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?et(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Ke],...i]}),{$sessionSignal:f,session:p}=Ot(d,e),m=e?.plugins||[],h={},g={$sessionSignal:f,session:p},_={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},v=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/change-email`}}];for(let e of m)e.getAtoms&&Object.assign(g,e.getAtoms?.(d)),e.pathMethods&&Object.assign(_,e.pathMethods),e.atomListeners&&v.push(...e.atomListeners);let y={notify:e=>{g[e].set(!g[e].get())},listen:(e,t)=>{g[e].subscribe(t)},atoms:g};for(let t of m)t.getActions&&(h=Mt(t.getActions?.(d,y,e)??{},h));return{get baseURL(){return r},pluginsActions:h,pluginsAtoms:g,pluginPathMethods:_,atomListeners:v,$fetch:d,$store:y}};function hn(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function gn(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function _n(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||hn(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=gn(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10)}}})}})}return a()}function vn(e,t={}){let n=(0,z.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,z.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?ft(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,z.useSyncExternalStore)(a,o,o)}function yn(e){return`use${Re(e)}`}function bn(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,$store:a,atomListeners:o}=mn(e),s={};for(let[e,t]of Object.entries(r))s[yn(e)]=()=>vn(t);return _n({...n,...s,$fetch:i,$store:a},i,t,r,o)}var xn={exports:{}},Sn={},Cn;function wn(){if(Cn)return Sn;Cn=1;var e=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function n(t,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:i,ref:n===void 0?null:n,props:r}}return Sn.Fragment=t,Sn.jsx=n,Sn.jsxs=n,Sn}var Tn;function En(){return Tn||(Tn=1,xn.exports=wn()),xn.exports}var H=En();function Dn(e,t){let n=z.createContext(t),r=e=>{let{children:t,...r}=e,i=z.useMemo(()=>r,Object.values(r));return H.jsx(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=z.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function On(e,t=[]){let n=[];function r(t,r){let i=z.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=z.useMemo(()=>o,Object.values(o));return H.jsx(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=z.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>z.createContext(e));return function(n){let r=n?.[e]||t;return z.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,kn(i,...t)]}function kn(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function An(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function jn(...e){return t=>{let n=!1,r=e.map(e=>{let r=An(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():An(e[t],null)}}}}function U(...e){return z.useCallback(jn(...e),e)}function Mn(e){let t=Nn(e),n=z.forwardRef((e,n)=>{let{children:r,...i}=e,a=z.Children.toArray(r),o=a.find(In);if(o){let e=o.props.children,r=a.map(t=>t===o?z.Children.count(e)>1?z.Children.only(null):z.isValidElement(e)?e.props.children:null:t);return H.jsx(t,{...i,ref:n,children:z.isValidElement(e)?z.cloneElement(e,void 0,r):null})}return H.jsx(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Nn(e){let t=z.forwardRef((e,t)=>{let{children:n,...r}=e;if(z.isValidElement(n)){let e=Rn(n),i=Ln(r,n.props);return n.type!==z.Fragment&&(i.ref=t?jn(t,e):e),z.cloneElement(n,i)}return z.Children.count(n)>1?z.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pn=Symbol(`radix.slottable`);function Fn(e){let t=({children:e})=>H.jsx(H.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Pn,t}function In(e){return z.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Pn}function Ln(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Rn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function zn(e){let t=e+`CollectionProvider`,[n,r]=On(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=z.useRef(null),a=z.useRef(new Map).current;return H.jsx(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Mn(s),l=z.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=U(t,a(s,n).collectionRef);return H.jsx(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Mn(u),p=z.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=z.useRef(null),s=U(t,o),c=a(u,n);return z.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>{c.itemMap.delete(o)})),H.jsx(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return z.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Bn=globalThis?.document?z.useLayoutEffect:()=>{},Vn=z.useInsertionEffect||Bn;function Hn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Un({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=z.useRef(e!==void 0);z.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,z.useCallback(t=>{if(s){let n=Wn(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Un({defaultProp:e,onChange:t}){let[n,r]=z.useState(e),i=z.useRef(n),a=z.useRef(t);return Vn(()=>{a.current=t},[t]),z.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Wn(e){return typeof e==`function`}var G=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Mn(`Primitive.${t}`),r=z.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),H.jsx(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Gn(e,t){e&&xe.flushSync(()=>e.dispatchEvent(t))}function Kn(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}var qn=e=>{let{present:t,children:n}=e,r=Jn(t),i=typeof n==`function`?n({present:r.isPresent}):z.Children.only(n),a=U(r.ref,Xn(i));return typeof n==`function`||r.isPresent?z.cloneElement(i,{ref:a}):null};qn.displayName=`Presence`;function Jn(e){let[t,n]=z.useState(),r=z.useRef(null),i=z.useRef(e),a=z.useRef(`none`),[o,s]=Kn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return z.useEffect(()=>{let e=Yn(r.current);a.current=o===`mounted`?e:`none`},[o]),Bn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Yn(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Bn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Yn(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Yn(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:z.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Yn(e){return e?.animationName||`none`}function Xn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zn=z.useId||(()=>{}),Qn=0;function $n(e){let[t,n]=z.useState(Zn());return Bn(()=>{n(e=>e??String(Qn++))},[e]),t?`radix-${t}`:``}var er=`Collapsible`,[tr,nr]=On(er),[rr,ir]=tr(er),ar=z.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Hn({prop:r,defaultProp:i??!1,onChange:o,caller:er});return H.jsx(rr,{scope:n,disabled:a,contentId:$n(),open:c,onOpenToggle:z.useCallback(()=>l(e=>!e),[l]),children:H.jsx(G.div,{"data-state":dr(c),"data-disabled":a?``:void 0,...s,ref:t})})});ar.displayName=er;var or=`CollapsibleTrigger`,sr=z.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=ir(or,n);return H.jsx(G.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":dr(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:W(e.onClick,i.onOpenToggle)})});sr.displayName=or;var cr=`CollapsibleContent`,lr=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=ir(cr,e.__scopeCollapsible);return H.jsx(qn,{present:n||i.open,children:({present:e})=>H.jsx(ur,{...r,ref:t,present:e})})});lr.displayName=cr;var ur=z.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=ir(cr,n),[s,c]=z.useState(r),l=z.useRef(null),u=U(t,l),d=z.useRef(0),f=d.current,p=z.useRef(0),m=p.current,h=o.open||s,g=z.useRef(h),_=z.useRef(void 0);return z.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Bn(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),H.jsx(G.div,{"data-state":dr(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function dr(e){return e?`open`:`closed`}var fr=ar,pr=sr,mr=lr,hr=z.createContext(void 0);function gr(e){let t=z.useContext(hr);return e||t||`ltr`}var _r=`Accordion`,vr=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[yr,br,xr]=zn(_r),[Sr]=On(_r,[xr,nr]),Cr=nr(),wr=z.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return H.jsx(yr.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?H.jsx(Ar,{...a,ref:t}):H.jsx(kr,{...i,ref:t})})});wr.displayName=_r;var[Tr,Er]=Sr(_r),[Dr,Or]=Sr(_r,{collapsible:!1}),kr=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=Hn({prop:n,defaultProp:r??``,onChange:i,caller:_r});return H.jsx(Tr,{scope:e.__scopeAccordion,value:z.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:z.useCallback(()=>a&&c(``),[a,c]),children:H.jsx(Dr,{scope:e.__scopeAccordion,collapsible:a,children:H.jsx(Nr,{...o,ref:t})})})}),Ar=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Hn({prop:n,defaultProp:r??[],onChange:i,caller:_r}),c=z.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=z.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return H.jsx(Tr,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:H.jsx(Dr,{scope:e.__scopeAccordion,collapsible:!0,children:H.jsx(Nr,{...a,ref:t})})})}),[jr,Mr]=Sr(_r),Nr=z.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=U(z.useRef(null),t),c=br(n),l=gr(i)===`ltr`,u=W(e.onKeyDown,e=>{if(!vr.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=()=>{o=r+1,o>s&&(o=0)},d=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return H.jsx(jr,{scope:n,disabled:r,direction:i,orientation:a,children:H.jsx(yr.Slot,{scope:n,children:H.jsx(G.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),Pr=`AccordionItem`,[Fr,Ir]=Sr(Pr),Lr=z.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=Mr(Pr,n),o=Er(Pr,n),s=Cr(n),c=$n(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return H.jsx(Fr,{scope:n,open:l,disabled:u,triggerId:c,children:H.jsx(fr,{"data-orientation":a.orientation,"data-state":Wr(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});Lr.displayName=Pr;var Rr=`AccordionHeader`,zr=z.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Mr(_r,n),a=Ir(Rr,n);return H.jsx(G.h3,{"data-orientation":i.orientation,"data-state":Wr(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});zr.displayName=Rr;var Br=`AccordionTrigger`,Vr=z.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Mr(_r,n),a=Ir(Br,n),o=Or(Br,n),s=Cr(n);return H.jsx(yr.ItemSlot,{scope:n,children:H.jsx(pr,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});Vr.displayName=Br;var Hr=`AccordionContent`,Ur=z.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Mr(_r,n),a=Ir(Hr,n),o=Cr(n);return H.jsx(mr,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});Ur.displayName=Hr;function Wr(e){return e?`open`:`closed`}var Gr=Lr,Kr=zr,qr=Vr,Jr=Ur,Yr=e=>H.jsx(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:H.jsx(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m6 9l6 6l6-6`})});function Xr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Xr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Zr(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Xr(e))&&(r&&(r+=` `),r+=t);return r}var Qr=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},$r=(e,t)=>({classGroupId:e,validator:t}),ei=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ti=`-`,ni=[],ri=`arbitrary..`,ii=e=>{let t=si(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return oi(e);let n=e.split(ti);return ai(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Qr(i,t):t:i||ni}return n[e]||ni}}},ai=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ai(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ti):e.slice(t).join(ti),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},oi=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?ri+r:void 0})(),si=e=>{let{theme:t,classGroups:n}=e;return ci(n,t)},ci=(e,t)=>{let n=ei();for(let r in e){let i=e[r];li(i,n,r,t)}return n},li=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ui(i,t,n,r)}},ui=(e,t,n,r)=>{if(typeof e==`string`){di(e,t,n);return}if(typeof e==`function`){fi(e,t,n,r);return}pi(e,t,n,r)},di=(e,t,n)=>{let r=e===``?t:mi(t,e);r.classGroupId=n},fi=(e,t,n,r)=>{if(hi(e)){li(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push($r(n,e))},pi=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];li(o,mi(t,a),n,r)}},mi=(e,t)=>{let n=e,r=t.split(ti),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ei(),n.nextPart.set(t,i)),n=i}return n},hi=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,gi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},_i=`!`,vi=`:`,yi=[],bi=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),xi=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===vi){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(_i)?(c=s.slice(0,-1),l=!0):s.startsWith(_i)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return bi(t,l,c,u)};if(t){let e=t+vi,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):bi(yi,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Si=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ci=e=>({cache:gi(e.cacheSize),parseClassName:xi(e),sortModifiers:Si(e),...ii(e)}),wi=/\s+/,Ti=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(wi),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+_i:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Ei=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Di(n))&&(i&&(i+=` `),i+=r);return i},Di=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Di(e[r]))&&(n&&(n+=` `),n+=t);return n},Oi=(e,...t)=>{let n,r,i,a,o=o=>(n=Ci(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ti(e,n);return i(e,a),a};return a=o,(...e)=>a(Ei(...e))},ki=[],Ai=e=>{let t=t=>t[e]||ki;return t.isThemeGetter=!0,t},ji=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ni=/^\d+\/\d+$/,Pi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fi=/\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$/,Ii=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Li=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ri=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=e=>Ni.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),Bi=e=>!!e&&Number.isInteger(Number(e)),Vi=e=>e.endsWith(`%`)&&K(e.slice(0,-1)),Hi=e=>Pi.test(e),Ui=()=>!0,Wi=e=>Fi.test(e)&&!Ii.test(e),Gi=()=>!1,Ki=e=>Li.test(e),qi=e=>Ri.test(e),Ji=e=>!q(e)&&!J(e),Yi=e=>sa(e,da,Gi),q=e=>ji.test(e),Xi=e=>sa(e,fa,Wi),Zi=e=>sa(e,pa,K),Qi=e=>sa(e,la,Gi),$i=e=>sa(e,ua,qi),ea=e=>sa(e,ha,Ki),J=e=>Mi.test(e),ta=e=>ca(e,fa),na=e=>ca(e,ma),ra=e=>ca(e,la),ia=e=>ca(e,da),aa=e=>ca(e,ua),oa=e=>ca(e,ha,!0),sa=(e,t,n)=>{let r=ji.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ca=(e,t,n=!1)=>{let r=Mi.exec(e);return r?r[1]?t(r[1]):n:!1},la=e=>e===`position`||e===`percentage`,ua=e=>e===`image`||e===`url`,da=e=>e===`length`||e===`size`||e===`bg-size`,fa=e=>e===`length`,pa=e=>e===`number`,ma=e=>e===`family-name`,ha=e=>e===`shadow`,ga=Oi(()=>{let e=Ai(`color`),t=Ai(`font`),n=Ai(`text`),r=Ai(`font-weight`),i=Ai(`tracking`),a=Ai(`leading`),o=Ai(`breakpoint`),s=Ai(`container`),c=Ai(`spacing`),l=Ai(`radius`),u=Ai(`shadow`),d=Ai(`inset-shadow`),f=Ai(`text-shadow`),p=Ai(`drop-shadow`),m=Ai(`blur`),h=Ai(`perspective`),g=Ai(`aspect`),_=Ai(`ease`),v=Ai(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,q,c],T=()=>[zi,`full`,`auto`,...w()],E=()=>[Bi,`none`,`subgrid`,J,q],D=()=>[`auto`,{span:[`full`,Bi,J,q]},Bi,J,q],O=()=>[Bi,`auto`,J,q],k=()=>[`auto`,`min`,`max`,`fr`,J,q],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[zi,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,J,q],ee=()=>[...b(),ra,Qi,{position:[J,q]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],F=()=>[`auto`,`cover`,`contain`,ia,Yi,{size:[J,q]}],ne=()=>[Vi,ta,Xi],I=()=>[``,`none`,`full`,l,J,q],re=()=>[``,K,ta,Xi],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],L=()=>[K,Vi,ra,Qi],oe=()=>[``,`none`,m,J,q],se=()=>[`none`,K,J,q],ce=()=>[`none`,K,J,q],le=()=>[K,J,q],R=()=>[zi,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Hi],breakpoint:[Hi],color:[Ui],container:[Hi],"drop-shadow":[Hi],ease:[`in`,`out`,`in-out`],font:[Ji],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Hi],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Hi],shadow:[Hi],spacing:[`px`,K],text:[Hi],"text-shadow":[Hi],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,zi,q,J,g]}],container:[`container`],columns:[{columns:[K,q,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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`],sr:[`sr-only`,`not-sr-only`],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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Bi,`auto`,J,q]}],basis:[{basis:[zi,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[K,zi,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,K,J,q]}],shrink:[{shrink:[``,K,J,q]}],order:[{order:[Bi,`first`,`last`,`none`,J,q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,ta,Xi]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,J,Zi]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Vi,q]}],"font-family":[{font:[na,q,t]}],"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:[i,J,q]}],"line-clamp":[{"line-clamp":[K,`none`,J,Zi]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[K,`from-font`,`auto`,J,Xi]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[K,`auto`,J,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:F()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Bi,J,q],radial:[``,J,q],conic:[Bi,J,q]},aa,$i]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":re()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[K,J,q]}],"outline-w":[{outline:[``,K,ta,Xi]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,oa,ea]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,oa,ea]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:re()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[K,Xi]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,oa,ea]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[K,J,q]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[K]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[J,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[K]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,q]}],filter:[{filter:[``,`none`,J,q]}],blur:[{blur:oe()}],brightness:[{brightness:[K,J,q]}],contrast:[{contrast:[K,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,oa,ea]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,K,J,q]}],"hue-rotate":[{"hue-rotate":[K,J,q]}],invert:[{invert:[``,K,J,q]}],saturate:[{saturate:[K,J,q]}],sepia:[{sepia:[``,K,J,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,q]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[K,J,q]}],"backdrop-contrast":[{"backdrop-contrast":[K,J,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,K,J,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,J,q]}],"backdrop-invert":[{"backdrop-invert":[``,K,J,q]}],"backdrop-opacity":[{"backdrop-opacity":[K,J,q]}],"backdrop-saturate":[{"backdrop-saturate":[K,J,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,K,J,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[K,`initial`,J,q]}],ease:[{ease:[`linear`,`initial`,_,J,q]}],delay:[{delay:[K,J,q]}],animate:[{animate:[`none`,v,J,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],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`,J,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,J,q]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[K,ta,Xi,Zi]}],stroke:[{stroke:[`none`,...P()]}],"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-x`,`border-w-y`,`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-x`,`border-color-y`,`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`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"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`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Y(...e){return ga(Zr(e))}function _a(e){return e===void 0?void 0:Array.isArray(e)?e:[e]}var va=z.forwardRef(({className:e,...t},n)=>H.jsx(Gr,{ref:n,className:Y(`border-b`,e),...t}));va.displayName=`AccordionItem`;var ya=z.forwardRef(({className:e,children:t,...n},r)=>H.jsx(Kr,{className:`flex`,children:H.jsxs(qr,{ref:r,className:Y(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,H.jsx(Yr,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));ya.displayName=qr.displayName;var ba=z.forwardRef(({className:e,children:t,...n},r)=>H.jsx(Jr,{ref:r,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:H.jsx(`div`,{className:Y(`pb-4 pt-0`,e),children:t})}));ba.displayName=Jr.displayName;var xa=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Sa=Zr,Ca=(e,t)=>n=>{var r;if(t?.variants==null)return Sa(e,n?.class,n?.className);let{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{let t=n?.[e],r=a?.[e];if(t===null)return null;let o=xa(t)||xa(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Sa(e,o,t==null||(r=t.compoundVariants)==null?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},wa=Ca(`relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground`,{variants:{variant:{default:`bg-background text-foreground`,destructive:`border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive`}},defaultVariants:{variant:`default`}}),Ta=z.forwardRef(({className:e,variant:t,...n},r)=>H.jsx(`div`,{ref:r,role:`alert`,className:Y(wa({variant:t}),e),...n}));Ta.displayName=`Alert`;var Ea=z.forwardRef(({className:e,...t},n)=>H.jsx(`h5`,{ref:n,className:Y(`mb-1 font-medium leading-none tracking-tight`,e),...t}));Ea.displayName=`AlertTitle`;var Da=z.forwardRef(({className:e,...t},n)=>H.jsx(`div`,{ref:n,className:Y(`text-sm [&_p]:leading-relaxed`,e),...t}));Da.displayName=`AlertDescription`;function X(e){let t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>(...e)=>t.current?.(...e),[])}function Oa(e,t=globalThis?.document){let n=X(e);z.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ka=`DismissableLayer`,Aa=`dismissableLayer.update`,ja=`dismissableLayer.pointerDownOutside`,Ma=`dismissableLayer.focusOutside`,Na,Pa=z.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fa=z.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=z.useContext(Pa),[u,d]=z.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=z.useState({}),m=U(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=Ra(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=za(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Oa(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),z.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Na=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ba(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Na)}},[u,f,n,l]),z.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ba())},[u,l]),z.useEffect(()=>{let e=()=>p({});return document.addEventListener(Aa,e),()=>document.removeEventListener(Aa,e)},[]),H.jsx(G.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:W(e.onFocusCapture,S.onFocusCapture),onBlurCapture:W(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,x.onPointerDownCapture)})});Fa.displayName=ka;var Ia=`DismissableLayerBranch`,La=z.forwardRef((e,t)=>{let n=z.useContext(Pa),r=z.useRef(null),i=U(t,r);return z.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),H.jsx(G.div,{...e,ref:i})});La.displayName=Ia;function Ra(e,t=globalThis?.document){let n=X(e),r=z.useRef(!1),i=z.useRef(()=>{});return z.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Va(ja,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function za(e,t=globalThis?.document){let n=X(e),r=z.useRef(!1);return z.useEffect(()=>{let e=e=>{e.target&&!r.current&&Va(Ma,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ba(){let e=new CustomEvent(Aa);document.dispatchEvent(e)}function Va(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Gn(i,a):i.dispatchEvent(a)}var Ha=Fa,Ua=La,Wa=`focusScope.autoFocusOnMount`,Ga=`focusScope.autoFocusOnUnmount`,Ka={bubbles:!1,cancelable:!0},qa=`FocusScope`,Ja=z.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=z.useState(null),l=X(i),u=X(a),d=z.useRef(null),f=U(t,e=>c(e)),p=z.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;z.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:to(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||to(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&to(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),z.useEffect(()=>{if(s){no.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Wa,Ka);s.addEventListener(Wa,l),s.dispatchEvent(t),t.defaultPrevented||(Ya(ao(Za(s)),{select:!0}),document.activeElement===e&&to(s))}return()=>{s.removeEventListener(Wa,l),setTimeout(()=>{let t=new CustomEvent(Ga,Ka);s.addEventListener(Ga,u),s.dispatchEvent(t),t.defaultPrevented||to(e??document.body,{select:!0}),s.removeEventListener(Ga,u),no.remove(p)},0)}}},[s,l,u,p]);let m=z.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Xa(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&to(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&to(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return H.jsx(G.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Ja.displayName=qa;function Ya(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(to(r,{select:t}),document.activeElement!==n)return}function Xa(e){let t=Za(e);return[Qa(t,e),Qa(t.reverse(),e)]}function Za(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Qa(e,t){for(let n of e)if(!$a(n,{upTo:t}))return n}function $a(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function eo(e){return e instanceof HTMLInputElement&&`select`in e}function to(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eo(e)&&t&&e.select()}}var no=ro();function ro(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=io(e,t),e.unshift(t)},remove(t){e=io(e,t),e[0]?.resume()}}}function io(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ao(e){return e.filter(e=>e.tagName!==`A`)}var oo=`Portal`,so=z.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=z.useState(!1);Bn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?xe.createPortal(H.jsx(G.div,{...r,ref:t}),o):null});so.displayName=oo;var co=0;function lo(){z.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??uo()),document.body.insertAdjacentElement(`beforeend`,e[1]??uo()),co++,()=>{co===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),co--}},[])}function uo(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var fo=function(){return fo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fo.apply(this,arguments)};function po(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function mo(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ho=`right-scroll-bar-position`,go=`width-before-scroll-bar`,_o=`with-scroll-bars-hidden`,vo=`--removed-body-scroll-bar-size`;function yo(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function bo(e,t){var n=(0,z.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var xo=typeof window<`u`?z.useLayoutEffect:z.useEffect,So=new WeakMap;function Co(e,t){var n=bo(null,function(t){return e.forEach(function(e){return yo(e,t)})});return xo(function(){var t=So.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||yo(e,null)}),i.forEach(function(e){r.has(e)||yo(e,a)})}So.set(n,e)},[e]),n}function wo(e){return e}function To(e,t){t===void 0&&(t=wo);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Eo(e){e===void 0&&(e={});var t=To(null);return t.options=fo({async:!0,ssr:!1},e),t}var Do=function(e){var t=e.sideCar,n=po(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return z.createElement(r,fo({},n))};Do.isSideCarExport=!0;function Oo(e,t){return e.useMedium(t),Do}var ko=Eo(),Ao=function(){},jo=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:Ao,onWheelCapture:Ao,onTouchMoveCapture:Ao}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=po(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Co([n,t]),C=fo(fo({},b),i);return z.createElement(z.Fragment,null,u&&z.createElement(x,{sideCar:ko,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?z.cloneElement(z.Children.only(s),fo(fo({},C),{ref:S})):z.createElement(v,fo({},C,{className:c,ref:S}),s))});jo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jo.classNames={fullWidth:go,zeroRight:ho};var Mo=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function No(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Mo();return t&&e.setAttribute(`nonce`,t),e}function Po(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fo(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Io=function(){var e=0,t=null;return{add:function(n){e==0&&(t=No())&&(Po(t,n),Fo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lo=function(){var e=Io();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ro=function(){var e=Lo();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},zo={left:0,top:0,right:0,gap:0},Bo=function(e){return parseInt(e||``,10)||0},Vo=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Bo(n),Bo(r),Bo(i)]},Ho=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return zo;var t=Vo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Uo=Ro(),Wo=`data-scroll-locked`,Go=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
3
3
|
.${_o} {
|
|
4
4
|
overflow: hidden ${r};
|
|
@@ -113,4 +113,4 @@ Defaulting to \`null\`.`}var vE=cE,yE=uE,bE=z.forwardRef(({className:e,value:t,.
|
|
|
113
113
|
|
|
114
114
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=hj,s=!nj.jitless,c=s&&gj.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?EM([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function kM(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Mj(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Fj(e,r,rj())))}),t)}var AM=Q(`$ZodUnion`,(e,t)=>{_M.init(e,t),$(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),$(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),$(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),$(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>cj(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>kM(t,i,e,a)):kM(s,i,e,a)}}),jM=Q(`$ZodIntersection`,(e,t)=>{_M.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>NM(e,t,n)):NM(e,i,a)}});function MM(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_j(e)&&_j(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=MM(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=MM(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function NM(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Mj(e))return e;let o=MM(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var PM=Q(`$ZodEnum`,(e,t)=>{_M.init(e,t);let n=ij(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>yj.has(typeof e)).map(e=>typeof e==`string`?bj(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),FM=Q(`$ZodTransform`,(e,t)=>{_M.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new tj(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new ej;return n.value=i,n}});function IM(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var LM=Q(`$ZodOptional`,(e,t)=>{_M.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,$(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${cj(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>IM(t,e.value)):IM(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),RM=Q(`$ZodExactOptional`,(e,t)=>{LM.init(e,t),$(e._zod,`values`,()=>t.innerType._zod.values),$(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),zM=Q(`$ZodNullable`,(e,t)=>{_M.init(e,t),$(e._zod,`optin`,()=>t.innerType._zod.optin),$(e._zod,`optout`,()=>t.innerType._zod.optout),$(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${cj(e.source)}|null)$`):void 0}),$(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),BM=Q(`$ZodDefault`,(e,t)=>{_M.init(e,t),e._zod.optin=`optional`,$(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>VM(e,t)):VM(r,t)}});function VM(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var HM=Q(`$ZodPrefault`,(e,t)=>{_M.init(e,t),e._zod.optin=`optional`,$(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),UM=Q(`$ZodNonOptional`,(e,t)=>{_M.init(e,t),$(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>WM(t,e)):WM(i,e)}});function WM(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var GM=Q(`$ZodCatch`,(e,t)=>{_M.init(e,t),$(e._zod,`optin`,()=>t.innerType._zod.optin),$(e._zod,`optout`,()=>t.innerType._zod.optout),$(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Fj(e,n,rj()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Fj(e,n,rj()))},input:e.value}),e.issues=[]),e)}}),KM=Q(`$ZodPipe`,(e,t)=>{_M.init(e,t),$(e._zod,`values`,()=>t.in._zod.values),$(e._zod,`optin`,()=>t.in._zod.optin),$(e._zod,`optout`,()=>t.out._zod.optout),$(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>qM(e,t.in,n)):qM(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>qM(e,t.out,n)):qM(r,t.out,n)}});function qM(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var JM=Q(`$ZodReadonly`,(e,t)=>{_M.init(e,t),$(e._zod,`propValues`,()=>t.innerType._zod.propValues),$(e._zod,`values`,()=>t.innerType._zod.values),$(e._zod,`optin`,()=>t.innerType?._zod?.optin),$(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(YM):YM(r)}});function YM(e){return e.value=Object.freeze(e.value),e}var XM=Q(`$ZodCustom`,(e,t)=>{aM.init(e,t),_M.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>ZM(t,n,r,e));ZM(i,n,r,e)}});function ZM(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Lj(e))}}var QM,$M=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function eN(){return new $M}(QM=globalThis).__zod_globalRegistry??(QM.__zod_globalRegistry=eN());var tN=globalThis.__zod_globalRegistry;function nN(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Sj(t)})}function rN(e){return new e({type:`unknown`})}function iN(e,t){return new e({type:`never`,...Sj(t)})}function aN(e,t){return new sM({check:`less_than`,...Sj(t),value:e,inclusive:!1})}function oN(e,t){return new sM({check:`less_than`,...Sj(t),value:e,inclusive:!0})}function sN(e,t){return new cM({check:`greater_than`,...Sj(t),value:e,inclusive:!1})}function cN(e,t){return new cM({check:`greater_than`,...Sj(t),value:e,inclusive:!0})}function lN(e,t){return new lM({check:`multiple_of`,...Sj(t),value:e})}function uN(e,t){return new dM({check:`max_length`,...Sj(t),maximum:e})}function dN(e,t){return new fM({check:`min_length`,...Sj(t),minimum:e})}function fN(e,t){return new pM({check:`length_equals`,...Sj(t),length:e})}function pN(e){return new mM({check:`overwrite`,tx:e})}function mN(e,t,n){return new e({type:`array`,element:t,...Sj(n)})}function hN(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Sj(n)})}function gN(e){let t=_N(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Lj(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Lj(r))}},e(n.value,n)));return t}function _N(e,t){let n=new aM({check:`custom`,...Sj(t)});return n._zod.check=e,n}function vN(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??tN,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function yN(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,yN(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&SN(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function bN(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
115
115
|
|
|
116
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function xN(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:wN(t,`input`,e.processors),output:wN(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function SN(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return SN(r.element,n);if(r.type===`set`)return SN(r.valueType,n);if(r.type===`lazy`)return SN(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return SN(r.innerType,n);if(r.type===`intersection`)return SN(r.left,n)||SN(r.right,n);if(r.type===`record`||r.type===`map`)return SN(r.keyType,n)||SN(r.valueType,n);if(r.type===`pipe`)return SN(r.in,n)||SN(r.out,n);if(r.type===`object`){for(let e in r.shape)if(SN(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(SN(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(SN(e,n))return!0;return!!(r.rest&&SN(r.rest,n))}return!1}var CN=(e,t={})=>n=>{let r=vN({...n,processors:t});return yN(e,r),bN(r,e),xN(r,e)},wN=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=vN({...i??{},target:a,io:t,processors:n});return yN(e,o),bN(o,e),xN(o,e)},TN=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},EN=(e,t,n,r)=>{n.not={}},DN=(e,t,n,r)=>{let i=e._zod.def,a=ij(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ON=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},kN=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},AN=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=yN(a.element,t,{...r,path:[...r.path,`items`]})},jN=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=yN(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=yN(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},MN=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>yN(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},NN=(e,t,n,r)=>{let i=e._zod.def,a=yN(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=yN(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},PN=(e,t,n,r)=>{let i=e._zod.def,a=yN(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},FN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},IN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},LN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},RN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},zN=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;yN(a,t,r);let o=t.seen.get(e);o.ref=a},BN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},VN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},HN=Q(`ZodError`,(e,t)=>{zj.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Hj(e,t)},flatten:{value:t=>Vj(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,aj,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,aj,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),UN=Uj(HN),WN=Wj(HN),GN=Gj(HN),KN=qj(HN),qN=Yj(HN),JN=Xj(HN),YN=Zj(HN),XN=Qj(HN),ZN=$j(HN),QN=eM(HN),$N=tM(HN),eP=nM(HN),tP=Q(`ZodType`,(e,t)=>(_M.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:wN(e,`input`),output:wN(e,`output`)}}),e.toJSONSchema=CN(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(fj(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>xj(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>UN(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>GN(e,t,n),e.parseAsync=async(t,n)=>WN(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>KN(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>qN(e,t,n),e.decode=(t,n)=>JN(e,t,n),e.encodeAsync=async(t,n)=>YN(e,t,n),e.decodeAsync=async(t,n)=>XN(e,t,n),e.safeEncode=(t,n)=>ZN(e,t,n),e.safeDecode=(t,n)=>QN(e,t,n),e.safeEncodeAsync=async(t,n)=>$N(e,t,n),e.safeDecodeAsync=async(t,n)=>eP(e,t,n),e.refine=(t,n)=>e.check(zP(t,n)),e.superRefine=t=>e.check(BP(t)),e.overwrite=t=>e.check(pN(t)),e.optional=()=>xP(e),e.exactOptional=()=>CP(e),e.nullable=()=>TP(e),e.nullish=()=>xP(TP(e)),e.nonoptional=t=>jP(e,t),e.array=()=>uP(e),e.or=t=>pP([e,t]),e.and=t=>hP(e,t),e.transform=t=>FP(e,yP(t)),e.default=t=>DP(e,t),e.prefault=t=>kP(e,t),e.catch=t=>NP(e,t),e.pipe=t=>FP(e,t),e.readonly=()=>LP(e),e.describe=t=>{let n=e.clone();return tN.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return tN.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return tN.get(e);let n=e.clone();return tN.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),nP=Q(`ZodNumber`,(e,t)=>{vM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TN(e,t,n),e.gt=(t,n)=>e.check(sN(t,n)),e.gte=(t,n)=>e.check(cN(t,n)),e.min=(t,n)=>e.check(cN(t,n)),e.lt=(t,n)=>e.check(aN(t,n)),e.lte=(t,n)=>e.check(oN(t,n)),e.max=(t,n)=>e.check(oN(t,n)),e.int=t=>e.check(iP(t)),e.safe=t=>e.check(iP(t)),e.positive=t=>e.check(sN(0,t)),e.nonnegative=t=>e.check(cN(0,t)),e.negative=t=>e.check(aN(0,t)),e.nonpositive=t=>e.check(oN(0,t)),e.multipleOf=(t,n)=>e.check(lN(t,n)),e.step=(t,n)=>e.check(lN(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),rP=Q(`ZodNumberFormat`,(e,t)=>{yM.init(e,t),nP.init(e,t)});function iP(e){return nN(rP,e)}var aP=Q(`ZodUnknown`,(e,t)=>{bM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function oP(){return rN(aP)}var sP=Q(`ZodNever`,(e,t)=>{xM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EN(e,t,n)});function cP(e){return iN(sP,e)}var lP=Q(`ZodArray`,(e,t)=>{CM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AN(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(dN(t,n)),e.nonempty=t=>e.check(dN(1,t)),e.max=(t,n)=>e.check(uN(t,n)),e.length=(t,n)=>e.check(fN(t,n)),e.unwrap=()=>e.element});function uP(e,t){return mN(lP,e,t)}var dP=Q(`ZodObject`,(e,t)=>{OM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jN(e,t,n,r),$(e,`shape`,()=>t.shape),e.keyof=()=>_P(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:oP()}),e.loose=()=>e.clone({...e._zod.def,catchall:oP()}),e.strict=()=>e.clone({...e._zod.def,catchall:cP()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Dj(e,t),e.safeExtend=t=>Oj(e,t),e.merge=t=>kj(e,t),e.pick=t=>Tj(e,t),e.omit=t=>Ej(e,t),e.partial=(...t)=>Aj(bP,e,t[0]),e.required=(...t)=>jj(AP,e,t[0])}),fP=Q(`ZodUnion`,(e,t)=>{AM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MN(e,t,n,r),e.options=t.options});function pP(e,t){return new fP({type:`union`,options:e,...Sj(t)})}var mP=Q(`ZodIntersection`,(e,t)=>{jM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NN(e,t,n,r)});function hP(e,t){return new mP({type:`intersection`,left:e,right:t})}var gP=Q(`ZodEnum`,(e,t)=>{PM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DN(e,t,n),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new gP({...t,checks:[],...Sj(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new gP({...t,checks:[],...Sj(r),entries:i})}});function _P(e,t){return new gP({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Sj(t)})}var vP=Q(`ZodTransform`,(e,t)=>{FM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kN(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new tj(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Lj(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Lj(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function yP(e){return new vP({type:`transform`,transform:e})}var bP=Q(`ZodOptional`,(e,t)=>{LM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xP(e){return new bP({type:`optional`,innerType:e})}var SP=Q(`ZodExactOptional`,(e,t)=>{RM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CP(e){return new SP({type:`optional`,innerType:e})}var wP=Q(`ZodNullable`,(e,t)=>{zM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function TP(e){return new wP({type:`nullable`,innerType:e})}var EP=Q(`ZodDefault`,(e,t)=>{BM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function DP(e,t){return new EP({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():vj(t)}})}var OP=Q(`ZodPrefault`,(e,t)=>{HM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kP(e,t){return new OP({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():vj(t)}})}var AP=Q(`ZodNonOptional`,(e,t)=>{UM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jP(e,t){return new AP({type:`nonoptional`,innerType:e,...Sj(t)})}var MP=Q(`ZodCatch`,(e,t)=>{GM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function NP(e,t){return new MP({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var PP=Q(`ZodPipe`,(e,t)=>{KM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zN(e,t,n,r),e.in=t.in,e.out=t.out});function FP(e,t){return new PP({type:`pipe`,in:e,out:t})}var IP=Q(`ZodReadonly`,(e,t)=>{JM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function LP(e){return new IP({type:`readonly`,innerType:e})}var RP=Q(`ZodCustom`,(e,t)=>{XM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ON(e,t)});function zP(e,t={}){return hN(RP,e,t)}function BP(e){return gN(e)}async function VP(e,t){if(e instanceof File){let[n]=await t([e]);return n}if(Array.isArray(e))return e.length>0&&e.every(e=>e instanceof File)?await t(e):await Promise.all(e.map(e=>VP(e,t)));if(typeof e==`object`&&e&&Object.prototype.toString.call(e)===`[object Object]`){let n={};for(let[r,i]of Object.entries(e))n[r]=await VP(i,t);return n}return e}function HP(e,t){let[n,r]=(0,z.useState)(t),[i,a]=(0,z.useState)(new Map),{uploader:o}=gu();function s(e,t){let n=t.replace(/\./g,`.shape.`).replace(/\[[^\]]+\]/g,`.element`).replace(/^\.element/,`element`),r;return e instanceof dP?r=JA(e.shape,n):e instanceof lP&&(r=JA(e,n)),r===void 0?`normal`:r instanceof bP?`optional`:r instanceof wP?`nullable`:`normal`}return{form:n,setForm:r,register:(t,o)=>{let c=o??s(e,t),l=JA(n,t),u=i.get(t),d={value:l??``,onValueChange:e=>{u!==void 0&&a(e=>{let n=new Map(e);return n.delete(t),n});let i=e;c===`nullable`?i=e===``?null:e:c===`optional`&&(i=e===``?void 0:e);let o=t.indexOf(`.`)===-1&&t.indexOf(`[`)===-1;r(i===void 0&&o?{...n,[t]:void 0}:XA(n,t,i))}};return u&&(d.error=u),d},submit:e=>async()=>{let t=await VP(n,o);return r(t),await e(t)},addError:(e,t)=>{a(n=>{let r=new Map(n);return r.set(e,typeof t==`string`?{content:t}:t),r})},removeError:e=>{a(t=>{let n=new Map(t);return n.delete(e),n})},clearError:()=>{a(new Map)},reset:()=>{r(t)}}}var UP,WP;function GP(){return WP||(WP=1,UP=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}),UP}GP();var KP=`Switch`,[qP]=On(KP),[JP,YP]=qP(KP),XP=z.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=z.useState(null),m=U(t,e=>p(e)),h=z.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=Hn({prop:i,defaultProp:a??!1,onChange:l,caller:KP});return H.jsxs(JP,{scope:n,checked:_,disabled:s,children:[H.jsx(G.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":tF(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:W(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&H.jsx(eF,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});XP.displayName=KP;var ZP=`SwitchThumb`,QP=z.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=YP(ZP,n);return H.jsx(G.span,{"data-state":tF(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});QP.displayName=ZP;var $P=`SwitchBubbleInput`,eF=z.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=z.useRef(null),s=U(o,a),c=wg(n),l=$p(t);return z.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),H.jsx(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});eF.displayName=$P;function tF(e){return e?`checked`:`unchecked`}var nF=XP,rF=QP,iF=z.forwardRef(({className:e,name:t,checked:n,value:r,defaultChecked:i,onValueChange:a,onBlur:o,...s},c)=>{let l=r===void 0?n:r,u=z.useRef(null);z.useImperativeHandle(c,()=>u.current);let d=e=>{a?.(e)};return H.jsxs(H.Fragment,{children:[H.jsx(`input`,{type:`checkbox`,ref:u,name:t,defaultChecked:i,onBlur:o,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),H.jsx(nF,{checked:l,defaultChecked:i,onCheckedChange:d,className:Y(`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...s,children:H.jsx(rF,{className:Y(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0`)})})]})});iF.displayName=`Switch`;var aF=`Tabs`,[oF]=On(aF,[t_]),sF=t_(),[cF,lF]=oF(aF),uF=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=gr(s),[d,f]=Hn({prop:r,onChange:i,defaultProp:a??``,caller:aF});return H.jsx(cF,{scope:n,baseId:$n(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:H.jsx(G.div,{dir:u,"data-orientation":o,...l,ref:t})})});uF.displayName=aF;var dF=`TabsList`,fF=z.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=lF(dF,n),o=sF(n);return H.jsx(p_,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:H.jsx(G.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});fF.displayName=dF;var pF=`TabsTrigger`,mF=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=lF(pF,n),s=sF(n),c=_F(o.baseId,r),l=vF(o.baseId,r),u=r===o.value;return H.jsx(m_,{asChild:!0,...s,focusable:!i,active:u,children:H.jsx(G.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:W(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:W(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:W(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});mF.displayName=pF;var hF=`TabsContent`,gF=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=lF(hF,n),c=_F(s.baseId,r),l=vF(s.baseId,r),u=r===s.value,d=z.useRef(u);return z.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),H.jsx(qn,{present:i||u,children:({present:n})=>H.jsx(G.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});gF.displayName=hF;function _F(e,t){return`${e}-trigger-${t}`}function vF(e,t){return`${e}-content-${t}`}var yF=fF,bF=mF,xF=gF,SF=z.forwardRef(({className:e,...t},n)=>H.jsx(yF,{ref:n,className:Y(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));SF.displayName=yF.displayName;var CF=z.forwardRef(({className:e,...t},n)=>H.jsx(bF,{ref:n,className:Y(`inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm`,e),...t}));CF.displayName=bF.displayName;var wF=z.forwardRef(({className:e,...t},n)=>H.jsx(xF,{ref:n,className:Y(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));wF.displayName=xF.displayName;var TF=z.forwardRef(({className:e,onValueChange:t,onChange:n,...r},i)=>{let a=e=>{t?.(e.target.value),n?.(e)};return H.jsx(`textarea`,{className:Y(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:i,...r,onChange:a})});TF.displayName=`Textarea`;var EF=`ToastProvider`,[DF,OF,kF]=zn(`Toast`),[AF]=On(`Toast`,[kF]),[jF,MF]=AF(EF),NF=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=z.useState(null),[l,u]=z.useState(0),d=z.useRef(!1),f=z.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${EF}\`. Expected non-empty \`string\`.`),H.jsx(DF.Provider,{scope:t,children:H.jsx(jF,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:z.useCallback(()=>u(e=>e+1),[]),onToastRemove:z.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};NF.displayName=EF;var PF=`ToastViewport`,FF=[`F8`],IF=`toast.viewportPause`,LF=`toast.viewportResume`,RF=z.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=FF,label:i=`Notifications ({hotkey})`,...a}=e,o=MF(PF,n),s=OF(n),c=z.useRef(null),l=z.useRef(null),u=z.useRef(null),d=z.useRef(null),f=U(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;z.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),z.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(IF);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(LF);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{!e.contains(t.relatedTarget)&&r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=z.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...dI(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return z.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);fI(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),H.jsxs(Ua,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&H.jsx(BF,{ref:l,onFocusFromOutsideViewport:()=>{fI(h({tabbingDirection:`forwards`}))}}),H.jsx(DF.Slot,{scope:n,children:H.jsx(G.ol,{tabIndex:-1,...a,ref:f})}),m&&H.jsx(BF,{ref:u,onFocusFromOutsideViewport:()=>{fI(h({tabbingDirection:`backwards`}))}})]})});RF.displayName=PF;var zF=`ToastFocusProxy`,BF=z.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=MF(zF,n);return H.jsx(Ww,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;!a.viewport?.contains(t)&&r()}})});BF.displayName=zF;var VF=`Toast`,HF=`toast.swipeStart`,UF=`toast.swipeMove`,WF=`toast.swipeCancel`,GF=`toast.swipeEnd`,KF=z.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Hn({prop:r,defaultProp:i??!0,onChange:a,caller:VF});return H.jsx(qn,{present:n||s,children:H.jsx(YF,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:X(e.onPause),onResume:X(e.onResume),onSwipeStart:W(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:W(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:W(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:W(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});KF.displayName=VF;var[qF,JF]=AF(VF,{onClose(){}}),YF=z.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=MF(VF,n),[g,_]=z.useState(null),v=U(t,e=>_(e)),y=z.useRef(null),b=z.useRef(null),x=i||h.duration,S=z.useRef(0),C=z.useRef(x),w=z.useRef(0),{onToastAdd:T,onToastRemove:E}=h,D=X(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),O=z.useCallback(e=>{!e||e===1/0||(window.clearTimeout(w.current),S.current=new Date().getTime(),w.current=window.setTimeout(D,e))},[D]);z.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{O(C.current),l?.()},n=()=>{let e=new Date().getTime()-S.current;C.current-=e,window.clearTimeout(w.current),c?.()};return e.addEventListener(IF,n),e.addEventListener(LF,t),()=>{e.removeEventListener(IF,n),e.removeEventListener(LF,t)}}},[h.viewport,x,c,l,O]),z.useEffect(()=>{a&&!h.isClosePausedRef.current&&O(x)},[a,x,h.isClosePausedRef,O]),z.useEffect(()=>(T(),()=>E()),[T,E]);let k=z.useMemo(()=>g?oI(g):null,[g]);return h.viewport?H.jsxs(H.Fragment,{children:[k&&H.jsx(XF,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:k}),H.jsx(qF,{scope:n,onClose:D,children:xe.createPortal(H.jsx(DF.ItemSlot,{scope:n,children:H.jsx(Ha,{asChild:!0,onEscapeKeyDown:W(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||D(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:H.jsx(G.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:W(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:W(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:W(e.onPointerMove,e=>{if(!y.current)return;let t=e.clientX-y.current.x,n=e.clientY-y.current.y,r=!!b.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(b.current=l,sI(UF,d,f,{discrete:!1})):cI(l,h.swipeDirection,c)?(b.current=l,sI(HF,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:W(e.onPointerUp,e=>{let t=b.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),b.current=null,y.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};cI(t,h.swipeDirection,h.swipeThreshold)?sI(GF,p,r,{discrete:!0}):sI(WF,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),XF=e=>{let{__scopeToast:t,children:n,...r}=e,i=MF(VF,t),[a,o]=z.useState(!1),[s,c]=z.useState(!1);return lI(()=>o(!0)),z.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:H.jsx(so,{asChild:!0,children:H.jsx(Ww,{...r,children:a&&H.jsxs(H.Fragment,{children:[i.label,` `,n]})})})},ZF=`ToastTitle`,QF=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return H.jsx(G.div,{...r,ref:t})});QF.displayName=ZF;var $F=`ToastDescription`,eI=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return H.jsx(G.div,{...r,ref:t})});eI.displayName=$F;var tI=`ToastAction`,nI=z.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?H.jsx(aI,{altText:n,asChild:!0,children:H.jsx(iI,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${tI}\`. Expected non-empty \`string\`.`),null)});nI.displayName=tI;var rI=`ToastClose`,iI=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=JF(rI,n);return H.jsx(aI,{asChild:!0,children:H.jsx(G.button,{type:`button`,...r,ref:t,onClick:W(e.onClick,i.onClose)})})});iI.displayName=rI;var aI=z.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return H.jsx(G.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function oI(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),uI(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...oI(e))}}),t}function sI(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Gn(i,a):i.dispatchEvent(a)}var cI=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function lI(e=()=>{}){let t=X(e);Bn(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function uI(e){return e.nodeType===e.ELEMENT_NODE}function dI(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fI(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var pI=RF,mI=KF,hI=QF,gI=eI,_I=nI,vI=iI,yI=z.forwardRef(({className:e,...t},n)=>H.jsx(pI,{ref:n,className:Y(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]`,e),...t}));yI.displayName=pI.displayName;var bI=Ca(`group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),xI=z.forwardRef(({className:e,variant:t,...n},r)=>H.jsx(mI,{ref:r,className:Y(bI({variant:t}),e),...n}));xI.displayName=mI.displayName;var SI=z.forwardRef(({className:e,...t},n)=>H.jsx(_I,{ref:n,className:Y(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive`,e),...t}));SI.displayName=_I.displayName;var CI=z.forwardRef(({className:e,...t},n)=>H.jsx(vI,{ref:n,className:Y(`absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...t,children:H.jsx(yu,{className:`h-4 w-4`})}));CI.displayName=vI.displayName;var wI=z.forwardRef(({className:e,...t},n)=>H.jsx(hI,{ref:n,className:Y(`text-sm font-semibold`,e),...t}));wI.displayName=hI.displayName;var TI=z.forwardRef(({className:e,...t},n)=>H.jsx(gI,{ref:n,className:Y(`text-sm opacity-90`,e),...t}));TI.displayName=gI.displayName;var EI=`Toggle`,DI=z.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=Hn({prop:n,onChange:i,defaultProp:r??!1,caller:EI});return H.jsx(G.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:W(e.onClick,()=>{e.disabled||s(!o)})})});DI.displayName=EI;var OI=DI,kI=Ca(`inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-accent hover:text-accent-foreground`},size:{default:`h-10 px-3 min-w-10`,sm:`h-9 px-2.5 min-w-9`,lg:`h-11 px-5 min-w-11`}},defaultVariants:{variant:`default`,size:`default`}}),AI=z.forwardRef(({className:e,variant:t,size:n,value:r,pressed:i,onValueChange:a,onPressedChange:o,...s},c)=>{let l=r===void 0?i:r;return H.jsx(OI,{ref:c,pressed:l,onPressedChange:e=>{a?.(e),o?.(e)},className:Y(kI({variant:t,size:n,className:e})),...s})});AI.displayName=OI.displayName;var jI=`ToggleGroup`,[MI]=On(jI,[t_]),NI=t_(),PI=z.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`){let e=r;return H.jsx(LI,{...e,ref:t})}if(n===`multiple`){let e=r;return H.jsx(RI,{...e,ref:t})}throw Error(`Missing prop \`type\` expected on \`${jI}\``)});PI.displayName=jI;var[FI,II]=MI(jI),LI=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Hn({prop:n,defaultProp:r??``,onChange:i,caller:jI});return H.jsx(FI,{scope:e.__scopeToggleGroup,type:`single`,value:z.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:z.useCallback(()=>s(``),[s]),children:H.jsx(VI,{...a,ref:t})})}),RI=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Hn({prop:n,defaultProp:r??[],onChange:i,caller:jI}),c=z.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=z.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return H.jsx(FI,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:H.jsx(VI,{...a,ref:t})})});PI.displayName=jI;var[zI,BI]=MI(jI),VI=z.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=NI(n),u=gr(o),d={role:`group`,dir:u,...c};return H.jsx(zI,{scope:n,rovingFocus:i,disabled:r,children:i?H.jsx(p_,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:H.jsx(G.div,{...d,ref:t})}):H.jsx(G.div,{...d,ref:t})})}),HI=`ToggleGroupItem`,UI=z.forwardRef((e,t)=>{let n=II(HI,e.__scopeToggleGroup),r=BI(HI,e.__scopeToggleGroup),i=NI(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=z.useRef(null);return r.rovingFocus?H.jsx(m_,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:H.jsx(WI,{...s,ref:t})}):H.jsx(WI,{...s,ref:t})});UI.displayName=HI;var WI=z.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=II(HI,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===`single`?o:void 0;return H.jsx(DI,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),GI=PI,KI=UI,qI=z.createContext({size:`default`,variant:`default`}),JI=z.forwardRef(({className:e,variant:t,size:n,children:r,...i},a)=>H.jsx(GI,{ref:a,className:Y(`flex items-center justify-center gap-1`,e),...i,children:H.jsx(qI.Provider,{value:{variant:t,size:n},children:r})}));JI.displayName=GI.displayName;var YI=z.forwardRef(({className:e,children:t,variant:n,size:r,...i},a)=>{let o=z.useContext(qI);return H.jsx(KI,{ref:a,className:Y(kI({variant:o.variant||n,size:o.size||r}),e),...i,children:t})});YI.displayName=KI.displayName;var XI=async e=>(e.length===0||console.log(`File upload not implemented yet`),[]),ZI=e=>ie(e);function QI({children:e}){return(0,B.jsx)(hu,{uploader:XI,SD:ZI,children:e})}var $I=g()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:eL});function eL(){let{queryClient:e}=$I.useRouteContext();return(0,B.jsxs)(`html`,{lang:`en`,children:[(0,B.jsxs)(`head`,{children:[(0,B.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,B.jsx)(C,{})]}),(0,B.jsxs)(`body`,{children:[(0,B.jsx)(`div`,{id:`root`,children:(0,B.jsx)(v,{client:e,children:(0,B.jsx)(QI,{children:(0,B.jsx)(be,{children:(0,B.jsx)(m,{})})})})}),(0,B.jsx)(D,{})]})]})}var tL=E(`/tokens`)({component:w(()=>ae(()=>import(`./tokens-FnhMN5oT.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),nL=()=>ae(()=>import(`./logs-9Q-LQWWo.js`),__vite__mapDeps([7,1,2,3,8,5,4])),rL=F({page:ne().optional().default(1)}),iL=E(`/logs`)({validateSearch:rL,component:w(nL,`component`)}),aL=E(`/`)({component:w(()=>ae(()=>import(`./routes-MR1DKizN.js`),__vite__mapDeps([9,1,2,3,8,5,4])),`component`)}),oL=()=>ae(()=>import(`./show-DaKh4LaA.js`),__vite__mapDeps([10,1,2,3,5,4,6])),sL=F({id:ne()}),cL=E(`/requests/show`)({validateSearch:sL,component:w(oL,`component`)}),lL=tL.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>$I}),uL=iL.update({id:`/logs`,path:`/logs`,getParentRoute:()=>$I}),dL={IndexRoute:aL.update({id:`/`,path:`/`,getParentRoute:()=>$I}),LogsRoute:uL,TokensRoute:lL,RequestsShowRoute:cL.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>$I})},fL=$I._addFileChildren(dL)._addFileTypes(),pL=new fe({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),mL=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),te):void 0;mL&&oe(pL,mL);var hL=window.__SONAMU_SSR_CONFIG__,gL=y({routeTree:fL,context:{queryClient:pL},defaultPreload:`intent`});(async()=>{await gL.load(),document.documentElement.innerHTML&&mL?hL?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),pe.createRoot(document).render((0,B.jsx)(T,{router:gL}))):pe.hydrateRoot(document,(0,B.jsx)(T,{router:gL})):pe.createRoot(document).render((0,B.jsx)(T,{router:gL}))})(),window.__TANSTACK_QUERY_CLIENT__=pL;export{ge as a,eb as i,iL as n,HP as r,cL as t};
|
|
116
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function xN(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:wN(t,`input`,e.processors),output:wN(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function SN(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return SN(r.element,n);if(r.type===`set`)return SN(r.valueType,n);if(r.type===`lazy`)return SN(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return SN(r.innerType,n);if(r.type===`intersection`)return SN(r.left,n)||SN(r.right,n);if(r.type===`record`||r.type===`map`)return SN(r.keyType,n)||SN(r.valueType,n);if(r.type===`pipe`)return SN(r.in,n)||SN(r.out,n);if(r.type===`object`){for(let e in r.shape)if(SN(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(SN(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(SN(e,n))return!0;return!!(r.rest&&SN(r.rest,n))}return!1}var CN=(e,t={})=>n=>{let r=vN({...n,processors:t});return yN(e,r),bN(r,e),xN(r,e)},wN=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=vN({...i??{},target:a,io:t,processors:n});return yN(e,o),bN(o,e),xN(o,e)},TN=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},EN=(e,t,n,r)=>{n.not={}},DN=(e,t,n,r)=>{let i=e._zod.def,a=ij(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ON=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},kN=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},AN=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=yN(a.element,t,{...r,path:[...r.path,`items`]})},jN=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=yN(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=yN(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},MN=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>yN(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},NN=(e,t,n,r)=>{let i=e._zod.def,a=yN(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=yN(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},PN=(e,t,n,r)=>{let i=e._zod.def,a=yN(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},FN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},IN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},LN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},RN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},zN=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;yN(a,t,r);let o=t.seen.get(e);o.ref=a},BN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},VN=(e,t,n,r)=>{let i=e._zod.def;yN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},HN=Q(`ZodError`,(e,t)=>{zj.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Hj(e,t)},flatten:{value:t=>Vj(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,aj,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,aj,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),UN=Uj(HN),WN=Wj(HN),GN=Gj(HN),KN=qj(HN),qN=Yj(HN),JN=Xj(HN),YN=Zj(HN),XN=Qj(HN),ZN=$j(HN),QN=eM(HN),$N=tM(HN),eP=nM(HN),tP=Q(`ZodType`,(e,t)=>(_M.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:wN(e,`input`),output:wN(e,`output`)}}),e.toJSONSchema=CN(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(fj(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>xj(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>UN(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>GN(e,t,n),e.parseAsync=async(t,n)=>WN(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>KN(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>qN(e,t,n),e.decode=(t,n)=>JN(e,t,n),e.encodeAsync=async(t,n)=>YN(e,t,n),e.decodeAsync=async(t,n)=>XN(e,t,n),e.safeEncode=(t,n)=>ZN(e,t,n),e.safeDecode=(t,n)=>QN(e,t,n),e.safeEncodeAsync=async(t,n)=>$N(e,t,n),e.safeDecodeAsync=async(t,n)=>eP(e,t,n),e.refine=(t,n)=>e.check(zP(t,n)),e.superRefine=t=>e.check(BP(t)),e.overwrite=t=>e.check(pN(t)),e.optional=()=>xP(e),e.exactOptional=()=>CP(e),e.nullable=()=>TP(e),e.nullish=()=>xP(TP(e)),e.nonoptional=t=>jP(e,t),e.array=()=>uP(e),e.or=t=>pP([e,t]),e.and=t=>hP(e,t),e.transform=t=>FP(e,yP(t)),e.default=t=>DP(e,t),e.prefault=t=>kP(e,t),e.catch=t=>NP(e,t),e.pipe=t=>FP(e,t),e.readonly=()=>LP(e),e.describe=t=>{let n=e.clone();return tN.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return tN.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return tN.get(e);let n=e.clone();return tN.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),nP=Q(`ZodNumber`,(e,t)=>{vM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TN(e,t,n),e.gt=(t,n)=>e.check(sN(t,n)),e.gte=(t,n)=>e.check(cN(t,n)),e.min=(t,n)=>e.check(cN(t,n)),e.lt=(t,n)=>e.check(aN(t,n)),e.lte=(t,n)=>e.check(oN(t,n)),e.max=(t,n)=>e.check(oN(t,n)),e.int=t=>e.check(iP(t)),e.safe=t=>e.check(iP(t)),e.positive=t=>e.check(sN(0,t)),e.nonnegative=t=>e.check(cN(0,t)),e.negative=t=>e.check(aN(0,t)),e.nonpositive=t=>e.check(oN(0,t)),e.multipleOf=(t,n)=>e.check(lN(t,n)),e.step=(t,n)=>e.check(lN(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),rP=Q(`ZodNumberFormat`,(e,t)=>{yM.init(e,t),nP.init(e,t)});function iP(e){return nN(rP,e)}var aP=Q(`ZodUnknown`,(e,t)=>{bM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function oP(){return rN(aP)}var sP=Q(`ZodNever`,(e,t)=>{xM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EN(e,t,n)});function cP(e){return iN(sP,e)}var lP=Q(`ZodArray`,(e,t)=>{CM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AN(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(dN(t,n)),e.nonempty=t=>e.check(dN(1,t)),e.max=(t,n)=>e.check(uN(t,n)),e.length=(t,n)=>e.check(fN(t,n)),e.unwrap=()=>e.element});function uP(e,t){return mN(lP,e,t)}var dP=Q(`ZodObject`,(e,t)=>{OM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jN(e,t,n,r),$(e,`shape`,()=>t.shape),e.keyof=()=>_P(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:oP()}),e.loose=()=>e.clone({...e._zod.def,catchall:oP()}),e.strict=()=>e.clone({...e._zod.def,catchall:cP()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Dj(e,t),e.safeExtend=t=>Oj(e,t),e.merge=t=>kj(e,t),e.pick=t=>Tj(e,t),e.omit=t=>Ej(e,t),e.partial=(...t)=>Aj(bP,e,t[0]),e.required=(...t)=>jj(AP,e,t[0])}),fP=Q(`ZodUnion`,(e,t)=>{AM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MN(e,t,n,r),e.options=t.options});function pP(e,t){return new fP({type:`union`,options:e,...Sj(t)})}var mP=Q(`ZodIntersection`,(e,t)=>{jM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NN(e,t,n,r)});function hP(e,t){return new mP({type:`intersection`,left:e,right:t})}var gP=Q(`ZodEnum`,(e,t)=>{PM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DN(e,t,n),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new gP({...t,checks:[],...Sj(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new gP({...t,checks:[],...Sj(r),entries:i})}});function _P(e,t){return new gP({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Sj(t)})}var vP=Q(`ZodTransform`,(e,t)=>{FM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kN(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new tj(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Lj(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Lj(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function yP(e){return new vP({type:`transform`,transform:e})}var bP=Q(`ZodOptional`,(e,t)=>{LM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xP(e){return new bP({type:`optional`,innerType:e})}var SP=Q(`ZodExactOptional`,(e,t)=>{RM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CP(e){return new SP({type:`optional`,innerType:e})}var wP=Q(`ZodNullable`,(e,t)=>{zM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function TP(e){return new wP({type:`nullable`,innerType:e})}var EP=Q(`ZodDefault`,(e,t)=>{BM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function DP(e,t){return new EP({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():vj(t)}})}var OP=Q(`ZodPrefault`,(e,t)=>{HM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kP(e,t){return new OP({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():vj(t)}})}var AP=Q(`ZodNonOptional`,(e,t)=>{UM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jP(e,t){return new AP({type:`nonoptional`,innerType:e,...Sj(t)})}var MP=Q(`ZodCatch`,(e,t)=>{GM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function NP(e,t){return new MP({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var PP=Q(`ZodPipe`,(e,t)=>{KM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zN(e,t,n,r),e.in=t.in,e.out=t.out});function FP(e,t){return new PP({type:`pipe`,in:e,out:t})}var IP=Q(`ZodReadonly`,(e,t)=>{JM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function LP(e){return new IP({type:`readonly`,innerType:e})}var RP=Q(`ZodCustom`,(e,t)=>{XM.init(e,t),tP.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ON(e,t)});function zP(e,t={}){return hN(RP,e,t)}function BP(e){return gN(e)}async function VP(e,t){if(e instanceof File){let[n]=await t([e]);return n}if(Array.isArray(e))return e.length>0&&e.every(e=>e instanceof File)?await t(e):await Promise.all(e.map(e=>VP(e,t)));if(typeof e==`object`&&e&&Object.prototype.toString.call(e)===`[object Object]`){let n={};for(let[r,i]of Object.entries(e))n[r]=await VP(i,t);return n}return e}function HP(e,t){let[n,r]=(0,z.useState)(t),[i,a]=(0,z.useState)(new Map),{uploader:o}=gu();function s(e,t){let n=t.replace(/\./g,`.shape.`).replace(/\[[^\]]+\]/g,`.element`).replace(/^\.element/,`element`),r;return e instanceof dP?r=JA(e.shape,n):e instanceof lP&&(r=JA(e,n)),r===void 0?`normal`:r instanceof bP?`optional`:r instanceof wP?`nullable`:`normal`}return{form:n,setForm:r,register:(t,o)=>{let c=o??s(e,t),l=JA(n,t),u=i.get(t),d={value:l??``,onValueChange:e=>{u!==void 0&&a(e=>{let n=new Map(e);return n.delete(t),n});let i=e;c===`nullable`?i=e===``?null:e:c===`optional`&&(i=e===``?void 0:e);let o=t.indexOf(`.`)===-1&&t.indexOf(`[`)===-1;r(i===void 0&&o?{...n,[t]:void 0}:XA(n,t,i))}};return u&&(d.error=u),d},submit:e=>async()=>{let t=await VP(n,o);return r(t),await e(t)},addError:(e,t)=>{a(n=>{let r=new Map(n);return r.set(e,typeof t==`string`?{content:t}:t),r})},removeError:e=>{a(t=>{let n=new Map(t);return n.delete(e),n})},clearError:()=>{a(new Map)},reset:()=>{r(t)}}}var UP,WP;function GP(){return WP||(WP=1,UP=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}),UP}GP();var KP=`Switch`,[qP]=On(KP),[JP,YP]=qP(KP),XP=z.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=z.useState(null),m=U(t,e=>p(e)),h=z.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=Hn({prop:i,defaultProp:a??!1,onChange:l,caller:KP});return H.jsxs(JP,{scope:n,checked:_,disabled:s,children:[H.jsx(G.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":tF(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:W(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&H.jsx(eF,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});XP.displayName=KP;var ZP=`SwitchThumb`,QP=z.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=YP(ZP,n);return H.jsx(G.span,{"data-state":tF(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});QP.displayName=ZP;var $P=`SwitchBubbleInput`,eF=z.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=z.useRef(null),s=U(o,a),c=wg(n),l=$p(t);return z.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),H.jsx(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});eF.displayName=$P;function tF(e){return e?`checked`:`unchecked`}var nF=XP,rF=QP,iF=z.forwardRef(({className:e,name:t,checked:n,value:r,defaultChecked:i,onValueChange:a,onBlur:o,...s},c)=>{let l=r===void 0?n:r,u=z.useRef(null);z.useImperativeHandle(c,()=>u.current);let d=e=>{a?.(e)};return H.jsxs(H.Fragment,{children:[H.jsx(`input`,{type:`checkbox`,ref:u,name:t,defaultChecked:i,onBlur:o,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),H.jsx(nF,{checked:l,defaultChecked:i,onCheckedChange:d,className:Y(`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...s,children:H.jsx(rF,{className:Y(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0`)})})]})});iF.displayName=`Switch`;var aF=`Tabs`,[oF]=On(aF,[t_]),sF=t_(),[cF,lF]=oF(aF),uF=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=gr(s),[d,f]=Hn({prop:r,onChange:i,defaultProp:a??``,caller:aF});return H.jsx(cF,{scope:n,baseId:$n(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:H.jsx(G.div,{dir:u,"data-orientation":o,...l,ref:t})})});uF.displayName=aF;var dF=`TabsList`,fF=z.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=lF(dF,n),o=sF(n);return H.jsx(p_,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:H.jsx(G.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});fF.displayName=dF;var pF=`TabsTrigger`,mF=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=lF(pF,n),s=sF(n),c=_F(o.baseId,r),l=vF(o.baseId,r),u=r===o.value;return H.jsx(m_,{asChild:!0,...s,focusable:!i,active:u,children:H.jsx(G.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:W(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:W(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:W(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});mF.displayName=pF;var hF=`TabsContent`,gF=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=lF(hF,n),c=_F(s.baseId,r),l=vF(s.baseId,r),u=r===s.value,d=z.useRef(u);return z.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),H.jsx(qn,{present:i||u,children:({present:n})=>H.jsx(G.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});gF.displayName=hF;function _F(e,t){return`${e}-trigger-${t}`}function vF(e,t){return`${e}-content-${t}`}var yF=fF,bF=mF,xF=gF,SF=z.forwardRef(({className:e,...t},n)=>H.jsx(yF,{ref:n,className:Y(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));SF.displayName=yF.displayName;var CF=z.forwardRef(({className:e,...t},n)=>H.jsx(bF,{ref:n,className:Y(`inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm`,e),...t}));CF.displayName=bF.displayName;var wF=z.forwardRef(({className:e,...t},n)=>H.jsx(xF,{ref:n,className:Y(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));wF.displayName=xF.displayName;var TF=z.forwardRef(({className:e,onValueChange:t,onChange:n,...r},i)=>{let a=e=>{t?.(e.target.value),n?.(e)};return H.jsx(`textarea`,{className:Y(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:i,...r,onChange:a})});TF.displayName=`Textarea`;var EF=`ToastProvider`,[DF,OF,kF]=zn(`Toast`),[AF]=On(`Toast`,[kF]),[jF,MF]=AF(EF),NF=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=z.useState(null),[l,u]=z.useState(0),d=z.useRef(!1),f=z.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${EF}\`. Expected non-empty \`string\`.`),H.jsx(DF.Provider,{scope:t,children:H.jsx(jF,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:z.useCallback(()=>u(e=>e+1),[]),onToastRemove:z.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};NF.displayName=EF;var PF=`ToastViewport`,FF=[`F8`],IF=`toast.viewportPause`,LF=`toast.viewportResume`,RF=z.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=FF,label:i=`Notifications ({hotkey})`,...a}=e,o=MF(PF,n),s=OF(n),c=z.useRef(null),l=z.useRef(null),u=z.useRef(null),d=z.useRef(null),f=U(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;z.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),z.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(IF);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(LF);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{!e.contains(t.relatedTarget)&&r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=z.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...dI(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return z.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);fI(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),H.jsxs(Ua,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&H.jsx(BF,{ref:l,onFocusFromOutsideViewport:()=>{fI(h({tabbingDirection:`forwards`}))}}),H.jsx(DF.Slot,{scope:n,children:H.jsx(G.ol,{tabIndex:-1,...a,ref:f})}),m&&H.jsx(BF,{ref:u,onFocusFromOutsideViewport:()=>{fI(h({tabbingDirection:`backwards`}))}})]})});RF.displayName=PF;var zF=`ToastFocusProxy`,BF=z.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=MF(zF,n);return H.jsx(Ww,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;!a.viewport?.contains(t)&&r()}})});BF.displayName=zF;var VF=`Toast`,HF=`toast.swipeStart`,UF=`toast.swipeMove`,WF=`toast.swipeCancel`,GF=`toast.swipeEnd`,KF=z.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Hn({prop:r,defaultProp:i??!0,onChange:a,caller:VF});return H.jsx(qn,{present:n||s,children:H.jsx(YF,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:X(e.onPause),onResume:X(e.onResume),onSwipeStart:W(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:W(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:W(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:W(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});KF.displayName=VF;var[qF,JF]=AF(VF,{onClose(){}}),YF=z.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=MF(VF,n),[g,_]=z.useState(null),v=U(t,e=>_(e)),y=z.useRef(null),b=z.useRef(null),x=i||h.duration,S=z.useRef(0),C=z.useRef(x),w=z.useRef(0),{onToastAdd:T,onToastRemove:E}=h,D=X(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),O=z.useCallback(e=>{!e||e===1/0||(window.clearTimeout(w.current),S.current=new Date().getTime(),w.current=window.setTimeout(D,e))},[D]);z.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{O(C.current),l?.()},n=()=>{let e=new Date().getTime()-S.current;C.current-=e,window.clearTimeout(w.current),c?.()};return e.addEventListener(IF,n),e.addEventListener(LF,t),()=>{e.removeEventListener(IF,n),e.removeEventListener(LF,t)}}},[h.viewport,x,c,l,O]),z.useEffect(()=>{a&&!h.isClosePausedRef.current&&O(x)},[a,x,h.isClosePausedRef,O]),z.useEffect(()=>(T(),()=>E()),[T,E]);let k=z.useMemo(()=>g?oI(g):null,[g]);return h.viewport?H.jsxs(H.Fragment,{children:[k&&H.jsx(XF,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:k}),H.jsx(qF,{scope:n,onClose:D,children:xe.createPortal(H.jsx(DF.ItemSlot,{scope:n,children:H.jsx(Ha,{asChild:!0,onEscapeKeyDown:W(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||D(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:H.jsx(G.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:W(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:W(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:W(e.onPointerMove,e=>{if(!y.current)return;let t=e.clientX-y.current.x,n=e.clientY-y.current.y,r=!!b.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(b.current=l,sI(UF,d,f,{discrete:!1})):cI(l,h.swipeDirection,c)?(b.current=l,sI(HF,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:W(e.onPointerUp,e=>{let t=b.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),b.current=null,y.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};cI(t,h.swipeDirection,h.swipeThreshold)?sI(GF,p,r,{discrete:!0}):sI(WF,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),XF=e=>{let{__scopeToast:t,children:n,...r}=e,i=MF(VF,t),[a,o]=z.useState(!1),[s,c]=z.useState(!1);return lI(()=>o(!0)),z.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:H.jsx(so,{asChild:!0,children:H.jsx(Ww,{...r,children:a&&H.jsxs(H.Fragment,{children:[i.label,` `,n]})})})},ZF=`ToastTitle`,QF=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return H.jsx(G.div,{...r,ref:t})});QF.displayName=ZF;var $F=`ToastDescription`,eI=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return H.jsx(G.div,{...r,ref:t})});eI.displayName=$F;var tI=`ToastAction`,nI=z.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?H.jsx(aI,{altText:n,asChild:!0,children:H.jsx(iI,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${tI}\`. Expected non-empty \`string\`.`),null)});nI.displayName=tI;var rI=`ToastClose`,iI=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=JF(rI,n);return H.jsx(aI,{asChild:!0,children:H.jsx(G.button,{type:`button`,...r,ref:t,onClick:W(e.onClick,i.onClose)})})});iI.displayName=rI;var aI=z.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return H.jsx(G.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function oI(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),uI(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...oI(e))}}),t}function sI(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Gn(i,a):i.dispatchEvent(a)}var cI=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function lI(e=()=>{}){let t=X(e);Bn(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function uI(e){return e.nodeType===e.ELEMENT_NODE}function dI(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fI(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var pI=RF,mI=KF,hI=QF,gI=eI,_I=nI,vI=iI,yI=z.forwardRef(({className:e,...t},n)=>H.jsx(pI,{ref:n,className:Y(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]`,e),...t}));yI.displayName=pI.displayName;var bI=Ca(`group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),xI=z.forwardRef(({className:e,variant:t,...n},r)=>H.jsx(mI,{ref:r,className:Y(bI({variant:t}),e),...n}));xI.displayName=mI.displayName;var SI=z.forwardRef(({className:e,...t},n)=>H.jsx(_I,{ref:n,className:Y(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive`,e),...t}));SI.displayName=_I.displayName;var CI=z.forwardRef(({className:e,...t},n)=>H.jsx(vI,{ref:n,className:Y(`absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...t,children:H.jsx(yu,{className:`h-4 w-4`})}));CI.displayName=vI.displayName;var wI=z.forwardRef(({className:e,...t},n)=>H.jsx(hI,{ref:n,className:Y(`text-sm font-semibold`,e),...t}));wI.displayName=hI.displayName;var TI=z.forwardRef(({className:e,...t},n)=>H.jsx(gI,{ref:n,className:Y(`text-sm opacity-90`,e),...t}));TI.displayName=gI.displayName;var EI=`Toggle`,DI=z.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=Hn({prop:n,onChange:i,defaultProp:r??!1,caller:EI});return H.jsx(G.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:W(e.onClick,()=>{e.disabled||s(!o)})})});DI.displayName=EI;var OI=DI,kI=Ca(`inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-accent hover:text-accent-foreground`},size:{default:`h-10 px-3 min-w-10`,sm:`h-9 px-2.5 min-w-9`,lg:`h-11 px-5 min-w-11`}},defaultVariants:{variant:`default`,size:`default`}}),AI=z.forwardRef(({className:e,variant:t,size:n,value:r,pressed:i,onValueChange:a,onPressedChange:o,...s},c)=>{let l=r===void 0?i:r;return H.jsx(OI,{ref:c,pressed:l,onPressedChange:e=>{a?.(e),o?.(e)},className:Y(kI({variant:t,size:n,className:e})),...s})});AI.displayName=OI.displayName;var jI=`ToggleGroup`,[MI]=On(jI,[t_]),NI=t_(),PI=z.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`){let e=r;return H.jsx(LI,{...e,ref:t})}if(n===`multiple`){let e=r;return H.jsx(RI,{...e,ref:t})}throw Error(`Missing prop \`type\` expected on \`${jI}\``)});PI.displayName=jI;var[FI,II]=MI(jI),LI=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Hn({prop:n,defaultProp:r??``,onChange:i,caller:jI});return H.jsx(FI,{scope:e.__scopeToggleGroup,type:`single`,value:z.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:z.useCallback(()=>s(``),[s]),children:H.jsx(VI,{...a,ref:t})})}),RI=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Hn({prop:n,defaultProp:r??[],onChange:i,caller:jI}),c=z.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=z.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return H.jsx(FI,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:H.jsx(VI,{...a,ref:t})})});PI.displayName=jI;var[zI,BI]=MI(jI),VI=z.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=NI(n),u=gr(o),d={role:`group`,dir:u,...c};return H.jsx(zI,{scope:n,rovingFocus:i,disabled:r,children:i?H.jsx(p_,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:H.jsx(G.div,{...d,ref:t})}):H.jsx(G.div,{...d,ref:t})})}),HI=`ToggleGroupItem`,UI=z.forwardRef((e,t)=>{let n=II(HI,e.__scopeToggleGroup),r=BI(HI,e.__scopeToggleGroup),i=NI(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=z.useRef(null);return r.rovingFocus?H.jsx(m_,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:H.jsx(WI,{...s,ref:t})}):H.jsx(WI,{...s,ref:t})});UI.displayName=HI;var WI=z.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=II(HI,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===`single`?o:void 0;return H.jsx(DI,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),GI=PI,KI=UI,qI=z.createContext({size:`default`,variant:`default`}),JI=z.forwardRef(({className:e,variant:t,size:n,children:r,...i},a)=>H.jsx(GI,{ref:a,className:Y(`flex items-center justify-center gap-1`,e),...i,children:H.jsx(qI.Provider,{value:{variant:t,size:n},children:r})}));JI.displayName=GI.displayName;var YI=z.forwardRef(({className:e,children:t,variant:n,size:r,...i},a)=>{let o=z.useContext(qI);return H.jsx(KI,{ref:a,className:Y(kI({variant:o.variant||n,size:o.size||r}),e),...i,children:t})});YI.displayName=KI.displayName;var XI=async e=>(e.length===0||console.log(`File upload not implemented yet`),[]),ZI=e=>ie(e);function QI({children:e}){return(0,B.jsx)(hu,{uploader:XI,SD:ZI,children:e})}var $I=g()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:eL});function eL(){let{queryClient:e}=$I.useRouteContext();return(0,B.jsxs)(`html`,{lang:`en`,children:[(0,B.jsxs)(`head`,{children:[(0,B.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,B.jsx)(C,{})]}),(0,B.jsxs)(`body`,{children:[(0,B.jsx)(`div`,{id:`root`,children:(0,B.jsx)(v,{client:e,children:(0,B.jsx)(QI,{children:(0,B.jsx)(be,{children:(0,B.jsx)(m,{})})})})}),(0,B.jsx)(D,{})]})]})}var tL=E(`/tokens`)({component:w(()=>ae(()=>import(`./tokens-Bch6XO9K.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),nL=()=>ae(()=>import(`./logs-CQDBOCud.js`),__vite__mapDeps([7,1,2,3,8,5,4])),rL=F({page:ne().optional().default(1)}),iL=E(`/logs`)({validateSearch:rL,component:w(nL,`component`)}),aL=E(`/`)({component:w(()=>ae(()=>import(`./routes-MR1DKizN.js`),__vite__mapDeps([9,1,2,3,8,5,4])),`component`)}),oL=()=>ae(()=>import(`./show--z3WxDb0.js`),__vite__mapDeps([10,1,2,3,5,4,6])),sL=F({id:ne()}),cL=E(`/requests/show`)({validateSearch:sL,component:w(oL,`component`)}),lL=tL.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>$I}),uL=iL.update({id:`/logs`,path:`/logs`,getParentRoute:()=>$I}),dL={IndexRoute:aL.update({id:`/`,path:`/`,getParentRoute:()=>$I}),LogsRoute:uL,TokensRoute:lL,RequestsShowRoute:cL.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>$I})},fL=$I._addFileChildren(dL)._addFileTypes(),pL=new fe({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),mL=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),te):void 0;mL&&oe(pL,mL);var hL=window.__SONAMU_SSR_CONFIG__,gL=y({routeTree:fL,context:{queryClient:pL},defaultPreload:`intent`});(async()=>{await gL.load(),document.documentElement.innerHTML&&mL?hL?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),pe.createRoot(document).render((0,B.jsx)(T,{router:gL}))):pe.hydrateRoot(document,(0,B.jsx)(T,{router:gL})):pe.createRoot(document).render((0,B.jsx)(T,{router:gL}))})(),window.__TANSTACK_QUERY_CLIENT__=pL;export{ge as a,eb as i,iL as n,HP as r,cL as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{l as t,u as n}from"./vendor-tanstack-CUxlo6YN.js";import{i as r,r as i}from"./vendor-react-DH4kUfK2.js";import{n as a}from"./index-DLrkHIo2.js";import{n as o,t as s}from"./cost-DE_8cLD-.js";import{n as c,r as l,t as u}from"./services.generated-C0OpNm5q.js";var d=e(r()),f=i(),p=e=>(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,f.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m15 18l-6-6l6-6`})}),m=e=>(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,f.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m9 18l6-6l-6-6`})}),h=50;function g(e){let t=new Date(e);return`${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function _(e){return e.toLocaleString()}function v(e){let t=e.input_tokens+e.cache_read_tokens+e.cache_creation_tokens;return t===0?`—`:`${Math.round(e.cache_read_tokens/t*100)}%`}function y(e,t=30){return e.length>t?`${e.slice(0,t)}...`:e}function b({page:e,onPageChange:r}={}){let i=n(),[a,b]=(0,d.useState)(1),x=e??a,S=r??b,[C,w]=(0,d.useState)(``),{data:T}=l.useTokens(`A`),E=(T?.rows??[]).map(e=>e.name).filter(Boolean),{data:D,isLoading:O}=c.useRequestLogs(`A`,{num:h,page:x,orderBy:`id-desc`,...C?{token_name:C}:{}}),{data:k}=u.useTotalCost(C||void 0),A=D?.rows??[],j=D?.total??0,M=Math.ceil(j/h);return(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-2 mb-3 flex-wrap`,children:[E.length>0&&(0,f.jsxs)(`select`,{value:C,onChange:e=>{w(e.target.value),S(1)},className:`border border-sand-200 rounded-md px-2 py-1 text-xs text-sand-700 bg-white focus:outline-none focus:border-sienna-300`,children:[(0,f.jsx)(`option`,{value:``,children:`All Tokens`}),E.map(e=>(0,f.jsx)(`option`,{value:e,children:e},e))]}),(0,f.jsxs)(`span`,{className:`text-[11px] text-sand-400`,children:[j,` results`]}),(0,f.jsx)(`span`,{className:`text-[11px] tabular-nums font-medium text-sienna-600`,children:o(k?.usd??0)})]}),O?(0,f.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:5}).map((e,t)=>(0,f.jsx)(`div`,{className:`h-8 bg-sand-100 rounded animate-pulse`},`skel-${t}`))}):A.length===0?(0,f.jsx)(`div`,{className:`text-sand-400 text-center py-12 text-sm`,children:`No requests yet.`}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`rounded-lg bg-sand-50 overflow-hidden`,children:(0,f.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(`tr`,{className:`border-b border-sand-200`,children:[(0,f.jsx)(`th`,{className:`text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`ID`}),(0,f.jsx)(`th`,{className:`text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Date`}),(0,f.jsx)(`th`,{className:`text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Token`}),(0,f.jsx)(`th`,{className:`text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Query`}),(0,f.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`In`}),(0,f.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Out`}),(0,f.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`C.Read`}),(0,f.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`C.Write`}),(0,f.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Hit`}),(0,f.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Cost`}),(0,f.jsx)(`th`,{className:`w-8 px-2 py-2.5`})]})}),(0,f.jsx)(`tbody`,{className:`divide-y divide-sand-200/60`,children:A.map(e=>(0,f.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 cursor-pointer`,onClick:t=>{if(t.metaKey||t.ctrlKey){window.open(`/requests/show?id=${e.id}`,`_blank`);return}i({to:`/requests/show`,search:{id:e.id}})},children:[(0,f.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,f.jsx)(t,{to:`/requests/show`,search:{id:e.id},onClick:e=>e.stopPropagation(),className:`text-xs text-sand-500 tabular-nums hover:text-sienna-500`,children:e.id})}),(0,f.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,f.jsx)(`span`,{className:`text-[10px] text-sand-400 tabular-nums whitespace-nowrap`,children:g(e.created_at)})}),(0,f.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,f.jsx)(`span`,{className:`text-xs text-sand-500`,children:e.token_name})}),(0,f.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,f.jsx)(`span`,{className:`text-sand-800 truncate max-w-48`,title:e.query,children:y(e.query)})}),(0,f.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:_(e.input_tokens)}),(0,f.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:_(e.output_tokens)}),(0,f.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:_(e.cache_read_tokens)}),(0,f.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:_(e.cache_creation_tokens)}),(0,f.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:v(e)}),(0,f.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:e.cost_usd===null?`-`:s(e.cost_usd)}),(0,f.jsx)(`td`,{className:`px-2 py-2.5`,children:(0,f.jsx)(m,{className:`size-4 text-sand-400`})})]},e.id))})]})}),M>1&&(0,f.jsxs)(`div`,{className:`flex items-center justify-center gap-3 mt-3`,children:[(0,f.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors`,disabled:x===1,onClick:()=>S(x-1),children:(0,f.jsx)(p,{className:`size-4`})}),(0,f.jsxs)(`span`,{className:`text-[11px] text-sand-400 tabular-nums`,children:[x,` / `,M]}),(0,f.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors`,disabled:x===M,onClick:()=>S(x+1),children:(0,f.jsx)(m,{className:`size-4`})})]})]})]})}function x(){let{page:e}=a.useSearch(),t=a.useNavigate();return(0,f.jsxs)(`div`,{className:`space-y-5 max-w-300 mx-auto -translate-x-4`,children:[(0,f.jsx)(`h1`,{className:`text-xl font-medium text-sand-900 tracking-tight`,children:`Request Logs`}),(0,f.jsx)(b,{page:e,onPageChange:e=>t({search:{page:e}})})]})}export{x as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-Dw2cE7zH.js";import{l as r}from"./vendor-tanstack-CUxlo6YN.js";import{i,r as a}from"./vendor-react-DH4kUfK2.js";import{t as o}from"./index-CiLfNFWG.js";import{n as s}from"./services.generated-C0OpNm5q.js";import{n as c,t as l}from"./copy-DdGJDXSK.js";function u(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var d=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,f=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,p={};function m(e,t){return((t||p).jsx?f:d).test(e)}var h=/[ \t\n\f\r]/g;function g(e){return typeof e==`object`?e.type===`text`?_(e.value):!1:_(e)}function _(e){return e.replace(h,``)===``}var v=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};v.prototype.normal={},v.prototype.property={},v.prototype.space=void 0;function y(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new v(n,r,t)}function b(e){return e.toLowerCase()}var x=class{constructor(e,t){this.attribute=t,this.property=e}};x.prototype.attribute=``,x.prototype.booleanish=!1,x.prototype.boolean=!1,x.prototype.commaOrSpaceSeparated=!1,x.prototype.commaSeparated=!1,x.prototype.defined=!1,x.prototype.mustUseProperty=!1,x.prototype.number=!1,x.prototype.overloadedBoolean=!1,x.prototype.property=``,x.prototype.spaceSeparated=!1,x.prototype.space=void 0;var S=e({boolean:()=>w,booleanish:()=>T,commaOrSpaceSeparated:()=>A,commaSeparated:()=>k,number:()=>D,overloadedBoolean:()=>E,spaceSeparated:()=>O}),C=0,w=j(),T=j(),E=j(),D=j(),O=j(),k=j(),A=j();function j(){return 2**++C}var M=Object.keys(S),N=class extends x{constructor(e,t,n,r){let i=-1;if(super(e,t),ee(this,`space`,r),typeof n==`number`)for(;++i<M.length;){let e=M[i];ee(this,M[i],(n&S[e])===S[e])}}};N.prototype.defined=!0;function ee(e,t,n){n&&(e[t]=n)}function P(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new N(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[b(r)]=r,n[b(a.attribute)]=r}return new v(t,n,e.space)}var F=P({properties:{ariaActiveDescendant:null,ariaAtomic:T,ariaAutoComplete:null,ariaBusy:T,ariaChecked:T,ariaColCount:D,ariaColIndex:D,ariaColSpan:D,ariaControls:O,ariaCurrent:null,ariaDescribedBy:O,ariaDetails:null,ariaDisabled:T,ariaDropEffect:O,ariaErrorMessage:null,ariaExpanded:T,ariaFlowTo:O,ariaGrabbed:T,ariaHasPopup:null,ariaHidden:T,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:O,ariaLevel:D,ariaLive:null,ariaModal:T,ariaMultiLine:T,ariaMultiSelectable:T,ariaOrientation:null,ariaOwns:O,ariaPlaceholder:null,ariaPosInSet:D,ariaPressed:T,ariaReadOnly:T,ariaRelevant:null,ariaRequired:T,ariaRoleDescription:O,ariaRowCount:D,ariaRowIndex:D,ariaRowSpan:D,ariaSelected:T,ariaSetSize:D,ariaSort:null,ariaValueMax:D,ariaValueMin:D,ariaValueNow:D,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function I(e,t){return t in e?e[t]:t}function te(e,t){return I(e,t.toLowerCase())}var ne=P({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:k,acceptCharset:O,accessKey:O,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:O,autoFocus:w,autoPlay:w,blocking:O,capture:null,charSet:null,checked:w,cite:null,className:O,cols:D,colSpan:null,content:null,contentEditable:T,controls:w,controlsList:O,coords:D|k,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:E,draggable:T,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:O,height:D,hidden:E,high:D,href:null,hrefLang:null,htmlFor:O,httpEquiv:O,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:O,itemRef:O,itemScope:w,itemType:O,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:D,manifest:null,max:null,maxLength:D,media:null,method:null,min:null,minLength:D,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:D,pattern:null,ping:O,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:O,required:w,reversed:w,rows:D,rowSpan:D,sandbox:O,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shape:null,size:D,sizes:null,slot:null,span:D,spellCheck:T,src:null,srcDoc:null,srcLang:null,srcSet:null,start:D,step:null,style:null,tabIndex:D,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:T,width:D,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:O,axis:null,background:null,bgColor:null,border:D,borderColor:null,bottomMargin:D,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:D,leftMargin:D,link:null,longDesc:null,lowSrc:null,marginHeight:D,marginWidth:D,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:D,rules:null,scheme:null,scrolling:T,standby:null,summary:null,text:null,topMargin:D,valueType:null,version:null,vAlign:null,vLink:null,vSpace:D,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:w,disableRemotePlayback:w,prefix:null,property:null,results:D,security:null,unselectable:null},space:`html`,transform:te}),re=P({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:A,accentHeight:D,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:D,amplitude:D,arabicForm:null,ascent:D,attributeName:null,attributeType:null,azimuth:D,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:D,by:null,calcMode:null,capHeight:D,className:O,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:D,diffuseConstant:D,direction:null,display:null,dur:null,divisor:D,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:D,enableBackground:null,end:null,event:null,exponent:D,externalResourcesRequired:null,fill:null,fillOpacity:D,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:k,g2:k,glyphName:k,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:D,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:D,horizOriginX:D,horizOriginY:D,id:null,ideographic:D,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:D,k:D,k1:D,k2:D,k3:D,k4:D,kernelMatrix:A,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:D,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:D,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:D,overlineThickness:D,paintOrder:null,panose1:null,path:null,pathLength:D,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:O,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:D,pointsAtY:D,pointsAtZ:D,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:A,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:A,rev:A,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:A,requiredFeatures:A,requiredFonts:A,requiredFormats:A,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:D,specularExponent:D,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:D,strikethroughThickness:D,string:null,stroke:null,strokeDashArray:A,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:D,strokeOpacity:D,strokeWidth:null,style:null,surfaceScale:D,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:A,tabIndex:D,tableValues:null,target:null,targetX:D,targetY:D,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:A,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:D,underlineThickness:D,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:D,values:null,vAlphabetic:D,vMathematical:D,vectorEffect:null,vHanging:D,vIdeographic:D,version:null,vertAdvY:D,vertOriginX:D,vertOriginY:D,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:D,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:I}),ie=P({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ae=P({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:te}),oe=P({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),se={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ce=/[A-Z]/g,le=/-[a-z]/g,ue=/^data[-\w.:]+$/i;function de(e,t){let n=b(t),r=t,i=x;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ue.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(le,pe);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!le.test(e)){let n=e.replace(ce,fe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=N}return new i(r,t)}function fe(e){return`-`+e.toLowerCase()}function pe(e){return e.charAt(1).toUpperCase()}var me=y([F,ne,ie,ae,oe],`html`),he=y([F,re,ie,ae,oe],`svg`);function ge(e){return e.join(` `).trim()}var _e=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-Dw2cE7zH.js";import{l as r}from"./vendor-tanstack-CUxlo6YN.js";import{i,r as a}from"./vendor-react-DH4kUfK2.js";import{t as o}from"./index-DLrkHIo2.js";import{n as s}from"./services.generated-C0OpNm5q.js";import{n as c,t as l}from"./copy-DdGJDXSK.js";function u(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var d=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,f=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,p={};function m(e,t){return((t||p).jsx?f:d).test(e)}var h=/[ \t\n\f\r]/g;function g(e){return typeof e==`object`?e.type===`text`?_(e.value):!1:_(e)}function _(e){return e.replace(h,``)===``}var v=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};v.prototype.normal={},v.prototype.property={},v.prototype.space=void 0;function y(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new v(n,r,t)}function b(e){return e.toLowerCase()}var x=class{constructor(e,t){this.attribute=t,this.property=e}};x.prototype.attribute=``,x.prototype.booleanish=!1,x.prototype.boolean=!1,x.prototype.commaOrSpaceSeparated=!1,x.prototype.commaSeparated=!1,x.prototype.defined=!1,x.prototype.mustUseProperty=!1,x.prototype.number=!1,x.prototype.overloadedBoolean=!1,x.prototype.property=``,x.prototype.spaceSeparated=!1,x.prototype.space=void 0;var S=e({boolean:()=>w,booleanish:()=>T,commaOrSpaceSeparated:()=>A,commaSeparated:()=>k,number:()=>D,overloadedBoolean:()=>E,spaceSeparated:()=>O}),C=0,w=j(),T=j(),E=j(),D=j(),O=j(),k=j(),A=j();function j(){return 2**++C}var M=Object.keys(S),N=class extends x{constructor(e,t,n,r){let i=-1;if(super(e,t),ee(this,`space`,r),typeof n==`number`)for(;++i<M.length;){let e=M[i];ee(this,M[i],(n&S[e])===S[e])}}};N.prototype.defined=!0;function ee(e,t,n){n&&(e[t]=n)}function P(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new N(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[b(r)]=r,n[b(a.attribute)]=r}return new v(t,n,e.space)}var F=P({properties:{ariaActiveDescendant:null,ariaAtomic:T,ariaAutoComplete:null,ariaBusy:T,ariaChecked:T,ariaColCount:D,ariaColIndex:D,ariaColSpan:D,ariaControls:O,ariaCurrent:null,ariaDescribedBy:O,ariaDetails:null,ariaDisabled:T,ariaDropEffect:O,ariaErrorMessage:null,ariaExpanded:T,ariaFlowTo:O,ariaGrabbed:T,ariaHasPopup:null,ariaHidden:T,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:O,ariaLevel:D,ariaLive:null,ariaModal:T,ariaMultiLine:T,ariaMultiSelectable:T,ariaOrientation:null,ariaOwns:O,ariaPlaceholder:null,ariaPosInSet:D,ariaPressed:T,ariaReadOnly:T,ariaRelevant:null,ariaRequired:T,ariaRoleDescription:O,ariaRowCount:D,ariaRowIndex:D,ariaRowSpan:D,ariaSelected:T,ariaSetSize:D,ariaSort:null,ariaValueMax:D,ariaValueMin:D,ariaValueNow:D,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function I(e,t){return t in e?e[t]:t}function te(e,t){return I(e,t.toLowerCase())}var ne=P({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:k,acceptCharset:O,accessKey:O,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:O,autoFocus:w,autoPlay:w,blocking:O,capture:null,charSet:null,checked:w,cite:null,className:O,cols:D,colSpan:null,content:null,contentEditable:T,controls:w,controlsList:O,coords:D|k,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:E,draggable:T,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:O,height:D,hidden:E,high:D,href:null,hrefLang:null,htmlFor:O,httpEquiv:O,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:O,itemRef:O,itemScope:w,itemType:O,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:D,manifest:null,max:null,maxLength:D,media:null,method:null,min:null,minLength:D,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:D,pattern:null,ping:O,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:O,required:w,reversed:w,rows:D,rowSpan:D,sandbox:O,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shape:null,size:D,sizes:null,slot:null,span:D,spellCheck:T,src:null,srcDoc:null,srcLang:null,srcSet:null,start:D,step:null,style:null,tabIndex:D,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:T,width:D,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:O,axis:null,background:null,bgColor:null,border:D,borderColor:null,bottomMargin:D,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:D,leftMargin:D,link:null,longDesc:null,lowSrc:null,marginHeight:D,marginWidth:D,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:D,rules:null,scheme:null,scrolling:T,standby:null,summary:null,text:null,topMargin:D,valueType:null,version:null,vAlign:null,vLink:null,vSpace:D,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:w,disableRemotePlayback:w,prefix:null,property:null,results:D,security:null,unselectable:null},space:`html`,transform:te}),re=P({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:A,accentHeight:D,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:D,amplitude:D,arabicForm:null,ascent:D,attributeName:null,attributeType:null,azimuth:D,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:D,by:null,calcMode:null,capHeight:D,className:O,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:D,diffuseConstant:D,direction:null,display:null,dur:null,divisor:D,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:D,enableBackground:null,end:null,event:null,exponent:D,externalResourcesRequired:null,fill:null,fillOpacity:D,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:k,g2:k,glyphName:k,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:D,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:D,horizOriginX:D,horizOriginY:D,id:null,ideographic:D,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:D,k:D,k1:D,k2:D,k3:D,k4:D,kernelMatrix:A,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:D,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:D,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:D,overlineThickness:D,paintOrder:null,panose1:null,path:null,pathLength:D,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:O,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:D,pointsAtY:D,pointsAtZ:D,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:A,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:A,rev:A,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:A,requiredFeatures:A,requiredFonts:A,requiredFormats:A,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:D,specularExponent:D,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:D,strikethroughThickness:D,string:null,stroke:null,strokeDashArray:A,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:D,strokeOpacity:D,strokeWidth:null,style:null,surfaceScale:D,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:A,tabIndex:D,tableValues:null,target:null,targetX:D,targetY:D,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:A,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:D,underlineThickness:D,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:D,values:null,vAlphabetic:D,vMathematical:D,vectorEffect:null,vHanging:D,vIdeographic:D,version:null,vertAdvY:D,vertOriginX:D,vertOriginY:D,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:D,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:I}),ie=P({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ae=P({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:te}),oe=P({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),se={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ce=/[A-Z]/g,le=/-[a-z]/g,ue=/^data[-\w.:]+$/i;function de(e,t){let n=b(t),r=t,i=x;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ue.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(le,pe);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!le.test(e)){let n=e.replace(ce,fe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=N}return new i(r,t)}function fe(e){return`-`+e.toLowerCase()}function pe(e){return e.charAt(1).toUpperCase()}var me=y([F,ne,ie,ae,oe],`html`),he=y([F,re,ie,ae,oe],`svg`);function ge(e){return e.join(` `).trim()}var _e=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
2
2
|
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),ve=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(_e());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),ye=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),be=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ve()),r=ye();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),xe=Ce(`end`),Se=Ce(`start`);function Ce(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function we(e){let t=Se(e),n=xe(e);if(t&&n)return{start:t,end:n}}function Te(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?De(e.position):`start`in e||`end`in e?De(e):`line`in e||`column`in e?Ee(e):``}function Ee(e){return Oe(e&&e.line)+`:`+Oe(e&&e.column)}function De(e){return Ee(e&&e.start)+`-`+Ee(e&&e.end)}function Oe(e){return e&&typeof e==`number`?e:1}var L=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Te(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};L.prototype.file=``,L.prototype.name=``,L.prototype.reason=``,L.prototype.message=``,L.prototype.stack=``,L.prototype.column=void 0,L.prototype.line=void 0,L.prototype.ancestors=void 0,L.prototype.cause=void 0,L.prototype.fatal=void 0,L.prototype.place=void 0,L.prototype.ruleId=void 0,L.prototype.source=void 0;var ke=t(be(),1),Ae={}.hasOwnProperty,je=new Map,Me=/[A-Z]/g,Ne=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Pe=new Set([`td`,`th`]),Fe=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Ie(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=qe(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Ke(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?he:me,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Le(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Le(e,t,n){if(t.type===`element`)return Re(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return ze(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Ve(e,t,n);if(t.type===`mdxjsEsm`)return Be(e,t);if(t.type===`root`)return He(e,t,n);if(t.type===`text`)return Ue(e,t)}function Re(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=he,e.schema=i),e.ancestors.push(t);let a=$e(e,t.tagName,!1),o=Je(e,t),s=Xe(e,t);return Ne.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!g(e):!0})),We(e,o,a,t),Ge(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ze(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}et(e,t.position)}function Be(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);et(e,t.position)}function Ve(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=he,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:$e(e,t.name,!0),o=Ye(e,t),s=Xe(e,t);return We(e,o,a,t),Ge(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function He(e,t,n){let r={};return Ge(r,Xe(e,t)),e.create(t,e.Fragment,r,n)}function Ue(e,t){return t.value}function We(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ge(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Ke(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function qe(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Se(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Je(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ae.call(t.properties,i)){let a=Ze(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Pe.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Ye(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else et(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else et(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Xe(e,t){let n=[],r=-1,i=e.passKeys?new Map:je;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Le(e,a,o);s!==void 0&&n.push(s)}return n}function Ze(e,t,n){let r=de(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?u(n):ge(n)),r.property===`style`){let t=typeof n==`object`?n:Qe(e,String(n));return e.stylePropertyNameCase===`css`&&(t=tt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?se[r.property]||r.property:r.attribute,n]}}function Qe(e,t){try{return(0,ke.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new L("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Fe+`#cannot-parse-style-attribute`,r}}function $e(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=m(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=m(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ae.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);et(e)}function et(e,t){let n=new L("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Fe+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function tt(e){let t={},n;for(n in e)Ae.call(e,n)&&(t[nt(n)]=e[n]);return t}function nt(e){let t=e.replace(Me,rt);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function rt(e){return`-`+e.toLowerCase()}var it={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},at={};function ot(e,t){let n=t||at;return st(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function st(e,t,n){if(lt(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return ct(e.children,t,n)}return Array.isArray(e)?ct(e,t,n):``}function ct(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=st(e[i],t,n);return r.join(``)}function lt(e){return!!(e&&typeof e==`object`)}var ut=document.createElement(`i`);function dt(e){let t=`&`+e+`;`;ut.innerHTML=t;let n=ut.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function R(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function z(e,t){return e.length>0?(R(e,e.length,0,t),e):t}var ft={}.hasOwnProperty;function pt(e){let t={},n=-1;for(;++n<e.length;)mt(t,e[n]);return t}function mt(e,t){let n;for(n in t){let r=(ft.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ft.call(r,a)||(r[a]=[]);let e=i[a];ht(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ht(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);R(e,0,0,r)}function gt(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function B(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var V=K(/[A-Za-z]/),H=K(/[\dA-Za-z]/),_t=K(/[#-'*+\--9=?A-Z^-~]/);function vt(e){return e!==null&&(e<32||e===127)}var yt=K(/\d/),bt=K(/[\dA-Fa-f]/),xt=K(/[!-/:-@[-`{-~]/);function U(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function G(e){return e===-2||e===-1||e===32}var St=K(/\p{P}|\p{S}/u),Ct=K(/\s/);function K(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function wt(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&H(e.charCodeAt(n+1))&&H(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return G(r)?(e.enter(n),s(r)):t(r)}function s(r){return G(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Tt={tokenize:Et};function Et(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return U(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Dt={tokenize:kt},Ot={tokenize:At};function kt(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return R(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ot,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ot,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return U(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;R(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function At(e,t,n){return q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function jt(e){if(e===null||W(e)||Ct(e))return 1;if(St(e))return 2}function Mt(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Nt={name:`attention`,resolveAll:Pt,tokenize:Ft};function Pt(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};It(d,-c),It(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=z(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=z(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=z(l,Mt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=z(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=z(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,R(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Ft(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=jt(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=jt(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function It(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Lt={name:`autolink`,tokenize:Rt};function Rt(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return V(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||H(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||H(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||vt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):_t(t)?(e.consume(t),l):n(t)}function u(e){return H(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||H(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var zt={partial:!0,tokenize:Bt};function Bt(e,t,n){return r;function r(t){return G(t)?q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||U(e)?t(e):n(e)}}var Vt={continuation:{tokenize:Ut},exit:Wt,name:`blockQuote`,tokenize:Ht};function Ht(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return G(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ut(e,t,n){let r=this;return i;function i(t){return G(t)?q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Vt,t,n)(r)}}function Wt(e){e.exit(`blockQuote`)}var Gt={name:`characterEscape`,tokenize:Kt};function Kt(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return xt(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var qt={name:`characterReference`,tokenize:Jt};function Jt(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=H,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=bt,u):(e.enter(`characterReferenceValue`),a=7,o=yt,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===H&&!dt(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Yt={partial:!0,tokenize:Qt},Xt={concrete:!0,name:`codeFenced`,tokenize:Zt};function Zt(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),G(t)?q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||U(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Yt,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||U(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||U(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||U(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&G(t)?q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||U(t)?e.check(Yt,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||U(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),G(t)?q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),G(t)?q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||U(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Qt(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var $t={name:`codeIndented`,tokenize:tn},en={partial:!0,tokenize:nn};function tn(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),q(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):U(t)?e.attempt(en,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||U(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function nn(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):q(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):U(e)?i(e):n(e)}}var rn={name:`codeText`,previous:on,resolve:an,tokenize:sn};function an(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function on(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function sn(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||U(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var cn=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ln(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ln(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ln(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);ln(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ln(this.left,t.reverse())}}};function ln(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function un(e){let t={},n=-1,r,i,a,o,s,c,l,u=new cn(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,dn(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return R(e,0,1/0,u.slice(0)),!l}function dn(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var fn={resolve:mn,tokenize:hn},pn={partial:!0,tokenize:gn};function mn(e){return un(e),e}function hn(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):U(t)?e.check(pn,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function gn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),q(e,a,`linePrefix`)}function a(i){if(i===null||U(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function _n(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||vt(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||U(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||W(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||vt(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function vn(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):U(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||U(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!G(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function yn(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||U(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function bn(e,t){let n;return r;function r(i){return U(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):G(i)?q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var xn={name:`definition`,tokenize:Cn},Sn={partial:!0,tokenize:wn};function Cn(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return vn.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=B(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return W(t)?bn(e,l)(t):l(t)}function l(t){return _n(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Sn,d,d)(t)}function d(t){return G(t)?q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||U(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function wn(e,t,n){return r;function r(t){return W(t)?bn(e,i)(t):n(t)}function i(t){return yn(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return G(t)?q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||U(e)?t(e):n(e)}}var Tn={name:`hardBreakEscape`,tokenize:En};function En(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return U(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Dn={name:`headingAtx`,resolve:On,tokenize:kn};function On(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},R(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function kn(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||W(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||U(n)?(e.exit(`atxHeading`),t(n)):G(n)?q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||W(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var An=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),jn=[`pre`,`script`,`style`,`textarea`],Mn={concrete:!0,name:`htmlFlow`,resolveTo:Fn,tokenize:In},Nn={partial:!0,tokenize:Rn},Pn={partial:!0,tokenize:Ln};function Fn(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function In(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):V(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):V(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return V(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||W(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&jn.includes(l)?(i=1,r.interrupt?t(s):O(s)):An.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||H(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return G(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||V(t)?(e.consume(t),b):G(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||H(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):G(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):G(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||U(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||W(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||G(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||U(t)?O(t):G(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),P):U(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Nn,te,k)(t)):t===null||U(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Pn,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||U(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return jn.includes(n)?(e.consume(t),I):O(t)}return V(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function P(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||U(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function Ln(e,t,n){let r=this;return i;function i(t){return U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Rn(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(zt,t,n)}}var zn={name:`htmlText`,tokenize:Bn};function Bn(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):V(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):V(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):U(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):U(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):U(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):U(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return V(t)?(e.consume(t),S):n(t)}function S(t){return t===45||H(t)?(e.consume(t),S):C(t)}function C(t){return U(t)?(o=C,N(t)):G(t)?(e.consume(t),C):M(t)}function w(t){return t===45||H(t)?(e.consume(t),w):t===47||t===62||W(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||V(t)?(e.consume(t),E):U(t)?(o=T,N(t)):G(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||H(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):U(t)?(o=D,N(t)):G(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):U(t)?(o=O,N(t)):G(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):U(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||W(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||W(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return G(t)?q(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var Vn={name:`labelEnd`,resolveAll:Gn,resolveTo:Kn,tokenize:qn},Hn={tokenize:Jn},Un={tokenize:Yn},Wn={tokenize:Xn};function Gn(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&R(e,0,e.length,n),e}function Kn(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=z(s,e.slice(a+1,a+r+3)),s=z(s,[[`enter`,u,t]]),s=z(s,Mt(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=z(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=z(s,e.slice(o+1)),s=z(s,[[`exit`,c,t]]),R(e,a,e.length,s),e}function qn(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(B(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Hn,u,o?u:d)(t):t===91?e.attempt(Un,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Wn,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Jn(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return W(t)?bn(e,a)(t):a(t)}function a(t){return t===41?u(t):_n(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return W(t)?bn(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?yn(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return W(t)?bn(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Yn(e,t,n){let r=this;return i;function i(t){return vn.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(B(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Xn(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Zn={name:`labelStartImage`,resolveAll:Vn.resolveAll,tokenize:Qn};function Qn(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var $n={name:`labelStartLink`,resolveAll:Vn.resolveAll,tokenize:er};function er(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var tr={name:`lineEnding`,tokenize:nr};function nr(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),q(e,t,`linePrefix`)}}var rr={name:`thematicBreak`,tokenize:ir};function ir(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||U(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),G(t)?q(e,s,`whitespace`)(t):s(t))}}var J={continuation:{tokenize:cr},exit:ur,name:`list`,tokenize:sr},ar={partial:!0,tokenize:dr},or={partial:!0,tokenize:lr};function sr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:yt(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(rr,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return yt(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(zt,r.interrupt?n:u,e.attempt(ar,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return G(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function cr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(zt,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!G(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(or,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(J,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function lr(e,t,n){let r=this;return q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function ur(e){e.exit(this.containerState.type)}function dr(e,t,n){let r=this;return q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!G(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var fr={name:`setextUnderline`,resolveTo:pr,tokenize:mr};function pr(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function mr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),G(t)?q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||U(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var hr={tokenize:gr};function gr(e){let t=this,n=e.attempt(zt,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fn,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var _r={resolveAll:xr()},vr=br(`string`),yr=br(`text`);function br(e){return{resolveAll:xr(e===`text`?Sr:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function xr(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Sr(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Cr=e({attentionMarkers:()=>jr,contentInitial:()=>Tr,disable:()=>Mr,document:()=>wr,flow:()=>Dr,flowInitial:()=>Er,insideSpan:()=>Ar,string:()=>Or,text:()=>kr}),wr={42:J,43:J,45:J,48:J,49:J,50:J,51:J,52:J,53:J,54:J,55:J,56:J,57:J,62:Vt},Tr={91:xn},Er={[-2]:$t,[-1]:$t,32:$t},Dr={35:Dn,42:rr,45:[fr,rr],60:Mn,61:fr,95:rr,96:Xt,126:Xt},Or={38:qt,92:Gt},kr={[-5]:tr,[-4]:tr,[-3]:tr,33:Zn,38:qt,42:Nt,60:[Lt,zn],91:$n,92:[Tn,Gt],93:Vn,95:Nt,96:rn},Ar={null:[Nt,_r]},jr={null:[42,95]},Mr={null:[]};function Nr(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=z(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Mt(a,l.events,l),l.events):[]}function f(e,t){return Fr(p(e),t)}function p(e){return Pr(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){U(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&R(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pr(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Fr(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
3
3
|
`;break;case-3:o=`\r
|
|
4
4
|
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Ir(e){let t={constructs:pt([Cr,...(e||{}).extensions||[]]),content:n(Tt),defined:[],document:n(Dt),flow:n(hr),lazy:{},string:n(vr),text:n(yr)};return t;function n(e){return n;function n(n){return Nr(t,e,n)}}}function Lr(e){for(;!un(e););return e}var Rr=/[\0\t\n\r]/g;function zr(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Rr.lastIndex=u,c=Rr.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Br=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vr(e){return e.replace(Br,Hr)}function Hr(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return gt(n.slice(t?2:1),t?16:10)}return dt(n)||e}var Ur={}.hasOwnProperty;function Wr(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Gr(n)(Lr(Ir(n).document().write(zr()(e,t,!0))))}function Gr(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(be),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(xe),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Se),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:ae,characterReference:oe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:P,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Kr(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Ur.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Jr).call(a,void 0,e[0])}for(r.position={start:Y(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Y(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Y(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Jr).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Te({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Y(e.end)}function u(){return ot(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=B(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ce(),n.position={start:Y(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Y(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Y(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Vr(t),n.identifier=B(t).toLowerCase()}function P(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=B(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ie(e){this.data.characterReferenceType=e.type}function ae(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=gt(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=dt(t);let i=this.stack[this.stack.length-1];i.value+=r}function oe(e){let t=this.stack.pop();t.position.end=Y(e.end)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function xe(){return{type:`paragraph`,children:[]}}function Se(){return{type:`strong`,children:[]}}function Ce(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function Y(e){return{line:e.line,column:e.column,offset:e.offset}}function Kr(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Kr(e,r):qr(e,r)}}function qr(e,t){let n;for(n in t)if(Ur.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Jr(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Te({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Te({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Te({start:t.start,end:t.end})+`) is still open`)}function Yr(e){let t=this;t.parser=n;function n(n){return Wr(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Xr(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Zr(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{g as t}from"./vendor-tanstack-CUxlo6YN.js";import{i as n,r}from"./vendor-react-DH4kUfK2.js";import{_ as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,p,s as m,u as h}from"./sd.generated-DXtkTTGn.js";import{a as g,i as _,r as v}from"./index-CiLfNFWG.js";import{r as y,t as b}from"./services.generated-C0OpNm5q.js";import{n as x,t as S}from"./copy-DdGJDXSK.js";var C=e(n()),w=r(),T=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,w.jsx)(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),(0,w.jsx)(`circle`,{cx:12,cy:12,r:3})]})}),E=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,w.jsx)(`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575a1 1 0 0 1 0 .696a10.8 10.8 0 0 1-1.444 2.49m-6.41-.679a3 3 0 0 1-4.242-4.242`}),(0,w.jsx)(`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 4.446-5.143M2 2l20 20`})]})}),D=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 12h14m-7-7v14`})}),O=a([`id-desc`]).describe(`RequestLogOrderBy`),k=a([`id`,`token_name`,`query`]).describe(`RequestLogSearchField`),A=a([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),j=a([`id`,`name`]).describe(`TokenSearchField`);c({id:f(),created_at:p(),token_name:i().max(100),query:i(),response:i(),input_tokens:f(),output_tokens:f(),cache_read_tokens:f(),cache_creation_tokens:f(),duration_ms:f(),cost_usd:f().nullable()});var M=c({id:f(),created_at:p(),token:i(),name:i(),refresh_token:i().nullable(),expires_at:h().nullable(),account_uuid:i().nullable(),active:o(),ord:f()});c({num:l().int().nonnegative(),page:l().int().min(1),search:k,keyword:i(),orderBy:O,queryMode:u,id:m(l().int().positive()),sonamuFilter:s(),token_name:i().max(100)}).partial(),c({num:l().int().nonnegative(),page:l().int().min(1),search:j,keyword:i(),orderBy:A,queryMode:u,id:m(l().int().positive()),sonamuFilter:s(),token:i()}).partial(),c({id:f(),created_at:p(),token_name:i().max(100),query:i(),response:i(),input_tokens:f(),output_tokens:f(),cache_read_tokens:f(),cache_creation_tokens:f(),duration_ms:f(),cost_usd:f().nullable()}),a([`A`]),c({id:f(),created_at:p(),token:i(),name:i(),refresh_token:i().nullable(),expires_at:h().nullable(),account_uuid:i().nullable(),active:o(),ord:f()}),a([`A`]);var N=M.partial({id:!0,created_at:!0,refresh_token:!0,expires_at:!0,account_uuid:!0,active:!0,ord:!0});N.pick({id:!0,token:!0,refresh_token:!0,name:!0});function P(){let[e,n]=(0,C.useState)(!1),[r,i]=(0,C.useState)(!1),[a,o]=(0,C.useState)(!1),{form:s,register:c,reset:l}=v(N,{name:``,token:``,refresh_token:``}),u=t(),d=b.useAddTokenMutation(),f=b.useOauthStartMutation(),p=async()=>{if(s.name?.trim()){o(!0);try{let{authUrl:e}=await f.mutateAsync({name:s.name.trim()});window.location.href=e}catch{o(!1)}}},m=async()=>{!s.token?.trim()||!s.name?.trim()||(await d.mutateAsync({token:s.token.trim(),name:s.name.trim(),refreshToken:s.refresh_token?.trim()??``})).added&&(await Promise.all([u.invalidateQueries({queryKey:[`Qgrid`]}),u.invalidateQueries({queryKey:[`Token`]})]),h())},h=()=>{n(!1),l(),i(!1),o(!1)};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150 active:scale-[0.98] flex items-center gap-1`,onClick:()=>n(!0),children:[(0,w.jsx)(D,{className:`size-3.5`}),`Add Token`]}),e&&(0,w.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,w.jsx)(`div`,{className:`absolute inset-0`,onClick:h,onKeyDown:()=>{}}),(0,w.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-md mx-4`,children:[(0,w.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100`,children:(0,w.jsx)(`h2`,{className:`text-base font-medium text-sand-900`,children:`Add Token`})}),(0,w.jsxs)(`div`,{className:`px-5 py-4 space-y-4`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name *`}),(0,w.jsx)(_,{...c(`name`),placeholder:`e.g. your-token-name`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`})]}),(0,w.jsx)(`button`,{type:`button`,className:`w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white hover:bg-sand-800 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2`,disabled:!s.name?.trim()||a,onClick:p,children:a?(0,w.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,w.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin`}),`Waiting for login...`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(g,{className:`size-4`}),`Login with Claude`]})}),(0,w.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,w.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`}),(0,w.jsx)(`span`,{className:`text-[10px] text-sand-400 uppercase`,children:`or`}),(0,w.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{htmlFor:`oauth-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Access Token`}),(0,w.jsxs)(`div`,{className:`relative mt-1`,children:[(0,w.jsx)(_,{type:r?`text`:`password`,...c(`token`),placeholder:`sk-ant-oat01-...`,className:`w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300 pr-10`}),(0,w.jsx)(`button`,{type:`button`,className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-sand-400 hover:text-sand-600 transition-colors duration-150`,onClick:()=>i(!r),children:r?(0,w.jsx)(E,{className:`size-4`}):(0,w.jsx)(T,{className:`size-4`})})]})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`label`,{htmlFor:`refresh-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:[`Refresh Token`,` `,(0,w.jsx)(`span`,{className:`text-sand-400 normal-case tracking-normal`,children:`(optional)`})]}),(0,w.jsx)(_,{type:`password`,...c(`refresh_token`),placeholder:`sk-ant-ort01-...`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`}),(0,w.jsx)(`p`,{className:`text-[10px] text-sand-400 mt-1`,children:`Enables auto-refresh when access token expires (~8h)`})]})]}),(0,w.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:h,children:`Cancel`}),s.token?.trim()&&(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150`,disabled:!s.name?.trim()||!s.token?.trim()||d.isPending,onClick:m,children:d.isPending?`Adding...`:`Add Token`})]})]})]})]})}var F=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4`})}),I=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})});c({system:i().optional(),prompt:i(),timeout:l().optional()}),c({text:i(),usage:c({input_tokens:l(),output_tokens:l(),cache_creation_input_tokens:l(),cache_read_input_tokens:l()}),durationMs:l(),costUsd:l()}),c({tokens:d(c({token:i(),name:i()})),size:l().optional(),model:i().optional(),timeout:l().optional(),cwd:i().optional(),maxCalls:l().optional()}),c({token:i(),name:i()}),c({token:i()}),c({token:i(),name:i(),requests:l(),active:o()}),c({authUrl:i()});var L=c({utilization:l().nullable(),resets_at:i().nullable()}).nullable();c({error:i().optional(),five_hour:L.optional(),seven_day:L.optional(),seven_day_opus:L.optional(),seven_day_sonnet:L.optional(),seven_day_oauth_apps:L.optional(),seven_day_cowork:L.optional(),extra_usage:c({is_enabled:o(),monthly_limit:l().nullable(),used_credits:l().nullable(),utilization:l().nullable()}).nullable().optional()}),c({status:i(),workers:l(),activeTokens:l()});function R(e){return e.length>4?`...${e.slice(-4)}`:e}function z(e){if(!e)return{text:``,color:``};let t=Number(e)-Date.now();if(t<=0)return{text:`expired`,color:`text-red-500`};let n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4),i=n>0?`${n}h ${r}m`:`${r}m`;return t<36e5?{text:i,color:`text-amber-500`}:{text:i,color:`text-sand-400`}}function B({data:e,isLoading:n}){let[r,i]=(0,C.useState)(null),[a,o]=(0,C.useState)(null),[s,c]=(0,C.useState)(!1),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1),[p,m]=(0,C.useState)(!1),{form:h,setForm:g,register:y}=v(N,{name:``,token:``,active:!0}),D=t(),O=b.useRemoveTokenMutation(),k=b.useUpdateTokenMutation(),A=b.useToggleTokenMutation(),j=()=>Promise.all([D.invalidateQueries({queryKey:[`Token`]}),D.invalidateQueries({queryKey:[`Qgrid`]})]),M=async e=>{await A.mutateAsync({id:e.id}),await j()},P=async()=>{r&&(await O.mutateAsync({token:r.token}),await j(),i(null))},L=e=>{o(e),g({name:e.name??``,token:e.token,active:e.active,refresh_token:e.refresh_token??``}),c(!1),u(!1),f(!1),m(!1)},B=async()=>{if(!a)return;let e=h.token&&h.token!==a.token?h.token.trim():void 0,t=[k.mutateAsync({token:a.token,name:h.name?.trim()??``,newToken:e??``,refreshToken:h.refresh_token?.trim()??``})];h.active!==a.active&&t.push(A.mutateAsync({id:a.id})),await Promise.all(t),await j(),o(null)},V=()=>{a&&(navigator.clipboard.writeText(a.token),f(!0),setTimeout(()=>f(!1),1500))},H=()=>{a?.refresh_token&&(navigator.clipboard.writeText(a.refresh_token),m(!0),setTimeout(()=>m(!1),1500))};if(n)return(0,w.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:3}).map((e,t)=>(0,w.jsx)(`div`,{className:`h-12 bg-sand-100 rounded-md animate-pulse`},`skeleton-${t}`))});let U=e??[];return U.length===0?(0,w.jsxs)(`div`,{className:`text-sand-400 text-center py-16 text-sm`,children:[`No tokens registered. Click `,(0,w.jsx)(`strong`,{className:`text-sand-600`,children:`Add Token`}),` to get started.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`rounded-lg bg-sand-50 overflow-hidden`,children:(0,w.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-sand-200`,children:[(0,w.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Token`}),(0,w.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Name`}),(0,w.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Status`}),(0,w.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Expires`}),(0,w.jsx)(`th`,{className:`w-20 px-3 py-3`})]})}),(0,w.jsx)(`tbody`,{className:`divide-y divide-sand-200/60`,children:U.map(e=>{let t=z(e.expires_at);return(0,w.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 ${e.active?``:`opacity-50`}`,children:[(0,w.jsx)(`td`,{className:`px-5 py-3`,children:(0,w.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:R(e.token)})}),(0,w.jsx)(`td`,{className:`px-5 py-3`,children:e.name?(0,w.jsx)(`span`,{className:`text-sm text-sand-700`,children:e.name}):(0,w.jsx)(`span`,{className:`text-[11px] text-sand-400`,children:`—`})}),(0,w.jsx)(`td`,{className:`px-5 py-3`,children:(0,w.jsx)(`button`,{type:`button`,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors duration-200 ${e.active?`bg-sage-400`:`bg-sand-300`}`,onClick:()=>M(e),disabled:A.isPending,children:(0,w.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform duration-200 ${e.active?`translate-x-4.5`:`translate-x-0.5`}`})})}),(0,w.jsx)(`td`,{className:`px-5 py-3`,children:t.text&&(0,w.jsx)(`span`,{className:`text-xs ${t.color}`,children:t.text})}),(0,w.jsx)(`td`,{className:`px-3 py-3`,children:(0,w.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,w.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:()=>L(e),children:(0,w.jsx)(F,{className:`size-4`})}),(0,w.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-red-500 transition-colors duration-150`,onClick:()=>i(e),children:(0,w.jsx)(I,{className:`size-4`})})]})})]},e.id)})})]})}),a&&(0,w.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,w.jsx)(`div`,{className:`absolute inset-0`,onClick:()=>o(null),onKeyDown:()=>{}}),(0,w.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-sm mx-4`,children:[(0,w.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100`,children:(0,w.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Edit Token`})}),(0,w.jsxs)(`div`,{className:`px-5 py-4 space-y-3`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name`}),(0,w.jsx)(_,{...y(`name`),placeholder:`e.g. prod, dev, team-a`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`})]}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`input`,{id:`token-active`,type:`checkbox`,checked:h.active??!0,onChange:e=>g({...h,active:e.target.checked}),className:`h-4 w-4 rounded border-sand-300 text-sienna-500 focus:ring-sienna-300`}),(0,w.jsx)(`label`,{htmlFor:`token-active`,className:`text-sm text-sand-700`,children:`Active`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsx)(`label`,{htmlFor:`token-value`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Token`}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:V,children:d?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(x,{className:`size-3 text-sage-500`}),(0,w.jsx)(`span`,{className:`text-sage-500`,children:`Copied`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(S,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Copy`})]})}),(0,w.jsx)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-sand-400 hover:text-sand-600 transition-colors duration-150`,onClick:()=>c(!s),children:s?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(E,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Hide`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(T,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Show`})]})})]})]}),(0,w.jsx)(`input`,{id:`token-value`,type:s?`text`:`password`,value:h.token||(s?a.token:``),onChange:e=>g({...h,token:e.target.value}),placeholder:s?``:`●●●●●●●●●●●●●●●●`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-400 focus:outline-none focus:border-sienna-300`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`label`,{htmlFor:`edit-refresh-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:[`Refresh Token`,` `,(0,w.jsx)(`span`,{className:`text-sand-400 normal-case tracking-normal`,children:`(optional)`})]}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:H,children:p?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(x,{className:`size-3 text-sage-500`}),(0,w.jsx)(`span`,{className:`text-sage-500`,children:`Copied`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(S,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Copy`})]})}),(0,w.jsx)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-sand-400 hover:text-sand-600 transition-colors duration-150`,onClick:()=>u(!l),children:l?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(E,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Hide`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(T,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Show`})]})})]})]}),(0,w.jsx)(`input`,{id:`edit-refresh-token`,type:l?`text`:`password`,value:h.refresh_token??``,onChange:e=>g({...h,refresh_token:e.target.value}),placeholder:`sk-ant-ort01-...`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`}),(0,w.jsx)(`p`,{className:`text-[10px] text-sand-400 mt-1`,children:`Enables auto-refresh when access token expires`})]})]}),(0,w.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:()=>o(null),children:`Cancel`}),(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150`,disabled:k.isPending,onClick:B,children:k.isPending?`Saving...`:`Save`})]})]})]}),r&&(0,w.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,w.jsx)(`div`,{className:`absolute inset-0`,onClick:()=>i(null),onKeyDown:()=>{}}),(0,w.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-sm mx-4`,children:[(0,w.jsxs)(`div`,{className:`px-5 py-4`,children:[(0,w.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Remove Token`}),(0,w.jsxs)(`p`,{className:`text-sm text-sand-700 mt-2`,children:[`Are you sure you want to remove`,` `,(0,w.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:R(r.token)}),r.name&&(0,w.jsxs)(`span`,{className:`text-sand-500`,children:[` (`,r.name,`)`]}),`?`]})]}),(0,w.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:()=>i(null),children:`Cancel`}),(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 transition-colors duration-150`,disabled:O.isPending,onClick:P,children:O.isPending?`Removing...`:`Remove`})]})]})]})]})}function V(){let{data:e,isLoading:t}=y.useTokens(`A`);return(0,w.jsxs)(`div`,{className:`space-y-5 max-w-300 mx-auto -translate-x-4`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsx)(`h1`,{className:`text-xl font-medium text-sand-900 tracking-tight`,children:`Tokens`}),(0,w.jsx)(P,{})]}),(0,w.jsx)(B,{data:e?.rows,isLoading:t})]})}export{V as component};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{g as t}from"./vendor-tanstack-CUxlo6YN.js";import{i as n,r}from"./vendor-react-DH4kUfK2.js";import{_ as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,p,s as m,u as h}from"./sd.generated-DXtkTTGn.js";import{a as g,i as _,r as v}from"./index-DLrkHIo2.js";import{r as y,t as b}from"./services.generated-C0OpNm5q.js";import{n as x,t as S}from"./copy-DdGJDXSK.js";var C=e(n()),w=r(),T=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,w.jsx)(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),(0,w.jsx)(`circle`,{cx:12,cy:12,r:3})]})}),E=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,w.jsx)(`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575a1 1 0 0 1 0 .696a10.8 10.8 0 0 1-1.444 2.49m-6.41-.679a3 3 0 0 1-4.242-4.242`}),(0,w.jsx)(`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 4.446-5.143M2 2l20 20`})]})}),D=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 12h14m-7-7v14`})}),O=a([`id-desc`]).describe(`RequestLogOrderBy`),k=a([`id`,`token_name`,`query`]).describe(`RequestLogSearchField`),A=a([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),j=a([`id`,`name`]).describe(`TokenSearchField`);c({id:f(),created_at:p(),token_name:i().max(100),query:i(),response:i(),input_tokens:f(),output_tokens:f(),cache_read_tokens:f(),cache_creation_tokens:f(),duration_ms:f(),cost_usd:f().nullable()});var M=c({id:f(),created_at:p(),token:i(),name:i(),refresh_token:i().nullable(),expires_at:h().nullable(),account_uuid:i().nullable(),active:o(),ord:f()});c({num:l().int().nonnegative(),page:l().int().min(1),search:k,keyword:i(),orderBy:O,queryMode:u,id:m(l().int().positive()),sonamuFilter:s(),token_name:i().max(100)}).partial(),c({num:l().int().nonnegative(),page:l().int().min(1),search:j,keyword:i(),orderBy:A,queryMode:u,id:m(l().int().positive()),sonamuFilter:s(),token:i()}).partial(),c({id:f(),created_at:p(),token_name:i().max(100),query:i(),response:i(),input_tokens:f(),output_tokens:f(),cache_read_tokens:f(),cache_creation_tokens:f(),duration_ms:f(),cost_usd:f().nullable()}),a([`A`]),c({id:f(),created_at:p(),token:i(),name:i(),refresh_token:i().nullable(),expires_at:h().nullable(),account_uuid:i().nullable(),active:o(),ord:f()}),a([`A`]);var N=M.partial({id:!0,created_at:!0,refresh_token:!0,expires_at:!0,account_uuid:!0,active:!0,ord:!0});N.pick({id:!0,token:!0,refresh_token:!0,name:!0});function P(){let[e,n]=(0,C.useState)(!1),[r,i]=(0,C.useState)(!1),[a,o]=(0,C.useState)(!1),{form:s,register:c,reset:l}=v(N,{name:``,token:``,refresh_token:``}),u=t(),d=b.useAddTokenMutation(),f=b.useOauthStartMutation(),p=async()=>{if(s.name?.trim()){o(!0);try{let{authUrl:e}=await f.mutateAsync({name:s.name.trim()});window.location.href=e}catch{o(!1)}}},m=async()=>{!s.token?.trim()||!s.name?.trim()||(await d.mutateAsync({token:s.token.trim(),name:s.name.trim(),refreshToken:s.refresh_token?.trim()??``})).added&&(await Promise.all([u.invalidateQueries({queryKey:[`Qgrid`]}),u.invalidateQueries({queryKey:[`Token`]})]),h())},h=()=>{n(!1),l(),i(!1),o(!1)};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150 active:scale-[0.98] flex items-center gap-1`,onClick:()=>n(!0),children:[(0,w.jsx)(D,{className:`size-3.5`}),`Add Token`]}),e&&(0,w.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,w.jsx)(`div`,{className:`absolute inset-0`,onClick:h,onKeyDown:()=>{}}),(0,w.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-md mx-4`,children:[(0,w.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100`,children:(0,w.jsx)(`h2`,{className:`text-base font-medium text-sand-900`,children:`Add Token`})}),(0,w.jsxs)(`div`,{className:`px-5 py-4 space-y-4`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name *`}),(0,w.jsx)(_,{...c(`name`),placeholder:`e.g. your-token-name`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`})]}),(0,w.jsx)(`button`,{type:`button`,className:`w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white hover:bg-sand-800 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2`,disabled:!s.name?.trim()||a,onClick:p,children:a?(0,w.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,w.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin`}),`Waiting for login...`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(g,{className:`size-4`}),`Login with Claude`]})}),(0,w.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,w.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`}),(0,w.jsx)(`span`,{className:`text-[10px] text-sand-400 uppercase`,children:`or`}),(0,w.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{htmlFor:`oauth-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Access Token`}),(0,w.jsxs)(`div`,{className:`relative mt-1`,children:[(0,w.jsx)(_,{type:r?`text`:`password`,...c(`token`),placeholder:`sk-ant-oat01-...`,className:`w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300 pr-10`}),(0,w.jsx)(`button`,{type:`button`,className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-sand-400 hover:text-sand-600 transition-colors duration-150`,onClick:()=>i(!r),children:r?(0,w.jsx)(E,{className:`size-4`}):(0,w.jsx)(T,{className:`size-4`})})]})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`label`,{htmlFor:`refresh-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:[`Refresh Token`,` `,(0,w.jsx)(`span`,{className:`text-sand-400 normal-case tracking-normal`,children:`(optional)`})]}),(0,w.jsx)(_,{type:`password`,...c(`refresh_token`),placeholder:`sk-ant-ort01-...`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`}),(0,w.jsx)(`p`,{className:`text-[10px] text-sand-400 mt-1`,children:`Enables auto-refresh when access token expires (~8h)`})]})]}),(0,w.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:h,children:`Cancel`}),s.token?.trim()&&(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150`,disabled:!s.name?.trim()||!s.token?.trim()||d.isPending,onClick:m,children:d.isPending?`Adding...`:`Add Token`})]})]})]})]})}var F=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4`})}),I=e=>(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,w.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})});c({system:i().optional(),prompt:i(),timeout:l().optional()}),c({text:i(),usage:c({input_tokens:l(),output_tokens:l(),cache_creation_input_tokens:l(),cache_read_input_tokens:l()}),durationMs:l(),costUsd:l()}),c({tokens:d(c({token:i(),name:i()})),size:l().optional(),model:i().optional(),timeout:l().optional(),cwd:i().optional(),maxCalls:l().optional()}),c({token:i(),name:i()}),c({token:i()}),c({token:i(),name:i(),requests:l(),active:o()}),c({authUrl:i()});var L=c({utilization:l().nullable(),resets_at:i().nullable()}).nullable();c({error:i().optional(),five_hour:L.optional(),seven_day:L.optional(),seven_day_opus:L.optional(),seven_day_sonnet:L.optional(),seven_day_oauth_apps:L.optional(),seven_day_cowork:L.optional(),extra_usage:c({is_enabled:o(),monthly_limit:l().nullable(),used_credits:l().nullable(),utilization:l().nullable()}).nullable().optional()}),c({status:i(),workers:l(),activeTokens:l()});function R(e){return e.length>4?`...${e.slice(-4)}`:e}function z(e){if(!e)return{text:``,color:``};let t=Number(e)-Date.now();if(t<=0)return{text:`expired`,color:`text-red-500`};let n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4),i=n>0?`${n}h ${r}m`:`${r}m`;return t<36e5?{text:i,color:`text-amber-500`}:{text:i,color:`text-sand-400`}}function B({data:e,isLoading:n}){let[r,i]=(0,C.useState)(null),[a,o]=(0,C.useState)(null),[s,c]=(0,C.useState)(!1),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1),[p,m]=(0,C.useState)(!1),{form:h,setForm:g,register:y}=v(N,{name:``,token:``,active:!0}),D=t(),O=b.useRemoveTokenMutation(),k=b.useUpdateTokenMutation(),A=b.useToggleTokenMutation(),j=()=>Promise.all([D.invalidateQueries({queryKey:[`Token`]}),D.invalidateQueries({queryKey:[`Qgrid`]})]),M=async e=>{await A.mutateAsync({id:e.id}),await j()},P=async()=>{r&&(await O.mutateAsync({token:r.token}),await j(),i(null))},L=e=>{o(e),g({name:e.name??``,token:e.token,active:e.active,refresh_token:e.refresh_token??``}),c(!1),u(!1),f(!1),m(!1)},B=async()=>{if(!a)return;let e=h.token&&h.token!==a.token?h.token.trim():void 0,t=[k.mutateAsync({token:a.token,name:h.name?.trim()??``,newToken:e??``,refreshToken:h.refresh_token?.trim()??``})];h.active!==a.active&&t.push(A.mutateAsync({id:a.id})),await Promise.all(t),await j(),o(null)},V=()=>{a&&(navigator.clipboard.writeText(a.token),f(!0),setTimeout(()=>f(!1),1500))},H=()=>{a?.refresh_token&&(navigator.clipboard.writeText(a.refresh_token),m(!0),setTimeout(()=>m(!1),1500))};if(n)return(0,w.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:3}).map((e,t)=>(0,w.jsx)(`div`,{className:`h-12 bg-sand-100 rounded-md animate-pulse`},`skeleton-${t}`))});let U=e??[];return U.length===0?(0,w.jsxs)(`div`,{className:`text-sand-400 text-center py-16 text-sm`,children:[`No tokens registered. Click `,(0,w.jsx)(`strong`,{className:`text-sand-600`,children:`Add Token`}),` to get started.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`rounded-lg bg-sand-50 overflow-hidden`,children:(0,w.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-sand-200`,children:[(0,w.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Token`}),(0,w.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Name`}),(0,w.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Status`}),(0,w.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Expires`}),(0,w.jsx)(`th`,{className:`w-20 px-3 py-3`})]})}),(0,w.jsx)(`tbody`,{className:`divide-y divide-sand-200/60`,children:U.map(e=>{let t=z(e.expires_at);return(0,w.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 ${e.active?``:`opacity-50`}`,children:[(0,w.jsx)(`td`,{className:`px-5 py-3`,children:(0,w.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:R(e.token)})}),(0,w.jsx)(`td`,{className:`px-5 py-3`,children:e.name?(0,w.jsx)(`span`,{className:`text-sm text-sand-700`,children:e.name}):(0,w.jsx)(`span`,{className:`text-[11px] text-sand-400`,children:`—`})}),(0,w.jsx)(`td`,{className:`px-5 py-3`,children:(0,w.jsx)(`button`,{type:`button`,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors duration-200 ${e.active?`bg-sage-400`:`bg-sand-300`}`,onClick:()=>M(e),disabled:A.isPending,children:(0,w.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform duration-200 ${e.active?`translate-x-4.5`:`translate-x-0.5`}`})})}),(0,w.jsx)(`td`,{className:`px-5 py-3`,children:t.text&&(0,w.jsx)(`span`,{className:`text-xs ${t.color}`,children:t.text})}),(0,w.jsx)(`td`,{className:`px-3 py-3`,children:(0,w.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,w.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:()=>L(e),children:(0,w.jsx)(F,{className:`size-4`})}),(0,w.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-red-500 transition-colors duration-150`,onClick:()=>i(e),children:(0,w.jsx)(I,{className:`size-4`})})]})})]},e.id)})})]})}),a&&(0,w.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,w.jsx)(`div`,{className:`absolute inset-0`,onClick:()=>o(null),onKeyDown:()=>{}}),(0,w.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-sm mx-4`,children:[(0,w.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100`,children:(0,w.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Edit Token`})}),(0,w.jsxs)(`div`,{className:`px-5 py-4 space-y-3`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name`}),(0,w.jsx)(_,{...y(`name`),placeholder:`e.g. prod, dev, team-a`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`})]}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`input`,{id:`token-active`,type:`checkbox`,checked:h.active??!0,onChange:e=>g({...h,active:e.target.checked}),className:`h-4 w-4 rounded border-sand-300 text-sienna-500 focus:ring-sienna-300`}),(0,w.jsx)(`label`,{htmlFor:`token-active`,className:`text-sm text-sand-700`,children:`Active`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsx)(`label`,{htmlFor:`token-value`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Token`}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:V,children:d?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(x,{className:`size-3 text-sage-500`}),(0,w.jsx)(`span`,{className:`text-sage-500`,children:`Copied`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(S,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Copy`})]})}),(0,w.jsx)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-sand-400 hover:text-sand-600 transition-colors duration-150`,onClick:()=>c(!s),children:s?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(E,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Hide`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(T,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Show`})]})})]})]}),(0,w.jsx)(`input`,{id:`token-value`,type:s?`text`:`password`,value:h.token||(s?a.token:``),onChange:e=>g({...h,token:e.target.value}),placeholder:s?``:`●●●●●●●●●●●●●●●●`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-400 focus:outline-none focus:border-sienna-300`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`label`,{htmlFor:`edit-refresh-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:[`Refresh Token`,` `,(0,w.jsx)(`span`,{className:`text-sand-400 normal-case tracking-normal`,children:`(optional)`})]}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:H,children:p?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(x,{className:`size-3 text-sage-500`}),(0,w.jsx)(`span`,{className:`text-sage-500`,children:`Copied`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(S,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Copy`})]})}),(0,w.jsx)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-sand-400 hover:text-sand-600 transition-colors duration-150`,onClick:()=>u(!l),children:l?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(E,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Hide`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(T,{className:`size-3`}),(0,w.jsx)(`span`,{children:`Show`})]})})]})]}),(0,w.jsx)(`input`,{id:`edit-refresh-token`,type:l?`text`:`password`,value:h.refresh_token??``,onChange:e=>g({...h,refresh_token:e.target.value}),placeholder:`sk-ant-ort01-...`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`}),(0,w.jsx)(`p`,{className:`text-[10px] text-sand-400 mt-1`,children:`Enables auto-refresh when access token expires`})]})]}),(0,w.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:()=>o(null),children:`Cancel`}),(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150`,disabled:k.isPending,onClick:B,children:k.isPending?`Saving...`:`Save`})]})]})]}),r&&(0,w.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,w.jsx)(`div`,{className:`absolute inset-0`,onClick:()=>i(null),onKeyDown:()=>{}}),(0,w.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-sm mx-4`,children:[(0,w.jsxs)(`div`,{className:`px-5 py-4`,children:[(0,w.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Remove Token`}),(0,w.jsxs)(`p`,{className:`text-sm text-sand-700 mt-2`,children:[`Are you sure you want to remove`,` `,(0,w.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:R(r.token)}),r.name&&(0,w.jsxs)(`span`,{className:`text-sand-500`,children:[` (`,r.name,`)`]}),`?`]})]}),(0,w.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:()=>i(null),children:`Cancel`}),(0,w.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 transition-colors duration-150`,disabled:O.isPending,onClick:P,children:O.isPending?`Removing...`:`Remove`})]})]})]})]})}function V(){let{data:e,isLoading:t}=y.useTokens(`A`);return(0,w.jsxs)(`div`,{className:`space-y-5 max-w-300 mx-auto -translate-x-4`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsx)(`h1`,{className:`text-xl font-medium text-sand-900 tracking-tight`,children:`Tokens`}),(0,w.jsx)(P,{})]}),(0,w.jsx)(B,{data:e?.rows,isLoading:t})]})}export{V as component};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/sonamu.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Qgrid</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DLrkHIo2.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-Dw2cE7zH.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-ca-nBW7U.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DH4kUfK2.js">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as require_react, nt as __toESM, x as require_jsx_runtime } from "./sd.generated-Mnbmi4YR.js";
|
|
2
2
|
import { n as RequestLogService, r as TokenService, t as QgridService } from "./services.generated-DjdxFvCg.js";
|
|
3
|
-
import { o as useNavigate } from "./lazyRouteComponent-B78WDGgM.js";
|
|
3
|
+
import { a as Link, o as useNavigate } from "./lazyRouteComponent-B78WDGgM.js";
|
|
4
4
|
import { n as Route } from "../entry-server.generated.js";
|
|
5
5
|
import { n as formatUsd, t as formatMicroUsd } from "./cost-D0Ta7MJa.js";
|
|
6
6
|
//#region ~icons/lucide/chevron-left.jsx
|
|
@@ -112,6 +112,10 @@ function RequestLogTable({ page: externalPage, onPageChange } = {}) {
|
|
|
112
112
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
113
113
|
className: "border-b border-sand-200",
|
|
114
114
|
children: [
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
116
|
+
className: "text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
117
|
+
children: "ID"
|
|
118
|
+
}),
|
|
115
119
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
116
120
|
className: "text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
117
121
|
children: "Date"
|
|
@@ -154,11 +158,27 @@ function RequestLogTable({ page: externalPage, onPageChange } = {}) {
|
|
|
154
158
|
className: "divide-y divide-sand-200/60",
|
|
155
159
|
children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
156
160
|
className: "transition-colors duration-150 hover:bg-sand-100/60 cursor-pointer",
|
|
157
|
-
onClick: () =>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
onClick: (e) => {
|
|
162
|
+
if (e.metaKey || e.ctrlKey) {
|
|
163
|
+
window.open(`/requests/show?id=${row.id}`, "_blank");
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
navigate({
|
|
167
|
+
to: "/requests/show",
|
|
168
|
+
search: { id: row.id }
|
|
169
|
+
});
|
|
170
|
+
},
|
|
161
171
|
children: [
|
|
172
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
173
|
+
className: "px-3 py-2.5",
|
|
174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
175
|
+
to: "/requests/show",
|
|
176
|
+
search: { id: row.id },
|
|
177
|
+
onClick: (e) => e.stopPropagation(),
|
|
178
|
+
className: "text-xs text-sand-500 tabular-nums hover:text-sienna-500",
|
|
179
|
+
children: row.id
|
|
180
|
+
})
|
|
181
|
+
}),
|
|
162
182
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
163
183
|
className: "px-3 py-2.5",
|
|
164
184
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
@@ -203,7 +223,7 @@ function RequestLogTable({ page: externalPage, onPageChange } = {}) {
|
|
|
203
223
|
}),
|
|
204
224
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
205
225
|
className: "px-3 py-2.5 text-right tabular-nums text-sand-700",
|
|
206
|
-
children: row.cost_usd
|
|
226
|
+
children: row.cost_usd !== null ? formatMicroUsd(row.cost_usd) : "-"
|
|
207
227
|
}),
|
|
208
228
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
209
229
|
className: "px-2 py-2.5",
|
|
@@ -42629,7 +42629,7 @@ var $$splitComponentImporter$3 = () => import("./assets/tokens-BGaTdsEb.js");
|
|
|
42629
42629
|
var Route$3 = createFileRoute("/tokens")({ component: lazyRouteComponent($$splitComponentImporter$3, "component") });
|
|
42630
42630
|
//#endregion
|
|
42631
42631
|
//#region src/routes/logs.tsx
|
|
42632
|
-
var $$splitComponentImporter$2 = () => import("./assets/logs-
|
|
42632
|
+
var $$splitComponentImporter$2 = () => import("./assets/logs-BV6gEe15.js");
|
|
42633
42633
|
var logsSearchSchema = object({ page: number().optional().default(1) });
|
|
42634
42634
|
var Route$2 = createFileRoute("/logs")({
|
|
42635
42635
|
validateSearch: logsSearchSchema,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{u as t}from"./vendor-tanstack-CUxlo6YN.js";import{i as n,r}from"./vendor-react-DH4kUfK2.js";import{n as i}from"./index-CiLfNFWG.js";import{n as a,t as o}from"./cost-DE_8cLD-.js";import{n as s,r as c,t as l}from"./services.generated-C0OpNm5q.js";var u=e(n()),d=r(),f=e=>(0,d.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,d.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m15 18l-6-6l6-6`})}),p=e=>(0,d.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,d.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m9 18l6-6l-6-6`})}),m=50;function h(e){let t=new Date(e);return`${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function g(e){return e.toLocaleString()}function _(e){let t=e.input_tokens+e.cache_read_tokens+e.cache_creation_tokens;return t===0?`—`:`${Math.round(e.cache_read_tokens/t*100)}%`}function v(e,t=30){return e.length>t?`${e.slice(0,t)}...`:e}function y({page:e,onPageChange:n}={}){let r=t(),[i,y]=(0,u.useState)(1),b=e??i,x=n??y,[S,C]=(0,u.useState)(``),{data:w}=c.useTokens(`A`),T=(w?.rows??[]).map(e=>e.name).filter(Boolean),{data:E,isLoading:D}=s.useRequestLogs(`A`,{num:m,page:b,orderBy:`id-desc`,...S?{token_name:S}:{}}),{data:O}=l.useTotalCost(S||void 0),k=E?.rows??[],A=E?.total??0,j=Math.ceil(A/m);return(0,d.jsxs)(`div`,{children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2 mb-3 flex-wrap`,children:[T.length>0&&(0,d.jsxs)(`select`,{value:S,onChange:e=>{C(e.target.value),x(1)},className:`border border-sand-200 rounded-md px-2 py-1 text-xs text-sand-700 bg-white focus:outline-none focus:border-sienna-300`,children:[(0,d.jsx)(`option`,{value:``,children:`All Tokens`}),T.map(e=>(0,d.jsx)(`option`,{value:e,children:e},e))]}),(0,d.jsxs)(`span`,{className:`text-[11px] text-sand-400`,children:[A,` results`]}),(0,d.jsx)(`span`,{className:`text-[11px] tabular-nums font-medium text-sienna-600`,children:a(O?.usd??0)})]}),D?(0,d.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:5}).map((e,t)=>(0,d.jsx)(`div`,{className:`h-8 bg-sand-100 rounded animate-pulse`},`skel-${t}`))}):k.length===0?(0,d.jsx)(`div`,{className:`text-sand-400 text-center py-12 text-sm`,children:`No requests yet.`}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`div`,{className:`rounded-lg bg-sand-50 overflow-hidden`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b border-sand-200`,children:[(0,d.jsx)(`th`,{className:`text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Date`}),(0,d.jsx)(`th`,{className:`text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Token`}),(0,d.jsx)(`th`,{className:`text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Query`}),(0,d.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`In`}),(0,d.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Out`}),(0,d.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`C.Read`}),(0,d.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`C.Write`}),(0,d.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Hit`}),(0,d.jsx)(`th`,{className:`text-right px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Cost`}),(0,d.jsx)(`th`,{className:`w-8 px-2 py-2.5`})]})}),(0,d.jsx)(`tbody`,{className:`divide-y divide-sand-200/60`,children:k.map(e=>(0,d.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 cursor-pointer`,onClick:()=>r({to:`/requests/show`,search:{id:e.id}}),children:[(0,d.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,d.jsx)(`span`,{className:`text-[10px] text-sand-400 tabular-nums whitespace-nowrap`,children:h(e.created_at)})}),(0,d.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,d.jsx)(`span`,{className:`text-xs text-sand-500`,children:e.token_name})}),(0,d.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,d.jsx)(`span`,{className:`text-sand-800 truncate max-w-48`,title:e.query,children:v(e.query)})}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:g(e.input_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:g(e.output_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:g(e.cache_read_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:g(e.cache_creation_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:_(e)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:e.cost_usd==null?`-`:o(e.cost_usd)}),(0,d.jsx)(`td`,{className:`px-2 py-2.5`,children:(0,d.jsx)(p,{className:`size-4 text-sand-400`})})]},e.id))})]})}),j>1&&(0,d.jsxs)(`div`,{className:`flex items-center justify-center gap-3 mt-3`,children:[(0,d.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors`,disabled:b===1,onClick:()=>x(b-1),children:(0,d.jsx)(f,{className:`size-4`})}),(0,d.jsxs)(`span`,{className:`text-[11px] text-sand-400 tabular-nums`,children:[b,` / `,j]}),(0,d.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors`,disabled:b===j,onClick:()=>x(b+1),children:(0,d.jsx)(p,{className:`size-4`})})]})]})]})}function b(){let{page:e}=i.useSearch(),t=i.useNavigate();return(0,d.jsxs)(`div`,{className:`space-y-5 max-w-300 mx-auto -translate-x-4`,children:[(0,d.jsx)(`h1`,{className:`text-xl font-medium text-sand-900 tracking-tight`,children:`Request Logs`}),(0,d.jsx)(y,{page:e,onPageChange:e=>t({search:{page:e}})})]})}export{b as component};
|