@cartanova/qgrid-cli 2.21.0 → 2.22.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/README.ko.md +5 -4
- package/README.md +5 -4
- package/bundle/dist/application/monit/monit.frame.js +1 -1
- package/bundle/dist/application/qgrid/expired-token-reminder.js +1 -1
- package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +2 -2
- package/bundle/dist/application/qgrid/qgrid.dispatcher.js +3 -3
- package/bundle/dist/application/qgrid/qgrid.frame.js +130 -24
- package/bundle/dist/application/qgrid/qgrid.types.js +205 -2
- package/bundle/dist/application/qgrid/token-death.js +1 -1
- package/bundle/dist/application/qgrid/token-window-keepalive.js +1 -1
- package/bundle/dist/application/request-log/request-log.model.js +2 -2
- package/bundle/dist/application/sonamu.generated.js +5 -3
- package/bundle/dist/i18n/en.js +2 -1
- package/bundle/dist/i18n/ko.js +2 -1
- package/bundle/dist/i18n/sd.generated.js +3 -2
- package/bundle/dist/sonamu.config.js +2 -2
- package/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +1 -1
- package/bundle/dist/utils/providers/common/model-cost.js +15 -2
- package/bundle/dist/utils/providers/grok/grok-dispatcher.js +2 -2
- package/bundle/dist/utils/providers/openai/openai-backend-protocol.js +6 -2
- package/bundle/dist/utils/providers/openai/openai-decisions.js +178 -0
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +61 -677
- package/bundle/dist/utils/providers/openai/openai-image-generation.js +1 -1
- package/bundle/dist/utils/providers/openai/openai-realtime-protocol.js +1 -1
- package/bundle/dist/utils/providers/openai/openai-refresh.js +2 -2
- package/bundle/dist/utils/providers/openai/openai-responses-runtime.js +430 -0
- package/bundle/dist/utils/providers/openai/openai-token-pool.js +291 -0
- package/bundle/dist/utils/providers/openai/openai-voice-client.js +2 -6
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +1 -1
- package/bundle/src/application/qgrid/qgrid.dispatcher.test.ts +2 -1
- package/bundle/src/application/qgrid/qgrid.dispatcher.ts +2 -4
- package/bundle/src/application/qgrid/qgrid.frame.test.ts +100 -1
- package/bundle/src/application/qgrid/qgrid.frame.ts +146 -7
- package/bundle/src/application/qgrid/qgrid.types.ts +242 -0
- package/bundle/src/application/request-log/request-log.entity.json +3 -2
- package/bundle/src/application/sonamu.generated.http +31 -0
- package/bundle/src/application/sonamu.generated.ts +2 -1
- package/bundle/src/i18n/en.ts +1 -0
- package/bundle/src/i18n/ko.ts +1 -0
- package/bundle/src/i18n/sd.generated.ts +2 -1
- package/bundle/src/utils/providers/common/model-cost.ts +20 -0
- package/bundle/src/utils/providers/openai/openai-backend-protocol.ts +5 -0
- package/bundle/src/utils/providers/openai/openai-decisions.test.ts +240 -0
- package/bundle/src/utils/providers/openai/openai-decisions.ts +266 -0
- package/bundle/src/utils/providers/openai/openai-dispatcher.test.ts +133 -7
- package/bundle/src/utils/providers/openai/openai-dispatcher.ts +90 -1083
- package/bundle/src/utils/providers/openai/openai-responses-runtime.ts +677 -0
- package/bundle/src/utils/providers/openai/openai-token-pool.ts +481 -0
- package/bundle/src/utils/providers/openai/openai-voice-client.ts +0 -5
- package/bundle/web-dist/client/assets/{index-NGqKa5_C.js → index-CKbDrgCl.js} +17 -17
- package/bundle/web-dist/client/assets/{logs-BLhlxqoB.js → logs-wd-lZx75.js} +1 -1
- package/bundle/web-dist/client/assets/{monit-C3stGFEK.js → monit-BjQUu4NS.js} +1 -1
- package/bundle/web-dist/client/assets/{routes-Dgh-_yS5.js → routes-D-C4eD90.js} +1 -1
- package/bundle/web-dist/client/assets/{settings-DiOZwvRj.js → settings-DeJEEmWL.js} +1 -1
- package/bundle/web-dist/client/assets/{show-DucEoTrr.js → show-DGcvCaF6.js} +2 -2
- package/bundle/web-dist/client/assets/{tokens-DvCT1bbk.js → tokens-DZCpfLEe.js} +1 -1
- package/bundle/web-dist/client/assets/{use-oauth-login-flow-DazQfaBL.js → use-oauth-login-flow-Rg_ah3e1.js} +1 -1
- package/bundle/web-dist/client/assets/{use-update-token-mutation-CfGbUel6.js → use-update-token-mutation-DHVJywXU.js} +1 -1
- package/bundle/web-dist/client/assets/{voice-zPre2iO8.js → voice-CfCzLZf2.js} +1 -1
- package/bundle/web-dist/client/index.html +1 -1
- package/bundle/web-dist/server/assets/{TimedPlayer-CcClBzGi.js → TimedPlayer-mpJpP5tQ.js} +1 -1
- package/bundle/web-dist/server/assets/{logs-CxAwuDKc.js → logs-CFa_xamY.js} +6 -3
- package/bundle/web-dist/server/assets/{monit-Bl2kSkSF.js → monit-BF6osfj5.js} +2 -2
- package/bundle/web-dist/server/assets/{plus-CQ8AHpih.js → plus-DwQFfeid.js} +1 -1
- package/bundle/web-dist/server/assets/{refresh-cw-pYSuvt4c.js → refresh-cw-Bj-Jxeb6.js} +1 -1
- package/bundle/web-dist/server/assets/{request-model-ZulJMbGm.js → request-model-D_iYrudl.js} +1 -1
- package/bundle/web-dist/server/assets/{routes-W-pd1Hps.js → routes-B6be8sJP.js} +3 -3
- package/bundle/web-dist/server/assets/{services.generated-C3b31_vt.js → services.generated-D0995hJr.js} +14 -2
- package/bundle/web-dist/server/assets/{settings-CFdTg1_f.js → settings-DAle7AgI.js} +3 -3
- package/bundle/web-dist/server/assets/{show-DVEIHsXh.js → show-BTSdMDoM.js} +4 -4
- package/bundle/web-dist/server/assets/{tokens-BO1hyBuB.js → tokens-Bc9flfLz.js} +4 -4
- package/bundle/web-dist/server/assets/{use-oauth-login-flow-CCc8LEmn.js → use-oauth-login-flow-C7c0gCjf.js} +1 -1
- package/bundle/web-dist/server/assets/{use-update-token-mutation-Ba-sEhq1.js → use-update-token-mutation-DLJDGdxu.js} +1 -1
- package/bundle/web-dist/server/assets/{voice-BCF-Pkzo.js → voice-CEQT57xZ.js} +2 -2
- package/bundle/web-dist/server/entry-server.generated.js +214 -10
- package/package.json +1 -1
- package/skills/qgrid/references/ai-sdk-provider-contract.md +10 -0
- package/skills/qgrid/references/decision-rationale.md +6 -0
- package/skills/qgrid/references/openai-codex-runtime.md +9 -2
- package/skills/qgrid/references/request-log-run-lifecycle.md +3 -1
- package/skills/qgrid/references/token-auth-quota-lifecycle.md +4 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-
|
|
2
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{i as r,n as i,r as a,t as o}from"./vendor-react-8xo7RSum.js";import{A as s,C as c,D as l,E as u,M as d,N as f,O as p,S as m,T as h,_ as g,a as _,b as v,c as y,f as b,g as x,h as S,i as C,j as w,k as T,l as E,m as D,n as O,o as k,p as A,r as ee,s as j,t as M,u as te,v as N,w as ne,x as re,y as ie}from"./vendor-tanstack-DMgmqjm4.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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function ae(e){let t;if(e.then(e=>(t=e,e),T)?.catch?.(T),t!==void 0)return{data:t}}function oe(e,t,n){let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData;t.mutations?.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),t.queries?.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l,queryType:u})=>{let d=c?ae(c):void 0,f=r.data===void 0?d?.data:r.data,p=f===void 0?f:a?a(f):f,m=i.get(o),h=m?.state.status===`pending`,g=m?.state.fetchStatus===`fetching`;if(m){let e=d&&l>m.state.dataUpdatedAt;if(r.dataUpdatedAt>m.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;m.setState({...t,data:p,...r.status===`pending`&&p!==void 0&&{status:`success`,dataUpdatedAt:l,...!g&&{fetchStatus:`idle`}}})}}else m=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s,_type:u},{...r,data:p,fetchStatus:`idle`,status:r.status===`pending`&&p!==void 0?`success`:r.status,...r.status===`pending`&&p!==void 0&&{dataUpdatedAt:l}});c&&!d&&!h&&!g&&l>m.state.dataUpdatedAt&&m.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(T)})}var se=class extends c{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new N({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=ce(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=ce(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=ce(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=ce(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){re.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){return this.getAll().filter(t=>l(e,t))}notify(e){re.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return re.batch(()=>Promise.all(e.map(e=>e.continue().catch(T))))}};function ce(e){return e.options.scope?.id}var le=class extends c{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??u(r,t),a=this.get(i);return a||(a=new ie({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){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){re.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>p(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>p(e,t)):t}notify(e){re.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){re.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){re.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ue=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new le,this.#t=e.mutationCache||new se,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=v.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(w(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}),i=this.#e.get(r.queryHash)?.state.data,a=ne(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return re.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;re.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return re.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=re.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(T).catch(T)}invalidateQueries(e,t={}){return re.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=re.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(T)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(T)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(w(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(w(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(T).catch(T)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(T).catch(T)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return v.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(h(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(h(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||=u(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===d&&(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()}},de=t(o(),1),P=t(r()),F=a(),fe=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M2 10v3m4-7v11m4-14v18m4-13v7m4-10v13m4-8v3`})]})),pe=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,F.jsx)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}),(0,F.jsx)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8`})]})]})),me=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,F.jsx)(`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}),(0,F.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=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,F.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,F.jsx)(`circle`,{cx:16.5,cy:7.5,r:.5,fill:`currentColor`})]})]})),ge=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,F.jsx)(`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}),(0,F.jsx)(`circle`,{cx:12,cy:12,r:3})]})]})),_e=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 19h8M4 17l6-6l-6-6`})]})),ve=[`tts`,`stt`,`live`],ye={tts:`TTS`,stt:`STT`,live:`Live Conversation`},be=[{label:`Overview`,items:[{title:`Dashboard`,path:`/`,icon:me}]},{label:`Manage`,items:[{title:`Tokens`,path:`/tokens`,icon:he},{title:`Request Logs`,shortTitle:`Logs`,path:`/logs`,icon:pe},{title:`Server Logs`,shortTitle:`Server`,path:`/monit`,icon:_e},{title:`Settings`,path:`/settings`,icon:ge}]},{label:`Playground`,items:[{title:`Voice`,path:`/voice`,icon:fe,tabs:ve}]}],xe=be.flatMap(e=>e.items);function Se(e,t){return e===`/`?t===`/`||t===``:t.startsWith(e)}function Ce(){let e=ee({select:e=>e.location.pathname});return(0,F.jsx)(`nav`,{className:`md:hidden shrink-0 border-t border-sand-200/60 bg-sand-50/95 backdrop-blur-sm pb-[env(safe-area-inset-bottom)]`,children:(0,F.jsx)(`div`,{className:`flex`,children:xe.map(t=>{let n=Se(t.path,e);return(0,F.jsxs)(te,{to:t.path,className:`flex-1 flex flex-col items-center gap-0.5 py-2 no-underline transition-colors duration-150 ${n?`text-sienna-600`:`text-sand-500`}`,children:[(0,F.jsx)(t.icon,{className:`size-5 ${n?`text-sienna-500`:`text-sand-400`}`}),(0,F.jsx)(`span`,{className:`text-[10px] ${n?`font-medium`:``}`,children:t.shortTitle??t.title})]},t.path)})})})}function we(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Te=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ee=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,De={};function Oe(e,t){return((t||De).jsx?Ee:Te).test(e)}var ke=/[ \t\n\f\r]/g;function Ae(e){return typeof e==`object`?e.type===`text`&&je(e.value):je(e)}function je(e){return e.replace(ke,``)===``}var Me=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Me.prototype.normal={},Me.prototype.property={},Me.prototype.space=void 0;function Ne(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Me(n,r,t)}function Pe(e){return e.toLowerCase()}var Fe=class{constructor(e,t){this.attribute=t,this.property=e}};Fe.prototype.attribute=``,Fe.prototype.booleanish=!1,Fe.prototype.boolean=!1,Fe.prototype.commaOrSpaceSeparated=!1,Fe.prototype.commaSeparated=!1,Fe.prototype.defined=!1,Fe.prototype.mustUseProperty=!1,Fe.prototype.number=!1,Fe.prototype.overloadedBoolean=!1,Fe.prototype.property=``,Fe.prototype.spaceSeparated=!1,Fe.prototype.space=void 0;var Ie=e({boolean:()=>I,booleanish:()=>Re,commaOrSpaceSeparated:()=>He,commaSeparated:()=>Ve,number:()=>L,overloadedBoolean:()=>ze,spaceSeparated:()=>Be}),Le=0,I=Ue(),Re=Ue(),ze=Ue(),L=Ue(),Be=Ue(),Ve=Ue(),He=Ue();function Ue(){return 2**++Le}var We=Object.keys(Ie),Ge=class extends Fe{constructor(e,t,n,r){let i=-1;if(super(e,t),Ke(this,`space`,r),typeof n==`number`)for(;++i<We.length;){let e=We[i];Ke(this,We[i],(n&Ie[e])===Ie[e])}}};Ge.prototype.defined=!0;function Ke(e,t,n){n&&(e[t]=n)}function qe(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ge(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Pe(r)]=r,n[Pe(a.attribute)]=r}return new Me(t,n,e.space)}var Je=qe({properties:{ariaActiveDescendant:null,ariaAtomic:Re,ariaAutoComplete:null,ariaBusy:Re,ariaChecked:Re,ariaColCount:L,ariaColIndex:L,ariaColSpan:L,ariaControls:Be,ariaCurrent:null,ariaDescribedBy:Be,ariaDetails:null,ariaDisabled:Re,ariaDropEffect:Be,ariaErrorMessage:null,ariaExpanded:Re,ariaFlowTo:Be,ariaGrabbed:Re,ariaHasPopup:null,ariaHidden:Re,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Be,ariaLevel:L,ariaLive:null,ariaModal:Re,ariaMultiLine:Re,ariaMultiSelectable:Re,ariaOrientation:null,ariaOwns:Be,ariaPlaceholder:null,ariaPosInSet:L,ariaPressed:Re,ariaReadOnly:Re,ariaRelevant:null,ariaRequired:Re,ariaRoleDescription:Be,ariaRowCount:L,ariaRowIndex:L,ariaRowSpan:L,ariaSelected:Re,ariaSetSize:L,ariaSort:null,ariaValueMax:L,ariaValueMin:L,ariaValueNow:L,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ye(e,t){return t in e?e[t]:t}function Xe(e,t){return Ye(e,t.toLowerCase())}var Ze=qe({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ve,acceptCharset:Be,accessKey:Be,action:null,allow:null,allowFullScreen:I,allowPaymentRequest:I,allowUserMedia:I,alt:null,as:null,async:I,autoCapitalize:null,autoComplete:Be,autoFocus:I,autoPlay:I,blocking:Be,capture:null,charSet:null,checked:I,cite:null,className:Be,cols:L,colSpan:null,content:null,contentEditable:Re,controls:I,controlsList:Be,coords:L|Ve,crossOrigin:null,data:null,dateTime:null,decoding:null,default:I,defer:I,dir:null,dirName:null,disabled:I,download:ze,draggable:Re,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:I,formTarget:null,headers:Be,height:L,hidden:ze,high:L,href:null,hrefLang:null,htmlFor:Be,httpEquiv:Be,id:null,imageSizes:null,imageSrcSet:null,inert:I,inputMode:null,integrity:null,is:null,isMap:I,itemId:null,itemProp:Be,itemRef:Be,itemScope:I,itemType:Be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:I,low:L,manifest:null,max:null,maxLength:L,media:null,method:null,min:null,minLength:L,multiple:I,muted:I,name:null,nonce:null,noModule:I,noValidate:I,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:I,optimum:L,pattern:null,ping:Be,placeholder:null,playsInline:I,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:I,referrerPolicy:null,rel:Be,required:I,reversed:I,rows:L,rowSpan:L,sandbox:Be,scope:null,scoped:I,seamless:I,selected:I,shadowRootClonable:I,shadowRootDelegatesFocus:I,shadowRootMode:null,shape:null,size:L,sizes:null,slot:null,span:L,spellCheck:Re,src:null,srcDoc:null,srcLang:null,srcSet:null,start:L,step:null,style:null,tabIndex:L,target:null,title:null,translate:null,type:null,typeMustMatch:I,useMap:null,value:Re,width:L,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Be,axis:null,background:null,bgColor:null,border:L,borderColor:null,bottomMargin:L,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:I,declare:I,event:null,face:null,frame:null,frameBorder:null,hSpace:L,leftMargin:L,link:null,longDesc:null,lowSrc:null,marginHeight:L,marginWidth:L,noResize:I,noHref:I,noShade:I,noWrap:I,object:null,profile:null,prompt:null,rev:null,rightMargin:L,rules:null,scheme:null,scrolling:Re,standby:null,summary:null,text:null,topMargin:L,valueType:null,version:null,vAlign:null,vLink:null,vSpace:L,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:I,disableRemotePlayback:I,prefix:null,property:null,results:L,security:null,unselectable:null},space:`html`,transform:Xe}),Qe=qe({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:He,accentHeight:L,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:L,amplitude:L,arabicForm:null,ascent:L,attributeName:null,attributeType:null,azimuth:L,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:L,by:null,calcMode:null,capHeight:L,className:Be,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:L,diffuseConstant:L,direction:null,display:null,dur:null,divisor:L,dominantBaseline:null,download:I,dx:null,dy:null,edgeMode:null,editable:null,elevation:L,enableBackground:null,end:null,event:null,exponent:L,externalResourcesRequired:null,fill:null,fillOpacity:L,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:Ve,g2:Ve,glyphName:Ve,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:L,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:L,horizOriginX:L,horizOriginY:L,id:null,ideographic:L,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:L,k:L,k1:L,k2:L,k3:L,k4:L,kernelMatrix:He,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:L,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:L,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:L,overlineThickness:L,paintOrder:null,panose1:null,path:null,pathLength:L,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:L,pointsAtY:L,pointsAtZ:L,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:He,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:He,rev:He,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:He,requiredFeatures:He,requiredFonts:He,requiredFormats:He,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:L,specularExponent:L,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:L,strikethroughThickness:L,string:null,stroke:null,strokeDashArray:He,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:L,strokeOpacity:L,strokeWidth:null,style:null,surfaceScale:L,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:He,tabIndex:L,tableValues:null,target:null,targetX:L,targetY:L,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:He,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:L,underlineThickness:L,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:L,values:null,vAlphabetic:L,vMathematical:L,vectorEffect:null,vHanging:L,vIdeographic:L,version:null,vertAdvY:L,vertOriginX:L,vertOriginY:L,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:L,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ye}),$e=qe({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()}}),et=qe({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Xe}),tt=qe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),nt={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`},rt=/[A-Z]/g,it=/-[a-z]/g,at=/^data[-\w.:]+$/i;function ot(e,t){let n=Pe(t),r=t,i=Fe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&at.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(it,ct);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!it.test(e)){let n=e.replace(rt,st);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ge}return new i(r,t)}function st(e){return`-`+e.toLowerCase()}function ct(e){return e.charAt(1).toUpperCase()}var lt=Ne([Je,Ze,$e,et,tt],`html`),ut=Ne([Je,Qe,$e,et,tt],`svg`);function dt(e){return e.join(` `).trim()}var ft=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;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
3
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),pt=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(ft());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),mt=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))}})),ht=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(pt()),i=mt();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),gt=vt(`end`),_t=vt(`start`);function vt(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 yt(e){let t=_t(e),n=gt(e);if(t&&n)return{start:t,end:n}}function bt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?St(e.position):`start`in e||`end`in e?St(e):`line`in e||`column`in e?xt(e):``}function xt(e){return Ct(e&&e.line)+`:`+Ct(e&&e.column)}function St(e){return xt(e&&e.start)+`-`+xt(e&&e.end)}function Ct(e){return e&&typeof e==`number`?e:1}var wt=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=bt(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}};wt.prototype.file=``,wt.prototype.name=``,wt.prototype.reason=``,wt.prototype.message=``,wt.prototype.stack=``,wt.prototype.column=void 0,wt.prototype.line=void 0,wt.prototype.ancestors=void 0,wt.prototype.cause=void 0,wt.prototype.fatal=void 0,wt.prototype.place=void 0,wt.prototype.ruleId=void 0,wt.prototype.source=void 0;var Tt=t(ht(),1),Et={}.hasOwnProperty,Dt=new Map,Ot=/[A-Z]/g,kt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),At=new Set([`td`,`th`]),jt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Mt(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=Ut(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=Ht(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`?ut:lt,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nt(e,t,n){if(t.type===`element`)return Pt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Ft(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Lt(e,t,n);if(t.type===`mdxjsEsm`)return It(e,t);if(t.type===`root`)return Rt(e,t,n);if(t.type===`text`)return zt(e,t)}function Pt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ut,e.schema=i),e.ancestors.push(t);let a=Yt(e,t.tagName,!1),o=Wt(e,t),s=Kt(e,t);return kt.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ae(e)})),Bt(e,o,a,t),Vt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ft(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)}Xt(e,t.position)}function It(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xt(e,t.position)}function Lt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ut,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Yt(e,t.name,!0),o=Gt(e,t),s=Kt(e,t);return Bt(e,o,a,t),Vt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Rt(e,t,n){let r={};return Vt(r,Kt(e,t)),e.create(t,e.Fragment,r,n)}function zt(e,t){return t.value}function Bt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Ht(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 Ut(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_t(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 Wt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Et.call(t.properties,i)){let a=qt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&At.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 Gt(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 Xt(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 Xt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Kt(e,t){let n=[],r=-1,i=e.passKeys?new Map:Dt;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=Nt(e,a,o);s!==void 0&&n.push(s)}return n}function qt(e,t,n){let r=ot(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?we(n):dt(n)),r.property===`style`){let t=typeof n==`object`?n:Jt(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Zt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?nt[r.property]||r.property:r.attribute,n]}}function Jt(e,t){try{return(0,Tt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new wt("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=jt+`#cannot-parse-style-attribute`,r}}function Yt(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=Oe(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=Oe(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Et.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xt(e)}function Xt(e,t){let n=new wt("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=jt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Zt(e){let t={},n;for(n in e)Et.call(e,n)&&(t[Qt(n)]=e[n]);return t}function Qt(e){let t=e.replace(Ot,$t);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function $t(e){return`-`+e.toLowerCase()}var en={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`]},tn={};function nn(e,t){let n=t||tn;return rn(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function rn(e,t,n){if(on(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 an(e.children,t,n)}return Array.isArray(e)?an(e,t,n):``}function an(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rn(e[i],t,n);return r.join(``)}function on(e){return!!(e&&typeof e==`object`)}var sn=document.createElement(`i`);function cn(e){let t=`&`+e+`;`;sn.innerHTML=t;let n=sn.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function ln(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 un(e,t){return e.length>0?(ln(e,e.length,0,t),e):t}var dn={}.hasOwnProperty;function fn(e){let t={},n=-1;for(;++n<e.length;)pn(t,e[n]);return t}function pn(e,t){let n;for(n in t){let r=(dn.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){dn.call(r,a)||(r[a]=[]);let e=i[a];mn(r[a],Array.isArray(e)?e:e?[e]:[])}}}function mn(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ln(e,0,0,r)}function hn(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 gn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var _n=Dn(/[A-Za-z]/),vn=Dn(/[\dA-Za-z]/),yn=Dn(/[#-'*+\--9=?A-Z^-~]/);function bn(e){return e!==null&&(e<32||e===127)}var xn=Dn(/\d/),Sn=Dn(/[\dA-Fa-f]/),Cn=Dn(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function wn(e){return e!==null&&(e<0||e===32)}function z(e){return e===-2||e===-1||e===32}var Tn=Dn(/\p{P}|\p{S}/u),En=Dn(/\s/);function Dn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function On(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&vn(e.charCodeAt(n+1))&&vn(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 B(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return z(r)?(e.enter(n),s(r)):t(r)}function s(r){return z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var kn={tokenize:An};function An(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),B(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);else return R(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var jn={tokenize:Nn},Mn={tokenize:Pn};function Nn(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 ln(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(Mn,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(Mn,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);else 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);else return R(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++;ln(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 Pn(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Fn(e){if(e===null||wn(e)||En(e))return 1;if(Tn(e))return 2}function In(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 Ln={name:`attention`,resolveAll:Rn,tokenize:zn};function Rn(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};Bn(d,-c),Bn(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=un(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=un(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=un(l,In(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=un(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=un(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,ln(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 zn(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fn(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=Fn(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 Bn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Vn={name:`autolink`,tokenize:Hn};function Hn(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 _n(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||vn(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||vn(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||bn(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):yn(t)?(e.consume(t),l):n(t)}function u(e){return vn(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||vn(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Un={partial:!0,tokenize:Wn};function Wn(e,t,n){return r;function r(t){return z(t)?B(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||R(e)?t(e):n(e)}}var Gn={continuation:{tokenize:qn},exit:Jn,name:`blockQuote`,tokenize:Kn};function Kn(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 z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function qn(e,t,n){let r=this;return i;function i(t){return z(t)?B(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Gn,t,n)(r)}}function Jn(e){e.exit(`blockQuote`)}var Yn={name:`characterEscape`,tokenize:Xn};function Xn(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 Cn(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Zn={name:`characterReference`,tokenize:Qn};function Qn(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=vn,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=Sn,u):(e.enter(`characterReferenceValue`),a=7,o=xn,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===vn&&!cn(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 $n={partial:!0,tokenize:nr},er={concrete:!0,name:`codeFenced`,tokenize:tr};function tr(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`),z(t)?B(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||R(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check($n,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||R(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),B(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||R(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||R(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&&z(t)?B(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||R(t)?e.check($n,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||R(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`),z(t)?B(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`),z(t)?B(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||R(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function nr(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 rr={name:`codeIndented`,tokenize:ar},ir={partial:!0,tokenize:or};function ar(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),B(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):R(t)?e.attempt(ir,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||R(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function or(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):R(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):B(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):R(e)?i(e):n(e)}}var sr={name:`codeText`,previous:lr,resolve:cr,tokenize:ur};function cr(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 lr(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ur(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)):R(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||R(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 dr=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&&fr(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),fr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),fr(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);fr(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);fr(this.left,t.reverse())}}}};function fr(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 pr(e){let t={},n=-1,r,i,a,o,s,c,l,u=new dr(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,mr(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 ln(e,0,1/0,u.slice(0)),!l}function mr(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 hr={resolve:_r,tokenize:vr},gr={partial:!0,tokenize:yr};function _r(e){return pr(e),e}function vr(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):R(t)?e.check(gr,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 yr(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),B(e,a,`linePrefix`)}function a(i){if(i===null||R(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 br(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||bn(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||R(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||wn(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||bn(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 xr(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):R(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||R(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Sr(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):R(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),B(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||R(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 Cr(e,t){let n;return r;function r(i){return R(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):z(i)?B(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var wr={name:`definition`,tokenize:Er},Tr={partial:!0,tokenize:Dr};function Er(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return xr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=gn(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 wn(t)?Cr(e,l)(t):l(t)}function l(t){return br(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Tr,d,d)(t)}function d(t){return z(t)?B(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||R(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Dr(e,t,n){return r;function r(t){return wn(t)?Cr(e,i)(t):n(t)}function i(t){return Sr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return z(t)?B(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||R(e)?t(e):n(e)}}var Or={name:`hardBreakEscape`,tokenize:kr};function kr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return R(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Ar={name:`headingAtx`,resolve:jr,tokenize:Mr};function jr(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`},ln(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Mr(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||wn(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||R(n)?(e.exit(`atxHeading`),t(n)):z(n)?B(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||wn(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Nr=`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(`.`),Pr=[`pre`,`script`,`style`,`textarea`],Fr={concrete:!0,name:`htmlFlow`,resolveTo:Rr,tokenize:zr},Ir={partial:!0,tokenize:Vr},Lr={partial:!0,tokenize:Br};function Rr(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 zr(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:ne):_n(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):_n(a)?(e.consume(a),i=4,r.interrupt?t:ne):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ne):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 _n(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||wn(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Pr.includes(l)?(i=1,r.interrupt?t(s):O(s)):Nr.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||vn(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 z(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||_n(t)?(e.consume(t),b):z(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||vn(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):z(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):z(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||R(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||wn(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||z(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||R(t)?O(t):z(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),ne):t===93&&i===5?(e.consume(t),N):R(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ir,ie,k)(t)):t===null||R(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Lr,A,ie)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||R(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),ne):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 Pr.includes(n)?(e.consume(t),re):O(t)}return _n(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),te):O(t)}function N(t){return t===93?(e.consume(t),ne):O(t)}function ne(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),ne):O(t)}function re(t){return t===null||R(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function Br(e,t,n){let r=this;return i;function i(t){return R(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 Vr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Un,t,n)}}var Hr={name:`htmlText`,tokenize:Ur};function Ur(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):_n(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):_n(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):R(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):R(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):R(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):R(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return _n(t)?(e.consume(t),S):n(t)}function S(t){return t===45||vn(t)?(e.consume(t),S):C(t)}function C(t){return R(t)?(o=C,M(t)):z(t)?(e.consume(t),C):j(t)}function w(t){return t===45||vn(t)?(e.consume(t),w):t===47||t===62||wn(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||_n(t)?(e.consume(t),E):R(t)?(o=T,M(t)):z(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||vn(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):R(t)?(o=D,M(t)):z(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):R(t)?(o=O,M(t)):z(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):R(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||wn(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||wn(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 z(t)?B(e,N,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):N(t)}function N(t){return e.enter(`htmlTextData`),o(t)}}var Wr={name:`labelEnd`,resolveAll:Jr,resolveTo:Yr,tokenize:Xr},Gr={tokenize:Zr},Kr={tokenize:Qr},qr={tokenize:$r};function Jr(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&&ln(e,0,e.length,n),e}function Yr(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=un(s,e.slice(a+1,a+r+3)),s=un(s,[[`enter`,u,t]]),s=un(s,In(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=un(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=un(s,e.slice(o+1)),s=un(s,[[`exit`,c,t]]),ln(e,a,e.length,s),e}function Xr(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(gn(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(Gr,u,o?u:d)(t):t===91?e.attempt(Kr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(qr,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Zr(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 wn(t)?Cr(e,a)(t):a(t)}function a(t){return t===41?u(t):br(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return wn(t)?Cr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Sr(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return wn(t)?Cr(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 Qr(e,t,n){let r=this;return i;function i(t){return xr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(gn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function $r(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 ei={name:`labelStartImage`,resolveAll:Wr.resolveAll,tokenize:ti};function ti(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 ni={name:`labelStartLink`,resolveAll:Wr.resolveAll,tokenize:ri};function ri(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 ii={name:`lineEnding`,tokenize:ai};function ai(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),B(e,t,`linePrefix`)}}var oi={name:`thematicBreak`,tokenize:si};function si(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||R(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),z(t)?B(e,s,`whitespace`)(t):s(t))}}var ci={continuation:{tokenize:fi},exit:mi,name:`list`,tokenize:di},li={partial:!0,tokenize:hi},ui={partial:!0,tokenize:pi};function di(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:xn(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(oi,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 xn(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(Un,r.interrupt?n:u,e.attempt(li,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return z(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 fi(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Un,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!z(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(ui,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(ci,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function pi(e,t,n){let r=this;return B(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 mi(e){e.exit(this.containerState.type)}function hi(e,t,n){let r=this;return B(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!z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var gi={name:`setextUnderline`,resolveTo:_i,tokenize:vi};function _i(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 vi(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`),z(t)?B(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||R(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var yi={tokenize:bi};function bi(e){let t=this,n=e.attempt(Un,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(hr,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var xi={resolveAll:Ti()},Si=wi(`string`),Ci=wi(`text`);function wi(e){return{resolveAll:Ti(e===`text`?Ei: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);else 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 Ti(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 Ei(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 Di=e({attentionMarkers:()=>Fi,contentInitial:()=>ki,disable:()=>Ii,document:()=>Oi,flow:()=>ji,flowInitial:()=>Ai,insideSpan:()=>Pi,string:()=>Mi,text:()=>Ni}),Oi={42:ci,43:ci,45:ci,48:ci,49:ci,50:ci,51:ci,52:ci,53:ci,54:ci,55:ci,56:ci,57:ci,62:Gn},ki={91:wr},Ai={[-2]:rr,[-1]:rr,32:rr},ji={35:Ar,42:oi,45:[gi,oi],60:Fr,61:gi,95:oi,96:er,126:er},Mi={38:Zn,92:Yn},Ni={[-5]:ii,[-4]:ii,[-3]:ii,33:ei,38:Zn,42:Ln,60:[Vn,Hr],91:ni,92:[Or,Yn],93:Wr,95:Ln,96:sr},Pi={null:[Ln,xi]},Fi={null:[42,95]},Ii={null:[]};function Li(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=un(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=In(a,l.events,l),l.events):[]}function f(e,t){return zi(p(e),t)}function p(e){return Ri(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){R(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&&ln(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 Ri(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 zi(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=`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-D-C4eD90.js","assets/rolldown-runtime-XKyaHtl9.js","assets/vendor-react-8xo7RSum.js","assets/vendor-tanstack-DMgmqjm4.js","assets/use-oauth-login-flow-Rg_ah3e1.js","assets/clsx-DB0hHKMi.js","assets/cost-CZzlCFS2.js","assets/use-update-token-mutation-DHVJywXU.js","assets/logs-wd-lZx75.js","assets/refresh-cw-BtYoFHVw.js","assets/request-model-Dl31cZdf.js","assets/monit-BjQUu4NS.js","assets/settings-DeJEEmWL.js","assets/plus-Bab0ACnC.js","assets/tokens-DZCpfLEe.js","assets/voice-CfCzLZf2.js","assets/TimedPlayer-UGSsgTKj.js","assets/show-DGcvCaF6.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{i as r,n as i,r as a,t as o}from"./vendor-react-8xo7RSum.js";import{A as s,C as c,D as l,E as u,M as d,N as f,O as p,S as m,T as h,_ as g,a as _,b as v,c as y,f as b,g as x,h as S,i as C,j as w,k as T,l as E,m as D,n as O,o as ee,p as k,r as te,s as A,t as j,u as ne,v as M,w as re,x as N,y as ie}from"./vendor-tanstack-DMgmqjm4.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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function ae(e){let t;if(e.then(e=>(t=e,e),T)?.catch?.(T),t!==void 0)return{data:t}}function oe(e,t,n){let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData;t.mutations?.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),t.queries?.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l,queryType:u})=>{let d=c?ae(c):void 0,f=r.data===void 0?d?.data:r.data,p=f===void 0?f:a?a(f):f,m=i.get(o),h=m?.state.status===`pending`,g=m?.state.fetchStatus===`fetching`;if(m){let e=d&&l>m.state.dataUpdatedAt;if(r.dataUpdatedAt>m.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;m.setState({...t,data:p,...r.status===`pending`&&p!==void 0&&{status:`success`,dataUpdatedAt:l,...!g&&{fetchStatus:`idle`}}})}}else m=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s,_type:u},{...r,data:p,fetchStatus:`idle`,status:r.status===`pending`&&p!==void 0?`success`:r.status,...r.status===`pending`&&p!==void 0&&{dataUpdatedAt:l}});c&&!d&&!h&&!g&&l>m.state.dataUpdatedAt&&m.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(T)})}var se=class extends c{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new M({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=ce(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=ce(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=ce(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=ce(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){N.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){return this.getAll().filter(t=>l(e,t))}notify(e){N.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return N.batch(()=>Promise.all(e.map(e=>e.continue().catch(T))))}};function ce(e){return e.options.scope?.id}var le=class extends c{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??u(r,t),a=this.get(i);return a||(a=new ie({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){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){N.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>p(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>p(e,t)):t}notify(e){N.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){N.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){N.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ue=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new le,this.#t=e.mutationCache||new se,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=v.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(w(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}),i=this.#e.get(r.queryHash)?.state.data,a=re(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return N.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;N.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return N.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=N.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(T).catch(T)}invalidateQueries(e,t={}){return N.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=N.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(T)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(T)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(w(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(w(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(T).catch(T)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(T).catch(T)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return v.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(h(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(h(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||=u(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===d&&(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()}},de=t(o(),1),P=t(r()),F=a(),fe=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M2 10v3m4-7v11m4-14v18m4-13v7m4-10v13m4-8v3`})]})),pe=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,F.jsx)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}),(0,F.jsx)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8`})]})]})),me=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,F.jsx)(`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}),(0,F.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=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,F.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,F.jsx)(`circle`,{cx:16.5,cy:7.5,r:.5,fill:`currentColor`})]})]})),ge=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,F.jsx)(`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}),(0,F.jsx)(`circle`,{cx:12,cy:12,r:3})]})]})),_e=(0,P.forwardRef)(({title:e,titleId:t,...n},r)=>(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,F.jsx)(`title`,{id:t,children:e}):null,(0,F.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 19h8M4 17l6-6l-6-6`})]})),ve=[`tts`,`stt`,`live`],ye={tts:`TTS`,stt:`STT`,live:`Live Conversation`},be=[{label:`Overview`,items:[{title:`Dashboard`,path:`/`,icon:me}]},{label:`Manage`,items:[{title:`Tokens`,path:`/tokens`,icon:he},{title:`Request Logs`,shortTitle:`Logs`,path:`/logs`,icon:pe},{title:`Server Logs`,shortTitle:`Server`,path:`/monit`,icon:_e},{title:`Settings`,path:`/settings`,icon:ge}]},{label:`Playground`,items:[{title:`Voice`,path:`/voice`,icon:fe,tabs:ve}]}],xe=be.flatMap(e=>e.items);function Se(e,t){return e===`/`?t===`/`||t===``:t.startsWith(e)}function Ce(){let e=te({select:e=>e.location.pathname});return(0,F.jsx)(`nav`,{className:`md:hidden shrink-0 border-t border-sand-200/60 bg-sand-50/95 backdrop-blur-sm pb-[env(safe-area-inset-bottom)]`,children:(0,F.jsx)(`div`,{className:`flex`,children:xe.map(t=>{let n=Se(t.path,e);return(0,F.jsxs)(ne,{to:t.path,className:`flex-1 flex flex-col items-center gap-0.5 py-2 no-underline transition-colors duration-150 ${n?`text-sienna-600`:`text-sand-500`}`,children:[(0,F.jsx)(t.icon,{className:`size-5 ${n?`text-sienna-500`:`text-sand-400`}`}),(0,F.jsx)(`span`,{className:`text-[10px] ${n?`font-medium`:``}`,children:t.shortTitle??t.title})]},t.path)})})})}function we(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Te=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ee=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,De={};function Oe(e,t){return((t||De).jsx?Ee:Te).test(e)}var ke=/[ \t\n\f\r]/g;function Ae(e){return typeof e==`object`?e.type===`text`&&je(e.value):je(e)}function je(e){return e.replace(ke,``)===``}var Me=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Me.prototype.normal={},Me.prototype.property={},Me.prototype.space=void 0;function Ne(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Me(n,r,t)}function Pe(e){return e.toLowerCase()}var Fe=class{constructor(e,t){this.attribute=t,this.property=e}};Fe.prototype.attribute=``,Fe.prototype.booleanish=!1,Fe.prototype.boolean=!1,Fe.prototype.commaOrSpaceSeparated=!1,Fe.prototype.commaSeparated=!1,Fe.prototype.defined=!1,Fe.prototype.mustUseProperty=!1,Fe.prototype.number=!1,Fe.prototype.overloadedBoolean=!1,Fe.prototype.property=``,Fe.prototype.spaceSeparated=!1,Fe.prototype.space=void 0;var Ie=e({boolean:()=>I,booleanish:()=>Re,commaOrSpaceSeparated:()=>He,commaSeparated:()=>Ve,number:()=>L,overloadedBoolean:()=>ze,spaceSeparated:()=>Be}),Le=0,I=Ue(),Re=Ue(),ze=Ue(),L=Ue(),Be=Ue(),Ve=Ue(),He=Ue();function Ue(){return 2**++Le}var We=Object.keys(Ie),Ge=class extends Fe{constructor(e,t,n,r){let i=-1;if(super(e,t),Ke(this,`space`,r),typeof n==`number`)for(;++i<We.length;){let e=We[i];Ke(this,We[i],(n&Ie[e])===Ie[e])}}};Ge.prototype.defined=!0;function Ke(e,t,n){n&&(e[t]=n)}function qe(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ge(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Pe(r)]=r,n[Pe(a.attribute)]=r}return new Me(t,n,e.space)}var Je=qe({properties:{ariaActiveDescendant:null,ariaAtomic:Re,ariaAutoComplete:null,ariaBusy:Re,ariaChecked:Re,ariaColCount:L,ariaColIndex:L,ariaColSpan:L,ariaControls:Be,ariaCurrent:null,ariaDescribedBy:Be,ariaDetails:null,ariaDisabled:Re,ariaDropEffect:Be,ariaErrorMessage:null,ariaExpanded:Re,ariaFlowTo:Be,ariaGrabbed:Re,ariaHasPopup:null,ariaHidden:Re,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Be,ariaLevel:L,ariaLive:null,ariaModal:Re,ariaMultiLine:Re,ariaMultiSelectable:Re,ariaOrientation:null,ariaOwns:Be,ariaPlaceholder:null,ariaPosInSet:L,ariaPressed:Re,ariaReadOnly:Re,ariaRelevant:null,ariaRequired:Re,ariaRoleDescription:Be,ariaRowCount:L,ariaRowIndex:L,ariaRowSpan:L,ariaSelected:Re,ariaSetSize:L,ariaSort:null,ariaValueMax:L,ariaValueMin:L,ariaValueNow:L,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ye(e,t){return t in e?e[t]:t}function Xe(e,t){return Ye(e,t.toLowerCase())}var Ze=qe({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ve,acceptCharset:Be,accessKey:Be,action:null,allow:null,allowFullScreen:I,allowPaymentRequest:I,allowUserMedia:I,alt:null,as:null,async:I,autoCapitalize:null,autoComplete:Be,autoFocus:I,autoPlay:I,blocking:Be,capture:null,charSet:null,checked:I,cite:null,className:Be,cols:L,colSpan:null,content:null,contentEditable:Re,controls:I,controlsList:Be,coords:L|Ve,crossOrigin:null,data:null,dateTime:null,decoding:null,default:I,defer:I,dir:null,dirName:null,disabled:I,download:ze,draggable:Re,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:I,formTarget:null,headers:Be,height:L,hidden:ze,high:L,href:null,hrefLang:null,htmlFor:Be,httpEquiv:Be,id:null,imageSizes:null,imageSrcSet:null,inert:I,inputMode:null,integrity:null,is:null,isMap:I,itemId:null,itemProp:Be,itemRef:Be,itemScope:I,itemType:Be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:I,low:L,manifest:null,max:null,maxLength:L,media:null,method:null,min:null,minLength:L,multiple:I,muted:I,name:null,nonce:null,noModule:I,noValidate:I,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:I,optimum:L,pattern:null,ping:Be,placeholder:null,playsInline:I,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:I,referrerPolicy:null,rel:Be,required:I,reversed:I,rows:L,rowSpan:L,sandbox:Be,scope:null,scoped:I,seamless:I,selected:I,shadowRootClonable:I,shadowRootDelegatesFocus:I,shadowRootMode:null,shape:null,size:L,sizes:null,slot:null,span:L,spellCheck:Re,src:null,srcDoc:null,srcLang:null,srcSet:null,start:L,step:null,style:null,tabIndex:L,target:null,title:null,translate:null,type:null,typeMustMatch:I,useMap:null,value:Re,width:L,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Be,axis:null,background:null,bgColor:null,border:L,borderColor:null,bottomMargin:L,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:I,declare:I,event:null,face:null,frame:null,frameBorder:null,hSpace:L,leftMargin:L,link:null,longDesc:null,lowSrc:null,marginHeight:L,marginWidth:L,noResize:I,noHref:I,noShade:I,noWrap:I,object:null,profile:null,prompt:null,rev:null,rightMargin:L,rules:null,scheme:null,scrolling:Re,standby:null,summary:null,text:null,topMargin:L,valueType:null,version:null,vAlign:null,vLink:null,vSpace:L,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:I,disableRemotePlayback:I,prefix:null,property:null,results:L,security:null,unselectable:null},space:`html`,transform:Xe}),Qe=qe({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:He,accentHeight:L,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:L,amplitude:L,arabicForm:null,ascent:L,attributeName:null,attributeType:null,azimuth:L,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:L,by:null,calcMode:null,capHeight:L,className:Be,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:L,diffuseConstant:L,direction:null,display:null,dur:null,divisor:L,dominantBaseline:null,download:I,dx:null,dy:null,edgeMode:null,editable:null,elevation:L,enableBackground:null,end:null,event:null,exponent:L,externalResourcesRequired:null,fill:null,fillOpacity:L,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:Ve,g2:Ve,glyphName:Ve,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:L,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:L,horizOriginX:L,horizOriginY:L,id:null,ideographic:L,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:L,k:L,k1:L,k2:L,k3:L,k4:L,kernelMatrix:He,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:L,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:L,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:L,overlineThickness:L,paintOrder:null,panose1:null,path:null,pathLength:L,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:L,pointsAtY:L,pointsAtZ:L,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:He,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:He,rev:He,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:He,requiredFeatures:He,requiredFonts:He,requiredFormats:He,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:L,specularExponent:L,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:L,strikethroughThickness:L,string:null,stroke:null,strokeDashArray:He,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:L,strokeOpacity:L,strokeWidth:null,style:null,surfaceScale:L,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:He,tabIndex:L,tableValues:null,target:null,targetX:L,targetY:L,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:He,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:L,underlineThickness:L,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:L,values:null,vAlphabetic:L,vMathematical:L,vectorEffect:null,vHanging:L,vIdeographic:L,version:null,vertAdvY:L,vertOriginX:L,vertOriginY:L,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:L,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ye}),$e=qe({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()}}),et=qe({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Xe}),tt=qe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),nt={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`},rt=/[A-Z]/g,it=/-[a-z]/g,at=/^data[-\w.:]+$/i;function ot(e,t){let n=Pe(t),r=t,i=Fe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&at.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(it,ct);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!it.test(e)){let n=e.replace(rt,st);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ge}return new i(r,t)}function st(e){return`-`+e.toLowerCase()}function ct(e){return e.charAt(1).toUpperCase()}var lt=Ne([Je,Ze,$e,et,tt],`html`),ut=Ne([Je,Qe,$e,et,tt],`svg`);function dt(e){return e.join(` `).trim()}var ft=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;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
3
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),pt=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(ft());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),mt=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))}})),ht=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(pt()),i=mt();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),gt=vt(`end`),_t=vt(`start`);function vt(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 yt(e){let t=_t(e),n=gt(e);if(t&&n)return{start:t,end:n}}function bt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?St(e.position):`start`in e||`end`in e?St(e):`line`in e||`column`in e?xt(e):``}function xt(e){return Ct(e&&e.line)+`:`+Ct(e&&e.column)}function St(e){return xt(e&&e.start)+`-`+xt(e&&e.end)}function Ct(e){return e&&typeof e==`number`?e:1}var wt=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=bt(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}};wt.prototype.file=``,wt.prototype.name=``,wt.prototype.reason=``,wt.prototype.message=``,wt.prototype.stack=``,wt.prototype.column=void 0,wt.prototype.line=void 0,wt.prototype.ancestors=void 0,wt.prototype.cause=void 0,wt.prototype.fatal=void 0,wt.prototype.place=void 0,wt.prototype.ruleId=void 0,wt.prototype.source=void 0;var Tt=t(ht(),1),Et={}.hasOwnProperty,Dt=new Map,Ot=/[A-Z]/g,kt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),At=new Set([`td`,`th`]),jt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Mt(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=Ut(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=Ht(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`?ut:lt,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nt(e,t,n){if(t.type===`element`)return Pt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Ft(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Lt(e,t,n);if(t.type===`mdxjsEsm`)return It(e,t);if(t.type===`root`)return Rt(e,t,n);if(t.type===`text`)return zt(e,t)}function Pt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ut,e.schema=i),e.ancestors.push(t);let a=Yt(e,t.tagName,!1),o=Wt(e,t),s=Kt(e,t);return kt.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ae(e)})),Bt(e,o,a,t),Vt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ft(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)}Xt(e,t.position)}function It(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xt(e,t.position)}function Lt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ut,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Yt(e,t.name,!0),o=Gt(e,t),s=Kt(e,t);return Bt(e,o,a,t),Vt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Rt(e,t,n){let r={};return Vt(r,Kt(e,t)),e.create(t,e.Fragment,r,n)}function zt(e,t){return t.value}function Bt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Ht(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 Ut(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_t(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 Wt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Et.call(t.properties,i)){let a=qt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&At.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 Gt(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 Xt(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 Xt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Kt(e,t){let n=[],r=-1,i=e.passKeys?new Map:Dt;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=Nt(e,a,o);s!==void 0&&n.push(s)}return n}function qt(e,t,n){let r=ot(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?we(n):dt(n)),r.property===`style`){let t=typeof n==`object`?n:Jt(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Zt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?nt[r.property]||r.property:r.attribute,n]}}function Jt(e,t){try{return(0,Tt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new wt("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=jt+`#cannot-parse-style-attribute`,r}}function Yt(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=Oe(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=Oe(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Et.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xt(e)}function Xt(e,t){let n=new wt("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=jt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Zt(e){let t={},n;for(n in e)Et.call(e,n)&&(t[Qt(n)]=e[n]);return t}function Qt(e){let t=e.replace(Ot,$t);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function $t(e){return`-`+e.toLowerCase()}var en={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`]},tn={};function nn(e,t){let n=t||tn;return rn(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function rn(e,t,n){if(on(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 an(e.children,t,n)}return Array.isArray(e)?an(e,t,n):``}function an(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rn(e[i],t,n);return r.join(``)}function on(e){return!!(e&&typeof e==`object`)}var sn=document.createElement(`i`);function cn(e){let t=`&`+e+`;`;sn.innerHTML=t;let n=sn.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function ln(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 un(e,t){return e.length>0?(ln(e,e.length,0,t),e):t}var dn={}.hasOwnProperty;function fn(e){let t={},n=-1;for(;++n<e.length;)pn(t,e[n]);return t}function pn(e,t){let n;for(n in t){let r=(dn.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){dn.call(r,a)||(r[a]=[]);let e=i[a];mn(r[a],Array.isArray(e)?e:e?[e]:[])}}}function mn(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ln(e,0,0,r)}function hn(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 gn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var _n=Dn(/[A-Za-z]/),vn=Dn(/[\dA-Za-z]/),yn=Dn(/[#-'*+\--9=?A-Z^-~]/);function bn(e){return e!==null&&(e<32||e===127)}var xn=Dn(/\d/),Sn=Dn(/[\dA-Fa-f]/),Cn=Dn(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function wn(e){return e!==null&&(e<0||e===32)}function z(e){return e===-2||e===-1||e===32}var Tn=Dn(/\p{P}|\p{S}/u),En=Dn(/\s/);function Dn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function On(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&vn(e.charCodeAt(n+1))&&vn(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 B(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return z(r)?(e.enter(n),s(r)):t(r)}function s(r){return z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var kn={tokenize:An};function An(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),B(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);else return R(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var jn={tokenize:Nn},Mn={tokenize:Pn};function Nn(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 ln(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(Mn,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(Mn,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);else 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);else return R(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++;ln(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 Pn(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Fn(e){if(e===null||wn(e)||En(e))return 1;if(Tn(e))return 2}function In(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 Ln={name:`attention`,resolveAll:Rn,tokenize:zn};function Rn(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};Bn(d,-c),Bn(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=un(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=un(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=un(l,In(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=un(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=un(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,ln(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 zn(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Fn(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=Fn(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 Bn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Vn={name:`autolink`,tokenize:Hn};function Hn(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 _n(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||vn(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||vn(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||bn(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):yn(t)?(e.consume(t),l):n(t)}function u(e){return vn(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||vn(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Un={partial:!0,tokenize:Wn};function Wn(e,t,n){return r;function r(t){return z(t)?B(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||R(e)?t(e):n(e)}}var Gn={continuation:{tokenize:qn},exit:Jn,name:`blockQuote`,tokenize:Kn};function Kn(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 z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function qn(e,t,n){let r=this;return i;function i(t){return z(t)?B(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Gn,t,n)(r)}}function Jn(e){e.exit(`blockQuote`)}var Yn={name:`characterEscape`,tokenize:Xn};function Xn(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 Cn(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Zn={name:`characterReference`,tokenize:Qn};function Qn(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=vn,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=Sn,u):(e.enter(`characterReferenceValue`),a=7,o=xn,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===vn&&!cn(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 $n={partial:!0,tokenize:nr},er={concrete:!0,name:`codeFenced`,tokenize:tr};function tr(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`),z(t)?B(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||R(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check($n,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||R(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),B(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||R(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||R(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&&z(t)?B(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||R(t)?e.check($n,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||R(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`),z(t)?B(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`),z(t)?B(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||R(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function nr(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 rr={name:`codeIndented`,tokenize:ar},ir={partial:!0,tokenize:or};function ar(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),B(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):R(t)?e.attempt(ir,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||R(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function or(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):R(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):B(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):R(e)?i(e):n(e)}}var sr={name:`codeText`,previous:lr,resolve:cr,tokenize:ur};function cr(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 lr(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ur(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)):R(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||R(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 dr=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&&fr(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),fr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),fr(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);fr(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);fr(this.left,t.reverse())}}}};function fr(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 pr(e){let t={},n=-1,r,i,a,o,s,c,l,u=new dr(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,mr(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 ln(e,0,1/0,u.slice(0)),!l}function mr(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 hr={resolve:_r,tokenize:vr},gr={partial:!0,tokenize:yr};function _r(e){return pr(e),e}function vr(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):R(t)?e.check(gr,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 yr(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),B(e,a,`linePrefix`)}function a(i){if(i===null||R(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 br(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||bn(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||R(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||wn(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||bn(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 xr(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):R(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||R(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Sr(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):R(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),B(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||R(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 Cr(e,t){let n;return r;function r(i){return R(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):z(i)?B(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var wr={name:`definition`,tokenize:Er},Tr={partial:!0,tokenize:Dr};function Er(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return xr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=gn(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 wn(t)?Cr(e,l)(t):l(t)}function l(t){return br(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Tr,d,d)(t)}function d(t){return z(t)?B(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||R(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Dr(e,t,n){return r;function r(t){return wn(t)?Cr(e,i)(t):n(t)}function i(t){return Sr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return z(t)?B(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||R(e)?t(e):n(e)}}var Or={name:`hardBreakEscape`,tokenize:kr};function kr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return R(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Ar={name:`headingAtx`,resolve:jr,tokenize:Mr};function jr(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`},ln(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Mr(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||wn(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||R(n)?(e.exit(`atxHeading`),t(n)):z(n)?B(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||wn(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Nr=`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(`.`),Pr=[`pre`,`script`,`style`,`textarea`],Fr={concrete:!0,name:`htmlFlow`,resolveTo:Rr,tokenize:zr},Ir={partial:!0,tokenize:Vr},Lr={partial:!0,tokenize:Br};function Rr(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 zr(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:re):_n(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):_n(a)?(e.consume(a),i=4,r.interrupt?t:re):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:re):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 _n(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||wn(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Pr.includes(l)?(i=1,r.interrupt?t(s):O(s)):Nr.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||vn(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 z(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||_n(t)?(e.consume(t),b):z(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||vn(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):z(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):z(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||R(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||wn(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||z(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||R(t)?O(t):z(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),N):t===63&&i===3?(e.consume(t),re):t===93&&i===5?(e.consume(t),M):R(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ir,ie,ee)(t)):t===null||R(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(Lr,k,ie)(t)}function k(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||R(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),re):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return Pr.includes(n)?(e.consume(t),N):O(t)}return _n(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function M(t){return t===93?(e.consume(t),re):O(t)}function re(t){return t===62?(e.consume(t),N):t===45&&i===2?(e.consume(t),re):O(t)}function N(t){return t===null||R(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),N)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function Br(e,t,n){let r=this;return i;function i(t){return R(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 Vr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Un,t,n)}}var Hr={name:`htmlText`,tokenize:Ur};function Ur(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):_n(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):_n(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):R(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(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):R(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):R(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):R(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return _n(t)?(e.consume(t),S):n(t)}function S(t){return t===45||vn(t)?(e.consume(t),S):C(t)}function C(t){return R(t)?(o=C,j(t)):z(t)?(e.consume(t),C):A(t)}function w(t){return t===45||vn(t)?(e.consume(t),w):t===47||t===62||wn(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||_n(t)?(e.consume(t),E):R(t)?(o=T,j(t)):z(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||vn(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):R(t)?(o=D,j(t)):z(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,ee):R(t)?(o=O,j(t)):z(t)?(e.consume(t),O):(e.consume(t),k)}function ee(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):R(t)?(o=ee,j(t)):(e.consume(t),ee)}function k(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||wn(t)?T(t):(e.consume(t),k)}function te(e){return e===47||e===62||wn(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return z(t)?B(e,M,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):M(t)}function M(t){return e.enter(`htmlTextData`),o(t)}}var Wr={name:`labelEnd`,resolveAll:Jr,resolveTo:Yr,tokenize:Xr},Gr={tokenize:Zr},Kr={tokenize:Qr},qr={tokenize:$r};function Jr(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&&ln(e,0,e.length,n),e}function Yr(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=un(s,e.slice(a+1,a+r+3)),s=un(s,[[`enter`,u,t]]),s=un(s,In(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=un(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=un(s,e.slice(o+1)),s=un(s,[[`exit`,c,t]]),ln(e,a,e.length,s),e}function Xr(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(gn(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(Gr,u,o?u:d)(t):t===91?e.attempt(Kr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(qr,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Zr(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 wn(t)?Cr(e,a)(t):a(t)}function a(t){return t===41?u(t):br(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return wn(t)?Cr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Sr(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return wn(t)?Cr(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 Qr(e,t,n){let r=this;return i;function i(t){return xr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(gn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function $r(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 ei={name:`labelStartImage`,resolveAll:Wr.resolveAll,tokenize:ti};function ti(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 ni={name:`labelStartLink`,resolveAll:Wr.resolveAll,tokenize:ri};function ri(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 ii={name:`lineEnding`,tokenize:ai};function ai(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),B(e,t,`linePrefix`)}}var oi={name:`thematicBreak`,tokenize:si};function si(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||R(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),z(t)?B(e,s,`whitespace`)(t):s(t))}}var ci={continuation:{tokenize:fi},exit:mi,name:`list`,tokenize:di},li={partial:!0,tokenize:hi},ui={partial:!0,tokenize:pi};function di(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:xn(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(oi,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 xn(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(Un,r.interrupt?n:u,e.attempt(li,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return z(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 fi(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Un,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!z(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(ui,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(ci,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function pi(e,t,n){let r=this;return B(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 mi(e){e.exit(this.containerState.type)}function hi(e,t,n){let r=this;return B(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!z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var gi={name:`setextUnderline`,resolveTo:_i,tokenize:vi};function _i(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 vi(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`),z(t)?B(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||R(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var yi={tokenize:bi};function bi(e){let t=this,n=e.attempt(Un,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(hr,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var xi={resolveAll:Ti()},Si=wi(`string`),Ci=wi(`text`);function wi(e){return{resolveAll:Ti(e===`text`?Ei: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);else 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 Ti(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 Ei(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 Di=e({attentionMarkers:()=>Fi,contentInitial:()=>ki,disable:()=>Ii,document:()=>Oi,flow:()=>ji,flowInitial:()=>Ai,insideSpan:()=>Pi,string:()=>Mi,text:()=>Ni}),Oi={42:ci,43:ci,45:ci,48:ci,49:ci,50:ci,51:ci,52:ci,53:ci,54:ci,55:ci,56:ci,57:ci,62:Gn},ki={91:wr},Ai={[-2]:rr,[-1]:rr,32:rr},ji={35:Ar,42:oi,45:[gi,oi],60:Fr,61:gi,95:oi,96:er,126:er},Mi={38:Zn,92:Yn},Ni={[-5]:ii,[-4]:ii,[-3]:ii,33:ei,38:Zn,42:Ln,60:[Vn,Hr],91:ni,92:[Or,Yn],93:Wr,95:Ln,96:sr},Pi={null:[Ln,xi]},Fi={null:[42,95]},Ii={null:[]};function Li(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=un(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=In(a,l.events,l),l.events):[]}function f(e,t){return zi(p(e),t)}function p(e){return Ri(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){R(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&&ln(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 Ri(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 zi(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=`
|
|
4
4
|
`;break;case-3:o=`\r
|
|
5
|
-
`;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 Bi(e){let t={constructs:fn([Di,...(e||{}).extensions||[]]),content:n(kn),defined:[],document:n(jn),flow:n(yi),lazy:{},string:n(Si),text:n(Ci)};return t;function n(e){return n;function n(n){return Li(t,e,n)}}}function Vi(e){for(;!pr(e););return e}var Hi=/[\0\t\n\r]/g;function Ui(){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(Hi.lastIndex=u,c=Hi.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 Wi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gi(e){return e.replace(Wi,Ki)}function Ki(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return hn(n.slice(t?2:1),t?16:10)}return cn(n)||e}var qi={}.hasOwnProperty;function Ji(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Yi(n)(Vi(Bi(n).document().write(Ui()(e,t,!0))))}function Yi(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ye),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(he),blockQuote:a(P),characterEscape:T,characterReference:T,codeFenced:a(F),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(F,o),codeText:a(fe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(me),hardBreakEscape:a(ge),hardBreakTrailing:a(ge),htmlFlow:a(_e,o),htmlFlowData:T,htmlText:a(_e,o),htmlTextData:T,image:a(ve),label:o,link:a(ye),listItem:a(xe),listItemValue:f,listOrdered:a(be,d),listUnordered:a(be),paragraph:a(Se),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(he),strong:a(Ce),thematicBreak:a(Te)},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:N,labelText:te,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:ne,resourceTitleString:re,resource:ie,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Zi(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]];qi.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]||$i).call(a,void 0,e[0])}for(r.position={start:Xi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Xi(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:Xi(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]||$i).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+bt({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Xi(e.end)}function u(){return nn(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=gn(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=we(),n.position={start:Xi(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=Xi(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=Xi(e.end),this.data.atHardBreak=void 0}else!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=Gi(t),n.identifier=gn(t).toLowerCase()}function N(){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 ne(){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=gn(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=hn(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=cn(t);let i=this.stack[this.stack.length-1];i.value+=r}function le(e){let t=this.stack.pop();t.position.end=Xi(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 P(){return{type:`blockquote`,children:[]}}function F(){return{type:`code`,lang:null,meta:null,value:``}}function fe(){return{type:`inlineCode`,value:``}}function pe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function me(){return{type:`emphasis`,children:[]}}function he(){return{type:`heading`,depth:0,children:[]}}function ge(){return{type:`break`}}function _e(){return{type:`html`,value:``}}function ve(){return{type:`image`,title:null,url:``,alt:null}}function ye(){return{type:`link`,title:null,url:``,children:[]}}function be(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function xe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Se(){return{type:`paragraph`,children:[]}}function Ce(){return{type:`strong`,children:[]}}function we(){return{type:`text`,value:``}}function Te(){return{type:`thematicBreak`}}}function Xi(e){return{line:e.line,column:e.column,offset:e.offset}}function Zi(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Zi(e,r):Qi(e,r)}}function Qi(e,t){let n;for(n in t)if(qi.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 $i(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+bt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+`) is still open`)}function ea(e){let t=this;t.parser=n;function n(n){return Ji(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ta(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 na(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
5
|
+
`;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 Bi(e){let t={constructs:fn([Di,...(e||{}).extensions||[]]),content:n(kn),defined:[],document:n(jn),flow:n(yi),lazy:{},string:n(Si),text:n(Ci)};return t;function n(e){return n;function n(n){return Li(t,e,n)}}}function Vi(e){for(;!pr(e););return e}var Hi=/[\0\t\n\r]/g;function Ui(){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(Hi.lastIndex=u,c=Hi.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 Wi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gi(e){return e.replace(Wi,Ki)}function Ki(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return hn(n.slice(t?2:1),t?16:10)}return cn(n)||e}var qi={}.hasOwnProperty;function Ji(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Yi(n)(Vi(Bi(n).document().write(Ui()(e,t,!0))))}function Yi(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ye),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(he),blockQuote:a(P),characterEscape:T,characterReference:T,codeFenced:a(F),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(F,o),codeText:a(fe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(me),hardBreakEscape:a(ge),hardBreakTrailing:a(ge),htmlFlow:a(_e,o),htmlFlowData:T,htmlText:a(_e,o),htmlTextData:T,image:a(ve),label:o,link:a(ye),listItem:a(xe),listItemValue:f,listOrdered:a(be,d),listUnordered:a(be),paragraph:a(Se),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(he),strong:a(Ce),thematicBreak:a(Te)},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(te),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(k),htmlTextData:E,image:c(j),label:M,labelText:ne,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:re,resourceTitleString:N,resource:ie,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Zi(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]];qi.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]||$i).call(a,void 0,e[0])}for(r.position={start:Xi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Xi(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:Xi(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]||$i).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+bt({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Xi(e.end)}function u(){return nn(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=gn(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=we(),n.position={start:Xi(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=Xi(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=Xi(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){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 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 ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Gi(t),n.identifier=gn(t).toLowerCase()}function M(){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 re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function N(){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=gn(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=hn(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=cn(t);let i=this.stack[this.stack.length-1];i.value+=r}function le(e){let t=this.stack.pop();t.position.end=Xi(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 P(){return{type:`blockquote`,children:[]}}function F(){return{type:`code`,lang:null,meta:null,value:``}}function fe(){return{type:`inlineCode`,value:``}}function pe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function me(){return{type:`emphasis`,children:[]}}function he(){return{type:`heading`,depth:0,children:[]}}function ge(){return{type:`break`}}function _e(){return{type:`html`,value:``}}function ve(){return{type:`image`,title:null,url:``,alt:null}}function ye(){return{type:`link`,title:null,url:``,children:[]}}function be(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function xe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Se(){return{type:`paragraph`,children:[]}}function Ce(){return{type:`strong`,children:[]}}function we(){return{type:`text`,value:``}}function Te(){return{type:`thematicBreak`}}}function Xi(e){return{line:e.line,column:e.column,offset:e.offset}}function Zi(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Zi(e,r):Qi(e,r)}}function Qi(e,t){let n;for(n in t)if(qi.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 $i(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+bt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+`) is still open`)}function ea(e){let t=this;t.parser=n;function n(n){return Ji(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ta(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 na(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
6
6
|
`}]}function ra(e,t){let n=t.value?t.value+`
|
|
7
7
|
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ia(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aa(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oa(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=On(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function sa(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ca(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function la(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function ua(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return la(e,t);let i={src:On(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function da(e,t){let n={src:On(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function fa(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function pa(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return la(e,t);let i={href:On(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ma(e,t){let n={href:On(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ha(e,t,n){let r=e.all(t),i=n?ga(n):_a(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
8
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
@@ -81,24 +81,24 @@ import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{i as r,n
|
|
|
81
81
|
|
|
82
82
|
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Iu,c=!Md.jitless,l=c&&Lu.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?pm([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function gm(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=>!nd(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=>cd(e,r,Nd())))}),t)}var _m=U(`$ZodUnion`,(e,t)=>{lp.init(e,t),H(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),H(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),H(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),H(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>xu(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>gm(t,r,e,i)):gm(o,r,e,i)}});function vm(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var ym=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,_m.init(e,t);let n=e._zod.parse;H(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||Tu(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=Eu(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=yu(()=>vm(t));e._zod.parse=(i,a)=>{let o=i.value;if(!Iu(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),bm=U(`$ZodIntersection`,(e,t)=>{lp.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])=>Sm(e,t,n)):Sm(e,i,a)}});function xm(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ru(e)&&Ru(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=xm(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=xm(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 Sm(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=xm(t.value,n.value);if(!c.valid){if(nd(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Cm=U(`$ZodTuple`,(e,t)=>{lp.init(e,t);let n=t.items,r=Md.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=wm(n,`optin`),l=wm(n,`optout`);if(!t.rest){if(o.length<c)return i.issues.push({code:`too_small`,minimum:c,inclusive:!0,input:o,inst:e,origin:`array`}),i;o.length>n.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length),d=t.rest?a?.abortEarly:void 0,f=!1;for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:o[e],issues:[]},a);t instanceof Promise?s.push(t.then(t=>{u[e]=t})):(u[e]=t,d&&!f&&t.issues.length&&(f=nd(t)))}if(t.rest&&!f){let e=n.length-1,r=o.slice(n.length),c=i.issues.length;for(let n of r){if(d&&i.issues.length!==c){if(nd(i,c))break;c=i.issues.length}e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Tm(t,i,e))):Tm(r,i,e)}}return s.length?Promise.all(s).then(()=>Em(u,i,n,o,l)):Em(u,i,n,o,l)}});function wm(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Tm(e,t,n){e.issues.length&&t.issues.push(...id(n,e.issues)),t.value[n]=e.value}function Em(e,t,n,r,i){for(let a=0;a<n.length;a++){let o=e[a],s=a<r.length;if(!s&&a>=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...id(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var Dm=U(`$ZodRecord`,(e,t)=>{lp.init(e,t);let n=Md.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ru(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>cd(e,i,Nd())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...id(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...id(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Rf.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>cd(e,i,Nd())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...id(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...id(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Om=U(`$ZodEnum`,(e,t)=>{lp.init(e,t);let n=hu(t.entries),r=new Set(n);e._zod.values=r,H(e,`pattern`,e=>{let t=hu(e.def.entries).filter(e=>Bu.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Vu(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),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}}),km=U(`$ZodLiteral`,(e,t)=>{lp.init(e,t);let n=new Set(t.values);e._zod.values=n,H(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Vu(e):e?Vu(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Am=U(`$ZodTransform`,(e,t)=>{lp.init(e,t),e._zod.optin=`optional`,Md.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new jd(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 Ad;return n.value=i,n}});function jm(e,t){return e.value=t.issues.length?void 0:t.value,e}var Mm=U(`$ZodOptional`,(e,t)=>{lp.init(e,t),H(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,H(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),H(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${xu(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>jm(e,t)):jm(e,r)}return t.innerType._zod.run(e,n)}}),Nm=U(`$ZodExactOptional`,(e,t)=>{Mm.init(e,t),H(e,`values`,e=>e.def.innerType._zod.values),H(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Pm=U(`$ZodNullable`,(e,t)=>{lp.init(e,t),H(e,`optin`,e=>e.def.innerType._zod.optin),H(e,`optout`,e=>e.def.innerType._zod.optout),H(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${xu(t.source)}|null)$`):void 0}),H(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Fm=U(`$ZodDefault`,(e,t)=>{lp.init(e,t),e._zod.optin=`defaulted`,H(e,`values`,e=>e.def.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=>Im(e,t)):Im(r,t)}});function Im(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Lm=U(`$ZodPrefault`,(e,t)=>{lp.init(e,t),e._zod.optin=`defaulted`,H(e,`values`,e=>e.def.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))}),Rm=U(`$ZodNonOptional`,(e,t)=>{lp.init(e,t),H(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].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=>zm(t,e)):zm(i,e)}});function zm(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Bm(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>cd(e,r,Nd()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Vm=U(`$ZodCatch`,(e,t)=>{lp.init(e,t),H(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),H(e,`optout`,e=>e.def.innerType._zod.optout),H(e,`values`,e=>e.def.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({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Bm(e,r,t,n)):Bm(e,r,t,n)}}),Hm=U(`$ZodPipe`,(e,t)=>{lp.init(e,t),H(e,`values`,e=>e.def.in._zod.values),H(e,`optin`,e=>e.def.in._zod.optin),H(e,`optout`,e=>e.def.out._zod.optout),H(e,`propValues`,e=>e.def.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=>Um(e,t.in,n)):Um(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Um(e,t.out,n)):Um(r,t.out,n)}});function Um(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Wm=U(`$ZodReadonly`,(e,t)=>{lp.init(e,t),H(e,`propValues`,e=>e.def.innerType._zod.propValues),H(e,`values`,e=>e.def.innerType._zod.values),H(e,`optin`,e=>e.def.innerType?._zod?.optin),H(e,`optout`,e=>e.def.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(Gm):Gm(r)}});function Gm(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Km=U(`$ZodLazy`,(e,t)=>{lp.init(e,t),wu(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),H(e,`pattern`,e=>e.innerType?._zod?.pattern),H(e,`propValues`,e=>e.innerType?._zod?.propValues),H(e,`optin`,e=>e.innerType?._zod?.optin??void 0),H(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),qm=U(`$ZodCustom`,(e,t)=>{Uf.init(e,t),lp.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=>Jm(t,n,r,e));Jm(i,n,r,e)}});function Jm(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(pd(e))}}var Ym=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Xm=`~memo`,Zm=[];function Qm(e){return typeof e==`object`&&!!e}function $m(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var eh=new WeakMap,th=0,nh=1,rh=2;function ih(e,t,n){let r=eh.get(e);if(r!==void 0)return r?rh:th;if(t.has(e))return rh;t.add(e);let i=th,a=e=>{if(i!==rh&&e?._zod){let r=ih(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=th;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?nh:o.value?._zod?ih(o.value,t,n):th;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Eu(c);s(e?o(e,!0):nh),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?ih(r,t,!1):nh);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),ah(e,i)}function ah(e,t){return t!==nh&&eh.set(e,t===rh),t}function oh(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var sh,ch=[],lh={alloc(e,t,n){let r=sh;if(!r)return n;sh=void 0;let i={value:n,issues:null};return r.set(t.value,i),ch.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&dh(n,e.value))throw new Ym;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=ih(e,new Set,!1);if(i===th)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===rh||r?n=!0:r=!0}let l=s.value;if(!Qm(l))return t(s,c);let u=c[Xm];u||(u={buckets:new WeakMap,backEdges:void 0},c[Xm]=u);let d;i===c?d=a:(d=oh(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...$m(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;sh=d;let p=ch.length,m=t(s,c);sh=void 0;let h=ch.length>p?ch.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?$m(e.issues):Zm),e)):(h&&(h.issues=m.issues.length?$m(m.issues):Zm),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function uh(){return lh}function dh(e,t){let n=e[Xm]?.backEdges;return n!==void 0&&Qm(t)&&n.has(t)}var fh=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(fd(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Uu(e.values[0])}`:`Invalid option: expected one of ${gu(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${gu(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function ph(){return{localeError:fh()}}var mh,hh=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 gh(){return new hh}(mh=globalThis).__zod_globalRegistry??(mh.__zod_globalRegistry=gh());var _h=globalThis.__zod_globalRegistry;function vh(e){return e.checks&&=[...e.checks],e}function yh(e,t){return new e(vh({type:`string`,...V(t)}))}function bh(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...V(t)})}function xh(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...V(t)})}function Sh(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...V(t)})}function Ch(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...V(t)})}function wh(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...V(t)})}function Th(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...V(t)})}function Eh(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...V(t)})}function Dh(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...V(t)})}function Oh(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...V(t)})}function kh(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...V(t)})}function Ah(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...V(t)})}function jh(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...V(t)})}function Mh(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...V(t)})}function Nh(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...V(t)})}function Ph(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...V(t)})}function Fh(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...V(t)})}function Ih(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...V(t)})}function Lh(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...V(t)})}function Rh(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...V(t)})}function zh(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...V(t)})}function Bh(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...V(t)})}function Vh(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...V(t)})}function Hh(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...V(t)})}function Uh(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...V(t)})}function Wh(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...V(t)})}function Gh(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...V(t)})}function Kh(e,t){return new e(vh({type:`number`,checks:[],...V(t)}))}function qh(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...V(t)})}function Jh(e,t){return new e({type:`boolean`,...V(t)})}function Yh(e,t){return new e({type:`null`,...V(t)})}function Xh(e){return new e({type:`unknown`})}function Zh(e,t){return new e({type:`never`,...V(t)})}function Qh(e,t){return new e({type:`date`,...V(t)})}function $h(e,t){return new Kf({check:`less_than`,...V(t),value:e,inclusive:!1})}function eg(e,t){return new Kf({check:`less_than`,...V(t),value:e,inclusive:!0})}function tg(e,t){return new qf({check:`greater_than`,...V(t),value:e,inclusive:!1})}function ng(e,t){return new qf({check:`greater_than`,...V(t),value:e,inclusive:!0})}function rg(e,t){return new Jf({check:`multiple_of`,...V(t),value:e})}function ig(e,t){return new Xf({check:`max_length`,...V(t),maximum:e})}function ag(e,t){return new Zf({check:`min_length`,...V(t),minimum:e})}function og(e,t){return new Qf({check:`length_equals`,...V(t),length:e})}function sg(e,t){return new ep({check:`string_format`,format:`regex`,...V(t),pattern:e})}function cg(e){return new tp({check:`string_format`,format:`lowercase`,...V(e)})}function lg(e){return new np({check:`string_format`,format:`uppercase`,...V(e)})}function ug(e,t){return new rp({check:`string_format`,format:`includes`,...V(t),includes:e})}function dg(e,t){return new ip({check:`string_format`,format:`starts_with`,...V(t),prefix:e})}function fg(e,t){return new ap({check:`string_format`,format:`ends_with`,...V(t),suffix:e})}function pg(e){return new op({check:`overwrite`,tx:e})}function mg(e){return pg(t=>t.normalize(e))}function hg(){return pg(e=>e.trim())}function gg(){return pg(e=>e.toLowerCase())}function _g(){return pg(e=>e.toUpperCase())}function vg(){return pg(e=>Pu(e))}function yg(e,t,n){return new e({type:`array`,element:t,...V(n)})}function bg(e,t,n){let r=V(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function xg(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...V(n)})}function Sg(e,t){let n=Cg(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(pd(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(pd(r))}},e(t.value,t)),t);return n}function Cg(e,t){let n=new Uf({check:`custom`,...V(t)});return n._zod.check=e,n}function wg(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Tu(e,t,n[t]);return e}function Tg(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??_h,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Eg(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function Dg(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),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;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,Dg(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&wg(o.schema,c),t.io===`input`&&Lg(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Og(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function kg(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;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}/${Og(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Og(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>
|
|
83
83
|
|
|
84
|
-
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);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ag(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Ag(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var jg=new Set([`type`,`properties`,`required`,`additionalProperties`]),Mg=[`oneOf`,`anyOf`];function Ng(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Pg(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!jg.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Ng(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Tu(n,r,e.length===1?e[0]:Pg(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Ng(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Fg(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of jg)if(t in e)return;let n=t.filter(e=>Mg.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Pg(t);else{let e=n[0],i=Mg.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Pg([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,wg(e,r))}function Ig(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)):wg(i,s),wg(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??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Ag(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Fg(e)}}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)}wg(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Tu(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:zg(t,`input`,e.processors),output:zg(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Lg(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 Lg(r.element,n);if(r.type===`set`)return Lg(r.valueType,n);if(r.type===`lazy`)return Lg(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`||r.type===`catch`)return Lg(r.innerType,n);if(r.type===`intersection`)return Lg(r.left,n)||Lg(r.right,n);if(r.type===`record`||r.type===`map`)return Lg(r.keyType,n)||Lg(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Lg(r.in,n)||Lg(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Lg(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Lg(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Lg(e,n))return!0;return!!(r.rest&&Lg(r.rest,n))}return!1}var Rg=(e,t={})=>n=>{let r=Tg({...n,processors:t});return Dg(e,r),kg(r,e),Ig(r,e)},zg=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Tg({...i??{},target:a,io:t,processors:n});return Dg(e,o),kg(o,e),Ig(o,e)},Bg=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Vg=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Hg=(e,t)=>{Bg(e,`minimum`,t),Vg(e,`maximum`,t)},Ug=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Wg=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Gg=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Kg=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},qg=(e,t)=>Bg(e,`minimum`,t.minimum),Jg=(e,t)=>Vg(e,`maximum`,t.maximum),Yg=e=>(t,n)=>{Kg(t,n.format);let[r,i]=e[n.format];Bg(t,`minimum`,r),Vg(t,`maximum`,i)},Xg={greater_than:(e,t)=>Bg(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Vg(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ug(e,t.value),number_format:Yg(Gu),bigint_format:Yg(Ku),min_length:qg,max_length:Jg,length_equals:(e,t)=>Hg(e,t.length),min_size:qg,max_size:Jg,size_equals:(e,t)=>Hg(e,t.size),string_format:(e,t)=>{Kg(e,t.format),t.pattern&&Wg(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Gg(e,t.mime)};function Zg(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Xg[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Bg(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Bg(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Vg(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Vg(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ug(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Gg(t,i.mime);for(let e of i.patterns??[])Wg(t,e);return t}var Qg={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},$g=new Map([[Gp,Ef],[qp,Df]]),e_=e=>$g.get(e)??e,t_=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Zg(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Qg[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(e_);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},n_=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Zg(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Eg(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},r_=(e,t,n,r)=>{n.type=`boolean`},i_=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},a_=(e,t,n,r)=>{n.not={}},o_=(e,t,n,r)=>{Eg(e,t,n,r,`Date cannot be represented in JSON Schema`)},s_=(e,t,n,r)=>{let i=e._zod.def,a=hu(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},c_=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Eg(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Eg(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},l_=(e,t,n,r)=>{Eg(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},u_=(e,t,n,r)=>{Eg(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},d_=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Zg(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Dg(a.element,t,{...r,path:[...r.path,`items`]})};function f_(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?f_(t.out):t.type===`catch`?f_(t.innerType):e._zod.optin}var p_=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Eg(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Tu(i.properties,e,Dg(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?f_(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Dg(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},m_=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Dg(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},h_=(e,t,n,r)=>{let i=e._zod.def,a=Dg(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Dg(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},g_=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>Dg(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?Dg(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?f_(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Zg(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function __(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=__(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>__(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Rf:Lf).source)),p}var v_=new WeakMap;function y_(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of v_.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=__(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var b_=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Zg(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Dg(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)Tu(i.patternProperties,e_(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=Dg(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=v_.get(t);n||(n=[],v_.set(t,n),t.deferred.push(()=>y_(t))),n.push(e)}i.additionalProperties=Dg(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&f_(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},x_=(e,t,n,r)=>{let i=e._zod.def,a=Dg(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`}]},S_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},C_=Symbol();function w_(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Eg(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),C_):JSON.parse(o)}var T_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=w_(i.defaultValue,e,t,n,r);o!==C_&&(n.default=o)},E_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=w_(i.defaultValue,e,t,n,r);o!==C_&&(n._prefault=o)},D_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Eg(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},O_=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Dg(o,t,r);let s=t.seen.get(e);s.ref=o},k_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},A_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},j_=(e,t,n,r)=>{let i=e._zod.innerType;Dg(i,t,r);let a=t.seen.get(e);a.ref=i},M_=new WeakSet([Object.prototype,Error.prototype]);function N_(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var P_=U(`ZodError`,(e,t)=>{zd.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);M_.has(n)||(M_.add(n),N_(n,`format`,e=>t=>Hd(e,t)),N_(n,`flatten`,e=>t=>Vd(e,t)),N_(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_u,2)}),N_(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_u,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),F_=Wd(P_),I_=Gd(P_),L_=Kd(P_),R_=Jd(P_),z_=ef(P_),B_=tf(P_),V_=nf(P_),H_=rf(P_),U_=af(P_),W_=of(P_),G_=sf(P_),K_=cf(P_);function q_(){Md.localeError||Nd(ph())}function J_(){Md.memoizer||Nd({memoizer:uh()})}var Y_=U(`ZodType`,(e,t)=>(q_(),lp.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Mu(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Hu(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(by(e,t))},superRefine(e,t){return this.check(xy(e,t))},overwrite(e){return this.check(pg(e))},optional(){return $v(this)},exactOptional(){return ty(this)},nullable(){return ry(this)},nullish(){return $v(ry(this))},nonoptional(e){return ly(this,e)},array(){return Pv(this)},or(e){return Rv([this,e])},and(e){return Hv(this,e)},transform(e){return py(this,Zv(e))},default(e){return ay(this,e)},prefault(e){return sy(this,e)},catch(e){return dy(this,e)},pipe(e){return py(this,e)},readonly(){return hy(this)},describe(e){let t=this.clone();return _h.add(t,{description:e}),t},meta(...e){if(e.length===0)return _h.get(this);let t=this.clone();return _h.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return gd(this,`~standard`,{...fp(this),jsonSchema:{input:zg(this,`input`),output:zg(this,`output`)}})},set"~standard"(e){hd(this,`~standard`,e)},parse:function e(t,n){return F_(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await I_(this,t,n,{callee:e})},safeParse(e,t){return L_(this,e,t)},async safeParseAsync(e,t){return R_(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){hd(this,`spa`,e)},validate(e,t){return Zd(this,e,t)},validateAsync(e,t){return $d(this,e,t)},encode:function e(t,n){return z_(this,t,n,{callee:e})},decode:function e(t,n){return B_(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await V_(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await H_(this,t,n,{callee:e})},safeEncode(e,t){return U_(this,e,t)},safeDecode(e,t){return W_(this,e,t)},async safeEncodeAsync(e,t){return G_(this,e,t)},async safeDecodeAsync(e,t){return K_(this,e,t)},toJSONSchema(e){return Rg(this,{})(e)},get description(){return _h.get(this)?.description},get _def(){return this._zod.def}}),X_=U(`_ZodString`,(e,t)=>{pp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t_(e,t,n,r)},_d({format:e=>Zg(e).format??null,minLength:e=>Zg(e).minimum??null,maxLength:e=>Zg(e).maximum??null},{regex(...e){return this.check(sg(...e))},includes(...e){return this.check(ug(...e))},startsWith(...e){return this.check(dg(...e))},endsWith(...e){return this.check(fg(...e))},min(...e){return this.check(ag(...e))},max(...e){return this.check(ig(...e))},length(...e){return this.check(og(...e))},nonempty(...e){return this.check(ag(1,...e))},lowercase(e){return this.check(cg(e))},uppercase(e){return this.check(lg(e))},trim(){return this.check(hg())},normalize(...e){return this.check(mg(...e))},toLowerCase(){return this.check(gg())},toUpperCase(){return this.check(_g())},slugify(){return this.check(vg())}})),Z_=U(`ZodString`,(e,t)=>{pp.init(e,t),X_.init(e,t)},{email(e){return this.check(bh(rv,e))},url(e){return this.check(Eh(ov,e))},jwt(e){return this.check(Vh(xv,e))},emoji(e){return this.check(Dh(sv,e))},guid(e){return this.check(xh(iv,e))},uuid(e){return this.check(Sh(av,e))},uuidv4(e){return this.check(Ch(av,e))},uuidv6(e){return this.check(wh(av,e))},uuidv7(e){return this.check(Th(av,e))},nanoid(e){return this.check(Oh(cv,e))},cuid(e){return this.check(kh(lv,e))},cuid2(e){return this.check(Ah(uv,e))},ulid(e){return this.check(jh(dv,e))},base64(e){return this.check(Rh(vv,e))},base64url(e){return this.check(zh(yv,e))},xid(e){return this.check(Mh(fv,e))},ksuid(e){return this.check(Nh(pv,e))},ipv4(e){return this.check(Ph(mv,e))},ipv6(e){return this.check(Fh(hv,e))},cidrv4(e){return this.check(Ih(gv,e))},cidrv6(e){return this.check(Lh(_v,e))},e164(e){return this.check(Bh(bv,e))},datetime(e){return this.check(Hh($_,e))},date(e){return this.check(Uh(ev,e))},time(e){return this.check(Wh(tv,e))},duration(e){return this.check(Gh(nv,e))}});function W(e){return yh(Z_,e)}var Q_=U(`ZodStringFormat`,(e,t)=>{mp.init(e,t),X_.init(e,t)}),$_=U(`ZodISODateTime`,(e,t)=>{Np.init(e,t),Q_.init(e,t)}),ev=U(`ZodISODate`,(e,t)=>{Pp.init(e,t),Q_.init(e,t)}),tv=U(`ZodISOTime`,(e,t)=>{Fp.init(e,t),Q_.init(e,t)}),nv=U(`ZodISODuration`,(e,t)=>{Ip.init(e,t),Q_.init(e,t)}),rv=U(`ZodEmail`,(e,t)=>{_p.init(e,t),Q_.init(e,t)}),iv=U(`ZodGUID`,(e,t)=>{hp.init(e,t),Q_.init(e,t)}),av=U(`ZodUUID`,(e,t)=>{gp.init(e,t),Q_.init(e,t)}),ov=U(`ZodURL`,(e,t)=>{Tp.init(e,t),Q_.init(e,t)}),sv=U(`ZodEmoji`,(e,t)=>{Ep.init(e,t),Q_.init(e,t)}),cv=U(`ZodNanoID`,(e,t)=>{Dp.init(e,t),Q_.init(e,t)}),lv=U(`ZodCUID`,(e,t)=>{Op.init(e,t),Q_.init(e,t)}),uv=U(`ZodCUID2`,(e,t)=>{kp.init(e,t),Q_.init(e,t)}),dv=U(`ZodULID`,(e,t)=>{Ap.init(e,t),Q_.init(e,t)}),fv=U(`ZodXID`,(e,t)=>{jp.init(e,t),Q_.init(e,t)}),pv=U(`ZodKSUID`,(e,t)=>{Mp.init(e,t),Q_.init(e,t)}),mv=U(`ZodIPv4`,(e,t)=>{Lp.init(e,t),Q_.init(e,t)}),hv=U(`ZodIPv6`,(e,t)=>{Bp.init(e,t),Q_.init(e,t)}),gv=U(`ZodCIDRv4`,(e,t)=>{Vp.init(e,t),Q_.init(e,t)}),_v=U(`ZodCIDRv6`,(e,t)=>{Up.init(e,t),Q_.init(e,t)}),vv=U(`ZodBase64`,(e,t)=>{Kp.init(e,t),Q_.init(e,t)}),yv=U(`ZodBase64URL`,(e,t)=>{Yp.init(e,t),Q_.init(e,t)}),bv=U(`ZodE164`,(e,t)=>{Xp.init(e,t),Q_.init(e,t)}),xv=U(`ZodJWT`,(e,t)=>{Qp.init(e,t),Q_.init(e,t)}),Sv=U(`ZodNumber`,(e,t)=>{$p.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n_(e,t,n,r),e.isFinite=!0},_d({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Zg(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Zg(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Zg(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Zg(e).format??null},{gt(e,t){return this.check(tg(e,t))},gte(e,t){return this.check(ng(e,t))},min(e,t){return this.check(ng(e,t))},lt(e,t){return this.check($h(e,t))},lte(e,t){return this.check(eg(e,t))},max(e,t){return this.check(eg(e,t))},int(e){return this.check(K(e))},safe(e){return this.check(K(e))},positive(e){return this.check(tg(0,e))},nonnegative(e){return this.check(ng(0,e))},negative(e){return this.check($h(0,e))},nonpositive(e){return this.check(eg(0,e))},multipleOf(e,t){return this.check(rg(e,t))},step(e,t){return this.check(rg(e,t))},finite(){return this}}));function G(e){return Kh(Sv,e)}var Cv=U(`ZodNumberFormat`,(e,t)=>{em.init(e,t),Sv.init(e,t)});function K(e){return qh(Cv,e)}var wv=U(`ZodBoolean`,(e,t)=>{tm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r_(e,t,n,r)});function q(e){return Jh(wv,e)}var Tv=U(`ZodNull`,(e,t)=>{nm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i_(e,t,n,r)});function Ev(e){return Yh(Tv,e)}var Dv=U(`ZodUnknown`,(e,t)=>{rm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ov(){return Xh(Dv)}var kv=U(`ZodNever`,(e,t)=>{im.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a_(e,t,n,r)});function Av(e){return Zh(kv,e)}var jv=U(`ZodDate`,(e,t)=>{am.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o_(e,t,n,r),e.min=(t,n)=>e.check(ng(t,n)),e.max=(t,n)=>e.check(eg(t,n))},_d({minDate:e=>{let{minimum:t}=Zg(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Zg(e);return t?new Date(t):null}},{}));function Mv(e){return Qh(jv,e)}var Nv=U(`ZodArray`,(e,t)=>{J_(),lm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d_(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ag(e,t))},nonempty(e){return this.check(ag(1,e))},max(e,t){return this.check(ig(e,t))},length(e,t){return this.check(og(e,t))},unwrap(){return this.element}});function Pv(e,t){return yg(Nv,e,t)}var Fv=U(`ZodObject`,(e,t)=>{J_(),hm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p_(e,t,n,r),Cd(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Y(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Mu(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Mu(this._zod.def,{catchall:Ov()}))},loose(){return this.clone(Mu(this._zod.def,{catchall:Ov()}))},strict(){return this.clone(Mu(this._zod.def,{catchall:Av()}))},strip(){return this.clone(Mu(this._zod.def,{catchall:void 0}))},extend(e){return Xu(this,e)},safeExtend(e){return Qu(this,e)},merge(e){return $u(this,e)},pick(e){return qu(this,e)},omit(e){return Yu(this,e)},partial(...e){return ed(Qv,this,e[0])},exactPartial(...e){return ed(ey,this,e[0],`exactPartial`)},required(...e){return td(cy,this,e[0])}});function J(e,t){return new Fv({type:`object`,shape:e??{},...V(t)})}function Iv(e,t){return new Fv({type:`object`,shape:e,catchall:Ov(),...V(t)})}var Lv=U(`ZodUnion`,(e,t)=>{_m.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m_(e,t,n,r),e.options=t.options});function Rv(e,t){return new Lv({type:`union`,options:e,...V(t)})}var zv=U(`ZodDiscriminatedUnion`,(e,t)=>{Lv.init(e,t),ym.init(e,t)});function Bv(e,t,n){return new zv({type:`union`,options:t,discriminator:e,...V(n)})}var Vv=U(`ZodIntersection`,(e,t)=>{bm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h_(e,t,n,r)});function Hv(e,t){return new Vv({type:`intersection`,left:e,right:t})}var Uv=U(`ZodTuple`,(e,t)=>{J_(),Cm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g_(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new Qv({type:`optional`,innerType:e}))})}});function Wv(e,t,n){let r=t instanceof lp;return new Uv({type:`tuple`,items:e,rest:r?t:null,...V(r?n:t)})}var Gv=U(`ZodRecord`,(e,t)=>{J_(),Dm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>b_(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Kv(e,t,n){return!t||!t._zod?new Gv({type:`record`,keyType:W(),valueType:e,...V(t)}):new Gv({type:`record`,keyType:e,valueType:t,...V(n)})}var qv=U(`ZodEnum`,(e,t)=>{Om.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s_(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];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 qv({...t,checks:[],...V(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 qv({...t,checks:[],...V(r),entries:i})}});function Y(e,t){return new qv({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...V(t)})}var Jv=U(`ZodLiteral`,(e,t)=>{km.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c_(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Yv(e,t){return new Jv({type:`literal`,values:Array.isArray(e)?e:[e],...V(t)})}var Xv=U(`ZodTransform`,(e,t)=>{J_(),Am.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u_(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new jd(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(pd(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(pd(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zv(e){return new Xv({type:`transform`,transform:e})}var Qv=U(`ZodOptional`,(e,t)=>{Mm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $v(e){return new Qv({type:`optional`,innerType:e})}var ey=U(`ZodExactOptional`,(e,t)=>{Nm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ty(e){return new ey({type:`optional`,innerType:e})}var ny=U(`ZodNullable`,(e,t)=>{Pm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>x_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ry(e){return new ny({type:`nullable`,innerType:e})}var iy=U(`ZodDefault`,(e,t)=>{Fm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>T_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ay(e,t){return new iy({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():zu(t)}})}var oy=U(`ZodPrefault`,(e,t)=>{Lm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>E_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sy(e,t){return new oy({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():zu(t)}})}var cy=U(`ZodNonOptional`,(e,t)=>{Rm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ly(e,t){return new cy({type:`nonoptional`,innerType:e,...V(t)})}var uy=U(`ZodCatch`,(e,t)=>{Vm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>D_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dy(e,t){return new uy({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Td(t)})}var fy=U(`ZodPipe`,(e,t)=>{Hm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>O_(e,t,n,r),e.in=t.in,e.out=t.out});function py(e,t){return new fy({type:`pipe`,in:e,out:t})}var my=U(`ZodReadonly`,(e,t)=>{Wm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hy(e){return new my({type:`readonly`,innerType:e})}var gy=U(`ZodLazy`,(e,t)=>{Km.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j_(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function _y(e){return new gy({type:`lazy`,getter:e})}var vy=U(`ZodCustom`,(e,t)=>{qm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l_(e,t,n,r)});function yy(e,t){return bg(vy,e??(()=>!0),t)}function by(e,t={}){return xg(vy,e,t)}function xy(e,t){return Sg(e,t)}function Sy(e){let t=_y(()=>Rv([W(e),G(),q(),Ev(),Pv(t),Kv(W(),t)]));return t}var Cy=[{label:`OpenAI`,models:[`openai/gpt-6-astra`,`openai/gpt-6.1-sol`,`openai/gpt-6.1-terra`,`openai/gpt-6-sol`,`openai/gpt-6-luna`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-sol`,`openai/gpt-5.6-luna`]},{label:`Anthropic`,models:[`anthropic/claude-fable-5-1`,`anthropic/claude-fable-5`,`anthropic/claude-opus-5-5`,`anthropic/claude-opus-5`,`anthropic/claude-sonnet-5-5`,`anthropic/claude-sonnet-5`,`anthropic/claude-haiku-5-5`,`anthropic/claude-opus-4-8`,`anthropic/claude-opus-4-7`,`anthropic/claude-opus-4-6`,`anthropic/claude-opus-4-5`,`anthropic/claude-sonnet-4-6`,`anthropic/claude-haiku-4-5`]},{label:`Grok`,models:[`grok/grok-4.7`,`grok/grok-4.7-build-fast`,`grok/grok-4.6`,`grok/grok-4.5`]}],wy=Cy.flatMap(e=>e.models),Ty=Y([`low`,`medium`,`high`]),Ey=J({name:W(),description:W().optional(),inputSchema:Ov()}),Dy=J({route:Y([`codex-images`,`codex-responses`]),model:W().optional(),background:W().optional(),quality:W().optional(),size:W().optional(),usage:J({input_tokens:G().nonnegative(),output_tokens:G().nonnegative(),total_tokens:G().nonnegative(),input_tokens_details:J({image_tokens:G().nonnegative(),text_tokens:G().nonnegative(),cached_tokens:G().nonnegative().optional()}).optional(),output_tokens_details:J({image_tokens:G().nonnegative(),text_tokens:G().nonnegative()}).optional()}).optional()}),Oy=Bv(`type`,[J({type:Yv(`text`),text:W()}),J({type:Yv(`tool-call`),toolCallId:W(),toolName:W(),input:W()}),J({type:Yv(`image`),data:W(),mediaType:Y([`image/png`,`image/jpeg`,`image/webp`]).optional(),revisedPrompt:W().nullish(),generation:Dy.optional()})]),ky=Y([`stop`,`tool-calls`]),Ay=Y([`low`,`medium`,`high`]),jy=Y([`auto`,`concise`,`detailed`,`none`]),My=Y([`fast`,`flex`]),Ny=Y([`low`,`medium`,`high`]),Py=Rv([Yv(`auto`),W().regex(/^[1-9]\d*x[1-9]\d*$/).refine(e=>e.split(`x`).every(e=>Number.isSafeInteger(Number(e))),`Image dimensions must be positive safe integers`)]),Fy=J({quality:Ny.optional(),size:Py.optional(),background:Y([`auto`,`opaque`,`transparent`]).optional(),outputFormat:Y([`png`,`jpeg`,`webp`]).optional()}).refine(e=>e.background!==`transparent`||!e.outputFormat||e.outputFormat===`png`,{message:`Transparent image generation only supports PNG output`,path:[`outputFormat`]}),Iy=Bv(`type`,[J({type:Yv(`text`),text:W(),text_elements:Pv(Av()).default([])}),J({type:Yv(`image`),url:W()})]),Ly=G().int().positive().max(18e5),Ry=J({workerId:G(),threadId:W(),epoch:G(),systemHash:W()}),zy=J({requestLogId:G().optional(),threadCoord:Ry.optional()}),By=J({toolCallId:W(),toolName:W().optional(),output:W(),isError:q().optional()}),Vy=J({xai:J({serviceTier:Y([`default`,`priority`]).optional(),parallelToolCalls:q().optional()}).optional()}),Hy=J({xai:J({costInUsdTicks:G().optional(),contextWindow:G().optional()}).optional()});Iv({system:W().optional(),prompt:W(),input:Pv(Iy).optional(),model:W().optional(),timeout:Ly.optional(),jsonSchema:W().optional(),tools:Pv(Ey).optional(),thinking:Rv([Yv(!0),Yv(!1)]).optional(),effort:W().optional(),verbosity:Ay.optional(),reasoningSummary:jy.optional(),serviceTier:My.optional(),history:W().optional(),projectName:W().optional(),tokenName:W().optional(),cacheAffinityKey:W().regex(/^[0-9a-f]{64}$/).optional(),logger:q().optional(),runContext:zy.optional(),toolResults:Pv(By).optional(),imageGeneration:Rv([q(),Yv(`auto`)]).optional(),imageGenerationOptions:Fy.optional(),providerOptions:Vy.optional()});var Uy=J({trigger:Yv(`refusal`),fromModel:W(),toModel:W(),category:W().optional(),explanation:W().optional()}),Wy=Y([`provider`,`pricing_table`,`mixed`]);J({requestLogId:G().optional(),text:W(),content:Pv(Oy),finishReason:ky,tokenName:W().optional(),model:W().optional(),requestedModel:W().optional(),modelFallbacks:Pv(Uy).optional(),usage:J({input_tokens:G(),output_tokens:G(),reasoning_tokens:G(),cache_creation_input_tokens:G(),cache_creation_5m_input_tokens:G().optional(),cache_creation_1h_input_tokens:G().optional(),cache_read_input_tokens:G()}),durationMs:G(),ttftMs:G(),costUsd:G(),costSource:Wy,providerMetadata:Hy.optional(),runContext:zy.optional()}),J({delta:J({text:W()}),toolCall:J({toolCallId:W(),toolName:W(),input:W()}),done:J({requestLogId:G().optional(),text:W(),model:W().optional(),requestedModel:W().optional(),modelFallbacks:Pv(Uy).optional(),tokenName:W().optional(),finishReason:ky,usage:J({input_tokens:G(),output_tokens:G(),reasoning_tokens:G(),cache_creation_input_tokens:G(),cache_creation_5m_input_tokens:G().optional(),cache_creation_1h_input_tokens:G().optional(),cache_read_input_tokens:G()}),durationMs:G(),ttftMs:G(),costUsd:G(),costSource:Wy,providerMetadata:Hy.optional(),content:Pv(Oy),runContext:zy.optional()}),error:J({message:W()})});var Gy=1048576,Ky=19*Gy,qy=`${Ky/Gy} MiB`,Jy=/^data:(image\/(?:png|jpeg|webp));base64,([A-Za-z0-9+/]*={0,2})$/,Yy=/^[A-Za-z0-9+/]*={0,2}$/;function Xy(e){let t=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return Math.floor(e.length*3/4)-t}function Zy(e){let t=0;for(let n of e){let e=n===void 0?void 0:Jy.exec(n)?.[2];e!==void 0&&(t+=Xy(e))}return t}var Qy=`inline images exceed ${qy} in total`;function $y(e){try{return new URL(e).protocol===`https:`}catch{return!1}}var eb=W().min(1).superRefine((e,t)=>{if(e.startsWith(`data:`)){let n=Jy.exec(e)?.[2];n===void 0||n.length%4!=0?t.addIssue({code:`custom`,message:`image data URLs must be base64 image/png, image/jpeg or image/webp`}):Xy(n)>19922944&&t.addIssue({code:`custom`,message:`image data URL exceeds ${qy}`})}else $y(e)||t.addIssue({code:`custom`,message:`image URLs must use https or a data URL`})}),tb=W().regex(/^grok\/[A-Za-z0-9._-]+$/,`model must be grok/<id>`),nb={tokenName:W().optional(),projectName:W().optional(),logger:q().optional()};J({model:tb,prompt:W().min(1),n:G().int().min(1).max(3).optional(),aspectRatio:W().min(1).max(16).optional(),resolution:W().min(1).max(16).optional(),quality:W().min(1).max(16).optional(),outputFormat:Y([`png`,`jpeg`,`webp`]).optional(),referenceImages:Pv(eb).min(1).max(5).optional(),...nb}).refine(e=>Zy(e.referenceImages??[])<=Ky,{message:Qy,path:[`referenceImages`]});var rb=Y([`provider`,`pricing_table`]);J({requestLogId:G().optional(),model:W(),tokenName:W(),images:Pv(J({b64:W(),mimeType:W(),revisedPrompt:W().optional()})),usage:J({imageCount:G(),costInUsdTicks:G().optional()}),costUsd:G().optional(),costSource:rb.optional()}),J({model:tb,prompt:W().min(1),duration:G().int().min(1).max(15).optional(),aspectRatio:W().min(1).max(16).optional(),resolution:Y([`480p`,`720p`,`1080p`]).optional(),image:eb.optional(),lastFrame:eb.optional(),referenceImages:Pv(eb).min(1).max(5).optional(),mode:Y([`reference-to-video`]).optional(),...nb}).refine(e=>e.mode!==`reference-to-video`||e.referenceImages!==void 0,{message:`reference-to-video needs at least one referenceImages entry`,path:[`referenceImages`]}).refine(e=>Zy([e.image,e.lastFrame,...e.referenceImages??[]])<=Ky,{message:Qy,path:[`referenceImages`]}),J({jobHandle:W(),model:W(),requestLogId:G().optional()}),J({jobHandle:W().regex(/^[A-Za-z0-9_-]{22}$/),projectName:W().optional()}),J({status:Y([`pending`,`done`,`failed`]),url:W().optional(),mimeType:Yv(`video/mp4`),durationSec:G().optional(),costInUsdTicks:G().optional(),costUsd:G().optional(),error:W().optional(),requestLogId:G().optional()});var ib=W().regex(/^(grok|openai)\/[A-Za-z0-9._-]+$/,`model must be grok/<id> or openai/<id>`);J({model:ib.optional(),audio:W().min(1).refine(e=>e.length%4==0&&Yy.test(e),`audio must be base64`).refine(e=>Xy(e)<=Ky,`audio exceeds ${qy}`),mediaType:W().regex(/^audio\/[A-Za-z0-9.+-]+$/,`mediaType must be audio/*`),language:W().min(1).max(16).optional(),prompt:W().min(1).max(2e3).optional(),...nb});var ab=J({text:W(),start:G(),end:G()});J({text:W(),language:W().optional(),durationSec:G().optional(),model:W(),tokenName:W(),requestLogId:G().optional(),words:Pv(ab).optional()});var ob=[`marin`,`cedar`,`alloy`,`ash`,`ballad`,`coral`,`echo`,`sage`,`shimmer`,`verse`],sb=[`cove`,`juniper`,`maple`,`spruce`,`ember`,`vale`,`breeze`,`arbor`,`sol`,`aube`,`bubbie`,`haetsal`,`hanul`,`himari`,`leher`,`miko`,`neer`,`porto`,`rindo`,`rio`,`rivage`,`selva`,`sonna`,`tinta`,`viola`],cb={female:[`ara`,`aurora`,`carina`,`celeste`,`eve`,`iris`,`liora`,`luna`,`ursa`],male:[`altair`,`atlas`,`castor`,`cosmo`,`helios`,`helix`,`kepler`,`leo`,`lumen`,`lux`,`naksh`,`orion`,`perseus`,`rex`,`rigel`,`sal`,`sirius`,`zagan`,`zenith`]};J({model:ib.optional(),text:W().min(1).max(15e3),voice:W().min(1).max(64).optional(),language:W().min(1).max(16).optional(),format:Y([`mp3`,`wav`,`pcm`,`mulaw`,`alaw`]).optional(),instructions:W().min(1).max(2e3).optional(),speed:G().min(.7).max(1.5).optional(),withTimestamps:q().optional(),...nb}),J({audio:W(),mimeType:W(),tokenName:W(),requestLogId:G().optional(),audioTimestamps:J({graphChars:Pv(W()),graphTimes:Pv(Wv([G(),G()]))}).optional(),durationSec:G().optional(),timestampsSource:Y([`provider`,`aligned`]).optional(),timestampsError:W().optional()});var lb=J({role:Y([`user`,`assistant`,`developer`]),text:W().min(1)});J({model:Yv(`openai/gpt-live-1`).optional(),sdp:W().startsWith(`v=0`,`sdp must be an SDP offer`).max(65536),voice:W().min(1).max(64).optional(),instructions:W().min(1).max(8e3).optional(),history:Pv(lb).max(128,`history holds at most 128 items`).refine(e=>e.reduce((e,t)=>e+t.text.length,0)<=1e6,`history text exceeds 1,000,000 characters`).optional(),delegation:J({model:W().refine(e=>wy.includes(e),`model must be one of QGRID_MODELS`).optional(),effort:Ty.optional(),webSearch:q().optional()}).optional(),...nb}),J({sdp:W(),callId:W(),model:W(),voice:W(),tokenName:W(),requestLogId:G().optional()}),J({userPrompt:W(),systemPrompt:W().optional(),modelName:W().optional(),effort:W().optional(),projectName:W().optional(),history:W().optional(),isStructured:q().optional(),jsonSchema:W().nullable().optional()}),J({requestLogId:G(),stepIndex:G(),type:Y([`generate`,`tool_call`]),modelName:W().optional(),requestedModelName:W().optional(),fallbackCount:G().optional(),inputTokens:G().optional(),outputTokens:G().optional(),cacheReadTokens:G().optional(),cacheCreationTokens:G().optional(),cacheCreation5mTokens:G().optional(),cacheCreation1hTokens:G().optional(),costUsd:G().optional(),costSource:Wy.optional(),durationMs:G().optional(),ttftMs:G().nullable().optional(),finishReason:W().optional(),reasoningText:W().optional(),reasoningTokens:G().optional(),toolCallIndex:G().optional(),toolCallId:W().optional(),toolName:W().optional(),toolArgs:W().optional(),toolResult:W().optional(),toolDurationMs:G().optional(),error:W().optional()}),J({requestLogId:G(),status:Y([`succeeded`,`error`,`aborted`]),response:W().optional(),tokenName:W().optional(),modelName:W().optional(),requestedModelName:W().optional(),fallbackCount:G().optional(),totalInputTokens:G().optional(),totalOutputTokens:G().optional(),totalCacheReadTokens:G().optional(),totalCacheCreationTokens:G().optional(),totalCacheCreation5mTokens:G().optional(),totalCacheCreation1hTokens:G().optional(),costUsd:G().optional(),costSource:Wy.optional(),totalDurationMs:G().optional(),history:W().optional(),errorMessage:W().optional(),responseJsonOk:q().optional()}),J({token:W(),name:W(),provider:W(),requests:G()}),J({authUrl:W(),mode:Y([`redirect`,`code`])}),J({deviceCode:W(),userCode:W(),verificationUri:W(),verificationUriComplete:W().optional(),expiresIn:G(),interval:G()}),J({status:Y([`pending`,`slow_down`,`added`]),name:W().optional(),intervalSec:G().optional()});var ub=J({utilization:G().nullable(),resetsAt:W().nullable(),windowDurationMins:G().nullable().optional()}).nullable();J({error:W().optional(),provider:W().optional(),fiveHour:ub.optional(),sevenDay:ub.optional(),periodType:W().nullable().optional(),tier:W().nullable().optional(),onDemandExcluded:q().optional(),zdrVideoExcluded:q().optional(),keepaliveApplicable:q().optional()});var db=J({connected:q(),connectedAt:Mv().nullable(),lastReconcileAt:Mv().nullable(),attempt:G()}),fb=Y([`starting`,`ready`,`failed`]);J({status:W(),activeTokens:G(),subscriber:db.nullable(),ready:q(),providers:J({openai:fb,anthropic:fb,grok:fb.optional()})});var pb=n(((e,t)=>{t.exports=TypeError})),mb=n(((e,t)=>{t.exports={}})),hb=n(((e,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype?WeakMap.prototype.has:null,d=typeof WeakSet==`function`&&WeakSet.prototype?WeakSet.prototype.has:null,f=typeof WeakRef==`function`&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,h=Function.prototype.toString,g=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,y=String.prototype.toUpperCase,b=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,C=Array.prototype.join,w=Array.prototype.slice,T=Math.floor,E=typeof BigInt==`function`?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,O=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,k=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,A=typeof Symbol==`function`&&Symbol.toStringTag?Symbol.toStringTag:null,ee=Object.prototype.propertyIsEnumerable,j=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-T(-e):T(e);if(r!==e){var i=String(r),a=_.call(t,i.length+1);return v.call(i,n,`$&_`)+`.`+v.call(v.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return v.call(t,n,`$&_`)}var te=mb(),N=te.custom,ne=pe(N)?N:null,re={__proto__:null,double:`"`,single:`'`},ie={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(ge(s,`quoteStyle`)&&!ge(re,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(ge(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!ge(s,`customInspect`)||s.customInspect;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ge(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ge(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Ee(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?M(t,f):f}if(typeof t==`bigint`){var m=String(t)+`n`;return d?M(t,m):m}var h=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=h&&h>0&&typeof t==`object`)return ce(t)?`[Array]`:`[Object]`;var g=Me(s,r);if(o===void 0)o=[];else if(ye(o,t)>=0)return`[Circular]`;function y(t,n,i){if(n&&(o=w.call(o),o.push(n)),i){var a={depth:s.depth};return ge(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!ue(t)){var x=ve(t),T=Pe(t,y);return`[Function`+(x?`: `+x:` (anonymous)`)+`]`+(T.length>0?` { `+C.call(T,`, `)+` }`:``)}if(pe(t)){var D=k?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):O.call(t);return typeof t==`object`&&!k?Oe(D):D}if(Te(t)){for(var N=`<`+b.call(String(t.nodeName)),ie=t.attributes||[],se=0;se<ie.length;se++)N+=` `+ie[se].name+`=`+ae(oe(ie[se].value),`double`,s);return N+=`>`,t.childNodes&&t.childNodes.length&&(N+=`...`),N+=`</`+b.call(String(t.nodeName))+`>`,N}if(ce(t)){if(t.length===0)return`[]`;var he=Pe(t,y);return g&&!je(he)?`[`+Ne(he,g)+`]`:`[ `+C.call(he,`, `)+` ]`}if(de(t)){var De=Pe(t,y);return!(`cause`in Error.prototype)&&`cause`in t&&!ee.call(t,`cause`)?`{ [`+String(t)+`] `+C.call(S.call(`[cause]: `+y(t.cause),De),`, `)+` }`:De.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+C.call(De,`, `)+` }`}if(typeof t==`object`&&u){if(ne&&typeof t[ne]==`function`&&te)return te(t,{depth:h-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(be(t)){var Fe=[];return a&&a.call(t,function(e,n){Fe.push(y(n,t,!0)+` => `+y(e,t))}),Ae(`Map`,i.call(t),Fe,g)}if(Ce(t)){var Ie=[];return l&&l.call(t,function(e){Ie.push(y(e,t))}),Ae(`Set`,c.call(t),Ie,g)}if(xe(t))return ke(`WeakMap`);if(we(t))return ke(`WeakSet`);if(Se(t))return ke(`WeakRef`);if(F(t))return Oe(y(Number(t)));if(me(t))return Oe(y(E.call(t)));if(fe(t))return Oe(p.call(t));if(P(t))return Oe(y(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!le(t)&&!ue(t)){var Le=Pe(t,y),I=j?j(t)===Object.prototype:t instanceof Object||t.constructor===Object,Re=t instanceof Object?``:`null prototype`,ze=!I&&A&&Object(t)===t&&A in t?_.call(_e(t),8,-1):Re?`Object`:``,L=(I||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``)+(ze||Re?`[`+C.call(S.call([],ze||[],Re||[]),`: `)+`] `:``);return Le.length===0?L+`{}`:g?L+`{`+Ne(Le,g)+`}`:L+`{ `+C.call(Le,`, `)+` }`}return String(t)};function ae(e,t,n){var r=re[n.quoteStyle||t];return r+e+r}function oe(e){return v.call(String(e),/"/g,`"`)}function se(e){return!A||!(typeof e==`object`&&(A in e||e[A]!==void 0))}function ce(e){return _e(e)===`[object Array]`&&se(e)}function le(e){return _e(e)===`[object Date]`&&se(e)}function ue(e){return _e(e)===`[object RegExp]`&&se(e)}function de(e){return _e(e)===`[object Error]`&&se(e)}function P(e){return _e(e)===`[object String]`&&se(e)}function F(e){return _e(e)===`[object Number]`&&se(e)}function fe(e){return _e(e)===`[object Boolean]`&&se(e)}function pe(e){if(k)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!O)return!1;try{return O.call(e),!0}catch{}return!1}function me(e){if(!e||typeof e!=`object`||!E)return!1;try{return E.call(e),!0}catch{}return!1}var he=Object.prototype.hasOwnProperty||function(e){return e in this};function ge(e,t){return he.call(e,t)}function _e(e){return m.call(e)}function ve(e){if(e.name)return e.name;var t=g.call(h.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function ye(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function be(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function xe(e){if(!u||!e||typeof e!=`object`)return!1;try{u.call(e,u);try{d.call(e,d)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Se(e){if(!f||!e||typeof e!=`object`)return!1;try{return f.call(e),!0}catch{}return!1}function Ce(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function we(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{u.call(e,u)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Te(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement||typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function Ee(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Ee(_.call(e,0,t.maxStringLength),t)+r}var i=ie[t.quoteStyle||`single`];return i.lastIndex=0,ae(v.call(v.call(e,i,`\\$1`),/[\x00-\x1f]/g,De),`single`,t)}function De(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+y.call(t.toString(16))}function Oe(e){return`Object(`+e+`)`}function ke(e){return e+` { ? }`}function Ae(e,t,n,r){var i=r?Ne(n,r):C.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function je(e){for(var t=0;t<e.length;t++)if(ye(e[t],`
|
|
84
|
+
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);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ag(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Ag(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var jg=new Set([`type`,`properties`,`required`,`additionalProperties`]),Mg=[`oneOf`,`anyOf`];function Ng(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Pg(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!jg.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Ng(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Tu(n,r,e.length===1?e[0]:Pg(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Ng(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Fg(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of jg)if(t in e)return;let n=t.filter(e=>Mg.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Pg(t);else{let e=n[0],i=Mg.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Pg([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,wg(e,r))}function Ig(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)):wg(i,s),wg(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??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Ag(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Fg(e)}}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)}wg(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Tu(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:zg(t,`input`,e.processors),output:zg(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Lg(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 Lg(r.element,n);if(r.type===`set`)return Lg(r.valueType,n);if(r.type===`lazy`)return Lg(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`||r.type===`catch`)return Lg(r.innerType,n);if(r.type===`intersection`)return Lg(r.left,n)||Lg(r.right,n);if(r.type===`record`||r.type===`map`)return Lg(r.keyType,n)||Lg(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Lg(r.in,n)||Lg(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Lg(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Lg(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Lg(e,n))return!0;return!!(r.rest&&Lg(r.rest,n))}return!1}var Rg=(e,t={})=>n=>{let r=Tg({...n,processors:t});return Dg(e,r),kg(r,e),Ig(r,e)},zg=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Tg({...i??{},target:a,io:t,processors:n});return Dg(e,o),kg(o,e),Ig(o,e)},Bg=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Vg=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Hg=(e,t)=>{Bg(e,`minimum`,t),Vg(e,`maximum`,t)},Ug=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Wg=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Gg=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Kg=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},qg=(e,t)=>Bg(e,`minimum`,t.minimum),Jg=(e,t)=>Vg(e,`maximum`,t.maximum),Yg=e=>(t,n)=>{Kg(t,n.format);let[r,i]=e[n.format];Bg(t,`minimum`,r),Vg(t,`maximum`,i)},Xg={greater_than:(e,t)=>Bg(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Vg(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ug(e,t.value),number_format:Yg(Gu),bigint_format:Yg(Ku),min_length:qg,max_length:Jg,length_equals:(e,t)=>Hg(e,t.length),min_size:qg,max_size:Jg,size_equals:(e,t)=>Hg(e,t.size),string_format:(e,t)=>{Kg(e,t.format),t.pattern&&Wg(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Gg(e,t.mime)};function Zg(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Xg[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Bg(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Bg(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Vg(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Vg(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ug(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Gg(t,i.mime);for(let e of i.patterns??[])Wg(t,e);return t}var Qg={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},$g=new Map([[Gp,Ef],[qp,Df]]),e_=e=>$g.get(e)??e,t_=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Zg(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Qg[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(e_);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},n_=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Zg(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Eg(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},r_=(e,t,n,r)=>{n.type=`boolean`},i_=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},a_=(e,t,n,r)=>{n.not={}},o_=(e,t,n,r)=>{Eg(e,t,n,r,`Date cannot be represented in JSON Schema`)},s_=(e,t,n,r)=>{let i=e._zod.def,a=hu(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},c_=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Eg(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Eg(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},l_=(e,t,n,r)=>{Eg(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},u_=(e,t,n,r)=>{Eg(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},d_=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Zg(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Dg(a.element,t,{...r,path:[...r.path,`items`]})};function f_(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?f_(t.out):t.type===`catch`?f_(t.innerType):e._zod.optin}var p_=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Eg(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Tu(i.properties,e,Dg(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?f_(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Dg(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},m_=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Dg(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},h_=(e,t,n,r)=>{let i=e._zod.def,a=Dg(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Dg(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},g_=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>Dg(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?Dg(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?f_(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Zg(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function __(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=__(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>__(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Rf:Lf).source)),p}var v_=new WeakMap;function y_(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of v_.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=__(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var b_=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Zg(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Dg(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)Tu(i.patternProperties,e_(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=Dg(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=v_.get(t);n||(n=[],v_.set(t,n),t.deferred.push(()=>y_(t))),n.push(e)}i.additionalProperties=Dg(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&f_(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},x_=(e,t,n,r)=>{let i=e._zod.def,a=Dg(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`}]},S_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},C_=Symbol();function w_(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Eg(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),C_):JSON.parse(o)}var T_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=w_(i.defaultValue,e,t,n,r);o!==C_&&(n.default=o)},E_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=w_(i.defaultValue,e,t,n,r);o!==C_&&(n._prefault=o)},D_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Eg(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},O_=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Dg(o,t,r);let s=t.seen.get(e);s.ref=o},k_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},A_=(e,t,n,r)=>{let i=e._zod.def;Dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},j_=(e,t,n,r)=>{let i=e._zod.innerType;Dg(i,t,r);let a=t.seen.get(e);a.ref=i},M_=new WeakSet([Object.prototype,Error.prototype]);function N_(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var P_=U(`ZodError`,(e,t)=>{zd.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);M_.has(n)||(M_.add(n),N_(n,`format`,e=>t=>Hd(e,t)),N_(n,`flatten`,e=>t=>Vd(e,t)),N_(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_u,2)}),N_(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_u,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),F_=Wd(P_),I_=Gd(P_),L_=Kd(P_),R_=Jd(P_),z_=ef(P_),B_=tf(P_),V_=nf(P_),H_=rf(P_),U_=af(P_),W_=of(P_),G_=sf(P_),K_=cf(P_);function q_(){Md.localeError||Nd(ph())}function J_(){Md.memoizer||Nd({memoizer:uh()})}var Y_=U(`ZodType`,(e,t)=>(q_(),lp.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Mu(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Hu(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(yy(e,t))},superRefine(e,t){return this.check(by(e,t))},overwrite(e){return this.check(pg(e))},optional(){return Qv(this)},exactOptional(){return ey(this)},nullable(){return ny(this)},nullish(){return Qv(ny(this))},nonoptional(e){return cy(this,e)},array(){return q(this)},or(e){return Rv([this,e])},and(e){return Hv(this,e)},transform(e){return fy(this,Xv(e))},default(e){return iy(this,e)},prefault(e){return oy(this,e)},catch(e){return uy(this,e)},pipe(e){return fy(this,e)},readonly(){return my(this)},describe(e){let t=this.clone();return _h.add(t,{description:e}),t},meta(...e){if(e.length===0)return _h.get(this);let t=this.clone();return _h.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return gd(this,`~standard`,{...fp(this),jsonSchema:{input:zg(this,`input`),output:zg(this,`output`)}})},set"~standard"(e){hd(this,`~standard`,e)},parse:function e(t,n){return F_(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await I_(this,t,n,{callee:e})},safeParse(e,t){return L_(this,e,t)},async safeParseAsync(e,t){return R_(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){hd(this,`spa`,e)},validate(e,t){return Zd(this,e,t)},validateAsync(e,t){return $d(this,e,t)},encode:function e(t,n){return z_(this,t,n,{callee:e})},decode:function e(t,n){return B_(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await V_(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await H_(this,t,n,{callee:e})},safeEncode(e,t){return U_(this,e,t)},safeDecode(e,t){return W_(this,e,t)},async safeEncodeAsync(e,t){return G_(this,e,t)},async safeDecodeAsync(e,t){return K_(this,e,t)},toJSONSchema(e){return Rg(this,{})(e)},get description(){return _h.get(this)?.description},get _def(){return this._zod.def}}),X_=U(`_ZodString`,(e,t)=>{pp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t_(e,t,n,r)},_d({format:e=>Zg(e).format??null,minLength:e=>Zg(e).minimum??null,maxLength:e=>Zg(e).maximum??null},{regex(...e){return this.check(sg(...e))},includes(...e){return this.check(ug(...e))},startsWith(...e){return this.check(dg(...e))},endsWith(...e){return this.check(fg(...e))},min(...e){return this.check(ag(...e))},max(...e){return this.check(ig(...e))},length(...e){return this.check(og(...e))},nonempty(...e){return this.check(ag(1,...e))},lowercase(e){return this.check(cg(e))},uppercase(e){return this.check(lg(e))},trim(){return this.check(hg())},normalize(...e){return this.check(mg(...e))},toLowerCase(){return this.check(gg())},toUpperCase(){return this.check(_g())},slugify(){return this.check(vg())}})),Z_=U(`ZodString`,(e,t)=>{pp.init(e,t),X_.init(e,t)},{email(e){return this.check(bh(rv,e))},url(e){return this.check(Eh(ov,e))},jwt(e){return this.check(Vh(xv,e))},emoji(e){return this.check(Dh(sv,e))},guid(e){return this.check(xh(iv,e))},uuid(e){return this.check(Sh(av,e))},uuidv4(e){return this.check(Ch(av,e))},uuidv6(e){return this.check(wh(av,e))},uuidv7(e){return this.check(Th(av,e))},nanoid(e){return this.check(Oh(cv,e))},cuid(e){return this.check(kh(lv,e))},cuid2(e){return this.check(Ah(uv,e))},ulid(e){return this.check(jh(dv,e))},base64(e){return this.check(Rh(vv,e))},base64url(e){return this.check(zh(yv,e))},xid(e){return this.check(Mh(fv,e))},ksuid(e){return this.check(Nh(pv,e))},ipv4(e){return this.check(Ph(mv,e))},ipv6(e){return this.check(Fh(hv,e))},cidrv4(e){return this.check(Ih(gv,e))},cidrv6(e){return this.check(Lh(_v,e))},e164(e){return this.check(Bh(bv,e))},datetime(e){return this.check(Hh($_,e))},date(e){return this.check(Uh(ev,e))},time(e){return this.check(Wh(tv,e))},duration(e){return this.check(Gh(nv,e))}});function W(e){return yh(Z_,e)}var Q_=U(`ZodStringFormat`,(e,t)=>{mp.init(e,t),X_.init(e,t)}),$_=U(`ZodISODateTime`,(e,t)=>{Np.init(e,t),Q_.init(e,t)}),ev=U(`ZodISODate`,(e,t)=>{Pp.init(e,t),Q_.init(e,t)}),tv=U(`ZodISOTime`,(e,t)=>{Fp.init(e,t),Q_.init(e,t)}),nv=U(`ZodISODuration`,(e,t)=>{Ip.init(e,t),Q_.init(e,t)}),rv=U(`ZodEmail`,(e,t)=>{_p.init(e,t),Q_.init(e,t)}),iv=U(`ZodGUID`,(e,t)=>{hp.init(e,t),Q_.init(e,t)}),av=U(`ZodUUID`,(e,t)=>{gp.init(e,t),Q_.init(e,t)}),ov=U(`ZodURL`,(e,t)=>{Tp.init(e,t),Q_.init(e,t)}),sv=U(`ZodEmoji`,(e,t)=>{Ep.init(e,t),Q_.init(e,t)}),cv=U(`ZodNanoID`,(e,t)=>{Dp.init(e,t),Q_.init(e,t)}),lv=U(`ZodCUID`,(e,t)=>{Op.init(e,t),Q_.init(e,t)}),uv=U(`ZodCUID2`,(e,t)=>{kp.init(e,t),Q_.init(e,t)}),dv=U(`ZodULID`,(e,t)=>{Ap.init(e,t),Q_.init(e,t)}),fv=U(`ZodXID`,(e,t)=>{jp.init(e,t),Q_.init(e,t)}),pv=U(`ZodKSUID`,(e,t)=>{Mp.init(e,t),Q_.init(e,t)}),mv=U(`ZodIPv4`,(e,t)=>{Lp.init(e,t),Q_.init(e,t)}),hv=U(`ZodIPv6`,(e,t)=>{Bp.init(e,t),Q_.init(e,t)}),gv=U(`ZodCIDRv4`,(e,t)=>{Vp.init(e,t),Q_.init(e,t)}),_v=U(`ZodCIDRv6`,(e,t)=>{Up.init(e,t),Q_.init(e,t)}),vv=U(`ZodBase64`,(e,t)=>{Kp.init(e,t),Q_.init(e,t)}),yv=U(`ZodBase64URL`,(e,t)=>{Yp.init(e,t),Q_.init(e,t)}),bv=U(`ZodE164`,(e,t)=>{Xp.init(e,t),Q_.init(e,t)}),xv=U(`ZodJWT`,(e,t)=>{Qp.init(e,t),Q_.init(e,t)}),Sv=U(`ZodNumber`,(e,t)=>{$p.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n_(e,t,n,r),e.isFinite=!0},_d({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Zg(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Zg(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Zg(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Zg(e).format??null},{gt(e,t){return this.check(tg(e,t))},gte(e,t){return this.check(ng(e,t))},min(e,t){return this.check(ng(e,t))},lt(e,t){return this.check($h(e,t))},lte(e,t){return this.check(eg(e,t))},max(e,t){return this.check(eg(e,t))},int(e){return this.check(K(e))},safe(e){return this.check(K(e))},positive(e){return this.check(tg(0,e))},nonnegative(e){return this.check(ng(0,e))},negative(e){return this.check($h(0,e))},nonpositive(e){return this.check(eg(0,e))},multipleOf(e,t){return this.check(rg(e,t))},step(e,t){return this.check(rg(e,t))},finite(){return this}}));function G(e){return Kh(Sv,e)}var Cv=U(`ZodNumberFormat`,(e,t)=>{em.init(e,t),Sv.init(e,t)});function K(e){return qh(Cv,e)}var wv=U(`ZodBoolean`,(e,t)=>{tm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r_(e,t,n,r)});function Tv(e){return Jh(wv,e)}var Ev=U(`ZodNull`,(e,t)=>{nm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i_(e,t,n,r)});function Dv(e){return Yh(Ev,e)}var Ov=U(`ZodUnknown`,(e,t)=>{rm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function kv(){return Xh(Ov)}var Av=U(`ZodNever`,(e,t)=>{im.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a_(e,t,n,r)});function jv(e){return Zh(Av,e)}var Mv=U(`ZodDate`,(e,t)=>{am.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o_(e,t,n,r),e.min=(t,n)=>e.check(ng(t,n)),e.max=(t,n)=>e.check(eg(t,n))},_d({minDate:e=>{let{minimum:t}=Zg(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Zg(e);return t?new Date(t):null}},{}));function Nv(e){return Qh(Mv,e)}var Pv=U(`ZodArray`,(e,t)=>{J_(),lm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d_(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ag(e,t))},nonempty(e){return this.check(ag(1,e))},max(e,t){return this.check(ig(e,t))},length(e,t){return this.check(og(e,t))},unwrap(){return this.element}});function q(e,t){return yg(Pv,e,t)}var Fv=U(`ZodObject`,(e,t)=>{J_(),hm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p_(e,t,n,r),Cd(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Y(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Mu(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Mu(this._zod.def,{catchall:kv()}))},loose(){return this.clone(Mu(this._zod.def,{catchall:kv()}))},strict(){return this.clone(Mu(this._zod.def,{catchall:jv()}))},strip(){return this.clone(Mu(this._zod.def,{catchall:void 0}))},extend(e){return Xu(this,e)},safeExtend(e){return Qu(this,e)},merge(e){return $u(this,e)},pick(e){return qu(this,e)},omit(e){return Yu(this,e)},partial(...e){return ed(Zv,this,e[0])},exactPartial(...e){return ed($v,this,e[0],`exactPartial`)},required(...e){return td(sy,this,e[0])}});function J(e,t){return new Fv({type:`object`,shape:e??{},...V(t)})}function Iv(e,t){return new Fv({type:`object`,shape:e,catchall:kv(),...V(t)})}var Lv=U(`ZodUnion`,(e,t)=>{_m.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m_(e,t,n,r),e.options=t.options});function Rv(e,t){return new Lv({type:`union`,options:e,...V(t)})}var zv=U(`ZodDiscriminatedUnion`,(e,t)=>{Lv.init(e,t),ym.init(e,t)});function Bv(e,t,n){return new zv({type:`union`,options:t,discriminator:e,...V(n)})}var Vv=U(`ZodIntersection`,(e,t)=>{bm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h_(e,t,n,r)});function Hv(e,t){return new Vv({type:`intersection`,left:e,right:t})}var Uv=U(`ZodTuple`,(e,t)=>{J_(),Cm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g_(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new Zv({type:`optional`,innerType:e}))})}});function Wv(e,t,n){let r=t instanceof lp;return new Uv({type:`tuple`,items:e,rest:r?t:null,...V(r?n:t)})}var Gv=U(`ZodRecord`,(e,t)=>{J_(),Dm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>b_(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Kv(e,t,n){return!t||!t._zod?new Gv({type:`record`,keyType:W(),valueType:e,...V(t)}):new Gv({type:`record`,keyType:e,valueType:t,...V(n)})}var qv=U(`ZodEnum`,(e,t)=>{Om.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s_(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];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 qv({...t,checks:[],...V(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 qv({...t,checks:[],...V(r),entries:i})}});function Y(e,t){return new qv({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...V(t)})}var Jv=U(`ZodLiteral`,(e,t)=>{km.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c_(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function X(e,t){return new Jv({type:`literal`,values:Array.isArray(e)?e:[e],...V(t)})}var Yv=U(`ZodTransform`,(e,t)=>{J_(),Am.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u_(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new jd(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(pd(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(pd(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Xv(e){return new Yv({type:`transform`,transform:e})}var Zv=U(`ZodOptional`,(e,t)=>{Mm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qv(e){return new Zv({type:`optional`,innerType:e})}var $v=U(`ZodExactOptional`,(e,t)=>{Nm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ey(e){return new $v({type:`optional`,innerType:e})}var ty=U(`ZodNullable`,(e,t)=>{Pm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>x_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ny(e){return new ty({type:`nullable`,innerType:e})}var ry=U(`ZodDefault`,(e,t)=>{Fm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>T_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function iy(e,t){return new ry({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():zu(t)}})}var ay=U(`ZodPrefault`,(e,t)=>{Lm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>E_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oy(e,t){return new ay({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():zu(t)}})}var sy=U(`ZodNonOptional`,(e,t)=>{Rm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cy(e,t){return new sy({type:`nonoptional`,innerType:e,...V(t)})}var ly=U(`ZodCatch`,(e,t)=>{Vm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>D_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uy(e,t){return new ly({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Td(t)})}var dy=U(`ZodPipe`,(e,t)=>{Hm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>O_(e,t,n,r),e.in=t.in,e.out=t.out});function fy(e,t){return new dy({type:`pipe`,in:e,out:t})}var py=U(`ZodReadonly`,(e,t)=>{Wm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function my(e){return new py({type:`readonly`,innerType:e})}var hy=U(`ZodLazy`,(e,t)=>{Km.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j_(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function gy(e){return new hy({type:`lazy`,getter:e})}var _y=U(`ZodCustom`,(e,t)=>{qm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l_(e,t,n,r)});function vy(e,t){return bg(_y,e??(()=>!0),t)}function yy(e,t={}){return xg(_y,e,t)}function by(e,t){return Sg(e,t)}function xy(e){let t=gy(()=>Rv([W(e),G(),Tv(),Dv(),q(t),Kv(W(),t)]));return t}var Sy=[{label:`OpenAI`,models:[`openai/gpt-6-astra`,`openai/gpt-6.1-sol`,`openai/gpt-6.1-terra`,`openai/gpt-6-sol`,`openai/gpt-6-luna`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-sol`,`openai/gpt-5.6-luna`]},{label:`Anthropic`,models:[`anthropic/claude-fable-5-1`,`anthropic/claude-fable-5`,`anthropic/claude-opus-5-5`,`anthropic/claude-opus-5`,`anthropic/claude-sonnet-5-5`,`anthropic/claude-sonnet-5`,`anthropic/claude-haiku-5-5`,`anthropic/claude-opus-4-8`,`anthropic/claude-opus-4-7`,`anthropic/claude-opus-4-6`,`anthropic/claude-opus-4-5`,`anthropic/claude-sonnet-4-6`,`anthropic/claude-haiku-4-5`]},{label:`Grok`,models:[`grok/grok-4.7`,`grok/grok-4.7-build-fast`,`grok/grok-4.6`,`grok/grok-4.5`]}],Cy=Sy.flatMap(e=>e.models),wy=Y([`low`,`medium`,`high`]),Ty=J({name:W(),description:W().optional(),inputSchema:kv()}),Ey=J({route:Y([`codex-images`,`codex-responses`]),model:W().optional(),background:W().optional(),quality:W().optional(),size:W().optional(),usage:J({input_tokens:G().nonnegative(),output_tokens:G().nonnegative(),total_tokens:G().nonnegative(),input_tokens_details:J({image_tokens:G().nonnegative(),text_tokens:G().nonnegative(),cached_tokens:G().nonnegative().optional()}).optional(),output_tokens_details:J({image_tokens:G().nonnegative(),text_tokens:G().nonnegative()}).optional()}).optional()}),Dy=Bv(`type`,[J({type:X(`text`),text:W()}),J({type:X(`tool-call`),toolCallId:W(),toolName:W(),input:W()}),J({type:X(`image`),data:W(),mediaType:Y([`image/png`,`image/jpeg`,`image/webp`]).optional(),revisedPrompt:W().nullish(),generation:Ey.optional()})]),Oy=Y([`stop`,`tool-calls`]),ky=Y([`low`,`medium`,`high`]),Ay=Y([`auto`,`concise`,`detailed`,`none`]),jy=Y([`fast`,`flex`]),My=Y([`low`,`medium`,`high`]),Ny=Rv([X(`auto`),W().regex(/^[1-9]\d*x[1-9]\d*$/).refine(e=>e.split(`x`).every(e=>Number.isSafeInteger(Number(e))),`Image dimensions must be positive safe integers`)]),Py=J({quality:My.optional(),size:Ny.optional(),background:Y([`auto`,`opaque`,`transparent`]).optional(),outputFormat:Y([`png`,`jpeg`,`webp`]).optional()}).refine(e=>e.background!==`transparent`||!e.outputFormat||e.outputFormat===`png`,{message:`Transparent image generation only supports PNG output`,path:[`outputFormat`]}),Fy=Bv(`type`,[J({type:X(`text`),text:W(),text_elements:q(jv()).default([])}),J({type:X(`image`),url:W()})]),Iy=G().int().positive().max(18e5),Ly=J({workerId:G(),threadId:W(),epoch:G(),systemHash:W()}),Ry=J({requestLogId:G().optional(),threadCoord:Ly.optional()}),zy=J({toolCallId:W(),toolName:W().optional(),output:W(),isError:Tv().optional()}),By=J({xai:J({serviceTier:Y([`default`,`priority`]).optional(),parallelToolCalls:Tv().optional()}).optional()}),Vy=J({xai:J({costInUsdTicks:G().optional(),contextWindow:G().optional()}).optional()});Iv({system:W().optional(),prompt:W(),input:q(Fy).optional(),model:W().optional(),timeout:Iy.optional(),jsonSchema:W().optional(),tools:q(Ty).optional(),thinking:Rv([X(!0),X(!1)]).optional(),effort:W().optional(),verbosity:ky.optional(),reasoningSummary:Ay.optional(),serviceTier:jy.optional(),history:W().optional(),projectName:W().optional(),tokenName:W().optional(),cacheAffinityKey:W().regex(/^[0-9a-f]{64}$/).optional(),logger:Tv().optional(),runContext:Ry.optional(),toolResults:q(zy).optional(),imageGeneration:Rv([Tv(),X(`auto`)]).optional(),imageGenerationOptions:Py.optional(),providerOptions:By.optional()});var Hy=J({trigger:X(`refusal`),fromModel:W(),toModel:W(),category:W().optional(),explanation:W().optional()}),Uy=Y([`provider`,`pricing_table`,`mixed`]);J({requestLogId:G().optional(),text:W(),content:q(Dy),finishReason:Oy,tokenName:W().optional(),model:W().optional(),requestedModel:W().optional(),modelFallbacks:q(Hy).optional(),usage:J({input_tokens:G(),output_tokens:G(),reasoning_tokens:G(),cache_creation_input_tokens:G(),cache_creation_5m_input_tokens:G().optional(),cache_creation_1h_input_tokens:G().optional(),cache_read_input_tokens:G()}),durationMs:G(),ttftMs:G(),costUsd:G(),costSource:Uy,providerMetadata:Vy.optional(),runContext:Ry.optional()}),J({delta:J({text:W()}),toolCall:J({toolCallId:W(),toolName:W(),input:W()}),done:J({requestLogId:G().optional(),text:W(),model:W().optional(),requestedModel:W().optional(),modelFallbacks:q(Hy).optional(),tokenName:W().optional(),finishReason:Oy,usage:J({input_tokens:G(),output_tokens:G(),reasoning_tokens:G(),cache_creation_input_tokens:G(),cache_creation_5m_input_tokens:G().optional(),cache_creation_1h_input_tokens:G().optional(),cache_read_input_tokens:G()}),durationMs:G(),ttftMs:G(),costUsd:G(),costSource:Uy,providerMetadata:Vy.optional(),content:q(Dy),runContext:Ry.optional()}),error:J({message:W()})});var Wy=1048576,Gy=19*Wy,Ky=`${Gy/Wy} MiB`,qy=/^data:(image\/(?:png|jpeg|webp));base64,([A-Za-z0-9+/]*={0,2})$/,Jy=/^[A-Za-z0-9+/]*={0,2}$/;function Yy(e){let t=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return Math.floor(e.length*3/4)-t}function Xy(e){let t=0;for(let n of e){let e=n===void 0?void 0:qy.exec(n)?.[2];e!==void 0&&(t+=Yy(e))}return t}var Zy=`inline images exceed ${Ky} in total`;function Qy(e){try{return new URL(e).protocol===`https:`}catch{return!1}}var $y=W().min(1).superRefine((e,t)=>{if(e.startsWith(`data:`)){let n=qy.exec(e)?.[2];n===void 0||n.length%4!=0?t.addIssue({code:`custom`,message:`image data URLs must be base64 image/png, image/jpeg or image/webp`}):Yy(n)>19922944&&t.addIssue({code:`custom`,message:`image data URL exceeds ${Ky}`})}else Qy(e)||t.addIssue({code:`custom`,message:`image URLs must use https or a data URL`})}),eb=W().regex(/^grok\/[A-Za-z0-9._-]+$/,`model must be grok/<id>`),tb={tokenName:W().optional(),projectName:W().optional(),logger:Tv().optional()};J({model:eb,prompt:W().min(1),n:G().int().min(1).max(3).optional(),aspectRatio:W().min(1).max(16).optional(),resolution:W().min(1).max(16).optional(),quality:W().min(1).max(16).optional(),outputFormat:Y([`png`,`jpeg`,`webp`]).optional(),referenceImages:q($y).min(1).max(5).optional(),...tb}).refine(e=>Xy(e.referenceImages??[])<=Gy,{message:Zy,path:[`referenceImages`]});var nb=Y([`provider`,`pricing_table`]);J({requestLogId:G().optional(),model:W(),tokenName:W(),images:q(J({b64:W(),mimeType:W(),revisedPrompt:W().optional()})),usage:J({imageCount:G(),costInUsdTicks:G().optional()}),costUsd:G().optional(),costSource:nb.optional()}),J({model:eb,prompt:W().min(1),duration:G().int().min(1).max(15).optional(),aspectRatio:W().min(1).max(16).optional(),resolution:Y([`480p`,`720p`,`1080p`]).optional(),image:$y.optional(),lastFrame:$y.optional(),referenceImages:q($y).min(1).max(5).optional(),mode:Y([`reference-to-video`]).optional(),...tb}).refine(e=>e.mode!==`reference-to-video`||e.referenceImages!==void 0,{message:`reference-to-video needs at least one referenceImages entry`,path:[`referenceImages`]}).refine(e=>Xy([e.image,e.lastFrame,...e.referenceImages??[]])<=Gy,{message:Zy,path:[`referenceImages`]}),J({jobHandle:W(),model:W(),requestLogId:G().optional()}),J({jobHandle:W().regex(/^[A-Za-z0-9_-]{22}$/),projectName:W().optional()}),J({status:Y([`pending`,`done`,`failed`]),url:W().optional(),mimeType:X(`video/mp4`),durationSec:G().optional(),costInUsdTicks:G().optional(),costUsd:G().optional(),error:W().optional(),requestLogId:G().optional()});var rb=W().regex(/^(grok|openai)\/[A-Za-z0-9._-]+$/,`model must be grok/<id> or openai/<id>`);J({model:rb.optional(),audio:W().min(1).refine(e=>e.length%4==0&&Jy.test(e),`audio must be base64`).refine(e=>Yy(e)<=Gy,`audio exceeds ${Ky}`),mediaType:W().regex(/^audio\/[A-Za-z0-9.+-]+$/,`mediaType must be audio/*`),language:W().min(1).max(16).optional(),prompt:W().min(1).max(2e3).optional(),...tb});var ib=J({text:W(),start:G(),end:G()});J({text:W(),language:W().optional(),durationSec:G().optional(),model:W(),tokenName:W(),requestLogId:G().optional(),words:q(ib).optional()});var ab=[`marin`,`cedar`,`alloy`,`ash`,`ballad`,`coral`,`echo`,`sage`,`shimmer`,`verse`],ob=[`cove`,`juniper`,`maple`,`spruce`,`ember`,`vale`,`breeze`,`arbor`,`sol`,`aube`,`bubbie`,`haetsal`,`hanul`,`himari`,`leher`,`miko`,`neer`,`porto`,`rindo`,`rio`,`rivage`,`selva`,`sonna`,`tinta`,`viola`],sb={female:[`ara`,`aurora`,`carina`,`celeste`,`eve`,`iris`,`liora`,`luna`,`ursa`],male:[`altair`,`atlas`,`castor`,`cosmo`,`helios`,`helix`,`kepler`,`leo`,`lumen`,`lux`,`naksh`,`orion`,`perseus`,`rex`,`rigel`,`sal`,`sirius`,`zagan`,`zenith`]};J({model:rb.optional(),text:W().min(1).max(15e3),voice:W().min(1).max(64).optional(),language:W().min(1).max(16).optional(),format:Y([`mp3`,`wav`,`pcm`,`mulaw`,`alaw`]).optional(),instructions:W().min(1).max(2e3).optional(),speed:G().min(.7).max(1.5).optional(),withTimestamps:Tv().optional(),...tb}),J({audio:W(),mimeType:W(),tokenName:W(),requestLogId:G().optional(),audioTimestamps:J({graphChars:q(W()),graphTimes:q(Wv([G(),G()]))}).optional(),durationSec:G().optional(),timestampsSource:Y([`provider`,`aligned`]).optional(),timestampsError:W().optional()});var cb=J({role:Y([`user`,`assistant`,`developer`]),text:W().min(1)});J({model:X(`openai/gpt-live-1`).optional(),sdp:W().startsWith(`v=0`,`sdp must be an SDP offer`).max(65536),voice:W().min(1).max(64).optional(),instructions:W().min(1).max(8e3).optional(),history:q(cb).max(128,`history holds at most 128 items`).refine(e=>e.reduce((e,t)=>e+t.text.length,0)<=1e6,`history text exceeds 1,000,000 characters`).optional(),delegation:J({model:W().refine(e=>Cy.includes(e),`model must be one of QGRID_MODELS`).optional(),effort:wy.optional(),webSearch:Tv().optional()}).optional(),...tb}),J({sdp:W(),callId:W(),model:W(),voice:W(),tokenName:W(),requestLogId:G().optional()}),J({userPrompt:W(),systemPrompt:W().optional(),modelName:W().optional(),effort:W().optional(),projectName:W().optional(),history:W().optional(),isStructured:Tv().optional(),jsonSchema:W().nullable().optional()}),J({requestLogId:G(),stepIndex:G(),type:Y([`generate`,`tool_call`]),modelName:W().optional(),requestedModelName:W().optional(),fallbackCount:G().optional(),inputTokens:G().optional(),outputTokens:G().optional(),cacheReadTokens:G().optional(),cacheCreationTokens:G().optional(),cacheCreation5mTokens:G().optional(),cacheCreation1hTokens:G().optional(),costUsd:G().optional(),costSource:Uy.optional(),durationMs:G().optional(),ttftMs:G().nullable().optional(),finishReason:W().optional(),reasoningText:W().optional(),reasoningTokens:G().optional(),toolCallIndex:G().optional(),toolCallId:W().optional(),toolName:W().optional(),toolArgs:W().optional(),toolResult:W().optional(),toolDurationMs:G().optional(),error:W().optional()}),J({requestLogId:G(),status:Y([`succeeded`,`error`,`aborted`]),response:W().optional(),tokenName:W().optional(),modelName:W().optional(),requestedModelName:W().optional(),fallbackCount:G().optional(),totalInputTokens:G().optional(),totalOutputTokens:G().optional(),totalCacheReadTokens:G().optional(),totalCacheCreationTokens:G().optional(),totalCacheCreation5mTokens:G().optional(),totalCacheCreation1hTokens:G().optional(),costUsd:G().optional(),costSource:Uy.optional(),totalDurationMs:G().optional(),history:W().optional(),errorMessage:W().optional(),responseJsonOk:Tv().optional()}),J({token:W(),name:W(),provider:W(),requests:G()}),J({authUrl:W(),mode:Y([`redirect`,`code`])}),J({deviceCode:W(),userCode:W(),verificationUri:W(),verificationUriComplete:W().optional(),expiresIn:G(),interval:G()}),J({status:Y([`pending`,`slow_down`,`added`]),name:W().optional(),intervalSec:G().optional()});var lb=J({utilization:G().nullable(),resetsAt:W().nullable(),windowDurationMins:G().nullable().optional()}).nullable();J({error:W().optional(),provider:W().optional(),fiveHour:lb.optional(),sevenDay:lb.optional(),periodType:W().nullable().optional(),tier:W().nullable().optional(),onDemandExcluded:Tv().optional(),zdrVideoExcluded:Tv().optional(),keepaliveApplicable:Tv().optional()});var ub=J({connected:Tv(),connectedAt:Nv().nullable(),lastReconcileAt:Nv().nullable(),attempt:G()}),db=Y([`starting`,`ready`,`failed`]);J({status:W(),activeTokens:G(),subscriber:ub.nullable(),ready:Tv(),providers:J({openai:db,anthropic:db,grok:db.optional()})});var fb=`gpt-6-luna`,pb=/^data:image\/(?:png|jpeg|webp|gif);base64,([A-Za-z0-9+/]*={0,2})$/;function mb(e){let t=pb.exec(e)?.[1];return t===void 0?0:Yy(t)}var hb=W().superRefine((e,t)=>{if(/^https?:\/\//.test(e))return;let n=pb.exec(e)?.[1];n===void 0||n.length===0||n.length%4!=0?t.addIssue({code:`custom`,message:`Expected an HTTP(S) image URL or a base64 PNG/JPEG/WebP/GIF data URL`}):Yy(n)>19922944&&t.addIssue({code:`custom`,message:`image data URL exceeds ${Ky}`})}),gb=Bv(`type`,[J({type:X(`input_text`),text:W()}),J({type:X(`input_json`),data:Rv([Kv(W(),xy()),q(Kv(W(),xy())).min(1)])}),J({type:X(`input_image`),image_url:hb,detail:Y([`low`,`high`,`auto`,`original`]).optional()})]),_b={name:W().min(1),instructions:W().min(1,`OpenAI Decisions requires instructions for this question`)},vb=Bv(`type`,[J({type:X(`predicate`),..._b}),J({type:X(`choice`),..._b,choices:q(J({value:W(),description:W().optional()})).min(2).max(255)}),J({type:X(`score`),..._b,levels:q(J({label:W(),description:W().optional()})).min(2).max(10)})]);J({model:X(fb),input:Rv([W().min(1),q(J({role:X(`user`),content:q(gb).min(1)})).min(1)]),questions:q(vb).min(1).max(400).refine(e=>new Set(e.map(e=>e.name)).size===e.length,`Decision question names must be unique`),prompt_cache_key:W().max(64).optional(),safety_identifier:W().max(128).optional()});var yb=G().min(0).max(1),bb=Bv(`type`,[J({type:X(`refusal`),name:W()}),J({type:X(`predicate`),name:W(),probability:yb}),J({type:X(`choice`),name:W(),choice:W(),probabilities:q(J({value:W(),probability:yb})),confidence:yb.nullish()}),J({type:X(`score`),name:W(),score:G(),probabilities:q(J({value:G().int().nonnegative(),probability:yb})),confidence:yb.nullish()})]),xb=G().int().nonnegative(),Sb=J({input_tokens:xb,input_tokens_details:J({cached_tokens:xb.optional(),cache_write_tokens:xb.optional()}).nullish(),output_tokens:xb,total_tokens:xb.optional()});J({model:W(),answers:q(bb),usage:Sb.nullish()});var Cb=Y([`openai/${fb}`]),wb=xy(),Tb=Bv(`type`,[J({type:X(`text`),text:W()}),J({type:X(`json`),value:xy()}),J({type:X(`image`),url:hb})]),Eb=Bv(`type`,[J({type:X(`choice`),instructions:wb.nullish(),criteria:Kv(W(),wb.nullable())}),J({type:X(`score`),instructions:wb.nullish(),criteria:q(wb.nullable()).min(1)}),J({type:X(`boolean`),instructions:wb.nullish(),criteria:J({true:wb.nullish(),false:wb.nullish()}).nullish()})]);J({model:Cb,state:q(Tb).min(1).refine(e=>e.reduce((e,t)=>e+(t.type===`image`?mb(t.url):0),0)<=Gy,Zy),questions:Kv(W().min(1),Eb).refine(e=>Object.keys(e).length>0,`questions must not be empty`),promptCacheKey:W().max(64).optional(),safetyIdentifier:W().max(128).optional(),...tb});var Db=Kv(W(),yb),Ob=Bv(`type`,[J({type:X(`choice`),choice:W(),probabilities:Db.optional(),confidence:yb.optional()}),J({type:X(`score`),score:G(),probabilities:Db.optional(),confidence:yb.optional()}),J({type:X(`boolean`),probability:yb}),J({type:X(`refusal`)})]);J({model:Cb,answers:Kv(W(),Ob),usage:J({inputTokens:xb,outputTokens:xb,cachedInputTokens:xb,cacheWriteTokens:xb}),tokenName:W(),requestLogId:G().optional()});var kb=n(((e,t)=>{t.exports=TypeError})),Ab=n(((e,t)=>{t.exports={}})),jb=n(((e,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype?WeakMap.prototype.has:null,d=typeof WeakSet==`function`&&WeakSet.prototype?WeakSet.prototype.has:null,f=typeof WeakRef==`function`&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,h=Function.prototype.toString,g=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,y=String.prototype.toUpperCase,b=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,C=Array.prototype.join,w=Array.prototype.slice,T=Math.floor,E=typeof BigInt==`function`?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,O=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,ee=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,k=typeof Symbol==`function`&&Symbol.toStringTag?Symbol.toStringTag:null,te=Object.prototype.propertyIsEnumerable,A=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function j(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-T(-e):T(e);if(r!==e){var i=String(r),a=_.call(t,i.length+1);return v.call(i,n,`$&_`)+`.`+v.call(v.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return v.call(t,n,`$&_`)}var ne=Ab(),M=ne.custom,re=pe(M)?M:null,N={__proto__:null,double:`"`,single:`'`},ie={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(ge(s,`quoteStyle`)&&!ge(N,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(ge(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!ge(s,`customInspect`)||s.customInspect;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ge(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ge(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Ee(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?j(t,f):f}if(typeof t==`bigint`){var m=String(t)+`n`;return d?j(t,m):m}var h=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=h&&h>0&&typeof t==`object`)return ce(t)?`[Array]`:`[Object]`;var g=Me(s,r);if(o===void 0)o=[];else if(ye(o,t)>=0)return`[Circular]`;function y(t,n,i){if(n&&(o=w.call(o),o.push(n)),i){var a={depth:s.depth};return ge(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!ue(t)){var x=ve(t),T=Pe(t,y);return`[Function`+(x?`: `+x:` (anonymous)`)+`]`+(T.length>0?` { `+C.call(T,`, `)+` }`:``)}if(pe(t)){var D=ee?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):O.call(t);return typeof t==`object`&&!ee?Oe(D):D}if(Te(t)){for(var M=`<`+b.call(String(t.nodeName)),ie=t.attributes||[],se=0;se<ie.length;se++)M+=` `+ie[se].name+`=`+ae(oe(ie[se].value),`double`,s);return M+=`>`,t.childNodes&&t.childNodes.length&&(M+=`...`),M+=`</`+b.call(String(t.nodeName))+`>`,M}if(ce(t)){if(t.length===0)return`[]`;var he=Pe(t,y);return g&&!je(he)?`[`+Ne(he,g)+`]`:`[ `+C.call(he,`, `)+` ]`}if(de(t)){var De=Pe(t,y);return!(`cause`in Error.prototype)&&`cause`in t&&!te.call(t,`cause`)?`{ [`+String(t)+`] `+C.call(S.call(`[cause]: `+y(t.cause),De),`, `)+` }`:De.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+C.call(De,`, `)+` }`}if(typeof t==`object`&&u){if(re&&typeof t[re]==`function`&&ne)return ne(t,{depth:h-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(be(t)){var Fe=[];return a&&a.call(t,function(e,n){Fe.push(y(n,t,!0)+` => `+y(e,t))}),Ae(`Map`,i.call(t),Fe,g)}if(Ce(t)){var Ie=[];return l&&l.call(t,function(e){Ie.push(y(e,t))}),Ae(`Set`,c.call(t),Ie,g)}if(xe(t))return ke(`WeakMap`);if(we(t))return ke(`WeakSet`);if(Se(t))return ke(`WeakRef`);if(F(t))return Oe(y(Number(t)));if(me(t))return Oe(y(E.call(t)));if(fe(t))return Oe(p.call(t));if(P(t))return Oe(y(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!le(t)&&!ue(t)){var Le=Pe(t,y),I=A?A(t)===Object.prototype:t instanceof Object||t.constructor===Object,Re=t instanceof Object?``:`null prototype`,ze=!I&&k&&Object(t)===t&&k in t?_.call(_e(t),8,-1):Re?`Object`:``,L=(I||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``)+(ze||Re?`[`+C.call(S.call([],ze||[],Re||[]),`: `)+`] `:``);return Le.length===0?L+`{}`:g?L+`{`+Ne(Le,g)+`}`:L+`{ `+C.call(Le,`, `)+` }`}return String(t)};function ae(e,t,n){var r=N[n.quoteStyle||t];return r+e+r}function oe(e){return v.call(String(e),/"/g,`"`)}function se(e){return!k||!(typeof e==`object`&&(k in e||e[k]!==void 0))}function ce(e){return _e(e)===`[object Array]`&&se(e)}function le(e){return _e(e)===`[object Date]`&&se(e)}function ue(e){return _e(e)===`[object RegExp]`&&se(e)}function de(e){return _e(e)===`[object Error]`&&se(e)}function P(e){return _e(e)===`[object String]`&&se(e)}function F(e){return _e(e)===`[object Number]`&&se(e)}function fe(e){return _e(e)===`[object Boolean]`&&se(e)}function pe(e){if(ee)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!O)return!1;try{return O.call(e),!0}catch{}return!1}function me(e){if(!e||typeof e!=`object`||!E)return!1;try{return E.call(e),!0}catch{}return!1}var he=Object.prototype.hasOwnProperty||function(e){return e in this};function ge(e,t){return he.call(e,t)}function _e(e){return m.call(e)}function ve(e){if(e.name)return e.name;var t=g.call(h.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function ye(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function be(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function xe(e){if(!u||!e||typeof e!=`object`)return!1;try{u.call(e,u);try{d.call(e,d)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Se(e){if(!f||!e||typeof e!=`object`)return!1;try{return f.call(e),!0}catch{}return!1}function Ce(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function we(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{u.call(e,u)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Te(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement||typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function Ee(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Ee(_.call(e,0,t.maxStringLength),t)+r}var i=ie[t.quoteStyle||`single`];return i.lastIndex=0,ae(v.call(v.call(e,i,`\\$1`),/[\x00-\x1f]/g,De),`single`,t)}function De(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+y.call(t.toString(16))}function Oe(e){return`Object(`+e+`)`}function ke(e){return e+` { ? }`}function Ae(e,t,n,r){var i=r?Ne(n,r):C.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function je(e){for(var t=0;t<e.length;t++)if(ye(e[t],`
|
|
85
85
|
`)>=0)return!1;return!0}function Me(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=C.call(Array(e.indent+1),` `);else return null;return{base:n,prev:C.call(Array(t+1),n)}}function Ne(e,t){if(e.length===0)return``;var n=`
|
|
86
86
|
`+t.prev+t.base;return n+C.call(e,`,`+n)+`
|
|
87
|
-
`+t.prev}function Pe(e,t){var n=ce(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=ge(e,i)?t(e[i],e):``}var a=typeof D==`function`?D(e):[],o;if(k){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e)ge(e,c)&&(n&&String(Number(c))===c&&c<e.length||k&&o[`$`+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))));if(typeof D==`function`)for(var l=0;l<a.length;l++)ee.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}})),gb=n(((e,t)=>{var n=hb(),r=pb(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=c(e,t);return n&&e&&!e.next&&(e=void 0),!!n},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}})),_b=n(((e,t)=>{t.exports=Object})),vb=n(((e,t)=>{t.exports=Error})),yb=n(((e,t)=>{t.exports=EvalError})),bb=n(((e,t)=>{t.exports=RangeError})),xb=n(((e,t)=>{t.exports=ReferenceError})),Sb=n(((e,t)=>{t.exports=SyntaxError})),Cb=n(((e,t)=>{t.exports=URIError})),wb=n(((e,t)=>{t.exports=Math.abs})),Tb=n(((e,t)=>{t.exports=Math.floor})),Eb=n(((e,t)=>{t.exports=Math.max})),Db=n(((e,t)=>{t.exports=Math.min})),Ob=n(((e,t)=>{t.exports=Math.pow})),kb=n(((e,t)=>{t.exports=Math.round})),Ab=n(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),jb=n(((e,t)=>{var n=Ab();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Mb=n(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Nb=n(((e,t)=>{var n=Mb();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),Pb=n(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Fb=n(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),Ib=n(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=Fb();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),Lb=n(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),Rb=n(((e,t)=>{t.exports=_b().getPrototypeOf||null})),zb=n(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),Bb=n(((e,t)=>{var n=zb();t.exports=Function.prototype.bind||n})),Vb=n(((e,t)=>{t.exports=Function.prototype.call})),Hb=n(((e,t)=>{t.exports=Function.prototype.apply})),Ub=n(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),Wb=n(((e,t)=>{var n=Bb(),r=Hb(),i=Vb();t.exports=Ub()||n.call(i,r)})),Gb=n(((e,t)=>{var n=Bb(),r=pb(),i=Vb(),a=Wb();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),Kb=n(((e,t)=>{var n=Gb(),r=Nb(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),qb=n(((e,t)=>{var n=Lb(),r=Rb(),i=Kb();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),Jb=n(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=Bb().call(n,r)})),Yb=n(((e,t)=>{var n,r=_b(),i=vb(),a=yb(),o=bb(),s=xb(),c=Sb(),l=pb(),u=Cb(),d=wb(),f=Tb(),p=Eb(),m=Db(),h=Ob(),g=kb(),_=jb(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Nb(),x=Pb(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=Ib()(),T=qb(),E=Rb(),D=Lb(),O=Hb(),k=Vb(),A={},ee=typeof Uint8Array>`u`||!T?n:T(Uint8Array),j={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":ee,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){j[`%Error.prototype%`]=T(T(e))}var M=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return j[t]=n,n},te={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},N=Bb(),ne=Jb(),re=N.call(k,Array.prototype.concat),ie=N.call(O,Array.prototype.splice),ae=N.call(k,String.prototype.replace),oe=N.call(k,String.prototype.slice),se=N.call(k,RegExp.prototype.exec),ce=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,le=/\\(\\)?/g,ue=function(e){var t=oe(e,0,1),n=oe(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return ae(e,ce,function(e,t,n,i){r[r.length]=n?ae(i,le,`$1`):t||e}),r},de=function(e,t){var n=e,r;if(ne(te,n)&&(r=te[n],n=`%`+r[0]+`%`),ne(j,n)){var i=j[n];if(i===A&&(i=M(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(se(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ue(e),r=n.length>0?n[0]:``,i=de(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],ie(n,re([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=oe(p,0,1),h=oe(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,ne(j,a))o=j[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=ne(o,p),o=o[p];f&&!s&&(j[a]=o)}}return o}})),Xb=n(((e,t)=>{var n=Yb(),r=Gb(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),Zb=n(((e,t)=>{var n=Yb(),r=Xb(),i=hb(),a=pb(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}})),Qb=n(((e,t)=>{var n=Yb(),r=Xb(),i=hb(),a=Zb(),o=pb(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a})),$b=n(((e,t)=>{var n=pb(),r=hb(),i=gb(),a=Zb(),o=Qb()||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+(e&&Object(e)===e?`the given object key`:r(e)))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=o(),e.set(t,n)}};return t}})),ex=n(((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),tx=n(((e,t)=>{var n=ex(),r=$b(),i=Pb(),a=Object.prototype.hasOwnProperty,o=Array.isArray,s=r(),c=function(e,t){return s.set(e,t),e},l=function(e){return s.has(e)},u=function(e){return s.get(e)},d=function(e,t){s.set(e,t)},f=r(),p=function(e,t){return f.set(e,t),e},m=function(e){return f.has(e)},h=function(e){return f.get(e)},g=function(){for(var e=[],t=0;t<256;++t)e[e.length]=`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase();return e}(),_=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)n[i]!==void 0&&(r[r.length]=n[i]);t.obj[t.prop]=r}}},v=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},y=function(e,t,n){t===`__proto__`&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},b=function(e,t){for(var n=t,r=Object.keys(e),i=0;i<r.length;++i){var a=parseInt(r[i],10);String(a)===r[i]&&a>n&&(n=a)}return n},x=function(e,t,n){var r=[e,t];if(n&&typeof n.arrayLimit==`number`&&r.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+n.arrayLimit+` element`+(n.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(r,n),1)}return r},S=function e(t,n,r){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(o(t)){var i=t.length;if(r&&typeof r.arrayLimit==`number`&&i>=r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(t.concat(n),r),i)}t[i]=n}else if(t&&typeof t==`object`){if(l(t)){var s=u(t)+1;t[s]=n,d(t,s)}else if(r&&r.strictMerge&&m(t)){var f=h(t)+1;if(r.throwOnLimitExceeded&&typeof r.arrayLimit==`number`&&f>=r.arrayLimit)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);t[f]=n,p(t,f)}else if(r&&r.strictMerge){var g=x(t,n,r);return o(g)?p(g,1):g}else(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0)}else return x(t,n,r);return t}if(!t||typeof t!=`object`){if(l(n)){for(var _=Object.keys(n),S=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},C=0;C<_.length;C++){var w=parseInt(_[C],10);S[w+1]=n[_[C]]}return c(S,u(n)+1)}var T=[t].concat(n);if(r&&typeof r.arrayLimit==`number`&&T.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(T,r),T.length-1)}return T}var E=t;if(o(t)&&!o(n)&&(E=v(t,r),m(t)&&p(E,t.length-1)),o(t)&&o(n)){if(n.forEach(function(n,i){if(a.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,r):t[t.length]=n}else t[i]=n}),r&&typeof r.arrayLimit==`number`&&t.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(t,r),t.length-1)}return t}return Object.keys(n).reduce(function(t,i){var o=n[i];if(a.call(t,i)?y(t,i,e(t[i],o,r)):y(t,i,o),l(n)&&!l(t)&&c(t,b(t,u(n))),l(t)){var s=parseInt(i,10);String(s)===i&&s>=0&&s>u(t)&&d(t,s)}if(m(t)){var f=parseInt(i,10);String(f)===i&&f>h(t)&&p(t,f)}return t},E)},C=function(e,t){return Object.keys(t).reduce(function(e,n){return y(e,n,t[n]),e},e)},w=function(e,t,n){if(typeof e==`string`&&e.indexOf(`%`)===-1)return e.indexOf(`+`)===-1?e:e.replace(/\+/g,` `);var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},T=typeof Symbol==`function`&&typeof Symbol.toPrimitive==`symbol`,E=Array.prototype.join,D=Array.prototype.toString,O=Object.prototype.toString,k=function e(t,n){if(!t||typeof t!=`object`&&typeof t!=`function`||T&&t[Symbol.toPrimitive]!=null)return t;if(o(t)&&t.toString===D&&t.join===E){var i=n||r();if(i.has(t))return``;i.set(t,!0);for(var a,s=0;s<t.length;s+=1){var c=t[s],l=e(c,i);if(!a&&l!==c){a=[];for(var u=0;u<s;u+=1)a[u]=t[u]}a&&(a[s]=l)}return i.delete(t),a||t}if(typeof t.toString==`function`)return t;var d=t.valueOf;if(typeof d==`function`){var f=d.call(t);if(!f||typeof f!=`object`&&typeof f!=`function`)return String(f)}return O.call(t)},A=1024;t.exports={arrayToObject:v,assign:C,combine:function(e,t,n,r,i){if(l(e)){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);for(var a=o(t)?t:[t],s=u(e),f=0;f<a.length;++f)s+=1,e[s]=a[f];return d(e,s),e}var p=[].concat(e,t);if(p.length>n){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);return c(v(p,{plainObjects:r}),p.length-1)}return p},compact:function(e){for(var t=[{obj:{o:e},prop:`o`}],n=r(),i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],s=Object.keys(o),c=0;c<s.length;++c){var l=s[c],u=o[l];typeof u==`object`&&u&&!n.has(u)&&(t[t.length]={obj:o,prop:l},n.set(u,!0))}return _(t),e},decode:w,encode:function(e,t,r,i,a){if(e.length===0)return e;var o=e;if(typeof e==`symbol`?o=Symbol.prototype.toString.call(e):typeof e!=`string`&&(o=String(k(e))),r===`iso-8859-1`)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`}).replace(/\+/g,`%2B`);for(var s=``,c=0;c<o.length;c+=A){var l=o.length>=A?o.slice(c,c+A):o;if(c+A<o.length){var u=l.charCodeAt(l.length-1);u>=55296&&u<=56319&&(l=l.slice(0,-1),--c)}for(var d=[],f=0;f<l.length;++f){var p=l.charCodeAt(f);p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===n.RFC1738&&(p===40||p===41)?d[d.length]=l.charAt(f):p<128?d[d.length]=g[p]:p<2048?d[d.length]=g[192|p>>6]+g[128|p&63]:p<55296||p>=57344?d[d.length]=g[224|p>>12]+g[128|p>>6&63]+g[128|p&63]:(f+=1,p=65536+((p&1023)<<10|l.charCodeAt(f)&1023),d[d.length]=g[240|p>>18]+g[128|p>>12&63]+g[128|p>>6&63]+g[128|p&63])}s+=d.join(``)}return s},isBuffer:function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},markOverflow:c,maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n[n.length]=t(e[r]);return n}return t(e)},merge:S,toCoercible:k}})),nx=n(((e,t)=>{var n=$b(),r=tx(),i=ex(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,depth:1/0,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T,E,D){var O=t;if(D>E)throw RangeError(`Input depth exceeded depth option of `+E);for(var k=T,A=0,ee=!1;(k=k.get(m))!==void 0&&!ee;){var j=k.get(t);if(A+=1,j!==void 0){if(j===A)throw RangeError(`Cyclic object value`);ee=!0}k.get(m)===void 0&&(A=0)}if(O=typeof _==`function`?_(i,O):O,O instanceof Date?O=b(O):a===`comma`&&s(O)&&(O=r.maybeMap(O,function(e){return e instanceof Date?b(e):e})),O===null){if(u)return S(g&&!C?g(i,f.encoder,w,`key`,x):i);O=``}if(p(O)||r.isBuffer(O))return g?[S(C?i:g(i,f.encoder,w,`key`,x))+`=`+S(g(O,f.encoder,w,`value`,x))]:[S(i)+`=`+S(String(O))];var M=[];if(O===void 0)return M;var te;if(a===`comma`&&s(O))C&&g&&(O=r.maybeMap(O,function(e){return e==null?e:g(e,f.encoder,w,`value`,x)})),te=[{value:O.length>0?r.toCoercible(O).join(`,`)||null:void 0}];else if(s(_))te=_;else{var N=Object.keys(O);te=v?N.sort(v):N}var ne=String(i),re=o&&s(O)&&O.length===1?ne+`[]`:ne;if(c&&s(O)&&O.length===0&&Object.keys(O).length===0)return re+`[]`;for(var ie=0;ie<te.length;++ie){var ae=te[ie],oe=typeof ae==`object`&&ae&&ae.value!==void 0?ae.value:O[ae];if(!(d&&oe===null)){var se=y&&h?String(ae).replace(/\./g,`%2E`):String(ae),ce=s(O)?typeof a==`function`?a(re,se):re:re+(y?`.`+se:`[`+se+`]`);T.set(t,A);var le=n();le.set(m,T),l(M,e(oe,ce,a,o,c,u,d,h,a===`comma`&&C&&s(O)?null:g,_,v,y,b,x,S,C,w,le,E,D+1))}}return M},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l=a.call(o,e.arrayFormat)?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat;if(`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0||f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,depth:typeof e.depth==`number`?e.depth:f.depth,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m];if(_!=null){var v=r[_];i.skipNulls&&v===null||l(u,h(v,i.encodeDotInKeys?String(_).replace(/\./g,`%2E`):String(_),d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p,i.depth,0))}}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B`+i.delimiter:b+=`utf8=%E2%9C%93`+i.delimiter),y.length>0?b+y:``}})),rx=n(((e,t)=>{var n=$b(),r=tx(),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=Object.getPrototypeOf,s=function(e){if(!e||typeof e!=`object`)return!1;if(a(e))return!0;var t=o(e);return t===Object.prototype||t===null},c=function(e){if(a(e)){var t=[];return t.length=e.length,t}return o(e)===null?{__proto__:null}:{}},l=function(e){for(var t=n(),r={},i=[{source:e,target:r}],a=0;a<i.length;++a)for(var o=i[a].source,l=i[a].target,u=Object.keys(o),d=0;d<u.length;++d){var f=o[u[d]];if(s(f)){if(!t.has(f)){var p=c(f);t.set(f,p),i[i.length]={source:f,target:p}}l[u[d]]=t.get(f)}else l[u[d]]=f}return r},u={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},d=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},f=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1){if(t.throwOnLimitExceeded)for(var r=0,i=e.indexOf(`,`);i>-1;){if(r+=1,r>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);i=e.indexOf(`,`,i+1)}return e.split(`,`)}if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},p=`utf8=%26%2310003%3B`,m=`utf8=%E2%9C%93`,h=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;o=o.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var s=t.parameterLimit===1/0?void 0:t.parameterLimit,c=o.split(t.delimiter,t.throwOnLimitExceeded&&s!==void 0?s+1:s);if(t.throwOnLimitExceeded&&s!==void 0&&c.length>s)throw RangeError(`Parameter limit exceeded. Only `+s+` parameter`+(s===1?``:`s`)+` allowed.`);var l=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<c.length;++h)c[h].indexOf(`utf8=`)===0&&(c[h]===m?g=`utf-8`:c[h]===p&&(g=`iso-8859-1`),l=h,h=c.length);for(h=0;h<c.length;++h)if(h!==l){var _=c[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b=y>1&&_.slice(y-2,y)===`[]`,x,S;if(y===-1?(x=t.decoder(_,u.decoder,g,`key`),S=t.strictNullHandling?null:``):(x=t.decoder(_.slice(0,y),u.decoder,g,`key`),x!==null&&(S=r.maybeMap(f(_.slice(y+1),t,a(n[x])?n[x].length:0),function(e){return t.decoder(e,u.decoder,g,`value`)}))),S&&t.interpretNumericEntities&&g===`iso-8859-1`&&(S=d(String(S))),b&&(S=a(S)?[S]:S),t.comma&&a(S)&&S.length>t.arrayLimit&&(S=r.combine([],S,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded)),x!==null){var C=i.call(n,x);C&&(t.duplicates===`combine`||b)?n[x]=r.combine(n[x],S,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded):(!C||t.duplicates===`last`)&&(n[x]=S)}}return n},g=function(e,t,n,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var s=i?t:f(t,n,a),c=e.length-1;c>=0;--c){var l,u=e[c];if(u===`[]`&&n.parseArrays)l=r.isOverflow(s)?s:n.allowEmptyArrays&&(s===``||n.strictNullHandling&&s===null)?[]:r.combine([],s,n.arrayLimit,n.plainObjects,n.throwOnLimitExceeded);else{l=n.plainObjects?{__proto__:null}:{};var d=u.charAt(0)===`[`&&u.charAt(u.length-1)===`]`?u.slice(1,-1):u,p=n.decodeDotInKeys?d.replace(/%2E/g,`.`):d,m=parseInt(p,10),h=!isNaN(m)&&u!==p&&String(m)===p&&m>=0&&n.parseArrays;if(!n.parseArrays&&p===``)l={0:s};else if(h&&m<n.arrayLimit)l=[],l[m]=s;else if(h&&n.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+n.arrayLimit+` element`+(n.arrayLimit===1?``:`s`)+` allowed in an array.`);else h?(l[m]=s,r.markOverflow(l,m)):p!==`__proto__`&&(l[p]=s)}s=l}return s},_=function(e){for(var t=``,n=0,r=0;r<e.length;r+=1){var i=e.charCodeAt(r);if(i===91)n+=1,t+=`[`;else if(i===93)n>0&&--n,t+=`]`;else if(i===46&&n===0&&r+1<e.length&&e.charCodeAt(r+1)!==46&&e.charCodeAt(r+1)!==91){for(var a=r+1,o=a;o<e.length&&e.charCodeAt(o)!==46&&e.charCodeAt(o)!==91;)o+=1;t+=`[`+e.slice(a,o)+`]`,r=o-1}else t+=e.charAt(r)}return t},v=function(e,t){var n=t.allowDots?_(e):e;if(t.depth<=0)return!t.plainObjects&&i.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var r=[],a=n.indexOf(`[`),o=a>=0?n.slice(0,a):n;if(o){if(!t.plainObjects&&i.call(Object.prototype,o)&&!t.allowPrototypes)return;r[r.length]=o}for(var s=n.length,c=a,l=0;c>=0&&l<t.depth;){for(var u=1,d=c+1,f=-1;d<s&&f<0;){var p=n.charCodeAt(d);p===91?u+=1:p===93&&(--u,u===0&&(f=d)),d+=1}if(f<0)return r[r.length]=`[`+n.slice(c)+`]`,r;var m=n.slice(c,f+1),h=m.slice(1,-1);if(!t.plainObjects&&i.call(Object.prototype,h)&&!t.allowPrototypes)return;r[r.length]=m,l+=1,c=n.indexOf(`[`,f+1)}if(c>=0){if(t.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+t.depth+` and strictDepth is true`);r[r.length]=`[`+n.slice(c)+`]`}return r},y=function(e,t,n,r){if(e){var i=v(e,n);if(i)return g(i,t,n,r)}},b=function(e){if(!e)return u;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?u.charset:e.charset,n=e.duplicates===void 0?u.duplicates:e.duplicates;if(n!==`combine`&&n!==`first`&&n!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);return{allowDots:e.allowDots===void 0?e.decodeDotInKeys===!0||u.allowDots:!!e.allowDots,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:u.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:u.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:u.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:u.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:u.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:u.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:u.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:u.decoder,delimiter:typeof e.delimiter==`string`||r.isRegExp(e.delimiter)?e.delimiter:u.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:u.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:u.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:u.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:u.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:u.strictDepth,strictMerge:typeof e.strictMerge==`boolean`?!!e.strictMerge:u.strictMerge,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:u.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`&&e.throwOnLimitExceeded}};t.exports=function(e,t){var n=b(t);if(e===``||e==null)return n.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?h(e,n):l(e),a=n.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],u=y(c,i[c],n,typeof e==`string`);a=r.merge(a,u,n)}return n.allowSparse===!0?a:r.compact(a)}})),ix=n(((e,t)=>{var n=nx(),r=rx();t.exports={formats:ex(),parse:r,stringify:n}}));function ax(e,t){return function(){return e.apply(t,arguments)}}var{toString:ox}=Object.prototype,{getPrototypeOf:sx}=Object,{iterator:cx,toStringTag:lx}=Symbol,ux=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dx=e=>typeof e==`string`&&(e===`__proto__`||e===`constructor`||e===`prototype`),fx=(e,t,n)=>e===Object.prototype||!n&&t===null,px=e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(dx(t))return!1;let n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&n.writable===!0})},mx=(e,t)=>{let n=e,r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);let i=sx(n);if(fx(n,i,n===e))return!1;if(ux(n,t))return!0;n=i}return!1},hx=(e,t)=>e!=null&&mx(e,t)?e[t]:void 0,gx=e=>{if(e==null||typeof e!=`object`&&typeof e!=`function`)return e;let t=sx(e);if(t===null&&px(e))return e;let n=Object.create(null),r=Object.create(null),i=[],a=e;for(;a!=null&&i.indexOf(a)===-1;){i.push(a);let o=a===e?t:sx(a);if(fx(a,o,a===e))break;let s=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(a));for(let t of s)dx(t)||ux(r,t)||(n[t]=e[t],r[t]=!0);a=o}return n},_x=(e=>t=>{let n=ox.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),vx=e=>(e=e.toLowerCase(),t=>_x(t)===e),yx=e=>t=>typeof t===e,{isArray:bx}=Array,xx=yx(`undefined`);function Sx(e){return e!==null&&!xx(e)&&e.constructor!==null&&!xx(e.constructor)&&Ex(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Cx=vx(`ArrayBuffer`);function wx(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Cx(e.buffer),t}var Tx=yx(`string`),Ex=yx(`function`),Dx=yx(`number`),Ox=e=>typeof e==`object`&&!!e,kx=e=>e===!0||e===!1,Ax=e=>{if(!Ox(e))return!1;let t=sx(e);return(t===null||t===Object.prototype||sx(t)===null)&&!mx(e,lx)&&!mx(e,cx)},jx=e=>{if(!Ox(e)||Sx(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Mx=vx(`Date`),Nx=vx(`File`),Px=e=>!!(e&&e.uri!==void 0),Fx=e=>e&&e.getParts!==void 0,Ix=vx(`Blob`),Lx=vx(`FileList`),Rx=vx(`Set`),zx=e=>Ox(e)&&Ex(e.pipe);function Bx(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var Vx=Bx(),Hx=Vx.FormData===void 0?void 0:Vx.FormData,Ux=e=>{if(!e)return!1;if(Hx&&e instanceof Hx)return!0;let t=sx(e);if(!t||t===Object.prototype||!Ex(e.append))return!1;let n=_x(e);return n===`formdata`||n===`object`&&Ex(e.toString)&&e.toString()===`[object FormData]`},Wx=vx(`URLSearchParams`),[Gx,Kx,qx,Jx]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(vx),Yx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Xx(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),bx(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Sx(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function Zx(e,t){if(Sx(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Qx=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,$x=e=>!xx(e)&&e!==Qx;function eS(...e){let{caseless:t,skipUndefined:n}=$x(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&Zx(r,i)||i,o=ux(r,a)?r[a]:void 0;Ax(o)&&Ax(e)?r[a]=eS(o,e):Ax(e)?r[a]=eS({},e):bx(e)?r[a]=e.slice():(!n||!xx(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||Sx(n)||(Xx(n,i),typeof n!=`object`||bx(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];fS.call(n,t)&&i(n[t],t)}}return r}var tS=(e,t,n,{allOwnKeys:r}={})=>(Xx(t,(t,r)=>{n&&Ex(t)?Object.defineProperty(e,r,{__proto__:null,value:ax(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),nS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},iS=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&sx(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},aS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},oS=e=>{if(!e)return null;if(bx(e))return e;let t=e.length;if(!Dx(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},sS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&sx(Uint8Array)),cS=(e,t)=>{let n=(e&&e[cx]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},lS=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},uS=vx(`HTMLFormElement`),dS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:fS}=Object.prototype,pS=vx(`RegExp`),mS=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Xx(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},hS=e=>{mS(e,(t,n)=>{if(Ex(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];Ex(r)&&(t.enumerable=!1,`writable`in t?t.writable=!1:t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})})},gS=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return bx(e)?r(e):r(String(e).split(t)),n},_S=()=>{},vS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yS(e){return!!(e&&Ex(e.append)&&e[lx]===`FormData`&&e[cx])}var bS=e=>{let t=new WeakSet,n=e=>{if(Ox(e)){if(t.has(e))return;if(Sx(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(Rx(e)){r=[];for(let t of e){let e=n(t);!xx(e)&&r.push(e)}}else r=bx(e)?[]:{},Xx(e,(e,t)=>{let i=n(e);!xx(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},xS=vx(`AsyncFunction`),SS=e=>e&&(Ox(e)||Ex(e))&&Ex(e.then)&&Ex(e.catch),CS=((e,t)=>e?setImmediate:t?((e,t)=>(Qx.addEventListener(`message`,({source:n,data:r})=>{n===Qx&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Qx.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,Ex(Qx.postMessage)),wS=typeof queueMicrotask<`u`?queueMicrotask.bind(Qx):typeof process<`u`&&process.nextTick||CS,TS=e=>e!=null&&Ex(e[cx]),X={isArray:bx,isArrayBuffer:Cx,isBuffer:Sx,isFormData:Ux,isArrayBufferView:wx,isString:Tx,isNumber:Dx,isBoolean:kx,isObject:Ox,isPlainObject:Ax,isEmptyObject:jx,isReadableStream:Gx,isRequest:Kx,isResponse:qx,isHeaders:Jx,isUndefined:xx,isDate:Mx,isFile:Nx,isReactNativeBlob:Px,isReactNative:Fx,isBlob:Ix,isRegExp:pS,isFunction:Ex,isStream:zx,isURLSearchParams:Wx,isTypedArray:sS,isFileList:Lx,forEach:Xx,merge:eS,extend:tS,trim:Yx,stripBOM:nS,inherits:rS,toFlatObject:iS,kindOf:_x,kindOfTest:vx,endsWith:aS,toArray:oS,forEachEntry:cS,matchAll:lS,isHTMLForm:uS,hasOwnProperty:ux,hasOwnProp:ux,hasOwnInPrototypeChain:mx,getSafeProp:hx,toSafeFlatObject:gx,reduceDescriptors:mS,freezeMethods:hS,toObjectSet:gS,toCamelCase:dS,noop:_S,toFiniteNumber:vS,findKey:Zx,global:Qx,isContextDefined:$x,isSpecCompliantForm:yS,toJSONObject:bS,isAsyncFn:xS,isThenable:SS,setImmediate:CS,asap:wS,isIterable:TS,isSafeIterable:e=>e!=null&&mx(e,cx)&&TS(e)},ES=X.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),DS=e=>{let t={},n,r,i;return e&&e.split(`
|
|
88
|
-
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=
|
|
89
|
-
`)}getSetCookie(){let e=this.get(`set-cookie`);return X.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return HS(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[FS]=this[FS]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=IS(e);t[r]||(KS(n,e),t[r]=!0)}return X.isArray(e)?e.forEach(r):r(e),this}};qS.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),X.reduceDescriptors(qS.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),X.freezeMethods(qS);var JS=`[REDACTED ****]`;function YS(e){if(X.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(X.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function XS(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||X.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof qS&&(e=e.toJSON()),r.push(e);let t;if(X.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);X.isUndefined(r)||(t[n]=r)});else{if(!X.isPlainObject(e)&&YS(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?JS:i(a);X.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function ZS(e){try{return String(e)}catch{return``}}function QS(e){return e.errors.map(e=>{try{return e&&e.message?ZS(e.message):ZS(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var Z=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&X.isArray(t.errors)&&t.errors.length&&(s=QS(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&X.hasOwnProp(e,`redact`)?e.redact:void 0,n=X.isArray(t)&&t.length>0?XS(e,t):X.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Z.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,Z.ERR_BAD_OPTION=`ERR_BAD_OPTION`,Z.ECONNABORTED=`ECONNABORTED`,Z.ETIMEDOUT=`ETIMEDOUT`,Z.ECONNREFUSED=`ECONNREFUSED`,Z.ERR_NETWORK=`ERR_NETWORK`,Z.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,Z.ERR_DEPRECATED=`ERR_DEPRECATED`,Z.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,Z.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,Z.ERR_CANCELED=`ERR_CANCELED`,Z.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,Z.ERR_INVALID_URL=`ERR_INVALID_URL`,Z.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function $S(e){return X.isPlainObject(e)||X.isArray(e)}function eC(e){return X.endsWith(e,`[]`)?e.slice(0,-2):e}function tC(e,t,n){return e?e.concat(t).map(function(e,t){return e=eC(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function nC(e){return X.isArray(e)&&!e.some($S)}var rC=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)});function iC(e,t,n){if(!X.isObject(e))throw TypeError(`target must be an object`);t||=new FormData;let r=(e,t)=>{let r=X.getSafeProp(n,e);return X.isUndefined(r)?t:r},i=r(`metaTokens`,!0),a=r(`visitor`)||h,o=r(`dots`,!1),s=r(`indexes`,!1),c=r(`Blob`)||typeof Blob<`u`&&Blob,l=r(`maxDepth`,100),u=c&&X.isSpecCompliantForm(t),d=[];if(!X.isFunction(a))throw TypeError(`visitor must be a function`);function f(e){if(e===null)return``;if(X.isDate(e))return e.toISOString();if(X.isBoolean(e))return e.toString();if(!u&&X.isBlob(e))throw new Z(`Blob is not supported. Use a Buffer instead.`);if(X.isArrayBuffer(e)||X.isTypedArray(e)){if(u&&typeof c==`function`)return new c([e]);throw new Z(`Blob is not supported. Use a Buffer instead.`,Z.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new Z(`Object is too deeply nested (`+e+` levels). Max depth: `+l,Z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(e,t){if(l===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!X.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}function h(e,n,r){let a=e;if(X.isReactNative(t)&&X.isReactNativeBlob(e))return t.append(tC(r,n,o),f(e)),!1;if(e&&!r&&typeof e==`object`){if(X.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=m(e,1);else if(X.isArray(e)&&nC(e)||(X.isFileList(e)||X.endsWith(n,`[]`))&&(a=X.toArray(e)))return n=eC(n),a.forEach(function(e,r){!(X.isUndefined(e)||e===null)&&t.append(s===!0?tC([n],r,o):s===null?n:n+`[]`,f(e))}),!1}return $S(e)?!0:(t.append(tC(r,n,o),f(e)),!1)}let g=Object.assign(rC,{defaultVisitor:h,convertValue:f,isVisitable:$S});function _(e,n,r=0){if(!X.isUndefined(e)){if(p(r),d.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));d.push(e),X.forEach(e,function(e,i){(!(X.isUndefined(e)||e===null)&&a.call(t,e,X.isString(i)?i.trim():i,n,g))===!0&&_(e,n?n.concat(i):[i],r+1)}),d.pop()}}if(!X.isObject(e))throw TypeError(`data must be an object`);return _(e),t}function aC(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function oC(e,t){this._pairs=[],e&&iC(e,this,t)}var sC=oC.prototype;sC.append=function(e,t){this._pairs.push([e,t])},sC.toString=function(e){let t=e?t=>e.call(this,t,aC):aC;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function cC(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function lC(e,t,n){if(!t)return e;e||=``;let r=X.isFunction(n)?{serialize:n}:n,i=X.getSafeProp(r,`encode`)||cC,a=X.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):X.isURLSearchParams(t)?t.toString():new oC(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var uC=Symbol(`internals`);function dC(e){return e?e.length:0}function fC(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function pC(e,t){let n=e.handlers,r=dC(n);n===t.handlersRef?r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()):(t.handlersRef=n,t.handlerEntries.clear()),t.handlersLength=r}var mC=class{constructor(){this.handlers=[],this[uC]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){let r={fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},i=this[uC];this.handlers??=[],pC(this,i);let a=i.nextId++;return this.handlers.push(r),i.handlerEntries.set(a,{handler:r,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,a}eject(e){let t=this[uC];pC(this,t);let n=t.handlerEntries.get(e);if(n){if(t.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(fC(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],pC(this,this[uC]))}forEach(e){let t=this[uC];pC(this,t),t.iterationDepth++;try{X.forEach(this.handlers,function(t){t!==null&&e(t)})}finally{--t.iterationDepth||(pC(this,t),fC(this.handlers),t.handlersLength=dC(this.handlers))}}},hC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},gC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:oC,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},_C=e({hasBrowserEnv:()=>vC,hasStandardBrowserEnv:()=>bC,hasStandardBrowserWebWorkerEnv:()=>xC,navigator:()=>yC,origin:()=>SC}),vC=typeof window<`u`&&typeof document<`u`,yC=typeof navigator==`object`&&navigator||void 0,bC=vC&&(!yC||[`ReactNative`,`NativeScript`,`NS`].indexOf(yC.product)<0),xC=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,SC=vC&&window.location.href||`http://localhost`,CC={..._C,...gC};function wC(e,t){return iC(e,new CC.classes.URLSearchParams,{visitor:function(e,t,n,r){return CC.isNode&&X.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var TC=100;function EC(e){if(e>TC)throw new Z(`FormData field is too deeply nested (`+e+` levels). Max depth: `+TC,Z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function DC(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)EC(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function OC(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function kC(e){function t(e,n,r,i){EC(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&X.isArray(r)?r.length:a,s?(X.hasOwnProp(r,a)?r[a]=X.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!X.hasOwnProp(r,a)||!X.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&X.isArray(r[a])&&(r[a]=OC(r[a])),!o)}if(X.isFormData(e)&&X.isFunction(e.entries)){let n={};return X.forEachEntry(e,(e,r)=>{t(DC(e),r,n,0)}),n}return null}var AC=Object.freeze([`get`,`delete`,`head`,`options`,`post`,`put`,`patch`,`purge`,`link`,`unlink`,`query`]),jC=(e,t)=>e!=null&&X.hasOwnProp(e,t)?e[t]:void 0;function MC(e,t,n){if(X.isString(e))try{return(t||JSON.parse)(e),X.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var NC={transitional:hC,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=X.isObject(e);if(i&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return r?JSON.stringify(kC(e)):e;if(X.isArrayBuffer(e)||X.isBuffer(e)||X.isStream(e)||X.isFile(e)||X.isBlob(e)||X.isReadableStream(e))return e;if(X.isArrayBufferView(e))return e.buffer;if(X.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=jC(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return wC(e,t).toString();if((a=X.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=jC(this,`env`),r=n&&n.FormData;return iC(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),MC(e)):e}],transformResponse:[function(e){let t=jC(this,`transitional`)||NC.transitional,n=t&&t.forcedJSONParsing,r=jC(this,`responseType`),i=r===`json`;if(X.isResponse(e)||X.isReadableStream(e))return e;if(e&&X.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,jC(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?Z.from(e,Z.ERR_BAD_RESPONSE,this,null,jC(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:CC.classes.FormData,Blob:CC.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};X.forEach(AC,e=>{NC.headers[e]={}});function PC(e,t){let n=this||NC,r=t||n,i=qS.from(r.headers),a=r.data;return X.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function FC(e){return!!(e&&e.__CANCEL__)}var IC=class extends Z{constructor(e,t,n){super(e??`canceled`,Z.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function LC(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Z(`Request failed with status code `+n.status,n.status>=400&&n.status<500?Z.ERR_BAD_REQUEST:Z.ERR_BAD_RESPONSE,n.config,n.request,n))}var RC=/[\t\n\r]/g;function zC(e){if(typeof e!=`string`)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(RC,``)}function BC(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function VC(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function HC(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i),(...e)=>o(e)]}var UC=(e,t,n=3)=>{let r=0,i=VC(50,250);return HC(n=>{if(!n||!X.isNumber(n.loaded))return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},WC=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},GC=(e,t=X.asap)=>(...n)=>t(()=>e(...n)),KC=CC.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,CC.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(CC.origin),CC.navigator&&/(msie|trident)/i.test(CC.navigator.userAgent)):()=>!0,qC=CC.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];X.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),X.isString(r)&&s.push(`path=${r}`),X.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),X.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function JC(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function YC(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var XC=/^https?:(?!\/\/)/i;function ZC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${JS}`)}function QC(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${JS}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${JS}`);return n===-1?r:`${r}#${ZC(t.slice(n+1))}`}function $C(e,t){if(typeof e==`string`){let n=zC(e);if(XC.test(n))throw new Z(`Invalid URL ${JSON.stringify(QC(n))}: missing "//" after protocol`,Z.ERR_INVALID_URL,t)}}function ew(e,t,n,r){$C(t,r);let i=!JC(t);return e&&(i||n===!1)?($C(e,r),YC(e,t)):t}var tw=e=>e instanceof qS?{...e}:e,nw=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function rw(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return X.isPlainObject(e)&&X.isPlainObject(t)?X.merge.call({caseless:r},e,t):X.isPlainObject(t)?X.merge({},t):X.isArray(t)?t.slice():t}function i(e,t,n,i){if(!X.isUndefined(t))return r(e,t,n,i);if(!X.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!X.isUndefined(t))return r(void 0,t)}function o(e,t){if(!X.isUndefined(t))return r(void 0,t);if(!X.isUndefined(e))return r(void 0,e)}function s(n){let r=X.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!X.isUndefined(r)){if(X.isPlainObject(r)){if(X.hasOwnProp(r,n))return r[n]}else return}let i=X.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(X.isPlainObject(i)&&X.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(X.hasOwnProp(t,a))return r(n,i);if(X.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(tw(e),tw(t),n,!0)};return X.forEach(nw({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=X.hasOwnProp(l,r)?l[r]:i,o=a(X.hasOwnProp(e,r)?e[r]:void 0,X.hasOwnProp(t,r)?t[r]:void 0,r);X.isUndefined(o)&&a!==c||(n[r]=o)}),X.hasOwnProp(t,`validateStatus`)&&X.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(X.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var iw=[`content-type`,`content-length`];function aw(e,t,n){n===`content-only`?Object.entries(t||{}).forEach(([t,n])=>{iw.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}var ow=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function sw(e){let t=rw({},e),n=e=>X.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=qS.from(s),t.url=lC(ew(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=X.getSafeProp(c,`username`)||``,n=X.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?ow(n):``)))}catch(t){throw Z.from(t,Z.ERR_BAD_OPTION_VALUE,e)}}if(X.isFormData(r)){let e=X.getSafeProp(r,`getHeaders`);CC.hasStandardBrowserEnv||CC.hasStandardBrowserWebWorkerEnv||X.isReactNative(r)?s.setContentType(void 0):X.isFunction(e)&&aw(s,e.call(r),n(`formDataHeaderPolicy`))}if(CC.hasStandardBrowserEnv&&(X.isFunction(i)&&(i=i(t)),i===!0||i==null&&KC(t.url))){let e=a&&o&&qC.read(o);e&&s.set(a,e)}return t}var cw=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=sw(e),i=r.data,a=qS.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p,m;function h(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let g=new XMLHttpRequest;g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout;function _(i){if(!g)return;if(g.status===0&&(BC(zC(r.url))||BC(CC.origin))!==`file`&&!(g.responseURL&&g.responseURL.startsWith(`file:`))){n(new Z(`Request aborted`,Z.ECONNABORTED,e,g)),h(),g=null;return}try{i?m&&m(i):p&&p()}catch(e){setTimeout(()=>{throw e})}if(!g)return;let a=qS.from(`getAllResponseHeaders`in g&&g.getAllResponseHeaders());LC(function(e){t(e),h()},function(e){n(e),h()},{data:!o||o===`text`||o===`json`?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:a,config:e,request:g}),g=null}`onloadend`in g?g.onloadend=_:g.onreadystatechange=function(){g&&g.readyState===4&&(g.status!==0||g.responseURL&&g.responseURL.startsWith(`file:`))&&setTimeout(_)},g.onabort=function(){g&&=(n(new Z(`Request aborted`,Z.ECONNABORTED,e,g)),h(),null)},g.onerror=function(t){let r=new Z(t&&t.message?t.message:`Network Error`,Z.ERR_NETWORK,e,g);r.event=t||null,n(r),h(),g=null},g.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||hC;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Z(t,i.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,e,g)),h(),g=null},i===void 0&&a.setContentType(null),`setRequestHeader`in g&&X.forEach(PS(a),function(e,t){g.setRequestHeader(t,e)}),X.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),o&&o!==`json`&&(g.responseType=r.responseType),c&&([d,p,m]=UC(c,!0),g.addEventListener(`progress`,d)),s&&g.upload&&([u,f]=UC(s),g.upload.addEventListener(`progress`,u),g.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{g&&=(n(!t||t.type?new IC(null,e,g):t),g.abort(),h(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let v=BC(r.url);v&&!CC.protocols.includes(v)?(n(new Z(`Unsupported protocol `+v+`:`,Z.ERR_BAD_REQUEST,e)),h()):g.send(i||null)})},lw=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Z?t:new IC(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Z(`timeout of ${t}ms exceeded`,Z.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{r||(e.aborted?i.call(e):e.addEventListener(`abort`,i,{once:!0}))});let{signal:s}=n;return s.unsubscribe=()=>X.asap(o),s},uw=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},dw=async function*(e,t){for await(let n of fw(e))yield*uw(n,t)},fw=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},pw=(e,t,n,r)=>{let i=dw(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},mw=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,hw=(e,t,n)=>t+2<n&&mw(e.charCodeAt(t+1))&&mw(e.charCodeAt(t+2)),gw=e=>e<=57?e-48:(e&223)-55,_w=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,vw=e=>e===9||e===10||e===12||e===13||e===32,yw=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},bw=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},xw=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);o===37&&hw(e,a,t)&&(o=gw(e.charCodeAt(a+1))*16+gw(e.charCodeAt(a+2)),a+=2),!vw(o)&&(o===61?r++:!_w(o)||r>0?i=!0:n++)}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?bw(e):yw(n)},Sw=(e,t)=>{if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let n=e.indexOf(`,`);if(n<0)return 0;let r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let e=0,t=i.length;e<t;e++){let n=i.charCodeAt(e);if(n===37&&hw(i,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=i.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};function Cw(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return Sw(t===-1?e:e.slice(0,t),xw)}var ww=`1.20.0`,Tw=65536,Ew={cache:`default`,redirect:`follow`,referrer:`about:client`,referrerPolicy:``,mode:`cors`,integrity:``,keepalive:!1,priority:`auto`,window:null},{isFunction:Dw}=X,Ow=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),kw=e=>{if(!X.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Aw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jw=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Mw=e=>{let t=X.global!==void 0&&X.global!==null?X.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=X.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?Dw(i):typeof fetch==`function`,c=Dw(a),l=Dw(o);if(!s)return!1;let u=s&&Dw(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&Aw(()=>{let e=!1,t=new a(CC.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&Aw(()=>X.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Z(`Response type '${e}' is not supported`,Z.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(X.isBlob(e))return e.size;if(X.isSpecCompliantForm(e))return(await new a(CC.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(X.isArrayBufferView(e)||X.isArrayBuffer(e))return e.byteLength;if(X.isURLSearchParams(e)&&(e+=``),X.isString(e))return(await d(e)).byteLength},g=async(e,t)=>X.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T,maxRedirects:E}=sw(e),D=X.isNumber(w)&&w>-1,O=X.isNumber(T)&&T>-1,k=t=>X.hasOwnProp(e,t)?e[t]:void 0,A=i||fetch;b=b?(b+``).toLowerCase():`text`;let ee=lw([l,d&&d.toAbortSignal()],_),j=null,M=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()}),te,N=null,ne=()=>new Z(`Request body larger than maxBodyLength limit`,Z.ERR_BAD_REQUEST,e,j);try{let i,l=k(`auth`);if(l&&(i={username:X.getSafeProp(l,`username`)||``,password:X.getSafeProp(l,`password`)||``}),jw(t)){let e=new URL(t,CC.origin);!i&&(e.username||e.password)&&(i={username:kw(e.username),password:kw(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(Ow((i.username||``)+`:`+(i.password||``))))),D&&typeof t==`string`&&t.startsWith(`data:`)&&Cw(t)>w)throw new Z(`maxContentLength size of `+w+` exceeded`,Z.ERR_BAD_RESPONSE,e,j);if(O&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(te=e,e>T))throw ne()}let d=O&&(X.isReadableStream(s)||X.isStream(s)),_=(e,t,n)=>pw(e,Tw,e=>{if(O&&e>T)throw N=ne();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(te??=await g(x,s),te!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(X.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&WC(te,UC(GC(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new Z(`Stream request bodies are not supported by the current fetch implementation`,Z.ERR_NOT_SUPPORT,e,j);X.isString(S)||(S=S?`include`:`omit`);let re=c&&`credentials`in a.prototype;if(X.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+ww,!1);let ie=C==null?C:Object.assign(Object.create(null),C);ie&&(delete ie.body,delete ie.headers,delete ie.method,delete ie.signal,delete ie.duplex,delete ie.credentials);let ae=Object.assign(Object.create(null),ie,{signal:ee,method:n.toUpperCase(),headers:PS(x.normalize()),body:s,duplex:`half`,credentials:re?S:void 0});c&&(X.forEach(Ew,(e,t)=>{ae[t]===void 0&&(ae[t]=e)}),ae.signal===void 0&&(ae.signal=null),ae.body===void 0&&(ae.body=null)),E===0&&(ae.redirect=`manual`,ie&&(ie.redirect=`manual`)),j=c&&new a(t,ae);let oe=await(c?A(j,ie):A(t,ae)),se=qS.from(oe.headers);if(D){let t=X.toFiniteNumber(se.getContentLength());if(t!=null&&t>w)throw new Z(`maxContentLength size of `+w+` exceeded`,Z.ERR_BAD_RESPONSE,e,j)}let ce=p&&(b===`stream`||b===`response`);if(p&&oe.body&&(v||D||ce&&M)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=oe[e]});let n=X.toFiniteNumber(se.getContentLength()),[r,i]=v&&WC(n,UC(GC(v),!0))||[],a=0;oe=new o(pw(oe.body,Tw,t=>{if(D&&(a=t,a>w))throw new Z(`maxContentLength size of `+w+` exceeded`,Z.ERR_BAD_RESPONSE,e,j);r&&r(t)},()=>{i&&i(),M&&M()}),t)}b||=`text`;let le=await m[X.findKey(m,b)||`text`](oe,e);if(D&&!p&&!ce){let t;if(le!=null&&(typeof le.byteLength==`number`?t=le.byteLength:typeof le.size==`number`?t=le.size:typeof le==`string`&&(t=typeof r==`function`?new r().encode(le).byteLength:le.length)),typeof t==`number`&&t>w)throw new Z(`maxContentLength size of `+w+` exceeded`,Z.ERR_BAD_RESPONSE,e,j)}return!ce&&M&&M(),await new Promise((t,n)=>{LC(t,n,{data:le,headers:qS.from(oe.headers),status:oe.status,statusText:oe.statusText,config:e,request:j})})}catch(t){if(M&&M(),ee&&ee.aborted&&ee.reason instanceof Z){let n=ee.reason;throw n.config=e,j&&(n.request=j),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(N)throw j&&!N.request&&(N.request=j),N;if(t instanceof Z)throw j&&!t.request&&(t.request=j),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new Z(`Network Error`,Z.ERR_NETWORK,e,j,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw Z.from(t,t&&t.code,e,j,t&&t.response)}}},Nw=new Map,Pw=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Nw;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Mw(t)),l=c;return c};Pw();var Fw={http:null,xhr:cw,fetch:{get:Pw}};X.forEach(Fw,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Iw=e=>`- ${e}`,Lw=e=>X.isFunction(e)||e===null||e===!1;function Rw(e,t){e=X.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Lw(r)&&(i=Fw[(n=String(r)).toLowerCase()],i===void 0))throw new Z(`Unknown adapter '${n}'`);if(i&&(X.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new Z(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
90
|
-
`+e.map(
|
|
91
|
-
`):` `+
|
|
87
|
+
`+t.prev}function Pe(e,t){var n=ce(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=ge(e,i)?t(e[i],e):``}var a=typeof D==`function`?D(e):[],o;if(ee){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e)ge(e,c)&&(n&&String(Number(c))===c&&c<e.length||ee&&o[`$`+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))));if(typeof D==`function`)for(var l=0;l<a.length;l++)te.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}})),Mb=n(((e,t)=>{var n=jb(),r=kb(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=c(e,t);return n&&e&&!e.next&&(e=void 0),!!n},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}})),Nb=n(((e,t)=>{t.exports=Object})),Pb=n(((e,t)=>{t.exports=Error})),Fb=n(((e,t)=>{t.exports=EvalError})),Ib=n(((e,t)=>{t.exports=RangeError})),Lb=n(((e,t)=>{t.exports=ReferenceError})),Rb=n(((e,t)=>{t.exports=SyntaxError})),zb=n(((e,t)=>{t.exports=URIError})),Bb=n(((e,t)=>{t.exports=Math.abs})),Vb=n(((e,t)=>{t.exports=Math.floor})),Hb=n(((e,t)=>{t.exports=Math.max})),Ub=n(((e,t)=>{t.exports=Math.min})),Wb=n(((e,t)=>{t.exports=Math.pow})),Gb=n(((e,t)=>{t.exports=Math.round})),Kb=n(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),qb=n(((e,t)=>{var n=Kb();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Jb=n(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Yb=n(((e,t)=>{var n=Jb();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),Xb=n(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Zb=n(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),Qb=n(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=Zb();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),$b=n(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),ex=n(((e,t)=>{t.exports=Nb().getPrototypeOf||null})),tx=n(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),nx=n(((e,t)=>{var n=tx();t.exports=Function.prototype.bind||n})),rx=n(((e,t)=>{t.exports=Function.prototype.call})),ix=n(((e,t)=>{t.exports=Function.prototype.apply})),ax=n(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),ox=n(((e,t)=>{var n=nx(),r=ix(),i=rx();t.exports=ax()||n.call(i,r)})),sx=n(((e,t)=>{var n=nx(),r=kb(),i=rx(),a=ox();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),cx=n(((e,t)=>{var n=sx(),r=Yb(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),lx=n(((e,t)=>{var n=$b(),r=ex(),i=cx();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),ux=n(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=nx().call(n,r)})),dx=n(((e,t)=>{var n,r=Nb(),i=Pb(),a=Fb(),o=Ib(),s=Lb(),c=Rb(),l=kb(),u=zb(),d=Bb(),f=Vb(),p=Hb(),m=Ub(),h=Wb(),g=Gb(),_=qb(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Yb(),x=Xb(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=Qb()(),T=lx(),E=ex(),D=$b(),O=ix(),ee=rx(),k={},te=typeof Uint8Array>`u`||!T?n:T(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":k,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":te,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":ee,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){A[`%Error.prototype%`]=T(T(e))}var j=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return A[t]=n,n},ne={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},M=nx(),re=ux(),N=M.call(ee,Array.prototype.concat),ie=M.call(O,Array.prototype.splice),ae=M.call(ee,String.prototype.replace),oe=M.call(ee,String.prototype.slice),se=M.call(ee,RegExp.prototype.exec),ce=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,le=/\\(\\)?/g,ue=function(e){var t=oe(e,0,1),n=oe(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return ae(e,ce,function(e,t,n,i){r[r.length]=n?ae(i,le,`$1`):t||e}),r},de=function(e,t){var n=e,r;if(re(ne,n)&&(r=ne[n],n=`%`+r[0]+`%`),re(A,n)){var i=A[n];if(i===k&&(i=j(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(se(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ue(e),r=n.length>0?n[0]:``,i=de(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],ie(n,N([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=oe(p,0,1),h=oe(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,re(A,a))o=A[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=re(o,p),o=o[p];f&&!s&&(A[a]=o)}}return o}})),fx=n(((e,t)=>{var n=dx(),r=sx(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),px=n(((e,t)=>{var n=dx(),r=fx(),i=jb(),a=kb(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}})),mx=n(((e,t)=>{var n=dx(),r=fx(),i=jb(),a=px(),o=kb(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a})),hx=n(((e,t)=>{var n=kb(),r=jb(),i=Mb(),a=px(),o=mx()||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+(e&&Object(e)===e?`the given object key`:r(e)))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=o(),e.set(t,n)}};return t}})),gx=n(((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),_x=n(((e,t)=>{var n=gx(),r=hx(),i=Xb(),a=Object.prototype.hasOwnProperty,o=Array.isArray,s=r(),c=function(e,t){return s.set(e,t),e},l=function(e){return s.has(e)},u=function(e){return s.get(e)},d=function(e,t){s.set(e,t)},f=r(),p=function(e,t){return f.set(e,t),e},m=function(e){return f.has(e)},h=function(e){return f.get(e)},g=function(){for(var e=[],t=0;t<256;++t)e[e.length]=`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase();return e}(),_=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)n[i]!==void 0&&(r[r.length]=n[i]);t.obj[t.prop]=r}}},v=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},y=function(e,t,n){t===`__proto__`&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},b=function(e,t){for(var n=t,r=Object.keys(e),i=0;i<r.length;++i){var a=parseInt(r[i],10);String(a)===r[i]&&a>n&&(n=a)}return n},x=function(e,t,n){var r=[e,t];if(n&&typeof n.arrayLimit==`number`&&r.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+n.arrayLimit+` element`+(n.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(r,n),1)}return r},S=function e(t,n,r){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(o(t)){var i=t.length;if(r&&typeof r.arrayLimit==`number`&&i>=r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(t.concat(n),r),i)}t[i]=n}else if(t&&typeof t==`object`){if(l(t)){var s=u(t)+1;t[s]=n,d(t,s)}else if(r&&r.strictMerge&&m(t)){var f=h(t)+1;if(r.throwOnLimitExceeded&&typeof r.arrayLimit==`number`&&f>=r.arrayLimit)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);t[f]=n,p(t,f)}else if(r&&r.strictMerge){var g=x(t,n,r);return o(g)?p(g,1):g}else(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0)}else return x(t,n,r);return t}if(!t||typeof t!=`object`){if(l(n)){for(var _=Object.keys(n),S=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},C=0;C<_.length;C++){var w=parseInt(_[C],10);S[w+1]=n[_[C]]}return c(S,u(n)+1)}var T=[t].concat(n);if(r&&typeof r.arrayLimit==`number`&&T.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(T,r),T.length-1)}return T}var E=t;if(o(t)&&!o(n)&&(E=v(t,r),m(t)&&p(E,t.length-1)),o(t)&&o(n)){if(n.forEach(function(n,i){if(a.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,r):t[t.length]=n}else t[i]=n}),r&&typeof r.arrayLimit==`number`&&t.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(v(t,r),t.length-1)}return t}return Object.keys(n).reduce(function(t,i){var o=n[i];if(a.call(t,i)?y(t,i,e(t[i],o,r)):y(t,i,o),l(n)&&!l(t)&&c(t,b(t,u(n))),l(t)){var s=parseInt(i,10);String(s)===i&&s>=0&&s>u(t)&&d(t,s)}if(m(t)){var f=parseInt(i,10);String(f)===i&&f>h(t)&&p(t,f)}return t},E)},C=function(e,t){return Object.keys(t).reduce(function(e,n){return y(e,n,t[n]),e},e)},w=function(e,t,n){if(typeof e==`string`&&e.indexOf(`%`)===-1)return e.indexOf(`+`)===-1?e:e.replace(/\+/g,` `);var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},T=typeof Symbol==`function`&&typeof Symbol.toPrimitive==`symbol`,E=Array.prototype.join,D=Array.prototype.toString,O=Object.prototype.toString,ee=function e(t,n){if(!t||typeof t!=`object`&&typeof t!=`function`||T&&t[Symbol.toPrimitive]!=null)return t;if(o(t)&&t.toString===D&&t.join===E){var i=n||r();if(i.has(t))return``;i.set(t,!0);for(var a,s=0;s<t.length;s+=1){var c=t[s],l=e(c,i);if(!a&&l!==c){a=[];for(var u=0;u<s;u+=1)a[u]=t[u]}a&&(a[s]=l)}return i.delete(t),a||t}if(typeof t.toString==`function`)return t;var d=t.valueOf;if(typeof d==`function`){var f=d.call(t);if(!f||typeof f!=`object`&&typeof f!=`function`)return String(f)}return O.call(t)},k=1024;t.exports={arrayToObject:v,assign:C,combine:function(e,t,n,r,i){if(l(e)){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);for(var a=o(t)?t:[t],s=u(e),f=0;f<a.length;++f)s+=1,e[s]=a[f];return d(e,s),e}var p=[].concat(e,t);if(p.length>n){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);return c(v(p,{plainObjects:r}),p.length-1)}return p},compact:function(e){for(var t=[{obj:{o:e},prop:`o`}],n=r(),i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],s=Object.keys(o),c=0;c<s.length;++c){var l=s[c],u=o[l];typeof u==`object`&&u&&!n.has(u)&&(t[t.length]={obj:o,prop:l},n.set(u,!0))}return _(t),e},decode:w,encode:function(e,t,r,i,a){if(e.length===0)return e;var o=e;if(typeof e==`symbol`?o=Symbol.prototype.toString.call(e):typeof e!=`string`&&(o=String(ee(e))),r===`iso-8859-1`)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`}).replace(/\+/g,`%2B`);for(var s=``,c=0;c<o.length;c+=k){var l=o.length>=k?o.slice(c,c+k):o;if(c+k<o.length){var u=l.charCodeAt(l.length-1);u>=55296&&u<=56319&&(l=l.slice(0,-1),--c)}for(var d=[],f=0;f<l.length;++f){var p=l.charCodeAt(f);p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===n.RFC1738&&(p===40||p===41)?d[d.length]=l.charAt(f):p<128?d[d.length]=g[p]:p<2048?d[d.length]=g[192|p>>6]+g[128|p&63]:p<55296||p>=57344?d[d.length]=g[224|p>>12]+g[128|p>>6&63]+g[128|p&63]:(f+=1,p=65536+((p&1023)<<10|l.charCodeAt(f)&1023),d[d.length]=g[240|p>>18]+g[128|p>>12&63]+g[128|p>>6&63]+g[128|p&63])}s+=d.join(``)}return s},isBuffer:function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},markOverflow:c,maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n[n.length]=t(e[r]);return n}return t(e)},merge:S,toCoercible:ee}})),vx=n(((e,t)=>{var n=hx(),r=_x(),i=gx(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,depth:1/0,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T,E,D){var O=t;if(D>E)throw RangeError(`Input depth exceeded depth option of `+E);for(var ee=T,k=0,te=!1;(ee=ee.get(m))!==void 0&&!te;){var A=ee.get(t);if(k+=1,A!==void 0){if(A===k)throw RangeError(`Cyclic object value`);te=!0}ee.get(m)===void 0&&(k=0)}if(O=typeof _==`function`?_(i,O):O,O instanceof Date?O=b(O):a===`comma`&&s(O)&&(O=r.maybeMap(O,function(e){return e instanceof Date?b(e):e})),O===null){if(u)return S(g&&!C?g(i,f.encoder,w,`key`,x):i);O=``}if(p(O)||r.isBuffer(O))return g?[S(C?i:g(i,f.encoder,w,`key`,x))+`=`+S(g(O,f.encoder,w,`value`,x))]:[S(i)+`=`+S(String(O))];var j=[];if(O===void 0)return j;var ne;if(a===`comma`&&s(O))C&&g&&(O=r.maybeMap(O,function(e){return e==null?e:g(e,f.encoder,w,`value`,x)})),ne=[{value:O.length>0?r.toCoercible(O).join(`,`)||null:void 0}];else if(s(_))ne=_;else{var M=Object.keys(O);ne=v?M.sort(v):M}var re=String(i),N=o&&s(O)&&O.length===1?re+`[]`:re;if(c&&s(O)&&O.length===0&&Object.keys(O).length===0)return N+`[]`;for(var ie=0;ie<ne.length;++ie){var ae=ne[ie],oe=typeof ae==`object`&&ae&&ae.value!==void 0?ae.value:O[ae];if(!(d&&oe===null)){var se=y&&h?String(ae).replace(/\./g,`%2E`):String(ae),ce=s(O)?typeof a==`function`?a(N,se):N:N+(y?`.`+se:`[`+se+`]`);T.set(t,k);var le=n();le.set(m,T),l(j,e(oe,ce,a,o,c,u,d,h,a===`comma`&&C&&s(O)?null:g,_,v,y,b,x,S,C,w,le,E,D+1))}}return j},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l=a.call(o,e.arrayFormat)?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat;if(`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0||f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,depth:typeof e.depth==`number`?e.depth:f.depth,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m];if(_!=null){var v=r[_];i.skipNulls&&v===null||l(u,h(v,i.encodeDotInKeys?String(_).replace(/\./g,`%2E`):String(_),d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p,i.depth,0))}}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B`+i.delimiter:b+=`utf8=%E2%9C%93`+i.delimiter),y.length>0?b+y:``}})),yx=n(((e,t)=>{var n=hx(),r=_x(),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=Object.getPrototypeOf,s=function(e){if(!e||typeof e!=`object`)return!1;if(a(e))return!0;var t=o(e);return t===Object.prototype||t===null},c=function(e){if(a(e)){var t=[];return t.length=e.length,t}return o(e)===null?{__proto__:null}:{}},l=function(e){for(var t=n(),r={},i=[{source:e,target:r}],a=0;a<i.length;++a)for(var o=i[a].source,l=i[a].target,u=Object.keys(o),d=0;d<u.length;++d){var f=o[u[d]];if(s(f)){if(!t.has(f)){var p=c(f);t.set(f,p),i[i.length]={source:f,target:p}}l[u[d]]=t.get(f)}else l[u[d]]=f}return r},u={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},d=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},f=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1){if(t.throwOnLimitExceeded)for(var r=0,i=e.indexOf(`,`);i>-1;){if(r+=1,r>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);i=e.indexOf(`,`,i+1)}return e.split(`,`)}if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},p=`utf8=%26%2310003%3B`,m=`utf8=%E2%9C%93`,h=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;o=o.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var s=t.parameterLimit===1/0?void 0:t.parameterLimit,c=o.split(t.delimiter,t.throwOnLimitExceeded&&s!==void 0?s+1:s);if(t.throwOnLimitExceeded&&s!==void 0&&c.length>s)throw RangeError(`Parameter limit exceeded. Only `+s+` parameter`+(s===1?``:`s`)+` allowed.`);var l=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<c.length;++h)c[h].indexOf(`utf8=`)===0&&(c[h]===m?g=`utf-8`:c[h]===p&&(g=`iso-8859-1`),l=h,h=c.length);for(h=0;h<c.length;++h)if(h!==l){var _=c[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b=y>1&&_.slice(y-2,y)===`[]`,x,S;if(y===-1?(x=t.decoder(_,u.decoder,g,`key`),S=t.strictNullHandling?null:``):(x=t.decoder(_.slice(0,y),u.decoder,g,`key`),x!==null&&(S=r.maybeMap(f(_.slice(y+1),t,a(n[x])?n[x].length:0),function(e){return t.decoder(e,u.decoder,g,`value`)}))),S&&t.interpretNumericEntities&&g===`iso-8859-1`&&(S=d(String(S))),b&&(S=a(S)?[S]:S),t.comma&&a(S)&&S.length>t.arrayLimit&&(S=r.combine([],S,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded)),x!==null){var C=i.call(n,x);C&&(t.duplicates===`combine`||b)?n[x]=r.combine(n[x],S,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded):(!C||t.duplicates===`last`)&&(n[x]=S)}}return n},g=function(e,t,n,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var s=i?t:f(t,n,a),c=e.length-1;c>=0;--c){var l,u=e[c];if(u===`[]`&&n.parseArrays)l=r.isOverflow(s)?s:n.allowEmptyArrays&&(s===``||n.strictNullHandling&&s===null)?[]:r.combine([],s,n.arrayLimit,n.plainObjects,n.throwOnLimitExceeded);else{l=n.plainObjects?{__proto__:null}:{};var d=u.charAt(0)===`[`&&u.charAt(u.length-1)===`]`?u.slice(1,-1):u,p=n.decodeDotInKeys?d.replace(/%2E/g,`.`):d,m=parseInt(p,10),h=!isNaN(m)&&u!==p&&String(m)===p&&m>=0&&n.parseArrays;if(!n.parseArrays&&p===``)l={0:s};else if(h&&m<n.arrayLimit)l=[],l[m]=s;else if(h&&n.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+n.arrayLimit+` element`+(n.arrayLimit===1?``:`s`)+` allowed in an array.`);else h?(l[m]=s,r.markOverflow(l,m)):p!==`__proto__`&&(l[p]=s)}s=l}return s},_=function(e){for(var t=``,n=0,r=0;r<e.length;r+=1){var i=e.charCodeAt(r);if(i===91)n+=1,t+=`[`;else if(i===93)n>0&&--n,t+=`]`;else if(i===46&&n===0&&r+1<e.length&&e.charCodeAt(r+1)!==46&&e.charCodeAt(r+1)!==91){for(var a=r+1,o=a;o<e.length&&e.charCodeAt(o)!==46&&e.charCodeAt(o)!==91;)o+=1;t+=`[`+e.slice(a,o)+`]`,r=o-1}else t+=e.charAt(r)}return t},v=function(e,t){var n=t.allowDots?_(e):e;if(t.depth<=0)return!t.plainObjects&&i.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var r=[],a=n.indexOf(`[`),o=a>=0?n.slice(0,a):n;if(o){if(!t.plainObjects&&i.call(Object.prototype,o)&&!t.allowPrototypes)return;r[r.length]=o}for(var s=n.length,c=a,l=0;c>=0&&l<t.depth;){for(var u=1,d=c+1,f=-1;d<s&&f<0;){var p=n.charCodeAt(d);p===91?u+=1:p===93&&(--u,u===0&&(f=d)),d+=1}if(f<0)return r[r.length]=`[`+n.slice(c)+`]`,r;var m=n.slice(c,f+1),h=m.slice(1,-1);if(!t.plainObjects&&i.call(Object.prototype,h)&&!t.allowPrototypes)return;r[r.length]=m,l+=1,c=n.indexOf(`[`,f+1)}if(c>=0){if(t.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+t.depth+` and strictDepth is true`);r[r.length]=`[`+n.slice(c)+`]`}return r},y=function(e,t,n,r){if(e){var i=v(e,n);if(i)return g(i,t,n,r)}},b=function(e){if(!e)return u;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?u.charset:e.charset,n=e.duplicates===void 0?u.duplicates:e.duplicates;if(n!==`combine`&&n!==`first`&&n!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);return{allowDots:e.allowDots===void 0?e.decodeDotInKeys===!0||u.allowDots:!!e.allowDots,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:u.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:u.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:u.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:u.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:u.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:u.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:u.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:u.decoder,delimiter:typeof e.delimiter==`string`||r.isRegExp(e.delimiter)?e.delimiter:u.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:u.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:u.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:u.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:u.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:u.strictDepth,strictMerge:typeof e.strictMerge==`boolean`?!!e.strictMerge:u.strictMerge,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:u.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`&&e.throwOnLimitExceeded}};t.exports=function(e,t){var n=b(t);if(e===``||e==null)return n.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?h(e,n):l(e),a=n.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],u=y(c,i[c],n,typeof e==`string`);a=r.merge(a,u,n)}return n.allowSparse===!0?a:r.compact(a)}})),bx=n(((e,t)=>{var n=vx(),r=yx();t.exports={formats:gx(),parse:r,stringify:n}}));function xx(e,t){return function(){return e.apply(t,arguments)}}var{toString:Sx}=Object.prototype,{getPrototypeOf:Cx}=Object,{iterator:wx,toStringTag:Tx}=Symbol,Ex=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Dx=e=>typeof e==`string`&&(e===`__proto__`||e===`constructor`||e===`prototype`),Ox=(e,t,n)=>e===Object.prototype||!n&&t===null,kx=e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(Dx(t))return!1;let n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&n.writable===!0})},Ax=(e,t)=>{let n=e,r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);let i=Cx(n);if(Ox(n,i,n===e))return!1;if(Ex(n,t))return!0;n=i}return!1},jx=(e,t)=>e!=null&&Ax(e,t)?e[t]:void 0,Mx=e=>{if(e==null||typeof e!=`object`&&typeof e!=`function`)return e;let t=Cx(e);if(t===null&&kx(e))return e;let n=Object.create(null),r=Object.create(null),i=[],a=e;for(;a!=null&&i.indexOf(a)===-1;){i.push(a);let o=a===e?t:Cx(a);if(Ox(a,o,a===e))break;let s=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(a));for(let t of s)Dx(t)||Ex(r,t)||(n[t]=e[t],r[t]=!0);a=o}return n},Nx=(e=>t=>{let n=Sx.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Px=e=>(e=e.toLowerCase(),t=>Nx(t)===e),Fx=e=>t=>typeof t===e,{isArray:Ix}=Array,Lx=Fx(`undefined`);function Rx(e){return e!==null&&!Lx(e)&&e.constructor!==null&&!Lx(e.constructor)&&Hx(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var zx=Px(`ArrayBuffer`);function Bx(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&zx(e.buffer),t}var Vx=Fx(`string`),Hx=Fx(`function`),Ux=Fx(`number`),Wx=e=>typeof e==`object`&&!!e,Gx=e=>e===!0||e===!1,Kx=e=>{if(!Wx(e))return!1;let t=Cx(e);return(t===null||t===Object.prototype||Cx(t)===null)&&!Ax(e,Tx)&&!Ax(e,wx)},qx=e=>{if(!Wx(e)||Rx(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Jx=Px(`Date`),Yx=Px(`File`),Xx=e=>!!(e&&e.uri!==void 0),Zx=e=>e&&e.getParts!==void 0,Qx=Px(`Blob`),$x=Px(`FileList`),eS=Px(`Set`),tS=e=>Wx(e)&&Hx(e.pipe);function nS(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var rS=nS(),iS=rS.FormData===void 0?void 0:rS.FormData,aS=e=>{if(!e)return!1;if(iS&&e instanceof iS)return!0;let t=Cx(e);if(!t||t===Object.prototype||!Hx(e.append))return!1;let n=Nx(e);return n===`formdata`||n===`object`&&Hx(e.toString)&&e.toString()===`[object FormData]`},oS=Px(`URLSearchParams`),[sS,cS,lS,uS]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Px),dS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function fS(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),Ix(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Rx(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function pS(e,t){if(Rx(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var mS=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,hS=e=>!Lx(e)&&e!==mS;function gS(...e){let{caseless:t,skipUndefined:n}=hS(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&pS(r,i)||i,o=Ex(r,a)?r[a]:void 0;Kx(o)&&Kx(e)?r[a]=gS(o,e):Kx(e)?r[a]=gS({},e):Ix(e)?r[a]=e.slice():(!n||!Lx(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||Rx(n)||(fS(n,i),typeof n!=`object`||Ix(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];OS.call(n,t)&&i(n[t],t)}}return r}var _S=(e,t,n,{allOwnKeys:r}={})=>(fS(t,(t,r)=>{n&&Hx(t)?Object.defineProperty(e,r,{__proto__:null,value:xx(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),vS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},bS=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Cx(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},SS=e=>{if(!e)return null;if(Ix(e))return e;let t=e.length;if(!Ux(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},CS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Cx(Uint8Array)),wS=(e,t)=>{let n=(e&&e[wx]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},TS=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ES=Px(`HTMLFormElement`),DS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:OS}=Object.prototype,kS=Px(`RegExp`),AS=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};fS(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},jS=e=>{AS(e,(t,n)=>{if(Hx(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];Hx(r)&&(t.enumerable=!1,`writable`in t?t.writable=!1:t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)})})},MS=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Ix(e)?r(e):r(String(e).split(t)),n},NS=()=>{},PS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function FS(e){return!!(e&&Hx(e.append)&&e[Tx]===`FormData`&&e[wx])}var IS=e=>{let t=new WeakSet,n=e=>{if(Wx(e)){if(t.has(e))return;if(Rx(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(eS(e)){r=[];for(let t of e){let e=n(t);!Lx(e)&&r.push(e)}}else r=Ix(e)?[]:{},fS(e,(e,t)=>{let i=n(e);!Lx(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},LS=Px(`AsyncFunction`),RS=e=>e&&(Wx(e)||Hx(e))&&Hx(e.then)&&Hx(e.catch),zS=((e,t)=>e?setImmediate:t?((e,t)=>(mS.addEventListener(`message`,({source:n,data:r})=>{n===mS&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),mS.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,Hx(mS.postMessage)),BS=typeof queueMicrotask<`u`?queueMicrotask.bind(mS):typeof process<`u`&&process.nextTick||zS,VS=e=>e!=null&&Hx(e[wx]),Z={isArray:Ix,isArrayBuffer:zx,isBuffer:Rx,isFormData:aS,isArrayBufferView:Bx,isString:Vx,isNumber:Ux,isBoolean:Gx,isObject:Wx,isPlainObject:Kx,isEmptyObject:qx,isReadableStream:sS,isRequest:cS,isResponse:lS,isHeaders:uS,isUndefined:Lx,isDate:Jx,isFile:Yx,isReactNativeBlob:Xx,isReactNative:Zx,isBlob:Qx,isRegExp:kS,isFunction:Hx,isStream:tS,isURLSearchParams:oS,isTypedArray:CS,isFileList:$x,forEach:fS,merge:gS,extend:_S,trim:dS,stripBOM:vS,inherits:yS,toFlatObject:bS,kindOf:Nx,kindOfTest:Px,endsWith:xS,toArray:SS,forEachEntry:wS,matchAll:TS,isHTMLForm:ES,hasOwnProperty:Ex,hasOwnProp:Ex,hasOwnInPrototypeChain:Ax,getSafeProp:jx,toSafeFlatObject:Mx,reduceDescriptors:AS,freezeMethods:jS,toObjectSet:MS,toCamelCase:DS,noop:NS,toFiniteNumber:PS,findKey:pS,global:mS,isContextDefined:hS,isSpecCompliantForm:FS,toJSONObject:IS,isAsyncFn:LS,isThenable:RS,setImmediate:zS,asap:BS,isIterable:VS,isSafeIterable:e=>e!=null&&Ax(e,wx)&&VS(e)},HS=Z.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),US=e=>{let t={},n,r,i;return e&&e.split(`
|
|
88
|
+
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=Z.hasOwnProp(t,n);!n||a&&Z.hasOwnProp(HS,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function WS(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var GS=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),KS=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function qS(e,t){return Z.isArray(e)?e.map(e=>qS(e,t)):WS(String(e).replace(t,``))}var JS=e=>qS(e,GS),YS=e=>qS(e,KS);function XS(e){let t=Object.create(null);return Z.forEach(e.toJSON(),(e,n)=>{t[n]=YS(e)}),t}var ZS=Symbol(`internals`);function QS(e){return e&&String(e).trim().toLowerCase()}function $S(e){return e===!1||e==null?e:Z.isArray(e)?e.map($S):JS(String(e))}function eC(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var tC=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function nC(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function rC(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r<t;r++){let i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function iC(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=nC(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=nC(i.slice(0,a));if(!tC.test(o))return;let s=o.toLowerCase();if(s===`__proto__`||s===`constructor`||s===`prototype`)return;let c=nC(i.slice(a+1));t[s]=rC(c)}for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);i?a?a=!1:t===92?a=!0:t===34&&(i=!1):t===34?i=!0:(t===44||t===59)&&(o(e),r=e+1)}return o(n.length),t}var aC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function oC(e,t,n,r,i){if(Z.isFunction(r))return r.call(this,t,n);if(i&&(t=n),Z.isString(t)){if(Z.isString(r))return t.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(t)}}function sC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function cC(e,t){let n=Z.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var lC=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=QS(t);if(!i)return;let a=Z.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=$S(e))}let a=(e,t)=>Z.forEach(e,(e,n)=>i(e,n,t));if(Z.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Z.isString(e)&&(e=e.trim())&&!aC(e))a(US(e),t);else if(Z.isObject(e)&&Z.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!Z.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],Z.hasOwnProp(n,i)?(r=n[i],n[i]=Z.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=QS(e),e){let n=Z.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return eC(e);if(Z.isFunction(t))return t.call(this,e,n);if(Z.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=QS(e),e){let n=Z.findKey(this,e);return!(!n||this[n]===void 0||t&&!oC(this,this[n],n,t))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=QS(e),e){let i=Z.findKey(n,e);i&&(!t||oC(n,n[i],i,t))&&(delete n[i],r=!0)}}return Z.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||oC(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return Z.forEach(this,(r,i)=>{let a=Z.findKey(n,i);if(a){t[a]=$S(r),delete t[i];return}let o=e?sC(i):String(i).trim();o!==i&&delete t[i],t[o]=$S(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return Z.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&Z.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
|
89
|
+
`)}getSetCookie(){let e=this.get(`set-cookie`);return Z.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return iC(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[ZS]=this[ZS]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=QS(e);t[r]||(cC(n,e),t[r]=!0)}return Z.isArray(e)?e.forEach(r):r(e),this}};lC.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),Z.reduceDescriptors(lC.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Z.freezeMethods(lC);var uC=`[REDACTED ****]`;function dC(e){if(Z.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function fC(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||Z.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof lC&&(e=e.toJSON()),r.push(e);let t;if(Z.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);Z.isUndefined(r)||(t[n]=r)});else{if(!Z.isPlainObject(e)&&dC(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?uC:i(a);Z.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function pC(e){try{return String(e)}catch{return``}}function mC(e){return e.errors.map(e=>{try{return e&&e.message?pC(e.message):pC(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var Q=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&Z.isArray(t.errors)&&t.errors.length&&(s=mC(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&Z.hasOwnProp(e,`redact`)?e.redact:void 0,n=Z.isArray(t)&&t.length>0?fC(e,t):Z.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Q.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,Q.ERR_BAD_OPTION=`ERR_BAD_OPTION`,Q.ECONNABORTED=`ECONNABORTED`,Q.ETIMEDOUT=`ETIMEDOUT`,Q.ECONNREFUSED=`ECONNREFUSED`,Q.ERR_NETWORK=`ERR_NETWORK`,Q.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,Q.ERR_DEPRECATED=`ERR_DEPRECATED`,Q.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,Q.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,Q.ERR_CANCELED=`ERR_CANCELED`,Q.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,Q.ERR_INVALID_URL=`ERR_INVALID_URL`,Q.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function hC(e){return Z.isPlainObject(e)||Z.isArray(e)}function gC(e){return Z.endsWith(e,`[]`)?e.slice(0,-2):e}function _C(e,t,n){return e?e.concat(t).map(function(e,t){return e=gC(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function vC(e){return Z.isArray(e)&&!e.some(hC)}var yC=Z.toFlatObject(Z,{},null,function(e){return/^is[A-Z]/.test(e)});function bC(e,t,n){if(!Z.isObject(e))throw TypeError(`target must be an object`);t||=new FormData;let r=(e,t)=>{let r=Z.getSafeProp(n,e);return Z.isUndefined(r)?t:r},i=r(`metaTokens`,!0),a=r(`visitor`)||h,o=r(`dots`,!1),s=r(`indexes`,!1),c=r(`Blob`)||typeof Blob<`u`&&Blob,l=r(`maxDepth`,100),u=c&&Z.isSpecCompliantForm(t),d=[];if(!Z.isFunction(a))throw TypeError(`visitor must be a function`);function f(e){if(e===null)return``;if(Z.isDate(e))return e.toISOString();if(Z.isBoolean(e))return e.toString();if(!u&&Z.isBlob(e))throw new Q(`Blob is not supported. Use a Buffer instead.`);if(Z.isArrayBuffer(e)||Z.isTypedArray(e)){if(u&&typeof c==`function`)return new c([e]);throw new Q(`Blob is not supported. Use a Buffer instead.`,Q.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new Q(`Object is too deeply nested (`+e+` levels). Max depth: `+l,Q.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(e,t){if(l===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!Z.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}function h(e,n,r){let a=e;if(Z.isReactNative(t)&&Z.isReactNativeBlob(e))return t.append(_C(r,n,o),f(e)),!1;if(e&&!r&&typeof e==`object`){if(Z.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=m(e,1);else if(Z.isArray(e)&&vC(e)||(Z.isFileList(e)||Z.endsWith(n,`[]`))&&(a=Z.toArray(e)))return n=gC(n),a.forEach(function(e,r){!(Z.isUndefined(e)||e===null)&&t.append(s===!0?_C([n],r,o):s===null?n:n+`[]`,f(e))}),!1}return hC(e)?!0:(t.append(_C(r,n,o),f(e)),!1)}let g=Object.assign(yC,{defaultVisitor:h,convertValue:f,isVisitable:hC});function _(e,n,r=0){if(!Z.isUndefined(e)){if(p(r),d.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));d.push(e),Z.forEach(e,function(e,i){(!(Z.isUndefined(e)||e===null)&&a.call(t,e,Z.isString(i)?i.trim():i,n,g))===!0&&_(e,n?n.concat(i):[i],r+1)}),d.pop()}}if(!Z.isObject(e))throw TypeError(`data must be an object`);return _(e),t}function xC(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function SC(e,t){this._pairs=[],e&&bC(e,this,t)}var CC=SC.prototype;CC.append=function(e,t){this._pairs.push([e,t])},CC.toString=function(e){let t=e?t=>e.call(this,t,xC):xC;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function wC(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function TC(e,t,n){if(!t)return e;e||=``;let r=Z.isFunction(n)?{serialize:n}:n,i=Z.getSafeProp(r,`encode`)||wC,a=Z.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):Z.isURLSearchParams(t)?t.toString():new SC(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var EC=Symbol(`internals`);function DC(e){return e?e.length:0}function OC(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function kC(e,t){let n=e.handlers,r=DC(n);n===t.handlersRef?r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()):(t.handlersRef=n,t.handlerEntries.clear()),t.handlersLength=r}var AC=class{constructor(){this.handlers=[],this[EC]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){let r={fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},i=this[EC];this.handlers??=[],kC(this,i);let a=i.nextId++;return this.handlers.push(r),i.handlerEntries.set(a,{handler:r,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,a}eject(e){let t=this[EC];kC(this,t);let n=t.handlerEntries.get(e);if(n){if(t.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(OC(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],kC(this,this[EC]))}forEach(e){let t=this[EC];kC(this,t),t.iterationDepth++;try{Z.forEach(this.handlers,function(t){t!==null&&e(t)})}finally{--t.iterationDepth||(kC(this,t),OC(this.handlers),t.handlersLength=DC(this.handlers))}}},jC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},MC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:SC,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},NC=e({hasBrowserEnv:()=>PC,hasStandardBrowserEnv:()=>IC,hasStandardBrowserWebWorkerEnv:()=>LC,navigator:()=>FC,origin:()=>RC}),PC=typeof window<`u`&&typeof document<`u`,FC=typeof navigator==`object`&&navigator||void 0,IC=PC&&(!FC||[`ReactNative`,`NativeScript`,`NS`].indexOf(FC.product)<0),LC=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,RC=PC&&window.location.href||`http://localhost`,zC={...NC,...MC};function BC(e,t){return bC(e,new zC.classes.URLSearchParams,{visitor:function(e,t,n,r){return zC.isNode&&Z.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var VC=100;function HC(e){if(e>VC)throw new Q(`FormData field is too deeply nested (`+e+` levels). Max depth: `+VC,Q.ERR_FORM_DATA_DEPTH_EXCEEDED)}function UC(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)HC(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function WC(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function GC(e){function t(e,n,r,i){HC(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&Z.isArray(r)?r.length:a,s?(Z.hasOwnProp(r,a)?r[a]=Z.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!Z.hasOwnProp(r,a)||!Z.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&Z.isArray(r[a])&&(r[a]=WC(r[a])),!o)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){let n={};return Z.forEachEntry(e,(e,r)=>{t(UC(e),r,n,0)}),n}return null}var KC=Object.freeze([`get`,`delete`,`head`,`options`,`post`,`put`,`patch`,`purge`,`link`,`unlink`,`query`]),qC=(e,t)=>e!=null&&Z.hasOwnProp(e,t)?e[t]:void 0;function JC(e,t,n){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var YC={transitional:jC,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=Z.isObject(e);if(i&&Z.isHTMLForm(e)&&(e=new FormData(e)),Z.isFormData(e))return r?JSON.stringify(GC(e)):e;if(Z.isArrayBuffer(e)||Z.isBuffer(e)||Z.isStream(e)||Z.isFile(e)||Z.isBlob(e)||Z.isReadableStream(e))return e;if(Z.isArrayBufferView(e))return e.buffer;if(Z.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=qC(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return BC(e,t).toString();if((a=Z.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=qC(this,`env`),r=n&&n.FormData;return bC(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),JC(e)):e}],transformResponse:[function(e){let t=qC(this,`transitional`)||YC.transitional,n=t&&t.forcedJSONParsing,r=qC(this,`responseType`),i=r===`json`;if(Z.isResponse(e)||Z.isReadableStream(e))return e;if(e&&Z.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,qC(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?Q.from(e,Q.ERR_BAD_RESPONSE,this,null,qC(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:zC.classes.FormData,Blob:zC.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};Z.forEach(KC,e=>{YC.headers[e]={}});function XC(e,t){let n=this||YC,r=t||n,i=lC.from(r.headers),a=r.data;return Z.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function ZC(e){return!!(e&&e.__CANCEL__)}var QC=class extends Q{constructor(e,t,n){super(e??`canceled`,Q.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function $C(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Q(`Request failed with status code `+n.status,n.status>=400&&n.status<500?Q.ERR_BAD_REQUEST:Q.ERR_BAD_RESPONSE,n.config,n.request,n))}var ew=/[\t\n\r]/g;function tw(e){if(typeof e!=`string`)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(ew,``)}function nw(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function rw(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function iw(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i),(...e)=>o(e)]}var aw=(e,t,n=3)=>{let r=0,i=rw(50,250);return iw(n=>{if(!n||!Z.isNumber(n.loaded))return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},ow=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sw=(e,t=Z.asap)=>(...n)=>t(()=>e(...n)),cw=zC.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,zC.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(zC.origin),zC.navigator&&/(msie|trident)/i.test(zC.navigator.userAgent)):()=>!0,lw=zC.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Z.isString(r)&&s.push(`path=${r}`),Z.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),Z.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function uw(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dw(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var fw=/^https?:(?!\/\/)/i;function pw(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${uC}`)}function mw(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${uC}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${uC}`);return n===-1?r:`${r}#${pw(t.slice(n+1))}`}function hw(e,t){if(typeof e==`string`){let n=tw(e);if(fw.test(n))throw new Q(`Invalid URL ${JSON.stringify(mw(n))}: missing "//" after protocol`,Q.ERR_INVALID_URL,t)}}function gw(e,t,n,r){hw(t,r);let i=!uw(t);return e&&(i||n===!1)?(hw(e,r),dw(e,t)):t}var _w=e=>e instanceof lC?{...e}:e,vw=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function yw(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return Z.isPlainObject(e)&&Z.isPlainObject(t)?Z.merge.call({caseless:r},e,t):Z.isPlainObject(t)?Z.merge({},t):Z.isArray(t)?t.slice():t}function i(e,t,n,i){if(!Z.isUndefined(t))return r(e,t,n,i);if(!Z.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!Z.isUndefined(t))return r(void 0,t)}function o(e,t){if(!Z.isUndefined(t))return r(void 0,t);if(!Z.isUndefined(e))return r(void 0,e)}function s(n){let r=Z.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!Z.isUndefined(r)){if(Z.isPlainObject(r)){if(Z.hasOwnProp(r,n))return r[n]}else return}let i=Z.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(Z.isPlainObject(i)&&Z.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(Z.hasOwnProp(t,a))return r(n,i);if(Z.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(_w(e),_w(t),n,!0)};return Z.forEach(vw({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=Z.hasOwnProp(l,r)?l[r]:i,o=a(Z.hasOwnProp(e,r)?e[r]:void 0,Z.hasOwnProp(t,r)?t[r]:void 0,r);Z.isUndefined(o)&&a!==c||(n[r]=o)}),Z.hasOwnProp(t,`validateStatus`)&&Z.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(Z.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var bw=[`content-type`,`content-length`];function xw(e,t,n){n===`content-only`?Object.entries(t||{}).forEach(([t,n])=>{bw.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}var Sw=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function Cw(e){let t=yw({},e),n=e=>Z.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=lC.from(s),t.url=TC(gw(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=Z.getSafeProp(c,`username`)||``,n=Z.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?Sw(n):``)))}catch(t){throw Q.from(t,Q.ERR_BAD_OPTION_VALUE,e)}}if(Z.isFormData(r)){let e=Z.getSafeProp(r,`getHeaders`);zC.hasStandardBrowserEnv||zC.hasStandardBrowserWebWorkerEnv||Z.isReactNative(r)?s.setContentType(void 0):Z.isFunction(e)&&xw(s,e.call(r),n(`formDataHeaderPolicy`))}if(zC.hasStandardBrowserEnv&&(Z.isFunction(i)&&(i=i(t)),i===!0||i==null&&cw(t.url))){let e=a&&o&&lw.read(o);e&&s.set(a,e)}return t}var ww=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Cw(e),i=r.data,a=lC.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p,m;function h(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let g=new XMLHttpRequest;g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout;function _(i){if(!g)return;if(g.status===0&&(nw(tw(r.url))||nw(zC.origin))!==`file`&&!(g.responseURL&&g.responseURL.startsWith(`file:`))){n(new Q(`Request aborted`,Q.ECONNABORTED,e,g)),h(),g=null;return}try{i?m&&m(i):p&&p()}catch(e){setTimeout(()=>{throw e})}if(!g)return;let a=lC.from(`getAllResponseHeaders`in g&&g.getAllResponseHeaders());$C(function(e){t(e),h()},function(e){n(e),h()},{data:!o||o===`text`||o===`json`?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:a,config:e,request:g}),g=null}`onloadend`in g?g.onloadend=_:g.onreadystatechange=function(){g&&g.readyState===4&&(g.status!==0||g.responseURL&&g.responseURL.startsWith(`file:`))&&setTimeout(_)},g.onabort=function(){g&&=(n(new Q(`Request aborted`,Q.ECONNABORTED,e,g)),h(),null)},g.onerror=function(t){let r=new Q(t&&t.message?t.message:`Network Error`,Q.ERR_NETWORK,e,g);r.event=t||null,n(r),h(),g=null},g.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||jC;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Q(t,i.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,e,g)),h(),g=null},i===void 0&&a.setContentType(null),`setRequestHeader`in g&&Z.forEach(XS(a),function(e,t){g.setRequestHeader(t,e)}),Z.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),o&&o!==`json`&&(g.responseType=r.responseType),c&&([d,p,m]=aw(c,!0),g.addEventListener(`progress`,d)),s&&g.upload&&([u,f]=aw(s),g.upload.addEventListener(`progress`,u),g.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{g&&=(n(!t||t.type?new QC(null,e,g):t),g.abort(),h(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let v=nw(r.url);v&&!zC.protocols.includes(v)?(n(new Q(`Unsupported protocol `+v+`:`,Q.ERR_BAD_REQUEST,e)),h()):g.send(i||null)})},Tw=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Q?t:new QC(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Q(`timeout of ${t}ms exceeded`,Q.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{r||(e.aborted?i.call(e):e.addEventListener(`abort`,i,{once:!0}))});let{signal:s}=n;return s.unsubscribe=()=>Z.asap(o),s},Ew=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Dw=async function*(e,t){for await(let n of Ow(e))yield*Ew(n,t)},Ow=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},kw=(e,t,n,r)=>{let i=Dw(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},Aw=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,jw=(e,t,n)=>t+2<n&&Aw(e.charCodeAt(t+1))&&Aw(e.charCodeAt(t+2)),Mw=e=>e<=57?e-48:(e&223)-55,Nw=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Pw=e=>e===9||e===10||e===12||e===13||e===32,Fw=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},Iw=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Lw=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);o===37&&jw(e,a,t)&&(o=Mw(e.charCodeAt(a+1))*16+Mw(e.charCodeAt(a+2)),a+=2),!Pw(o)&&(o===61?r++:!Nw(o)||r>0?i=!0:n++)}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?Iw(e):Fw(n)},Rw=(e,t)=>{if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let n=e.indexOf(`,`);if(n<0)return 0;let r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let e=0,t=i.length;e<t;e++){let n=i.charCodeAt(e);if(n===37&&jw(i,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=i.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};function zw(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return Rw(t===-1?e:e.slice(0,t),Lw)}var Bw=`1.20.0`,Vw=65536,Hw={cache:`default`,redirect:`follow`,referrer:`about:client`,referrerPolicy:``,mode:`cors`,integrity:``,keepalive:!1,priority:`auto`,window:null},{isFunction:Uw}=Z,Ww=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Gw=e=>{if(!Z.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Kw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},qw=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Jw=e=>{let t=Z.global!==void 0&&Z.global!==null?Z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?Uw(i):typeof fetch==`function`,c=Uw(a),l=Uw(o);if(!s)return!1;let u=s&&Uw(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&Kw(()=>{let e=!1,t=new a(zC.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&Kw(()=>Z.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Q(`Response type '${e}' is not supported`,Q.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(Z.isBlob(e))return e.size;if(Z.isSpecCompliantForm(e))return(await new a(zC.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(e)||Z.isArrayBuffer(e))return e.byteLength;if(Z.isURLSearchParams(e)&&(e+=``),Z.isString(e))return(await d(e)).byteLength},g=async(e,t)=>Z.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T,maxRedirects:E}=Cw(e),D=Z.isNumber(w)&&w>-1,O=Z.isNumber(T)&&T>-1,ee=t=>Z.hasOwnProp(e,t)?e[t]:void 0,k=i||fetch;b=b?(b+``).toLowerCase():`text`;let te=Tw([l,d&&d.toAbortSignal()],_),A=null,j=te&&te.unsubscribe&&(()=>{te.unsubscribe()}),ne,M=null,re=()=>new Q(`Request body larger than maxBodyLength limit`,Q.ERR_BAD_REQUEST,e,A);try{let i,l=ee(`auth`);if(l&&(i={username:Z.getSafeProp(l,`username`)||``,password:Z.getSafeProp(l,`password`)||``}),qw(t)){let e=new URL(t,zC.origin);!i&&(e.username||e.password)&&(i={username:Gw(e.username),password:Gw(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(Ww((i.username||``)+`:`+(i.password||``))))),D&&typeof t==`string`&&t.startsWith(`data:`)&&zw(t)>w)throw new Q(`maxContentLength size of `+w+` exceeded`,Q.ERR_BAD_RESPONSE,e,A);if(O&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(ne=e,e>T))throw re()}let d=O&&(Z.isReadableStream(s)||Z.isStream(s)),_=(e,t,n)=>kw(e,Vw,e=>{if(O&&e>T)throw M=re();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(ne??=await g(x,s),ne!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(Z.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&ow(ne,aw(sw(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new Q(`Stream request bodies are not supported by the current fetch implementation`,Q.ERR_NOT_SUPPORT,e,A);Z.isString(S)||(S=S?`include`:`omit`);let N=c&&`credentials`in a.prototype;if(Z.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+Bw,!1);let ie=C==null?C:Object.assign(Object.create(null),C);ie&&(delete ie.body,delete ie.headers,delete ie.method,delete ie.signal,delete ie.duplex,delete ie.credentials);let ae=Object.assign(Object.create(null),ie,{signal:te,method:n.toUpperCase(),headers:XS(x.normalize()),body:s,duplex:`half`,credentials:N?S:void 0});c&&(Z.forEach(Hw,(e,t)=>{ae[t]===void 0&&(ae[t]=e)}),ae.signal===void 0&&(ae.signal=null),ae.body===void 0&&(ae.body=null)),E===0&&(ae.redirect=`manual`,ie&&(ie.redirect=`manual`)),A=c&&new a(t,ae);let oe=await(c?k(A,ie):k(t,ae)),se=lC.from(oe.headers);if(D){let t=Z.toFiniteNumber(se.getContentLength());if(t!=null&&t>w)throw new Q(`maxContentLength size of `+w+` exceeded`,Q.ERR_BAD_RESPONSE,e,A)}let ce=p&&(b===`stream`||b===`response`);if(p&&oe.body&&(v||D||ce&&j)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=oe[e]});let n=Z.toFiniteNumber(se.getContentLength()),[r,i]=v&&ow(n,aw(sw(v),!0))||[],a=0;oe=new o(kw(oe.body,Vw,t=>{if(D&&(a=t,a>w))throw new Q(`maxContentLength size of `+w+` exceeded`,Q.ERR_BAD_RESPONSE,e,A);r&&r(t)},()=>{i&&i(),j&&j()}),t)}b||=`text`;let le=await m[Z.findKey(m,b)||`text`](oe,e);if(D&&!p&&!ce){let t;if(le!=null&&(typeof le.byteLength==`number`?t=le.byteLength:typeof le.size==`number`?t=le.size:typeof le==`string`&&(t=typeof r==`function`?new r().encode(le).byteLength:le.length)),typeof t==`number`&&t>w)throw new Q(`maxContentLength size of `+w+` exceeded`,Q.ERR_BAD_RESPONSE,e,A)}return!ce&&j&&j(),await new Promise((t,n)=>{$C(t,n,{data:le,headers:lC.from(oe.headers),status:oe.status,statusText:oe.statusText,config:e,request:A})})}catch(t){if(j&&j(),te&&te.aborted&&te.reason instanceof Q){let n=te.reason;throw n.config=e,A&&(n.request=A),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(M)throw A&&!M.request&&(M.request=A),M;if(t instanceof Q)throw A&&!t.request&&(t.request=A),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new Q(`Network Error`,Q.ERR_NETWORK,e,A,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw Q.from(t,t&&t.code,e,A,t&&t.response)}}},Yw=new Map,Xw=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Yw;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Jw(t)),l=c;return c};Xw();var Zw={http:null,xhr:ww,fetch:{get:Xw}};Z.forEach(Zw,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Qw=e=>`- ${e}`,$w=e=>Z.isFunction(e)||e===null||e===!1;function eT(e,t){e=Z.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!$w(r)&&(i=Zw[(n=String(r)).toLowerCase()],i===void 0))throw new Q(`Unknown adapter '${n}'`);if(i&&(Z.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new Q(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
90
|
+
`+e.map(Qw).join(`
|
|
91
|
+
`):` `+Qw(e[0]):`as no adapter specified`),Q.ERR_NOT_SUPPORT)}return i}var tT={getAdapter:eT,adapters:Zw};function nT(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new QC(null,e)}function rT(e){let t=Z.toSafeFlatObject(e);return nT(t),t.headers=lC.from(Z.getSafeProp(t,`headers`)),t.data=XC.call(t,t.transformRequest),[`post`,`put`,`patch`].indexOf(t.method)!==-1&&t.headers.setContentType(`application/x-www-form-urlencoded`,!1),tT.getAdapter(t.adapter||YC.adapter,t)(t).then(function(e){nT(t),t.response=e;try{e.data=XC.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=lC.from(e.headers),e},function(e){if(!ZC(e)&&(nT(t),e&&e.response)){t.response=e.response;try{e.response.data=XC.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=lC.from(e.response.headers)}return Promise.reject(e)})}var iT={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{iT[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var aT={};iT.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Bw+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new Q(r(i,` has been removed`+(t?` in `+t:``)),Q.ERR_DEPRECATED);return t&&!aT[i]&&(aT[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},iT.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function oT(e,t,n){if(typeof e!=`object`||!e)throw new Q(`options must be an object`,Q.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new Q(`option `+a+` must be `+n,Q.ERR_BAD_OPTION_VALUE)}else if(n!==!0)throw new Q(`Unknown option `+a,Q.ERR_BAD_OPTION)}}var sT={assertOptions:oT,validators:iT},cT=sT.validators,lT=class{constructor(e){this.defaults=e||{},this.interceptors={request:new AC,response:new AC}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack,r=``;if(typeof n==`string`){let e=n.indexOf(`
|
|
92
92
|
`);r=e===-1?``:n.slice(e+1)}if(!e.stack)e.stack=r;else if(r){let t=r.indexOf(`
|
|
93
93
|
`),n=t===-1?-1:r.indexOf(`
|
|
94
94
|
`,t+1),i=n===-1?``:r.slice(n+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
95
|
-
`+r)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=
|
|
96
|
-
`)===-1&&e.indexOf(`\r`)===-1){if(c<
|
|
97
|
-
`),r=t===-1?n:n===-1||t<n?t:n;return r===-1?``:r===e.length-1&&e.charCodeAt(r)===
|
|
95
|
+
`+r)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=yw(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&sT.assertOptions(n,{silentJSONParsing:cT.transitional(cT.boolean),forcedJSONParsing:cT.transitional(cT.boolean),clarifyTimeoutError:cT.transitional(cT.boolean),legacyInterceptorReqResOrdering:cT.transitional(cT.boolean),advertiseZstdAcceptEncoding:cT.transitional(cT.boolean),validateStatusUndefinedResolves:cT.transitional(cT.boolean)},!1),r!=null&&(Z.isFunction(r)?t.paramsSerializer={serialize:r}:sT.assertOptions(r,{encode:cT.function,serialize:cT.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),sT.assertOptions(t,{baseUrl:cT.spelling(`baseURL`),withXsrfToken:cT.spelling(`withXSRFToken`)},!0),t.method=(Z.getSafeProp(t,`method`)||Z.getSafeProp(this.defaults,`method`)||`get`).toLowerCase();let a=i&&Z.merge(i.common,i[t.method]);i&&Z.forEach(KC.concat(`common`),e=>{delete i[e]}),t.headers=lC.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||jC;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[rT.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e?e(f):f}catch(e){if(!t){l=Promise.reject(e);break}try{let n=t.call(this,e);Z.isThenable(n)&&(l=Promise.resolve(n).then(()=>rT.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=rT.call(this,f)}catch(e){l=Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=yw(this.defaults,e),TC(gw(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};Z.forEach([`delete`,`get`,`head`,`options`],function(e){lT.prototype[e]=function(t,n){return this.request(yw(n||{},{method:e,url:t,data:n&&Z.hasOwnProp(n,`data`)?n.data:void 0}))}}),Z.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(yw(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}lT.prototype[e]=t(),e!==`query`&&(lT.prototype[e+`Form`]=t(!0))});var uT=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new QC(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function dT(e){return function(t){return e.apply(null,t)}}function fT(e){return Z.isObject(e)&&e.isAxiosError===!0}var pT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pT).forEach(([e,t])=>{pT[t]===void 0&&(pT[t]=e)});function mT(e){let t=new lT(e),n=xx(lT.prototype.request,t);return Z.extend(n,lT.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return mT(yw(e,t))},n}var hT=mT(YC);hT.Axios=lT,hT.CanceledError=QC,hT.CancelToken=uT,hT.isCancel=ZC,hT.VERSION=Bw,hT.toFormData=bC,hT.AxiosError=Q,hT.Cancel=hT.CanceledError,hT.all=function(e){return Promise.all(e)},hT.spread=dT,hT.isAxiosError=fT,hT.mergeConfig=yw,hT.AxiosHeaders=lC,hT.formToJSON=e=>GC(Z.isHTMLForm(e)?new FormData(e):e),hT.getAdapter=tT.getAdapter,hT.HttpStatusCode=pT,hT.default=hT;var gT=class extends Event{code;message;constructor(e,t){super(e),this.code=t?.code??void 0,this.message=t?.message??void 0}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return n(yT(this),t)}[Symbol.for(`Deno.customInspect`)](e,t){return e(yT(this),t)}};function _T(e){let t=globalThis.DOMException;return typeof t==`function`?new t(e,`SyntaxError`):SyntaxError(e)}function vT(e){return e instanceof Error?`errors`in e&&Array.isArray(e.errors)?e.errors.map(vT).join(`, `):`cause`in e&&e.cause instanceof Error?`${e}: ${vT(e.cause)}`:e.message:`${e}`}function yT(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var bT=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},xT=10,ST=13,CT=32,wT=6;function TT(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{maxBufferSize:t,onComment:n,onError:r,onEvent:i,onId:a,onRetry:o}=e,s=[],c=0,l=``,u,d=``,f=0,p,m=!1,h=!1,g=!1;function _(e){if(m)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(l!==void 0){if(e=l+e,e===``||e===`ï`||e===`ï»`){l=e;return}l=void 0,e=e.replace(/^(?:\uFEFF|\xEF\xBB\xBF)/,``)}if((h||g)&&(e=v(e),!e))return;if(!s.length){let t=S(e);t!==``&&y(t),x();return}if(e.indexOf(`
|
|
96
|
+
`)===-1&&e.indexOf(`\r`)===-1){if(c<wT&&!b(s.join(``)+e.slice(0,wT-c))){s.length=0,c=0,h=!0;return}s.push(e),c+=e.length,x();return}s.push(e);let t=s.join(``);s.length=0,c=0,y(S(t)),x()}function v(e){if(e.length===0)return e;if(g)return g=!1,e.charCodeAt(0)===xT?e.slice(1):e;let t=e.indexOf(`\r`),n=e.indexOf(`
|
|
97
|
+
`),r=t===-1?n:n===-1||t<n?t:n;return r===-1?``:r===e.length-1&&e.charCodeAt(r)===ST?(h=!1,g=!0,``):(h=!1,e.slice(r+(e.charCodeAt(r)===ST&&e.charCodeAt(r+1)===xT?2:1)))}function y(e){if(e){if(e.charCodeAt(e.length-1)===ST){if(C(e,0,e.length-1),x())return;g=!0}else b(e)?(s.push(e),c=e.length):h=!0}}function b(e){let t=e.charCodeAt(0);return t===58&&!!n||t===100&&OT(e,`data`)||t===101&&OT(e,`event`)||t===105&&OT(e,`id`)||t===114&&OT(e,`retry`)}function x(){return m?!0:t===void 0||c+d.length<=t?!1:(m=!0,s.length=0,c=0,u=void 0,d=``,f=0,p=void 0,h=!1,g=!1,r?.(new bT(`Buffered data exceeded max buffer size of ${t} characters`,{type:`max-buffer-size-exceeded`})),!0)}function S(e){let t=0;if(e.indexOf(`\r`)===-1){let n=e.indexOf(`
|
|
98
98
|
`,t);for(;n!==-1;){if(t===n){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0,t=n+1,n=e.indexOf(`
|
|
99
|
-
`,t);continue}let r=e.charCodeAt(t);if(
|
|
100
|
-
`,t);continue}d=f===0?o:`${d}\n${o}`,f++}else
|
|
99
|
+
`,t);continue}let r=e.charCodeAt(t);if(ET(e,t,r)){let r=e.charCodeAt(t+5)===CT?t+6:t+5,o=e.slice(r,n);if(f===0&&e.charCodeAt(n+1)===xT){u!==void 0&&a?.(u),i?.({id:u,event:p,data:o}),u=void 0,d=``,p=void 0,t=n+2,n=e.indexOf(`
|
|
100
|
+
`,t);continue}d=f===0?o:`${d}\n${o}`,f++}else DT(e,t,r)?p=e.slice(e.charCodeAt(t+6)===CT?t+7:t+6,n)||void 0:C(e,t,n);if(x())return``;t=n+1,n=e.indexOf(`
|
|
101
101
|
`,t)}return e.slice(t)}for(;t<e.length;){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
102
|
-
`,t),i=-1;if(n!==-1&&r!==-1?i=n<r?n:r:n===-1?r!==-1&&(i=r):i=n===e.length-1?-1:n,i===-1)break;if(C(e,t,i),x())return``;t=i+1,e.charCodeAt(t-1)===oT&&e.charCodeAt(t)===aT&&t++}return e.slice(t)}function C(e,t,r){if(t===r){T();return}let i=e.charCodeAt(t);if(uT(e,t,i)){let n=e.charCodeAt(t+5)===sT?t+6:t+5,i=e.slice(n,r);d=f===0?i:`${d}\n${i}`,f++;return}if(dT(e,t,i)){p=e.slice(e.charCodeAt(t+6)===sT?t+7:t+6,r)||void 0;return}if(i===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let n=e.slice(e.charCodeAt(t+3)===sT?t+4:t+3,r);n.includes(`\0`)||(u=n);return}if(i===58){if(n){let i=e.slice(t,r);n(i.slice(e.charCodeAt(t+1)===sT?2:1))}return}let a=e.slice(t,r),o=a.indexOf(`:`);if(o===-1){w(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===sT?2:1;w(s,a.slice(o+c),a)}function w(e,t,n){switch(e){case`event`:p=t||void 0;break;case`data`:d=f===0?t:`${d}\n${t}`,f++;break;case`id`:t.includes(`\0`)||(u=t);break;case`retry`:/^\d+$/.test(t)?o?.(parseInt(t,10)):r?.(new iT(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:n}));break;default:r?.(new iT(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:`unknown-field`,field:e,value:t,line:n}))}}function T(){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0}function E(e={}){if(e.consume&&s.length>0){let e=s.join(``);C(e,0,e.length)}l=``,u=void 0,d=``,f=0,p=void 0,s.length=0,c=0,m=!1,h=!1,g=!1}return{feed:_,reset:E}}function uT(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function dT(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}function fT(e,t){let n=1;for(;n<e.length&&n<t.length;){if(e.charCodeAt(n)!==t.charCodeAt(n))return!1;n++}return e.length<=t.length||e.charCodeAt(t.length)===58}var pT=104857600,mT=class extends EventTarget{static CONNECTING=0;static OPEN=1;static CLOSED=2;CONNECTING=0;OPEN=1;CLOSED=2;get readyState(){return this.#e}get url(){return this.#t.href}get withCredentials(){return this.#r}get onerror(){return this.#u}set onerror(e){this.#u&&this.removeEventListener(`error`,this.#u),this.#u=e,e&&this.addEventListener(`error`,e)}get onmessage(){return this.#d}set onmessage(e){this.#d&&this.removeEventListener(`message`,this.#d),this.#d=e,e&&this.addEventListener(`message`,e)}get onopen(){return this.#f}set onopen(e){this.#f&&this.removeEventListener(`open`,this.#f),this.#f=e,e&&this.addEventListener(`open`,e)}addEventListener(e,t,n){let r=t;super.addEventListener(e,r,n)}removeEventListener(e,t,n){let r=t;super.removeEventListener(e,r,n)}constructor(e,t){super();try{if(e instanceof URL)this.#t=e;else if(typeof e==`string`)this.#t=new URL(e,gT());else throw Error(`Invalid URL`)}catch{throw tT(`An invalid or illegal string was specified`)}this.#l=lT({maxBufferSize:t?.maxBufferSize??pT,onEvent:this.#v,onError:this.#b,onId:this.#_,onRetry:this.#y}),this.#e=this.CONNECTING,this.#a=3e3,this.#i=t?.fetch??globalThis.fetch,this.#r=t?.withCredentials??!1,this.#p()}close(){this.#o&&clearTimeout(this.#o),this.#e!==this.CLOSED&&(this.#c&&this.#c.abort(),this.#e=this.CLOSED,this.#c=void 0)}#e;#t;#n;#r;#i;#a;#o;#s=null;#c;#l;#u=null;#d=null;#f=null;#p(){this.#e=this.CONNECTING,this.#c=new AbortController;let e=this.#i;e(this.#t,this.#g()).then(this.#m).catch(this.#h)}#m=async e=>{this.#l.reset();let{body:t,redirected:n,status:r,headers:i}=e;if(r===204){this.#x(`Server sent HTTP 204, not reconnecting`,204),this.close();return}if(this.#n=n?new URL(e.url):void 0,r!==200){this.#x(`Non-200 status code (${r})`,r);return}let a=i.get(`content-type`)||``;if(!/^[\t\n\r ]*text\/event-stream[\t\n\r ]*(?:;|$)/i.test(a)){this.#x(`Invalid content type, expected "text/event-stream"`,r);return}if(this.#e===this.CLOSED)return;this.#e=this.OPEN;let o=new Event(`open`);if(this.dispatchEvent(o),typeof t!=`object`||!t||!(`getReader`in t)){this.#x(`Invalid response body, expected a web ReadableStream`,r),this.close();return}let s=new TextDecoder,c=t.getReader(),l=!0;do{let{done:e,value:t}=await c.read();if(this.#e===this.CLOSED){l=!1;break}t&&this.#l.feed(s.decode(t,{stream:!e})),e&&(l=!1,this.#l.reset(),this.#S())}while(l)};#h=e=>{this.#c=void 0,e.name!==`AbortError`&&e.type!==`aborted`&&this.#S(nT(e))};#g(){let e={mode:`cors`,redirect:`follow`,headers:{Accept:`text/event-stream`,...this.#s?{"Last-Event-ID":this.#i===globalThis.fetch&&globalThis.navigator?.userAgent===`Cloudflare-Workers`?this.#s:vT(this.#s)}:void 0},cache:`no-store`,signal:this.#c?.signal};return`window`in globalThis&&(e.credentials=this.withCredentials?`include`:`same-origin`),e}#_=e=>{this.#s=e};#v=e=>{if(this.#e===this.CLOSED)return;let t=this.#n?this.#n.origin:this.#t.origin,n=this.#s??``,r=new MessageEvent(e.event||`message`,{data:e.data,origin:t,lastEventId:n});r.origin!==t&&_T(r,`origin`,t),r.lastEventId!==n&&_T(r,`lastEventId`,n),this.dispatchEvent(r)};#y=e=>{this.#a=e};#b=e=>{e.type===`max-buffer-size-exceeded`&&(this.close(),this.#x(e.message))};#x(e,t){this.close();let n=new eT(`error`,{code:t,message:e});this.dispatchEvent(n)}#S(e,t){if(this.#e===this.CLOSED)return;this.#e=this.CONNECTING;let n=new eT(`error`,{code:t,message:e});this.dispatchEvent(n);let r=setTimeout(this.#C,this.#a);typeof r==`object`&&r&&`unref`in r&&r.unref(),this.#o=r}#C=()=>{this.#o=void 0,this.#e===this.CONNECTING&&this.#p()}};Object.defineProperty(mT,"name",{value:`EventSource`}),Object.defineProperty(mT,Symbol.for(`eventsource.supports-fetch-override`),{value:!0,writable:!1,configurable:!1,enumerable:!1});var hT=mT;function gT(){let e=`document`in globalThis?globalThis.document:void 0;return e&&typeof e==`object`&&`baseURI`in e&&typeof e.baseURI==`string`?e.baseURI:void 0}function _T(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0})}function vT(e){let t=``;for(let n of new TextEncoder().encode(e))t+=String.fromCharCode(n);return t}var yT=t(ix(),1),bT={"common.all":`All`,"common.backToList":`Back to List`,"common.cancel":`Cancel`,"common.close":`Close`,"common.confirm":`Confirm`,"common.create":`Create`,"common.createdAt":`Created At`,"common.delete":`Delete`,"common.edit":`Edit`,"common.login":`Login`,"common.logout":`Logout`,"common.manage":`Manage`,"common.results":e=>zT(e,{one:`${e} result`,other:`${e} results`}),"common.save":`Save`,"common.search":`Search`,"common.searchPlaceholder":`Search...`,"common.searchType":`Search Type`,"common.sort":`Sort`,"confirm.delete":`Are you sure you want to delete?`,"confirm.save":`Do you want to save?`,"dashboard.adminMenu":`Admin Menu`,"dashboard.createdAt":`Joined`,"dashboard.email":`Email`,"dashboard.loginRequired":`Please login to continue.`,"dashboard.name":`Name`,"dashboard.role":`Role`,"dashboard.title":`Admin Dashboard`,"dashboard.welcome":`Welcome!`,"delete.confirm.description":`This action cannot be undone. This will permanently delete this item.`,"delete.confirm.title":`Are you sure?`,"entity.create":e=>`Create ${e}`,"entity.edit":(e,t)=>`Edit ${e} (#${t})`,"entity.list":e=>`${e} List`,"entity.listManage":e=>`Manage ${e} List`,"error.alreadyProcessed":`Already processed`,"error.badRequest":`Bad request`,"error.detail":e=>e,"error.duplicateRow":`Duplicate data`,"error.forbidden":`Forbidden`,"error.internalServerError":`Internal server error`,"error.notFound":`Not found`,"error.serviceUnavailable":`Service unavailable`,"setting.invalidValue":e=>`Invalid setting value: ${e}`,"setting.unknownKey":e=>`Unknown setting key ${e}`,"qgrid.dispatcherFailed":e=>`${e} dispatcher failed to initialize`,"qgrid.dispatcherStarting":e=>`${e} dispatcher is starting up. Please retry shortly`,"qgrid.grokCapabilityUnavailable":e=>`Grok capability unavailable: ${e}`,"qgrid.grokCapacity":`All Grok tokens are at their in-flight request cap. Please retry shortly`,"qgrid.grokContentPolicy":e=>`Grok generation blocked by content policy: ${e}`,"qgrid.grokInvalidRequest":e=>`Invalid Grok request: ${e}`,"qgrid.openaiVoiceInvalidRequest":e=>`Invalid OpenAI voice request: ${e}`,"qgrid.grokLoginFailed":e=>`Grok login failed: ${e}`,"qgrid.grokNotOAuthToken":`Grok login returned credentials that are not an xAI OAuth token`,"qgrid.grokNoWorkers":e=>`No Grok token is available: ${e}`,"qgrid.grokRateLimited":e=>`All Grok tokens are rate limited. Retry after ${e} seconds`,"qgrid.grokOnDemandExcluded":e=>`All Grok tokens are excluded because on-demand billing is enabled at xAI: ${e}. Turn off on-demand billing, or add another account`,"qgrid.grokZdrVideoUnavailable":e=>`Grok video is unavailable because Zero Data Retention is on for: ${e}. Turn off the data-retention opt-out at xAI, or use a non-ZDR account`,"qgrid.invalidInput":e=>`qgrid: invalid input: ${e}`,"qgrid.requestBodyTooLarge":e=>`Request body exceeds the ${e} MiB limit`,"qgrid.videoJobNotFound":`video job not found`,"error.unauthorized":`Unauthorized`,notFound:(e,t)=>`${e} ID ${t} not found`,"validation.email":`Invalid email format`,"validation.maxLength":(e,t)=>`${e} must be at most ${t} characters`,"validation.minLength":(e,t)=>`${e} must be at least ${t} characters`,"validation.required":e=>`${e} is required`,"validation.url":`Invalid URL format`},xT={"common.all":`전체`,"common.backToList":`목록으로`,"common.cancel":`취소`,"common.close":`닫기`,"common.confirm":`확인`,"common.create":`생성`,"common.createdAt":`등록`,"common.delete":`삭제`,"common.edit":`수정`,"common.login":`로그인`,"common.logout":`로그아웃`,"common.manage":`관리`,"common.results":e=>`${e}개 결과`,"common.save":`저장`,"common.search":`검색`,"common.searchPlaceholder":`검색...`,"common.searchType":`검색 유형`,"common.sort":`정렬`,"confirm.delete":`정말 삭제하시겠습니까?`,"confirm.save":`저장하시겠습니까?`,"dashboard.adminMenu":`관리 메뉴`,"dashboard.createdAt":`가입일`,"dashboard.email":`이메일`,"dashboard.loginRequired":`로그인이 필요합니다.`,"dashboard.name":`이름`,"dashboard.role":`역할`,"dashboard.title":`관리자 대시보드`,"dashboard.welcome":`환영합니다!`,"delete.confirm.description":`이 작업은 취소할 수 없습니다. 항목이 영구적으로 삭제됩니다.`,"delete.confirm.title":`정말 삭제하시겠습니까?`,"entity.create":e=>`${e} 생성`,"entity.edit":(e,t)=>`${e} 수정 (#${t})`,"entity.list":e=>`${e} 목록`,"entity.listManage":e=>`${e} 목록 관리`,"error.alreadyProcessed":`이미 처리되었습니다`,"error.badRequest":`잘못된 요청입니다`,"error.detail":e=>e,"error.duplicateRow":`중복된 데이터입니다`,"error.entityNotFound":(e,t)=>`존재하지 않는 ${e} ID ${t}`,"error.forbidden":`권한이 없습니다`,"error.internalServerError":`서버 오류가 발생했습니다`,"error.notFound":`찾을 수 없습니다`,"error.serviceUnavailable":`서비스를 사용할 수 없습니다`,"setting.invalidValue":e=>`설정 값이 올바르지 않습니다: ${e}`,"setting.unknownKey":e=>`알 수 없는 설정 키 ${e}`,"qgrid.dispatcherFailed":e=>`${e} dispatcher 초기화에 실패했습니다`,"qgrid.dispatcherStarting":e=>`${e} dispatcher 기동 중입니다. 잠시 후 다시 시도해주세요`,"qgrid.grokCapabilityUnavailable":e=>`Grok 기능을 사용할 수 없습니다: ${e}`,"qgrid.grokCapacity":`모든 Grok 토큰이 동시 요청 한도에 도달했습니다. 잠시 후 다시 시도해주세요`,"qgrid.grokContentPolicy":e=>`콘텐츠 정책 위반으로 Grok 생성이 차단되었습니다: ${e}`,"qgrid.grokInvalidRequest":e=>`잘못된 Grok 요청입니다: ${e}`,"qgrid.openaiVoiceInvalidRequest":e=>`잘못된 OpenAI 음성 요청입니다: ${e}`,"qgrid.grokLoginFailed":e=>`Grok 로그인에 실패했습니다: ${e}`,"qgrid.grokNotOAuthToken":`Grok 로그인 결과가 xAI OAuth 토큰이 아닙니다`,"qgrid.grokNoWorkers":e=>`사용 가능한 Grok 토큰이 없습니다: ${e}`,"qgrid.grokRateLimited":e=>`모든 Grok 토큰이 요청 한도에 걸렸습니다. ${e}초 후 다시 시도해주세요`,"qgrid.grokOnDemandExcluded":e=>`xAI에서 on-demand 과금이 켜져 있어 모든 Grok 토큰이 제외되었습니다: ${e}. on-demand 과금을 끄거나 다른 계정을 추가해주세요`,"qgrid.grokZdrVideoUnavailable":e=>`Zero Data Retention이 켜져 있어 Grok 비디오를 사용할 수 없습니다: ${e}. xAI에서 data-retention opt-out을 끄거나 ZDR이 아닌 계정을 사용해주세요`,"qgrid.invalidInput":e=>`qgrid: 잘못된 입력입니다: ${e}`,"qgrid.requestBodyTooLarge":e=>`요청 본문이 ${e} MiB 제한을 초과했습니다`,"qgrid.videoJobNotFound":`비디오 작업을 찾을 수 없습니다`,"error.unauthorized":`인증이 필요합니다`,"error.unknownSearchField":e=>`구현되지 않은 검색 필드 ${e}`,notFound:(e,t)=>`존재하지 않는 ${e} ID ${t}`,"validation.email":`올바른 이메일 형식이 아닙니다`,"validation.maxLength":(e,t)=>`${e}${BT(e,`은는`)} 최대 ${t}자까지 입력할 수 있습니다`,"validation.minLength":(e,t)=>`${e}${BT(e,`은는`)} 최소 ${t}자 이상이어야 합니다`,"validation.required":e=>`${BT(e,`은는`)} 필수입니다`,"validation.url":`올바른 URL 형식이 아닙니다`},ST=`ko`,CT=[`ko`,`en`],wT=ST;function TT(e){wT=e}function ET(){return wT}var DT={"rc.asyncSelect.loading":`로딩 중...`,"rc.asyncSelect.noOptions":`옵션이 없습니다`,"rc.asyncSelect.noResults":`검색 결과가 없습니다`,"rc.asyncSelect.selectPlaceholder":`선택하세요...`,"rc.combobox.noResults":`검색 결과가 없습니다`,"rc.combobox.selectPlaceholder":`선택하세요...`,"rc.datePicker.pickDate":`날짜 선택`,"rc.datePicker.placeholder":`날짜 선택`,"rc.datePicker.selectDate":`날짜 선택`,"rc.dateSelectorMultiple.addDate":`날짜 추가`,"rc.dateSelectorMultiple.dateRange":`기간`,"rc.dateSelectorMultiple.placeholder":`날짜 선택`,"rc.dateSelectorMultiple.singleDate":`단일`,"rc.fileInput.browseFiles":`파일 찾기`,"rc.fileInput.dropZone":`파일을 드래그하거나 클릭하여 업로드`,"rc.fileInput.filePlaceholder":`파일`,"rc.fileInput.imagePlaceholder":`이미지`,"rc.fileInput.maxFilesExceeded":e=>`최대 ${e}개 파일만 업로드 가능합니다`,"rc.fileInput.pending":`대기 중`,"rc.fileInput.remove":`제거`,"rc.fileInput.uploadFailed":`업로드 실패`,"rc.fileInput.uploading":`업로드 중...`,"rc.monthPickerMultiple.addMonth":`월 추가`,"rc.monthPickerMultiple.dateRange":`기간`,"rc.monthPickerMultiple.endDate":`종료일`,"rc.monthPickerMultiple.placeholder":`월 선택`,"rc.monthPickerMultiple.singleDate":`단일`,"rc.monthPickerMultiple.startDate":`시작일`,"rc.multiSelect.clear":`전체 해제`,"rc.multiSelect.close":`닫기`,"rc.multiSelect.moreItems":e=>`+${e}개 더보기`,"rc.multiSelect.noOptions":`옵션이 없습니다`,"rc.multiSelect.noOptionsSelected":`선택된 옵션이 없습니다`,"rc.multiSelect.noResults":`검색 결과가 없습니다`,"rc.multiSelect.optionsCount":e=>`${e}개 옵션`,"rc.multiSelect.selectAll":`전체 선택`,"rc.multiSelect.selectPlaceholder":`선택하세요...`,"rc.pagination.next":`다음`,"rc.pagination.previous":`이전`,"rc.pagination.showing":(e,t,n)=>`${n}개 중 ${e}-${t}`,"rc.calendar.month.0":`1월`,"rc.calendar.month.1":`2월`,"rc.calendar.month.2":`3월`,"rc.calendar.month.3":`4월`,"rc.calendar.month.4":`5월`,"rc.calendar.month.5":`6월`,"rc.calendar.month.6":`7월`,"rc.calendar.month.7":`8월`,"rc.calendar.month.8":`9월`,"rc.calendar.month.9":`10월`,"rc.calendar.month.10":`11월`,"rc.calendar.month.11":`12월`,"rc.sonamuFilter.title":`소나무 필터`,"rc.sonamuFilter.apply":`적용`,"rc.sonamuFilter.reset":`초기화`,"rc.sonamuFilter.addRule":`규칙 추가`,"rc.sonamuFilter.noRulesYet":`아직 규칙이 없습니다. "+ 규칙 추가"를 클릭하여 시작하세요.`,"rc.sonamuFilter.selectField":`필드 선택`,"rc.sonamuFilter.selectOperator":`연산자 선택`,"rc.sonamuFilter.selectOperatorFirst":`먼저 연산자를 선택하세요`,"rc.sonamuFilter.enterValue":`값 입력`,"rc.sonamuFilter.enterNumber":`숫자 입력`,"rc.sonamuFilter.notSupported":`지원하지 않음`,"rc.sonamuFilter.startDate":`시작일`,"rc.sonamuFilter.endDate":`종료일`,"rc.sonamuFilter.appliedFilters":`🌲 적용된 소나무 필터`,"rc.common.cancel":`취소`,"rc.common.save":`저장`},OT={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},kT={"entity.RequestLog":`RequestLog`,"entity.RequestLog.id":`ID`,"entity.RequestLog.created_at":`등록일시`,"entity.RequestLog.token_name":`토큰 이름`,"entity.RequestLog.project_name":`프로젝트 이름`,"entity.RequestLog.model_name":`모델 이름`,"entity.RequestLog.requested_model_name":`요청 모델 이름 (fallback 전)`,"entity.RequestLog.fallback_count":`모델 fallback 횟수`,"entity.RequestLog.user_prompt":`사용자 프롬프트`,"entity.RequestLog.system_prompt":`시스템 프롬프트`,"entity.RequestLog.response":`llm 응답 전문`,"entity.RequestLog.input_tokens":`입력 토큰`,"entity.RequestLog.output_tokens":`출력 토큰`,"entity.RequestLog.cache_read_tokens":`캐시 읽기 토큰`,"entity.RequestLog.cache_creation_tokens":`캐시 생성 토큰`,"entity.RequestLog.cache_creation_5m_tokens":`5분 TTL 캐시 생성 토큰`,"entity.RequestLog.cache_creation_1h_tokens":`1시간 TTL 캐시 생성 토큰`,"entity.RequestLog.duration_ms":`응답 소요시간(ms)`,"entity.RequestLog.ttft_ms":`first gen TTFT(ms)`,"entity.RequestLog.cost_usd":`API 비용`,"entity.RequestLog.cost_source":`비용 출처(provider/pricing_table/mixed)`,"entity.RequestLog.image_cost_usd":`이미지 생성 비용`,"entity.RequestLog.image_cost_method":`이미지 비용 계산 방식`,"entity.RequestLog.service_tier":`Requested OpenAI service tier`,"entity.RequestLog.effort":`effort level`,"entity.RequestLog.history":`inject_items 히스토리`,"entity.RequestLog.input_images":`현재 user turn 입력 이미지`,"entity.RequestLog.tools":`요청에 장착된 tool 정의 목록`,"entity.RequestLog.json_schema":`structured output 요청의 JSON Schema 원문 (detail 의 response 타입 표시용)`,"entity.RequestLog.status":`실행 상태`,"entity.RequestLog.error_message":`에러 메시지`,"entity.RequestLog.response_json_ok":`structured(jsonSchema) 요청의 응답 JSON 파싱 성공 여부. 비structured 요청은 null`,"entity.RequestLog.tool_call_count":`tool call 횟수`,"entity.RequestLog.is_image_generation":`이미지 생성 turn 여부 (quota 귀속용)`,"entity.RequestLog.is_structured":`structured output(jsonSchema) 요청 여부 (목록 구분 표시용)`,"entity.RequestLog.media_kind":`미디어 엔드포인트 종류(image/video/stt/tts/live). 텍스트 요청은 null (목록 Fmt 표시용)`,"enum.RequestLogOrderBy.id-desc":`ID최신순`,"enum.RequestLogOrderBy.id-asc":`ID오래된순`,"enum.RequestLogOrderBy.created_at-desc":`등록일시최신순`,"enum.RequestLogOrderBy.created_at-asc":`등록일시오래된순`,"enum.RequestLogOrderBy.ttft_ms-desc":`TTFT긴순`,"enum.RequestLogOrderBy.ttft_ms-asc":`TTFT짧은순`,"enum.RequestLogOrderBy.duration_ms-desc":`소요시간긴순`,"enum.RequestLogOrderBy.duration_ms-asc":`소요시간짧은순`,"enum.RequestLogOrderBy.input_tokens-desc":`입력토큰많은순`,"enum.RequestLogOrderBy.input_tokens-asc":`입력토큰적은순`,"enum.RequestLogOrderBy.output_tokens-desc":`출력토큰많은순`,"enum.RequestLogOrderBy.output_tokens-asc":`출력토큰적은순`,"enum.RequestLogOrderBy.cache_read_tokens-desc":`캐시읽기많은순`,"enum.RequestLogOrderBy.cache_read_tokens-asc":`캐시읽기적은순`,"enum.RequestLogOrderBy.cache_creation_tokens-desc":`캐시생성많은순`,"enum.RequestLogOrderBy.cache_creation_tokens-asc":`캐시생성적은순`,"enum.RequestLogOrderBy.cost_usd-desc":`비용높은순`,"enum.RequestLogOrderBy.cost_usd-asc":`비용낮은순`,"enum.RequestLogSearchField.id":`ID`,"enum.RequestLogSearchField.token_name":`토큰이름`,"enum.RequestLogSearchField.user_prompt":`사용자 프롬프트`,"enum.RequestLogStatus.running":`실행 중`,"enum.RequestLogStatus.succeeded":`성공`,"enum.RequestLogStatus.error":`에러`,"enum.RequestLogStatus.aborted":`중단`,"enum.RequestLogMediaKind.image":`이미지`,"enum.RequestLogMediaKind.video":`비디오`,"enum.RequestLogMediaKind.stt":`음성 인식`,"enum.RequestLogMediaKind.tts":`음성 합성`,"enum.RequestLogMediaKind.live":`실시간 대화`,"entity.RequestLogStep":`RequestLogStep`,"entity.RequestLogStep.id":`ID`,"entity.RequestLogStep.created_at":`등록일시`,"entity.RequestLogStep.request_log":`부모 request log ID`,"entity.RequestLogStep.step_index":`ai-sdk step number (0-based)`,"entity.RequestLogStep.type":`step 타입`,"entity.RequestLogStep.model_name":`실제 serving 모델`,"entity.RequestLogStep.requested_model_name":`요청 모델 (fallback 전)`,"entity.RequestLogStep.fallback_count":`모델 fallback 횟수`,"entity.RequestLogStep.input_tokens":`입력 토큰 (generate)`,"entity.RequestLogStep.output_tokens":`출력 토큰 (generate)`,"entity.RequestLogStep.cache_read_tokens":`캐시 읽기 토큰`,"entity.RequestLogStep.cache_creation_tokens":`캐시 생성 토큰`,"entity.RequestLogStep.cache_creation_5m_tokens":`5분 TTL 캐시 생성 토큰`,"entity.RequestLogStep.cache_creation_1h_tokens":`1시간 TTL 캐시 생성 토큰`,"entity.RequestLogStep.cost_usd":`step 비용 (micro-USD)`,"entity.RequestLogStep.cost_source":`비용 출처(provider/pricing_table)`,"entity.RequestLogStep.duration_ms":`소요시간(ms)`,"entity.RequestLogStep.ttft_ms":`Gen TTFT(ms)`,"entity.RequestLogStep.finish_reason":`완료 사유`,"entity.RequestLogStep.reasoning_text":`reasoning 텍스트`,"entity.RequestLogStep.reasoning_tokens":`reasoning 토큰 수`,"entity.RequestLogStep.tool_call_index":`같은 step 내 tool call 순서`,"entity.RequestLogStep.tool_call_id":`tool call ID`,"entity.RequestLogStep.tool_name":`tool 이름`,"entity.RequestLogStep.tool_args":`tool 인자 (JSON string)`,"entity.RequestLogStep.tool_result":`tool 결과 (JSON string)`,"entity.RequestLogStep.tool_duration_ms":`tool 실행 소요시간(ms)`,"entity.RequestLogStep.error":`step 에러 메시지`,"enum.RequestLogStepType.generate":`LLM 생성`,"enum.RequestLogStepType.tool_call":`Tool 호출`,"enum.RequestLogStepOrderBy.id-asc":`ID순`,"enum.RequestLogStepSearchField.id":`ID`,"entity.Setting":`Setting`,"entity.Setting.id":`ID`,"entity.Setting.created_at":`등록일시`,"entity.Setting.key":`설정 키 (예: slack.enabled)`,"entity.Setting.value":`설정 값 (문자열 저장, 앱에서 파싱·검증)`,"entity.Setting.updated_at":`최종 수정일시`,"enum.SettingOrderBy.key-asc":`키순`,"enum.SettingSearchField.key":`키`,"entity.Token":`Token`,"entity.Token.id":`ID`,"entity.Token.created_at":`등록일시`,"entity.Token.provider":`프로바이더`,"entity.Token.credentials":`인증 정보 (JSONB)`,"entity.Token.name":`토큰 이름`,"entity.Token.active":`활성 여부`,"entity.Token.reauth_required":`인증 만료로 재로그인이 필요한지 여부`,"entity.Token.ord":`정렬 순서`,"entity.Token.quota_threshold":`quota 사용률 임계치(%). null이면 미설정`,"entity.Token.weight":`가중 라운드로빈 라우팅 가중치 (1..100)`,"entity.Token.keepalive_enabled":`Anthropic 5시간 토큰 윈도우 keepalive 사용 여부`,"enum.TokenOrderBy.id-desc":`ID최신순`,"enum.TokenOrderBy.ord-asc":`순서순`,"enum.TokenSearchField.id":`ID`,"enum.TokenSearchField.name":`이름`},AT={ko:{...DT,...kT,...xT},en:{...OT,...bT}};function jT(e,t){let n=AT[t];if(n?.[e]!==void 0)return n[e];if(t!==ST&&AT[ST]?.[e]!==void 0)return AT[ST][e];for(let n of CT)if(n!==t&&n!==ST&&AT[n]?.[e]!==void 0)return AT[n][e];return e}function MT(e){return jT(e,ET())}MT.locale=e=>t=>jT(t,e),MT.enumLabels=e=>new Proxy({},{get(t,n){if(typeof n!=`symbol`)return jT(`enum.${e}.${n}`,ET())}});function NT(e,t){return typeof t==`string`&&(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/.test(t)||/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}$/.test(t))&&new Date(t).toString()!==`Invalid Date`?new Date(t):t}$w.defaults.transformResponse=[e=>{if(typeof e==`string`)try{return JSON.parse(e,NT)}catch{return e}return e}],$w.interceptors.request.use(e=>(e.headers[`Accept-Language`]=ET(),e));async function Q(e){try{return(await $w({...e})).data}catch(e){if($w.isAxiosError(e)&&e.response?.data){let t=e.response.data;throw new PT(e.response.status,t.message,t.issues)}throw e}}var PT=class extends Error{code;message;issues;isSonamuError;constructor(e,t,n){super(t),this.code=e,this.message=t,this.issues=n,this.isSonamuError=!0}};function FT(e){return e&&e.isSonamuError===!0}var IT=Y([`both`,`list`,`count`]);J({semanticQuery:J({embedding:Pv(G()).min(1024).max(1024),threshold:G().optional(),method:Y([`cosine`,`l2`,`inner_product`]).optional()})});function LT(e){return Rv([e,e.array()])}W().regex(/([0-9]{4}-[0-9]{2}-[0-9]{2}( [0-9]{2}:[0-9]{2}:[0-9]{2})*)$/,{message:`잘못된 SQLDate 타입`}).min(10).max(19).describe(`SQLDateTimeString`),J({name:W(),url:W(),mime_type:W(),size:G()});function RT(e,t,n,r={}){let{enabled:i=!0,retry:a=3,retryInterval:o=3e3}=r,[s,c]=(0,P.useState)({isConnected:!1,error:null,retryCount:0,isEnded:!1}),l=(0,P.useRef)(null),u=(0,P.useRef)(null),d=(0,P.useRef)(n);(0,P.useEffect)(()=>{d.current=n},[n]);let f=()=>{if(i)try{l.current&&=(l.current.close(),null),u.current&&=(clearTimeout(u.current),null);let n=yT.default.stringify(t),r=new hT(n?`${e}?${n}`:e,{fetch:(e,t)=>globalThis.fetch(e,{...t,headers:{...t?.headers,"Accept-Language":ET()}})});l.current=r,c(e=>({...e,isConnected:!1,error:null,isEnded:!1})),r.onopen=()=>{c(e=>({...e,isConnected:!0,error:null,retryCount:0,isEnded:!1}))},r.onerror=e=>{l.current===r&&(r.close(),c(e=>({...e,isConnected:!1,error:`Connection failed`,isEnded:!1})),c(e=>e.retryCount<a?(u.current=setTimeout(()=>{u.current!==null&&(c(e=>({...e,retryCount:e.retryCount+1,isEnded:!1})),f())},o),e):(l.current=null,{...e,error:`Connection failed after ${a} attempts`})))},r.addEventListener(`end`,()=>{if(l.current===r&&(r.close(),l.current=null,c(e=>({...e,isConnected:!1,error:null,isEnded:!0})),d.current.end)){let e=d.current.end;e(`end`)}}),Object.keys(d.current).forEach(e=>{let t=d.current[e];t&&r.addEventListener(e,n=>{if(l.current===r){try{let e=JSON.parse(n.data,NT);t(e)}catch(t){console.error(`Failed to parse SSE data for event ${e}:`,t)}c(e=>({...e,isEnded:!1}))}})}),r.onmessage=e=>{if(l.current===r)try{let t=JSON.parse(e.data,NT),n=d.current.message;n&&n(t)}catch(e){console.error(`Failed to parse SSE message:`,e)}}}catch(e){c(t=>({...t,error:e instanceof Error?e.message:`Unknown error`,isConnected:!1,isEnded:!1}))}};return(0,P.useEffect)(()=>(i&&(c({isConnected:!1,error:null,retryCount:0,isEnded:!1}),f()),()=>{l.current&&=(l.current.close(),null),u.current&&=(clearTimeout(u.current),null)}),[e,JSON.stringify(t),i]),s}function zT(e,t){let n=e===0&&t.zero||e===1&&t.one||t.other;return typeof n==`function`?n(e):n??e.toString()}function BT(e,t){let n=(()=>{let t=e.charCodeAt(e.length-1);return t<44032||t>55203?!1:(t-44032)%28!=0})();return e+{은는:n?`은`:`는`,이가:n?`이`:`가`,을를:n?`을`:`를`,과와:n?`과`:`와`,으로:n?`으로`:`로`}[t]}function VT(e){let t=new Set,n=[];for(let r of e.pages)for(let e of r?.rows??[]){let r=e?.id;if(r!==null){if(t.has(r))continue;t.add(r)}n.push(e)}let r=e.pages[0]?.total??0;return{pages:e.pages,pageParams:e.pageParams,rows:n,total:r}}function HT(e){let[t,n]=(0,P.useState)(!1),r=(0,P.useCallback)(async()=>{n(!0);try{await e.refetch()}finally{n(!1)}},[e]);return{...e,refresh:r,isRefreshing:t}}var UT;(function(e){async function t(e,t){return Q({method:`GET`,url:`/api/token/findById?${yT.default.stringify({subset:e,id:t})}`})}e.getToken=t;let n=e.getTokenQueryOptions=(e,n)=>x({queryKey:[`Token`,`getToken`,e,n],queryFn:()=>t(e,n)});e.useToken=(e,t,r)=>HT(g({...n(e,t),...r}));async function r(e,t){return Q({method:`GET`,url:`/api/token/findMany?${yT.default.stringify({subset:e,rawParams:t})}`})}e.getTokens=r;let i=e.getTokensQueryOptions=(e,t)=>x({queryKey:[`Token`,`getTokens`,e,t],queryFn:()=>r(e,t)});e.useTokens=(e,t,n)=>HT(g({...i(e,t),...n}));let a=e.getTokensInfiniteQueryOptions=(e,t)=>S({queryKey:[`Token`,`getTokens`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:VT});e.useTokensInfinite=(e,t,n)=>HT(A({...a(e,t),...n}));async function o(e){return Q({method:`POST`,url:`/api/token/reorder`,data:{ids:e}})}e.reorder=o,e.useReorderMutation=()=>D({mutationFn:e=>UT.reorder(e.ids)});async function s(e){return Q({method:`POST`,url:`/api/token/del`,data:{ids:e}})}e.del=s,e.useDelMutation=()=>D({mutationFn:e=>UT.del(e.ids)})})(UT||={});var WT;(function(e){async function t(e,t){return Q({method:`GET`,url:`/api/setting/findById?${yT.default.stringify({subset:e,id:t})}`})}e.getSetting=t;let n=e.getSettingQueryOptions=(e,n)=>x({queryKey:[`Setting`,`getSetting`,e,n],queryFn:()=>t(e,n)});e.useSetting=(e,t,r)=>HT(g({...n(e,t),...r}));async function r(e,t){return Q({method:`GET`,url:`/api/setting/findMany?${yT.default.stringify({subset:e,rawParams:t})}`})}e.getSettings=r;let i=e.getSettingsQueryOptions=(e,t)=>x({queryKey:[`Setting`,`getSettings`,e,t],queryFn:()=>r(e,t)});e.useSettings=(e,t,n)=>HT(g({...i(e,t),...n}));let a=e.getSettingsInfiniteQueryOptions=(e,t)=>S({queryKey:[`Setting`,`getSettings`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:VT});e.useSettingsInfinite=(e,t,n)=>HT(A({...a(e,t),...n}));async function o(){return Q({method:`GET`,url:`/api/setting/listSettings`})}e.getSettingList=o;let s=e.getSettingListQueryOptions=()=>x({queryKey:[`Setting`,`getSettingList`],queryFn:()=>o()});e.useSettingList=e=>HT(g({...s(),...e}));async function c(e,t){return Q({method:`POST`,url:`/api/setting/updateSetting`,data:{key:e,value:t}})}e.updateSetting=c,e.useUpdateSettingMutation=()=>D({mutationFn:e=>WT.updateSetting(e.key,e.value)});async function l(e){return Q({method:`POST`,url:`/api/setting/resetSetting`,data:{key:e}})}e.resetSetting=l,e.useResetSettingMutation=()=>D({mutationFn:e=>WT.resetSetting(e.key)});async function u(){return Q({method:`POST`,url:`/api/setting/triggerExpiryReminder`})}e.triggerExpiryReminder=u,e.useTriggerExpiryReminderMutation=()=>D({mutationFn:e=>WT.triggerExpiryReminder()})})(WT||={});var GT;(function(e){async function t(e,t){return Q({method:`GET`,url:`/api/requestLogStep/findById?${yT.default.stringify({subset:e,id:t})}`})}e.getRequestLogStep=t;let n=e.getRequestLogStepQueryOptions=(e,n)=>x({queryKey:[`RequestLogStep`,`getRequestLogStep`,e,n],queryFn:()=>t(e,n)});e.useRequestLogStep=(e,t,r)=>HT(g({...n(e,t),...r}));async function r(e,t){return Q({method:`GET`,url:`/api/requestLogStep/findMany?${yT.default.stringify({subset:e,rawParams:t})}`})}e.getRequestLogSteps=r;let i=e.getRequestLogStepsQueryOptions=(e,t)=>x({queryKey:[`RequestLogStep`,`getRequestLogSteps`,e,t],queryFn:()=>r(e,t)});e.useRequestLogSteps=(e,t,n)=>HT(g({...i(e,t),...n}));let a=e.getRequestLogStepsInfiniteQueryOptions=(e,t)=>S({queryKey:[`RequestLogStep`,`getRequestLogSteps`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:VT});e.useRequestLogStepsInfinite=(e,t,n)=>HT(A({...a(e,t),...n}));async function o(e){return Q({method:`POST`,url:`/api/requestLogStep/save`,data:{spa:e}})}e.save=o,e.useSaveMutation=()=>D({mutationFn:e=>GT.save(e.spa)});async function s(e){return Q({method:`POST`,url:`/api/requestLogStep/del`,data:{ids:e}})}e.del=s,e.useDelMutation=()=>D({mutationFn:e=>GT.del(e.ids)})})(GT||={});var KT;(function(e){async function t(e,t){return Q({method:`GET`,url:`/api/requestLog/findById?${yT.default.stringify({subset:e,id:t})}`})}e.getRequestLog=t;let n=e.getRequestLogQueryOptions=(e,n)=>x({queryKey:[`RequestLog`,`getRequestLog`,e,n],queryFn:()=>t(e,n)});e.useRequestLog=(e,t,r)=>HT(g({...n(e,t),...r}));async function r(e,t){return Q({method:`GET`,url:`/api/requestLog/findMany?${yT.default.stringify({subset:e,rawParams:t})}`})}e.getRequestLogs=r;let i=e.getRequestLogsQueryOptions=(e,t)=>x({queryKey:[`RequestLog`,`getRequestLogs`,e,t],queryFn:()=>r(e,t)});e.useRequestLogs=(e,t,n)=>HT(g({...i(e,t),...n}));let a=e.getRequestLogsInfiniteQueryOptions=(e,t)=>S({queryKey:[`RequestLog`,`getRequestLogs`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:VT});e.useRequestLogsInfinite=(e,t,n)=>HT(A({...a(e,t),...n}));async function o(e){return Q({method:`POST`,url:`/api/requestLog/save`,data:{spa:e}})}e.save=o,e.useSaveMutation=()=>D({mutationFn:e=>KT.save(e.spa)});async function s(e){return Q({method:`GET`,url:`/api/requestLog/responseTypeTs?${yT.default.stringify({id:e})}`})}e.responseTypeTs=s;let c=e.responseTypeTsQueryOptions=e=>x({queryKey:[`RequestLog`,`responseTypeTs`,e],queryFn:()=>s(e)});e.useResponseTypeTs=(e,t)=>HT(g({...c(e),...t}));async function l(e){return Q({method:`GET`,url:`/api/requestLog/toolsView?${yT.default.stringify({id:e})}`})}e.toolsView=l;let u=e.toolsViewQueryOptions=e=>x({queryKey:[`RequestLog`,`toolsView`,e],queryFn:()=>l(e)});e.useToolsView=(e,t)=>HT(g({...u(e),...t}));async function d(e){return Q({method:`POST`,url:`/api/requestLog/del`,data:{ids:e}})}e.del=d,e.useDelMutation=()=>D({mutationFn:e=>KT.del(e.ids)})})(KT||={});var qT;(function(e){async function t(e){return Q({method:`POST`,url:`/api/qgrid/query`,data:{args:e}})}e.query=t,e.useQueryMutation=()=>D({mutationFn:e=>qT.query(e.args)});async function n(e){return Q({method:`POST`,url:`/api/qgrid/prepareStream`,data:{args:e}})}e.prepareStream=n,e.usePrepareStreamMutation=()=>D({mutationFn:e=>qT.prepareStream(e.args)});function r(e,t,n){return RT(`/api/qgrid/queryStream`,e,t,n)}e.useQueryStream=r;async function i(e){return Q({method:`POST`,url:`/api/qgrid/createRun`,data:{input:e}})}e.createRun=i,e.useCreateRunMutation=()=>D({mutationFn:e=>qT.createRun(e.input)});async function a(e){return Q({method:`POST`,url:`/api/qgrid/appendStep`,data:{input:e}})}e.appendStep=a,e.useAppendStepMutation=()=>D({mutationFn:e=>qT.appendStep(e.input)});async function o(e){return Q({method:`POST`,url:`/api/qgrid/finishRun`,data:{input:e}})}e.finishRun=o,e.useFinishRunMutation=()=>D({mutationFn:e=>qT.finishRun(e.input)});async function s(){return Q({method:`GET`,url:`/api/qgrid/stats`})}e.stats=s;let c=e.statsQueryOptions=()=>x({queryKey:[`Qgrid`,`stats`],queryFn:()=>s()});e.useStats=e=>HT(g({...c(),...e}));async function l(e){return Q({method:`GET`,url:`/api/qgrid/totalCost?${yT.default.stringify({params:e})}`})}e.totalCost=l;let u=e.totalCostQueryOptions=e=>x({queryKey:[`Qgrid`,`totalCost`,e],queryFn:()=>l(e)});e.useTotalCost=(e,t)=>HT(g({...u(e),...t}));async function d(){return Q({method:`GET`,url:`/api/qgrid/projectNames`})}e.projectNames=d;let f=e.projectNamesQueryOptions=()=>x({queryKey:[`Qgrid`,`projectNames`],queryFn:()=>d()});e.useProjectNames=e=>HT(g({...f(),...e}));async function p(){return Q({method:`GET`,url:`/api/qgrid/modelNames`})}e.modelNames=p;let m=e.modelNamesQueryOptions=()=>x({queryKey:[`Qgrid`,`modelNames`],queryFn:()=>p()});e.useModelNames=e=>HT(g({...m(),...e}));async function h(e,t,n){return Q({method:`POST`,url:`/api/qgrid/addToken`,data:{provider:e,credentials:t,name:n}})}e.addToken=h,e.useAddTokenMutation=()=>D({mutationFn:e=>qT.addToken(e.provider,e.credentials,e.name)});async function _(e,t,n,r,i){return Q({method:`POST`,url:`/api/qgrid/updateToken`,data:{id:e,name:t,quotaThreshold:n,weight:r,keepaliveEnabled:i}})}e.updateToken=_;async function v(e){return Q({method:`POST`,url:`/api/qgrid/removeToken`,data:{id:e}})}e.removeToken=v,e.useRemoveTokenMutation=()=>D({mutationFn:e=>qT.removeToken(e.id)});async function y(e){return Q({method:`POST`,url:`/api/qgrid/toggleToken`,data:{id:e}})}e.toggleToken=y,e.useToggleTokenMutation=()=>D({mutationFn:e=>qT.toggleToken(e.id)});async function b(e){return Q({method:`POST`,url:`/api/qgrid/oauthStart`,data:{name:e}})}e.oauthStart=b,e.useOauthStartMutation=()=>D({mutationFn:e=>qT.oauthStart(e.name)});async function S(e){return Q({method:`POST`,url:`/api/qgrid/oauthComplete`,data:{pastedCode:e}})}e.oauthComplete=S,e.useOauthCompleteMutation=()=>D({mutationFn:e=>qT.oauthComplete(e.pastedCode)});async function C(e){return Q({method:`POST`,url:`/api/qgrid/oauthStartOpenAI`,data:{name:e}})}e.oauthStartOpenAI=C,e.useOauthStartOpenAIMutation=()=>D({mutationFn:e=>qT.oauthStartOpenAI(e.name)});async function w(e){return Q({method:`POST`,url:`/api/qgrid/oauthStartGrok`,data:{name:e}})}e.oauthStartGrok=w,e.useOauthStartGrokMutation=()=>D({mutationFn:e=>qT.oauthStartGrok(e.name)});async function T(e){return Q({method:`POST`,url:`/api/qgrid/oauthStartGrokDevice`,data:{name:e}})}e.oauthStartGrokDevice=T,e.useOauthStartGrokDeviceMutation=()=>D({mutationFn:e=>qT.oauthStartGrokDevice(e.name)});async function E(e){return Q({method:`POST`,url:`/api/qgrid/oauthPollGrokDevice`,data:{deviceCode:e}})}e.oauthPollGrokDevice=E,e.useOauthPollGrokDeviceMutation=()=>D({mutationFn:e=>qT.oauthPollGrokDevice(e.deviceCode)});async function O(e){return Q({method:`POST`,url:`/api/qgrid/generateImages`,data:{params:e}})}e.generateImages=O,e.useGenerateImagesMutation=()=>D({mutationFn:e=>qT.generateImages(e.params)});async function k(e){return Q({method:`POST`,url:`/api/qgrid/videoStart`,data:{params:e}})}e.videoStart=k,e.useVideoStartMutation=()=>D({mutationFn:e=>qT.videoStart(e.params)});async function A(e){return Q({method:`POST`,url:`/api/qgrid/videoStatus`,data:{params:e}})}e.videoStatus=A,e.useVideoStatusMutation=()=>D({mutationFn:e=>qT.videoStatus(e.params)});async function ee(e){return Q({method:`POST`,url:`/api/qgrid/transcribe`,data:{params:e}})}e.transcribe=ee,e.useTranscribeMutation=()=>D({mutationFn:e=>qT.transcribe(e.params)});async function j(e){return Q({method:`POST`,url:`/api/qgrid/speak`,data:{params:e}})}e.speak=j,e.useSpeakMutation=()=>D({mutationFn:e=>qT.speak(e.params)});async function M(e){return Q({method:`POST`,url:`/api/qgrid/liveCall`,data:{params:e}})}e.liveCall=M,e.useLiveCallMutation=()=>D({mutationFn:e=>qT.liveCall(e.params)});async function te(e){return Q({method:`GET`,url:`/api/qgrid/usage?${yT.default.stringify({tokenId:e})}`})}e.usage=te;let N=e.usageQueryOptions=e=>x({queryKey:[`Qgrid`,`usage`,e],queryFn:()=>te(e)});e.useUsage=(e,t)=>HT(g({...N(e),...t}));async function ne(){return Q({method:`GET`,url:`/api/qgrid/health`})}e.health=ne;let re=e.healthQueryOptions=()=>x({queryKey:[`Qgrid`,`health`],queryFn:()=>ne()});e.useHealth=e=>HT(g({...re(),...e}))})(qT||={});var JT;(function(e){async function t(e){return Q({method:`GET`,url:`/api/monit/monitLogs?${yT.default.stringify({cursor:e})}`})}e.monitLogs=t;let n=e.monitLogsQueryOptions=e=>x({queryKey:[`Monit`,`monitLogs`,e],queryFn:()=>t(e)});e.useMonitLogs=(e,t)=>HT(g({...n(e),...t}));async function r(){return Q({method:`GET`,url:`/api/monit/monitInfo`})}e.monitInfo=r;let i=e.monitInfoQueryOptions=()=>x({queryKey:[`Monit`,`monitInfo`],queryFn:()=>r()});e.useMonitInfo=e=>HT(g({...i(),...e}));async function a(){return Q({method:`GET`,url:`/api/monit/monitStats`})}e.monitStats=a;let o=e.monitStatsQueryOptions=()=>x({queryKey:[`Monit`,`monitStats`],queryFn:()=>a()});e.useMonitStats=e=>HT(g({...o(),...e}))})(JT||={}),KT.useRequestLogs,KT.useRequestLogsInfinite,GT.useRequestLogSteps,GT.useRequestLogStepsInfinite,WT.useSettings,WT.useSettingsInfinite,UT.useTokens,UT.useTokensInfinite;function YT(e,t){return e.flatMap(e=>{let n=t?e.images??[]:[];return e.role===`user`?[{type:`message`,role:`user`,content:[{type:`input_text`,text:e.text},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[...e.text?[{type:`message`,role:`assistant`,content:[{type:`output_text`,text:e.text}]}]:[],...n.length?[{type:`message`,role:`user`,content:[{type:`input_text`,text:`Previously generated assistant images (reference for follow-up edits):`},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[]]})}function XT(e){return e.flatMap(e=>e.type===`image`?[`data:${e.mediaType??`image/png`};base64,${e.data}`]:[])}function ZT(e,t){return e.filter(e=>e.active&&e.provider===t).toSorted((e,t)=>e.ord-t.ord||e.name.localeCompare(t.name))}function QT(e,t){return t!==void 0&&!e.some(e=>e.active&&e.provider===t)}function $T(e,t,n){return!e||!n||t.some(t=>t.name===e)?e:``}function eE(e,t){return e.model!==t.model||e.system!==t.system||e.tokenName!==t.tokenName}function tE(e){return e?{tokenName:e}:{}}var nE=t(i(),1);function rE(e){let t=e.indexOf(`,`),n=e.slice(0,t).match(/^data:image\/(png|jpeg|webp);base64$/)?.[1];if(!n)return{extension:`—`,bytes:0};let r=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return{extension:n===`jpeg`?`jpg`:n,bytes:Math.max(0,Math.floor((e.length-t-1)*3/4)-r)}}function iE(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(2)} MB`}function aE({url:e,onClose:t}){let n=(0,P.useRef)(null),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(!1),l=rE(e);return(0,P.useEffect)(()=>{let e=n.current;return e?.showModal(),()=>e?.close()},[]),(0,nE.createPortal)((0,F.jsx)(`dialog`,{ref:n,"aria-labelledby":`chat-image-preview-title`,onCancel:e=>{e.preventDefault(),t()},className:`m-0 h-dvh max-h-none w-screen max-w-none overflow-hidden bg-transparent p-0 backdrop:bg-black/65`,children:(0,F.jsx)(`div`,{className:`grid size-full place-items-center p-4`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,F.jsxs)(`div`,{className:`w-[min(1100px,calc(100vw-2rem))] max-h-[calc(100dvh-2rem)] overflow-hidden rounded-2xl bg-white text-sand-900 shadow-xl`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-sand-100 px-4 py-3`,children:[(0,F.jsx)(`h2`,{id:`chat-image-preview-title`,className:`text-sm font-semibold`,children:`이미지 미리보기`}),(0,F.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`이미지 미리보기 닫기`,className:`grid size-8 place-items-center rounded-full hover:bg-sand-100`,children:(0,F.jsx)(pu,{className:`size-4`})})]}),(0,F.jsx)(`div`,{className:`max-h-[calc(100dvh-13rem)] overflow-auto bg-sand-100 p-3`,style:{backgroundImage:`conic-gradient(#e8e4df 25%, #fff 0 50%, #e8e4df 0 75%, #fff 0)`,backgroundSize:`20px 20px`},children:s?(0,F.jsx)(`p`,{role:`alert`,className:`p-8 text-center text-danger-500`,children:`이미지를 불러올 수 없습니다.`}):(0,F.jsx)(`img`,{src:e,alt:`확대된 채팅 이미지`,onLoad:e=>i({width:e.currentTarget.naturalWidth,height:e.currentTarget.naturalHeight}),onError:()=>c(!0),className:a?`block max-w-none`:`mx-auto block max-h-[calc(100dvh-15rem)] max-w-full object-contain`})}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-sand-100 px-4 py-3`,children:[(0,F.jsxs)(`dl`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-xs tabular-nums`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{className:`text-sand-400`,children:`확장자`}),(0,F.jsx)(`dd`,{className:`mt-1 uppercase`,children:l.extension})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{className:`text-sand-400`,children:`파일 용량`}),(0,F.jsx)(`dd`,{className:`mt-1`,children:iE(l.bytes)})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{className:`text-sand-400`,children:`해상도`}),(0,F.jsx)(`dd`,{className:`mt-1`,children:r?`${r.width} × ${r.height} px`:`—`})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 text-xs`,children:[(0,F.jsx)(`button`,{type:`button`,disabled:!r||s,onClick:()=>o(e=>!e),className:`text-sand-600 hover:underline disabled:opacity-40`,children:a?`화면에 맞추기`:`원본 크기`}),(0,F.jsx)(`a`,{href:e,download:`qgrid-image.${l.extension}`,className:`text-sienna-500 hover:underline`,children:`다운로드`})]})]})]})})}),document.body)}var oE=`qgrid_chat`,sE=`anthropic/claude-fable-5-1`,cE=new Map([[`openai`,`OpenAI`],[`anthropic`,`Anthropic`],[`grok`,`Grok`]]);function lE(e,t,n){let r=n!==void 0&&QT(n,t);return/NO_OPENAI_WORKERS|no ready openai workers|no anthropic tokens available/i.test(e)||r&&/기동 중입니다/.test(e)?`사용 가능한 ${t?cE.get(t)??t:``} 토큰이 없습니다. Tokens 페이지에서 토큰을 추가해주세요.`:e}function uE(e){return e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}var dE=4,fE=1536;async function pE(e){let t=await createImageBitmap(e),n=Math.min(1,fE/Math.max(t.width,t.height)),r=document.createElement(`canvas`);return r.width=Math.max(1,Math.round(t.width*n)),r.height=Math.max(1,Math.round(t.height*n)),r.getContext(`2d`).drawImage(t,0,0,r.width,r.height),t.close(),r.toDataURL(`image/jpeg`,.85)}function mE(){let[e,t]=(0,P.useState)(!1),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)([]),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(sE),[u,d]=(0,P.useState)(``),[f,p]=(0,P.useState)(``),[m,h]=(0,P.useState)(``),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(null),[b,x]=(0,P.useState)(!1),[S,C]=(0,P.useState)([]),[w,T]=(0,P.useState)(null),E=(0,P.useRef)(null);(0,P.useEffect)(()=>()=>E.current?.abort(),[]);let D=(0,P.useRef)(void 0),O=(0,P.useRef)(void 0),k=(0,P.useRef)(null),A=(0,P.useRef)(null),ee=(0,P.useRef)(null),j=c.split(`/`)[0],M=j===`openai`||j===`grok`,{data:N}=UT.useTokens(`A`,{orderBy:`ord-asc`},{enabled:e}),ne=(0,P.useMemo)(()=>ZT(N?.rows??[],j),[j,N?.rows]),re=N?.rows!==void 0,ie=(0,P.useRef)(void 0);(0,P.useEffect)(()=>{ie.current=N?.rows},[N?.rows]);let ae=N?.rows!==void 0&&QT(N.rows,j);(0,P.useEffect)(()=>{M||C([])},[M]),(0,P.useEffect)(()=>{d(e=>$T(e,ne,re))},[re,ne]);let oe=async e=>{if(!e)return;let t=dE-S.length,n=await Promise.all([...e].slice(0,t).map(e=>pE(e).catch(()=>null)));C(e=>[...e,...n.filter(e=>e!==null)].slice(0,dE))},se=e=>{a(t=>{let n=t[t.length-1];return!n||n.role!==`assistant`?t:[...t.slice(0,-1),e(n)]})},ce=e=>{let t=lE(e,O.current?.model.split(`/`)[0],ie.current);se(e=>e.status===`streaming`?{...e,status:`error`,error:t}:e),y(null),x(!1)},le=qT.useQueryStream({streamId:v??``},{delta:({text:e})=>{se(t=>t.status===`streaming`?{...t,text:t.text+e}:t)},toolCall:()=>{ce(`tool call 응답은 채팅에서 지원하지 않습니다`)},done:e=>{D.current=e.runContext?.threadCoord,se(t=>({...t,text:e.text||t.text,images:XT(Array.isArray(e.content)?e.content:[e.content]),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}}))},error:({message:e})=>{ce(e)},end:()=>{se(e=>e.status===`streaming`?{...e,status:`error`,error:`응답 완료 전에 스트림이 종료되었습니다`}:e),y(null),x(!1)}},{enabled:v!==null,retry:0});(0,P.useEffect)(()=>{v!==null&&le.error&&ce(le.error)},[le.error]),(0,P.useEffect)(()=>{k.current?.scrollTo({top:k.current.scrollHeight})},[i,e]),(0,P.useEffect)(()=>{e&&A.current?.focus()},[e]);let ue=async()=>{let e=o.trim();if(!e||b)return;let t=m.trim(),n=$T(u,ne,re),r={model:c,system:t,tokenName:n};O.current&&eE(O.current,r)&&(D.current=void 0),O.current=r;let l=M?S:[],d=YT(i,M),p=new AbortController;E.current=p;let h={role:`user`,text:e};l.length>0&&(h.images=l),a(e=>[...e,h,{role:`assistant`,text:``,status:`streaming`}]),s(``),C([]),x(!0);try{let r={prompt:e,model:c,projectName:oE,...tE(n)};if(t&&(r.system=t),f&&(r.effort=f),l.length>0&&(r.input=l.map(e=>({type:`image`,url:e}))),d.length>0&&(r.history=JSON.stringify(d)),D.current&&(r.runContext={threadCoord:D.current}),M){let e=await Q({method:`POST`,url:`/api/qgrid/query`,data:{args:{...r,imageGeneration:`auto`}},signal:p.signal});if(E.current!==p||p.signal.aborted)return;D.current=e.runContext?.threadCoord,se(t=>({...t,text:e.text,images:XT(e.content),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}})),x(!1),E.current=null;return}let{streamId:i}=await qT.prepareStream(r);if(E.current!==p||p.signal.aborted)return;y(i)}catch(e){if(E.current!==p||p.signal.aborted)return;ce(e instanceof Error?e.message:String(e)),E.current=null}},de=()=>{E.current?.abort(),E.current=null,se(e=>e.status===`streaming`?{...e,status:`aborted`}:e),y(null),x(!1)};return(0,F.jsxs)(`div`,{className:`fixed bottom-5 right-5 z-40`,children:[w&&(0,F.jsx)(aE,{url:w,onClose:()=>T(null)},w),e?(0,F.jsxs)(`div`,{onAnimationEnd:()=>{n&&(t(!1),r(!1))},className:`flex flex-col w-[min(400px,calc(100vw-2.5rem))] h-[min(640px,calc(100dvh-7rem))] bg-white rounded-2xl shadow-[0_16px_48px_rgba(44,36,24,0.18),0_0_0_1px_rgba(227,218,204,0.6)] overflow-hidden origin-bottom-right ${n?`chat-panel-pop-out`:`chat-panel-pop`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5 px-4 py-2.5 border-b border-sand-100 shrink-0`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`p`,{className:`text-[14px] font-semibold text-sand-900 leading-tight`,children:`채팅`}),(0,F.jsxs)(`p`,{className:`text-[11px] text-sand-400 truncate leading-tight`,children:[c,f?` · ${f}`:``,u?` · ${u}`:``]})]}),(0,F.jsxs)(`div`,{className:`ml-auto flex items-center gap-0.5`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>_(e=>!e),title:`모델·토큰·effort·system prompt 설정`,className:`size-8 grid place-items-center rounded-full transition-colors duration-150 ${g?`text-sienna-500 bg-sienna-50`:`text-sand-500 hover:text-sand-700 hover:bg-sand-100`}`,children:(0,F.jsx)(du,{className:`size-4`})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{b&&de(),a([]),D.current=void 0,O.current=void 0},disabled:i.length===0,title:`새 대화`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,F.jsx)(uu,{className:`size-4`})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?t(!1):r(!0)},title:`닫기`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 transition-colors duration-150`,children:(0,F.jsx)(pu,{className:`size-4.5`})})]})]}),g&&(0,F.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand-100 bg-sand-50/60 shrink-0 flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(`select`,{value:c,onChange:e=>l(e.target.value),disabled:b,className:`min-w-0 flex-1 rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-800 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:Cy.map(e=>(0,F.jsx)(`optgroup`,{label:e.label,children:e.models.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))},e.label))}),(0,F.jsxs)(`select`,{value:f,onChange:e=>p(e.target.value),disabled:b,className:`rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-600 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,F.jsx)(`option`,{value:``,children:`effort 기본`}),Ty.options.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))]})]}),(0,F.jsxs)(`select`,{value:u,onChange:e=>d(e.target.value),disabled:b,"aria-label":`요청 토큰`,className:`w-full rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-700 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,F.jsx)(`option`,{value:``,children:`토큰 자동 분배`}),ne.map(e=>(0,F.jsx)(`option`,{value:e.name,children:e.name},e.name))]}),(0,F.jsx)(`textarea`,{value:m,onChange:e=>h(e.target.value),disabled:b,placeholder:`system prompt (선택)`,rows:2,className:`w-full resize-none rounded-xl border border-sand-200/80 bg-white px-2.5 py-1.5 text-[12px] text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 disabled:opacity-50`})]}),(0,F.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto main-scroll px-3.5 py-3`,children:i.length===0?(0,F.jsx)(`div`,{className:`h-full grid place-items-center`,children:(0,F.jsxs)(`div`,{className:`text-center px-4`,children:[(0,F.jsx)(`img`,{src:mu,alt:``,className:`mx-auto mb-2.5 size-14 rounded-[35%] object-cover`}),(0,F.jsx)(`p`,{className:`text-[13px] text-sand-600`,children:`가용 토큰에게 바로 물어보세요.`}),(0,F.jsxs)(`p`,{className:`mt-1 text-[11px] text-sand-400`,children:[`대화는 저장되지 않고, 요청은`,` `,(0,F.jsx)(te,{to:`/logs`,search:{project:oE,page:1},className:`text-sienna-500 hover:underline`,children:`request log`}),`에 기록됩니다.`]})]})}):(0,F.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:i.map((e,t)=>e.role===`user`?(0,F.jsxs)(`div`,{className:`self-end max-w-[80%] flex flex-col items-end gap-1`,children:[e.images&&(0,F.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1`,children:e.images.map((e,t)=>(0,F.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`첨부 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,F.jsx)(`img`,{src:e,alt:``,className:`size-24 rounded-xl object-cover`})},t))}),(0,F.jsx)(`div`,{className:`rounded-[18px] rounded-br-[5px] bg-sienna-600 px-3.5 py-2 text-[13px] leading-relaxed text-white whitespace-pre-wrap break-words`,children:e.text})]},t):(0,F.jsxs)(`div`,{className:`self-start max-w-[88%] min-w-0`,children:[(0,F.jsxs)(`div`,{className:`rounded-[18px] rounded-bl-[5px] bg-sand-100 px-3.5 py-2`,children:[e.images?.map((e,t)=>(0,F.jsxs)(`div`,{className:`my-1.5`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`생성된 이미지 ${t+1} 크게 보기`,className:`block w-full cursor-zoom-in rounded-xl`,children:(0,F.jsx)(`img`,{src:e,alt:`생성된 이미지 ${t+1}`,onLoad:()=>k.current?.scrollTo({top:k.current.scrollHeight}),className:`w-full rounded-xl object-contain bg-white`})}),(0,F.jsx)(`a`,{href:e,download:`qgrid-image-${t+1}.${e.startsWith(`data:image/jpeg;`)?`jpg`:e.startsWith(`data:image/webp;`)?`webp`:`png`}`,className:`mt-1 inline-block text-[11px] text-sienna-500 hover:underline`,children:`이미지 다운로드`})]},t)),e.text?(0,F.jsx)(`div`,{className:`prose prose-sm prose-qgrid max-w-none text-[13px] leading-relaxed break-words`,children:(0,F.jsx)(rs,{remarkPlugins:[su],children:e.text})}):e.status===`streaming`?(0,F.jsxs)(`span`,{className:`inline-flex gap-1 py-1.5 px-0.5`,"aria-label":`응답 대기 중`,children:[(0,F.jsx)(`span`,{className:`chat-typing-dot`}),(0,F.jsx)(`span`,{className:`chat-typing-dot [animation-delay:150ms]`}),(0,F.jsx)(`span`,{className:`chat-typing-dot [animation-delay:300ms]`})]}):null,e.status===`aborted`&&(0,F.jsx)(`p`,{className:`mt-1 text-[10px] text-sand-400`,children:`중단됨`}),e.status===`error`&&(0,F.jsx)(`p`,{className:`mt-1 text-[12px] text-danger-500 break-words`,children:e.error})]}),e.meta&&(0,F.jsxs)(te,{to:e.meta.requestLogId===void 0?`/logs`:`/requests/show`,search:e.meta.requestLogId===void 0?{project:oE,page:1}:{id:e.meta.requestLogId},className:`mt-1 ml-1.5 inline-block text-[10px] tabular-nums text-sand-400 hover:text-sienna-500 transition-colors duration-150`,title:`request log 보기`,children:[e.meta.model,e.meta.fallback&&` (폴백)`,e.meta.tokenName?` · ${e.meta.tokenName}`:``,` · ${(e.meta.durationMs/1e3).toFixed(1)}s · ${uE(e.meta.costUsd)}`]})]},t))})}),ae&&(0,F.jsxs)(`div`,{className:`px-4 py-1.5 border-t border-caution-400/30 bg-caution-400/10 text-[11px] text-caution-500 shrink-0`,children:[cE.get(j)??j,` 토큰이 등록되어 있지 않습니다.`,` `,(0,F.jsx)(te,{to:`/tokens`,className:`font-medium underline hover:text-caution-400`,children:`Tokens 페이지`}),`에서 추가해주세요.`]}),(0,F.jsxs)(`div`,{className:`px-3 py-2.5 border-t border-sand-100 shrink-0`,children:[S.length>0&&(0,F.jsx)(`div`,{className:`flex gap-1.5 pb-2`,children:S.map((e,t)=>(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`첨부할 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,F.jsx)(`img`,{src:e,alt:``,className:`size-12 rounded-xl object-cover`})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>C(e=>e.filter((e,n)=>n!==t)),title:`첨부 제거`,className:`absolute -top-1.5 -right-1.5 size-4.5 grid place-items-center rounded-full bg-sand-800 text-white hover:bg-sand-700`,children:(0,F.jsx)(pu,{className:`size-2.5`})})]},t))}),(0,F.jsxs)(`div`,{className:`flex items-end gap-1.5`,children:[M&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`input`,{ref:ee,type:`file`,accept:`image/*`,multiple:!0,hidden:!0,onChange:e=>{oe(e.target.files),e.target.value=``}}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>ee.current?.click(),disabled:b||S.length>=dE,title:`이미지 첨부`,className:`size-9 shrink-0 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,F.jsx)(lu,{className:`size-4.5`})})]}),(0,F.jsx)(`textarea`,{ref:A,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ue())},placeholder:`메시지 입력...`,rows:1,className:`min-w-0 flex-1 resize-none [field-sizing:content] max-h-28 rounded-[20px] border border-sand-200/80 bg-sand-50/60 px-4 py-2 text-[13px] leading-relaxed text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 focus:bg-white transition-colors duration-150`}),b?(0,F.jsx)(`button`,{type:`button`,onClick:de,title:`응답 중단`,className:`size-9 shrink-0 grid place-items-center rounded-full border border-sand-200/80 text-sand-600 hover:bg-sand-100 active:scale-[0.96] transition-all duration-150`,children:(0,F.jsx)(fu,{className:`size-3.5`})}):(0,F.jsx)(`button`,{type:`button`,onClick:()=>void ue(),disabled:!o.trim(),title:`전송`,className:`size-9 shrink-0 grid place-items-center rounded-full bg-sienna-600 text-white hover:bg-sienna-700 disabled:opacity-40 active:scale-[0.96] transition-all duration-150`,children:(0,F.jsx)(cu,{className:`size-4.5`})})]})]})]}):(0,F.jsx)(`button`,{type:`button`,onClick:()=>t(!0),title:`채팅 열기`,"aria-label":`채팅 열기`,className:`block size-15 rounded-[35%] overflow-hidden shadow-[0_6px_20px_rgba(44,36,24,0.25)] hover:scale-105 active:scale-[0.96] transition-transform duration-150`,children:(0,F.jsx)(`img`,{src:mu,alt:``,className:`size-full object-cover`})})]})}var hE=`2.21.0`;function gE({className:e}){let t=ee({select:e=>e.location.pathname}),{tab:n=`tts`}=b({strict:!1});return(0,F.jsxs)(`aside`,{className:`hidden md:flex w-[200px] bg-sand-50 flex-col shrink-0 border-r border-sand-200/40 ${e??``}`,children:[(0,F.jsx)(`div`,{className:`h-11 flex items-center px-4 border-b border-sand-200/30`,children:(0,F.jsx)(`span`,{className:`text-[13px] font-semibold text-sand-800 tracking-tight`,children:`Qgrid`})}),(0,F.jsx)(`nav`,{className:`flex-1 px-2.5 py-3 space-y-4 overflow-y-auto`,children:be.map(e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`px-2 pb-1.5`,children:(0,F.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.08em] text-sand-400 font-medium`,children:e.label})}),(0,F.jsx)(`div`,{className:`space-y-0.5`,children:e.items.map(e=>{let r=Se(e.path,t),i=r&&!e.tabs;return(0,F.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,F.jsxs)(te,{to:e.path,className:`flex items-center gap-2 px-2 py-[6px] rounded-[7px] text-[13px] no-underline transition-all duration-150 ${i?`bg-sand-200/60 text-sand-900 font-medium`:r?`text-sand-900 font-medium hover:bg-sand-100`:`text-sand-500 hover:bg-sand-100 hover:text-sand-700`}`,style:i?{boxShadow:`0 0.5px 1px rgba(0,0,0,0.04), inset 0 0.5px 0 rgba(255,255,255,0.6)`}:void 0,children:[(0,F.jsx)(e.icon,{className:`size-[15px] shrink-0 ${r?`text-sienna-500`:`text-sand-400`}`}),(0,F.jsx)(`span`,{children:e.title})]}),e.tabs?.map(t=>{let i=r&&n===t;return(0,F.jsx)(te,{to:e.path,search:{tab:t},className:`flex items-center pl-[31px] pr-2 py-[5px] rounded-[7px] text-[12.5px] no-underline transition-all duration-150 ${i?`bg-sand-200/60 text-sand-900 font-medium`:`text-sand-500 hover:bg-sand-100 hover:text-sand-700`}`,children:ye[t]},t)})]},e.path)})})]},e.label))}),(0,F.jsx)(`div`,{className:`px-4 py-3 border-t border-sand-200/30`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`size-1.5 rounded-full bg-sage-400`}),(0,F.jsxs)(`span`,{className:`text-[10px] text-sand-400`,children:[`v`,hE]})]})})]})}var _E=new Map(Object.entries({"/":`Dashboard`,"/tokens":`Tokens`,"/logs":`Request Logs`,"/monit":`Server Logs`,"/voice":`Voice`}));function vE(e,t){return e.startsWith(`/requests/show`)?{parent:`Request Logs`,parentPath:`/logs`,current:`Detail`}:e===`/voice`?{parent:`Voice`,parentPath:`/voice`,current:ye[t]}:{current:_E.get(e)??e}}function yE(){let e=ee({select:e=>e.location.pathname}),{tab:t=`tts`}=b({strict:!1}),n=vE(e,t);return(0,F.jsx)(`div`,{className:`toolbar-glass h-11 shrink-0 flex items-center px-5`,children:(0,F.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-[13px]`,children:[n.parent&&n.parentPath&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(te,{to:n.parentPath,className:`text-sand-400 hover:text-sand-600 transition-colors no-underline`,children:n.parent}),(0,F.jsx)(`span`,{className:`text-sand-300 select-none`,children:`/`})]}),(0,F.jsx)(`span`,{className:`font-medium text-sand-800`,children:n.current})]})})}var bE=[`/login`,`/signup`];function xE({children:e}){(0,P.useEffect)(()=>{let e=navigator.language.split(`-`)[0],t=CT.find(t=>t===e);t!==void 0&&TT(t)},[]);let t=ee({select:e=>e.location.pathname}),n=!bE.includes(t);return(0,F.jsxs)(`div`,{className:`flex h-screen w-full bg-sand-100 overflow-hidden font-sans`,children:[n&&(0,F.jsx)(gE,{}),(0,F.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden min-w-0`,children:[n&&(0,F.jsx)(yE,{}),(0,F.jsx)(`main`,{className:`flex-1 overflow-y-auto main-scroll content-inset`,children:(0,F.jsx)(`div`,{className:`px-3 py-4 sm:px-6 sm:py-5 md:px-8`,children:(0,F.jsx)(P.Suspense,{fallback:(0,F.jsx)(`div`,{className:`text-sand-400 text-center py-8 text-sm`,children:`로딩 중...`}),children:e})})}),n&&(0,F.jsx)(Ce,{})]}),n&&(0,F.jsx)(mE,{})]})}var SE={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},CE=Object.create(null),wE=e=>({}),TE=new Proxy(CE,{get(e,t){return wE()[t]??CE[t]},has(e,t){return t in wE()||t in CE},set(e,t,n){let r=wE(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=wE(!0);return delete n[t],!0},ownKeys(){let e=wE(!0);return Object.keys(e)}});TE.NODE_ENV;function EE(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 EE(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return EE(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return EE(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return EE(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return EE(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return EE(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return EE(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function DE(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function OE(e){let t=e.split(`
|
|
102
|
+
`,t),i=-1;if(n!==-1&&r!==-1?i=n<r?n:r:n===-1?r!==-1&&(i=r):i=n===e.length-1?-1:n,i===-1)break;if(C(e,t,i),x())return``;t=i+1,e.charCodeAt(t-1)===ST&&e.charCodeAt(t)===xT&&t++}return e.slice(t)}function C(e,t,r){if(t===r){T();return}let i=e.charCodeAt(t);if(ET(e,t,i)){let n=e.charCodeAt(t+5)===CT?t+6:t+5,i=e.slice(n,r);d=f===0?i:`${d}\n${i}`,f++;return}if(DT(e,t,i)){p=e.slice(e.charCodeAt(t+6)===CT?t+7:t+6,r)||void 0;return}if(i===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let n=e.slice(e.charCodeAt(t+3)===CT?t+4:t+3,r);n.includes(`\0`)||(u=n);return}if(i===58){if(n){let i=e.slice(t,r);n(i.slice(e.charCodeAt(t+1)===CT?2:1))}return}let a=e.slice(t,r),o=a.indexOf(`:`);if(o===-1){w(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===CT?2:1;w(s,a.slice(o+c),a)}function w(e,t,n){switch(e){case`event`:p=t||void 0;break;case`data`:d=f===0?t:`${d}\n${t}`,f++;break;case`id`:t.includes(`\0`)||(u=t);break;case`retry`:/^\d+$/.test(t)?o?.(parseInt(t,10)):r?.(new bT(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:n}));break;default:r?.(new bT(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:`unknown-field`,field:e,value:t,line:n}))}}function T(){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0}function E(e={}){if(e.consume&&s.length>0){let e=s.join(``);C(e,0,e.length)}l=``,u=void 0,d=``,f=0,p=void 0,s.length=0,c=0,m=!1,h=!1,g=!1}return{feed:_,reset:E}}function ET(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function DT(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}function OT(e,t){let n=1;for(;n<e.length&&n<t.length;){if(e.charCodeAt(n)!==t.charCodeAt(n))return!1;n++}return e.length<=t.length||e.charCodeAt(t.length)===58}var kT=104857600,AT=class extends EventTarget{static CONNECTING=0;static OPEN=1;static CLOSED=2;CONNECTING=0;OPEN=1;CLOSED=2;get readyState(){return this.#e}get url(){return this.#t.href}get withCredentials(){return this.#r}get onerror(){return this.#u}set onerror(e){this.#u&&this.removeEventListener(`error`,this.#u),this.#u=e,e&&this.addEventListener(`error`,e)}get onmessage(){return this.#d}set onmessage(e){this.#d&&this.removeEventListener(`message`,this.#d),this.#d=e,e&&this.addEventListener(`message`,e)}get onopen(){return this.#f}set onopen(e){this.#f&&this.removeEventListener(`open`,this.#f),this.#f=e,e&&this.addEventListener(`open`,e)}addEventListener(e,t,n){let r=t;super.addEventListener(e,r,n)}removeEventListener(e,t,n){let r=t;super.removeEventListener(e,r,n)}constructor(e,t){super();try{if(e instanceof URL)this.#t=e;else if(typeof e==`string`)this.#t=new URL(e,MT());else throw Error(`Invalid URL`)}catch{throw _T(`An invalid or illegal string was specified`)}this.#l=TT({maxBufferSize:t?.maxBufferSize??kT,onEvent:this.#v,onError:this.#b,onId:this.#_,onRetry:this.#y}),this.#e=this.CONNECTING,this.#a=3e3,this.#i=t?.fetch??globalThis.fetch,this.#r=t?.withCredentials??!1,this.#p()}close(){this.#o&&clearTimeout(this.#o),this.#e!==this.CLOSED&&(this.#c&&this.#c.abort(),this.#e=this.CLOSED,this.#c=void 0)}#e;#t;#n;#r;#i;#a;#o;#s=null;#c;#l;#u=null;#d=null;#f=null;#p(){this.#e=this.CONNECTING,this.#c=new AbortController;let e=this.#i;e(this.#t,this.#g()).then(this.#m).catch(this.#h)}#m=async e=>{this.#l.reset();let{body:t,redirected:n,status:r,headers:i}=e;if(r===204){this.#x(`Server sent HTTP 204, not reconnecting`,204),this.close();return}if(this.#n=n?new URL(e.url):void 0,r!==200){this.#x(`Non-200 status code (${r})`,r);return}let a=i.get(`content-type`)||``;if(!/^[\t\n\r ]*text\/event-stream[\t\n\r ]*(?:;|$)/i.test(a)){this.#x(`Invalid content type, expected "text/event-stream"`,r);return}if(this.#e===this.CLOSED)return;this.#e=this.OPEN;let o=new Event(`open`);if(this.dispatchEvent(o),typeof t!=`object`||!t||!(`getReader`in t)){this.#x(`Invalid response body, expected a web ReadableStream`,r),this.close();return}let s=new TextDecoder,c=t.getReader(),l=!0;do{let{done:e,value:t}=await c.read();if(this.#e===this.CLOSED){l=!1;break}t&&this.#l.feed(s.decode(t,{stream:!e})),e&&(l=!1,this.#l.reset(),this.#S())}while(l)};#h=e=>{this.#c=void 0,e.name!==`AbortError`&&e.type!==`aborted`&&this.#S(vT(e))};#g(){let e={mode:`cors`,redirect:`follow`,headers:{Accept:`text/event-stream`,...this.#s?{"Last-Event-ID":this.#i===globalThis.fetch&&globalThis.navigator?.userAgent===`Cloudflare-Workers`?this.#s:PT(this.#s)}:void 0},cache:`no-store`,signal:this.#c?.signal};return`window`in globalThis&&(e.credentials=this.withCredentials?`include`:`same-origin`),e}#_=e=>{this.#s=e};#v=e=>{if(this.#e===this.CLOSED)return;let t=this.#n?this.#n.origin:this.#t.origin,n=this.#s??``,r=new MessageEvent(e.event||`message`,{data:e.data,origin:t,lastEventId:n});r.origin!==t&&NT(r,`origin`,t),r.lastEventId!==n&&NT(r,`lastEventId`,n),this.dispatchEvent(r)};#y=e=>{this.#a=e};#b=e=>{e.type===`max-buffer-size-exceeded`&&(this.close(),this.#x(e.message))};#x(e,t){this.close();let n=new gT(`error`,{code:t,message:e});this.dispatchEvent(n)}#S(e,t){if(this.#e===this.CLOSED)return;this.#e=this.CONNECTING;let n=new gT(`error`,{code:t,message:e});this.dispatchEvent(n);let r=setTimeout(this.#C,this.#a);typeof r==`object`&&r&&`unref`in r&&r.unref(),this.#o=r}#C=()=>{this.#o=void 0,this.#e===this.CONNECTING&&this.#p()}};Object.defineProperty(AT,"name",{value:`EventSource`}),Object.defineProperty(AT,Symbol.for(`eventsource.supports-fetch-override`),{value:!0,writable:!1,configurable:!1,enumerable:!1});var jT=AT;function MT(){let e=`document`in globalThis?globalThis.document:void 0;return e&&typeof e==`object`&&`baseURI`in e&&typeof e.baseURI==`string`?e.baseURI:void 0}function NT(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0})}function PT(e){let t=``;for(let n of new TextEncoder().encode(e))t+=String.fromCharCode(n);return t}var FT=t(bx(),1),IT={"common.all":`All`,"common.backToList":`Back to List`,"common.cancel":`Cancel`,"common.close":`Close`,"common.confirm":`Confirm`,"common.create":`Create`,"common.createdAt":`Created At`,"common.delete":`Delete`,"common.edit":`Edit`,"common.login":`Login`,"common.logout":`Logout`,"common.manage":`Manage`,"common.results":e=>tE(e,{one:`${e} result`,other:`${e} results`}),"common.save":`Save`,"common.search":`Search`,"common.searchPlaceholder":`Search...`,"common.searchType":`Search Type`,"common.sort":`Sort`,"confirm.delete":`Are you sure you want to delete?`,"confirm.save":`Do you want to save?`,"dashboard.adminMenu":`Admin Menu`,"dashboard.createdAt":`Joined`,"dashboard.email":`Email`,"dashboard.loginRequired":`Please login to continue.`,"dashboard.name":`Name`,"dashboard.role":`Role`,"dashboard.title":`Admin Dashboard`,"dashboard.welcome":`Welcome!`,"delete.confirm.description":`This action cannot be undone. This will permanently delete this item.`,"delete.confirm.title":`Are you sure?`,"entity.create":e=>`Create ${e}`,"entity.edit":(e,t)=>`Edit ${e} (#${t})`,"entity.list":e=>`${e} List`,"entity.listManage":e=>`Manage ${e} List`,"error.alreadyProcessed":`Already processed`,"error.badRequest":`Bad request`,"error.detail":e=>e,"error.duplicateRow":`Duplicate data`,"error.forbidden":`Forbidden`,"error.internalServerError":`Internal server error`,"error.notFound":`Not found`,"error.serviceUnavailable":`Service unavailable`,"setting.invalidValue":e=>`Invalid setting value: ${e}`,"setting.unknownKey":e=>`Unknown setting key ${e}`,"qgrid.dispatcherFailed":e=>`${e} dispatcher failed to initialize`,"qgrid.dispatcherStarting":e=>`${e} dispatcher is starting up. Please retry shortly`,"qgrid.grokCapabilityUnavailable":e=>`Grok capability unavailable: ${e}`,"qgrid.grokCapacity":`All Grok tokens are at their in-flight request cap. Please retry shortly`,"qgrid.grokContentPolicy":e=>`Grok generation blocked by content policy: ${e}`,"qgrid.grokInvalidRequest":e=>`Invalid Grok request: ${e}`,"qgrid.openaiVoiceInvalidRequest":e=>`Invalid OpenAI voice request: ${e}`,"qgrid.grokLoginFailed":e=>`Grok login failed: ${e}`,"qgrid.grokNotOAuthToken":`Grok login returned credentials that are not an xAI OAuth token`,"qgrid.grokNoWorkers":e=>`No Grok token is available: ${e}`,"qgrid.grokRateLimited":e=>`All Grok tokens are rate limited. Retry after ${e} seconds`,"qgrid.openaiRateLimited":e=>`OpenAI rate limit reached: ${e}`,"qgrid.grokOnDemandExcluded":e=>`All Grok tokens are excluded because on-demand billing is enabled at xAI: ${e}. Turn off on-demand billing, or add another account`,"qgrid.grokZdrVideoUnavailable":e=>`Grok video is unavailable because Zero Data Retention is on for: ${e}. Turn off the data-retention opt-out at xAI, or use a non-ZDR account`,"qgrid.invalidInput":e=>`qgrid: invalid input: ${e}`,"qgrid.requestBodyTooLarge":e=>`Request body exceeds the ${e} MiB limit`,"qgrid.videoJobNotFound":`video job not found`,"error.unauthorized":`Unauthorized`,notFound:(e,t)=>`${e} ID ${t} not found`,"validation.email":`Invalid email format`,"validation.maxLength":(e,t)=>`${e} must be at most ${t} characters`,"validation.minLength":(e,t)=>`${e} must be at least ${t} characters`,"validation.required":e=>`${e} is required`,"validation.url":`Invalid URL format`},LT={"common.all":`전체`,"common.backToList":`목록으로`,"common.cancel":`취소`,"common.close":`닫기`,"common.confirm":`확인`,"common.create":`생성`,"common.createdAt":`등록`,"common.delete":`삭제`,"common.edit":`수정`,"common.login":`로그인`,"common.logout":`로그아웃`,"common.manage":`관리`,"common.results":e=>`${e}개 결과`,"common.save":`저장`,"common.search":`검색`,"common.searchPlaceholder":`검색...`,"common.searchType":`검색 유형`,"common.sort":`정렬`,"confirm.delete":`정말 삭제하시겠습니까?`,"confirm.save":`저장하시겠습니까?`,"dashboard.adminMenu":`관리 메뉴`,"dashboard.createdAt":`가입일`,"dashboard.email":`이메일`,"dashboard.loginRequired":`로그인이 필요합니다.`,"dashboard.name":`이름`,"dashboard.role":`역할`,"dashboard.title":`관리자 대시보드`,"dashboard.welcome":`환영합니다!`,"delete.confirm.description":`이 작업은 취소할 수 없습니다. 항목이 영구적으로 삭제됩니다.`,"delete.confirm.title":`정말 삭제하시겠습니까?`,"entity.create":e=>`${e} 생성`,"entity.edit":(e,t)=>`${e} 수정 (#${t})`,"entity.list":e=>`${e} 목록`,"entity.listManage":e=>`${e} 목록 관리`,"error.alreadyProcessed":`이미 처리되었습니다`,"error.badRequest":`잘못된 요청입니다`,"error.detail":e=>e,"error.duplicateRow":`중복된 데이터입니다`,"error.entityNotFound":(e,t)=>`존재하지 않는 ${e} ID ${t}`,"error.forbidden":`권한이 없습니다`,"error.internalServerError":`서버 오류가 발생했습니다`,"error.notFound":`찾을 수 없습니다`,"error.serviceUnavailable":`서비스를 사용할 수 없습니다`,"setting.invalidValue":e=>`설정 값이 올바르지 않습니다: ${e}`,"setting.unknownKey":e=>`알 수 없는 설정 키 ${e}`,"qgrid.dispatcherFailed":e=>`${e} dispatcher 초기화에 실패했습니다`,"qgrid.dispatcherStarting":e=>`${e} dispatcher 기동 중입니다. 잠시 후 다시 시도해주세요`,"qgrid.grokCapabilityUnavailable":e=>`Grok 기능을 사용할 수 없습니다: ${e}`,"qgrid.grokCapacity":`모든 Grok 토큰이 동시 요청 한도에 도달했습니다. 잠시 후 다시 시도해주세요`,"qgrid.grokContentPolicy":e=>`콘텐츠 정책 위반으로 Grok 생성이 차단되었습니다: ${e}`,"qgrid.grokInvalidRequest":e=>`잘못된 Grok 요청입니다: ${e}`,"qgrid.openaiVoiceInvalidRequest":e=>`잘못된 OpenAI 음성 요청입니다: ${e}`,"qgrid.grokLoginFailed":e=>`Grok 로그인에 실패했습니다: ${e}`,"qgrid.grokNotOAuthToken":`Grok 로그인 결과가 xAI OAuth 토큰이 아닙니다`,"qgrid.grokNoWorkers":e=>`사용 가능한 Grok 토큰이 없습니다: ${e}`,"qgrid.grokRateLimited":e=>`모든 Grok 토큰이 요청 한도에 걸렸습니다. ${e}초 후 다시 시도해주세요`,"qgrid.openaiRateLimited":e=>`OpenAI 요청 한도에 걸렸습니다: ${e}`,"qgrid.grokOnDemandExcluded":e=>`xAI에서 on-demand 과금이 켜져 있어 모든 Grok 토큰이 제외되었습니다: ${e}. on-demand 과금을 끄거나 다른 계정을 추가해주세요`,"qgrid.grokZdrVideoUnavailable":e=>`Zero Data Retention이 켜져 있어 Grok 비디오를 사용할 수 없습니다: ${e}. xAI에서 data-retention opt-out을 끄거나 ZDR이 아닌 계정을 사용해주세요`,"qgrid.invalidInput":e=>`qgrid: 잘못된 입력입니다: ${e}`,"qgrid.requestBodyTooLarge":e=>`요청 본문이 ${e} MiB 제한을 초과했습니다`,"qgrid.videoJobNotFound":`비디오 작업을 찾을 수 없습니다`,"error.unauthorized":`인증이 필요합니다`,"error.unknownSearchField":e=>`구현되지 않은 검색 필드 ${e}`,notFound:(e,t)=>`존재하지 않는 ${e} ID ${t}`,"validation.email":`올바른 이메일 형식이 아닙니다`,"validation.maxLength":(e,t)=>`${e}${nE(e,`은는`)} 최대 ${t}자까지 입력할 수 있습니다`,"validation.minLength":(e,t)=>`${e}${nE(e,`은는`)} 최소 ${t}자 이상이어야 합니다`,"validation.required":e=>`${nE(e,`은는`)} 필수입니다`,"validation.url":`올바른 URL 형식이 아닙니다`},RT=`ko`,zT=[`ko`,`en`],BT=RT;function VT(e){BT=e}function HT(){return BT}var UT={"rc.asyncSelect.loading":`로딩 중...`,"rc.asyncSelect.noOptions":`옵션이 없습니다`,"rc.asyncSelect.noResults":`검색 결과가 없습니다`,"rc.asyncSelect.selectPlaceholder":`선택하세요...`,"rc.combobox.noResults":`검색 결과가 없습니다`,"rc.combobox.selectPlaceholder":`선택하세요...`,"rc.datePicker.pickDate":`날짜 선택`,"rc.datePicker.placeholder":`날짜 선택`,"rc.datePicker.selectDate":`날짜 선택`,"rc.dateSelectorMultiple.addDate":`날짜 추가`,"rc.dateSelectorMultiple.dateRange":`기간`,"rc.dateSelectorMultiple.placeholder":`날짜 선택`,"rc.dateSelectorMultiple.singleDate":`단일`,"rc.fileInput.browseFiles":`파일 찾기`,"rc.fileInput.dropZone":`파일을 드래그하거나 클릭하여 업로드`,"rc.fileInput.filePlaceholder":`파일`,"rc.fileInput.imagePlaceholder":`이미지`,"rc.fileInput.maxFilesExceeded":e=>`최대 ${e}개 파일만 업로드 가능합니다`,"rc.fileInput.pending":`대기 중`,"rc.fileInput.remove":`제거`,"rc.fileInput.uploadFailed":`업로드 실패`,"rc.fileInput.uploading":`업로드 중...`,"rc.monthPickerMultiple.addMonth":`월 추가`,"rc.monthPickerMultiple.dateRange":`기간`,"rc.monthPickerMultiple.endDate":`종료일`,"rc.monthPickerMultiple.placeholder":`월 선택`,"rc.monthPickerMultiple.singleDate":`단일`,"rc.monthPickerMultiple.startDate":`시작일`,"rc.multiSelect.clear":`전체 해제`,"rc.multiSelect.close":`닫기`,"rc.multiSelect.moreItems":e=>`+${e}개 더보기`,"rc.multiSelect.noOptions":`옵션이 없습니다`,"rc.multiSelect.noOptionsSelected":`선택된 옵션이 없습니다`,"rc.multiSelect.noResults":`검색 결과가 없습니다`,"rc.multiSelect.optionsCount":e=>`${e}개 옵션`,"rc.multiSelect.selectAll":`전체 선택`,"rc.multiSelect.selectPlaceholder":`선택하세요...`,"rc.pagination.next":`다음`,"rc.pagination.previous":`이전`,"rc.pagination.showing":(e,t,n)=>`${n}개 중 ${e}-${t}`,"rc.calendar.month.0":`1월`,"rc.calendar.month.1":`2월`,"rc.calendar.month.2":`3월`,"rc.calendar.month.3":`4월`,"rc.calendar.month.4":`5월`,"rc.calendar.month.5":`6월`,"rc.calendar.month.6":`7월`,"rc.calendar.month.7":`8월`,"rc.calendar.month.8":`9월`,"rc.calendar.month.9":`10월`,"rc.calendar.month.10":`11월`,"rc.calendar.month.11":`12월`,"rc.sonamuFilter.title":`소나무 필터`,"rc.sonamuFilter.apply":`적용`,"rc.sonamuFilter.reset":`초기화`,"rc.sonamuFilter.addRule":`규칙 추가`,"rc.sonamuFilter.noRulesYet":`아직 규칙이 없습니다. "+ 규칙 추가"를 클릭하여 시작하세요.`,"rc.sonamuFilter.selectField":`필드 선택`,"rc.sonamuFilter.selectOperator":`연산자 선택`,"rc.sonamuFilter.selectOperatorFirst":`먼저 연산자를 선택하세요`,"rc.sonamuFilter.enterValue":`값 입력`,"rc.sonamuFilter.enterNumber":`숫자 입력`,"rc.sonamuFilter.notSupported":`지원하지 않음`,"rc.sonamuFilter.startDate":`시작일`,"rc.sonamuFilter.endDate":`종료일`,"rc.sonamuFilter.appliedFilters":`🌲 적용된 소나무 필터`,"rc.common.cancel":`취소`,"rc.common.save":`저장`},WT={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},GT={"entity.RequestLog":`RequestLog`,"entity.RequestLog.id":`ID`,"entity.RequestLog.created_at":`등록일시`,"entity.RequestLog.token_name":`토큰 이름`,"entity.RequestLog.project_name":`프로젝트 이름`,"entity.RequestLog.model_name":`모델 이름`,"entity.RequestLog.requested_model_name":`요청 모델 이름 (fallback 전)`,"entity.RequestLog.fallback_count":`모델 fallback 횟수`,"entity.RequestLog.user_prompt":`사용자 프롬프트`,"entity.RequestLog.system_prompt":`시스템 프롬프트`,"entity.RequestLog.response":`llm 응답 전문`,"entity.RequestLog.input_tokens":`입력 토큰`,"entity.RequestLog.output_tokens":`출력 토큰`,"entity.RequestLog.cache_read_tokens":`캐시 읽기 토큰`,"entity.RequestLog.cache_creation_tokens":`캐시 생성 토큰`,"entity.RequestLog.cache_creation_5m_tokens":`5분 TTL 캐시 생성 토큰`,"entity.RequestLog.cache_creation_1h_tokens":`1시간 TTL 캐시 생성 토큰`,"entity.RequestLog.duration_ms":`응답 소요시간(ms)`,"entity.RequestLog.ttft_ms":`first gen TTFT(ms)`,"entity.RequestLog.cost_usd":`API 비용`,"entity.RequestLog.cost_source":`비용 출처(provider/pricing_table/mixed)`,"entity.RequestLog.image_cost_usd":`이미지 생성 비용`,"entity.RequestLog.image_cost_method":`이미지 비용 계산 방식`,"entity.RequestLog.service_tier":`Requested OpenAI service tier`,"entity.RequestLog.effort":`effort level`,"entity.RequestLog.history":`inject_items 히스토리`,"entity.RequestLog.input_images":`현재 user turn 입력 이미지`,"entity.RequestLog.tools":`요청에 장착된 tool 정의 목록`,"entity.RequestLog.json_schema":`structured output 요청의 JSON Schema 원문 (detail 의 response 타입 표시용)`,"entity.RequestLog.status":`실행 상태`,"entity.RequestLog.error_message":`에러 메시지`,"entity.RequestLog.response_json_ok":`structured(jsonSchema) 요청의 응답 JSON 파싱 성공 여부. 비structured 요청은 null`,"entity.RequestLog.tool_call_count":`tool call 횟수`,"entity.RequestLog.is_image_generation":`이미지 생성 turn 여부 (quota 귀속용)`,"entity.RequestLog.is_structured":`structured output(jsonSchema) 요청 여부 (목록 구분 표시용)`,"entity.RequestLog.media_kind":`미디어 엔드포인트 종류(image/video/stt/tts/live/decision). 텍스트 요청은 null (목록 Fmt 표시용)`,"enum.RequestLogOrderBy.id-desc":`ID최신순`,"enum.RequestLogOrderBy.id-asc":`ID오래된순`,"enum.RequestLogOrderBy.created_at-desc":`등록일시최신순`,"enum.RequestLogOrderBy.created_at-asc":`등록일시오래된순`,"enum.RequestLogOrderBy.ttft_ms-desc":`TTFT긴순`,"enum.RequestLogOrderBy.ttft_ms-asc":`TTFT짧은순`,"enum.RequestLogOrderBy.duration_ms-desc":`소요시간긴순`,"enum.RequestLogOrderBy.duration_ms-asc":`소요시간짧은순`,"enum.RequestLogOrderBy.input_tokens-desc":`입력토큰많은순`,"enum.RequestLogOrderBy.input_tokens-asc":`입력토큰적은순`,"enum.RequestLogOrderBy.output_tokens-desc":`출력토큰많은순`,"enum.RequestLogOrderBy.output_tokens-asc":`출력토큰적은순`,"enum.RequestLogOrderBy.cache_read_tokens-desc":`캐시읽기많은순`,"enum.RequestLogOrderBy.cache_read_tokens-asc":`캐시읽기적은순`,"enum.RequestLogOrderBy.cache_creation_tokens-desc":`캐시생성많은순`,"enum.RequestLogOrderBy.cache_creation_tokens-asc":`캐시생성적은순`,"enum.RequestLogOrderBy.cost_usd-desc":`비용높은순`,"enum.RequestLogOrderBy.cost_usd-asc":`비용낮은순`,"enum.RequestLogSearchField.id":`ID`,"enum.RequestLogSearchField.token_name":`토큰이름`,"enum.RequestLogSearchField.user_prompt":`사용자 프롬프트`,"enum.RequestLogStatus.running":`실행 중`,"enum.RequestLogStatus.succeeded":`성공`,"enum.RequestLogStatus.error":`에러`,"enum.RequestLogStatus.aborted":`중단`,"enum.RequestLogMediaKind.image":`이미지`,"enum.RequestLogMediaKind.video":`비디오`,"enum.RequestLogMediaKind.stt":`음성 인식`,"enum.RequestLogMediaKind.tts":`음성 합성`,"enum.RequestLogMediaKind.live":`실시간 대화`,"enum.RequestLogMediaKind.decision":`판정`,"entity.RequestLogStep":`RequestLogStep`,"entity.RequestLogStep.id":`ID`,"entity.RequestLogStep.created_at":`등록일시`,"entity.RequestLogStep.request_log":`부모 request log ID`,"entity.RequestLogStep.step_index":`ai-sdk step number (0-based)`,"entity.RequestLogStep.type":`step 타입`,"entity.RequestLogStep.model_name":`실제 serving 모델`,"entity.RequestLogStep.requested_model_name":`요청 모델 (fallback 전)`,"entity.RequestLogStep.fallback_count":`모델 fallback 횟수`,"entity.RequestLogStep.input_tokens":`입력 토큰 (generate)`,"entity.RequestLogStep.output_tokens":`출력 토큰 (generate)`,"entity.RequestLogStep.cache_read_tokens":`캐시 읽기 토큰`,"entity.RequestLogStep.cache_creation_tokens":`캐시 생성 토큰`,"entity.RequestLogStep.cache_creation_5m_tokens":`5분 TTL 캐시 생성 토큰`,"entity.RequestLogStep.cache_creation_1h_tokens":`1시간 TTL 캐시 생성 토큰`,"entity.RequestLogStep.cost_usd":`step 비용 (micro-USD)`,"entity.RequestLogStep.cost_source":`비용 출처(provider/pricing_table)`,"entity.RequestLogStep.duration_ms":`소요시간(ms)`,"entity.RequestLogStep.ttft_ms":`Gen TTFT(ms)`,"entity.RequestLogStep.finish_reason":`완료 사유`,"entity.RequestLogStep.reasoning_text":`reasoning 텍스트`,"entity.RequestLogStep.reasoning_tokens":`reasoning 토큰 수`,"entity.RequestLogStep.tool_call_index":`같은 step 내 tool call 순서`,"entity.RequestLogStep.tool_call_id":`tool call ID`,"entity.RequestLogStep.tool_name":`tool 이름`,"entity.RequestLogStep.tool_args":`tool 인자 (JSON string)`,"entity.RequestLogStep.tool_result":`tool 결과 (JSON string)`,"entity.RequestLogStep.tool_duration_ms":`tool 실행 소요시간(ms)`,"entity.RequestLogStep.error":`step 에러 메시지`,"enum.RequestLogStepType.generate":`LLM 생성`,"enum.RequestLogStepType.tool_call":`Tool 호출`,"enum.RequestLogStepOrderBy.id-asc":`ID순`,"enum.RequestLogStepSearchField.id":`ID`,"entity.Setting":`Setting`,"entity.Setting.id":`ID`,"entity.Setting.created_at":`등록일시`,"entity.Setting.key":`설정 키 (예: slack.enabled)`,"entity.Setting.value":`설정 값 (문자열 저장, 앱에서 파싱·검증)`,"entity.Setting.updated_at":`최종 수정일시`,"enum.SettingOrderBy.key-asc":`키순`,"enum.SettingSearchField.key":`키`,"entity.Token":`Token`,"entity.Token.id":`ID`,"entity.Token.created_at":`등록일시`,"entity.Token.provider":`프로바이더`,"entity.Token.credentials":`인증 정보 (JSONB)`,"entity.Token.name":`토큰 이름`,"entity.Token.active":`활성 여부`,"entity.Token.reauth_required":`인증 만료로 재로그인이 필요한지 여부`,"entity.Token.ord":`정렬 순서`,"entity.Token.quota_threshold":`quota 사용률 임계치(%). null이면 미설정`,"entity.Token.weight":`가중 라운드로빈 라우팅 가중치 (1..100)`,"entity.Token.keepalive_enabled":`Anthropic 5시간 토큰 윈도우 keepalive 사용 여부`,"enum.TokenOrderBy.id-desc":`ID최신순`,"enum.TokenOrderBy.ord-asc":`순서순`,"enum.TokenSearchField.id":`ID`,"enum.TokenSearchField.name":`이름`},KT={ko:{...UT,...GT,...LT},en:{...WT,...IT}};function qT(e,t){let n=KT[t];if(n?.[e]!==void 0)return n[e];if(t!==RT&&KT[RT]?.[e]!==void 0)return KT[RT][e];for(let n of zT)if(n!==t&&n!==RT&&KT[n]?.[e]!==void 0)return KT[n][e];return e}function JT(e){return qT(e,HT())}JT.locale=e=>t=>qT(t,e),JT.enumLabels=e=>new Proxy({},{get(t,n){if(typeof n!=`symbol`)return qT(`enum.${e}.${n}`,HT())}});function YT(e,t){return typeof t==`string`&&(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/.test(t)||/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}$/.test(t))&&new Date(t).toString()!==`Invalid Date`?new Date(t):t}hT.defaults.transformResponse=[e=>{if(typeof e==`string`)try{return JSON.parse(e,YT)}catch{return e}return e}],hT.interceptors.request.use(e=>(e.headers[`Accept-Language`]=HT(),e));async function $(e){try{return(await hT({...e})).data}catch(e){if(hT.isAxiosError(e)&&e.response?.data){let t=e.response.data;throw new XT(e.response.status,t.message,t.issues)}throw e}}var XT=class extends Error{code;message;issues;isSonamuError;constructor(e,t,n){super(t),this.code=e,this.message=t,this.issues=n,this.isSonamuError=!0}};function ZT(e){return e&&e.isSonamuError===!0}var QT=Y([`both`,`list`,`count`]);J({semanticQuery:J({embedding:q(G()).min(1024).max(1024),threshold:G().optional(),method:Y([`cosine`,`l2`,`inner_product`]).optional()})});function $T(e){return Rv([e,e.array()])}W().regex(/([0-9]{4}-[0-9]{2}-[0-9]{2}( [0-9]{2}:[0-9]{2}:[0-9]{2})*)$/,{message:`잘못된 SQLDate 타입`}).min(10).max(19).describe(`SQLDateTimeString`),J({name:W(),url:W(),mime_type:W(),size:G()});function eE(e,t,n,r={}){let{enabled:i=!0,retry:a=3,retryInterval:o=3e3}=r,[s,c]=(0,P.useState)({isConnected:!1,error:null,retryCount:0,isEnded:!1}),l=(0,P.useRef)(null),u=(0,P.useRef)(null),d=(0,P.useRef)(n);(0,P.useEffect)(()=>{d.current=n},[n]);let f=()=>{if(i)try{l.current&&=(l.current.close(),null),u.current&&=(clearTimeout(u.current),null);let n=FT.default.stringify(t),r=new jT(n?`${e}?${n}`:e,{fetch:(e,t)=>globalThis.fetch(e,{...t,headers:{...t?.headers,"Accept-Language":HT()}})});l.current=r,c(e=>({...e,isConnected:!1,error:null,isEnded:!1})),r.onopen=()=>{c(e=>({...e,isConnected:!0,error:null,retryCount:0,isEnded:!1}))},r.onerror=e=>{l.current===r&&(r.close(),c(e=>({...e,isConnected:!1,error:`Connection failed`,isEnded:!1})),c(e=>e.retryCount<a?(u.current=setTimeout(()=>{u.current!==null&&(c(e=>({...e,retryCount:e.retryCount+1,isEnded:!1})),f())},o),e):(l.current=null,{...e,error:`Connection failed after ${a} attempts`})))},r.addEventListener(`end`,()=>{if(l.current===r&&(r.close(),l.current=null,c(e=>({...e,isConnected:!1,error:null,isEnded:!0})),d.current.end)){let e=d.current.end;e(`end`)}}),Object.keys(d.current).forEach(e=>{let t=d.current[e];t&&r.addEventListener(e,n=>{if(l.current===r){try{let e=JSON.parse(n.data,YT);t(e)}catch(t){console.error(`Failed to parse SSE data for event ${e}:`,t)}c(e=>({...e,isEnded:!1}))}})}),r.onmessage=e=>{if(l.current===r)try{let t=JSON.parse(e.data,YT),n=d.current.message;n&&n(t)}catch(e){console.error(`Failed to parse SSE message:`,e)}}}catch(e){c(t=>({...t,error:e instanceof Error?e.message:`Unknown error`,isConnected:!1,isEnded:!1}))}};return(0,P.useEffect)(()=>(i&&(c({isConnected:!1,error:null,retryCount:0,isEnded:!1}),f()),()=>{l.current&&=(l.current.close(),null),u.current&&=(clearTimeout(u.current),null)}),[e,JSON.stringify(t),i]),s}function tE(e,t){let n=e===0&&t.zero||e===1&&t.one||t.other;return typeof n==`function`?n(e):n??e.toString()}function nE(e,t){let n=(()=>{let t=e.charCodeAt(e.length-1);return t<44032||t>55203?!1:(t-44032)%28!=0})();return e+{은는:n?`은`:`는`,이가:n?`이`:`가`,을를:n?`을`:`를`,과와:n?`과`:`와`,으로:n?`으로`:`로`}[t]}function rE(e){let t=new Set,n=[];for(let r of e.pages)for(let e of r?.rows??[]){let r=e?.id;if(r!==null){if(t.has(r))continue;t.add(r)}n.push(e)}let r=e.pages[0]?.total??0;return{pages:e.pages,pageParams:e.pageParams,rows:n,total:r}}function iE(e){let[t,n]=(0,P.useState)(!1),r=(0,P.useCallback)(async()=>{n(!0);try{await e.refetch()}finally{n(!1)}},[e]);return{...e,refresh:r,isRefreshing:t}}var aE;(function(e){async function t(e,t){return $({method:`GET`,url:`/api/token/findById?${FT.default.stringify({subset:e,id:t})}`})}e.getToken=t;let n=e.getTokenQueryOptions=(e,n)=>x({queryKey:[`Token`,`getToken`,e,n],queryFn:()=>t(e,n)});e.useToken=(e,t,r)=>iE(g({...n(e,t),...r}));async function r(e,t){return $({method:`GET`,url:`/api/token/findMany?${FT.default.stringify({subset:e,rawParams:t})}`})}e.getTokens=r;let i=e.getTokensQueryOptions=(e,t)=>x({queryKey:[`Token`,`getTokens`,e,t],queryFn:()=>r(e,t)});e.useTokens=(e,t,n)=>iE(g({...i(e,t),...n}));let a=e.getTokensInfiniteQueryOptions=(e,t)=>S({queryKey:[`Token`,`getTokens`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:rE});e.useTokensInfinite=(e,t,n)=>iE(k({...a(e,t),...n}));async function o(e){return $({method:`POST`,url:`/api/token/reorder`,data:{ids:e}})}e.reorder=o,e.useReorderMutation=()=>D({mutationFn:e=>aE.reorder(e.ids)});async function s(e){return $({method:`POST`,url:`/api/token/del`,data:{ids:e}})}e.del=s,e.useDelMutation=()=>D({mutationFn:e=>aE.del(e.ids)})})(aE||={});var oE;(function(e){async function t(e,t){return $({method:`GET`,url:`/api/setting/findById?${FT.default.stringify({subset:e,id:t})}`})}e.getSetting=t;let n=e.getSettingQueryOptions=(e,n)=>x({queryKey:[`Setting`,`getSetting`,e,n],queryFn:()=>t(e,n)});e.useSetting=(e,t,r)=>iE(g({...n(e,t),...r}));async function r(e,t){return $({method:`GET`,url:`/api/setting/findMany?${FT.default.stringify({subset:e,rawParams:t})}`})}e.getSettings=r;let i=e.getSettingsQueryOptions=(e,t)=>x({queryKey:[`Setting`,`getSettings`,e,t],queryFn:()=>r(e,t)});e.useSettings=(e,t,n)=>iE(g({...i(e,t),...n}));let a=e.getSettingsInfiniteQueryOptions=(e,t)=>S({queryKey:[`Setting`,`getSettings`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:rE});e.useSettingsInfinite=(e,t,n)=>iE(k({...a(e,t),...n}));async function o(){return $({method:`GET`,url:`/api/setting/listSettings`})}e.getSettingList=o;let s=e.getSettingListQueryOptions=()=>x({queryKey:[`Setting`,`getSettingList`],queryFn:()=>o()});e.useSettingList=e=>iE(g({...s(),...e}));async function c(e,t){return $({method:`POST`,url:`/api/setting/updateSetting`,data:{key:e,value:t}})}e.updateSetting=c,e.useUpdateSettingMutation=()=>D({mutationFn:e=>oE.updateSetting(e.key,e.value)});async function l(e){return $({method:`POST`,url:`/api/setting/resetSetting`,data:{key:e}})}e.resetSetting=l,e.useResetSettingMutation=()=>D({mutationFn:e=>oE.resetSetting(e.key)});async function u(){return $({method:`POST`,url:`/api/setting/triggerExpiryReminder`})}e.triggerExpiryReminder=u,e.useTriggerExpiryReminderMutation=()=>D({mutationFn:e=>oE.triggerExpiryReminder()})})(oE||={});var sE;(function(e){async function t(e,t){return $({method:`GET`,url:`/api/requestLogStep/findById?${FT.default.stringify({subset:e,id:t})}`})}e.getRequestLogStep=t;let n=e.getRequestLogStepQueryOptions=(e,n)=>x({queryKey:[`RequestLogStep`,`getRequestLogStep`,e,n],queryFn:()=>t(e,n)});e.useRequestLogStep=(e,t,r)=>iE(g({...n(e,t),...r}));async function r(e,t){return $({method:`GET`,url:`/api/requestLogStep/findMany?${FT.default.stringify({subset:e,rawParams:t})}`})}e.getRequestLogSteps=r;let i=e.getRequestLogStepsQueryOptions=(e,t)=>x({queryKey:[`RequestLogStep`,`getRequestLogSteps`,e,t],queryFn:()=>r(e,t)});e.useRequestLogSteps=(e,t,n)=>iE(g({...i(e,t),...n}));let a=e.getRequestLogStepsInfiniteQueryOptions=(e,t)=>S({queryKey:[`RequestLogStep`,`getRequestLogSteps`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:rE});e.useRequestLogStepsInfinite=(e,t,n)=>iE(k({...a(e,t),...n}));async function o(e){return $({method:`POST`,url:`/api/requestLogStep/save`,data:{spa:e}})}e.save=o,e.useSaveMutation=()=>D({mutationFn:e=>sE.save(e.spa)});async function s(e){return $({method:`POST`,url:`/api/requestLogStep/del`,data:{ids:e}})}e.del=s,e.useDelMutation=()=>D({mutationFn:e=>sE.del(e.ids)})})(sE||={});var cE;(function(e){async function t(e,t){return $({method:`GET`,url:`/api/requestLog/findById?${FT.default.stringify({subset:e,id:t})}`})}e.getRequestLog=t;let n=e.getRequestLogQueryOptions=(e,n)=>x({queryKey:[`RequestLog`,`getRequestLog`,e,n],queryFn:()=>t(e,n)});e.useRequestLog=(e,t,r)=>iE(g({...n(e,t),...r}));async function r(e,t){return $({method:`GET`,url:`/api/requestLog/findMany?${FT.default.stringify({subset:e,rawParams:t})}`})}e.getRequestLogs=r;let i=e.getRequestLogsQueryOptions=(e,t)=>x({queryKey:[`RequestLog`,`getRequestLogs`,e,t],queryFn:()=>r(e,t)});e.useRequestLogs=(e,t,n)=>iE(g({...i(e,t),...n}));let a=e.getRequestLogsInfiniteQueryOptions=(e,t)=>S({queryKey:[`RequestLog`,`getRequestLogs`,`infinite`,e,t],queryFn:({pageParam:n})=>r(e,{...t,page:n}),initialPageParam:1,getNextPageParam:(e,t)=>{let n=e?.total??0;return t.reduce((e,t)=>e+(t?.rows?.length??0),0)<n?t.length+1:void 0},select:rE});e.useRequestLogsInfinite=(e,t,n)=>iE(k({...a(e,t),...n}));async function o(e){return $({method:`POST`,url:`/api/requestLog/save`,data:{spa:e}})}e.save=o,e.useSaveMutation=()=>D({mutationFn:e=>cE.save(e.spa)});async function s(e){return $({method:`GET`,url:`/api/requestLog/responseTypeTs?${FT.default.stringify({id:e})}`})}e.responseTypeTs=s;let c=e.responseTypeTsQueryOptions=e=>x({queryKey:[`RequestLog`,`responseTypeTs`,e],queryFn:()=>s(e)});e.useResponseTypeTs=(e,t)=>iE(g({...c(e),...t}));async function l(e){return $({method:`GET`,url:`/api/requestLog/toolsView?${FT.default.stringify({id:e})}`})}e.toolsView=l;let u=e.toolsViewQueryOptions=e=>x({queryKey:[`RequestLog`,`toolsView`,e],queryFn:()=>l(e)});e.useToolsView=(e,t)=>iE(g({...u(e),...t}));async function d(e){return $({method:`POST`,url:`/api/requestLog/del`,data:{ids:e}})}e.del=d,e.useDelMutation=()=>D({mutationFn:e=>cE.del(e.ids)})})(cE||={});var lE;(function(e){async function t(e){return $({method:`POST`,url:`/api/qgrid/query`,data:{args:e}})}e.query=t,e.useQueryMutation=()=>D({mutationFn:e=>lE.query(e.args)});async function n(e){return $({method:`POST`,url:`/api/qgrid/prepareStream`,data:{args:e}})}e.prepareStream=n,e.usePrepareStreamMutation=()=>D({mutationFn:e=>lE.prepareStream(e.args)});function r(e,t,n){return eE(`/api/qgrid/queryStream`,e,t,n)}e.useQueryStream=r;async function i(e){return $({method:`POST`,url:`/api/qgrid/createRun`,data:{input:e}})}e.createRun=i,e.useCreateRunMutation=()=>D({mutationFn:e=>lE.createRun(e.input)});async function a(e){return $({method:`POST`,url:`/api/qgrid/appendStep`,data:{input:e}})}e.appendStep=a,e.useAppendStepMutation=()=>D({mutationFn:e=>lE.appendStep(e.input)});async function o(e){return $({method:`POST`,url:`/api/qgrid/finishRun`,data:{input:e}})}e.finishRun=o,e.useFinishRunMutation=()=>D({mutationFn:e=>lE.finishRun(e.input)});async function s(){return $({method:`GET`,url:`/api/qgrid/stats`})}e.stats=s;let c=e.statsQueryOptions=()=>x({queryKey:[`Qgrid`,`stats`],queryFn:()=>s()});e.useStats=e=>iE(g({...c(),...e}));async function l(e){return $({method:`GET`,url:`/api/qgrid/totalCost?${FT.default.stringify({params:e})}`})}e.totalCost=l;let u=e.totalCostQueryOptions=e=>x({queryKey:[`Qgrid`,`totalCost`,e],queryFn:()=>l(e)});e.useTotalCost=(e,t)=>iE(g({...u(e),...t}));async function d(){return $({method:`GET`,url:`/api/qgrid/projectNames`})}e.projectNames=d;let f=e.projectNamesQueryOptions=()=>x({queryKey:[`Qgrid`,`projectNames`],queryFn:()=>d()});e.useProjectNames=e=>iE(g({...f(),...e}));async function p(){return $({method:`GET`,url:`/api/qgrid/modelNames`})}e.modelNames=p;let m=e.modelNamesQueryOptions=()=>x({queryKey:[`Qgrid`,`modelNames`],queryFn:()=>p()});e.useModelNames=e=>iE(g({...m(),...e}));async function h(e,t,n){return $({method:`POST`,url:`/api/qgrid/addToken`,data:{provider:e,credentials:t,name:n}})}e.addToken=h,e.useAddTokenMutation=()=>D({mutationFn:e=>lE.addToken(e.provider,e.credentials,e.name)});async function _(e,t,n,r,i){return $({method:`POST`,url:`/api/qgrid/updateToken`,data:{id:e,name:t,quotaThreshold:n,weight:r,keepaliveEnabled:i}})}e.updateToken=_;async function v(e){return $({method:`POST`,url:`/api/qgrid/removeToken`,data:{id:e}})}e.removeToken=v,e.useRemoveTokenMutation=()=>D({mutationFn:e=>lE.removeToken(e.id)});async function y(e){return $({method:`POST`,url:`/api/qgrid/toggleToken`,data:{id:e}})}e.toggleToken=y,e.useToggleTokenMutation=()=>D({mutationFn:e=>lE.toggleToken(e.id)});async function b(e){return $({method:`POST`,url:`/api/qgrid/oauthStart`,data:{name:e}})}e.oauthStart=b,e.useOauthStartMutation=()=>D({mutationFn:e=>lE.oauthStart(e.name)});async function S(e){return $({method:`POST`,url:`/api/qgrid/oauthComplete`,data:{pastedCode:e}})}e.oauthComplete=S,e.useOauthCompleteMutation=()=>D({mutationFn:e=>lE.oauthComplete(e.pastedCode)});async function C(e){return $({method:`POST`,url:`/api/qgrid/oauthStartOpenAI`,data:{name:e}})}e.oauthStartOpenAI=C,e.useOauthStartOpenAIMutation=()=>D({mutationFn:e=>lE.oauthStartOpenAI(e.name)});async function w(e){return $({method:`POST`,url:`/api/qgrid/oauthStartGrok`,data:{name:e}})}e.oauthStartGrok=w,e.useOauthStartGrokMutation=()=>D({mutationFn:e=>lE.oauthStartGrok(e.name)});async function T(e){return $({method:`POST`,url:`/api/qgrid/oauthStartGrokDevice`,data:{name:e}})}e.oauthStartGrokDevice=T,e.useOauthStartGrokDeviceMutation=()=>D({mutationFn:e=>lE.oauthStartGrokDevice(e.name)});async function E(e){return $({method:`POST`,url:`/api/qgrid/oauthPollGrokDevice`,data:{deviceCode:e}})}e.oauthPollGrokDevice=E,e.useOauthPollGrokDeviceMutation=()=>D({mutationFn:e=>lE.oauthPollGrokDevice(e.deviceCode)});async function O(e){return $({method:`POST`,url:`/api/qgrid/generateImages`,data:{params:e}})}e.generateImages=O,e.useGenerateImagesMutation=()=>D({mutationFn:e=>lE.generateImages(e.params)});async function ee(e){return $({method:`POST`,url:`/api/qgrid/videoStart`,data:{params:e}})}e.videoStart=ee,e.useVideoStartMutation=()=>D({mutationFn:e=>lE.videoStart(e.params)});async function k(e){return $({method:`POST`,url:`/api/qgrid/videoStatus`,data:{params:e}})}e.videoStatus=k,e.useVideoStatusMutation=()=>D({mutationFn:e=>lE.videoStatus(e.params)});async function te(e){return $({method:`POST`,url:`/api/qgrid/transcribe`,data:{params:e}})}e.transcribe=te,e.useTranscribeMutation=()=>D({mutationFn:e=>lE.transcribe(e.params)});async function A(e){return $({method:`POST`,url:`/api/qgrid/speak`,data:{params:e}})}e.speak=A,e.useSpeakMutation=()=>D({mutationFn:e=>lE.speak(e.params)});async function j(e){return $({method:`POST`,url:`/api/qgrid/decide`,data:{params:e}})}e.decide=j,e.useDecideMutation=()=>D({mutationFn:e=>lE.decide(e.params)});async function ne(e){return $({method:`POST`,url:`/api/qgrid/liveCall`,data:{params:e}})}e.liveCall=ne,e.useLiveCallMutation=()=>D({mutationFn:e=>lE.liveCall(e.params)});async function M(e){return $({method:`GET`,url:`/api/qgrid/usage?${FT.default.stringify({tokenId:e})}`})}e.usage=M;let re=e.usageQueryOptions=e=>x({queryKey:[`Qgrid`,`usage`,e],queryFn:()=>M(e)});e.useUsage=(e,t)=>iE(g({...re(e),...t}));async function N(){return $({method:`GET`,url:`/api/qgrid/health`})}e.health=N;let ie=e.healthQueryOptions=()=>x({queryKey:[`Qgrid`,`health`],queryFn:()=>N()});e.useHealth=e=>iE(g({...ie(),...e}))})(lE||={});var uE;(function(e){async function t(e){return $({method:`GET`,url:`/api/monit/monitLogs?${FT.default.stringify({cursor:e})}`})}e.monitLogs=t;let n=e.monitLogsQueryOptions=e=>x({queryKey:[`Monit`,`monitLogs`,e],queryFn:()=>t(e)});e.useMonitLogs=(e,t)=>iE(g({...n(e),...t}));async function r(){return $({method:`GET`,url:`/api/monit/monitInfo`})}e.monitInfo=r;let i=e.monitInfoQueryOptions=()=>x({queryKey:[`Monit`,`monitInfo`],queryFn:()=>r()});e.useMonitInfo=e=>iE(g({...i(),...e}));async function a(){return $({method:`GET`,url:`/api/monit/monitStats`})}e.monitStats=a;let o=e.monitStatsQueryOptions=()=>x({queryKey:[`Monit`,`monitStats`],queryFn:()=>a()});e.useMonitStats=e=>iE(g({...o(),...e}))})(uE||={}),cE.useRequestLogs,cE.useRequestLogsInfinite,sE.useRequestLogSteps,sE.useRequestLogStepsInfinite,oE.useSettings,oE.useSettingsInfinite,aE.useTokens,aE.useTokensInfinite;function dE(e,t){return e.flatMap(e=>{let n=t?e.images??[]:[];return e.role===`user`?[{type:`message`,role:`user`,content:[{type:`input_text`,text:e.text},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[...e.text?[{type:`message`,role:`assistant`,content:[{type:`output_text`,text:e.text}]}]:[],...n.length?[{type:`message`,role:`user`,content:[{type:`input_text`,text:`Previously generated assistant images (reference for follow-up edits):`},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[]]})}function fE(e){return e.flatMap(e=>e.type===`image`?[`data:${e.mediaType??`image/png`};base64,${e.data}`]:[])}function pE(e,t){return e.filter(e=>e.active&&e.provider===t).toSorted((e,t)=>e.ord-t.ord||e.name.localeCompare(t.name))}function mE(e,t){return t!==void 0&&!e.some(e=>e.active&&e.provider===t)}function hE(e,t,n){return!e||!n||t.some(t=>t.name===e)?e:``}function gE(e,t){return e.model!==t.model||e.system!==t.system||e.tokenName!==t.tokenName}function _E(e){return e?{tokenName:e}:{}}var vE=t(i(),1);function yE(e){let t=e.indexOf(`,`),n=e.slice(0,t).match(/^data:image\/(png|jpeg|webp);base64$/)?.[1];if(!n)return{extension:`—`,bytes:0};let r=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return{extension:n===`jpeg`?`jpg`:n,bytes:Math.max(0,Math.floor((e.length-t-1)*3/4)-r)}}function bE(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(2)} MB`}function xE({url:e,onClose:t}){let n=(0,P.useRef)(null),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(!1),l=yE(e);return(0,P.useEffect)(()=>{let e=n.current;return e?.showModal(),()=>e?.close()},[]),(0,vE.createPortal)((0,F.jsx)(`dialog`,{ref:n,"aria-labelledby":`chat-image-preview-title`,onCancel:e=>{e.preventDefault(),t()},className:`m-0 h-dvh max-h-none w-screen max-w-none overflow-hidden bg-transparent p-0 backdrop:bg-black/65`,children:(0,F.jsx)(`div`,{className:`grid size-full place-items-center p-4`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,F.jsxs)(`div`,{className:`w-[min(1100px,calc(100vw-2rem))] max-h-[calc(100dvh-2rem)] overflow-hidden rounded-2xl bg-white text-sand-900 shadow-xl`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-sand-100 px-4 py-3`,children:[(0,F.jsx)(`h2`,{id:`chat-image-preview-title`,className:`text-sm font-semibold`,children:`이미지 미리보기`}),(0,F.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`이미지 미리보기 닫기`,className:`grid size-8 place-items-center rounded-full hover:bg-sand-100`,children:(0,F.jsx)(pu,{className:`size-4`})})]}),(0,F.jsx)(`div`,{className:`max-h-[calc(100dvh-13rem)] overflow-auto bg-sand-100 p-3`,style:{backgroundImage:`conic-gradient(#e8e4df 25%, #fff 0 50%, #e8e4df 0 75%, #fff 0)`,backgroundSize:`20px 20px`},children:s?(0,F.jsx)(`p`,{role:`alert`,className:`p-8 text-center text-danger-500`,children:`이미지를 불러올 수 없습니다.`}):(0,F.jsx)(`img`,{src:e,alt:`확대된 채팅 이미지`,onLoad:e=>i({width:e.currentTarget.naturalWidth,height:e.currentTarget.naturalHeight}),onError:()=>c(!0),className:a?`block max-w-none`:`mx-auto block max-h-[calc(100dvh-15rem)] max-w-full object-contain`})}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-sand-100 px-4 py-3`,children:[(0,F.jsxs)(`dl`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-xs tabular-nums`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{className:`text-sand-400`,children:`확장자`}),(0,F.jsx)(`dd`,{className:`mt-1 uppercase`,children:l.extension})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{className:`text-sand-400`,children:`파일 용량`}),(0,F.jsx)(`dd`,{className:`mt-1`,children:bE(l.bytes)})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`dt`,{className:`text-sand-400`,children:`해상도`}),(0,F.jsx)(`dd`,{className:`mt-1`,children:r?`${r.width} × ${r.height} px`:`—`})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 text-xs`,children:[(0,F.jsx)(`button`,{type:`button`,disabled:!r||s,onClick:()=>o(e=>!e),className:`text-sand-600 hover:underline disabled:opacity-40`,children:a?`화면에 맞추기`:`원본 크기`}),(0,F.jsx)(`a`,{href:e,download:`qgrid-image.${l.extension}`,className:`text-sienna-500 hover:underline`,children:`다운로드`})]})]})]})})}),document.body)}var SE=`qgrid_chat`,CE=`anthropic/claude-fable-5-1`,wE=new Map([[`openai`,`OpenAI`],[`anthropic`,`Anthropic`],[`grok`,`Grok`]]);function TE(e,t,n){let r=n!==void 0&&mE(n,t);return/NO_OPENAI_WORKERS|no ready openai workers|no anthropic tokens available/i.test(e)||r&&/기동 중입니다/.test(e)?`사용 가능한 ${t?wE.get(t)??t:``} 토큰이 없습니다. Tokens 페이지에서 토큰을 추가해주세요.`:e}function EE(e){return e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}var DE=4,OE=1536;async function kE(e){let t=await createImageBitmap(e),n=Math.min(1,OE/Math.max(t.width,t.height)),r=document.createElement(`canvas`);return r.width=Math.max(1,Math.round(t.width*n)),r.height=Math.max(1,Math.round(t.height*n)),r.getContext(`2d`).drawImage(t,0,0,r.width,r.height),t.close(),r.toDataURL(`image/jpeg`,.85)}function AE(){let[e,t]=(0,P.useState)(!1),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)([]),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(CE),[u,d]=(0,P.useState)(``),[f,p]=(0,P.useState)(``),[m,h]=(0,P.useState)(``),[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(null),[b,x]=(0,P.useState)(!1),[S,C]=(0,P.useState)([]),[w,T]=(0,P.useState)(null),E=(0,P.useRef)(null);(0,P.useEffect)(()=>()=>E.current?.abort(),[]);let D=(0,P.useRef)(void 0),O=(0,P.useRef)(void 0),ee=(0,P.useRef)(null),k=(0,P.useRef)(null),te=(0,P.useRef)(null),A=c.split(`/`)[0],j=A===`openai`||A===`grok`,{data:M}=aE.useTokens(`A`,{orderBy:`ord-asc`},{enabled:e}),re=(0,P.useMemo)(()=>pE(M?.rows??[],A),[A,M?.rows]),N=M?.rows!==void 0,ie=(0,P.useRef)(void 0);(0,P.useEffect)(()=>{ie.current=M?.rows},[M?.rows]);let ae=M?.rows!==void 0&&mE(M.rows,A);(0,P.useEffect)(()=>{j||C([])},[j]),(0,P.useEffect)(()=>{d(e=>hE(e,re,N))},[N,re]);let oe=async e=>{if(!e)return;let t=DE-S.length,n=await Promise.all([...e].slice(0,t).map(e=>kE(e).catch(()=>null)));C(e=>[...e,...n.filter(e=>e!==null)].slice(0,DE))},se=e=>{a(t=>{let n=t[t.length-1];return!n||n.role!==`assistant`?t:[...t.slice(0,-1),e(n)]})},ce=e=>{let t=TE(e,O.current?.model.split(`/`)[0],ie.current);se(e=>e.status===`streaming`?{...e,status:`error`,error:t}:e),y(null),x(!1)},le=lE.useQueryStream({streamId:v??``},{delta:({text:e})=>{se(t=>t.status===`streaming`?{...t,text:t.text+e}:t)},toolCall:()=>{ce(`tool call 응답은 채팅에서 지원하지 않습니다`)},done:e=>{D.current=e.runContext?.threadCoord,se(t=>({...t,text:e.text||t.text,images:fE(Array.isArray(e.content)?e.content:[e.content]),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}}))},error:({message:e})=>{ce(e)},end:()=>{se(e=>e.status===`streaming`?{...e,status:`error`,error:`응답 완료 전에 스트림이 종료되었습니다`}:e),y(null),x(!1)}},{enabled:v!==null,retry:0});(0,P.useEffect)(()=>{v!==null&&le.error&&ce(le.error)},[le.error]),(0,P.useEffect)(()=>{ee.current?.scrollTo({top:ee.current.scrollHeight})},[i,e]),(0,P.useEffect)(()=>{e&&k.current?.focus()},[e]);let ue=async()=>{let e=o.trim();if(!e||b)return;let t=m.trim(),n=hE(u,re,N),r={model:c,system:t,tokenName:n};O.current&&gE(O.current,r)&&(D.current=void 0),O.current=r;let l=j?S:[],d=dE(i,j),p=new AbortController;E.current=p;let h={role:`user`,text:e};l.length>0&&(h.images=l),a(e=>[...e,h,{role:`assistant`,text:``,status:`streaming`}]),s(``),C([]),x(!0);try{let r={prompt:e,model:c,projectName:SE,..._E(n)};if(t&&(r.system=t),f&&(r.effort=f),l.length>0&&(r.input=l.map(e=>({type:`image`,url:e}))),d.length>0&&(r.history=JSON.stringify(d)),D.current&&(r.runContext={threadCoord:D.current}),j){let e=await $({method:`POST`,url:`/api/qgrid/query`,data:{args:{...r,imageGeneration:`auto`}},signal:p.signal});if(E.current!==p||p.signal.aborted)return;D.current=e.runContext?.threadCoord,se(t=>({...t,text:e.text,images:fE(e.content),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}})),x(!1),E.current=null;return}let{streamId:i}=await lE.prepareStream(r);if(E.current!==p||p.signal.aborted)return;y(i)}catch(e){if(E.current!==p||p.signal.aborted)return;ce(e instanceof Error?e.message:String(e)),E.current=null}},de=()=>{E.current?.abort(),E.current=null,se(e=>e.status===`streaming`?{...e,status:`aborted`}:e),y(null),x(!1)};return(0,F.jsxs)(`div`,{className:`fixed bottom-5 right-5 z-40`,children:[w&&(0,F.jsx)(xE,{url:w,onClose:()=>T(null)},w),e?(0,F.jsxs)(`div`,{onAnimationEnd:()=>{n&&(t(!1),r(!1))},className:`flex flex-col w-[min(400px,calc(100vw-2.5rem))] h-[min(640px,calc(100dvh-7rem))] bg-white rounded-2xl shadow-[0_16px_48px_rgba(44,36,24,0.18),0_0_0_1px_rgba(227,218,204,0.6)] overflow-hidden origin-bottom-right ${n?`chat-panel-pop-out`:`chat-panel-pop`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5 px-4 py-2.5 border-b border-sand-100 shrink-0`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`p`,{className:`text-[14px] font-semibold text-sand-900 leading-tight`,children:`채팅`}),(0,F.jsxs)(`p`,{className:`text-[11px] text-sand-400 truncate leading-tight`,children:[c,f?` · ${f}`:``,u?` · ${u}`:``]})]}),(0,F.jsxs)(`div`,{className:`ml-auto flex items-center gap-0.5`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>_(e=>!e),title:`모델·토큰·effort·system prompt 설정`,className:`size-8 grid place-items-center rounded-full transition-colors duration-150 ${g?`text-sienna-500 bg-sienna-50`:`text-sand-500 hover:text-sand-700 hover:bg-sand-100`}`,children:(0,F.jsx)(du,{className:`size-4`})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{b&&de(),a([]),D.current=void 0,O.current=void 0},disabled:i.length===0,title:`새 대화`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,F.jsx)(uu,{className:`size-4`})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?t(!1):r(!0)},title:`닫기`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 transition-colors duration-150`,children:(0,F.jsx)(pu,{className:`size-4.5`})})]})]}),g&&(0,F.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand-100 bg-sand-50/60 shrink-0 flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(`select`,{value:c,onChange:e=>l(e.target.value),disabled:b,className:`min-w-0 flex-1 rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-800 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:Sy.map(e=>(0,F.jsx)(`optgroup`,{label:e.label,children:e.models.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))},e.label))}),(0,F.jsxs)(`select`,{value:f,onChange:e=>p(e.target.value),disabled:b,className:`rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-600 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,F.jsx)(`option`,{value:``,children:`effort 기본`}),wy.options.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))]})]}),(0,F.jsxs)(`select`,{value:u,onChange:e=>d(e.target.value),disabled:b,"aria-label":`요청 토큰`,className:`w-full rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-700 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,F.jsx)(`option`,{value:``,children:`토큰 자동 분배`}),re.map(e=>(0,F.jsx)(`option`,{value:e.name,children:e.name},e.name))]}),(0,F.jsx)(`textarea`,{value:m,onChange:e=>h(e.target.value),disabled:b,placeholder:`system prompt (선택)`,rows:2,className:`w-full resize-none rounded-xl border border-sand-200/80 bg-white px-2.5 py-1.5 text-[12px] text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 disabled:opacity-50`})]}),(0,F.jsx)(`div`,{ref:ee,className:`flex-1 overflow-y-auto main-scroll px-3.5 py-3`,children:i.length===0?(0,F.jsx)(`div`,{className:`h-full grid place-items-center`,children:(0,F.jsxs)(`div`,{className:`text-center px-4`,children:[(0,F.jsx)(`img`,{src:mu,alt:``,className:`mx-auto mb-2.5 size-14 rounded-[35%] object-cover`}),(0,F.jsx)(`p`,{className:`text-[13px] text-sand-600`,children:`가용 토큰에게 바로 물어보세요.`}),(0,F.jsxs)(`p`,{className:`mt-1 text-[11px] text-sand-400`,children:[`대화는 저장되지 않고, 요청은`,` `,(0,F.jsx)(ne,{to:`/logs`,search:{project:SE,page:1},className:`text-sienna-500 hover:underline`,children:`request log`}),`에 기록됩니다.`]})]})}):(0,F.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:i.map((e,t)=>e.role===`user`?(0,F.jsxs)(`div`,{className:`self-end max-w-[80%] flex flex-col items-end gap-1`,children:[e.images&&(0,F.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1`,children:e.images.map((e,t)=>(0,F.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`첨부 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,F.jsx)(`img`,{src:e,alt:``,className:`size-24 rounded-xl object-cover`})},t))}),(0,F.jsx)(`div`,{className:`rounded-[18px] rounded-br-[5px] bg-sienna-600 px-3.5 py-2 text-[13px] leading-relaxed text-white whitespace-pre-wrap break-words`,children:e.text})]},t):(0,F.jsxs)(`div`,{className:`self-start max-w-[88%] min-w-0`,children:[(0,F.jsxs)(`div`,{className:`rounded-[18px] rounded-bl-[5px] bg-sand-100 px-3.5 py-2`,children:[e.images?.map((e,t)=>(0,F.jsxs)(`div`,{className:`my-1.5`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`생성된 이미지 ${t+1} 크게 보기`,className:`block w-full cursor-zoom-in rounded-xl`,children:(0,F.jsx)(`img`,{src:e,alt:`생성된 이미지 ${t+1}`,onLoad:()=>ee.current?.scrollTo({top:ee.current.scrollHeight}),className:`w-full rounded-xl object-contain bg-white`})}),(0,F.jsx)(`a`,{href:e,download:`qgrid-image-${t+1}.${e.startsWith(`data:image/jpeg;`)?`jpg`:e.startsWith(`data:image/webp;`)?`webp`:`png`}`,className:`mt-1 inline-block text-[11px] text-sienna-500 hover:underline`,children:`이미지 다운로드`})]},t)),e.text?(0,F.jsx)(`div`,{className:`prose prose-sm prose-qgrid max-w-none text-[13px] leading-relaxed break-words`,children:(0,F.jsx)(rs,{remarkPlugins:[su],children:e.text})}):e.status===`streaming`?(0,F.jsxs)(`span`,{className:`inline-flex gap-1 py-1.5 px-0.5`,"aria-label":`응답 대기 중`,children:[(0,F.jsx)(`span`,{className:`chat-typing-dot`}),(0,F.jsx)(`span`,{className:`chat-typing-dot [animation-delay:150ms]`}),(0,F.jsx)(`span`,{className:`chat-typing-dot [animation-delay:300ms]`})]}):null,e.status===`aborted`&&(0,F.jsx)(`p`,{className:`mt-1 text-[10px] text-sand-400`,children:`중단됨`}),e.status===`error`&&(0,F.jsx)(`p`,{className:`mt-1 text-[12px] text-danger-500 break-words`,children:e.error})]}),e.meta&&(0,F.jsxs)(ne,{to:e.meta.requestLogId===void 0?`/logs`:`/requests/show`,search:e.meta.requestLogId===void 0?{project:SE,page:1}:{id:e.meta.requestLogId},className:`mt-1 ml-1.5 inline-block text-[10px] tabular-nums text-sand-400 hover:text-sienna-500 transition-colors duration-150`,title:`request log 보기`,children:[e.meta.model,e.meta.fallback&&` (폴백)`,e.meta.tokenName?` · ${e.meta.tokenName}`:``,` · ${(e.meta.durationMs/1e3).toFixed(1)}s · ${EE(e.meta.costUsd)}`]})]},t))})}),ae&&(0,F.jsxs)(`div`,{className:`px-4 py-1.5 border-t border-caution-400/30 bg-caution-400/10 text-[11px] text-caution-500 shrink-0`,children:[wE.get(A)??A,` 토큰이 등록되어 있지 않습니다.`,` `,(0,F.jsx)(ne,{to:`/tokens`,className:`font-medium underline hover:text-caution-400`,children:`Tokens 페이지`}),`에서 추가해주세요.`]}),(0,F.jsxs)(`div`,{className:`px-3 py-2.5 border-t border-sand-100 shrink-0`,children:[S.length>0&&(0,F.jsx)(`div`,{className:`flex gap-1.5 pb-2`,children:S.map((e,t)=>(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>T(e),"aria-label":`첨부할 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,F.jsx)(`img`,{src:e,alt:``,className:`size-12 rounded-xl object-cover`})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>C(e=>e.filter((e,n)=>n!==t)),title:`첨부 제거`,className:`absolute -top-1.5 -right-1.5 size-4.5 grid place-items-center rounded-full bg-sand-800 text-white hover:bg-sand-700`,children:(0,F.jsx)(pu,{className:`size-2.5`})})]},t))}),(0,F.jsxs)(`div`,{className:`flex items-end gap-1.5`,children:[j&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`input`,{ref:te,type:`file`,accept:`image/*`,multiple:!0,hidden:!0,onChange:e=>{oe(e.target.files),e.target.value=``}}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>te.current?.click(),disabled:b||S.length>=DE,title:`이미지 첨부`,className:`size-9 shrink-0 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,F.jsx)(lu,{className:`size-4.5`})})]}),(0,F.jsx)(`textarea`,{ref:k,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ue())},placeholder:`메시지 입력...`,rows:1,className:`min-w-0 flex-1 resize-none [field-sizing:content] max-h-28 rounded-[20px] border border-sand-200/80 bg-sand-50/60 px-4 py-2 text-[13px] leading-relaxed text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 focus:bg-white transition-colors duration-150`}),b?(0,F.jsx)(`button`,{type:`button`,onClick:de,title:`응답 중단`,className:`size-9 shrink-0 grid place-items-center rounded-full border border-sand-200/80 text-sand-600 hover:bg-sand-100 active:scale-[0.96] transition-all duration-150`,children:(0,F.jsx)(fu,{className:`size-3.5`})}):(0,F.jsx)(`button`,{type:`button`,onClick:()=>void ue(),disabled:!o.trim(),title:`전송`,className:`size-9 shrink-0 grid place-items-center rounded-full bg-sienna-600 text-white hover:bg-sienna-700 disabled:opacity-40 active:scale-[0.96] transition-all duration-150`,children:(0,F.jsx)(cu,{className:`size-4.5`})})]})]})]}):(0,F.jsx)(`button`,{type:`button`,onClick:()=>t(!0),title:`채팅 열기`,"aria-label":`채팅 열기`,className:`block size-15 rounded-[35%] overflow-hidden shadow-[0_6px_20px_rgba(44,36,24,0.25)] hover:scale-105 active:scale-[0.96] transition-transform duration-150`,children:(0,F.jsx)(`img`,{src:mu,alt:``,className:`size-full object-cover`})})]})}var jE=`2.22.0`;function ME({className:e}){let t=te({select:e=>e.location.pathname}),{tab:n=`tts`}=b({strict:!1});return(0,F.jsxs)(`aside`,{className:`hidden md:flex w-[200px] bg-sand-50 flex-col shrink-0 border-r border-sand-200/40 ${e??``}`,children:[(0,F.jsx)(`div`,{className:`h-11 flex items-center px-4 border-b border-sand-200/30`,children:(0,F.jsx)(`span`,{className:`text-[13px] font-semibold text-sand-800 tracking-tight`,children:`Qgrid`})}),(0,F.jsx)(`nav`,{className:`flex-1 px-2.5 py-3 space-y-4 overflow-y-auto`,children:be.map(e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`px-2 pb-1.5`,children:(0,F.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.08em] text-sand-400 font-medium`,children:e.label})}),(0,F.jsx)(`div`,{className:`space-y-0.5`,children:e.items.map(e=>{let r=Se(e.path,t),i=r&&!e.tabs;return(0,F.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,F.jsxs)(ne,{to:e.path,className:`flex items-center gap-2 px-2 py-[6px] rounded-[7px] text-[13px] no-underline transition-all duration-150 ${i?`bg-sand-200/60 text-sand-900 font-medium`:r?`text-sand-900 font-medium hover:bg-sand-100`:`text-sand-500 hover:bg-sand-100 hover:text-sand-700`}`,style:i?{boxShadow:`0 0.5px 1px rgba(0,0,0,0.04), inset 0 0.5px 0 rgba(255,255,255,0.6)`}:void 0,children:[(0,F.jsx)(e.icon,{className:`size-[15px] shrink-0 ${r?`text-sienna-500`:`text-sand-400`}`}),(0,F.jsx)(`span`,{children:e.title})]}),e.tabs?.map(t=>{let i=r&&n===t;return(0,F.jsx)(ne,{to:e.path,search:{tab:t},className:`flex items-center pl-[31px] pr-2 py-[5px] rounded-[7px] text-[12.5px] no-underline transition-all duration-150 ${i?`bg-sand-200/60 text-sand-900 font-medium`:`text-sand-500 hover:bg-sand-100 hover:text-sand-700`}`,children:ye[t]},t)})]},e.path)})})]},e.label))}),(0,F.jsx)(`div`,{className:`px-4 py-3 border-t border-sand-200/30`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`size-1.5 rounded-full bg-sage-400`}),(0,F.jsxs)(`span`,{className:`text-[10px] text-sand-400`,children:[`v`,jE]})]})})]})}var NE=new Map(Object.entries({"/":`Dashboard`,"/tokens":`Tokens`,"/logs":`Request Logs`,"/monit":`Server Logs`,"/voice":`Voice`}));function PE(e,t){return e.startsWith(`/requests/show`)?{parent:`Request Logs`,parentPath:`/logs`,current:`Detail`}:e===`/voice`?{parent:`Voice`,parentPath:`/voice`,current:ye[t]}:{current:NE.get(e)??e}}function FE(){let e=te({select:e=>e.location.pathname}),{tab:t=`tts`}=b({strict:!1}),n=PE(e,t);return(0,F.jsx)(`div`,{className:`toolbar-glass h-11 shrink-0 flex items-center px-5`,children:(0,F.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-[13px]`,children:[n.parent&&n.parentPath&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ne,{to:n.parentPath,className:`text-sand-400 hover:text-sand-600 transition-colors no-underline`,children:n.parent}),(0,F.jsx)(`span`,{className:`text-sand-300 select-none`,children:`/`})]}),(0,F.jsx)(`span`,{className:`font-medium text-sand-800`,children:n.current})]})})}var IE=[`/login`,`/signup`];function LE({children:e}){(0,P.useEffect)(()=>{let e=navigator.language.split(`-`)[0],t=zT.find(t=>t===e);t!==void 0&&VT(t)},[]);let t=te({select:e=>e.location.pathname}),n=!IE.includes(t);return(0,F.jsxs)(`div`,{className:`flex h-screen w-full bg-sand-100 overflow-hidden font-sans`,children:[n&&(0,F.jsx)(ME,{}),(0,F.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden min-w-0`,children:[n&&(0,F.jsx)(FE,{}),(0,F.jsx)(`main`,{className:`flex-1 overflow-y-auto main-scroll content-inset`,children:(0,F.jsx)(`div`,{className:`px-3 py-4 sm:px-6 sm:py-5 md:px-8`,children:(0,F.jsx)(P.Suspense,{fallback:(0,F.jsx)(`div`,{className:`text-sand-400 text-center py-8 text-sm`,children:`로딩 중...`}),children:e})})}),n&&(0,F.jsx)(Ce,{})]}),n&&(0,F.jsx)(AE,{})]})}var RE={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},zE=Object.create(null),BE=e=>({}),VE=new Proxy(zE,{get(e,t){return BE()[t]??zE[t]},has(e,t){return t in BE()||t in zE},set(e,t,n){let r=BE(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=BE(!0);return delete n[t],!0},ownKeys(){let e=BE(!0);return Object.keys(e)}});VE.NODE_ENV;function HE(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 HE(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return HE(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return HE(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return HE(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return HE(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return HE(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return HE(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function UE(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function WE(e){let t=e.split(`
|
|
103
103
|
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
104
|
-
at `))}function kE(e,t){class n extends e{#e;constructor(...e){if(DE()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=OE(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var AE={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};kE(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:AE[e]){if(super(t?.message,t&&`cause`in t?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,t&&`cause`in t){let{cause:e,...n}=t;this.body=Object.defineProperty(n,"cause",{value:e,writable:!0,configurable:!0})}else this.body=t}},Error);var jE=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},ME=47;function NE(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===ME;)t--;return t===e.length?e:e.slice(0,t)}function PE(e){try{return(NE(new URL(e).pathname)||`/`)!==`/`}catch{throw new jE(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function FE(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new jE(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof jE?t:new jE(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function IE(e,t=`/api/auth`){if(FE(e),PE(e))return e;let n=NE(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function LE(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 RE(e,t,n,r,i){if(e)return IE(e,t);if(r!==!1){let e=TE.BETTER_AUTH_URL||TE.NEXT_PUBLIC_BETTER_AUTH_URL||TE.PUBLIC_BETTER_AUTH_URL||TE.NUXT_PUBLIC_BETTER_AUTH_URL||TE.NUXT_PUBLIC_AUTH_URL||(TE.BASE_URL===`/`?void 0:TE.BASE_URL);if(e)return IE(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&LE(o,`proto`)&&LE(a,`host`))try{return IE(`${o}://${a}`,t)}catch{}if(n){let e=zE(n.url);if(!e)throw new jE(`Could not get origin from request. Please provide a valid base URL.`);return IE(e,t)}if(typeof window<`u`&&window.location)return IE(window.location.origin,t)}function zE(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var BE={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*:/},VE=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,HE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},UE=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function WE(e){return e instanceof Date&&!isNaN(e.getTime())}function GE(e){let t=UE.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 WE(f)?f:null}function KE(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(),s=o.toLowerCase();if(s.length<=9&&s in HE)return HE[s];if(!VE.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(BE).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`);else{if(a&&typeof t==`string`){let e=GE(t);if(e)return e}return i?i(e,t):t}})}catch(t){if(n)throw t;return e}}function qE(e,t={strict:!0}){return KE(e,t)}var JE=[`javascript:`,`data:`,`vbscript:`];function YE(e){let t;try{t=new URL(e)}catch{return!0}return!JE.includes(t.protocol)}var XE={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&YE(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},ZE=[],QE=0,$E=null,eD=4,tD=globalThis.nanostoresGlobal||={epoch:0},nD=()=>{let e,t;for(;QE<ZE.length;){t=QE,QE+=eD;let n=$E?.get(ZE[t]);if(n){if(!n.has(ZE[t+1]))continue;n.clear()}try{ZE[t](ZE[t+1].value,ZE[t+2],ZE[t+3])}catch(t){e=t}}if(ZE.length=QE=0,e)throw e},rD=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{$E?.get(e)?.delete(n);for(let t=QE;t<ZE.length;)ZE[t]===e&&ZE[t+1]===n?ZE.splice(t,eD):t+=eD;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){tD.epoch++;let i=!ZE.length&&!0;for(let i of t)ZE.push(i,n,e,r);i&&nD()},off(){},set(e){let t=n.value;n.eq(t,e)||(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},iD=2,aD=5,oD=6,sD=10,cD=(e,t,n,r)=>(e.events=e.events||{},e.events[n+sD]||(e.events[n+sD]=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);~i&&(r.splice(i,1),r.length||(e.events[n+sD](),delete e.events[n+sD]))}),lD=(e,t)=>cD(e,t,iD,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),uD=1e3,dD=(e,t)=>cD(e,n=>{let r=t(n);r&&e.events[oD].push(r)},aD,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[oD]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[oD])t();e.events[oD]=[]}},uD)},()=>{e.listen=n,e.off=r}});function fD(e,t){let n=mD(t),r=e;for(let e of n){if(r==null)return;r=r[e]}return r}var pD=/(.*)\[(\d+)\]/;function mD(e){return e.split(`.`).flatMap(e=>hD(e))}function hD(e){if(pD.test(e)){let[,t,n]=e.match(pD);return[...hD(t),n]}return[e]}function gD(e,t,n){let r=new Set(t);return e.listen((i,a,o)=>{let s=e=>!Object.is(fD(i,e),fD(a,e));(o===void 0?t.some(t=>a===void 0||(e.eqKey?!e.eqKey(a[t],i[t],t):s(t))):r.has(o)||typeof o==`string`&&(r.has(o.split(/\.|\[/)[0])||!e.eqKey&&a!==void 0&&t.some(s)))&&n(i,a,o)})}function _D(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function vD(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!vD(e[n],t[n]))return!1;return!0}if(_D(e)&&_D(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!vD(e[r],t[r]))return!1;return!0}return!1}function yD(e,t){return lD(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var bD=Symbol.for(`better-auth:auth-query`);function xD(e){return bD in e&&e[bD]===!0}function SD(e){let t=rD(e);return Object.defineProperty(t,bD,{value:!0}),t}var CD=Symbol.for(`better-auth:broadcast-channel`),wD=()=>Math.floor(Date.now()/1e3),TD=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:wD()}))}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 ED(e=`better-auth.message`){return globalThis[CD]||(globalThis[CD]=new TD(e)),globalThis[CD]}var DD=Symbol.for(`better-auth:focus-manager`),OD=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 kD(){return globalThis[DD]||(globalThis[DD]=new OD),globalThis[DD]}var AD=Symbol.for(`better-auth:online-manager`),jD=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 MD(){return globalThis[AD]||(globalThis[AD]=new jD),globalThis[AD]}var ND=()=>Math.floor(Date.now()/1e3),PD=5;function FD(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||MD().isOnline,u=e=>{if(l()){if(e?.event===`storage`)t();else if(e?.event===`poll`)c.lastSessionRequest=ND(),t();else if(e?.event===`visibilitychange`){if(ND()-c.lastSessionRequest<PD)return;c.lastSessionRequest=ND(),t()}else t()}},d=e=>{ED().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=ED().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=kD().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=MD().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=ED().setup(),c.cleanupFocusSetup=kD().setup(),c.cleanupOnlineSetup=MD().setup())},cleanup:()=>{c.isInitialized&&(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.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var ID=()=>typeof window>`u`,LD=uD;function RD(e,t){if(typeof window>`u`)return;let n=e.get();n.data===null&&t!==null&&e.set({...n,data:t,error:null,isPending:!1})}function zD(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function BD(e){return!e||e.session===null&&e.user===null?null:e}function VD(e,t){return vD(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function HD(e,t){let n=rD(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=SD({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});yD(s,VD);let c=async(t,n)=>{let r=s.value;if(s.set({...r,isPending:r.data===null,isRefetching:!0,error:null,refetch:o}),t.aborted)return`aborted`;try{let r=await e(`/get-session`,{method:`GET`,query:n?.query,signal:t});if(t.aborted)return`aborted`;let{data:i,error:a}=zD(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=zD(n))}catch{if(t.aborted)return`aborted`;c=`stale`}if(a){let e=s.value,t=a?.status===401;return s.set({data:t?null:e.data,error:a,isPending:!1,isRefetching:!1,refetch:o}),`failed`}let l=BD(i),u=s.value,d=u.data!=null&&l!=null&&vD(u.data,l)?u.data:l;return s.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:o}),c}catch(e){if(t.aborted)return`aborted`;let n=s.value;return s.set({data:n.data,error:e,isPending:!1,isRefetching:!1,refetch:o}),`failed`}},l=()=>{let e=s.value.data?.session?.expiresAt,t=e instanceof Date?e.getTime():1/0;return Math.min(Date.now()+LD,t)},u=e=>{i=0,r?.cancel();let t=new AbortController,n={cancel:()=>t.abort(),promise:Promise.resolve().then(()=>t.signal.aborted?`aborted`:c(t.signal,e)),revision:a};r=n;let o=e=>{r===n&&(r=void 0,e===`fresh`&&n.revision===a&&(i=l()))};return n.promise.then(o,()=>o(`failed`)),n.promise.then(()=>void 0)},d=()=>r?.revision===a?r.promise.then(()=>void 0):Date.now()<i?Promise.resolve():u(),f=()=>{};return dD(s,()=>{let e;ID()||(e=setTimeout(()=>{d()},0));let r=FD({fetchSession:u,shouldPollSession:()=>s.value.data!=null,sessionSignal:n,options:t});return r.init(),f=r.broadcastSessionUpdate,()=>{e&&clearTimeout(e),r.cleanup()}}),{session:s,$sessionSignal:n,broadcastSessionUpdate:e=>f(e)}}function UD(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 WD(e,t,n=`.`,r){if(!UD(t))return WD(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:UD(a)&&UD(i[t])?WD(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function GD(e){return(...t)=>t.reduce((t,n)=>WD(t,n,``,e),{})}var KD=GD(),qD=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)}},JD=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 t=await i.init?.call(i,e.toString(),n);n=t.options||n,e=t.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}},YD=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}},XD=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 ZD(e){if(typeof e==`number`)return new YD({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new YD(e);case`exponential`:return new XD(e);default:throw Error(`Invalid retry strategy`)}}var QD=[`get`,`post`,`put`,`patch`,`delete`];function $D(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return QD.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var eO=e=>e===`.`||e===`..`,tO=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function nO(e,t){let n=t.get(e);if(n===void 0)return tO(e);if(eO(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function rO(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``,{path:o}=$D(e);o!==e&&(e=`/${o}`),a.endsWith(`/`)||(a+=`/`);let[s,c]=e.replace(a,``).split(`?`),l=new URLSearchParams(c);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)l.append(e,n);continue}else n=JSON.stringify(t);l.set(e,n)}let u=new Map;if(r){if(Array.isArray(r)){let e=s.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];u.set(n,String(e))}}else for(let[e,t]of Object.entries(r))u.set(`:${e}`,String(t))}s=s.split(`/`).map(e=>nO(e,u)).join(`/`),s=s.replace(/^\/+/,``);let d=l.toString();return d=d.length>0?`?${d}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${s}${d}`,a):`${a}${s}${d}`}var iO=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},aO=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function oO(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 aO.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function sO(e){try{return JSON.parse(e),!0}catch{return!1}}function cO(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 lO(e){try{return JSON.parse(e)}catch{return e}}function uO(e){return typeof e==`function`}function dO(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&uO(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&uO(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function fO(...e){let t={};for(let n of e)if(n){if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}}return t}async function pO(e){let t=new Headers(fO(e?.headers,await iO(e)));if(!t.has(`content-type`)){let n=mO(e?.body);n&&t.set(`content-type`,n)}return t}function mO(e){return cO(e)?`application/json`:null}function hO(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function gO(e,t){let{body:n}=e;return n?!cO(n)||typeof n==`string`?n:hO(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function _O(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=$D(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function vO(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var yO=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function bO(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new yO(n.issues);return n.value}function xO(e){"@babel/helpers - typeof";return xO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},xO(e)}function SO(e,t){if(xO(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(xO(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function CO(e){var t=SO(e,`string`);return xO(t)==`symbol`?t:t+``}function wO(e,t,n){return(t=CO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?TO(Object(n),!0).forEach(function(t){wO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var EO=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await JD(e,t),o=dO(a),s=new AbortController,c=a.signal??s.signal,l=rO(i,a),u=await pO(a),d=gO(a,u),f=_O(i,a),p=$($({},a),{},{url:l,headers:u,body:d,method:f,signal:c});for(let e of r.onRequest)if(e){let t=await e(p);typeof t==`object`&&t&&Object.assign(p,t)}(`pipeTo`in p&&typeof p.pipeTo==`function`||typeof(t==null||(n=t.body)==null?void 0:n.pipe)==`function`)&&(`duplex`in p||(p.duplex=`half`));let{clearTimeout:m}=vO(a,s),h=await o(p.url,p);m();let g={response:h,request:p};for(let e of r.onResponse)if(e){var _;let n=await e($($({},g),{},{response:t!=null&&(_=t.hookOptions)!=null&&_.cloneResponse?h.clone():h}));n instanceof Response?h=n:typeof n==`object`&&n&&(h=n.response)}if(h.ok){if(p.method===`HEAD`)return{data:``,error:null};let e=oO(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??lO)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await bO(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e($($({},n),{},{response:t!=null&&(v=t.hookOptions)!=null&&v.cloneResponse?h.clone():h}))}return t?.throw?n.data:{data:n.data,error:null}}let y=t?.jsonParser??lO,b=await h.text(),x=sO(b),S=x?await y(b):null,C={response:h,responseText:b,request:p,error:$($({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var w;await e($($({},C),{},{response:t!=null&&(w=t.hookOptions)!=null&&w.cloneResponse?h.clone():h}))}if(t?.retry){let n=ZD(t.retry),i=t.retryAttempt??0;if(await n.shouldAttemptRetry(i,h)){for(let e of r.onRetry)e&&await e(g);let a=n.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await EO(e,$($({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new qD(h.status,h.statusText,x?S:b);return{data:null,error:$($({},S),{},{status:h.status,statusText:h.statusText})}},DO=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=$($({},n),e.query!==void 0&&{query:$($({},e.query),n?.query)}),a=((r=e.plugins)==null||(r=r.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1))==null?void 0:r.schema)||e.schema;if(a){let r=t;a.config?.prefix&&r.startsWith(a.config.prefix)&&(r=r.replace(a.config.prefix,``),a.config.baseURL&&(t=t.replace(a.config.prefix,a.config.baseURL))),a.config?.baseURL&&r.startsWith(a.config.baseURL)&&(r=r.replace(a.config.baseURL,``)),r.startsWith(`/`)&&r.charAt(1)===`@`&&(r=r.substring(1));let o=a.schema[r];if(o){let{method:a,path:s}=$D(r);a&&(t=t.slice(0,t.length-r.length)+s);let c=n?.headers;if(o.headers&&!n?.disableValidation){let e={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((t,n)=>{e[n.toLowerCase()]=t});else if(typeof n.headers==`object`)for(let[t,r]of Object.entries(n.headers))r!=null&&(e[t.toLowerCase()]=r)}let t=await bO(o.headers,e),r={};for(let[e,n]of Object.entries(t))r[e.toLowerCase()]=n;c=r}let l=o.method??a;if(i=$($($($({},i),l!==void 0&&{method:l}),o.output!==void 0&&{output:o.output}),c!==void 0&&{headers:c}),!n?.disableValidation){if(o.query&&(i.query=await bO(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=$({},e.query);for(let e of Object.keys(t))n?.query&&Object.prototype.hasOwnProperty.call(n.query,e)&&(t[e]=n.query[e]);i.query=$($({},t),i.query)}i=$($({},i),{},{body:o.input?await bO(o.input,n?.body):n?.body,params:o.params?await bO(o.params,n?.params):n?.params})}return{url:t,options:i}}}return $({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),OO=e=>{async function t(t,n){let r=$($($({},e),n),{},{headers:fO(e?.headers,n?.headers),plugins:[...e?.plugins||[],DO(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await EO(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 EO(t,r)}return t},kO=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},AO=e=>e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`,jO=(e,t)=>{let n=`credentials`in Request.prototype,r=RE(e?.baseURL,e?.basePath,void 0,t)??kO(e?.basePath)??`/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=OO({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?qE(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[XE],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=HD(d,e),h=!1,g=e=>{h||e===null||(h=!0,RD(p,e))},_=e?.plugins||[],v={},y={$sessionSignal:f,session:p},b={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},x=[{signal:`$sessionSignal`,matcher:AO,callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of _)e.getAtoms&&Object.assign(y,e.getAtoms?.(d)),e.pathMethods&&Object.assign(b,e.pathMethods),e.atomListeners&&x.push(...e.atomListeners);let S={notify:e=>{y[e].set(!y[e].get())},listen:(e,t)=>{y[e].subscribe(t)},atoms:y};for(let t of _)t.getActions&&(v=KD(t.getActions?.(d,S,e)??{},v));return{get baseURL(){return r},pluginsActions:v,pluginsAtoms:y,pluginPathMethods:b,atomListeners:x,hydrateSession:g,$sessionSignal:f,$fetch:d,$store:S}};function MO(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function NO(e){return e.charAt(0).toUpperCase()+e.slice(1)}var PO=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,FO=/['\u2019]/g;function IO(e){return e.replace(FO,``).match(PO)??[]}function LO(e){return IO(e).map(e=>e.toLowerCase()).join(`-`)}function RO(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 zO(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`||MO(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(LO).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=RO(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),e.callback?.(c)}}})}})}return a()}function BO(e,t={}){let n=(0,P.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,P.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?gD(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,P.useSyncExternalStore)(a,o,xD(e)?()=>e.init:o)}function VO(e){return`use${NO(e)}`}function HO(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,$store:o,atomListeners:s}=jO(e),c={};for(let[e,t]of Object.entries(r))c[VO(e)]=()=>BO(t);return zO({...n,...c,hydrateSession:i,$fetch:a,$store:o},a,t,r,s)}var UO=e=>`[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`,WO=()=>()=>{throw Error(UO(`uploader`))};function GO(){let e=new Map(Object.entries(SE));return t=>e.get(t)??t}var KO=(0,P.createContext)({uploader:WO(),SD:GO()});function qO({children:e,auth:t,...n}){let r={uploader:n.uploader??WO(),auth:t,SD:n.SD??GO()};return(0,F.jsx)(KO.Provider,{value:r,children:e})}function JO({children:e,authOptions:t,...n}){let[r]=(0,P.useState)(()=>HO(t));return(0,F.jsx)(qO,{...n,auth:n.auth??r,children:e})}function YO({children:e,authOptions:t,...n}){return t===void 0?(0,F.jsx)(qO,{...n,children:e}):(0,F.jsx)(JO,{...n,authOptions:t,children:e})}var XO=e=>MT(e);function ZO({children:e}){return(0,F.jsx)(YO,{SD:XO,children:e})}var QO=E()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:$O});function $O(){let{queryClient:e}=QO.useRouteContext();return(0,F.jsxs)(`html`,{lang:`en`,children:[(0,F.jsxs)(`head`,{children:[(0,F.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,F.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.googleapis.com`}),(0,F.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:``}),(0,F.jsx)(`link`,{href:`https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=DM+Mono:wght@400;500&display=swap`,rel:`stylesheet`}),(0,F.jsx)(O,{})]}),(0,F.jsxs)(`body`,{children:[(0,F.jsx)(`div`,{id:`root`,children:(0,F.jsx)(f,{client:e,children:(0,F.jsx)(ZO,{children:(0,F.jsx)(xE,{children:(0,F.jsx)(k,{})})})})}),(0,F.jsx)(M,{})]})]})}var ek=`modulepreload`,tk=function(e){return`/`+e},nk={},rk=function(e){return e.pathname.endsWith(`.css`)},ik=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},ak=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,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}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=tk(t,n);let r=s(t),i=rk(r);return ik(nk,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:ek,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}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)})},ok=y(`/`)({component:j(()=>ak(()=>import(`./routes-Dgh-_yS5.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`)}),sk=Pv(J({type:W(),role:W().optional(),content:Ov().optional(),name:W().optional(),arguments:W().optional(),call_id:W().optional(),output:W().optional()})),ck=Pv(J({mediaType:W().optional(),data:W().optional(),url:W().optional(),byteSize:G().optional()})),lk=Rv([J({accessToken:W(),refreshToken:W(),expiresAt:G(),accountUuid:W()}),J({accessToken:W(),refreshToken:W(),idToken:W().optional(),accessTokenExpiresAt:G(),idTokenExpiresAt:G().optional(),accountId:W(),planType:W().optional()}),J({authMode:Yv(`oauth`),accessToken:W(),refreshToken:W(),expiresAt:W(),issuer:Yv(`https://auth.x.ai`),clientId:W(),scopes:Pv(W()),userId:W(),sessionId:W(),agentId:W(),subscriptionTier:W().optional()})]),uk=Pv(J({name:W(),description:W().optional(),inputSchema:Ov()})),dk=Y([`id-desc`,`id-asc`,`created_at-desc`,`created_at-asc`,`ttft_ms-desc`,`ttft_ms-asc`,`duration_ms-desc`,`duration_ms-asc`,`input_tokens-desc`,`input_tokens-asc`,`output_tokens-desc`,`output_tokens-asc`,`cache_read_tokens-desc`,`cache_read_tokens-asc`,`cache_creation_tokens-desc`,`cache_creation_tokens-asc`,`cost_usd-desc`,`cost_usd-asc`]).describe(`RequestLogOrderBy`),fk=Y([`id`,`token_name`,`user_prompt`]).describe(`RequestLogSearchField`),pk=Y([`running`,`succeeded`,`error`,`aborted`]).describe(`RequestLogStatus`),mk=Y([`image`,`video`,`stt`,`tts`,`live`]).describe(`RequestLogMediaKind`),hk=Y([`generate`,`tool_call`]).describe(`RequestLogStepType`),gk=Y([`id-asc`]).describe(`RequestLogStepOrderBy`),_k=Y([`id`]).describe(`RequestLogStepSearchField`),vk=Y([`key-asc`]).describe(`SettingOrderBy`),yk=Y([`key`]).describe(`SettingSearchField`),bk=Y([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),xk=Y([`id`,`name`]).describe(`TokenSearchField`);J({id:K(),created_at:Mv(),token_name:W().max(100).nullable(),project_name:W().max(50).nullable(),model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),user_prompt:W().nullable(),system_prompt:W().nullable(),response:W(),input_tokens:K(),output_tokens:K(),cache_read_tokens:K(),cache_creation_tokens:K(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),duration_ms:K(),ttft_ms:K(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),image_cost_usd:K().nullable(),image_cost_method:W().max(100).nullable(),service_tier:W().max(20).nullable(),effort:W().max(10).nullable(),history:sk.nullable(),input_images:ck.nullable(),tools:uk.nullable(),json_schema:W().nullable(),status:pk,error_message:W().nullable(),response_json_ok:q().nullable(),tool_call_count:K(),is_image_generation:q(),is_structured:q(),media_kind:mk.nullable()}),J({id:K(),created_at:Mv(),request_log_id:K(),step_index:K(),type:hk,model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),input_tokens:K().nullable(),output_tokens:K().nullable(),cache_read_tokens:K().nullable(),cache_creation_tokens:K().nullable(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),duration_ms:K().nullable(),ttft_ms:K().nullable(),finish_reason:W().max(20).nullable(),reasoning_text:W().nullable(),reasoning_tokens:K().nullable(),tool_call_index:K().nullable(),tool_call_id:W().max(100).nullable(),tool_name:W().max(100).nullable(),tool_args:W().nullable(),tool_result:W().nullable(),tool_duration_ms:K().nullable(),error:W().nullable()}),J({id:K(),created_at:Mv(),key:W().max(100),value:W(),updated_at:Mv().nullable()}),J({id:K(),created_at:Mv(),provider:W().max(20),credentials:lk,name:W(),active:q(),reauth_required:q(),ord:K(),quota_threshold:K().nullable(),weight:K(),keepalive_enabled:q()});var Sk=J({num:G().int().nonnegative(),page:G().int().min(1),search:fk,keyword:W(),orderBy:dk,queryMode:IT,id:LT(G().int().positive()),sonamuFilter:yy(),token_name:W().max(100).nullable(),project_name:W().max(50).nullable(),model_name:W().max(255).nullable()}).partial();J({num:G().int().nonnegative(),page:G().int().min(1),search:_k,keyword:W(),orderBy:gk,queryMode:IT,id:LT(G().int().positive()),sonamuFilter:yy(),request_log_id:K()}).partial(),J({num:G().int().nonnegative(),page:G().int().min(1),search:yk,keyword:W(),orderBy:vk,queryMode:IT,id:LT(G().int().positive()),sonamuFilter:yy(),key:W().max(100)}).partial(),J({num:G().int().nonnegative(),page:G().int().min(1),search:xk,keyword:W(),orderBy:bk,queryMode:IT,id:LT(G().int().positive()),sonamuFilter:yy()}).partial(),J({id:K(),created_at:Mv(),token_name:W().max(100).nullable(),project_name:W().max(50).nullable(),model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),user_prompt:W().nullable(),system_prompt:W().nullable(),response:W(),input_tokens:K(),output_tokens:K(),cache_read_tokens:K(),cache_creation_tokens:K(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),duration_ms:K(),ttft_ms:K(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),image_cost_usd:K().nullable(),image_cost_method:W().max(100).nullable(),effort:W().max(10).nullable(),service_tier:W().max(20).nullable(),history:sk.nullable(),input_images:ck.nullable(),tools:uk.nullable(),status:pk,response_json_ok:q().nullable(),error_message:W().nullable(),tool_call_count:K(),is_image_generation:q(),is_structured:q(),media_kind:mk.nullable()}),J({id:K(),created_at:Mv(),token_name:W().max(100).nullable(),project_name:W().max(50).nullable(),model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),input_tokens:K(),output_tokens:K(),cache_read_tokens:K(),cache_creation_tokens:K(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),duration_ms:K(),ttft_ms:K(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),image_cost_usd:K().nullable(),image_cost_method:W().max(100).nullable(),effort:W().max(10).nullable(),service_tier:W().max(20).nullable(),status:pk,response_json_ok:q().nullable(),tool_call_count:K(),is_image_generation:q(),is_structured:q(),media_kind:mk.nullable()}),J({id:K(),token_name:W().max(100).nullable(),model_name:W().max(255).nullable(),input_tokens:K(),output_tokens:K(),cache_read_tokens:K(),cache_creation_tokens:K(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),cost_usd:K().nullable(),cost_source:W().max(20).nullable()}),Y([`A`,`P`,`C`]),J({id:K(),created_at:Mv(),step_index:K(),type:hk,model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),input_tokens:K().nullable(),output_tokens:K().nullable(),cache_read_tokens:K().nullable(),cache_creation_tokens:K().nullable(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),duration_ms:K().nullable(),ttft_ms:K().nullable(),finish_reason:W().max(20).nullable(),reasoning_text:W().nullable(),reasoning_tokens:K().nullable(),tool_call_index:K().nullable(),tool_call_id:W().max(100).nullable(),tool_name:W().max(100).nullable(),tool_args:W().nullable(),tool_result:W().nullable(),tool_duration_ms:K().nullable(),error:W().nullable()}),J({id:K(),created_at:Mv(),step_index:K(),type:hk,model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),input_tokens:K().nullable(),output_tokens:K().nullable(),cache_read_tokens:K().nullable(),cache_creation_tokens:K().nullable(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),duration_ms:K().nullable(),ttft_ms:K().nullable(),finish_reason:W().max(20).nullable(),reasoning_tokens:K().nullable(),tool_call_index:K().nullable(),tool_call_id:W().max(100).nullable(),tool_name:W().max(100).nullable(),tool_duration_ms:K().nullable(),error:W().nullable()}),J({id:K(),tool_args:W().nullable()}),Y([`A`,`T`,`I`]),J({id:K(),created_at:Mv(),key:W().max(100),value:W(),updated_at:Mv().nullable()}),Y([`A`]),J({id:K(),created_at:Mv(),provider:W().max(20),credentials:lk,name:W(),active:q(),reauth_required:q(),ord:K(),quota_threshold:K().nullable(),weight:K(),keepalive_enabled:q()}),Y([`A`]);var Ck=()=>ak(()=>import(`./logs-BLhlxqoB.js`),__vite__mapDeps([8,1,2,3,6,9,10])),wk=J({token:W().optional(),project:W().optional(),model:W().optional(),sort:dk.optional(),page:Sk.shape.page.default(1)}),Tk=y(`/logs`)({validateSearch:wk,component:j(Ck,`component`)}),Ek=()=>ak(()=>import(`./monit-C3stGFEK.js`),__vite__mapDeps([11,1,2,3,5,6,9])),Dk=J({level:Y([`all`,`warn`,`error`]).optional().default(`all`).catch(()=>`all`)}),Ok=y(`/monit`)({validateSearch:Dk,component:j(Ek,`component`)}),kk=y(`/settings`)({component:j(()=>ak(()=>import(`./settings-DiOZwvRj.js`),__vite__mapDeps([12,1,2,3,7,13])),`component`)}),Ak=y(`/tokens`)({component:j(()=>ak(()=>import(`./tokens-DvCT1bbk.js`),__vite__mapDeps([14,1,2,3,4,5,7,13])),`component`)}),jk=()=>ak(()=>import(`./voice-zPre2iO8.js`),__vite__mapDeps([15,1,2,3,16])),Mk=J({tab:Y(ve).optional()}),Nk=y(`/voice`)({validateSearch:Mk,component:j(jk,`component`)}),Pk=()=>ak(()=>import(`./show-DucEoTrr.js`),__vite__mapDeps([17,1,2,3,6,10,16])),Fk=J({id:G()}),Ik=y(`/requests/show`)({validateSearch:Fk,component:j(Pk,`component`)}),Lk=Sy();J({mediaType:W().optional(),data:W().optional(),url:W().optional(),byteSize:G().optional()});var Rk=Iv({text:W()});Rv([W(),Pv(Rv([Rk,Lk])),Lk]);var zk={IndexRoute:ok.update({id:`/`,path:`/`,getParentRoute:()=>QO}),LogsRoute:Tk.update({id:`/logs`,path:`/logs`,getParentRoute:()=>QO}),MonitRoute:Ok.update({id:`/monit`,path:`/monit`,getParentRoute:()=>QO}),SettingsRoute:kk.update({id:`/settings`,path:`/settings`,getParentRoute:()=>QO}),TokensRoute:Ak.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>QO}),VoiceRoute:Nk.update({id:`/voice`,path:`/voice`,getParentRoute:()=>QO}),RequestsShowRoute:Ik.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>QO})},Bk=QO._addFileChildren(zk)._addFileTypes(),Vk=new ue({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),Hk=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),NT):void 0;Hk&&oe(Vk,Hk);var Uk=window.__SONAMU_SSR_CONFIG__,Wk=_({routeTree:Bk,context:{queryClient:Vk},defaultPreload:`intent`});(async()=>{await Wk.load(),document.documentElement.innerHTML&&Hk?Uk?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),de.createRoot(document).render((0,F.jsx)(C,{router:Wk}))):de.hydrateRoot(document,(0,F.jsx)(C,{router:Wk})):de.createRoot(document).render((0,F.jsx)(C,{router:Wk}))})(),window.__TANSTACK_QUERY_CLIENT__=Vk;export{ve as A,W as C,uu as D,fu as E,he as M,su as O,J as S,pu as T,Cy as _,dk as a,Iv as b,KT as c,UT as d,FT as f,ob as g,sb as h,Tk as i,ye as j,rs as k,GT as l,cb as m,Nk as n,JT as o,Ty as p,Ok as r,qT as s,Ik as t,WT as u,Pv as v,Rv as w,G as x,Sy as y};
|
|
104
|
+
at `))}function GE(e,t){class n extends e{#e;constructor(...e){if(UE()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=WE(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var KE={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};GE(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:KE[e]){if(super(t?.message,t&&`cause`in t?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,t&&`cause`in t){let{cause:e,...n}=t;this.body=Object.defineProperty(n,"cause",{value:e,writable:!0,configurable:!0})}else this.body=t}},Error);var qE=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},JE=47;function YE(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===JE;)t--;return t===e.length?e:e.slice(0,t)}function XE(e){try{return(YE(new URL(e).pathname)||`/`)!==`/`}catch{throw new qE(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function ZE(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new qE(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof qE?t:new qE(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function QE(e,t=`/api/auth`){if(ZE(e),XE(e))return e;let n=YE(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function $E(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 eD(e,t,n,r,i){if(e)return QE(e,t);if(r!==!1){let e=VE.BETTER_AUTH_URL||VE.NEXT_PUBLIC_BETTER_AUTH_URL||VE.PUBLIC_BETTER_AUTH_URL||VE.NUXT_PUBLIC_BETTER_AUTH_URL||VE.NUXT_PUBLIC_AUTH_URL||(VE.BASE_URL===`/`?void 0:VE.BASE_URL);if(e)return QE(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&$E(o,`proto`)&&$E(a,`host`))try{return QE(`${o}://${a}`,t)}catch{}if(n){let e=tD(n.url);if(!e)throw new qE(`Could not get origin from request. Please provide a valid base URL.`);return QE(e,t)}if(typeof window<`u`&&window.location)return QE(window.location.origin,t)}function tD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var nD={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*:/},rD=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,iD={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},aD=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function oD(e){return e instanceof Date&&!isNaN(e.getTime())}function sD(e){let t=aD.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 oD(f)?f:null}function cD(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(),s=o.toLowerCase();if(s.length<=9&&s in iD)return iD[s];if(!rD.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(nD).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`);else{if(a&&typeof t==`string`){let e=sD(t);if(e)return e}return i?i(e,t):t}})}catch(t){if(n)throw t;return e}}function lD(e,t={strict:!0}){return cD(e,t)}var uD=[`javascript:`,`data:`,`vbscript:`];function dD(e){let t;try{t=new URL(e)}catch{return!0}return!uD.includes(t.protocol)}var fD={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&dD(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},pD=[],mD=0,hD=null,gD=4,_D=globalThis.nanostoresGlobal||={epoch:0},vD=()=>{let e,t;for(;mD<pD.length;){t=mD,mD+=gD;let n=hD?.get(pD[t]);if(n){if(!n.has(pD[t+1]))continue;n.clear()}try{pD[t](pD[t+1].value,pD[t+2],pD[t+3])}catch(t){e=t}}if(pD.length=mD=0,e)throw e},yD=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{hD?.get(e)?.delete(n);for(let t=mD;t<pD.length;)pD[t]===e&&pD[t+1]===n?pD.splice(t,gD):t+=gD;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){_D.epoch++;let i=!pD.length&&!0;for(let i of t)pD.push(i,n,e,r);i&&vD()},off(){},set(e){let t=n.value;n.eq(t,e)||(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},bD=2,xD=5,SD=6,CD=10,wD=(e,t,n,r)=>(e.events=e.events||{},e.events[n+CD]||(e.events[n+CD]=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);~i&&(r.splice(i,1),r.length||(e.events[n+CD](),delete e.events[n+CD]))}),TD=(e,t)=>wD(e,t,bD,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),ED=1e3,DD=(e,t)=>wD(e,n=>{let r=t(n);r&&e.events[SD].push(r)},xD,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[SD]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[SD])t();e.events[SD]=[]}},ED)},()=>{e.listen=n,e.off=r}});function OD(e,t){let n=AD(t),r=e;for(let e of n){if(r==null)return;r=r[e]}return r}var kD=/(.*)\[(\d+)\]/;function AD(e){return e.split(`.`).flatMap(e=>jD(e))}function jD(e){if(kD.test(e)){let[,t,n]=e.match(kD);return[...jD(t),n]}return[e]}function MD(e,t,n){let r=new Set(t);return e.listen((i,a,o)=>{let s=e=>!Object.is(OD(i,e),OD(a,e));(o===void 0?t.some(t=>a===void 0||(e.eqKey?!e.eqKey(a[t],i[t],t):s(t))):r.has(o)||typeof o==`string`&&(r.has(o.split(/\.|\[/)[0])||!e.eqKey&&a!==void 0&&t.some(s)))&&n(i,a,o)})}function ND(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function PD(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!PD(e[n],t[n]))return!1;return!0}if(ND(e)&&ND(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!PD(e[r],t[r]))return!1;return!0}return!1}function FD(e,t){return TD(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var ID=Symbol.for(`better-auth:auth-query`);function LD(e){return ID in e&&e[ID]===!0}function RD(e){let t=yD(e);return Object.defineProperty(t,ID,{value:!0}),t}var zD=Symbol.for(`better-auth:broadcast-channel`),BD=()=>Math.floor(Date.now()/1e3),VD=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:BD()}))}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 HD(e=`better-auth.message`){return globalThis[zD]||(globalThis[zD]=new VD(e)),globalThis[zD]}var UD=Symbol.for(`better-auth:focus-manager`),WD=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 GD(){return globalThis[UD]||(globalThis[UD]=new WD),globalThis[UD]}var KD=Symbol.for(`better-auth:online-manager`),qD=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 JD(){return globalThis[KD]||(globalThis[KD]=new qD),globalThis[KD]}var YD=()=>Math.floor(Date.now()/1e3),XD=5;function ZD(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||JD().isOnline,u=e=>{if(l()){if(e?.event===`storage`)t();else if(e?.event===`poll`)c.lastSessionRequest=YD(),t();else if(e?.event===`visibilitychange`){if(YD()-c.lastSessionRequest<XD)return;c.lastSessionRequest=YD(),t()}else t()}},d=e=>{HD().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=HD().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=GD().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=JD().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=HD().setup(),c.cleanupFocusSetup=GD().setup(),c.cleanupOnlineSetup=JD().setup())},cleanup:()=>{c.isInitialized&&(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.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var QD=()=>typeof window>`u`,$D=ED;function eO(e,t){if(typeof window>`u`)return;let n=e.get();n.data===null&&t!==null&&e.set({...n,data:t,error:null,isPending:!1})}function tO(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function nO(e){return!e||e.session===null&&e.user===null?null:e}function rO(e,t){return PD(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function iO(e,t){let n=yD(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=RD({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});FD(s,rO);let c=async(t,n)=>{let r=s.value;if(s.set({...r,isPending:r.data===null,isRefetching:!0,error:null,refetch:o}),t.aborted)return`aborted`;try{let r=await e(`/get-session`,{method:`GET`,query:n?.query,signal:t});if(t.aborted)return`aborted`;let{data:i,error:a}=tO(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=tO(n))}catch{if(t.aborted)return`aborted`;c=`stale`}if(a){let e=s.value,t=a?.status===401;return s.set({data:t?null:e.data,error:a,isPending:!1,isRefetching:!1,refetch:o}),`failed`}let l=nO(i),u=s.value,d=u.data!=null&&l!=null&&PD(u.data,l)?u.data:l;return s.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:o}),c}catch(e){if(t.aborted)return`aborted`;let n=s.value;return s.set({data:n.data,error:e,isPending:!1,isRefetching:!1,refetch:o}),`failed`}},l=()=>{let e=s.value.data?.session?.expiresAt,t=e instanceof Date?e.getTime():1/0;return Math.min(Date.now()+$D,t)},u=e=>{i=0,r?.cancel();let t=new AbortController,n={cancel:()=>t.abort(),promise:Promise.resolve().then(()=>t.signal.aborted?`aborted`:c(t.signal,e)),revision:a};r=n;let o=e=>{r===n&&(r=void 0,e===`fresh`&&n.revision===a&&(i=l()))};return n.promise.then(o,()=>o(`failed`)),n.promise.then(()=>void 0)},d=()=>r?.revision===a?r.promise.then(()=>void 0):Date.now()<i?Promise.resolve():u(),f=()=>{};return DD(s,()=>{let e;QD()||(e=setTimeout(()=>{d()},0));let r=ZD({fetchSession:u,shouldPollSession:()=>s.value.data!=null,sessionSignal:n,options:t});return r.init(),f=r.broadcastSessionUpdate,()=>{e&&clearTimeout(e),r.cleanup()}}),{session:s,$sessionSignal:n,broadcastSessionUpdate:e=>f(e)}}function aO(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 oO(e,t,n=`.`,r){if(!aO(t))return oO(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:aO(a)&&aO(i[t])?oO(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function sO(e){return(...t)=>t.reduce((t,n)=>oO(t,n,``,e),{})}var cO=sO(),lO=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)}},uO=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 t=await i.init?.call(i,e.toString(),n);n=t.options||n,e=t.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}},dO=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}},fO=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 pO(e){if(typeof e==`number`)return new dO({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new dO(e);case`exponential`:return new fO(e);default:throw Error(`Invalid retry strategy`)}}var mO=[`get`,`post`,`put`,`patch`,`delete`];function hO(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return mO.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var gO=e=>e===`.`||e===`..`,_O=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function vO(e,t){let n=t.get(e);if(n===void 0)return _O(e);if(gO(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function yO(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``,{path:o}=hO(e);o!==e&&(e=`/${o}`),a.endsWith(`/`)||(a+=`/`);let[s,c]=e.replace(a,``).split(`?`),l=new URLSearchParams(c);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)l.append(e,n);continue}else n=JSON.stringify(t);l.set(e,n)}let u=new Map;if(r){if(Array.isArray(r)){let e=s.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];u.set(n,String(e))}}else for(let[e,t]of Object.entries(r))u.set(`:${e}`,String(t))}s=s.split(`/`).map(e=>vO(e,u)).join(`/`),s=s.replace(/^\/+/,``);let d=l.toString();return d=d.length>0?`?${d}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${s}${d}`,a):`${a}${s}${d}`}var bO=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},xO=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function SO(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 xO.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function CO(e){try{return JSON.parse(e),!0}catch{return!1}}function wO(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 TO(e){try{return JSON.parse(e)}catch{return e}}function EO(e){return typeof e==`function`}function DO(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&EO(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&EO(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function OO(...e){let t={};for(let n of e)if(n){if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}}return t}async function kO(e){let t=new Headers(OO(e?.headers,await bO(e)));if(!t.has(`content-type`)){let n=AO(e?.body);n&&t.set(`content-type`,n)}return t}function AO(e){return wO(e)?`application/json`:null}function jO(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function MO(e,t){let{body:n}=e;return n?!wO(n)||typeof n==`string`?n:jO(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function NO(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=hO(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function PO(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var FO=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function IO(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new FO(n.issues);return n.value}function LO(e){"@babel/helpers - typeof";return LO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},LO(e)}function RO(e,t){if(LO(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(LO(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function zO(e){var t=RO(e,`string`);return LO(t)==`symbol`?t:t+``}function BO(e,t,n){return(t=zO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?VO(Object(n),!0).forEach(function(t){BO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var UO=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await uO(e,t),o=DO(a),s=new AbortController,c=a.signal??s.signal,l=yO(i,a),u=await kO(a),d=MO(a,u),f=NO(i,a),p=HO(HO({},a),{},{url:l,headers:u,body:d,method:f,signal:c});for(let e of r.onRequest)if(e){let t=await e(p);typeof t==`object`&&t&&Object.assign(p,t)}(`pipeTo`in p&&typeof p.pipeTo==`function`||typeof(t==null||(n=t.body)==null?void 0:n.pipe)==`function`)&&(`duplex`in p||(p.duplex=`half`));let{clearTimeout:m}=PO(a,s),h=await o(p.url,p);m();let g={response:h,request:p};for(let e of r.onResponse)if(e){var _;let n=await e(HO(HO({},g),{},{response:t!=null&&(_=t.hookOptions)!=null&&_.cloneResponse?h.clone():h}));n instanceof Response?h=n:typeof n==`object`&&n&&(h=n.response)}if(h.ok){if(p.method===`HEAD`)return{data:``,error:null};let e=SO(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??TO)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await IO(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e(HO(HO({},n),{},{response:t!=null&&(v=t.hookOptions)!=null&&v.cloneResponse?h.clone():h}))}return t?.throw?n.data:{data:n.data,error:null}}let y=t?.jsonParser??TO,b=await h.text(),x=CO(b),S=x?await y(b):null,C={response:h,responseText:b,request:p,error:HO(HO({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var w;await e(HO(HO({},C),{},{response:t!=null&&(w=t.hookOptions)!=null&&w.cloneResponse?h.clone():h}))}if(t?.retry){let n=pO(t.retry),i=t.retryAttempt??0;if(await n.shouldAttemptRetry(i,h)){for(let e of r.onRetry)e&&await e(g);let a=n.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await UO(e,HO(HO({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new lO(h.status,h.statusText,x?S:b);return{data:null,error:HO(HO({},S),{},{status:h.status,statusText:h.statusText})}},WO=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=HO(HO({},n),e.query!==void 0&&{query:HO(HO({},e.query),n?.query)}),a=((r=e.plugins)==null||(r=r.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1))==null?void 0:r.schema)||e.schema;if(a){let r=t;a.config?.prefix&&r.startsWith(a.config.prefix)&&(r=r.replace(a.config.prefix,``),a.config.baseURL&&(t=t.replace(a.config.prefix,a.config.baseURL))),a.config?.baseURL&&r.startsWith(a.config.baseURL)&&(r=r.replace(a.config.baseURL,``)),r.startsWith(`/`)&&r.charAt(1)===`@`&&(r=r.substring(1));let o=a.schema[r];if(o){let{method:a,path:s}=hO(r);a&&(t=t.slice(0,t.length-r.length)+s);let c=n?.headers;if(o.headers&&!n?.disableValidation){let e={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((t,n)=>{e[n.toLowerCase()]=t});else if(typeof n.headers==`object`)for(let[t,r]of Object.entries(n.headers))r!=null&&(e[t.toLowerCase()]=r)}let t=await IO(o.headers,e),r={};for(let[e,n]of Object.entries(t))r[e.toLowerCase()]=n;c=r}let l=o.method??a;if(i=HO(HO(HO(HO({},i),l!==void 0&&{method:l}),o.output!==void 0&&{output:o.output}),c!==void 0&&{headers:c}),!n?.disableValidation){if(o.query&&(i.query=await IO(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=HO({},e.query);for(let e of Object.keys(t))n?.query&&Object.prototype.hasOwnProperty.call(n.query,e)&&(t[e]=n.query[e]);i.query=HO(HO({},t),i.query)}i=HO(HO({},i),{},{body:o.input?await IO(o.input,n?.body):n?.body,params:o.params?await IO(o.params,n?.params):n?.params})}return{url:t,options:i}}}return HO({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),GO=e=>{async function t(t,n){let r=HO(HO(HO({},e),n),{},{headers:OO(e?.headers,n?.headers),plugins:[...e?.plugins||[],WO(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await UO(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 UO(t,r)}return t},KO=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},qO=e=>e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`,JO=(e,t)=>{let n=`credentials`in Request.prototype,r=eD(e?.baseURL,e?.basePath,void 0,t)??KO(e?.basePath)??`/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=GO({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?lD(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[fD],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=iO(d,e),h=!1,g=e=>{h||e===null||(h=!0,eO(p,e))},_=e?.plugins||[],v={},y={$sessionSignal:f,session:p},b={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},x=[{signal:`$sessionSignal`,matcher:qO,callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of _)e.getAtoms&&Object.assign(y,e.getAtoms?.(d)),e.pathMethods&&Object.assign(b,e.pathMethods),e.atomListeners&&x.push(...e.atomListeners);let S={notify:e=>{y[e].set(!y[e].get())},listen:(e,t)=>{y[e].subscribe(t)},atoms:y};for(let t of _)t.getActions&&(v=cO(t.getActions?.(d,S,e)??{},v));return{get baseURL(){return r},pluginsActions:v,pluginsAtoms:y,pluginPathMethods:b,atomListeners:x,hydrateSession:g,$sessionSignal:f,$fetch:d,$store:S}};function YO(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function XO(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ZO=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,QO=/['\u2019]/g;function $O(e){return e.replace(QO,``).match(ZO)??[]}function ek(e){return $O(e).map(e=>e.toLowerCase()).join(`-`)}function tk(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 nk(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`||YO(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(ek).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=tk(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),e.callback?.(c)}}})}})}return a()}function rk(e,t={}){let n=(0,P.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,P.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?MD(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,P.useSyncExternalStore)(a,o,LD(e)?()=>e.init:o)}function ik(e){return`use${XO(e)}`}function ak(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,$store:o,atomListeners:s}=JO(e),c={};for(let[e,t]of Object.entries(r))c[ik(e)]=()=>rk(t);return nk({...n,...c,hydrateSession:i,$fetch:a,$store:o},a,t,r,s)}var ok=e=>`[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`,sk=()=>()=>{throw Error(ok(`uploader`))};function ck(){let e=new Map(Object.entries(RE));return t=>e.get(t)??t}var lk=(0,P.createContext)({uploader:sk(),SD:ck()});function uk({children:e,auth:t,...n}){let r={uploader:n.uploader??sk(),auth:t,SD:n.SD??ck()};return(0,F.jsx)(lk.Provider,{value:r,children:e})}function dk({children:e,authOptions:t,...n}){let[r]=(0,P.useState)(()=>ak(t));return(0,F.jsx)(uk,{...n,auth:n.auth??r,children:e})}function fk({children:e,authOptions:t,...n}){return t===void 0?(0,F.jsx)(uk,{...n,children:e}):(0,F.jsx)(dk,{...n,authOptions:t,children:e})}var pk=e=>JT(e);function mk({children:e}){return(0,F.jsx)(fk,{SD:pk,children:e})}var hk=E()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:gk});function gk(){let{queryClient:e}=hk.useRouteContext();return(0,F.jsxs)(`html`,{lang:`en`,children:[(0,F.jsxs)(`head`,{children:[(0,F.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,F.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.googleapis.com`}),(0,F.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:``}),(0,F.jsx)(`link`,{href:`https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=DM+Mono:wght@400;500&display=swap`,rel:`stylesheet`}),(0,F.jsx)(O,{})]}),(0,F.jsxs)(`body`,{children:[(0,F.jsx)(`div`,{id:`root`,children:(0,F.jsx)(f,{client:e,children:(0,F.jsx)(mk,{children:(0,F.jsx)(LE,{children:(0,F.jsx)(ee,{})})})})}),(0,F.jsx)(j,{})]})]})}var _k=`modulepreload`,vk=function(e){return`/`+e},yk={},bk=function(e){return e.pathname.endsWith(`.css`)},xk=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Sk=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,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}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=vk(t,n);let r=s(t),i=bk(r);return xk(yk,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:_k,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}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)})},Ck=y(`/`)({component:A(()=>Sk(()=>import(`./routes-D-C4eD90.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`)}),wk=q(J({type:W(),role:W().optional(),content:kv().optional(),name:W().optional(),arguments:W().optional(),call_id:W().optional(),output:W().optional()})),Tk=q(J({mediaType:W().optional(),data:W().optional(),url:W().optional(),byteSize:G().optional()})),Ek=Rv([J({accessToken:W(),refreshToken:W(),expiresAt:G(),accountUuid:W()}),J({accessToken:W(),refreshToken:W(),idToken:W().optional(),accessTokenExpiresAt:G(),idTokenExpiresAt:G().optional(),accountId:W(),planType:W().optional()}),J({authMode:X(`oauth`),accessToken:W(),refreshToken:W(),expiresAt:W(),issuer:X(`https://auth.x.ai`),clientId:W(),scopes:q(W()),userId:W(),sessionId:W(),agentId:W(),subscriptionTier:W().optional()})]),Dk=q(J({name:W(),description:W().optional(),inputSchema:kv()})),Ok=Y([`id-desc`,`id-asc`,`created_at-desc`,`created_at-asc`,`ttft_ms-desc`,`ttft_ms-asc`,`duration_ms-desc`,`duration_ms-asc`,`input_tokens-desc`,`input_tokens-asc`,`output_tokens-desc`,`output_tokens-asc`,`cache_read_tokens-desc`,`cache_read_tokens-asc`,`cache_creation_tokens-desc`,`cache_creation_tokens-asc`,`cost_usd-desc`,`cost_usd-asc`]).describe(`RequestLogOrderBy`),kk=Y([`id`,`token_name`,`user_prompt`]).describe(`RequestLogSearchField`),Ak=Y([`running`,`succeeded`,`error`,`aborted`]).describe(`RequestLogStatus`),jk=Y([`image`,`video`,`stt`,`tts`,`live`,`decision`]).describe(`RequestLogMediaKind`),Mk=Y([`generate`,`tool_call`]).describe(`RequestLogStepType`),Nk=Y([`id-asc`]).describe(`RequestLogStepOrderBy`),Pk=Y([`id`]).describe(`RequestLogStepSearchField`),Fk=Y([`key-asc`]).describe(`SettingOrderBy`),Ik=Y([`key`]).describe(`SettingSearchField`),Lk=Y([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),Rk=Y([`id`,`name`]).describe(`TokenSearchField`);J({id:K(),created_at:Nv(),token_name:W().max(100).nullable(),project_name:W().max(50).nullable(),model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),user_prompt:W().nullable(),system_prompt:W().nullable(),response:W(),input_tokens:K(),output_tokens:K(),cache_read_tokens:K(),cache_creation_tokens:K(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),duration_ms:K(),ttft_ms:K(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),image_cost_usd:K().nullable(),image_cost_method:W().max(100).nullable(),service_tier:W().max(20).nullable(),effort:W().max(10).nullable(),history:wk.nullable(),input_images:Tk.nullable(),tools:Dk.nullable(),json_schema:W().nullable(),status:Ak,error_message:W().nullable(),response_json_ok:Tv().nullable(),tool_call_count:K(),is_image_generation:Tv(),is_structured:Tv(),media_kind:jk.nullable()}),J({id:K(),created_at:Nv(),request_log_id:K(),step_index:K(),type:Mk,model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),input_tokens:K().nullable(),output_tokens:K().nullable(),cache_read_tokens:K().nullable(),cache_creation_tokens:K().nullable(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),duration_ms:K().nullable(),ttft_ms:K().nullable(),finish_reason:W().max(20).nullable(),reasoning_text:W().nullable(),reasoning_tokens:K().nullable(),tool_call_index:K().nullable(),tool_call_id:W().max(100).nullable(),tool_name:W().max(100).nullable(),tool_args:W().nullable(),tool_result:W().nullable(),tool_duration_ms:K().nullable(),error:W().nullable()}),J({id:K(),created_at:Nv(),key:W().max(100),value:W(),updated_at:Nv().nullable()}),J({id:K(),created_at:Nv(),provider:W().max(20),credentials:Ek,name:W(),active:Tv(),reauth_required:Tv(),ord:K(),quota_threshold:K().nullable(),weight:K(),keepalive_enabled:Tv()});var zk=J({num:G().int().nonnegative(),page:G().int().min(1),search:kk,keyword:W(),orderBy:Ok,queryMode:QT,id:$T(G().int().positive()),sonamuFilter:vy(),token_name:W().max(100).nullable(),project_name:W().max(50).nullable(),model_name:W().max(255).nullable()}).partial();J({num:G().int().nonnegative(),page:G().int().min(1),search:Pk,keyword:W(),orderBy:Nk,queryMode:QT,id:$T(G().int().positive()),sonamuFilter:vy(),request_log_id:K()}).partial(),J({num:G().int().nonnegative(),page:G().int().min(1),search:Ik,keyword:W(),orderBy:Fk,queryMode:QT,id:$T(G().int().positive()),sonamuFilter:vy(),key:W().max(100)}).partial(),J({num:G().int().nonnegative(),page:G().int().min(1),search:Rk,keyword:W(),orderBy:Lk,queryMode:QT,id:$T(G().int().positive()),sonamuFilter:vy()}).partial(),J({id:K(),created_at:Nv(),token_name:W().max(100).nullable(),project_name:W().max(50).nullable(),model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),user_prompt:W().nullable(),system_prompt:W().nullable(),response:W(),input_tokens:K(),output_tokens:K(),cache_read_tokens:K(),cache_creation_tokens:K(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),duration_ms:K(),ttft_ms:K(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),image_cost_usd:K().nullable(),image_cost_method:W().max(100).nullable(),effort:W().max(10).nullable(),service_tier:W().max(20).nullable(),history:wk.nullable(),input_images:Tk.nullable(),tools:Dk.nullable(),status:Ak,response_json_ok:Tv().nullable(),error_message:W().nullable(),tool_call_count:K(),is_image_generation:Tv(),is_structured:Tv(),media_kind:jk.nullable()}),J({id:K(),created_at:Nv(),token_name:W().max(100).nullable(),project_name:W().max(50).nullable(),model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),input_tokens:K(),output_tokens:K(),cache_read_tokens:K(),cache_creation_tokens:K(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),duration_ms:K(),ttft_ms:K(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),image_cost_usd:K().nullable(),image_cost_method:W().max(100).nullable(),effort:W().max(10).nullable(),service_tier:W().max(20).nullable(),status:Ak,response_json_ok:Tv().nullable(),tool_call_count:K(),is_image_generation:Tv(),is_structured:Tv(),media_kind:jk.nullable()}),J({id:K(),token_name:W().max(100).nullable(),model_name:W().max(255).nullable(),input_tokens:K(),output_tokens:K(),cache_read_tokens:K(),cache_creation_tokens:K(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),cost_usd:K().nullable(),cost_source:W().max(20).nullable()}),Y([`A`,`P`,`C`]),J({id:K(),created_at:Nv(),step_index:K(),type:Mk,model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),input_tokens:K().nullable(),output_tokens:K().nullable(),cache_read_tokens:K().nullable(),cache_creation_tokens:K().nullable(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),duration_ms:K().nullable(),ttft_ms:K().nullable(),finish_reason:W().max(20).nullable(),reasoning_text:W().nullable(),reasoning_tokens:K().nullable(),tool_call_index:K().nullable(),tool_call_id:W().max(100).nullable(),tool_name:W().max(100).nullable(),tool_args:W().nullable(),tool_result:W().nullable(),tool_duration_ms:K().nullable(),error:W().nullable()}),J({id:K(),created_at:Nv(),step_index:K(),type:Mk,model_name:W().max(255).nullable(),requested_model_name:W().max(255).nullable(),fallback_count:K().nullable(),input_tokens:K().nullable(),output_tokens:K().nullable(),cache_read_tokens:K().nullable(),cache_creation_tokens:K().nullable(),cache_creation_5m_tokens:K().nullable(),cache_creation_1h_tokens:K().nullable(),cost_usd:K().nullable(),cost_source:W().max(20).nullable(),duration_ms:K().nullable(),ttft_ms:K().nullable(),finish_reason:W().max(20).nullable(),reasoning_tokens:K().nullable(),tool_call_index:K().nullable(),tool_call_id:W().max(100).nullable(),tool_name:W().max(100).nullable(),tool_duration_ms:K().nullable(),error:W().nullable()}),J({id:K(),tool_args:W().nullable()}),Y([`A`,`T`,`I`]),J({id:K(),created_at:Nv(),key:W().max(100),value:W(),updated_at:Nv().nullable()}),Y([`A`]),J({id:K(),created_at:Nv(),provider:W().max(20),credentials:Ek,name:W(),active:Tv(),reauth_required:Tv(),ord:K(),quota_threshold:K().nullable(),weight:K(),keepalive_enabled:Tv()}),Y([`A`]);var Bk=()=>Sk(()=>import(`./logs-wd-lZx75.js`),__vite__mapDeps([8,1,2,3,6,9,10])),Vk=J({token:W().optional(),project:W().optional(),model:W().optional(),sort:Ok.optional(),page:zk.shape.page.default(1)}),Hk=y(`/logs`)({validateSearch:Vk,component:A(Bk,`component`)}),Uk=()=>Sk(()=>import(`./monit-BjQUu4NS.js`),__vite__mapDeps([11,1,2,3,5,6,9])),Wk=J({level:Y([`all`,`warn`,`error`]).optional().default(`all`).catch(()=>`all`)}),Gk=y(`/monit`)({validateSearch:Wk,component:A(Uk,`component`)}),Kk=y(`/settings`)({component:A(()=>Sk(()=>import(`./settings-DeJEEmWL.js`),__vite__mapDeps([12,1,2,3,7,13])),`component`)}),qk=y(`/tokens`)({component:A(()=>Sk(()=>import(`./tokens-DZCpfLEe.js`),__vite__mapDeps([14,1,2,3,4,5,7,13])),`component`)}),Jk=()=>Sk(()=>import(`./voice-CfCzLZf2.js`),__vite__mapDeps([15,1,2,3,16])),Yk=J({tab:Y(ve).optional()}),Xk=y(`/voice`)({validateSearch:Yk,component:A(Jk,`component`)}),Zk=()=>Sk(()=>import(`./show-DGcvCaF6.js`),__vite__mapDeps([17,1,2,3,6,10,16])),Qk=J({id:G()}),$k=y(`/requests/show`)({validateSearch:Qk,component:A(Zk,`component`)}),eA=xy();J({mediaType:W().optional(),data:W().optional(),url:W().optional(),byteSize:G().optional()});var tA=Iv({text:W()});Rv([W(),q(Rv([tA,eA])),eA]);var nA={IndexRoute:Ck.update({id:`/`,path:`/`,getParentRoute:()=>hk}),LogsRoute:Hk.update({id:`/logs`,path:`/logs`,getParentRoute:()=>hk}),MonitRoute:Gk.update({id:`/monit`,path:`/monit`,getParentRoute:()=>hk}),SettingsRoute:Kk.update({id:`/settings`,path:`/settings`,getParentRoute:()=>hk}),TokensRoute:qk.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>hk}),VoiceRoute:Xk.update({id:`/voice`,path:`/voice`,getParentRoute:()=>hk}),RequestsShowRoute:$k.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>hk})},rA=hk._addFileChildren(nA)._addFileTypes(),iA=new ue({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),aA=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),YT):void 0;aA&&oe(iA,aA);var oA=window.__SONAMU_SSR_CONFIG__,sA=_({routeTree:rA,context:{queryClient:iA},defaultPreload:`intent`});(async()=>{await sA.load(),document.documentElement.innerHTML&&aA?oA?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),de.createRoot(document).render((0,F.jsx)(C,{router:sA}))):de.hydrateRoot(document,(0,F.jsx)(C,{router:sA})):de.createRoot(document).render((0,F.jsx)(C,{router:sA}))})(),window.__TANSTACK_QUERY_CLIENT__=iA;export{ve as A,W as C,uu as D,fu as E,he as M,su as O,J as S,pu as T,Sy as _,Ok as a,Iv as b,cE as c,aE as d,ZT as f,ab as g,ob as h,Hk as i,ye as j,rs as k,sE as l,sb as m,Xk as n,uE as o,wy as p,Gk as r,lE as s,$k as t,oE as u,q as v,Rv as w,G as x,xy as y};
|