@webx-ui/module-blog 0.1.0 → 0.2.1

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/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { provide as mt, inject as ft, defineComponent as ee, computed as b, openBlock as p, createElementBlock as K, createVNode as n, unref as e, withCtx as a, createBlock as V, createTextVNode as g, toDisplayString as f, createCommentVNode as I, useModel as Be, mergeModels as Ne, ref as z, useTemplateRef as We, watch as oe, onMounted as Le, onBeforeUnmount as Fe, Fragment as ne, createElementVNode as q, renderList as ze, normalizeClass as Ae, nextTick as Ke, isRef as He, withKeys as Ce, createSlots as st, resolveDynamicComponent as tt, mergeProps as gt } from "vue";
2
- import { useAdmin as se, useTranslate as te, useDates as bt, useErrorText as me, WxBackButton as ht, WxScreen as yt, WxDate as De, WxListScreen as je, WxRowMenu as Ie } from "@webx-ui/module-admin";
3
- import { useLocales as Ge, WxFormItem as ge, WxText as G, WxAlert as Se, WxSelect as be, useElementWidth as rt, localizedValue as _t, confirm as pe, WxSkeleton as Ue, WxBreadcrumb as wt, WxBreadcrumbItem as at, WxBadge as re, WxDropdown as xt, WxDropdownItem as lt, WxAction as Re, WxButton as F, WxActionBar as ot, toast as L, WxEmpty as Oe, WxSortableList as Je, useModal as Ze, WxDialog as Qe, WxInput as $e, WxSpace as Xe, createModal as Ee, WxTable as ut, WxIcon as Y, WxTooltip as Ye, WxHeading as kt, WxTextarea as $t, WxSwitch as Tt, WxCard as Vt, WxListDetail as At, WxCheckbox as Ct } from "@webx-ui/core";
4
- import { useRoute as qe, useRouter as Me, onBeforeRouteLeave as St } from "vue-router";
5
- import { provideBlocksPreview as Wt } from "@webx-ui/module-blocks";
6
- const dt = /* @__PURE__ */ Symbol("wx-article-editor");
7
- function zt(y) {
8
- mt(dt, y);
1
+ import { provide as ct, inject as vt, defineComponent as ee, computed as v, openBlock as p, createElementBlock as G, createVNode as n, unref as e, withCtx as l, createBlock as z, createTextVNode as w, toDisplayString as b, createCommentVNode as H, useModel as qe, mergeModels as Me, ref as C, watch as ue, onMounted as Ne, onBeforeUnmount as Je, Fragment as ve, createElementVNode as j, renderList as Be, normalizeClass as Pe, useTemplateRef as De, nextTick as Ze, isRef as Ie, withKeys as ze, resolveDynamicComponent as tt, mergeProps as pt, useId as ft, withModifiers as at } from "vue";
2
+ import { useAdmin as ne, useTranslate as Q, useDates as mt, useErrorText as ge, WxScreenHead as bt, WxScreen as gt, WxDate as je, rowMenuWidth as st, WxListScreen as Qe, WxRowMenu as Re, WxFilterChips as ht } from "@webx-ui/module-admin";
3
+ import { useLocales as Xe, WxFormItem as ie, WxText as J, WxAlert as We, WxSelect as _e, localizedValue as yt, confirm as be, WxSkeleton as Ue, WxBadge as oe, WxBreadcrumb as wt, WxBreadcrumbItem as lt, WxButton as Z, WxActionBar as rt, toast as L, WxEmpty as Ge, WxSortableList as Ye, WxAction as Oe, useModal as Ee, WxDialog as Fe, WxInput as Ae, WxSpace as Le, useElementWidth as _t, createModal as Ce, WxTable as ot, WxEntityCard as xt, WxIcon as we, WxTooltip as et, WxHeading as kt, WxTextarea as $t, WxSwitch as Tt, WxCard as Vt, WxListDetail as At, WxCheckbox as St } from "@webx-ui/core";
4
+ import { useRoute as He, useRouter as Ke, onBeforeRouteLeave as Wt } from "vue-router";
5
+ import { provideBlocksPreview as Ct } from "@webx-ui/module-blocks";
6
+ const ut = /* @__PURE__ */ Symbol("wx-article-editor");
7
+ function zt(f) {
8
+ ct(ut, f);
9
9
  }
10
- function Te() {
11
- return ft(dt, null);
10
+ function Se() {
11
+ return vt(ut, null);
12
12
  }
13
13
  const Rt = {
14
14
  module: {
@@ -44,6 +44,9 @@ const Rt = {
44
44
  "view-draft": "Drafts",
45
45
  "view-unpublished": "Off the site",
46
46
  bin: "Bin",
47
+ "filter-rubric": "Rubric",
48
+ "filter-tag": "Tag",
49
+ "filter-author": "Author",
47
50
  "any-rubric": "Any rubric",
48
51
  "any-tag": "Any tag",
49
52
  "any-author": "Any author",
@@ -226,681 +229,623 @@ const Rt = {
226
229
  "merge-confirm": "Merge"
227
230
  }
228
231
  }, it = /* @__PURE__ */ new WeakSet();
229
- function ae() {
232
+ function te() {
230
233
  try {
231
- const { i18n: y } = se();
232
- it.has(y) || (y.defaults("webx-blog", Rt), it.add(y));
234
+ const { i18n: f } = ne();
235
+ it.has(f) || (f.defaults("webx-blog", Rt), it.add(f));
233
236
  } catch {
234
237
  }
235
238
  }
236
- const Ut = { class: "wx-article-address" }, Bt = /* @__PURE__ */ ee({
239
+ const Ut = { class: "wx-article-address" }, qt = /* @__PURE__ */ ee({
237
240
  name: "WxArticleAddress",
238
241
  __name: "ArticleAddress",
239
- setup(y) {
240
- const _ = Te(), u = Ge();
241
- ae();
242
- const x = te("webx-blog"), c = b(() => {
243
- const r = _?.values.value.slug;
244
- return typeof r == "string" ? r : r?.[u.active.value] ?? "";
245
- }), l = b(() => c.value === "" ? null : `/${[_?.prefix.value ?? "", c.value].filter(Boolean).join("/")}`), t = b(() => {
246
- const r = _?.article.value?.path;
247
- return typeof r == "string" && l.value !== null && l.value !== `/${r}`;
242
+ setup(f) {
243
+ const m = Se(), r = Xe();
244
+ te();
245
+ const y = Q("webx-blog"), u = v(() => {
246
+ const s = m?.values.value.slug;
247
+ return typeof s == "string" ? s : s?.[r.active.value] ?? "";
248
+ }), a = v(() => u.value === "" ? null : `/${[m?.prefix.value ?? "", u.value].filter(Boolean).join("/")}`), t = v(() => {
249
+ const s = m?.article.value?.path;
250
+ return typeof s == "string" && a.value !== null && a.value !== `/${s}`;
248
251
  });
249
- return (r, i) => (p(), K("div", Ut, [
250
- n(e(ge), {
251
- label: e(x)("article.address")
252
+ return (s, i) => (p(), G("div", Ut, [
253
+ n(e(ie), {
254
+ label: e(y)("article.address")
252
255
  }, {
253
- default: a(() => [
254
- l.value ? (p(), V(e(G), {
256
+ default: l(() => [
257
+ a.value ? (p(), z(e(J), {
255
258
  key: 0,
256
259
  mono: "",
257
260
  class: "wx-article-address__value"
258
261
  }, {
259
- default: a(() => [
260
- g(f(l.value), 1)
262
+ default: l(() => [
263
+ w(b(a.value), 1)
261
264
  ]),
262
265
  _: 1
263
- })) : (p(), V(e(G), {
266
+ })) : (p(), z(e(J), {
264
267
  key: 1,
265
268
  size: "sm",
266
269
  tone: "muted"
267
270
  }, {
268
- default: a(() => [
269
- g(f(e(x)("article.no-address")), 1)
271
+ default: l(() => [
272
+ w(b(e(y)("article.no-address")), 1)
270
273
  ]),
271
274
  _: 1
272
275
  }))
273
276
  ]),
274
277
  _: 1
275
278
  }, 8, ["label"]),
276
- t.value ? (p(), V(e(Se), {
279
+ t.value ? (p(), z(e(We), {
277
280
  key: 0,
278
281
  type: "info",
279
282
  variant: "soft",
280
- description: e(x)("article.address-moving")
281
- }, null, 8, ["description"])) : I("", !0)
283
+ description: e(y)("article.address-moving")
284
+ }, null, 8, ["description"])) : H("", !0)
282
285
  ]));
283
286
  }
284
- }), ce = (y, _) => {
285
- const u = y.__vccOpts || y;
286
- for (const [x, c] of _)
287
- u[x] = c;
288
- return u;
289
- }, Nt = /* @__PURE__ */ ce(Bt, [["__scopeId", "data-v-2ee0dcfe"]]), qt = /* @__PURE__ */ ee({
287
+ }), pe = (f, m) => {
288
+ const r = f.__vccOpts || f;
289
+ for (const [y, u] of m)
290
+ r[y] = u;
291
+ return r;
292
+ }, Mt = /* @__PURE__ */ pe(qt, [["__scopeId", "data-v-2ee0dcfe"]]), Nt = /* @__PURE__ */ ee({
290
293
  name: "WxArticleAuthor",
291
294
  __name: "ArticleAuthor",
292
- props: /* @__PURE__ */ Ne({
295
+ props: /* @__PURE__ */ Me({
293
296
  disabled: { type: Boolean, default: !1 }
294
297
  }, {
295
298
  modelValue: { default: null },
296
299
  modelModifiers: {}
297
300
  }),
298
301
  emits: ["update:modelValue"],
299
- setup(y) {
300
- const _ = y, u = Be(y, "modelValue"), x = Te();
301
- ae();
302
- const c = te("webx-blog"), l = b(() => _.disabled || x?.disabled.value === !0), t = b(
303
- () => (x?.options.value.authors ?? []).map((i) => ({
302
+ setup(f) {
303
+ const m = f, r = qe(f, "modelValue"), y = Se();
304
+ te();
305
+ const u = Q("webx-blog"), a = v(() => m.disabled || y?.disabled.value === !0), t = v(
306
+ () => (y?.options.value.authors ?? []).map((i) => ({
304
307
  label: i.title,
305
308
  value: i.id
306
309
  }))
307
- ), r = b({
308
- get: () => u.value,
310
+ ), s = v({
311
+ get: () => r.value,
309
312
  set: (i) => {
310
- u.value = typeof i == "number" ? i : null;
313
+ r.value = typeof i == "number" ? i : null;
311
314
  }
312
315
  });
313
- return (i, $) => (p(), V(e(be), {
314
- modelValue: r.value,
315
- "onUpdate:modelValue": $[0] || ($[0] = (T) => r.value = T),
316
+ return (i, x) => (p(), z(e(_e), {
317
+ modelValue: s.value,
318
+ "onUpdate:modelValue": x[0] || (x[0] = (T) => s.value = T),
316
319
  options: t.value,
317
- placeholder: e(c)("article.no-author"),
318
- disabled: l.value,
320
+ placeholder: e(u)("article.no-author"),
321
+ disabled: a.value,
319
322
  clearable: "",
320
323
  filterable: "",
321
324
  teleport: "",
322
- "aria-label": e(c)("article.author")
325
+ "aria-label": e(u)("article.author")
323
326
  }, null, 8, ["modelValue", "options", "placeholder", "disabled", "aria-label"]));
324
327
  }
325
328
  });
326
- function ue(y) {
327
- const _ = `${y.apiPath}/blog/articles`, u = `${y.apiPath}/blog/rubrics`, x = `${y.apiPath}/blog/tags`, c = (l) => l.data;
329
+ function de(f) {
330
+ const m = `${f.apiPath}/blog/articles`, r = `${f.apiPath}/blog/rubrics`, y = `${f.apiPath}/blog/tags`, u = (a) => a.data;
328
331
  return {
329
- articles: (l = {}) => {
332
+ articles: (a = {}) => {
330
333
  const t = new URLSearchParams();
331
- l.q && t.set("q", l.q), l.rubric != null && t.set("rubric", String(l.rubric)), l.tag != null && t.set("tag", String(l.tag)), l.author != null && t.set("author", String(l.author)), l.status && t.set("status", l.status), l.sort && t.set("sort", l.sort), l.trashed && t.set("trashed", "1"), l.page && l.page > 1 && t.set("page", String(l.page)), l.per_page && t.set("per_page", String(l.per_page));
332
- const r = t.size > 0 ? `?${t}` : "";
333
- return y.http.get(`${_}${r}`).then((i) => ({ ...i.meta, data: i.data, filters: i.filters }));
334
+ a.q && t.set("q", a.q), a.rubric != null && t.set("rubric", String(a.rubric)), a.tag != null && t.set("tag", String(a.tag)), a.author != null && t.set("author", String(a.author)), a.status && t.set("status", a.status), a.sort && t.set("sort", a.sort), a.trashed && t.set("trashed", "1"), a.page && a.page > 1 && t.set("page", String(a.page)), a.per_page && t.set("per_page", String(a.per_page));
335
+ const s = t.size > 0 ? `?${t}` : "";
336
+ return f.http.get(`${m}${s}`).then((i) => ({ ...i.meta, data: i.data, filters: i.filters }));
334
337
  },
335
- get: (l) => y.http.get(`${_}/${l}`).then(c),
336
- create: (l) => y.http.post(_, l).then(c),
337
- save: (l, t) => y.http.put(`${_}/${l}`, t).then(c),
338
- discard: (l) => y.http.post(`${_}/${l}/discard`, {}).then(c),
339
- versions: (l) => y.http.get(`${_}/${l}/versions`).then(c),
340
- restoreVersion: (l, t) => y.http.post(`${_}/${l}/versions/${t}/restore`, {}).then(c),
341
- tags: (l = "") => {
342
- const t = l.trim() === "" ? "" : `?q=${encodeURIComponent(l.trim())}`;
343
- return y.http.get(`${x}${t}`).then(c);
338
+ get: (a) => f.http.get(`${m}/${a}`).then(u),
339
+ create: (a) => f.http.post(m, a).then(u),
340
+ save: (a, t) => f.http.put(`${m}/${a}`, t).then(u),
341
+ discard: (a) => f.http.post(`${m}/${a}/discard`, {}).then(u),
342
+ versions: (a) => f.http.get(`${m}/${a}/versions`).then(u),
343
+ restoreVersion: (a, t) => f.http.post(`${m}/${a}/versions/${t}/restore`, {}).then(u),
344
+ tags: (a = "") => {
345
+ const t = a.trim() === "" ? "" : `?q=${encodeURIComponent(a.trim())}`;
346
+ return f.http.get(`${y}${t}`).then(u);
344
347
  },
345
- createTag: (l) => y.http.post(x, l).then(c),
346
- publish: (l, t) => y.http.post(`${_}/${l}/publish`, t == null ? {} : { at: t }).then(c),
347
- unpublish: (l) => y.http.post(`${_}/${l}/unpublish`, {}).then(c),
348
- remove: (l) => y.http.delete(`${_}/${l}`).then(() => {
348
+ createTag: (a) => f.http.post(y, a).then(u),
349
+ publish: (a, t) => f.http.post(`${m}/${a}/publish`, t == null ? {} : { at: t }).then(u),
350
+ unpublish: (a) => f.http.post(`${m}/${a}/unpublish`, {}).then(u),
351
+ remove: (a) => f.http.delete(`${m}/${a}`).then(() => {
349
352
  }),
350
- restore: (l) => y.http.post(`${_}/${l}/restore`, {}).then(c),
351
- rubrics: () => y.http.get(u),
352
- createRubric: (l) => y.http.post(u, l).then(c),
353
- saveRubric: (l, t) => y.http.put(`${u}/${l}`, t).then(c),
354
- removeRubric: (l) => y.http.delete(`${u}/${l}`).then(() => {
353
+ restore: (a) => f.http.post(`${m}/${a}/restore`, {}).then(u),
354
+ rubrics: () => f.http.get(r),
355
+ createRubric: (a) => f.http.post(r, a).then(u),
356
+ saveRubric: (a, t) => f.http.put(`${r}/${a}`, t).then(u),
357
+ removeRubric: (a) => f.http.delete(`${r}/${a}`).then(() => {
355
358
  }),
356
- sortRubrics: (l) => y.http.post(`${u}/reorder`, { ids: l }).then(() => {
359
+ sortRubrics: (a) => f.http.post(`${r}/reorder`, { ids: a }).then(() => {
357
360
  }),
358
- tagsPage: (l = {}) => {
361
+ tagsPage: (a = {}) => {
359
362
  const t = new URLSearchParams();
360
- l.q && t.set("q", l.q), l.empty && t.set("empty", "1"), l.noindex && t.set("noindex", "1"), l.sort && t.set("sort", l.sort), l.page && l.page > 1 && t.set("page", String(l.page)), l.per_page && t.set("per_page", String(l.per_page));
361
- const r = t.size > 0 ? `?${t}` : "";
362
- return y.http.get(`${x}${r}`).then((i) => ({ ...i.meta, data: i.data, filters: i.filters }));
363
+ a.q && t.set("q", a.q), a.empty && t.set("empty", "1"), a.noindex && t.set("noindex", "1"), a.sort && t.set("sort", a.sort), a.page && a.page > 1 && t.set("page", String(a.page)), a.per_page && t.set("per_page", String(a.per_page));
364
+ const s = t.size > 0 ? `?${t}` : "";
365
+ return f.http.get(`${y}${s}`).then((i) => ({ ...i.meta, data: i.data, filters: i.filters }));
363
366
  },
364
- saveTag: (l, t) => y.http.put(`${x}/${l}`, t).then(c),
365
- removeTag: (l) => y.http.delete(`${x}/${l}`).then(() => {
367
+ saveTag: (a, t) => f.http.put(`${y}/${a}`, t).then(u),
368
+ removeTag: (a) => f.http.delete(`${y}/${a}`).then(() => {
366
369
  }),
367
- massTags: (l, t) => y.http.post(`${x}/mass`, { ids: l, action: t }).then((r) => r.data.affected),
368
- mergeTags: (l, t, r) => y.http.post(`${x}/merge`, { ids: l, keep: t, redirect: r }).then(c)
370
+ massTags: (a, t) => f.http.post(`${y}/mass`, { ids: a, action: t }).then((s) => s.data.affected),
371
+ mergeTags: (a, t, s) => f.http.post(`${y}/merge`, { ids: a, keep: t, redirect: s }).then(u)
369
372
  };
370
373
  }
371
- const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-editor__id" }, Dt = { class: "wx-article-editor__name" }, It = { class: "wx-article-editor__title" }, Ot = { class: "wx-article-editor__actions" }, Et = { class: "wx-article-editor__screen" }, Lt = 1200, Ft = 720, Kt = /* @__PURE__ */ ee({
374
+ const Bt = { class: "wx-article-editor__screen" }, Pt = 1200, Dt = /* @__PURE__ */ ee({
372
375
  __name: "ArticleEditorPage",
373
376
  props: {
374
377
  base: { default: "/blog" }
375
378
  },
376
- setup(y) {
377
- const _ = y, u = se(), x = ue(u), c = qe(), l = Me(), t = Ge(), r = bt();
378
- ae();
379
- const i = te("webx-blog"), $ = me(), T = b(() => Number(c.params.id)), h = b(() => `${_.base}/articles`), d = z(null), k = z({}), S = z(""), C = z(""), M = z(null), P = z({ rubrics: [], authors: [] }), U = z([]), R = z(!0), W = z(!1), O = z(!1), A = z({}), N = z(null), H = z(""), D = z(0), m = b(() => u.can("blog.articles.manage")), E = b(() => !m.value || O.value), j = We("root"), de = rt(j), Ve = b(() => de.value > 0 && de.value < Ft), ve = b(() => JSON.stringify(k.value)), J = b(() => H.value !== "" && ve.value !== H.value), we = b(() => W.value ? "saving" : J.value ? "unsaved" : "saved"), he = b(() => {
380
- const B = k.value.title;
381
- return _t(B, t.active.value, d.value?.title ?? "");
382
- }), Q = b(() => {
383
- const B = k.value.published_at;
384
- return typeof B == "string" && B !== "" ? B : null;
385
- }), fe = b(() => {
386
- if (Q.value === null) return !1;
387
- const B = new Date(Q.value.replace(" ", "T"));
388
- return !Number.isNaN(B.valueOf()) && B.valueOf() > Date.now();
389
- }), ye = b(() => {
390
- const B = d.value;
391
- if (!B) return "";
392
- const Z = r.short(B.published_at);
379
+ setup(f) {
380
+ const m = f, r = ne(), y = de(r), u = He(), a = Ke(), t = Xe(), s = mt();
381
+ te();
382
+ const i = Q("webx-blog"), x = ge(), T = v(() => Number(u.params.id)), c = v(() => `${m.base}/articles`), o = C(null), _ = C({}), W = C(""), S = C(""), E = C(null), F = C({ rubrics: [], authors: [] }), $ = C([]), U = C(!0), R = C(!1), M = C(!1), A = C({}), I = C(null), K = C(""), P = C(0), q = v(() => r.can("blog.articles.manage")), k = v(() => !q.value || M.value), le = v(() => JSON.stringify(_.value)), O = v(() => K.value !== "" && le.value !== K.value), se = v(() => R.value ? "saving" : O.value ? "unsaved" : "saved"), xe = v(() => {
383
+ const V = _.value.title;
384
+ return yt(V, t.active.value, o.value?.title ?? "");
385
+ }), ce = v(() => {
386
+ const V = _.value.published_at;
387
+ return typeof V == "string" && V !== "" ? V : null;
388
+ }), he = v(() => {
389
+ if (ce.value === null) return !1;
390
+ const V = new Date(ce.value.replace(" ", "T"));
391
+ return !Number.isNaN(V.valueOf()) && V.valueOf() > Date.now();
392
+ }), Te = v(() => {
393
+ const V = o.value;
394
+ if (!V) return "";
395
+ const Y = s.short(V.published_at);
393
396
  return {
394
397
  draft: i("article.live-never"),
395
- scheduled: i("article.live-scheduled", { date: Z }),
396
- published: i("article.live-since", { date: Z }),
397
- modified: `${i("article.live-since", { date: Z })} · ${i("article.live-edited")}`,
398
+ scheduled: i("article.live-scheduled", { date: Y }),
399
+ published: i("article.live-since", { date: Y }),
400
+ modified: `${i("article.live-since", { date: Y })} · ${i("article.live-edited")}`,
398
401
  unpublished: i("article.live-off")
399
- }[B.status] ?? "";
402
+ }[V.status] ?? "";
400
403
  });
401
- Wt({ url: b(() => M.value), reload: D }), zt({
402
- article: d,
403
- values: k,
404
- options: P,
405
- related: U,
406
- prefix: C,
407
- base: _.base,
408
- canManage: m.value,
409
- disabled: E,
410
- reload: () => ie(!0),
411
- save: () => w()
404
+ Ct({ url: v(() => E.value), reload: P }), zt({
405
+ article: o,
406
+ values: _,
407
+ options: F,
408
+ related: $,
409
+ prefix: S,
410
+ base: m.base,
411
+ canManage: q.value,
412
+ disabled: k,
413
+ reload: () => fe(!0),
414
+ save: () => N()
412
415
  });
413
- function _e(B) {
414
- d.value = B.article, k.value = B.values, S.value = B.revision, C.value = B.prefix, M.value = B.preview_url, P.value = B.options, U.value = B.related, H.value = JSON.stringify(B.values), N.value = null;
416
+ function ke(V) {
417
+ o.value = V.article, _.value = V.values, W.value = V.revision, S.value = V.prefix, E.value = V.preview_url, F.value = V.options, $.value = V.related, K.value = JSON.stringify(V.values), I.value = null;
415
418
  }
416
- async function ie(B = !1) {
417
- B || (R.value = !0);
419
+ async function fe(V = !1) {
420
+ V || (U.value = !0);
418
421
  try {
419
- _e(await x.get(T.value));
420
- } catch (Z) {
421
- L.danger($(Z)), l.push(h.value);
422
+ ke(await y.get(T.value));
423
+ } catch (Y) {
424
+ L.danger(x(Y)), a.push(c.value);
422
425
  } finally {
423
- R.value = !1;
426
+ U.value = !1;
424
427
  }
425
428
  }
426
- let v;
427
- function o() {
428
- !m.value || N.value || !J.value || (clearTimeout(v), v = setTimeout(() => {
429
- w();
430
- }, Lt));
429
+ let re;
430
+ function me() {
431
+ !q.value || I.value || !O.value || (clearTimeout(re), re = setTimeout(() => {
432
+ N();
433
+ }, Pt));
431
434
  }
432
- function s() {
433
- !m.value || N.value || !J.value || W.value || (clearTimeout(v), w());
435
+ function g() {
436
+ !q.value || I.value || !O.value || R.value || (clearTimeout(re), N());
434
437
  }
435
- async function w() {
436
- if (!d.value || W.value || !m.value) return;
437
- clearTimeout(v);
438
- const B = ve.value, Z = k.value;
439
- W.value = !0, A.value = {};
438
+ async function N() {
439
+ if (!o.value || R.value || !q.value) return;
440
+ clearTimeout(re);
441
+ const V = le.value, Y = _.value;
442
+ R.value = !0, A.value = {};
440
443
  try {
441
- const X = await x.save(d.value.id, { values: Z, revision: S.value });
442
- d.value = X.article, S.value = X.revision, C.value = X.prefix, M.value = X.preview_url, P.value = X.options, U.value = X.related, N.value = null, ve.value === B && (H.value = B), D.value += 1;
443
- } catch (X) {
444
- const ke = X;
445
- ke.status === 409 && ke.body?.data ? N.value = ke.body : ke.body?.errors ? (A.value = ke.body.errors, L.danger(i("article.save-failed"))) : L.danger($(X));
444
+ const ae = await y.save(o.value.id, { values: Y, revision: W.value });
445
+ o.value = ae.article, W.value = ae.revision, S.value = ae.prefix, E.value = ae.preview_url, F.value = ae.options, $.value = ae.related, I.value = null, le.value === V && (K.value = V), P.value += 1;
446
+ } catch (ae) {
447
+ const Ve = ae;
448
+ Ve.status === 409 && Ve.body?.data ? I.value = Ve.body : Ve.body?.errors ? (A.value = Ve.body.errors, L.danger(i("article.save-failed"))) : L.danger(x(ae));
446
449
  } finally {
447
- W.value = !1;
450
+ R.value = !1;
448
451
  }
449
452
  }
450
- async function le() {
451
- await pe({
453
+ async function B() {
454
+ await be({
452
455
  title: i("article.conflict-theirs-title"),
453
456
  message: i("article.conflict-theirs-text"),
454
457
  confirmText: i("article.conflict-theirs"),
455
458
  cancelText: i("panel.cancel"),
456
459
  tone: "danger"
457
- }) && await ie(!0);
460
+ }) && await fe(!0);
458
461
  }
459
- async function xe() {
460
- const B = N.value;
461
- B && (S.value = B.data.revision, N.value = null, await w());
462
+ async function X() {
463
+ const V = I.value;
464
+ V && (W.value = V.data.revision, I.value = null, await N());
462
465
  }
463
- async function Pe() {
464
- if (!(!d.value || !await pe({
466
+ async function ye() {
467
+ if (!(!o.value || !await be({
465
468
  title: i("article.discard-title"),
466
469
  message: i("article.discard-text"),
467
470
  confirmText: i("article.discard"),
468
471
  cancelText: i("panel.cancel"),
469
472
  tone: "danger"
470
473
  }))) {
471
- O.value = !0;
474
+ M.value = !0;
472
475
  try {
473
- _e(await x.discard(d.value.id)), L.success(i("article.discarded"));
474
- } catch (Z) {
475
- L.danger($(Z));
476
+ ke(await y.discard(o.value.id)), L.success(i("article.discarded"));
477
+ } catch (Y) {
478
+ L.danger(x(Y));
476
479
  } finally {
477
- O.value = !1;
480
+ M.value = !1;
478
481
  }
479
482
  }
480
483
  }
481
- async function ct() {
482
- const B = d.value;
483
- if (!B) return;
484
- const Z = B.path === null ? null : `/${B.path}`, X = Q.value === null ? i("article.publish-now") : r.short(Q.value);
485
- if (await pe({
486
- title: i("article.publish-title", { title: B.title }),
487
- message: fe.value ? i("article.publish-later", { date: X }) : Z === null ? i("article.publish-nowhere") : i("article.publish-text", { address: Z }),
488
- confirmText: fe.value ? i("article.schedule") : i("panel.publish"),
484
+ async function d() {
485
+ const V = o.value;
486
+ if (!V) return;
487
+ const Y = V.path === null ? null : `/${V.path}`, ae = ce.value === null ? i("article.publish-now") : s.short(ce.value);
488
+ if (await be({
489
+ title: i("article.publish-title", { title: V.title }),
490
+ message: he.value ? i("article.publish-later", { date: ae }) : Y === null ? i("article.publish-nowhere") : i("article.publish-text", { address: Y }),
491
+ confirmText: he.value ? i("article.schedule") : i("panel.publish"),
489
492
  cancelText: i("panel.cancel")
490
- }) && (J.value && await w(), !N.value)) {
491
- O.value = !0;
493
+ }) && (O.value && await N(), !I.value)) {
494
+ M.value = !0;
492
495
  try {
493
- await x.publish(B.id, Q.value), await ie(!0), L.success(fe.value ? i("article.scheduled") : i("panel.published"));
494
- } catch (pt) {
495
- L.danger($(pt));
496
+ await y.publish(V.id, ce.value), await fe(!0), L.success(he.value ? i("article.scheduled") : i("panel.published"));
497
+ } catch (dt) {
498
+ L.danger(x(dt));
496
499
  } finally {
497
- O.value = !1;
500
+ M.value = !1;
498
501
  }
499
502
  }
500
503
  }
501
- function vt() {
502
- const B = d.value?.status;
503
- return B === "published" ? "success" : B === "modified" ? "warning" : B === "scheduled" ? "primary" : "default";
504
+ function D() {
505
+ const V = o.value?.status;
506
+ return V === "published" ? "success" : V === "modified" ? "warning" : V === "scheduled" ? "primary" : "default";
504
507
  }
505
- function et(B) {
506
- J.value && B.preventDefault();
508
+ function h(V) {
509
+ O.value && V.preventDefault();
507
510
  }
508
- return oe(ve, o), oe(T, () => {
509
- ie();
510
- }), Le(() => {
511
- ie(), window.addEventListener("beforeunload", et);
512
- }), Fe(() => {
513
- clearTimeout(v), window.removeEventListener("beforeunload", et);
514
- }), St(async () => !J.value || !m.value || (await w(), !J.value) ? !0 : await pe({
511
+ ue(le, me), ue(T, () => {
512
+ fe();
513
+ }), Ne(() => {
514
+ fe(), window.addEventListener("beforeunload", h);
515
+ }), Je(() => {
516
+ clearTimeout(re), window.removeEventListener("beforeunload", h);
517
+ }), Wt(async () => !O.value || !q.value || (await N(), !O.value) ? !0 : await be({
515
518
  title: i("article.leave-title"),
516
519
  message: i("article.leave-text"),
517
520
  confirmText: i("article.leave"),
518
521
  cancelText: i("panel.cancel"),
519
522
  tone: "danger"
520
- })), (B, Z) => (p(), K("div", {
521
- ref_key: "root",
522
- ref: j,
523
+ }));
524
+ const $e = v(() => {
525
+ const V = [];
526
+ return E.value && V.push({ key: "preview", label: i("article.preview"), icon: "eye", href: E.value }), o.value?.url && o.value.status !== "draft" && V.push({
527
+ key: "site",
528
+ label: i("panel.open-on-site"),
529
+ icon: "link",
530
+ href: o.value.url
531
+ }), V;
532
+ });
533
+ return (V, Y) => (p(), G("div", {
523
534
  class: "wx-article-editor",
524
- onFocusout: s
535
+ onFocusout: g
525
536
  }, [
526
- R.value || !d.value ? (p(), K(ne, { key: 0 }, [
537
+ U.value || !o.value ? (p(), G(ve, { key: 0 }, [
527
538
  n(e(Ue), {
528
539
  class: "wx-article-editor__ghost",
529
540
  title: "",
530
541
  rows: 1
531
542
  }),
532
543
  n(e(Ue), { rows: 8 })
533
- ], 64)) : (p(), K(ne, { key: 1 }, [
534
- q("div", Mt, [
535
- n(e(ht), {
536
- class: "wx-article-editor__back",
537
- to: h.value,
538
- label: e(i)("module.articles")
539
- }, null, 8, ["to", "label"]),
540
- q("div", Pt, [
544
+ ], 64)) : (p(), G(ve, { key: 1 }, [
545
+ n(e(bt), {
546
+ divider: "",
547
+ back: c.value,
548
+ "back-label": e(i)("module.articles"),
549
+ title: xe.value || e(i)("article.untitled"),
550
+ actions: $e.value
551
+ }, {
552
+ trail: l(() => [
541
553
  n(e(wt), {
542
554
  size: "sm",
543
555
  label: e(i)("article.trail")
544
556
  }, {
545
- default: a(() => [
546
- n(e(at), {
557
+ default: l(() => [
558
+ n(e(lt), {
547
559
  as: "router-link",
548
- to: h.value
560
+ to: c.value
549
561
  }, {
550
- default: a(() => [
551
- g(f(e(i)("module.articles")), 1)
562
+ default: l(() => [
563
+ w(b(e(i)("module.articles")), 1)
552
564
  ]),
553
565
  _: 1
554
566
  }, 8, ["to"]),
555
- n(e(at), { current: "" }, {
556
- default: a(() => [
557
- g(f(he.value || e(i)("article.untitled")), 1)
567
+ n(e(lt), { current: "" }, {
568
+ default: l(() => [
569
+ w(b(xe.value || e(i)("article.untitled")), 1)
558
570
  ]),
559
571
  _: 1
560
572
  })
561
573
  ]),
562
574
  _: 1
563
- }, 8, ["label"]),
564
- q("div", Dt, [
565
- q("span", It, f(he.value || e(i)("article.untitled")), 1),
566
- n(e(re), {
567
- type: vt(),
568
- dot: ""
569
- }, {
570
- default: a(() => [
571
- g(f(e(i)(`panel.status-${d.value.status}`)), 1)
572
- ]),
573
- _: 1
574
- }, 8, ["type"])
575
- ])
575
+ }, 8, ["label"])
576
576
  ]),
577
- q("div", Ot, [
578
- Ve.value ? (p(), V(e(xt), {
579
- key: 0,
580
- align: "end"
577
+ "title-after": l(() => [
578
+ n(e(oe), {
579
+ type: D(),
580
+ dot: ""
581
581
  }, {
582
- trigger: a(() => [
583
- n(e(Re), {
584
- type: "more",
585
- title: e(i)("article.more")
586
- }, null, 8, ["title"])
587
- ]),
588
- default: a(() => [
589
- M.value ? (p(), V(e(lt), {
590
- key: 0,
591
- icon: "eye",
592
- href: M.value,
593
- target: "_blank",
594
- rel: "noopener"
595
- }, {
596
- default: a(() => [
597
- g(f(e(i)("article.preview")), 1)
598
- ]),
599
- _: 1
600
- }, 8, ["href"])) : I("", !0),
601
- d.value.url && d.value.status !== "draft" ? (p(), V(e(lt), {
602
- key: 1,
603
- icon: "link",
604
- href: d.value.url,
605
- target: "_blank",
606
- rel: "noopener"
607
- }, {
608
- default: a(() => [
609
- g(f(e(i)("panel.open-on-site")), 1)
610
- ]),
611
- _: 1
612
- }, 8, ["href"])) : I("", !0)
582
+ default: l(() => [
583
+ w(b(e(i)(`panel.status-${o.value.status}`)), 1)
613
584
  ]),
614
585
  _: 1
615
- })) : (p(), K(ne, { key: 1 }, [
616
- M.value ? (p(), V(e(F), {
617
- key: 0,
618
- variant: "outline",
619
- icon: "eye",
620
- href: M.value,
621
- target: "_blank",
622
- rel: "noopener"
623
- }, {
624
- default: a(() => [
625
- g(f(e(i)("article.preview")), 1)
626
- ]),
627
- _: 1
628
- }, 8, ["href"])) : I("", !0),
629
- d.value.url && d.value.status !== "draft" ? (p(), V(e(F), {
630
- key: 1,
631
- variant: "outline",
632
- icon: "link",
633
- href: d.value.url,
634
- target: "_blank",
635
- rel: "noopener"
636
- }, {
637
- default: a(() => [
638
- g(f(e(i)("panel.open-on-site")), 1)
639
- ]),
640
- _: 1
641
- }, 8, ["href"])) : I("", !0)
642
- ], 64))
643
- ])
644
- ]),
645
- N.value ? (p(), V(e(Se), {
586
+ }, 8, ["type"])
587
+ ]),
588
+ _: 1
589
+ }, 8, ["back", "back-label", "title", "actions"]),
590
+ I.value ? (p(), z(e(We), {
646
591
  key: 0,
647
592
  type: "warning",
648
593
  title: e(i)("article.conflict-title"),
649
- description: N.value.message
594
+ description: I.value.message
650
595
  }, {
651
- actions: a(() => [
652
- n(e(F), {
596
+ actions: l(() => [
597
+ n(e(Z), {
653
598
  size: "sm",
654
599
  variant: "outline",
655
- onClick: le
600
+ onClick: B
656
601
  }, {
657
- default: a(() => [
658
- g(f(e(i)("article.conflict-theirs")), 1)
602
+ default: l(() => [
603
+ w(b(e(i)("article.conflict-theirs")), 1)
659
604
  ]),
660
605
  _: 1
661
606
  }),
662
- n(e(F), {
607
+ n(e(Z), {
663
608
  size: "sm",
664
609
  type: "primary",
665
- onClick: xe
610
+ onClick: X
666
611
  }, {
667
- default: a(() => [
668
- g(f(e(i)("article.conflict-mine")), 1)
612
+ default: l(() => [
613
+ w(b(e(i)("article.conflict-mine")), 1)
669
614
  ]),
670
615
  _: 1
671
616
  })
672
617
  ]),
673
618
  _: 1
674
- }, 8, ["title", "description"])) : I("", !0),
675
- q("div", Et, [
676
- n(e(yt), {
677
- modelValue: k.value,
678
- "onUpdate:modelValue": Z[0] || (Z[0] = (X) => k.value = X),
619
+ }, 8, ["title", "description"])) : H("", !0),
620
+ j("div", Bt, [
621
+ n(e(gt), {
622
+ modelValue: _.value,
623
+ "onUpdate:modelValue": Y[0] || (Y[0] = (ae) => _.value = ae),
679
624
  name: "blog.article-form",
680
625
  errors: A.value,
681
- disabled: E.value
626
+ disabled: k.value
682
627
  }, null, 8, ["modelValue", "errors", "disabled"])
683
628
  ]),
684
- m.value ? (p(), V(e(ot), { key: 1 }, {
685
- state: a(() => [
686
- n(e(G), {
629
+ q.value ? (p(), z(e(rt), { key: 1 }, {
630
+ state: l(() => [
631
+ n(e(J), {
687
632
  size: "sm",
688
633
  tone: "muted"
689
634
  }, {
690
- default: a(() => [
691
- g(f(e(i)(`article.state-${we.value}`)), 1),
692
- ye.value ? (p(), K(ne, { key: 0 }, [
693
- g(" · " + f(ye.value), 1)
694
- ], 64)) : I("", !0)
635
+ default: l(() => [
636
+ w(b(e(i)(`article.state-${se.value}`)), 1),
637
+ Te.value ? (p(), G(ve, { key: 0 }, [
638
+ w(" · " + b(Te.value), 1)
639
+ ], 64)) : H("", !0)
695
640
  ]),
696
641
  _: 1
697
642
  })
698
643
  ]),
699
- default: a(() => [
700
- d.value.status === "modified" ? (p(), V(e(F), {
644
+ default: l(() => [
645
+ o.value.status === "modified" ? (p(), z(e(Z), {
701
646
  key: 0,
702
647
  variant: "text",
703
- loading: O.value,
704
- onClick: Pe
648
+ loading: M.value,
649
+ onClick: ye
705
650
  }, {
706
- default: a(() => [
707
- g(f(e(i)("article.discard")), 1)
651
+ default: l(() => [
652
+ w(b(e(i)("article.discard")), 1)
708
653
  ]),
709
654
  _: 1
710
- }, 8, ["loading"])) : I("", !0),
711
- n(e(F), {
655
+ }, 8, ["loading"])) : H("", !0),
656
+ n(e(Z), {
712
657
  variant: "outline",
713
- loading: W.value,
714
- disabled: !J.value,
715
- onClick: w
658
+ loading: R.value,
659
+ disabled: !O.value,
660
+ onClick: N
716
661
  }, {
717
- default: a(() => [
718
- g(f(e(i)("article.save")), 1)
662
+ default: l(() => [
663
+ w(b(e(i)("article.save")), 1)
719
664
  ]),
720
665
  _: 1
721
666
  }, 8, ["loading", "disabled"]),
722
- n(e(F), {
667
+ n(e(Z), {
723
668
  type: "primary",
724
- loading: O.value,
725
- disabled: d.value.status === "published" && !J.value,
726
- onClick: ct
669
+ loading: M.value,
670
+ disabled: o.value.status === "published" && !O.value,
671
+ onClick: d
727
672
  }, {
728
- default: a(() => [
729
- g(f(fe.value ? e(i)("article.schedule") : e(i)("panel.publish")), 1)
673
+ default: l(() => [
674
+ w(b(he.value ? e(i)("article.schedule") : e(i)("panel.publish")), 1)
730
675
  ]),
731
676
  _: 1
732
677
  }, 8, ["loading", "disabled"])
733
678
  ]),
734
679
  _: 1
735
- })) : I("", !0)
680
+ })) : H("", !0)
736
681
  ], 64))
737
- ], 544));
682
+ ], 32));
738
683
  }
739
- }), Ht = /* @__PURE__ */ ce(Kt, [["__scopeId", "data-v-9bf13356"]]), jt = { class: "wx-article-history" }, Gt = { class: "wx-article-history__number" }, Jt = { class: "wx-article-history__who" }, Zt = /* @__PURE__ */ ee({
684
+ }), It = /* @__PURE__ */ pe(Dt, [["__scopeId", "data-v-41431c5d"]]), Ot = { class: "wx-article-history" }, Et = { class: "wx-article-history__number" }, Ft = { class: "wx-article-history__who" }, Lt = /* @__PURE__ */ ee({
740
685
  name: "WxArticleHistory",
741
686
  __name: "ArticleHistory",
742
- setup(y) {
743
- const _ = se(), u = ue(_), x = Te();
744
- ae();
745
- const c = te("webx-blog"), l = me(), t = z(null), r = z(!1), i = b(() => x?.article.value ?? null), $ = b(() => _.can("blog.articles.manage")), T = b(
687
+ setup(f) {
688
+ const m = ne(), r = de(m), y = Se();
689
+ te();
690
+ const u = Q("webx-blog"), a = ge(), t = C(null), s = C(!1), i = v(() => y?.article.value ?? null), x = v(() => m.can("blog.articles.manage")), T = v(
746
691
  () => i.value?.status === "published" || i.value?.status === "modified" ? t.value?.[0]?.number ?? null : null
747
692
  );
748
- async function h() {
749
- const k = i.value;
750
- if (k)
693
+ async function c() {
694
+ const _ = i.value;
695
+ if (_)
751
696
  try {
752
- t.value = await u.versions(k.id);
753
- } catch (S) {
754
- t.value = [], L.danger(l(S));
697
+ t.value = await r.versions(_.id);
698
+ } catch (W) {
699
+ t.value = [], L.danger(a(W));
755
700
  }
756
701
  }
757
- async function d(k) {
758
- const S = i.value;
759
- if (!(!S || !await pe({
760
- title: c("article.restore-title", { number: k.number }),
761
- message: c("article.restore-text"),
762
- confirmText: c("article.restore-version"),
763
- cancelText: c("panel.cancel")
702
+ async function o(_) {
703
+ const W = i.value;
704
+ if (!(!W || !await be({
705
+ title: u("article.restore-title", { number: _.number }),
706
+ message: u("article.restore-text"),
707
+ confirmText: u("article.restore-version"),
708
+ cancelText: u("panel.cancel")
764
709
  }))) {
765
- r.value = !0;
710
+ s.value = !0;
766
711
  try {
767
- await u.restoreVersion(S.id, k.number), await x?.reload(), L.success(c("article.restored-version", { number: k.number }));
768
- } catch (M) {
769
- L.danger(l(M));
712
+ await r.restoreVersion(W.id, _.number), await y?.reload(), L.success(u("article.restored-version", { number: _.number }));
713
+ } catch (E) {
714
+ L.danger(a(E));
770
715
  } finally {
771
- r.value = !1;
716
+ s.value = !1;
772
717
  }
773
718
  }
774
719
  }
775
- return oe(
720
+ return ue(
776
721
  () => [i.value?.id, i.value?.published_at, i.value?.updated_at],
777
722
  () => {
778
- h();
723
+ c();
779
724
  },
780
725
  { immediate: !0 }
781
- ), (k, S) => (p(), K("div", jt, [
782
- t.value === null ? (p(), V(e(Ue), {
726
+ ), (_, W) => (p(), G("div", Ot, [
727
+ t.value === null ? (p(), z(e(Ue), {
783
728
  key: 0,
784
729
  class: "wx-article-history__ghost",
785
730
  rows: 3
786
- })) : t.value.length === 0 ? (p(), V(e(Oe), {
731
+ })) : t.value.length === 0 ? (p(), z(e(Ge), {
787
732
  key: 1,
788
- description: e(c)("article.history-empty")
789
- }, null, 8, ["description"])) : (p(!0), K(ne, { key: 2 }, ze(t.value, (C) => (p(), K("div", {
790
- key: C.number,
791
- class: Ae(["wx-article-history__row", { "is-live": C.number === T.value }])
733
+ description: e(u)("article.history-empty")
734
+ }, null, 8, ["description"])) : (p(!0), G(ve, { key: 2 }, Be(t.value, (S) => (p(), G("div", {
735
+ key: S.number,
736
+ class: Pe(["wx-article-history__row", { "is-live": S.number === T.value }])
792
737
  }, [
793
- q("code", Gt, f(e(c)("article.version", { number: C.number })), 1),
794
- q("div", Jt, [
795
- C.created_at ? (p(), V(e(De), {
738
+ j("code", Et, b(e(u)("article.version", { number: S.number })), 1),
739
+ j("div", Ft, [
740
+ S.created_at ? (p(), z(e(je), {
796
741
  key: 0,
797
- value: C.created_at,
742
+ value: S.created_at,
798
743
  size: "md",
799
744
  tone: "default"
800
- }, null, 8, ["value"])) : I("", !0),
801
- n(e(G), {
745
+ }, null, 8, ["value"])) : H("", !0),
746
+ n(e(J), {
802
747
  size: "sm",
803
748
  tone: "muted"
804
749
  }, {
805
- default: a(() => [
806
- g(f(C.author ?? e(c)(`article.source-${C.source}`)) + " ", 1),
807
- C.comment ? (p(), K(ne, { key: 0 }, [
808
- g(" · " + f(C.comment), 1)
809
- ], 64)) : I("", !0)
750
+ default: l(() => [
751
+ w(b(S.author ?? e(u)(`article.source-${S.source}`)) + " ", 1),
752
+ S.comment ? (p(), G(ve, { key: 0 }, [
753
+ w(" · " + b(S.comment), 1)
754
+ ], 64)) : H("", !0)
810
755
  ]),
811
756
  _: 2
812
757
  }, 1024)
813
758
  ]),
814
- C.number === T.value ? (p(), V(e(re), {
759
+ S.number === T.value ? (p(), z(e(oe), {
815
760
  key: 0,
816
761
  type: "success",
817
762
  dot: ""
818
763
  }, {
819
- default: a(() => [
820
- g(f(e(c)("article.version-live")), 1)
764
+ default: l(() => [
765
+ w(b(e(u)("article.version-live")), 1)
821
766
  ]),
822
767
  _: 1
823
- })) : I("", !0),
824
- $.value && C.number !== T.value ? (p(), V(e(F), {
768
+ })) : H("", !0),
769
+ x.value && S.number !== T.value ? (p(), z(e(Z), {
825
770
  key: 1,
826
771
  size: "sm",
827
772
  variant: "outline",
828
- loading: r.value,
829
- onClick: (M) => d(C)
773
+ loading: s.value,
774
+ onClick: (E) => o(S)
830
775
  }, {
831
- default: a(() => [
832
- g(f(e(c)("article.restore-version")), 1)
776
+ default: l(() => [
777
+ w(b(e(u)("article.restore-version")), 1)
833
778
  ]),
834
779
  _: 1
835
- }, 8, ["loading", "onClick"])) : I("", !0)
780
+ }, 8, ["loading", "onClick"])) : H("", !0)
836
781
  ], 2))), 128))
837
782
  ]));
838
783
  }
839
- }), Qt = /* @__PURE__ */ ce(Zt, [["__scopeId", "data-v-0a997938"]]), Xt = { class: "wx-article-related" }, Yt = { class: "wx-article-related__name" }, ea = 250, ta = 10, aa = /* @__PURE__ */ ee({
784
+ }), Ht = /* @__PURE__ */ pe(Lt, [["__scopeId", "data-v-0a997938"]]), Kt = { class: "wx-article-related" }, jt = { class: "wx-article-related__name" }, Gt = 250, Jt = 10, Zt = /* @__PURE__ */ ee({
840
785
  name: "WxArticleRelated",
841
786
  __name: "ArticleRelated",
842
- props: /* @__PURE__ */ Ne({
787
+ props: /* @__PURE__ */ Me({
843
788
  disabled: { type: Boolean, default: !1 }
844
789
  }, {
845
790
  modelValue: { default: () => [] },
846
791
  modelModifiers: {}
847
792
  }),
848
793
  emits: ["update:modelValue"],
849
- setup(y) {
850
- const _ = y, u = Be(y, "modelValue"), x = se(), c = ue(x), l = Te();
851
- ae();
852
- const t = te("webx-blog"), r = me(), i = b(() => _.disabled || l?.disabled.value === !0), $ = z(/* @__PURE__ */ new Map()), T = z([]);
853
- let h;
854
- oe(
855
- () => l?.related.value,
856
- (U) => {
857
- const R = new Map($.value);
858
- for (const W of U ?? []) R.set(W.id, W.title);
859
- $.value = R;
794
+ setup(f) {
795
+ const m = f, r = qe(f, "modelValue"), y = ne(), u = de(y), a = Se();
796
+ te();
797
+ const t = Q("webx-blog"), s = ge(), i = v(() => m.disabled || a?.disabled.value === !0), x = C(/* @__PURE__ */ new Map()), T = C([]);
798
+ let c;
799
+ ue(
800
+ () => a?.related.value,
801
+ ($) => {
802
+ const U = new Map(x.value);
803
+ for (const R of $ ?? []) U.set(R.id, R.title);
804
+ x.value = U;
860
805
  },
861
806
  { immediate: !0, deep: !0 }
862
807
  );
863
- const d = b({
864
- get: () => u.value.map((U) => ({ id: U, title: $.value.get(U) ?? `#${U}` })),
865
- set: (U) => {
866
- u.value = U.map((R) => R.id);
808
+ const o = v({
809
+ get: () => r.value.map(($) => ({ id: $, title: x.value.get($) ?? `#${$}` })),
810
+ set: ($) => {
811
+ r.value = $.map((U) => U.id);
867
812
  }
868
- }), k = b(
869
- () => T.value.filter((U) => !u.value.includes(U.id)).map((U) => ({ label: U.title, value: U.id }))
813
+ }), _ = v(
814
+ () => T.value.filter(($) => !r.value.includes($.id)).map(($) => ({ label: $.title, value: $.id }))
870
815
  );
871
- async function S(U) {
872
- const R = l?.article.value?.id;
816
+ async function W($) {
817
+ const U = a?.article.value?.id;
873
818
  try {
874
- const W = await c.articles({ q: U, per_page: ta });
875
- T.value = W.data.filter((A) => A.id !== R).map((A) => ({ id: A.id, title: A.title }));
876
- const O = new Map($.value);
877
- for (const A of T.value) O.set(A.id, A.title);
878
- $.value = O;
879
- } catch (W) {
880
- L.danger(r(W));
819
+ const R = await u.articles({ q: $, per_page: Jt });
820
+ T.value = R.data.filter((A) => A.id !== U).map((A) => ({ id: A.id, title: A.title }));
821
+ const M = new Map(x.value);
822
+ for (const A of T.value) M.set(A.id, A.title);
823
+ x.value = M;
824
+ } catch (R) {
825
+ L.danger(s(R));
881
826
  }
882
827
  }
883
- function C(U) {
884
- clearTimeout(h), h = setTimeout(() => {
885
- S(U);
886
- }, ea);
828
+ function S($) {
829
+ clearTimeout(c), c = setTimeout(() => {
830
+ W($);
831
+ }, Gt);
887
832
  }
888
- function M(U) {
889
- typeof U != "number" || u.value.includes(U) || (u.value = [...u.value, U]);
833
+ function E($) {
834
+ typeof $ != "number" || r.value.includes($) || (r.value = [...r.value, $]);
890
835
  }
891
- function P(U) {
892
- u.value = u.value.filter((R) => R !== U);
836
+ function F($) {
837
+ r.value = r.value.filter((U) => U !== $);
893
838
  }
894
- return oe(
895
- () => l?.article.value?.id,
839
+ return ue(
840
+ () => a?.article.value?.id,
896
841
  () => {
897
- S("");
842
+ W("");
898
843
  },
899
844
  { immediate: !0 }
900
- ), Fe(() => clearTimeout(h)), (U, R) => (p(), K("div", Xt, [
901
- n(e(Je), {
902
- modelValue: d.value,
903
- "onUpdate:modelValue": R[0] || (R[0] = (W) => d.value = W),
845
+ ), Je(() => clearTimeout(c)), ($, U) => (p(), G("div", Kt, [
846
+ n(e(Ye), {
847
+ modelValue: o.value,
848
+ "onUpdate:modelValue": U[0] || (U[0] = (R) => o.value = R),
904
849
  plain: "",
905
850
  size: "sm",
906
851
  "item-key": "id",
@@ -909,302 +854,302 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
909
854
  "empty-text": e(t)("article.related-empty"),
910
855
  "aria-label": e(t)("article.related")
911
856
  }, {
912
- default: a(({ item: W }) => [
913
- q("span", Yt, f(W.title), 1)
857
+ default: l(({ item: R }) => [
858
+ j("span", jt, b(R.title), 1)
914
859
  ]),
915
- actions: a(({ item: W }) => [
916
- n(e(Re), {
860
+ actions: l(({ item: R }) => [
861
+ n(e(Oe), {
917
862
  type: "remove",
918
863
  size: "sm",
919
864
  disabled: i.value,
920
865
  title: e(t)("article.related-remove"),
921
- onClick: (O) => P(W.id)
866
+ onClick: (M) => F(R.id)
922
867
  }, null, 8, ["disabled", "title", "onClick"])
923
868
  ]),
924
869
  _: 1
925
870
  }, 8, ["modelValue", "disabled", "empty-text", "aria-label"]),
926
- n(e(be), {
871
+ n(e(_e), {
927
872
  "model-value": null,
928
- options: k.value,
873
+ options: _.value,
929
874
  placeholder: e(t)("article.related-add"),
930
875
  "empty-text": e(t)("article.related-nothing"),
931
876
  disabled: i.value,
932
877
  filterable: "",
933
878
  teleport: "",
934
879
  "aria-label": e(t)("article.related-add"),
935
- onSearch: C,
936
- "onUpdate:modelValue": M
880
+ onSearch: S,
881
+ "onUpdate:modelValue": E
937
882
  }, null, 8, ["options", "placeholder", "empty-text", "disabled", "aria-label"])
938
883
  ]));
939
884
  }
940
- }), la = /* @__PURE__ */ ce(aa, [["__scopeId", "data-v-164e86fe"]]), ia = { class: "wx-article-rubrics" }, na = { class: "wx-article-rubrics__name" }, sa = /* @__PURE__ */ ee({
885
+ }), Qt = /* @__PURE__ */ pe(Zt, [["__scopeId", "data-v-164e86fe"]]), Xt = { class: "wx-article-rubrics" }, Yt = { class: "wx-article-rubrics__name" }, ea = /* @__PURE__ */ ee({
941
886
  name: "WxArticleRubrics",
942
887
  __name: "ArticleRubrics",
943
- props: /* @__PURE__ */ Ne({
888
+ props: /* @__PURE__ */ Me({
944
889
  disabled: { type: Boolean, default: !1 }
945
890
  }, {
946
891
  modelValue: { default: () => [] },
947
892
  modelModifiers: {}
948
893
  }),
949
894
  emits: ["update:modelValue"],
950
- setup(y) {
951
- const _ = y, u = Be(y, "modelValue"), x = Te();
952
- ae();
953
- const c = te("webx-blog"), l = b(() => _.disabled || x?.disabled.value === !0), t = b(() => {
954
- const h = /* @__PURE__ */ new Map();
955
- for (const d of x?.options.value.rubrics ?? []) h.set(d.id, d.title);
956
- return h;
957
- }), r = b({
958
- get: () => u.value.map((h) => ({ id: h, title: t.value.get(h) ?? `#${h}` })),
959
- set: (h) => {
960
- u.value = h.map((d) => d.id);
895
+ setup(f) {
896
+ const m = f, r = qe(f, "modelValue"), y = Se();
897
+ te();
898
+ const u = Q("webx-blog"), a = v(() => m.disabled || y?.disabled.value === !0), t = v(() => {
899
+ const c = /* @__PURE__ */ new Map();
900
+ for (const o of y?.options.value.rubrics ?? []) c.set(o.id, o.title);
901
+ return c;
902
+ }), s = v({
903
+ get: () => r.value.map((c) => ({ id: c, title: t.value.get(c) ?? `#${c}` })),
904
+ set: (c) => {
905
+ r.value = c.map((o) => o.id);
961
906
  }
962
- }), i = b(
963
- () => (x?.options.value.rubrics ?? []).filter((h) => !u.value.includes(h.id)).map((h) => ({ label: h.title, value: h.id }))
907
+ }), i = v(
908
+ () => (y?.options.value.rubrics ?? []).filter((c) => !r.value.includes(c.id)).map((c) => ({ label: c.title, value: c.id }))
964
909
  );
965
- function $(h) {
966
- typeof h != "number" || u.value.includes(h) || (u.value = [...u.value, h]);
910
+ function x(c) {
911
+ typeof c != "number" || r.value.includes(c) || (r.value = [...r.value, c]);
967
912
  }
968
- function T(h) {
969
- u.value = u.value.filter((d) => d !== h);
913
+ function T(c) {
914
+ r.value = r.value.filter((o) => o !== c);
970
915
  }
971
- return (h, d) => (p(), K("div", ia, [
972
- n(e(Je), {
973
- modelValue: r.value,
974
- "onUpdate:modelValue": d[0] || (d[0] = (k) => r.value = k),
916
+ return (c, o) => (p(), G("div", Xt, [
917
+ n(e(Ye), {
918
+ modelValue: s.value,
919
+ "onUpdate:modelValue": o[0] || (o[0] = (_) => s.value = _),
975
920
  plain: "",
976
921
  size: "sm",
977
922
  "item-key": "id",
978
923
  "item-label": "title",
979
- disabled: l.value,
980
- "empty-text": e(c)("article.rubrics-empty"),
981
- "aria-label": e(c)("article.rubrics")
924
+ disabled: a.value,
925
+ "empty-text": e(u)("article.rubrics-empty"),
926
+ "aria-label": e(u)("article.rubrics")
982
927
  }, {
983
- default: a(({ item: k, index: S }) => [
984
- q("span", na, f(k.title), 1),
985
- S === 0 ? (p(), V(e(re), {
928
+ default: l(({ item: _, index: W }) => [
929
+ j("span", Yt, b(_.title), 1),
930
+ W === 0 ? (p(), z(e(oe), {
986
931
  key: 0,
987
932
  type: "primary"
988
933
  }, {
989
- default: a(() => [
990
- g(f(e(c)("article.rubric-main")), 1)
934
+ default: l(() => [
935
+ w(b(e(u)("article.rubric-main")), 1)
991
936
  ]),
992
937
  _: 1
993
- })) : I("", !0)
938
+ })) : H("", !0)
994
939
  ]),
995
- actions: a(({ item: k }) => [
996
- n(e(Re), {
940
+ actions: l(({ item: _ }) => [
941
+ n(e(Oe), {
997
942
  type: "remove",
998
943
  size: "sm",
999
- disabled: l.value,
1000
- title: e(c)("article.rubric-remove"),
1001
- onClick: (S) => T(k.id)
944
+ disabled: a.value,
945
+ title: e(u)("article.rubric-remove"),
946
+ onClick: (W) => T(_.id)
1002
947
  }, null, 8, ["disabled", "title", "onClick"])
1003
948
  ]),
1004
949
  _: 1
1005
950
  }, 8, ["modelValue", "disabled", "empty-text", "aria-label"]),
1006
- n(e(be), {
951
+ n(e(_e), {
1007
952
  "model-value": null,
1008
953
  options: i.value,
1009
- placeholder: e(c)("article.rubric-add"),
1010
- disabled: l.value || i.value.length === 0,
1011
- "empty-text": e(c)("article.rubric-none-left"),
954
+ placeholder: e(u)("article.rubric-add"),
955
+ disabled: a.value || i.value.length === 0,
956
+ "empty-text": e(u)("article.rubric-none-left"),
1012
957
  filterable: "",
1013
958
  teleport: "",
1014
- "aria-label": e(c)("article.rubric-add"),
1015
- "onUpdate:modelValue": $
959
+ "aria-label": e(u)("article.rubric-add"),
960
+ "onUpdate:modelValue": x
1016
961
  }, null, 8, ["options", "placeholder", "disabled", "empty-text", "aria-label"])
1017
962
  ]));
1018
963
  }
1019
- }), ra = /* @__PURE__ */ ce(sa, [["__scopeId", "data-v-db8c5bc8"]]), oa = { class: "wx-article-tags" }, ua = {
964
+ }), ta = /* @__PURE__ */ pe(ea, [["__scopeId", "data-v-db8c5bc8"]]), aa = { class: "wx-article-tags" }, la = {
1020
965
  key: 0,
1021
966
  class: "wx-article-tags__chips"
1022
- }, da = { class: "wx-article-tags__pick" }, ca = 250, va = /* @__PURE__ */ ee({
967
+ }, ia = { class: "wx-article-tags__pick" }, na = 250, sa = /* @__PURE__ */ ee({
1023
968
  name: "WxArticleTags",
1024
969
  __name: "ArticleTags",
1025
- props: /* @__PURE__ */ Ne({
970
+ props: /* @__PURE__ */ Me({
1026
971
  disabled: { type: Boolean, default: !1 }
1027
972
  }, {
1028
973
  modelValue: { default: () => [] },
1029
974
  modelModifiers: {}
1030
975
  }),
1031
976
  emits: ["update:modelValue"],
1032
- setup(y) {
1033
- const _ = y, u = Be(y, "modelValue"), x = se(), c = ue(x), l = Te();
1034
- ae();
1035
- const t = te("webx-blog"), r = me(), i = b(() => _.disabled || l?.disabled.value === !0), $ = z(/* @__PURE__ */ new Map()), T = z([]), h = z(""), d = z(!1);
1036
- let k;
1037
- oe(
1038
- () => l?.article.value?.tags,
977
+ setup(f) {
978
+ const m = f, r = qe(f, "modelValue"), y = ne(), u = de(y), a = Se();
979
+ te();
980
+ const t = Q("webx-blog"), s = ge(), i = v(() => m.disabled || a?.disabled.value === !0), x = C(/* @__PURE__ */ new Map()), T = C([]), c = C(""), o = C(!1);
981
+ let _;
982
+ ue(
983
+ () => a?.article.value?.tags,
1039
984
  (A) => {
1040
- const N = new Map($.value);
1041
- for (const H of A ?? []) N.set(H.id, H.title);
1042
- $.value = N;
985
+ const I = new Map(x.value);
986
+ for (const K of A ?? []) I.set(K.id, K.title);
987
+ x.value = I;
1043
988
  },
1044
989
  { immediate: !0, deep: !0 }
1045
990
  );
1046
- const S = b(
1047
- () => u.value.map((A) => ({ id: A, title: $.value.get(A) ?? `#${A}` }))
1048
- ), C = b(
1049
- () => T.value.filter((A) => !u.value.includes(A.id)).map((A) => ({
991
+ const W = v(
992
+ () => r.value.map((A) => ({ id: A, title: x.value.get(A) ?? `#${A}` }))
993
+ ), S = v(
994
+ () => T.value.filter((A) => !r.value.includes(A.id)).map((A) => ({
1050
995
  // The count is part of the label rather than a column: a select draws a line of text, and
1051
996
  // the number is what the reader is choosing between two near-identical words on.
1052
997
  label: t("article.tag-option", { title: A.title, count: A.articles_count }),
1053
998
  value: A.id
1054
999
  }))
1055
- ), M = b(() => {
1056
- const A = h.value.trim();
1000
+ ), E = v(() => {
1001
+ const A = c.value.trim();
1057
1002
  if (A === "") return null;
1058
- const N = (H) => H.toLowerCase() === A.toLowerCase();
1059
- return T.value.some((H) => N(H.title)) ? null : A;
1003
+ const I = (K) => K.toLowerCase() === A.toLowerCase();
1004
+ return T.value.some((K) => I(K.title)) ? null : A;
1060
1005
  });
1061
- async function P() {
1006
+ async function F() {
1062
1007
  try {
1063
- T.value = await c.tags(h.value);
1064
- const A = new Map($.value);
1065
- for (const N of T.value) A.set(N.id, N.title);
1066
- $.value = A;
1008
+ T.value = await u.tags(c.value);
1009
+ const A = new Map(x.value);
1010
+ for (const I of T.value) A.set(I.id, I.title);
1011
+ x.value = A;
1067
1012
  } catch (A) {
1068
- L.danger(r(A));
1013
+ L.danger(s(A));
1069
1014
  }
1070
1015
  }
1016
+ function $(A) {
1017
+ c.value = A, clearTimeout(_), _ = setTimeout(() => {
1018
+ F();
1019
+ }, na);
1020
+ }
1071
1021
  function U(A) {
1072
- h.value = A, clearTimeout(k), k = setTimeout(() => {
1073
- P();
1074
- }, ca);
1022
+ typeof A != "number" || r.value.includes(A) || (r.value = [...r.value, A], c.value = "");
1075
1023
  }
1076
1024
  function R(A) {
1077
- typeof A != "number" || u.value.includes(A) || (u.value = [...u.value, A], h.value = "");
1025
+ r.value = r.value.filter((I) => I !== A);
1078
1026
  }
1079
- function W(A) {
1080
- u.value = u.value.filter((N) => N !== A);
1081
- }
1082
- async function O() {
1083
- const A = M.value;
1084
- if (!(A === null || d.value)) {
1085
- d.value = !0;
1027
+ async function M() {
1028
+ const A = E.value;
1029
+ if (!(A === null || o.value)) {
1030
+ o.value = !0;
1086
1031
  try {
1087
- const N = await c.createTag({ title: A });
1088
- $.value = new Map($.value).set(N.id, N.title), T.value = [N, ...T.value], R(N.id);
1089
- } catch (N) {
1090
- L.danger(r(N));
1032
+ const I = await u.createTag({ title: A });
1033
+ x.value = new Map(x.value).set(I.id, I.title), T.value = [I, ...T.value], U(I.id);
1034
+ } catch (I) {
1035
+ L.danger(s(I));
1091
1036
  } finally {
1092
- d.value = !1;
1037
+ o.value = !1;
1093
1038
  }
1094
1039
  }
1095
1040
  }
1096
- return oe(
1097
- () => l?.article.value?.id,
1041
+ return ue(
1042
+ () => a?.article.value?.id,
1098
1043
  () => {
1099
- P();
1044
+ F();
1100
1045
  },
1101
1046
  { immediate: !0 }
1102
- ), Fe(() => clearTimeout(k)), (A, N) => (p(), K("div", oa, [
1103
- S.value.length > 0 ? (p(), K("div", ua, [
1104
- (p(!0), K(ne, null, ze(S.value, (H) => (p(), V(e(re), {
1105
- key: H.id,
1047
+ ), Je(() => clearTimeout(_)), (A, I) => (p(), G("div", aa, [
1048
+ W.value.length > 0 ? (p(), G("div", la, [
1049
+ (p(!0), G(ve, null, Be(W.value, (K) => (p(), z(e(oe), {
1050
+ key: K.id,
1106
1051
  type: "default",
1107
1052
  class: "wx-article-tags__chip"
1108
1053
  }, {
1109
- default: a(() => [
1110
- g(f(H.title) + " ", 1),
1111
- n(e(Re), {
1054
+ default: l(() => [
1055
+ w(b(K.title) + " ", 1),
1056
+ n(e(Oe), {
1112
1057
  icon: "close",
1113
1058
  tone: "neutral",
1114
1059
  size: "sm",
1115
1060
  disabled: i.value,
1116
1061
  title: e(t)("article.tag-remove"),
1117
- onClick: (D) => W(H.id)
1062
+ onClick: (P) => R(K.id)
1118
1063
  }, null, 8, ["disabled", "title", "onClick"])
1119
1064
  ]),
1120
1065
  _: 2
1121
1066
  }, 1024))), 128))
1122
- ])) : (p(), V(e(G), {
1067
+ ])) : (p(), z(e(J), {
1123
1068
  key: 1,
1124
1069
  size: "sm",
1125
1070
  tone: "muted"
1126
1071
  }, {
1127
- default: a(() => [
1128
- g(f(e(t)("article.tags-empty")), 1)
1072
+ default: l(() => [
1073
+ w(b(e(t)("article.tags-empty")), 1)
1129
1074
  ]),
1130
1075
  _: 1
1131
1076
  })),
1132
- q("div", da, [
1133
- n(e(be), {
1077
+ j("div", ia, [
1078
+ n(e(_e), {
1134
1079
  "model-value": null,
1135
- options: C.value,
1080
+ options: S.value,
1136
1081
  placeholder: e(t)("article.tag-add"),
1137
1082
  "empty-text": e(t)("article.tag-nothing"),
1138
1083
  disabled: i.value,
1139
1084
  filterable: "",
1140
1085
  teleport: "",
1141
1086
  "aria-label": e(t)("article.tag-add"),
1142
- onSearch: U,
1143
- "onUpdate:modelValue": R
1087
+ onSearch: $,
1088
+ "onUpdate:modelValue": U
1144
1089
  }, null, 8, ["options", "placeholder", "empty-text", "disabled", "aria-label"]),
1145
- M.value ? (p(), V(e(F), {
1090
+ E.value ? (p(), z(e(Z), {
1146
1091
  key: 0,
1147
1092
  variant: "outline",
1148
1093
  icon: "plus",
1149
- loading: d.value,
1094
+ loading: o.value,
1150
1095
  disabled: i.value,
1151
- onClick: O
1096
+ onClick: M
1152
1097
  }, {
1153
- default: a(() => [
1154
- g(f(e(t)("article.tag-create", { title: M.value })), 1)
1098
+ default: l(() => [
1099
+ w(b(e(t)("article.tag-create", { title: E.value })), 1)
1155
1100
  ]),
1156
1101
  _: 1
1157
- }, 8, ["loading", "disabled"])) : I("", !0)
1102
+ }, 8, ["loading", "disabled"])) : H("", !0)
1158
1103
  ])
1159
1104
  ]));
1160
1105
  }
1161
- }), pa = /* @__PURE__ */ ce(va, [["__scopeId", "data-v-ce095e37"]]), ma = /* @__PURE__ */ ee({
1106
+ }), ra = /* @__PURE__ */ pe(sa, [["__scopeId", "data-v-ce095e37"]]), oa = /* @__PURE__ */ ee({
1162
1107
  __name: "ArticleCreateDialog",
1163
- setup(y) {
1164
- const { open: _, resolve: u, dismiss: x } = Ze(), c = se(), l = ue(c);
1165
- ae();
1166
- const t = te("webx-blog"), r = z(""), i = z(!1), $ = z({}), T = We("field");
1167
- Le(async () => {
1168
- await Ke(), T.value?.querySelector("input")?.focus();
1108
+ setup(f) {
1109
+ const { open: m, resolve: r, dismiss: y } = Ee(), u = ne(), a = de(u);
1110
+ te();
1111
+ const t = Q("webx-blog"), s = C(""), i = C(!1), x = C({}), T = De("field");
1112
+ Ne(async () => {
1113
+ await Ze(), T.value?.querySelector("input")?.focus();
1169
1114
  });
1170
- async function h() {
1171
- if (!(r.value.trim() === "" || i.value)) {
1172
- i.value = !0, $.value = {};
1115
+ async function c() {
1116
+ if (!(s.value.trim() === "" || i.value)) {
1117
+ i.value = !0, x.value = {};
1173
1118
  try {
1174
- u(await l.create({ title: r.value.trim() }));
1175
- } catch (d) {
1176
- $.value = d.body?.errors ?? {};
1119
+ r(await a.create({ title: s.value.trim() }));
1120
+ } catch (o) {
1121
+ x.value = o.body?.errors ?? {};
1177
1122
  } finally {
1178
1123
  i.value = !1;
1179
1124
  }
1180
1125
  }
1181
1126
  }
1182
- return (d, k) => (p(), V(e(Qe), {
1183
- open: e(_),
1184
- "onUpdate:open": k[2] || (k[2] = (S) => He(_) ? _.value = S : null),
1127
+ return (o, _) => (p(), z(e(Fe), {
1128
+ open: e(m),
1129
+ "onUpdate:open": _[2] || (_[2] = (W) => Ie(m) ? m.value = W : null),
1185
1130
  title: e(t)("panel.new-title"),
1186
1131
  width: 440
1187
1132
  }, {
1188
- footer: a(() => [
1189
- n(e(Xe), { size: "sm" }, {
1190
- default: a(() => [
1191
- n(e(F), {
1133
+ footer: l(() => [
1134
+ n(e(Le), { size: "sm" }, {
1135
+ default: l(() => [
1136
+ n(e(Z), {
1192
1137
  variant: "outline",
1193
- onClick: k[1] || (k[1] = (S) => e(x)())
1138
+ onClick: _[1] || (_[1] = (W) => e(y)())
1194
1139
  }, {
1195
- default: a(() => [
1196
- g(f(e(t)("panel.cancel")), 1)
1140
+ default: l(() => [
1141
+ w(b(e(t)("panel.cancel")), 1)
1197
1142
  ]),
1198
1143
  _: 1
1199
1144
  }),
1200
- n(e(F), {
1145
+ n(e(Z), {
1201
1146
  type: "primary",
1202
1147
  loading: i.value,
1203
- disabled: r.value.trim() === "",
1204
- onClick: h
1148
+ disabled: s.value.trim() === "",
1149
+ onClick: c
1205
1150
  }, {
1206
- default: a(() => [
1207
- g(f(e(t)("panel.create")), 1)
1151
+ default: l(() => [
1152
+ w(b(e(t)("panel.create")), 1)
1208
1153
  ]),
1209
1154
  _: 1
1210
1155
  }, 8, ["loading", "disabled"])
@@ -1212,22 +1157,22 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1212
1157
  _: 1
1213
1158
  })
1214
1159
  ]),
1215
- default: a(() => [
1216
- n(e(ge), {
1160
+ default: l(() => [
1161
+ n(e(ie), {
1217
1162
  label: e(t)("panel.field-title"),
1218
- error: $.value.title?.[0] ?? $.value.slug?.[0],
1163
+ error: x.value.title?.[0] ?? x.value.slug?.[0],
1219
1164
  required: ""
1220
1165
  }, {
1221
- default: a(() => [
1222
- q("div", {
1166
+ default: l(() => [
1167
+ j("div", {
1223
1168
  ref_key: "field",
1224
1169
  ref: T
1225
1170
  }, [
1226
- n(e($e), {
1227
- modelValue: r.value,
1228
- "onUpdate:modelValue": k[0] || (k[0] = (S) => r.value = S),
1171
+ n(e(Ae), {
1172
+ modelValue: s.value,
1173
+ "onUpdate:modelValue": _[0] || (_[0] = (W) => s.value = W),
1229
1174
  "aria-label": e(t)("panel.field-title"),
1230
- onKeyup: Ce(h, ["enter"])
1175
+ onKeyup: ze(c, ["enter"])
1231
1176
  }, null, 8, ["modelValue", "aria-label"])
1232
1177
  ], 512)
1233
1178
  ]),
@@ -1237,485 +1182,529 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1237
1182
  _: 1
1238
1183
  }, 8, ["open", "title"]));
1239
1184
  }
1240
- }), fa = { class: "wx-articles__filters" }, ga = ["src"], ba = { class: "wx-articles__name" }, ha = { class: "wx-articles__name-text" }, ya = { class: "wx-articles__title" }, _a = { class: "wx-articles__address" }, wa = { class: "wx-articles__chips" }, xa = { class: "wx-articles__state" }, ka = { class: "wx-articles__card" }, $a = ["src"], Ta = { class: "wx-articles__card-body" }, Va = { class: "wx-articles__card-title" }, Aa = { class: "wx-articles__card-meta" }, nt = 640, Ca = /* @__PURE__ */ ee({
1185
+ }), ua = ["src"], da = { class: "wx-articles__name" }, ca = { class: "wx-articles__name-text" }, va = { class: "wx-articles__title" }, pa = { class: "wx-articles__address" }, fa = { class: "wx-articles__chips" }, ma = { class: "wx-articles__state" }, nt = 640, ba = /* @__PURE__ */ ee({
1241
1186
  __name: "ArticlesPage",
1242
1187
  props: {
1243
1188
  base: { default: "/blog" }
1244
1189
  },
1245
- setup(y) {
1246
- const _ = y, u = se(), x = ue(u), c = qe(), l = Me();
1247
- ae();
1248
- const t = te("webx-blog"), r = me(), i = We("root"), $ = rt(i), T = z(null), h = z(!0), d = Ee(ma), k = b(() => u.can("blog.articles.manage")), S = b(
1249
- () => u.state.manifest?.modules.find((v) => v.id === "articles")?.title ?? t("module.articles")
1250
- ), C = b({
1251
- get: () => typeof c.query.view == "string" ? c.query.view : "",
1252
- set: (v) => {
1253
- l.replace({
1254
- query: { ...c.query, view: v === "" ? void 0 : String(v), page: void 0 }
1190
+ setup(f) {
1191
+ const m = f, r = ne(), y = de(r), u = He(), a = Ke();
1192
+ te();
1193
+ const t = Q("webx-blog"), s = Q("webx-admin"), i = ge(), x = De("root"), T = _t(x), c = C(null), o = C(!0), _ = Ce(oa), W = v(() => r.can("blog.articles.manage")), S = v(
1194
+ () => r.state.manifest?.modules.find((d) => d.id === "articles")?.title ?? t("module.articles")
1195
+ ), E = v({
1196
+ get: () => typeof u.query.view == "string" ? u.query.view : "",
1197
+ set: (d) => {
1198
+ a.replace({
1199
+ query: { ...u.query, view: d === "" ? void 0 : String(d), page: void 0 }
1255
1200
  });
1256
1201
  }
1257
- }), M = b(() => C.value === "trashed"), P = b(() => ({
1258
- q: typeof c.query.q == "string" ? c.query.q : "",
1259
- rubric: U(c.query.rubric),
1260
- tag: U(c.query.tag),
1261
- author: U(c.query.author),
1262
- sort: typeof c.query.sort == "string" ? c.query.sort : null,
1263
- page: Number(c.query.page ?? 1) || 1
1202
+ }), F = v(() => E.value === "trashed"), $ = v(() => ({
1203
+ q: typeof u.query.q == "string" ? u.query.q : "",
1204
+ rubric: U(u.query.rubric),
1205
+ tag: U(u.query.tag),
1206
+ author: U(u.query.author),
1207
+ sort: typeof u.query.sort == "string" ? u.query.sort : null,
1208
+ page: Number(u.query.page ?? 1) || 1
1264
1209
  }));
1265
- function U(v) {
1266
- return typeof v == "string" && v !== "" && Number(v) || null;
1210
+ function U(d) {
1211
+ return typeof d == "string" && d !== "" && Number(d) || null;
1267
1212
  }
1268
- const R = b(() => [
1213
+ const R = v(() => [
1269
1214
  { value: "", label: t("panel.view-all") },
1270
1215
  { value: "published", label: t("panel.view-published") },
1271
1216
  { value: "scheduled", label: t("panel.view-scheduled") },
1272
1217
  { value: "draft", label: t("panel.view-draft") },
1273
1218
  { value: "unpublished", label: t("panel.view-unpublished") },
1274
1219
  { value: "trashed", label: t("panel.bin"), icon: "trash" }
1275
- ]), W = b(() => T.value?.filters ?? { rubrics: [], tags: [], authors: [] }), O = b(() => $.value > 0 && $.value < nt), A = b(() => O.value ? [{ key: "card", label: "" }] : [
1220
+ ]), M = v(() => c.value?.filters ?? { rubrics: [], tags: [], authors: [] }), A = v(() => T.value > 0 && T.value < nt), I = v(() => A.value ? [{ key: "card", label: "" }] : [
1276
1221
  { key: "cover", label: "", width: 68 },
1222
+ /* The one that takes what the others leave, and the only one without a number. */
1277
1223
  { key: "title", label: t("panel.column-title"), minWidth: 220 },
1278
- { key: "rubrics", label: t("panel.column-rubrics"), width: 190, hideBelow: 840 },
1279
- { key: "author", label: t("panel.column-author"), width: 160, hideBelow: 1e3 },
1224
+ { key: "rubrics", label: t("panel.column-rubrics"), width: 190, hideBelow: 1e3 },
1225
+ { key: "author", label: t("panel.column-author"), width: 160, hideBelow: 1200 },
1280
1226
  {
1281
1227
  key: "date",
1282
- label: M.value ? t("panel.column-deleted") : t("panel.column-date"),
1283
- width: 130,
1228
+ label: F.value ? t("panel.column-deleted") : t("panel.column-date"),
1229
+ width: 120,
1284
1230
  hideBelow: 700,
1285
1231
  // "today at 16:22" is three words the table will break over two lines given half a
1286
1232
  // chance, and a date read down a column has to be one line to be read at all.
1287
1233
  cellClass: "wx-articles__when"
1288
1234
  },
1289
- { key: "status", label: t("panel.column-status"), width: 150 },
1290
- { key: "actions", label: "", width: 56, align: "right" }
1291
- ]), N = b(() => P.value.q !== "" ? t("panel.empty-search") : M.value ? t("panel.empty-bin") : t("panel.empty"));
1292
- async function H(v) {
1293
- h.value = !0;
1235
+ { key: "status", label: t("panel.column-status"), width: 170 },
1236
+ { key: "actions", label: "", width: st, align: "right" }
1237
+ ]), K = v(() => $.value.q !== "" ? t("panel.empty-search") : F.value ? t("panel.empty-bin") : t("panel.empty")), P = v(() => {
1238
+ const d = [], D = M.value.rubrics.find((V) => V.id === $.value.rubric);
1239
+ D && d.push({
1240
+ key: "rubric",
1241
+ label: `${t("panel.filter-rubric")}: ${D.title}`,
1242
+ clear: () => O("rubric", void 0)
1243
+ });
1244
+ const h = M.value.tags.find((V) => V.id === $.value.tag);
1245
+ h && d.push({
1246
+ key: "tag",
1247
+ label: `${t("panel.filter-tag")}: ${h.title}`,
1248
+ clear: () => O("tag", void 0)
1249
+ });
1250
+ const $e = M.value.authors.find((V) => V.id === $.value.author);
1251
+ return $e && d.push({
1252
+ key: "author",
1253
+ label: `${t("panel.filter-author")}: ${$e.title}`,
1254
+ clear: () => O("author", void 0)
1255
+ }), d;
1256
+ });
1257
+ function q() {
1258
+ a.replace({
1259
+ query: {
1260
+ ...u.query,
1261
+ rubric: void 0,
1262
+ tag: void 0,
1263
+ author: void 0,
1264
+ page: void 0
1265
+ }
1266
+ });
1267
+ }
1268
+ async function k(d) {
1269
+ o.value = !0;
1294
1270
  try {
1295
- T.value = await x.articles({
1296
- q: v?.search ?? P.value.q,
1297
- status: M.value ? "" : C.value,
1298
- trashed: M.value,
1299
- rubric: P.value.rubric,
1300
- tag: P.value.tag,
1301
- author: P.value.author,
1302
- sort: v?.sort ? `${v.sort.order === "desc" ? "-" : ""}${v.sort.key}` : null,
1303
- page: v?.page ?? P.value.page,
1304
- per_page: v?.perPage
1271
+ c.value = await y.articles({
1272
+ q: d?.search ?? $.value.q,
1273
+ status: F.value ? "" : E.value,
1274
+ trashed: F.value,
1275
+ rubric: $.value.rubric,
1276
+ tag: $.value.tag,
1277
+ author: $.value.author,
1278
+ sort: d?.sort ? `${d.sort.order === "desc" ? "-" : ""}${d.sort.key}` : null,
1279
+ page: d?.page ?? $.value.page,
1280
+ per_page: d?.perPage
1305
1281
  });
1306
- } catch (o) {
1307
- L.danger(r(o));
1282
+ } catch (D) {
1283
+ L.danger(i(D));
1308
1284
  } finally {
1309
- h.value = !1;
1285
+ o.value = !1;
1310
1286
  }
1311
1287
  }
1312
- function D(v) {
1313
- const o = {
1314
- ...c.query,
1315
- q: v.search === "" ? void 0 : v.search,
1316
- sort: v.sort === null ? void 0 : `${v.sort.order === "desc" ? "-" : ""}${v.sort.key}`,
1317
- page: v.page === 1 ? void 0 : String(v.page)
1288
+ function le(d) {
1289
+ const D = {
1290
+ ...u.query,
1291
+ q: d.search === "" ? void 0 : d.search,
1292
+ sort: d.sort === null ? void 0 : `${d.sort.order === "desc" ? "-" : ""}${d.sort.key}`,
1293
+ page: d.page === 1 ? void 0 : String(d.page)
1318
1294
  };
1319
- l.replace({ query: o }), H(v);
1295
+ a.replace({ query: D }), k(d);
1320
1296
  }
1321
- function m(v, o) {
1322
- l.replace({
1297
+ function O(d, D) {
1298
+ a.replace({
1323
1299
  query: {
1324
- ...c.query,
1325
- [v]: typeof o == "number" ? String(o) : void 0,
1300
+ ...u.query,
1301
+ [d]: typeof D == "number" ? String(D) : void 0,
1326
1302
  page: void 0
1327
1303
  }
1328
1304
  });
1329
1305
  }
1330
- oe(
1331
- () => [C.value, P.value.rubric, P.value.tag, P.value.author],
1306
+ ue(
1307
+ () => [E.value, $.value.rubric, $.value.tag, $.value.author],
1332
1308
  () => {
1333
- H();
1309
+ k();
1334
1310
  }
1335
- ), H();
1336
- function E(v) {
1337
- const o = `${_.base}/articles/${v.id}`;
1338
- l.resolve(o).matched.length > 0 && l.push({ path: o, query: { ...c.query } });
1339
- }
1340
- async function j() {
1341
- const v = await d({});
1342
- v && (await H(), E(v));
1343
- }
1344
- function de(v) {
1345
- if (!k.value) return [];
1346
- if (M.value)
1311
+ ), k();
1312
+ function se(d) {
1313
+ const D = `${m.base}/articles/${d.id}`;
1314
+ a.resolve(D).matched.length > 0 && a.push({ path: D, query: { ...u.query } });
1315
+ }
1316
+ async function xe() {
1317
+ const d = await _({});
1318
+ d && (await k(), se(d));
1319
+ }
1320
+ function ce(d) {
1321
+ if (!W.value) return [];
1322
+ if (F.value)
1347
1323
  return [
1348
1324
  {
1349
1325
  key: "restore",
1350
1326
  icon: "refresh",
1351
1327
  label: t("panel.restore"),
1352
1328
  run: () => {
1353
- he(v);
1329
+ re(d);
1354
1330
  }
1355
1331
  }
1356
1332
  ];
1357
- const o = [
1358
- { key: "open", icon: "edit", label: t("panel.open"), run: () => E(v) }
1333
+ const D = [
1334
+ { key: "open", icon: "edit", label: t("panel.open"), run: () => se(d) }
1359
1335
  ];
1360
- return v.url && v.status !== "draft" && o.push({
1336
+ return d.url && d.status !== "draft" && D.push({
1361
1337
  key: "site",
1362
1338
  icon: "external-link",
1363
1339
  label: t("panel.open-on-site"),
1364
- href: v.url
1365
- }), v.path !== null && o.push({
1340
+ href: d.url
1341
+ }), d.path !== null && D.push({
1366
1342
  key: "copy",
1367
1343
  icon: "copy",
1368
1344
  label: t("panel.copy-address"),
1369
1345
  run: () => {
1370
- fe(v);
1346
+ g(d);
1371
1347
  }
1372
- }), o.push({
1348
+ }), D.push({
1373
1349
  key: "pin",
1374
1350
  icon: "star",
1375
- label: v.pinned ? t("panel.unpin") : t("panel.pin"),
1351
+ label: d.pinned ? t("panel.unpin") : t("panel.pin"),
1376
1352
  run: () => {
1377
- J(v, !v.pinned);
1353
+ ke(d, !d.pinned);
1378
1354
  }
1379
- }), o.push(
1380
- v.status === "published" || v.status === "modified" || v.status === "scheduled" ? {
1355
+ }), D.push(
1356
+ d.status === "published" || d.status === "modified" || d.status === "scheduled" ? {
1381
1357
  key: "unpublish",
1382
1358
  icon: "eye-off",
1383
1359
  label: t("panel.unpublish"),
1384
1360
  run: () => {
1385
- ve(v);
1361
+ Te(d);
1386
1362
  }
1387
1363
  } : {
1388
1364
  key: "publish",
1389
1365
  icon: "upload",
1390
1366
  label: t("panel.publish"),
1391
1367
  run: () => {
1392
- Ve(v);
1368
+ he(d);
1393
1369
  }
1394
1370
  }
1395
- ), o.push({
1371
+ ), D.push({
1396
1372
  key: "delete",
1397
1373
  icon: "trash",
1398
1374
  label: t("panel.delete"),
1399
1375
  danger: !0,
1400
1376
  run: () => {
1401
- we(v);
1377
+ fe(d);
1402
1378
  }
1403
- }), o;
1379
+ }), D;
1404
1380
  }
1405
- async function Ve(v) {
1406
- await Q(() => x.publish(v.id), t("panel.published"));
1381
+ async function he(d) {
1382
+ await me(() => y.publish(d.id), t("panel.published"));
1407
1383
  }
1408
- async function ve(v) {
1409
- await Q(() => x.unpublish(v.id), t("panel.unpublished-done"));
1384
+ async function Te(d) {
1385
+ await me(() => y.unpublish(d.id), t("panel.unpublished-done"));
1410
1386
  }
1411
- async function J(v, o) {
1412
- await Q(
1413
- () => x.save(v.id, { values: { pinned: o }, revision: v.revision }),
1414
- t(o ? "panel.pinned-done" : "panel.unpinned")
1387
+ async function ke(d, D) {
1388
+ await me(
1389
+ () => y.save(d.id, { values: { pinned: D }, revision: d.revision }),
1390
+ t(D ? "panel.pinned-done" : "panel.unpinned")
1415
1391
  );
1416
1392
  }
1417
- async function we(v) {
1418
- await pe({
1419
- title: t("panel.delete-title", { title: v.title }),
1393
+ async function fe(d) {
1394
+ await be({
1395
+ title: t("panel.delete-title", { title: d.title }),
1420
1396
  message: t("panel.delete-text"),
1421
1397
  confirmText: t("panel.delete"),
1422
1398
  cancelText: t("panel.cancel"),
1423
1399
  tone: "danger"
1424
- }) && await Q(() => x.remove(v.id), t("panel.deleted"));
1400
+ }) && await me(() => y.remove(d.id), t("panel.deleted"));
1425
1401
  }
1426
- async function he(v) {
1427
- await Q(() => x.restore(v.id), t("panel.restored"));
1402
+ async function re(d) {
1403
+ await me(() => y.restore(d.id), t("panel.restored"));
1428
1404
  }
1429
- async function Q(v, o) {
1405
+ async function me(d, D) {
1430
1406
  try {
1431
- await v(), L.success(o);
1432
- } catch (s) {
1433
- L.danger(r(s));
1407
+ await d(), L.success(D);
1408
+ } catch (h) {
1409
+ L.danger(i(h));
1434
1410
  } finally {
1435
- await H();
1411
+ await k();
1436
1412
  }
1437
1413
  }
1438
- async function fe(v) {
1439
- if (v.url)
1414
+ async function g(d) {
1415
+ if (d.url)
1440
1416
  try {
1441
- await navigator.clipboard.writeText(v.url), L.success(t("panel.address-copied"));
1417
+ await navigator.clipboard.writeText(d.url), L.success(t("panel.address-copied"));
1442
1418
  } catch {
1443
1419
  }
1444
1420
  }
1445
- function ye(v) {
1446
- return v === "published" || v === "modified" ? "success" : v === "scheduled" ? "warning" : "default";
1421
+ function N(d) {
1422
+ return d === "published" || d === "modified" ? "success" : d === "scheduled" ? "warning" : "default";
1447
1423
  }
1448
- function _e(v) {
1449
- return M.value ? "—" : v.path === null ? t("panel.no-address") : `/${v.path}`;
1424
+ function B(d) {
1425
+ return F.value ? "—" : d.path === null ? t("panel.no-address") : `/${d.path}`;
1450
1426
  }
1451
- function ie(v) {
1452
- return M.value ? v.deleted_at : v.published_at;
1427
+ function X(d) {
1428
+ return F.value ? d.deleted_at : d.published_at;
1453
1429
  }
1454
- return (v, o) => (p(), K("div", {
1430
+ const ye = v(
1431
+ () => W.value ? [{ key: "new", label: t("panel.new"), icon: "plus", primary: !0, run: () => {
1432
+ xe();
1433
+ } }] : []
1434
+ );
1435
+ return (d, D) => (p(), G("div", {
1455
1436
  ref_key: "root",
1456
- ref: i,
1437
+ ref: x,
1457
1438
  class: "wx-articles"
1458
1439
  }, [
1459
- n(e(je), {
1460
- view: C.value,
1461
- "onUpdate:view": o[3] || (o[3] = (s) => C.value = s),
1440
+ n(e(Qe), {
1441
+ view: E.value,
1442
+ "onUpdate:view": D[3] || (D[3] = (h) => E.value = h),
1462
1443
  title: S.value,
1463
- views: R.value
1464
- }, st({
1465
- default: a(() => [
1466
- n(e(ut), {
1467
- data: T.value,
1468
- columns: A.value,
1444
+ views: R.value,
1445
+ actions: ye.value
1446
+ }, {
1447
+ default: l(() => [
1448
+ n(e(ot), {
1449
+ data: c.value,
1450
+ columns: I.value,
1469
1451
  "row-key": "id",
1470
1452
  searchable: "",
1471
- clickable: !M.value,
1472
- hover: !M.value,
1453
+ clickable: !F.value,
1454
+ hover: !F.value,
1473
1455
  flush: "",
1456
+ loading: o.value,
1474
1457
  layout: "fixed",
1475
- loading: h.value,
1476
1458
  "cards-below": nt,
1459
+ "filters-count": P.value.length,
1460
+ "filters-label": e(s)("filters.title"),
1477
1461
  "search-placeholder": e(t)("panel.search"),
1478
- "empty-text": N.value,
1462
+ "empty-text": K.value,
1479
1463
  "aria-label": S.value,
1480
- onRowClick: E,
1481
- onStateChange: D
1464
+ onRowClick: se,
1465
+ onStateChange: le
1482
1466
  }, {
1483
- actions: a(() => [
1484
- q("div", fa, [
1485
- n(e(be), {
1486
- "model-value": P.value.rubric,
1487
- options: W.value.rubrics.map((s) => ({ value: s.id, label: s.title })),
1488
- placeholder: e(t)("panel.any-rubric"),
1489
- clearable: "",
1490
- size: "sm",
1491
- "onUpdate:modelValue": o[0] || (o[0] = (s) => m("rubric", s))
1492
- }, null, 8, ["model-value", "options", "placeholder"]),
1493
- n(e(be), {
1494
- "model-value": P.value.tag,
1495
- options: W.value.tags.map((s) => ({ value: s.id, label: s.title })),
1496
- placeholder: e(t)("panel.any-tag"),
1497
- clearable: "",
1498
- filterable: "",
1499
- size: "sm",
1500
- "onUpdate:modelValue": o[1] || (o[1] = (s) => m("tag", s))
1501
- }, null, 8, ["model-value", "options", "placeholder"]),
1502
- n(e(be), {
1503
- "model-value": P.value.author,
1504
- options: W.value.authors.map((s) => ({ value: s.id, label: s.title })),
1505
- placeholder: e(t)("panel.any-author"),
1506
- clearable: "",
1507
- size: "sm",
1508
- "onUpdate:modelValue": o[2] || (o[2] = (s) => m("author", s))
1509
- }, null, 8, ["model-value", "options", "placeholder"])
1510
- ])
1467
+ filters: l(() => [
1468
+ n(e(ie), {
1469
+ label: e(t)("panel.filter-rubric")
1470
+ }, {
1471
+ default: l(() => [
1472
+ n(e(_e), {
1473
+ "model-value": $.value.rubric,
1474
+ options: M.value.rubrics.map((h) => ({ value: h.id, label: h.title })),
1475
+ placeholder: e(t)("panel.any-rubric"),
1476
+ clearable: "",
1477
+ size: "sm",
1478
+ "onUpdate:modelValue": D[0] || (D[0] = (h) => O("rubric", h))
1479
+ }, null, 8, ["model-value", "options", "placeholder"])
1480
+ ]),
1481
+ _: 1
1482
+ }, 8, ["label"]),
1483
+ n(e(ie), {
1484
+ label: e(t)("panel.filter-tag")
1485
+ }, {
1486
+ default: l(() => [
1487
+ n(e(_e), {
1488
+ "model-value": $.value.tag,
1489
+ options: M.value.tags.map((h) => ({ value: h.id, label: h.title })),
1490
+ placeholder: e(t)("panel.any-tag"),
1491
+ clearable: "",
1492
+ filterable: "",
1493
+ size: "sm",
1494
+ "onUpdate:modelValue": D[1] || (D[1] = (h) => O("tag", h))
1495
+ }, null, 8, ["model-value", "options", "placeholder"])
1496
+ ]),
1497
+ _: 1
1498
+ }, 8, ["label"]),
1499
+ n(e(ie), {
1500
+ label: e(t)("panel.filter-author")
1501
+ }, {
1502
+ default: l(() => [
1503
+ n(e(_e), {
1504
+ "model-value": $.value.author,
1505
+ options: M.value.authors.map((h) => ({ value: h.id, label: h.title })),
1506
+ placeholder: e(t)("panel.any-author"),
1507
+ clearable: "",
1508
+ size: "sm",
1509
+ "onUpdate:modelValue": D[2] || (D[2] = (h) => O("author", h))
1510
+ }, null, 8, ["model-value", "options", "placeholder"])
1511
+ ]),
1512
+ _: 1
1513
+ }, 8, ["label"]),
1514
+ P.value.length > 0 ? (p(), z(e(Z), {
1515
+ key: 0,
1516
+ variant: "text",
1517
+ size: "sm",
1518
+ block: "",
1519
+ onClick: q
1520
+ }, {
1521
+ icon: l(() => [
1522
+ n(e(we), { name: "close" })
1523
+ ]),
1524
+ default: l(() => [
1525
+ w(" " + b(e(s)("filters.reset")), 1)
1526
+ ]),
1527
+ _: 1
1528
+ })) : H("", !0)
1529
+ ]),
1530
+ applied: l(() => [
1531
+ n(e(ht), { filters: P.value }, null, 8, ["filters"])
1511
1532
  ]),
1512
- "cell-cover": a(({ row: s }) => [
1513
- q("span", {
1514
- class: Ae(["wx-articles__cover", { "is-empty": !s.cover }])
1533
+ "cell-cover": l(({ row: h }) => [
1534
+ j("span", {
1535
+ class: Pe(["wx-articles__cover", { "is-empty": !h.cover }])
1515
1536
  }, [
1516
- s.cover?.thumb ? (p(), K("img", {
1537
+ h.cover?.thumb ? (p(), G("img", {
1517
1538
  key: 0,
1518
- src: s.cover.thumb,
1539
+ src: h.cover.thumb,
1519
1540
  alt: "",
1520
1541
  loading: "lazy"
1521
- }, null, 8, ga)) : (p(), V(e(Y), {
1542
+ }, null, 8, ua)) : (p(), z(e(we), {
1522
1543
  key: 1,
1523
1544
  name: "image",
1524
1545
  size: "sm"
1525
1546
  }))
1526
1547
  ], 2)
1527
1548
  ]),
1528
- "cell-title": a(({ row: s }) => [
1529
- q("div", ba, [
1530
- s.pinned ? (p(), V(e(Ye), {
1549
+ "cell-title": l(({ row: h }) => [
1550
+ j("div", da, [
1551
+ h.pinned ? (p(), z(e(et), {
1531
1552
  key: 0,
1532
1553
  content: e(t)("panel.pinned")
1533
1554
  }, {
1534
- default: a(() => [
1535
- n(e(Y), {
1555
+ default: l(() => [
1556
+ n(e(we), {
1536
1557
  class: "wx-articles__pin",
1537
1558
  name: "star",
1538
1559
  size: "sm"
1539
1560
  })
1540
1561
  ]),
1541
1562
  _: 1
1542
- }, 8, ["content"])) : I("", !0),
1543
- q("div", ha, [
1544
- q("span", ya, f(s.title), 1),
1545
- q("span", _a, f(_e(s)), 1)
1563
+ }, 8, ["content"])) : H("", !0),
1564
+ j("div", ca, [
1565
+ j("span", va, b(h.title), 1),
1566
+ j("span", pa, b(B(h)), 1)
1546
1567
  ])
1547
1568
  ])
1548
1569
  ]),
1549
- "cell-rubrics": a(({ row: s }) => [
1550
- q("span", wa, [
1551
- (p(!0), K(ne, null, ze(s.rubrics, (w) => (p(), V(e(re), {
1552
- key: w.id,
1570
+ "cell-rubrics": l(({ row: h }) => [
1571
+ j("span", fa, [
1572
+ (p(!0), G(ve, null, Be(h.rubrics, ($e) => (p(), z(e(oe), {
1573
+ key: $e.id,
1553
1574
  size: "sm",
1554
1575
  round: ""
1555
1576
  }, {
1556
- default: a(() => [
1557
- g(f(w.title), 1)
1577
+ default: l(() => [
1578
+ w(b($e.title), 1)
1558
1579
  ]),
1559
1580
  _: 2
1560
1581
  }, 1024))), 128))
1561
1582
  ])
1562
1583
  ]),
1563
- "cell-author": a(({ row: s }) => [
1564
- n(e(G), {
1584
+ "cell-author": l(({ row: h }) => [
1585
+ n(e(J), {
1565
1586
  size: "sm",
1566
1587
  tone: "muted",
1567
1588
  truncate: ""
1568
1589
  }, {
1569
- default: a(() => [
1570
- g(f(s.author ? s.author.name : "—"), 1)
1590
+ default: l(() => [
1591
+ w(b(h.author ? h.author.name : "—"), 1)
1571
1592
  ]),
1572
1593
  _: 2
1573
1594
  }, 1024)
1574
1595
  ]),
1575
- "cell-date": a(({ row: s }) => [
1576
- ie(s) ? (p(), V(e(De), {
1596
+ "cell-date": l(({ row: h }) => [
1597
+ X(h) ? (p(), z(e(je), {
1577
1598
  key: 0,
1578
- value: ie(s)
1579
- }, null, 8, ["value"])) : (p(), V(e(G), {
1599
+ value: X(h),
1600
+ compact: ""
1601
+ }, null, 8, ["value"])) : (p(), z(e(J), {
1580
1602
  key: 1,
1581
1603
  size: "sm",
1582
1604
  tone: "muted"
1583
1605
  }, {
1584
- default: a(() => [...o[4] || (o[4] = [
1585
- g("—", -1)
1606
+ default: l(() => [...D[4] || (D[4] = [
1607
+ w("—", -1)
1586
1608
  ])]),
1587
1609
  _: 1
1588
1610
  }))
1589
1611
  ]),
1590
- "cell-status": a(({ row: s }) => [
1591
- q("span", xa, [
1592
- n(e(re), {
1593
- type: ye(s.status),
1612
+ "cell-status": l(({ row: h }) => [
1613
+ j("span", ma, [
1614
+ n(e(oe), {
1615
+ type: N(h.status),
1594
1616
  dot: "",
1595
1617
  size: "sm"
1596
1618
  }, {
1597
- default: a(() => [
1598
- g(f(e(t)(`panel.status-${s.status}`)), 1)
1619
+ default: l(() => [
1620
+ w(b(e(t)(`panel.status-${h.status}`)), 1)
1599
1621
  ]),
1600
1622
  _: 2
1601
1623
  }, 1032, ["type"]),
1602
- s.status === "modified" ? (p(), V(e(re), {
1624
+ h.status === "modified" ? (p(), z(e(oe), {
1603
1625
  key: 0,
1604
1626
  type: "primary",
1605
1627
  size: "sm",
1606
1628
  round: ""
1607
1629
  }, {
1608
- default: a(() => [
1609
- g(f(e(t)("panel.edits")), 1)
1630
+ default: l(() => [
1631
+ w(b(e(t)("panel.edits")), 1)
1610
1632
  ]),
1611
1633
  _: 1
1612
- })) : I("", !0)
1634
+ })) : H("", !0)
1613
1635
  ])
1614
1636
  ]),
1615
- "cell-card": a(({ row: s }) => [
1616
- q("div", ka, [
1617
- q("span", {
1618
- class: Ae(["wx-articles__cover is-card", { "is-empty": !s.cover }])
1619
- }, [
1620
- s.cover?.thumb ? (p(), K("img", {
1637
+ "cell-card": l(({ row: h }) => [
1638
+ n(e(xt), {
1639
+ class: "wx-articles__entity",
1640
+ variant: "plain",
1641
+ title: h.title,
1642
+ image: h.cover?.thumb ?? void 0,
1643
+ "image-size": "56px",
1644
+ "title-lines": 2,
1645
+ subtitle: B(h)
1646
+ }, {
1647
+ title: l(() => [
1648
+ h.pinned ? (p(), z(e(we), {
1621
1649
  key: 0,
1622
- src: s.cover.thumb,
1623
- alt: "",
1624
- loading: "lazy"
1625
- }, null, 8, $a)) : (p(), V(e(Y), {
1626
- key: 1,
1627
- name: "image",
1650
+ class: "wx-articles__pin",
1651
+ name: "star",
1628
1652
  size: "sm"
1629
- }))
1630
- ], 2),
1631
- q("div", Ta, [
1632
- q("div", Va, [
1633
- s.pinned ? (p(), V(e(Y), {
1634
- key: 0,
1635
- class: "wx-articles__pin",
1636
- name: "star",
1637
- size: "sm"
1638
- })) : I("", !0),
1639
- q("span", null, f(s.title), 1)
1640
- ]),
1641
- q("div", Aa, [
1642
- s.rubrics[0] ? (p(), V(e(re), {
1643
- key: 0,
1644
- size: "sm",
1645
- round: ""
1646
- }, {
1647
- default: a(() => [
1648
- g(f(s.rubrics[0].title), 1)
1649
- ]),
1650
- _: 2
1651
- }, 1024)) : I("", !0),
1652
- n(e(re), {
1653
- type: ye(s.status),
1654
- dot: "",
1655
- size: "sm"
1656
- }, {
1657
- default: a(() => [
1658
- g(f(e(t)(`panel.status-${s.status}`)), 1)
1659
- ]),
1660
- _: 2
1661
- }, 1032, ["type"]),
1662
- ie(s) ? (p(), V(e(De), {
1663
- key: 1,
1664
- value: ie(s)
1665
- }, null, 8, ["value"])) : I("", !0),
1666
- s.author ? (p(), V(e(G), {
1667
- key: 2,
1668
- size: "sm",
1669
- tone: "muted",
1670
- truncate: ""
1671
- }, {
1672
- default: a(() => [
1673
- g(f(s.author.name), 1)
1674
- ]),
1675
- _: 2
1676
- }, 1024)) : I("", !0)
1677
- ])
1653
+ })) : H("", !0),
1654
+ w(" " + b(h.title), 1)
1678
1655
  ]),
1679
- n(e(Ie), {
1680
- actions: de(s),
1681
- label: s.title
1682
- }, null, 8, ["actions", "label"])
1683
- ])
1656
+ meta: l(() => [
1657
+ h.rubrics[0] ? (p(), z(e(oe), {
1658
+ key: 0,
1659
+ size: "sm",
1660
+ round: ""
1661
+ }, {
1662
+ default: l(() => [
1663
+ w(b(h.rubrics[0].title), 1)
1664
+ ]),
1665
+ _: 2
1666
+ }, 1024)) : H("", !0),
1667
+ n(e(oe), {
1668
+ type: N(h.status),
1669
+ dot: "",
1670
+ size: "sm"
1671
+ }, {
1672
+ default: l(() => [
1673
+ w(b(e(t)(`panel.status-${h.status}`)), 1)
1674
+ ]),
1675
+ _: 2
1676
+ }, 1032, ["type"]),
1677
+ X(h) ? (p(), z(e(je), {
1678
+ key: 1,
1679
+ value: X(h)
1680
+ }, null, 8, ["value"])) : H("", !0)
1681
+ ]),
1682
+ _: 2
1683
+ }, 1032, ["title", "image", "subtitle"])
1684
+ ]),
1685
+ "card-actions": l(({ row: h }) => [
1686
+ n(e(Re), {
1687
+ actions: ce(h),
1688
+ label: h.title
1689
+ }, null, 8, ["actions", "label"])
1684
1690
  ]),
1685
- "cell-actions": a(({ row: s }) => [
1686
- n(e(Ie), {
1687
- actions: de(s),
1688
- label: s.title
1691
+ "cell-actions": l(({ row: h }) => [
1692
+ n(e(Re), {
1693
+ actions: ce(h),
1694
+ label: h.title
1689
1695
  }, null, 8, ["actions", "label"])
1690
1696
  ]),
1691
1697
  _: 1
1692
- }, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text", "aria-label"])
1698
+ }, 8, ["data", "columns", "clickable", "hover", "loading", "filters-count", "filters-label", "search-placeholder", "empty-text", "aria-label"])
1693
1699
  ]),
1694
- _: 2
1695
- }, [
1696
- k.value ? {
1697
- name: "actions",
1698
- fn: a(() => [
1699
- n(e(F), {
1700
- type: "primary",
1701
- icon: "plus",
1702
- onClick: j
1703
- }, {
1704
- default: a(() => [
1705
- g(f(e(t)("panel.new")), 1)
1706
- ]),
1707
- _: 1
1708
- })
1709
- ]),
1710
- key: "0"
1711
- } : void 0
1712
- ]), 1032, ["view", "title", "views"])
1700
+ _: 1
1701
+ }, 8, ["view", "title", "views", "actions"])
1713
1702
  ], 512));
1714
1703
  }
1715
- }), Sa = /* @__PURE__ */ ce(Ca, [["__scopeId", "data-v-0bea5efe"]]), Wa = { class: "wx-rubric-form__head" }, za = { class: "wx-rubric-form__body" }, Ra = { class: "wx-rubric-form__row" }, Ua = { class: "wx-rubric-form__row" }, Ba = { class: "wx-rubric-form__side" }, Na = {
1704
+ }), ga = /* @__PURE__ */ pe(ba, [["__scopeId", "data-v-2d93df26"]]), ha = { class: "wx-rubric-form__head" }, ya = { class: "wx-rubric-form__body" }, wa = { class: "wx-rubric-form__row" }, _a = { class: "wx-rubric-form__row" }, xa = { class: "wx-rubric-form__side" }, ka = {
1716
1705
  key: 1,
1717
1706
  class: "wx-rubric-form__seo"
1718
- }, qa = { class: "wx-rubric-form__foot" }, Ma = /* @__PURE__ */ ee({
1707
+ }, $a = { class: "wx-rubric-form__foot" }, Ta = /* @__PURE__ */ ee({
1719
1708
  __name: "RubricForm",
1720
1709
  props: {
1721
1710
  rubric: {},
@@ -1724,13 +1713,13 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1724
1713
  disabled: { type: Boolean, default: !1 }
1725
1714
  },
1726
1715
  emits: ["back", "saved", "deleted", "articles"],
1727
- setup(y, { emit: _ }) {
1728
- const u = y, x = _, c = se(), l = ue(c), t = Ge();
1729
- ae();
1730
- const r = te("webx-blog"), i = me(), $ = b(() => c.types["wx-media"]?.component), T = b(() => c.types["wx-seo"]?.component), h = b(
1731
- () => c.types["wx-seo"]?.bind?.({ id: "seo", type: "wx-seo" }) ?? {}
1732
- ), d = z(M()), k = z({}), S = z(!1), C = z(!1);
1733
- function M() {
1716
+ setup(f, { emit: m }) {
1717
+ const r = f, y = m, u = ne(), a = de(u), t = Xe();
1718
+ te();
1719
+ const s = Q("webx-blog"), i = ge(), x = v(() => u.types["wx-media"]?.component), T = v(() => u.types["wx-seo"]?.component), c = v(
1720
+ () => u.types["wx-seo"]?.bind?.({ id: "seo", type: "wx-seo" }) ?? {}
1721
+ ), o = C(E()), _ = C({}), W = C(!1), S = C(!1);
1722
+ function E() {
1734
1723
  return {
1735
1724
  title: {},
1736
1725
  slug: {},
@@ -1740,433 +1729,424 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1740
1729
  seo: {}
1741
1730
  };
1742
1731
  }
1743
- oe(
1744
- () => u.rubric,
1745
- (D) => {
1746
- if (k.value = {}, C.value = !1, D === null) {
1747
- d.value = M();
1732
+ ue(
1733
+ () => r.rubric,
1734
+ (P) => {
1735
+ if (_.value = {}, S.value = !1, P === null) {
1736
+ o.value = E();
1748
1737
  return;
1749
1738
  }
1750
- d.value = {
1751
- title: { ...D.title },
1752
- slug: { ...D.slug },
1753
- lead: { ...D.lead },
1754
- cover: D.cover ? { path: D.cover.path, url: D.cover.url } : null,
1755
- is_visible: D.is_visible,
1756
- seo: { ...D.seo }
1757
- }, C.value = Object.keys(D.seo ?? {}).length > 0;
1739
+ o.value = {
1740
+ title: { ...P.title },
1741
+ slug: { ...P.slug },
1742
+ lead: { ...P.lead },
1743
+ cover: P.cover ? { path: P.cover.path, url: P.cover.url } : null,
1744
+ is_visible: P.is_visible,
1745
+ seo: { ...P.seo }
1746
+ }, S.value = Object.keys(P.seo ?? {}).length > 0;
1758
1747
  },
1759
1748
  { immediate: !0 }
1760
1749
  );
1761
- const P = b(
1762
- () => d.value.title[t.active.value] || u.rubric?.name || r("rubric.new")
1763
- ), U = b(() => {
1764
- const D = d.value.slug[t.active.value] ?? "";
1765
- return D === "" ? null : `/${[u.prefix, D].filter(Boolean).join("/")}`;
1766
- }), R = b(() => {
1767
- const D = u.rubric?.path;
1768
- return typeof D == "string" && U.value !== null && U.value !== `/${D}`;
1769
- }), W = b(() => u.rubric?.articles_count ?? 0);
1770
- function O(D) {
1771
- const m = Object.keys(k.value).find(
1772
- (E) => E === D || E.startsWith(`${D}.`)
1750
+ const F = v(
1751
+ () => o.value.title[t.active.value] || r.rubric?.name || s("rubric.new")
1752
+ ), $ = v(() => {
1753
+ const P = o.value.slug[t.active.value] ?? "";
1754
+ return P === "" ? null : `/${[r.prefix, P].filter(Boolean).join("/")}`;
1755
+ }), U = v(() => {
1756
+ const P = r.rubric?.path;
1757
+ return typeof P == "string" && $.value !== null && $.value !== `/${P}`;
1758
+ }), R = v(() => r.rubric?.articles_count ?? 0);
1759
+ function M(P) {
1760
+ const q = Object.keys(_.value).find(
1761
+ (k) => k === P || k.startsWith(`${P}.`)
1773
1762
  );
1774
- return m === void 0 ? void 0 : k.value[m]?.[0];
1763
+ return q === void 0 ? void 0 : _.value[q]?.[0];
1775
1764
  }
1776
1765
  function A() {
1777
1766
  return {
1778
- title: d.value.title,
1779
- slug: d.value.slug,
1780
- lead: d.value.lead,
1781
- cover: d.value.cover === null ? null : { path: d.value.cover.path },
1782
- is_visible: d.value.is_visible,
1767
+ title: o.value.title,
1768
+ slug: o.value.slug,
1769
+ lead: o.value.lead,
1770
+ cover: o.value.cover === null ? null : { path: o.value.cover.path },
1771
+ is_visible: o.value.is_visible,
1783
1772
  // Only when it was opened: a save of the rest of the form must not empty a card nobody
1784
1773
  // looked at, and an untouched card is the rules being left in charge (§12).
1785
- ...C.value ? { seo: d.value.seo } : {}
1774
+ ...S.value ? { seo: o.value.seo } : {}
1786
1775
  };
1787
1776
  }
1788
- async function N() {
1789
- S.value = !0, k.value = {};
1777
+ async function I() {
1778
+ W.value = !0, _.value = {};
1790
1779
  try {
1791
- const D = u.rubric === null ? await l.createRubric(A()) : await l.saveRubric(u.rubric.id, A());
1792
- L.success(u.rubric === null ? r("rubric.created") : r("rubric.saved")), x("saved", D);
1793
- } catch (D) {
1794
- const m = D.body;
1795
- m?.errors && (k.value = m.errors), L.danger(i(D));
1780
+ const P = r.rubric === null ? await a.createRubric(A()) : await a.saveRubric(r.rubric.id, A());
1781
+ L.success(r.rubric === null ? s("rubric.created") : s("rubric.saved")), y("saved", P);
1782
+ } catch (P) {
1783
+ const q = P.body;
1784
+ q?.errors && (_.value = q.errors), L.danger(i(P));
1796
1785
  } finally {
1797
- S.value = !1;
1786
+ W.value = !1;
1798
1787
  }
1799
1788
  }
1800
- async function H() {
1801
- if (!(u.rubric === null || !await pe({
1802
- title: r("rubric.delete-title", { name: u.rubric.name }),
1803
- message: r("rubric.delete-text"),
1804
- confirmText: r("rubric.delete"),
1805
- cancelText: r("rubric.cancel"),
1789
+ async function K() {
1790
+ if (!(r.rubric === null || !await be({
1791
+ title: s("rubric.delete-title", { name: r.rubric.name }),
1792
+ message: s("rubric.delete-text"),
1793
+ confirmText: s("rubric.delete"),
1794
+ cancelText: s("rubric.cancel"),
1806
1795
  tone: "danger"
1807
1796
  })))
1808
1797
  try {
1809
- await l.removeRubric(u.rubric.id), L.success(r("rubric.deleted")), x("deleted");
1810
- } catch (m) {
1811
- L.danger(i(m));
1798
+ await a.removeRubric(r.rubric.id), L.success(s("rubric.deleted")), y("deleted");
1799
+ } catch (q) {
1800
+ L.danger(i(q));
1812
1801
  }
1813
1802
  }
1814
- return (D, m) => (p(), K("div", {
1815
- class: Ae(["wx-rubric-form", { "is-pane": u.inline }])
1803
+ return (P, q) => (p(), G("div", {
1804
+ class: Pe(["wx-rubric-form", { "is-pane": r.inline }])
1816
1805
  }, [
1817
- q("div", Wa, [
1818
- u.inline ? I("", !0) : (p(), V(e(Re), {
1806
+ j("div", ha, [
1807
+ r.inline ? H("", !0) : (p(), z(e(Oe), {
1819
1808
  key: 0,
1820
1809
  icon: "arrow-left",
1821
- title: e(r)("rubric.back"),
1822
- onClick: m[0] || (m[0] = (E) => x("back"))
1810
+ title: e(s)("rubric.back"),
1811
+ onClick: q[0] || (q[0] = (k) => y("back"))
1823
1812
  }, null, 8, ["title"])),
1824
1813
  n(e(kt), {
1825
1814
  level: 3,
1826
1815
  truncate: ""
1827
1816
  }, {
1828
- default: a(() => [
1829
- g(f(P.value), 1)
1817
+ default: l(() => [
1818
+ w(b(F.value), 1)
1830
1819
  ]),
1831
1820
  _: 1
1832
1821
  }),
1833
- u.rubric ? (p(), V(e(G), {
1822
+ r.rubric ? (p(), z(e(J), {
1834
1823
  key: 1,
1835
1824
  size: "sm",
1836
1825
  tone: "muted"
1837
1826
  }, {
1838
- default: a(() => [
1839
- g(f(e(r)("rubric.articles", { count: W.value })), 1)
1827
+ default: l(() => [
1828
+ w(b(e(s)("rubric.articles", { count: R.value })), 1)
1840
1829
  ]),
1841
1830
  _: 1
1842
- })) : I("", !0),
1843
- m[10] || (m[10] = q("span", { class: "wx-rubric-form__spacer" }, null, -1)),
1844
- u.rubric && W.value > 0 ? (p(), V(e(F), {
1831
+ })) : H("", !0),
1832
+ q[10] || (q[10] = j("span", { class: "wx-rubric-form__spacer" }, null, -1)),
1833
+ r.rubric && R.value > 0 ? (p(), z(e(Z), {
1845
1834
  key: 2,
1846
1835
  variant: "text",
1847
1836
  size: "sm",
1848
- onClick: m[1] || (m[1] = (E) => x("articles", u.rubric))
1837
+ onClick: q[1] || (q[1] = (k) => y("articles", r.rubric))
1849
1838
  }, {
1850
- default: a(() => [
1851
- g(f(e(r)("rubric.show-articles")), 1)
1839
+ default: l(() => [
1840
+ w(b(e(s)("rubric.show-articles")), 1)
1852
1841
  ]),
1853
1842
  _: 1
1854
- })) : I("", !0)
1843
+ })) : H("", !0)
1855
1844
  ]),
1856
- q("div", za, [
1857
- q("div", Ra, [
1858
- n(e(ge), {
1845
+ j("div", ya, [
1846
+ j("div", wa, [
1847
+ n(e(ie), {
1859
1848
  class: "wx-rubric-form__title",
1860
- label: e(r)("rubric.field-title"),
1861
- error: O("title"),
1849
+ label: e(s)("rubric.field-title"),
1850
+ error: M("title"),
1862
1851
  required: ""
1863
1852
  }, {
1864
- default: a(() => [
1865
- n(e($e), {
1866
- modelValue: d.value.title,
1867
- "onUpdate:modelValue": m[2] || (m[2] = (E) => d.value.title = E),
1853
+ default: l(() => [
1854
+ n(e(Ae), {
1855
+ modelValue: o.value.title,
1856
+ "onUpdate:modelValue": q[2] || (q[2] = (k) => o.value.title = k),
1868
1857
  localized: "",
1869
- disabled: u.disabled
1858
+ disabled: r.disabled
1870
1859
  }, null, 8, ["modelValue", "disabled"])
1871
1860
  ]),
1872
1861
  _: 1
1873
1862
  }, 8, ["label", "error"]),
1874
- n(e(ge), {
1863
+ n(e(ie), {
1875
1864
  class: "wx-rubric-form__slug",
1876
- label: e(r)("rubric.field-slug"),
1877
- error: O("slug"),
1878
- help: U.value ?? e(r)("rubric.no-address")
1865
+ label: e(s)("rubric.field-slug"),
1866
+ error: M("slug"),
1867
+ help: $.value ?? e(s)("rubric.no-address")
1879
1868
  }, {
1880
- default: a(() => [
1881
- n(e($e), {
1882
- modelValue: d.value.slug,
1883
- "onUpdate:modelValue": m[3] || (m[3] = (E) => d.value.slug = E),
1869
+ default: l(() => [
1870
+ n(e(Ae), {
1871
+ modelValue: o.value.slug,
1872
+ "onUpdate:modelValue": q[3] || (q[3] = (k) => o.value.slug = k),
1884
1873
  localized: "",
1885
- disabled: u.disabled
1874
+ disabled: r.disabled
1886
1875
  }, null, 8, ["modelValue", "disabled"])
1887
1876
  ]),
1888
1877
  _: 1
1889
1878
  }, 8, ["label", "error", "help"])
1890
1879
  ]),
1891
- R.value ? (p(), V(e(Se), {
1880
+ U.value ? (p(), z(e(We), {
1892
1881
  key: 0,
1893
1882
  type: "info",
1894
1883
  variant: "soft",
1895
- description: e(r)("rubric.address-moving")
1896
- }, null, 8, ["description"])) : I("", !0),
1897
- n(e(ge), {
1898
- label: e(r)("rubric.field-lead"),
1899
- help: e(r)("rubric.lead-help"),
1884
+ description: e(s)("rubric.address-moving")
1885
+ }, null, 8, ["description"])) : H("", !0),
1886
+ n(e(ie), {
1887
+ label: e(s)("rubric.field-lead"),
1888
+ help: e(s)("rubric.lead-help"),
1900
1889
  wide: ""
1901
1890
  }, {
1902
- default: a(() => [
1891
+ default: l(() => [
1903
1892
  n(e($t), {
1904
- modelValue: d.value.lead,
1905
- "onUpdate:modelValue": m[4] || (m[4] = (E) => d.value.lead = E),
1893
+ modelValue: o.value.lead,
1894
+ "onUpdate:modelValue": q[4] || (q[4] = (k) => o.value.lead = k),
1906
1895
  localized: "",
1907
1896
  rows: 3,
1908
- disabled: u.disabled
1897
+ disabled: r.disabled
1909
1898
  }, null, 8, ["modelValue", "disabled"])
1910
1899
  ]),
1911
1900
  _: 1
1912
1901
  }, 8, ["label", "help"]),
1913
- q("div", Ua, [
1914
- $.value ? (p(), V(tt($.value), {
1902
+ j("div", _a, [
1903
+ x.value ? (p(), z(tt(x.value), {
1915
1904
  key: 0,
1916
- modelValue: d.value.cover,
1917
- "onUpdate:modelValue": m[5] || (m[5] = (E) => d.value.cover = E),
1905
+ modelValue: o.value.cover,
1906
+ "onUpdate:modelValue": q[5] || (q[5] = (k) => o.value.cover = k),
1918
1907
  class: "wx-rubric-form__cover",
1919
- label: e(r)("rubric.field-cover"),
1908
+ label: e(s)("rubric.field-cover"),
1920
1909
  accept: "image",
1921
1910
  captions: !1,
1922
1911
  aspect: "16/9",
1923
- disabled: u.disabled
1924
- }, null, 8, ["modelValue", "label", "disabled"])) : I("", !0),
1925
- q("div", Ba, [
1912
+ disabled: r.disabled
1913
+ }, null, 8, ["modelValue", "label", "disabled"])) : H("", !0),
1914
+ j("div", xa, [
1926
1915
  n(e(Tt), {
1927
- modelValue: d.value.is_visible,
1928
- "onUpdate:modelValue": m[6] || (m[6] = (E) => d.value.is_visible = E),
1929
- label: e(r)("rubric.visible"),
1930
- disabled: u.disabled
1916
+ modelValue: o.value.is_visible,
1917
+ "onUpdate:modelValue": q[6] || (q[6] = (k) => o.value.is_visible = k),
1918
+ label: e(s)("rubric.visible"),
1919
+ disabled: r.disabled
1931
1920
  }, null, 8, ["modelValue", "label", "disabled"]),
1932
- n(e(G), {
1921
+ n(e(J), {
1933
1922
  size: "sm",
1934
1923
  tone: "muted"
1935
1924
  }, {
1936
- default: a(() => [
1937
- g(f(e(r)("rubric.visible-help")), 1)
1925
+ default: l(() => [
1926
+ w(b(e(s)("rubric.visible-help")), 1)
1938
1927
  ]),
1939
1928
  _: 1
1940
1929
  })
1941
1930
  ])
1942
1931
  ]),
1943
- T.value ? (p(), K("div", Na, [
1944
- C.value ? (p(), V(tt(T.value), gt({
1932
+ T.value ? (p(), G("div", ka, [
1933
+ S.value ? (p(), z(tt(T.value), pt({
1945
1934
  key: 1,
1946
- modelValue: d.value.seo,
1947
- "onUpdate:modelValue": m[8] || (m[8] = (E) => d.value.seo = E)
1948
- }, h.value, {
1935
+ modelValue: o.value.seo,
1936
+ "onUpdate:modelValue": q[8] || (q[8] = (k) => o.value.seo = k)
1937
+ }, c.value, {
1949
1938
  "structured-data": !1,
1950
- disabled: u.disabled
1951
- }), null, 16, ["modelValue", "disabled"])) : (p(), K(ne, { key: 0 }, [
1952
- n(e(G), {
1939
+ disabled: r.disabled
1940
+ }), null, 16, ["modelValue", "disabled"])) : (p(), G(ve, { key: 0 }, [
1941
+ n(e(J), {
1953
1942
  size: "sm",
1954
1943
  weight: "medium"
1955
1944
  }, {
1956
- default: a(() => [
1957
- g(f(e(r)("rubric.seo")), 1)
1945
+ default: l(() => [
1946
+ w(b(e(s)("rubric.seo")), 1)
1958
1947
  ]),
1959
1948
  _: 1
1960
1949
  }),
1961
- n(e(G), {
1950
+ n(e(J), {
1962
1951
  size: "sm",
1963
1952
  tone: "muted"
1964
1953
  }, {
1965
- default: a(() => [
1966
- g(f(e(r)("rubric.seo-help")), 1)
1954
+ default: l(() => [
1955
+ w(b(e(s)("rubric.seo-help")), 1)
1967
1956
  ]),
1968
1957
  _: 1
1969
1958
  }),
1970
- n(e(F), {
1959
+ n(e(Z), {
1971
1960
  variant: "text",
1972
1961
  size: "sm",
1973
- disabled: u.disabled,
1974
- onClick: m[7] || (m[7] = (E) => C.value = !0)
1962
+ disabled: r.disabled,
1963
+ onClick: q[7] || (q[7] = (k) => S.value = !0)
1975
1964
  }, {
1976
- default: a(() => [
1977
- g(f(e(r)("rubric.seo-override", { name: P.value })), 1)
1965
+ default: l(() => [
1966
+ w(b(e(s)("rubric.seo-override", { name: F.value })), 1)
1978
1967
  ]),
1979
1968
  _: 1
1980
1969
  }, 8, ["disabled"])
1981
1970
  ], 64))
1982
- ])) : I("", !0)
1971
+ ])) : H("", !0)
1983
1972
  ]),
1984
- q("div", qa, [
1985
- u.rubric ? (p(), K(ne, { key: 0 }, [
1986
- n(e(F), {
1973
+ j("div", $a, [
1974
+ r.rubric ? (p(), G(ve, { key: 0 }, [
1975
+ n(e(Z), {
1987
1976
  variant: "outline",
1988
1977
  type: "danger",
1989
- disabled: u.disabled || W.value > 0,
1990
- onClick: H
1978
+ disabled: r.disabled || R.value > 0,
1979
+ onClick: K
1991
1980
  }, {
1992
- icon: a(() => [
1993
- n(e(Y), { name: "trash" })
1981
+ icon: l(() => [
1982
+ n(e(we), { name: "trash" })
1994
1983
  ]),
1995
- default: a(() => [
1996
- g(" " + f(e(r)("rubric.delete")), 1)
1984
+ default: l(() => [
1985
+ w(" " + b(e(s)("rubric.delete")), 1)
1997
1986
  ]),
1998
1987
  _: 1
1999
1988
  }, 8, ["disabled"]),
2000
- W.value > 0 ? (p(), V(e(G), {
1989
+ R.value > 0 ? (p(), z(e(J), {
2001
1990
  key: 0,
2002
1991
  size: "sm",
2003
1992
  tone: "muted"
2004
1993
  }, {
2005
- default: a(() => [
2006
- g(f(e(r)("rubric.delete-blocked")), 1)
1994
+ default: l(() => [
1995
+ w(b(e(s)("rubric.delete-blocked")), 1)
2007
1996
  ]),
2008
1997
  _: 1
2009
- })) : I("", !0)
2010
- ], 64)) : I("", !0),
2011
- m[11] || (m[11] = q("span", { class: "wx-rubric-form__spacer" }, null, -1)),
2012
- n(e(F), {
1998
+ })) : H("", !0)
1999
+ ], 64)) : H("", !0),
2000
+ q[11] || (q[11] = j("span", { class: "wx-rubric-form__spacer" }, null, -1)),
2001
+ n(e(Z), {
2013
2002
  variant: "outline",
2014
- onClick: m[9] || (m[9] = (E) => x("back"))
2003
+ onClick: q[9] || (q[9] = (k) => y("back"))
2015
2004
  }, {
2016
- default: a(() => [
2017
- g(f(e(r)("rubric.cancel")), 1)
2005
+ default: l(() => [
2006
+ w(b(e(s)("rubric.cancel")), 1)
2018
2007
  ]),
2019
2008
  _: 1
2020
2009
  }),
2021
- n(e(F), {
2010
+ n(e(Z), {
2022
2011
  type: "primary",
2023
- loading: S.value,
2024
- disabled: u.disabled,
2025
- onClick: N
2012
+ loading: W.value,
2013
+ disabled: r.disabled,
2014
+ onClick: I
2026
2015
  }, {
2027
- default: a(() => [
2028
- g(f(e(r)("rubric.save")), 1)
2016
+ default: l(() => [
2017
+ w(b(e(s)("rubric.save")), 1)
2029
2018
  ]),
2030
2019
  _: 1
2031
2020
  }, 8, ["loading", "disabled"])
2032
2021
  ])
2033
2022
  ], 2));
2034
2023
  }
2035
- }), Pa = /* @__PURE__ */ ce(Ma, [["__scopeId", "data-v-ace40cf4"]]), Da = ["onClick"], Ia = { class: "wx-rubric-row__name" }, Oa = /* @__PURE__ */ ee({
2024
+ }), Va = /* @__PURE__ */ pe(Ta, [["__scopeId", "data-v-ace40cf4"]]), Aa = ["onClick"], Sa = { class: "wx-rubric-row__name" }, Wa = /* @__PURE__ */ ee({
2036
2025
  __name: "RubricsPage",
2037
2026
  props: {
2038
2027
  base: { default: "/blog" }
2039
2028
  },
2040
- setup(y) {
2041
- const _ = y, u = se(), x = ue(u), c = qe(), l = Me();
2042
- ae();
2043
- const t = te("webx-blog"), r = me(), i = z([]), $ = z(""), T = z(!0), h = z(!1), d = z(!1), k = b(() => u.can("blog.taxonomy.manage")), S = b(
2044
- () => u.state.manifest?.modules.find((m) => m.id === "rubrics")?.title ?? t("module.rubrics")
2045
- ), C = b(() => {
2046
- const m = c.query.rubric;
2047
- return typeof m == "string" && m !== "" ? Number(m) : null;
2048
- }), M = b(() => i.value.find((m) => m.id === C.value) ?? null);
2049
- async function P() {
2029
+ setup(f) {
2030
+ const m = f, r = ne(), y = de(r), u = He(), a = Ke();
2031
+ te();
2032
+ const t = Q("webx-blog"), s = ge(), i = C([]), x = C(""), T = C(!0), c = C(!1), o = C(!1), _ = v(() => r.can("blog.taxonomy.manage")), W = v(
2033
+ () => r.state.manifest?.modules.find((k) => k.id === "rubrics")?.title ?? t("module.rubrics")
2034
+ ), S = v(() => {
2035
+ const k = u.query.rubric;
2036
+ return typeof k == "string" && k !== "" ? Number(k) : null;
2037
+ }), E = v(() => i.value.find((k) => k.id === S.value) ?? null);
2038
+ async function F() {
2050
2039
  T.value = !0;
2051
2040
  try {
2052
- const m = await x.rubrics();
2053
- i.value = m.data, $.value = m.prefix;
2054
- } catch (m) {
2055
- L.danger(r(m));
2041
+ const k = await y.rubrics();
2042
+ i.value = k.data, x.value = k.prefix;
2043
+ } catch (k) {
2044
+ L.danger(s(k));
2056
2045
  } finally {
2057
2046
  T.value = !1;
2058
2047
  }
2059
2048
  }
2060
- P(), oe(M, (m) => {
2061
- m !== null && (h.value = !0);
2049
+ F(), ue(E, (k) => {
2050
+ k !== null && (c.value = !0);
2062
2051
  });
2063
- function U(m) {
2064
- d.value = !1, l.replace({ query: { ...c.query, rubric: String(m.id) } }), h.value = !0;
2052
+ function $(k) {
2053
+ o.value = !1, a.replace({ query: { ...u.query, rubric: String(k.id) } }), c.value = !0;
2065
2054
  }
2066
- function R() {
2067
- d.value = !0, W(), h.value = !0;
2055
+ function U() {
2056
+ o.value = !0, R(), c.value = !0;
2068
2057
  }
2069
- function W() {
2070
- const m = { ...c.query };
2071
- delete m.rubric, l.replace({ query: m });
2058
+ function R() {
2059
+ const k = { ...u.query };
2060
+ delete k.rubric, a.replace({ query: k });
2072
2061
  }
2073
- async function O(m) {
2074
- d.value = !1, await P(), l.replace({ query: { ...c.query, rubric: String(m.id) } });
2062
+ async function M(k) {
2063
+ o.value = !1, await F(), a.replace({ query: { ...u.query, rubric: String(k.id) } });
2075
2064
  }
2076
2065
  async function A() {
2077
- d.value = !1, W(), h.value = !1, await P();
2066
+ o.value = !1, R(), c.value = !1, await F();
2078
2067
  }
2079
- function N() {
2080
- d.value = !1, W(), h.value = !1;
2068
+ function I() {
2069
+ o.value = !1, R(), c.value = !1;
2081
2070
  }
2082
- function H(m) {
2083
- l.push({ path: `${_.base}/articles`, query: { rubric: String(m.id) } });
2071
+ function K(k) {
2072
+ a.push({ path: `${m.base}/articles`, query: { rubric: String(k.id) } });
2084
2073
  }
2085
- async function D() {
2074
+ const P = v(
2075
+ () => _.value ? [{ key: "new", label: t("rubric.new"), icon: "plus", primary: !0, run: () => {
2076
+ U();
2077
+ } }] : []
2078
+ );
2079
+ async function q() {
2086
2080
  try {
2087
- await x.sortRubrics(i.value.map((m) => m.id));
2088
- } catch (m) {
2089
- L.danger(r(m, t("rubric.reorder-failed"))), await P();
2081
+ await y.sortRubrics(i.value.map((k) => k.id));
2082
+ } catch (k) {
2083
+ L.danger(s(k, t("rubric.reorder-failed"))), await F();
2090
2084
  }
2091
2085
  }
2092
- return (m, E) => (p(), V(e(je), {
2093
- title: S.value,
2086
+ return (k, le) => (p(), z(e(Qe), {
2087
+ title: W.value,
2088
+ actions: P.value,
2094
2089
  card: !1,
2095
2090
  fill: ""
2096
2091
  }, {
2097
- actions: a(() => [
2098
- k.value ? (p(), V(e(F), {
2099
- key: 0,
2100
- type: "primary",
2101
- onClick: R
2102
- }, {
2103
- icon: a(() => [
2104
- n(e(Y), { name: "plus" })
2105
- ]),
2106
- default: a(() => [
2107
- g(" " + f(e(t)("rubric.new")), 1)
2108
- ]),
2109
- _: 1
2110
- })) : I("", !0)
2111
- ]),
2112
- default: a(() => [
2092
+ default: l(() => [
2113
2093
  n(e(Vt), {
2114
2094
  class: "wx-rubrics",
2115
2095
  padding: "none"
2116
2096
  }, {
2117
- default: a(() => [
2097
+ default: l(() => [
2118
2098
  n(e(At), {
2119
- open: h.value,
2120
- "onUpdate:open": E[1] || (E[1] = (j) => h.value = j),
2099
+ open: c.value,
2100
+ "onUpdate:open": le[1] || (le[1] = (O) => c.value = O),
2121
2101
  class: "wx-rubrics__panes",
2122
2102
  "list-width": 320,
2123
2103
  "detail-min": 440,
2124
- "detail-label": M.value ? M.value.name : e(t)("rubric.new")
2104
+ "detail-label": E.value ? E.value.name : e(t)("rubric.new")
2125
2105
  }, {
2126
- list: a(() => [
2127
- T.value ? (p(), V(e(Ue), {
2106
+ list: l(() => [
2107
+ T.value ? (p(), z(e(Ue), {
2128
2108
  key: 0,
2129
2109
  class: "wx-rubrics__loading",
2130
2110
  rows: 5
2131
- })) : i.value.length === 0 ? (p(), V(e(Oe), {
2111
+ })) : i.value.length === 0 ? (p(), z(e(Ge), {
2132
2112
  key: 1,
2133
2113
  title: e(t)("rubric.empty"),
2134
2114
  description: e(t)("rubric.empty-help")
2135
- }, null, 8, ["title", "description"])) : (p(), V(e(Je), {
2115
+ }, null, 8, ["title", "description"])) : (p(), z(e(Ye), {
2136
2116
  key: 2,
2137
2117
  modelValue: i.value,
2138
- "onUpdate:modelValue": E[0] || (E[0] = (j) => i.value = j),
2118
+ "onUpdate:modelValue": le[0] || (le[0] = (O) => i.value = O),
2139
2119
  class: "wx-rubrics__list",
2140
2120
  plain: "",
2141
2121
  size: "sm",
2142
2122
  "item-key": "id",
2143
- "item-label": (j) => j.name,
2144
- disabled: !k.value,
2123
+ "item-label": (O) => O.name,
2124
+ disabled: !_.value,
2145
2125
  title: e(t)("rubric.order"),
2146
- onMove: D
2126
+ onMove: q
2147
2127
  }, {
2148
- default: a(({ item: j }) => [
2149
- q("button", {
2128
+ default: l(({ item: O }) => [
2129
+ j("button", {
2150
2130
  type: "button",
2151
- class: Ae(["wx-rubric-row", { "is-current": j.id === C.value, "is-hidden": !j.is_visible }]),
2152
- onClick: (de) => U(j)
2131
+ class: Pe(["wx-rubric-row", { "is-current": O.id === S.value, "is-hidden": !O.is_visible }]),
2132
+ onClick: (se) => $(O)
2153
2133
  }, [
2154
- q("span", Ia, [
2155
- n(e(G), {
2134
+ j("span", Sa, [
2135
+ n(e(J), {
2156
2136
  truncate: "",
2157
2137
  weight: "medium"
2158
2138
  }, {
2159
- default: a(() => [
2160
- g(f(j.name), 1)
2139
+ default: l(() => [
2140
+ w(b(O.name), 1)
2161
2141
  ]),
2162
2142
  _: 2
2163
2143
  }, 1024),
2164
- j.is_visible ? I("", !0) : (p(), V(e(Ye), {
2144
+ O.is_visible ? H("", !0) : (p(), z(e(et), {
2165
2145
  key: 0,
2166
2146
  content: e(t)("rubric.hidden")
2167
2147
  }, {
2168
- default: a(() => [
2169
- n(e(Y), {
2148
+ default: l(() => [
2149
+ n(e(we), {
2170
2150
  name: "eye-off",
2171
2151
  size: "sm"
2172
2152
  })
@@ -2174,26 +2154,26 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2174
2154
  _: 1
2175
2155
  }, 8, ["content"]))
2176
2156
  ]),
2177
- n(e(G), {
2157
+ n(e(J), {
2178
2158
  size: "sm",
2179
2159
  tone: "muted",
2180
2160
  truncate: ""
2181
2161
  }, {
2182
- default: a(() => [
2183
- g(f(j.path === null ? e(t)("rubric.no-address") : `/${j.path}`), 1)
2162
+ default: l(() => [
2163
+ w(b(O.path === null ? e(t)("rubric.no-address") : `/${O.path}`), 1)
2184
2164
  ]),
2185
2165
  _: 2
2186
2166
  }, 1024)
2187
- ], 10, Da)
2167
+ ], 10, Aa)
2188
2168
  ]),
2189
- actions: a(({ item: j }) => [
2190
- n(e(G), {
2169
+ actions: l(({ item: O }) => [
2170
+ n(e(J), {
2191
2171
  class: "wx-rubric-row__count",
2192
2172
  size: "sm",
2193
2173
  tone: "muted"
2194
2174
  }, {
2195
- default: a(() => [
2196
- g(f(j.articles_count), 1)
2175
+ default: l(() => [
2176
+ w(b(O.articles_count), 1)
2197
2177
  ]),
2198
2178
  _: 2
2199
2179
  }, 1024)
@@ -2201,25 +2181,25 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2201
2181
  _: 1
2202
2182
  }, 8, ["modelValue", "item-label", "disabled", "title"]))
2203
2183
  ]),
2204
- empty: a(() => [
2205
- n(e(Oe), {
2184
+ empty: l(() => [
2185
+ n(e(Ge), {
2206
2186
  description: e(t)("rubric.choose")
2207
2187
  }, null, 8, ["description"])
2208
2188
  ]),
2209
- detail: a(({ inline: j, back: de }) => [
2210
- d.value || M.value ? (p(), V(Pa, {
2211
- key: d.value ? "new" : String(M.value?.id),
2212
- rubric: d.value ? null : M.value,
2213
- prefix: $.value,
2214
- inline: j,
2215
- disabled: !k.value,
2189
+ detail: l(({ inline: O, back: se }) => [
2190
+ o.value || E.value ? (p(), z(Va, {
2191
+ key: o.value ? "new" : String(E.value?.id),
2192
+ rubric: o.value ? null : E.value,
2193
+ prefix: x.value,
2194
+ inline: O,
2195
+ disabled: !_.value,
2216
2196
  onBack: () => {
2217
- de(), N();
2197
+ se(), I();
2218
2198
  },
2219
- onArticles: H,
2220
- onSaved: O,
2199
+ onArticles: K,
2200
+ onSaved: M,
2221
2201
  onDeleted: A
2222
- }, null, 8, ["rubric", "prefix", "inline", "disabled", "onBack"])) : I("", !0)
2202
+ }, null, 8, ["rubric", "prefix", "inline", "disabled", "onBack"])) : H("", !0)
2223
2203
  ]),
2224
2204
  _: 1
2225
2205
  }, 8, ["open", "detail-label"])
@@ -2228,60 +2208,60 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2228
2208
  })
2229
2209
  ]),
2230
2210
  _: 1
2231
- }, 8, ["title"]));
2211
+ }, 8, ["title", "actions"]));
2232
2212
  }
2233
- }), Ea = /* @__PURE__ */ ee({
2213
+ }), Ca = /* @__PURE__ */ ee({
2234
2214
  __name: "TagCreateDialog",
2235
- setup(y) {
2236
- const { open: _, resolve: u, dismiss: x } = Ze(), c = se(), l = ue(c);
2237
- ae();
2238
- const t = te("webx-blog"), r = z(""), i = z(""), $ = z(!1), T = z({}), h = We("field");
2239
- Le(async () => {
2240
- await Ke(), h.value?.querySelector("input")?.focus();
2215
+ setup(f) {
2216
+ const { open: m, resolve: r, dismiss: y } = Ee(), u = ne(), a = de(u);
2217
+ te();
2218
+ const t = Q("webx-blog"), s = C(""), i = C(""), x = C(!1), T = C({}), c = De("field");
2219
+ Ne(async () => {
2220
+ await Ze(), c.value?.querySelector("input")?.focus();
2241
2221
  });
2242
- async function d() {
2243
- if (!(r.value.trim() === "" || $.value)) {
2244
- $.value = !0, T.value = {};
2222
+ async function o() {
2223
+ if (!(s.value.trim() === "" || x.value)) {
2224
+ x.value = !0, T.value = {};
2245
2225
  try {
2246
- u(
2247
- await l.createTag({
2248
- title: r.value.trim(),
2226
+ r(
2227
+ await a.createTag({
2228
+ title: s.value.trim(),
2249
2229
  ...i.value.trim() === "" ? {} : { slug: i.value.trim() }
2250
2230
  })
2251
2231
  );
2252
- } catch (k) {
2253
- T.value = k.body?.errors ?? {};
2232
+ } catch (_) {
2233
+ T.value = _.body?.errors ?? {};
2254
2234
  } finally {
2255
- $.value = !1;
2235
+ x.value = !1;
2256
2236
  }
2257
2237
  }
2258
2238
  }
2259
- return (k, S) => (p(), V(e(Qe), {
2260
- open: e(_),
2261
- "onUpdate:open": S[3] || (S[3] = (C) => He(_) ? _.value = C : null),
2239
+ return (_, W) => (p(), z(e(Fe), {
2240
+ open: e(m),
2241
+ "onUpdate:open": W[3] || (W[3] = (S) => Ie(m) ? m.value = S : null),
2262
2242
  title: e(t)("tag.new-title"),
2263
2243
  width: 440
2264
2244
  }, {
2265
- footer: a(() => [
2266
- n(e(Xe), { size: "sm" }, {
2267
- default: a(() => [
2268
- n(e(F), {
2245
+ footer: l(() => [
2246
+ n(e(Le), { size: "sm" }, {
2247
+ default: l(() => [
2248
+ n(e(Z), {
2269
2249
  variant: "outline",
2270
- onClick: S[2] || (S[2] = (C) => e(x)())
2250
+ onClick: W[2] || (W[2] = (S) => e(y)())
2271
2251
  }, {
2272
- default: a(() => [
2273
- g(f(e(t)("tag.cancel")), 1)
2252
+ default: l(() => [
2253
+ w(b(e(t)("tag.cancel")), 1)
2274
2254
  ]),
2275
2255
  _: 1
2276
2256
  }),
2277
- n(e(F), {
2257
+ n(e(Z), {
2278
2258
  type: "primary",
2279
- loading: $.value,
2280
- disabled: r.value.trim() === "",
2281
- onClick: d
2259
+ loading: x.value,
2260
+ disabled: s.value.trim() === "",
2261
+ onClick: o
2282
2262
  }, {
2283
- default: a(() => [
2284
- g(f(e(t)("tag.create")), 1)
2263
+ default: l(() => [
2264
+ w(b(e(t)("tag.create")), 1)
2285
2265
  ]),
2286
2266
  _: 1
2287
2267
  }, 8, ["loading", "disabled"])
@@ -2289,38 +2269,38 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2289
2269
  _: 1
2290
2270
  })
2291
2271
  ]),
2292
- default: a(() => [
2293
- n(e(ge), {
2272
+ default: l(() => [
2273
+ n(e(ie), {
2294
2274
  label: e(t)("tag.field-title"),
2295
2275
  error: T.value.title?.[0],
2296
2276
  required: ""
2297
2277
  }, {
2298
- default: a(() => [
2299
- q("div", {
2278
+ default: l(() => [
2279
+ j("div", {
2300
2280
  ref_key: "field",
2301
- ref: h
2281
+ ref: c
2302
2282
  }, [
2303
- n(e($e), {
2304
- modelValue: r.value,
2305
- "onUpdate:modelValue": S[0] || (S[0] = (C) => r.value = C),
2283
+ n(e(Ae), {
2284
+ modelValue: s.value,
2285
+ "onUpdate:modelValue": W[0] || (W[0] = (S) => s.value = S),
2306
2286
  "aria-label": e(t)("tag.field-title"),
2307
- onKeyup: Ce(d, ["enter"])
2287
+ onKeyup: ze(o, ["enter"])
2308
2288
  }, null, 8, ["modelValue", "aria-label"])
2309
2289
  ], 512)
2310
2290
  ]),
2311
2291
  _: 1
2312
2292
  }, 8, ["label", "error"]),
2313
- n(e(ge), {
2293
+ n(e(ie), {
2314
2294
  label: e(t)("tag.field-slug"),
2315
2295
  error: T.value.slug?.[0],
2316
2296
  help: e(t)("tag.field-slug-help")
2317
2297
  }, {
2318
- default: a(() => [
2319
- n(e($e), {
2298
+ default: l(() => [
2299
+ n(e(Ae), {
2320
2300
  modelValue: i.value,
2321
- "onUpdate:modelValue": S[1] || (S[1] = (C) => i.value = C),
2301
+ "onUpdate:modelValue": W[1] || (W[1] = (S) => i.value = S),
2322
2302
  "aria-label": e(t)("tag.field-slug"),
2323
- onKeyup: Ce(d, ["enter"])
2303
+ onKeyup: ze(o, ["enter"])
2324
2304
  }, null, 8, ["modelValue", "aria-label"])
2325
2305
  ]),
2326
2306
  _: 1
@@ -2329,63 +2309,144 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2329
2309
  _: 1
2330
2310
  }, 8, ["open", "title"]));
2331
2311
  }
2332
- }), La = { class: "wx-tag-merge" }, Fa = { class: "wx-tag-merge__chips" }, Ka = { class: "wx-tag-merge__redirect" }, Ha = /* @__PURE__ */ ee({
2312
+ }), za = ["id"], Ra = /* @__PURE__ */ ee({
2313
+ __name: "TagRenameDialog",
2314
+ props: {
2315
+ name: {}
2316
+ },
2317
+ setup(f) {
2318
+ const m = f, { open: r, resolve: y, dismiss: u } = Ee();
2319
+ te();
2320
+ const a = Q("webx-blog"), t = Q("webx-admin"), s = ft(), i = C(m.name), x = De("field");
2321
+ Ne(async () => {
2322
+ await Ze();
2323
+ const c = x.value?.querySelector("input");
2324
+ c?.focus(), c?.select();
2325
+ });
2326
+ function T() {
2327
+ const c = i.value.trim();
2328
+ if (c === "" || c === m.name) {
2329
+ u();
2330
+ return;
2331
+ }
2332
+ y(c);
2333
+ }
2334
+ return (c, o) => (p(), z(e(Fe), {
2335
+ open: e(r),
2336
+ "onUpdate:open": o[2] || (o[2] = (_) => Ie(r) ? r.value = _ : null),
2337
+ title: e(a)("tag.rename"),
2338
+ width: 420
2339
+ }, {
2340
+ footer: l(() => [
2341
+ n(e(Le), { size: "sm" }, {
2342
+ default: l(() => [
2343
+ n(e(Z), {
2344
+ variant: "outline",
2345
+ onClick: o[1] || (o[1] = (_) => e(u)())
2346
+ }, {
2347
+ default: l(() => [
2348
+ w(b(e(a)("tag.cancel")), 1)
2349
+ ]),
2350
+ _: 1
2351
+ }),
2352
+ n(e(Z), {
2353
+ type: "primary",
2354
+ "native-type": "submit",
2355
+ form: e(s),
2356
+ disabled: i.value.trim() === ""
2357
+ }, {
2358
+ default: l(() => [
2359
+ w(b(e(t)("editor.save")), 1)
2360
+ ]),
2361
+ _: 1
2362
+ }, 8, ["form", "disabled"])
2363
+ ]),
2364
+ _: 1
2365
+ })
2366
+ ]),
2367
+ default: l(() => [
2368
+ j("form", {
2369
+ id: e(s),
2370
+ ref_key: "field",
2371
+ ref: x,
2372
+ onSubmit: at(T, ["prevent"])
2373
+ }, [
2374
+ n(e(ie), {
2375
+ label: e(a)("tag.field-title"),
2376
+ required: ""
2377
+ }, {
2378
+ default: l(() => [
2379
+ n(e(Ae), {
2380
+ modelValue: i.value,
2381
+ "onUpdate:modelValue": o[0] || (o[0] = (_) => i.value = _),
2382
+ "aria-label": e(a)("tag.field-title"),
2383
+ onKeydown: ze(at(T, ["prevent"]), ["enter"])
2384
+ }, null, 8, ["modelValue", "aria-label", "onKeydown"])
2385
+ ]),
2386
+ _: 1
2387
+ }, 8, ["label"])
2388
+ ], 40, za)
2389
+ ]),
2390
+ _: 1
2391
+ }, 8, ["open", "title"]));
2392
+ }
2393
+ }), Ua = { class: "wx-tag-merge" }, qa = { class: "wx-tag-merge__chips" }, Ma = { class: "wx-tag-merge__redirect" }, Na = /* @__PURE__ */ ee({
2333
2394
  __name: "TagMergeDialog",
2334
2395
  props: {
2335
2396
  tags: {}
2336
2397
  },
2337
- setup(y) {
2338
- const _ = y, { open: u, resolve: x, dismiss: c } = Ze(), l = se(), t = ue(l);
2339
- ae();
2340
- const r = te("webx-blog"), i = me(), $ = z(
2341
- [..._.tags].sort((R, W) => W.articles_count - R.articles_count)[0]?.id ?? 0
2342
- ), T = z(!1), h = z(!0), d = z(null), k = b(
2343
- () => _.tags.map((R) => ({ value: R.id, label: `${R.title} · ${R.articles_count}` }))
2344
- ), S = b(() => _.tags.find((R) => R.id === $.value) ?? null), C = b(() => _.tags.filter((R) => R.id !== $.value)), M = b(() => C.value.reduce((R, W) => R + W.articles_count, 0)), P = b(() => C.value.map((R) => R.path).filter(Boolean));
2345
- async function U() {
2346
- if (!(S.value === null || C.value.length === 0 || T.value)) {
2347
- T.value = !0, d.value = null;
2398
+ setup(f) {
2399
+ const m = f, { open: r, resolve: y, dismiss: u } = Ee(), a = ne(), t = de(a);
2400
+ te();
2401
+ const s = Q("webx-blog"), i = ge(), x = C(
2402
+ [...m.tags].sort((U, R) => R.articles_count - U.articles_count)[0]?.id ?? 0
2403
+ ), T = C(!1), c = C(!0), o = C(null), _ = v(
2404
+ () => m.tags.map((U) => ({ value: U.id, label: `${U.title} · ${U.articles_count}` }))
2405
+ ), W = v(() => m.tags.find((U) => U.id === x.value) ?? null), S = v(() => m.tags.filter((U) => U.id !== x.value)), E = v(() => S.value.reduce((U, R) => U + R.articles_count, 0)), F = v(() => S.value.map((U) => U.path).filter(Boolean));
2406
+ async function $() {
2407
+ if (!(W.value === null || S.value.length === 0 || T.value)) {
2408
+ T.value = !0, o.value = null;
2348
2409
  try {
2349
- x(
2410
+ y(
2350
2411
  await t.mergeTags(
2351
- C.value.map((R) => R.id),
2352
- $.value,
2353
- h.value
2412
+ S.value.map((U) => U.id),
2413
+ x.value,
2414
+ c.value
2354
2415
  )
2355
2416
  );
2356
- } catch (R) {
2357
- d.value = i(R);
2417
+ } catch (U) {
2418
+ o.value = i(U);
2358
2419
  } finally {
2359
2420
  T.value = !1;
2360
2421
  }
2361
2422
  }
2362
2423
  }
2363
- return (R, W) => (p(), V(e(Qe), {
2364
- open: e(u),
2365
- "onUpdate:open": W[3] || (W[3] = (O) => He(u) ? u.value = O : null),
2366
- title: e(r)("tag.merge-title"),
2424
+ return (U, R) => (p(), z(e(Fe), {
2425
+ open: e(r),
2426
+ "onUpdate:open": R[3] || (R[3] = (M) => Ie(r) ? r.value = M : null),
2427
+ title: e(s)("tag.merge-title"),
2367
2428
  width: 520
2368
2429
  }, {
2369
- footer: a(() => [
2370
- n(e(Xe), { size: "sm" }, {
2371
- default: a(() => [
2372
- n(e(F), {
2430
+ footer: l(() => [
2431
+ n(e(Le), { size: "sm" }, {
2432
+ default: l(() => [
2433
+ n(e(Z), {
2373
2434
  variant: "outline",
2374
- onClick: W[2] || (W[2] = (O) => e(c)())
2435
+ onClick: R[2] || (R[2] = (M) => e(u)())
2375
2436
  }, {
2376
- default: a(() => [
2377
- g(f(e(r)("tag.cancel")), 1)
2437
+ default: l(() => [
2438
+ w(b(e(s)("tag.cancel")), 1)
2378
2439
  ]),
2379
2440
  _: 1
2380
2441
  }),
2381
- n(e(F), {
2442
+ n(e(Z), {
2382
2443
  type: "primary",
2383
2444
  loading: T.value,
2384
- disabled: C.value.length === 0,
2385
- onClick: U
2445
+ disabled: S.value.length === 0,
2446
+ onClick: $
2386
2447
  }, {
2387
- default: a(() => [
2388
- g(f(e(r)("tag.merge-confirm")), 1)
2448
+ default: l(() => [
2449
+ w(b(e(s)("tag.merge-confirm")), 1)
2389
2450
  ]),
2390
2451
  _: 1
2391
2452
  }, 8, ["loading", "disabled"])
@@ -2393,532 +2454,475 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2393
2454
  _: 1
2394
2455
  })
2395
2456
  ]),
2396
- default: a(() => [
2397
- q("div", La, [
2398
- q("div", Fa, [
2399
- (p(!0), K(ne, null, ze(C.value, (O) => (p(), V(e(re), {
2400
- key: O.id,
2457
+ default: l(() => [
2458
+ j("div", Ua, [
2459
+ j("div", qa, [
2460
+ (p(!0), G(ve, null, Be(S.value, (M) => (p(), z(e(oe), {
2461
+ key: M.id,
2401
2462
  size: "sm",
2402
2463
  round: ""
2403
2464
  }, {
2404
- default: a(() => [
2405
- g(f(O.title) + " · " + f(O.articles_count), 1)
2465
+ default: l(() => [
2466
+ w(b(M.title) + " · " + b(M.articles_count), 1)
2406
2467
  ]),
2407
2468
  _: 2
2408
2469
  }, 1024))), 128)),
2409
- n(e(Y), {
2470
+ n(e(we), {
2410
2471
  name: "arrow-right",
2411
2472
  size: "sm"
2412
2473
  }),
2413
- S.value ? (p(), V(e(re), {
2474
+ W.value ? (p(), z(e(oe), {
2414
2475
  key: 0,
2415
2476
  type: "primary",
2416
2477
  size: "sm",
2417
2478
  round: ""
2418
2479
  }, {
2419
- default: a(() => [
2420
- g(f(S.value.title) + " · " + f(S.value.articles_count), 1)
2480
+ default: l(() => [
2481
+ w(b(W.value.title) + " · " + b(W.value.articles_count), 1)
2421
2482
  ]),
2422
2483
  _: 1
2423
- })) : I("", !0)
2484
+ })) : H("", !0)
2424
2485
  ]),
2425
- n(e(ge), {
2426
- label: e(r)("tag.merge-keep")
2486
+ n(e(ie), {
2487
+ label: e(s)("tag.merge-keep")
2427
2488
  }, {
2428
- default: a(() => [
2429
- n(e(be), {
2430
- modelValue: $.value,
2431
- "onUpdate:modelValue": W[0] || (W[0] = (O) => $.value = O),
2432
- options: k.value,
2433
- "aria-label": e(r)("tag.merge-keep")
2489
+ default: l(() => [
2490
+ n(e(_e), {
2491
+ modelValue: x.value,
2492
+ "onUpdate:modelValue": R[0] || (R[0] = (M) => x.value = M),
2493
+ options: _.value,
2494
+ "aria-label": e(s)("tag.merge-keep")
2434
2495
  }, null, 8, ["modelValue", "options", "aria-label"])
2435
2496
  ]),
2436
2497
  _: 1
2437
2498
  }, 8, ["label"]),
2438
- q("div", Ka, [
2439
- n(e(Ct), {
2440
- modelValue: h.value,
2441
- "onUpdate:modelValue": W[1] || (W[1] = (O) => h.value = O),
2442
- label: e(r)("tag.merge-redirect")
2499
+ j("div", Ma, [
2500
+ n(e(St), {
2501
+ modelValue: c.value,
2502
+ "onUpdate:modelValue": R[1] || (R[1] = (M) => c.value = M),
2503
+ label: e(s)("tag.merge-redirect")
2443
2504
  }, null, 8, ["modelValue", "label"]),
2444
- n(e(G), {
2505
+ n(e(J), {
2445
2506
  size: "sm",
2446
2507
  tone: "muted"
2447
2508
  }, {
2448
- default: a(() => [
2449
- g(f(P.value.length === 0 ? e(r)("tag.merge-redirect-none") : e(r)("tag.merge-redirect-help", { addresses: P.value.join(", ") })), 1)
2509
+ default: l(() => [
2510
+ w(b(F.value.length === 0 ? e(s)("tag.merge-redirect-none") : e(s)("tag.merge-redirect-help", { addresses: F.value.join(", ") })), 1)
2450
2511
  ]),
2451
2512
  _: 1
2452
2513
  })
2453
2514
  ]),
2454
- n(e(Se), {
2515
+ n(e(We), {
2455
2516
  type: "warning",
2456
2517
  variant: "soft",
2457
- description: e(r)("tag.merge-warning", {
2458
- count: M.value,
2459
- tag: S.value?.title ?? "",
2460
- merged: C.value.length
2518
+ description: e(s)("tag.merge-warning", {
2519
+ count: E.value,
2520
+ tag: W.value?.title ?? "",
2521
+ merged: S.value.length
2461
2522
  })
2462
2523
  }, null, 8, ["description"]),
2463
- d.value ? (p(), V(e(Se), {
2524
+ o.value ? (p(), z(e(We), {
2464
2525
  key: 0,
2465
2526
  type: "danger",
2466
2527
  variant: "soft",
2467
- description: d.value
2468
- }, null, 8, ["description"])) : I("", !0)
2528
+ description: o.value
2529
+ }, null, 8, ["description"])) : H("", !0)
2469
2530
  ])
2470
2531
  ]),
2471
2532
  _: 1
2472
2533
  }, 8, ["open", "title"]));
2473
2534
  }
2474
- }), ja = /* @__PURE__ */ ce(Ha, [["__scopeId", "data-v-aa68b3a8"]]), Ga = { class: "wx-tags" }, Ja = { class: "wx-tags__sort" }, Za = ["title", "onClick"], Qa = { key: 2 }, Xa = /* @__PURE__ */ ee({
2535
+ }), Ba = /* @__PURE__ */ pe(Na, [["__scopeId", "data-v-aa68b3a8"]]), Pa = { class: "wx-tags" }, Da = /* @__PURE__ */ ee({
2475
2536
  __name: "TagsPage",
2476
2537
  props: {
2477
2538
  base: { default: "/blog" }
2478
2539
  },
2479
- setup(y) {
2480
- const _ = y, u = se(), x = ue(u), c = qe(), l = Me();
2481
- ae();
2482
- const t = te("webx-blog"), r = me(), i = z(null), $ = z(!0), T = z([]), h = z(!1), d = z(null), k = z(""), S = We("box"), C = Ee(Ea), M = Ee(ja), P = b(() => u.can("blog.taxonomy.manage")), U = b(
2483
- () => u.state.manifest?.modules.find((o) => o.id === "tags")?.title ?? t("module.tags")
2484
- ), R = b({
2485
- get: () => typeof c.query.view == "string" ? c.query.view : "",
2486
- set: (o) => {
2487
- l.replace({
2488
- query: { ...c.query, view: o === "" ? void 0 : String(o), page: void 0 }
2540
+ setup(f) {
2541
+ const m = f, r = ne(), y = de(r), u = He(), a = Ke();
2542
+ te();
2543
+ const t = Q("webx-blog"), s = ge(), i = C(null), x = C(!0), T = C([]), c = C(!1), o = Ce(Ra), _ = Ce(Ca), W = Ce(Ba), S = v(() => r.can("blog.taxonomy.manage")), E = v(
2544
+ () => r.state.manifest?.modules.find((g) => g.id === "tags")?.title ?? t("module.tags")
2545
+ ), F = v({
2546
+ get: () => typeof u.query.view == "string" ? u.query.view : "",
2547
+ set: (g) => {
2548
+ a.replace({
2549
+ query: { ...u.query, view: g === "" ? void 0 : String(g), page: void 0 }
2489
2550
  });
2490
2551
  }
2491
- }), W = b(() => i.value?.filters ?? { total: 0, empty: 0, noindex: 0 }), O = b(() => [
2492
- { value: "", label: t("tag.view-all"), badge: W.value.total },
2493
- { value: "empty", label: t("tag.view-empty"), badge: W.value.empty },
2494
- { value: "noindex", label: t("tag.view-noindex"), badge: W.value.noindex }
2495
- ]), A = b(() => i.value?.data ?? []), N = b(() => A.value.filter((o) => T.value.includes(o.id))), H = b(() => [
2496
- { key: "title", label: t("tag.column-title"), minWidth: 150 },
2552
+ }), $ = v(() => i.value?.filters ?? { total: 0, empty: 0, noindex: 0 }), U = v(() => [
2553
+ { value: "", label: t("tag.view-all"), badge: $.value.total },
2554
+ { value: "empty", label: t("tag.view-empty"), badge: $.value.empty },
2555
+ { value: "noindex", label: t("tag.view-noindex"), badge: $.value.noindex }
2556
+ ]), R = v(() => i.value?.data ?? []), M = v(() => R.value.filter((g) => T.value.includes(g.id))), A = v(() => [
2557
+ { key: "title", label: t("tag.column-title"), minWidth: 150, sortable: !0 },
2497
2558
  // The number is what the other columns and the narrowest the title may be add up to without
2498
2559
  // this one: below it the address is what does not fit, and a fixed table does not shrink —
2499
2560
  // it scrolls sideways and takes the ··· with it (CLAUDE.md §4). Measured, not guessed: at
2500
2561
  // 375px the row is the word, the number and the menu, and nothing hangs off the edge.
2501
2562
  { key: "path", label: t("tag.column-address"), width: 180, hideBelow: 760 },
2502
- { key: "articles_count", label: t("tag.column-articles"), width: 70, align: "right" },
2563
+ {
2564
+ key: "articles_count",
2565
+ label: t("tag.column-articles"),
2566
+ width: 80,
2567
+ align: "right",
2568
+ sortable: !0
2569
+ },
2503
2570
  // Wide enough for the longest of the three states on one line, in every language: measured
2504
2571
  // at 180px of text, and a cell keeps 32 of its own. Narrower, the ruled row wrapped and
2505
2572
  // stood eighteen pixels taller than the ones around it.
2506
2573
  { key: "indexing", label: t("tag.column-indexing"), width: 230, hideBelow: 560 },
2507
- { key: "actions", label: "", width: 56, align: "right" }
2574
+ { key: "actions", label: "", width: st, align: "right" }
2508
2575
  ]);
2509
- function D(o) {
2576
+ function I(g) {
2510
2577
  return {
2511
- q: o?.search ?? (typeof c.query.q == "string" ? c.query.q : ""),
2512
- empty: R.value === "empty",
2513
- noindex: R.value === "noindex",
2578
+ q: g?.search ?? (typeof u.query.q == "string" ? u.query.q : ""),
2579
+ empty: F.value === "empty",
2580
+ noindex: F.value === "noindex",
2514
2581
  // Only when it is not the default: most used first is what the list is, and a query
2515
2582
  // string that repeats the default is a link that outlives a change of mind about it.
2516
- sort: c.query.sort === "name" ? "name" : void 0,
2517
- page: o?.page ?? (Number(c.query.page ?? 1) || 1),
2518
- per_page: o?.perPage
2583
+ sort: P(g),
2584
+ page: g?.page ?? (Number(u.query.page ?? 1) || 1),
2585
+ per_page: g?.perPage
2519
2586
  };
2520
2587
  }
2521
- async function m(o) {
2522
- $.value = !0;
2588
+ async function K(g) {
2589
+ x.value = !0;
2523
2590
  try {
2524
- i.value = await x.tagsPage(D(o));
2525
- } catch (s) {
2526
- L.danger(r(s));
2591
+ i.value = await y.tagsPage(I(g));
2592
+ } catch (N) {
2593
+ L.danger(s(N));
2527
2594
  } finally {
2528
- $.value = !1;
2595
+ x.value = !1;
2529
2596
  }
2530
2597
  }
2531
- function E(o) {
2532
- const s = {
2533
- ...c.query,
2534
- q: o.search === "" ? void 0 : o.search,
2535
- page: o.page === 1 ? void 0 : String(o.page)
2598
+ function P(g) {
2599
+ const N = g?.sort ?? q();
2600
+ if (!N) return;
2601
+ const B = N.key === "title" ? "name" : "articles", X = `${N.order === "desc" ? "-" : ""}${B}`;
2602
+ return X === "articles" ? void 0 : X;
2603
+ }
2604
+ function q() {
2605
+ const g = typeof u.query.sort == "string" ? u.query.sort : "";
2606
+ if (g === "") return null;
2607
+ const N = g.startsWith("-");
2608
+ return { key: (N ? g.slice(1) : g) === "name" ? "title" : "articles_count", order: N ? "desc" : "asc" };
2609
+ }
2610
+ function k(g) {
2611
+ const N = {
2612
+ ...u.query,
2613
+ q: g.search === "" ? void 0 : g.search,
2614
+ sort: P(g),
2615
+ page: g.page === 1 ? void 0 : String(g.page)
2536
2616
  };
2537
- l.replace({ query: s }), m(o);
2538
- }
2539
- oe(R, () => {
2540
- T.value = [], m();
2541
- }), m();
2542
- function j(o) {
2543
- l.replace({
2544
- query: { ...c.query, sort: o === "articles" ? void 0 : o, page: void 0 }
2545
- }), m();
2546
- }
2547
- const de = b(() => c.query.sort === "name" ? "name" : "articles");
2548
- async function Ve() {
2549
- await C({}) && await m();
2550
- }
2551
- async function ve(o) {
2552
- d.value = o.id, k.value = o.title, await Ke(), S.value?.querySelector("input")?.focus();
2553
- }
2554
- function J() {
2555
- d.value = null, k.value = "";
2556
- }
2557
- async function we(o) {
2558
- const s = k.value.trim();
2559
- if (s === "" || s === o.title) {
2560
- J();
2561
- return;
2562
- }
2563
- J(), await Q(o, { title: s }, t("tag.renamed"));
2617
+ a.replace({ query: N }), K(g);
2564
2618
  }
2565
- async function he(o, s) {
2566
- await Q(o, { noindex: s }, t(s ? "tag.kept-out" : "tag.indexed"));
2619
+ ue(F, () => {
2620
+ T.value = [], K();
2621
+ }), K();
2622
+ async function le() {
2623
+ await _({}) && await K();
2567
2624
  }
2568
- async function Q(o, s, w) {
2625
+ async function O(g) {
2626
+ const N = await o({ name: g.title });
2627
+ N && await xe(g, { title: N }, t("tag.renamed"));
2628
+ }
2629
+ async function se(g, N) {
2630
+ await xe(g, { noindex: N }, t(N ? "tag.kept-out" : "tag.indexed"));
2631
+ }
2632
+ async function xe(g, N, B) {
2569
2633
  try {
2570
- const le = await x.saveTag(o.id, s);
2634
+ const X = await y.saveTag(g.id, N);
2571
2635
  i.value && (i.value = {
2572
2636
  ...i.value,
2573
- data: i.value.data.map((xe) => xe.id === le.id ? le : xe)
2574
- }), L.success(w);
2575
- } catch (le) {
2576
- L.danger(r(le));
2637
+ data: i.value.data.map((ye) => ye.id === X.id ? X : ye)
2638
+ }), L.success(B);
2639
+ } catch (X) {
2640
+ L.danger(s(X));
2577
2641
  }
2578
2642
  }
2579
- async function fe(o) {
2580
- if (await pe({
2581
- title: t("tag.delete-title", { title: o.title }),
2582
- message: o.articles_count > 0 ? t("tag.delete-text-used", { count: o.articles_count }) : t("tag.delete-text"),
2643
+ async function ce(g) {
2644
+ if (await be({
2645
+ title: t("tag.delete-title", { title: g.title }),
2646
+ message: g.articles_count > 0 ? t("tag.delete-text-used", { count: g.articles_count }) : t("tag.delete-text"),
2583
2647
  confirmText: t("tag.delete"),
2584
2648
  cancelText: t("tag.cancel"),
2585
2649
  tone: "danger"
2586
2650
  }))
2587
2651
  try {
2588
- await x.removeTag(o.id), L.success(t("tag.deleted")), T.value = T.value.filter((w) => w !== o.id), await m();
2589
- } catch (w) {
2590
- L.danger(r(w));
2652
+ await y.removeTag(g.id), L.success(t("tag.deleted")), T.value = T.value.filter((B) => B !== g.id), await K();
2653
+ } catch (B) {
2654
+ L.danger(s(B));
2591
2655
  }
2592
2656
  }
2593
- function ye(o) {
2594
- if (!P.value) return [];
2595
- const s = [
2657
+ const he = v(() => [
2658
+ {
2659
+ key: "index",
2660
+ icon: "eye",
2661
+ label: t("tag.index"),
2662
+ disabled: c.value,
2663
+ run: () => {
2664
+ re("index");
2665
+ }
2666
+ },
2667
+ {
2668
+ key: "noindex",
2669
+ icon: "eye-off",
2670
+ label: t("tag.noindex"),
2671
+ disabled: c.value,
2672
+ run: () => {
2673
+ re("noindex");
2674
+ }
2675
+ },
2676
+ {
2677
+ key: "delete",
2678
+ icon: "trash",
2679
+ label: t("tag.delete"),
2680
+ danger: !0,
2681
+ disabled: c.value,
2682
+ run: () => {
2683
+ re("delete");
2684
+ }
2685
+ }
2686
+ ]);
2687
+ function Te(g) {
2688
+ if (!S.value) return [];
2689
+ const N = [
2596
2690
  { key: "rename", icon: "edit", label: t("tag.rename"), run: () => {
2597
- ve(o);
2691
+ O(g);
2598
2692
  } }
2599
2693
  ];
2600
- return o.url && s.push({
2694
+ return g.url && N.push({
2601
2695
  key: "site",
2602
2696
  icon: "external-link",
2603
2697
  label: t("tag.open-on-site"),
2604
- href: o.url
2605
- }), s.push({
2698
+ href: g.url
2699
+ }), N.push({
2606
2700
  key: "articles",
2607
2701
  icon: "list",
2608
2702
  label: t("tag.show-articles"),
2609
2703
  run: () => {
2610
- l.push({ path: `${_.base}/articles`, query: { tag: String(o.id) } });
2704
+ a.push({ path: `${m.base}/articles`, query: { tag: String(g.id) } });
2611
2705
  }
2612
- }), s.push(
2613
- o.noindex ? {
2706
+ }), N.push(
2707
+ g.noindex ? {
2614
2708
  key: "index",
2615
2709
  icon: "eye",
2616
2710
  label: t("tag.index"),
2617
2711
  run: () => {
2618
- he(o, !1);
2712
+ se(g, !1);
2619
2713
  }
2620
2714
  } : {
2621
2715
  key: "noindex",
2622
2716
  icon: "eye-off",
2623
2717
  label: t("tag.noindex"),
2624
2718
  run: () => {
2625
- he(o, !0);
2719
+ se(g, !0);
2626
2720
  }
2627
2721
  }
2628
- ), s.push({
2722
+ ), N.push({
2629
2723
  key: "delete",
2630
2724
  icon: "trash",
2631
2725
  label: t("tag.delete"),
2632
2726
  danger: !0,
2633
2727
  run: () => {
2634
- fe(o);
2728
+ ce(g);
2635
2729
  }
2636
- }), s;
2637
- }
2638
- function _e(o) {
2639
- return o === "noindex" ? "muted" : "success";
2640
- }
2641
- async function ie() {
2642
- if (N.value.length < 2) return;
2643
- const o = await M({ tags: N.value });
2644
- o && (L.success(t("tag.merged", { tag: o.tag.title, count: o.articles_count })), T.value = [], await m());
2645
- }
2646
- async function v(o) {
2647
- const s = N.value.map((w) => w.id);
2648
- if (!(s.length === 0 || h.value)) {
2649
- if (o === "delete") {
2650
- const w = N.value.reduce((xe, Pe) => xe + Pe.articles_count, 0);
2651
- if (!await pe({
2652
- title: t("tag.delete-many-title", { count: s.length }),
2653
- message: w > 0 ? t("tag.delete-many-text-used", { count: w }) : t("tag.delete-many-text"),
2730
+ }), N;
2731
+ }
2732
+ function ke(g) {
2733
+ return g === "noindex" ? "muted" : "success";
2734
+ }
2735
+ async function fe() {
2736
+ if (M.value.length < 2) return;
2737
+ const g = await W({ tags: M.value });
2738
+ g && (L.success(t("tag.merged", { tag: g.tag.title, count: g.articles_count })), T.value = [], await K());
2739
+ }
2740
+ async function re(g) {
2741
+ const N = M.value.map((B) => B.id);
2742
+ if (!(N.length === 0 || c.value)) {
2743
+ if (g === "delete") {
2744
+ const B = M.value.reduce((ye, d) => ye + d.articles_count, 0);
2745
+ if (!await be({
2746
+ title: t("tag.delete-many-title", { count: N.length }),
2747
+ message: B > 0 ? t("tag.delete-many-text-used", { count: B }) : t("tag.delete-many-text"),
2654
2748
  confirmText: t("tag.delete"),
2655
2749
  cancelText: t("tag.cancel"),
2656
2750
  tone: "danger"
2657
2751
  })) return;
2658
2752
  }
2659
- h.value = !0;
2753
+ c.value = !0;
2660
2754
  try {
2661
- const w = await x.massTags(s, o);
2755
+ const B = await y.massTags(N, g);
2662
2756
  L.success(
2663
- o === "delete" ? t("tag.deleted-many", { count: w }) : o === "index" ? t("tag.indexed-many", { count: w }) : t("tag.kept-out-many", { count: w })
2664
- ), T.value = [], await m();
2665
- } catch (w) {
2666
- L.danger(r(w));
2757
+ g === "delete" ? t("tag.deleted-many", { count: B }) : g === "index" ? t("tag.indexed-many", { count: B }) : t("tag.kept-out-many", { count: B })
2758
+ ), T.value = [], await K();
2759
+ } catch (B) {
2760
+ L.danger(s(B));
2667
2761
  } finally {
2668
- h.value = !1;
2762
+ c.value = !1;
2669
2763
  }
2670
2764
  }
2671
2765
  }
2672
- return (o, s) => (p(), K("div", Ga, [
2673
- n(e(je), {
2674
- view: R.value,
2675
- "onUpdate:view": s[2] || (s[2] = (w) => R.value = w),
2676
- title: U.value,
2677
- views: O.value
2678
- }, st({
2679
- default: a(() => [
2680
- n(e(ut), {
2766
+ const me = v(
2767
+ () => S.value ? [{ key: "new", label: t("tag.new"), icon: "plus", primary: !0, run: () => {
2768
+ le();
2769
+ } }] : []
2770
+ );
2771
+ return (g, N) => (p(), G("div", Pa, [
2772
+ n(e(Qe), {
2773
+ view: F.value,
2774
+ "onUpdate:view": N[1] || (N[1] = (B) => F.value = B),
2775
+ title: E.value,
2776
+ views: U.value,
2777
+ actions: me.value
2778
+ }, {
2779
+ default: l(() => [
2780
+ n(e(ot), {
2681
2781
  selected: T.value,
2682
- "onUpdate:selected": s[1] || (s[1] = (w) => T.value = w),
2782
+ "onUpdate:selected": N[0] || (N[0] = (B) => T.value = B),
2683
2783
  data: i.value,
2684
- columns: H.value,
2784
+ columns: A.value,
2685
2785
  "row-key": "id",
2686
2786
  searchable: "",
2687
2787
  hover: "",
2688
2788
  flush: "",
2689
2789
  layout: "fixed",
2690
- loading: $.value,
2691
- selectable: P.value,
2790
+ loading: x.value,
2791
+ selectable: S.value,
2692
2792
  "cards-below": 0,
2693
2793
  "search-placeholder": e(t)("tag.search"),
2694
- "empty-text": A.value.length === 0 && !$.value ? e(t)("tag.empty") : void 0,
2695
- "aria-label": U.value,
2696
- onStateChange: E
2794
+ "empty-text": R.value.length === 0 && !x.value ? e(t)("tag.empty") : void 0,
2795
+ "aria-label": E.value,
2796
+ onStateChange: k
2697
2797
  }, {
2698
- actions: a(() => [
2699
- q("div", Ja, [
2700
- (p(), K(ne, null, ze(["articles", "name"], (w) => n(e(F), {
2701
- key: w,
2702
- size: "sm",
2703
- variant: de.value === w ? "outline" : "text",
2704
- onClick: (le) => j(w)
2705
- }, {
2706
- default: a(() => [
2707
- g(f(e(t)(`tag.sort-${w}`)), 1)
2708
- ]),
2709
- _: 2
2710
- }, 1032, ["variant", "onClick"])), 64))
2711
- ])
2712
- ]),
2713
- "cell-title": a(({ row: w }) => [
2714
- d.value === w.id ? (p(), K("span", {
2715
- key: 0,
2716
- ref_key: "box",
2717
- ref: S,
2718
- class: "wx-tags__rename"
2719
- }, [
2720
- n(e($e), {
2721
- modelValue: k.value,
2722
- "onUpdate:modelValue": s[0] || (s[0] = (le) => k.value = le),
2723
- size: "sm",
2724
- "aria-label": e(t)("tag.rename"),
2725
- onKeyup: [
2726
- Ce((le) => we(w), ["enter"]),
2727
- Ce(J, ["esc"])
2728
- ],
2729
- onBlur: (le) => we(w)
2730
- }, null, 8, ["modelValue", "aria-label", "onKeyup", "onBlur"])
2731
- ], 512)) : P.value ? (p(), K("button", {
2732
- key: 1,
2733
- type: "button",
2734
- class: "wx-tags__name",
2735
- title: e(t)("tag.rename"),
2736
- onClick: (le) => ve(w)
2737
- }, f(w.title), 9, Za)) : (p(), K("span", Qa, f(w.title), 1))
2798
+ "cell-title": l(({ row: B }) => [
2799
+ n(e(J), { truncate: "" }, {
2800
+ default: l(() => [
2801
+ w(b(B.title), 1)
2802
+ ]),
2803
+ _: 2
2804
+ }, 1024)
2738
2805
  ]),
2739
- "cell-path": a(({ row: w }) => [
2740
- n(e(G), {
2806
+ "cell-path": l(({ row: B }) => [
2807
+ n(e(J), {
2741
2808
  size: "sm",
2742
2809
  tone: "muted",
2743
2810
  mono: "",
2744
2811
  truncate: ""
2745
2812
  }, {
2746
- default: a(() => [
2747
- g(f(w.path ?? e(t)("tag.no-address")), 1)
2813
+ default: l(() => [
2814
+ w(b(B.path ?? e(t)("tag.no-address")), 1)
2748
2815
  ]),
2749
2816
  _: 2
2750
2817
  }, 1024)
2751
2818
  ]),
2752
- "cell-articles_count": a(({ row: w }) => [
2753
- n(e(G), {
2754
- tone: w.articles_count === 0 ? "muted" : "default"
2819
+ "cell-articles_count": l(({ row: B }) => [
2820
+ n(e(J), {
2821
+ tone: B.articles_count === 0 ? "muted" : "default"
2755
2822
  }, {
2756
- default: a(() => [
2757
- g(f(w.articles_count), 1)
2823
+ default: l(() => [
2824
+ w(b(B.articles_count), 1)
2758
2825
  ]),
2759
2826
  _: 2
2760
2827
  }, 1032, ["tone"])
2761
2828
  ]),
2762
- "cell-indexing": a(({ row: w }) => [
2763
- w.indexing === "rule" ? (p(), V(e(Ye), {
2829
+ "cell-indexing": l(({ row: B }) => [
2830
+ B.indexing === "rule" ? (p(), z(e(et), {
2764
2831
  key: 0,
2765
2832
  content: e(t)("tag.indexing-rule-help")
2766
2833
  }, {
2767
- default: a(() => [
2768
- n(e(G), {
2834
+ default: l(() => [
2835
+ n(e(J), {
2769
2836
  size: "sm",
2770
- tone: _e(w.indexing)
2837
+ tone: ke(B.indexing)
2771
2838
  }, {
2772
- default: a(() => [
2773
- g(f(e(t)("tag.indexing-rule")), 1)
2839
+ default: l(() => [
2840
+ w(b(e(t)("tag.indexing-rule")), 1)
2774
2841
  ]),
2775
2842
  _: 1
2776
2843
  }, 8, ["tone"])
2777
2844
  ]),
2778
2845
  _: 2
2779
- }, 1032, ["content"])) : (p(), V(e(G), {
2846
+ }, 1032, ["content"])) : (p(), z(e(J), {
2780
2847
  key: 1,
2781
2848
  size: "sm",
2782
- tone: _e(w.indexing)
2849
+ tone: ke(B.indexing)
2783
2850
  }, {
2784
- default: a(() => [
2785
- g(f(e(t)(`tag.indexing-${w.indexing}`)), 1)
2851
+ default: l(() => [
2852
+ w(b(e(t)(`tag.indexing-${B.indexing}`)), 1)
2786
2853
  ]),
2787
2854
  _: 2
2788
2855
  }, 1032, ["tone"]))
2789
2856
  ]),
2790
- "cell-actions": a(({ row: w }) => [
2791
- n(e(Ie), {
2792
- actions: ye(w),
2793
- label: w.title
2857
+ "cell-actions": l(({ row: B }) => [
2858
+ n(e(Re), {
2859
+ actions: Te(B),
2860
+ label: B.title
2794
2861
  }, null, 8, ["actions", "label"])
2795
2862
  ]),
2796
2863
  _: 1
2797
2864
  }, 8, ["selected", "data", "columns", "loading", "selectable", "search-placeholder", "empty-text", "aria-label"])
2798
2865
  ]),
2799
- _: 2
2800
- }, [
2801
- P.value ? {
2802
- name: "actions",
2803
- fn: a(() => [
2804
- n(e(F), {
2805
- type: "primary",
2806
- onClick: Ve
2807
- }, {
2808
- icon: a(() => [
2809
- n(e(Y), { name: "plus" })
2810
- ]),
2811
- default: a(() => [
2812
- g(" " + f(e(t)("tag.new")), 1)
2813
- ]),
2814
- _: 1
2815
- })
2816
- ]),
2817
- key: "0"
2818
- } : void 0
2819
- ]), 1032, ["view", "title", "views"]),
2820
- N.value.length > 0 ? (p(), V(e(ot), {
2866
+ _: 1
2867
+ }, 8, ["view", "title", "views", "actions"]),
2868
+ M.value.length > 0 ? (p(), z(e(rt), {
2821
2869
  key: 0,
2822
2870
  class: "wx-tags__bar",
2823
2871
  sticky: ""
2824
2872
  }, {
2825
- default: a(() => [
2826
- n(e(G), { weight: "medium" }, {
2827
- default: a(() => [
2828
- g(f(e(t)("tag.selected", { count: N.value.length })), 1)
2873
+ state: l(() => [
2874
+ n(e(J), { weight: "medium" }, {
2875
+ default: l(() => [
2876
+ w(b(e(t)("tag.selected", { count: M.value.length })), 1)
2829
2877
  ]),
2830
2878
  _: 1
2831
- }),
2832
- s[7] || (s[7] = q("span", { class: "wx-tags__bar-spacer" }, null, -1)),
2833
- n(e(F), {
2879
+ })
2880
+ ]),
2881
+ default: l(() => [
2882
+ n(e(Z), {
2834
2883
  type: "primary",
2835
- disabled: N.value.length < 2 || h.value,
2836
- onClick: ie
2884
+ disabled: M.value.length < 2 || c.value,
2885
+ onClick: fe
2837
2886
  }, {
2838
- icon: a(() => [
2839
- n(e(Y), { name: "link" })
2887
+ icon: l(() => [
2888
+ n(e(we), { name: "link" })
2840
2889
  ]),
2841
- default: a(() => [
2842
- g(" " + f(e(t)("tag.merge")), 1)
2890
+ default: l(() => [
2891
+ w(" " + b(e(t)("tag.merge")), 1)
2843
2892
  ]),
2844
2893
  _: 1
2845
2894
  }, 8, ["disabled"]),
2846
- n(e(F), {
2847
- variant: "outline",
2848
- disabled: h.value,
2849
- onClick: s[3] || (s[3] = (w) => v("index"))
2850
- }, {
2851
- icon: a(() => [
2852
- n(e(Y), { name: "eye" })
2853
- ]),
2854
- default: a(() => [
2855
- g(" " + f(e(t)("tag.index")), 1)
2856
- ]),
2857
- _: 1
2858
- }, 8, ["disabled"]),
2859
- n(e(F), {
2860
- variant: "outline",
2861
- disabled: h.value,
2862
- onClick: s[4] || (s[4] = (w) => v("noindex"))
2863
- }, {
2864
- icon: a(() => [
2865
- n(e(Y), { name: "eye-off" })
2866
- ]),
2867
- default: a(() => [
2868
- g(" " + f(e(t)("tag.noindex")), 1)
2869
- ]),
2870
- _: 1
2871
- }, 8, ["disabled"]),
2872
- n(e(F), {
2873
- variant: "outline",
2874
- type: "danger",
2875
- disabled: h.value,
2876
- onClick: s[5] || (s[5] = (w) => v("delete"))
2877
- }, {
2878
- icon: a(() => [
2879
- n(e(Y), { name: "trash" })
2880
- ]),
2881
- default: a(() => [
2882
- g(" " + f(e(t)("tag.delete")), 1)
2883
- ]),
2884
- _: 1
2885
- }, 8, ["disabled"]),
2886
- n(e(F), {
2887
- variant: "text",
2888
- "aria-label": e(t)("tag.clear"),
2889
- onClick: s[6] || (s[6] = (w) => T.value = [])
2890
- }, {
2891
- icon: a(() => [
2892
- n(e(Y), { name: "close" })
2893
- ]),
2894
- _: 1
2895
- }, 8, ["aria-label"])
2895
+ n(e(Re), {
2896
+ size: "lg",
2897
+ actions: he.value,
2898
+ label: e(t)("tag.selected", { count: M.value.length })
2899
+ }, null, 8, ["actions", "label"])
2896
2900
  ]),
2897
2901
  _: 1
2898
- })) : I("", !0)
2902
+ })) : H("", !0)
2899
2903
  ]));
2900
2904
  }
2901
- }), Ya = /* @__PURE__ */ ce(Xa, [["__scopeId", "data-v-7ccee45f"]]);
2902
- function nl(y = {}) {
2903
- const _ = y.path ?? "/blog";
2905
+ }), Ia = /* @__PURE__ */ pe(Da, [["__scopeId", "data-v-beb86d88"]]);
2906
+ function Ka(f = {}) {
2907
+ const m = f.path ?? "/blog";
2904
2908
  return [
2905
2909
  {
2906
2910
  id: "articles",
2907
- path: `${_}/articles`,
2911
+ path: `${m}/articles`,
2908
2912
  routes: [
2909
2913
  // The section's own path travels as a prop, so a panel that mounted the blog somewhere
2910
2914
  // else still links between its screens correctly.
2911
2915
  {
2912
- path: `${_}/articles`,
2916
+ path: `${m}/articles`,
2913
2917
  name: "webx.blog.articles",
2914
- component: Sa,
2915
- props: { base: _ }
2918
+ component: ga,
2919
+ props: { base: m }
2916
2920
  },
2917
2921
  {
2918
- path: `${_}/articles/:id(\\d+)`,
2922
+ path: `${m}/articles/:id(\\d+)`,
2919
2923
  name: "webx.blog.articles.edit",
2920
- component: Ht,
2921
- props: { base: _ }
2924
+ component: It,
2925
+ props: { base: m }
2922
2926
  }
2923
2927
  ],
2924
2928
  /*
@@ -2932,60 +2936,60 @@ function nl(y = {}) {
2932
2936
  * binding.
2933
2937
  */
2934
2938
  types: {
2935
- "wx-article-address": { component: Nt, kind: "display" },
2936
- "wx-article-author": { component: qt, kind: "field" },
2937
- "wx-article-rubrics": { component: ra, kind: "field" },
2938
- "wx-article-tags": { component: pa, kind: "field" },
2939
- "wx-article-related": { component: la, kind: "field" },
2940
- "wx-article-history": { component: Qt, kind: "display" }
2939
+ "wx-article-address": { component: Mt, kind: "display" },
2940
+ "wx-article-author": { component: Nt, kind: "field" },
2941
+ "wx-article-rubrics": { component: ta, kind: "field" },
2942
+ "wx-article-tags": { component: ra, kind: "field" },
2943
+ "wx-article-related": { component: Qt, kind: "field" },
2944
+ "wx-article-history": { component: Ht, kind: "display" }
2941
2945
  }
2942
2946
  },
2943
2947
  {
2944
2948
  id: "rubrics",
2945
- path: `${_}/rubrics`,
2949
+ path: `${m}/rubrics`,
2946
2950
  routes: [
2947
2951
  {
2948
- path: `${_}/rubrics`,
2952
+ path: `${m}/rubrics`,
2949
2953
  name: "webx.blog.rubrics",
2950
- component: Oa,
2951
- props: { base: _ }
2954
+ component: Wa,
2955
+ props: { base: m }
2952
2956
  }
2953
2957
  ]
2954
2958
  },
2955
2959
  {
2956
2960
  id: "tags",
2957
- path: `${_}/tags`,
2961
+ path: `${m}/tags`,
2958
2962
  routes: [
2959
2963
  {
2960
- path: `${_}/tags`,
2964
+ path: `${m}/tags`,
2961
2965
  name: "webx.blog.tags",
2962
- component: Ya,
2963
- props: { base: _ }
2966
+ component: Ia,
2967
+ props: { base: m }
2964
2968
  }
2965
2969
  ]
2966
2970
  }
2967
2971
  ];
2968
2972
  }
2969
2973
  export {
2970
- Nt as WxArticleAddress,
2971
- qt as WxArticleAuthorField,
2972
- ma as WxArticleCreateDialog,
2973
- Ht as WxArticleEditorPage,
2974
- Qt as WxArticleHistory,
2975
- la as WxArticleRelated,
2976
- ra as WxArticleRubrics,
2977
- pa as WxArticleTags,
2978
- Sa as WxArticlesPage,
2979
- Pa as WxRubricForm,
2980
- Oa as WxRubricsPage,
2981
- Ea as WxTagCreateDialog,
2982
- ja as WxTagMergeDialog,
2983
- Ya as WxTagsPage,
2984
- dt as articleEditorKey,
2985
- nl as blog,
2974
+ Mt as WxArticleAddress,
2975
+ Nt as WxArticleAuthorField,
2976
+ oa as WxArticleCreateDialog,
2977
+ It as WxArticleEditorPage,
2978
+ Ht as WxArticleHistory,
2979
+ Qt as WxArticleRelated,
2980
+ ta as WxArticleRubrics,
2981
+ ra as WxArticleTags,
2982
+ ga as WxArticlesPage,
2983
+ Va as WxRubricForm,
2984
+ Wa as WxRubricsPage,
2985
+ Ca as WxTagCreateDialog,
2986
+ Ba as WxTagMergeDialog,
2987
+ Ia as WxTagsPage,
2988
+ ut as articleEditorKey,
2989
+ Ka as blog,
2986
2990
  Rt as blogMessages,
2987
- ue as createBlogApi,
2991
+ de as createBlogApi,
2988
2992
  zt as provideArticleEditor,
2989
- Te as useArticleEditor
2993
+ Se as useArticleEditor
2990
2994
  };
2991
2995
  //# sourceMappingURL=index.js.map