@webx-ui/module-seo 0.2.6 → 0.3.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,8 +1,8 @@
1
- import { defineComponent as E, computed as U, openBlock as y, createBlock as W, unref as e, withCtx as t, renderSlot as ve, createVNode as l, createTextVNode as x, toDisplayString as h, ref as C, isRef as P, createElementVNode as j, withKeys as We, createElementBlock as F, Fragment as se, createCommentVNode as O, renderList as ge, useModel as Ce, resolveDynamicComponent as Te, mergeModels as ze, watch as be, createSlots as ye, markRaw as De } from "vue";
2
- import { useAdmin as K, useTranslate as J, WxListScreen as Oe, WxDate as _e, useErrorText as le, WxRowMenu as te } from "@webx-ui/module-admin";
3
- import { WxButton as I, useModal as ie, WxDialog as de, WxSpace as X, WxInput as N, WxAlert as Y, WxText as R, WxBadge as M, WxDescriptions as Re, WxDescriptionsItem as Le, WxEmpty as je, createModal as Z, WxTable as re, WxLink as Ae, useLocales as Be, WxTabs as Pe, WxTab as oe, WxFormItem as z, WxTextarea as me, WxCheckboxGroup as Fe, WxCodeEditor as Ne, localizedValue as we, WxSelect as ae, WxSwitch as xe, toast as B, confirm as ke, WxInputNumber as Ie } from "@webx-ui/core";
4
- import { useRouter as Me, useRoute as Ee } from "vue-router";
5
- const Ke = {
1
+ import { defineComponent as q, computed as w, openBlock as b, createBlock as S, unref as e, withCtx as a, renderSlot as Ue, ref as T, isRef as I, createElementVNode as B, createVNode as l, withKeys as We, createTextVNode as k, toDisplayString as y, createElementBlock as M, Fragment as oe, createCommentVNode as j, renderList as ge, useModel as Te, resolveDynamicComponent as Ce, mergeModels as ze, watch as be, markRaw as De } from "vue";
2
+ import { useAdmin as H, useTranslate as K, WxListScreen as Oe, WxDate as ye, useErrorText as se, rowMenuWidth as _e, WxRowMenu as ae, WxFilterChips as Re } from "@webx-ui/module-admin";
3
+ import { useModal as re, WxDialog as de, WxSpace as X, WxInput as E, WxButton as Z, WxAlert as Y, WxText as A, WxBadge as J, WxDescriptions as Le, WxDescriptionsItem as je, WxEmpty as Ae, createModal as ee, WxTable as ue, WxLink as Be, useLocales as Fe, WxTabs as Ne, WxTab as ne, WxFormItem as O, WxTextarea as me, WxCheckboxGroup as Pe, WxCodeEditor as Ie, localizedValue as xe, WxSelect as le, WxSwitch as we, toast as P, confirm as ke, WxInputNumber as Me } from "@webx-ui/core";
4
+ import { useRouter as Ee, useRoute as Ke } from "vue-router";
5
+ const Je = {
6
6
  module: {
7
7
  title: "SEO"
8
8
  },
@@ -10,6 +10,7 @@ const Ke = {
10
10
  rules: "Rules",
11
11
  redirects: "Redirects",
12
12
  test: "Check an address",
13
+ "filter-kind": "Kind",
13
14
  "new-rule": "New rule",
14
15
  "new-redirect": "New redirect",
15
16
  "search-rules": "Search by address",
@@ -89,191 +90,183 @@ const Ke = {
89
90
  preview: "In search results"
90
91
  }
91
92
  }, he = /* @__PURE__ */ new WeakSet();
92
- function q() {
93
+ function G() {
93
94
  try {
94
- const { i18n: n } = K();
95
- he.has(n) || (n.defaults("webx-seo", Ke), he.add(n));
95
+ const { i18n: o } = H();
96
+ he.has(o) || (o.defaults("webx-seo", Je), he.add(o));
96
97
  } catch {
97
98
  }
98
99
  }
99
- const ue = /* @__PURE__ */ E({
100
+ const ce = /* @__PURE__ */ q({
100
101
  __name: "SeoLayout",
101
102
  props: {
102
103
  base: {},
103
- current: {}
104
+ current: {},
105
+ actions: {}
104
106
  },
105
107
  emits: ["test"],
106
- setup(n, { emit: r }) {
107
- const d = n, c = r, a = K(), i = Me(), f = Ee();
108
- q();
109
- const s = J("webx-seo"), S = U(
110
- () => a.state.manifest?.modules.find((p) => p.id === "seo")?.title ?? s("module.title")
111
- ), k = U(() => [
108
+ setup(o, { emit: r }) {
109
+ const i = o, u = r, t = H(), n = Ee(), h = Ke();
110
+ G();
111
+ const s = K("webx-seo"), $ = w(
112
+ () => t.state.manifest?.modules.find((d) => d.id === "seo")?.title ?? s("module.title")
113
+ ), f = w(() => [
112
114
  { value: "rules", label: s("page.rules") },
113
115
  { value: "redirects", label: s("page.redirects") },
114
116
  { value: "aliases", label: s("page.automatic") }
115
- ]), g = U({
116
- get: () => d.current,
117
- set: (p) => {
118
- const u = p === "rules" ? d.base : `${d.base}/${String(p)}`;
119
- u !== f.path && i.push(u);
117
+ ]), m = w(() => [
118
+ ...i.actions ?? [],
119
+ { key: "test", label: s("page.test"), icon: "search", run: () => u("test") }
120
+ ]), c = w({
121
+ get: () => i.current,
122
+ set: (d) => {
123
+ const x = d === "rules" ? i.base : `${i.base}/${String(d)}`;
124
+ x !== h.path && n.push(x);
120
125
  }
121
126
  });
122
- return (p, u) => (y(), W(e(Oe), {
123
- view: g.value,
124
- "onUpdate:view": u[1] || (u[1] = (V) => g.value = V),
125
- title: S.value,
126
- views: k.value
127
+ return (d, x) => (b(), S(e(Oe), {
128
+ view: c.value,
129
+ "onUpdate:view": x[0] || (x[0] = (R) => c.value = R),
130
+ title: $.value,
131
+ views: f.value,
132
+ actions: m.value
127
133
  }, {
128
- actions: t(() => [
129
- ve(p.$slots, "actions"),
130
- l(e(I), {
131
- variant: "outline",
132
- icon: "search",
133
- onClick: u[0] || (u[0] = (V) => c("test"))
134
- }, {
135
- default: t(() => [
136
- x(h(e(s)("page.test")), 1)
137
- ]),
138
- _: 1
139
- })
140
- ]),
141
- default: t(() => [
142
- ve(p.$slots, "default")
134
+ default: a(() => [
135
+ Ue(d.$slots, "default")
143
136
  ]),
144
137
  _: 3
145
- }, 8, ["view", "title", "views"]));
138
+ }, 8, ["view", "title", "views", "actions"]));
146
139
  }
147
140
  });
148
- function G(n) {
149
- const r = `${n.apiPath}/seo`, d = (i) => i.data, c = (i) => ({
150
- ...i.meta,
151
- data: i.data
152
- }), a = (i) => ({
153
- q: i.q || void 0,
154
- match_type: i.match_type ?? void 0,
155
- is_active: i.is_active ?? void 0,
156
- sort: i.sort || void 0,
157
- page: i.page,
158
- per_page: i.per_page
141
+ function Q(o) {
142
+ const r = `${o.apiPath}/seo`, i = (n) => n.data, u = (n) => ({
143
+ ...n.meta,
144
+ data: n.data
145
+ }), t = (n) => ({
146
+ q: n.q || void 0,
147
+ match_type: n.match_type ?? void 0,
148
+ is_active: n.is_active ?? void 0,
149
+ sort: n.sort || void 0,
150
+ page: n.page,
151
+ per_page: n.per_page
159
152
  });
160
153
  return {
161
- urls: (i = {}) => n.http.get(`${r}/urls`, {
162
- query: a(i)
163
- }).then(c),
164
- url: (i) => n.http.get(`${r}/urls/${i}`).then(d),
165
- createUrl: (i) => n.http.post(`${r}/urls`, i).then(d),
166
- updateUrl: (i, f) => n.http.put(`${r}/urls/${i}`, f).then(d),
167
- removeUrl: (i) => n.http.delete(`${r}/urls/${i}`),
168
- redirects: (i = {}) => n.http.get(
154
+ urls: (n = {}) => o.http.get(`${r}/urls`, {
155
+ query: t(n)
156
+ }).then(u),
157
+ url: (n) => o.http.get(`${r}/urls/${n}`).then(i),
158
+ createUrl: (n) => o.http.post(`${r}/urls`, n).then(i),
159
+ updateUrl: (n, h) => o.http.put(`${r}/urls/${n}`, h).then(i),
160
+ removeUrl: (n) => o.http.delete(`${r}/urls/${n}`),
161
+ redirects: (n = {}) => o.http.get(
169
162
  `${r}/redirects`,
170
- { query: a(i) }
171
- ).then(c),
172
- createRedirect: (i) => n.http.post(`${r}/redirects`, i).then(d),
173
- updateRedirect: (i, f) => n.http.put(`${r}/redirects/${i}`, f).then(d),
174
- removeRedirect: (i) => n.http.delete(`${r}/redirects/${i}`),
175
- aliases: (i = {}) => n.http.get(`${r}/aliases`, {
163
+ { query: t(n) }
164
+ ).then(u),
165
+ createRedirect: (n) => o.http.post(`${r}/redirects`, n).then(i),
166
+ updateRedirect: (n, h) => o.http.put(`${r}/redirects/${n}`, h).then(i),
167
+ removeRedirect: (n) => o.http.delete(`${r}/redirects/${n}`),
168
+ aliases: (n = {}) => o.http.get(`${r}/aliases`, {
176
169
  query: {
177
- q: i.q || void 0,
178
- locale: i.locale ?? void 0,
179
- page: i.page,
180
- per_page: i.per_page
170
+ q: n.q || void 0,
171
+ locale: n.locale ?? void 0,
172
+ page: n.page,
173
+ per_page: n.per_page
181
174
  }
182
- }).then(c),
175
+ }).then(u),
183
176
  // A POST because it carries an address in its body, and an address in a query string is an
184
177
  // address somebody has to escape twice.
185
- test: (i, f = null) => n.http.post(`${r}/test-url`, { url: i, locale: f ?? void 0 }).then(d)
178
+ test: (n, h = null) => o.http.post(`${r}/test-url`, { url: n, locale: h ?? void 0 }).then(i)
186
179
  };
187
180
  }
188
- const Je = { class: "wx-seo-test" }, qe = {
181
+ const qe = { class: "wx-seo-test" }, He = {
189
182
  key: 3,
190
183
  class: "wx-seo-test__matched"
191
- }, He = {
184
+ }, Ge = {
192
185
  key: 4,
193
186
  class: "wx-seo-test__result"
194
- }, Ge = {
187
+ }, Qe = {
195
188
  key: 5,
196
189
  class: "wx-seo-test__chain"
197
- }, Qe = /* @__PURE__ */ E({
190
+ }, Xe = /* @__PURE__ */ q({
198
191
  __name: "TestUrlDialog",
199
- setup(n) {
200
- const { open: r } = ie(), d = K(), c = G(d);
201
- q();
202
- const a = J("webx-seo"), i = C(""), f = C(!1), s = C(null), S = U(() => {
203
- const g = s.value?.seo;
204
- return g ? [
205
- { label: a("card.title"), value: g.title },
206
- { label: a("card.h1"), value: g.h1 },
207
- { label: a("card.description"), value: g.description },
208
- { label: a("card.keywords"), value: g.keywords },
209
- { label: a("card.canonical"), value: g.canonical },
210
- { label: a("card.robots"), value: g.robots }
211
- ].filter((p) => p.value) : [];
192
+ setup(o) {
193
+ const { open: r } = re(), i = H(), u = Q(i);
194
+ G();
195
+ const t = K("webx-seo"), n = T(""), h = T(!1), s = T(null), $ = w(() => {
196
+ const m = s.value?.seo;
197
+ return m ? [
198
+ { label: t("card.title"), value: m.title },
199
+ { label: t("card.h1"), value: m.h1 },
200
+ { label: t("card.description"), value: m.description },
201
+ { label: t("card.keywords"), value: m.keywords },
202
+ { label: t("card.canonical"), value: m.canonical },
203
+ { label: t("card.robots"), value: m.robots }
204
+ ].filter((c) => c.value) : [];
212
205
  });
213
- async function k() {
214
- if (i.value.trim() !== "") {
215
- f.value = !0;
206
+ async function f() {
207
+ if (n.value.trim() !== "") {
208
+ h.value = !0;
216
209
  try {
217
- s.value = await c.test(i.value);
210
+ s.value = await u.test(n.value);
218
211
  } finally {
219
- f.value = !1;
212
+ h.value = !1;
220
213
  }
221
214
  }
222
215
  }
223
- return (g, p) => (y(), W(e(de), {
216
+ return (m, c) => (b(), S(e(de), {
224
217
  open: e(r),
225
- "onUpdate:open": p[1] || (p[1] = (u) => P(r) ? r.value = u : null),
226
- title: e(a)("page.test"),
218
+ "onUpdate:open": c[1] || (c[1] = (d) => I(r) ? r.value = d : null),
219
+ title: e(t)("page.test"),
227
220
  width: 720
228
221
  }, {
229
- default: t(() => [
230
- j("div", Je, [
222
+ default: a(() => [
223
+ B("div", qe, [
231
224
  l(e(X), {
232
225
  size: "sm",
233
226
  class: "wx-seo-test__ask"
234
227
  }, {
235
- default: t(() => [
236
- l(e(N), {
237
- modelValue: i.value,
238
- "onUpdate:modelValue": p[0] || (p[0] = (u) => i.value = u),
239
- placeholder: e(a)("page.test-placeholder"),
228
+ default: a(() => [
229
+ l(e(E), {
230
+ modelValue: n.value,
231
+ "onUpdate:modelValue": c[0] || (c[0] = (d) => n.value = d),
232
+ placeholder: e(t)("page.test-placeholder"),
240
233
  class: "wx-seo-test__input",
241
- onKeyup: We(k, ["enter"])
234
+ onKeyup: We(f, ["enter"])
242
235
  }, null, 8, ["modelValue", "placeholder"]),
243
- l(e(I), {
236
+ l(e(Z), {
244
237
  type: "primary",
245
- loading: f.value,
246
- onClick: k
238
+ loading: h.value,
239
+ onClick: f
247
240
  }, {
248
- default: t(() => [
249
- x(h(e(a)("page.test-run")), 1)
241
+ default: a(() => [
242
+ k(y(e(t)("page.test-run")), 1)
250
243
  ]),
251
244
  _: 1
252
245
  }, 8, ["loading"])
253
246
  ]),
254
247
  _: 1
255
248
  }),
256
- s.value ? (y(), F(se, { key: 0 }, [
257
- s.value.redirect ? (y(), W(e(Y), {
249
+ s.value ? (b(), M(oe, { key: 0 }, [
250
+ s.value.redirect ? (b(), S(e(Y), {
258
251
  key: 0,
259
252
  type: "warning",
260
- description: e(a)("page.test-redirected", {
253
+ description: e(t)("page.test-redirected", {
261
254
  target: s.value.redirect.target,
262
255
  status: s.value.redirect.status
263
256
  })
264
- }, null, 8, ["description"])) : O("", !0),
265
- s.value.route ? (y(), W(e(Y), {
257
+ }, null, 8, ["description"])) : j("", !0),
258
+ s.value.route ? (b(), S(e(Y), {
266
259
  key: 1,
267
260
  type: "info",
268
- description: s.value.route.kind === "alias" ? e(a)("page.occupied-alias", { target: s.value.route.target ?? s.value.route.path }) : e(a)("page.occupied", { path: s.value.route.path })
269
- }, null, 8, ["description"])) : O("", !0),
270
- s.value.matched ? (y(), F("div", qe, [
271
- l(e(R), {
261
+ description: s.value.route.kind === "alias" ? e(t)("page.occupied-alias", { target: s.value.route.target ?? s.value.route.path }) : e(t)("page.occupied", { path: s.value.route.path })
262
+ }, null, 8, ["description"])) : j("", !0),
263
+ s.value.matched ? (b(), M("div", He, [
264
+ l(e(A), {
272
265
  size: "sm",
273
266
  tone: "muted"
274
267
  }, {
275
- default: t(() => [
276
- x(h(e(a)("page.test-matched")), 1)
268
+ default: a(() => [
269
+ k(y(e(t)("page.test-matched")), 1)
277
270
  ]),
278
271
  _: 1
279
272
  }),
@@ -281,66 +274,66 @@ const Je = { class: "wx-seo-test" }, qe = {
281
274
  size: "sm",
282
275
  align: "center"
283
276
  }, {
284
- default: t(() => [
285
- l(e(M), null, {
286
- default: t(() => [
287
- x(h(e(a)(`page.${s.value.matched.match_type}`)), 1)
277
+ default: a(() => [
278
+ l(e(J), null, {
279
+ default: a(() => [
280
+ k(y(e(t)(`page.${s.value.matched.match_type}`)), 1)
288
281
  ]),
289
282
  _: 1
290
283
  }),
291
- l(e(R), {
284
+ l(e(A), {
292
285
  mono: "",
293
286
  size: "sm"
294
287
  }, {
295
- default: t(() => [
296
- x(h(s.value.matched.pattern), 1)
288
+ default: a(() => [
289
+ k(y(s.value.matched.pattern), 1)
297
290
  ]),
298
291
  _: 1
299
292
  })
300
293
  ]),
301
294
  _: 1
302
295
  })
303
- ])) : (y(), W(e(Y), {
296
+ ])) : (b(), S(e(Y), {
304
297
  key: 2,
305
298
  type: "info",
306
- description: e(a)("page.test-none")
299
+ description: e(t)("page.test-none")
307
300
  }, null, 8, ["description"])),
308
- S.value.length > 0 ? (y(), F("div", He, [
309
- l(e(R), {
301
+ $.value.length > 0 ? (b(), M("div", Ge, [
302
+ l(e(A), {
310
303
  size: "sm",
311
304
  tone: "muted"
312
305
  }, {
313
- default: t(() => [
314
- x(h(e(a)("page.test-result")), 1)
306
+ default: a(() => [
307
+ k(y(e(t)("page.test-result")), 1)
315
308
  ]),
316
309
  _: 1
317
310
  }),
318
- l(e(Re), {
311
+ l(e(Le), {
319
312
  columns: 1,
320
313
  bordered: "",
321
314
  size: "sm"
322
315
  }, {
323
- default: t(() => [
324
- (y(!0), F(se, null, ge(S.value, (u) => (y(), W(e(Le), {
325
- key: u.label,
326
- label: u.label
316
+ default: a(() => [
317
+ (b(!0), M(oe, null, ge($.value, (d) => (b(), S(e(je), {
318
+ key: d.label,
319
+ label: d.label
327
320
  }, {
328
- default: t(() => [
329
- x(h(u.value), 1)
321
+ default: a(() => [
322
+ k(y(d.value), 1)
330
323
  ]),
331
324
  _: 2
332
325
  }, 1032, ["label"]))), 128))
333
326
  ]),
334
327
  _: 1
335
328
  })
336
- ])) : O("", !0),
337
- s.value.chain.length > 0 ? (y(), F("div", Ge, [
338
- l(e(R), {
329
+ ])) : j("", !0),
330
+ s.value.chain.length > 0 ? (b(), M("div", Qe, [
331
+ l(e(A), {
339
332
  size: "sm",
340
333
  tone: "muted"
341
334
  }, {
342
- default: t(() => [
343
- x(h(e(a)("page.test-chain")), 1)
335
+ default: a(() => [
336
+ k(y(e(t)("page.test-chain")), 1)
344
337
  ]),
345
338
  _: 1
346
339
  }),
@@ -348,142 +341,142 @@ const Je = { class: "wx-seo-test" }, qe = {
348
341
  size: "xs",
349
342
  wrap: ""
350
343
  }, {
351
- default: t(() => [
352
- (y(!0), F(se, null, ge(s.value.chain, (u) => (y(), W(e(M), {
353
- key: u.source
344
+ default: a(() => [
345
+ (b(!0), M(oe, null, ge(s.value.chain, (d) => (b(), S(e(J), {
346
+ key: d.source
354
347
  }, {
355
- default: t(() => [
356
- x(h(u.source) + " · " + h(u.priority), 1)
348
+ default: a(() => [
349
+ k(y(d.source) + " · " + y(d.priority), 1)
357
350
  ]),
358
351
  _: 2
359
352
  }, 1024))), 128))
360
353
  ]),
361
354
  _: 1
362
355
  })
363
- ])) : O("", !0)
364
- ], 64)) : f.value ? O("", !0) : (y(), W(e(je), {
356
+ ])) : j("", !0)
357
+ ], 64)) : h.value ? j("", !0) : (b(), S(e(Ae), {
365
358
  key: 1,
366
359
  icon: "search",
367
- description: e(a)("page.test-empty")
360
+ description: e(t)("page.test-empty")
368
361
  }, null, 8, ["description"]))
369
362
  ])
370
363
  ]),
371
364
  _: 1
372
365
  }, 8, ["open", "title"]));
373
366
  }
374
- }), Q = (n, r) => {
375
- const d = n.__vccOpts || n;
376
- for (const [c, a] of r)
377
- d[c] = a;
378
- return d;
379
- }, ce = /* @__PURE__ */ Q(Qe, [["__scopeId", "data-v-116e47cd"]]), Xe = /* @__PURE__ */ E({
367
+ }), te = (o, r) => {
368
+ const i = o.__vccOpts || o;
369
+ for (const [u, t] of r)
370
+ i[u] = t;
371
+ return i;
372
+ }, pe = /* @__PURE__ */ te(Xe, [["__scopeId", "data-v-116e47cd"]]), Ye = /* @__PURE__ */ q({
380
373
  __name: "SeoAliasesPage",
381
374
  props: {
382
375
  base: { default: "/seo" }
383
376
  },
384
- setup(n) {
385
- const r = n, d = K(), c = G(d);
386
- q();
387
- const a = J("webx-seo"), i = C(null), f = C(!1), s = Z(ce), S = U(() => (d.state.manifest?.locales?.length ?? 1) > 1), k = U(() => [
388
- { key: "pattern", label: a("page.address"), sortable: !1 },
389
- { key: "target", label: a("page.target") },
377
+ setup(o) {
378
+ const r = o, i = H(), u = Q(i);
379
+ G();
380
+ const t = K("webx-seo"), n = T(null), h = T(!1), s = ee(pe), $ = w(() => (i.state.manifest?.locales?.length ?? 1) > 1), f = w(() => [
381
+ { key: "pattern", label: t("page.address"), sortable: !1 },
382
+ { key: "target", label: t("page.target") },
390
383
  {
391
384
  key: "locale",
392
- label: a("page.language"),
385
+ label: t("page.language"),
393
386
  align: "center",
394
- hidden: !S.value,
387
+ hidden: !$.value,
395
388
  hideBelow: 760
396
389
  },
397
- { key: "created_at", label: a("page.moved-at"), hideBelow: 900, hideOnCards: !0 }
390
+ { key: "created_at", label: t("page.moved-at"), hideBelow: 900, hideOnCards: !0 }
398
391
  ]);
399
- async function g(p) {
400
- f.value = !0;
392
+ async function m(c) {
393
+ h.value = !0;
401
394
  try {
402
- i.value = await c.aliases({
403
- q: p.search,
404
- page: p.page,
405
- per_page: p.perPage
395
+ n.value = await u.aliases({
396
+ q: c.search,
397
+ page: c.page,
398
+ per_page: c.perPage
406
399
  });
407
400
  } finally {
408
- f.value = !1;
401
+ h.value = !1;
409
402
  }
410
403
  }
411
- return (p, u) => (y(), W(ue, {
404
+ return (c, d) => (b(), S(ce, {
412
405
  base: r.base,
413
406
  current: "aliases",
414
- onTest: u[0] || (u[0] = (V) => e(s)({}))
407
+ onTest: d[0] || (d[0] = (x) => e(s)({}))
415
408
  }, {
416
- default: t(() => [
409
+ default: a(() => [
417
410
  l(e(Y), {
418
411
  type: "info",
419
412
  variant: "soft",
420
- description: e(a)("page.aliases-help"),
413
+ description: e(t)("page.aliases-help"),
421
414
  class: "wx-seo-aliases__note"
422
415
  }, null, 8, ["description"]),
423
- l(e(re), {
424
- data: i.value,
425
- columns: k.value,
416
+ l(e(ue), {
417
+ data: n.value,
418
+ columns: f.value,
426
419
  "row-key": "id",
427
420
  searchable: "",
428
421
  flush: "",
429
- loading: f.value,
430
- "search-placeholder": e(a)("page.search-aliases"),
431
- "empty-text": e(a)("page.aliases-empty"),
432
- onStateChange: g
422
+ loading: h.value,
423
+ "search-placeholder": e(t)("page.search-aliases"),
424
+ "empty-text": e(t)("page.aliases-empty"),
425
+ onStateChange: m
433
426
  }, {
434
- "cell-pattern": t(({ row: V }) => [
435
- l(e(R), {
427
+ "cell-pattern": a(({ row: x }) => [
428
+ l(e(A), {
436
429
  mono: "",
437
430
  size: "sm"
438
431
  }, {
439
- default: t(() => [
440
- x(h(V.pattern), 1)
432
+ default: a(() => [
433
+ k(y(x.pattern), 1)
441
434
  ]),
442
435
  _: 2
443
436
  }, 1024)
444
437
  ]),
445
- "cell-target": t(({ row: V }) => [
446
- V.target && V.target_url ? (y(), W(e(Ae), {
438
+ "cell-target": a(({ row: x }) => [
439
+ x.target && x.target_url ? (b(), S(e(Be), {
447
440
  key: 0,
448
- href: V.target_url,
441
+ href: x.target_url,
449
442
  external: "",
450
443
  size: "sm"
451
444
  }, {
452
- default: t(() => [
453
- l(e(R), {
445
+ default: a(() => [
446
+ l(e(A), {
454
447
  mono: "",
455
448
  size: "sm"
456
449
  }, {
457
- default: t(() => [
458
- x(h(V.target), 1)
450
+ default: a(() => [
451
+ k(y(x.target), 1)
459
452
  ]),
460
453
  _: 2
461
454
  }, 1024)
462
455
  ]),
463
456
  _: 2
464
- }, 1032, ["href"])) : (y(), W(e(M), {
457
+ }, 1032, ["href"])) : (b(), S(e(J), {
465
458
  key: 1,
466
459
  type: "warning"
467
460
  }, {
468
- default: t(() => [
469
- x(h(e(a)("page.gone")), 1)
461
+ default: a(() => [
462
+ k(y(e(t)("page.gone")), 1)
470
463
  ]),
471
464
  _: 1
472
465
  }))
473
466
  ]),
474
- "cell-locale": t(({ row: V }) => [
475
- l(e(M), null, {
476
- default: t(() => [
477
- x(h(V.locale), 1)
467
+ "cell-locale": a(({ row: x }) => [
468
+ l(e(J), null, {
469
+ default: a(() => [
470
+ k(y(x.locale), 1)
478
471
  ]),
479
472
  _: 2
480
473
  }, 1024)
481
474
  ]),
482
- "cell-created_at": t(({ row: V }) => [
483
- V.created_at ? (y(), W(e(_e), {
475
+ "cell-created_at": a(({ row: x }) => [
476
+ x.created_at ? (b(), S(e(ye), {
484
477
  key: 0,
485
- value: V.created_at
486
- }, null, 8, ["value"])) : O("", !0)
478
+ value: x.created_at
479
+ }, null, 8, ["value"])) : j("", !0)
487
480
  ]),
488
481
  _: 1
489
482
  }, 8, ["data", "columns", "loading", "search-placeholder", "empty-text"])
@@ -491,19 +484,19 @@ const Je = { class: "wx-seo-test" }, qe = {
491
484
  _: 1
492
485
  }, 8, ["base"]));
493
486
  }
494
- }), Ye = /* @__PURE__ */ Q(Xe, [["__scopeId", "data-v-6816a871"]]), ne = [
487
+ }), Ze = /* @__PURE__ */ te(Ye, [["__scopeId", "data-v-6816a871"]]), ie = [
495
488
  "noindex",
496
489
  "nofollow",
497
490
  "noarchive",
498
491
  "nosnippet",
499
492
  "noimageindex"
500
- ], Ze = { class: "wx-seo" }, et = { class: "wx-seo__fields" }, tt = { class: "wx-seo__count" }, at = { class: "wx-seo__count" }, lt = {
493
+ ], et = { class: "wx-seo" }, tt = { class: "wx-seo__fields" }, at = { class: "wx-seo__count" }, lt = { class: "wx-seo__count" }, st = {
501
494
  key: 0,
502
495
  class: "wx-seo__preview"
503
- }, st = { class: "wx-seo__snippet" }, ot = {
496
+ }, ot = { class: "wx-seo__snippet" }, nt = {
504
497
  key: 0,
505
498
  class: "wx-seo__snippet-address"
506
- }, nt = { class: "wx-seo__snippet-title" }, it = { class: "wx-seo__snippet-text" }, dt = { class: "wx-seo__fields" }, rt = { class: "wx-seo__fields" }, ut = /* @__PURE__ */ E({
499
+ }, it = { class: "wx-seo__snippet-title" }, rt = { class: "wx-seo__snippet-text" }, dt = { class: "wx-seo__fields" }, ut = { class: "wx-seo__fields" }, ct = /* @__PURE__ */ q({
507
500
  name: "WxSeo",
508
501
  __name: "SeoCard",
509
502
  props: /* @__PURE__ */ ze({
@@ -518,98 +511,98 @@ const Je = { class: "wx-seo-test" }, qe = {
518
511
  modelModifiers: {}
519
512
  }),
520
513
  emits: ["update:modelValue"],
521
- setup(n) {
522
- const r = n, d = Ce(n, "modelValue");
523
- q();
524
- const c = J("webx-seo"), a = Be(), i = C(null), f = C(!1);
514
+ setup(o) {
515
+ const r = o, i = Te(o, "modelValue");
516
+ G();
517
+ const u = K("webx-seo"), t = Fe(), n = T(null), h = T(!1);
525
518
  function s(_) {
526
- return U({
527
- get: () => d.value?.[_],
528
- set: ($) => {
529
- d.value = { ...d.value ?? {}, [_]: $ };
519
+ return w({
520
+ get: () => i.value?.[_],
521
+ set: (V) => {
522
+ i.value = { ...i.value ?? {}, [_]: V };
530
523
  }
531
524
  });
532
525
  }
533
- const S = s("title"), k = s("h1"), g = s("description"), p = s("keywords"), u = s("og_title"), V = s("og_description"), L = U({
534
- get: () => d.value?.canonical ?? "",
526
+ const $ = s("title"), f = s("h1"), m = s("description"), c = s("keywords"), d = s("og_title"), x = s("og_description"), R = w({
527
+ get: () => i.value?.canonical ?? "",
535
528
  set: (_) => {
536
- d.value = { ...d.value ?? {}, canonical: _.trim() === "" ? null : _ };
529
+ i.value = { ...i.value ?? {}, canonical: _.trim() === "" ? null : _ };
537
530
  }
538
- }), A = U({
539
- get: () => d.value?.og_image ?? null,
531
+ }), F = w({
532
+ get: () => i.value?.og_image ?? null,
540
533
  set: (_) => {
541
- d.value = { ...d.value ?? {}, og_image: _ };
534
+ i.value = { ...i.value ?? {}, og_image: _ };
542
535
  }
543
- }), D = U(() => (d.value?.robots ?? "").split(",").map((_) => _.trim())), m = U(
544
- () => D.value.filter((_) => _ !== "" && !ne.includes(_))
545
- ), b = U({
546
- get: () => D.value.filter((_) => ne.includes(_)),
536
+ }), N = w(() => (i.value?.robots ?? "").split(",").map((_) => _.trim())), U = w(
537
+ () => N.value.filter((_) => _ !== "" && !ie.includes(_))
538
+ ), p = w({
539
+ get: () => N.value.filter((_) => ie.includes(_)),
547
540
  set: (_) => {
548
- const $ = [..._, ...m.value].join(", ");
549
- d.value = { ...d.value ?? {}, robots: $ === "" ? null : $ };
541
+ const V = [..._, ...U.value].join(", ");
542
+ i.value = { ...i.value ?? {}, robots: V === "" ? null : V };
550
543
  }
551
- }), o = U(
552
- () => ne.map((_) => ({ value: _, label: c(`card.${_}`) }))
553
- ), w = U({
544
+ }), v = w(
545
+ () => ie.map((_) => ({ value: _, label: u(`card.${_}`) }))
546
+ ), g = w({
554
547
  get: () => {
555
- if (i.value !== null) return i.value;
556
- const _ = d.value?.json_ld;
548
+ if (n.value !== null) return n.value;
549
+ const _ = i.value?.json_ld;
557
550
  return _ == null ? "" : JSON.stringify(_, null, 2);
558
551
  },
559
552
  set: (_) => {
560
- if (i.value = _, _.trim() === "") {
561
- f.value = !1, d.value = { ...d.value ?? {}, json_ld: null };
553
+ if (n.value = _, _.trim() === "") {
554
+ h.value = !1, i.value = { ...i.value ?? {}, json_ld: null };
562
555
  return;
563
556
  }
564
557
  try {
565
- d.value = { ...d.value ?? {}, json_ld: JSON.parse(_) }, f.value = !1;
558
+ i.value = { ...i.value ?? {}, json_ld: JSON.parse(_) }, h.value = !1;
566
559
  } catch {
567
- f.value = !0;
560
+ h.value = !0;
568
561
  }
569
562
  }
570
563
  });
571
- function v(_) {
572
- return we(_, a.active.value);
564
+ function C(_) {
565
+ return xe(_, t.active.value);
573
566
  }
574
- const ee = U(() => ({
575
- title: v(S.value).length,
576
- description: v(g.value).length
577
- })), H = U(() => ({
578
- title: v(S.value),
579
- description: v(g.value),
580
- address: L.value || (r.site ?? "")
581
- })), Se = U(() => H.value.title !== "" || H.value.description !== ""), Ue = U(
582
- () => m.value.length === 0 ? void 0 : c("card.robots-kept", { directives: m.value.join(", ") })
567
+ const z = w(() => ({
568
+ title: C($.value).length,
569
+ description: C(m.value).length
570
+ })), L = w(() => ({
571
+ title: C($.value),
572
+ description: C(m.value),
573
+ address: R.value || (r.site ?? "")
574
+ })), W = w(() => L.value.title !== "" || L.value.description !== ""), Se = w(
575
+ () => U.value.length === 0 ? void 0 : u("card.robots-kept", { directives: U.value.join(", ") })
583
576
  );
584
- function pe(_, $) {
585
- return _ > $ ? "warning" : "muted";
577
+ function ve(_, V) {
578
+ return _ > V ? "warning" : "muted";
586
579
  }
587
- return (_, $) => (y(), F("div", Ze, [
588
- l(e(Pe), { "keep-alive": "" }, {
589
- default: t(() => [
590
- l(e(oe), {
591
- label: e(c)("card.section-page"),
580
+ return (_, V) => (b(), M("div", et, [
581
+ l(e(Ne), { "keep-alive": "" }, {
582
+ default: a(() => [
583
+ l(e(ne), {
584
+ label: e(u)("card.section-page"),
592
585
  value: "page"
593
586
  }, {
594
- default: t(() => [
595
- j("div", et, [
596
- l(e(z), {
597
- label: e(c)("card.title"),
598
- disabled: n.disabled
587
+ default: a(() => [
588
+ B("div", tt, [
589
+ l(e(O), {
590
+ label: e(u)("card.title"),
591
+ disabled: o.disabled
599
592
  }, {
600
- default: t(() => [
601
- l(e(N), {
602
- modelValue: e(S),
603
- "onUpdate:modelValue": $[0] || ($[0] = (T) => P(S) ? S.value = T : null),
593
+ default: a(() => [
594
+ l(e(E), {
595
+ modelValue: e($),
596
+ "onUpdate:modelValue": V[0] || (V[0] = (D) => I($) ? $.value = D : null),
604
597
  localized: ""
605
598
  }, null, 8, ["modelValue"]),
606
- j("div", tt, [
607
- l(e(R), {
599
+ B("div", at, [
600
+ l(e(A), {
608
601
  size: "sm",
609
- tone: pe(ee.value.title, n.titleLimit)
602
+ tone: ve(z.value.title, o.titleLimit)
610
603
  }, {
611
- default: t(() => [
612
- x(h(ee.value.title) + " / " + h(n.titleLimit), 1)
604
+ default: a(() => [
605
+ k(y(z.value.title) + " / " + y(o.titleLimit), 1)
613
606
  ]),
614
607
  _: 1
615
608
  }, 8, ["tone"])
@@ -617,37 +610,37 @@ const Je = { class: "wx-seo-test" }, qe = {
617
610
  ]),
618
611
  _: 1
619
612
  }, 8, ["label", "disabled"]),
620
- l(e(z), {
621
- label: e(c)("card.h1"),
622
- disabled: n.disabled
613
+ l(e(O), {
614
+ label: e(u)("card.h1"),
615
+ disabled: o.disabled
623
616
  }, {
624
- default: t(() => [
625
- l(e(N), {
626
- modelValue: e(k),
627
- "onUpdate:modelValue": $[1] || ($[1] = (T) => P(k) ? k.value = T : null),
617
+ default: a(() => [
618
+ l(e(E), {
619
+ modelValue: e(f),
620
+ "onUpdate:modelValue": V[1] || (V[1] = (D) => I(f) ? f.value = D : null),
628
621
  localized: ""
629
622
  }, null, 8, ["modelValue"])
630
623
  ]),
631
624
  _: 1
632
625
  }, 8, ["label", "disabled"]),
633
- l(e(z), {
634
- label: e(c)("card.description"),
635
- disabled: n.disabled
626
+ l(e(O), {
627
+ label: e(u)("card.description"),
628
+ disabled: o.disabled
636
629
  }, {
637
- default: t(() => [
630
+ default: a(() => [
638
631
  l(e(me), {
639
- modelValue: e(g),
640
- "onUpdate:modelValue": $[2] || ($[2] = (T) => P(g) ? g.value = T : null),
632
+ modelValue: e(m),
633
+ "onUpdate:modelValue": V[2] || (V[2] = (D) => I(m) ? m.value = D : null),
641
634
  localized: "",
642
635
  rows: 3
643
636
  }, null, 8, ["modelValue"]),
644
- j("div", at, [
645
- l(e(R), {
637
+ B("div", lt, [
638
+ l(e(A), {
646
639
  size: "sm",
647
- tone: pe(ee.value.description, n.descriptionLimit)
640
+ tone: ve(z.value.description, o.descriptionLimit)
648
641
  }, {
649
- default: t(() => [
650
- x(h(ee.value.description) + " / " + h(n.descriptionLimit), 1)
642
+ default: a(() => [
643
+ k(y(z.value.description) + " / " + y(o.descriptionLimit), 1)
651
644
  ]),
652
645
  _: 1
653
646
  }, 8, ["tone"])
@@ -655,76 +648,76 @@ const Je = { class: "wx-seo-test" }, qe = {
655
648
  ]),
656
649
  _: 1
657
650
  }, 8, ["label", "disabled"]),
658
- l(e(z), {
659
- label: e(c)("card.keywords"),
660
- disabled: n.disabled
651
+ l(e(O), {
652
+ label: e(u)("card.keywords"),
653
+ disabled: o.disabled
661
654
  }, {
662
- default: t(() => [
663
- l(e(N), {
664
- modelValue: e(p),
665
- "onUpdate:modelValue": $[3] || ($[3] = (T) => P(p) ? p.value = T : null),
655
+ default: a(() => [
656
+ l(e(E), {
657
+ modelValue: e(c),
658
+ "onUpdate:modelValue": V[3] || (V[3] = (D) => I(c) ? c.value = D : null),
666
659
  localized: ""
667
660
  }, null, 8, ["modelValue"])
668
661
  ]),
669
662
  _: 1
670
663
  }, 8, ["label", "disabled"]),
671
- Se.value ? (y(), F("div", lt, [
672
- l(e(R), {
664
+ W.value ? (b(), M("div", st, [
665
+ l(e(A), {
673
666
  size: "sm",
674
667
  tone: "muted"
675
668
  }, {
676
- default: t(() => [
677
- x(h(e(c)("card.preview")), 1)
669
+ default: a(() => [
670
+ k(y(e(u)("card.preview")), 1)
678
671
  ]),
679
672
  _: 1
680
673
  }),
681
- j("div", st, [
682
- H.value.address ? (y(), F("div", ot, h(H.value.address), 1)) : O("", !0),
683
- j("div", nt, h(H.value.title), 1),
684
- j("div", it, h(H.value.description), 1)
674
+ B("div", ot, [
675
+ L.value.address ? (b(), M("div", nt, y(L.value.address), 1)) : j("", !0),
676
+ B("div", it, y(L.value.title), 1),
677
+ B("div", rt, y(L.value.description), 1)
685
678
  ])
686
- ])) : O("", !0)
679
+ ])) : j("", !0)
687
680
  ])
688
681
  ]),
689
682
  _: 1
690
683
  }, 8, ["label"]),
691
- l(e(oe), {
692
- label: e(c)("card.section-share"),
684
+ l(e(ne), {
685
+ label: e(u)("card.section-share"),
693
686
  value: "share"
694
687
  }, {
695
- default: t(() => [
696
- j("div", dt, [
697
- n.mediaField ? (y(), W(Te(n.mediaField), {
688
+ default: a(() => [
689
+ B("div", dt, [
690
+ o.mediaField ? (b(), S(Ce(o.mediaField), {
698
691
  key: 0,
699
- modelValue: A.value,
700
- "onUpdate:modelValue": $[4] || ($[4] = (T) => A.value = T),
701
- label: e(c)("card.og-image"),
692
+ modelValue: F.value,
693
+ "onUpdate:modelValue": V[4] || (V[4] = (D) => F.value = D),
694
+ label: e(u)("card.og-image"),
702
695
  aspect: "16/9",
703
696
  accept: "image",
704
- disabled: n.disabled
705
- }, null, 8, ["modelValue", "label", "disabled"])) : O("", !0),
706
- l(e(z), {
707
- label: e(c)("card.og-title"),
708
- help: e(c)("card.og-help"),
709
- disabled: n.disabled
697
+ disabled: o.disabled
698
+ }, null, 8, ["modelValue", "label", "disabled"])) : j("", !0),
699
+ l(e(O), {
700
+ label: e(u)("card.og-title"),
701
+ help: e(u)("card.og-help"),
702
+ disabled: o.disabled
710
703
  }, {
711
- default: t(() => [
712
- l(e(N), {
713
- modelValue: e(u),
714
- "onUpdate:modelValue": $[5] || ($[5] = (T) => P(u) ? u.value = T : null),
704
+ default: a(() => [
705
+ l(e(E), {
706
+ modelValue: e(d),
707
+ "onUpdate:modelValue": V[5] || (V[5] = (D) => I(d) ? d.value = D : null),
715
708
  localized: ""
716
709
  }, null, 8, ["modelValue"])
717
710
  ]),
718
711
  _: 1
719
712
  }, 8, ["label", "help", "disabled"]),
720
- l(e(z), {
721
- label: e(c)("card.og-description"),
722
- disabled: n.disabled
713
+ l(e(O), {
714
+ label: e(u)("card.og-description"),
715
+ disabled: o.disabled
723
716
  }, {
724
- default: t(() => [
717
+ default: a(() => [
725
718
  l(e(me), {
726
- modelValue: e(V),
727
- "onUpdate:modelValue": $[6] || ($[6] = (T) => P(V) ? V.value = T : null),
719
+ modelValue: e(x),
720
+ "onUpdate:modelValue": V[6] || (V[6] = (D) => I(x) ? x.value = D : null),
728
721
  localized: "",
729
722
  rows: 2
730
723
  }, null, 8, ["modelValue"])
@@ -735,51 +728,51 @@ const Je = { class: "wx-seo-test" }, qe = {
735
728
  ]),
736
729
  _: 1
737
730
  }, 8, ["label"]),
738
- l(e(oe), {
739
- label: e(c)("card.section-advanced"),
731
+ l(e(ne), {
732
+ label: e(u)("card.section-advanced"),
740
733
  value: "advanced"
741
734
  }, {
742
- default: t(() => [
743
- j("div", rt, [
744
- l(e(z), {
745
- label: e(c)("card.canonical"),
746
- help: e(c)("card.canonical-help"),
747
- disabled: n.disabled
735
+ default: a(() => [
736
+ B("div", ut, [
737
+ l(e(O), {
738
+ label: e(u)("card.canonical"),
739
+ help: e(u)("card.canonical-help"),
740
+ disabled: o.disabled
748
741
  }, {
749
- default: t(() => [
750
- l(e(N), {
751
- modelValue: L.value,
752
- "onUpdate:modelValue": $[7] || ($[7] = (T) => L.value = T),
742
+ default: a(() => [
743
+ l(e(E), {
744
+ modelValue: R.value,
745
+ "onUpdate:modelValue": V[7] || (V[7] = (D) => R.value = D),
753
746
  placeholder: "https://example.com/page"
754
747
  }, null, 8, ["modelValue"])
755
748
  ]),
756
749
  _: 1
757
750
  }, 8, ["label", "help", "disabled"]),
758
- l(e(z), {
759
- label: e(c)("card.robots"),
760
- help: Ue.value,
761
- disabled: n.disabled
751
+ l(e(O), {
752
+ label: e(u)("card.robots"),
753
+ help: Se.value,
754
+ disabled: o.disabled
762
755
  }, {
763
- default: t(() => [
764
- l(e(Fe), {
765
- modelValue: b.value,
766
- "onUpdate:modelValue": $[8] || ($[8] = (T) => b.value = T),
767
- options: o.value
756
+ default: a(() => [
757
+ l(e(Pe), {
758
+ modelValue: p.value,
759
+ "onUpdate:modelValue": V[8] || (V[8] = (D) => p.value = D),
760
+ options: v.value
768
761
  }, null, 8, ["modelValue", "options"])
769
762
  ]),
770
763
  _: 1
771
764
  }, 8, ["label", "help", "disabled"]),
772
- n.structuredData ? (y(), W(e(z), {
765
+ o.structuredData ? (b(), S(e(O), {
773
766
  key: 0,
774
- label: e(c)("card.json-ld"),
775
- help: e(c)("card.json-ld-help"),
776
- error: f.value ? e(c)("card.json-ld-invalid") : void 0,
777
- disabled: n.disabled
767
+ label: e(u)("card.json-ld"),
768
+ help: e(u)("card.json-ld-help"),
769
+ error: h.value ? e(u)("card.json-ld-invalid") : void 0,
770
+ disabled: o.disabled
778
771
  }, {
779
- default: t(() => [
780
- l(e(Ne), {
781
- modelValue: w.value,
782
- "onUpdate:modelValue": $[9] || ($[9] = (T) => w.value = T),
772
+ default: a(() => [
773
+ l(e(Ie), {
774
+ modelValue: g.value,
775
+ "onUpdate:modelValue": V[9] || (V[9] = (D) => g.value = D),
783
776
  language: "json",
784
777
  lint: "",
785
778
  "min-height": "120px",
@@ -787,7 +780,7 @@ const Je = { class: "wx-seo-test" }, qe = {
787
780
  }, null, 8, ["modelValue"])
788
781
  ]),
789
782
  _: 1
790
- }, 8, ["label", "help", "error", "disabled"])) : O("", !0)
783
+ }, 8, ["label", "help", "error", "disabled"])) : j("", !0)
791
784
  ])
792
785
  ]),
793
786
  _: 1
@@ -797,93 +790,93 @@ const Je = { class: "wx-seo-test" }, qe = {
797
790
  })
798
791
  ]));
799
792
  }
800
- }), Ve = /* @__PURE__ */ Q(ut, [["__scopeId", "data-v-60b7936d"]]), ct = { class: "wx-seo-redirect" }, pt = { class: "wx-seo-redirect__row" }, vt = /* @__PURE__ */ E({
793
+ }), Ve = /* @__PURE__ */ te(ct, [["__scopeId", "data-v-60b7936d"]]), pt = { class: "wx-seo-redirect" }, vt = { class: "wx-seo-redirect__row" }, gt = /* @__PURE__ */ q({
801
794
  __name: "SeoRedirectDialog",
802
795
  props: {
803
796
  redirect: { default: null }
804
797
  },
805
- setup(n) {
806
- const r = n, { resolve: d, dismiss: c, open: a } = ie(), i = K(), f = G(i);
807
- q();
808
- const s = J("webx-seo"), S = le(), k = C(!1), g = C({}), p = C(null), u = C({
798
+ setup(o) {
799
+ const r = o, { resolve: i, dismiss: u, open: t } = re(), n = H(), h = Q(n);
800
+ G();
801
+ const s = K("webx-seo"), $ = se(), f = T(!1), m = T({}), c = T(null), d = T({
809
802
  match_type: "exact",
810
803
  pattern: "",
811
804
  target: "",
812
805
  status: 301,
813
806
  is_active: !0
814
- }), V = U(() => r.redirect !== null), L = U(() => [
807
+ }), x = w(() => r.redirect !== null), R = w(() => [
815
808
  { value: "exact", label: s("page.exact") },
816
809
  { value: "mask", label: s("page.mask") },
817
810
  { value: "regex", label: s("page.regex") }
818
- ]), A = [
811
+ ]), F = [
819
812
  { value: 301, label: "301" },
820
813
  { value: 302, label: "302" }
821
814
  ];
822
815
  be(
823
816
  () => r.redirect,
824
- (o) => {
825
- u.value = {
826
- match_type: o?.match_type ?? "exact",
827
- pattern: o?.pattern ?? "",
828
- target: o?.target ?? "",
829
- status: o?.status ?? 301,
830
- is_active: o?.is_active ?? !0
831
- }, g.value = {}, p.value = null, D();
817
+ (v) => {
818
+ d.value = {
819
+ match_type: v?.match_type ?? "exact",
820
+ pattern: v?.pattern ?? "",
821
+ target: v?.target ?? "",
822
+ status: v?.status ?? 301,
823
+ is_active: v?.is_active ?? !0
824
+ }, m.value = {}, c.value = null, N();
832
825
  },
833
826
  { immediate: !0 }
834
827
  );
835
- async function D() {
836
- const o = u.value.pattern.trim();
837
- if (u.value.match_type !== "exact" || o === "") {
838
- p.value = null;
828
+ async function N() {
829
+ const v = d.value.pattern.trim();
830
+ if (d.value.match_type !== "exact" || v === "") {
831
+ c.value = null;
839
832
  return;
840
833
  }
841
834
  try {
842
- p.value = (await f.test(o)).route;
835
+ c.value = (await h.test(v)).route;
843
836
  } catch {
844
- p.value = null;
837
+ c.value = null;
845
838
  }
846
839
  }
847
- function m(o) {
848
- return g.value[o]?.[0];
840
+ function U(v) {
841
+ return m.value[v]?.[0];
849
842
  }
850
- async function b() {
851
- k.value = !0, g.value = {};
843
+ async function p() {
844
+ f.value = !0, m.value = {};
852
845
  try {
853
- const o = r.redirect ? await f.updateRedirect(r.redirect.id, u.value) : await f.createRedirect(u.value);
854
- B.success(s("page.saved")), d(o);
855
- } catch (o) {
856
- const w = o.body;
857
- w?.errors ? (g.value = w.errors, B.danger(s("page.failed"))) : B.danger(S(o, s("page.failed")));
846
+ const v = r.redirect ? await h.updateRedirect(r.redirect.id, d.value) : await h.createRedirect(d.value);
847
+ P.success(s("page.saved")), i(v);
848
+ } catch (v) {
849
+ const g = v.body;
850
+ g?.errors ? (m.value = g.errors, P.danger(s("page.failed"))) : P.danger($(v, s("page.failed")));
858
851
  } finally {
859
- k.value = !1;
852
+ f.value = !1;
860
853
  }
861
854
  }
862
- return (o, w) => (y(), W(e(de), {
863
- open: e(a),
864
- "onUpdate:open": w[6] || (w[6] = (v) => P(a) ? a.value = v : null),
855
+ return (v, g) => (b(), S(e(de), {
856
+ open: e(t),
857
+ "onUpdate:open": g[6] || (g[6] = (C) => I(t) ? t.value = C : null),
865
858
  title: e(s)("page.redirect"),
866
859
  width: 640
867
860
  }, {
868
- footer: t(() => [
861
+ footer: a(() => [
869
862
  l(e(X), { size: "sm" }, {
870
- default: t(() => [
871
- l(e(I), {
863
+ default: a(() => [
864
+ l(e(Z), {
872
865
  variant: "outline",
873
- onClick: w[5] || (w[5] = (v) => e(c)())
866
+ onClick: g[5] || (g[5] = (C) => e(u)())
874
867
  }, {
875
- default: t(() => [
876
- x(h(e(s)("page.cancel")), 1)
868
+ default: a(() => [
869
+ k(y(e(s)("page.cancel")), 1)
877
870
  ]),
878
871
  _: 1
879
872
  }),
880
- l(e(I), {
873
+ l(e(Z), {
881
874
  type: "primary",
882
- loading: k.value,
883
- onClick: b
875
+ loading: f.value,
876
+ onClick: p
884
877
  }, {
885
- default: t(() => [
886
- x(h(V.value ? e(s)("page.save") : e(s)("page.new-redirect")), 1)
878
+ default: a(() => [
879
+ k(y(x.value ? e(s)("page.save") : e(s)("page.new-redirect")), 1)
887
880
  ]),
888
881
  _: 1
889
882
  }, 8, ["loading"])
@@ -891,76 +884,76 @@ const Je = { class: "wx-seo-test" }, qe = {
891
884
  _: 1
892
885
  })
893
886
  ]),
894
- default: t(() => [
895
- j("div", ct, [
896
- l(e(z), {
887
+ default: a(() => [
888
+ B("div", pt, [
889
+ l(e(O), {
897
890
  label: e(s)("page.kind")
898
891
  }, {
899
- default: t(() => [
900
- l(e(ae), {
901
- modelValue: u.value.match_type,
902
- "onUpdate:modelValue": w[0] || (w[0] = (v) => u.value.match_type = v),
903
- options: L.value,
904
- onChange: D
892
+ default: a(() => [
893
+ l(e(le), {
894
+ modelValue: d.value.match_type,
895
+ "onUpdate:modelValue": g[0] || (g[0] = (C) => d.value.match_type = C),
896
+ options: R.value,
897
+ onChange: N
905
898
  }, null, 8, ["modelValue", "options"])
906
899
  ]),
907
900
  _: 1
908
901
  }, 8, ["label"]),
909
- l(e(z), {
902
+ l(e(O), {
910
903
  label: e(s)("page.address"),
911
904
  help: e(s)("page.address-help"),
912
- error: m("pattern")
905
+ error: U("pattern")
913
906
  }, {
914
- default: t(() => [
915
- l(e(N), {
916
- modelValue: u.value.pattern,
917
- "onUpdate:modelValue": w[1] || (w[1] = (v) => u.value.pattern = v),
907
+ default: a(() => [
908
+ l(e(E), {
909
+ modelValue: d.value.pattern,
910
+ "onUpdate:modelValue": g[1] || (g[1] = (C) => d.value.pattern = C),
918
911
  placeholder: "/old-address",
919
- onBlur: D
912
+ onBlur: N
920
913
  }, null, 8, ["modelValue"])
921
914
  ]),
922
915
  _: 1
923
916
  }, 8, ["label", "help", "error"]),
924
- p.value ? (y(), W(e(Y), {
917
+ c.value ? (b(), S(e(Y), {
925
918
  key: 0,
926
919
  type: "warning",
927
920
  variant: "soft",
928
- description: p.value.kind === "alias" ? e(s)("page.occupied-alias", { target: p.value.target ?? p.value.path }) : e(s)("page.occupied", { path: p.value.path })
929
- }, null, 8, ["description"])) : O("", !0),
930
- l(e(z), {
921
+ description: c.value.kind === "alias" ? e(s)("page.occupied-alias", { target: c.value.target ?? c.value.path }) : e(s)("page.occupied", { path: c.value.path })
922
+ }, null, 8, ["description"])) : j("", !0),
923
+ l(e(O), {
931
924
  label: e(s)("page.target"),
932
925
  help: e(s)("page.target-help"),
933
- error: m("target")
926
+ error: U("target")
934
927
  }, {
935
- default: t(() => [
936
- l(e(N), {
937
- modelValue: u.value.target,
938
- "onUpdate:modelValue": w[2] || (w[2] = (v) => u.value.target = v),
928
+ default: a(() => [
929
+ l(e(E), {
930
+ modelValue: d.value.target,
931
+ "onUpdate:modelValue": g[2] || (g[2] = (C) => d.value.target = C),
939
932
  placeholder: "/new-address"
940
933
  }, null, 8, ["modelValue"])
941
934
  ]),
942
935
  _: 1
943
936
  }, 8, ["label", "help", "error"]),
944
- j("div", pt, [
945
- l(e(z), {
937
+ B("div", vt, [
938
+ l(e(O), {
946
939
  label: e(s)("page.status")
947
940
  }, {
948
- default: t(() => [
949
- l(e(ae), {
950
- modelValue: u.value.status,
951
- "onUpdate:modelValue": w[3] || (w[3] = (v) => u.value.status = v),
952
- options: A
941
+ default: a(() => [
942
+ l(e(le), {
943
+ modelValue: d.value.status,
944
+ "onUpdate:modelValue": g[3] || (g[3] = (C) => d.value.status = C),
945
+ options: F
953
946
  }, null, 8, ["modelValue"])
954
947
  ]),
955
948
  _: 1
956
949
  }, 8, ["label"]),
957
- l(e(z), {
950
+ l(e(O), {
958
951
  label: e(s)("page.state")
959
952
  }, {
960
- default: t(() => [
961
- l(e(xe), {
962
- modelValue: u.value.is_active,
963
- "onUpdate:modelValue": w[4] || (w[4] = (v) => u.value.is_active = v)
953
+ default: a(() => [
954
+ l(e(we), {
955
+ modelValue: d.value.is_active,
956
+ "onUpdate:modelValue": g[4] || (g[4] = (C) => d.value.is_active = C)
964
957
  }, null, 8, ["modelValue"])
965
958
  ]),
966
959
  _: 1
@@ -971,175 +964,179 @@ const Je = { class: "wx-seo-test" }, qe = {
971
964
  _: 1
972
965
  }, 8, ["open", "title"]));
973
966
  }
974
- }), gt = /* @__PURE__ */ Q(vt, [["__scopeId", "data-v-685edbd5"]]), mt = /* @__PURE__ */ E({
967
+ }), mt = /* @__PURE__ */ te(gt, [["__scopeId", "data-v-685edbd5"]]), ht = /* @__PURE__ */ q({
975
968
  __name: "SeoRedirectsPage",
976
969
  props: {
977
970
  base: { default: "/seo" }
978
971
  },
979
- setup(n) {
980
- const r = n, d = K(), c = G(d);
981
- q();
982
- const a = J("webx-seo"), i = le(), f = C(null), s = C(!1);
983
- let S = { page: 1, perPage: 20, sort: null, search: "" };
984
- const k = d.can("seo.manage"), g = Z(gt), p = Z(ce), u = U(() => [
985
- { key: "pattern", label: a("page.address"), sortable: !0 },
986
- { key: "target", label: a("page.target") },
987
- { key: "status", label: a("page.status"), align: "center", hideBelow: 560 },
988
- { key: "hits", label: a("page.hits"), align: "center", sortable: !0, hideBelow: 760 },
972
+ setup(o) {
973
+ const r = o, i = H(), u = Q(i);
974
+ G();
975
+ const t = K("webx-seo"), n = se(), h = T(null), s = T(!1);
976
+ let $ = { page: 1, perPage: 20, sort: null, search: "" };
977
+ const f = i.can("seo.manage"), m = ee(mt), c = ee(pe), d = w(() => [
978
+ { key: "pattern", label: t("page.address"), sortable: !0 },
979
+ { key: "target", label: t("page.target") },
980
+ { key: "status", label: t("page.status"), align: "center", hideBelow: 560 },
981
+ { key: "hits", label: t("page.hits"), align: "center", sortable: !0, hideBelow: 760 },
989
982
  {
990
983
  key: "last_hit_at",
991
- label: a("page.last-hit"),
984
+ label: t("page.last-hit"),
992
985
  sortable: !0,
993
986
  hideBelow: 900,
994
987
  hideOnCards: !0
995
988
  },
996
- { key: "is_active", label: a("page.state"), align: "center", hideBelow: 660 },
997
- { key: "actions", label: "", width: 56, align: "right", hidden: !k, hideOnCards: !0 }
989
+ { key: "is_active", label: t("page.state"), align: "center", hideBelow: 660 },
990
+ {
991
+ key: "actions",
992
+ label: "",
993
+ width: _e,
994
+ align: "right",
995
+ hidden: !f,
996
+ hideOnCards: !0
997
+ }
998
998
  ]);
999
- function V(m) {
999
+ function x(p) {
1000
1000
  return [
1001
1001
  {
1002
1002
  key: "delete",
1003
1003
  icon: "trash",
1004
- label: a("page.delete"),
1004
+ label: t("page.delete"),
1005
1005
  danger: !0,
1006
- run: () => D(m)
1006
+ run: () => N(p)
1007
1007
  }
1008
1008
  ];
1009
1009
  }
1010
- async function L(m) {
1011
- S = m, s.value = !0;
1010
+ async function R(p) {
1011
+ $ = p, s.value = !0;
1012
1012
  try {
1013
- f.value = await c.redirects({
1014
- q: m.search,
1015
- sort: m.sort ? `${m.sort.order === "desc" ? "-" : ""}${m.sort.key}` : "-hits",
1016
- page: m.page,
1017
- per_page: m.perPage
1013
+ h.value = await u.redirects({
1014
+ q: p.search,
1015
+ sort: p.sort ? `${p.sort.order === "desc" ? "-" : ""}${p.sort.key}` : "-hits",
1016
+ page: p.page,
1017
+ per_page: p.perPage
1018
1018
  });
1019
1019
  } finally {
1020
1020
  s.value = !1;
1021
1021
  }
1022
1022
  }
1023
- async function A(m) {
1024
- await g({ redirect: m }) && L(S);
1023
+ async function F(p) {
1024
+ await m({ redirect: p }) && R($);
1025
1025
  }
1026
- async function D(m) {
1026
+ async function N(p) {
1027
1027
  if (await ke({
1028
- title: a("page.delete-title", { pattern: m.pattern }),
1029
- message: a("page.delete-text"),
1030
- confirmText: a("page.delete"),
1031
- cancelText: a("page.cancel"),
1028
+ title: t("page.delete-title", { pattern: p.pattern }),
1029
+ message: t("page.delete-text"),
1030
+ confirmText: t("page.delete"),
1031
+ cancelText: t("page.cancel"),
1032
1032
  tone: "danger"
1033
1033
  }))
1034
1034
  try {
1035
- await c.removeRedirect(m.id), B.success(a("page.deleted")), L(S);
1036
- } catch (o) {
1037
- B.danger(i(o));
1035
+ await u.removeRedirect(p.id), P.success(t("page.deleted")), R($);
1036
+ } catch (g) {
1037
+ P.danger(n(g));
1038
1038
  }
1039
1039
  }
1040
- return (m, b) => (y(), W(ue, {
1040
+ const U = w(
1041
+ () => f ? [
1042
+ {
1043
+ key: "redirect",
1044
+ label: t("page.new-redirect"),
1045
+ icon: "plus",
1046
+ primary: !0,
1047
+ run: () => {
1048
+ F(null);
1049
+ }
1050
+ }
1051
+ ] : []
1052
+ );
1053
+ return (p, v) => (b(), S(ce, {
1041
1054
  base: r.base,
1042
1055
  current: "redirects",
1043
- onTest: b[1] || (b[1] = (o) => e(p)({}))
1044
- }, ye({
1045
- default: t(() => [
1046
- l(e(re), {
1047
- data: f.value,
1048
- columns: u.value,
1056
+ actions: U.value,
1057
+ onTest: v[0] || (v[0] = (g) => e(c)({}))
1058
+ }, {
1059
+ default: a(() => [
1060
+ l(e(ue), {
1061
+ data: h.value,
1062
+ columns: d.value,
1049
1063
  "row-key": "id",
1050
1064
  searchable: "",
1051
- clickable: e(k),
1052
- hover: e(k),
1065
+ clickable: e(f),
1066
+ hover: e(f),
1053
1067
  flush: "",
1054
1068
  loading: s.value,
1055
- "search-placeholder": e(a)("page.search-redirects"),
1056
- "empty-text": e(a)("page.empty"),
1057
- onRowClick: A,
1058
- onStateChange: L
1069
+ "search-placeholder": e(t)("page.search-redirects"),
1070
+ "empty-text": e(t)("page.empty"),
1071
+ onRowClick: F,
1072
+ onStateChange: R
1059
1073
  }, {
1060
- "cell-pattern": t(({ row: o }) => [
1061
- l(e(R), {
1074
+ "cell-pattern": a(({ row: g }) => [
1075
+ l(e(A), {
1062
1076
  mono: "",
1063
1077
  size: "sm"
1064
1078
  }, {
1065
- default: t(() => [
1066
- x(h(o.pattern), 1)
1079
+ default: a(() => [
1080
+ k(y(g.pattern), 1)
1067
1081
  ]),
1068
1082
  _: 2
1069
1083
  }, 1024),
1070
- o.is_loop ? (y(), W(e(M), {
1084
+ g.is_loop ? (b(), S(e(J), {
1071
1085
  key: 0,
1072
1086
  type: "warning"
1073
1087
  }, {
1074
- default: t(() => [
1075
- x(h(e(a)("page.loop")), 1)
1088
+ default: a(() => [
1089
+ k(y(e(t)("page.loop")), 1)
1076
1090
  ]),
1077
1091
  _: 1
1078
- })) : O("", !0)
1092
+ })) : j("", !0)
1079
1093
  ]),
1080
- "cell-target": t(({ row: o }) => [
1081
- l(e(R), {
1094
+ "cell-target": a(({ row: g }) => [
1095
+ l(e(A), {
1082
1096
  mono: "",
1083
1097
  size: "sm"
1084
1098
  }, {
1085
- default: t(() => [
1086
- x(h(o.target), 1)
1099
+ default: a(() => [
1100
+ k(y(g.target), 1)
1087
1101
  ]),
1088
1102
  _: 2
1089
1103
  }, 1024)
1090
1104
  ]),
1091
- "cell-last_hit_at": t(({ row: o }) => [
1092
- l(e(_e), {
1093
- value: o.last_hit_at,
1094
- tone: o.last_hit_at ? "default" : "muted"
1105
+ "cell-last_hit_at": a(({ row: g }) => [
1106
+ l(e(ye), {
1107
+ value: g.last_hit_at,
1108
+ tone: g.last_hit_at ? "default" : "muted"
1095
1109
  }, null, 8, ["value", "tone"])
1096
1110
  ]),
1097
- "cell-is_active": t(({ row: o }) => [
1098
- l(e(M), {
1099
- type: o.is_active ? "success" : "default",
1111
+ "cell-is_active": a(({ row: g }) => [
1112
+ l(e(J), {
1113
+ type: g.is_active ? "success" : "default",
1100
1114
  dot: ""
1101
1115
  }, {
1102
- default: t(() => [
1103
- x(h(o.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
1116
+ default: a(() => [
1117
+ k(y(g.is_active ? e(t)("page.active") : e(t)("page.inactive")), 1)
1104
1118
  ]),
1105
1119
  _: 2
1106
1120
  }, 1032, ["type"])
1107
1121
  ]),
1108
- "card-actions": t(({ row: o }) => [
1109
- e(k) ? (y(), W(e(te), {
1122
+ "card-actions": a(({ row: g }) => [
1123
+ e(f) ? (b(), S(e(ae), {
1110
1124
  key: 0,
1111
- actions: V(o),
1112
- label: o.pattern
1113
- }, null, 8, ["actions", "label"])) : O("", !0)
1125
+ actions: x(g),
1126
+ label: g.pattern
1127
+ }, null, 8, ["actions", "label"])) : j("", !0)
1114
1128
  ]),
1115
- "cell-actions": t(({ row: o }) => [
1116
- l(e(te), {
1117
- actions: V(o),
1118
- label: o.pattern
1129
+ "cell-actions": a(({ row: g }) => [
1130
+ l(e(ae), {
1131
+ actions: x(g),
1132
+ label: g.pattern
1119
1133
  }, null, 8, ["actions", "label"])
1120
1134
  ]),
1121
1135
  _: 1
1122
1136
  }, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text"])
1123
1137
  ]),
1124
- _: 2
1125
- }, [
1126
- e(k) ? {
1127
- name: "actions",
1128
- fn: t(() => [
1129
- l(e(I), {
1130
- type: "primary",
1131
- icon: "add",
1132
- onClick: b[0] || (b[0] = (o) => A(null))
1133
- }, {
1134
- default: t(() => [
1135
- x(h(e(a)("page.new-redirect")), 1)
1136
- ]),
1137
- _: 1
1138
- })
1139
- ]),
1140
- key: "0"
1141
- } : void 0
1142
- ]), 1032, ["base"]));
1138
+ _: 1
1139
+ }, 8, ["base", "actions"]));
1143
1140
  }
1144
1141
  }), $e = [
1145
1142
  "title",
@@ -1153,96 +1150,96 @@ const Je = { class: "wx-seo-test" }, qe = {
1153
1150
  "robots",
1154
1151
  "json_ld"
1155
1152
  ];
1156
- function fe(n, r) {
1157
- return we(n.title, r);
1153
+ function fe(o, r) {
1154
+ return xe(o.title, r);
1158
1155
  }
1159
- function ht(n) {
1160
- if (!n) return {};
1156
+ function ft(o) {
1157
+ if (!o) return {};
1161
1158
  const r = {};
1162
- for (const d of $e) {
1163
- const c = n[d];
1164
- c != null && Object.assign(r, { [d]: c });
1159
+ for (const i of $e) {
1160
+ const u = o[i];
1161
+ u != null && Object.assign(r, { [i]: u });
1165
1162
  }
1166
1163
  return r;
1167
1164
  }
1168
- function ft(n, r) {
1169
- const d = { ...n };
1170
- for (const c of $e)
1171
- Object.assign(d, { [c]: r[c] ?? null });
1172
- return d;
1165
+ function bt(o, r) {
1166
+ const i = { ...o };
1167
+ for (const u of $e)
1168
+ Object.assign(i, { [u]: r[u] ?? null });
1169
+ return i;
1173
1170
  }
1174
- const bt = { class: "wx-seo-rule" }, yt = { class: "wx-seo-rule__where" }, _t = /* @__PURE__ */ E({
1171
+ const yt = { class: "wx-seo-rule" }, _t = { class: "wx-seo-rule__where" }, xt = /* @__PURE__ */ q({
1175
1172
  __name: "SeoUrlDialog",
1176
1173
  props: {
1177
1174
  rule: { default: null },
1178
1175
  mediaField: { default: void 0 }
1179
1176
  },
1180
- setup(n) {
1181
- const r = n, { resolve: d, dismiss: c, open: a } = ie(), i = K(), f = G(i);
1182
- q();
1183
- const s = J("webx-seo"), S = le(), k = C(!1), g = C({}), p = C({
1177
+ setup(o) {
1178
+ const r = o, { resolve: i, dismiss: u, open: t } = re(), n = H(), h = Q(n);
1179
+ G();
1180
+ const s = K("webx-seo"), $ = se(), f = T(!1), m = T({}), c = T({
1184
1181
  match_type: "exact",
1185
1182
  pattern: "",
1186
1183
  priority: 0,
1187
1184
  is_active: !0
1188
- }), u = C({}), V = U(() => r.rule !== null), L = U(() => [
1185
+ }), d = T({}), x = w(() => r.rule !== null), R = w(() => [
1189
1186
  { value: "exact", label: s("page.exact") },
1190
1187
  { value: "mask", label: s("page.mask") },
1191
1188
  { value: "regex", label: s("page.regex") }
1192
1189
  ]);
1193
1190
  be(
1194
1191
  () => r.rule,
1195
- (m) => {
1196
- p.value = {
1197
- match_type: m?.match_type ?? "exact",
1198
- pattern: m?.pattern ?? "",
1199
- priority: m?.priority ?? 0,
1200
- is_active: m?.is_active ?? !0
1201
- }, u.value = ht(m), g.value = {};
1192
+ (U) => {
1193
+ c.value = {
1194
+ match_type: U?.match_type ?? "exact",
1195
+ pattern: U?.pattern ?? "",
1196
+ priority: U?.priority ?? 0,
1197
+ is_active: U?.is_active ?? !0
1198
+ }, d.value = ft(U), m.value = {};
1202
1199
  },
1203
1200
  { immediate: !0 }
1204
1201
  );
1205
- function A(m) {
1206
- return g.value[m]?.[0];
1202
+ function F(U) {
1203
+ return m.value[U]?.[0];
1207
1204
  }
1208
- async function D() {
1209
- k.value = !0, g.value = {};
1210
- const m = ft(p.value, u.value);
1205
+ async function N() {
1206
+ f.value = !0, m.value = {};
1207
+ const U = bt(c.value, d.value);
1211
1208
  try {
1212
- const b = r.rule ? await f.updateUrl(r.rule.id, m) : await f.createUrl(m);
1213
- B.success(s("page.saved")), d(b);
1214
- } catch (b) {
1215
- const o = b.body;
1216
- o?.errors ? (g.value = o.errors, B.danger(s("page.failed"))) : B.danger(S(b, s("page.failed")));
1209
+ const p = r.rule ? await h.updateUrl(r.rule.id, U) : await h.createUrl(U);
1210
+ P.success(s("page.saved")), i(p);
1211
+ } catch (p) {
1212
+ const v = p.body;
1213
+ v?.errors ? (m.value = v.errors, P.danger(s("page.failed"))) : P.danger($(p, s("page.failed")));
1217
1214
  } finally {
1218
- k.value = !1;
1215
+ f.value = !1;
1219
1216
  }
1220
1217
  }
1221
- return (m, b) => (y(), W(e(de), {
1222
- open: e(a),
1223
- "onUpdate:open": b[6] || (b[6] = (o) => P(a) ? a.value = o : null),
1218
+ return (U, p) => (b(), S(e(de), {
1219
+ open: e(t),
1220
+ "onUpdate:open": p[6] || (p[6] = (v) => I(t) ? t.value = v : null),
1224
1221
  title: e(s)("page.rule"),
1225
1222
  width: 860
1226
1223
  }, {
1227
- footer: t(() => [
1224
+ footer: a(() => [
1228
1225
  l(e(X), { size: "sm" }, {
1229
- default: t(() => [
1230
- l(e(I), {
1226
+ default: a(() => [
1227
+ l(e(Z), {
1231
1228
  variant: "outline",
1232
- onClick: b[5] || (b[5] = (o) => e(c)())
1229
+ onClick: p[5] || (p[5] = (v) => e(u)())
1233
1230
  }, {
1234
- default: t(() => [
1235
- x(h(e(s)("page.cancel")), 1)
1231
+ default: a(() => [
1232
+ k(y(e(s)("page.cancel")), 1)
1236
1233
  ]),
1237
1234
  _: 1
1238
1235
  }),
1239
- l(e(I), {
1236
+ l(e(Z), {
1240
1237
  type: "primary",
1241
- loading: k.value,
1242
- onClick: D
1238
+ loading: f.value,
1239
+ onClick: N
1243
1240
  }, {
1244
- default: t(() => [
1245
- x(h(V.value ? e(s)("page.save") : e(s)("page.new-rule")), 1)
1241
+ default: a(() => [
1242
+ k(y(x.value ? e(s)("page.save") : e(s)("page.new-rule")), 1)
1246
1243
  ]),
1247
1244
  _: 1
1248
1245
  }, 8, ["loading"])
@@ -1250,64 +1247,64 @@ const bt = { class: "wx-seo-rule" }, yt = { class: "wx-seo-rule__where" }, _t =
1250
1247
  _: 1
1251
1248
  })
1252
1249
  ]),
1253
- default: t(() => [
1254
- j("div", bt, [
1255
- j("div", yt, [
1256
- l(e(z), {
1250
+ default: a(() => [
1251
+ B("div", yt, [
1252
+ B("div", _t, [
1253
+ l(e(O), {
1257
1254
  label: e(s)("page.kind")
1258
1255
  }, {
1259
- default: t(() => [
1260
- l(e(ae), {
1261
- modelValue: p.value.match_type,
1262
- "onUpdate:modelValue": b[0] || (b[0] = (o) => p.value.match_type = o),
1263
- options: L.value
1256
+ default: a(() => [
1257
+ l(e(le), {
1258
+ modelValue: c.value.match_type,
1259
+ "onUpdate:modelValue": p[0] || (p[0] = (v) => c.value.match_type = v),
1260
+ options: R.value
1264
1261
  }, null, 8, ["modelValue", "options"])
1265
1262
  ]),
1266
1263
  _: 1
1267
1264
  }, 8, ["label"]),
1268
- l(e(z), {
1265
+ l(e(O), {
1269
1266
  label: e(s)("page.address"),
1270
1267
  help: e(s)("page.address-help"),
1271
- error: A("pattern"),
1268
+ error: F("pattern"),
1272
1269
  class: "wx-seo-rule__address"
1273
1270
  }, {
1274
- default: t(() => [
1275
- l(e(N), {
1276
- modelValue: p.value.pattern,
1277
- "onUpdate:modelValue": b[1] || (b[1] = (o) => p.value.pattern = o),
1271
+ default: a(() => [
1272
+ l(e(E), {
1273
+ modelValue: c.value.pattern,
1274
+ "onUpdate:modelValue": p[1] || (p[1] = (v) => c.value.pattern = v),
1278
1275
  placeholder: "/catalog/shoes"
1279
1276
  }, null, 8, ["modelValue"])
1280
1277
  ]),
1281
1278
  _: 1
1282
1279
  }, 8, ["label", "help", "error"]),
1283
- l(e(z), {
1280
+ l(e(O), {
1284
1281
  label: e(s)("page.priority"),
1285
1282
  help: e(s)("page.priority-help")
1286
1283
  }, {
1287
- default: t(() => [
1288
- l(e(Ie), {
1289
- modelValue: p.value.priority,
1290
- "onUpdate:modelValue": b[2] || (b[2] = (o) => p.value.priority = o),
1284
+ default: a(() => [
1285
+ l(e(Me), {
1286
+ modelValue: c.value.priority,
1287
+ "onUpdate:modelValue": p[2] || (p[2] = (v) => c.value.priority = v),
1291
1288
  step: 10
1292
1289
  }, null, 8, ["modelValue"])
1293
1290
  ]),
1294
1291
  _: 1
1295
1292
  }, 8, ["label", "help"]),
1296
- l(e(z), {
1293
+ l(e(O), {
1297
1294
  label: e(s)("page.state")
1298
1295
  }, {
1299
- default: t(() => [
1300
- l(e(xe), {
1301
- modelValue: p.value.is_active,
1302
- "onUpdate:modelValue": b[3] || (b[3] = (o) => p.value.is_active = o)
1296
+ default: a(() => [
1297
+ l(e(we), {
1298
+ modelValue: c.value.is_active,
1299
+ "onUpdate:modelValue": p[3] || (p[3] = (v) => c.value.is_active = v)
1303
1300
  }, null, 8, ["modelValue"])
1304
1301
  ]),
1305
1302
  _: 1
1306
1303
  }, 8, ["label"])
1307
1304
  ]),
1308
1305
  l(Ve, {
1309
- modelValue: u.value,
1310
- "onUpdate:modelValue": b[4] || (b[4] = (o) => u.value = o),
1306
+ modelValue: d.value,
1307
+ "onUpdate:modelValue": p[4] || (p[4] = (v) => d.value = v),
1311
1308
  "media-field": r.mediaField
1312
1309
  }, null, 8, ["modelValue", "media-field"])
1313
1310
  ])
@@ -1315,190 +1312,214 @@ const bt = { class: "wx-seo-rule" }, yt = { class: "wx-seo-rule__where" }, _t =
1315
1312
  _: 1
1316
1313
  }, 8, ["open", "title"]));
1317
1314
  }
1318
- }), wt = /* @__PURE__ */ Q(_t, [["__scopeId", "data-v-fa975d05"]]), xt = /* @__PURE__ */ E({
1315
+ }), wt = /* @__PURE__ */ te(xt, [["__scopeId", "data-v-fa975d05"]]), kt = /* @__PURE__ */ q({
1319
1316
  __name: "SeoUrlsPage",
1320
1317
  props: {
1321
1318
  base: { default: "/seo" },
1322
1319
  mediaField: { default: void 0 }
1323
1320
  },
1324
- setup(n) {
1325
- const r = n, d = K(), c = G(d);
1326
- q();
1327
- const a = J("webx-seo"), i = le(), f = C(null), s = C(!1), S = C("any");
1328
- let k = { page: 1, perPage: 20, sort: null, search: "" };
1329
- const g = d.can("seo.manage"), p = Z(
1321
+ setup(o) {
1322
+ const r = o, i = H(), u = Q(i);
1323
+ G();
1324
+ const t = K("webx-seo"), n = K("webx-admin"), h = se(), s = T(null), $ = T(!1), f = T("any");
1325
+ let m = { page: 1, perPage: 20, sort: null, search: "" };
1326
+ const c = i.can("seo.manage"), d = ee(
1330
1327
  wt
1331
- ), u = Z(ce), V = U(() => [
1332
- { value: "any", label: a("page.any-kind") },
1333
- { value: "exact", label: a("page.exact") },
1334
- { value: "mask", label: a("page.mask") },
1335
- { value: "regex", label: a("page.regex") }
1336
- ]), L = U(() => [
1337
- { key: "pattern", label: a("page.address") },
1338
- { key: "match_type", label: a("page.kind"), hideBelow: 560 },
1339
- { key: "title", label: a("page.title"), hideBelow: 900 },
1340
- { key: "priority", label: a("page.priority"), align: "center", hideBelow: 760 },
1341
- { key: "is_active", label: a("page.state"), align: "center", hideBelow: 660 },
1342
- { key: "actions", label: "", width: 56, align: "right", hidden: !g, hideOnCards: !0 }
1328
+ ), x = ee(pe), R = w(() => [
1329
+ { value: "any", label: t("page.any-kind") },
1330
+ { value: "exact", label: t("page.exact") },
1331
+ { value: "mask", label: t("page.mask") },
1332
+ { value: "regex", label: t("page.regex") }
1333
+ ]), F = w(
1334
+ () => f.value === "any" ? [] : [
1335
+ {
1336
+ key: "kind",
1337
+ label: `${t("page.filter-kind")}: ${R.value.find((z) => z.value === f.value)?.label ?? f.value}`,
1338
+ clear: () => f.value = "any"
1339
+ }
1340
+ ]
1341
+ ), N = w(() => [
1342
+ { key: "pattern", label: t("page.address") },
1343
+ { key: "match_type", label: t("page.kind"), hideBelow: 560 },
1344
+ { key: "title", label: t("page.title"), hideBelow: 900 },
1345
+ { key: "priority", label: t("page.priority"), align: "center", hideBelow: 760 },
1346
+ { key: "is_active", label: t("page.state"), align: "center", hideBelow: 660 },
1347
+ {
1348
+ key: "actions",
1349
+ label: "",
1350
+ width: _e,
1351
+ align: "right",
1352
+ hidden: !c,
1353
+ hideOnCards: !0
1354
+ }
1343
1355
  ]);
1344
- function A(o) {
1356
+ function U(z) {
1345
1357
  return [
1346
1358
  {
1347
1359
  key: "delete",
1348
1360
  icon: "trash",
1349
- label: a("page.delete"),
1361
+ label: t("page.delete"),
1350
1362
  danger: !0,
1351
- run: () => b(o)
1363
+ run: () => g(z)
1352
1364
  }
1353
1365
  ];
1354
1366
  }
1355
- async function D(o) {
1356
- k = o, s.value = !0;
1367
+ async function p(z) {
1368
+ m = z, $.value = !0;
1357
1369
  try {
1358
- f.value = await c.urls({
1359
- q: o.search,
1360
- match_type: S.value === "any" ? null : S.value,
1361
- page: o.page,
1362
- per_page: o.perPage
1370
+ s.value = await u.urls({
1371
+ q: z.search,
1372
+ match_type: f.value === "any" ? null : f.value,
1373
+ page: z.page,
1374
+ per_page: z.perPage
1363
1375
  });
1364
1376
  } finally {
1365
- s.value = !1;
1377
+ $.value = !1;
1366
1378
  }
1367
1379
  }
1368
- async function m(o) {
1369
- await p({ rule: o, mediaField: r.mediaField }) && D(k);
1380
+ async function v(z) {
1381
+ await d({ rule: z, mediaField: r.mediaField }) && p(m);
1370
1382
  }
1371
- async function b(o) {
1383
+ async function g(z) {
1372
1384
  if (await ke({
1373
- title: a("page.delete-title", { pattern: o.pattern }),
1374
- message: a("page.delete-text"),
1375
- confirmText: a("page.delete"),
1376
- cancelText: a("page.cancel"),
1385
+ title: t("page.delete-title", { pattern: z.pattern }),
1386
+ message: t("page.delete-text"),
1387
+ confirmText: t("page.delete"),
1388
+ cancelText: t("page.cancel"),
1377
1389
  tone: "danger"
1378
1390
  }))
1379
1391
  try {
1380
- await c.removeUrl(o.id), B.success(a("page.deleted")), D(k);
1381
- } catch (v) {
1382
- B.danger(i(v));
1392
+ await u.removeUrl(z.id), P.success(t("page.deleted")), p(m);
1393
+ } catch (W) {
1394
+ P.danger(h(W));
1383
1395
  }
1384
1396
  }
1385
- return (o, w) => (y(), W(ue, {
1397
+ const C = w(
1398
+ () => c ? [
1399
+ {
1400
+ key: "rule",
1401
+ label: t("page.new-rule"),
1402
+ icon: "plus",
1403
+ primary: !0,
1404
+ run: () => {
1405
+ v(null);
1406
+ }
1407
+ }
1408
+ ] : []
1409
+ );
1410
+ return (z, L) => (b(), S(ce, {
1386
1411
  base: r.base,
1387
1412
  current: "rules",
1388
- onTest: w[2] || (w[2] = (v) => e(u)({}))
1389
- }, ye({
1390
- default: t(() => [
1391
- l(e(re), {
1392
- data: f.value,
1393
- columns: L.value,
1413
+ actions: C.value,
1414
+ onTest: L[1] || (L[1] = (W) => e(x)({}))
1415
+ }, {
1416
+ default: a(() => [
1417
+ l(e(ue), {
1418
+ data: s.value,
1419
+ columns: N.value,
1394
1420
  "row-key": "id",
1395
1421
  searchable: "",
1396
- clickable: e(g),
1397
- hover: e(g),
1422
+ clickable: e(c),
1423
+ hover: e(c),
1398
1424
  flush: "",
1399
- loading: s.value,
1400
- "search-placeholder": e(a)("page.search-rules"),
1401
- "empty-text": e(a)("page.empty"),
1402
- onRowClick: m,
1403
- onStateChange: D
1425
+ loading: $.value,
1426
+ "search-placeholder": e(t)("page.search-rules"),
1427
+ "empty-text": e(t)("page.empty"),
1428
+ "filters-count": F.value.length,
1429
+ "filters-label": e(n)("filters.title"),
1430
+ onRowClick: v,
1431
+ onStateChange: p
1404
1432
  }, {
1405
- actions: t(() => [
1406
- l(e(ae), {
1407
- modelValue: S.value,
1408
- "onUpdate:modelValue": w[1] || (w[1] = (v) => S.value = v),
1409
- options: V.value,
1410
- class: "wx-seo-urls__kind"
1411
- }, null, 8, ["modelValue", "options"])
1433
+ filters: a(() => [
1434
+ l(e(O), {
1435
+ label: e(t)("page.filter-kind")
1436
+ }, {
1437
+ default: a(() => [
1438
+ l(e(le), {
1439
+ modelValue: f.value,
1440
+ "onUpdate:modelValue": L[0] || (L[0] = (W) => f.value = W),
1441
+ options: R.value,
1442
+ size: "sm"
1443
+ }, null, 8, ["modelValue", "options"])
1444
+ ]),
1445
+ _: 1
1446
+ }, 8, ["label"])
1447
+ ]),
1448
+ applied: a(() => [
1449
+ l(e(Re), { filters: F.value }, null, 8, ["filters"])
1412
1450
  ]),
1413
- "cell-pattern": t(({ row: v }) => [
1414
- l(e(R), {
1451
+ "cell-pattern": a(({ row: W }) => [
1452
+ l(e(A), {
1415
1453
  mono: "",
1416
1454
  size: "sm"
1417
1455
  }, {
1418
- default: t(() => [
1419
- x(h(v.pattern), 1)
1456
+ default: a(() => [
1457
+ k(y(W.pattern), 1)
1420
1458
  ]),
1421
1459
  _: 2
1422
1460
  }, 1024)
1423
1461
  ]),
1424
- "cell-match_type": t(({ row: v }) => [
1425
- l(e(M), null, {
1426
- default: t(() => [
1427
- x(h(e(a)(`page.${v.match_type}`)), 1)
1462
+ "cell-match_type": a(({ row: W }) => [
1463
+ l(e(J), null, {
1464
+ default: a(() => [
1465
+ k(y(e(t)(`page.${W.match_type}`)), 1)
1428
1466
  ]),
1429
1467
  _: 2
1430
1468
  }, 1024)
1431
1469
  ]),
1432
- "cell-title": t(({ row: v }) => [
1433
- e(fe)(v) ? (y(), W(e(R), {
1470
+ "cell-title": a(({ row: W }) => [
1471
+ e(fe)(W) ? (b(), S(e(A), {
1434
1472
  key: 0,
1435
1473
  size: "sm"
1436
1474
  }, {
1437
- default: t(() => [
1438
- x(h(e(fe)(v)), 1)
1475
+ default: a(() => [
1476
+ k(y(e(fe)(W)), 1)
1439
1477
  ]),
1440
1478
  _: 2
1441
- }, 1024)) : (y(), W(e(R), {
1479
+ }, 1024)) : (b(), S(e(A), {
1442
1480
  key: 1,
1443
1481
  size: "sm",
1444
1482
  tone: "muted"
1445
1483
  }, {
1446
- default: t(() => [...w[3] || (w[3] = [
1447
- x("—", -1)
1484
+ default: a(() => [...L[2] || (L[2] = [
1485
+ k("—", -1)
1448
1486
  ])]),
1449
1487
  _: 1
1450
1488
  }))
1451
1489
  ]),
1452
- "cell-is_active": t(({ row: v }) => [
1453
- l(e(M), {
1454
- type: v.is_active ? "success" : "default",
1490
+ "cell-is_active": a(({ row: W }) => [
1491
+ l(e(J), {
1492
+ type: W.is_active ? "success" : "default",
1455
1493
  dot: ""
1456
1494
  }, {
1457
- default: t(() => [
1458
- x(h(v.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
1495
+ default: a(() => [
1496
+ k(y(W.is_active ? e(t)("page.active") : e(t)("page.inactive")), 1)
1459
1497
  ]),
1460
1498
  _: 2
1461
1499
  }, 1032, ["type"])
1462
1500
  ]),
1463
- "card-actions": t(({ row: v }) => [
1464
- e(g) ? (y(), W(e(te), {
1501
+ "card-actions": a(({ row: W }) => [
1502
+ e(c) ? (b(), S(e(ae), {
1465
1503
  key: 0,
1466
- actions: A(v),
1467
- label: v.pattern
1468
- }, null, 8, ["actions", "label"])) : O("", !0)
1504
+ actions: U(W),
1505
+ label: W.pattern
1506
+ }, null, 8, ["actions", "label"])) : j("", !0)
1469
1507
  ]),
1470
- "cell-actions": t(({ row: v }) => [
1471
- l(e(te), {
1472
- actions: A(v),
1473
- label: v.pattern
1508
+ "cell-actions": a(({ row: W }) => [
1509
+ l(e(ae), {
1510
+ actions: U(W),
1511
+ label: W.pattern
1474
1512
  }, null, 8, ["actions", "label"])
1475
1513
  ]),
1476
1514
  _: 1
1477
- }, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text"])
1515
+ }, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text", "filters-count", "filters-label"])
1478
1516
  ]),
1479
- _: 2
1480
- }, [
1481
- e(g) ? {
1482
- name: "actions",
1483
- fn: t(() => [
1484
- l(e(I), {
1485
- type: "primary",
1486
- icon: "add",
1487
- onClick: w[0] || (w[0] = (v) => m(null))
1488
- }, {
1489
- default: t(() => [
1490
- x(h(e(a)("page.new-rule")), 1)
1491
- ]),
1492
- _: 1
1493
- })
1494
- ]),
1495
- key: "0"
1496
- } : void 0
1497
- ]), 1032, ["base"]));
1517
+ _: 1
1518
+ }, 8, ["base", "actions"]));
1498
1519
  }
1499
- }), kt = /* @__PURE__ */ Q(xt, [["__scopeId", "data-v-7a990610"]]);
1500
- function Wt(n = {}) {
1501
- const r = n.path ?? "/seo", d = n.mediaField ? De(n.mediaField) : void 0;
1520
+ });
1521
+ function Wt(o = {}) {
1522
+ const r = o.path ?? "/seo", i = o.mediaField ? De(o.mediaField) : void 0;
1502
1523
  return {
1503
1524
  id: "seo",
1504
1525
  path: r,
@@ -1509,12 +1530,12 @@ function Wt(n = {}) {
1509
1530
  path: r,
1510
1531
  name: "webx.seo",
1511
1532
  component: kt,
1512
- props: { base: r, mediaField: d }
1533
+ props: { base: r, mediaField: i }
1513
1534
  },
1514
1535
  {
1515
1536
  path: `${r}/redirects`,
1516
1537
  name: "webx.seo.redirects",
1517
- component: mt,
1538
+ component: ht,
1518
1539
  props: { base: r }
1519
1540
  },
1520
1541
  // The trail of renames, from `webx-ui/routing`. The screen is here whether or not any
@@ -1523,7 +1544,7 @@ function Wt(n = {}) {
1523
1544
  {
1524
1545
  path: `${r}/aliases`,
1525
1546
  name: "webx.seo.aliases",
1526
- component: Ye,
1547
+ component: Ze,
1527
1548
  props: { base: r }
1528
1549
  }
1529
1550
  ],
@@ -1534,22 +1555,22 @@ function Wt(n = {}) {
1534
1555
  component: Ve,
1535
1556
  kind: "field",
1536
1557
  wide: !0,
1537
- bind: () => ({ mediaField: d })
1558
+ bind: () => ({ mediaField: i })
1538
1559
  }
1539
1560
  }
1540
1561
  };
1541
1562
  }
1542
1563
  export {
1543
1564
  Ve as WxSeo,
1544
- Ye as WxSeoAliasesPage,
1545
- mt as WxSeoRedirectsPage,
1565
+ Ze as WxSeoAliasesPage,
1566
+ ht as WxSeoRedirectsPage,
1546
1567
  kt as WxSeoUrlsPage,
1547
- G as createSeoApi,
1548
- ne as robotsDirectives,
1549
- ft as ruleInput,
1568
+ Q as createSeoApi,
1569
+ ie as robotsDirectives,
1570
+ bt as ruleInput,
1550
1571
  fe as ruleTitle,
1551
1572
  Wt as seo,
1552
- Ke as seoMessages,
1553
- ht as seoOf
1573
+ Je as seoMessages,
1574
+ ft as seoOf
1554
1575
  };
1555
1576
  //# sourceMappingURL=index.js.map