@gscdump/devframe 0.0.0-stage → 5.7.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.md CHANGED
@@ -1,3 +1,90 @@
1
- # Temporary Holding Version
1
+ # @gscdump/devframe
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Search Console data for the page you are developing, in Vite DevTools, Nuxt DevTools, and any [devframe](https://devfra.me) hub.
4
+
5
+ The dock shows clicks, impressions, CTR, and average position for the page that is open in your app, with the change against the previous window, a daily chart, and the top queries. It follows client-side navigation. Type any path or URL to read another page.
6
+
7
+ The data comes from your gscdump [Hosted record](https://gscdump.com), so the devtool makes no calls to Google.
8
+
9
+ ```bash
10
+ npm install -D @gscdump/devframe
11
+ ```
12
+
13
+ ## Vite
14
+
15
+ Enable Vite DevTools and add the plugin:
16
+
17
+ ```ts
18
+ // vite.config.ts
19
+ import { gscdump } from '@gscdump/devframe/vite'
20
+ import { defineConfig } from 'vite'
21
+
22
+ export default defineConfig({
23
+ devtools: true,
24
+ plugins: [gscdump({ site: 'example.com' })],
25
+ })
26
+ ```
27
+
28
+ `@gscdump/devframe/vite` needs `@vitejs/devtools` in the project.
29
+
30
+ ## Nuxt
31
+
32
+ Nuxt DevTools 4 hosts Vite DevTools docks. Add the plugin to Nuxt's Vite config:
33
+
34
+ ```ts
35
+ // nuxt.config.ts
36
+ import { gscdump } from '@gscdump/devframe/vite'
37
+
38
+ export default defineNuxtConfig({
39
+ devtools: { enabled: true },
40
+ vite: {
41
+ plugins: [gscdump({ site: 'example.com' })],
42
+ },
43
+ })
44
+ ```
45
+
46
+ ## Any devframe hub
47
+
48
+ `createGscdumpDevframe()` returns a devframe definition for any hub or adapter:
49
+
50
+ ```ts
51
+ import { initHub } from '@devframes/hub/initiate'
52
+ import { createGscdumpDevframe } from '@gscdump/devframe'
53
+
54
+ const hub = initHub({
55
+ base: '/__devframes/',
56
+ devframes: [createGscdumpDevframe({ site: 'example.com' })],
57
+ })
58
+ ```
59
+
60
+ ## Credentials
61
+
62
+ The devtool reads with a Hosted credential. It looks in this order:
63
+
64
+ 1. The `apiKey` option.
65
+ 2. The `GSCDUMP_API_KEY` environment variable: a user API key from gscdump.com.
66
+ 3. The CLI's Hosted login. Run `gscdump auth login --mode hosted` once.
67
+
68
+ The credential stays in the dev server process. The panel never receives it.
69
+
70
+ ## Options
71
+
72
+ | Option | Default | Description |
73
+ | --- | --- | --- |
74
+ | `site` | The only Site | The Site to read: a Site ID, a Site URL, or its host. If the credential holds several Sites and `site` is not set, the panel asks you to pick one. |
75
+ | `apiKey` | See [Credentials](#credentials) | A gscdump user API key. |
76
+ | `apiRoot` | `GSCDUMP_API_ROOT`, then `https://gscdump.com/api` | The Hosted API root. |
77
+
78
+ ## Pages and windows
79
+
80
+ Search Console stores a Site's pages by path. The devtool reads the path of the page in view, with its query string, and ignores the dev server's origin. Search Console matches a path exactly, so `/blog/` and `/blog` are different pages.
81
+
82
+ The window ends three days before today in Pacific time, because Google has not finalized newer days. The gscdump.com dashboard uses the same end. If the Hosted record ends earlier, the window ends on its last day. The comparison window is the same number of days just before it.
83
+
84
+ ## Coding agents
85
+
86
+ The `get-page-stats` function is also an MCP tool. When the host serves MCP (Vite DevTools does), a coding agent can read a page's clicks, impressions, CTR, position, and top queries while it changes the page.
87
+
88
+ ## License
89
+
90
+ MIT
@@ -0,0 +1,75 @@
1
+ import { cliHeadersOf } from "./credential.mjs";
2
+ import { z } from "zod";
3
+ const accountSchema = z.object({ sites: z.array(z.object({
4
+ siteId: z.string(),
5
+ siteUrl: z.string(),
6
+ oldestDateSynced: z.string().nullable().optional(),
7
+ newestDateSynced: z.string().nullable().optional()
8
+ }).passthrough()) }).passthrough();
9
+ async function readAccount(credential, request) {
10
+ const response = await request(`${credential.apiRoot}/cli/me`, {
11
+ headers: cliHeadersOf(credential),
12
+ redirect: "error",
13
+ signal: AbortSignal.timeout(3e4)
14
+ }).catch((error) => error instanceof Error ? error : new Error(String(error)));
15
+ if (response instanceof Error) return {
16
+ _tag: "Unavailable",
17
+ message: `gscdump.com did not answer: ${response.message}`
18
+ };
19
+ if (response.status === 401 || response.status === 403) return { _tag: "Rejected" };
20
+ if (!response.ok) return {
21
+ _tag: "Unavailable",
22
+ message: `gscdump.com answered ${response.status}.`
23
+ };
24
+ const parsed = accountSchema.safeParse(await response.json().catch(() => null));
25
+ if (!parsed.success) return {
26
+ _tag: "Unavailable",
27
+ message: "gscdump.com returned account data this version cannot read."
28
+ };
29
+ return {
30
+ _tag: "Ok",
31
+ sites: parsed.data.sites.map((site) => ({
32
+ siteId: site.siteId,
33
+ siteUrl: site.siteUrl,
34
+ oldestDate: site.oldestDateSynced ?? null,
35
+ newestDate: site.newestDateSynced ?? null
36
+ }))
37
+ };
38
+ }
39
+ function siteKey(value) {
40
+ const text = value.trim();
41
+ if (text.startsWith("sc-domain:")) return text.slice(10).toLowerCase().replace(/\.$/, "") || void 0;
42
+ const url = URL.parse(/^[a-z][a-z\d+.-]*:\/\//i.test(text) ? text : `https://${text}`);
43
+ if (!url || !url.hostname) return void 0;
44
+ return `${url.hostname.toLowerCase()}${url.pathname.replace(/\/+$/, "")}`;
45
+ }
46
+ function matchSite(sites, target) {
47
+ if (!target) return sites.length === 1 ? {
48
+ _tag: "Found",
49
+ site: sites[0]
50
+ } : {
51
+ _tag: "Missing",
52
+ target: null
53
+ };
54
+ const exact = sites.find((site) => site.siteId === target || site.siteUrl === target);
55
+ if (exact) return {
56
+ _tag: "Found",
57
+ site: exact
58
+ };
59
+ const key = siteKey(target);
60
+ const matches = key === void 0 ? [] : sites.filter((site) => siteKey(site.siteUrl) === key);
61
+ if (matches.length === 1) return {
62
+ _tag: "Found",
63
+ site: matches[0]
64
+ };
65
+ if (matches.length > 1) return {
66
+ _tag: "Ambiguous",
67
+ target,
68
+ matches
69
+ };
70
+ return {
71
+ _tag: "Missing",
72
+ target
73
+ };
74
+ }
75
+ export { matchSite, readAccount };
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./index-B8m88k2l.js";var r=`devframe:client-id`,i;function a(e=globalThis.window){try{let n=e?.sessionStorage;if(n){let e=n.getItem(r);return e||(e=t(),n.setItem(r,e)),e}}catch{}return i??=t(),i}function o(t){t.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let r=n().find(t=>t.id===e);if(!r)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await r.invoke(t)}});let r=!1,i=!1,o=0,s=()=>{r||i||(r=!0,queueMicrotask(async()=>{if(r=!1,i)return;let e=n().map(({invoke:e,...t})=>t);(e.length!==0||o!==0)&&(o=e.length,await t.callOptional(`devframe:agent:sync-client-tools`,a(),e).catch(()=>{}))}))},c=e(s),l=t.events.on(`connection:status`,e=>{e===`connected`&&s()});return s(),()=>{i=!0,c(),l()}}export{o as setupBrowserAgentRpcBridge};
@@ -0,0 +1,4 @@
1
+ (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 e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ee=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),T=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},te=/-\w/g,E=T(e=>e.replace(te,e=>e.slice(1).toUpperCase())),ne=/\B([A-Z])/g,D=T(e=>e.replace(ne,`-$1`).toLowerCase()),re=T(e=>e.charAt(0).toUpperCase()+e.slice(1)),ie=T(e=>e?`on${re(e)}`:``),O=(e,t)=>!Object.is(e,t),ae=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},k=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},oe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},se,ce=()=>se||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function le(e){if(d(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=g(r)?pe(r):le(r);if(i)for(let e in i)t[e]=i[e]}return t}if(g(e)||v(e))return e}var ue=/;(?![^(]*\))/g,de=/:([^]+)/,fe=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function pe(e){let t={};return e.replace(fe,e=>e.startsWith(`/*`)?``:e).split(ue).forEach(e=>{if(e){let n=e.split(de);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function A(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){let r=A(e[n]);r&&(t+=r+` `)}else if(v(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var me=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,he=e(me);me+``;function ge(e){return!!e||e===``}function _e(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=xe(e[i],t[i],n);return r}function ve(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&xe(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function ye(e,t,n){let r=f(e),i=f(t);if(r||i||(r=p(e),i=p(t),r||i))return r&&i?ve(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!xe(e[r],t[r],n))return!1}return String(e)===String(t)}function be(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function xe(e,t,n){if(e===t)return!0;let r=m(e),i=m(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=_(e),i=_(t),r||i?e===t:(r=d(e),i=d(t),r||i?r&&i?be(e,t,n,_e):!1:(r=v(e),i=v(t),r||i?!r||!i?!1:be(e,t,n,ye):String(e)===String(t))))}function Se(e,t){return e.findIndex(e=>xe(e,t))}var Ce=e=>!!(e&&e.__v_isRef===!0),j=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?Ce(e)?j(e.value):JSON.stringify(e,we,2):String(e),we=(e,t)=>Ce(t)?we(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Te(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Te(e))}:_(t)?Te(t):v(t)&&!d(t)&&!C(t)?String(t):t,Te=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,M,Ee=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&M&&(M.active?(this.parent=M,this.index=(M.scopes||(M.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=M;try{return M=this,e()}finally{M=t}}}on(){++this._on===1&&(this.prevScope=M,M=this)}off(){if(this._on>0&&--this._on===0){if(M===this)M=this.prevScope;else{let e=M;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function De(){return M}var N,Oe=new WeakSet,ke=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,M&&(M.active?M.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Oe.has(this)&&(Oe.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ne(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ke(this),Ie(this);let e=N,t=He;N=this,He=!0;try{return this.fn()}finally{Le(this),N=e,He=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Be(e);this.deps=this.depsTail=void 0,Ke(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Oe.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Re(this)&&this.run()}get dirty(){return Re(this)}},Ae=0,je,Me;function Ne(e,t=!1){if(e.flags|=8,t){e.next=Me,Me=e;return}e.next=je,je=e}function Pe(){Ae++}function Fe(){if(--Ae>0)return;if(Me){let e=Me;for(Me=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;je;){let t=je;for(je=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Ie(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Le(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Be(r),Ve(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Re(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ze(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ze(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qe)||(e.globalVersion=qe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Re(e))))return;e.flags|=2;let t=e.dep,n=N,r=He;N=e,He=!0;try{Ie(e);let n=e.fn(e._value);(t.version===0||O(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{N=n,He=r,Le(e),e.flags&=-3}}function Be(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Be(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ve(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var He=!0,Ue=[];function We(){Ue.push(He),He=!1}function Ge(){let e=Ue.pop();He=e===void 0||e}function Ke(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=N;N=void 0;try{t()}finally{N=e}}}var qe=0,Je=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ye=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!N||!He||N===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==N)t=this.activeLink=new Je(N,this),N.deps?(t.prevDep=N.depsTail,N.depsTail.nextDep=t,N.depsTail=t):N.deps=N.depsTail=t,Xe(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=N.depsTail,t.nextDep=void 0,N.depsTail.nextDep=t,N.depsTail=t,N.deps===t&&(N.deps=e)}return t}trigger(e){this.version++,qe++,this.notify(e)}notify(e){Pe();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Fe()}}};function Xe(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Xe(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ze=new WeakMap,Qe=Symbol(``),$e=Symbol(``),et=Symbol(``);function P(e,t,n){if(He&&N){let t=Ze.get(e);t||Ze.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Ye),r.map=t,r.key=n),r.track()}}function tt(e,t,n,r,i,a){let o=Ze.get(e);if(!o){qe++;return}let s=e=>{e&&e.trigger()};if(Pe(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===et||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(et)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Qe)),f(e)&&s(o.get($e)));break;case`delete`:i||(s(o.get(Qe)),f(e)&&s(o.get($e)));break;case`set`:f(e)&&s(o.get(Qe))}}Fe()}function nt(e){let t=F(e);return t===e||(P(t,`iterate`,et),Vt(e))?t:Bt(e)?zt(e)?t.map(e=>Gt(Wt(e))):t.map(Gt):t.map(Wt)}function rt(e){return P(e=F(e),`iterate`,et),e}function it(e,t){return Bt(e)?Gt(zt(e)?Wt(t):t):Wt(t)}var at={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,e=>it(this,e))},concat(...e){return nt(this).concat(...e.map(e=>d(e)?nt(e):e))},entries(){return ot(this,`entries`,e=>(e[1]=it(this,e[1]),e))},every(e,t){return ct(this,`every`,e,t,void 0,arguments)},filter(e,t){return ct(this,`filter`,e,t,e=>e.map(e=>it(this,e)),arguments)},find(e,t){return ct(this,`find`,e,t,e=>it(this,e),arguments)},findIndex(e,t){return ct(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ct(this,`findLast`,e,t,e=>it(this,e),arguments)},findLastIndex(e,t){return ct(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ct(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ut(this,`includes`,e)},indexOf(...e){return ut(this,`indexOf`,e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return ut(this,`lastIndexOf`,e)},map(e,t){return ct(this,`map`,e,t,void 0,arguments)},pop(){return dt(this,`pop`)},push(...e){return dt(this,`push`,e)},reduce(e,...t){return lt(this,`reduce`,e,t)},reduceRight(e,...t){return lt(this,`reduceRight`,e,t)},shift(){return dt(this,`shift`)},some(e,t){return ct(this,`some`,e,t,void 0,arguments)},splice(...e){return dt(this,`splice`,e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return dt(this,`unshift`,e)},values(){return ot(this,`values`,e=>it(this,e))}};function ot(e,t,n){let r=rt(e),i=r[t]();return r!==e&&!Vt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var st=Array.prototype;function ct(e,t,n,r,i,a){let o=rt(e),s=o!==e&&!Vt(e),c=o[t];if(c!==st[t]){let t=c.apply(e,a);return s?Wt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,it(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function lt(e,t,n,r){let i=rt(e),a=i!==e&&!Vt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=it(e,t)),n.call(this,t,it(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?it(e,c):c}function ut(e,t,n){let r=F(e);P(r,`iterate`,et);let i=r[t](...n);return(i===-1||i===!1)&&Ht(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function dt(e,t,n=[]){We(),Pe();let r=F(e)[t].apply(e,n);return Fe(),Ge(),r}var ft=e(`__proto__,__v_isRef,__isVue`),pt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function mt(e){_(e)||(e=String(e));let t=F(this);return P(t,`has`,e),t.hasOwnProperty(e)}var ht=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Nt:Mt:i?jt:At).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=at[t]))return e;if(t===`hasOwnProperty`)return mt}let o=Reflect.get(e,t,I(e)?e:n);if((_(t)?pt.has(t):ft(t))||(r||P(e,`get`,t),i))return o;if(I(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Lt(e):e}return v(o)?r?Lt(o):Ft(o):o}},gt=class extends ht{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Bt(i);if(!Vt(n)&&!Bt(n)&&(i=F(i),n=F(n)),!a&&I(i)&&!I(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:u(e,t),s=Reflect.set(e,t,n,I(e)?e:r);return e===F(r)&&s&&(o?O(n,i)&&tt(e,`set`,t,n,i):tt(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&tt(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!_(t)||!pt.has(t))&&P(e,`has`,t),n}ownKeys(e){return P(e,`iterate`,d(e)?`length`:Qe),Reflect.ownKeys(e)}},_t=class extends ht{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},vt=new gt,yt=new _t,bt=new gt(!0),xt=e=>e,St=e=>Reflect.getPrototypeOf(e);function Ct(e,t,n){return function(...r){let i=this.__v_raw,a=F(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?xt:t?Gt:Wt;return!t&&P(a,`iterate`,l?$e:Qe),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function wt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Tt(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(O(n,a)&&P(i,`get`,n),P(i,`get`,a));let{has:o}=St(i),s=t?xt:e?Gt:Wt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&P(F(t),`iterate`,Qe),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(t);return e||(O(t,i)&&P(r,`has`,t),P(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=F(a),s=t?xt:e?Gt:Wt;return!e&&P(o,`iterate`,Qe),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:wt(`add`),set:wt(`set`),delete:wt(`delete`),clear:wt(`clear`)}:{add(e){let n=F(this),r=St(n),i=F(e),a=!t&&!Vt(e)&&!Bt(e)?i:e;return r.has.call(n,a)||O(e,a)&&r.has.call(n,e)||O(i,a)&&r.has.call(n,i)||(n.add(a),tt(n,`add`,a,a)),this},set(e,n){!t&&!Vt(n)&&!Bt(n)&&(n=F(n));let r=F(this),{has:i,get:a}=St(r),o=i.call(r,e);o||=(e=F(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?O(n,s)&&tt(r,`set`,e,n,s):tt(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=St(t),i=n.call(t,e);i||=(e=F(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&tt(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&tt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ct(r,e,t)}),n}function Et(e,t){let n=Tt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Dt={get:Et(!1,!1)},Ot={get:Et(!1,!0)},kt={get:Et(!0,!1)},At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap;function Pt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ft(e){return Bt(e)?e:Rt(e,!1,vt,Dt,At)}function It(e){return Rt(e,!1,bt,Ot,jt)}function Lt(e){return Rt(e,!0,yt,kt,Mt)}function Rt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Pt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function zt(e){return Bt(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Bt(e){return!!(e&&e.__v_isReadonly)}function Vt(e){return!!(e&&e.__v_isShallow)}function Ht(e){return e?!!e.__v_raw:!1}function F(e){let t=e&&e.__v_raw;return t?F(t):e}function Ut(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&k(e,`__v_skip`,!0),e}var Wt=e=>v(e)?Ft(e):e,Gt=e=>v(e)?Lt(e):e;function I(e){return e?e.__v_isRef===!0:!1}function L(e){return qt(e,!1)}function Kt(e){return qt(e,!0)}function qt(e,t){return I(e)?e:new Jt(e,t)}var Jt=class{constructor(e,t){this.dep=new Ye,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:Wt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Vt(e)||Bt(e);e=n?e:F(e),O(e,t)&&(this._rawValue=e,this._value=n?e:Wt(e),this.dep.trigger())}};function Yt(e){return I(e)?e.value:e}var Xt={get:(e,t,n)=>t===`__v_raw`?e:Yt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return I(i)&&!I(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Zt(e){return zt(e)?e:new Proxy(e,Xt)}var Qt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ye(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qe-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&N!==this)return Ne(this,!0),!0}get value(){let e=this.dep.track();return ze(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function $t(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new Qt(r,i,n)}var en={},tn=new WeakMap,nn=void 0;function rn(e,t=!1,n=nn){if(n){let t=tn.get(n);t||tn.set(n,t=[]),t.push(e)}}function an(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Vt(e)||o===!1||o===0?on(e,1):on(e),m,g,_,v,y=!1,b=!1;if(I(e)?(g=()=>e.value,y=Vt(e)):zt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>zt(e)||Vt(e)),g=()=>e.map(e=>{if(I(e))return e.value;if(zt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){We();try{_()}finally{Ge()}}let t=nn;nn=m;try{return f?f(e,3,[v]):e(v)}finally{nn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>on(e(),t)}let x=De(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(en):en,w=e=>{if(m.flags&1&&(m.dirty||e)){if(n){let t=m.run();if(e||o||y||(b?t.some((e,t)=>O(e,C[t])):O(t,C))){_&&_();let e=nn;nn=m;try{let e=[t,C===en?void 0:b&&C[0]===en?[]:C,v];C=t,f?f(n,3,e):n(...e)}finally{nn=e}}}else m.run()}};return u&&u(w),m=new ke(g),m.scheduler=l?()=>l(w,!1):w,v=e=>rn(e,!1,m),_=m.onStop=()=>{let e=tn.get(m);if(e){if(f)f(e,4);else for(let t of e)t();tn.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function on(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,I(e))on(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)on(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{on(e,t,n)});else if(C(e)){for(let r in e)on(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&on(e[r],t,n)}return e}function sn(e,t,n,r){try{return r?e(...r):e()}catch(e){ln(e,t,n)}}function cn(e,t,n,r){if(h(e)){let i=sn(e,t,n,r);return i&&y(i)&&i.catch(e=>{ln(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(cn(e[a],t,n,r));return i}}function ln(e,n,r,i=!0){let a=n?n.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=n&&n.appContext.config||t;if(n){let t=n.parent,i=n.proxy,a=`https://vuejs.org/error-reference/#runtime-${r}`;for(;t;){let n=t.ec;if(n){for(let t=0;t<n.length;t++)if(n[t](e,i,a)===!1)return}t=t.parent}if(o){We(),sn(o,null,10,[e,i,a]),Ge();return}}un(e,r,a,i,s)}function un(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var R=[],dn=-1,fn=[],pn=null,mn=0,hn=Promise.resolve(),gn=null;function _n(e){let t=gn||hn;return e?t.then(this?e.bind(this):e):t}function vn(e){let t=dn+1,n=R.length;for(;t<n;){let r=t+n>>>1,i=R[r],a=wn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function yn(e){if(!(e.flags&1)){let t=wn(e),n=R[R.length-1];!n||!(e.flags&2)&&t>=wn(n)?R.push(e):R.splice(vn(t),0,e),e.flags|=1,bn()}}function bn(){gn||=hn.then(Tn)}function xn(e){if(!d(e))pn&&e.id===-1?pn.splice(mn+1,0,e):e.flags&1||(fn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)fn.push(e[t]);bn()}function Sn(e,t,n=dn+1){for(;n<R.length;n++){let t=R[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;R.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function Cn(e){if(fn.length){let e=[...new Set(fn)].sort((e,t)=>wn(e)-wn(t));if(fn.length=0,pn){for(let t=0;t<e.length;t++)pn.push(e[t]);return}for(pn=e,mn=0;mn<pn.length;mn++){let e=pn[mn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}pn=null,mn=0}}var wn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Tn(e){try{for(dn=0;dn<R.length;dn++){let e=R[dn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),sn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;dn<R.length;dn++){let e=R[dn];e&&(e.flags&=-2)}dn=-1,R.length=0,Cn(e),gn=null,(R.length||fn.length)&&Tn(e)}}var En=null,Dn=null;function On(e){let t=En;return En=e,Dn=e&&e.type.__scopeId||null,t}function kn(e,t=En,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Ii(-1);let i=On(t),a=Ni.length,o;try{o=e(...n)}finally{for(let e=Ni.length;e>a;e--)Pi();On(i),r._d&&Ii(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function An(e,n){if(En===null)return e;let r=ma(En),i=e.dirs||=[];for(let e=0;e<n.length;e++){let[a,o,s,c=t]=n[e];a&&(h(a)&&(a={mounted:a,updated:a}),a.deep&&on(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function jn(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(We(),cn(c,n,8,[e.el,s,e,t]),Ge())}}function Mn(e,t){if(J){let n=J.provides,r=J.parent&&J.parent.provides;r===n&&(n=J.provides=Object.create(r)),n[e]=t}}function Nn(e,t,n=!1){let r=ta();if(r||Vr){let i=Vr?Vr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&h(t)?t.call(r&&r.proxy):t}}var Pn=Symbol.for(`v-scx`),Fn=()=>Nn(Pn);function In(e,t,n){return Ln(e,t,n)}function Ln(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(sa){if(c===`sync`){let e=Fn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=J;u.call=(e,t,n)=>cn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{B(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():yn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=an(e,n,u);return sa&&(f?f.push(h):d&&h()),h}function Rn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?zn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=ia(this),s=Ln(i,a.bind(r),n);return o(),s}function zn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Bn=Symbol(`_vte`),Vn=e=>e.__isTeleport,Hn=Symbol(`_leaveCb`);function Un(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ji){t=n;break}}return t}function Wn(e){if(!er(e))return Vn(e.type)&&e.children?Un(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function Gn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Gn(Vn(n.type)&&Wn(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Kn(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function qn(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Jn(e){let n=ta(),r=Kt(null);if(n){let i=n.refs===t?n.refs={}:n.refs;Object.defineProperty(i,e,{enumerable:!0,get:()=>r.value,set:e=>r.value=e})}return r}function Yn(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Xn=new WeakMap;function Zn(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>Zn(e,n&&(d(n)?n[t]:n),r,a,o));return}if($n(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&Zn(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ma(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=F(v),b=v===t?i:e=>!Yn(_,e)&&u(y,e),x=(e,t)=>!(t&&Yn(_,t));if(m!=null&&m!==p){if(Qn(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(I(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))sn(p,f,12,[l,_]);else{let t=g(p),n=I(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Xn.delete(e)};t.id=-1,Xn.set(e,t),B(t,r)}else Qn(e),i()}}}function Qn(e){let t=Xn.get(e);t&&(t.flags|=8,Xn.delete(e))}ce().requestIdleCallback,ce().cancelIdleCallback;var $n=e=>!!e.type.__asyncLoader,er=e=>e.type.__isKeepAlive;function tr(e,t){rr(e,`a`,t)}function nr(e,t){rr(e,`da`,t)}function rr(e,t,n=J){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(ar(t,r,n),n){let e=n.parent;for(;e&&e.parent;)er(e.parent.vnode)&&ir(r,t,n,e),e=e.parent}}function ir(e,t,n,r){let i=ar(t,e,r,!0);fr(()=>{c(r[t],i)},n)}function ar(e,t,n=J,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{We();let i=ia(n),a=cn(t,n,e,r);return i(),Ge(),a};return r?i.unshift(a):i.push(a),a}}var or=e=>(t,n=J)=>{(!sa||e===`sp`)&&ar(e,(...e)=>t(...e),n)},sr=or(`bm`),cr=or(`m`),lr=or(`bu`),ur=or(`u`),dr=or(`bum`),fr=or(`um`),pr=or(`sp`),mr=or(`rtg`),hr=or(`rtc`);function gr(e,t=J){ar(`ec`,e,t)}var _r=Symbol.for(`v-ndc`);function vr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&zt(e),r=!1,s=!1;n&&(r=!Vt(e),s=Bt(e),e=rt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Gt(Wt(e[n])):Wt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(v(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}var yr=e=>e?oa(e)?ma(e):yr(e.parent):null,br=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>yr(e.parent),$root:e=>yr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>kr(e),$forceUpdate:e=>e.f||=()=>{yn(e.update)},$nextTick:e=>e.n||=_n.bind(e.proxy),$watch:e=>Rn.bind(e)}),xr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Sr={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(xr(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else wr&&(s[n]=0)}let d=br[n],f,p;if(d)return n===`$attrs`&&P(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return xr(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||xr(n,c)||u(o,c)||u(i,c)||u(br,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Cr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var wr=!0;function Tr(e){let t=kr(e),n=e.proxy,i=e.ctx;wr=!1,t.beforeCreate&&Dr(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:ee,renderTracked:T,renderTriggered:te,errorCaptured:E,serverPrefetch:ne,expose:D,inheritAttrs:re,components:ie,directives:O,filters:ae}=t;if(u&&Er(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Ft(t))}if(wr=!0,o)for(let e in o){let t=o[e],a=Y({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Or(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Mn(t,e[t])})}f&&Dr(f,e,`c`);function k(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(sr,p),k(cr,m),k(lr,g),k(ur,_),k(tr,y),k(nr,b),k(gr,E),k(hr,T),k(mr,te),k(dr,S),k(fr,w),k(pr,ne),d(D)){if(D.length){let t=e.exposed||={};D.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}ee&&e.render===r&&(e.render=ee),re!=null&&(e.inheritAttrs=re),ie&&(e.components=ie),O&&(e.directives=O),ne&&qn(e)}function Er(e,t,n=r){d(e)&&(e=Pr(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Nn(r.from||n,r.default,!0):Nn(r.from||n):Nn(r),I(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Dr(e,t,n){cn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Or(e,t,n,r){let i=r.includes(`.`)?zn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&In(i,n)}else if(h(e))In(i,e.bind(n));else if(v(e)){if(d(e))e.forEach(e=>Or(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&In(i,r,e)}}}function kr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Ar(c,e,o,!0)),Ar(c,t,o)),v(t)&&a.set(t,c),c}function Ar(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Ar(e,a,n,!0),i&&i.forEach(t=>Ar(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=jr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var jr={data:Mr,props:Ir,emits:Ir,methods:Fr,computed:Fr,beforeCreate:z,created:z,beforeMount:z,mounted:z,beforeUpdate:z,updated:z,beforeDestroy:z,beforeUnmount:z,destroyed:z,unmounted:z,activated:z,deactivated:z,errorCaptured:z,serverPrefetch:z,components:Fr,directives:Fr,watch:Lr,provide:Mr,inject:Nr};function Mr(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function Nr(e,t){return Fr(Pr(e),Pr(t))}function Pr(e){if(d(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function z(e,t){return e?[...new Set([].concat(e,t))]:t}function Fr(e,t){return e?s(Object.create(null),e,t):t}function Ir(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),Cr(e),Cr(t??{})):t}function Lr(e,t){if(!e)return t;if(!t)return e;let n=s(Object.create(null),e);for(let r in t)n[r]=z(e[r],t[r]);return n}function Rr(){return{app:null,config:{isNativeTag:i,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var zr=0;function Br(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=Rr(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:zr++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:ga,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&h(e.install)?(a.add(e),e.install(l,...t)):h(e)&&(a.add(e),e(l,...t))),l},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),l},component(e,t){return t?(i.components[e]=t,l):i.components[e]},directive(e,t){return t?(i.directives[e]=t,l):i.directives[e]},mount(a,o,s){if(!c){let u=l._ceVNode||Ui(n,r);return u.appContext=i,s===!0?s=`svg`:s===!1&&(s=void 0),o&&t?t(u,a):e(u,a,s),c=!0,l._container=a,a.__vue_app__=l,ma(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(cn(o,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return i.provides[e]=t,l},runWithContext(e){let t=Vr;Vr=l;try{return e()}finally{Vr=t}}};return l}}var Vr=null,Hr=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${E(t)}Modifiers`]||e[`${D(t)}Modifiers`];function Ur(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Hr(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=a.map(oe)));let c,l=i[c=ie(n)]||i[c=ie(E(n))];!l&&o&&(l=i[c=ie(D(n))]),l&&cn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,cn(u,e,6,a)}}var Wr=new WeakMap;function Gr(e,t,n=!1){let r=n?Wr:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Gr(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Kr(e,t){return!e||!a(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,D(t))||u(e,t))}function qr(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=On(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=qi(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=qi(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:Jr(c)}}catch(t){Ni.length=0,ln(t,e,1),v=Ui(ji)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Yr(y,a)),b=Ki(b,y,!1,!0))}return n.dirs&&(b=Ki(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Gn(Vn(b.type)&&Wn(b)||b,n.transition),v=b,On(_),v}var Jr=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Yr=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Xr(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Zr(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Qr(o,r,n)&&!Kr(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Zr(r,o,l):!!o;return!1}function Zr(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(Qr(t,e,a)&&!Kr(n,a))return!0}return!1}function Qr(e,t,n){let r=e[n],i=t[n];return n===`style`&&v(r)&&v(i)?!xe(r,i):r!==i}function $r({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var ei={},ti=()=>Object.create(ei),ni=e=>Object.getPrototypeOf(e)===ei;function ri(e,t,n,r=!1){let i={},a=ti();e.propsDefaults=Object.create(null),ai(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:It(i):e.type.props?i:a,e.attrs=a}function ii(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=F(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Kr(e.emitsOptions,o))continue;let d=t[o];if(c){if(u(a,o))d!==a[o]&&(a[o]=d,l=!0);else{let t=E(o);i[t]=oi(c,s,t,d,e,!1)}}else d!==a[o]&&(a[o]=d,l=!0)}}}else{ai(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!u(t,a)&&((r=D(a))===a||!u(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=oi(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!u(t,e))&&(delete a[e],l=!0)}l&&tt(e.attrs,`set`,``)}function ai(e,n,r,i){let[a,o]=e.propsOptions,s=!1,c;if(n)for(let t in n){if(ee(t))continue;let l=n[t],d;a&&u(a,d=E(t))?!o||!o.includes(d)?r[d]=l:(c||={})[d]=l:Kr(e.emitsOptions,t)||(!(t in i)||l!==i[t])&&(i[t]=l,s=!0)}if(o){let n=F(r),i=c||t;for(let t=0;t<o.length;t++){let s=o[t];r[s]=oi(a,n,s,i[s],e,!u(i,s))}}return s}function oi(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=u(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&h(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=ia(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===D(n))&&(r=!0))}return r}var si=new WeakMap;function ci(e,r,i=!1){let a=i?si:r.propsCache,o=a.get(e);if(o)return o;let c=e.props,l={},f=[],p=!1;if(!h(e)){let t=e=>{p=!0;let[t,n]=ci(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;e<c.length;e++){let n=E(c[e]);li(n)&&(l[n]=t)}else if(c)for(let e in c){let t=E(e);if(li(t)){let n=c[e],r=l[t]=d(n)||h(n)?{type:n}:s({},n),i=r.type,a=!1,o=!0;if(d(i))for(let e=0;e<i.length;++e){let t=i[e],n=h(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=h(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||u(r,`default`))&&f.push(t)}}let m=[l,f];return v(e)&&a.set(e,m),m}function li(e){return e[0]!==`$`&&!ee(e)}var ui=e=>e===`_`||e===`_ctx`||e===`$stable`,di=e=>d(e)?e.map(qi):[qi(e)],fi=(e,t,n)=>{if(t._n)return t;let r=kn((...e)=>di(t(...e)),n);return r._c=!1,r},pi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(ui(n))continue;let i=e[n];if(h(i))t[n]=fi(n,i,r);else if(i!=null){let e=di(i);t[n]=()=>e}}},mi=(e,t)=>{let n=di(t);e.slots.default=()=>n},hi=(e,t,n)=>{for(let r in t)(n||!ui(r))&&(e[r]=t[r])},gi=(e,t,n)=>{let r=e.slots=ti();if(e.vnode.shapeFlag&32){let e=t._;e?(hi(r,t,n),n&&k(r,`_`,e,!0)):pi(t,r)}else t&&mi(e,t)},_i=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:hi(a,n,r):(o=!n.$stable,pi(n,a)),s=n}else n&&(mi(e,n),s={default:1});if(o)for(let e in a)!ui(e)&&s[e]==null&&delete a[e]},B=ki;function vi(e){return yi(e)}function yi(e,i){let a=ce();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,r,i=null,a=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Bi(e,t)&&(i=ve(e),A(e,a,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===n&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case Ai:y(e,t,r,i);break;case ji:b(e,t,r,i);break;case Mi:e??x(t,r,i,s);break;case V:ie(e,t,r,i,a,o,s,c,l);break;default:f&1?w(e,t,r,i,a,o,s,c,l):f&6?O(e,t,r,i,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,r,i,a,o,s,c,l,xe)}d!=null&&a?Zn(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&Zn(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ne(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&E(e.children,d,null,r,i,bi(e,a),s,u),_&&jn(e,null,r,`created`),te(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ee(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&Zi(f,r,e)}_&&jn(e,null,r,`beforeMount`);let v=Si(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&B(()=>{try{f&&Zi(f,r,e),v&&g.enter(d),_&&jn(e,null,r,`mounted`)}finally{}},i)},te=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Oi(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;te(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},E=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?Ji(e[l]):qi(e[l]);v(null,c,t,n,r,i,a,o,s)}},ne=(e,n,r,i,a,o,s)=>{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&xi(r,!1),(g=h.onVnodeBeforeUpdate)&&Zi(g,r,n,e),f&&jn(n,e,r,`beforeUpdate`),r&&xi(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?D(e.dynamicChildren,d,l,r,i,bi(n,a),o):s||ue(e,n,l,null,r,i,bi(n,a),o,!1),u>0){if(u&16)re(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t],i=m[n],o=h[n];(o!==i||n===`value`)&&c(l,n,i,o,a,r)}}u&1&&e.children!==n.children&&p(l,n.children)}else!s&&d==null&&re(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&B(()=>{g&&Zi(g,r,n,e),f&&jn(n,e,r,`updated`)},i)},D=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el&&(c.type===V||!Bi(c,l)||c.shapeFlag&198)?m(c.el):n;v(c,l,u,null,r,i,a,o,!0)}},re=(e,n,r,i,a)=>{if(n!==r){if(n!==t)for(let t in n)!ee(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(ee(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},ie=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),E(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(D(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ci(e,t,!0)):ue(e,t,n,f,i,a,s,c,l)},O=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):k(t,n,r,i,a,o,c):oe(e,t,c)},k=(e,t,n,r,i,a,o)=>{let s=e.component=ea(e,r,i);if(er(e)&&(s.ctx.renderer=xe),ca(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,se,o),!e.el){let r=s.subTree=Ui(ji);b(null,r,t,n),e.placeholder=r.el}}else se(s,e,t,n,i,a,o)},oe=(e,t,n)=>{let r=t.component=e.component;if(Xr(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,le(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},se=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Ti(e);if(n){t&&(t.el=c.el,le(e,t,o)),n.asyncDep.then(()=>{B(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;xi(e,!1),t?(t.el=c.el,le(e,t,o)):t=c,n&&ae(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Zi(d,s,t,c),xi(e,!0);let f=qr(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ve(p),e,i,a),t.el=f.el,u===null&&$r(e,f.el),r&&B(r,i),(d=t.props&&t.props.onVnodeUpdated)&&B(()=>Zi(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=$n(t);if(xi(e,!1),l&&ae(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Zi(o,d,t),xi(e,!0),s&&Ce){let t=()=>{e.subTree=qr(e),Ce(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=qr(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&B(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;B(()=>Zi(o,d,e),i)}(t.shapeFlag&256||d&&$n(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&B(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ke(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>yn(u),xi(e,!0),l()},le=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ii(e,t.props,r,n),_i(e,t.children,n),We(),Sn(e),Ge()},ue=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){fe(l,d,n,r,i,a,o,s,c);return}if(f&256){de(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&_e(l,i,a),d!==l&&p(n,d)):u&16?m&16?fe(l,d,n,r,i,a,o,s,c):_e(l,i,a,!0):(u&8&&p(n,``),m&16&&E(d,n,r,i,a,o,s,c))},de=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;p<f;p++){let n=t[p]=l?Ji(t[p]):qi(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?_e(e,a,o,!0,!1,f):E(t,r,i,a,o,s,c,l,f)},fe=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?Ji(t[u]):qi(t[u]);if(Bi(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?Ji(t[p]):qi(t[p]);if(Bi(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=e<d?t[e].el:i;for(;u<=p;)v(null,t[u]=l?Ji(t[u]):qi(t[u]),r,n,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)A(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Ji(t[u]):qi(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u<b;u++)C[u]=0;for(u=m;u<=f;u++){let n=e[u];if(y>=b){A(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Bi(n,t[_])){i=_;break}i===void 0?A(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?wi(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1<d?f.el||Di(f):i;C[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==w[_]?pe(n,r,p,2):_--)}}},pe=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){pe(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,xe);return}if(c===V){o(a,t,n);for(let e=0;e<u.length;e++)pe(u[e],t,n,r);o(e.anchor,t,n);return}if(c===Mi){S(e,t,n);return}if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[Hn]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),B(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Hn];a._isLeaving&&a[Hn](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},A=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(We(),Zn(s,null,n,e,!0),Ge()),p!=null&&(!e.ctx||e.ctx===t)&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!$n(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Zi(_,t,e),u&6)ge(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&jn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,xe,r):l&&!l.hasOnce&&(a!==V||d>0&&d&64)?_e(l,t,n,!1,!0):(a===V&&d&384||!i&&u&16)&&_e(c,t,n),r&&me(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&B(()=>{_&&Zi(_,t,e),h&&jn(e,null,t,`unmounted`),v&&(e.el=null)},n)},me=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===V){he(n,r);return}if(t===Mi){C(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},he=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},ge=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ei(c),Ei(l),r&&ae(r),i.stop(),a?(a.flags|=8,A(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,A(o,e,t,n)),s&&B(s,t),B(()=>{e.isUnmounted=!0},t)},_e=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)A(e[o],t,n,r,i)},ve=e=>{if(e.shapeFlag&6)return ve(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Bn];return n?h(n):t},ye=!1,be=(e,t,n)=>{let r;e==null?t._vnode&&(A(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ye||=(ye=!0,Sn(r),Cn(),!1)},xe={p:v,um:A,m:pe,r:me,mt:k,mc:E,pc:ue,pbc:D,n:ve,o:e},Se,Ce;return i&&([Se,Ce]=i(xe)),{render:be,hydrate:Se,createApp:Br(be,Se)}}function bi({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function xi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Si(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ci(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=Ji(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Ci(t,a)),a.type===Ai&&(a.patchFlag===-1&&(a=i[e]=Ji(a)),a.el=t.el),a.type===ji&&!a.el&&(a.el=t.el)}}function wi(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Ti(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ti(t)}function Ei(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Di(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?Di(t.subTree):null}var Oi=e=>e.__isSuspense;function ki(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):xn(e)}var V=Symbol.for(`v-fgt`),Ai=Symbol.for(`v-txt`),ji=Symbol.for(`v-cmt`),Mi=Symbol.for(`v-stc`),Ni=[],H=null;function U(e=!1){Ni.push(H=e?null:[])}function Pi(){Ni.pop(),H=Ni[Ni.length-1]||null}var Fi=1;function Ii(e,t=!1){Fi+=e,e<0&&H&&t&&(H.hasOnce=!0)}function Li(e){return e.dynamicChildren=Fi>0?H||n:null,Pi(),Fi>0&&H&&H.push(e),e}function W(e,t,n,r,i,a){return Li(G(e,t,n,r,i,a,!0))}function Ri(e,t,n,r,i){return Li(Ui(e,t,n,r,i,!0))}function zi(e){return e?e.__v_isVNode===!0:!1}function Bi(e,t){return e.type===t.type&&e.key===t.key}var Vi=({key:e})=>e??null,Hi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||I(e)||h(e)?{i:En,r:e,k:t,f:!!n}:e);function G(e,t=null,n=null,r=0,i=null,a=e===V?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Vi(t),ref:t&&Hi(t),scopeId:Dn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:En};return s?(Yi(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Fi>0&&!o&&H&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&H.push(c),c}var Ui=Wi;function Wi(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===_r)&&(e=ji),zi(e)){let r=Ki(e,t,!0);return n&&Yi(r,n),Fi>0&&!a&&H&&(r.shapeFlag&6?H[H.indexOf(e)]=r:H.push(r)),r.patchFlag=-2,r}if(ha(e)&&(e=e.__vccOpts),t){t=Gi(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=A(e)),v(n)&&(Ht(n)&&!d(n)&&(n=s({},n)),t.style=le(n))}let o=g(e)?1:Oi(e)?128:Vn(e)?64:v(e)?4:h(e)?2:0;return G(e,t,n,r,i,o,a,!0)}function Gi(e){return e?Ht(e)||ni(e)?s({},e):e:null}function Ki(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Xi(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Vi(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Hi(t)):[a,Hi(t)]:Hi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==V?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ki(e.ssContent),ssFallback:e.ssFallback&&Ki(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&Gn(u,c.clone(u)),u}function K(e=` `,t=0){return Ui(Ai,null,e,t)}function q(e=``,t=!1){return t?(U(),Ri(ji,null,e)):Ui(ji,null,e)}function qi(e){return e==null||typeof e==`boolean`?Ui(ji):d(e)?Ui(V,null,e.slice()):zi(e)?Ji(e):Ui(Ai,null,String(e))}function Ji(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ki(e)}function Yi(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Yi(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!ni(t)?t._ctx=En:r===3&&En&&(En.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){Yi(e,{default:t});return}t={default:t,_ctx:En},n=32}else t=String(t),r&64?(n=16,t=[K(t)]):n=8;e.children=t,e.shapeFlag|=n}function Xi(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=A([t.class,r.class]));else if(e===`style`)t.style=le([t.style,r.style]);else if(a(e)){let n=t[e],i=r[e];i&&n!==i&&!(d(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!o(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function Zi(e,t,n,r=null){cn(e,t,7,[n,r])}var Qi=Rr(),$i=0;function ea(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||Qi,o={uid:$i++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ee(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(a.provides),ids:n?n.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ci(i,a),emitsOptions:Gr(i,a),emit:null,emitted:null,propsDefaults:t,inheritAttrs:i.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=n?n.root:o,o.emit=Ur.bind(null,o),e.ce&&e.ce(o),o}var J=null,ta=()=>J||En,na,ra;{let e=ce(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};na=t(`__VUE_INSTANCE_SETTERS__`,e=>J=e),ra=t(`__VUE_SSR_SETTERS__`,e=>sa=e)}var ia=e=>{let t=J;return na(e),e.scope.on(),()=>{e.scope.off(),na(t)}},aa=()=>{J&&J.scope.off(),na(null)};function oa(e){return e.vnode.shapeFlag&4}var sa=!1;function ca(e,t=!1,n=!1){t&&ra(t);let{props:r,children:i}=e.vnode,a=oa(e);ri(e,r,a,t),gi(e,i,n||t);let o=a?la(e,t):void 0;return t&&ra(!1),o}function la(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Sr);let{setup:r}=n;if(r){We();let n=e.setupContext=r.length>1?pa(e):null,i=ia(e),a=sn(r,e,0,[e.props,n]),o=y(a);if(Ge(),i(),(o||e.sp)&&!$n(e)&&qn(e),o){if(a.then(aa,aa),t)return a.then(n=>{ra(!0);try{ua(e,n,t)}finally{ra(!1)}}).catch(t=>{ln(t,e,0)});e.asyncDep=a}else ua(e,a,t)}else da(e,t)}function ua(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Zt(t)),da(e,n)}function da(e,t,n){let i=e.type;e.render||=i.render||r;{let t=ia(e);We();try{Tr(e)}finally{Ge(),t()}}}var fa={get(e,t){return P(e,`get`,``),e[t]}};function pa(e){return{attrs:new Proxy(e.attrs,fa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ma(e){return e.exposed?e.exposeProxy||=new Proxy(Zt(Ut(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in br)return br[n](e)},has(e,t){return t in e||t in br}}):e.proxy}function ha(e){return h(e)&&`__vccOpts`in e}var Y=(e,t)=>$t(e,t,sa),ga=`3.5.43`,_a=void 0,va=typeof window<`u`&&window.trustedTypes;if(va)try{_a=va.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ya=_a?e=>_a.createHTML(e):e=>e,ba=`http://www.w3.org/2000/svg`,xa=`http://www.w3.org/1998/Math/MathML`,Sa=typeof document<`u`?document:null,Ca=Sa&&Sa.createElement(`template`),wa={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Sa.createElementNS(ba,e):t===`mathml`?Sa.createElementNS(xa,e):n?Sa.createElement(e,{is:n}):Sa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Sa.createTextNode(e),createComment:e=>Sa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Sa.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{Ca.innerHTML=ya(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Ca.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ta=Symbol(`_vtc`);function Ea(e,t,n){let r=e[Ta];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Da=Symbol(`_vod`),Oa=Symbol(`_vsh`),ka=Symbol(``),Aa=/(?:^|;)\s*display\s*:/;function ja(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t){if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Na(r,t,``)}else for(let e in t)n[e]??Na(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Na(r,i,``):La(e,i,!g(t)&&t?t[i]:void 0,o)||Na(r,i,o)}}else if(i){if(t!==n){let e=r[ka];e&&(n+=`;`+e),r.cssText=n,a=Aa.test(n)}}else t&&e.removeAttribute(`style`);Da in e&&(e[Da]=a?r.display:``,e[Oa]&&(r.display=`none`))}var Ma=/\s*!important$/;function Na(e,t,n){if(d(n))n.forEach(n=>Na(e,t,n));else if(n??=``,t.startsWith(`--`))Ma.test(n)?e.setProperty(t,n.replace(Ma,``),`important`):e.setProperty(t,n);else{let r=Ia(e,t);Ma.test(n)?e.setProperty(D(r),n.replace(Ma,``),`important`):e[r]=n}}var Pa=[`Webkit`,`Moz`,`ms`],Fa={};function Ia(e,t){let n=Fa[t];if(n)return n;let r=E(t);if(r!==`filter`&&r in e)return Fa[t]=r;r=re(r);for(let n=0;n<Pa.length;n++){let i=Pa[n]+r;if(i in e)return Fa[t]=i}return t}function La(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var Ra=`http://www.w3.org/1999/xlink`;function za(e,t,n,r,i,a=he(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Ra,t.slice(6,t.length)):e.setAttributeNS(Ra,t,n):n==null||a&&!ge(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function Ba(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?ya(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=ge(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Va(e,t,n,r){e.addEventListener(t,n,r)}function Ha(e,t,n,r){e.removeEventListener(t,n,r)}var Ua=Symbol(`_vei`);function Wa(e,t,n,r,i=null){let a=e[Ua]||(e[Ua]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=qa(t);r?Va(e,n,a[t]=Za(r,i),s):o&&(Ha(e,n,o,s),a[t]=void 0)}}var Ga=/(Once|Passive|Capture)$/,Ka=/^on:?(?:Once|Passive|Capture)$/;function qa(e){let t,n;for(;(n=e.match(Ga))&&!Ka.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):D(e.slice(2)),t]}var Ja=0,Ya=Promise.resolve(),Xa=()=>Ja||=(Ya.then(()=>Ja=0),Date.now());function Za(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&cn(e,t,5,a)}}else cn(r,t,5,[e])};return n.value=e,n.attached=Xa(),n}var Qa=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,$a=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?Ea(e,r,c):t===`style`?ja(e,n,r):a(t)?o(t)||Wa(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):eo(e,t,r,c))?(Ba(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&za(e,t,r,c,s,t!==`value`)):e._isVueCE&&(to(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?Ba(e,E(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),za(e,t,r,c))};function eo(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Qa(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Qa(t)&&g(n)?!1:t in e}function to(e,t){let n=e._def.props;if(!n)return!1;let r=E(t);return Array.isArray(n)?n.some(e=>E(e)===r):Object.keys(n).some(e=>E(e)===r)}var no=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>ae(t,e):t};function ro(e){e.target.composing=!0}function io(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var ao=Symbol(`_assign`),oo=Symbol(`_initialValue`);function so(e,t,n){return t&&(e=e.trim()),n&&(e=oe(e)),e}var co={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[oo]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[oo]=e.defaultValue.replace(/\r\n?/g,`
2
+ `))),e[ao]=no(i);let a=r||i.props&&i.props.type===`number`;Va(e,t?`change`:`input`,t=>{t.target.composing||e[ao](so(e.value,n,a))}),(n||a)&&Va(e,`change`,()=>{e.value=so(e.value,n,a)}),t||(Va(e,`compositionstart`,ro),Va(e,`compositionend`,io),Va(e,`change`,io))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[oo];delete e[oo],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[ao](so(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[ao]=no(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?oe(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},lo={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Va(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?oe(po(e)):po(e)),r=e.multiple,i=r?p(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?d(i)?t.slice():t:i];try{e[ao](i)}finally{_n(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[ao]=no(r)},mounted(e,{value:t}){fo(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[ao]=no(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!uo(t,n[1],n[0]))&&fo(e,t)}};function uo(e,t,n){if(!n||d(e))return xe(e,t);if(p(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function fo(e,t){let n=e.multiple,r=d(t);if(!n||r||p(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=po(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):Se(t,o)>-1}else a.selected=t.has(o)}else if(xe(po(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function po(e){return`_value`in e?e._value:e.value}var mo=[`ctrl`,`shift`,`alt`,`meta`],ho={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>mo.some(n=>e[`${n}Key`]&&!t.includes(n))},go=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=ho[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},_o=s({patchProp:$a},wa),vo;function yo(){return vo||=vi(_o)}var bo=((...e)=>{let t=yo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=So(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,xo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function xo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function So(e){return g(e)?document.querySelector(e):e}function Co(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var wo={blue:Co(34,39),cyan:Co(36,39),gray:Co(90,39),green:Co(32,39),red:Co(31,39),yellow:Co(33,39),bold:Co(1,22),dim:Co(2,22),reset:Co(0,0),underline:Co(4,24)};function To(e,...t){return typeof e==`function`?e(...t):e}var Eo=Error.captureStackTrace,Do=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,Eo?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function Oo(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function ko(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||Oo(r,i),s=(e={},n={})=>{let r=new Do({code:i,why:To(a.why,e),fix:To(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:To(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Ao(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
3
+ `)}}var X={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},jo=Ao(wo);function Mo(e,{method:t=`warn`}={}){console[t](jo(e))}function No(e){return ko({...e,reporters:[Mo,...e.reporters??[]]})}function Po(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Fo=Math.random.bind(Math),Io=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Lo(e=21){let t=``,n=e;for(;n--;)t+=Io[Fo()*64|0];return t}var Ro=6e4,zo=e=>e,Bo=zo,{clearTimeout:Vo,setTimeout:Ho}=globalThis;function Uo(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=zo,deserialize:s=Bo,resolver:c,bind:l=`rpc`,timeout:u=Ro,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Po(),_=Lo();s.i=_;let v;async function y(n=s){return u>=0&&(v=Ho(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Vo(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Vo(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function Wo(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Go=Object.freeze({type:`object`,additionalProperties:!0});function Ko(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Go}return Go}function qo(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=Ko(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function Jo(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function Yo(e,t){return Jo(e,t)??[e]}function Xo(e){return typeof e==`string`?`'${e}'`:new es().serialize(e)}var Zo=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Qo=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Zo.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function $o(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Qo[n]?Qo[n]:n+128,s=a<128&&Qo[a]?Qo[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var es=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?$o(e,t):n===`number`&&r===`number`?e-t:$o(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort($o),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),ts=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],ns=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],rs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,is=[],as=class{_data=new os;_hash=new os([...ts]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)is[n]=e[t+n]|0;else{let e=is[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=is[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;is[n]=t+is[n-7]+i+is[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+ns[n]+is[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=os.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new os(t,i)}},os=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(rs.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function ss(e){return new as().finalize(e).toBase64()}function cs(e){return ss(Xo(e))}function ls(e){return cs(e)}function us(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var ds=/^[\w+.-]{2,}:\/\//;function fs(e){return e.endsWith(`/`)?e:`${e}/`}function ps(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function ms(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?fs(n)+e.replace(/^\.?\//,``):e);return n}function hs(e,t){if(!t||t===`/`||ds.test(e))return e;let n=ps(t);return e.startsWith(n)?e:ms(n,e)}function gs(e,t){let n=e.match(ds);return t+(n?e.slice(n[0].length):e)}var _s=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function vs(e=21){let t=``,n=e;for(;n--;)t+=_s[Math.random()*64|0];return t}var ys=Symbol.for(`immer-nothing`),bs=Symbol.for(`immer-draftable`),Z=Symbol.for(`immer-state`),xs=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function Q(e,...t){{let n=xs[e],r=Ws(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var $=Object,Ss=$.getPrototypeOf,Cs=`constructor`,ws=`prototype`,Ts=`configurable`,Es=`enumerable`,Ds=`writable`,Os=`value`,ks=e=>!!e&&!!e[Z];function As(e){return e?Ns(e)||Bs(e)||!!e[bs]||!!e[Cs]?.[bs]||Vs(e)||Hs(e):!1}var js=$[ws][Cs].toString(),Ms=new WeakMap;function Ns(e){if(!e||!Us(e))return!1;let t=Ss(e);if(t===null||t===$[ws])return!0;let n=$.hasOwnProperty.call(t,Cs)&&t[Cs];if(n===Object)return!0;if(!Ws(n))return!1;let r=Ms.get(n);return r===void 0&&(r=Function.toString.call(n),Ms.set(n,r)),r===js}function Ps(e,t,n=!0){Fs(e)===0?(n?Reflect.ownKeys(e):$.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Fs(e){let t=e[Z];return t?t.type_:Bs(e)?1:Vs(e)?2:Hs(e)?3:0}var Is=(e,t,n=Fs(e))=>n===2?e.has(t):$[ws].hasOwnProperty.call(e,t),Ls=(e,t,n=Fs(e))=>n===2?e.get(t):e[t],Rs=(e,t,n,r=Fs(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function zs(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Bs=Array.isArray,Vs=e=>e instanceof Map,Hs=e=>e instanceof Set,Us=e=>typeof e==`object`,Ws=e=>typeof e==`function`,Gs=e=>typeof e==`boolean`;function Ks(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var qs=e=>Us(e)?e?.[Z]:null,Js=e=>e.copy_||e.base_,Ys=e=>e.modified_?e.copy_:e.base_;function Xs(e,t){if(Vs(e))return new Map(e);if(Hs(e))return new Set(e);if(Bs(e))return Array[ws].slice.call(e);let n=Ns(e);if(t===!0||t===`class_only`&&!n){let t=$.getOwnPropertyDescriptors(e);delete t[Z];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Ds]===!1&&(a[Ds]=!0,a[Ts]=!0),(a.get||a.set)&&(t[i]={[Ts]:!0,[Ds]:!0,[Es]:a[Es],[Os]:e[i]})}return $.create(Ss(e),t)}{let t=Ss(e);if(t!==null&&n)return{...e};let r=$.create(t);return $.assign(r,e)}}function Zs(e,t=!1){return ec(e)||ks(e)||!As(e)?e:(Fs(e)>1&&$.defineProperties(e,{set:$s,add:$s,clear:$s,delete:$s}),$.freeze(e),t&&Ps(e,(e,t)=>{Zs(t,!0)},!1),e)}function Qs(){Q(2)}var $s={[Os]:Qs};function ec(e){return e===null||!Us(e)||$.isFrozen(e)}var tc=`MapSet`,nc=`Patches`,rc=`ArrayMethods`,ic={};function ac(e){let t=ic[e];return t||Q(0,e),t}var oc=e=>!!ic[e];function sc(e,t){ic[e]||(ic[e]=t)}var cc,lc=()=>cc,uc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:oc(tc)?ac(tc):void 0,arrayMethodsPlugin_:oc(rc)?ac(rc):void 0});function dc(e,t){t&&(e.patchPlugin_=ac(nc),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fc(e){pc(e),e.drafts_.forEach(hc),e.drafts_=null}function pc(e){e===cc&&(cc=e.parent_)}var mc=e=>cc=uc(cc,e);function hc(e){let t=e[Z];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Z].modified_&&(fc(t),Q(4)),As(e)&&(e=_c(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Z].base_,e,t)}else e=_c(t,n);return vc(t,e,!0),fc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===ys?void 0:e}function _c(e,t){if(ec(t))return t;let n=t[Z];if(!n)return Ec(t,e.handledSet_,e);if(!bc(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);wc(n,e)}return n.copy_}function vc(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zs(t,n)}function yc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var bc=(e,t)=>e.scope_===t,xc=[];function Sc(e,t,n,r){let i=Js(e),a=e.type_;if(r!==void 0&&Ls(i,r,a)===t){Rs(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Ps(i,(e,n)=>{if(ks(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??xc;for(let e of o)Rs(i,e,n,a)}function Cc(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!bc(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Ys(i);Sc(e,i.draft_??i,a,n),wc(i,r)})}function wc(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}yc(e)}}function Tc(e,t,n){let{scope_:r}=e;if(ks(n)){let i=n[Z];bc(i,r)&&i.callbacks_.push(function(){Fc(e),Sc(e,n,Ys(i),t)})}else As(n)&&e.callbacks_.push(function(){let i=Js(e);e.type_===3?i.has(n)&&Ec(n,r.handledSet_,r):Ls(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ec(Ls(e.copy_,t,e.type_),r.handledSet_,r)})}function Ec(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||ks(e)||t.has(e)||!As(e)||ec(e)?e:(t.add(e),Ps(e,(r,i)=>{if(ks(i)){let t=i[Z];bc(t,n)&&(Rs(e,r,Ys(t),e.type_),yc(t))}else As(i)&&Ec(i,t,n)}),e)}function Dc(e,t){let n=Bs(e),r={type_:+!!n,scope_:t?t.scope_:lc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Oc;n&&(i=[r],a=kc);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Oc={get(e,t){if(t===Z)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Js(e);if(!Is(i,t,e.type_))return Mc(e,i,t);let a=i[t];if(e.finalized_||!As(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Ks(t))return a;if(a===Ac(e.base_,t)||jc(e,t,a)){Fc(e);let n=e.type_===1?+t:t,r=Lc(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Js(e)},ownKeys(e){return Reflect.ownKeys(Js(e))},set(e,t,n){let r=Nc(Js(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Ac(Js(e),t),i=r?.[Z];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(zs(n,r)&&(n!==void 0||Is(e.base_,t,e.type_)))return!0;Fc(e),Pc(e)}return e.copy_[t]===n&&(n!==void 0||Is(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Tc(e,t,n),!0)},deleteProperty(e,t){return Fc(e),Ac(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Pc(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Js(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ds]:!0,[Ts]:e.type_!==1||t!==`length`,[Es]:r[Es],[Os]:n[t]}},defineProperty(){Q(11)},getPrototypeOf(e){return Ss(e.base_)},setPrototypeOf(){Q(12)}},kc={};for(let e in Oc){let t=Oc[e];kc[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}kc.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Q(13),kc.set.call(this,e,t,void 0)},kc.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Q(14),Oc.set.call(this,e[0],t,n,e[0])};function Ac(e,t){let n=e[Z];return(n?Js(n):e)[t]}function jc(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!As(n)||n[Z]?!1:e.baseRefs_.has(n)}function Mc(e,t,n){let r=Nc(t,n);return r?Os in r?r[Os]:r.get?.call(e.draft_):void 0}function Nc(e,t){if(!(t in e))return;let n=Ss(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ss(n)}}function Pc(e){e.modified_||(e.modified_=!0,e.parent_&&Pc(e.parent_))}function Fc(e){e.copy_||=(e.assigned_=new Map,Xs(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ic=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ws(e)&&!Ws(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ws(t)||Q(6),n!==void 0&&!Ws(n)&&Q(7);let r;if(As(e)){let i=mc(this),a=Lc(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?fc(i):pc(i)}return dc(i,n),gc(r,i)}if(!e||!Us(e)){if(r=t(e),r===void 0&&(r=e),r===ys&&(r=void 0),this.autoFreeze_&&Zs(r,!0),n){let t=[],i=[];ac(nc).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Q(1,e)},this.produceWithPatches=(e,t)=>{if(Ws(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Gs(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Gs(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Gs(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){As(e)||Q(8),ks(e)&&(e=Rc(e));let t=mc(this),n=Lc(t,e,void 0);return n[Z].isManual_=!0,pc(t),n}finishDraft(e,t){let n=e&&e[Z];(!n||!n.isManual_)&&Q(9);let{scope_:r}=n;return dc(r,t),gc(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=ac(nc).applyPatches_;return ks(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Lc(e,t,n,r){let[i,a]=Vs(t)?ac(tc).proxyMap_(t,n):Hs(t)?ac(tc).proxySet_(t,n):Dc(t,n);return(n?.scope_??lc()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Cc(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Rc(e){return ks(e)||Q(10,e),zc(e)}function zc(e){if(!As(e)||ec(e))return e;let t=e[Z],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Xs(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Xs(e,!0);return Ps(n,(e,t)=>{Rs(n,e,zc(t))},r),t&&(t.finalized_=!1),n}function Bc(){xs.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=qs(Ls(e,n.key_)),i=Ls(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||Is(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=Ls(n,r),!Us(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[Z];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;Ps(e.assigned_,(e,l)=>{let u=Ls(o,e,c),f=Ls(s,e,c),p=l?Is(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===ys?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=Fs(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===Cs)&&Q(19),Ws(o)&&n===ws&&Q(19),o=Ls(o,n),(o===null||!Us(o))&&Q(18,i.join(`/`))}let s=Fs(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:Q(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:Q(17,a)}}),e}function u(e){if(!As(e))return e;if(Bs(e))return e.map(u);if(Vs(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(Hs(e))return new Set(Array.from(e).map(u));let t=Object.create(Ss(e));for(let n in e)t[n]=u(e[n]);return Is(e,bs)&&(t[bs]=e[bs]),t}function d(e){return ks(e)?u(e):e}sc(nc,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var Vc=new Ic,Hc=Vc.produce,Uc=Vc.produceWithPatches.bind(Vc),Wc=Vc.applyPatches.bind(Vc),Gc=1e3;function Kc(e,t){if(e.add(t),e.size>Gc){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function qc(e){let{enablePatches:t=!1}=e;t&&Bc();let n=us(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=vs())=>{i.has(t)||(Bc(),r=Wc(r,e),Kc(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=vs())=>{if(!i.has(a)){if(Kc(i,a),t){let[t,i]=Uc(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=Hc(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Jc=typeof self==`object`?self:globalThis,Yc=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Xc=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function Zc(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=Yc.has(e)?Jc[e]:void 0;return n(new(r??Jc.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&Xc.has(a))return n(new Jc[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Qc(e){return Zc(new Map,e)(0)}var $c=``,{toString:el}={},{keys:tl}=Object;function nl(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=el.call(e).slice(8,-1);switch(n){case`Array`:return[1,$c];case`Object`:return[2,$c];case`Date`:return[3,$c];case`RegExp`:return[4,$c];case`Map`:return[5,$c];case`Set`:return[6,$c];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function rl([e,t]){return e===0&&(t===`function`||t===`symbol`)}function il(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=nl(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of tl(r))(e||!rl(nl(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(rl(nl(n))||rl(nl(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!rl(nl(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function al(e,t={}){let n=[];return il(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:ol,stringify:sl}=JSON,cl={json:!0,lossy:!0};function ll(e){return Qc(ol(e))}function ul(e){return sl(al(e,cl))}function dl(e){return Qc(e)}function fl(e){return ul(e)}function pl(e){return ll(e)}var ml=256,hl=class extends Error{name=`StreamClosedError`};function gl(e={}){let t=e.id??vs(),n=Math.max(0,e.replayWindow??0),r=us(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new hl(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=vl(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function _l(e={}){let t=e.id??vs(),n=Math.max(1,e.highWaterMark??ml),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function vl(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var yl=128;function bl(e){return e.replace(/[^\w-]+/g,`_`).slice(0,yl)}var xl=`modulepreload`,Sl=function(e,t){return new URL(e,t).href},Cl={},wl=function(e){return e.pathname.endsWith(`.css`)},Tl=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=Sl(t,n);let r=s(t);if(r.href in Cl)return;Cl[r.href]=!0;let i=wl(r);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 o=document.createElement(`link`);if(o.rel=i?`stylesheet`:xl,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(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)})},El=`__connection.json`,Dl=`__DEVFRAME_CONNECTION__`,Ol=`x-birpc-session`,kl=`__rpc-dump/index.json`,Al=`devframe:services`,jl=`devframe_otp`,Ml=`devframe_auth_token`;X.postMessage.remoteAssetsError;var Nl=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>ls(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},Pl=No({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function Fl(e){if(e.agent&&e.jsonSerializable===!1)throw Pl.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function Il(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function Ll(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function Rl(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await Il(i,n[r]);if(a.issues)throw Pl.DF0043({name:e,index:r,issues:Ll(a.issues)})}return r}async function zl(e,t,n){if(!t)return n;let r=await Il(t,n);if(r.issues)throw Pl.DF0044({name:e,issues:Ll(r.issues)});return n}async function Bl(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function Vl(e,t){let n=e.handler;if(!n){let r=await Bl(e,t);if(!r.handler)throw Pl.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await Rl(e.name,r,t),o=await a(...n);return await zl(e.name,i,o)}}var Hl=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return Vl(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw Pl.DF0021({name:e.name});Fl(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw Pl.DF0022({name:e.name});Fl(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await Vl(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw Pl.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function Ul(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw Gl(t,`undefined`,r,e);return n}return i!==null&&Wl(i,r,e,t),n})}function Wl(e,t,n,r){if(typeof e==`bigint`)throw Gl(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw Gl(r,`Map`,t,n);if(e instanceof Set)throw Gl(r,`Set`,t,n);if(e instanceof Date)throw Gl(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw Gl(r,e.constructor?.name??`class instance`,t,n)}function Gl(e,t,n,r){let i=Kl(n,r);return Pl.DF0020({name:e||`<anonymous>`,type:t,path:i})}function Kl(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}var ql=`__DEVFRAME_CONNECTION_META__`,Jl=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Yl(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function Xl(){return Yl(Dl)}function Zl(){return Yl(ql)}function Ql(e){if(e)return e;try{let e=localStorage.getItem(Jl);if(e)return e}catch{}return Yl(Jl)}function $l(e){globalThis[Dl]=e,globalThis[ql]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&eu(e.authToken)}function eu(e){try{localStorage.setItem(Jl,e)}catch{}globalThis[Jl]=e;let t=Xl();t&&(globalThis[Dl]={...t,authToken:e})}function tu(e){let t=hs(El,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function nu(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function ru(){let e=Xl();if(e)return nu(e,Ql()??e.authToken??e.connectionMeta.authToken);let t=Zl();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??tu(`./`),authToken:Ql(t.authToken)}}async function iu(e={}){if(e.connection){let t=nu(e.connection,Ql(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return $l(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:tu(t[0]??`./`),authToken:Ql(e.authToken??e.connectionMeta.authToken)};return $l(n),n}let n=ru();if(n){let t=nu(n,Ql(e.authToken??n.authToken??n.connectionMeta.authToken));return $l(t),t}let r=[];for(let n of t){let t=hs(El,n),i=tu(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:Ql(e.authToken??r.authToken)};return $l(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var au=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function ou(e=jl){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function su(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function cu(e=jl){let t=ou(e);return t&&su(e),t}async function lu(e,t={}){let n=cu(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function uu(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(Al,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function du(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:X.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:X.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=qc({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(X.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var fu=new Map;function pu(e=fu){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?Ul(n,r??``):`s:${fl(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?pl(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function mu(){}function hu(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function gu(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function _u(e){let{onConnected:t=mu,onError:n=mu,onDisconnected:r=mu,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${Ml}=${encodeURIComponent(e.authToken)}`);let s=pu(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=hu(r);if(!e)break;r=e.rest;let{event:t,data:n}=gu(e.frame);n.length>0&&_(t,n.join(`
4
+ `))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[Ol]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function vu(e,t){let{channel:n,rpcOptions:r={}}=t;return Uo(e,{...n,timeout:-1,...r,proxify:!1})}function yu(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(X.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new au(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new au(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(X.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new au(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(X.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(X.client.connectionError,e),m(new au(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new au(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=vu(a.functions,{channel:v,rpcOptions:o});a.register({name:X.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new au(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(X.client.connectionError,e),m(e),i.emit(X.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new au(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(X.client.connectionError,e)}return i.emit(X.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(X.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function ee(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:ee,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(X.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(X.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(X.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function bu(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function xu(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=bu(n.sse,r??`./`,location);return yu({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>_u({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function Su(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:Cu(r)?Su(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function Cu(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function wu(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function Tu(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Eu(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Du(e){if(e.error)throw Su(e.error);return e.output}function Ou(e){return e.some(e=>e!=null)}function ku(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Au(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?dl(e):e}function a(e,t){return i(ku(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return Eu(r)?Du(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(wu(r)){if(Ou(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(Tu(r)){let e=ls(n),i=r.records[e];if(i)return Du(await s(i,r.serialization));if(r.fallback)return Du(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Ou(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function ju(e){let t=Au(await e.fetchJsonFromBases(kl),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Mu=``;function Nu(e,t){return`${e}${Mu}${t}`}function Pu(e){let t=new Map,n=new Map;e.client.register({name:X.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Nu(e,n))?._push(r,i)}}),e.client.register({name:X.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Nu(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:X.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Nu(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(X.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Mu);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=Nu(n,r),o=t.get(a);if(o)return o;let s=_l({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(X.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=Nu(t,r),a=n.get(i);if(a)return a;let o=gl({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function Fu(){}var Iu=new Map;function Lu(e){let t=e.url;e.authToken&&(t=`${t}?${Ml}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Fu,onError:i=Fu,onDisconnected:a=Fu,definitions:o=Iu}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=pu(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Ru(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return gs(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function zu(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ru(n.websocket,r??`./`,location);return yu({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Lu({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Bu(e){return e.includes(`:`)}function Vu(e,t){return Bu(t)?t:`${e}:${t}`}function Hu(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function Uu(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return Hu(a)}function Wu(e,t){return{global:Uu(e,t,`global`),project:Uu(e,t,`project`)}}function Gu(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Bu(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(Vu(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Vu(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Vu(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Vu(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Vu(t,n),r,i),upload:(n,r)=>e.streaming.upload(Vu(t,n),r)}},settings:Wu(e,t),scope:e.scope}}function Ku(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function qu(e,t={}){let n=t.modelContext??Ku();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=bl(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Wo(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:qo(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Ju(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Ju(e,t,n){try{let r=Yo(n,e.args?.length);return{content:[{type:`text`,text:Yu(await(await Vl(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Xu(e)}]}}}function Yu(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Xu(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function Zu(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Qu(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=us(),a=Array.isArray(t)?t:[t],o=await iu(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new Nl({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new Hl(f),m=e.webmcp===!1?void 0:qu(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(hs(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=Zu(e.transport??`auto`,s),b=y===`static`?await ju({fetchJsonFromBases:_}):y===`sse`?xu({...v,sseOptions:e.sseOptions}):zu({...v,wsOptions:e.wsOptions}),x;try{x=new BroadcastChannel(`devframe-auth`)}catch{}let S,C=!1;function w(e){return((...t)=>C||!S?e(...t):S.then(()=>e(...t)))}function ee(){g=!0;try{h?.(),m?.()}finally{try{x?.close()}finally{b.close?.()}}}let T={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(eu(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;eu(t),o={...o,authToken:t};try{x?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:w(b.call),callEvent:w(b.callEvent),callOptional:w(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:ee};T.sharedState=du(T),T.streaming=Pu(T),T.services=uu(T);let te=new Map;T.scope=(e=>{if(!e)return T;let t=te.get(e);return t||(t=Gu(T,e),te.set(e,t)),t}),f.rpc=T;function E(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ne(){if(e.simpleAuth!==!1&&E()&&typeof globalThis.prompt==`function`)for(await T.requestAuthCode().catch(()=>{});!T.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await T.requestTrustWithCode(t))return}}async function D(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await lu(T,{param:n}):!1;t||r||T.isTrusted||await ne()}return S=D().then(()=>{C=!0},()=>{C=!0}),s.mcp&&Tl(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-CQwaKeCZ.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(T))}).catch(()=>{}),x&&(x.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&T.requestTrustWithToken(e.data.authToken)}),T}var $u=Qu,ed=Symbol.for(`devframe:browser-agent-registry`),{tools:td,listeners:nd}=globalThis[ed]??={tools:new Map,listeners:new Set};function rd(){for(let e of nd)e()}function id(e){let t=Symbol(e.id);return td.set(t,e),rd(),()=>{td.delete(t)&&rd()}}function ad(){return[...td.values()]}function od(e){return nd.add(e),()=>nd.delete(e)}var sd=No({docsBase:`https://devfra.me/errors`,codes:{DF0077:{why:e=>`In-page channel function "${e.name}" is not registered on this endpoint.`,fix:"Declare the function in this endpoint's `functions` option."},DF0080:{why:e=>`In-page channel function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it channel-only."}}}),cd=X.postMessage.inPageChannel;function ld(e){return!!e&&typeof e==`object`&&`__dfIpc`in e}function ud(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.channel===cd&&typeof t.name==`string`&&typeof t.panelId==`string`&&(t.kind===`hello`||t.kind===`grant`)}function dd(e,t){if(e?.length)return e;let n=t?.location?.origin;return n&&n!==`null`?[n]:[`*`]}function fd(e){let t=[];try{let n=e;for(;n.parent&&n.parent!==n;)t.push(n.parent),n=n.parent}catch{}for(let n of[e,...t])try{let r=n.opener;r&&r!==e&&!t.includes(r)&&t.push(r)}catch{}return t}var pd={intervalMs:5e3,timeoutMs:12e3};function md(e){return e===!1?void 0:{...pd,...e}}var hd=class extends Error{code;name=`InPageChannelError`;constructor(e,t,n){super(t,n),this.code=e}},gd=new Set;function _d(e){gd.has(e)||(gd.add(e),console.warn(`[devframe] ${e}`))}function vd(e,t,n){for(let r=0;r<e.length;r++){let i=bd(e[r],`${t}[${r}]`,n);if(i)return i}}function yd(e,t,n){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)return`${t} is an instance of ${e.constructor?.name??`an exotic class`}`;for(let[r,i]of Object.entries(e)){let e=bd(i,`${t}.${r}`,n);if(e)return e}}function bd(e,t,n){if(e!==null&&typeof e!=`boolean`&&typeof e!=`string`)return typeof e==`number`?Number.isFinite(e)?void 0:`${t} is ${e}`:typeof e==`object`?n.has(e)?`${t} is circular`:(n.add(e),Array.isArray(e)?vd(e,t,n):yd(e,t,n)):`${t} is ${e===void 0?"`undefined`":`a ${typeof e}`}`}function xd(e,t,n){let r=bd(e,t,new Set);if(r)throw new hd(`not-serializable`,`in-page function "${n}" is declared jsonSerializable, but ${r}`)}function Sd(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function Cd(e,t,n){for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await i[`~standard`].validate(n[r]);if(a.issues)throw new hd(`invalid-args`,`in-page function "${e}" rejected argument ${r}: ${Sd(a.issues)}`)}}function wd(e,t){return e.serialize?t.map(e.serialize):t}function Td(e,t){return e.deserialize&&t!==void 0?e.deserialize(t):t}function Ed(e,t){return`devframe:in-page:${e===`event`?`event`:`function`}:${t}`}var Dd=Ed(`function`,``);function Od(e){let t=new Map,n=new Map;return{definitions:t,register(e){if(`agent`in e&&e.agent){if(e.jsonSerializable===!1)throw sd.DF0080({name:e.name});e.jsonSerializable=!0}t.set(Ed(e.type,e.name),e)},registerInternal(e,n){t.set(e,{name:e,handler:n})},on(e,t){let r=Ed(`event`,e),i=n.get(r);return i||(i=new Set,n.set(r,i)),i.add(t),()=>{i.delete(t),i.size===0&&n.delete(r)}},resolve(r){let i=t.get(r),a=n.get(r);if(i||a?.size)return async(...t)=>{let a=e.deserialize?t.map(e.deserialize):t;i?.jsonSerializable&&xd(a,`its arguments`,i.name),i?.args?.length&&await Cd(i.name,i.args,a);let o=await i?.handler?.(...a);for(let e of[...n.get(r)??[]])e(...a);if(i?.type!==`event`)return i?.jsonSerializable&&o!==void 0&&xd(o,`its return value`,i.name),e.serialize&&o!==void 0?e.serialize(o):o}}}}function kd(e,t){for(let n of t){let t=n(e);if(t)return t}if(e.startsWith(Dd))return()=>{throw sd.DF0077({name:e.slice(Dd.length)})}}function Ad(e,t){let n=[];for(let r of t.definitions.values()){if(r.type===`event`||!(`agent`in r)||!r.agent)continue;let i=r.agent;n.push(id({id:`${e}:${r.name}`,title:i.title??r.name,description:i.description,safety:Wo(r.type,i),tags:i.tags,inputSchema:qo(r.args),invoke:e=>{let n=Yo(e,r.args?.length);return t.resolve(Ed(r.type,r.name))(...n)}}))}return()=>n.forEach(e=>e())}function jd(e){return e instanceof DOMException&&e.name===`DataCloneError`?new hd(`not-cloneable`,`a payload could not be structured-cloned across the in-page channel: ${e.message}. Strip non-cloneable values (functions, DOM nodes, framework reactivity proxies) before sending: declare the function \`jsonSerializable: true\` for a precise error, or provide a \`serialize\` hook.`,{cause:e}):e}function Md(e,t){let n,r=!1,i={rpc:Uo({},{post:t=>{try{e.postMessage(t)}catch(e){throw jd(e)}},on:e=>{n=e},off:()=>{n=void 0},timeout:-1,proxify:!1,resolver:(e,n)=>n??t.resolveLocal(e)}),lastActivity:Date.now(),postControl(t){try{e.postMessage({__dfIpc:t})}catch{}},dispose(t){if(r)return;r=!0,t?.bye&&i.postControl(`bye`);let n=new hd(`closed`,`in-page channel call dropped: ${t?.reason??`the in-page channel port was closed`}`);i.rpc.$rejectPendingCalls(({reject:e})=>e(n)),i.rpc.$close(),e.removeEventListener(`message`,a),e.removeEventListener(`close`,o);try{e.close()}catch{}}};function a(e){i.lastActivity=Date.now();let r=e.data;if(ld(r)){r.__dfIpc===`bye`?t.onPeerClosed():t.onControl(r.__dfIpc);return}n?.(r)}function o(){t.onPeerClosed()}return e.addEventListener(`message`,a),e.addEventListener(`close`,o),e.start?.(),i}function Nd(e,t,n){return t<=0?e:new Promise((r,i)=>{let a=setTimeout(()=>i(new hd(`timeout`,n())),t);e.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e)})})}var Pd={subscribe:`devframe:in-page:page-state:subscribe`,set:`devframe:in-page:page-state:set`,patch:`devframe:in-page:page-state:patch`};function Fd(e){let t=new Map,n=new Set,r=new Map,i=new Set;function a(e){n.add(e);let t=r.get(e);if(t){r.delete(e);for(let e of t)e()}}function o(e,n){let r=t.get(e);if(r&&n!==void 0){let e=vs();i.add(e),r.mutate(()=>n,e)}a(e)}function s(t){e.call(Pd.subscribe,[t]).then(e=>o(t,e)).catch(e=>{console.warn(`[devframe] in-page shared state "${t}": subscribe failed`,e)})}return{handlers:{[X.inPageChannel.panelStateUpdated]:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>n,r),a(e)},[X.inPageChannel.panelStatePatch]:(e,n,r)=>{t.get(e)?.patch(n,r),a(e)}},resubscribe(){for(let e of t.keys())s(e)},get:(a,o)=>{let c=t.get(a);if(c)return Promise.resolve(c);let l=qc({initialValue:o?.initialValue,enablePatches:!0});return t.set(a,l),l.on(`updated`,(t,n,r)=>{i.delete(r)||e.isConnected()&&(n?e.callEvent(Pd.patch,[a,n,r]):e.callEvent(Pd.set,[a,t,r]))}),e.isConnected()&&s(a),o?.initialValue===void 0?new Promise(e=>{if(n.has(a)){e(l);return}let t=r.get(a)??[];t.push(()=>e(l)),r.set(a,t)}):Promise.resolve(l)}}}var Id=300,Ld=3e3,Rd=64;function zd(e){let{name:t}=e,n=e.callTimeoutMs??15e3,r=e.eventBufferLimit??Rd,i=e.window===!1?void 0:e.window??(typeof window>`u`?void 0:window),a=dd(e.allowedOrigins,i),o=md(e.heartbeat),s={serialize:e.serialize,deserialize:e.deserialize},c=vs(),l=e.targets??(i?fd(i):[]),u=!!i&&l.length>0,d=us(),f=Od(s);for(let[t,n]of Object.entries(e.functions))f.register({...n,name:t});for(let[t,n]of Object.entries(e.events??{}))f.register({...n,name:t,type:`event`});let p=Ad(t,f),m=`connecting`,h,g,_,v,y=!1,b=[],x=[],S=[];function C(e){m!==e&&(m=e,d.emit(`status:updated`,e))}let w=Fd({isConnected:()=>m===`connected`,callEvent:(e,t)=>te(e,wd(s,t)),call:(e,t)=>E(e,wd(s,t))}),ee=Od(s);for(let[e,t]of Object.entries(w.handlers))ee.registerInternal(e,t);function T(e,t){h?.rpc.$callRaw({method:e,args:t,event:!0,optional:!0}).catch(()=>{})}function te(e,n){if(m!==`closed`){if(m===`connected`&&h){T(e,n);return}x.length>=r&&(x.shift(),y||(y=!0,console.warn(`[devframe] in-page channel "${t}": event buffer overflowed while connecting, so the oldest events are being dropped (limit ${r})`))),x.push({method:e,args:n})}}function E(e,r){return m===`closed`?Promise.reject(new hd(`closed`,`in-page channel "${t}": call "${e}" rejected because the channel is closed`)):Nd(new Promise((t,n)=>{let i=()=>{h.rpc.$call(e,...r).then(e=>t(Td(s,e)),n)};m===`connected`&&h?i():b.push({run:i,reject:n})}),n,()=>`in-page channel "${t}": call "${e}" timed out after ${n}ms (status: ${m}${m===`connecting`?`; is the page script loaded?`:``})`)}function ne(e,t){h?.dispose({bye:!0,reason:`the panel adopted a newer port`}),h=Md(e,{resolveLocal:e=>kd(e,[ee.resolve,f.resolve]),onControl:e=>{e===`ping`&&h?.postControl(`pong`)},onPeerClosed:()=>re(`the page script went away`)}),g=t,D(),C(`connected`),o&&(v=setInterval(()=>{h&&(Date.now()-h.lastActivity>o.timeoutMs?re(`the page script went silent (heartbeat timeout)`):h.postControl(`ping`))},o.intervalMs));for(let e of b.splice(0))e.run();for(let{method:e,args:t}of x.splice(0))T(e,t);w.resubscribe();for(let e of S.splice(0))e.resolve()}function D(){_&&=(clearTimeout(_),void 0),v&&=(clearInterval(v),void 0)}function re(e){m!==`closed`&&(h?.dispose({reason:e}),h=void 0,g=void 0,D(),C(`connecting`),u?ie():_d(`in-page channel "${t}": transport lost (${e}) and the panel has no handshake targets, so it stays disconnected`))}function ie(){if(_||!u||m!==`connecting`)return;let n=e.helloIntervalMs??Id,r=()=>{let i={channel:cd,v:2,kind:`hello`,name:t,panelId:c,instanceId:e.instanceId};for(let e of l)for(let t of a)try{e.postMessage(i,t)}catch{}n=Math.min(n*1.5,Ld),_=setTimeout(r,n)};r()}let O=n=>{if(m===`closed`)return;let r=n.data;if(!ud(r)||r.kind!==`grant`||r.name!==t||r.panelId!==c)return;if(r.v!==2){_d(`in-page channel "${t}": ignoring a grant with protocol version ${r.v} (this side speaks 2); align the devframe versions of the page script and the panel`);return}if(!a.includes(`*`)&&!a.includes(n.origin)){_d(`in-page channel "${t}": ignoring a grant from disallowed origin "${n.origin}"`);return}if(e.instanceId&&r.instanceId!==e.instanceId)return;let i=n.ports?.[0];i&&ne(i,{instanceId:r.instanceId})};return i?.addEventListener(`message`,O),e.transport?ne(e.transport):u?ie():_d(`in-page channel "${t}": the panel has no handshake targets (not embedded, no opener) and no transport, so calls will buffer until a transport appears or the channel is closed`),{name:t,get status(){return m},get pageScript(){return g},events:{on:d.on,once:d.once},whenConnected:e=>m===`connected`?Promise.resolve():m===`closed`?Promise.reject(new hd(`closed`,`in-page channel "${t}" is closed`)):new Promise((n,r)=>{let i={resolve:n,reject:r};S.push(i),e!==void 0&&e>0&&setTimeout(()=>{let n=S.indexOf(i);n>=0&&(S.splice(n,1),r(new hd(`timeout`,`in-page channel "${t}": no page script answered within ${e}ms; it may not be loaded in this context (render a fallback state)`)))},e)}),call:(e,...t)=>E(Ed(`function`,e),wd(s,t)),emit:(e,...t)=>te(Ed(`event`,e),wd(s,t)),on:(e,t)=>f.on(e,t),sharedState:w,close:()=>{if(m===`closed`)return;C(`closed`),p(),D(),i?.removeEventListener(`message`,O),h?.dispose({bye:!0,reason:`the panel closed the channel`}),h=void 0,g=void 0;let e=new hd(`closed`,`in-page channel "${t}" was closed`);for(let t of b.splice(0))t.reject(e);x.length=0;for(let t of S.splice(0))t.reject(e)}}}var Bd=`gscdump:page`,Vd=[{value:`7d`,label:`Last 7 days`,days:7},{value:`28d`,label:`Last 28 days`,days:28},{value:`3m`,label:`Last 3 months`,days:90}],Hd=[{key:`clicks`,label:`Clicks`},{key:`impressions`,label:`Impressions`},{key:`ctr`,label:`CTR`},{key:`position`,label:`Position`}],Ud=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),Wd=new Intl.NumberFormat(`en-US`);function Gd(e,t,n=`full`){return e==null?`-`:t===`ctr`?`${(e*100).toFixed(1)}%`:t===`position`?e.toFixed(1):n===`compact`&&e>=1e4?Ud.format(e):Wd.format(Math.round(e))}function Kd(e,t,n){if(!n)return{_tag:`None`};let r=t[e],i=n[e];if(r==null||i==null)return{_tag:`None`};let a=r-i,o=Math.abs(a)<1e-9?`flat`:a>0?`up`:`down`,s=o===`flat`?null:e===`position`?a<0:a>0,c=a>0?`+`:a<0?`-`:``;return e===`ctr`?{_tag:`Change`,text:`${c}${Math.abs(a*100).toFixed(1)} pts`,direction:o,good:s}:e===`position`?{_tag:`Change`,text:`${c}${Math.abs(a).toFixed(1)}`,direction:o,good:s}:i===0?r===0?{_tag:`Change`,text:`0%`,direction:`flat`,good:null}:{_tag:`Change`,text:`New`,direction:`up`,good:!0}:{_tag:`Change`,text:`${c}${Math.abs(a/i*100).toFixed(0)}%`,direction:o,good:s}}var qd=new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,timeZone:`UTC`}),Jd=new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,timeZone:`UTC`});function Yd(e,t=!1){let n=Date.parse(`${e}T00:00:00Z`);return Number.isNaN(n)?e:(t?Jd:qd).format(n)}var Xd={class:`legend`},Zd={class:`item`},Qd={key:0,class:`item`},$d={class:`metric muted`},ef=[`width`,`aria-label`],tf={class:`grid`},nf=[`x1`,`x2`,`y1`,`y2`],rf=[`x`,`y`],af=[`x`,`y`,`text-anchor`],of=[`d`],sf=[`d`],cf=[`d`],lf={key:2},uf=[`x1`,`x2`,`y1`,`y2`],df=[`cx`,`cy`],ff=[`cx`,`cy`],pf=[`x`,`y`,`width`],mf={class:`row`},hf={class:`muted`},gf={class:`tabular`},_f={key:0,class:`row`},vf={class:`muted`},yf={class:`tabular`},bf=168,xf=Kn({__name:`DailyChart`,props:{daily:{},previousDaily:{},metric:{},windowLabel:{},previousLabel:{}},setup(e){let t={top:10,right:12,bottom:24,left:44},n=Jn(`root`),r=L(480),i;cr(()=>{i=new ResizeObserver(([e])=>{e&&(r.value=Math.max(240,Math.floor(e.contentRect.width)))}),n.value&&i.observe(n.value)}),dr(()=>i?.disconnect());let a=Y(()=>Hd.find(t=>t.key===e.metric)?.label??e.metric),o=Y(()=>e.daily.map(t=>t[e.metric])),s=Y(()=>e.previousDaily?.map(t=>t[e.metric])??null),c=Y(()=>e.metric===`position`);function l(e){let t=e/3,n=10**Math.floor(Math.log10(t||1)),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}let u=Y(()=>{let e=[...o.value,...s.value??[]].filter(e=>e!=null);if(c.value){let t=Math.max(1,Math.floor(Math.min(...e,1))),n=Math.max(t+1,Math.ceil(Math.max(...e,t+1))),r=l(n-t),i=Math.max(1,Math.floor(t/r)*r),a=Math.ceil(n/r)*r,o=[];for(let e=i;e<=a+1e-9;e+=r)o.push(e);return{min:i,max:a,ticks:o}}let t=Math.max(...e,0),n=t>0?l(t):1,r=Math.max(n,Math.ceil(t/n)*n),i=[];for(let e=0;e<=r+1e-9;e+=n)i.push(e);return{min:0,max:r,ticks:i}}),d=Y(()=>r.value-t.left-t.right),f=bf-t.top-t.bottom,p=Y(()=>e.daily.length>1?d.value/(e.daily.length-1):0);function m(e){return t.left+e*p.value}function h(e){let{min:n,max:r}=u.value,i=r===n?0:(e-n)/(r-n);return c.value?t.top+i*f:t.top+(1-i)*f}function g(e){let t=``,n=!1;return e.forEach((e,r)=>{if(e==null){n=!1;return}t+=`${n?`L`:`M`}${m(r).toFixed(1)},${h(e).toFixed(1)}`,n=!0}),t}let _=Y(()=>g(o.value)),v=Y(()=>s.value?g(s.value):``),y=Y(()=>{if(c.value||o.value.some(e=>e==null)||e.daily.length<2)return``;let t=h(u.value.min);return`${g(o.value)}L${m(e.daily.length-1).toFixed(1)},${t}L${m(0).toFixed(1)},${t}Z`}),b=Y(()=>{if(e.daily.length===0)return[];let t=e.daily.length>2?[0,Math.floor((e.daily.length-1)/2),e.daily.length-1]:[0,e.daily.length-1];return[...new Set(t)].map(t=>({index:t,label:Yd(e.daily[t].date)}))}),x=L(null);function S(t){let n=t.currentTarget.getBoundingClientRect(),r=t.clientX-n.left;x.value=p.value>0?Math.min(e.daily.length-1,Math.max(0,Math.round(r/p.value))):0}let C=Y(()=>{let t=x.value;if(t==null||!e.daily[t])return null;let n=e.previousDaily?.[t]??null,i=m(t);return{left:i,flip:i>r.value*.6,date:Yd(e.daily[t].date,!0),value:Gd(o.value[t]??null,e.metric),previousDate:n?Yd(n.date,!0):null,previousValue:n?Gd(s.value?.[t]??null,e.metric):null,currentY:o.value[t]==null?null:h(o.value[t]),previousY:s.value?.[t]==null?null:h(s.value[t])}}),w=Y(()=>`${a.value} per day, ${e.windowLabel}. ${e.daily.length} days.`);return(i,o)=>(U(),W(`div`,{ref_key:`root`,ref:n,class:`chart`,style:le({"--series":`var(--metric-${e.metric})`})},[G(`div`,Xd,[G(`span`,Zd,[o[1]||=G(`span`,{class:`key solid`,"aria-hidden":`true`},null,-1),K(j(e.windowLabel),1)]),e.previousDaily?(U(),W(`span`,Qd,[o[2]||=G(`span`,{class:`key dashed`,"aria-hidden":`true`},null,-1),K(j(e.previousLabel),1)])):q(``,!0),G(`span`,$d,j(a.value),1)]),(U(),W(`svg`,{width:r.value,height:bf,role:`img`,"aria-label":w.value},[G(`g`,tf,[(U(!0),W(V,null,vr(u.value.ticks,n=>(U(),W(`g`,{key:n},[G(`line`,{x1:t.left,x2:r.value-t.right,y1:h(n),y2:h(n)},null,8,nf),G(`text`,{x:t.left-6,y:h(n),"text-anchor":`end`,"dominant-baseline":`middle`,class:`tabular`},j(Yt(Gd)(n,e.metric,`compact`)),9,rf)]))),128)),(U(!0),W(V,null,vr(b.value,t=>(U(),W(`text`,{key:t.index,x:m(t.index),y:162,"text-anchor":t.index===0?`start`:t.index===e.daily.length-1?`end`:`middle`},j(t.label),9,af))),128))]),y.value?(U(),W(`path`,{key:0,d:y.value,class:`area`},null,8,of)):q(``,!0),v.value?(U(),W(`path`,{key:1,d:v.value,class:`line previous`},null,8,sf)):q(``,!0),G(`path`,{d:_.value,class:`line current`},null,8,cf),C.value?(U(),W(`g`,lf,[G(`line`,{class:`crosshair`,x1:C.value.left,x2:C.value.left,y1:t.top,y2:t.top+f},null,8,uf),C.value.previousY==null?q(``,!0):(U(),W(`circle`,{key:0,class:`marker previous`,cx:C.value.left,cy:C.value.previousY,r:`4`},null,8,df)),C.value.currentY==null?q(``,!0):(U(),W(`circle`,{key:1,class:`marker current`,cx:C.value.left,cy:C.value.currentY,r:`4`},null,8,ff))])):q(``,!0),G(`rect`,{class:`hit`,x:t.left-p.value/2,y:t.top,width:d.value+p.value,height:f,onPointermove:S,onPointerleave:o[0]||=e=>x.value=null},null,40,pf)],8,ef)),C.value?(U(),W(`div`,{key:0,class:A([`tooltip`,{flip:C.value.flip}]),style:le({left:`${C.value.left}px`}),role:`status`},[G(`div`,mf,[o[3]||=G(`span`,{class:`key solid`,"aria-hidden":`true`},null,-1),G(`span`,hf,j(C.value.date),1),G(`strong`,gf,j(C.value.value),1)]),C.value.previousDate?(U(),W(`div`,_f,[o[4]||=G(`span`,{class:`key dashed`,"aria-hidden":`true`},null,-1),G(`span`,vf,j(C.value.previousDate),1),G(`strong`,yf,j(C.value.previousValue),1)])):q(``,!0)],6)):q(``,!0)],4))}}),Sf=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Cf=Sf(xf,[[`__scopeId`,`data-v-83d970de`]]),wf={class:`queries`},Tf=[`title`],Ef={class:`tabular`},Df={class:`tabular`},Of={class:`tabular`},kf={class:`tabular`},Af=Sf(Kn({__name:`QueryTable`,props:{queries:{}},setup(e){return(t,n)=>(U(),W(`table`,wf,[n[0]||=G(`thead`,null,[G(`tr`,null,[G(`th`,{scope:`col`,class:`query`},` Query `),G(`th`,{scope:`col`},` Clicks `),G(`th`,{scope:`col`},` Impressions `),G(`th`,{scope:`col`},` CTR `),G(`th`,{scope:`col`},` Position `)])],-1),G(`tbody`,null,[(U(!0),W(V,null,vr(e.queries,e=>(U(),W(`tr`,{key:e.query},[G(`th`,{scope:`row`,class:`query`,title:e.query},j(e.query),9,Tf),G(`td`,Ef,j(Yt(Gd)(e.clicks,`clicks`)),1),G(`td`,Df,j(Yt(Gd)(e.impressions,`impressions`)),1),G(`td`,Of,j(Yt(Gd)(e.ctr,`ctr`)),1),G(`td`,kf,j(Yt(Gd)(e.position,`position`)),1)]))),128))])]))}}),[[`__scopeId`,`data-v-96d390da`]]),jf=[`aria-pressed`],Mf={class:`label`},Nf={class:`value`},Pf=[`title`],Ff={"aria-hidden":`true`},If={class:`sr-only`},Lf={key:1,class:`delta flat`},Rf=Sf(Kn({__name:`StatTile`,props:{metric:{},label:{},totals:{},previousTotals:{},previousLabel:{},selected:{type:Boolean}},emits:[`select`],setup(e,{emit:t}){let n=t,r=Y(()=>Kd(e.metric,e.totals,e.previousTotals)),i=Y(()=>{let e=r.value;return e._tag===`None`||e.direction===`flat`?``:e.direction===`up`?`▲`:`▼`}),a=Y(()=>{let e=r.value;return e._tag===`None`||e.good==null?`flat`:e.good?`good`:`bad`});return(t,o)=>(U(),W(`button`,{type:`button`,class:A([`tile`,{selected:e.selected}]),"aria-pressed":e.selected,style:le({"--series":`var(--metric-${e.metric})`}),onClick:o[0]||=t=>n(`select`,e.metric)},[G(`span`,Mf,[o[1]||=G(`span`,{class:`key`,"aria-hidden":`true`},null,-1),K(` `+j(e.label),1)]),G(`span`,Nf,j(Yt(Gd)(e.totals[e.metric],e.metric,`compact`)),1),r.value._tag===`Change`?(U(),W(`span`,{key:0,class:A([`delta tabular`,a.value]),title:`Change against the ${e.previousLabel}`},[G(`span`,Ff,j(i.value),1),K(` `+j(r.value.text)+` `,1),G(`span`,If,`against the `+j(e.previousLabel),1)],10,Pf)):(U(),W(`span`,Lf,`No comparison`))],14,jf))}}),[[`__scopeId`,`data-v-b318b2b5`]]);function zf(e,t,...n){let r=e.call;return r(t,...n)}var Bf={class:`panel`},Vf={class:`header`},Hf={class:`controls`},Uf={key:0,class:`field`},Wf=[`value`],Gf=[`value`],Kf={key:1,class:`site mono`},qf={class:`field`},Jf=[`value`],Yf={key:0,class:`notice error`},Xf={key:1,class:`notice muted`},Zf={key:2,class:`notice`},Qf={key:3,class:`notice error`},$f={key:0},ep={key:1},tp={key:4,class:`notice`},np={key:5,class:`notice error`},rp={key:6,class:`notice`},ip={key:0},ap={class:`site-list`},op=[`onClick`],sp={class:`muted mono`},cp={class:`page-field`},lp=[`aria-pressed`,`disabled`,`title`],up={key:0,class:`notice muted`},dp={key:1,class:`notice error`},fp={key:2,class:`notice`},pp={key:3,class:`notice error`},mp={key:4,class:`notice error`},hp={key:5,class:`notice error`},gp={key:0,class:`muted mono`},_p=[`aria-busy`],vp={class:`tiles`},yp={key:0,class:`notice`},bp={class:`mono`},xp={key:1,class:`card block`},Sp={key:2,class:`card block`},Cp={class:`footer`},wp={class:`muted`},Tp=[`href`],Ep=`gscdump-devframe:site`,Dp=`gscdump-devframe:period`;bo(Sf(Kn({__name:`App`,setup(e){function t(e){try{return localStorage.getItem(e)}catch{return null}}function n(e,t){try{t==null?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}}let r=Kt(null),i=L(null),a=L(null),o=L(t(Ep)),s=t(Dp),c=L(Vd.some(e=>e.value===s)?s:`28d`),l=L(`clicks`),u=window.parent!==window||!!window.opener,d=L(null),f=L(!u),p=L(u),m=L(`/`),h=L(`/`),g=L(null),_=L(!1),v=0,y=Y(()=>Vd.find(e=>e.value===c.value)??Vd[1]),b=Y(()=>y.value.label),x=Y(()=>`previous ${y.value.days} days`),S=Y(()=>a.value?._tag===`Ready`?a.value.site:null),C=Y(()=>a.value?._tag===`Ready`||a.value?._tag===`SiteRequired`?a.value.sites:[]);async function w(){r.value&&(a.value=null,a.value=await zf(r.value,`gscdump:get-context`,o.value).catch(e=>({_tag:`Unavailable`,message:e instanceof Error?e.message:String(e)})))}async function ee(){let e=S.value;if(!r.value||!e||!f.value)return;let t=++v;_.value=!0;let n=await zf(r.value,`gscdump:get-page-stats`,{page:h.value,period:c.value,siteId:e.siteId}).catch(e=>({_tag:`Failed`,message:e instanceof Error?e.message:String(e),requestId:null}));t===v&&(g.value=n,_.value=!1)}function T(e){o.value=e,n(Ep,e),w()}function te(){let e=m.value.trim()||`/`;m.value=e,p.value=d.value?.path===e,h.value=e}function E(){p.value=!0,d.value&&(m.value=d.value.path,h.value=d.value.path)}In(c,e=>n(Dp,e)),In([h,c,S,f],()=>void ee()),In(d,e=>{e&&p.value&&(m.value=e.path,h.value=e.path)});let ne=null;cr(async()=>{u&&(ne=zd({name:Bd,functions:{}}),setTimeout(()=>{f.value=!0},2e3),ne.sharedState.get(`location`).then(e=>{d.value={...e.value()},f.value=!0,e.on(`updated`,e=>{d.value={...e}})}));let e=await $u().catch(e=>e instanceof Error?e:Error(String(e)));if(e instanceof Error){i.value=e.message;return}r.value=e,await w()}),dr(()=>ne?.close());let D=Y(()=>g.value?._tag===`Ok`?g.value:null),re=Y(()=>D.value?.totals.impressions===0),ie=Y(()=>D.value?`${Yd(D.value.window.start,!0)} to ${Yd(D.value.window.end,!0)}`:``);return(e,t)=>(U(),W(`main`,Bf,[G(`header`,Vf,[t[6]||=G(`div`,{class:`brand`},[G(`strong`,null,`Search Console`),G(`span`,{class:`muted`},`gscdump`)],-1),G(`div`,Hf,[C.value.length>1&&a.value?._tag===`Ready`&&!a.value.configured?(U(),W(`label`,Uf,[t[4]||=G(`span`,{class:`sr-only`},`Site`,-1),G(`select`,{class:`control`,value:S.value?.siteId,onChange:t[0]||=e=>T(e.target.value)},[(U(!0),W(V,null,vr(C.value,e=>(U(),W(`option`,{key:e.siteId,value:e.siteId},j(e.siteUrl)+` (`+j(e.siteId)+`)`,9,Gf))),128))],40,Wf)])):S.value?(U(),W(`span`,Kf,j(S.value.siteUrl),1)):q(``,!0),G(`label`,qf,[t[5]||=G(`span`,{class:`sr-only`},`Window`,-1),An(G(`select`,{"onUpdate:modelValue":t[1]||=e=>c.value=e,class:`control`},[(U(!0),W(V,null,vr(Yt(Vd),e=>(U(),W(`option`,{key:e.value,value:e.value},j(e.label),9,Jf))),128))],512),[[lo,c.value]])])])]),i.value?(U(),W(`p`,Yf,` The devtool did not connect to the dev server: `+j(i.value),1)):a.value?a.value._tag===`CredentialMissing`?(U(),W(`section`,Zf,[t[7]||=G(`strong`,null,`Connect gscdump`,-1),t[8]||=G(`p`,null,`This devtool reads Search Console data from your gscdump Hosted record. Do one of these, then select Try again:`,-1),t[9]||=G(`ul`,null,[G(`li`,null,[K(`Run `),G(`code`,{class:`mono`},`gscdump auth login --mode hosted`),K(`.`)]),G(`li`,null,[K(`Set `),G(`code`,{class:`mono`},`GSCDUMP_API_KEY`),K(` to a user API key from gscdump.com, then restart the dev server.`)])],-1),G(`button`,{type:`button`,class:`button`,onClick:w},` Try again `)])):a.value._tag===`CredentialRejected`?(U(),W(`section`,Qf,[t[12]||=G(`strong`,null,`gscdump did not accept the credential`,-1),a.value.source===`cli-session`?(U(),W(`p`,$f,[...t[10]||=[K(` The CLI login expired or was revoked. Run `,-1),G(`code`,{class:`mono`},`gscdump auth login --mode hosted`,-1),K(`, then select Try again. `,-1)]])):(U(),W(`p`,ep,[...t[11]||=[K(` Create a new user API key at gscdump.com and set it as `,-1),G(`code`,{class:`mono`},`GSCDUMP_API_KEY`,-1),K(`. `,-1)]])),G(`button`,{type:`button`,class:`button`,onClick:w},` Try again `)])):a.value._tag===`NoSites`?(U(),W(`section`,tp,[t[13]||=G(`strong`,null,`No Sites yet`,-1),t[14]||=G(`p`,null,[K(`Your gscdump account has no Sites. Connect a Site at `),G(`a`,{href:`https://gscdump.com/app/onboarding?step=connect-sites`,target:`_blank`,rel:`noopener`},`gscdump.com`),K(`, then select Try again.`)],-1),G(`button`,{type:`button`,class:`button`,onClick:w},` Try again `)])):a.value._tag===`Unavailable`?(U(),W(`section`,np,[t[15]||=G(`strong`,null,`gscdump is not available`,-1),G(`p`,null,j(a.value.message),1),G(`button`,{type:`button`,class:`button`,onClick:w},` Try again `)])):a.value._tag===`SiteRequired`?(U(),W(`section`,rp,[t[18]||=G(`strong`,null,`Select the Site this app serves`,-1),a.value.target?(U(),W(`p`,ip,[K(` No single Site matches "`+j(a.value.target)+`". Set the `,1),t[16]||=G(`code`,{class:`mono`},`site`,-1),t[17]||=K(` option to a Site ID from this list. `,-1)])):q(``,!0),G(`div`,ap,[(U(!0),W(V,null,vr(a.value.sites,e=>(U(),W(`button`,{key:e.siteId,type:`button`,class:`button`,onClick:t=>T(e.siteId)},[K(j(e.siteUrl)+` `,1),G(`span`,sp,j(e.siteId),1)],8,op))),128))])])):(U(),W(V,{key:7},[G(`form`,{class:`page-bar`,onSubmit:go(te,[`prevent`])},[G(`label`,cp,[t[19]||=G(`span`,{class:`sr-only`},`Page path or URL`,-1),An(G(`input`,{"onUpdate:modelValue":t[2]||=e=>m.value=e,class:`control mono`,type:`text`,placeholder:`/blog/post`,spellcheck:`false`,autocomplete:`off`},null,512),[[co,m.value]])]),t[20]||=G(`button`,{type:`submit`,class:`button`},` Show `,-1),G(`button`,{type:`button`,class:`button`,"aria-pressed":p.value,disabled:!d.value,title:d.value?`Show the page that is open in the app`:`Open this panel from the app to follow its page`,onClick:E},` Follow app `,8,lp)],32),g.value?g.value._tag===`InvalidPage`?(U(),W(`section`,dp,` Type a path, such as /blog/post, or a full URL. `)):g.value._tag===`NoData`?(U(),W(`section`,fp,j(g.value.message),1)):g.value._tag===`RateLimited`?(U(),W(`section`,pp,` gscdump limits page reads per minute. Try again in a minute. `)):g.value._tag===`SiteUnavailable`?(U(),W(`section`,mp,[t[21]||=K(` The Site is not available. `,-1),G(`button`,{type:`button`,class:`link-button`,onClick:w},` Check the connection `)])):g.value._tag===`Failed`?(U(),W(`section`,hp,[K(` The read failed: `+j(g.value.message)+` `,1),g.value.requestId?(U(),W(`span`,gp,`Request `+j(g.value.requestId),1)):q(``,!0)])):D.value?(U(),W(`div`,{key:6,class:A([`report`,{loading:_.value}]),"aria-busy":_.value},[G(`div`,vp,[(U(!0),W(V,null,vr(Yt(Hd),e=>(U(),Ri(Rf,{key:e.key,metric:e.key,label:e.label,totals:D.value.totals,"previous-totals":D.value.previousTotals,"previous-label":x.value,selected:l.value===e.key,onSelect:t[3]||=e=>l.value=e},null,8,[`metric`,`label`,`totals`,`previous-totals`,`previous-label`,`selected`]))),128))]),re.value?(U(),W(`p`,yp,[t[22]||=K(` Google shows no impressions for `,-1),G(`code`,bp,j(D.value.path),1),t[23]||=K(` in this window. Search Console stores each URL exactly, so check the trailing slash. `,-1)])):(U(),W(`div`,xp,[Ui(Cf,{daily:D.value.daily,"previous-daily":D.value.previousDaily,metric:l.value,"window-label":b.value,"previous-label":`Previous ${y.value.days} days`},null,8,[`daily`,`previous-daily`,`metric`,`window-label`,`previous-label`])])),D.value.queries.length?(U(),W(`div`,Sp,[t[24]||=G(`h2`,{class:`section-title`},` Top queries `,-1),Ui(Af,{queries:D.value.queries},null,8,[`queries`])])):q(``,!0),G(`footer`,Cp,[G(`span`,wp,j(ie.value),1),G(`a`,{href:D.value.dashboardUrl,target:`_blank`,rel:`noopener`},`Open in gscdump`,8,Tp)])],10,_p)):q(``,!0):(U(),W(`p`,up,` Reading Search Console data for `+j(h.value),1))],64)):(U(),W(`p`,Xf,` Connecting to gscdump `))]))}}),[[`__scopeId`,`data-v-d62b8a31`]])).mount(`#app`);export{od as n,vs as r,ad as t};
@@ -0,0 +1 @@
1
+ .chart[data-v-83d970de]{width:100%;position:relative}svg[data-v-83d970de]{display:block;overflow:visible}.legend[data-v-83d970de]{flex-wrap:wrap;align-items:center;gap:4px 14px;margin-bottom:6px;font-size:12px;display:flex}.legend .metric[data-v-83d970de]{margin-left:auto}.item[data-v-83d970de],.row[data-v-83d970de]{align-items:center;gap:6px;display:inline-flex}.key[data-v-83d970de]{border-top:2px solid var(--series);width:14px;height:0;display:inline-block}.key.dashed[data-v-83d970de]{opacity:.55;border-top-style:dashed}.grid line[data-v-83d970de]{stroke:var(--grid);stroke-width:1px}.grid text[data-v-83d970de]{fill:var(--dimmed);font-size:11px}.line[data-v-83d970de]{fill:none;stroke:var(--series);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.line.previous[data-v-83d970de]{stroke-dasharray:4 4;opacity:.55}.area[data-v-83d970de]{fill:var(--series);opacity:.1}.crosshair[data-v-83d970de]{stroke:var(--dimmed);stroke-width:1px}.marker[data-v-83d970de]{fill:var(--series);stroke:var(--surface);stroke-width:2px}.marker.previous[data-v-83d970de]{opacity:.55}.hit[data-v-83d970de]{fill:#0000;cursor:crosshair}.tooltip[data-v-83d970de]{border:1px solid var(--border);background:var(--surface);pointer-events:none;white-space:nowrap;border-radius:6px;gap:2px;padding:6px 8px;font-size:12px;display:grid;position:absolute;top:30px;transform:translate(10px);box-shadow:0 4px 12px #0000001f}.tooltip.flip[data-v-83d970de]{transform:translate(calc(-100% - 10px))}.tooltip strong[data-v-83d970de]{margin-left:8px}.queries[data-v-96d390da]{border-collapse:collapse;table-layout:fixed;width:100%;font-size:13px}th[data-v-96d390da],td[data-v-96d390da]{border-bottom:1px solid var(--grid);text-align:right;white-space:nowrap;padding:6px 8px}thead th[data-v-96d390da]{color:var(--muted);font-size:12px;font-weight:500}th.query[data-v-96d390da]{text-align:left;text-overflow:ellipsis;width:46%;font-weight:400;overflow:hidden}thead th.query[data-v-96d390da]{font-weight:500}tbody tr:last-child th[data-v-96d390da],tbody tr:last-child td[data-v-96d390da]{border-bottom:0}.tile[data-v-b318b2b5]{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);text-align:left;cursor:pointer;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;padding:10px 12px;display:flex}.tile[data-v-b318b2b5]:hover{border-color:var(--dimmed)}.tile.selected[data-v-b318b2b5]{border-color:var(--series);box-shadow:inset 0 -2px 0 var(--series)}.label[data-v-b318b2b5]{color:var(--muted);align-items:center;gap:6px;font-size:12px;display:inline-flex}.key[data-v-b318b2b5]{background:var(--series);border-radius:1px;width:10px;height:2px}.value[data-v-b318b2b5]{font-size:22px;font-weight:600;line-height:1.2}.delta[data-v-b318b2b5]{color:var(--muted);font-size:12px}.delta.good[data-v-b318b2b5]{color:var(--good)}.delta.bad[data-v-b318b2b5]{color:var(--bad)}.panel[data-v-d62b8a31]{flex-direction:column;gap:12px;max-width:1100px;margin:0 auto;padding:14px 16px 24px;display:flex}.header[data-v-d62b8a31]{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 16px;display:flex}.brand[data-v-d62b8a31]{align-items:baseline;gap:8px;display:flex}.controls[data-v-d62b8a31]{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.site[data-v-d62b8a31]{color:var(--muted);font-size:13px}.page-bar[data-v-d62b8a31]{gap:8px;display:flex}.page-field[data-v-d62b8a31]{flex:1;min-width:0}.page-field input[data-v-d62b8a31]{width:100%}.button[data-v-d62b8a31]:disabled{opacity:.5;cursor:not-allowed}.notice[data-v-d62b8a31]{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);margin:0;padding:12px 14px}.notice p[data-v-d62b8a31]{margin:6px 0}.notice ul[data-v-d62b8a31]{margin:6px 0 10px;padding-left:18px}.notice.error[data-v-d62b8a31]{border-color:color-mix(in srgb, var(--bad) 40%, var(--border))}.site-list[data-v-d62b8a31]{flex-wrap:wrap;gap:8px;margin-top:8px;display:flex}.link-button[data-v-d62b8a31]{color:var(--link);cursor:pointer;background:0 0;border:0;padding:0;text-decoration:underline}.report[data-v-d62b8a31]{flex-direction:column;gap:12px;transition:opacity .12s;display:flex}.report.loading[data-v-d62b8a31]{opacity:.6}.tiles[data-v-d62b8a31]{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;display:grid}.block[data-v-d62b8a31]{padding:12px}.section-title[data-v-d62b8a31]{margin:0 0 6px;font-size:13px;font-weight:600}.footer[data-v-d62b8a31]{flex-wrap:wrap;justify-content:space-between;gap:8px;font-size:13px;display:flex}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#fbf8f3;--surface:#fff;--border:#e6dfd3;--grid:#ece6db;--text:#1b2130;--muted:#555b66;--dimmed:#7a808b;--primary:#c23e00;--link:#345fb2;--good:#1a7f37;--bad:#b42318;--metric-clicks:var(--primary);--metric-impressions:var(--link);--metric-ctr:#0f766e;--metric-position:#6b5a9e;--radius:8px;color:var(--text);background:var(--bg);font-family:Geist,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;font-size:14px;line-height:1.5}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#080b14;--surface:#131722;--border:#262c3a;--grid:#1d2230;--text:#e9e5e0;--muted:#a3a8b3;--dimmed:#7d8390;--primary:#f8894b;--link:#82b5ef;--good:#4ac26b;--bad:#f97066;--metric-ctr:#4fc1ae;--metric-position:#a993f0}}*{box-sizing:border-box}body{background:var(--bg);margin:0}button,input,select{font:inherit;color:inherit}a{color:var(--link)}.mono{font-family:Geist Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.tabular{font-variant-numeric:tabular-nums}.muted{color:var(--muted)}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.control{border:1px solid var(--border);background:var(--surface);border-radius:6px;height:32px;padding:0 10px}.control:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid var(--link);outline-offset:1px}.button{border:1px solid var(--border);background:var(--surface);cursor:pointer;white-space:nowrap;height:32px;color:var(--text);border-radius:6px;align-items:center;gap:6px;padding:0 12px;text-decoration:none;display:inline-flex}.button:hover{border-color:var(--dimmed)}.button[aria-pressed=true]{border-color:var(--primary);color:var(--primary)}.card{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface)}
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Search Console</title>
7
+ <script type="module" crossorigin src="./assets/index-B8m88k2l.js"></script>
8
+ <link rel="stylesheet" crossorigin href="./assets/index-Bv6TqI10.css">
9
+ </head>
10
+ <body>
11
+ <div id="app"></div>
12
+ </body>
13
+ </html>