@cartanova/qgrid-cli 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dist/application/qgrid/pool.js +20 -9
- package/bundle/dist/application/token/token.model.js +1 -1
- package/bundle/src/application/qgrid/pool.ts +29 -16
- package/bundle/src/application/token/token.model.ts +2 -2
- package/bundle/web-dist/client/assets/{index-BowrnLVe.js → index-CgXTSTgN.js} +2 -2
- package/bundle/web-dist/client/assets/{routes-DRU2rj_p.js → routes-DvViUcG1.js} +1 -1
- package/bundle/web-dist/client/assets/{show-DjQUOob1.js → show-CFGLH8f_.js} +1 -1
- package/bundle/web-dist/client/assets/{tokens-B6y-rxlU.js → tokens-Bib8aQbc.js} +1 -1
- package/bundle/web-dist/client/index.html +1 -1
- package/bundle/web-dist/server/assets/{routes-CQY28Uq3.js → routes-Dx59lTlD.js} +2 -2
- package/bundle/web-dist/server/entry-server.generated.js +1 -1
- package/package.json +1 -1
|
@@ -35,15 +35,26 @@ var ClaudePool = class {
|
|
|
35
35
|
active: !this.quotaExhausted.has(token)
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
tokenRrIndex = 0;
|
|
39
|
+
workerRrIndexes = /* @__PURE__ */ new Map();
|
|
39
40
|
selectWorker() {
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
const availableTokens = [...this.workers.entries()].filter(([token]) => !this.quotaExhausted.has(token));
|
|
42
|
+
if (availableTokens.length === 0) return null;
|
|
43
|
+
const tokenDepths = availableTokens.map(([token, workers]) => ({
|
|
44
|
+
token,
|
|
45
|
+
workers,
|
|
46
|
+
totalDepth: workers.reduce((sum, w) => sum + w.getQueueDepth(), 0)
|
|
47
|
+
}));
|
|
48
|
+
const minTokenDepth = Math.min(...tokenDepths.map((t) => t.totalDepth));
|
|
49
|
+
const idleTokens = tokenDepths.filter((t) => t.totalDepth === minTokenDepth);
|
|
50
|
+
const selected = idleTokens[this.tokenRrIndex % idleTokens.length];
|
|
51
|
+
this.tokenRrIndex++;
|
|
52
|
+
const minDepth = Math.min(...selected.workers.map((w) => w.getQueueDepth()));
|
|
53
|
+
const idleWorkers = selected.workers.filter((w) => w.getQueueDepth() === minDepth);
|
|
54
|
+
const wrIdx = this.workerRrIndexes.get(selected.token) ?? 0;
|
|
55
|
+
const picked = idleWorkers[wrIdx % idleWorkers.length];
|
|
56
|
+
this.workerRrIndexes.set(selected.token, wrIdx + 1);
|
|
57
|
+
return picked;
|
|
47
58
|
}
|
|
48
59
|
async query(input, timeoutMs) {
|
|
49
60
|
const triedTokens = /* @__PURE__ */ new Set();
|
|
@@ -111,4 +122,4 @@ function getPool() {
|
|
|
111
122
|
//#endregion
|
|
112
123
|
export { ClaudePool, getPool, initPool };
|
|
113
124
|
|
|
114
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9vbC5qcyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwbGljYXRpb24vcWdyaWQvcG9vbC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENsYXVkZVBvb2wg4oCUIOupgO2LsCDthqDtgbAg7ZSE66Gc7IS47IqkIO2SgC5cbiAqXG4gKiAyLWxheWVyIOyVhO2CpO2FjeyymDogQ2xhdWRlUG9vbCDihpIgV29ya2VyIChmbGF0KVxuICogLSBNYXA8dG9rZW4sIFdvcmtlcltdPuuhnCDthqDtgbDrs4Qg7JuM7LukIOq0gOumrCAo7JuQ67O4IO2GoO2BsOydtCDtgqQpXG4gKiAtIGxlYXN0LXF1ZXVlLWRlcHRoIOudvOyasO2MhVxuICogLSDtiKzrqoXtlZwg7L+87YSwIGZhaWxvdmVyIChRdW90YUVycm9yIOyLnCDri6Trpbgg7Yag7YGw7Jy866Gc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7QUFDakMsUUFBTzs7QUFHVCxTQUFnQixVQUFzQjtBQUNwQyxLQUFJLENBQUMsS0FBTSxPQUFNLElBQUksTUFBTSwrQ0FBK0M7QUFDMUUsUUFBTyJ9
|
|
@@ -172,4 +172,4 @@ const TokenModel = new TokenModelClass();
|
|
|
172
172
|
//#endregion
|
|
173
173
|
export { TokenModel };
|
|
174
174
|
|
|
175
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW4ubW9kZWwuanMiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcGxpY2F0aW9uL3Rva2VuL3Rva2VuLm1vZGVsLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIGFwaSxcbiAgYXNBcnJheSxcbiAgQmFkUmVxdWVzdEV4Y2VwdGlvbixcbiAgQmFzZU1vZGVsQ2xhc3MsXG4gIGV4aGF1c3RpdmUsXG4gIHR5cGUgTGlzdFJlc3VsdCxcbiAgTm90Rm91bmRFeGNlcHRpb24sXG59IGZyb20gXCJzb25hbXVcIjtcblxuaW1wb3J0IHsgU0QgfSBmcm9tIFwiLi4vLi4vaTE4bi9zZC5nZW5lcmF0ZWRcIjtcbmltcG9ydCB0eXBlIHsgVG9rZW5TdWJzZXRLZXksIFRva2VuU3Vic2V0TWFwcGluZyB9IGZyb20gXCIuLi9zb25hbXUuZ2VuZXJhdGVkXCI7XG5pbXBvcnQgeyB0b2tlbkxvYWRlclF1ZXJpZXMsIHRva2VuU3Vic2V0UXVlcmllcyB9IGZyb20gXCIuLi9zb25hbXUuZ2VuZXJhdGVkLnNzb1wiO1xuaW1wb3J0IHR5cGUgeyBUb2tlbkxpc3RQYXJhbXMsIFRva2VuU2F2ZVBhcmFtcyB9IGZyb20gXCIuL3Rva2VuLnR5cGVzXCI7XG5cbmNsYXNzIFRva2VuTW9kZWxDbGFzcyBleHRlbmRzIEJhc2VNb2RlbENs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BQ00sSUFBSSxLQUFnQztBQUV4QyxRQURZLEtBQUssUUFBUSxJQUFJLENBQ25CLFlBQVksT0FBTyxRQUFRO0FBQ25DLFVBQU8sSUFBSSxNQUFNLFNBQVMsQ0FBQyxRQUFRLGFBQWEsSUFBSSxDQUFDLFFBQVE7SUFDN0Q7QUFDRixTQUFPLElBQUk7Ozs7Q0FoSlosSUFBSTtFQUFFLFlBQVk7RUFBTyxTQUFTLENBQUMsU0FBUyxpQkFBaUI7RUFBRSxjQUFjO0VBQVMsQ0FBQzs7Ozs7O0NBaUJ2RixJQUFJO0VBQUUsWUFBWTtFQUFPLFNBQVMsQ0FBQyxTQUFTLGlCQUFpQjtFQUFFLGNBQWM7RUFBVSxDQUFDOzs7Ozs7Q0FtR3hGLElBQUk7RUFBRSxZQUFZO0VBQVEsU0FBUyxDQUFDLFNBQVMsb0JBQW9CO0VBQUUsQ0FBQzs7Ozs7O0NBV3BFLElBQUk7RUFBRSxZQUFZO0VBQVEsU0FBUyxDQUFDLFNBQVMsb0JBQW9CO0VBQUUsQ0FBQzs7Ozs7O0NBV3BFLElBQUk7RUFBRSxZQUFZO0VBQVEsU0FBUyxDQUFDLFNBQVMsb0JBQW9CO0VBQUUsQ0FBQzs7Ozs7QUFVdkUsTUFBYSxhQUFhLElBQUksaUJBQWlCIn0=
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ClaudePool — 멀티 토큰 프로세스 풀.
|
|
3
3
|
*
|
|
4
|
-
* 2-layer
|
|
5
|
-
* - Map<token, Worker[]>로 토큰별 워커 관리
|
|
6
|
-
* -
|
|
7
|
-
* - 투명한 쿼터 failover (QuotaError 시 다른 토큰으로 자동 재시도)
|
|
8
|
-
* - 워커 관리만 담당 (DB 의존 없음)
|
|
4
|
+
* 2-layer 라우팅: 토큰 선택 (least-total-depth + round-robin) → 워커 선택
|
|
5
|
+
* - Map<token, Worker[]>로 토큰별 워커 관리
|
|
6
|
+
* - 토큰 간 quota 균등 소진
|
|
9
7
|
*/
|
|
10
|
-
import type
|
|
8
|
+
import { type CliResult, type PoolConfig, type QueryInput, type TokenStats } from "./qgrid.types";
|
|
11
9
|
import { QuotaError } from "./qgrid.types";
|
|
12
10
|
import { Worker, type WorkerConfig } from "./worker";
|
|
13
11
|
|
|
@@ -50,20 +48,35 @@ export class ClaudePool {
|
|
|
50
48
|
}));
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
private
|
|
51
|
+
private tokenRrIndex = 0;
|
|
52
|
+
private workerRrIndexes = new Map<string, number>();
|
|
54
53
|
|
|
55
54
|
selectWorker(): Worker | null {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
const availableTokens = [...this.workers.entries()].filter(
|
|
56
|
+
([token]) => !this.quotaExhausted.has(token),
|
|
57
|
+
);
|
|
59
58
|
|
|
60
|
-
if (
|
|
59
|
+
if (availableTokens.length === 0) return null;
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
// 1단계: 토큰별 총 큐 depth가 가장 낮은 토큰 선택
|
|
62
|
+
const tokenDepths = availableTokens.map(([token, workers]) => ({
|
|
63
|
+
token,
|
|
64
|
+
workers,
|
|
65
|
+
totalDepth: workers.reduce((sum, w) => sum + w.getQueueDepth(), 0),
|
|
66
|
+
}));
|
|
67
|
+
const minTokenDepth = Math.min(...tokenDepths.map((t) => t.totalDepth));
|
|
68
|
+
const idleTokens = tokenDepths.filter((t) => t.totalDepth === minTokenDepth);
|
|
69
|
+
const selected = idleTokens[this.tokenRrIndex % idleTokens.length]!;
|
|
70
|
+
this.tokenRrIndex++;
|
|
71
|
+
|
|
72
|
+
// 2단계: 토큰 내에서 least-depth 워커, 동률이면 round-robin
|
|
73
|
+
const minDepth = Math.min(...selected.workers.map((w) => w.getQueueDepth()));
|
|
74
|
+
const idleWorkers = selected.workers.filter((w) => w.getQueueDepth() === minDepth);
|
|
75
|
+
const wrIdx = this.workerRrIndexes.get(selected.token) ?? 0;
|
|
76
|
+
const picked = idleWorkers[wrIdx % idleWorkers.length]!;
|
|
77
|
+
this.workerRrIndexes.set(selected.token, wrIdx + 1);
|
|
78
|
+
|
|
79
|
+
return picked;
|
|
67
80
|
}
|
|
68
81
|
|
|
69
82
|
async query(input: QueryInput, timeoutMs?: number): Promise<CliResult> {
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
} from "sonamu";
|
|
10
10
|
|
|
11
11
|
import { SD } from "../../i18n/sd.generated";
|
|
12
|
-
import type
|
|
12
|
+
import { type TokenSubsetKey, type TokenSubsetMapping } from "../sonamu.generated";
|
|
13
13
|
import { tokenLoaderQueries, tokenSubsetQueries } from "../sonamu.generated.sso";
|
|
14
|
-
import type
|
|
14
|
+
import { type TokenListParams, type TokenSaveParams } from "./token.types";
|
|
15
15
|
|
|
16
16
|
class TokenModelClass extends BaseModelClass<
|
|
17
17
|
TokenSubsetKey,
|
|
@@ -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-Bib8aQbc.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-tanstack-CUxlo6YN.js","assets/vendor-react-DH4kUfK2.js","assets/sd.generated-CkJCx4Bp.js","assets/services.generated-CAJQk7Wk.js","assets/routes-DvViUcG1.js","assets/show-CFGLH8f_.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 re,r as ie,t as ae}from"./sd.generated-CkJCx4Bp.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 oe(e){return e}function I(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??oe,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 ue=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=L(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=L(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=L(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=L(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 L(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 ue,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),R=e(M()),z=P(),me=e=>(0,z.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,z.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,z.jsx)(`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}),(0,z.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`})]})}),he=e=>(0,z.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,z.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,z.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,z.jsx)(`circle`,{cx:16.5,cy:7.5,r:.5,fill:`currentColor`})]})}),ge=[{title:`Dashboard`,path:`/`,icon:me},{title:`Tokens`,path:`/tokens`,icon:he}];function _e({className:e}){let t=_({select:e=>e.location.pathname}),n=e=>e===`/`?t===`/`||t===``:t.startsWith(e);return(0,z.jsxs)(`aside`,{className:`hidden md:flex w-56 bg-sand-50 flex-col shrink-0 border-r border-sand-200 ${e??``}`,children:[(0,z.jsxs)(`div`,{className:`px-5 py-5 border-b border-sand-200`,children:[(0,z.jsx)(`span`,{className:`text-base font-semibold text-sand-900`,children:`Qgrid`}),(0,z.jsx)(`p`,{className:`text-[11px] text-sand-400 mt-0.5`,children:`Token Management`})]}),(0,z.jsx)(`nav`,{className:`flex-1 px-3 py-3 space-y-1`,children:ge.map(e=>{let t=n(e.path);return(0,z.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,z.jsx)(e.icon,{className:`size-4 ${t?`text-sienna-400`:``}`}),(0,z.jsx)(`span`,{children:e.title})]},e.path)})})]})}var ve=[`/login`,`/signup`];function ye({children:e}){(0,R.useEffect)(()=>{let e=navigator.language.split(`-`)[0];re.includes(e)&&ie(e)},[]);let t=_({select:e=>e.location.pathname});return(0,z.jsxs)(`div`,{className:`flex h-screen w-full bg-white overflow-hidden`,children:[!ve.includes(t)&&(0,z.jsx)(_e,{}),(0,z.jsx)(`main`,{className:`flex-1 p-4 md:p-8 overflow-y-auto`,children:(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`div`,{className:`text-sand-400 text-center py-8 text-sm`,children:`로딩 중...`}),children:e})})]})}var be=e(N(),1),xe=Object.create(null),Se=e=>({}),Ce=new Proxy(xe,{get(e,t){return Se()[t]??xe[t]},has(e,t){return t in Se()||t in xe},set(e,t,n){let r=Se(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=Se(!0);return delete n[t],!0},ownKeys(){let e=Se(!0);return Object.keys(e)}});function B(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 B(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return B(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return B(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return B(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return B(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return B(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return B(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var we=1,Te=4,Ee=8,De=24,Oe={eterm:Te,cons25:Te,console:Te,cygwin:Te,dtterm:Te,gnome:Te,hurd:Te,jfbterm:Te,konsole:Te,kterm:Te,mlterm:Te,mosh:De,putty:Te,st:Te,"rxvt-unicode-24bit":De,terminator:De,"xterm-kitty":De},ke=new Map(Object.entries({APPVEYOR:Ee,BUILDKITE:Ee,CIRCLECI:De,DRONE:Ee,GITEA_ACTIONS:De,GITHUB_ACTIONS:De,GITLAB_CI:Ee,TRAVIS:Ee})),Ae=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function je(){if(B(`FORCE_COLOR`)!==void 0)switch(B(`FORCE_COLOR`)){case``:case`1`:case`true`:return Te;case`2`:return Ee;case`3`:return De;default:return we}if(B(`NODE_DISABLE_COLORS`)!==void 0&&B(`NODE_DISABLE_COLORS`)!==``||B(`NO_COLOR`)!==void 0&&B(`NO_COLOR`)!==``||B(`TERM`)===`dumb`)return we;if(B(`TMUX`))return De;if(`TF_BUILD`in Ce&&`AGENT_NAME`in Ce)return Te;if(`CI`in Ce){for(let{0:e,1:t}of ke)if(e in Ce)return t;return B(`CI_NAME`)===`codeship`?Ee:we}if(`TEAMCITY_VERSION`in Ce)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(B(`TEAMCITY_VERSION`))===null?we:Te;switch(B(`TERM_PROGRAM`)){case`iTerm.app`:return!B(`TERM_PROGRAM_VERSION`)||/^[0-2]\./.exec(B(`TERM_PROGRAM_VERSION`))!==null?Ee:De;case`HyperTerm`:case`MacTerm`:return De;case`Apple_Terminal`:return Ee}if(B(`COLORTERM`)===`truecolor`||B(`COLORTERM`)===`24bit`)return De;if(B(`TERM`)){if(/truecolor/.exec(B(`TERM`))!==null)return De;if(/^xterm-256/.exec(B(`TERM`))!==null)return Ee;let e=B(`TERM`).toLowerCase();if(Oe[e])return Oe[e];if(Ae.some(t=>t.exec(e)!==null))return Te}return B(`COLORTERM`)?Te:we}var Me={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`}},Ne=[`debug`,`info`,`success`,`warn`,`error`];function Pe(e,t){return Ne.indexOf(t)>=Ne.indexOf(e)}var Fe={info:Me.fg.blue,success:Me.fg.green,warn:Me.fg.yellow,error:Me.fg.red,debug:Me.fg.magenta},Ie=(e,t,n)=>{let r=new Date().toISOString();return n?`${Me.dim}${r}${Me.reset} ${Fe[e]}${e.toUpperCase()}${Me.reset} ${Me.bright}[Better Auth]:${Me.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`};(e=>{let t=e?.disabled!==!0,n=e?.level??`warn`,r=e?.disableColors===void 0?je()!==1:!e.disableColors,i=(i,a,o=[])=>{if(!t||!Pe(n,i))return;let s=Ie(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(Ne.map(e=>[e,(...[t,...n])=>i(e,t,n)])),get level(){return n}}})();function Le(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Re=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function ze(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new Re(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Be(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new Re(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Re?t:new Re(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Ve(e,t=`/api/auth`){if(Be(e),ze(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function He(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 Ue(e,t,n,r,i){if(e)return Ve(e,t);if(r!==!1){let e=Ce.BETTER_AUTH_URL||Ce.NEXT_PUBLIC_BETTER_AUTH_URL||Ce.PUBLIC_BETTER_AUTH_URL||Ce.NUXT_PUBLIC_BETTER_AUTH_URL||Ce.NUXT_PUBLIC_AUTH_URL||(Ce.BASE_URL===`/`?void 0:Ce.BASE_URL);if(e)return Ve(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&He(o,`proto`)&&He(a,`host`))try{return Ve(`${o}://${a}`,t)}catch{}if(n){let e=We(n.url);if(!e)throw new Re(`Could not get origin from request. Please provide a valid base URL.`);return Ve(e,t)}if(typeof window<`u`&&window.location)return Ve(window.location.origin,t)}function We(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Ge={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{}}}},Ke={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*:/},qe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Je={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},Ye=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Xe(e){return e instanceof Date&&!isNaN(e.getTime())}function Ze(e){let t=Ye.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 Xe(f)?f:null}function Qe(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 Je)return Je[s];if(!qe.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(Ke).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=Ze(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function $e(e,t={strict:!0}){return Qe(e,t)}var et=[],tt=0,nt=4,rt=0,it=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=tt+nt;t<et.length;)et[t]===e?et.splice(t,nt):t+=nt;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){rt++;let i=!et.length;for(let i of t)et.push(i,n.value,e,r);if(i){for(tt=0;tt<et.length;tt+=nt)et[tt](et[tt+1],et[tt+2],et[tt+3]);et.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},at=5,ot=6,st=10,ct=(e,t,n,r)=>(e.events=e.events||{},e.events[n+st]||(e.events[n+st]=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+st](),delete e.events[n+st])}),lt=1e3,ut=(e,t)=>ct(e,n=>{let r=t(n);r&&e.events[ot].push(r)},at,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[ot]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[ot])t();e.events[ot]=[]}},lt)},()=>{e.listen=n,e.off=r}});function dt(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 ft=()=>typeof window>`u`,pt=(e,t,n,r)=>{let i=it({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()=>{ft()||(o?await a():ut(i,()=>{let e=setTimeout(async()=>{o||=(await a(),!0)},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},mt=Symbol.for(`better-auth:broadcast-channel`),ht=()=>Math.floor(Date.now()/1e3),gt=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:ht()}))}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 _t(e=`better-auth.message`){return globalThis[mt]||(globalThis[mt]=new gt(e)),globalThis[mt]}var vt=Symbol.for(`better-auth:focus-manager`),yt=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 bt(){return globalThis[vt]||(globalThis[vt]=new yt),globalThis[vt]}var xt=Symbol.for(`better-auth:online-manager`),St=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 Ct(){return globalThis[xt]||(globalThis[xt]=new St),globalThis[xt]}var wt=()=>Math.floor(Date.now()/1e3),Tt=5;function Et(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||Ct().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=wt(),n.set(!n.get());return}let i=t.get();if(e?.event===`poll`){c.lastSessionRequest=wt(),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=wt(),n.set(!n.get())}).catch(()=>{});return}if(e?.event===`visibilitychange`){if(wt()-c.lastSessionRequest<Tt)return;c.lastSessionRequest=wt()}(i?.data===null||i?.data===void 0||e?.event===`visibilitychange`)&&(c.lastSync=wt(),n.set(!n.get()))},d=e=>{_t().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=_t().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=bt().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=Ct().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),_t().setup(),bt().setup(),Ct().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 Dt(e,t){let n=it(!1),r=pt(n,`/get-session`,e,{method:`GET`});return ut(r,()=>{let i=Et({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:r,$sessionSignal:n}}function Ot(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 kt(e,t,n=`.`,r){if(!Ot(t))return kt(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]]:Ot(a)&&Ot(i[t])?i[t]=kt(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function At(e){return(...t)=>t.reduce((t,n)=>kt(t,n,``,e),{})}var jt=At(),Mt=Object.defineProperty,Nt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,Rt=(e,t,n)=>t in e?Mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zt=(e,t)=>{for(var n in t||={})It.call(t,n)&&Rt(e,n,t[n]);if(Ft)for(var n of Ft(t))Lt.call(t,n)&&Rt(e,n,t[n]);return e},Bt=(e,t)=>Nt(e,Pt(t)),Vt=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)}},Ht=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}},Ut=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}},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(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Gt(e){if(typeof e==`number`)return new Ut({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new Ut(e);case`exponential`:return new Wt(e);default:throw Error(`Invalid retry strategy`)}}var Kt=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},qt=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Jt(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 qt.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function Yt(e){try{return JSON.parse(e),!0}catch{return!1}}function Xt(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 Zt(e){try{return JSON.parse(e)}catch{return e}}function Qt(e){return typeof e==`function`}function $t(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&Qt(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&Qt(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function en(e){let t=new Headers(e?.headers),n=await Kt(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=tn(e?.body);n&&t.set(`content-type`,n)}return t}function tn(e){return Xt(e)?`application/json`:null}function nn(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(Xt(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`&&Xt(e.body)?new URLSearchParams(e.body).toString():e.body}function rn(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return cn.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function an(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var on=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function sn(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new on(n.issues);return n.value}var cn=[`get`,`post`,`put`,`patch`,`delete`],ln=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=Bt(zt({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=Bt(zt({},e),{body:i.input?await sn(i.input,n?.body):n?.body,params:i.params?await sn(i.params,n?.params):n?.params,query:i.query?await sn(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),un=e=>{async function t(t,n){let r=Bt(zt(zt({},e),n),{plugins:[...e?.plugins||[],ln(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await fn(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 fn(t,r)}return t};function dn(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];cn.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 fn=async(e,t)=>{let{hooks:n,url:r,options:i}=await Ht(e,t),a=$t(i),o=new AbortController,s=i.signal??o.signal,c=dn(r,i),l=nn(i),u=await en(i),d=rn(r,i),f=Bt(zt({},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}=an(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(Bt(zt({},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=Jt(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??Zt)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await sn(f.output,r.data));for(let e of n.onSuccess)e&&await e(Bt(zt({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??Zt,_=await m.text(),v=Yt(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:Bt(zt({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(Bt(zt({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=Gt(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 fn(e,Bt(zt({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new Vt(m.status,m.statusText,v?y:_);return{data:null,error:Bt(zt({},y),{status:m.status,statusText:m.statusText})}},pn=(e,t)=>{let n=`credentials`in Request.prototype,r=Ue(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=un({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?$e(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Ge],...i]}),{$sessionSignal:f,session:p}=Dt(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=jt(t.getActions?.(d,y,e)??{},h));return{get baseURL(){return r},pluginsActions:h,pluginsAtoms:g,pluginPathMethods:_,atomListeners:v,$fetch:d,$store:y}};function mn(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function hn(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 gn(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`||mn(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=hn(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 _n(e,t={}){let n=(0,R.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,R.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?dt(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,R.useSyncExternalStore)(a,o,o)}function vn(e){return`use${Le(e)}`}function yn(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,$store:a,atomListeners:o}=pn(e),s={};for(let[e,t]of Object.entries(r))s[vn(e)]=()=>_n(t);return gn({...n,...s,$fetch:i,$store:a},i,t,r,o)}var bn={exports:{}},xn={},Sn;function Cn(){if(Sn)return xn;Sn=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 xn.Fragment=t,xn.jsx=n,xn.jsxs=n,xn}var wn;function Tn(){return wn||(wn=1,bn.exports=Cn()),bn.exports}var V=Tn();function En(e,t){let n=R.createContext(t),r=e=>{let{children:t,...r}=e,i=R.useMemo(()=>r,Object.values(r));return V.jsx(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=R.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function Dn(e,t=[]){let n=[];function r(t,r){let i=R.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=R.useMemo(()=>o,Object.values(o));return V.jsx(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=R.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=>R.createContext(e));return function(n){let r=n?.[e]||t;return R.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,On(i,...t)]}function On(...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 R.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function kn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function An(...e){return t=>{let n=!1,r=e.map(e=>{let r=kn(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():kn(e[t],null)}}}}function H(...e){return R.useCallback(An(...e),e)}function jn(e){let t=Mn(e),n=R.forwardRef((e,n)=>{let{children:r,...i}=e,a=R.Children.toArray(r),o=a.find(Fn);if(o){let e=o.props.children,r=a.map(t=>t===o?R.Children.count(e)>1?R.Children.only(null):R.isValidElement(e)?e.props.children:null:t);return V.jsx(t,{...i,ref:n,children:R.isValidElement(e)?R.cloneElement(e,void 0,r):null})}return V.jsx(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Mn(e){let t=R.forwardRef((e,t)=>{let{children:n,...r}=e;if(R.isValidElement(n)){let e=Ln(n),i=In(r,n.props);return n.type!==R.Fragment&&(i.ref=t?An(t,e):e),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nn=Symbol(`radix.slottable`);function Pn(e){let t=({children:e})=>V.jsx(V.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Nn,t}function Fn(e){return R.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Nn}function In(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 Ln(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 Rn(e){let t=e+`CollectionProvider`,[n,r]=Dn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=R.useRef(null),a=R.useRef(new Map).current;return V.jsx(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=jn(s),l=R.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=H(t,a(s,n).collectionRef);return V.jsx(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=jn(u),p=R.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=R.useRef(null),s=H(t,o),c=a(u,n);return R.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>{c.itemMap.delete(o)})),V.jsx(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return R.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 U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var zn=globalThis?.document?R.useLayoutEffect:()=>{},Bn=R.useInsertionEffect||zn;function Vn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Hn({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=R.useRef(e!==void 0);R.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,R.useCallback(t=>{if(s){let n=Un(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Hn({defaultProp:e,onChange:t}){let[n,r]=R.useState(e),i=R.useRef(n),a=R.useRef(t);return Bn(()=>{a.current=t},[t]),R.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Un(e){return typeof e==`function`}var W=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=jn(`Primitive.${t}`),r=R.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),V.jsx(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Wn(e,t){e&&be.flushSync(()=>e.dispatchEvent(t))}function Gn(e,t){return R.useReducer((e,n)=>t[e][n]??e,e)}var G=e=>{let{present:t,children:n}=e,r=Kn(t),i=typeof n==`function`?n({present:r.isPresent}):R.Children.only(n),a=H(r.ref,Jn(i));return typeof n==`function`||r.isPresent?R.cloneElement(i,{ref:a}):null};G.displayName=`Presence`;function Kn(e){let[t,n]=R.useState(),r=R.useRef(null),i=R.useRef(e),a=R.useRef(`none`),[o,s]=Gn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return R.useEffect(()=>{let e=qn(r.current);a.current=o===`mounted`?e:`none`},[o]),zn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=qn(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),zn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=qn(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=qn(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:R.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function qn(e){return e?.animationName||`none`}function Jn(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 Yn=R.useId||(()=>{}),Xn=0;function Zn(e){let[t,n]=R.useState(Yn());return zn(()=>{n(e=>e??String(Xn++))},[e]),t?`radix-${t}`:``}var Qn=`Collapsible`,[$n,er]=Dn(Qn),[tr,nr]=$n(Qn),rr=R.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Vn({prop:r,defaultProp:i??!1,onChange:o,caller:Qn});return V.jsx(tr,{scope:n,disabled:a,contentId:Zn(),open:c,onOpenToggle:R.useCallback(()=>l(e=>!e),[l]),children:V.jsx(W.div,{"data-state":lr(c),"data-disabled":a?``:void 0,...s,ref:t})})});rr.displayName=Qn;var ir=`CollapsibleTrigger`,ar=R.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=nr(ir,n);return V.jsx(W.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":lr(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:U(e.onClick,i.onOpenToggle)})});ar.displayName=ir;var or=`CollapsibleContent`,sr=R.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=nr(or,e.__scopeCollapsible);return V.jsx(G,{present:n||i.open,children:({present:e})=>V.jsx(cr,{...r,ref:t,present:e})})});sr.displayName=or;var cr=R.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=nr(or,n),[s,c]=R.useState(r),l=R.useRef(null),u=H(t,l),d=R.useRef(0),f=d.current,p=R.useRef(0),m=p.current,h=o.open||s,g=R.useRef(h),_=R.useRef(void 0);return R.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),zn(()=>{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]),V.jsx(W.div,{"data-state":lr(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 lr(e){return e?`open`:`closed`}var ur=rr,dr=ar,fr=sr,pr=R.createContext(void 0);function mr(e){let t=R.useContext(pr);return e||t||`ltr`}var hr=`Accordion`,gr=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[_r,vr,yr]=Rn(hr),[br]=Dn(hr,[yr,er]),xr=er(),Sr=R.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return V.jsx(_r.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?V.jsx(Or,{...a,ref:t}):V.jsx(Dr,{...i,ref:t})})});Sr.displayName=hr;var[Cr,wr]=br(hr),[Tr,Er]=br(hr,{collapsible:!1}),Dr=R.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=Vn({prop:n,defaultProp:r??``,onChange:i,caller:hr});return V.jsx(Cr,{scope:e.__scopeAccordion,value:R.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:R.useCallback(()=>a&&c(``),[a,c]),children:V.jsx(Tr,{scope:e.__scopeAccordion,collapsible:a,children:V.jsx(jr,{...o,ref:t})})})}),Or=R.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Vn({prop:n,defaultProp:r??[],onChange:i,caller:hr}),c=R.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=R.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return V.jsx(Cr,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:V.jsx(Tr,{scope:e.__scopeAccordion,collapsible:!0,children:V.jsx(jr,{...a,ref:t})})})}),[kr,Ar]=br(hr),jr=R.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=H(R.useRef(null),t),c=vr(n),l=mr(i)===`ltr`,u=U(e.onKeyDown,e=>{if(!gr.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 V.jsx(kr,{scope:n,disabled:r,direction:i,orientation:a,children:V.jsx(_r.Slot,{scope:n,children:V.jsx(W.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),Mr=`AccordionItem`,[Nr,Pr]=br(Mr),Fr=R.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=Ar(Mr,n),o=wr(Mr,n),s=xr(n),c=Zn(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return V.jsx(Nr,{scope:n,open:l,disabled:u,triggerId:c,children:V.jsx(ur,{"data-orientation":a.orientation,"data-state":Hr(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});Fr.displayName=Mr;var Ir=`AccordionHeader`,Lr=R.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Ar(hr,n),a=Pr(Ir,n);return V.jsx(W.h3,{"data-orientation":i.orientation,"data-state":Hr(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});Lr.displayName=Ir;var Rr=`AccordionTrigger`,zr=R.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Ar(hr,n),a=Pr(Rr,n),o=Er(Rr,n),s=xr(n);return V.jsx(_r.ItemSlot,{scope:n,children:V.jsx(dr,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});zr.displayName=Rr;var Br=`AccordionContent`,Vr=R.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Ar(hr,n),a=Pr(Br,n),o=xr(n);return V.jsx(fr,{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}})});Vr.displayName=Br;function Hr(e){return e?`open`:`closed`}var Ur=Fr,Wr=Lr,Gr=zr,Kr=Vr,qr=e=>V.jsx(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:V.jsx(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m6 9l6 6l6-6`})});function Jr(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=Jr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Yr(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Jr(e))&&(r&&(r+=` `),r+=t);return r}var Xr=(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},Zr=(e,t)=>({classGroupId:e,validator:t}),Qr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$r=`-`,ei=[],ti=`arbitrary..`,ni=e=>{let t=ai(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ii(e);let n=e.split($r);return ri(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Xr(i,t):t:i||ei}return n[e]||ei}}},ri=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ri(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join($r):e.slice(t).join($r),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ii=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?ti+r:void 0})(),ai=e=>{let{theme:t,classGroups:n}=e;return oi(n,t)},oi=(e,t)=>{let n=Qr();for(let r in e){let i=e[r];si(i,n,r,t)}return n},si=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ci(i,t,n,r)}},ci=(e,t,n,r)=>{if(typeof e==`string`){li(e,t,n);return}if(typeof e==`function`){ui(e,t,n,r);return}di(e,t,n,r)},li=(e,t,n)=>{let r=e===``?t:fi(t,e);r.classGroupId=n},ui=(e,t,n,r)=>{if(pi(e)){si(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Zr(n,e))},di=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];si(o,fi(t,a),n,r)}},fi=(e,t)=>{let n=e,r=t.split($r),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Qr(),n.nextPart.set(t,i)),n=i}return n},pi=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,mi=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)}}},hi=`!`,gi=`:`,_i=[],vi=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),yi=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===gi){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(hi)?(c=s.slice(0,-1),l=!0):s.startsWith(hi)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return vi(t,l,c,u)};if(t){let e=t+gi,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):vi(_i,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},bi=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}},xi=e=>({cache:mi(e.cacheSize),parseClassName:yi(e),sortModifiers:bi(e),...ni(e)}),Si=/\s+/,Ci=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Si),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+hi: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},wi=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ti(n))&&(i&&(i+=` `),i+=r);return i},Ti=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ti(e[r]))&&(n&&(n+=` `),n+=t);return n},Ei=(e,...t)=>{let n,r,i,a,o=o=>(n=xi(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=Ci(e,n);return i(e,a),a};return a=o,(...e)=>a(wi(...e))},Di=[],Oi=e=>{let t=t=>t[e]||Di;return t.isThemeGetter=!0,t},ki=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ai=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ji=/^\d+\/\d+$/,Mi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ni=/\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$/,Pi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ii=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Li=e=>ji.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),Ri=e=>!!e&&Number.isInteger(Number(e)),zi=e=>e.endsWith(`%`)&&K(e.slice(0,-1)),Bi=e=>Mi.test(e),Vi=()=>!0,Hi=e=>Ni.test(e)&&!Pi.test(e),Ui=()=>!1,Wi=e=>Fi.test(e),Gi=e=>Ii.test(e),Ki=e=>!q(e)&&!J(e),qi=e=>aa(e,la,Ui),q=e=>ki.test(e),Ji=e=>aa(e,ua,Hi),Yi=e=>aa(e,da,K),Xi=e=>aa(e,sa,Ui),Zi=e=>aa(e,ca,Gi),Qi=e=>aa(e,pa,Wi),J=e=>Ai.test(e),$i=e=>oa(e,ua),ea=e=>oa(e,fa),ta=e=>oa(e,sa),na=e=>oa(e,la),ra=e=>oa(e,ca),ia=e=>oa(e,pa,!0),aa=(e,t,n)=>{let r=ki.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oa=(e,t,n=!1)=>{let r=Ai.exec(e);return r?r[1]?t(r[1]):n:!1},sa=e=>e===`position`||e===`percentage`,ca=e=>e===`image`||e===`url`,la=e=>e===`length`||e===`size`||e===`bg-size`,ua=e=>e===`length`,da=e=>e===`number`,fa=e=>e===`family-name`,pa=e=>e===`shadow`,ma=Ei(()=>{let e=Oi(`color`),t=Oi(`font`),n=Oi(`text`),r=Oi(`font-weight`),i=Oi(`tracking`),a=Oi(`leading`),o=Oi(`breakpoint`),s=Oi(`container`),c=Oi(`spacing`),l=Oi(`radius`),u=Oi(`shadow`),d=Oi(`inset-shadow`),f=Oi(`text-shadow`),p=Oi(`drop-shadow`),m=Oi(`blur`),h=Oi(`perspective`),g=Oi(`aspect`),_=Oi(`ease`),v=Oi(`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=()=>[Li,`full`,`auto`,...w()],E=()=>[Ri,`none`,`subgrid`,J,q],D=()=>[`auto`,{span:[`full`,Ri,J,q]},Ri,J,q],O=()=>[Ri,`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=()=>[Li,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,J,q],ee=()=>[...b(),ta,Xi,{position:[J,q]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],F=()=>[`auto`,`cover`,`contain`,na,qi,{size:[J,q]}],ne=()=>[zi,$i,Ji],re=()=>[``,`none`,`full`,l,J,q],ie=()=>[``,K,$i,Ji],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],I=()=>[K,zi,ta,Xi],se=()=>[``,`none`,m,J,q],ce=()=>[`none`,K,J,q],le=()=>[`none`,K,J,q],ue=()=>[K,J,q],L=()=>[Li,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Bi],breakpoint:[Bi],color:[Vi],container:[Bi],"drop-shadow":[Bi],ease:[`in`,`out`,`in-out`],font:[Ki],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Bi],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Bi],shadow:[Bi],spacing:[`px`,K],text:[Bi],"text-shadow":[Bi],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Li,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:[Ri,`auto`,J,q]}],basis:[{basis:[Li,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[K,Li,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,K,J,q]}],shrink:[{shrink:[``,K,J,q]}],order:[{order:[Ri,`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,$i,Ji]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,J,Yi]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,zi,q]}],"font-family":[{font:[ea,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,Yi]}],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:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[K,`from-font`,`auto`,J,Ji]}],"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`]},Ri,J,q],radial:[``,J,q],conic:[Ri,J,q]},ra,Zi]}],"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:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`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:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[K,J,q]}],"outline-w":[{outline:[``,K,$i,Ji]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,ia,Qi]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,ia,Qi]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:ie()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[K,Ji]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,ia,Qi]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[K,J,q]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"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":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"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":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"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":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"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":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"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":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"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":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"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":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"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":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"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":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"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:se()}],brightness:[{brightness:[K,J,q]}],contrast:[{contrast:[K,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ia,Qi]}],"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":se()}],"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:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"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,$i,Ji,Yi]}],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 ma(Yr(e))}function ha(e){return e===void 0?void 0:Array.isArray(e)?e:[e]}var ga=R.forwardRef(({className:e,...t},n)=>V.jsx(Ur,{ref:n,className:Y(`border-b`,e),...t}));ga.displayName=`AccordionItem`;var _a=R.forwardRef(({className:e,children:t,...n},r)=>V.jsx(Wr,{className:`flex`,children:V.jsxs(Gr,{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,V.jsx(qr,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));_a.displayName=Gr.displayName;var va=R.forwardRef(({className:e,children:t,...n},r)=>V.jsx(Kr,{ref:r,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:V.jsx(`div`,{className:Y(`pb-4 pt-0`,e),children:t})}));va.displayName=Kr.displayName;var ya=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,ba=Yr,xa=(e,t)=>n=>{var r;if(t?.variants==null)return ba(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=ya(t)||ya(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 ba(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)},Sa=xa(`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`}}),Ca=R.forwardRef(({className:e,variant:t,...n},r)=>V.jsx(`div`,{ref:r,role:`alert`,className:Y(Sa({variant:t}),e),...n}));Ca.displayName=`Alert`;var wa=R.forwardRef(({className:e,...t},n)=>V.jsx(`h5`,{ref:n,className:Y(`mb-1 font-medium leading-none tracking-tight`,e),...t}));wa.displayName=`AlertTitle`;var Ta=R.forwardRef(({className:e,...t},n)=>V.jsx(`div`,{ref:n,className:Y(`text-sm [&_p]:leading-relaxed`,e),...t}));Ta.displayName=`AlertDescription`;function X(e){let t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ea(e,t=globalThis?.document){let n=X(e);R.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 Da=`DismissableLayer`,Oa=`dismissableLayer.update`,ka=`dismissableLayer.pointerDownOutside`,Aa=`dismissableLayer.focusOutside`,ja,Ma=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Na=R.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=R.useContext(Ma),[u,d]=R.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=R.useState({}),m=H(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=Ia(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=La(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ea(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),R.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ja=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ra(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ja)}},[u,f,n,l]),R.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ra())},[u,l]),R.useEffect(()=>{let e=()=>p({});return document.addEventListener(Oa,e),()=>document.removeEventListener(Oa,e)},[]),V.jsx(W.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,x.onPointerDownCapture)})});Na.displayName=Da;var Pa=`DismissableLayerBranch`,Fa=R.forwardRef((e,t)=>{let n=R.useContext(Ma),r=R.useRef(null),i=H(t,r);return R.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),V.jsx(W.div,{...e,ref:i})});Fa.displayName=Pa;function Ia(e,t=globalThis?.document){let n=X(e),r=R.useRef(!1),i=R.useRef(()=>{});return R.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){za(ka,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 La(e,t=globalThis?.document){let n=X(e),r=R.useRef(!1);return R.useEffect(()=>{let e=e=>{e.target&&!r.current&&za(Aa,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 Ra(){let e=new CustomEvent(Oa);document.dispatchEvent(e)}function za(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?Wn(i,a):i.dispatchEvent(a)}var Ba=Na,Va=Fa,Ha=`focusScope.autoFocusOnMount`,Ua=`focusScope.autoFocusOnUnmount`,Wa={bubbles:!1,cancelable:!0},Ga=`FocusScope`,Ka=R.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=R.useState(null),l=X(i),u=X(a),d=R.useRef(null),f=H(t,e=>c(e)),p=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:$a(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||$a(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&$a(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]),R.useEffect(()=>{if(s){eo.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ha,Wa);s.addEventListener(Ha,l),s.dispatchEvent(t),t.defaultPrevented||(qa(ro(Ya(s)),{select:!0}),document.activeElement===e&&$a(s))}return()=>{s.removeEventListener(Ha,l),setTimeout(()=>{let t=new CustomEvent(Ua,Wa);s.addEventListener(Ua,u),s.dispatchEvent(t),t.defaultPrevented||$a(e??document.body,{select:!0}),s.removeEventListener(Ua,u),eo.remove(p)},0)}}},[s,l,u,p]);let m=R.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]=Ja(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&$a(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&$a(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return V.jsx(W.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Ka.displayName=Ga;function qa(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if($a(r,{select:t}),document.activeElement!==n)return}function Ja(e){let t=Ya(e);return[Xa(t,e),Xa(t.reverse(),e)]}function Ya(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 Xa(e,t){for(let n of e)if(!Za(n,{upTo:t}))return n}function Za(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 Qa(e){return e instanceof HTMLInputElement&&`select`in e}function $a(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qa(e)&&t&&e.select()}}var eo=to();function to(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=no(e,t),e.unshift(t)},remove(t){e=no(e,t),e[0]?.resume()}}}function no(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ro(e){return e.filter(e=>e.tagName!==`A`)}var io=`Portal`,ao=R.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=R.useState(!1);zn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?be.createPortal(V.jsx(W.div,{...r,ref:t}),o):null});ao.displayName=io;var oo=0;function so(){R.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??co()),document.body.insertAdjacentElement(`beforeend`,e[1]??co()),oo++,()=>{oo===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),oo--}},[])}function co(){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 lo=function(){return lo=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},lo.apply(this,arguments)};function uo(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 fo(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 po=`right-scroll-bar-position`,mo=`width-before-scroll-bar`,ho=`with-scroll-bars-hidden`,go=`--removed-body-scroll-bar-size`;function _o(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function vo(e,t){var n=(0,R.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 yo=typeof window<`u`?R.useLayoutEffect:R.useEffect,bo=new WeakMap;function xo(e,t){var n=vo(null,function(t){return e.forEach(function(e){return _o(e,t)})});return yo(function(){var t=bo.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||_o(e,null)}),i.forEach(function(e){r.has(e)||_o(e,a)})}bo.set(n,e)},[e]),n}function So(e){return e}function Co(e,t){t===void 0&&(t=So);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 wo(e){e===void 0&&(e={});var t=Co(null);return t.options=lo({async:!0,ssr:!1},e),t}var To=function(e){var t=e.sideCar,n=uo(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 R.createElement(r,lo({},n))};To.isSideCarExport=!0;function Eo(e,t){return e.useMedium(t),To}var Do=wo(),Oo=function(){},ko=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:Oo,onWheelCapture:Oo,onTouchMoveCapture:Oo}),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=uo(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=xo([n,t]),C=lo(lo({},b),i);return R.createElement(R.Fragment,null,u&&R.createElement(x,{sideCar:Do,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?R.cloneElement(R.Children.only(s),lo(lo({},C),{ref:S})):R.createElement(v,lo({},C,{className:c,ref:S}),s))});ko.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ko.classNames={fullWidth:mo,zeroRight:po};var Ao=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function jo(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ao();return t&&e.setAttribute(`nonce`,t),e}function Mo(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function No(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Po=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jo())&&(Mo(t,n),No(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Fo=function(){var e=Po();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Io=function(){var e=Fo();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Lo={left:0,top:0,right:0,gap:0},Ro=function(e){return parseInt(e||``,10)||0},zo=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[Ro(n),Ro(r),Ro(i)]},Bo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Lo;var t=zo(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])}},Vo=Io(),Ho=`data-scroll-locked`,Uo=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
|
.${ho} {
|
|
4
4
|
overflow: hidden ${r};
|
|
@@ -113,4 +113,4 @@ Defaulting to \`null\`.`}var gE=oE,_E=cE,vE=R.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=pj,s=!ej.jitless,c=s&&mj.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?wM([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function DM(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=>!Aj(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=>Nj(e,r,tj())))}),t)}var OM=Q(`$ZodUnion`,(e,t)=>{hM.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=>oj(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=>DM(t,i,e,a)):DM(s,i,e,a)}}),kM=Q(`$ZodIntersection`,(e,t)=>{hM.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])=>jM(e,t,n)):jM(e,i,a)}});function AM(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(hj(e)&&hj(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=AM(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=AM(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 jM(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}),Aj(e))return e;let o=AM(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var MM=Q(`$ZodEnum`,(e,t)=>{hM.init(e,t);let n=nj(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>_j.has(typeof e)).map(e=>typeof e==`string`?vj(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}}),NM=Q(`$ZodTransform`,(e,t)=>{hM.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new $A(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 QA;return n.value=i,n}});function PM(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var FM=Q(`$ZodOptional`,(e,t)=>{hM.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(`^(${oj(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=>PM(t,e.value)):PM(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),IM=Q(`$ZodExactOptional`,(e,t)=>{FM.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)}),LM=Q(`$ZodNullable`,(e,t)=>{hM.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(`^(${oj(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)}),RM=Q(`$ZodDefault`,(e,t)=>{hM.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=>zM(e,t)):zM(r,t)}});function zM(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var BM=Q(`$ZodPrefault`,(e,t)=>{hM.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))}),VM=Q(`$ZodNonOptional`,(e,t)=>{hM.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=>HM(t,e)):HM(i,e)}});function HM(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 UM=Q(`$ZodCatch`,(e,t)=>{hM.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=>Nj(e,n,tj()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Nj(e,n,tj()))},input:e.value}),e.issues=[]),e)}}),WM=Q(`$ZodPipe`,(e,t)=>{hM.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=>GM(e,t.in,n)):GM(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>GM(e,t.out,n)):GM(r,t.out,n)}});function GM(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var KM=Q(`$ZodReadonly`,(e,t)=>{hM.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(qM):qM(r)}});function qM(e){return e.value=Object.freeze(e.value),e}var JM=Q(`$ZodCustom`,(e,t)=>{rM.init(e,t),hM.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=>YM(t,n,r,e));YM(i,n,r,e)}});function YM(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(Fj(e))}}var XM,ZM=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 QM(){return new ZM}(XM=globalThis).__zod_globalRegistry??(XM.__zod_globalRegistry=QM());var $M=globalThis.__zod_globalRegistry;function eN(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...bj(t)})}function tN(e){return new e({type:`unknown`})}function nN(e,t){return new e({type:`never`,...bj(t)})}function rN(e,t){return new aM({check:`less_than`,...bj(t),value:e,inclusive:!1})}function iN(e,t){return new aM({check:`less_than`,...bj(t),value:e,inclusive:!0})}function aN(e,t){return new oM({check:`greater_than`,...bj(t),value:e,inclusive:!1})}function oN(e,t){return new oM({check:`greater_than`,...bj(t),value:e,inclusive:!0})}function sN(e,t){return new sM({check:`multiple_of`,...bj(t),value:e})}function cN(e,t){return new lM({check:`max_length`,...bj(t),maximum:e})}function lN(e,t){return new uM({check:`min_length`,...bj(t),minimum:e})}function uN(e,t){return new dM({check:`length_equals`,...bj(t),length:e})}function dN(e){return new fM({check:`overwrite`,tx:e})}function fN(e,t,n){return new e({type:`array`,element:t,...bj(n)})}function pN(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...bj(n)})}function mN(e){let t=hN(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Fj(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(Fj(r))}},e(n.value,n)));return t}function hN(e,t){let n=new rM({check:`custom`,...bj(t)});return n._zod.check=e,n}function gN(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??$M,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 _N(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,_N(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`&&bN(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 vN(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 yN(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:SN(t,`input`,e.processors),output:SN(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function bN(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 bN(r.element,n);if(r.type===`set`)return bN(r.valueType,n);if(r.type===`lazy`)return bN(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 bN(r.innerType,n);if(r.type===`intersection`)return bN(r.left,n)||bN(r.right,n);if(r.type===`record`||r.type===`map`)return bN(r.keyType,n)||bN(r.valueType,n);if(r.type===`pipe`)return bN(r.in,n)||bN(r.out,n);if(r.type===`object`){for(let e in r.shape)if(bN(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(bN(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(bN(e,n))return!0;return!!(r.rest&&bN(r.rest,n))}return!1}var xN=(e,t={})=>n=>{let r=gN({...n,processors:t});return _N(e,r),vN(r,e),yN(r,e)},SN=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=gN({...i??{},target:a,io:t,processors:n});return _N(e,o),vN(o,e),yN(o,e)},CN=(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)},wN=(e,t,n,r)=>{n.not={}},TN=(e,t,n,r)=>{let i=e._zod.def,a=nj(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},EN=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},DN=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},ON=(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=_N(a.element,t,{...r,path:[...r.path,`items`]})},kN=(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]=_N(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=_N(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},AN=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>_N(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},jN=(e,t,n,r)=>{let i=e._zod.def,a=_N(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=_N(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]]},MN=(e,t,n,r)=>{let i=e._zod.def,a=_N(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`}]},NN=(e,t,n,r)=>{let i=e._zod.def;_N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},PN=(e,t,n,r)=>{let i=e._zod.def;_N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},FN=(e,t,n,r)=>{let i=e._zod.def;_N(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)))},IN=(e,t,n,r)=>{let i=e._zod.def;_N(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},LN=(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;_N(a,t,r);let o=t.seen.get(e);o.ref=a},RN=(e,t,n,r)=>{let i=e._zod.def;_N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},zN=(e,t,n,r)=>{let i=e._zod.def;_N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},BN=Q(`ZodError`,(e,t)=>{Lj.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Bj(e,t)},flatten:{value:t=>zj(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,rj,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,rj,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),VN=Vj(BN),HN=Hj(BN),UN=Uj(BN),WN=Gj(BN),GN=qj(BN),KN=Jj(BN),qN=Yj(BN),JN=Xj(BN),YN=Zj(BN),XN=Qj(BN),ZN=$j(BN),QN=eM(BN),$N=Q(`ZodType`,(e,t)=>(hM.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:SN(e,`input`),output:SN(e,`output`)}}),e.toJSONSchema=xN(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(uj(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)=>yj(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>VN(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>UN(e,t,n),e.parseAsync=async(t,n)=>HN(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>WN(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>GN(e,t,n),e.decode=(t,n)=>KN(e,t,n),e.encodeAsync=async(t,n)=>qN(e,t,n),e.decodeAsync=async(t,n)=>JN(e,t,n),e.safeEncode=(t,n)=>YN(e,t,n),e.safeDecode=(t,n)=>XN(e,t,n),e.safeEncodeAsync=async(t,n)=>ZN(e,t,n),e.safeDecodeAsync=async(t,n)=>QN(e,t,n),e.refine=(t,n)=>e.check(LP(t,n)),e.superRefine=t=>e.check(RP(t)),e.overwrite=t=>e.check(dN(t)),e.optional=()=>yP(e),e.exactOptional=()=>xP(e),e.nullable=()=>CP(e),e.nullish=()=>yP(CP(e)),e.nonoptional=t=>kP(e,t),e.array=()=>cP(e),e.or=t=>dP([e,t]),e.and=t=>pP(e,t),e.transform=t=>NP(e,_P(t)),e.default=t=>TP(e,t),e.prefault=t=>DP(e,t),e.catch=t=>jP(e,t),e.pipe=t=>NP(e,t),e.readonly=()=>FP(e),e.describe=t=>{let n=e.clone();return $M.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return $M.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return $M.get(e);let n=e.clone();return $M.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),eP=Q(`ZodNumber`,(e,t)=>{gM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CN(e,t,n),e.gt=(t,n)=>e.check(aN(t,n)),e.gte=(t,n)=>e.check(oN(t,n)),e.min=(t,n)=>e.check(oN(t,n)),e.lt=(t,n)=>e.check(rN(t,n)),e.lte=(t,n)=>e.check(iN(t,n)),e.max=(t,n)=>e.check(iN(t,n)),e.int=t=>e.check(nP(t)),e.safe=t=>e.check(nP(t)),e.positive=t=>e.check(aN(0,t)),e.nonnegative=t=>e.check(oN(0,t)),e.negative=t=>e.check(rN(0,t)),e.nonpositive=t=>e.check(iN(0,t)),e.multipleOf=(t,n)=>e.check(sN(t,n)),e.step=(t,n)=>e.check(sN(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}),tP=Q(`ZodNumberFormat`,(e,t)=>{_M.init(e,t),eP.init(e,t)});function nP(e){return eN(tP,e)}var rP=Q(`ZodUnknown`,(e,t)=>{vM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function iP(){return tN(rP)}var aP=Q(`ZodNever`,(e,t)=>{yM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wN(e,t,n)});function oP(e){return nN(aP,e)}var sP=Q(`ZodArray`,(e,t)=>{xM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ON(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(lN(t,n)),e.nonempty=t=>e.check(lN(1,t)),e.max=(t,n)=>e.check(cN(t,n)),e.length=(t,n)=>e.check(uN(t,n)),e.unwrap=()=>e.element});function cP(e,t){return fN(sP,e,t)}var lP=Q(`ZodObject`,(e,t)=>{EM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kN(e,t,n,r),$(e,`shape`,()=>t.shape),e.keyof=()=>hP(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:iP()}),e.loose=()=>e.clone({...e._zod.def,catchall:iP()}),e.strict=()=>e.clone({...e._zod.def,catchall:oP()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Tj(e,t),e.safeExtend=t=>Ej(e,t),e.merge=t=>Dj(e,t),e.pick=t=>Cj(e,t),e.omit=t=>wj(e,t),e.partial=(...t)=>Oj(vP,e,t[0]),e.required=(...t)=>kj(OP,e,t[0])}),uP=Q(`ZodUnion`,(e,t)=>{OM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AN(e,t,n,r),e.options=t.options});function dP(e,t){return new uP({type:`union`,options:e,...bj(t)})}var fP=Q(`ZodIntersection`,(e,t)=>{kM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jN(e,t,n,r)});function pP(e,t){return new fP({type:`intersection`,left:e,right:t})}var mP=Q(`ZodEnum`,(e,t)=>{MM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TN(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 mP({...t,checks:[],...bj(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 mP({...t,checks:[],...bj(r),entries:i})}});function hP(e,t){return new mP({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...bj(t)})}var gP=Q(`ZodTransform`,(e,t)=>{NM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DN(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new $A(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Fj(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(Fj(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function _P(e){return new gP({type:`transform`,transform:e})}var vP=Q(`ZodOptional`,(e,t)=>{FM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yP(e){return new vP({type:`optional`,innerType:e})}var bP=Q(`ZodExactOptional`,(e,t)=>{IM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xP(e){return new bP({type:`optional`,innerType:e})}var SP=Q(`ZodNullable`,(e,t)=>{LM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CP(e){return new SP({type:`nullable`,innerType:e})}var wP=Q(`ZodDefault`,(e,t)=>{RM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function TP(e,t){return new wP({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():gj(t)}})}var EP=Q(`ZodPrefault`,(e,t)=>{BM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function DP(e,t){return new EP({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():gj(t)}})}var OP=Q(`ZodNonOptional`,(e,t)=>{VM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kP(e,t){return new OP({type:`nonoptional`,innerType:e,...bj(t)})}var AP=Q(`ZodCatch`,(e,t)=>{UM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jP(e,t){return new AP({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var MP=Q(`ZodPipe`,(e,t)=>{WM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LN(e,t,n,r),e.in=t.in,e.out=t.out});function NP(e,t){return new MP({type:`pipe`,in:e,out:t})}var PP=Q(`ZodReadonly`,(e,t)=>{KM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FP(e){return new PP({type:`readonly`,innerType:e})}var IP=Q(`ZodCustom`,(e,t)=>{JM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EN(e,t)});function LP(e,t={}){return pN(IP,e,t)}function RP(e){return mN(e)}async function zP(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=>zP(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 zP(i,t);return n}return e}function BP(e,t){let[n,r]=(0,R.useState)(t),[i,a]=(0,R.useState)(new Map),{uploader:o}=mu();function s(e,t){let n=t.replace(/\./g,`.shape.`).replace(/\[[^\]]+\]/g,`.element`).replace(/^\.element/,`element`),r;return e instanceof lP?r=KA(e.shape,n):e instanceof sP&&(r=KA(e,n)),r===void 0?`normal`:r instanceof vP?`optional`:r instanceof SP?`nullable`:`normal`}return{form:n,setForm:r,register:(t,o)=>{let c=o??s(e,t),l=KA(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}:JA(n,t,i))}};return u&&(d.error=u),d},submit:e=>async()=>{let t=await zP(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 VP,HP;function UP(){return HP||(HP=1,VP=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}),VP}UP();var WP=`Switch`,[GP]=Dn(WP),[KP,qP]=GP(WP),JP=R.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]=R.useState(null),m=H(t,e=>p(e)),h=R.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=Vn({prop:i,defaultProp:a??!1,onChange:l,caller:WP});return V.jsxs(KP,{scope:n,checked:_,disabled:s,children:[V.jsx(W.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":$P(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:U(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&V.jsx(QP,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});JP.displayName=WP;var YP=`SwitchThumb`,XP=R.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=qP(YP,n);return V.jsx(W.span,{"data-state":$P(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});XP.displayName=YP;var ZP=`SwitchBubbleInput`,QP=R.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=R.useRef(null),s=H(o,a),c=Sg(n),l=Zp(t);return R.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]),V.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}})});QP.displayName=ZP;function $P(e){return e?`checked`:`unchecked`}var eF=JP,tF=XP,nF=R.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=R.useRef(null);R.useImperativeHandle(c,()=>u.current);let d=e=>{a?.(e)};return V.jsxs(V.Fragment,{children:[V.jsx(`input`,{type:`checkbox`,ref:u,name:t,defaultChecked:i,onBlur:o,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),V.jsx(eF,{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:V.jsx(tF,{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`)})})]})});nF.displayName=`Switch`;var rF=`Tabs`,[iF]=Dn(rF,[$g]),aF=$g(),[oF,sF]=iF(rF),cF=R.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=mr(s),[d,f]=Vn({prop:r,onChange:i,defaultProp:a??``,caller:rF});return V.jsx(oF,{scope:n,baseId:Zn(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:V.jsx(W.div,{dir:u,"data-orientation":o,...l,ref:t})})});cF.displayName=rF;var lF=`TabsList`,uF=R.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=sF(lF,n),o=aF(n);return V.jsx(d_,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:V.jsx(W.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});uF.displayName=lF;var dF=`TabsTrigger`,fF=R.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=sF(dF,n),s=aF(n),c=hF(o.baseId,r),l=gF(o.baseId,r),u=r===o.value;return V.jsx(f_,{asChild:!0,...s,focusable:!i,active:u,children:V.jsx(W.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:U(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:U(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:U(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});fF.displayName=dF;var pF=`TabsContent`,mF=R.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=sF(pF,n),c=hF(s.baseId,r),l=gF(s.baseId,r),u=r===s.value,d=R.useRef(u);return R.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),V.jsx(G,{present:i||u,children:({present:n})=>V.jsx(W.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})})});mF.displayName=pF;function hF(e,t){return`${e}-trigger-${t}`}function gF(e,t){return`${e}-content-${t}`}var _F=uF,vF=fF,yF=mF,bF=R.forwardRef(({className:e,...t},n)=>V.jsx(_F,{ref:n,className:Y(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));bF.displayName=_F.displayName;var xF=R.forwardRef(({className:e,...t},n)=>V.jsx(vF,{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}));xF.displayName=vF.displayName;var SF=R.forwardRef(({className:e,...t},n)=>V.jsx(yF,{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}));SF.displayName=yF.displayName;var CF=R.forwardRef(({className:e,onValueChange:t,onChange:n,...r},i)=>{let a=e=>{t?.(e.target.value),n?.(e)};return V.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})});CF.displayName=`Textarea`;var wF=`ToastProvider`,[TF,EF,DF]=Rn(`Toast`),[OF]=Dn(`Toast`,[DF]),[kF,AF]=OF(wF),jF=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=R.useState(null),[l,u]=R.useState(0),d=R.useRef(!1),f=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wF}\`. Expected non-empty \`string\`.`),V.jsx(TF.Provider,{scope:t,children:V.jsx(kF,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:R.useCallback(()=>u(e=>e+1),[]),onToastRemove:R.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};jF.displayName=wF;var MF=`ToastViewport`,NF=[`F8`],PF=`toast.viewportPause`,FF=`toast.viewportResume`,IF=R.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=NF,label:i=`Notifications ({hotkey})`,...a}=e,o=AF(MF,n),s=EF(n),c=R.useRef(null),l=R.useRef(null),u=R.useRef(null),d=R.useRef(null),f=H(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;R.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]),R.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(PF);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(FF);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=R.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...lI(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return R.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);uI(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),V.jsxs(Va,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&V.jsx(RF,{ref:l,onFocusFromOutsideViewport:()=>{uI(h({tabbingDirection:`forwards`}))}}),V.jsx(TF.Slot,{scope:n,children:V.jsx(W.ol,{tabIndex:-1,...a,ref:f})}),m&&V.jsx(RF,{ref:u,onFocusFromOutsideViewport:()=>{uI(h({tabbingDirection:`backwards`}))}})]})});IF.displayName=MF;var LF=`ToastFocusProxy`,RF=R.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=AF(LF,n);return V.jsx(Hw,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;!a.viewport?.contains(t)&&r()}})});RF.displayName=LF;var zF=`Toast`,BF=`toast.swipeStart`,VF=`toast.swipeMove`,HF=`toast.swipeCancel`,UF=`toast.swipeEnd`,WF=R.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Vn({prop:r,defaultProp:i??!0,onChange:a,caller:zF});return V.jsx(G,{present:n||s,children:V.jsx(qF,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:X(e.onPause),onResume:X(e.onResume),onSwipeStart:U(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:U(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:U(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:U(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)})})})});WF.displayName=zF;var[GF,KF]=OF(zF,{onClose(){}}),qF=R.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=AF(zF,n),[g,_]=R.useState(null),v=H(t,e=>_(e)),y=R.useRef(null),b=R.useRef(null),x=i||h.duration,S=R.useRef(0),C=R.useRef(x),w=R.useRef(0),{onToastAdd:T,onToastRemove:E}=h,D=X(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),O=R.useCallback(e=>{!e||e===1/0||(window.clearTimeout(w.current),S.current=new Date().getTime(),w.current=window.setTimeout(D,e))},[D]);R.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(PF,n),e.addEventListener(FF,t),()=>{e.removeEventListener(PF,n),e.removeEventListener(FF,t)}}},[h.viewport,x,c,l,O]),R.useEffect(()=>{a&&!h.isClosePausedRef.current&&O(x)},[a,x,h.isClosePausedRef,O]),R.useEffect(()=>(T(),()=>E()),[T,E]);let k=R.useMemo(()=>g?iI(g):null,[g]);return h.viewport?V.jsxs(V.Fragment,{children:[k&&V.jsx(JF,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:k}),V.jsx(GF,{scope:n,onClose:D,children:be.createPortal(V.jsx(TF.ItemSlot,{scope:n,children:V.jsx(Ba,{asChild:!0,onEscapeKeyDown:U(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||D(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:V.jsx(W.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:U(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:U(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:U(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,aI(VF,d,f,{discrete:!1})):oI(l,h.swipeDirection,c)?(b.current=l,aI(BF,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:U(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};oI(t,h.swipeDirection,h.swipeThreshold)?aI(UF,p,r,{discrete:!0}):aI(HF,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),JF=e=>{let{__scopeToast:t,children:n,...r}=e,i=AF(zF,t),[a,o]=R.useState(!1),[s,c]=R.useState(!1);return sI(()=>o(!0)),R.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:V.jsx(ao,{asChild:!0,children:V.jsx(Hw,{...r,children:a&&V.jsxs(V.Fragment,{children:[i.label,` `,n]})})})},YF=`ToastTitle`,XF=R.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return V.jsx(W.div,{...r,ref:t})});XF.displayName=YF;var ZF=`ToastDescription`,QF=R.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return V.jsx(W.div,{...r,ref:t})});QF.displayName=ZF;var $F=`ToastAction`,eI=R.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?V.jsx(rI,{altText:n,asChild:!0,children:V.jsx(nI,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${$F}\`. Expected non-empty \`string\`.`),null)});eI.displayName=$F;var tI=`ToastClose`,nI=R.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=KF(tI,n);return V.jsx(rI,{asChild:!0,children:V.jsx(W.button,{type:`button`,...r,ref:t,onClick:U(e.onClick,i.onClose)})})});nI.displayName=tI;var rI=R.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return V.jsx(W.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function iI(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),cI(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(...iI(e))}}),t}function aI(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?Wn(i,a):i.dispatchEvent(a)}var oI=(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 sI(e=()=>{}){let t=X(e);zn(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function cI(e){return e.nodeType===e.ELEMENT_NODE}function lI(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 uI(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var dI=IF,fI=WF,pI=XF,mI=QF,hI=eI,gI=nI,_I=R.forwardRef(({className:e,...t},n)=>V.jsx(dI,{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}));_I.displayName=dI.displayName;var vI=xa(`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`}}),yI=R.forwardRef(({className:e,variant:t,...n},r)=>V.jsx(fI,{ref:r,className:Y(vI({variant:t}),e),...n}));yI.displayName=fI.displayName;var bI=R.forwardRef(({className:e,...t},n)=>V.jsx(hI,{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}));bI.displayName=hI.displayName;var xI=R.forwardRef(({className:e,...t},n)=>V.jsx(gI,{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:V.jsx(_u,{className:`h-4 w-4`})}));xI.displayName=gI.displayName;var SI=R.forwardRef(({className:e,...t},n)=>V.jsx(pI,{ref:n,className:Y(`text-sm font-semibold`,e),...t}));SI.displayName=pI.displayName;var CI=R.forwardRef(({className:e,...t},n)=>V.jsx(mI,{ref:n,className:Y(`text-sm opacity-90`,e),...t}));CI.displayName=mI.displayName;var wI=`Toggle`,TI=R.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=Vn({prop:n,onChange:i,defaultProp:r??!1,caller:wI});return V.jsx(W.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:U(e.onClick,()=>{e.disabled||s(!o)})})});TI.displayName=wI;var EI=TI,DI=xa(`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`}}),OI=R.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 V.jsx(EI,{ref:c,pressed:l,onPressedChange:e=>{a?.(e),o?.(e)},className:Y(DI({variant:t,size:n,className:e})),...s})});OI.displayName=EI.displayName;var kI=`ToggleGroup`,[AI]=Dn(kI,[$g]),jI=$g(),MI=R.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`){let e=r;return V.jsx(FI,{...e,ref:t})}if(n===`multiple`){let e=r;return V.jsx(II,{...e,ref:t})}throw Error(`Missing prop \`type\` expected on \`${kI}\``)});MI.displayName=kI;var[NI,PI]=AI(kI),FI=R.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Vn({prop:n,defaultProp:r??``,onChange:i,caller:kI});return V.jsx(NI,{scope:e.__scopeToggleGroup,type:`single`,value:R.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:R.useCallback(()=>s(``),[s]),children:V.jsx(zI,{...a,ref:t})})}),II=R.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Vn({prop:n,defaultProp:r??[],onChange:i,caller:kI}),c=R.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=R.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return V.jsx(NI,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:V.jsx(zI,{...a,ref:t})})});MI.displayName=kI;var[LI,RI]=AI(kI),zI=R.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=jI(n),u=mr(o),d={role:`group`,dir:u,...c};return V.jsx(LI,{scope:n,rovingFocus:i,disabled:r,children:i?V.jsx(d_,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:V.jsx(W.div,{...d,ref:t})}):V.jsx(W.div,{...d,ref:t})})}),BI=`ToggleGroupItem`,VI=R.forwardRef((e,t)=>{let n=PI(BI,e.__scopeToggleGroup),r=RI(BI,e.__scopeToggleGroup),i=jI(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=R.useRef(null);return r.rovingFocus?V.jsx(f_,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:V.jsx(HI,{...s,ref:t})}):V.jsx(HI,{...s,ref:t})});VI.displayName=BI;var HI=R.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=PI(BI,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===`single`?o:void 0;return V.jsx(TI,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),UI=MI,WI=VI,GI=R.createContext({size:`default`,variant:`default`}),KI=R.forwardRef(({className:e,variant:t,size:n,children:r,...i},a)=>V.jsx(UI,{ref:a,className:Y(`flex items-center justify-center gap-1`,e),...i,children:V.jsx(GI.Provider,{value:{variant:t,size:n},children:r})}));KI.displayName=UI.displayName;var qI=R.forwardRef(({className:e,children:t,variant:n,size:r,...i},a)=>{let o=R.useContext(GI);return V.jsx(WI,{ref:a,className:Y(DI({variant:o.variant||n,size:o.size||r}),e),...i,children:t})});qI.displayName=WI.displayName;var JI=async e=>(e.length===0||console.log(`File upload not implemented yet`),[]),YI=e=>ae(e);function XI({children:e}){return(0,z.jsx)(pu,{uploader:JI,SD:YI,children:e})}var ZI=g()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:QI});function QI(){let{queryClient:e}=ZI.useRouteContext();return(0,z.jsxs)(`html`,{lang:`en`,children:[(0,z.jsxs)(`head`,{children:[(0,z.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,z.jsx)(C,{})]}),(0,z.jsxs)(`body`,{children:[(0,z.jsx)(`div`,{id:`root`,children:(0,z.jsx)(v,{client:e,children:(0,z.jsx)(XI,{children:(0,z.jsx)(ye,{children:(0,z.jsx)(m,{})})})})}),(0,z.jsx)(D,{})]})]})}var $I=`modulepreload`,eL=function(e){return`/`+e},tL={},nL=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=eL(t,n),t in tL)return;tL[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:$I,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},rL=E(`/tokens`)({component:w(()=>nL(()=>import(`./tokens-B6y-rxlU.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),iL=E(`/`)({component:w(()=>nL(()=>import(`./routes-DRU2rj_p.js`),__vite__mapDeps([6,1,2,3,5,4])),`component`)}),aL=()=>nL(()=>import(`./show-DjQUOob1.js`),__vite__mapDeps([7,1,2,3,5,4])),oL=F({id:ne()}),sL=E(`/requests/show`)({validateSearch:oL,component:w(aL,`component`)}),cL=rL.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>ZI}),lL={IndexRoute:iL.update({id:`/`,path:`/`,getParentRoute:()=>ZI}),TokensRoute:cL,RequestsShowRoute:sL.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>ZI})},uL=ZI._addFileChildren(lL)._addFileTypes(),dL=new fe({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),fL=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),te):void 0;fL&&I(dL,fL);var pL=window.__SONAMU_SSR_CONFIG__,mL=y({routeTree:uL,context:{queryClient:dL},defaultPreload:`intent`});(async()=>{await mL.load(),document.documentElement.innerHTML&&fL?pL?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),pe.createRoot(document).render((0,z.jsx)(T,{router:mL}))):pe.hydrateRoot(document,(0,z.jsx)(T,{router:mL})):pe.createRoot(document).render((0,z.jsx)(T,{router:mL}))})(),window.__TANSTACK_QUERY_CLIENT__=dL;export{he as i,BP as n,Qy as r,sL 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 yN(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:SN(t,`input`,e.processors),output:SN(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function bN(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 bN(r.element,n);if(r.type===`set`)return bN(r.valueType,n);if(r.type===`lazy`)return bN(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 bN(r.innerType,n);if(r.type===`intersection`)return bN(r.left,n)||bN(r.right,n);if(r.type===`record`||r.type===`map`)return bN(r.keyType,n)||bN(r.valueType,n);if(r.type===`pipe`)return bN(r.in,n)||bN(r.out,n);if(r.type===`object`){for(let e in r.shape)if(bN(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(bN(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(bN(e,n))return!0;return!!(r.rest&&bN(r.rest,n))}return!1}var xN=(e,t={})=>n=>{let r=gN({...n,processors:t});return _N(e,r),vN(r,e),yN(r,e)},SN=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=gN({...i??{},target:a,io:t,processors:n});return _N(e,o),vN(o,e),yN(o,e)},CN=(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)},wN=(e,t,n,r)=>{n.not={}},TN=(e,t,n,r)=>{let i=e._zod.def,a=nj(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},EN=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},DN=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},ON=(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=_N(a.element,t,{...r,path:[...r.path,`items`]})},kN=(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]=_N(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=_N(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},AN=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>_N(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},jN=(e,t,n,r)=>{let i=e._zod.def,a=_N(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=_N(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]]},MN=(e,t,n,r)=>{let i=e._zod.def,a=_N(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`}]},NN=(e,t,n,r)=>{let i=e._zod.def;_N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},PN=(e,t,n,r)=>{let i=e._zod.def;_N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},FN=(e,t,n,r)=>{let i=e._zod.def;_N(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)))},IN=(e,t,n,r)=>{let i=e._zod.def;_N(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},LN=(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;_N(a,t,r);let o=t.seen.get(e);o.ref=a},RN=(e,t,n,r)=>{let i=e._zod.def;_N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},zN=(e,t,n,r)=>{let i=e._zod.def;_N(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},BN=Q(`ZodError`,(e,t)=>{Lj.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Bj(e,t)},flatten:{value:t=>zj(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,rj,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,rj,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),VN=Vj(BN),HN=Hj(BN),UN=Uj(BN),WN=Gj(BN),GN=qj(BN),KN=Jj(BN),qN=Yj(BN),JN=Xj(BN),YN=Zj(BN),XN=Qj(BN),ZN=$j(BN),QN=eM(BN),$N=Q(`ZodType`,(e,t)=>(hM.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:SN(e,`input`),output:SN(e,`output`)}}),e.toJSONSchema=xN(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(uj(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)=>yj(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>VN(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>UN(e,t,n),e.parseAsync=async(t,n)=>HN(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>WN(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>GN(e,t,n),e.decode=(t,n)=>KN(e,t,n),e.encodeAsync=async(t,n)=>qN(e,t,n),e.decodeAsync=async(t,n)=>JN(e,t,n),e.safeEncode=(t,n)=>YN(e,t,n),e.safeDecode=(t,n)=>XN(e,t,n),e.safeEncodeAsync=async(t,n)=>ZN(e,t,n),e.safeDecodeAsync=async(t,n)=>QN(e,t,n),e.refine=(t,n)=>e.check(LP(t,n)),e.superRefine=t=>e.check(RP(t)),e.overwrite=t=>e.check(dN(t)),e.optional=()=>yP(e),e.exactOptional=()=>xP(e),e.nullable=()=>CP(e),e.nullish=()=>yP(CP(e)),e.nonoptional=t=>kP(e,t),e.array=()=>cP(e),e.or=t=>dP([e,t]),e.and=t=>pP(e,t),e.transform=t=>NP(e,_P(t)),e.default=t=>TP(e,t),e.prefault=t=>DP(e,t),e.catch=t=>jP(e,t),e.pipe=t=>NP(e,t),e.readonly=()=>FP(e),e.describe=t=>{let n=e.clone();return $M.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return $M.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return $M.get(e);let n=e.clone();return $M.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),eP=Q(`ZodNumber`,(e,t)=>{gM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CN(e,t,n),e.gt=(t,n)=>e.check(aN(t,n)),e.gte=(t,n)=>e.check(oN(t,n)),e.min=(t,n)=>e.check(oN(t,n)),e.lt=(t,n)=>e.check(rN(t,n)),e.lte=(t,n)=>e.check(iN(t,n)),e.max=(t,n)=>e.check(iN(t,n)),e.int=t=>e.check(nP(t)),e.safe=t=>e.check(nP(t)),e.positive=t=>e.check(aN(0,t)),e.nonnegative=t=>e.check(oN(0,t)),e.negative=t=>e.check(rN(0,t)),e.nonpositive=t=>e.check(iN(0,t)),e.multipleOf=(t,n)=>e.check(sN(t,n)),e.step=(t,n)=>e.check(sN(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}),tP=Q(`ZodNumberFormat`,(e,t)=>{_M.init(e,t),eP.init(e,t)});function nP(e){return eN(tP,e)}var rP=Q(`ZodUnknown`,(e,t)=>{vM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function iP(){return tN(rP)}var aP=Q(`ZodNever`,(e,t)=>{yM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wN(e,t,n)});function oP(e){return nN(aP,e)}var sP=Q(`ZodArray`,(e,t)=>{xM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ON(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(lN(t,n)),e.nonempty=t=>e.check(lN(1,t)),e.max=(t,n)=>e.check(cN(t,n)),e.length=(t,n)=>e.check(uN(t,n)),e.unwrap=()=>e.element});function cP(e,t){return fN(sP,e,t)}var lP=Q(`ZodObject`,(e,t)=>{EM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kN(e,t,n,r),$(e,`shape`,()=>t.shape),e.keyof=()=>hP(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:iP()}),e.loose=()=>e.clone({...e._zod.def,catchall:iP()}),e.strict=()=>e.clone({...e._zod.def,catchall:oP()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Tj(e,t),e.safeExtend=t=>Ej(e,t),e.merge=t=>Dj(e,t),e.pick=t=>Cj(e,t),e.omit=t=>wj(e,t),e.partial=(...t)=>Oj(vP,e,t[0]),e.required=(...t)=>kj(OP,e,t[0])}),uP=Q(`ZodUnion`,(e,t)=>{OM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AN(e,t,n,r),e.options=t.options});function dP(e,t){return new uP({type:`union`,options:e,...bj(t)})}var fP=Q(`ZodIntersection`,(e,t)=>{kM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jN(e,t,n,r)});function pP(e,t){return new fP({type:`intersection`,left:e,right:t})}var mP=Q(`ZodEnum`,(e,t)=>{MM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TN(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 mP({...t,checks:[],...bj(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 mP({...t,checks:[],...bj(r),entries:i})}});function hP(e,t){return new mP({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...bj(t)})}var gP=Q(`ZodTransform`,(e,t)=>{NM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DN(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new $A(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Fj(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(Fj(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function _P(e){return new gP({type:`transform`,transform:e})}var vP=Q(`ZodOptional`,(e,t)=>{FM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yP(e){return new vP({type:`optional`,innerType:e})}var bP=Q(`ZodExactOptional`,(e,t)=>{IM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xP(e){return new bP({type:`optional`,innerType:e})}var SP=Q(`ZodNullable`,(e,t)=>{LM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CP(e){return new SP({type:`nullable`,innerType:e})}var wP=Q(`ZodDefault`,(e,t)=>{RM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function TP(e,t){return new wP({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():gj(t)}})}var EP=Q(`ZodPrefault`,(e,t)=>{BM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function DP(e,t){return new EP({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():gj(t)}})}var OP=Q(`ZodNonOptional`,(e,t)=>{VM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kP(e,t){return new OP({type:`nonoptional`,innerType:e,...bj(t)})}var AP=Q(`ZodCatch`,(e,t)=>{UM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jP(e,t){return new AP({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var MP=Q(`ZodPipe`,(e,t)=>{WM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LN(e,t,n,r),e.in=t.in,e.out=t.out});function NP(e,t){return new MP({type:`pipe`,in:e,out:t})}var PP=Q(`ZodReadonly`,(e,t)=>{KM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FP(e){return new PP({type:`readonly`,innerType:e})}var IP=Q(`ZodCustom`,(e,t)=>{JM.init(e,t),$N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EN(e,t)});function LP(e,t={}){return pN(IP,e,t)}function RP(e){return mN(e)}async function zP(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=>zP(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 zP(i,t);return n}return e}function BP(e,t){let[n,r]=(0,R.useState)(t),[i,a]=(0,R.useState)(new Map),{uploader:o}=mu();function s(e,t){let n=t.replace(/\./g,`.shape.`).replace(/\[[^\]]+\]/g,`.element`).replace(/^\.element/,`element`),r;return e instanceof lP?r=KA(e.shape,n):e instanceof sP&&(r=KA(e,n)),r===void 0?`normal`:r instanceof vP?`optional`:r instanceof SP?`nullable`:`normal`}return{form:n,setForm:r,register:(t,o)=>{let c=o??s(e,t),l=KA(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}:JA(n,t,i))}};return u&&(d.error=u),d},submit:e=>async()=>{let t=await zP(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 VP,HP;function UP(){return HP||(HP=1,VP=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}),VP}UP();var WP=`Switch`,[GP]=Dn(WP),[KP,qP]=GP(WP),JP=R.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]=R.useState(null),m=H(t,e=>p(e)),h=R.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=Vn({prop:i,defaultProp:a??!1,onChange:l,caller:WP});return V.jsxs(KP,{scope:n,checked:_,disabled:s,children:[V.jsx(W.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":$P(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:U(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&V.jsx(QP,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});JP.displayName=WP;var YP=`SwitchThumb`,XP=R.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=qP(YP,n);return V.jsx(W.span,{"data-state":$P(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});XP.displayName=YP;var ZP=`SwitchBubbleInput`,QP=R.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=R.useRef(null),s=H(o,a),c=Sg(n),l=Zp(t);return R.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]),V.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}})});QP.displayName=ZP;function $P(e){return e?`checked`:`unchecked`}var eF=JP,tF=XP,nF=R.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=R.useRef(null);R.useImperativeHandle(c,()=>u.current);let d=e=>{a?.(e)};return V.jsxs(V.Fragment,{children:[V.jsx(`input`,{type:`checkbox`,ref:u,name:t,defaultChecked:i,onBlur:o,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),V.jsx(eF,{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:V.jsx(tF,{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`)})})]})});nF.displayName=`Switch`;var rF=`Tabs`,[iF]=Dn(rF,[$g]),aF=$g(),[oF,sF]=iF(rF),cF=R.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=mr(s),[d,f]=Vn({prop:r,onChange:i,defaultProp:a??``,caller:rF});return V.jsx(oF,{scope:n,baseId:Zn(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:V.jsx(W.div,{dir:u,"data-orientation":o,...l,ref:t})})});cF.displayName=rF;var lF=`TabsList`,uF=R.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=sF(lF,n),o=aF(n);return V.jsx(d_,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:V.jsx(W.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});uF.displayName=lF;var dF=`TabsTrigger`,fF=R.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=sF(dF,n),s=aF(n),c=hF(o.baseId,r),l=gF(o.baseId,r),u=r===o.value;return V.jsx(f_,{asChild:!0,...s,focusable:!i,active:u,children:V.jsx(W.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:U(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:U(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:U(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});fF.displayName=dF;var pF=`TabsContent`,mF=R.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=sF(pF,n),c=hF(s.baseId,r),l=gF(s.baseId,r),u=r===s.value,d=R.useRef(u);return R.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),V.jsx(G,{present:i||u,children:({present:n})=>V.jsx(W.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})})});mF.displayName=pF;function hF(e,t){return`${e}-trigger-${t}`}function gF(e,t){return`${e}-content-${t}`}var _F=uF,vF=fF,yF=mF,bF=R.forwardRef(({className:e,...t},n)=>V.jsx(_F,{ref:n,className:Y(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));bF.displayName=_F.displayName;var xF=R.forwardRef(({className:e,...t},n)=>V.jsx(vF,{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}));xF.displayName=vF.displayName;var SF=R.forwardRef(({className:e,...t},n)=>V.jsx(yF,{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}));SF.displayName=yF.displayName;var CF=R.forwardRef(({className:e,onValueChange:t,onChange:n,...r},i)=>{let a=e=>{t?.(e.target.value),n?.(e)};return V.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})});CF.displayName=`Textarea`;var wF=`ToastProvider`,[TF,EF,DF]=Rn(`Toast`),[OF]=Dn(`Toast`,[DF]),[kF,AF]=OF(wF),jF=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=R.useState(null),[l,u]=R.useState(0),d=R.useRef(!1),f=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wF}\`. Expected non-empty \`string\`.`),V.jsx(TF.Provider,{scope:t,children:V.jsx(kF,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:R.useCallback(()=>u(e=>e+1),[]),onToastRemove:R.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};jF.displayName=wF;var MF=`ToastViewport`,NF=[`F8`],PF=`toast.viewportPause`,FF=`toast.viewportResume`,IF=R.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=NF,label:i=`Notifications ({hotkey})`,...a}=e,o=AF(MF,n),s=EF(n),c=R.useRef(null),l=R.useRef(null),u=R.useRef(null),d=R.useRef(null),f=H(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;R.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]),R.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(PF);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(FF);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=R.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...lI(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return R.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);uI(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),V.jsxs(Va,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&V.jsx(RF,{ref:l,onFocusFromOutsideViewport:()=>{uI(h({tabbingDirection:`forwards`}))}}),V.jsx(TF.Slot,{scope:n,children:V.jsx(W.ol,{tabIndex:-1,...a,ref:f})}),m&&V.jsx(RF,{ref:u,onFocusFromOutsideViewport:()=>{uI(h({tabbingDirection:`backwards`}))}})]})});IF.displayName=MF;var LF=`ToastFocusProxy`,RF=R.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=AF(LF,n);return V.jsx(Hw,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;!a.viewport?.contains(t)&&r()}})});RF.displayName=LF;var zF=`Toast`,BF=`toast.swipeStart`,VF=`toast.swipeMove`,HF=`toast.swipeCancel`,UF=`toast.swipeEnd`,WF=R.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Vn({prop:r,defaultProp:i??!0,onChange:a,caller:zF});return V.jsx(G,{present:n||s,children:V.jsx(qF,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:X(e.onPause),onResume:X(e.onResume),onSwipeStart:U(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:U(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:U(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:U(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)})})})});WF.displayName=zF;var[GF,KF]=OF(zF,{onClose(){}}),qF=R.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=AF(zF,n),[g,_]=R.useState(null),v=H(t,e=>_(e)),y=R.useRef(null),b=R.useRef(null),x=i||h.duration,S=R.useRef(0),C=R.useRef(x),w=R.useRef(0),{onToastAdd:T,onToastRemove:E}=h,D=X(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),O=R.useCallback(e=>{!e||e===1/0||(window.clearTimeout(w.current),S.current=new Date().getTime(),w.current=window.setTimeout(D,e))},[D]);R.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(PF,n),e.addEventListener(FF,t),()=>{e.removeEventListener(PF,n),e.removeEventListener(FF,t)}}},[h.viewport,x,c,l,O]),R.useEffect(()=>{a&&!h.isClosePausedRef.current&&O(x)},[a,x,h.isClosePausedRef,O]),R.useEffect(()=>(T(),()=>E()),[T,E]);let k=R.useMemo(()=>g?iI(g):null,[g]);return h.viewport?V.jsxs(V.Fragment,{children:[k&&V.jsx(JF,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:k}),V.jsx(GF,{scope:n,onClose:D,children:be.createPortal(V.jsx(TF.ItemSlot,{scope:n,children:V.jsx(Ba,{asChild:!0,onEscapeKeyDown:U(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||D(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:V.jsx(W.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:U(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:U(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:U(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,aI(VF,d,f,{discrete:!1})):oI(l,h.swipeDirection,c)?(b.current=l,aI(BF,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:U(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};oI(t,h.swipeDirection,h.swipeThreshold)?aI(UF,p,r,{discrete:!0}):aI(HF,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),JF=e=>{let{__scopeToast:t,children:n,...r}=e,i=AF(zF,t),[a,o]=R.useState(!1),[s,c]=R.useState(!1);return sI(()=>o(!0)),R.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:V.jsx(ao,{asChild:!0,children:V.jsx(Hw,{...r,children:a&&V.jsxs(V.Fragment,{children:[i.label,` `,n]})})})},YF=`ToastTitle`,XF=R.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return V.jsx(W.div,{...r,ref:t})});XF.displayName=YF;var ZF=`ToastDescription`,QF=R.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return V.jsx(W.div,{...r,ref:t})});QF.displayName=ZF;var $F=`ToastAction`,eI=R.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?V.jsx(rI,{altText:n,asChild:!0,children:V.jsx(nI,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${$F}\`. Expected non-empty \`string\`.`),null)});eI.displayName=$F;var tI=`ToastClose`,nI=R.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=KF(tI,n);return V.jsx(rI,{asChild:!0,children:V.jsx(W.button,{type:`button`,...r,ref:t,onClick:U(e.onClick,i.onClose)})})});nI.displayName=tI;var rI=R.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return V.jsx(W.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function iI(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),cI(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(...iI(e))}}),t}function aI(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?Wn(i,a):i.dispatchEvent(a)}var oI=(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 sI(e=()=>{}){let t=X(e);zn(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function cI(e){return e.nodeType===e.ELEMENT_NODE}function lI(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 uI(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var dI=IF,fI=WF,pI=XF,mI=QF,hI=eI,gI=nI,_I=R.forwardRef(({className:e,...t},n)=>V.jsx(dI,{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}));_I.displayName=dI.displayName;var vI=xa(`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`}}),yI=R.forwardRef(({className:e,variant:t,...n},r)=>V.jsx(fI,{ref:r,className:Y(vI({variant:t}),e),...n}));yI.displayName=fI.displayName;var bI=R.forwardRef(({className:e,...t},n)=>V.jsx(hI,{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}));bI.displayName=hI.displayName;var xI=R.forwardRef(({className:e,...t},n)=>V.jsx(gI,{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:V.jsx(_u,{className:`h-4 w-4`})}));xI.displayName=gI.displayName;var SI=R.forwardRef(({className:e,...t},n)=>V.jsx(pI,{ref:n,className:Y(`text-sm font-semibold`,e),...t}));SI.displayName=pI.displayName;var CI=R.forwardRef(({className:e,...t},n)=>V.jsx(mI,{ref:n,className:Y(`text-sm opacity-90`,e),...t}));CI.displayName=mI.displayName;var wI=`Toggle`,TI=R.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=Vn({prop:n,onChange:i,defaultProp:r??!1,caller:wI});return V.jsx(W.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:U(e.onClick,()=>{e.disabled||s(!o)})})});TI.displayName=wI;var EI=TI,DI=xa(`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`}}),OI=R.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 V.jsx(EI,{ref:c,pressed:l,onPressedChange:e=>{a?.(e),o?.(e)},className:Y(DI({variant:t,size:n,className:e})),...s})});OI.displayName=EI.displayName;var kI=`ToggleGroup`,[AI]=Dn(kI,[$g]),jI=$g(),MI=R.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`){let e=r;return V.jsx(FI,{...e,ref:t})}if(n===`multiple`){let e=r;return V.jsx(II,{...e,ref:t})}throw Error(`Missing prop \`type\` expected on \`${kI}\``)});MI.displayName=kI;var[NI,PI]=AI(kI),FI=R.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Vn({prop:n,defaultProp:r??``,onChange:i,caller:kI});return V.jsx(NI,{scope:e.__scopeToggleGroup,type:`single`,value:R.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:R.useCallback(()=>s(``),[s]),children:V.jsx(zI,{...a,ref:t})})}),II=R.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Vn({prop:n,defaultProp:r??[],onChange:i,caller:kI}),c=R.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=R.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return V.jsx(NI,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:V.jsx(zI,{...a,ref:t})})});MI.displayName=kI;var[LI,RI]=AI(kI),zI=R.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=jI(n),u=mr(o),d={role:`group`,dir:u,...c};return V.jsx(LI,{scope:n,rovingFocus:i,disabled:r,children:i?V.jsx(d_,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:V.jsx(W.div,{...d,ref:t})}):V.jsx(W.div,{...d,ref:t})})}),BI=`ToggleGroupItem`,VI=R.forwardRef((e,t)=>{let n=PI(BI,e.__scopeToggleGroup),r=RI(BI,e.__scopeToggleGroup),i=jI(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=R.useRef(null);return r.rovingFocus?V.jsx(f_,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:V.jsx(HI,{...s,ref:t})}):V.jsx(HI,{...s,ref:t})});VI.displayName=BI;var HI=R.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=PI(BI,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===`single`?o:void 0;return V.jsx(TI,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),UI=MI,WI=VI,GI=R.createContext({size:`default`,variant:`default`}),KI=R.forwardRef(({className:e,variant:t,size:n,children:r,...i},a)=>V.jsx(UI,{ref:a,className:Y(`flex items-center justify-center gap-1`,e),...i,children:V.jsx(GI.Provider,{value:{variant:t,size:n},children:r})}));KI.displayName=UI.displayName;var qI=R.forwardRef(({className:e,children:t,variant:n,size:r,...i},a)=>{let o=R.useContext(GI);return V.jsx(WI,{ref:a,className:Y(DI({variant:o.variant||n,size:o.size||r}),e),...i,children:t})});qI.displayName=WI.displayName;var JI=async e=>(e.length===0||console.log(`File upload not implemented yet`),[]),YI=e=>ae(e);function XI({children:e}){return(0,z.jsx)(pu,{uploader:JI,SD:YI,children:e})}var ZI=g()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:QI});function QI(){let{queryClient:e}=ZI.useRouteContext();return(0,z.jsxs)(`html`,{lang:`en`,children:[(0,z.jsxs)(`head`,{children:[(0,z.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,z.jsx)(C,{})]}),(0,z.jsxs)(`body`,{children:[(0,z.jsx)(`div`,{id:`root`,children:(0,z.jsx)(v,{client:e,children:(0,z.jsx)(XI,{children:(0,z.jsx)(ye,{children:(0,z.jsx)(m,{})})})})}),(0,z.jsx)(D,{})]})]})}var $I=`modulepreload`,eL=function(e){return`/`+e},tL={},nL=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=eL(t,n),t in tL)return;tL[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:$I,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},rL=E(`/tokens`)({component:w(()=>nL(()=>import(`./tokens-Bib8aQbc.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),iL=E(`/`)({component:w(()=>nL(()=>import(`./routes-DvViUcG1.js`),__vite__mapDeps([6,1,2,3,5,4])),`component`)}),aL=()=>nL(()=>import(`./show-CFGLH8f_.js`),__vite__mapDeps([7,1,2,3,5,4])),oL=F({id:ne()}),sL=E(`/requests/show`)({validateSearch:oL,component:w(aL,`component`)}),cL=rL.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>ZI}),lL={IndexRoute:iL.update({id:`/`,path:`/`,getParentRoute:()=>ZI}),TokensRoute:cL,RequestsShowRoute:sL.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>ZI})},uL=ZI._addFileChildren(lL)._addFileTypes(),dL=new fe({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),fL=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),te):void 0;fL&&I(dL,fL);var pL=window.__SONAMU_SSR_CONFIG__,mL=y({routeTree:uL,context:{queryClient:dL},defaultPreload:`intent`});(async()=>{await mL.load(),document.documentElement.innerHTML&&fL?pL?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),pe.createRoot(document).render((0,z.jsx)(T,{router:mL}))):pe.hydrateRoot(document,(0,z.jsx)(T,{router:mL})):pe.createRoot(document).render((0,z.jsx)(T,{router:mL}))})(),window.__TANSTACK_QUERY_CLIENT__=dL;export{he as i,BP as n,Qy as r,sL as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{g as t,u as n}from"./vendor-tanstack-CUxlo6YN.js";import{i as r,n as i,r as a}from"./vendor-react-DH4kUfK2.js";import{i as o}from"./index-BowrnLVe.js";import{n as s,r as c,t as l}from"./services.generated-CAJQk7Wk.js";var u=e(r()),d=a(),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:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`})}),p=e=>(0,d.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,d.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,d.jsx)(`path`,{d:`M12 20v2m0-20v2m5 16v2m0-20v2M2 12h2m-2 5h2M2 7h2m16 5h2m-2 5h2M20 7h2M7 20v2M7 2v2`}),(0,d.jsx)(`rect`,{width:16,height:16,x:4,y:4,rx:2}),(0,d.jsx)(`rect`,{width:8,height:8,x:8,y:8,rx:1})]})});function m({label:e,icon:t,children:n}){return(0,d.jsxs)(`div`,{className:`rounded-lg bg-sand-50 px-5 py-4`,children:[(0,d.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,d.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:e}),(0,d.jsx)(t,{className:`size-4 text-sand-400`})]}),(0,d.jsx)(`div`,{children:n})]})}function h({data:e,isLoading:t,isError:n}){if(t)return(0,d.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-4`,children:Array.from({length:3}).map((e,t)=>(0,d.jsxs)(`div`,{className:`rounded-lg bg-sand-50 px-5 py-4 animate-pulse`,children:[(0,d.jsx)(`div`,{className:`h-3 w-16 bg-sand-200 rounded mb-3`}),(0,d.jsx)(`div`,{className:`h-6 w-12 bg-sand-200 rounded`})]},`skeleton-${t}`))});let r=(n?`offline`:e?.status??`unknown`)===`ok`;return(0,d.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-4`,children:[(0,d.jsx)(m,{label:`Status`,icon:f,children:(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(`span`,{className:`size-2 rounded-full ${r?`bg-sage-400`:`bg-red-400`}`}),(0,d.jsx)(`span`,{className:`text-base font-semibold text-sand-800`,children:r?`Online`:`Offline`})]})}),(0,d.jsx)(m,{label:`Workers`,icon:p,children:(0,d.jsx)(`span`,{className:`text-base font-semibold text-sand-800`,children:e?.workers??0})}),(0,d.jsx)(m,{label:`Active Tokens`,icon:o,children:(0,d.jsx)(`span`,{className:`text-base font-semibold text-sand-800`,children:e?.activeTokens??0})})]})}var g=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`})}),_=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`})}),v=50;function y(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 b(e){return e.toLocaleString()}function x(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 S(e,t=30){return e.length>t?`${e.slice(0,t)}...`:e}function C(){let e=n(),[t,r]=(0,u.useState)(1),[i,a]=(0,u.useState)(``),{data:o}=l.useStats(),c=(o??[]).map(e=>e.name).filter(Boolean),{data:f,isLoading:p}=s.useRequestLogs(`A`,{num:v,page:t,orderBy:`id-desc`,...i?{token_name:i}:{}}),m=f?.rows??[],h=f?.total??0,C=Math.ceil(h/v);return(0,d.jsxs)(`div`,{children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2 mb-3 flex-wrap`,children:[c.length>0&&(0,d.jsxs)(`select`,{value:i,onChange:e=>{a(e.target.value),r(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`}),c.map(e=>(0,d.jsx)(`option`,{value:e,children:e},e))]}),(0,d.jsxs)(`span`,{className:`text-[11px] text-sand-400`,children:[h,` results`]})]}),p?(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}`))}):m.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:`w-8 px-2 py-2.5`})]})}),(0,d.jsx)(`tbody`,{className:`divide-y divide-sand-200/60`,children:m.map(t=>(0,d.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 cursor-pointer`,onClick:()=>e({to:`/requests/show`,search:{id:t.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:y(t.created_at)})}),(0,d.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,d.jsx)(`span`,{className:`text-xs text-sand-500`,children:t.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:t.query,children:S(t.query)})}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:b(t.input_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:b(t.output_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:b(t.cache_read_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:b(t.cache_creation_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:x(t)}),(0,d.jsx)(`td`,{className:`px-2 py-2.5`,children:(0,d.jsx)(_,{className:`size-4 text-sand-400`})})]},t.id))})]})}),C>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:t===1,onClick:()=>r(e=>e-1),children:(0,d.jsx)(g,{className:`size-4`})}),(0,d.jsxs)(`span`,{className:`text-[11px] text-sand-400 tabular-nums`,children:[t,` / `,C]}),(0,d.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors`,disabled:t===C,onClick:()=>r(e=>e+1),children:(0,d.jsx)(_,{className:`size-4`})})]})]})]})}var w=e(i());function T(){var e=[...arguments];return(0,u.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var ee=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function E(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function D(e){return`nodeType`in e}function O(e){return e?E(e)?e:D(e)?e.ownerDocument?.defaultView??window:window:window}function k(e){let{Document:t}=O(e);return e instanceof t}function A(e){return E(e)?!1:e instanceof O(e).HTMLElement}function te(e){return e instanceof O(e).SVGElement}function j(e){return e?E(e)?e.document:D(e)?k(e)?e:A(e)||te(e)?e.ownerDocument:document:document:document}var M=ee?u.useLayoutEffect:u.useEffect;function ne(e){let t=(0,u.useRef)(e);return M(()=>{t.current=e}),(0,u.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function N(){let e=(0,u.useRef)(null);return[(0,u.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,u.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function P(e,t){let n=(0,u.useRef)();return(0,u.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function F(e){let t=ne(e),n=(0,u.useRef)(null);return[n,(0,u.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}var I={};function L(e,t){return(0,u.useMemo)(()=>{if(t)return t;let n=I[e]==null?0:I[e]+1;return I[e]=n,e+`-`+n},[e,t])}function R(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var z=R(1),B=R(-1);function re(e){return`clientX`in e&&`clientY`in e}function V(e){if(!e)return!1;let{KeyboardEvent:t}=O(e.target);return t&&e instanceof t}function ie(e){if(!e)return!1;let{TouchEvent:t}=O(e.target);return t&&e instanceof t}function ae(e){if(ie(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return re(e)?{x:e.clientX,y:e.clientY}:null}var H=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[H.Translate.toString(e),H.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),oe={display:`none`};function U(e){let{id:t,value:n}=e;return u.createElement(`div`,{id:t,style:oe},n)}function se(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return u.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function ce(){let[e,t]=(0,u.useState)(``);return{announce:(0,u.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var le={draggable:`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{g as t,u as n}from"./vendor-tanstack-CUxlo6YN.js";import{i as r,n as i,r as a}from"./vendor-react-DH4kUfK2.js";import{i as o}from"./index-CgXTSTgN.js";import{n as s,r as c,t as l}from"./services.generated-CAJQk7Wk.js";var u=e(r()),d=a(),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:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`})}),p=e=>(0,d.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,d.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,d.jsx)(`path`,{d:`M12 20v2m0-20v2m5 16v2m0-20v2M2 12h2m-2 5h2M2 7h2m16 5h2m-2 5h2M20 7h2M7 20v2M7 2v2`}),(0,d.jsx)(`rect`,{width:16,height:16,x:4,y:4,rx:2}),(0,d.jsx)(`rect`,{width:8,height:8,x:8,y:8,rx:1})]})});function m({label:e,icon:t,children:n}){return(0,d.jsxs)(`div`,{className:`rounded-lg bg-sand-50 px-5 py-4`,children:[(0,d.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,d.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:e}),(0,d.jsx)(t,{className:`size-4 text-sand-400`})]}),(0,d.jsx)(`div`,{children:n})]})}function h({data:e,isLoading:t,isError:n}){if(t)return(0,d.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-4`,children:Array.from({length:3}).map((e,t)=>(0,d.jsxs)(`div`,{className:`rounded-lg bg-sand-50 px-5 py-4 animate-pulse`,children:[(0,d.jsx)(`div`,{className:`h-3 w-16 bg-sand-200 rounded mb-3`}),(0,d.jsx)(`div`,{className:`h-6 w-12 bg-sand-200 rounded`})]},`skeleton-${t}`))});let r=(n?`offline`:e?.status??`unknown`)===`ok`;return(0,d.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-4`,children:[(0,d.jsx)(m,{label:`Status`,icon:f,children:(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(`span`,{className:`size-2 rounded-full ${r?`bg-sage-400`:`bg-red-400`}`}),(0,d.jsx)(`span`,{className:`text-base font-semibold text-sand-800`,children:r?`Online`:`Offline`})]})}),(0,d.jsx)(m,{label:`Workers`,icon:p,children:(0,d.jsx)(`span`,{className:`text-base font-semibold text-sand-800`,children:e?.workers??0})}),(0,d.jsx)(m,{label:`Active Tokens`,icon:o,children:(0,d.jsx)(`span`,{className:`text-base font-semibold text-sand-800`,children:e?.activeTokens??0})})]})}var g=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`})}),_=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`})}),v=50;function y(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 b(e){return e.toLocaleString()}function x(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 S(e,t=30){return e.length>t?`${e.slice(0,t)}...`:e}function C(){let e=n(),[t,r]=(0,u.useState)(1),[i,a]=(0,u.useState)(``),{data:o}=c.useTokens(`A`),l=(o?.rows??[]).map(e=>e.name).filter(Boolean),{data:f,isLoading:p}=s.useRequestLogs(`A`,{num:v,page:t,orderBy:`id-desc`,...i?{token_name:i}:{}}),m=f?.rows??[],h=f?.total??0,C=Math.ceil(h/v);return(0,d.jsxs)(`div`,{children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2 mb-3 flex-wrap`,children:[l.length>0&&(0,d.jsxs)(`select`,{value:i,onChange:e=>{a(e.target.value),r(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`}),l.map(e=>(0,d.jsx)(`option`,{value:e,children:e},e))]}),(0,d.jsxs)(`span`,{className:`text-[11px] text-sand-400`,children:[h,` results`]})]}),p?(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}`))}):m.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:`w-8 px-2 py-2.5`})]})}),(0,d.jsx)(`tbody`,{className:`divide-y divide-sand-200/60`,children:m.map(t=>(0,d.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 cursor-pointer`,onClick:()=>e({to:`/requests/show`,search:{id:t.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:y(t.created_at)})}),(0,d.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,d.jsx)(`span`,{className:`text-xs text-sand-500`,children:t.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:t.query,children:S(t.query)})}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:b(t.input_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:b(t.output_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:b(t.cache_read_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:b(t.cache_creation_tokens)}),(0,d.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums text-sand-700`,children:x(t)}),(0,d.jsx)(`td`,{className:`px-2 py-2.5`,children:(0,d.jsx)(_,{className:`size-4 text-sand-400`})})]},t.id))})]})}),C>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:t===1,onClick:()=>r(e=>e-1),children:(0,d.jsx)(g,{className:`size-4`})}),(0,d.jsxs)(`span`,{className:`text-[11px] text-sand-400 tabular-nums`,children:[t,` / `,C]}),(0,d.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sand-600 disabled:opacity-30 transition-colors`,disabled:t===C,onClick:()=>r(e=>e+1),children:(0,d.jsx)(_,{className:`size-4`})})]})]})]})}var w=e(i());function T(){var e=[...arguments];return(0,u.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var ee=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function E(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function D(e){return`nodeType`in e}function O(e){return e?E(e)?e:D(e)?e.ownerDocument?.defaultView??window:window:window}function k(e){let{Document:t}=O(e);return e instanceof t}function A(e){return E(e)?!1:e instanceof O(e).HTMLElement}function te(e){return e instanceof O(e).SVGElement}function j(e){return e?E(e)?e.document:D(e)?k(e)?e:A(e)||te(e)?e.ownerDocument:document:document:document}var M=ee?u.useLayoutEffect:u.useEffect;function ne(e){let t=(0,u.useRef)(e);return M(()=>{t.current=e}),(0,u.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function N(){let e=(0,u.useRef)(null);return[(0,u.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,u.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function P(e,t){let n=(0,u.useRef)();return(0,u.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function F(e){let t=ne(e),n=(0,u.useRef)(null);return[n,(0,u.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}var I={};function L(e,t){return(0,u.useMemo)(()=>{if(t)return t;let n=I[e]==null?0:I[e]+1;return I[e]=n,e+`-`+n},[e,t])}function R(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var z=R(1),B=R(-1);function re(e){return`clientX`in e&&`clientY`in e}function V(e){if(!e)return!1;let{KeyboardEvent:t}=O(e.target);return t&&e instanceof t}function ie(e){if(!e)return!1;let{TouchEvent:t}=O(e.target);return t&&e instanceof t}function ae(e){if(ie(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return re(e)?{x:e.clientX,y:e.clientY}:null}var H=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[H.Translate.toString(e),H.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),oe={display:`none`};function U(e){let{id:t,value:n}=e;return u.createElement(`div`,{id:t,style:oe},n)}function se(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return u.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function ce(){let[e,t]=(0,u.useState)(``);return{announce:(0,u.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var le={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -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-BowrnLVe.js";import{n as s}from"./services.generated-CAJQk7Wk.js";function c(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var l=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d={};function f(e,t){return((t||d).jsx?u:l).test(e)}var p=/[ \t\n\f\r]/g;function m(e){return typeof e==`object`?e.type===`text`?h(e.value):!1:h(e)}function h(e){return e.replace(p,``)===``}var g=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};g.prototype.normal={},g.prototype.property={},g.prototype.space=void 0;function _(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new g(n,r,t)}function v(e){return e.toLowerCase()}var y=class{constructor(e,t){this.attribute=t,this.property=e}};y.prototype.attribute=``,y.prototype.booleanish=!1,y.prototype.boolean=!1,y.prototype.commaOrSpaceSeparated=!1,y.prototype.commaSeparated=!1,y.prototype.defined=!1,y.prototype.mustUseProperty=!1,y.prototype.number=!1,y.prototype.overloadedBoolean=!1,y.prototype.property=``,y.prototype.spaceSeparated=!1,y.prototype.space=void 0;var b=e({boolean:()=>S,booleanish:()=>C,commaOrSpaceSeparated:()=>O,commaSeparated:()=>D,number:()=>T,overloadedBoolean:()=>w,spaceSeparated:()=>E}),x=0,S=k(),C=k(),w=k(),T=k(),E=k(),D=k(),O=k();function k(){return 2**++x}var A=Object.keys(b),ee=class extends y{constructor(e,t,n,r){let i=-1;if(super(e,t),j(this,`space`,r),typeof n==`number`)for(;++i<A.length;){let e=A[i];j(this,A[i],(n&b[e])===b[e])}}};ee.prototype.defined=!0;function j(e,t,n){n&&(e[t]=n)}function M(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ee(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[v(r)]=r,n[v(a.attribute)]=r}return new g(t,n,e.space)}var te=M({properties:{ariaActiveDescendant:null,ariaAtomic:C,ariaAutoComplete:null,ariaBusy:C,ariaChecked:C,ariaColCount:T,ariaColIndex:T,ariaColSpan:T,ariaControls:E,ariaCurrent:null,ariaDescribedBy:E,ariaDetails:null,ariaDisabled:C,ariaDropEffect:E,ariaErrorMessage:null,ariaExpanded:C,ariaFlowTo:E,ariaGrabbed:C,ariaHasPopup:null,ariaHidden:C,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:E,ariaLevel:T,ariaLive:null,ariaModal:C,ariaMultiLine:C,ariaMultiSelectable:C,ariaOrientation:null,ariaOwns:E,ariaPlaceholder:null,ariaPosInSet:T,ariaPressed:C,ariaReadOnly:C,ariaRelevant:null,ariaRequired:C,ariaRoleDescription:E,ariaRowCount:T,ariaRowIndex:T,ariaRowSpan:T,ariaSelected:C,ariaSetSize:T,ariaSort:null,ariaValueMax:T,ariaValueMin:T,ariaValueNow:T,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ne(e,t){return t in e?e[t]:t}function N(e,t){return ne(e,t.toLowerCase())}var re=M({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:D,acceptCharset:E,accessKey:E,action:null,allow:null,allowFullScreen:S,allowPaymentRequest:S,allowUserMedia:S,alt:null,as:null,async:S,autoCapitalize:null,autoComplete:E,autoFocus:S,autoPlay:S,blocking:E,capture:null,charSet:null,checked:S,cite:null,className:E,cols:T,colSpan:null,content:null,contentEditable:C,controls:S,controlsList:E,coords:T|D,crossOrigin:null,data:null,dateTime:null,decoding:null,default:S,defer:S,dir:null,dirName:null,disabled:S,download:w,draggable:C,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:S,formTarget:null,headers:E,height:T,hidden:w,high:T,href:null,hrefLang:null,htmlFor:E,httpEquiv:E,id:null,imageSizes:null,imageSrcSet:null,inert:S,inputMode:null,integrity:null,is:null,isMap:S,itemId:null,itemProp:E,itemRef:E,itemScope:S,itemType:E,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:S,low:T,manifest:null,max:null,maxLength:T,media:null,method:null,min:null,minLength:T,multiple:S,muted:S,name:null,nonce:null,noModule:S,noValidate:S,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:S,optimum:T,pattern:null,ping:E,placeholder:null,playsInline:S,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:S,referrerPolicy:null,rel:E,required:S,reversed:S,rows:T,rowSpan:T,sandbox:E,scope:null,scoped:S,seamless:S,selected:S,shadowRootClonable:S,shadowRootDelegatesFocus:S,shadowRootMode:null,shape:null,size:T,sizes:null,slot:null,span:T,spellCheck:C,src:null,srcDoc:null,srcLang:null,srcSet:null,start:T,step:null,style:null,tabIndex:T,target:null,title:null,translate:null,type:null,typeMustMatch:S,useMap:null,value:C,width:T,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:E,axis:null,background:null,bgColor:null,border:T,borderColor:null,bottomMargin:T,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:S,declare:S,event:null,face:null,frame:null,frameBorder:null,hSpace:T,leftMargin:T,link:null,longDesc:null,lowSrc:null,marginHeight:T,marginWidth:T,noResize:S,noHref:S,noShade:S,noWrap:S,object:null,profile:null,prompt:null,rev:null,rightMargin:T,rules:null,scheme:null,scrolling:C,standby:null,summary:null,text:null,topMargin:T,valueType:null,version:null,vAlign:null,vLink:null,vSpace:T,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:S,disableRemotePlayback:S,prefix:null,property:null,results:T,security:null,unselectable:null},space:`html`,transform:N}),ie=M({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:O,accentHeight:T,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:T,amplitude:T,arabicForm:null,ascent:T,attributeName:null,attributeType:null,azimuth:T,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:T,by:null,calcMode:null,capHeight:T,className:E,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:T,diffuseConstant:T,direction:null,display:null,dur:null,divisor:T,dominantBaseline:null,download:S,dx:null,dy:null,edgeMode:null,editable:null,elevation:T,enableBackground:null,end:null,event:null,exponent:T,externalResourcesRequired:null,fill:null,fillOpacity:T,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:D,g2:D,glyphName:D,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:T,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:T,horizOriginX:T,horizOriginY:T,id:null,ideographic:T,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:T,k:T,k1:T,k2:T,k3:T,k4:T,kernelMatrix:O,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:T,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:T,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:T,overlineThickness:T,paintOrder:null,panose1:null,path:null,pathLength:T,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:E,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:T,pointsAtY:T,pointsAtZ:T,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:O,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:O,rev:O,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:O,requiredFeatures:O,requiredFonts:O,requiredFormats:O,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:T,specularExponent:T,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:T,strikethroughThickness:T,string:null,stroke:null,strokeDashArray:O,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:T,strokeOpacity:T,strokeWidth:null,style:null,surfaceScale:T,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:O,tabIndex:T,tableValues:null,target:null,targetX:T,targetY:T,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:O,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:T,underlineThickness:T,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:T,values:null,vAlphabetic:T,vMathematical:T,vectorEffect:null,vHanging:T,vIdeographic:T,version:null,vertAdvY:T,vertOriginX:T,vertOriginY:T,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:T,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ne}),ae=M({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()}}),oe=M({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:N}),se=M({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ce={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`},le=/[A-Z]/g,ue=/-[a-z]/g,de=/^data[-\w.:]+$/i;function fe(e,t){let n=v(t),r=t,i=y;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&de.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ue,me);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ue.test(e)){let n=e.replace(le,pe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ee}return new i(r,t)}function pe(e){return`-`+e.toLowerCase()}function me(e){return e.charAt(1).toUpperCase()}var he=_([te,re,ae,oe,se],`html`),ge=_([te,ie,ae,oe,se],`svg`);function _e(e){return e.join(` `).trim()}var ve=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-CgXTSTgN.js";import{n as s}from"./services.generated-CAJQk7Wk.js";function c(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var l=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d={};function f(e,t){return((t||d).jsx?u:l).test(e)}var p=/[ \t\n\f\r]/g;function m(e){return typeof e==`object`?e.type===`text`?h(e.value):!1:h(e)}function h(e){return e.replace(p,``)===``}var g=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};g.prototype.normal={},g.prototype.property={},g.prototype.space=void 0;function _(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new g(n,r,t)}function v(e){return e.toLowerCase()}var y=class{constructor(e,t){this.attribute=t,this.property=e}};y.prototype.attribute=``,y.prototype.booleanish=!1,y.prototype.boolean=!1,y.prototype.commaOrSpaceSeparated=!1,y.prototype.commaSeparated=!1,y.prototype.defined=!1,y.prototype.mustUseProperty=!1,y.prototype.number=!1,y.prototype.overloadedBoolean=!1,y.prototype.property=``,y.prototype.spaceSeparated=!1,y.prototype.space=void 0;var b=e({boolean:()=>S,booleanish:()=>C,commaOrSpaceSeparated:()=>O,commaSeparated:()=>D,number:()=>T,overloadedBoolean:()=>w,spaceSeparated:()=>E}),x=0,S=k(),C=k(),w=k(),T=k(),E=k(),D=k(),O=k();function k(){return 2**++x}var A=Object.keys(b),ee=class extends y{constructor(e,t,n,r){let i=-1;if(super(e,t),j(this,`space`,r),typeof n==`number`)for(;++i<A.length;){let e=A[i];j(this,A[i],(n&b[e])===b[e])}}};ee.prototype.defined=!0;function j(e,t,n){n&&(e[t]=n)}function M(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ee(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[v(r)]=r,n[v(a.attribute)]=r}return new g(t,n,e.space)}var te=M({properties:{ariaActiveDescendant:null,ariaAtomic:C,ariaAutoComplete:null,ariaBusy:C,ariaChecked:C,ariaColCount:T,ariaColIndex:T,ariaColSpan:T,ariaControls:E,ariaCurrent:null,ariaDescribedBy:E,ariaDetails:null,ariaDisabled:C,ariaDropEffect:E,ariaErrorMessage:null,ariaExpanded:C,ariaFlowTo:E,ariaGrabbed:C,ariaHasPopup:null,ariaHidden:C,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:E,ariaLevel:T,ariaLive:null,ariaModal:C,ariaMultiLine:C,ariaMultiSelectable:C,ariaOrientation:null,ariaOwns:E,ariaPlaceholder:null,ariaPosInSet:T,ariaPressed:C,ariaReadOnly:C,ariaRelevant:null,ariaRequired:C,ariaRoleDescription:E,ariaRowCount:T,ariaRowIndex:T,ariaRowSpan:T,ariaSelected:C,ariaSetSize:T,ariaSort:null,ariaValueMax:T,ariaValueMin:T,ariaValueNow:T,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ne(e,t){return t in e?e[t]:t}function N(e,t){return ne(e,t.toLowerCase())}var re=M({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:D,acceptCharset:E,accessKey:E,action:null,allow:null,allowFullScreen:S,allowPaymentRequest:S,allowUserMedia:S,alt:null,as:null,async:S,autoCapitalize:null,autoComplete:E,autoFocus:S,autoPlay:S,blocking:E,capture:null,charSet:null,checked:S,cite:null,className:E,cols:T,colSpan:null,content:null,contentEditable:C,controls:S,controlsList:E,coords:T|D,crossOrigin:null,data:null,dateTime:null,decoding:null,default:S,defer:S,dir:null,dirName:null,disabled:S,download:w,draggable:C,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:S,formTarget:null,headers:E,height:T,hidden:w,high:T,href:null,hrefLang:null,htmlFor:E,httpEquiv:E,id:null,imageSizes:null,imageSrcSet:null,inert:S,inputMode:null,integrity:null,is:null,isMap:S,itemId:null,itemProp:E,itemRef:E,itemScope:S,itemType:E,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:S,low:T,manifest:null,max:null,maxLength:T,media:null,method:null,min:null,minLength:T,multiple:S,muted:S,name:null,nonce:null,noModule:S,noValidate:S,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:S,optimum:T,pattern:null,ping:E,placeholder:null,playsInline:S,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:S,referrerPolicy:null,rel:E,required:S,reversed:S,rows:T,rowSpan:T,sandbox:E,scope:null,scoped:S,seamless:S,selected:S,shadowRootClonable:S,shadowRootDelegatesFocus:S,shadowRootMode:null,shape:null,size:T,sizes:null,slot:null,span:T,spellCheck:C,src:null,srcDoc:null,srcLang:null,srcSet:null,start:T,step:null,style:null,tabIndex:T,target:null,title:null,translate:null,type:null,typeMustMatch:S,useMap:null,value:C,width:T,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:E,axis:null,background:null,bgColor:null,border:T,borderColor:null,bottomMargin:T,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:S,declare:S,event:null,face:null,frame:null,frameBorder:null,hSpace:T,leftMargin:T,link:null,longDesc:null,lowSrc:null,marginHeight:T,marginWidth:T,noResize:S,noHref:S,noShade:S,noWrap:S,object:null,profile:null,prompt:null,rev:null,rightMargin:T,rules:null,scheme:null,scrolling:C,standby:null,summary:null,text:null,topMargin:T,valueType:null,version:null,vAlign:null,vLink:null,vSpace:T,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:S,disableRemotePlayback:S,prefix:null,property:null,results:T,security:null,unselectable:null},space:`html`,transform:N}),ie=M({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:O,accentHeight:T,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:T,amplitude:T,arabicForm:null,ascent:T,attributeName:null,attributeType:null,azimuth:T,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:T,by:null,calcMode:null,capHeight:T,className:E,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:T,diffuseConstant:T,direction:null,display:null,dur:null,divisor:T,dominantBaseline:null,download:S,dx:null,dy:null,edgeMode:null,editable:null,elevation:T,enableBackground:null,end:null,event:null,exponent:T,externalResourcesRequired:null,fill:null,fillOpacity:T,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:D,g2:D,glyphName:D,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:T,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:T,horizOriginX:T,horizOriginY:T,id:null,ideographic:T,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:T,k:T,k1:T,k2:T,k3:T,k4:T,kernelMatrix:O,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:T,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:T,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:T,overlineThickness:T,paintOrder:null,panose1:null,path:null,pathLength:T,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:E,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:T,pointsAtY:T,pointsAtZ:T,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:O,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:O,rev:O,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:O,requiredFeatures:O,requiredFonts:O,requiredFormats:O,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:T,specularExponent:T,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:T,strikethroughThickness:T,string:null,stroke:null,strokeDashArray:O,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:T,strokeOpacity:T,strokeWidth:null,style:null,surfaceScale:T,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:O,tabIndex:T,tableValues:null,target:null,targetX:T,targetY:T,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:O,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:T,underlineThickness:T,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:T,values:null,vAlphabetic:T,vMathematical:T,vectorEffect:null,vHanging:T,vIdeographic:T,version:null,vertAdvY:T,vertOriginX:T,vertOriginY:T,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:T,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ne}),ae=M({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()}}),oe=M({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:N}),se=M({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ce={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`},le=/[A-Z]/g,ue=/-[a-z]/g,de=/^data[-\w.:]+$/i;function fe(e,t){let n=v(t),r=t,i=y;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&de.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ue,me);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ue.test(e)){let n=e.replace(le,pe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ee}return new i(r,t)}function pe(e){return`-`+e.toLowerCase()}function me(e){return e.charAt(1).toUpperCase()}var he=_([te,re,ae,oe,se],`html`),ge=_([te,ie,ae,oe,se],`svg`);function _e(e){return e.join(` `).trim()}var ve=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})),ye=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(ve());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}})),be=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))}})),xe=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ye()),r=be();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})),Se=we(`end`),Ce=we(`start`);function we(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 Te(e){let t=Ce(e),n=Se(e);if(t&&n)return{start:t,end:n}}function Ee(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Oe(e.position):`start`in e||`end`in e?Oe(e):`line`in e||`column`in e?De(e):``}function De(e){return ke(e&&e.line)+`:`+ke(e&&e.column)}function Oe(e){return De(e&&e.start)+`-`+De(e&&e.end)}function ke(e){return e&&typeof e==`number`?e:1}var P=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=Ee(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}};P.prototype.file=``,P.prototype.name=``,P.prototype.reason=``,P.prototype.message=``,P.prototype.stack=``,P.prototype.column=void 0,P.prototype.line=void 0,P.prototype.ancestors=void 0,P.prototype.cause=void 0,P.prototype.fatal=void 0,P.prototype.place=void 0,P.prototype.ruleId=void 0,P.prototype.source=void 0;var Ae=t(xe(),1),je={}.hasOwnProperty,Me=new Map,Ne=/[A-Z]/g,Pe=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Fe=new Set([`td`,`th`]),Ie=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Le(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=Je(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=qe(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`?ge:he,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Re(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Re(e,t,n){if(t.type===`element`)return ze(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Be(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return He(e,t,n);if(t.type===`mdxjsEsm`)return Ve(e,t);if(t.type===`root`)return Ue(e,t,n);if(t.type===`text`)return We(e,t)}function ze(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ge,e.schema=i),e.ancestors.push(t);let a=et(e,t.tagName,!1),o=Ye(e,t),s=Ze(e,t);return Pe.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!m(e):!0})),Ge(e,o,a,t),Ke(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Be(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)}tt(e,t.position)}function Ve(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tt(e,t.position)}function He(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ge,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:et(e,t.name,!0),o=Xe(e,t),s=Ze(e,t);return Ge(e,o,a,t),Ke(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ue(e,t,n){let r={};return Ke(r,Ze(e,t)),e.create(t,e.Fragment,r,n)}function We(e,t){return t.value}function Ge(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ke(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function qe(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 Je(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Ce(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 Ye(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&je.call(t.properties,i)){let a=Qe(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Fe.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 Xe(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 tt(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 tt(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Ze(e,t){let n=[],r=-1,i=e.passKeys?new Map:Me;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=Re(e,a,o);s!==void 0&&n.push(s)}return n}function Qe(e,t,n){let r=fe(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?c(n):_e(n)),r.property===`style`){let t=typeof n==`object`?n:$e(e,String(n));return e.stylePropertyNameCase===`css`&&(t=nt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ce[r.property]||r.property:r.attribute,n]}}function $e(e,t){try{return(0,Ae.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new P("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=Ie+`#cannot-parse-style-attribute`,r}}function et(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=f(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=f(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return je.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tt(e)}function tt(e,t){let n=new P("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=Ie+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function nt(e){let t={},n;for(n in e)je.call(e,n)&&(t[rt(n)]=e[n]);return t}function rt(e){let t=e.replace(Ne,it);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function it(e){return`-`+e.toLowerCase()}var at={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`]},ot={};function st(e,t){let n=t||ot;return ct(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function ct(e,t,n){if(ut(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 lt(e.children,t,n)}return Array.isArray(e)?lt(e,t,n):``}function lt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ct(e[i],t,n);return r.join(``)}function ut(e){return!!(e&&typeof e==`object`)}var dt=document.createElement(`i`);function ft(e){let t=`&`+e+`;`;dt.innerHTML=t;let n=dt.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function F(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 I(e,t){return e.length>0?(F(e,e.length,0,t),e):t}var pt={}.hasOwnProperty;function mt(e){let t={},n=-1;for(;++n<e.length;)ht(t,e[n]);return t}function ht(e,t){let n;for(n in t){let r=(pt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){pt.call(r,a)||(r[a]=[]);let e=i[a];gt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function gt(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);F(e,0,0,r)}function _t(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 L(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var R=W(/[A-Za-z]/),z=W(/[\dA-Za-z]/),vt=W(/[#-'*+\--9=?A-Z^-~]/);function yt(e){return e!==null&&(e<32||e===127)}var bt=W(/\d/),xt=W(/[\dA-Fa-f]/),St=W(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}var Ct=W(/\p{P}|\p{S}/u),U=W(/\s/);function W(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&&z(e.charCodeAt(n+1))&&z(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 G(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return H(r)?(e.enter(n),s(r)):t(r)}function s(r){return H(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`),G(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 B(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 F(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 B(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++;F(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 G(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||V(e)||U(e))return 1;if(Ct(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=I(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=I(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=I(l,Mt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=I(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=I(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,F(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 R(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||z(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||z(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||yt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):vt(t)?(e.consume(t),l):n(t)}function u(e){return z(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||z(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 H(t)?G(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||B(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 H(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 H(t)?G(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 St(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=z,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=xt,u):(e.enter(`characterReferenceValue`),a=7,o=bt,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===z&&!ft(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`),H(t)?G(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||B(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||B(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),G(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||B(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||B(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&&H(t)?G(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||B(t)?e.check(Yt,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||B(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`),H(t)?G(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`),H(t)?G(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||B(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`),G(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):B(t)?e.attempt(en,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||B(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):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):G(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):B(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)):B(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||B(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 F(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):B(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`),G(e,a,`linePrefix`)}function a(i){if(i===null||B(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||yt(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||B(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||V(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||yt(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):B(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||B(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!H(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):B(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),G(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||B(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 B(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):H(i)?G(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=L(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 V(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 H(t)?G(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||B(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function wn(e,t,n){return r;function r(t){return V(t)?bn(e,i)(t):n(t)}function i(t){return yn(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return H(t)?G(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||B(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 B(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`},F(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||V(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||B(n)?(e.exit(`atxHeading`),t(n)):H(n)?G(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||V(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:N):R(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):R(a)?(e.consume(a),i=4,r.interrupt?t:N):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:N):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 R(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||V(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||z(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 H(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||R(t)?(e.consume(t),b):H(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||z(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):H(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):H(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||B(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||V(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||H(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||B(t)?O(t):H(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),re):t===63&&i===3?(e.consume(t),N):t===93&&i===5?(e.consume(t),ne):B(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Nn,ie,k)(t)):t===null||B(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Pn,A,ie)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||B(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),N):O(t)}function M(t){return t===47?(e.consume(t),o=``,te):O(t)}function te(t){if(t===62){let n=o.toLowerCase();return jn.includes(n)?(e.consume(t),re):O(t)}return R(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),te):O(t)}function ne(t){return t===93?(e.consume(t),N):O(t)}function N(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),N):O(t)}function re(t){return t===null||B(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function Ln(e,t,n){let r=this;return i;function i(t){return B(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):R(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):R(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):B(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(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):B(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):B(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):B(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return R(t)?(e.consume(t),S):n(t)}function S(t){return t===45||z(t)?(e.consume(t),S):C(t)}function C(t){return B(t)?(o=C,M(t)):H(t)?(e.consume(t),C):j(t)}function w(t){return t===45||z(t)?(e.consume(t),w):t===47||t===62||V(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||R(t)?(e.consume(t),E):B(t)?(o=T,M(t)):H(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||z(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):B(t)?(o=D,M(t)):H(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):B(t)?(o=O,M(t)):H(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):B(t)?(o=k,M(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||V(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||V(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return H(t)?G(e,ne,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ne(t)}function ne(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&&F(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=I(s,e.slice(a+1,a+r+3)),s=I(s,[[`enter`,u,t]]),s=I(s,Mt(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=I(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=I(s,e.slice(o+1)),s=I(s,[[`exit`,c,t]]),F(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(L(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 V(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 V(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 V(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(L(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`),G(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||B(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),H(t)?G(e,s,`whitespace`)(t):s(t))}}var K={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:bt(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 bt(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 H(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,G(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!H(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,G(e,e.attempt(K,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function lr(e,t,n){let r=this;return G(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 G(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!H(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`),H(t)?G(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||B(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,G(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:K,43:K,45:K,48:K,49:K,50:K,51:K,52:K,53:K,54:K,55:K,56:K,57:K,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=I(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){B(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&&F(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:mt([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 _t(n.slice(t?2:1),t?16:10)}return ft(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(xe),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(_e),blockQuote:a(fe),characterEscape:T,characterReference:T,codeFenced:a(pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(pe,o),codeText:a(me,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(he),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ge),hardBreakEscape:a(ve),hardBreakTrailing:a(ve),htmlFlow:a(ye,o),htmlFlowData:T,htmlText:a(ye,o),htmlTextData:T,image:a(be),label:o,link:a(xe),listItem:a(Ce),listItemValue:f,listOrdered:a(Se,d),listUnordered:a(Se),paragraph:a(we),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(_e),strong:a(Te),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:de,autolinkProtocol:ue,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:ce,characterReference:le,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ee),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(M),label:ne,labelText:te,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:N,resourceTitleString:re,resource:ie,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:q(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:q(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:q(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+"` ("+Ee({start:e.start,end:e.end})+`): it’s not open`);n.position.end=q(e.end)}function u(){return st(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=L(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=De(),n.position={start:q(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=q(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=q(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 ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){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 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 te(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Vr(t),n.identifier=L(t).toLowerCase()}function ne(){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 N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ie(){this.data.inReference=void 0}function ae(){this.data.referenceType=`collapsed`}function oe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=L(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function se(e){this.data.characterReferenceType=e.type}function ce(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=_t(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=ft(t);let i=this.stack[this.stack.length-1];i.value+=r}function le(e){let t=this.stack.pop();t.position.end=q(e.end)}function ue(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function de(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function fe(){return{type:`blockquote`,children:[]}}function pe(){return{type:`code`,lang:null,meta:null,value:``}}function me(){return{type:`inlineCode`,value:``}}function he(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ge(){return{type:`emphasis`,children:[]}}function _e(){return{type:`heading`,depth:0,children:[]}}function ve(){return{type:`break`}}function ye(){return{type:`html`,value:``}}function be(){return{type:`image`,title:null,url:``,alt:null}}function xe(){return{type:`link`,title:null,url:``,children:[]}}function Se(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Ce(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function we(){return{type:`paragraph`,children:[]}}function Te(){return{type:`strong`,children:[]}}function De(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function q(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+"` ("+Ee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ee({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Ee({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-CkJCx4Bp.js";import{i as g,n as _,r as v}from"./index-BowrnLVe.js";import{r as y,t as b}from"./services.generated-CAJQk7Wk.js";var x=e(n()),S=r(),C=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,S.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,S.jsx)(`circle`,{cx:12,cy:12,r:3})]})}),w=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,S.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,S.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`})]})}),T=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 12h14m-7-7v14`})}),E=a([`id-desc`]).describe(`RequestLogOrderBy`),D=a([`id`,`token_name`,`query`]).describe(`RequestLogSearchField`),O=a([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),k=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()});var 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()});c({num:l().int().nonnegative(),page:l().int().min(1),search:D,keyword:i(),orderBy:E,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:k,keyword:i(),orderBy:O,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()}),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 j=A.partial({id:!0,created_at:!0,refresh_token:!0,expires_at:!0,account_uuid:!0,active:!0,ord:!0});j.pick({id:!0,token:!0,refresh_token:!0,name:!0});function M(){let[e,n]=(0,x.useState)(!1),[r,i]=(0,x.useState)(!1),[a,o]=(0,x.useState)(!1),{form:s,register:c,reset:l}=_(j,{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,S.jsxs)(S.Fragment,{children:[(0,S.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,S.jsx)(T,{className:`size-3.5`}),`Add Token`]}),e&&(0,S.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,S.jsx)(`div`,{className:`absolute inset-0`,onClick:h,onKeyDown:()=>{}}),(0,S.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-md mx-4`,children:[(0,S.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100`,children:(0,S.jsx)(`h2`,{className:`text-base font-medium text-sand-900`,children:`Add Token`})}),(0,S.jsxs)(`div`,{className:`px-5 py-4 space-y-4`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name *`}),(0,S.jsx)(v,{...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,S.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,S.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin`}),`Waiting for login...`]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g,{className:`size-4`}),`Login with Claude`]})}),(0,S.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,S.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`}),(0,S.jsx)(`span`,{className:`text-[10px] text-sand-400 uppercase`,children:`or`}),(0,S.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`label`,{htmlFor:`oauth-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Access Token`}),(0,S.jsxs)(`div`,{className:`relative mt-1`,children:[(0,S.jsx)(v,{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,S.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,S.jsx)(w,{className:`size-4`}):(0,S.jsx)(C,{className:`size-4`})})]})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`label`,{htmlFor:`refresh-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:[`Refresh Token`,` `,(0,S.jsx)(`span`,{className:`text-sand-400 normal-case tracking-normal`,children:`(optional)`})]}),(0,S.jsx)(v,{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,S.jsx)(`p`,{className:`text-[10px] text-sand-400 mt-1`,children:`Enables auto-refresh when access token expires (~8h)`})]})]}),(0,S.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,S.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,S.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 N=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M20 6L9 17l-5-5`})}),P=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,S.jsx)(`rect`,{width:14,height:14,x:8,y:8,rx:2,ry:2}),(0,S.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})}),F=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.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,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.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,x.useState)(null),[a,o]=(0,x.useState)(null),[s,c]=(0,x.useState)(!1),[l,u]=(0,x.useState)(!1),[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(!1),{form:h,setForm:g,register:y}=_(j,{name:``,token:``,active:!0}),T=t(),E=b.useRemoveTokenMutation(),D=b.useUpdateTokenMutation(),O=b.useToggleTokenMutation(),k=()=>Promise.all([T.invalidateQueries({queryKey:[`Token`]}),T.invalidateQueries({queryKey:[`Qgrid`]})]),A=async e=>{await O.mutateAsync({id:e.id}),await k()},M=async()=>{r&&(await E.mutateAsync({token:r.token}),await k(),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=[D.mutateAsync({token:a.token,name:h.name?.trim()??``,newToken:e??``,refreshToken:h.refresh_token?.trim()??``})];h.active!==a.active&&t.push(O.mutateAsync({id:a.id})),await Promise.all(t),await k(),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,S.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:3}).map((e,t)=>(0,S.jsx)(`div`,{className:`h-12 bg-sand-100 rounded-md animate-pulse`},`skeleton-${t}`))});let U=e??[];return U.length===0?(0,S.jsxs)(`div`,{className:`text-sand-400 text-center py-16 text-sm`,children:[`No tokens registered. Click `,(0,S.jsx)(`strong`,{className:`text-sand-600`,children:`Add Token`}),` to get started.`]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`rounded-lg bg-sand-50 overflow-hidden`,children:(0,S.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{className:`border-b border-sand-200`,children:[(0,S.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Token`}),(0,S.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Name`}),(0,S.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Status`}),(0,S.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Expires`}),(0,S.jsx)(`th`,{className:`w-20 px-3 py-3`})]})}),(0,S.jsx)(`tbody`,{className:`divide-y divide-sand-200/60`,children:U.map(e=>{let t=z(e.expires_at);return(0,S.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 ${e.active?``:`opacity-50`}`,children:[(0,S.jsx)(`td`,{className:`px-5 py-3`,children:(0,S.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:R(e.token)})}),(0,S.jsx)(`td`,{className:`px-5 py-3`,children:e.name?(0,S.jsx)(`span`,{className:`text-sm text-sand-700`,children:e.name}):(0,S.jsx)(`span`,{className:`text-[11px] text-sand-400`,children:`—`})}),(0,S.jsx)(`td`,{className:`px-5 py-3`,children:(0,S.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:()=>A(e),disabled:O.isPending,children:(0,S.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,S.jsx)(`td`,{className:`px-5 py-3`,children:t.text&&(0,S.jsx)(`span`,{className:`text-xs ${t.color}`,children:t.text})}),(0,S.jsx)(`td`,{className:`px-3 py-3`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:()=>L(e),children:(0,S.jsx)(F,{className:`size-4`})}),(0,S.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-red-500 transition-colors duration-150`,onClick:()=>i(e),children:(0,S.jsx)(I,{className:`size-4`})})]})})]},e.id)})})]})}),a&&(0,S.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,S.jsx)(`div`,{className:`absolute inset-0`,onClick:()=>o(null),onKeyDown:()=>{}}),(0,S.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-sm mx-4`,children:[(0,S.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100`,children:(0,S.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Edit Token`})}),(0,S.jsxs)(`div`,{className:`px-5 py-4 space-y-3`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name`}),(0,S.jsx)(v,{...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,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.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,S.jsx)(`label`,{htmlFor:`token-active`,className:`text-sm text-sand-700`,children:`Active`})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`label`,{htmlFor:`token-value`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Token`}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(N,{className:`size-3 text-sage-500`}),(0,S.jsx)(`span`,{className:`text-sage-500`,children:`Copied`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(P,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Copy`})]})}),(0,S.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(w,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Hide`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Show`})]})})]})]}),(0,S.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,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsxs)(`label`,{htmlFor:`edit-refresh-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:[`Refresh Token`,` `,(0,S.jsx)(`span`,{className:`text-sand-400 normal-case tracking-normal`,children:`(optional)`})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(N,{className:`size-3 text-sage-500`}),(0,S.jsx)(`span`,{className:`text-sage-500`,children:`Copied`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(P,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Copy`})]})}),(0,S.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(w,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Hide`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Show`})]})})]})]}),(0,S.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,S.jsx)(`p`,{className:`text-[10px] text-sand-400 mt-1`,children:`Enables auto-refresh when access token expires`})]})]}),(0,S.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,S.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,S.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:D.isPending,onClick:B,children:D.isPending?`Saving...`:`Save`})]})]})]}),r&&(0,S.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,S.jsx)(`div`,{className:`absolute inset-0`,onClick:()=>i(null),onKeyDown:()=>{}}),(0,S.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-sm mx-4`,children:[(0,S.jsxs)(`div`,{className:`px-5 py-4`,children:[(0,S.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Remove Token`}),(0,S.jsxs)(`p`,{className:`text-sm text-sand-700 mt-2`,children:[`Are you sure you want to remove`,` `,(0,S.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:R(r.token)}),r.name&&(0,S.jsxs)(`span`,{className:`text-sand-500`,children:[` (`,r.name,`)`]}),`?`]})]}),(0,S.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,S.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,S.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:E.isPending,onClick:M,children:E.isPending?`Removing...`:`Remove`})]})]})]})]})}function V(){let{data:e,isLoading:t}=y.useTokens(`A`);return(0,S.jsxs)(`div`,{className:`space-y-5 max-w-300 mx-auto -translate-x-4`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`h1`,{className:`text-xl font-medium text-sand-900 tracking-tight`,children:`Tokens`}),(0,S.jsx)(M,{})]}),(0,S.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-CkJCx4Bp.js";import{i as g,n as _,r as v}from"./index-CgXTSTgN.js";import{r as y,t as b}from"./services.generated-CAJQk7Wk.js";var x=e(n()),S=r(),C=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,S.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,S.jsx)(`circle`,{cx:12,cy:12,r:3})]})}),w=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,S.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,S.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`})]})}),T=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 12h14m-7-7v14`})}),E=a([`id-desc`]).describe(`RequestLogOrderBy`),D=a([`id`,`token_name`,`query`]).describe(`RequestLogSearchField`),O=a([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),k=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()});var 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()});c({num:l().int().nonnegative(),page:l().int().min(1),search:D,keyword:i(),orderBy:E,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:k,keyword:i(),orderBy:O,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()}),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 j=A.partial({id:!0,created_at:!0,refresh_token:!0,expires_at:!0,account_uuid:!0,active:!0,ord:!0});j.pick({id:!0,token:!0,refresh_token:!0,name:!0});function M(){let[e,n]=(0,x.useState)(!1),[r,i]=(0,x.useState)(!1),[a,o]=(0,x.useState)(!1),{form:s,register:c,reset:l}=_(j,{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,S.jsxs)(S.Fragment,{children:[(0,S.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,S.jsx)(T,{className:`size-3.5`}),`Add Token`]}),e&&(0,S.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,S.jsx)(`div`,{className:`absolute inset-0`,onClick:h,onKeyDown:()=>{}}),(0,S.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-md mx-4`,children:[(0,S.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100`,children:(0,S.jsx)(`h2`,{className:`text-base font-medium text-sand-900`,children:`Add Token`})}),(0,S.jsxs)(`div`,{className:`px-5 py-4 space-y-4`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name *`}),(0,S.jsx)(v,{...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,S.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,S.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin`}),`Waiting for login...`]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g,{className:`size-4`}),`Login with Claude`]})}),(0,S.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,S.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`}),(0,S.jsx)(`span`,{className:`text-[10px] text-sand-400 uppercase`,children:`or`}),(0,S.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`label`,{htmlFor:`oauth-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Access Token`}),(0,S.jsxs)(`div`,{className:`relative mt-1`,children:[(0,S.jsx)(v,{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,S.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,S.jsx)(w,{className:`size-4`}):(0,S.jsx)(C,{className:`size-4`})})]})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`label`,{htmlFor:`refresh-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:[`Refresh Token`,` `,(0,S.jsx)(`span`,{className:`text-sand-400 normal-case tracking-normal`,children:`(optional)`})]}),(0,S.jsx)(v,{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,S.jsx)(`p`,{className:`text-[10px] text-sand-400 mt-1`,children:`Enables auto-refresh when access token expires (~8h)`})]})]}),(0,S.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,S.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,S.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 N=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M20 6L9 17l-5-5`})}),P=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,S.jsx)(`rect`,{width:14,height:14,x:8,y:8,rx:2,ry:2}),(0,S.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})}),F=e=>(0,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.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,S.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,S.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,x.useState)(null),[a,o]=(0,x.useState)(null),[s,c]=(0,x.useState)(!1),[l,u]=(0,x.useState)(!1),[d,f]=(0,x.useState)(!1),[p,m]=(0,x.useState)(!1),{form:h,setForm:g,register:y}=_(j,{name:``,token:``,active:!0}),T=t(),E=b.useRemoveTokenMutation(),D=b.useUpdateTokenMutation(),O=b.useToggleTokenMutation(),k=()=>Promise.all([T.invalidateQueries({queryKey:[`Token`]}),T.invalidateQueries({queryKey:[`Qgrid`]})]),A=async e=>{await O.mutateAsync({id:e.id}),await k()},M=async()=>{r&&(await E.mutateAsync({token:r.token}),await k(),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=[D.mutateAsync({token:a.token,name:h.name?.trim()??``,newToken:e??``,refreshToken:h.refresh_token?.trim()??``})];h.active!==a.active&&t.push(O.mutateAsync({id:a.id})),await Promise.all(t),await k(),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,S.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:3}).map((e,t)=>(0,S.jsx)(`div`,{className:`h-12 bg-sand-100 rounded-md animate-pulse`},`skeleton-${t}`))});let U=e??[];return U.length===0?(0,S.jsxs)(`div`,{className:`text-sand-400 text-center py-16 text-sm`,children:[`No tokens registered. Click `,(0,S.jsx)(`strong`,{className:`text-sand-600`,children:`Add Token`}),` to get started.`]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`rounded-lg bg-sand-50 overflow-hidden`,children:(0,S.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{className:`border-b border-sand-200`,children:[(0,S.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Token`}),(0,S.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Name`}),(0,S.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Status`}),(0,S.jsx)(`th`,{className:`text-left px-5 py-3 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Expires`}),(0,S.jsx)(`th`,{className:`w-20 px-3 py-3`})]})}),(0,S.jsx)(`tbody`,{className:`divide-y divide-sand-200/60`,children:U.map(e=>{let t=z(e.expires_at);return(0,S.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 ${e.active?``:`opacity-50`}`,children:[(0,S.jsx)(`td`,{className:`px-5 py-3`,children:(0,S.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:R(e.token)})}),(0,S.jsx)(`td`,{className:`px-5 py-3`,children:e.name?(0,S.jsx)(`span`,{className:`text-sm text-sand-700`,children:e.name}):(0,S.jsx)(`span`,{className:`text-[11px] text-sand-400`,children:`—`})}),(0,S.jsx)(`td`,{className:`px-5 py-3`,children:(0,S.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:()=>A(e),disabled:O.isPending,children:(0,S.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,S.jsx)(`td`,{className:`px-5 py-3`,children:t.text&&(0,S.jsx)(`span`,{className:`text-xs ${t.color}`,children:t.text})}),(0,S.jsx)(`td`,{className:`px-3 py-3`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:()=>L(e),children:(0,S.jsx)(F,{className:`size-4`})}),(0,S.jsx)(`button`,{type:`button`,className:`p-1 rounded text-sand-400 hover:text-red-500 transition-colors duration-150`,onClick:()=>i(e),children:(0,S.jsx)(I,{className:`size-4`})})]})})]},e.id)})})]})}),a&&(0,S.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,S.jsx)(`div`,{className:`absolute inset-0`,onClick:()=>o(null),onKeyDown:()=>{}}),(0,S.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-sm mx-4`,children:[(0,S.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100`,children:(0,S.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Edit Token`})}),(0,S.jsxs)(`div`,{className:`px-5 py-4 space-y-3`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name`}),(0,S.jsx)(v,{...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,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.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,S.jsx)(`label`,{htmlFor:`token-active`,className:`text-sm text-sand-700`,children:`Active`})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`label`,{htmlFor:`token-value`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Token`}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(N,{className:`size-3 text-sage-500`}),(0,S.jsx)(`span`,{className:`text-sage-500`,children:`Copied`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(P,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Copy`})]})}),(0,S.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(w,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Hide`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Show`})]})})]})]}),(0,S.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,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsxs)(`label`,{htmlFor:`edit-refresh-token`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:[`Refresh Token`,` `,(0,S.jsx)(`span`,{className:`text-sand-400 normal-case tracking-normal`,children:`(optional)`})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(N,{className:`size-3 text-sage-500`}),(0,S.jsx)(`span`,{className:`text-sage-500`,children:`Copied`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(P,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Copy`})]})}),(0,S.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,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(w,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Hide`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{className:`size-3`}),(0,S.jsx)(`span`,{children:`Show`})]})})]})]}),(0,S.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,S.jsx)(`p`,{className:`text-[10px] text-sand-400 mt-1`,children:`Enables auto-refresh when access token expires`})]})]}),(0,S.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,S.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,S.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:D.isPending,onClick:B,children:D.isPending?`Saving...`:`Save`})]})]})]}),r&&(0,S.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,S.jsx)(`div`,{className:`absolute inset-0`,onClick:()=>i(null),onKeyDown:()=>{}}),(0,S.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full max-w-sm mx-4`,children:[(0,S.jsxs)(`div`,{className:`px-5 py-4`,children:[(0,S.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Remove Token`}),(0,S.jsxs)(`p`,{className:`text-sm text-sand-700 mt-2`,children:[`Are you sure you want to remove`,` `,(0,S.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:R(r.token)}),r.name&&(0,S.jsxs)(`span`,{className:`text-sand-500`,children:[` (`,r.name,`)`]}),`?`]})]}),(0,S.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100 flex items-center justify-end gap-2`,children:[(0,S.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,S.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:E.isPending,onClick:M,children:E.isPending?`Removing...`:`Remove`})]})]})]})]})}function V(){let{data:e,isLoading:t}=y.useTokens(`A`);return(0,S.jsxs)(`div`,{className:`space-y-5 max-w-300 mx-auto -translate-x-4`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`h1`,{className:`text-xl font-medium text-sand-900 tracking-tight`,children:`Tokens`}),(0,S.jsx)(M,{})]}),(0,S.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-CgXTSTgN.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-Dw2cE7zH.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DH4kUfK2.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-CUxlo6YN.js">
|
|
@@ -160,8 +160,8 @@ function RequestLogTable() {
|
|
|
160
160
|
const navigate = useNavigate();
|
|
161
161
|
const [page, setPage] = (0, import_react.useState)(1);
|
|
162
162
|
const [tokenFilter, setTokenFilter] = (0, import_react.useState)("");
|
|
163
|
-
const { data:
|
|
164
|
-
const tokenNames = (
|
|
163
|
+
const { data: tokensData } = TokenService.useTokens("A");
|
|
164
|
+
const tokenNames = (tokensData?.rows ?? []).map((t) => t.name).filter(Boolean);
|
|
165
165
|
const { data, isLoading } = RequestLogService.useRequestLogs("A", {
|
|
166
166
|
num: PAGE_SIZE$1,
|
|
167
167
|
page,
|
|
@@ -44581,7 +44581,7 @@ var $$splitComponentImporter$2 = () => import("./assets/tokens-Dyi6qMmP.js");
|
|
|
44581
44581
|
var Route$2 = createFileRoute("/tokens")({ component: lazyRouteComponent($$splitComponentImporter$2, "component") });
|
|
44582
44582
|
//#endregion
|
|
44583
44583
|
//#region src/routes/index.tsx
|
|
44584
|
-
var $$splitComponentImporter$1 = () => import("./assets/routes-
|
|
44584
|
+
var $$splitComponentImporter$1 = () => import("./assets/routes-Dx59lTlD.js");
|
|
44585
44585
|
var Route$1 = createFileRoute("/")({ component: lazyRouteComponent($$splitComponentImporter$1, "component") });
|
|
44586
44586
|
//#endregion
|
|
44587
44587
|
//#region src/routes/requests/show.tsx
|