@waelio/cli 0.1.1 → 0.1.3
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 +128 -54
- package/dist/index.js +14 -0
- package/dist/scaffold.d.ts +35 -0
- package/dist/scaffold.js +333 -0
- package/dist/server.js +83 -1
- package/package.json +5 -4
- package/ui/dist/assets/{index-BJ1Dzrgp.css → index-C3Eg0a_I.css} +1 -1
- package/ui/dist/assets/index-Cde-X4PD.js +18 -0
- package/ui/dist/index.html +2 -2
- package/dist/localRepos.test.d.ts +0 -1
- package/dist/localRepos.test.js +0 -51
- package/dist/siteforge.test.d.ts +0 -1
- package/dist/siteforge.test.js +0 -53
- package/ui/dist/assets/index-DS_pYwiX.js +0 -18
package/dist/server.js
CHANGED
|
@@ -1,9 +1,45 @@
|
|
|
1
|
+
// Serve static files from public-sites directory under /public-sites/*
|
|
2
|
+
import { createReadStream } from "node:fs";
|
|
3
|
+
async function handlePublicSitesRequest(request, response) {
|
|
4
|
+
// Remove "/public-sites" prefix and normalize
|
|
5
|
+
const url = new URL(request.url ?? "/", "http://localhost");
|
|
6
|
+
let relPath = url.pathname.replace(/^\/public-sites\/?/, "");
|
|
7
|
+
// Prevent directory traversal
|
|
8
|
+
relPath = relPath.replace(/\.\.+/g, "");
|
|
9
|
+
let filePath = path.join(publicSitesDir, relPath);
|
|
10
|
+
// If path is a directory or ends with /, serve index.html
|
|
11
|
+
let statInfo;
|
|
12
|
+
try {
|
|
13
|
+
statInfo = await stat(filePath);
|
|
14
|
+
if (statInfo.isDirectory()) {
|
|
15
|
+
filePath = path.join(filePath, "index.html");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
// If file does not exist, try index.html
|
|
20
|
+
filePath = path.join(filePath, "index.html");
|
|
21
|
+
}
|
|
22
|
+
// Check if file exists
|
|
23
|
+
try {
|
|
24
|
+
statInfo = await stat(filePath);
|
|
25
|
+
if (!statInfo.isFile())
|
|
26
|
+
throw new Error();
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
sendJson(response, 404, { error: `Public site file not found: ${relPath}` });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// Serve the file
|
|
33
|
+
response.writeHead(200, { "Content-Type": getContentType(filePath) });
|
|
34
|
+
createReadStream(filePath).pipe(response);
|
|
35
|
+
}
|
|
1
36
|
import { createServer } from "node:http";
|
|
2
|
-
import { readFile, stat } from "node:fs/promises";
|
|
37
|
+
import { readFile, stat, readdir } from "node:fs/promises";
|
|
3
38
|
import path from "node:path";
|
|
4
39
|
import { fileURLToPath } from "node:url";
|
|
5
40
|
import { DEFAULT_SITEFORGE_REPO, formatBuildPlan, getDoctorReport, prepareBuildPlan, runBuild, } from "./siteforge.js";
|
|
6
41
|
import { DEFAULT_LOCAL_REPOS_ROOT, listLocalRepositoryDirectory, scanLocalRepositories, } from "./localRepos.js";
|
|
42
|
+
import { scaffoldFromBlueprint } from "./scaffold.js";
|
|
7
43
|
const helperRepositories = [
|
|
8
44
|
{
|
|
9
45
|
name: "waelio/ustore",
|
|
@@ -34,6 +70,7 @@ const recommendedStack = {
|
|
|
34
70
|
};
|
|
35
71
|
const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
36
72
|
const uiDistDir = path.join(projectRoot, "ui", "dist");
|
|
73
|
+
const publicSitesDir = path.join(projectRoot, "public-sites");
|
|
37
74
|
let buildInProgress = false;
|
|
38
75
|
export async function startServer(options = {}) {
|
|
39
76
|
const port = options.port ?? Number(process.env.PORT ?? 3000);
|
|
@@ -63,6 +100,11 @@ async function handleRequest(request, response) {
|
|
|
63
100
|
sendNoContent(response);
|
|
64
101
|
return;
|
|
65
102
|
}
|
|
103
|
+
// Serve static public sites
|
|
104
|
+
if (request.url && request.url.startsWith("/public-sites/")) {
|
|
105
|
+
await handlePublicSitesRequest(request, response);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
66
108
|
if (requestUrl.pathname.startsWith("/api/")) {
|
|
67
109
|
await handleApiRequest(request, response, requestUrl);
|
|
68
110
|
return;
|
|
@@ -76,6 +118,18 @@ async function handleRequest(request, response) {
|
|
|
76
118
|
}
|
|
77
119
|
}
|
|
78
120
|
async function handleApiRequest(request, response, requestUrl) {
|
|
121
|
+
if (request.method === "GET" && requestUrl.pathname === "/api/public-sites") {
|
|
122
|
+
// List all top-level directories in public-sites/
|
|
123
|
+
try {
|
|
124
|
+
const entries = await readdir(publicSitesDir, { withFileTypes: true });
|
|
125
|
+
const sites = entries.filter(e => e.isDirectory()).map(e => e.name);
|
|
126
|
+
sendJson(response, 200, { sites });
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
sendJson(response, 500, { error: toErrorMessage(error) });
|
|
130
|
+
}
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
79
133
|
if (request.method === "GET" && requestUrl.pathname === "/api/health") {
|
|
80
134
|
sendJson(response, 200, {
|
|
81
135
|
defaultRepoUrl: DEFAULT_SITEFORGE_REPO,
|
|
@@ -130,6 +184,34 @@ async function handleApiRequest(request, response, requestUrl) {
|
|
|
130
184
|
});
|
|
131
185
|
return;
|
|
132
186
|
}
|
|
187
|
+
if (request.method === "POST" && requestUrl.pathname === "/api/scaffold") {
|
|
188
|
+
const payload = await readJsonBody(request);
|
|
189
|
+
if (!isRecord(payload)) {
|
|
190
|
+
sendJson(response, 400, { error: "Request body must be a JSON object." });
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const blueprint = (isRecord(payload.blueprint) ? payload.blueprint : payload);
|
|
194
|
+
if (!blueprint.projectName || !blueprint.projectName.trim()) {
|
|
195
|
+
sendJson(response, 400, {
|
|
196
|
+
error: "Blueprint must include a non-empty projectName.",
|
|
197
|
+
});
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
const outRoot = normalizeString(payload.outRoot);
|
|
201
|
+
const initGit = payload.initGit !== false;
|
|
202
|
+
try {
|
|
203
|
+
const result = await scaffoldFromBlueprint({
|
|
204
|
+
blueprint,
|
|
205
|
+
outRoot,
|
|
206
|
+
initGit,
|
|
207
|
+
});
|
|
208
|
+
sendJson(response, 200, result);
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
sendJson(response, 500, { error: toErrorMessage(error) });
|
|
212
|
+
}
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
133
215
|
if (request.method === "GET" && requestUrl.pathname === "/api/build/stream") {
|
|
134
216
|
await handleBuildStream(response, buildOptionsFromSearchParams(requestUrl.searchParams));
|
|
135
217
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waelio/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "CLI for building the waelio/siteforge website",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"node": ">=20"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"
|
|
19
|
+
"clean": "rm -rf dist",
|
|
20
|
+
"build:cli": "tsc -p tsconfig.json && chmod +x dist/index.js",
|
|
20
21
|
"build:ui": "vite build",
|
|
21
|
-
"build": "npm run build:cli && npm run build:ui",
|
|
22
|
+
"build": "npm run clean && npm run build:cli && npm run build:ui",
|
|
22
23
|
"dev:cli": "tsx src/index.ts",
|
|
23
24
|
"dev:server": "tsx src/server.ts",
|
|
24
25
|
"dev:ui": "vite",
|
|
@@ -49,4 +50,4 @@
|
|
|
49
50
|
"vite": "^5.4.21",
|
|
50
51
|
"vue-tsc": "^2.2.0"
|
|
51
52
|
}
|
|
52
|
-
}
|
|
53
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.app-header[data-v-
|
|
1
|
+
.app-header[data-v-6d55a98d]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem 1.5rem;border-bottom:1px solid var(--fg);color:var(--fg)}.app-title[data-v-6d55a98d]{margin:0;font-size:1.5rem;font-weight:600;letter-spacing:.02em;color:var(--fg)}.theme-toggle[data-v-6d55a98d]{padding:.4rem .9rem;font:inherit;color:var(--fg);background:transparent;border:1px solid var(--fg);border-radius:.375rem;cursor:pointer}.theme-toggle[data-v-6d55a98d]:hover{opacity:.75}.app-main[data-v-6d55a98d]{padding:1.5rem;color:var(--fg);display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1.25rem}.group[data-v-6d55a98d]{border:1px solid var(--fg);border-radius:.5rem;padding:1rem 1.25rem}.group-title[data-v-6d55a98d]{margin:0 0 .75rem;font-size:1rem;font-weight:600}.group-list[data-v-6d55a98d]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.check[data-v-6d55a98d]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.95rem}.check input[data-v-6d55a98d]{accent-color:var(--fg)}.required-tag[data-v-6d55a98d]{margin-left:auto;font-size:.75rem;opacity:.65}.app-footer[data-v-6d55a98d]{padding:1.5rem;border-top:1px solid var(--fg);color:var(--fg)}.actions[data-v-6d55a98d]{display:flex;gap:.75rem;flex-wrap:wrap}.btn[data-v-6d55a98d]{padding:.5rem 1rem;font:inherit;color:var(--fg);background:transparent;border:1px solid var(--fg);border-radius:.375rem;cursor:pointer}.btn[data-v-6d55a98d]:disabled{opacity:.4;cursor:not-allowed}.btn[data-v-6d55a98d]:hover:not(:disabled){opacity:.75}.preview[data-v-6d55a98d]{margin-top:1rem;padding:1rem;border:1px solid var(--fg);border-radius:.375rem;max-height:24rem;overflow:auto;font-size:.85rem;white-space:pre-wrap;word-break:break-word}.build-status[data-v-6d55a98d]{margin-top:1.25rem}.build-state[data-v-6d55a98d]{margin:0 0 .5rem;font-size:.9rem;text-transform:uppercase;letter-spacing:.05em}:root{color-scheme:light;--bg: #ffffff;--fg: #000000}:root[data-theme=dark]{color-scheme:dark;--bg: #000000;--fg: #ffffff}*{box-sizing:border-box}html,body,#app{margin:0;min-height:100%;background:var(--bg);color:var(--fg)}body{min-height:100vh;font-family:system-ui,-apple-system,sans-serif}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function s(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(i){if(i.ep)return;i.ep=!0;const r=s(i);fetch(i.href,r)}})();/**
|
|
2
|
+
* @vue/shared v3.5.34
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function Fs(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const k={},ct=[],Ie=()=>{},Hn=()=>!1,Xt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Qt=e=>e.startsWith("onUpdate:"),se=Object.assign,Ds=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Ji=Object.prototype.hasOwnProperty,B=(e,t)=>Ji.call(e,t),R=Array.isArray,ft=e=>Dt(e)==="[object Map]",Bn=e=>Dt(e)==="[object Set]",rn=e=>Dt(e)==="[object Date]",I=e=>typeof e=="function",Q=e=>typeof e=="string",Fe=e=>typeof e=="symbol",U=e=>e!==null&&typeof e=="object",Un=e=>(U(e)||I(e))&&I(e.then)&&I(e.catch),Vn=Object.prototype.toString,Dt=e=>Vn.call(e),Gi=e=>Dt(e).slice(8,-1),Kn=e=>Dt(e)==="[object Object]",js=e=>Q(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,St=Fs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zt=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},Yi=/-\w/g,_e=Zt(e=>e.replace(Yi,t=>t.slice(1).toUpperCase())),zi=/\B([A-Z])/g,it=Zt(e=>e.replace(zi,"-$1").toLowerCase()),kn=Zt(e=>e.charAt(0).toUpperCase()+e.slice(1)),us=Zt(e=>e?`on${kn(e)}`:""),Me=(e,t)=>!Object.is(e,t),Vt=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Wn=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ls=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let on;const es=()=>on||(on=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ns(e){if(R(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],i=Q(n)?er(n):Ns(n);if(i)for(const r in i)t[r]=i[r]}return t}else if(Q(e)||U(e))return e}const Xi=/;(?![^(]*\))/g,Qi=/:([^]+)/,Zi=/\/\*[^]*?\*\//g;function er(e){const t={};return e.replace(Zi,"").split(Xi).forEach(s=>{if(s){const n=s.split(Qi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function $s(e){let t="";if(Q(e))t=e;else if(R(e))for(let s=0;s<e.length;s++){const n=$s(e[s]);n&&(t+=n+" ")}else if(U(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const tr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",sr=Fs(tr);function qn(e){return!!e||e===""}function nr(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Hs(e[n],t[n]);return s}function Hs(e,t){if(e===t)return!0;let s=rn(e),n=rn(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Fe(e),n=Fe(t),s||n)return e===t;if(s=R(e),n=R(t),s||n)return s&&n?nr(e,t):!1;if(s=U(e),n=U(t),s||n){if(!s||!n)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const o in e){const l=e.hasOwnProperty(o),f=t.hasOwnProperty(o);if(l&&!f||!l&&f||!Hs(e[o],t[o]))return!1}}return String(e)===String(t)}const Jn=e=>!!(e&&e.__v_isRef===!0),qe=e=>Q(e)?e:e==null?"":R(e)||U(e)&&(e.toString===Vn||!I(e.toString))?Jn(e)?qe(e.value):JSON.stringify(e,Gn,2):String(e),Gn=(e,t)=>Jn(t)?Gn(e,t.value):ft(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],r)=>(s[as(n,r)+" =>"]=i,s),{})}:Bn(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>as(s))}:Fe(t)?as(t):U(t)&&!R(t)&&!Kn(t)?String(t):t,as=(e,t="")=>{var s;return Fe(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.34
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let te;class ir{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&te&&(te.active?(this.parent=te,this.index=(te.scopes||(te.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=te;try{return te=this,t()}finally{te=s}}}on(){++this._on===1&&(this.prevScope=te,te=this)}off(){if(this._on>0&&--this._on===0){if(te===this)te=this.prevScope;else{let t=te;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function rr(){return te}let G;const ds=new WeakSet;class Yn{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,te&&(te.active?te.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ds.has(this)&&(ds.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Xn(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ln(this),Qn(this);const t=G,s=be;G=this,be=!0;try{return this.fn()}finally{Zn(this),G=t,be=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Vs(t);this.deps=this.depsTail=void 0,ln(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ds.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ss(this)&&this.run()}get dirty(){return Ss(this)}}let zn=0,wt,Ct;function Xn(e,t=!1){if(e.flags|=8,t){e.next=Ct,Ct=e;return}e.next=wt,wt=e}function Bs(){zn++}function Us(){if(--zn>0)return;if(Ct){let t=Ct;for(Ct=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;wt;){let t=wt;for(wt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Qn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Zn(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),Vs(n),or(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Ss(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ei(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ei(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Pt)||(e.globalVersion=Pt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ss(e))))return;e.flags|=2;const t=e.dep,s=G,n=be;G=e,be=!0;try{Qn(e);const i=e.fn(e._value);(t.version===0||Me(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{G=s,be=n,Zn(e),e.flags&=-3}}function Vs(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)Vs(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function or(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let be=!0;const ti=[];function Ve(){ti.push(be),be=!1}function Ke(){const e=ti.pop();be=e===void 0?!0:e}function ln(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=G;G=void 0;try{t()}finally{G=s}}}let Pt=0;class lr{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ks{constructor(t){this.computed=t,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(t){if(!G||!be||G===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==G)s=this.activeLink=new lr(G,this),G.deps?(s.prevDep=G.depsTail,G.depsTail.nextDep=s,G.depsTail=s):G.deps=G.depsTail=s,si(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=G.depsTail,s.nextDep=void 0,G.depsTail.nextDep=s,G.depsTail=s,G.deps===s&&(G.deps=n)}return s}trigger(t){this.version++,Pt++,this.notify(t)}notify(t){Bs();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Us()}}}function si(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)si(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const ws=new WeakMap,st=Symbol(""),Cs=Symbol(""),Rt=Symbol("");function ne(e,t,s){if(be&&G){let n=ws.get(e);n||ws.set(e,n=new Map);let i=n.get(s);i||(n.set(s,i=new Ks),i.map=n,i.key=s),i.track()}}function He(e,t,s,n,i,r){const o=ws.get(e);if(!o){Pt++;return}const l=f=>{f&&f.trigger()};if(Bs(),t==="clear")o.forEach(l);else{const f=R(e),d=f&&js(s);if(f&&s==="length"){const a=Number(n);o.forEach((p,w)=>{(w==="length"||w===Rt||!Fe(w)&&w>=a)&&l(p)})}else switch((s!==void 0||o.has(void 0))&&l(o.get(s)),d&&l(o.get(Rt)),t){case"add":f?d&&l(o.get("length")):(l(o.get(st)),ft(e)&&l(o.get(Cs)));break;case"delete":f||(l(o.get(st)),ft(e)&&l(o.get(Cs)));break;case"set":ft(e)&&l(o.get(st));break}}Us()}function rt(e){const t=H(e);return t===e?t:(ne(t,"iterate",Rt),me(e)?t:t.map(ye))}function ts(e){return ne(e=H(e),"iterate",Rt),e}function Pe(e,t){return ke(e)?dt(nt(e)?ye(t):t):ye(t)}const cr={__proto__:null,[Symbol.iterator](){return hs(this,Symbol.iterator,e=>Pe(this,e))},concat(...e){return rt(this).concat(...e.map(t=>R(t)?rt(t):t))},entries(){return hs(this,"entries",e=>(e[1]=Pe(this,e[1]),e))},every(e,t){return je(this,"every",e,t,void 0,arguments)},filter(e,t){return je(this,"filter",e,t,s=>s.map(n=>Pe(this,n)),arguments)},find(e,t){return je(this,"find",e,t,s=>Pe(this,s),arguments)},findIndex(e,t){return je(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return je(this,"findLast",e,t,s=>Pe(this,s),arguments)},findLastIndex(e,t){return je(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return je(this,"forEach",e,t,void 0,arguments)},includes(...e){return ps(this,"includes",e)},indexOf(...e){return ps(this,"indexOf",e)},join(e){return rt(this).join(e)},lastIndexOf(...e){return ps(this,"lastIndexOf",e)},map(e,t){return je(this,"map",e,t,void 0,arguments)},pop(){return _t(this,"pop")},push(...e){return _t(this,"push",e)},reduce(e,...t){return cn(this,"reduce",e,t)},reduceRight(e,...t){return cn(this,"reduceRight",e,t)},shift(){return _t(this,"shift")},some(e,t){return je(this,"some",e,t,void 0,arguments)},splice(...e){return _t(this,"splice",e)},toReversed(){return rt(this).toReversed()},toSorted(e){return rt(this).toSorted(e)},toSpliced(...e){return rt(this).toSpliced(...e)},unshift(...e){return _t(this,"unshift",e)},values(){return hs(this,"values",e=>Pe(this,e))}};function hs(e,t,s){const n=ts(e),i=n[t]();return n!==e&&!me(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=s(r.value)),r}),i}const fr=Array.prototype;function je(e,t,s,n,i,r){const o=ts(e),l=o!==e&&!me(e),f=o[t];if(f!==fr[t]){const p=f.apply(e,r);return l?ye(p):p}let d=s;o!==e&&(l?d=function(p,w){return s.call(this,Pe(e,p),w,e)}:s.length>2&&(d=function(p,w){return s.call(this,p,w,e)}));const a=f.call(o,d,n);return l&&i?i(a):a}function cn(e,t,s,n){const i=ts(e),r=i!==e&&!me(e);let o=s,l=!1;i!==e&&(r?(l=n.length===0,o=function(d,a,p){return l&&(l=!1,d=Pe(e,d)),s.call(this,d,Pe(e,a),p,e)}):s.length>3&&(o=function(d,a,p){return s.call(this,d,a,p,e)}));const f=i[t](o,...n);return l?Pe(e,f):f}function ps(e,t,s){const n=H(e);ne(n,"iterate",Rt);const i=n[t](...s);return(i===-1||i===!1)&&qs(s[0])?(s[0]=H(s[0]),n[t](...s)):i}function _t(e,t,s=[]){Ve(),Bs();const n=H(e)[t].apply(e,s);return Us(),Ke(),n}const ur=Fs("__proto__,__v_isRef,__isVue"),ni=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fe));function ar(e){Fe(e)||(e=String(e));const t=H(this);return ne(t,"has",e),t.hasOwnProperty(e)}class ii{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(i?r?xr:ci:r?li:oi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=R(t);if(!i){let f;if(o&&(f=cr[s]))return f;if(s==="hasOwnProperty")return ar}const l=Reflect.get(t,s,ie(t)?t:n);if((Fe(s)?ni.has(s):ur(s))||(i||ne(t,"get",s),r))return l;if(ie(l)){const f=o&&js(s)?l:l.value;return i&&U(f)?Os(f):f}return U(l)?i?Os(l):ss(l):l}}class ri extends ii{constructor(t=!1){super(!1,t)}set(t,s,n,i){let r=t[s];const o=R(t)&&js(s);if(!this._isShallow){const d=ke(r);if(!me(n)&&!ke(n)&&(r=H(r),n=H(n)),!o&&ie(r)&&!ie(n))return d||(r.value=n),!0}const l=o?Number(s)<t.length:B(t,s),f=Reflect.set(t,s,n,ie(t)?t:i);return t===H(i)&&(l?Me(n,r)&&He(t,"set",s,n):He(t,"add",s,n)),f}deleteProperty(t,s){const n=B(t,s);t[s];const i=Reflect.deleteProperty(t,s);return i&&n&&He(t,"delete",s,void 0),i}has(t,s){const n=Reflect.has(t,s);return(!Fe(s)||!ni.has(s))&&ne(t,"has",s),n}ownKeys(t){return ne(t,"iterate",R(t)?"length":st),Reflect.ownKeys(t)}}class dr extends ii{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const hr=new ri,pr=new dr,gr=new ri(!0);const Ts=e=>e,Ht=e=>Reflect.getPrototypeOf(e);function mr(e,t,s){return function(...n){const i=this.__v_raw,r=H(i),o=ft(r),l=e==="entries"||e===Symbol.iterator&&o,f=e==="keys"&&o,d=i[e](...n),a=s?Ts:t?dt:ye;return!t&&ne(r,"iterate",f?Cs:st),se(Object.create(d),{next(){const{value:p,done:w}=d.next();return w?{value:p,done:w}:{value:l?[a(p[0]),a(p[1])]:a(p),done:w}}})}}function Bt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function _r(e,t){const s={get(i){const r=this.__v_raw,o=H(r),l=H(i);e||(Me(i,l)&&ne(o,"get",i),ne(o,"get",l));const{has:f}=Ht(o),d=t?Ts:e?dt:ye;if(f.call(o,i))return d(r.get(i));if(f.call(o,l))return d(r.get(l));r!==o&&r.get(i)},get size(){const i=this.__v_raw;return!e&&ne(H(i),"iterate",st),i.size},has(i){const r=this.__v_raw,o=H(r),l=H(i);return e||(Me(i,l)&&ne(o,"has",i),ne(o,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const o=this,l=o.__v_raw,f=H(l),d=t?Ts:e?dt:ye;return!e&&ne(f,"iterate",st),l.forEach((a,p)=>i.call(r,d(a),d(p),o))}};return se(s,e?{add:Bt("add"),set:Bt("set"),delete:Bt("delete"),clear:Bt("clear")}:{add(i){const r=H(this),o=Ht(r),l=H(i),f=!t&&!me(i)&&!ke(i)?l:i;return o.has.call(r,f)||Me(i,f)&&o.has.call(r,i)||Me(l,f)&&o.has.call(r,l)||(r.add(f),He(r,"add",f,f)),this},set(i,r){!t&&!me(r)&&!ke(r)&&(r=H(r));const o=H(this),{has:l,get:f}=Ht(o);let d=l.call(o,i);d||(i=H(i),d=l.call(o,i));const a=f.call(o,i);return o.set(i,r),d?Me(r,a)&&He(o,"set",i,r):He(o,"add",i,r),this},delete(i){const r=H(this),{has:o,get:l}=Ht(r);let f=o.call(r,i);f||(i=H(i),f=o.call(r,i)),l&&l.call(r,i);const d=r.delete(i);return f&&He(r,"delete",i,void 0),d},clear(){const i=H(this),r=i.size!==0,o=i.clear();return r&&He(i,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=mr(i,e,t)}),s}function ks(e,t){const s=_r(e,t);return(n,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(B(s,i)&&i in n?s:n,i,r)}const br={get:ks(!1,!1)},yr={get:ks(!1,!0)},vr={get:ks(!0,!1)};const oi=new WeakMap,li=new WeakMap,ci=new WeakMap,xr=new WeakMap;function Sr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function wr(e){return e.__v_skip||!Object.isExtensible(e)?0:Sr(Gi(e))}function ss(e){return ke(e)?e:Ws(e,!1,hr,br,oi)}function Cr(e){return Ws(e,!1,gr,yr,li)}function Os(e){return Ws(e,!0,pr,vr,ci)}function Ws(e,t,s,n,i){if(!U(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=wr(e);if(r===0)return e;const o=i.get(e);if(o)return o;const l=new Proxy(e,r===2?n:s);return i.set(e,l),l}function nt(e){return ke(e)?nt(e.__v_raw):!!(e&&e.__v_isReactive)}function ke(e){return!!(e&&e.__v_isReadonly)}function me(e){return!!(e&&e.__v_isShallow)}function qs(e){return e?!!e.__v_raw:!1}function H(e){const t=e&&e.__v_raw;return t?H(t):e}function Tr(e){return!B(e,"__v_skip")&&Object.isExtensible(e)&&Wn(e,"__v_skip",!0),e}const ye=e=>U(e)?ss(e):e,dt=e=>U(e)?Os(e):e;function ie(e){return e?e.__v_isRef===!0:!1}function Qe(e){return Or(e,!1)}function Or(e,t){return ie(e)?e:new Er(e,t)}class Er{constructor(t,s){this.dep=new Ks,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:H(t),this._value=s?t:ye(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||me(t)||ke(t);t=n?t:H(t),Me(t,s)&&(this._rawValue=t,this._value=n?t:ye(t),this.dep.trigger())}}function Ar(e){return ie(e)?e.value:e}const Pr={get:(e,t,s)=>t==="__v_raw"?e:Ar(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const i=e[t];return ie(i)&&!ie(s)?(i.value=s,!0):Reflect.set(e,t,s,n)}};function fi(e){return nt(e)?e:new Proxy(e,Pr)}class Rr{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Ks(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Pt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&G!==this)return Xn(this,!0),!0}get value(){const t=this.dep.track();return ei(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Mr(e,t,s=!1){let n,i;return I(e)?n=e:(n=e.get,i=e.set),new Rr(n,i,s)}const Ut={},Wt=new WeakMap;let tt;function Ir(e,t=!1,s=tt){if(s){let n=Wt.get(s);n||Wt.set(s,n=[]),n.push(e)}}function Fr(e,t,s=k){const{immediate:n,deep:i,once:r,scheduler:o,augmentJob:l,call:f}=s,d=T=>i?T:me(T)||i===!1||i===0?Be(T,1):Be(T);let a,p,w,C,L=!1,P=!1;if(ie(e)?(p=()=>e.value,L=me(e)):nt(e)?(p=()=>d(e),L=!0):R(e)?(P=!0,L=e.some(T=>nt(T)||me(T)),p=()=>e.map(T=>{if(ie(T))return T.value;if(nt(T))return d(T);if(I(T))return f?f(T,2):T()})):I(e)?t?p=f?()=>f(e,2):e:p=()=>{if(w){Ve();try{w()}finally{Ke()}}const T=tt;tt=a;try{return f?f(e,3,[C]):e(C)}finally{tt=T}}:p=Ie,t&&i){const T=p,Y=i===!0?1/0:i;p=()=>Be(T(),Y)}const X=rr(),V=()=>{a.stop(),X&&X.active&&Ds(X.effects,a)};if(r&&t){const T=t;t=(...Y)=>{T(...Y),V()}}let M=P?new Array(e.length).fill(Ut):Ut;const $=T=>{if(!(!(a.flags&1)||!a.dirty&&!T))if(t){const Y=a.run();if(i||L||(P?Y.some((ve,he)=>Me(ve,M[he])):Me(Y,M))){w&&w();const ve=tt;tt=a;try{const he=[Y,M===Ut?void 0:P&&M[0]===Ut?[]:M,C];M=Y,f?f(t,3,he):t(...he)}finally{tt=ve}}}else a.run()};return l&&l($),a=new Yn(p),a.scheduler=o?()=>o($,!1):$,C=T=>Ir(T,!1,a),w=a.onStop=()=>{const T=Wt.get(a);if(T){if(f)f(T,4);else for(const Y of T)Y();Wt.delete(a)}},t?n?$(!0):M=a.run():o?o($.bind(null,!0),!0):a.run(),V.pause=a.pause.bind(a),V.resume=a.resume.bind(a),V.stop=V,V}function Be(e,t=1/0,s){if(t<=0||!U(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,ie(e))Be(e.value,t,s);else if(R(e))for(let n=0;n<e.length;n++)Be(e[n],t,s);else if(Bn(e)||ft(e))e.forEach(n=>{Be(n,t,s)});else if(Kn(e)){for(const n in e)Be(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Be(e[n],t,s)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.34
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function jt(e,t,s,n){try{return n?e(...n):e()}catch(i){ns(i,t,s)}}function De(e,t,s,n){if(I(e)){const i=jt(e,t,s,n);return i&&Un(i)&&i.catch(r=>{ns(r,t,s)}),i}if(R(e)){const i=[];for(let r=0;r<e.length;r++)i.push(De(e[r],t,s,n));return i}}function ns(e,t,s,n=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||k;if(t){let l=t.parent;const f=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const a=l.ec;if(a){for(let p=0;p<a.length;p++)if(a[p](e,f,d)===!1)return}l=l.parent}if(r){Ve(),jt(r,null,10,[e,f,d]),Ke();return}}Dr(e,s,i,n,o)}function Dr(e,t,s,n=!0,i=!1){if(i)throw e;console.error(e)}const ce=[];let Ae=-1;const ut=[];let Je=null,ot=0;const ui=Promise.resolve();let qt=null;function jr(e){const t=qt||ui;return e?t.then(this?e.bind(this):e):t}function Lr(e){let t=Ae+1,s=ce.length;for(;t<s;){const n=t+s>>>1,i=ce[n],r=Mt(i);r<e||r===e&&i.flags&2?t=n+1:s=n}return t}function Js(e){if(!(e.flags&1)){const t=Mt(e),s=ce[ce.length-1];!s||!(e.flags&2)&&t>=Mt(s)?ce.push(e):ce.splice(Lr(t),0,e),e.flags|=1,ai()}}function ai(){qt||(qt=ui.then(hi))}function Nr(e){R(e)?ut.push(...e):Je&&e.id===-1?Je.splice(ot+1,0,e):e.flags&1||(ut.push(e),e.flags|=1),ai()}function fn(e,t,s=Ae+1){for(;s<ce.length;s++){const n=ce[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;ce.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function di(e){if(ut.length){const t=[...new Set(ut)].sort((s,n)=>Mt(s)-Mt(n));if(ut.length=0,Je){Je.push(...t);return}for(Je=t,ot=0;ot<Je.length;ot++){const s=Je[ot];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Je=null,ot=0}}const Mt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function hi(e){try{for(Ae=0;Ae<ce.length;Ae++){const t=ce[Ae];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),jt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ae<ce.length;Ae++){const t=ce[Ae];t&&(t.flags&=-2)}Ae=-1,ce.length=0,di(),qt=null,(ce.length||ut.length)&&hi()}}let ge=null,pi=null;function Jt(e){const t=ge;return ge=e,pi=e&&e.type.__scopeId||null,t}function $r(e,t=ge,s){if(!t||e._n)return e;const n=(...i)=>{n._d&&xn(-1);const r=Jt(t);let o;try{o=e(...i)}finally{Jt(r),n._d&&xn(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Hr(e,t){if(ge===null)return e;const s=ls(ge),n=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,o,l,f=k]=t[i];r&&(I(r)&&(r={mounted:r,updated:r}),r.deep&&Be(o),n.push({dir:r,instance:s,value:o,oldValue:void 0,arg:l,modifiers:f}))}return e}function Ze(e,t,s,n){const i=e.dirs,r=t&&t.dirs;for(let o=0;o<i.length;o++){const l=i[o];r&&(l.oldValue=r[o].value);let f=l.dir[n];f&&(Ve(),De(f,s,8,[e.el,l,e,t]),Ke())}}function Br(e,t){if(fe){let s=fe.provides;const n=fe.parent&&fe.parent.provides;n===s&&(s=fe.provides=Object.create(n)),s[e]=t}}function Kt(e,t,s=!1){const n=Vo();if(n||at){let i=at?at._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&I(t)?t.call(n&&n.proxy):t}}const Ur=Symbol.for("v-scx"),Vr=()=>Kt(Ur);function gs(e,t,s){return gi(e,t,s)}function gi(e,t,s=k){const{immediate:n,deep:i,flush:r,once:o}=s,l=se({},s),f=t&&n||!t&&r!=="post";let d;if(Ft){if(r==="sync"){const C=Vr();d=C.__watcherHandles||(C.__watcherHandles=[])}else if(!f){const C=()=>{};return C.stop=Ie,C.resume=Ie,C.pause=Ie,C}}const a=fe;l.call=(C,L,P)=>De(C,a,L,P);let p=!1;r==="post"?l.scheduler=C=>{ue(C,a&&a.suspense)}:r!=="sync"&&(p=!0,l.scheduler=(C,L)=>{L?C():Js(C)}),l.augmentJob=C=>{t&&(C.flags|=4),p&&(C.flags|=2,a&&(C.id=a.uid,C.i=a))};const w=Fr(e,t,l);return Ft&&(d?d.push(w):f&&w()),w}function Kr(e,t,s){const n=this.proxy,i=Q(e)?e.includes(".")?mi(n,e):()=>n[e]:e.bind(n,n);let r;I(t)?r=t:(r=t.handler,s=t);const o=Lt(this),l=gi(i,r.bind(n),s);return o(),l}function mi(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;i<s.length&&n;i++)n=n[s[i]];return n}}const kr=Symbol("_vte"),Wr=e=>e.__isTeleport,qr=Symbol("_leaveCb");function Gs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Gs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Jr(e,t){return I(e)?se({name:e.name},t,{setup:e}):e}function _i(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function un(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Gt=new WeakMap;function Tt(e,t,s,n,i=!1){if(R(e)){e.forEach((P,X)=>Tt(P,t&&(R(t)?t[X]:t),s,n,i));return}if(Ot(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Tt(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?ls(n.component):n.el,o=i?null:r,{i:l,r:f}=e,d=t&&t.r,a=l.refs===k?l.refs={}:l.refs,p=l.setupState,w=H(p),C=p===k?Hn:P=>un(a,P)?!1:B(w,P),L=(P,X)=>!(X&&un(a,X));if(d!=null&&d!==f){if(an(t),Q(d))a[d]=null,C(d)&&(p[d]=null);else if(ie(d)){const P=t;L(d,P.k)&&(d.value=null),P.k&&(a[P.k]=null)}}if(I(f))jt(f,l,12,[o,a]);else{const P=Q(f),X=ie(f);if(P||X){const V=()=>{if(e.f){const M=P?C(f)?p[f]:a[f]:L()||!e.k?f.value:a[e.k];if(i)R(M)&&Ds(M,r);else if(R(M))M.includes(r)||M.push(r);else if(P)a[f]=[r],C(f)&&(p[f]=a[f]);else{const $=[r];L(f,e.k)&&(f.value=$),e.k&&(a[e.k]=$)}}else P?(a[f]=o,C(f)&&(p[f]=o)):X&&(L(f,e.k)&&(f.value=o),e.k&&(a[e.k]=o))};if(o){const M=()=>{V(),Gt.delete(e)};M.id=-1,Gt.set(e,M),ue(M,s)}else an(e),V()}}}function an(e){const t=Gt.get(e);t&&(t.flags|=8,Gt.delete(e))}es().requestIdleCallback;es().cancelIdleCallback;const Ot=e=>!!e.type.__asyncLoader,bi=e=>e.type.__isKeepAlive;function Gr(e,t){yi(e,"a",t)}function Yr(e,t){yi(e,"da",t)}function yi(e,t,s=fe){const n=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(is(t,n,s),s){let i=s.parent;for(;i&&i.parent;)bi(i.parent.vnode)&&zr(n,t,s,i),i=i.parent}}function zr(e,t,s,n){const i=is(t,e,n,!0);xi(()=>{Ds(n[t],i)},s)}function is(e,t,s=fe,n=!1){if(s){const i=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...o)=>{Ve();const l=Lt(s),f=De(t,s,e,o);return l(),Ke(),f});return n?i.unshift(r):i.push(r),r}}const We=e=>(t,s=fe)=>{(!Ft||e==="sp")&&is(e,(...n)=>t(...n),s)},Xr=We("bm"),vi=We("m"),Qr=We("bu"),Zr=We("u"),eo=We("bum"),xi=We("um"),to=We("sp"),so=We("rtg"),no=We("rtc");function io(e,t=fe){is("ec",e,t)}const ro=Symbol.for("v-ndc");function dn(e,t,s,n){let i;const r=s,o=R(e);if(o||Q(e)){const l=o&&nt(e);let f=!1,d=!1;l&&(f=!me(e),d=ke(e),e=ts(e)),i=new Array(e.length);for(let a=0,p=e.length;a<p;a++)i[a]=t(f?d?dt(ye(e[a])):ye(e[a]):e[a],a,void 0,r)}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,r)}else if(U(e))if(e[Symbol.iterator])i=Array.from(e,(l,f)=>t(l,f,void 0,r));else{const l=Object.keys(e);i=new Array(l.length);for(let f=0,d=l.length;f<d;f++){const a=l[f];i[f]=t(e[a],a,f,r)}}else i=[];return i}const Es=e=>e?Vi(e)?ls(e):Es(e.parent):null,Et=se(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=>Es(e.parent),$root:e=>Es(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>wi(e),$forceUpdate:e=>e.f||(e.f=()=>{Js(e.update)}),$nextTick:e=>e.n||(e.n=jr.bind(e.proxy)),$watch:e=>Kr.bind(e)}),ms=(e,t)=>e!==k&&!e.__isScriptSetup&&B(e,t),oo={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:r,accessCache:o,type:l,appContext:f}=e;if(t[0]!=="$"){const w=o[t];if(w!==void 0)switch(w){case 1:return n[t];case 2:return i[t];case 4:return s[t];case 3:return r[t]}else{if(ms(n,t))return o[t]=1,n[t];if(i!==k&&B(i,t))return o[t]=2,i[t];if(B(r,t))return o[t]=3,r[t];if(s!==k&&B(s,t))return o[t]=4,s[t];As&&(o[t]=0)}}const d=Et[t];let a,p;if(d)return t==="$attrs"&&ne(e.attrs,"get",""),d(e);if((a=l.__cssModules)&&(a=a[t]))return a;if(s!==k&&B(s,t))return o[t]=4,s[t];if(p=f.config.globalProperties,B(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:i,ctx:r}=e;return ms(i,t)?(i[t]=s,!0):n!==k&&B(n,t)?(n[t]=s,!0):B(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:i,props:r,type:o}},l){let f;return!!(s[l]||e!==k&&l[0]!=="$"&&B(e,l)||ms(t,l)||B(r,l)||B(n,l)||B(Et,l)||B(i.config.globalProperties,l)||(f=o.__cssModules)&&f[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:B(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function hn(e){return R(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let As=!0;function lo(e){const t=wi(e),s=e.proxy,n=e.ctx;As=!1,t.beforeCreate&&pn(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:o,watch:l,provide:f,inject:d,created:a,beforeMount:p,mounted:w,beforeUpdate:C,updated:L,activated:P,deactivated:X,beforeDestroy:V,beforeUnmount:M,destroyed:$,unmounted:T,render:Y,renderTracked:ve,renderTriggered:he,errorCaptured:xe,serverPrefetch:F,expose:j,inheritAttrs:D,components:re,directives:Ye,filters:cs}=t;if(d&&co(d,n,null),o)for(const z in o){const W=o[z];I(W)&&(n[z]=W.bind(s))}if(i){const z=i.call(s,s);U(z)&&(e.data=ss(z))}if(As=!0,r)for(const z in r){const W=r[z],ze=I(W)?W.bind(s,s):I(W.get)?W.get.bind(s,s):Ie,Nt=!I(W)&&I(W.set)?W.set.bind(s):Ie,Xe=Go({get:ze,set:Nt});Object.defineProperty(n,z,{enumerable:!0,configurable:!0,get:()=>Xe.value,set:Se=>Xe.value=Se})}if(l)for(const z in l)Si(l[z],n,s,z);if(f){const z=I(f)?f.call(s):f;Reflect.ownKeys(z).forEach(W=>{Br(W,z[W])})}a&&pn(a,e,"c");function oe(z,W){R(W)?W.forEach(ze=>z(ze.bind(s))):W&&z(W.bind(s))}if(oe(Xr,p),oe(vi,w),oe(Qr,C),oe(Zr,L),oe(Gr,P),oe(Yr,X),oe(io,xe),oe(no,ve),oe(so,he),oe(eo,M),oe(xi,T),oe(to,F),R(j))if(j.length){const z=e.exposed||(e.exposed={});j.forEach(W=>{Object.defineProperty(z,W,{get:()=>s[W],set:ze=>s[W]=ze,enumerable:!0})})}else e.exposed||(e.exposed={});Y&&e.render===Ie&&(e.render=Y),D!=null&&(e.inheritAttrs=D),re&&(e.components=re),Ye&&(e.directives=Ye),F&&_i(e)}function co(e,t,s=Ie){R(e)&&(e=Ps(e));for(const n in e){const i=e[n];let r;U(i)?"default"in i?r=Kt(i.from||n,i.default,!0):r=Kt(i.from||n):r=Kt(i),ie(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):t[n]=r}}function pn(e,t,s){De(R(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Si(e,t,s,n){let i=n.includes(".")?mi(s,n):()=>s[n];if(Q(e)){const r=t[e];I(r)&&gs(i,r)}else if(I(e))gs(i,e.bind(s));else if(U(e))if(R(e))e.forEach(r=>Si(r,t,s,n));else{const r=I(e.handler)?e.handler.bind(s):t[e.handler];I(r)&&gs(i,r,e)}}function wi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,l=r.get(t);let f;return l?f=l:!i.length&&!s&&!n?f=t:(f={},i.length&&i.forEach(d=>Yt(f,d,o,!0)),Yt(f,t,o)),U(t)&&r.set(t,f),f}function Yt(e,t,s,n=!1){const{mixins:i,extends:r}=t;r&&Yt(e,r,s,!0),i&&i.forEach(o=>Yt(e,o,s,!0));for(const o in t)if(!(n&&o==="expose")){const l=fo[o]||s&&s[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const fo={data:gn,props:mn,emits:mn,methods:vt,computed:vt,beforeCreate:le,created:le,beforeMount:le,mounted:le,beforeUpdate:le,updated:le,beforeDestroy:le,beforeUnmount:le,destroyed:le,unmounted:le,activated:le,deactivated:le,errorCaptured:le,serverPrefetch:le,components:vt,directives:vt,watch:ao,provide:gn,inject:uo};function gn(e,t){return t?e?function(){return se(I(e)?e.call(this,this):e,I(t)?t.call(this,this):t)}:t:e}function uo(e,t){return vt(Ps(e),Ps(t))}function Ps(e){if(R(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function le(e,t){return e?[...new Set([].concat(e,t))]:t}function vt(e,t){return e?se(Object.create(null),e,t):t}function mn(e,t){return e?R(e)&&R(t)?[...new Set([...e,...t])]:se(Object.create(null),hn(e),hn(t??{})):t}function ao(e,t){if(!e)return t;if(!t)return e;const s=se(Object.create(null),e);for(const n in t)s[n]=le(e[n],t[n]);return s}function Ci(){return{app:null,config:{isNativeTag:Hn,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}}let ho=0;function po(e,t){return function(n,i=null){I(n)||(n=se({},n)),i!=null&&!U(i)&&(i=null);const r=Ci(),o=new WeakSet,l=[];let f=!1;const d=r.app={_uid:ho++,_component:n,_props:i,_container:null,_context:r,_instance:null,version:Yo,get config(){return r.config},set config(a){},use(a,...p){return o.has(a)||(a&&I(a.install)?(o.add(a),a.install(d,...p)):I(a)&&(o.add(a),a(d,...p))),d},mixin(a){return r.mixins.includes(a)||r.mixins.push(a),d},component(a,p){return p?(r.components[a]=p,d):r.components[a]},directive(a,p){return p?(r.directives[a]=p,d):r.directives[a]},mount(a,p,w){if(!f){const C=d._ceVNode||Ue(n,i);return C.appContext=r,w===!0?w="svg":w===!1&&(w=void 0),e(C,a,w),f=!0,d._container=a,a.__vue_app__=d,ls(C.component)}},onUnmount(a){l.push(a)},unmount(){f&&(De(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(a,p){return r.provides[a]=p,d},runWithContext(a){const p=at;at=d;try{return a()}finally{at=p}}};return d}}let at=null;const go=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${_e(t)}Modifiers`]||e[`${it(t)}Modifiers`];function mo(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||k;let i=s;const r=t.startsWith("update:"),o=r&&go(n,t.slice(7));o&&(o.trim&&(i=s.map(a=>Q(a)?a.trim():a)),o.number&&(i=s.map(Ls)));let l,f=n[l=us(t)]||n[l=us(_e(t))];!f&&r&&(f=n[l=us(it(t))]),f&&De(f,e,6,i);const d=n[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,De(d,e,6,i)}}const _o=new WeakMap;function Ti(e,t,s=!1){const n=s?_o:t.emitsCache,i=n.get(e);if(i!==void 0)return i;const r=e.emits;let o={},l=!1;if(!I(e)){const f=d=>{const a=Ti(d,t,!0);a&&(l=!0,se(o,a))};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!r&&!l?(U(e)&&n.set(e,null),null):(R(r)?r.forEach(f=>o[f]=null):se(o,r),U(e)&&n.set(e,o),o)}function rs(e,t){return!e||!Xt(t)?!1:(t=t.slice(2).replace(/Once$/,""),B(e,t[0].toLowerCase()+t.slice(1))||B(e,it(t))||B(e,t))}function _n(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[r],slots:o,attrs:l,emit:f,render:d,renderCache:a,props:p,data:w,setupState:C,ctx:L,inheritAttrs:P}=e,X=Jt(e);let V,M;try{if(s.shapeFlag&4){const T=i||n,Y=T;V=Re(d.call(Y,T,a,p,C,w,L)),M=l}else{const T=t;V=Re(T.length>1?T(p,{attrs:l,slots:o,emit:f}):T(p,null)),M=t.props?l:bo(l)}}catch(T){At.length=0,ns(T,e,1),V=Ue(Ge)}let $=V;if(M&&P!==!1){const T=Object.keys(M),{shapeFlag:Y}=$;T.length&&Y&7&&(r&&T.some(Qt)&&(M=yo(M,r)),$=ht($,M,!1,!0))}return s.dirs&&($=ht($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(s.dirs):s.dirs),s.transition&&Gs($,s.transition),V=$,Jt(X),V}const bo=e=>{let t;for(const s in e)(s==="class"||s==="style"||Xt(s))&&((t||(t={}))[s]=e[s]);return t},yo=(e,t)=>{const s={};for(const n in e)(!Qt(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function vo(e,t,s){const{props:n,children:i,component:r}=e,{props:o,children:l,patchFlag:f}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&f>=0){if(f&1024)return!0;if(f&16)return n?bn(n,o,d):!!o;if(f&8){const a=t.dynamicProps;for(let p=0;p<a.length;p++){const w=a[p];if(Oi(o,n,w)&&!rs(d,w))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:n===o?!1:n?o?bn(n,o,d):!0:!!o;return!1}function bn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let i=0;i<n.length;i++){const r=n[i];if(Oi(t,e,r)&&!rs(s,r))return!0}return!1}function Oi(e,t,s){const n=e[s],i=t[s];return s==="style"&&U(n)&&U(i)?!Hs(n,i):n!==i}function xo({vnode:e,parent:t,suspense:s},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.suspense.vnode.el=i.el=n,e=i),i===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Ei={},Ai=()=>Object.create(Ei),Pi=e=>Object.getPrototypeOf(e)===Ei;function So(e,t,s,n=!1){const i={},r=Ai();e.propsDefaults=Object.create(null),Ri(e,t,i,r);for(const o in e.propsOptions[0])o in i||(i[o]=void 0);s?e.props=n?i:Cr(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function wo(e,t,s,n){const{props:i,attrs:r,vnode:{patchFlag:o}}=e,l=H(i),[f]=e.propsOptions;let d=!1;if((n||o>0)&&!(o&16)){if(o&8){const a=e.vnode.dynamicProps;for(let p=0;p<a.length;p++){let w=a[p];if(rs(e.emitsOptions,w))continue;const C=t[w];if(f)if(B(r,w))C!==r[w]&&(r[w]=C,d=!0);else{const L=_e(w);i[L]=Rs(f,l,L,C,e,!1)}else C!==r[w]&&(r[w]=C,d=!0)}}}else{Ri(e,t,i,r)&&(d=!0);let a;for(const p in l)(!t||!B(t,p)&&((a=it(p))===p||!B(t,a)))&&(f?s&&(s[p]!==void 0||s[a]!==void 0)&&(i[p]=Rs(f,l,p,void 0,e,!0)):delete i[p]);if(r!==l)for(const p in r)(!t||!B(t,p))&&(delete r[p],d=!0)}d&&He(e.attrs,"set","")}function Ri(e,t,s,n){const[i,r]=e.propsOptions;let o=!1,l;if(t)for(let f in t){if(St(f))continue;const d=t[f];let a;i&&B(i,a=_e(f))?!r||!r.includes(a)?s[a]=d:(l||(l={}))[a]=d:rs(e.emitsOptions,f)||(!(f in n)||d!==n[f])&&(n[f]=d,o=!0)}if(r){const f=H(s),d=l||k;for(let a=0;a<r.length;a++){const p=r[a];s[p]=Rs(i,f,p,d[p],e,!B(d,p))}}return o}function Rs(e,t,s,n,i,r){const o=e[s];if(o!=null){const l=B(o,"default");if(l&&n===void 0){const f=o.default;if(o.type!==Function&&!o.skipFactory&&I(f)){const{propsDefaults:d}=i;if(s in d)n=d[s];else{const a=Lt(i);n=d[s]=f.call(null,t),a()}}else n=f;i.ce&&i.ce._setProp(s,n)}o[0]&&(r&&!l?n=!1:o[1]&&(n===""||n===it(s))&&(n=!0))}return n}const Co=new WeakMap;function Mi(e,t,s=!1){const n=s?Co:t.propsCache,i=n.get(e);if(i)return i;const r=e.props,o={},l=[];let f=!1;if(!I(e)){const a=p=>{f=!0;const[w,C]=Mi(p,t,!0);se(o,w),C&&l.push(...C)};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!r&&!f)return U(e)&&n.set(e,ct),ct;if(R(r))for(let a=0;a<r.length;a++){const p=_e(r[a]);yn(p)&&(o[p]=k)}else if(r)for(const a in r){const p=_e(a);if(yn(p)){const w=r[a],C=o[p]=R(w)||I(w)?{type:w}:se({},w),L=C.type;let P=!1,X=!0;if(R(L))for(let V=0;V<L.length;++V){const M=L[V],$=I(M)&&M.name;if($==="Boolean"){P=!0;break}else $==="String"&&(X=!1)}else P=I(L)&&L.name==="Boolean";C[0]=P,C[1]=X,(P||B(C,"default"))&&l.push(p)}}const d=[o,l];return U(e)&&n.set(e,d),d}function yn(e){return e[0]!=="$"&&!St(e)}const Ys=e=>e==="_"||e==="_ctx"||e==="$stable",zs=e=>R(e)?e.map(Re):[Re(e)],To=(e,t,s)=>{if(t._n)return t;const n=$r((...i)=>zs(t(...i)),s);return n._c=!1,n},Ii=(e,t,s)=>{const n=e._ctx;for(const i in e){if(Ys(i))continue;const r=e[i];if(I(r))t[i]=To(i,r,n);else if(r!=null){const o=zs(r);t[i]=()=>o}}},Fi=(e,t)=>{const s=zs(t);e.slots.default=()=>s},Di=(e,t,s)=>{for(const n in t)(s||!Ys(n))&&(e[n]=t[n])},Oo=(e,t,s)=>{const n=e.slots=Ai();if(e.vnode.shapeFlag&32){const i=t._;i?(Di(n,t,s),s&&Wn(n,"_",i,!0)):Ii(t,n)}else t&&Fi(e,t)},Eo=(e,t,s)=>{const{vnode:n,slots:i}=e;let r=!0,o=k;if(n.shapeFlag&32){const l=t._;l?s&&l===1?r=!1:Di(i,t,s):(r=!t.$stable,Ii(t,i)),o=t}else t&&(Fi(e,t),o={default:1});if(r)for(const l in i)!Ys(l)&&o[l]==null&&delete i[l]},ue=Io;function Ao(e){return Po(e)}function Po(e,t){const s=es();s.__VUE__=!0;const{insert:n,remove:i,patchProp:r,createElement:o,createText:l,createComment:f,setText:d,setElementText:a,parentNode:p,nextSibling:w,setScopeId:C=Ie,insertStaticContent:L}=e,P=(c,u,h,b=null,g=null,m=null,x=void 0,v=null,y=!!u.dynamicChildren)=>{if(c===u)return;c&&!bt(c,u)&&(b=$t(c),Se(c,g,m,!0),c=null),u.patchFlag===-2&&(y=!1,u.dynamicChildren=null);const{type:_,ref:E,shapeFlag:S}=u;switch(_){case os:X(c,u,h,b);break;case Ge:V(c,u,h,b);break;case bs:c==null&&M(u,h,b,x);break;case pe:re(c,u,h,b,g,m,x,v,y);break;default:S&1?Y(c,u,h,b,g,m,x,v,y):S&6?Ye(c,u,h,b,g,m,x,v,y):(S&64||S&128)&&_.process(c,u,h,b,g,m,x,v,y,gt)}E!=null&&g?Tt(E,c&&c.ref,m,u||c,!u):E==null&&c&&c.ref!=null&&Tt(c.ref,null,m,c,!0)},X=(c,u,h,b)=>{if(c==null)n(u.el=l(u.children),h,b);else{const g=u.el=c.el;u.children!==c.children&&d(g,u.children)}},V=(c,u,h,b)=>{c==null?n(u.el=f(u.children||""),h,b):u.el=c.el},M=(c,u,h,b)=>{[c.el,c.anchor]=L(c.children,u,h,b,c.el,c.anchor)},$=({el:c,anchor:u},h,b)=>{let g;for(;c&&c!==u;)g=w(c),n(c,h,b),c=g;n(u,h,b)},T=({el:c,anchor:u})=>{let h;for(;c&&c!==u;)h=w(c),i(c),c=h;i(u)},Y=(c,u,h,b,g,m,x,v,y)=>{if(u.type==="svg"?x="svg":u.type==="math"&&(x="mathml"),c==null)ve(u,h,b,g,m,x,v,y);else{const _=c.el&&c.el._isVueCE?c.el:null;try{_&&_._beginPatch(),F(c,u,g,m,x,v,y)}finally{_&&_._endPatch()}}},ve=(c,u,h,b,g,m,x,v)=>{let y,_;const{props:E,shapeFlag:S,transition:O,dirs:A}=c;if(y=c.el=o(c.type,m,E&&E.is,E),S&8?a(y,c.children):S&16&&xe(c.children,y,null,b,g,_s(c,m),x,v),A&&Ze(c,null,b,"created"),he(y,c,c.scopeId,x,b),E){for(const K in E)K!=="value"&&!St(K)&&r(y,K,null,E[K],m,b);"value"in E&&r(y,"value",null,E.value,m),(_=E.onVnodeBeforeMount)&&Oe(_,b,c)}A&&Ze(c,null,b,"beforeMount");const N=Ro(g,O);N&&O.beforeEnter(y),n(y,u,h),((_=E&&E.onVnodeMounted)||N||A)&&ue(()=>{try{_&&Oe(_,b,c),N&&O.enter(y),A&&Ze(c,null,b,"mounted")}finally{}},g)},he=(c,u,h,b,g)=>{if(h&&C(c,h),b)for(let m=0;m<b.length;m++)C(c,b[m]);if(g){let m=g.subTree;if(u===m||$i(m.type)&&(m.ssContent===u||m.ssFallback===u)){const x=g.vnode;he(c,x,x.scopeId,x.slotScopeIds,g.parent)}}},xe=(c,u,h,b,g,m,x,v,y=0)=>{for(let _=y;_<c.length;_++){const E=c[_]=v?$e(c[_]):Re(c[_]);P(null,E,u,h,b,g,m,x,v)}},F=(c,u,h,b,g,m,x)=>{const v=u.el=c.el;let{patchFlag:y,dynamicChildren:_,dirs:E}=u;y|=c.patchFlag&16;const S=c.props||k,O=u.props||k;let A;if(h&&et(h,!1),(A=O.onVnodeBeforeUpdate)&&Oe(A,h,u,c),E&&Ze(u,c,h,"beforeUpdate"),h&&et(h,!0),(S.innerHTML&&O.innerHTML==null||S.textContent&&O.textContent==null)&&a(v,""),_?j(c.dynamicChildren,_,v,h,b,_s(u,g),m):x||W(c,u,v,null,h,b,_s(u,g),m,!1),y>0){if(y&16)D(v,S,O,h,g);else if(y&2&&S.class!==O.class&&r(v,"class",null,O.class,g),y&4&&r(v,"style",S.style,O.style,g),y&8){const N=u.dynamicProps;for(let K=0;K<N.length;K++){const q=N[K],Z=S[q],ee=O[q];(ee!==Z||q==="value")&&r(v,q,Z,ee,g,h)}}y&1&&c.children!==u.children&&a(v,u.children)}else!x&&_==null&&D(v,S,O,h,g);((A=O.onVnodeUpdated)||E)&&ue(()=>{A&&Oe(A,h,u,c),E&&Ze(u,c,h,"updated")},b)},j=(c,u,h,b,g,m,x)=>{for(let v=0;v<u.length;v++){const y=c[v],_=u[v],E=y.el&&(y.type===pe||!bt(y,_)||y.shapeFlag&198)?p(y.el):h;P(y,_,E,null,b,g,m,x,!0)}},D=(c,u,h,b,g)=>{if(u!==h){if(u!==k)for(const m in u)!St(m)&&!(m in h)&&r(c,m,u[m],null,g,b);for(const m in h){if(St(m))continue;const x=h[m],v=u[m];x!==v&&m!=="value"&&r(c,m,v,x,g,b)}"value"in h&&r(c,"value",u.value,h.value,g)}},re=(c,u,h,b,g,m,x,v,y)=>{const _=u.el=c?c.el:l(""),E=u.anchor=c?c.anchor:l("");let{patchFlag:S,dynamicChildren:O,slotScopeIds:A}=u;A&&(v=v?v.concat(A):A),c==null?(n(_,h,b),n(E,h,b),xe(u.children||[],h,E,g,m,x,v,y)):S>0&&S&64&&O&&c.dynamicChildren&&c.dynamicChildren.length===O.length?(j(c.dynamicChildren,O,h,g,m,x,v),(u.key!=null||g&&u===g.subTree)&&ji(c,u,!0)):W(c,u,h,E,g,m,x,v,y)},Ye=(c,u,h,b,g,m,x,v,y)=>{u.slotScopeIds=v,c==null?u.shapeFlag&512?g.ctx.activate(u,h,b,x,y):cs(u,h,b,g,m,x,y):Qs(c,u,y)},cs=(c,u,h,b,g,m,x)=>{const v=c.component=Uo(c,b,g);if(bi(c)&&(v.ctx.renderer=gt),Ko(v,!1,x),v.asyncDep){if(g&&g.registerDep(v,oe,x),!c.el){const y=v.subTree=Ue(Ge);V(null,y,u,h),c.placeholder=y.el}}else oe(v,c,u,h,g,m,x)},Qs=(c,u,h)=>{const b=u.component=c.component;if(vo(c,u,h))if(b.asyncDep&&!b.asyncResolved){z(b,u,h);return}else b.next=u,b.update();else u.el=c.el,b.vnode=u},oe=(c,u,h,b,g,m,x)=>{const v=()=>{if(c.isMounted){let{next:S,bu:O,u:A,parent:N,vnode:K}=c;{const Ce=Li(c);if(Ce){S&&(S.el=K.el,z(c,S,x)),Ce.asyncDep.then(()=>{ue(()=>{c.isUnmounted||_()},g)});return}}let q=S,Z;et(c,!1),S?(S.el=K.el,z(c,S,x)):S=K,O&&Vt(O),(Z=S.props&&S.props.onVnodeBeforeUpdate)&&Oe(Z,N,S,K),et(c,!0);const ee=_n(c),we=c.subTree;c.subTree=ee,P(we,ee,p(we.el),$t(we),c,g,m),S.el=ee.el,q===null&&xo(c,ee.el),A&&ue(A,g),(Z=S.props&&S.props.onVnodeUpdated)&&ue(()=>Oe(Z,N,S,K),g)}else{let S;const{el:O,props:A}=u,{bm:N,m:K,parent:q,root:Z,type:ee}=c,we=Ot(u);et(c,!1),N&&Vt(N),!we&&(S=A&&A.onVnodeBeforeMount)&&Oe(S,q,u),et(c,!0);{Z.ce&&Z.ce._hasShadowRoot()&&Z.ce._injectChildStyle(ee,c.parent?c.parent.type:void 0);const Ce=c.subTree=_n(c);P(null,Ce,h,b,c,g,m),u.el=Ce.el}if(K&&ue(K,g),!we&&(S=A&&A.onVnodeMounted)){const Ce=u;ue(()=>Oe(S,q,Ce),g)}(u.shapeFlag&256||q&&Ot(q.vnode)&&q.vnode.shapeFlag&256)&&c.a&&ue(c.a,g),c.isMounted=!0,u=h=b=null}};c.scope.on();const y=c.effect=new Yn(v);c.scope.off();const _=c.update=y.run.bind(y),E=c.job=y.runIfDirty.bind(y);E.i=c,E.id=c.uid,y.scheduler=()=>Js(E),et(c,!0),_()},z=(c,u,h)=>{u.component=c;const b=c.vnode.props;c.vnode=u,c.next=null,wo(c,u.props,b,h),Eo(c,u.children,h),Ve(),fn(c),Ke()},W=(c,u,h,b,g,m,x,v,y=!1)=>{const _=c&&c.children,E=c?c.shapeFlag:0,S=u.children,{patchFlag:O,shapeFlag:A}=u;if(O>0){if(O&128){Nt(_,S,h,b,g,m,x,v,y);return}else if(O&256){ze(_,S,h,b,g,m,x,v,y);return}}A&8?(E&16&&pt(_,g,m),S!==_&&a(h,S)):E&16?A&16?Nt(_,S,h,b,g,m,x,v,y):pt(_,g,m,!0):(E&8&&a(h,""),A&16&&xe(S,h,b,g,m,x,v,y))},ze=(c,u,h,b,g,m,x,v,y)=>{c=c||ct,u=u||ct;const _=c.length,E=u.length,S=Math.min(_,E);let O;for(O=0;O<S;O++){const A=u[O]=y?$e(u[O]):Re(u[O]);P(c[O],A,h,null,g,m,x,v,y)}_>E?pt(c,g,m,!0,!1,S):xe(u,h,b,g,m,x,v,y,S)},Nt=(c,u,h,b,g,m,x,v,y)=>{let _=0;const E=u.length;let S=c.length-1,O=E-1;for(;_<=S&&_<=O;){const A=c[_],N=u[_]=y?$e(u[_]):Re(u[_]);if(bt(A,N))P(A,N,h,null,g,m,x,v,y);else break;_++}for(;_<=S&&_<=O;){const A=c[S],N=u[O]=y?$e(u[O]):Re(u[O]);if(bt(A,N))P(A,N,h,null,g,m,x,v,y);else break;S--,O--}if(_>S){if(_<=O){const A=O+1,N=A<E?u[A].el:b;for(;_<=O;)P(null,u[_]=y?$e(u[_]):Re(u[_]),h,N,g,m,x,v,y),_++}}else if(_>O)for(;_<=S;)Se(c[_],g,m,!0),_++;else{const A=_,N=_,K=new Map;for(_=N;_<=O;_++){const ae=u[_]=y?$e(u[_]):Re(u[_]);ae.key!=null&&K.set(ae.key,_)}let q,Z=0;const ee=O-N+1;let we=!1,Ce=0;const mt=new Array(ee);for(_=0;_<ee;_++)mt[_]=0;for(_=A;_<=S;_++){const ae=c[_];if(Z>=ee){Se(ae,g,m,!0);continue}let Te;if(ae.key!=null)Te=K.get(ae.key);else for(q=N;q<=O;q++)if(mt[q-N]===0&&bt(ae,u[q])){Te=q;break}Te===void 0?Se(ae,g,m,!0):(mt[Te-N]=_+1,Te>=Ce?Ce=Te:we=!0,P(ae,u[Te],h,null,g,m,x,v,y),Z++)}const tn=we?Mo(mt):ct;for(q=tn.length-1,_=ee-1;_>=0;_--){const ae=N+_,Te=u[ae],sn=u[ae+1],nn=ae+1<E?sn.el||Ni(sn):b;mt[_]===0?P(null,Te,h,nn,g,m,x,v,y):we&&(q<0||_!==tn[q]?Xe(Te,h,nn,2):q--)}}},Xe=(c,u,h,b,g=null)=>{const{el:m,type:x,transition:v,children:y,shapeFlag:_}=c;if(_&6){Xe(c.component.subTree,u,h,b);return}if(_&128){c.suspense.move(u,h,b);return}if(_&64){x.move(c,u,h,gt);return}if(x===pe){n(m,u,h);for(let S=0;S<y.length;S++)Xe(y[S],u,h,b);n(c.anchor,u,h);return}if(x===bs){$(c,u,h);return}if(b!==2&&_&1&&v)if(b===0)v.beforeEnter(m),n(m,u,h),ue(()=>v.enter(m),g);else{const{leave:S,delayLeave:O,afterLeave:A}=v,N=()=>{c.ctx.isUnmounted?i(m):n(m,u,h)},K=()=>{m._isLeaving&&m[qr](!0),S(m,()=>{N(),A&&A()})};O?O(m,N,K):K()}else n(m,u,h)},Se=(c,u,h,b=!1,g=!1)=>{const{type:m,props:x,ref:v,children:y,dynamicChildren:_,shapeFlag:E,patchFlag:S,dirs:O,cacheIndex:A,memo:N}=c;if(S===-2&&(g=!1),v!=null&&(Ve(),Tt(v,null,h,c,!0),Ke()),A!=null&&(u.renderCache[A]=void 0),E&256){u.ctx.deactivate(c);return}const K=E&1&&O,q=!Ot(c);let Z;if(q&&(Z=x&&x.onVnodeBeforeUnmount)&&Oe(Z,u,c),E&6)qi(c.component,h,b);else{if(E&128){c.suspense.unmount(h,b);return}K&&Ze(c,null,u,"beforeUnmount"),E&64?c.type.remove(c,u,h,gt,b):_&&!_.hasOnce&&(m!==pe||S>0&&S&64)?pt(_,u,h,!1,!0):(m===pe&&S&384||!g&&E&16)&&pt(y,u,h),b&&Zs(c)}const ee=N!=null&&A==null;(q&&(Z=x&&x.onVnodeUnmounted)||K||ee)&&ue(()=>{Z&&Oe(Z,u,c),K&&Ze(c,null,u,"unmounted"),ee&&(c.el=null)},h)},Zs=c=>{const{type:u,el:h,anchor:b,transition:g}=c;if(u===pe){Wi(h,b);return}if(u===bs){T(c);return}const m=()=>{i(h),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(c.shapeFlag&1&&g&&!g.persisted){const{leave:x,delayLeave:v}=g,y=()=>x(h,m);v?v(c.el,m,y):y()}else m()},Wi=(c,u)=>{let h;for(;c!==u;)h=w(c),i(c),c=h;i(u)},qi=(c,u,h)=>{const{bum:b,scope:g,job:m,subTree:x,um:v,m:y,a:_}=c;vn(y),vn(_),b&&Vt(b),g.stop(),m&&(m.flags|=8,Se(x,c,u,h)),v&&ue(v,u),ue(()=>{c.isUnmounted=!0},u)},pt=(c,u,h,b=!1,g=!1,m=0)=>{for(let x=m;x<c.length;x++)Se(c[x],u,h,b,g)},$t=c=>{if(c.shapeFlag&6)return $t(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const u=w(c.anchor||c.el),h=u&&u[kr];return h?w(h):u};let fs=!1;const en=(c,u,h)=>{let b;c==null?u._vnode&&(Se(u._vnode,null,null,!0),b=u._vnode.component):P(u._vnode||null,c,u,null,null,null,h),u._vnode=c,fs||(fs=!0,fn(b),di(),fs=!1)},gt={p:P,um:Se,m:Xe,r:Zs,mt:cs,mc:xe,pc:W,pbc:j,n:$t,o:e};return{render:en,hydrate:void 0,createApp:po(en)}}function _s({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function et({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ro(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ji(e,t,s=!1){const n=e.children,i=t.children;if(R(n)&&R(i))for(let r=0;r<n.length;r++){const o=n[r];let l=i[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[r]=$e(i[r]),l.el=o.el),!s&&l.patchFlag!==-2&&ji(o,l)),l.type===os&&(l.patchFlag===-1&&(l=i[r]=$e(l)),l.el=o.el),l.type===Ge&&!l.el&&(l.el=o.el)}}function Mo(e){const t=e.slice(),s=[0];let n,i,r,o,l;const f=e.length;for(n=0;n<f;n++){const d=e[n];if(d!==0){if(i=s[s.length-1],e[i]<d){t[n]=i,s.push(n);continue}for(r=0,o=s.length-1;r<o;)l=r+o>>1,e[s[l]]<d?r=l+1:o=l;d<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,o=s[r-1];r-- >0;)s[r]=o,o=t[o];return s}function Li(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Li(t)}function vn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ni(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ni(t.subTree):null}const $i=e=>e.__isSuspense;function Io(e,t){t&&t.pendingBranch?R(e)?t.effects.push(...e):t.effects.push(e):Nr(e)}const pe=Symbol.for("v-fgt"),os=Symbol.for("v-txt"),Ge=Symbol.for("v-cmt"),bs=Symbol.for("v-stc"),At=[];let de=null;function Ee(e=!1){At.push(de=e?null:[])}function Fo(){At.pop(),de=At[At.length-1]||null}let It=1;function xn(e,t=!1){It+=e,e<0&&de&&t&&(de.hasOnce=!0)}function Hi(e){return e.dynamicChildren=It>0?de||ct:null,Fo(),It>0&&de&&de.push(e),e}function Le(e,t,s,n,i,r){return Hi(J(e,t,s,n,i,r,!0))}function Do(e,t,s,n,i){return Hi(Ue(e,t,s,n,i,!0))}function Bi(e){return e?e.__v_isVNode===!0:!1}function bt(e,t){return e.type===t.type&&e.key===t.key}const Ui=({key:e})=>e??null,kt=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Q(e)||ie(e)||I(e)?{i:ge,r:e,k:t,f:!!s}:e:null);function J(e,t=null,s=null,n=0,i=null,r=e===pe?0:1,o=!1,l=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ui(t),ref:t&&kt(t),scopeId:pi,slotScopeIds:null,children:s,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:r,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ge};return l?(Xs(f,s),r&128&&e.normalize(f)):s&&(f.shapeFlag|=Q(s)?8:16),It>0&&!o&&de&&(f.patchFlag>0||r&6)&&f.patchFlag!==32&&de.push(f),f}const Ue=jo;function jo(e,t=null,s=null,n=0,i=null,r=!1){if((!e||e===ro)&&(e=Ge),Bi(e)){const l=ht(e,t,!0);return s&&Xs(l,s),It>0&&!r&&de&&(l.shapeFlag&6?de[de.indexOf(e)]=l:de.push(l)),l.patchFlag=-2,l}if(Jo(e)&&(e=e.__vccOpts),t){t=Lo(t);let{class:l,style:f}=t;l&&!Q(l)&&(t.class=$s(l)),U(f)&&(qs(f)&&!R(f)&&(f=se({},f)),t.style=Ns(f))}const o=Q(e)?1:$i(e)?128:Wr(e)?64:U(e)?4:I(e)?2:0;return J(e,t,s,n,i,o,r,!0)}function Lo(e){return e?qs(e)||Pi(e)?se({},e):e:null}function ht(e,t,s=!1,n=!1){const{props:i,ref:r,patchFlag:o,children:l,transition:f}=e,d=t?$o(i||{},t):i,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ui(d),ref:t&&t.ref?s&&r?R(r)?r.concat(kt(t)):[r,kt(t)]:kt(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==pe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ht(e.ssContent),ssFallback:e.ssFallback&&ht(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&n&&Gs(a,f.clone(a)),a}function No(e=" ",t=0){return Ue(os,null,e,t)}function yt(e="",t=!1){return t?(Ee(),Do(Ge,null,e)):Ue(Ge,null,e)}function Re(e){return e==null||typeof e=="boolean"?Ue(Ge):R(e)?Ue(pe,null,e.slice()):Bi(e)?$e(e):Ue(os,null,String(e))}function $e(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ht(e)}function Xs(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(R(t))s=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),Xs(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!Pi(t)?t._ctx=ge:i===3&&ge&&(ge.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else I(t)?(t={default:t,_ctx:ge},s=32):(t=String(t),n&64?(s=16,t=[No(t)]):s=8);e.children=t,e.shapeFlag|=s}function $o(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const i in n)if(i==="class")t.class!==n.class&&(t.class=$s([t.class,n.class]));else if(i==="style")t.style=Ns([t.style,n.style]);else if(Xt(i)){const r=t[i],o=n[i];o&&r!==o&&!(R(r)&&r.includes(o))?t[i]=r?[].concat(r,o):o:o==null&&r==null&&!Qt(i)&&(t[i]=o)}else i!==""&&(t[i]=n[i])}return t}function Oe(e,t,s,n=null){De(e,t,7,[s,n])}const Ho=Ci();let Bo=0;function Uo(e,t,s){const n=e.type,i=(t?t.appContext:e.appContext)||Ho,r={uid:Bo++,vnode:e,type:n,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ir(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Mi(n,i),emitsOptions:Ti(n,i),emit:null,emitted:null,propsDefaults:k,inheritAttrs:n.inheritAttrs,ctx:k,data:k,props:k,attrs:k,slots:k,refs:k,setupState:k,setupContext:null,suspense:s,suspenseId:s?s.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 r.ctx={_:r},r.root=t?t.root:r,r.emit=mo.bind(null,r),e.ce&&e.ce(r),r}let fe=null;const Vo=()=>fe||ge;let zt,Ms;{const e=es(),t=(s,n)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(n),r=>{i.length>1?i.forEach(o=>o(r)):i[0](r)}};zt=t("__VUE_INSTANCE_SETTERS__",s=>fe=s),Ms=t("__VUE_SSR_SETTERS__",s=>Ft=s)}const Lt=e=>{const t=fe;return zt(e),e.scope.on(),()=>{e.scope.off(),zt(t)}},Sn=()=>{fe&&fe.scope.off(),zt(null)};function Vi(e){return e.vnode.shapeFlag&4}let Ft=!1;function Ko(e,t=!1,s=!1){t&&Ms(t);const{props:n,children:i}=e.vnode,r=Vi(e);So(e,n,r,t),Oo(e,i,s||t);const o=r?ko(e,t):void 0;return t&&Ms(!1),o}function ko(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,oo);const{setup:n}=s;if(n){Ve();const i=e.setupContext=n.length>1?qo(e):null,r=Lt(e),o=jt(n,e,0,[e.props,i]),l=Un(o);if(Ke(),r(),(l||e.sp)&&!Ot(e)&&_i(e),l){if(o.then(Sn,Sn),t)return o.then(f=>{wn(e,f)}).catch(f=>{ns(f,e,0)});e.asyncDep=o}else wn(e,o)}else Ki(e)}function wn(e,t,s){I(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:U(t)&&(e.setupState=fi(t)),Ki(e)}function Ki(e,t,s){const n=e.type;e.render||(e.render=n.render||Ie);{const i=Lt(e);Ve();try{lo(e)}finally{Ke(),i()}}}const Wo={get(e,t){return ne(e,"get",""),e[t]}};function qo(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Wo),slots:e.slots,emit:e.emit,expose:t}}function ls(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(fi(Tr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Et)return Et[s](e)},has(t,s){return s in t||s in Et}})):e.proxy}function Jo(e){return I(e)&&"__vccOpts"in e}const Go=(e,t)=>Mr(e,t,Ft),Yo="3.5.34";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.34
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let Is;const Cn=typeof window<"u"&&window.trustedTypes;if(Cn)try{Is=Cn.createPolicy("vue",{createHTML:e=>e})}catch{}const ki=Is?e=>Is.createHTML(e):e=>e,zo="http://www.w3.org/2000/svg",Xo="http://www.w3.org/1998/Math/MathML",Ne=typeof document<"u"?document:null,Tn=Ne&&Ne.createElement("template"),Qo={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const i=t==="svg"?Ne.createElementNS(zo,e):t==="mathml"?Ne.createElementNS(Xo,e):s?Ne.createElement(e,{is:s}):Ne.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Ne.createTextNode(e),createComment:e=>Ne.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ne.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,r){const o=s?s.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===r||!(i=i.nextSibling)););else{Tn.innerHTML=ki(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=Tn.content;if(n==="svg"||n==="mathml"){const f=l.firstChild;for(;f.firstChild;)l.appendChild(f.firstChild);l.removeChild(f)}t.insertBefore(l,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Zo=Symbol("_vtc");function el(e,t,s){const n=e[Zo];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const On=Symbol("_vod"),tl=Symbol("_vsh"),sl=Symbol(""),nl=/(?:^|;)\s*display\s*:/;function il(e,t,s){const n=e.style,i=Q(s);let r=!1;if(s&&!i){if(t)if(Q(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();s[l]==null&&xt(n,l,"")}else for(const o in t)s[o]==null&&xt(n,o,"");for(const o in s){o==="display"&&(r=!0);const l=s[o];l!=null?ol(e,o,!Q(t)&&t?t[o]:void 0,l)||xt(n,o,l):xt(n,o,"")}}else if(i){if(t!==s){const o=n[sl];o&&(s+=";"+o),n.cssText=s,r=nl.test(s)}}else t&&e.removeAttribute("style");On in e&&(e[On]=r?n.display:"",e[tl]&&(n.display="none"))}const En=/\s*!important$/;function xt(e,t,s){if(R(s))s.forEach(n=>xt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=rl(e,t);En.test(s)?e.setProperty(it(n),s.replace(En,""),"important"):e[n]=s}}const An=["Webkit","Moz","ms"],ys={};function rl(e,t){const s=ys[t];if(s)return s;let n=_e(t);if(n!=="filter"&&n in e)return ys[t]=n;n=kn(n);for(let i=0;i<An.length;i++){const r=An[i]+n;if(r in e)return ys[t]=r}return t}function ol(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Q(n)&&s===n}const Pn="http://www.w3.org/1999/xlink";function Rn(e,t,s,n,i,r=sr(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Pn,t.slice(6,t.length)):e.setAttributeNS(Pn,t,s):s==null||r&&!qn(s)?e.removeAttribute(t):e.setAttribute(t,r?"":Fe(s)?String(s):s)}function Mn(e,t,s,n,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?ki(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,f=s==null?e.type==="checkbox"?"on":"":String(s);(l!==f||!("_value"in e))&&(e.value=f),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=qn(s):s==null&&l==="string"?(s="",o=!0):l==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(i||t)}function lt(e,t,s,n){e.addEventListener(t,s,n)}function ll(e,t,s,n){e.removeEventListener(t,s,n)}const In=Symbol("_vei");function cl(e,t,s,n,i=null){const r=e[In]||(e[In]={}),o=r[t];if(n&&o)o.value=n;else{const[l,f]=fl(t);if(n){const d=r[t]=dl(n,i);lt(e,l,d,f)}else o&&(ll(e,l,o,f),r[t]=void 0)}}const Fn=/(?:Once|Passive|Capture)$/;function fl(e){let t;if(Fn.test(e)){t={};let n;for(;n=e.match(Fn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):it(e.slice(2)),t]}let vs=0;const ul=Promise.resolve(),al=()=>vs||(ul.then(()=>vs=0),vs=Date.now());function dl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;De(hl(n,s.value),t,5,[n])};return s.value=e,s.attached=al(),s}function hl(e,t){if(R(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>i=>!i._stopped&&n&&n(i))}else return t}const Dn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,pl=(e,t,s,n,i,r)=>{const o=i==="svg";t==="class"?el(e,n,o):t==="style"?il(e,s,n):Xt(t)?Qt(t)||cl(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):gl(e,t,n,o))?(Mn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Rn(e,t,n,o,r,t!=="value")):e._isVueCE&&(ml(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Q(n)))?Mn(e,_e(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Rn(e,t,n,o))};function gl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Dn(t)&&I(s));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"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Dn(t)&&Q(s)?!1:t in e}function ml(e,t){const s=e._def.props;if(!s)return!1;const n=_e(t);return Array.isArray(s)?s.some(i=>_e(i)===n):Object.keys(s).some(i=>_e(i)===n)}const jn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return R(t)?s=>Vt(t,s):t};function _l(e){e.target.composing=!0}function Ln(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const xs=Symbol("_assign");function Nn(e,t,s){return t&&(e=e.trim()),s&&(e=Ls(e)),e}const bl={created(e,{modifiers:{lazy:t,trim:s,number:n}},i){e[xs]=jn(i);const r=n||i.props&&i.props.type==="number";lt(e,t?"change":"input",o=>{o.target.composing||e[xs](Nn(e.value,s,r))}),(s||r)&<(e,"change",()=>{e.value=Nn(e.value,s,r)}),t||(lt(e,"compositionstart",_l),lt(e,"compositionend",Ln),lt(e,"change",Ln))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:i,number:r}},o){if(e[xs]=jn(o),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?Ls(e.value):e.value,f=t??"";if(l===f)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(n&&t===s||i&&e.value.trim()===f)||(e.value=f)}},yl=se({patchProp:pl},Qo);let $n;function vl(){return $n||($n=Ao(yl))}const xl=(...e)=>{const t=vl().createApp(...e),{mount:s}=t;return t.mount=n=>{const i=wl(n);if(!i)return;const r=t._component;!I(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const o=s(i,!1,Sl(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t};function Sl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function wl(e){return Q(e)?document.querySelector(e):e}const Cl={class:"app-header"},Tl=["aria-label"],Ol={class:"app-main"},El={class:"group","aria-labelledby":"group-project"},Al={class:"check",style:{"flex-direction":"column","align-items":"stretch"}},Pl=["aria-labelledby"],Rl=["id"],Ml={class:"group-list"},Il={class:"check"},Fl=["checked","disabled","onChange"],Dl={key:0,class:"required-tag"},jl={class:"app-footer"},Ll={class:"actions"},Nl=["disabled"],$l=["disabled"],Hl=["disabled"],Bl=["disabled"],Ul={key:0,class:"preview"},Vl={key:1,class:"build-status"},Kl={class:"build-state"},kl={key:0,class:"preview"},Wl={key:1,class:"preview"},ql=Jr({__name:"App",setup(e){const t=Qe("light");function s(F){t.value=F,document.documentElement.dataset.theme=F,localStorage.setItem("waelio-theme",F)}function n(){s(t.value==="light"?"dark":"light")}const i=[{key:"pages",title:"Pages",required:["Contact","Privacy","Terms & Conditions","Login"],items:["Home","About","Services","Pricing","Contact","FAQ","Blog","Catalog","Product Detail","Cart","Checkout","Account","Dashboard","Booking","Practitioners","Docs","Login","Privacy","Terms & Conditions"]},{key:"features",title:"Features",required:["SEO","Authentication","Publishing","Brand Assets","CASL Permissions","Local Database","NativeScript Ready"],items:["SEO","Analytics","Authentication","Billing","Search","Booking","Notifications","Customer Portal","Lead Capture","Case Studies","Blog","Payments","Customer Accounts","Knowledge Base","Admin Dashboard","Content Management","Publishing","Brand Assets","CASL Permissions","Local Database","NativeScript Ready"]},{key:"integrations",title:"Integrations",items:["Stripe","CRM","Email & SMS","Analytics"]},{key:"locales",title:"Locales",items:["en","ar","de","es","fr","he","id","it","ru","sv","tr","zh"]},{key:"roles",title:"Roles",items:["Admin","Editor","Operations","Support","Sales","Reception","Dentist","Hygienist"]},{key:"brandTones",title:"Brand tone",items:["Trustworthy","Bold","Premium","Friendly"]},{key:"visualStyles",title:"Visual style",items:["Premium Editorial","Friendly Clinical"]},{key:"contentModels",title:"Content model",items:["Service pages + blog","Catalog + editorial"]},{key:"seoFocuses",title:"SEO focus",items:["Local + service intent","Transactional intent"]}],r=ss(Object.fromEntries(i.map(F=>[F.key,new Set(F.required??[])])));function o(F,j){const D=r[F];D&&(D.has(j)?D.delete(j):D.add(j))}function l(F,j){var D;return((D=F.required)==null?void 0:D.includes(j))??!1}function f(F,j){var D;return((D=r[F])==null?void 0:D.has(j))??!1}const d=Qe(""),a=Qe(!1),p=Qe("");function w(F){return F.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"site"}const C={pages:"selectedPages",features:"selectedFeatures",integrations:"selectedIntegrations",locales:"selectedLocales",roles:"selectedRoles",brandTones:"selectedBrandTones",visualStyles:"selectedVisualStyles",contentModels:"selectedContentModels",seoFocuses:"selectedSEOFocuses"};function L(){const F={};for(const re of i){const Ye=C[re.key]??re.key;F[Ye]=Array.from(r[re.key]??[])}const j=p.value.trim(),D={$schema:"https://waelio.dev/schemas/blueprint/v1.json",generator:{name:"waelio-cli",version:"0.1.2",url:"https://github.com/waelio/cli"},id:crypto.randomUUID(),createdAt:new Date().toISOString(),projectName:j||"Siteforge Project",slug:w(j||"Siteforge Project"),selections:F};d.value=JSON.stringify(D,null,2),a.value=!1}function P(){d.value||L(),a.value=!0}function X(){d.value||L();const F=new Blob([d.value],{type:"application/json"}),j=URL.createObjectURL(F),D=document.createElement("a");D.href=j,D.download="blueprint.json",D.click(),URL.revokeObjectURL(j)}const V="/api/scaffold",M=Qe("idle"),$=Qe([]),T=Qe("");function Y(F){$.value.push(`[${new Date().toLocaleTimeString()}] ${F}`)}async function ve(){if(!p.value.trim()){Y("error: project name is required"),M.value="error";return}L(),$.value=[],T.value="",M.value="sending",Y(`POST ${V}`);try{const F=await fetch(V,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({blueprint:JSON.parse(d.value)})});if(!F.ok){const D=await F.text();Y(`error: ${F.status} ${D}`),M.value="error";return}const j=await F.json();T.value=JSON.stringify(j,null,2),M.value="done",Y(`scaffolded "${j.slug}" at ${j.outDir}`)}catch(F){Y(`network error: ${F.message}`),M.value="error"}}function he(){if(!T.value)return;const F=new Blob([T.value],{type:"application/json"}),j=URL.createObjectURL(F),D=document.createElement("a");D.href=j,D.download="siteforge-package.json",D.click(),URL.revokeObjectURL(j)}function xe(){for(const F of i)r[F.key]=new Set(F.required??[]);p.value="",d.value="",a.value=!1,$.value=[],T.value="",M.value="idle"}return vi(()=>{const F=localStorage.getItem("waelio-theme"),j=window.matchMedia("(prefers-color-scheme: dark)").matches;s(F??(j?"dark":"light"))}),(F,j)=>(Ee(),Le(pe,null,[J("header",Cl,[j[1]||(j[1]=J("h1",{class:"app-title"},"waelio/cli",-1)),J("button",{type:"button",class:"theme-toggle","aria-label":t.value==="light"?"Switch to dark mode":"Switch to light mode",onClick:n},qe(t.value==="light"?"Dark":"Light"),9,Tl)]),J("main",Ol,[J("section",El,[j[3]||(j[3]=J("h2",{id:"group-project",class:"group-title"},"Project",-1)),J("label",Al,[j[2]||(j[2]=J("span",null,"Name",-1)),Hr(J("input",{"onUpdate:modelValue":j[0]||(j[0]=D=>p.value=D),type:"text",placeholder:"Acme Dental",autocomplete:"off",style:{"margin-top":"0.4rem",padding:"0.4rem 0.6rem",border:"1px solid var(--fg)","border-radius":"0.375rem",background:"transparent",color:"var(--fg)",font:"inherit"}},null,512),[[bl,p.value]])])]),(Ee(),Le(pe,null,dn(i,D=>J("section",{key:D.key,class:"group","aria-labelledby":`group-${D.key}`},[J("h2",{id:`group-${D.key}`,class:"group-title"},qe(D.title),9,Rl),J("ul",Ml,[(Ee(!0),Le(pe,null,dn(D.items,re=>(Ee(),Le("li",{key:re},[J("label",Il,[J("input",{type:"checkbox",checked:f(D.key,re),disabled:l(D,re),onChange:Ye=>o(D.key,re)},null,40,Fl),J("span",null,qe(re),1),l(D,re)?(Ee(),Le("span",Dl," required ")):yt("",!0)])]))),128))])],8,Pl)),64))]),J("footer",jl,[J("div",Ll,[J("button",{type:"button",class:"btn",onClick:L}," Generate "),J("button",{type:"button",class:"btn",onClick:xe},"Reset"),J("button",{type:"button",class:"btn",disabled:!d.value,onClick:P}," View ",8,Nl),J("button",{type:"button",class:"btn",disabled:!d.value,onClick:X}," Download ",8,$l),J("button",{type:"button",class:"btn",disabled:!p.value.trim()||M.value==="connecting"||M.value==="sending"||M.value==="running",onClick:ve}," Build ",8,Hl),J("button",{type:"button",class:"btn",disabled:!T.value,onClick:he}," Download package ",8,Bl)]),a.value&&d.value?(Ee(),Le("pre",Ul,qe(d.value),1)):yt("",!0),M.value!=="idle"?(Ee(),Le("section",Vl,[J("p",Kl,"Build: "+qe(M.value),1),$.value.length?(Ee(),Le("pre",kl,qe($.value.join(`
|
|
18
|
+
`)),1)):yt("",!0),T.value?(Ee(),Le("pre",Wl,qe(T.value),1)):yt("",!0)])):yt("",!0)])],64))}}),Jl=(e,t)=>{const s=e.__vccOpts||e;for(const[n,i]of t)s[n]=i;return s},Gl=Jl(ql,[["__scopeId","data-v-6d55a98d"]]);xl(Gl).mount("#app");
|
package/ui/dist/index.html
CHANGED
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
sans-serif;
|
|
36
36
|
}
|
|
37
37
|
</style>
|
|
38
|
-
<script type="module" crossorigin src="/assets/index-
|
|
39
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
38
|
+
<script type="module" crossorigin src="/assets/index-Cde-X4PD.js"></script>
|
|
39
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C3Eg0a_I.css">
|
|
40
40
|
</head>
|
|
41
41
|
<body>
|
|
42
42
|
<div id="app"></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/localRepos.test.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
3
|
-
import os from "node:os";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import test from "node:test";
|
|
6
|
-
import { createLocalRepositoryId, listLocalRepositoryDirectory, sanitizeRepositoryRelativePath, scanLocalRepositories, } from "./localRepos.js";
|
|
7
|
-
test("scanLocalRepositories returns top-level local repositories only", async () => {
|
|
8
|
-
const root = await mkdtemp(path.join(os.tmpdir(), "waelio-local-repos-"));
|
|
9
|
-
try {
|
|
10
|
-
await mkdir(path.join(root, "waelio", "cli", ".git"), { recursive: true });
|
|
11
|
-
await mkdir(path.join(root, "waelio", "siteforge", ".git"), { recursive: true });
|
|
12
|
-
await mkdir(path.join(root, "waelio", "siteforge", ".build", "checkouts", "nested", ".git"), {
|
|
13
|
-
recursive: true,
|
|
14
|
-
});
|
|
15
|
-
await mkdir(path.join(root, "peace2074", "peace2074.com", ".git"), { recursive: true });
|
|
16
|
-
const snapshot = await scanLocalRepositories(root);
|
|
17
|
-
assert.deepEqual(snapshot.repositories.map((repository) => repository.relativePath), ["peace2074/peace2074.com", "waelio/cli", "waelio/siteforge"]);
|
|
18
|
-
}
|
|
19
|
-
finally {
|
|
20
|
-
await rm(root, { recursive: true, force: true });
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
test("listLocalRepositoryDirectory returns sanitized directory entries", async () => {
|
|
24
|
-
const root = await mkdtemp(path.join(os.tmpdir(), "waelio-local-repos-"));
|
|
25
|
-
try {
|
|
26
|
-
const repositoryRoot = path.join(root, "waelio", "cli");
|
|
27
|
-
await mkdir(path.join(repositoryRoot, ".git"), { recursive: true });
|
|
28
|
-
await mkdir(path.join(repositoryRoot, "src"), { recursive: true });
|
|
29
|
-
await writeFile(path.join(repositoryRoot, "README.md"), "# demo\n");
|
|
30
|
-
await writeFile(path.join(repositoryRoot, "src", "index.ts"), "export {};\n");
|
|
31
|
-
const snapshot = await scanLocalRepositories(root);
|
|
32
|
-
const repository = snapshot.repositories[0];
|
|
33
|
-
assert.ok(repository);
|
|
34
|
-
assert.equal(repository?.id, createLocalRepositoryId("waelio/cli"));
|
|
35
|
-
const rootListing = await listLocalRepositoryDirectory(snapshot, repository.id);
|
|
36
|
-
assert.equal(rootListing.entries[0]?.name, "src");
|
|
37
|
-
assert.equal(rootListing.entries[1]?.name, "README.md");
|
|
38
|
-
const nestedListing = await listLocalRepositoryDirectory(snapshot, repository.id, "src");
|
|
39
|
-
assert.equal(nestedListing.requestedPath, "src");
|
|
40
|
-
assert.equal(nestedListing.entries[0]?.relativePath, "src/index.ts");
|
|
41
|
-
await assert.rejects(() => listLocalRepositoryDirectory(snapshot, repository.id, "../outside"), /Invalid path outside repository/);
|
|
42
|
-
}
|
|
43
|
-
finally {
|
|
44
|
-
await rm(root, { recursive: true, force: true });
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
test("sanitizeRepositoryRelativePath normalizes safe paths", () => {
|
|
48
|
-
assert.equal(sanitizeRepositoryRelativePath("src/components"), "src/components");
|
|
49
|
-
assert.equal(sanitizeRepositoryRelativePath("./src/../src/views"), "src/views");
|
|
50
|
-
assert.equal(sanitizeRepositoryRelativePath(""), "");
|
|
51
|
-
});
|
package/dist/siteforge.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/siteforge.test.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import test from "node:test";
|
|
3
|
-
import { DEFAULT_SITEFORGE_REPO, createBuildPlan, formatBuildPlan, formatDoctorReport } from "./siteforge.js";
|
|
4
|
-
test("createBuildPlan clones and builds when no source path is provided", () => {
|
|
5
|
-
const plan = createBuildPlan({
|
|
6
|
-
repoUrl: DEFAULT_SITEFORGE_REPO,
|
|
7
|
-
projectDir: "/tmp/siteforge-build",
|
|
8
|
-
});
|
|
9
|
-
assert.equal(plan.projectDir, "/tmp/siteforge-build");
|
|
10
|
-
assert.equal(plan.usesExistingSource, false);
|
|
11
|
-
assert.deepEqual(plan.requiredTools, ["npm", "go", "git"]);
|
|
12
|
-
assert.equal(plan.steps.length, 3);
|
|
13
|
-
assert.equal(plan.steps[0]?.command, "git");
|
|
14
|
-
assert.deepEqual(plan.steps[0]?.args, ["clone", DEFAULT_SITEFORGE_REPO, "/tmp/siteforge-build"]);
|
|
15
|
-
assert.equal(plan.steps[1]?.command, "npm");
|
|
16
|
-
assert.deepEqual(plan.steps[1]?.args, ["ci"]);
|
|
17
|
-
assert.equal(plan.steps[2]?.command, "npm");
|
|
18
|
-
assert.deepEqual(plan.steps[2]?.args, ["run", "build"]);
|
|
19
|
-
});
|
|
20
|
-
test("createBuildPlan skips clone when a source path is provided", () => {
|
|
21
|
-
const plan = createBuildPlan({
|
|
22
|
-
repoUrl: DEFAULT_SITEFORGE_REPO,
|
|
23
|
-
source: "../siteforge",
|
|
24
|
-
ref: "main",
|
|
25
|
-
projectDir: "/tmp/existing-siteforge",
|
|
26
|
-
});
|
|
27
|
-
assert.equal(plan.usesExistingSource, true);
|
|
28
|
-
assert.equal(plan.steps.length, 3);
|
|
29
|
-
assert.equal(plan.steps[0]?.command, "git");
|
|
30
|
-
assert.deepEqual(plan.steps[0]?.args, ["checkout", "main"]);
|
|
31
|
-
assert.equal(plan.steps[0]?.cwd, "/tmp/existing-siteforge");
|
|
32
|
-
assert.deepEqual(plan.steps[1]?.args, ["ci"]);
|
|
33
|
-
assert.deepEqual(plan.steps[2]?.args, ["run", "build"]);
|
|
34
|
-
});
|
|
35
|
-
test("formatBuildPlan renders the planned steps", () => {
|
|
36
|
-
const plan = createBuildPlan({
|
|
37
|
-
repoUrl: DEFAULT_SITEFORGE_REPO,
|
|
38
|
-
projectDir: "/tmp/siteforge-build",
|
|
39
|
-
});
|
|
40
|
-
const output = formatBuildPlan(plan);
|
|
41
|
-
assert.match(output, /Repository directory: \/tmp\/siteforge-build/);
|
|
42
|
-
assert.match(output, /1\. Clone siteforge/);
|
|
43
|
-
assert.match(output, /2\. Install dependencies/);
|
|
44
|
-
assert.match(output, /3\. Build website/);
|
|
45
|
-
});
|
|
46
|
-
test("formatDoctorReport renders success and failure rows", () => {
|
|
47
|
-
const output = formatDoctorReport([
|
|
48
|
-
{ tool: "git", ok: true, details: "git version 2.x" },
|
|
49
|
-
{ tool: "go", ok: false, details: "Command not found: go" },
|
|
50
|
-
]);
|
|
51
|
-
assert.match(output, /✔ git: git version 2\.x/);
|
|
52
|
-
assert.match(output, /✘ go: Command not found: go/);
|
|
53
|
-
});
|