@deot/docs-client 1.1.9 → 1.1.10

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.
@@ -3,7 +3,7 @@ var e = globalThis.process || {
3
3
  nextTick: queueMicrotask
4
4
  };
5
5
  import { n as t, r as n } from "./rolldown-runtime-Ce3zPWPd.js";
6
- import { A as r, C as i, E as a, c as o, g as s, l as c, m as l, p as u, s as d } from "./css-C25yWQa_-B6uwKgDA.js";
6
+ import { A as r, C as i, E as a, c as o, g as s, l as c, m as l, p as u, s as d } from "./css-D47JLekg-B8Z2QI1W.js";
7
7
  //#region node_modules/.pnpm/immutable@5.1.9/node_modules/immutable/dist/immutable.es.js
8
8
  var f = /* @__PURE__ */ t({
9
9
  Collection: () => b,
@@ -78580,7 +78580,7 @@ Ci.load({ immutable: f }, $), $.compile, $.compileAsync;
78580
78580
  var wi = $.compileString;
78581
78581
  $.compileStringAsync, $.initCompiler, $.initAsyncCompiler, $.Compiler, $.AsyncCompiler, $.Logger, $.SassArgumentList, $.SassBoolean, $.SassCalculation, $.CalculationOperation, $.CalculationInterpolation, $.SassColor, $.SassFunction, $.SassList, $.SassMap, $.SassMixin, $.SassModule, $.SassNumber, $.SassString, $.Value, $.CustomFunction, $.ListSeparator, $.sassFalse, $.sassNull, $.sassTrue, $.Exception, $.PromiseOr, $.info, $.render, $.renderSync, $.TRUE, $.FALSE, $.NULL, $.types, $.NodePackageImporter, $.deprecations, $.Version, $.parser_;
78582
78582
  //#endregion
78583
- //#region packages/playground/dist/compile-BHlM2G35.js
78583
+ //#region packages/playground/dist/compile-no-AB7-B.js
78584
78584
  var Ti = { compileString(e, t) {
78585
78585
  return { css: wi(e, t).css };
78586
78586
  } }, Ei = (e) => {
@@ -14776,12 +14776,12 @@ function Cc(e, t) {
14776
14776
  };
14777
14777
  }
14778
14778
  //#endregion
14779
- //#region packages/playground/dist/css-C25yWQa_.js
14780
- var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lang=\"ts\"><\/script>\n\n<template>\n <div>\n <slot />\n </div>\n</template>\n", Dc = [
14779
+ //#region packages/playground/dist/css-D47JLekg.js
14780
+ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lang=\"ts\"><\/script>\n\n<template>\n <div>\n <slot />\n </div>\n</template>\n", Dc = /^@deot\/docs-(?:client|locale|markdown|playground|renderer|theme)$/u, Oc = [
14781
14781
  "@deot/style/dist/index.normalize-only.css",
14782
14782
  "@deot/vc-components/dist/index.style.css",
14783
14783
  "@deot/style/dist/index.css"
14784
- ], Oc = {
14784
+ ], kc = {
14785
14785
  "@deot/vc": "@deot/vc/dist/index.js",
14786
14786
  "@deot/vc-shared": "@deot/vc-shared/dist/index.js",
14787
14787
  "@deot/vc-hooks": "@deot/vc-hooks/dist/index.js",
@@ -14807,10 +14807,10 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
14807
14807
  "photoswipe/lightbox": "photoswipe/dist/photoswipe-lightbox.esm.js",
14808
14808
  vue: "vue/dist/vue.runtime.esm-browser.js",
14809
14809
  "vue/server-renderer": "vue/dist/server-renderer.esm-browser.js"
14810
- }, kc = (e = Tc) => e.trim().replace(/\/+$/u, "") || "https://cdn.jsdelivr.net/npm", Ac = (e, t) => `${e}/${t.replace(/^\/+/u, "")}`, jc = (e) => Ac(Tc, e), Mc = jc("sass/+esm"), Nc = (e, t) => Ac(kc(e), t), Pc = (e = Tc) => ({
14811
- ...Object.fromEntries(Object.entries(Oc).map(([t, n]) => [t, Nc(e, n)])),
14812
- "lodash-es": jc("lodash-es/+esm")
14813
- }), Fc = (e = Tc) => Object.fromEntries(Dc.map((t) => [t, Nc(e, t)])), Ic = (e) => /^https?:\/\//.test(e) ? e : jc(`${e}/+esm`), Lc = () => globalThis.window?.$docs || {}, Rc = (e) => {
14810
+ }, Ac = (e = Tc) => e.trim().replace(/\/+$/u, "") || "https://cdn.jsdelivr.net/npm", jc = (e, t) => `${e}/${t.replace(/^\/+/u, "")}`, Mc = (e) => jc(Tc, e), Nc = Mc("sass/+esm"), Pc = (e, t) => jc(Ac(e), t), Fc = (e = Tc) => ({
14811
+ ...Object.fromEntries(Object.entries(kc).map(([t, n]) => [t, Pc(e, n)])),
14812
+ "lodash-es": Mc("lodash-es/+esm")
14813
+ }), Ic = (e = Tc) => Object.fromEntries(Oc.map((t) => [t, Pc(e, t)])), Lc = (e) => /^https?:\/\//.test(e) ? e : Mc(`${e}/+esm`), Rc = () => globalThis.window?.$docs || {}, zc = (e) => {
14814
14814
  if (!/^https?:\/\//i.test(e)) return null;
14815
14815
  let t = new URL(e), n = /(?:^|\.)jsdelivr\.net$/u.test(t.hostname) && t.pathname.startsWith("/npm/") ? "/npm/" : /^(?:esm\.)?unpkg\.com$/u.test(t.hostname) ? "/" : null;
14816
14816
  if (!n) return null;
@@ -14821,76 +14821,76 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
14821
14821
  name: i[1].replace(/@[^/@]+$/u, ""),
14822
14822
  path: i[2]
14823
14823
  } : null;
14824
- }, zc = (e) => {
14825
- let t = Rc(e);
14826
- return t && (!t.path || t.path === "/+esm" || /^\/(?:es\d+|esnext)\/[^/]+\.m?js$/u.test(t.path)) ? t.name : null;
14827
- }, Bc = (e) => /\/\+esm(?:[?#]|$)/u.test(e) || Rc(e)?.url.hostname === "esm.unpkg.com", Vc = (e, t, n = Lc()) => {
14828
- let r = Rc(e), i = n.runtime?.cdn || t, a = e;
14824
+ }, Bc = (e) => {
14825
+ let t = zc(e);
14826
+ return t && (!t.path || t.path === "/+esm" || Dc.test(t.name) && t.path === "/dist/index.js" || /^\/(?:es\d+|esnext)\/[^/]+\.m?js$/u.test(t.path)) ? t.name : null;
14827
+ }, Vc = (e) => /\/\+esm(?:[?#]|$)/u.test(e) || zc(e)?.url.hostname === "esm.unpkg.com", Hc = (e, t, n = Rc()) => {
14828
+ let r = zc(e), i = n.runtime?.cdn || t, a = e;
14829
14829
  if (r && i) {
14830
- let e = kc(i), t = new URL(e).hostname === "esm.unpkg.com", n = r.asset;
14831
- t ? n = n.replace(/\/\+esm$/u, "") : !r.path.endsWith("/+esm") && (!r.path || !/\.[^/]+$/u.test(r.path) || /unpkg\.com$/u.test(r.url.hostname) && /\.[cm]?[jt]sx?$/u.test(r.path)) && (n = `${n.replace(/\/+$/u, "")}/+esm`), a = `${e}/${n}${r.url.search}${r.url.hash}`;
14830
+ let e = Ac(i), t = new URL(e).hostname === "esm.unpkg.com", n = r.asset;
14831
+ t ? (n = n.replace(/\/\+esm$/u, ""), Dc.test(r.name) && (!r.path || r.path === "/+esm") && (n += "/dist/index.js")) : !r.path.endsWith("/+esm") && (!r.path || !/\.[^/]+$/u.test(r.path) || /unpkg\.com$/u.test(r.url.hostname) && /\.[cm]?[jt]sx?$/u.test(r.path)) && (n = `${n.replace(/\/+$/u, "")}/+esm`), a = `${e}/${n}${r.url.search}${r.url.hash}`;
14832
14832
  }
14833
14833
  return n.resolve?.cdn?.({ url: a }) || a;
14834
- }, Hc = (e) => {
14834
+ }, Uc = (e) => {
14835
14835
  let t = /* @__PURE__ */ new Map();
14836
14836
  return (n) => {
14837
14837
  if (!t.has(n)) {
14838
- let r = Vc(n, e);
14838
+ let r = Hc(n, e);
14839
14839
  t.set(n, r), t.set(r, r);
14840
14840
  }
14841
14841
  return t.get(n);
14842
14842
  };
14843
- }, Uc = "docs-playground", Wc = [".scss", ".sass"], Gc = /<style\b[^>]*\blang\s*=\s*(['"]?)s[ac]ss\1/i, Kc = /\s*lang\s*=\s*(['"]?)s[ac]ss\1/i, qc = "[playground-sass]", Jc = "/* docs-playground-scss-start */", Yc = "/* docs-playground-scss-end */", Xc = /* @__PURE__ */ new WeakSet(), Zc = /* @__PURE__ */ new WeakSet(), Qc, $c, el = (e) => typeof e == "string" ? e : e.code, tl = (e) => decodeURIComponent(e.pathname.replace(/^\/+/u, "")), nl = (e) => new URL(`${Uc}:///${e.replace(/^\/+/u, "")}`), rl = (e) => e.split("/").pop() || e, il = (e, t) => t === "sass" || /\.sass$/i.test(e) ? "indented" : "scss", al = (e) => e instanceof Error ? e.message : String(e), ol = (e) => /\.s[ac]ss$/i.test(e), sl = (e) => Gc.test(e), cl = async (e) => {
14843
+ }, Wc = "docs-playground", Gc = [".scss", ".sass"], Kc = /<style\b[^>]*\blang\s*=\s*(['"]?)s[ac]ss\1/i, qc = /\s*lang\s*=\s*(['"]?)s[ac]ss\1/i, Jc = "[playground-sass]", Yc = "/* docs-playground-scss-start */", Xc = "/* docs-playground-scss-end */", Zc = /* @__PURE__ */ new WeakSet(), Qc = /* @__PURE__ */ new WeakSet(), $c, el, tl = (e) => typeof e == "string" ? e : e.code, nl = (e) => decodeURIComponent(e.pathname.replace(/^\/+/u, "")), rl = (e) => new URL(`${Wc}:///${e.replace(/^\/+/u, "")}`), il = (e) => e.split("/").pop() || e, al = (e, t) => t === "sass" || /\.sass$/i.test(e) ? "indented" : "scss", ol = (e) => e instanceof Error ? e.message : String(e), sl = (e) => /\.s[ac]ss$/i.test(e), cl = (e) => Kc.test(e), ll = async (e) => {
14844
14844
  let t = await import(
14845
14845
  /* @vite-ignore */
14846
14846
  e
14847
14847
  ), n = typeof t.compileString == "function" ? t : t.default;
14848
14848
  if (typeof n?.compileString != "function") throw Error(`Sass module at ${e} does not export compileString`);
14849
14849
  return n;
14850
- }, ll = () => ($c ??= cl(Vc(Mc)).then((e) => (Qc = e, e)), $c), ul = (e) => ol(e) && rl(e).startsWith("_"), dl = (e) => Object.entries(e).some(([e, t]) => ol(e) || /\.vue$/i.test(e) && sl(el(t))), fl = (e, t) => {
14851
- !dl(e) || Qc ? t() : ll().then(t);
14852
- }, pl = (e) => Object.fromEntries(Object.entries(e).map(([e, t]) => [e, el(t)])), ml = (e, t) => `${qc} ${e}: ${t}`, hl = (e, t) => ml(e, al(t)), gl = (e) => {
14853
- let t = rl(e);
14850
+ }, ul = () => (el ??= ll(Hc(Nc)).then((e) => ($c = e, e)), el), dl = (e) => sl(e) && il(e).startsWith("_"), fl = (e) => Object.entries(e).some(([e, t]) => sl(e) || /\.vue$/i.test(e) && cl(tl(t))), pl = (e, t) => {
14851
+ !fl(e) || $c ? t() : ul().then(t);
14852
+ }, ml = (e) => Object.fromEntries(Object.entries(e).map(([e, t]) => [e, tl(t)])), hl = (e, t) => `${Jc} ${e}: ${t}`, gl = (e, t) => hl(e, ol(t)), _l = (e) => {
14853
+ let t = il(e);
14854
14854
  return t.startsWith("_") ? e : `${e.slice(0, -t.length)}_${t}`;
14855
- }, _l = (e, t) => [
14855
+ }, vl = (e, t) => [
14856
14856
  t,
14857
14857
  t.startsWith("src/") ? t : `src/${t}`,
14858
14858
  t.replace(/^src\//u, "")
14859
- ].find((t) => e[t] !== void 0), vl = (e) => ol(e) ? [e, gl(e)] : Wc.flatMap((t) => [
14859
+ ].find((t) => e[t] !== void 0), yl = (e) => sl(e) ? [e, _l(e)] : Gc.flatMap((t) => [
14860
14860
  `${e}${t}`,
14861
- gl(`${e}${t}`),
14861
+ _l(`${e}${t}`),
14862
14862
  `${e}/index${t}`,
14863
- gl(`${e}/index${t}`)
14864
- ]), yl = (e, t) => {
14865
- let n = [...new Set(vl(t).map((t) => _l(e, t)).filter((e) => !!e))];
14863
+ _l(`${e}/index${t}`)
14864
+ ]), bl = (e, t) => {
14865
+ let n = [...new Set(yl(t).map((t) => vl(e, t)).filter((e) => !!e))];
14866
14866
  if (n.length > 1) throw Error(`Ambiguous Sass import "${t}": ${n.join(", ")}`);
14867
14867
  return n[0] ?? null;
14868
- }, bl = (e) => ({
14868
+ }, xl = (e) => ({
14869
14869
  canonicalize(t, n) {
14870
- if (/^[a-zA-Z][\w+.-]*:/u.test(t) && !t.startsWith(`${Uc}:`)) return null;
14870
+ if (/^[a-zA-Z][\w+.-]*:/u.test(t) && !t.startsWith(`${Wc}:`)) return null;
14871
14871
  try {
14872
- let r = yl(e(), tl(new URL(t, n.containingUrl ?? nl(""))));
14873
- return r ? nl(r) : null;
14872
+ let r = bl(e(), nl(new URL(t, n.containingUrl ?? rl(""))));
14873
+ return r ? rl(r) : null;
14874
14874
  } catch {
14875
14875
  return null;
14876
14876
  }
14877
14877
  },
14878
14878
  load(t) {
14879
- let n = e(), r = tl(t);
14879
+ let n = e(), r = nl(t);
14880
14880
  return n[r] === void 0 ? null : {
14881
14881
  contents: n[r],
14882
- syntax: il(r)
14882
+ syntax: al(r)
14883
14883
  };
14884
14884
  }
14885
- }), xl = (e, t, n, r, i) => {
14886
- let a = bl(() => r);
14885
+ }), Sl = (e, t, n, r, i) => {
14886
+ let a = xl(() => r);
14887
14887
  return n.compileString(e, {
14888
- syntax: il(t, i),
14889
- url: nl(t),
14888
+ syntax: al(t, i),
14889
+ url: rl(t),
14890
14890
  importer: a,
14891
14891
  importers: [a]
14892
14892
  }).css;
14893
- }, Sl = (e, t, n, r, i) => {
14893
+ }, Cl = (e, t, n, r, i) => {
14894
14894
  let a = n(e, { filename: t }).descriptor.styles.filter((e) => e.lang === "scss" || e.lang === "sass");
14895
14895
  if (!a.length) return {
14896
14896
  code: e,
@@ -14899,45 +14899,45 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
14899
14899
  let o = [], s = e;
14900
14900
  for (let e of [...a].sort((e, t) => t.loc.start.offset - e.loc.start.offset)) {
14901
14901
  let n = s.slice(0, e.loc.start.offset), a = s.slice(e.loc.end.offset), c = n.lastIndexOf("<style");
14902
- if (c < 0) o.push(ml(t, "unable to locate <style> opening tag"));
14902
+ if (c < 0) o.push(hl(t, "unable to locate <style> opening tag"));
14903
14903
  else try {
14904
- let o = xl(e.content, t, r, i, e.lang);
14905
- s = `${n.slice(0, c)}${n.slice(c).replace(Kc, "")}${o}${a}`;
14904
+ let o = Sl(e.content, t, r, i, e.lang);
14905
+ s = `${n.slice(0, c)}${n.slice(c).replace(qc, "")}${o}${a}`;
14906
14906
  } catch (e) {
14907
- o.push(hl(t, e));
14907
+ o.push(gl(t, e));
14908
14908
  }
14909
14909
  }
14910
14910
  return {
14911
14911
  code: s,
14912
14912
  errors: o
14913
14913
  };
14914
- }, Cl = (e, t) => t.length ? {
14914
+ }, wl = (e, t) => t.length ? {
14915
14915
  ...e,
14916
14916
  errors: [...e.errors, ...t.map((e) => Error(e))]
14917
- } : e, wl = (e, t) => {
14918
- if (Zc.has(e)) return e;
14917
+ } : e, Tl = (e, t) => {
14918
+ if (Qc.has(e)) return e;
14919
14919
  let n = e.parse.bind(e), r = { ...e };
14920
14920
  return r.parse = ((e, r) => {
14921
14921
  let i = r?.filename || "anonymous.vue";
14922
- if (!sl(e)) return n(e, r);
14923
- let a = Qc ? Sl(e, i, n, Qc, t()) : {
14922
+ if (!cl(e)) return n(e, r);
14923
+ let a = $c ? Cl(e, i, n, $c, t()) : {
14924
14924
  code: e,
14925
- errors: [ml(i, "compiler is not loaded")]
14925
+ errors: [hl(i, "compiler is not loaded")]
14926
14926
  };
14927
- return Cl(n(a.errors.length ? e : a.code, r), a.errors);
14928
- }), Zc.add(r), r;
14929
- }, Tl = (e, t) => {
14930
- let n = e.indexOf(Jc), r = n < 0 ? -1 : e.indexOf(Yc, n), i = (n < 0 ? e : `${e.slice(0, n)}${r >= 0 ? e.slice(r + 30) : ""}`).trimEnd();
14927
+ return wl(n(a.errors.length ? e : a.code, r), a.errors);
14928
+ }), Qc.add(r), r;
14929
+ }, El = (e, t) => {
14930
+ let n = e.indexOf(Yc), r = n < 0 ? -1 : e.indexOf(Xc, n), i = (n < 0 ? e : `${e.slice(0, n)}${r >= 0 ? e.slice(r + 30) : ""}`).trimEnd();
14931
14931
  if (!t.trim()) return i;
14932
- let a = `${Jc}\n${t.trim()}\n${Yc}`;
14932
+ let a = `${Yc}\n${t.trim()}\n${Xc}`;
14933
14933
  return i ? `${i}\n${a}` : a;
14934
- }, El = (e) => {
14935
- let t = al(e);
14936
- return t.startsWith(qc) && /\.s[ac]ss:/i.test(t);
14937
- }, Dl = (e, t) => {
14938
- let n = [...t, ...e.errors.filter((e) => !El(e))];
14939
- n.map(String).join("\0") !== e.errors.map(String).join("\0") && (e.errors = n);
14934
+ }, Dl = (e) => {
14935
+ let t = ol(e);
14936
+ return t.startsWith(Jc) && /\.s[ac]ss:/i.test(t);
14940
14937
  }, Ol = (e, t) => {
14938
+ let n = [...t, ...e.errors.filter((e) => !Dl(e))];
14939
+ n.map(String).join("\0") !== e.errors.map(String).join("\0") && (e.errors = n);
14940
+ }, kl = (e, t) => {
14941
14941
  let n = {};
14942
14942
  return /\.module\.(?:scss|sass)$/.test(t) && (e = e.replace(/:export\s*\{([^}]*)\}/g, (e, t) => {
14943
14943
  for (let e of t.split(";")) {
@@ -14949,79 +14949,79 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
14949
14949
  css: e,
14950
14950
  exports: n
14951
14951
  };
14952
- }, kl = (e, t = Qc) => {
14952
+ }, Al = (e, t = $c) => {
14953
14953
  if (!t) return [];
14954
- let n = pl(e.files), r = [], i = [];
14955
- for (let [a, o] of Object.entries(e.files)) if (ol(a) && o.compiled) try {
14956
- let { css: e, exports: r } = Ol(xl(o.code, a, t, n), a);
14957
- o.compiled.css = e, o.compiled.js = o.compiled.ssr = `export default ${JSON.stringify(r)};\n`, !ul(a) && e.trim() && i.push(e);
14954
+ let n = ml(e.files), r = [], i = [];
14955
+ for (let [a, o] of Object.entries(e.files)) if (sl(a) && o.compiled) try {
14956
+ let { css: e, exports: r } = kl(Sl(o.code, a, t, n), a);
14957
+ o.compiled.css = e, o.compiled.js = o.compiled.ssr = `export default ${JSON.stringify(r)};\n`, !dl(a) && e.trim() && i.push(e);
14958
14958
  } catch (e) {
14959
- r.push(hl(a, e));
14959
+ r.push(gl(a, e));
14960
14960
  }
14961
14961
  let a = e.files[e.mainFile];
14962
14962
  if (a?.compiled) {
14963
- let e = Tl(a.compiled.css || "", i.join("\n"));
14963
+ let e = El(a.compiled.css || "", i.join("\n"));
14964
14964
  e !== (a.compiled.css || "") && (a.compiled.css = e);
14965
14965
  }
14966
- return Dl(e, r), r;
14967
- }, Al = (e) => {
14968
- if (Xc.has(e)) return;
14969
- Xc.add(e);
14970
- let t = () => pl(e.files), r = () => {
14971
- typeof e.compiler?.parse == "function" && (e.compiler = wl(e.compiler, t));
14966
+ return Ol(e, r), r;
14967
+ }, jl = (e) => {
14968
+ if (Zc.has(e)) return;
14969
+ Zc.add(e);
14970
+ let t = () => ml(e.files), r = () => {
14971
+ typeof e.compiler?.parse == "function" && (e.compiler = Tl(e.compiler, t));
14972
14972
  };
14973
14973
  r(), n(() => e.compiler, r), n(() => [
14974
14974
  e.mainFile,
14975
14975
  e.files[e.mainFile]?.compiled?.css,
14976
14976
  e.errors.map(String).join("\0"),
14977
- Object.entries(e.files).filter(([e]) => ol(e)).map(([e, t]) => `${e}:${t.code}`).join("\n")
14977
+ Object.entries(e.files).filter(([e]) => sl(e)).map(([e, t]) => `${e}:${t.code}`).join("\n")
14978
14978
  ].join("\0"), () => {
14979
- Qc && kl(e);
14979
+ $c && Al(e);
14980
14980
  });
14981
14981
  let i = e.setFiles.bind(e);
14982
- e.setFiles = async (e, t) => (dl(e) && !Qc && await ll(), i(e, t));
14983
- }, jl = /* @__PURE__ */ new Set(["import-map.json", "tsconfig.json"]), $ = (e) => {
14982
+ e.setFiles = async (e, t) => (fl(e) && !$c && await ul(), i(e, t));
14983
+ }, Ml = /* @__PURE__ */ new Set(["import-map.json", "tsconfig.json"]), $ = (e) => {
14984
14984
  let t = String(e || "").replace(/\\/gu, "/").trim();
14985
14985
  if (!t) return "/";
14986
14986
  let n = (t.startsWith("/") ? t : `/${t}`).split("/"), r = [];
14987
14987
  for (let e of n) e && e !== "." && (e === ".." ? r.length && r.pop() : r.push(e));
14988
14988
  return `/${r.join("/")}`;
14989
- }, Ml = (e) => {
14989
+ }, Nl = (e) => {
14990
14990
  let t = $(e), n = t.lastIndexOf("/");
14991
14991
  return n <= 0 ? "/" : t.slice(0, n) || "/";
14992
- }, Nl = (e) => {
14992
+ }, Pl = (e) => {
14993
14993
  let t = $(e), n = t.lastIndexOf("/");
14994
14994
  return n === -1 ? t : t.slice(n + 1);
14995
- }, Pl = (e, t) => {
14995
+ }, Fl = (e, t) => {
14996
14996
  let n = String(t || "").replace(/\\/gu, "/");
14997
14997
  if (n.startsWith("/")) return $(n);
14998
14998
  let r = $(e);
14999
14999
  return $(`${r === "/" ? "" : r}/${n}`);
15000
- }, Fl = (e) => {
15001
- let t = Nl(e), n = t.lastIndexOf(".");
15000
+ }, Il = (e) => {
15001
+ let t = Pl(e), n = t.lastIndexOf(".");
15002
15002
  return n <= 0 ? "" : t.slice(n).toLowerCase();
15003
- }, Il = (e) => jl.has(Nl(e)), Ll = (e) => {
15003
+ }, Ll = (e) => Ml.has(Pl(e)), Rl = (e) => {
15004
15004
  let t = /* @__PURE__ */ new Map();
15005
15005
  return Object.entries(e || {}).forEach(([e, n]) => {
15006
15006
  let r = $(e);
15007
- Il(r) || t.set(r, n);
15007
+ Ll(r) || t.set(r, n);
15008
15008
  }), t;
15009
- }, Rl = (e, t) => {
15010
- let n = Ll(e);
15009
+ }, zl = (e, t) => {
15010
+ let n = Rl(e);
15011
15011
  if (!n.size) throw Error("[Playground] files 为空,无法确定入口");
15012
15012
  if (t) {
15013
15013
  let e = $(t);
15014
- if (Il(e)) throw Error(`[Playground] entry 不能是 ${Nl(e)}`);
15014
+ if (Ll(e)) throw Error(`[Playground] entry 不能是 ${Pl(e)}`);
15015
15015
  if (!n.has(e)) throw Error(`[Playground] entry 不在 files 中: ${t}`);
15016
15016
  return e;
15017
15017
  }
15018
15018
  for (let t of Object.keys(e || {})) {
15019
15019
  let e = $(t);
15020
- if (!Il(e) && n.has(e)) return e;
15020
+ if (!Ll(e) && n.has(e)) return e;
15021
15021
  }
15022
15022
  /* istanbul ignore next -- 忽略文件已在前面排除,正常 files 不会走到这里 */
15023
15023
  throw Error("[Playground] files 中没有可用的入口文件");
15024
- }, zl = [
15024
+ }, Bl = [
15025
15025
  ".vue",
15026
15026
  ".ts",
15027
15027
  ".js",
@@ -15031,20 +15031,20 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
15031
15031
  ".css",
15032
15032
  ".scss",
15033
15033
  ".sass"
15034
- ], Bl = (e, t, n) => {
15034
+ ], Vl = (e, t, n) => {
15035
15035
  if (!t || !(t === "." || t === ".." || t.startsWith("./") || t.startsWith("../") || t.startsWith("/"))) return null;
15036
- let r = Pl(Ml(e), t);
15036
+ let r = Fl(Nl(e), t);
15037
15037
  if (n.has(r)) return r;
15038
- for (let e of zl) {
15038
+ for (let e of Bl) {
15039
15039
  let t = `${r}${e}`;
15040
15040
  if (n.has(t)) return t;
15041
15041
  }
15042
- for (let e of zl) {
15042
+ for (let e of Bl) {
15043
15043
  let t = `${r}/index${e}`;
15044
15044
  if (n.has(t)) return t;
15045
15045
  }
15046
15046
  return null;
15047
- }, Vl = (e) => {
15047
+ }, Hl = (e) => {
15048
15048
  let t = e.map($);
15049
15049
  if (!t.length) return "/";
15050
15050
  let n = t.map((e) => e.split("/").filter(Boolean)), r = n[0], i = r.length;
@@ -15055,31 +15055,31 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
15055
15055
  }
15056
15056
  if (!i) return "/";
15057
15057
  let a = `/${r.slice(0, i).join("/")}`;
15058
- return t.some((e) => e === a) ? Ml(a) : a;
15059
- }, Hl = (e, t) => {
15058
+ return t.some((e) => e === a) ? Nl(a) : a;
15059
+ }, Ul = (e, t) => {
15060
15060
  let n = $(e), r = $(t);
15061
15061
  return r === "/" || n === r || n.startsWith(`${r}/`);
15062
- }, Ul = (e) => {
15062
+ }, Wl = (e) => {
15063
15063
  let t = [], n = String(e || "");
15064
15064
  for (let e of n.matchAll(/(?:\bfrom\s+|import\s*\(\s*|import\s+)['"]([^'"]+)['"]/gu)) e[1] && t.push(e[1]);
15065
15065
  return t;
15066
- }, Wl = (e) => e === "." || e === ".." || e.startsWith("./") || e.startsWith("../") || e.startsWith("/"), Gl = (e, t) => {
15067
- let n = Ll(e), r = [], i = /* @__PURE__ */ new Set(), a = (e) => {
15066
+ }, Gl = (e) => e === "." || e === ".." || e.startsWith("./") || e.startsWith("../") || e.startsWith("/"), Kl = (e, t) => {
15067
+ let n = Rl(e), r = [], i = /* @__PURE__ */ new Set(), a = (e) => {
15068
15068
  let t = $(e);
15069
- !i.has(t) && n.has(t) && (i.add(t), r.push(t), Ul(n.get(t) || "").forEach((e) => {
15070
- let r = Bl(t, e, n);
15069
+ !i.has(t) && n.has(t) && (i.add(t), r.push(t), Wl(n.get(t) || "").forEach((e) => {
15070
+ let r = Vl(t, e, n);
15071
15071
  r && a(r);
15072
15072
  }));
15073
15073
  };
15074
15074
  return a(t), r;
15075
- }, Kl = (e, t) => {
15076
- let n = Ll(e), r = [], i = /* @__PURE__ */ new Set();
15075
+ }, ql = (e, t) => {
15076
+ let n = Rl(e), r = [], i = /* @__PURE__ */ new Set();
15077
15077
  return t.forEach((e) => {
15078
- Ul(n.get($(e)) || "").forEach((e) => {
15079
- !e || Wl(e) || i.has(e) || /\.(?:css|scss|sass)(?:[?#]|$)/.test(e) || (i.add(e), r.push(e));
15078
+ Wl(n.get($(e)) || "").forEach((e) => {
15079
+ !e || Gl(e) || i.has(e) || /\.(?:css|scss|sass)(?:[?#]|$)/.test(e) || (i.add(e), r.push(e));
15080
15080
  });
15081
15081
  }), r;
15082
- }, { babelParse: ql, walkIdentifiers: Jl, MagicString: Yl } = r, Xl = (e) => {
15082
+ }, { babelParse: Jl, walkIdentifiers: Yl, MagicString: Xl } = r, Zl = (e) => {
15083
15083
  let t = [];
15084
15084
  for (let n of e.matchAll(/\b([\w-]+:[\w-]+)\s*=\s*\{/g)) {
15085
15085
  let r = 1, i = "", a = n.index + n[0].length, o = a;
@@ -15098,14 +15098,14 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
15098
15098
  }
15099
15099
  for (let n of t.reverse()) e = e.slice(0, n.start) + n.text + e.slice(n.end);
15100
15100
  return e;
15101
- }, Zl = (e) => {
15101
+ }, Ql = (e) => {
15102
15102
  let t = /* @__PURE__ */ new Set();
15103
15103
  for (let n of e.matchAll(/\bimport\s+type\s*\{([^}]+)\}\s*from\s*['"][^'"]+['"]/g)) for (let e of n[1].split(",")) t.add(e.trim().split(/\s+as\s+/).pop());
15104
15104
  return e.replace(/\bexport\s*\{([^}]+)\}(?!\s*from)/g, (e, n) => `export {${n.split(",").filter((e) => !t.has(e.trim().split(/\s+as\s+/)[0])).join(",")}}`);
15105
- }, Ql = (e, t) => {
15105
+ }, $l = (e, t) => {
15106
15106
  if (!e.includes("process") && !e.includes("import.meta")) return e;
15107
- let n = new Yl(e), r = !1;
15108
- if (Jl(ql(e, { sourceType: "module" }), (e, t, i) => {
15107
+ let n = new Xl(e), r = !1;
15108
+ if (Yl(Jl(e, { sourceType: "module" }), (e, t, i) => {
15109
15109
  e.name === "import" && t?.type === "MetaProperty" && (n.overwrite(t.start, t.end, "import_meta"), r = !0);
15110
15110
  let a = i[i.length - 2];
15111
15111
  e.name === "process" && t?.type === "MemberExpression" && t.object === e && !t.computed && t.property.type === "Identifier" && t.property.name === "env" && a?.type === "MemberExpression" && a.object === t && !a.computed && a.property.type === "Identifier" && a.property.name === "NODE_ENV" && n.overwrite(a.start, a.end, JSON.stringify("development"));
@@ -15120,12 +15120,12 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
15120
15120
  }
15121
15121
  };
15122
15122
  return `var import_meta = ${JSON.stringify(i)};\n${n}`;
15123
- }, $l = (e, t, n = {}) => {
15123
+ }, eu = (e, t, n = {}) => {
15124
15124
  let r = n.esm ? [] : ["imports"], i = n.typescript === !0 || n.typescript !== !1 && (t.endsWith(".ts") || t.endsWith(".tsx"));
15125
15125
  i && r.unshift("typescript"), n.jsx && r.unshift("jsx");
15126
15126
  try {
15127
- let a = i ? Zl(e) : e;
15128
- return `${Ql(Sc(n.jsx ? `import { h as __docs_h, Fragment as __docs_Fragment } from 'vue';\n${Xl(a)}` : a, {
15127
+ let a = i ? Ql(e) : e;
15128
+ return `${$l(Sc(n.jsx ? `import { h as __docs_h, Fragment as __docs_Fragment } from 'vue';\n${Zl(a)}` : a, {
15129
15129
  transforms: r,
15130
15130
  disableESTransforms: !0,
15131
15131
  production: !0,
@@ -15138,13 +15138,13 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
15138
15138
  let n = e instanceof Error ? e.message : String(e);
15139
15139
  throw Error(`[Playground] 脚本转换失败 ${t}: ${n}`, { cause: e });
15140
15140
  }
15141
- }, eu = (e) => {
15141
+ }, tu = (e) => {
15142
15142
  let t = [];
15143
15143
  return e.forEach((e) => {
15144
15144
  let n = String(e || "").trim();
15145
15145
  n && t.push(n);
15146
15146
  }), t;
15147
- }, tu = (e, t) => {
15147
+ }, nu = (e, t) => {
15148
15148
  /* istanbul ignore if -- 仅浏览器注入样式 */
15149
15149
  if (typeof document > "u") return null;
15150
15150
  document.querySelector(`style[data-playground-id="${e}"]`)?.remove();
@@ -15152,9 +15152,9 @@ var wc = "App.vue", Tc = "https://cdn.jsdelivr.net/npm", Ec = "<script setup lan
15152
15152
  if (!n) return null;
15153
15153
  let r = document.createElement("style");
15154
15154
  return r.setAttribute("data-playground-id", e), r.textContent = n, document.head.appendChild(r), r;
15155
- }, nu = (e) => {
15155
+ }, ru = (e) => {
15156
15156
  /* istanbul ignore if -- 仅浏览器注入样式 */
15157
15157
  typeof document < "u" && document.querySelector(`style[data-playground-id="${e}"]`)?.remove();
15158
15158
  };
15159
15159
  //#endregion
15160
- export { $l as A, $ as C, Bl as D, Rl as E, Sc as M, Ic as O, kc as S, Vc as T, tu as _, zc as a, Hl as b, Gl as c, Fc as d, Hc as f, Fl as g, Vl as h, Al as i, fl as j, Ql as k, xl as l, Ol as m, wc as n, Kl as o, Ll as p, Ec as r, eu as s, Tc as t, Pc as u, Bc as v, nu as w, Wl as x, Il as y };
15160
+ export { eu as A, $ as C, Vl as D, zl as E, Sc as M, Lc as O, Ac as S, Hc as T, nu as _, Bc as a, Ul as b, Kl as c, Ic as d, Uc as f, Il as g, Hl as h, jl as i, pl as j, $l as k, Sl as l, kl as m, wc as n, ql as o, Rl as p, Ec as r, tu as s, Tc as t, Fc as u, Vc as v, ru as w, Gl as x, Ll as y };