@webx-ui/module-inbox 0.5.3 → 0.5.5

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 ae, useModel as Ue, computed as C, unref as e, openBlock as u, createBlock as _, withCtx as a, createVNode as t, mergeModels as Le, ref as W, watch as Ce, isRef as se, createElementVNode as G, createElementBlock as j, Fragment as ee, createCommentVNode as H, createTextVNode as T, toDisplayString as V, renderList as ke, createSlots as Ne, onMounted as vl, reactive as fl, useTemplateRef as ol, normalizeClass as el } from "vue";
1
+ import { defineComponent as ae, useModel as Ue, computed as S, unref as e, openBlock as u, createBlock as w, withCtx as a, createVNode as t, mergeModels as Le, ref as F, watch as Ce, isRef as ne, createElementVNode as G, createElementBlock as j, Fragment as ee, createCommentVNode as H, createTextVNode as z, toDisplayString as V, renderList as ke, createSlots as Ne, onMounted as fl, reactive as bl, useTemplateRef as il, normalizeClass as ll } from "vue";
2
2
  import { useRoute as Oe, useRouter as Pe } from "vue-router";
3
- import { useAdmin as ie, useTranslate as te, useErrorText as fe, WxRowMenu as Fe, WxScreenHead as Qe, rowMenuWidth as bl, WxDate as De, WxFilterChips as hl, WxListScreen as il, WxNotes as yl } from "@webx-ui/module-admin";
4
- import { useLocales as xe, WxLocales as gl, WxRichText as ll, useModal as Ee, WxDialog as Re, WxFormItem as B, WxSelect as me, WxInput as X, WxText as J, WxAction as Ve, WxButton as le, WxIcon as $e, WxInputNumber as we, WxDatePicker as Ze, WxTagsInput as xl, WxCheckbox as he, WxSpace as qe, toast as P, createModal as Be, WxCard as oe, WxEmpty as He, WxSortableList as Je, WxBadge as Se, localizedValue as ve, confirm as ze, WxSwitch as ul, WxTable as rl, WxAlert as Me, WxSkeleton as We, WxTabs as Xe, WxTab as ge, WxActionBar as _l, WxTextarea as wl, WxRadioGroup as kl, WxCheckboxGroup as Vl, useElementWidth as $l, WxEntityCard as Ul, WxAvatar as tl, WxTooltip as Sl, WxListDetail as Cl, WxIndicator as al, WxDescriptions as nl, WxDescriptionsItem as Ie, WxFileCard as zl, WxTimeline as Tl, WxTimelineItem as Fl } from "@webx-ui/core";
5
- const dl = /* @__PURE__ */ ae({
3
+ import { useAdmin as oe, useTranslate as te, useErrorText as be, WxRowMenu as Fe, WxScreenHead as Qe, rowMenuWidth as hl, WxDate as De, WxFilterChips as yl, WxListScreen as ul, WxNotes as gl } from "@webx-ui/module-admin";
4
+ import { useLocales as xe, WxLocales as xl, WxRichText as tl, useModal as Ee, WxDialog as Re, WxFormItem as B, WxSelect as ve, WxInput as X, WxText as J, WxAction as Ve, WxButton as le, WxIcon as $e, WxInputNumber as we, WxDatePicker as Ze, WxTagsInput as _l, WxCheckbox as he, WxSpace as qe, toast as P, createModal as Be, WxCard as se, WxEmpty as He, WxSortableList as Je, WxBadge as Se, localizedValue as fe, confirm as ze, WxSwitch as rl, WxTable as dl, WxAlert as Me, WxSkeleton as We, WxTabs as Xe, WxTab as ge, WxActionBar as wl, WxTextarea as kl, WxRadioGroup as Vl, WxCheckboxGroup as $l, useElementWidth as Ul, WxEntityCard as Sl, WxAvatar as al, WxTooltip as Cl, WxListDetail as zl, WxIndicator as nl, WxDescriptions as sl, WxDescriptionsItem as Ie, WxFileCard as Tl, WxTimeline as Fl, WxTimelineItem as Wl } from "@webx-ui/core";
5
+ const cl = /* @__PURE__ */ ae({
6
6
  __name: "LocalizedRichText",
7
7
  props: /* @__PURE__ */ Le({
8
8
  placeholder: { default: void 0 },
@@ -13,13 +13,13 @@ const dl = /* @__PURE__ */ ae({
13
13
  }),
14
14
  emits: ["update:modelValue"],
15
15
  setup(r) {
16
- const s = Ue(r, "modelValue"), o = r, v = xe(), n = C(() => {
17
- const m = v.active.value;
18
- return v.list.value.some((U) => U.code === m) ? m : v.list.value[0]?.code ?? "";
19
- }), d = C({
16
+ const s = Ue(r, "modelValue"), o = r, f = xe(), n = S(() => {
17
+ const m = f.active.value;
18
+ return f.list.value.some((U) => U.code === m) ? m : f.list.value[0]?.code ?? "";
19
+ }), d = S({
20
20
  get: () => {
21
21
  const m = s.value;
22
- return typeof m == "string" ? n.value === "" || n.value === v.list.value[0]?.code ? m : "" : m[n.value] ?? "";
22
+ return typeof m == "string" ? n.value === "" || n.value === f.list.value[0]?.code ? m : "" : m[n.value] ?? "";
23
23
  },
24
24
  set: (m) => {
25
25
  if (n.value === "") {
@@ -30,9 +30,9 @@ const dl = /* @__PURE__ */ ae({
30
30
  s.value = { ...l, [n.value]: m };
31
31
  }
32
32
  });
33
- return (m, l) => e(v).list.value.length > 0 ? (u(), _(e(gl), { key: 0 }, {
33
+ return (m, l) => e(f).list.value.length > 0 ? (u(), w(e(xl), { key: 0 }, {
34
34
  default: a(() => [
35
- t(e(ll), {
35
+ t(e(tl), {
36
36
  modelValue: d.value,
37
37
  "onUpdate:modelValue": l[0] || (l[0] = (U) => d.value = U),
38
38
  placeholder: o.placeholder,
@@ -40,7 +40,7 @@ const dl = /* @__PURE__ */ ae({
40
40
  }, null, 8, ["modelValue", "placeholder", "min-height"])
41
41
  ]),
42
42
  _: 1
43
- })) : (u(), _(e(ll), {
43
+ })) : (u(), w(e(tl), {
44
44
  key: 1,
45
45
  modelValue: d.value,
46
46
  "onUpdate:modelValue": l[1] || (l[1] = (U) => d.value = U),
@@ -49,27 +49,27 @@ const dl = /* @__PURE__ */ ae({
49
49
  }, null, 8, ["modelValue", "placeholder", "min-height"]));
50
50
  }
51
51
  });
52
- function re(r) {
53
- const s = `${r.apiPath}/inbox`, o = (n) => n.data, v = () => {
52
+ function de(r) {
53
+ const s = `${r.apiPath}/inbox`, o = (n) => n.data, f = () => {
54
54
  };
55
55
  return {
56
56
  forms: () => r.http.get(`${s}/forms`).then(o),
57
57
  form: (n) => r.http.get(`${s}/forms/${n}`).then(o),
58
58
  createForm: (n) => r.http.post(`${s}/forms`, n).then(o),
59
59
  saveForm: (n, d) => r.http.put(`${s}/forms/${n}`, d).then(o),
60
- removeForm: (n) => r.http.delete(`${s}/forms/${n}`).then(v),
60
+ removeForm: (n) => r.http.delete(`${s}/forms/${n}`).then(f),
61
61
  duplicateForm: (n) => r.http.post(`${s}/forms/${n}/duplicate`, {}).then(o),
62
- sortForms: (n) => r.http.post(`${s}/forms/sorting`, { ids: n }).then(v),
62
+ sortForms: (n) => r.http.post(`${s}/forms/sorting`, { ids: n }).then(f),
63
63
  fields: (n) => r.http.get(`${s}/forms/${n}/fields`).then(o),
64
64
  createField: (n, d) => r.http.post(`${s}/forms/${n}/fields`, d).then(o),
65
65
  saveField: (n, d) => r.http.put(`${s}/fields/${n}`, d).then(o),
66
- removeField: (n) => r.http.delete(`${s}/fields/${n}`).then(v),
67
- sortFields: (n, d) => r.http.post(`${s}/forms/${n}/fields/sorting`, { ids: d }).then(v),
66
+ removeField: (n) => r.http.delete(`${s}/fields/${n}`).then(f),
67
+ sortFields: (n, d) => r.http.post(`${s}/forms/${n}/fields/sorting`, { ids: d }).then(f),
68
68
  statuses: () => r.http.get(`${s}/statuses`).then(o),
69
69
  createStatus: (n) => r.http.post(`${s}/statuses`, n).then(o),
70
70
  saveStatus: (n, d) => r.http.put(`${s}/statuses/${n}`, d).then(o),
71
- removeStatus: (n) => r.http.delete(`${s}/statuses/${n}`).then(v),
72
- sortStatuses: (n) => r.http.post(`${s}/statuses/sorting`, { ids: n }).then(v),
71
+ removeStatus: (n) => r.http.delete(`${s}/statuses/${n}`).then(f),
72
+ sortStatuses: (n) => r.http.post(`${s}/statuses/sorting`, { ids: n }).then(f),
73
73
  recipients: () => r.http.get(`${s}/recipients`).then(o),
74
74
  submissions: (n, d = {}) => r.http.get(`${s}/forms/${n}/submissions`, { query: Ye(d) }).then((m) => ({
75
75
  ...m.meta,
@@ -82,7 +82,7 @@ function re(r) {
82
82
  submission: (n, d = {}) => r.http.get(`${s}/submissions/${n}`, { query: Ye(d) }).then(o),
83
83
  createSubmission: (n, d) => r.http.post(`${s}/forms/${n}/submissions`, { fields: d }).then(o),
84
84
  saveSubmission: (n, d) => r.http.put(`${s}/submissions/${n}`, d).then(o),
85
- removeSubmission: (n) => r.http.delete(`${s}/submissions/${n}`).then(v),
85
+ removeSubmission: (n) => r.http.delete(`${s}/submissions/${n}`).then(f),
86
86
  massSubmissions: (n) => r.http.post(`${s}/submissions/mass`, n).then(o),
87
87
  exportUrl: (n, d = {}) => {
88
88
  const m = new URLSearchParams();
@@ -104,7 +104,7 @@ function Ye(r) {
104
104
  per_page: r.per_page
105
105
  };
106
106
  }
107
- const Wl = {
107
+ const ql = {
108
108
  module: {
109
109
  title: "Inbox"
110
110
  },
@@ -301,15 +301,15 @@ const Wl = {
301
301
  "type-file": "File",
302
302
  "type-hidden": "Hidden"
303
303
  }
304
- }, sl = /* @__PURE__ */ new WeakSet();
305
- function de() {
304
+ }, ol = /* @__PURE__ */ new WeakSet();
305
+ function ce() {
306
306
  try {
307
- const { i18n: r } = ie();
308
- sl.has(r) || (r.defaults("webx-inbox", Wl), sl.add(r));
307
+ const { i18n: r } = oe();
308
+ ol.has(r) || (r.defaults("webx-inbox", ql), ol.add(r));
309
309
  } catch {
310
310
  }
311
311
  }
312
- const ql = [
312
+ const Al = [
313
313
  "text",
314
314
  "email",
315
315
  "tel",
@@ -321,86 +321,86 @@ const ql = [
321
321
  "date",
322
322
  "file",
323
323
  "hidden"
324
- ], Al = ["default", "primary", "success", "warning", "info", "danger"], Il = { class: "wx-inbox-field-form" }, Nl = { class: "wx-inbox-field-form__row" }, Dl = {
324
+ ], Il = ["default", "primary", "success", "warning", "info", "danger"], Nl = { class: "wx-inbox-field-form" }, Dl = { class: "wx-inbox-field-form__row" }, Ml = {
325
325
  key: 2,
326
326
  class: "wx-inbox-choices"
327
- }, Ml = { class: "wx-inbox-field-form__row" }, Ll = { class: "wx-inbox-field-form__checks" }, Ol = /* @__PURE__ */ ae({
327
+ }, Ll = { class: "wx-inbox-field-form__row" }, Ol = { class: "wx-inbox-field-form__checks" }, Pl = /* @__PURE__ */ ae({
328
328
  __name: "FieldDialog",
329
329
  props: {
330
330
  field: {},
331
331
  form: {}
332
332
  },
333
333
  setup(r) {
334
- const s = r, { resolve: o, dismiss: v, open: n } = Ee(), d = ie(), m = re(d);
335
- de();
336
- const l = te("webx-inbox"), U = fe(), p = W(!1), i = W({}), O = W(""), z = W("text"), F = W({}), f = W({}), q = W({}), c = W({}), S = W(!0), b = W(!1), I = W(!0), w = W(!1);
334
+ const s = r, { resolve: o, dismiss: f, open: n } = Ee(), d = oe(), m = de(d);
335
+ ce();
336
+ const l = te("webx-inbox"), U = be(), p = F(!1), i = F({}), L = F(""), C = F("text"), T = F({}), b = F({}), W = F({}), c = F({}), $ = F(!0), h = F(!1), O = F(!0), _ = F(!1);
337
337
  Ce(
338
338
  () => s.field,
339
- (D) => {
340
- O.value = D?.name ?? "", z.value = D?.type ?? "text", F.value = { ...D?.title ?? {} }, f.value = { ...D?.placeholder ?? {} }, q.value = { ...D?.help ?? {} }, c.value = { ...D?.options ?? {} }, S.value = D?.is_enabled ?? !0, b.value = D?.is_required ?? !1, I.value = D?.is_fullsize ?? !0, w.value = D?.in_table ?? !1, i.value = {};
339
+ (I) => {
340
+ L.value = I?.name ?? "", C.value = I?.type ?? "text", T.value = { ...I?.title ?? {} }, b.value = { ...I?.placeholder ?? {} }, W.value = { ...I?.help ?? {} }, c.value = { ...I?.options ?? {} }, $.value = I?.is_enabled ?? !0, h.value = I?.is_required ?? !1, O.value = I?.is_fullsize ?? !0, _.value = I?.in_table ?? !1, i.value = {};
341
341
  },
342
342
  { immediate: !0 }
343
343
  );
344
- const R = C(
345
- () => ql.map((D) => ({ value: D, label: l(`fields.type-${D}`) }))
346
- ), L = C(() => ["select", "radio", "checkbox"].includes(z.value)), A = C(
344
+ const E = S(
345
+ () => Al.map((I) => ({ value: I, label: l(`fields.type-${I}`) }))
346
+ ), N = S(() => ["select", "radio", "checkbox"].includes(C.value)), q = S(
347
347
  () => Array.isArray(c.value.choices) ? c.value.choices : []
348
- ), $ = C({
348
+ ), M = S({
349
349
  get: () => Array.isArray(c.value.extensions) ? c.value.extensions : [],
350
- set: (D) => x(
350
+ set: (I) => v(
351
351
  "extensions",
352
- D.map((k) => k.replace(/^\./, ""))
352
+ I.map((k) => k.replace(/^\./, ""))
353
353
  )
354
354
  });
355
- function x(D, k) {
356
- c.value = { ...c.value, [D]: k };
355
+ function v(I, k) {
356
+ c.value = { ...c.value, [I]: k };
357
357
  }
358
- function Q() {
359
- x("choices", [...A.value, { value: "", label: {} }]);
358
+ function Y() {
359
+ v("choices", [...q.value, { value: "", label: {} }]);
360
360
  }
361
- function ce(D) {
362
- x(
361
+ function ye(I) {
362
+ v(
363
363
  "choices",
364
- A.value.filter((k, h) => h !== D)
364
+ q.value.filter((k, y) => y !== I)
365
365
  );
366
366
  }
367
- function be(D, k) {
368
- x(
367
+ function pe(I, k) {
368
+ v(
369
369
  "choices",
370
- A.value.map((h, ne) => ne === D ? { ...h, ...k } : h)
370
+ q.value.map((y, ue) => ue === I ? { ...y, ...k } : y)
371
371
  );
372
372
  }
373
- function N(D) {
374
- return i.value[D]?.[0];
373
+ function A(I) {
374
+ return i.value[I]?.[0];
375
375
  }
376
- async function Z() {
376
+ async function Q() {
377
377
  p.value = !0, i.value = {};
378
- const D = {
379
- name: O.value.trim() === "" ? null : O.value.trim(),
380
- type: z.value,
381
- title: F.value,
382
- placeholder: f.value,
383
- help: q.value,
378
+ const I = {
379
+ name: L.value.trim() === "" ? null : L.value.trim(),
380
+ type: C.value,
381
+ title: T.value,
382
+ placeholder: b.value,
383
+ help: W.value,
384
384
  options: c.value,
385
- is_enabled: S.value,
386
- is_required: b.value,
387
- is_fullsize: I.value,
388
- in_table: w.value
385
+ is_enabled: $.value,
386
+ is_required: h.value,
387
+ is_fullsize: O.value,
388
+ in_table: _.value
389
389
  };
390
390
  try {
391
391
  o(
392
- s.field === null ? await m.createField(s.form.id, D) : await m.saveField(s.field.id, D)
392
+ s.field === null ? await m.createField(s.form.id, I) : await m.saveField(s.field.id, I)
393
393
  );
394
394
  } catch (k) {
395
- const h = k.body;
396
- h?.errors ? (i.value = h.errors, P.danger(l("panel.failed"))) : P.danger(U(k));
395
+ const y = k.body;
396
+ y?.errors ? (i.value = y.errors, P.danger(l("panel.failed"))) : P.danger(U(k));
397
397
  } finally {
398
398
  p.value = !1;
399
399
  }
400
400
  }
401
- return (D, k) => (u(), _(e(Re), {
401
+ return (I, k) => (u(), w(e(Re), {
402
402
  open: e(n),
403
- "onUpdate:open": k[21] || (k[21] = (h) => se(n) ? n.value = h : null),
403
+ "onUpdate:open": k[21] || (k[21] = (y) => ne(n) ? n.value = y : null),
404
404
  title: r.field ? e(l)("fields.edit-field") : e(l)("fields.new-field"),
405
405
  width: 720
406
406
  }, {
@@ -409,20 +409,20 @@ const ql = [
409
409
  default: a(() => [
410
410
  t(e(le), {
411
411
  variant: "outline",
412
- onClick: k[20] || (k[20] = (h) => e(v)())
412
+ onClick: k[20] || (k[20] = (y) => e(f)())
413
413
  }, {
414
414
  default: a(() => [
415
- T(V(e(l)("fields.cancel")), 1)
415
+ z(V(e(l)("fields.cancel")), 1)
416
416
  ]),
417
417
  _: 1
418
418
  }),
419
419
  t(e(le), {
420
420
  type: "primary",
421
421
  loading: p.value,
422
- onClick: Z
422
+ onClick: Q
423
423
  }, {
424
424
  default: a(() => [
425
- T(V(e(l)("fields.save")), 1)
425
+ z(V(e(l)("fields.save")), 1)
426
426
  ]),
427
427
  _: 1
428
428
  }, 8, ["loading"])
@@ -431,16 +431,16 @@ const ql = [
431
431
  })
432
432
  ]),
433
433
  default: a(() => [
434
- G("div", Il, [
435
- G("div", Nl, [
434
+ G("div", Nl, [
435
+ G("div", Dl, [
436
436
  t(e(B), {
437
437
  label: e(l)("fields.type")
438
438
  }, {
439
439
  default: a(() => [
440
- t(e(me), {
441
- modelValue: z.value,
442
- "onUpdate:modelValue": k[0] || (k[0] = (h) => z.value = h),
443
- options: R.value
440
+ t(e(ve), {
441
+ modelValue: C.value,
442
+ "onUpdate:modelValue": k[0] || (k[0] = (y) => C.value = y),
443
+ options: E.value
444
444
  }, null, 8, ["modelValue", "options"])
445
445
  ]),
446
446
  _: 1
@@ -448,12 +448,12 @@ const ql = [
448
448
  t(e(B), {
449
449
  label: e(l)("fields.name"),
450
450
  help: e(l)("fields.name-help"),
451
- error: N("name")
451
+ error: A("name")
452
452
  }, {
453
453
  default: a(() => [
454
454
  t(e(X), {
455
- modelValue: O.value,
456
- "onUpdate:modelValue": k[1] || (k[1] = (h) => O.value = h),
455
+ modelValue: L.value,
456
+ "onUpdate:modelValue": k[1] || (k[1] = (y) => L.value = y),
457
457
  placeholder: "email"
458
458
  }, null, 8, ["modelValue"])
459
459
  ]),
@@ -462,27 +462,27 @@ const ql = [
462
462
  ]),
463
463
  t(e(B), {
464
464
  label: e(l)("fields.title"),
465
- error: N("title"),
465
+ error: A("title"),
466
466
  required: ""
467
467
  }, {
468
468
  default: a(() => [
469
469
  t(e(X), {
470
- modelValue: F.value,
471
- "onUpdate:modelValue": k[2] || (k[2] = (h) => F.value = h),
470
+ modelValue: T.value,
471
+ "onUpdate:modelValue": k[2] || (k[2] = (y) => T.value = y),
472
472
  localized: ""
473
473
  }, null, 8, ["modelValue"])
474
474
  ]),
475
475
  _: 1
476
476
  }, 8, ["label", "error"]),
477
- z.value !== "hidden" ? (u(), j(ee, { key: 0 }, [
478
- z.value !== "consent" ? (u(), _(e(B), {
477
+ C.value !== "hidden" ? (u(), j(ee, { key: 0 }, [
478
+ C.value !== "consent" ? (u(), w(e(B), {
479
479
  key: 0,
480
480
  label: e(l)("fields.placeholder")
481
481
  }, {
482
482
  default: a(() => [
483
483
  t(e(X), {
484
- modelValue: f.value,
485
- "onUpdate:modelValue": k[3] || (k[3] = (h) => f.value = h),
484
+ modelValue: b.value,
485
+ "onUpdate:modelValue": k[3] || (k[3] = (y) => b.value = y),
486
486
  localized: ""
487
487
  }, null, 8, ["modelValue"])
488
488
  ]),
@@ -493,85 +493,85 @@ const ql = [
493
493
  }, {
494
494
  default: a(() => [
495
495
  t(e(X), {
496
- modelValue: q.value,
497
- "onUpdate:modelValue": k[4] || (k[4] = (h) => q.value = h),
496
+ modelValue: W.value,
497
+ "onUpdate:modelValue": k[4] || (k[4] = (y) => W.value = y),
498
498
  localized: ""
499
499
  }, null, 8, ["modelValue"])
500
500
  ]),
501
501
  _: 1
502
502
  }, 8, ["label"])
503
503
  ], 64)) : H("", !0),
504
- z.value === "consent" ? (u(), _(e(B), {
504
+ C.value === "consent" ? (u(), w(e(B), {
505
505
  key: 1,
506
506
  label: e(l)("fields.consent-text"),
507
507
  help: e(l)("fields.consent-text-help")
508
508
  }, {
509
509
  default: a(() => [
510
- t(dl, {
510
+ t(cl, {
511
511
  "model-value": c.value.text ?? {},
512
512
  "min-height": "100px",
513
- "onUpdate:modelValue": k[5] || (k[5] = (h) => x("text", h))
513
+ "onUpdate:modelValue": k[5] || (k[5] = (y) => v("text", y))
514
514
  }, null, 8, ["model-value"])
515
515
  ]),
516
516
  _: 1
517
517
  }, 8, ["label", "help"])) : H("", !0),
518
- L.value ? (u(), j("div", Dl, [
518
+ N.value ? (u(), j("div", Ml, [
519
519
  t(e(J), {
520
520
  size: "sm",
521
521
  weight: "medium"
522
522
  }, {
523
523
  default: a(() => [
524
- T(V(e(l)("fields.choices")), 1)
524
+ z(V(e(l)("fields.choices")), 1)
525
525
  ]),
526
526
  _: 1
527
527
  }),
528
- A.value.length === 0 ? (u(), _(e(J), {
528
+ q.value.length === 0 ? (u(), w(e(J), {
529
529
  key: 0,
530
530
  size: "sm",
531
531
  tone: "placeholder"
532
532
  }, {
533
533
  default: a(() => [
534
- T(V(e(l)("fields.no-choices")), 1)
534
+ z(V(e(l)("fields.no-choices")), 1)
535
535
  ]),
536
536
  _: 1
537
537
  })) : H("", !0),
538
- (u(!0), j(ee, null, ke(A.value, (h, ne) => (u(), j("div", {
539
- key: ne,
538
+ (u(!0), j(ee, null, ke(q.value, (y, ue) => (u(), j("div", {
539
+ key: ue,
540
540
  class: "wx-inbox-choices__row"
541
541
  }, [
542
542
  t(e(X), {
543
- "model-value": h.value,
543
+ "model-value": y.value,
544
544
  placeholder: e(l)("fields.choice-value"),
545
- "onUpdate:modelValue": (ye) => be(ne, { value: String(ye) })
545
+ "onUpdate:modelValue": (re) => pe(ue, { value: String(re) })
546
546
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
547
547
  t(e(X), {
548
- "model-value": h.label,
548
+ "model-value": y.label,
549
549
  localized: "",
550
550
  placeholder: e(l)("fields.choice-label"),
551
- "onUpdate:modelValue": (ye) => be(ne, { label: ye })
551
+ "onUpdate:modelValue": (re) => pe(ue, { label: re })
552
552
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
553
553
  t(e(Ve), {
554
554
  icon: "trash",
555
555
  title: e(l)("fields.delete"),
556
- onClick: (ye) => ce(ne)
556
+ onClick: (re) => ye(ue)
557
557
  }, null, 8, ["title", "onClick"])
558
558
  ]))), 128)),
559
559
  t(e(le), {
560
560
  variant: "outline",
561
561
  size: "sm",
562
- onClick: Q
562
+ onClick: Y
563
563
  }, {
564
564
  icon: a(() => [
565
565
  t(e($e), { name: "plus" })
566
566
  ]),
567
567
  default: a(() => [
568
- T(" " + V(e(l)("fields.add-choice")), 1)
568
+ z(" " + V(e(l)("fields.add-choice")), 1)
569
569
  ]),
570
570
  _: 1
571
571
  })
572
572
  ])) : H("", !0),
573
- G("div", Ml, [
574
- z.value === "textarea" ? (u(), _(e(B), {
573
+ G("div", Ll, [
574
+ C.value === "textarea" ? (u(), w(e(B), {
575
575
  key: 0,
576
576
  label: e(l)("fields.rows")
577
577
  }, {
@@ -580,12 +580,12 @@ const ql = [
580
580
  "model-value": c.value.rows ?? 5,
581
581
  min: 2,
582
582
  max: 30,
583
- "onUpdate:modelValue": k[6] || (k[6] = (h) => x("rows", h))
583
+ "onUpdate:modelValue": k[6] || (k[6] = (y) => v("rows", y))
584
584
  }, null, 8, ["model-value"])
585
585
  ]),
586
586
  _: 1
587
587
  }, 8, ["label"])) : H("", !0),
588
- ["text", "email", "textarea"].includes(z.value) ? (u(), _(e(B), {
588
+ ["text", "email", "textarea"].includes(C.value) ? (u(), w(e(B), {
589
589
  key: 1,
590
590
  label: e(l)("fields.maxlength")
591
591
  }, {
@@ -594,12 +594,12 @@ const ql = [
594
594
  "model-value": c.value.maxlength ?? null,
595
595
  min: 1,
596
596
  max: 2e4,
597
- "onUpdate:modelValue": k[7] || (k[7] = (h) => x("maxlength", h))
597
+ "onUpdate:modelValue": k[7] || (k[7] = (y) => v("maxlength", y))
598
598
  }, null, 8, ["model-value"])
599
599
  ]),
600
600
  _: 1
601
601
  }, 8, ["label"])) : H("", !0),
602
- z.value === "tel" ? (u(), _(e(B), {
602
+ C.value === "tel" ? (u(), w(e(B), {
603
603
  key: 2,
604
604
  label: e(l)("fields.pattern"),
605
605
  help: e(l)("fields.pattern-help")
@@ -607,12 +607,12 @@ const ql = [
607
607
  default: a(() => [
608
608
  t(e(X), {
609
609
  "model-value": c.value.pattern ?? "",
610
- "onUpdate:modelValue": k[8] || (k[8] = (h) => x("pattern", h))
610
+ "onUpdate:modelValue": k[8] || (k[8] = (y) => v("pattern", y))
611
611
  }, null, 8, ["model-value"])
612
612
  ]),
613
613
  _: 1
614
614
  }, 8, ["label", "help"])) : H("", !0),
615
- z.value === "date" ? (u(), j(ee, { key: 3 }, [
615
+ C.value === "date" ? (u(), j(ee, { key: 3 }, [
616
616
  t(e(B), {
617
617
  label: e(l)("fields.earliest")
618
618
  }, {
@@ -620,7 +620,7 @@ const ql = [
620
620
  t(e(Ze), {
621
621
  clearable: "",
622
622
  "model-value": c.value.min ?? null,
623
- "onUpdate:modelValue": k[9] || (k[9] = (h) => x("min", h))
623
+ "onUpdate:modelValue": k[9] || (k[9] = (y) => v("min", y))
624
624
  }, null, 8, ["model-value"])
625
625
  ]),
626
626
  _: 1
@@ -632,13 +632,13 @@ const ql = [
632
632
  t(e(Ze), {
633
633
  clearable: "",
634
634
  "model-value": c.value.max ?? null,
635
- "onUpdate:modelValue": k[10] || (k[10] = (h) => x("max", h))
635
+ "onUpdate:modelValue": k[10] || (k[10] = (y) => v("max", y))
636
636
  }, null, 8, ["model-value"])
637
637
  ]),
638
638
  _: 1
639
639
  }, 8, ["label"])
640
640
  ], 64)) : H("", !0),
641
- z.value === "checkbox" ? (u(), j(ee, { key: 4 }, [
641
+ C.value === "checkbox" ? (u(), j(ee, { key: 4 }, [
642
642
  t(e(B), {
643
643
  label: e(l)("fields.min-choices")
644
644
  }, {
@@ -646,7 +646,7 @@ const ql = [
646
646
  t(e(we), {
647
647
  "model-value": c.value.min ?? null,
648
648
  min: 0,
649
- "onUpdate:modelValue": k[11] || (k[11] = (h) => x("min", h))
649
+ "onUpdate:modelValue": k[11] || (k[11] = (y) => v("min", y))
650
650
  }, null, 8, ["model-value"])
651
651
  ]),
652
652
  _: 1
@@ -658,13 +658,13 @@ const ql = [
658
658
  t(e(we), {
659
659
  "model-value": c.value.max ?? null,
660
660
  min: 0,
661
- "onUpdate:modelValue": k[12] || (k[12] = (h) => x("max", h))
661
+ "onUpdate:modelValue": k[12] || (k[12] = (y) => v("max", y))
662
662
  }, null, 8, ["model-value"])
663
663
  ]),
664
664
  _: 1
665
665
  }, 8, ["label"])
666
666
  ], 64)) : H("", !0),
667
- z.value === "file" ? (u(), _(e(B), {
667
+ C.value === "file" ? (u(), w(e(B), {
668
668
  key: 5,
669
669
  label: e(l)("fields.max-size")
670
670
  }, {
@@ -672,21 +672,21 @@ const ql = [
672
672
  t(e(we), {
673
673
  "model-value": c.value.max_size ?? null,
674
674
  min: 1,
675
- "onUpdate:modelValue": k[13] || (k[13] = (h) => x("max_size", h))
675
+ "onUpdate:modelValue": k[13] || (k[13] = (y) => v("max_size", y))
676
676
  }, null, 8, ["model-value"])
677
677
  ]),
678
678
  _: 1
679
679
  }, 8, ["label"])) : H("", !0)
680
680
  ]),
681
- z.value === "file" ? (u(), j(ee, { key: 3 }, [
681
+ C.value === "file" ? (u(), j(ee, { key: 3 }, [
682
682
  t(e(B), {
683
683
  label: e(l)("fields.extensions"),
684
684
  help: e(l)("fields.extensions-help")
685
685
  }, {
686
686
  default: a(() => [
687
- t(e(xl), {
688
- modelValue: $.value,
689
- "onUpdate:modelValue": k[14] || (k[14] = (h) => $.value = h)
687
+ t(e(_l), {
688
+ modelValue: M.value,
689
+ "onUpdate:modelValue": k[14] || (k[14] = (y) => M.value = y)
690
690
  }, null, 8, ["modelValue"])
691
691
  ]),
692
692
  _: 1
@@ -694,29 +694,29 @@ const ql = [
694
694
  t(e(he), {
695
695
  "model-value": !!c.value.multiple,
696
696
  label: e(l)("fields.multiple"),
697
- "onUpdate:modelValue": k[15] || (k[15] = (h) => x("multiple", h))
697
+ "onUpdate:modelValue": k[15] || (k[15] = (y) => v("multiple", y))
698
698
  }, null, 8, ["model-value", "label"])
699
699
  ], 64)) : H("", !0),
700
- G("div", Ll, [
700
+ G("div", Ol, [
701
701
  t(e(he), {
702
- modelValue: S.value,
703
- "onUpdate:modelValue": k[16] || (k[16] = (h) => S.value = h),
702
+ modelValue: $.value,
703
+ "onUpdate:modelValue": k[16] || (k[16] = (y) => $.value = y),
704
704
  label: e(l)("fields.is-enabled")
705
705
  }, null, 8, ["modelValue", "label"]),
706
706
  t(e(he), {
707
- modelValue: b.value,
708
- "onUpdate:modelValue": k[17] || (k[17] = (h) => b.value = h),
707
+ modelValue: h.value,
708
+ "onUpdate:modelValue": k[17] || (k[17] = (y) => h.value = y),
709
709
  label: e(l)("fields.is-required")
710
710
  }, null, 8, ["modelValue", "label"]),
711
- z.value !== "hidden" ? (u(), _(e(he), {
711
+ C.value !== "hidden" ? (u(), w(e(he), {
712
712
  key: 0,
713
- modelValue: I.value,
714
- "onUpdate:modelValue": k[18] || (k[18] = (h) => I.value = h),
713
+ modelValue: O.value,
714
+ "onUpdate:modelValue": k[18] || (k[18] = (y) => O.value = y),
715
715
  label: e(l)("fields.is-fullsize")
716
716
  }, null, 8, ["modelValue", "label"])) : H("", !0),
717
717
  t(e(he), {
718
- modelValue: w.value,
719
- "onUpdate:modelValue": k[19] || (k[19] = (h) => w.value = h),
718
+ modelValue: _.value,
719
+ "onUpdate:modelValue": k[19] || (k[19] = (y) => _.value = y),
720
720
  label: e(l)("fields.in-table")
721
721
  }, null, 8, ["modelValue", "label"])
722
722
  ])
@@ -725,12 +725,12 @@ const ql = [
725
725
  _: 1
726
726
  }, 8, ["open", "title"]));
727
727
  }
728
- }), ue = (r, s) => {
728
+ }), ie = (r, s) => {
729
729
  const o = r.__vccOpts || r;
730
- for (const [v, n] of s)
731
- o[v] = n;
730
+ for (const [f, n] of s)
731
+ o[f] = n;
732
732
  return o;
733
- }, Pl = /* @__PURE__ */ ue(Ol, [["__scopeId", "data-v-6696bbc1"]]), El = { class: "wx-inbox-field" }, Rl = { class: "wx-inbox-field__name" }, Bl = /* @__PURE__ */ ae({
733
+ }, El = /* @__PURE__ */ ie(Pl, [["__scopeId", "data-v-6696bbc1"]]), Rl = { class: "wx-inbox-field" }, Bl = { class: "wx-inbox-field__name" }, Hl = /* @__PURE__ */ ae({
734
734
  __name: "FieldList",
735
735
  props: /* @__PURE__ */ Le({
736
736
  form: {},
@@ -741,11 +741,11 @@ const ql = [
741
741
  }),
742
742
  emits: ["update:modelValue"],
743
743
  setup(r) {
744
- const s = r, o = Ue(r, "modelValue"), v = ie(), n = re(v), d = xe();
745
- de();
746
- const m = te("webx-inbox"), l = fe(), U = Be(Pl);
744
+ const s = r, o = Ue(r, "modelValue"), f = oe(), n = de(f), d = xe();
745
+ ce();
746
+ const m = te("webx-inbox"), l = be(), U = Be(El);
747
747
  function p(c) {
748
- return ve(c.title, d.active.value, c.key);
748
+ return fe(c.title, d.active.value, c.key);
749
749
  }
750
750
  function i(c) {
751
751
  return [
@@ -755,12 +755,12 @@ const ql = [
755
755
  ...c.is_fullsize ? [] : [m("fields.is-fullsize")]
756
756
  ];
757
757
  }
758
- const O = C(() => o.value.length === 0);
759
- async function z(c) {
760
- const S = await U({ field: c, form: s.form });
761
- S && (o.value = c === null ? [...o.value, S] : o.value.map((b) => b.id === S.id ? S : b));
758
+ const L = S(() => o.value.length === 0);
759
+ async function C(c) {
760
+ const $ = await U({ field: c, form: s.form });
761
+ $ && (o.value = c === null ? [...o.value, $] : o.value.map((h) => h.id === $.id ? $ : h));
762
762
  }
763
- async function F(c) {
763
+ async function T(c) {
764
764
  if (await ze({
765
765
  title: m("fields.delete-title", { field: p(c) }),
766
766
  message: m("fields.delete-text"),
@@ -769,15 +769,15 @@ const ql = [
769
769
  tone: "danger"
770
770
  }))
771
771
  try {
772
- await n.removeField(c.id), o.value = o.value.filter((b) => b.id !== c.id), P.success(m("panel.deleted"));
773
- } catch (b) {
774
- P.danger(l(b));
772
+ await n.removeField(c.id), o.value = o.value.filter((h) => h.id !== c.id), P.success(m("panel.deleted"));
773
+ } catch (h) {
774
+ P.danger(l(h));
775
775
  }
776
776
  }
777
- function f(c) {
777
+ function b(c) {
778
778
  return s.canManage ? [
779
779
  { key: "edit", icon: "edit", label: m("fields.edit-field"), run: () => {
780
- z(c);
780
+ C(c);
781
781
  } },
782
782
  {
783
783
  key: "delete",
@@ -785,12 +785,12 @@ const ql = [
785
785
  label: m("fields.delete"),
786
786
  danger: !0,
787
787
  run: () => {
788
- F(c);
788
+ T(c);
789
789
  }
790
790
  }
791
791
  ] : [];
792
792
  }
793
- async function q() {
793
+ async function W() {
794
794
  try {
795
795
  await n.sortFields(
796
796
  s.form.id,
@@ -800,43 +800,43 @@ const ql = [
800
800
  P.danger(l(c, m("panel.reorder-failed")));
801
801
  }
802
802
  }
803
- return (c, S) => (u(), _(e(oe), {
803
+ return (c, $) => (u(), w(e(se), {
804
804
  title: e(m)("panel.tab-fields")
805
805
  }, Ne({
806
806
  default: a(() => [
807
- O.value ? (u(), _(e(He), {
807
+ L.value ? (u(), w(e(He), {
808
808
  key: 0,
809
809
  title: e(m)("fields.no-fields"),
810
810
  description: e(m)("fields.no-fields-help")
811
- }, null, 8, ["title", "description"])) : (u(), _(e(Je), {
811
+ }, null, 8, ["title", "description"])) : (u(), w(e(Je), {
812
812
  key: 1,
813
813
  modelValue: o.value,
814
- "onUpdate:modelValue": S[1] || (S[1] = (b) => o.value = b),
814
+ "onUpdate:modelValue": $[1] || ($[1] = (h) => o.value = h),
815
815
  plain: "",
816
816
  "item-key": "id",
817
817
  "item-label": p,
818
818
  disabled: !r.canManage,
819
819
  "aria-label": e(m)("panel.tab-fields"),
820
- onMove: q
820
+ onMove: W
821
821
  }, {
822
- default: a(({ item: b }) => [
823
- G("div", El, [
824
- G("div", Rl, [
822
+ default: a(({ item: h }) => [
823
+ G("div", Rl, [
824
+ G("div", Bl, [
825
825
  t(e(J), {
826
826
  weight: "medium",
827
827
  truncate: ""
828
828
  }, {
829
829
  default: a(() => [
830
- T(V(p(b)), 1)
830
+ z(V(p(h)), 1)
831
831
  ]),
832
832
  _: 2
833
833
  }, 1024),
834
- b.is_enabled ? H("", !0) : (u(), _(e(Se), {
834
+ h.is_enabled ? H("", !0) : (u(), w(e(Se), {
835
835
  key: 0,
836
836
  type: "default"
837
837
  }, {
838
838
  default: a(() => [
839
- T(V(e(m)("panel.off")), 1)
839
+ z(V(e(m)("panel.off")), 1)
840
840
  ]),
841
841
  _: 1
842
842
  }))
@@ -847,17 +847,17 @@ const ql = [
847
847
  truncate: ""
848
848
  }, {
849
849
  default: a(() => [
850
- G("code", null, "fields[" + V(b.key) + "]", 1),
851
- T(" · " + V(i(b).join(" · ")), 1)
850
+ G("code", null, "fields[" + V(h.key) + "]", 1),
851
+ z(" · " + V(i(h).join(" · ")), 1)
852
852
  ]),
853
853
  _: 2
854
854
  }, 1024)
855
855
  ])
856
856
  ]),
857
- actions: a(({ item: b }) => [
857
+ actions: a(({ item: h }) => [
858
858
  t(e(Fe), {
859
- actions: f(b),
860
- label: p(b)
859
+ actions: b(h),
860
+ label: p(h)
861
861
  }, null, 8, ["actions", "label"])
862
862
  ]),
863
863
  _: 1
@@ -871,13 +871,13 @@ const ql = [
871
871
  t(e(le), {
872
872
  type: "primary",
873
873
  size: "sm",
874
- onClick: S[0] || (S[0] = (b) => z(null))
874
+ onClick: $[0] || ($[0] = (h) => C(null))
875
875
  }, {
876
876
  icon: a(() => [
877
877
  t(e($e), { name: "plus" })
878
878
  ]),
879
879
  default: a(() => [
880
- T(" " + V(e(m)("fields.new-field")), 1)
880
+ z(" " + V(e(m)("fields.new-field")), 1)
881
881
  ]),
882
882
  _: 1
883
883
  })
@@ -886,17 +886,17 @@ const ql = [
886
886
  } : void 0
887
887
  ]), 1032, ["title"]));
888
888
  }
889
- }), Hl = /* @__PURE__ */ ue(Bl, [["__scopeId", "data-v-421ed0af"]]);
890
- function pe(r, s, o) {
891
- return C({
889
+ }), Gl = /* @__PURE__ */ ie(Hl, [["__scopeId", "data-v-421ed0af"]]);
890
+ function me(r, s, o) {
891
+ return S({
892
892
  get: () => r.value[s] ?? o,
893
- set: (v) => {
893
+ set: (f) => {
894
894
  const n = { ...r.value };
895
- v === "" || v === null || v === void 0 ? delete n[s] : n[s] = v, r.value = n;
895
+ f === "" || f === null || f === void 0 ? delete n[s] : n[s] = f, r.value = n;
896
896
  }
897
897
  });
898
898
  }
899
- const Gl = /* @__PURE__ */ ae({
899
+ const jl = /* @__PURE__ */ ae({
900
900
  __name: "FormAntispam",
901
901
  props: {
902
902
  modelValue: { required: !0 },
@@ -904,21 +904,21 @@ const Gl = /* @__PURE__ */ ae({
904
904
  },
905
905
  emits: ["update:modelValue"],
906
906
  setup(r) {
907
- const s = Ue(r, "modelValue"), o = te("webx-inbox"), v = pe(s, "antispam.honeypot", !0), n = pe(s, "antispam.min_seconds", 3), d = pe(s, "antispam.throttle", 5), m = pe(s, "antispam.captcha", "off"), l = C(() => [
907
+ const s = Ue(r, "modelValue"), o = te("webx-inbox"), f = me(s, "antispam.honeypot", !0), n = me(s, "antispam.min_seconds", 3), d = me(s, "antispam.throttle", 5), m = me(s, "antispam.captcha", "off"), l = S(() => [
908
908
  { value: "off", label: o("panel.captcha-off") },
909
909
  { value: "recaptcha", label: o("panel.captcha-recaptcha") },
910
910
  { value: "turnstile", label: o("panel.captcha-turnstile") }
911
911
  ]);
912
- return (U, p) => (u(), _(e(oe), null, {
912
+ return (U, p) => (u(), w(e(se), null, {
913
913
  default: a(() => [
914
914
  t(e(B), {
915
915
  label: e(o)("panel.honeypot"),
916
916
  help: e(o)("panel.honeypot-help")
917
917
  }, {
918
918
  default: a(() => [
919
- t(e(ul), {
920
- modelValue: e(v),
921
- "onUpdate:modelValue": p[0] || (p[0] = (i) => se(v) ? v.value = i : null)
919
+ t(e(rl), {
920
+ modelValue: e(f),
921
+ "onUpdate:modelValue": p[0] || (p[0] = (i) => ne(f) ? f.value = i : null)
922
922
  }, null, 8, ["modelValue"])
923
923
  ]),
924
924
  _: 1
@@ -930,7 +930,7 @@ const Gl = /* @__PURE__ */ ae({
930
930
  default: a(() => [
931
931
  t(e(we), {
932
932
  modelValue: e(n),
933
- "onUpdate:modelValue": p[1] || (p[1] = (i) => se(n) ? n.value = i : null),
933
+ "onUpdate:modelValue": p[1] || (p[1] = (i) => ne(n) ? n.value = i : null),
934
934
  min: 0,
935
935
  max: 120
936
936
  }, null, 8, ["modelValue"])
@@ -944,7 +944,7 @@ const Gl = /* @__PURE__ */ ae({
944
944
  default: a(() => [
945
945
  t(e(we), {
946
946
  modelValue: e(d),
947
- "onUpdate:modelValue": p[2] || (p[2] = (i) => se(d) ? d.value = i : null),
947
+ "onUpdate:modelValue": p[2] || (p[2] = (i) => ne(d) ? d.value = i : null),
948
948
  min: 0,
949
949
  max: 120
950
950
  }, null, 8, ["modelValue"])
@@ -956,9 +956,9 @@ const Gl = /* @__PURE__ */ ae({
956
956
  help: e(o)("panel.captcha-help")
957
957
  }, {
958
958
  default: a(() => [
959
- t(e(me), {
959
+ t(e(ve), {
960
960
  modelValue: e(m),
961
- "onUpdate:modelValue": p[3] || (p[3] = (i) => se(m) ? m.value = i : null),
961
+ "onUpdate:modelValue": p[3] || (p[3] = (i) => ne(m) ? m.value = i : null),
962
962
  options: l.value
963
963
  }, null, 8, ["modelValue", "options"])
964
964
  ]),
@@ -968,7 +968,7 @@ const Gl = /* @__PURE__ */ ae({
968
968
  _: 1
969
969
  }));
970
970
  }
971
- }), jl = { class: "wx-inbox-embed" }, Kl = { class: "wx-inbox-embed__snippet" }, Yl = { class: "wx-inbox-embed__snippet" }, Zl = /* @__PURE__ */ ae({
971
+ }), Kl = { class: "wx-inbox-embed" }, Yl = { class: "wx-inbox-embed__snippet" }, Zl = { class: "wx-inbox-embed__snippet" }, Ql = /* @__PURE__ */ ae({
972
972
  __name: "FormEmbed",
973
973
  props: {
974
974
  form: {},
@@ -977,23 +977,23 @@ const Gl = /* @__PURE__ */ ae({
977
977
  },
978
978
  setup(r) {
979
979
  const s = r;
980
- de();
981
- const o = te("webx-inbox"), v = C(() => `<x-webx-inbox::form slug="${s.slug}" />`), n = C(
980
+ ce();
981
+ const o = te("webx-inbox"), f = S(() => `<x-webx-inbox::form slug="${s.slug}" />`), n = S(
982
982
  () => `{{-- resources/views/blocks/contact.blade.php --}}
983
983
  <x-webx-inbox::form slug="${s.slug}" />`
984
- ), d = C(() => [
984
+ ), d = S(() => [
985
985
  { key: "key", label: o("fields.name") },
986
986
  { key: "title", label: o("fields.title") },
987
987
  { key: "type", label: o("fields.type"), hideBelow: 520 }
988
- ]), m = C(() => s.fields.filter((U) => U.is_enabled));
988
+ ]), m = S(() => s.fields.filter((U) => U.is_enabled));
989
989
  async function l(U) {
990
990
  try {
991
991
  await navigator.clipboard.writeText(U), P.success(o("panel.copied"));
992
992
  } catch {
993
993
  }
994
994
  }
995
- return (U, p) => (u(), j("div", jl, [
996
- t(e(oe), {
995
+ return (U, p) => (u(), j("div", Kl, [
996
+ t(e(se), {
997
997
  title: e(o)("panel.embed-blade")
998
998
  }, {
999
999
  default: a(() => [
@@ -1002,22 +1002,22 @@ const Gl = /* @__PURE__ */ ae({
1002
1002
  tone: "muted"
1003
1003
  }, {
1004
1004
  default: a(() => [
1005
- T(V(e(o)("panel.embed-blade-help")), 1)
1005
+ z(V(e(o)("panel.embed-blade-help")), 1)
1006
1006
  ]),
1007
1007
  _: 1
1008
1008
  }),
1009
- G("div", Kl, [
1010
- G("code", null, V(v.value), 1),
1009
+ G("div", Yl, [
1010
+ G("code", null, V(f.value), 1),
1011
1011
  t(e(Ve), {
1012
1012
  icon: "copy",
1013
1013
  title: e(o)("panel.copy"),
1014
- onClick: p[0] || (p[0] = (i) => l(v.value))
1014
+ onClick: p[0] || (p[0] = (i) => l(f.value))
1015
1015
  }, null, 8, ["title"])
1016
1016
  ])
1017
1017
  ]),
1018
1018
  _: 1
1019
1019
  }, 8, ["title"]),
1020
- t(e(oe), {
1020
+ t(e(se), {
1021
1021
  title: e(o)("panel.embed-block")
1022
1022
  }, {
1023
1023
  default: a(() => [
@@ -1026,11 +1026,11 @@ const Gl = /* @__PURE__ */ ae({
1026
1026
  tone: "muted"
1027
1027
  }, {
1028
1028
  default: a(() => [
1029
- T(V(e(o)("panel.embed-block-help")), 1)
1029
+ z(V(e(o)("panel.embed-block-help")), 1)
1030
1030
  ]),
1031
1031
  _: 1
1032
1032
  }),
1033
- G("div", Yl, [
1033
+ G("div", Zl, [
1034
1034
  G("code", null, V(n.value), 1),
1035
1035
  t(e(Ve), {
1036
1036
  icon: "copy",
@@ -1041,7 +1041,7 @@ const Gl = /* @__PURE__ */ ae({
1041
1041
  ]),
1042
1042
  _: 1
1043
1043
  }, 8, ["title"]),
1044
- t(e(oe), {
1044
+ t(e(se), {
1045
1045
  title: e(o)("panel.embed-names")
1046
1046
  }, {
1047
1047
  default: a(() => [
@@ -1050,11 +1050,11 @@ const Gl = /* @__PURE__ */ ae({
1050
1050
  tone: "muted"
1051
1051
  }, {
1052
1052
  default: a(() => [
1053
- T(V(e(o)("panel.embed-names-help")), 1)
1053
+ z(V(e(o)("panel.embed-names-help")), 1)
1054
1054
  ]),
1055
1055
  _: 1
1056
1056
  }),
1057
- t(e(rl), {
1057
+ t(e(dl), {
1058
1058
  data: m.value,
1059
1059
  columns: d.value,
1060
1060
  "row-key": "id",
@@ -1067,16 +1067,16 @@ const Gl = /* @__PURE__ */ ae({
1067
1067
  size: "sm"
1068
1068
  }, {
1069
1069
  default: a(() => [
1070
- T("fields[" + V(i.key) + "]", 1)
1070
+ z("fields[" + V(i.key) + "]", 1)
1071
1071
  ]),
1072
1072
  _: 2
1073
1073
  }, 1024)
1074
1074
  ]),
1075
1075
  "cell-title": a(({ row: i }) => [
1076
- T(V(Object.values(i.title)[0] ?? i.key), 1)
1076
+ z(V(Object.values(i.title)[0] ?? i.key), 1)
1077
1077
  ]),
1078
1078
  "cell-type": a(({ row: i }) => [
1079
- T(V(e(o)(`fields.type-${i.type}`)), 1)
1079
+ z(V(e(o)(`fields.type-${i.type}`)), 1)
1080
1080
  ]),
1081
1081
  _: 1
1082
1082
  }, 8, ["data", "columns", "empty-text"])
@@ -1085,7 +1085,7 @@ const Gl = /* @__PURE__ */ ae({
1085
1085
  }, 8, ["title"])
1086
1086
  ]));
1087
1087
  }
1088
- }), Ql = /* @__PURE__ */ ue(Zl, [["__scopeId", "data-v-e415689b"]]), Jl = { class: "wx-inbox-general" }, Xl = /* @__PURE__ */ ae({
1088
+ }), Jl = /* @__PURE__ */ ie(Ql, [["__scopeId", "data-v-e415689b"]]), Xl = { class: "wx-inbox-general" }, et = /* @__PURE__ */ ae({
1089
1089
  __name: "FormGeneral",
1090
1090
  props: /* @__PURE__ */ Le({
1091
1091
  errors: {}
@@ -1100,12 +1100,12 @@ const Gl = /* @__PURE__ */ ae({
1100
1100
  const s = Ue(
1101
1101
  r,
1102
1102
  "settings"
1103
- ), o = Ue(r, "options"), v = te("webx-inbox"), n = pe(o, "thank-you.heading", {}), d = pe(o, "thank-you.text", {}), m = pe(o, "design.submit-text", {}), l = pe(o, "redirect", "");
1104
- return (U, p) => (u(), j("div", Jl, [
1105
- t(e(oe), null, {
1103
+ ), o = Ue(r, "options"), f = te("webx-inbox"), n = me(o, "thank-you.heading", {}), d = me(o, "thank-you.text", {}), m = me(o, "design.submit-text", {}), l = me(o, "redirect", "");
1104
+ return (U, p) => (u(), j("div", Xl, [
1105
+ t(e(se), null, {
1106
1106
  default: a(() => [
1107
1107
  t(e(B), {
1108
- label: e(v)("panel.title"),
1108
+ label: e(f)("panel.title"),
1109
1109
  error: r.errors.title?.[0],
1110
1110
  required: ""
1111
1111
  }, {
@@ -1119,8 +1119,8 @@ const Gl = /* @__PURE__ */ ae({
1119
1119
  _: 1
1120
1120
  }, 8, ["label", "error"]),
1121
1121
  t(e(B), {
1122
- label: e(v)("panel.slug"),
1123
- help: e(v)("panel.slug-help"),
1122
+ label: e(f)("panel.slug"),
1123
+ help: e(f)("panel.slug-help"),
1124
1124
  error: r.errors.slug?.[0],
1125
1125
  required: ""
1126
1126
  }, {
@@ -1134,11 +1134,11 @@ const Gl = /* @__PURE__ */ ae({
1134
1134
  _: 1
1135
1135
  }, 8, ["label", "help", "error"]),
1136
1136
  t(e(B), {
1137
- label: e(v)("panel.is-enabled"),
1138
- help: e(v)("panel.is-enabled-help")
1137
+ label: e(f)("panel.is-enabled"),
1138
+ help: e(f)("panel.is-enabled-help")
1139
1139
  }, {
1140
1140
  default: a(() => [
1141
- t(e(ul), {
1141
+ t(e(rl), {
1142
1142
  modelValue: s.value.is_enabled,
1143
1143
  "onUpdate:modelValue": p[2] || (p[2] = (i) => s.value.is_enabled = i)
1144
1144
  }, null, 8, ["modelValue"])
@@ -1148,53 +1148,53 @@ const Gl = /* @__PURE__ */ ae({
1148
1148
  ]),
1149
1149
  _: 1
1150
1150
  }),
1151
- t(e(oe), {
1152
- title: e(v)("panel.after-sending")
1151
+ t(e(se), {
1152
+ title: e(f)("panel.after-sending")
1153
1153
  }, {
1154
1154
  default: a(() => [
1155
1155
  t(e(B), {
1156
- label: e(v)("panel.submit-text")
1156
+ label: e(f)("panel.submit-text")
1157
1157
  }, {
1158
1158
  default: a(() => [
1159
1159
  t(e(X), {
1160
1160
  modelValue: e(m),
1161
- "onUpdate:modelValue": p[3] || (p[3] = (i) => se(m) ? m.value = i : null),
1161
+ "onUpdate:modelValue": p[3] || (p[3] = (i) => ne(m) ? m.value = i : null),
1162
1162
  localized: ""
1163
1163
  }, null, 8, ["modelValue"])
1164
1164
  ]),
1165
1165
  _: 1
1166
1166
  }, 8, ["label"]),
1167
1167
  t(e(B), {
1168
- label: e(v)("panel.thank-you-heading")
1168
+ label: e(f)("panel.thank-you-heading")
1169
1169
  }, {
1170
1170
  default: a(() => [
1171
1171
  t(e(X), {
1172
1172
  modelValue: e(n),
1173
- "onUpdate:modelValue": p[4] || (p[4] = (i) => se(n) ? n.value = i : null),
1173
+ "onUpdate:modelValue": p[4] || (p[4] = (i) => ne(n) ? n.value = i : null),
1174
1174
  localized: ""
1175
1175
  }, null, 8, ["modelValue"])
1176
1176
  ]),
1177
1177
  _: 1
1178
1178
  }, 8, ["label"]),
1179
1179
  t(e(B), {
1180
- label: e(v)("panel.thank-you-text")
1180
+ label: e(f)("panel.thank-you-text")
1181
1181
  }, {
1182
1182
  default: a(() => [
1183
- t(dl, {
1183
+ t(cl, {
1184
1184
  modelValue: e(d),
1185
- "onUpdate:modelValue": p[5] || (p[5] = (i) => se(d) ? d.value = i : null)
1185
+ "onUpdate:modelValue": p[5] || (p[5] = (i) => ne(d) ? d.value = i : null)
1186
1186
  }, null, 8, ["modelValue"])
1187
1187
  ]),
1188
1188
  _: 1
1189
1189
  }, 8, ["label"]),
1190
1190
  t(e(B), {
1191
- label: e(v)("panel.redirect"),
1192
- help: e(v)("panel.redirect-help")
1191
+ label: e(f)("panel.redirect"),
1192
+ help: e(f)("panel.redirect-help")
1193
1193
  }, {
1194
1194
  default: a(() => [
1195
1195
  t(e(X), {
1196
1196
  modelValue: e(l),
1197
- "onUpdate:modelValue": p[6] || (p[6] = (i) => se(l) ? l.value = i : null),
1197
+ "onUpdate:modelValue": p[6] || (p[6] = (i) => ne(l) ? l.value = i : null),
1198
1198
  placeholder: "/thank-you"
1199
1199
  }, null, 8, ["modelValue"])
1200
1200
  ]),
@@ -1205,7 +1205,7 @@ const Gl = /* @__PURE__ */ ae({
1205
1205
  }, 8, ["title"])
1206
1206
  ]));
1207
1207
  }
1208
- }), et = /* @__PURE__ */ ue(Xl, [["__scopeId", "data-v-35e56e3d"]]), lt = { class: "wx-inbox-recipients" }, tt = /* @__PURE__ */ ae({
1208
+ }), lt = /* @__PURE__ */ ie(et, [["__scopeId", "data-v-35e56e3d"]]), tt = { class: "wx-inbox-recipients" }, at = /* @__PURE__ */ ae({
1209
1209
  __name: "FormNotifications",
1210
1210
  props: /* @__PURE__ */ Le({
1211
1211
  fields: {},
@@ -1216,42 +1216,42 @@ const Gl = /* @__PURE__ */ ae({
1216
1216
  }),
1217
1217
  emits: ["update:modelValue"],
1218
1218
  setup(r) {
1219
- const s = r, o = Ue(r, "modelValue"), v = ie(), n = re(v), d = te("webx-inbox"), m = W([]), l = pe(o, "recipients", []), U = pe(o, "email_field", "");
1220
- vl(async () => {
1219
+ const s = r, o = Ue(r, "modelValue"), f = oe(), n = de(f), d = te("webx-inbox"), m = F([]), l = me(o, "recipients", []), U = me(o, "email_field", "");
1220
+ fl(async () => {
1221
1221
  try {
1222
1222
  m.value = await n.recipients();
1223
1223
  } catch {
1224
1224
  }
1225
1225
  });
1226
- const p = C(
1226
+ const p = S(
1227
1227
  () => m.value.map((c) => ({ value: c.id, label: `${c.name} · ${c.email}` }))
1228
- ), i = C(() => [
1228
+ ), i = S(() => [
1229
1229
  { value: "", label: d("panel.no-email-field") },
1230
1230
  ...s.fields.filter((c) => c.type === "email").map((c) => ({ value: c.key, label: c.key }))
1231
1231
  ]);
1232
- function O(c) {
1232
+ function L(c) {
1233
1233
  return "admin_id" in c;
1234
1234
  }
1235
- function z(c) {
1235
+ function C(c) {
1236
1236
  l.value = [...l.value, c];
1237
1237
  }
1238
- async function F(c) {
1239
- const S = l.value[c];
1240
- S !== void 0 && (O(S) || (S.email ?? "").trim() !== "") && !await ze({
1238
+ async function T(c) {
1239
+ const $ = l.value[c];
1240
+ $ !== void 0 && (L($) || ($.email ?? "").trim() !== "") && !await ze({
1241
1241
  title: d("panel.remove-recipient-title"),
1242
1242
  message: d("panel.remove-recipient-text"),
1243
1243
  confirmText: d("panel.remove"),
1244
1244
  cancelText: d("panel.cancel"),
1245
1245
  tone: "danger"
1246
- }) || (l.value = l.value.filter((I, w) => w !== c));
1246
+ }) || (l.value = l.value.filter((O, _) => _ !== c));
1247
1247
  }
1248
- function f(c, S) {
1249
- l.value = l.value.map((b, I) => I === c ? { admin_id: S } : b);
1248
+ function b(c, $) {
1249
+ l.value = l.value.map((h, O) => O === c ? { admin_id: $ } : h);
1250
1250
  }
1251
- function q(c, S) {
1252
- l.value = l.value.map((b, I) => I === c ? { email: S } : b);
1251
+ function W(c, $) {
1252
+ l.value = l.value.map((h, O) => O === c ? { email: $ } : h);
1253
1253
  }
1254
- return (c, S) => (u(), _(e(oe), {
1254
+ return (c, $) => (u(), w(e(se), {
1255
1255
  title: e(d)("panel.recipients")
1256
1256
  }, {
1257
1257
  default: a(() => [
@@ -1260,48 +1260,48 @@ const Gl = /* @__PURE__ */ ae({
1260
1260
  tone: "muted"
1261
1261
  }, {
1262
1262
  default: a(() => [
1263
- T(V(e(d)("panel.recipients-help")), 1)
1263
+ z(V(e(d)("panel.recipients-help")), 1)
1264
1264
  ]),
1265
1265
  _: 1
1266
1266
  }),
1267
- r.errors["options.recipients"] ? (u(), _(e(Me), {
1267
+ r.errors["options.recipients"] ? (u(), w(e(Me), {
1268
1268
  key: 0,
1269
1269
  type: "danger",
1270
1270
  variant: "soft",
1271
1271
  description: r.errors["options.recipients"]?.[0]
1272
1272
  }, null, 8, ["description"])) : H("", !0),
1273
- G("div", lt, [
1274
- e(l).length === 0 ? (u(), _(e(J), {
1273
+ G("div", tt, [
1274
+ e(l).length === 0 ? (u(), w(e(J), {
1275
1275
  key: 0,
1276
1276
  size: "sm",
1277
1277
  tone: "placeholder"
1278
1278
  }, {
1279
1279
  default: a(() => [
1280
- T(V(e(d)("panel.no-recipients")), 1)
1280
+ z(V(e(d)("panel.no-recipients")), 1)
1281
1281
  ]),
1282
1282
  _: 1
1283
1283
  })) : H("", !0),
1284
- (u(!0), j(ee, null, ke(e(l), (b, I) => (u(), j("div", {
1285
- key: I,
1284
+ (u(!0), j(ee, null, ke(e(l), (h, O) => (u(), j("div", {
1285
+ key: O,
1286
1286
  class: "wx-inbox-recipients__row"
1287
1287
  }, [
1288
- O(b) ? (u(), _(e(me), {
1288
+ L(h) ? (u(), w(e(ve), {
1289
1289
  key: 0,
1290
- "model-value": b.admin_id,
1290
+ "model-value": h.admin_id,
1291
1291
  options: p.value,
1292
- "onUpdate:modelValue": (w) => f(I, Number(w))
1293
- }, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (u(), _(e(X), {
1292
+ "onUpdate:modelValue": (_) => b(O, Number(_))
1293
+ }, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (u(), w(e(X), {
1294
1294
  key: 1,
1295
- "model-value": b.email,
1295
+ "model-value": h.email,
1296
1296
  type: "email",
1297
1297
  placeholder: "sales@example.com",
1298
- "onUpdate:modelValue": (w) => q(I, String(w))
1298
+ "onUpdate:modelValue": (_) => W(O, String(_))
1299
1299
  }, null, 8, ["model-value", "onUpdate:modelValue"])),
1300
1300
  t(e(Ve), {
1301
1301
  icon: "trash",
1302
1302
  tone: "danger",
1303
1303
  title: e(d)("panel.remove"),
1304
- onClick: (w) => F(I)
1304
+ onClick: (_) => T(O)
1305
1305
  }, null, 8, ["title", "onClick"])
1306
1306
  ]))), 128))
1307
1307
  ]),
@@ -1311,22 +1311,22 @@ const Gl = /* @__PURE__ */ ae({
1311
1311
  variant: "outline",
1312
1312
  icon: "user",
1313
1313
  disabled: p.value.length === 0,
1314
- onClick: S[0] || (S[0] = (b) => z({ admin_id: Number(p.value[0]?.value) }))
1314
+ onClick: $[0] || ($[0] = (h) => C({ admin_id: Number(p.value[0]?.value) }))
1315
1315
  }, {
1316
1316
  default: a(() => [
1317
- T(V(e(d)("panel.add-admin")), 1)
1317
+ z(V(e(d)("panel.add-admin")), 1)
1318
1318
  ]),
1319
1319
  _: 1
1320
1320
  }, 8, ["disabled"]),
1321
1321
  t(e(le), {
1322
1322
  variant: "outline",
1323
- onClick: S[1] || (S[1] = (b) => z({ email: "" }))
1323
+ onClick: $[1] || ($[1] = (h) => C({ email: "" }))
1324
1324
  }, {
1325
1325
  icon: a(() => [
1326
1326
  t(e($e), { name: "mail" })
1327
1327
  ]),
1328
1328
  default: a(() => [
1329
- T(" " + V(e(d)("panel.add-email")), 1)
1329
+ z(" " + V(e(d)("panel.add-email")), 1)
1330
1330
  ]),
1331
1331
  _: 1
1332
1332
  })
@@ -1338,9 +1338,9 @@ const Gl = /* @__PURE__ */ ae({
1338
1338
  help: e(d)("panel.email-field-help")
1339
1339
  }, {
1340
1340
  default: a(() => [
1341
- t(e(me), {
1341
+ t(e(ve), {
1342
1342
  modelValue: e(U),
1343
- "onUpdate:modelValue": S[2] || (S[2] = (b) => se(U) ? U.value = b : null),
1343
+ "onUpdate:modelValue": $[2] || ($[2] = (h) => ne(U) ? U.value = h : null),
1344
1344
  options: i.value
1345
1345
  }, null, 8, ["modelValue", "options"])
1346
1346
  ]),
@@ -1350,56 +1350,56 @@ const Gl = /* @__PURE__ */ ae({
1350
1350
  _: 1
1351
1351
  }, 8, ["title"]));
1352
1352
  }
1353
- }), at = /* @__PURE__ */ ue(tt, [["__scopeId", "data-v-a5998eb4"]]), nt = { class: "wx-inbox-editor" }, st = /* @__PURE__ */ ae({
1353
+ }), nt = /* @__PURE__ */ ie(at, [["__scopeId", "data-v-a5998eb4"]]), st = { class: "wx-inbox-editor" }, ot = /* @__PURE__ */ ae({
1354
1354
  __name: "FormEditorPage",
1355
1355
  props: {
1356
1356
  base: { default: "/inbox" }
1357
1357
  },
1358
1358
  setup(r) {
1359
- const s = r, o = ie(), v = re(o), n = Oe(), d = Pe(), m = xe();
1360
- de();
1361
- const l = te("webx-inbox"), U = fe(), p = W(null), i = W([]), O = W(!0), z = W(!1), F = W({});
1362
- let f = fl({
1359
+ const s = r, o = oe(), f = de(o), n = Oe(), d = Pe(), m = xe();
1360
+ ce();
1361
+ const l = te("webx-inbox"), U = be(), p = F(null), i = F([]), L = F(!0), C = F(!1), T = F({});
1362
+ let b = bl({
1363
1363
  slug: "",
1364
1364
  title: {},
1365
1365
  is_enabled: !0
1366
1366
  });
1367
- const q = W({}), c = C(() => o.can("inbox.manage")), S = C(() => Number(n.params.id)), b = C(
1368
- () => p.value === null ? "" : ve(f.title, m.active.value, f.slug)
1369
- ), I = C(() => `${s.base}?form=${S.value}`);
1370
- async function w() {
1371
- O.value = !0;
1367
+ const W = F({}), c = S(() => o.can("inbox.manage")), $ = S(() => Number(n.params.id)), h = S(
1368
+ () => p.value === null ? "" : fe(b.title, m.active.value, b.slug)
1369
+ ), O = S(() => `${s.base}?form=${$.value}`);
1370
+ async function _() {
1371
+ L.value = !0;
1372
1372
  try {
1373
- const L = await v.form(S.value);
1374
- p.value = L, i.value = L.fields ?? [], f.slug = L.slug, f.title = { ...L.title }, f.is_enabled = L.is_enabled, q.value = { ...L.options };
1375
- } catch (L) {
1376
- P.danger(U(L)), d.replace(s.base);
1373
+ const N = await f.form($.value);
1374
+ p.value = N, i.value = N.fields ?? [], b.slug = N.slug, b.title = { ...N.title }, b.is_enabled = N.is_enabled, W.value = { ...N.options };
1375
+ } catch (N) {
1376
+ P.danger(U(N)), d.replace(s.base);
1377
1377
  } finally {
1378
- O.value = !1;
1378
+ L.value = !1;
1379
1379
  }
1380
1380
  }
1381
- Ce(S, () => {
1382
- w();
1381
+ Ce($, () => {
1382
+ _();
1383
1383
  }, { immediate: !0 });
1384
- async function R() {
1385
- z.value = !0, F.value = {};
1384
+ async function E() {
1385
+ C.value = !0, T.value = {};
1386
1386
  try {
1387
- const L = await v.saveForm(S.value, {
1388
- slug: f.slug.trim(),
1389
- title: f.title,
1390
- is_enabled: f.is_enabled,
1391
- options: q.value
1387
+ const N = await f.saveForm($.value, {
1388
+ slug: b.slug.trim(),
1389
+ title: b.title,
1390
+ is_enabled: b.is_enabled,
1391
+ options: W.value
1392
1392
  });
1393
- p.value = L, P.success(l("panel.saved"));
1394
- } catch (L) {
1395
- const A = L.body;
1396
- A?.errors ? (F.value = A.errors, P.danger(l("panel.failed"))) : P.danger(U(L));
1393
+ p.value = N, P.success(l("panel.saved"));
1394
+ } catch (N) {
1395
+ const q = N.body;
1396
+ q?.errors ? (T.value = q.errors, P.danger(l("panel.failed"))) : P.danger(U(N));
1397
1397
  } finally {
1398
- z.value = !1;
1398
+ C.value = !1;
1399
1399
  }
1400
1400
  }
1401
- return (L, A) => (u(), j("div", nt, [
1402
- O.value ? (u(), _(e(oe), { key: 0 }, {
1401
+ return (N, q) => (u(), j("div", st, [
1402
+ L.value ? (u(), w(e(se), { key: 0 }, {
1403
1403
  default: a(() => [
1404
1404
  t(e(We), {
1405
1405
  title: "",
@@ -1410,18 +1410,18 @@ const Gl = /* @__PURE__ */ ae({
1410
1410
  })) : p.value ? (u(), j(ee, { key: 1 }, [
1411
1411
  t(e(Qe), {
1412
1412
  class: "wx-inbox-editor__head",
1413
- title: b.value,
1413
+ title: h.value,
1414
1414
  subtitle: p.value.slug,
1415
- back: I.value,
1415
+ back: O.value,
1416
1416
  "back-label": e(l)("panel.forms")
1417
1417
  }, {
1418
1418
  "title-after": a(() => [
1419
- e(f).is_enabled ? H("", !0) : (u(), _(e(Se), {
1419
+ e(b).is_enabled ? H("", !0) : (u(), w(e(Se), {
1420
1420
  key: 0,
1421
1421
  type: "default"
1422
1422
  }, {
1423
1423
  default: a(() => [
1424
- T(V(e(l)("panel.off")), 1)
1424
+ z(V(e(l)("panel.off")), 1)
1425
1425
  ]),
1426
1426
  _: 1
1427
1427
  }))
@@ -1438,12 +1438,12 @@ const Gl = /* @__PURE__ */ ae({
1438
1438
  label: e(l)("panel.tab-general")
1439
1439
  }, {
1440
1440
  default: a(() => [
1441
- t(et, {
1442
- settings: e(f),
1443
- "onUpdate:settings": A[0] || (A[0] = ($) => se(f) ? f.value = $ : f = $),
1444
- options: q.value,
1445
- "onUpdate:options": A[1] || (A[1] = ($) => q.value = $),
1446
- errors: F.value
1441
+ t(lt, {
1442
+ settings: e(b),
1443
+ "onUpdate:settings": q[0] || (q[0] = (M) => ne(b) ? b.value = M : b = M),
1444
+ options: W.value,
1445
+ "onUpdate:options": q[1] || (q[1] = (M) => W.value = M),
1446
+ errors: T.value
1447
1447
  }, null, 8, ["settings", "options", "errors"])
1448
1448
  ]),
1449
1449
  _: 1
@@ -1453,9 +1453,9 @@ const Gl = /* @__PURE__ */ ae({
1453
1453
  label: e(l)("panel.tab-fields")
1454
1454
  }, {
1455
1455
  default: a(() => [
1456
- t(Hl, {
1456
+ t(Gl, {
1457
1457
  modelValue: i.value,
1458
- "onUpdate:modelValue": A[2] || (A[2] = ($) => i.value = $),
1458
+ "onUpdate:modelValue": q[2] || (q[2] = (M) => i.value = M),
1459
1459
  form: p.value,
1460
1460
  "can-manage": c.value
1461
1461
  }, null, 8, ["modelValue", "form", "can-manage"])
@@ -1467,11 +1467,11 @@ const Gl = /* @__PURE__ */ ae({
1467
1467
  label: e(l)("panel.tab-notifications")
1468
1468
  }, {
1469
1469
  default: a(() => [
1470
- t(at, {
1471
- modelValue: q.value,
1472
- "onUpdate:modelValue": A[3] || (A[3] = ($) => q.value = $),
1470
+ t(nt, {
1471
+ modelValue: W.value,
1472
+ "onUpdate:modelValue": q[3] || (q[3] = (M) => W.value = M),
1473
1473
  fields: i.value,
1474
- errors: F.value
1474
+ errors: T.value
1475
1475
  }, null, 8, ["modelValue", "fields", "errors"])
1476
1476
  ]),
1477
1477
  _: 1
@@ -1481,9 +1481,9 @@ const Gl = /* @__PURE__ */ ae({
1481
1481
  label: e(l)("panel.tab-antispam")
1482
1482
  }, {
1483
1483
  default: a(() => [
1484
- t(Gl, {
1485
- modelValue: q.value,
1486
- "onUpdate:modelValue": A[4] || (A[4] = ($) => q.value = $)
1484
+ t(jl, {
1485
+ modelValue: W.value,
1486
+ "onUpdate:modelValue": q[4] || (q[4] = (M) => W.value = M)
1487
1487
  }, null, 8, ["modelValue"])
1488
1488
  ]),
1489
1489
  _: 1
@@ -1493,9 +1493,9 @@ const Gl = /* @__PURE__ */ ae({
1493
1493
  label: e(l)("panel.tab-embed")
1494
1494
  }, {
1495
1495
  default: a(() => [
1496
- t(Ql, {
1496
+ t(Jl, {
1497
1497
  form: p.value,
1498
- slug: e(f).slug,
1498
+ slug: e(b).slug,
1499
1499
  fields: i.value
1500
1500
  }, null, 8, ["form", "slug", "fields"])
1501
1501
  ]),
@@ -1504,15 +1504,15 @@ const Gl = /* @__PURE__ */ ae({
1504
1504
  ]),
1505
1505
  _: 1
1506
1506
  }),
1507
- c.value ? (u(), _(e(_l), { key: 0 }, {
1507
+ c.value ? (u(), w(e(wl), { key: 0 }, {
1508
1508
  default: a(() => [
1509
1509
  t(e(le), {
1510
1510
  type: "primary",
1511
- loading: z.value,
1512
- onClick: R
1511
+ loading: C.value,
1512
+ onClick: E
1513
1513
  }, {
1514
1514
  default: a(() => [
1515
- T(V(e(l)("panel.save")), 1)
1515
+ z(V(e(l)("panel.save")), 1)
1516
1516
  ]),
1517
1517
  _: 1
1518
1518
  }, 8, ["loading"])
@@ -1522,17 +1522,17 @@ const Gl = /* @__PURE__ */ ae({
1522
1522
  ], 64)) : H("", !0)
1523
1523
  ]));
1524
1524
  }
1525
- }), ot = /* @__PURE__ */ ue(st, [["__scopeId", "data-v-11c10bb6"]]), it = { class: "wx-inbox-create" }, ut = /* @__PURE__ */ ae({
1525
+ }), it = /* @__PURE__ */ ie(ot, [["__scopeId", "data-v-11c10bb6"]]), ut = { class: "wx-inbox-create" }, rt = /* @__PURE__ */ ae({
1526
1526
  __name: "FormCreateDialog",
1527
1527
  setup(r) {
1528
- const { resolve: s, dismiss: o, open: v } = Ee(), n = ie(), d = re(n);
1529
- de();
1530
- const m = te("webx-inbox"), l = fe(), U = W({}), p = W(""), i = W(!1), O = W({});
1531
- function z(f) {
1532
- return O.value[f]?.[0];
1533
- }
1534
- async function F() {
1535
- i.value = !0, O.value = {};
1528
+ const { resolve: s, dismiss: o, open: f } = Ee(), n = oe(), d = de(n);
1529
+ ce();
1530
+ const m = te("webx-inbox"), l = be(), U = F({}), p = F(""), i = F(!1), L = F({});
1531
+ function C(b) {
1532
+ return L.value[b]?.[0];
1533
+ }
1534
+ async function T() {
1535
+ i.value = !0, L.value = {};
1536
1536
  try {
1537
1537
  s(
1538
1538
  await d.createForm({
@@ -1542,16 +1542,16 @@ const Gl = /* @__PURE__ */ ae({
1542
1542
  options: {}
1543
1543
  })
1544
1544
  );
1545
- } catch (f) {
1546
- const q = f.body;
1547
- q?.errors ? (O.value = q.errors, P.danger(m("panel.failed"))) : P.danger(l(f));
1545
+ } catch (b) {
1546
+ const W = b.body;
1547
+ W?.errors ? (L.value = W.errors, P.danger(m("panel.failed"))) : P.danger(l(b));
1548
1548
  } finally {
1549
1549
  i.value = !1;
1550
1550
  }
1551
1551
  }
1552
- return (f, q) => (u(), _(e(Re), {
1553
- open: e(v),
1554
- "onUpdate:open": q[3] || (q[3] = (c) => se(v) ? v.value = c : null),
1552
+ return (b, W) => (u(), w(e(Re), {
1553
+ open: e(f),
1554
+ "onUpdate:open": W[3] || (W[3] = (c) => ne(f) ? f.value = c : null),
1555
1555
  title: e(m)("panel.new-form-title"),
1556
1556
  width: 520
1557
1557
  }, {
@@ -1560,20 +1560,20 @@ const Gl = /* @__PURE__ */ ae({
1560
1560
  default: a(() => [
1561
1561
  t(e(le), {
1562
1562
  variant: "outline",
1563
- onClick: q[2] || (q[2] = (c) => e(o)())
1563
+ onClick: W[2] || (W[2] = (c) => e(o)())
1564
1564
  }, {
1565
1565
  default: a(() => [
1566
- T(V(e(m)("panel.cancel")), 1)
1566
+ z(V(e(m)("panel.cancel")), 1)
1567
1567
  ]),
1568
1568
  _: 1
1569
1569
  }),
1570
1570
  t(e(le), {
1571
1571
  type: "primary",
1572
1572
  loading: i.value,
1573
- onClick: F
1573
+ onClick: T
1574
1574
  }, {
1575
1575
  default: a(() => [
1576
- T(V(e(m)("panel.save")), 1)
1576
+ z(V(e(m)("panel.save")), 1)
1577
1577
  ]),
1578
1578
  _: 1
1579
1579
  }, 8, ["loading"])
@@ -1582,16 +1582,16 @@ const Gl = /* @__PURE__ */ ae({
1582
1582
  })
1583
1583
  ]),
1584
1584
  default: a(() => [
1585
- G("div", it, [
1585
+ G("div", ut, [
1586
1586
  t(e(B), {
1587
1587
  label: e(m)("panel.title"),
1588
- error: z("title"),
1588
+ error: C("title"),
1589
1589
  required: ""
1590
1590
  }, {
1591
1591
  default: a(() => [
1592
1592
  t(e(X), {
1593
1593
  modelValue: U.value,
1594
- "onUpdate:modelValue": q[0] || (q[0] = (c) => U.value = c),
1594
+ "onUpdate:modelValue": W[0] || (W[0] = (c) => U.value = c),
1595
1595
  localized: "",
1596
1596
  autofocus: ""
1597
1597
  }, null, 8, ["modelValue"])
@@ -1601,12 +1601,12 @@ const Gl = /* @__PURE__ */ ae({
1601
1601
  t(e(B), {
1602
1602
  label: e(m)("panel.slug"),
1603
1603
  help: e(m)("panel.slug-help"),
1604
- error: z("slug")
1604
+ error: C("slug")
1605
1605
  }, {
1606
1606
  default: a(() => [
1607
1607
  t(e(X), {
1608
1608
  modelValue: p.value,
1609
- "onUpdate:modelValue": q[1] || (q[1] = (c) => p.value = c),
1609
+ "onUpdate:modelValue": W[1] || (W[1] = (c) => p.value = c),
1610
1610
  placeholder: "contact"
1611
1611
  }, null, 8, ["modelValue"])
1612
1612
  ]),
@@ -1617,61 +1617,61 @@ const Gl = /* @__PURE__ */ ae({
1617
1617
  _: 1
1618
1618
  }, 8, ["open", "title"]));
1619
1619
  }
1620
- }), rt = /* @__PURE__ */ ue(ut, [["__scopeId", "data-v-55fb40d8"]]), dt = { class: "wx-inbox-by-hand" }, ct = /* @__PURE__ */ ae({
1620
+ }), dt = /* @__PURE__ */ ie(rt, [["__scopeId", "data-v-55fb40d8"]]), ct = { class: "wx-inbox-by-hand" }, pt = /* @__PURE__ */ ae({
1621
1621
  __name: "SubmissionCreateDialog",
1622
1622
  props: {
1623
1623
  form: {}
1624
1624
  },
1625
1625
  setup(r) {
1626
- const s = r, { resolve: o, dismiss: v, open: n } = Ee(), d = ie(), m = re(d), l = xe();
1627
- de();
1628
- const U = te("webx-inbox"), p = fe(), i = W([]), O = W(!0), z = W(!1), F = W({}), f = W({}), q = C(() => i.value.filter((A) => A.type !== "file")), c = C(() => i.value.some((A) => A.type === "file"));
1629
- function S(A) {
1630
- return f.value[`fields.${A.key}`]?.[0];
1631
- }
1632
- function b(A) {
1633
- return ve(A.title, l.active.value, A.key);
1634
- }
1635
- function I(A, $ = "") {
1636
- return ve(
1637
- A,
1626
+ const s = r, { resolve: o, dismiss: f, open: n } = Ee(), d = oe(), m = de(d), l = xe();
1627
+ ce();
1628
+ const U = te("webx-inbox"), p = be(), i = F([]), L = F(!0), C = F(!1), T = F({}), b = F({}), W = S(() => i.value.filter((q) => q.type !== "file")), c = S(() => i.value.some((q) => q.type === "file"));
1629
+ function $(q) {
1630
+ return b.value[`fields.${q.key}`]?.[0];
1631
+ }
1632
+ function h(q) {
1633
+ return fe(q.title, l.active.value, q.key);
1634
+ }
1635
+ function O(q, M = "") {
1636
+ return fe(
1637
+ q,
1638
1638
  l.active.value,
1639
- $
1639
+ M
1640
1640
  );
1641
1641
  }
1642
- function w(A) {
1643
- return (A.options.choices ?? []).map(($) => ({
1644
- value: $.value,
1645
- label: I($.label, $.value)
1642
+ function _(q) {
1643
+ return (q.options.choices ?? []).map((M) => ({
1644
+ value: M.value,
1645
+ label: O(M.label, M.value)
1646
1646
  }));
1647
1647
  }
1648
- async function R() {
1648
+ async function E() {
1649
1649
  try {
1650
- const A = await m.form(s.form.id);
1651
- i.value = (A.fields ?? []).filter(($) => $.is_enabled);
1652
- for (const $ of i.value)
1653
- F.value[$.key] = $.type === "checkbox" ? [] : $.type === "consent" ? !1 : "";
1654
- } catch (A) {
1655
- P.danger(p(A));
1650
+ const q = await m.form(s.form.id);
1651
+ i.value = (q.fields ?? []).filter((M) => M.is_enabled);
1652
+ for (const M of i.value)
1653
+ T.value[M.key] = M.type === "checkbox" ? [] : M.type === "consent" ? !1 : "";
1654
+ } catch (q) {
1655
+ P.danger(p(q));
1656
1656
  } finally {
1657
- O.value = !1;
1657
+ L.value = !1;
1658
1658
  }
1659
1659
  }
1660
- R();
1661
- async function L() {
1662
- z.value = !0, f.value = {};
1660
+ E();
1661
+ async function N() {
1662
+ C.value = !0, b.value = {};
1663
1663
  try {
1664
- o(await m.createSubmission(s.form.id, F.value));
1665
- } catch (A) {
1666
- const $ = A.body;
1667
- $?.errors ? (f.value = $.errors, P.danger(U("panel.failed"))) : P.danger(p(A));
1664
+ o(await m.createSubmission(s.form.id, T.value));
1665
+ } catch (q) {
1666
+ const M = q.body;
1667
+ M?.errors ? (b.value = M.errors, P.danger(U("panel.failed"))) : P.danger(p(q));
1668
1668
  } finally {
1669
- z.value = !1;
1669
+ C.value = !1;
1670
1670
  }
1671
1671
  }
1672
- return (A, $) => (u(), _(e(Re), {
1672
+ return (q, M) => (u(), w(e(Re), {
1673
1673
  open: e(n),
1674
- "onUpdate:open": $[1] || ($[1] = (x) => se(n) ? n.value = x : null),
1674
+ "onUpdate:open": M[1] || (M[1] = (v) => ne(n) ? n.value = v : null),
1675
1675
  title: e(U)("panel.new-submission-title"),
1676
1676
  width: 560
1677
1677
  }, {
@@ -1680,21 +1680,21 @@ const Gl = /* @__PURE__ */ ae({
1680
1680
  default: a(() => [
1681
1681
  t(e(le), {
1682
1682
  variant: "outline",
1683
- onClick: $[0] || ($[0] = (x) => e(v)())
1683
+ onClick: M[0] || (M[0] = (v) => e(f)())
1684
1684
  }, {
1685
1685
  default: a(() => [
1686
- T(V(e(U)("panel.cancel")), 1)
1686
+ z(V(e(U)("panel.cancel")), 1)
1687
1687
  ]),
1688
1688
  _: 1
1689
1689
  }),
1690
1690
  t(e(le), {
1691
1691
  type: "primary",
1692
- loading: z.value,
1693
- disabled: O.value,
1694
- onClick: L
1692
+ loading: C.value,
1693
+ disabled: L.value,
1694
+ onClick: N
1695
1695
  }, {
1696
1696
  default: a(() => [
1697
- T(V(e(U)("panel.save")), 1)
1697
+ z(V(e(U)("panel.save")), 1)
1698
1698
  ]),
1699
1699
  _: 1
1700
1700
  }, 8, ["loading", "disabled"])
@@ -1703,79 +1703,79 @@ const Gl = /* @__PURE__ */ ae({
1703
1703
  })
1704
1704
  ]),
1705
1705
  default: a(() => [
1706
- G("div", dt, [
1706
+ G("div", ct, [
1707
1707
  t(e(Me), {
1708
1708
  type: "info",
1709
1709
  closable: !1
1710
1710
  }, {
1711
1711
  default: a(() => [
1712
- T(V(e(U)("panel.new-submission-help")), 1)
1712
+ z(V(e(U)("panel.new-submission-help")), 1)
1713
1713
  ]),
1714
1714
  _: 1
1715
1715
  }),
1716
- O.value ? (u(), _(e(We), {
1716
+ L.value ? (u(), w(e(We), {
1717
1717
  key: 0,
1718
1718
  rows: 4
1719
1719
  })) : (u(), j(ee, { key: 1 }, [
1720
- (u(!0), j(ee, null, ke(q.value, (x) => (u(), _(e(B), {
1721
- key: x.id,
1722
- label: b(x),
1723
- help: I(x.help),
1724
- error: S(x),
1725
- required: x.is_required
1720
+ (u(!0), j(ee, null, ke(W.value, (v) => (u(), w(e(B), {
1721
+ key: v.id,
1722
+ label: h(v),
1723
+ help: O(v.help),
1724
+ error: $(v),
1725
+ required: v.is_required
1726
1726
  }, {
1727
1727
  default: a(() => [
1728
- x.type === "textarea" ? (u(), _(e(wl), {
1728
+ v.type === "textarea" ? (u(), w(e(kl), {
1729
1729
  key: 0,
1730
- modelValue: F.value[x.key],
1731
- "onUpdate:modelValue": (Q) => F.value[x.key] = Q,
1732
- rows: x.options.rows ?? 4,
1733
- placeholder: I(x.placeholder)
1734
- }, null, 8, ["modelValue", "onUpdate:modelValue", "rows", "placeholder"])) : x.type === "select" ? (u(), _(e(me), {
1730
+ modelValue: T.value[v.key],
1731
+ "onUpdate:modelValue": (Y) => T.value[v.key] = Y,
1732
+ rows: v.options.rows ?? 4,
1733
+ placeholder: O(v.placeholder)
1734
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "rows", "placeholder"])) : v.type === "select" ? (u(), w(e(ve), {
1735
1735
  key: 1,
1736
- modelValue: F.value[x.key],
1737
- "onUpdate:modelValue": (Q) => F.value[x.key] = Q,
1738
- options: w(x),
1736
+ modelValue: T.value[v.key],
1737
+ "onUpdate:modelValue": (Y) => T.value[v.key] = Y,
1738
+ options: _(v),
1739
1739
  clearable: "",
1740
- placeholder: I(x.placeholder)
1741
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder"])) : x.type === "radio" ? (u(), _(e(kl), {
1740
+ placeholder: O(v.placeholder)
1741
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder"])) : v.type === "radio" ? (u(), w(e(Vl), {
1742
1742
  key: 2,
1743
- modelValue: F.value[x.key],
1744
- "onUpdate:modelValue": (Q) => F.value[x.key] = Q,
1745
- options: w(x)
1746
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : x.type === "checkbox" ? (u(), _(e(Vl), {
1743
+ modelValue: T.value[v.key],
1744
+ "onUpdate:modelValue": (Y) => T.value[v.key] = Y,
1745
+ options: _(v)
1746
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : v.type === "checkbox" ? (u(), w(e($l), {
1747
1747
  key: 3,
1748
- modelValue: F.value[x.key],
1749
- "onUpdate:modelValue": (Q) => F.value[x.key] = Q,
1750
- options: w(x)
1751
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : x.type === "consent" ? (u(), _(e(he), {
1748
+ modelValue: T.value[v.key],
1749
+ "onUpdate:modelValue": (Y) => T.value[v.key] = Y,
1750
+ options: _(v)
1751
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : v.type === "consent" ? (u(), w(e(he), {
1752
1752
  key: 4,
1753
- modelValue: F.value[x.key],
1754
- "onUpdate:modelValue": (Q) => F.value[x.key] = Q,
1755
- label: I(x.options.text, b(x))
1756
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label"])) : x.type === "date" ? (u(), _(e(Ze), {
1753
+ modelValue: T.value[v.key],
1754
+ "onUpdate:modelValue": (Y) => T.value[v.key] = Y,
1755
+ label: O(v.options.text, h(v))
1756
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label"])) : v.type === "date" ? (u(), w(e(Ze), {
1757
1757
  key: 5,
1758
- modelValue: F.value[x.key],
1759
- "onUpdate:modelValue": (Q) => F.value[x.key] = Q,
1760
- placeholder: I(x.placeholder)
1761
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (u(), _(e(X), {
1758
+ modelValue: T.value[v.key],
1759
+ "onUpdate:modelValue": (Y) => T.value[v.key] = Y,
1760
+ placeholder: O(v.placeholder)
1761
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (u(), w(e(X), {
1762
1762
  key: 6,
1763
- modelValue: F.value[x.key],
1764
- "onUpdate:modelValue": (Q) => F.value[x.key] = Q,
1765
- type: x.type === "email" ? "email" : x.type === "tel" ? "tel" : "text",
1766
- placeholder: I(x.placeholder),
1767
- maxlength: x.options.maxlength
1763
+ modelValue: T.value[v.key],
1764
+ "onUpdate:modelValue": (Y) => T.value[v.key] = Y,
1765
+ type: v.type === "email" ? "email" : v.type === "tel" ? "tel" : "text",
1766
+ placeholder: O(v.placeholder),
1767
+ maxlength: v.options.maxlength
1768
1768
  }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "maxlength"]))
1769
1769
  ]),
1770
1770
  _: 2
1771
1771
  }, 1032, ["label", "help", "error", "required"]))), 128)),
1772
- c.value ? (u(), _(e(Me), {
1772
+ c.value ? (u(), w(e(Me), {
1773
1773
  key: 0,
1774
1774
  type: "warning",
1775
1775
  closable: !1
1776
1776
  }, {
1777
1777
  default: a(() => [
1778
- T(V(e(U)("panel.no-files-by-hand")), 1)
1778
+ z(V(e(U)("panel.no-files-by-hand")), 1)
1779
1779
  ]),
1780
1780
  _: 1
1781
1781
  })) : H("", !0)
@@ -1785,7 +1785,7 @@ const Gl = /* @__PURE__ */ ae({
1785
1785
  _: 1
1786
1786
  }, 8, ["open", "title"]));
1787
1787
  }
1788
- }), pt = /* @__PURE__ */ ue(ct, [["__scopeId", "data-v-72006299"]]), mt = { class: "wx-submissions__mass" }, vt = { class: "wx-submissions__state" }, ft = 640, bt = /* @__PURE__ */ ae({
1788
+ }), mt = /* @__PURE__ */ ie(pt, [["__scopeId", "data-v-72006299"]]), vt = { class: "wx-submissions__mass" }, ft = { class: "wx-submissions__state" }, bt = 640, ht = /* @__PURE__ */ ae({
1789
1789
  __name: "SubmissionList",
1790
1790
  props: {
1791
1791
  form: {},
@@ -1793,70 +1793,70 @@ const Gl = /* @__PURE__ */ ae({
1793
1793
  },
1794
1794
  emits: ["changed"],
1795
1795
  setup(r, { expose: s, emit: o }) {
1796
- const v = r, n = o, d = ie(), m = re(d), l = Oe(), U = Pe(), p = xe();
1797
- de();
1798
- const i = ol("root"), O = $l(i), z = C(() => O.value > 0 && O.value < ft), F = C(() => z.value ? Number.POSITIVE_INFINITY : 0), f = te("webx-inbox"), q = fe(), c = W(null), S = W([]), b = W(!1), I = W([]), w = W(!1), R = C(() => d.can("inbox.update")), L = Be(pt), A = C({
1796
+ const f = r, n = o, d = oe(), m = de(d), l = Oe(), U = Pe(), p = xe();
1797
+ ce();
1798
+ const i = il("root"), L = Ul(i), C = S(() => L.value > 0 && L.value < bt), T = S(() => C.value ? Number.POSITIVE_INFINITY : 0), b = te("webx-inbox"), W = te("webx-admin"), c = be(), $ = F(null), h = F([]), O = F(!1), _ = F([]), E = F(!1), N = S(() => d.can("inbox.update")), q = Be(mt), M = S({
1799
1799
  get: () => typeof l.query.view == "string" && l.query.view !== "" ? l.query.view : "all",
1800
- set: (g) => {
1800
+ set: (x) => {
1801
1801
  U.replace({
1802
- query: { ...l.query, view: g === "all" ? void 0 : g, page: void 0 }
1802
+ query: { ...l.query, view: x === "all" ? void 0 : x, page: void 0 }
1803
1803
  });
1804
1804
  }
1805
- }), $ = C(() => ({
1806
- view: A.value,
1805
+ }), v = S(() => ({
1806
+ view: M.value,
1807
1807
  search: typeof l.query.search == "string" ? l.query.search : "",
1808
1808
  assignee: typeof l.query.assignee == "string" ? l.query.assignee : null,
1809
1809
  placement: typeof l.query.placement == "string" ? l.query.placement : null,
1810
1810
  sort: typeof l.query.sort == "string" ? l.query.sort : null,
1811
1811
  page: Number(l.query.page ?? 1) || 1
1812
- })), x = C(
1813
- () => (c.value?.placements ?? []).map(
1814
- (g) => g === null ? { value: "none", label: f("panel.placement-none") } : { value: g, label: g }
1812
+ })), Y = S(
1813
+ () => ($.value?.placements ?? []).map(
1814
+ (x) => x === null ? { value: "none", label: b("panel.placement-none") } : { value: x, label: x }
1815
1815
  )
1816
- ), Q = C(
1817
- () => x.value.length > 1 || $.value.placement !== null
1818
- ), ce = C(() => {
1819
- const g = $.value.placement;
1820
- if (g === null) return [];
1821
- const K = x.value.find((M) => M.value === g)?.label ?? (g === "none" ? f("panel.placement-none") : g);
1816
+ ), ye = S(
1817
+ () => Y.value.length > 1 || v.value.placement !== null
1818
+ ), pe = S(() => {
1819
+ const x = v.value.placement;
1820
+ if (x === null) return [];
1821
+ const K = Y.value.find((D) => D.value === x)?.label ?? (x === "none" ? b("panel.placement-none") : x);
1822
1822
  return [
1823
1823
  {
1824
1824
  key: "placement",
1825
- label: `${f("panel.meta-placement")}: ${K}`,
1826
- clear: () => be(void 0)
1825
+ label: `${b("panel.meta-placement")}: ${K}`,
1826
+ clear: () => A(void 0)
1827
1827
  }
1828
1828
  ];
1829
1829
  });
1830
- function be(g) {
1830
+ function A(x) {
1831
1831
  U.replace({
1832
1832
  query: {
1833
1833
  ...l.query,
1834
- placement: typeof g == "string" && g !== "" ? g : void 0,
1834
+ placement: typeof x == "string" && x !== "" ? x : void 0,
1835
1835
  page: void 0
1836
1836
  }
1837
1837
  });
1838
1838
  }
1839
- const N = C(() => {
1840
- const g = c.value?.counts, K = [
1841
- { value: "all", label: f("panel.view-all"), badge: g?.all || void 0 },
1842
- { value: "unread", label: f("panel.view-unread"), badge: g?.unread || void 0 }
1839
+ const Q = S(() => {
1840
+ const x = $.value?.counts, K = [
1841
+ { value: "all", label: b("panel.view-all"), badge: x?.all || void 0 },
1842
+ { value: "unread", label: b("panel.view-unread"), badge: x?.unread || void 0 }
1843
1843
  ];
1844
- for (const M of S.value)
1844
+ for (const D of h.value)
1845
1845
  K.push({
1846
- value: M.key,
1847
- label: ne(M),
1848
- badge: g?.statuses[M.key] || void 0
1846
+ value: D.key,
1847
+ label: re(D),
1848
+ badge: x?.statuses[D.key] || void 0
1849
1849
  });
1850
1850
  return K;
1851
1851
  });
1852
- function Z(g, K) {
1853
- const M = c.value?.columns?.[K];
1854
- return M ? g.values[M.key] ?? "" : "";
1855
- }
1856
- const D = C(() => {
1857
- const g = c.value?.columns ?? [];
1858
- return z.value ? [{ key: "card", label: "" }] : [
1859
- ...g.map((K, M) => ({
1852
+ function I(x, K) {
1853
+ const D = $.value?.columns?.[K];
1854
+ return D ? x.values[D.key] ?? "" : "";
1855
+ }
1856
+ const k = S(() => {
1857
+ const x = $.value?.columns ?? [];
1858
+ return C.value ? [{ key: "card", label: "" }] : [
1859
+ ...x.map((K, D) => ({
1860
1860
  key: `values.${K.key}`,
1861
1861
  label: K.label,
1862
1862
  sortable: !0,
@@ -1865,15 +1865,15 @@ const Gl = /* @__PURE__ */ ae({
1865
1865
  // wide — 640, 960 — because an answer is a sentence and not a number: two of them plus
1866
1866
  // the status and the date is already what a 755px pane holds without scrolling sideways,
1867
1867
  // which is what the pane beside the forms actually is on a 1280 screen (§11).
1868
- hideBelow: M === 0 ? void 0 : 320 + M * 320
1868
+ hideBelow: D === 0 ? void 0 : 320 + D * 320
1869
1869
  })),
1870
1870
  // A floor rather than a width: the cell holds a badge, sometimes an avatar and sometimes
1871
1871
  // a paperclip, and a fixed width that any of them overflows makes the whole table scroll
1872
1872
  // sideways by two pixels.
1873
- { key: "status", label: f("panel.status"), minWidth: 100 },
1873
+ { key: "status", label: b("panel.status"), minWidth: 100 },
1874
1874
  {
1875
1875
  key: "created_at",
1876
- label: f("panel.received"),
1876
+ label: b("panel.received"),
1877
1877
  sortable: !0,
1878
1878
  width: 120,
1879
1879
  // "today at 16:22" is three words the table will break over two lines given half a
@@ -1883,120 +1883,120 @@ const Gl = /* @__PURE__ */ ae({
1883
1883
  // Kept on the card, unlike most dates: "when did this come in" is one of the two
1884
1884
  // questions a submission is looked at for, and the other one is who sent it.
1885
1885
  },
1886
- { key: "actions", label: "", width: bl, align: "right", hideOnCards: !0 }
1886
+ { key: "actions", label: "", width: hl, align: "right", hideOnCards: !0 }
1887
1887
  ];
1888
- }), k = C(
1889
- () => $.value.view === "all" && $.value.search === "" && $.value.assignee === null && $.value.placement === null ? f("panel.submissions-empty") : f("panel.submissions-none")
1890
- ), h = C(
1891
- () => S.value.map((g) => ({ value: g.id, label: ne(g) }))
1888
+ }), y = S(
1889
+ () => v.value.view === "all" && v.value.search === "" && v.value.assignee === null && v.value.placement === null ? b("panel.submissions-empty") : b("panel.submissions-none")
1890
+ ), ue = S(
1891
+ () => h.value.map((x) => ({ value: x.id, label: re(x) }))
1892
1892
  );
1893
- function ne(g) {
1894
- return ve(g.title, p.active.value, g.key);
1893
+ function re(x) {
1894
+ return fe(x.title, p.active.value, x.key);
1895
1895
  }
1896
- function ye() {
1897
- return ve(v.form.title, p.active.value, v.form.slug);
1896
+ function Ge() {
1897
+ return fe(f.form.title, p.active.value, f.form.slug);
1898
1898
  }
1899
- async function _e(g) {
1900
- b.value = !0;
1899
+ async function _e(x) {
1900
+ O.value = !0;
1901
1901
  try {
1902
- c.value = await m.submissions(v.form.id, {
1903
- view: $.value.view,
1904
- search: g?.search ?? $.value.search,
1905
- assignee: $.value.assignee,
1906
- placement: $.value.placement,
1907
- sort: g?.sort ? `${g.sort.order === "desc" ? "-" : ""}${g.sort.key}` : null,
1908
- page: g?.page ?? $.value.page,
1909
- per_page: g?.perPage
1902
+ $.value = await m.submissions(f.form.id, {
1903
+ view: v.value.view,
1904
+ search: x?.search ?? v.value.search,
1905
+ assignee: v.value.assignee,
1906
+ placement: v.value.placement,
1907
+ sort: x?.sort ? `${x.sort.order === "desc" ? "-" : ""}${x.sort.key}` : null,
1908
+ page: x?.page ?? v.value.page,
1909
+ per_page: x?.perPage
1910
1910
  });
1911
1911
  } catch (K) {
1912
- P.danger(q(K));
1912
+ P.danger(c(K));
1913
1913
  } finally {
1914
- b.value = !1;
1914
+ O.value = !1;
1915
1915
  }
1916
1916
  }
1917
- function Ge(g) {
1917
+ function g(x) {
1918
1918
  const K = {
1919
1919
  ...l.query,
1920
- search: g.search === "" ? void 0 : g.search,
1921
- sort: g.sort === null ? void 0 : `${g.sort.order === "desc" ? "-" : ""}${g.sort.key}`,
1922
- page: g.page === 1 ? void 0 : String(g.page)
1920
+ search: x.search === "" ? void 0 : x.search,
1921
+ sort: x.sort === null ? void 0 : `${x.sort.order === "desc" ? "-" : ""}${x.sort.key}`,
1922
+ page: x.page === 1 ? void 0 : String(x.page)
1923
1923
  };
1924
- U.replace({ query: K }), _e(g);
1924
+ U.replace({ query: K }), _e(x);
1925
1925
  }
1926
- Ce([() => v.form.id, A, () => $.value.assignee, () => $.value.placement], () => {
1927
- I.value = [], _e();
1928
- }), _e(), y();
1929
- async function y() {
1926
+ Ce([() => f.form.id, M, () => v.value.assignee, () => v.value.placement], () => {
1927
+ _.value = [], _e();
1928
+ }), _e(), Z();
1929
+ async function Z() {
1930
1930
  try {
1931
- S.value = await m.statuses();
1932
- } catch (g) {
1933
- P.danger(q(g));
1931
+ h.value = await m.statuses();
1932
+ } catch (x) {
1933
+ P.danger(c(x));
1934
1934
  }
1935
1935
  }
1936
- function Y(g) {
1937
- U.push({ path: `${v.base}/submissions/${g.id}`, query: { ...l.query } });
1936
+ function R(x) {
1937
+ U.push({ path: `${f.base}/submissions/${x.id}`, query: { ...l.query } });
1938
1938
  }
1939
- function E(g) {
1940
- return R.value ? [
1939
+ function Ae(x) {
1940
+ return N.value ? [
1941
1941
  {
1942
1942
  key: "read",
1943
- icon: g.is_read ? "eye-off" : "eye",
1944
- label: g.is_read ? f("panel.mark-unread") : f("panel.mark-read"),
1943
+ icon: x.is_read ? "eye-off" : "eye",
1944
+ label: x.is_read ? b("panel.mark-unread") : b("panel.mark-read"),
1945
1945
  run: () => {
1946
- Ke([g.id], g.is_read ? "unread" : "read");
1946
+ Ke([x.id], x.is_read ? "unread" : "read");
1947
1947
  }
1948
1948
  },
1949
1949
  {
1950
1950
  key: "delete",
1951
1951
  icon: "trash",
1952
- label: f("panel.delete"),
1952
+ label: b("panel.delete"),
1953
1953
  danger: !0,
1954
1954
  run: () => {
1955
- Ae([g.id]);
1955
+ el([x.id]);
1956
1956
  }
1957
1957
  }
1958
1958
  ] : [];
1959
1959
  }
1960
- async function je(g) {
1961
- typeof g == "number" && (w.value = !0, await Ke(
1962
- I.value.map((K) => K.id),
1960
+ async function je(x) {
1961
+ typeof x == "number" && (E.value = !0, await Ke(
1962
+ _.value.map((K) => K.id),
1963
1963
  "status",
1964
- g
1965
- ), w.value = !1);
1964
+ x
1965
+ ), E.value = !1);
1966
1966
  }
1967
- async function Ae(g) {
1967
+ async function el(x) {
1968
1968
  await ze({
1969
- title: g.length === 1 ? f("panel.delete-submission-title") : f("panel.delete-selected-title", { count: g.length }),
1970
- message: f("panel.delete-submission-text"),
1971
- confirmText: f("panel.delete"),
1972
- cancelText: f("panel.cancel"),
1969
+ title: x.length === 1 ? b("panel.delete-submission-title") : b("panel.delete-selected-title", { count: x.length }),
1970
+ message: b("panel.delete-submission-text"),
1971
+ confirmText: b("panel.delete"),
1972
+ cancelText: b("panel.cancel"),
1973
1973
  tone: "danger"
1974
- }) && await Ke(g, "delete");
1974
+ }) && await Ke(x, "delete");
1975
1975
  }
1976
- async function Ke(g, K, M) {
1977
- if (g.length !== 0)
1976
+ async function Ke(x, K, D) {
1977
+ if (x.length !== 0)
1978
1978
  try {
1979
- await m.massSubmissions({ ids: g, action: K, status_id: M }), I.value = [], await _e(), n("changed");
1979
+ await m.massSubmissions({ ids: x, action: K, status_id: D }), _.value = [], await _e(), n("changed");
1980
1980
  } catch (Te) {
1981
- P.danger(q(Te));
1981
+ P.danger(c(Te));
1982
1982
  }
1983
1983
  }
1984
- async function cl() {
1985
- const g = await L({ form: v.form });
1986
- g && (P.success(f("panel.created")), await _e(), n("changed"), U.push({ path: `${v.base}/submissions/${g.id}`, query: { ...l.query } }));
1987
- }
1988
- const pl = C(
1989
- () => m.exportUrl(v.form.id, {
1990
- view: $.value.view,
1991
- search: $.value.search,
1992
- assignee: $.value.assignee,
1993
- placement: $.value.placement,
1994
- sort: $.value.sort
1984
+ async function pl() {
1985
+ const x = await q({ form: f.form });
1986
+ x && (P.success(b("panel.created")), await _e(), n("changed"), U.push({ path: `${f.base}/submissions/${x.id}`, query: { ...l.query } }));
1987
+ }
1988
+ const ml = S(
1989
+ () => m.exportUrl(f.form.id, {
1990
+ view: v.value.view,
1991
+ search: v.value.search,
1992
+ assignee: v.value.assignee,
1993
+ placement: v.value.placement,
1994
+ sort: v.value.sort
1995
1995
  })
1996
- ), ml = C(() => [
1997
- { key: "export", label: f("panel.export"), icon: "download", href: pl.value }
1996
+ ), vl = S(() => [
1997
+ { key: "export", label: b("panel.export"), icon: "download", href: ml.value }
1998
1998
  ]);
1999
- return s({ create: cl }), (g, K) => (u(), j("div", {
1999
+ return s({ create: pl }), (x, K) => (u(), j("div", {
2000
2000
  ref_key: "root",
2001
2001
  ref: i,
2002
2002
  class: "wx-submissions"
@@ -2004,59 +2004,61 @@ const Gl = /* @__PURE__ */ ae({
2004
2004
  t(e(Qe), {
2005
2005
  class: "wx-submissions__head",
2006
2006
  level: 3,
2007
- title: ye(),
2007
+ title: Ge(),
2008
2008
  subtitle: r.form.slug,
2009
- actions: ml.value
2009
+ actions: vl.value
2010
2010
  }, null, 8, ["title", "subtitle", "actions"]),
2011
2011
  t(e(Xe), {
2012
- modelValue: A.value,
2013
- "onUpdate:modelValue": K[2] || (K[2] = (M) => A.value = M),
2012
+ modelValue: M.value,
2013
+ "onUpdate:modelValue": K[2] || (K[2] = (D) => M.value = D),
2014
2014
  class: "wx-submissions__views",
2015
- items: N.value,
2015
+ items: Q.value,
2016
2016
  "collapse-below": 560,
2017
- "aria-label": e(f)("panel.status")
2017
+ "aria-label": e(b)("panel.status")
2018
2018
  }, {
2019
2019
  default: a(() => [
2020
- t(e(rl), {
2021
- data: c.value,
2022
- columns: D.value,
2020
+ t(e(dl), {
2021
+ data: $.value,
2022
+ columns: k.value,
2023
2023
  "row-key": "id",
2024
2024
  searchable: "",
2025
2025
  clickable: "",
2026
2026
  hover: "",
2027
2027
  flush: "",
2028
- loading: b.value,
2029
- selectable: R.value,
2030
- "row-class": (M) => M.is_read ? void 0 : "is-unread",
2031
- "search-placeholder": e(f)("panel.search-submissions"),
2032
- "empty-text": k.value,
2033
- "cards-below": F.value,
2034
- "filters-count": ce.value.length,
2035
- onRowClick: Y,
2036
- onStateChange: Ge,
2037
- onSelectionChange: K[1] || (K[1] = (M, Te) => I.value = Te)
2028
+ loading: O.value,
2029
+ selectable: N.value,
2030
+ "select-row-label": e(W)("filters.select-row"),
2031
+ "select-all-label": e(W)("filters.select-all"),
2032
+ "row-class": (D) => D.is_read ? void 0 : "is-unread",
2033
+ "search-placeholder": e(b)("panel.search-submissions"),
2034
+ "empty-text": y.value,
2035
+ "cards-below": T.value,
2036
+ "filters-count": pe.value.length,
2037
+ onRowClick: R,
2038
+ onStateChange: g,
2039
+ onSelectionChange: K[1] || (K[1] = (D, Te) => _.value = Te)
2038
2040
  }, Ne({
2039
- "cell-status": a(({ row: M }) => [
2040
- G("div", vt, [
2041
- M.status ? (u(), _(e(Se), {
2041
+ "cell-status": a(({ row: D }) => [
2042
+ G("div", ft, [
2043
+ D.status ? (u(), w(e(Se), {
2042
2044
  key: 0,
2043
- type: M.status.color
2045
+ type: D.status.color
2044
2046
  }, {
2045
2047
  default: a(() => [
2046
- T(V(ne(M.status)), 1)
2048
+ z(V(re(D.status)), 1)
2047
2049
  ]),
2048
2050
  _: 2
2049
2051
  }, 1032, ["type"])) : H("", !0),
2050
- M.assignee ? (u(), _(e(tl), {
2052
+ D.assignee ? (u(), w(e(al), {
2051
2053
  key: 1,
2052
- name: M.assignee.name,
2053
- title: M.assignee.name,
2054
+ name: D.assignee.name,
2055
+ title: D.assignee.name,
2054
2056
  size: "xs",
2055
2057
  tone: "auto"
2056
2058
  }, null, 8, ["name", "title"])) : H("", !0),
2057
- M.files_count > 0 ? (u(), _(e(Sl), {
2059
+ D.files_count > 0 ? (u(), w(e(Cl), {
2058
2060
  key: 2,
2059
- content: e(f)("panel.attachments")
2061
+ content: e(b)("panel.attachments")
2060
2062
  }, {
2061
2063
  default: a(() => [
2062
2064
  t(e($e), {
@@ -2068,83 +2070,83 @@ const Gl = /* @__PURE__ */ ae({
2068
2070
  }, 8, ["content"])) : H("", !0)
2069
2071
  ])
2070
2072
  ]),
2071
- "cell-created_at": a(({ row: M }) => [
2073
+ "cell-created_at": a(({ row: D }) => [
2072
2074
  t(e(De), {
2073
- value: M.created_at,
2075
+ value: D.created_at,
2074
2076
  compact: ""
2075
2077
  }, null, 8, ["value"])
2076
2078
  ]),
2077
- "cell-card": a(({ row: M }) => [
2078
- t(e(Ul), {
2079
+ "cell-card": a(({ row: D }) => [
2080
+ t(e(Sl), {
2079
2081
  variant: "plain",
2080
2082
  shape: "circle",
2081
- title: Z(M, 0)
2083
+ title: I(D, 0)
2082
2084
  }, {
2083
2085
  subtitle: a(() => [
2084
- T(V(Z(M, 1)), 1)
2086
+ z(V(I(D, 1)), 1)
2085
2087
  ]),
2086
2088
  meta: a(() => [
2087
- M.status ? (u(), _(e(Se), {
2089
+ D.status ? (u(), w(e(Se), {
2088
2090
  key: 0,
2089
- type: M.status.color,
2091
+ type: D.status.color,
2090
2092
  size: "sm"
2091
2093
  }, {
2092
2094
  default: a(() => [
2093
- T(V(ne(M.status)), 1)
2095
+ z(V(re(D.status)), 1)
2094
2096
  ]),
2095
2097
  _: 2
2096
2098
  }, 1032, ["type"])) : H("", !0),
2097
- M.assignee ? (u(), _(e(tl), {
2099
+ D.assignee ? (u(), w(e(al), {
2098
2100
  key: 1,
2099
- name: M.assignee.name,
2100
- title: M.assignee.name,
2101
+ name: D.assignee.name,
2102
+ title: D.assignee.name,
2101
2103
  size: "xs",
2102
2104
  tone: "auto"
2103
2105
  }, null, 8, ["name", "title"])) : H("", !0),
2104
- M.files_count > 0 ? (u(), _(e($e), {
2106
+ D.files_count > 0 ? (u(), w(e($e), {
2105
2107
  key: 2,
2106
2108
  name: "file",
2107
2109
  size: "sm"
2108
2110
  })) : H("", !0),
2109
2111
  t(e(De), {
2110
- value: M.created_at
2112
+ value: D.created_at
2111
2113
  }, null, 8, ["value"])
2112
2114
  ]),
2113
2115
  _: 2
2114
2116
  }, 1032, ["title"])
2115
2117
  ]),
2116
- "card-actions": a(({ row: M }) => [
2118
+ "card-actions": a(({ row: D }) => [
2117
2119
  t(e(Fe), {
2118
- actions: E(M),
2119
- label: String(M.id)
2120
+ actions: Ae(D),
2121
+ label: String(D.id)
2120
2122
  }, null, 8, ["actions", "label"])
2121
2123
  ]),
2122
- "cell-actions": a(({ row: M }) => [
2124
+ "cell-actions": a(({ row: D }) => [
2123
2125
  t(e(Fe), {
2124
- actions: E(M),
2125
- label: String(M.id)
2126
+ actions: Ae(D),
2127
+ label: String(D.id)
2126
2128
  }, null, 8, ["actions", "label"])
2127
2129
  ]),
2128
2130
  _: 2
2129
2131
  }, [
2130
- I.value.length > 0 ? {
2132
+ _.value.length > 0 ? {
2131
2133
  name: "actions",
2132
2134
  fn: a(() => [
2133
- G("div", mt, [
2135
+ G("div", vt, [
2134
2136
  t(e(J), {
2135
2137
  size: "sm",
2136
2138
  weight: "medium"
2137
2139
  }, {
2138
2140
  default: a(() => [
2139
- T(V(e(f)("panel.selected", { count: I.value.length })), 1)
2141
+ z(V(e(b)("panel.selected", { count: _.value.length })), 1)
2140
2142
  ]),
2141
2143
  _: 1
2142
2144
  }),
2143
- t(e(me), {
2145
+ t(e(ve), {
2144
2146
  "model-value": null,
2145
- options: h.value,
2146
- placeholder: e(f)("panel.move-to"),
2147
- disabled: w.value,
2147
+ options: ue.value,
2148
+ placeholder: e(b)("panel.move-to"),
2149
+ disabled: E.value,
2148
2150
  size: "sm",
2149
2151
  style: { width: "180px" },
2150
2152
  "onUpdate:modelValue": je
@@ -2154,10 +2156,10 @@ const Gl = /* @__PURE__ */ ae({
2154
2156
  variant: "outline",
2155
2157
  type: "danger",
2156
2158
  icon: "trash",
2157
- onClick: K[0] || (K[0] = (M) => Ae(I.value.map((Te) => Te.id)))
2159
+ onClick: K[0] || (K[0] = (D) => el(_.value.map((Te) => Te.id)))
2158
2160
  }, {
2159
2161
  default: a(() => [
2160
- T(V(e(f)("panel.delete")), 1)
2162
+ z(V(e(b)("panel.delete")), 1)
2161
2163
  ]),
2162
2164
  _: 1
2163
2165
  })
@@ -2165,20 +2167,20 @@ const Gl = /* @__PURE__ */ ae({
2165
2167
  ]),
2166
2168
  key: "0"
2167
2169
  } : void 0,
2168
- Q.value ? {
2170
+ ye.value ? {
2169
2171
  name: "filters",
2170
2172
  fn: a(() => [
2171
2173
  t(e(B), {
2172
- label: e(f)("panel.meta-placement")
2174
+ label: e(b)("panel.meta-placement")
2173
2175
  }, {
2174
2176
  default: a(() => [
2175
- t(e(me), {
2176
- "model-value": $.value.placement,
2177
- options: x.value,
2178
- placeholder: e(f)("panel.any-placement"),
2177
+ t(e(ve), {
2178
+ "model-value": v.value.placement,
2179
+ options: Y.value,
2180
+ placeholder: e(b)("panel.any-placement"),
2179
2181
  clearable: "",
2180
2182
  size: "sm",
2181
- "onUpdate:modelValue": be
2183
+ "onUpdate:modelValue": A
2182
2184
  }, null, 8, ["model-value", "options", "placeholder"])
2183
2185
  ]),
2184
2186
  _: 1
@@ -2186,209 +2188,209 @@ const Gl = /* @__PURE__ */ ae({
2186
2188
  ]),
2187
2189
  key: "1"
2188
2190
  } : void 0,
2189
- ce.value.length > 0 ? {
2191
+ pe.value.length > 0 ? {
2190
2192
  name: "applied",
2191
2193
  fn: a(() => [
2192
- t(e(hl), { filters: ce.value }, null, 8, ["filters"])
2194
+ t(e(yl), { filters: pe.value }, null, 8, ["filters"])
2193
2195
  ]),
2194
2196
  key: "2"
2195
2197
  } : void 0
2196
- ]), 1032, ["data", "columns", "loading", "selectable", "row-class", "search-placeholder", "empty-text", "cards-below", "filters-count"])
2198
+ ]), 1032, ["data", "columns", "loading", "selectable", "select-row-label", "select-all-label", "row-class", "search-placeholder", "empty-text", "cards-below", "filters-count"])
2197
2199
  ]),
2198
2200
  _: 1
2199
2201
  }, 8, ["modelValue", "items", "aria-label"])
2200
2202
  ], 512));
2201
2203
  }
2202
- }), ht = /* @__PURE__ */ ue(bt, [["__scopeId", "data-v-09b4e93b"]]), yt = ["onClick"], gt = { class: "wx-inbox-form__name" }, xt = /* @__PURE__ */ ae({
2204
+ }), yt = /* @__PURE__ */ ie(ht, [["__scopeId", "data-v-6bb4ef13"]]), gt = ["onClick"], xt = { class: "wx-inbox-form__name" }, _t = /* @__PURE__ */ ae({
2203
2205
  __name: "InboxPage",
2204
2206
  props: {
2205
2207
  base: { default: "/inbox" }
2206
2208
  },
2207
2209
  setup(r) {
2208
- const s = r, o = ie(), v = re(o), n = Oe(), d = Pe(), m = xe();
2209
- de();
2210
- const l = te("webx-inbox"), U = fe(), p = W([]), i = W(!0), O = ol("pane"), z = W(!0), F = W(!1), f = C(() => o.can("inbox.manage")), q = Be(rt), c = C(
2211
- () => o.state.manifest?.modules.find((N) => N.id === "inbox")?.title ?? l("module.title")
2212
- ), S = C(() => {
2213
- const N = n.query.form;
2214
- return typeof N == "string" && N !== "" ? Number(N) : null;
2215
- }), b = C(() => p.value.find((N) => N.id === S.value) ?? null);
2216
- function I(N) {
2217
- return ve(N.title, m.active.value, N.slug);
2218
- }
2219
- async function w() {
2210
+ const s = r, o = oe(), f = de(o), n = Oe(), d = Pe(), m = xe();
2211
+ ce();
2212
+ const l = te("webx-inbox"), U = be(), p = F([]), i = F(!0), L = il("pane"), C = F(!0), T = F(!1), b = S(() => o.can("inbox.manage")), W = Be(dt), c = S(
2213
+ () => o.state.manifest?.modules.find((A) => A.id === "inbox")?.title ?? l("module.title")
2214
+ ), $ = S(() => {
2215
+ const A = n.query.form;
2216
+ return typeof A == "string" && A !== "" ? Number(A) : null;
2217
+ }), h = S(() => p.value.find((A) => A.id === $.value) ?? null);
2218
+ function O(A) {
2219
+ return fe(A.title, m.active.value, A.slug);
2220
+ }
2221
+ async function _() {
2220
2222
  i.value = !0;
2221
2223
  try {
2222
- p.value = await v.forms();
2223
- } catch (N) {
2224
- P.danger(U(N));
2224
+ p.value = await f.forms();
2225
+ } catch (A) {
2226
+ P.danger(U(A));
2225
2227
  } finally {
2226
2228
  i.value = !1;
2227
2229
  }
2228
2230
  }
2229
- w(), Ce([p, b], () => {
2230
- p.value.length === 0 || b.value !== null || d.replace({ query: { ...n.query, form: String(p.value[0].id) } });
2231
+ _(), Ce([p, h], () => {
2232
+ p.value.length === 0 || h.value !== null || d.replace({ query: { ...n.query, form: String(p.value[0].id) } });
2231
2233
  });
2232
- function R(N, Z) {
2233
- d.replace({ query: { ...n.query, form: String(N.id) } }), Z();
2234
+ function E(A, Q) {
2235
+ d.replace({ query: { ...n.query, form: String(A.id) } }), Q();
2234
2236
  }
2235
- function L(N) {
2236
- d.push(`${s.base}/forms/${N.id}`);
2237
+ function N(A) {
2238
+ d.push(`${s.base}/forms/${A.id}`);
2237
2239
  }
2238
- function A(N) {
2239
- return f.value ? [
2240
- { key: "settings", icon: "settings", label: l("panel.settings"), run: () => L(N) },
2241
- { key: "duplicate", icon: "copy", label: l("panel.duplicate"), run: () => x(N) },
2240
+ function q(A) {
2241
+ return b.value ? [
2242
+ { key: "settings", icon: "settings", label: l("panel.settings"), run: () => N(A) },
2243
+ { key: "duplicate", icon: "copy", label: l("panel.duplicate"), run: () => v(A) },
2242
2244
  // A form that has taken submissions is switched off, never deleted (§2.4). The line is
2243
2245
  // left out rather than greyed: a menu is a list of what is possible.
2244
- ...N.submissions_count === 0 ? [
2246
+ ...A.submissions_count === 0 ? [
2245
2247
  {
2246
2248
  key: "delete",
2247
2249
  icon: "trash",
2248
2250
  label: l("panel.delete"),
2249
2251
  danger: !0,
2250
- run: () => Q(N)
2252
+ run: () => Y(A)
2251
2253
  }
2252
2254
  ] : []
2253
2255
  ] : [];
2254
2256
  }
2255
- async function $() {
2256
- const N = await q({});
2257
- N && (await w(), L(N));
2257
+ async function M() {
2258
+ const A = await W({});
2259
+ A && (await _(), N(A));
2258
2260
  }
2259
- async function x(N) {
2261
+ async function v(A) {
2260
2262
  try {
2261
- const Z = await v.duplicateForm(N.id);
2262
- P.success(l("panel.duplicated")), await w(), L(Z);
2263
- } catch (Z) {
2264
- P.danger(U(Z));
2263
+ const Q = await f.duplicateForm(A.id);
2264
+ P.success(l("panel.duplicated")), await _(), N(Q);
2265
+ } catch (Q) {
2266
+ P.danger(U(Q));
2265
2267
  }
2266
2268
  }
2267
- async function Q(N) {
2269
+ async function Y(A) {
2268
2270
  if (await ze({
2269
- title: l("panel.delete-form-title", { form: I(N) }),
2271
+ title: l("panel.delete-form-title", { form: O(A) }),
2270
2272
  message: l("panel.delete-form-text"),
2271
2273
  confirmText: l("panel.delete"),
2272
2274
  cancelText: l("panel.cancel"),
2273
2275
  tone: "danger"
2274
2276
  }))
2275
2277
  try {
2276
- if (await v.removeForm(N.id), P.success(l("panel.deleted")), S.value === N.id) {
2277
- const D = { ...n.query };
2278
- delete D.form, d.replace({ query: D });
2278
+ if (await f.removeForm(A.id), P.success(l("panel.deleted")), $.value === A.id) {
2279
+ const I = { ...n.query };
2280
+ delete I.form, d.replace({ query: I });
2279
2281
  }
2280
- await w();
2281
- } catch (D) {
2282
- P.danger(U(D));
2282
+ await _();
2283
+ } catch (I) {
2284
+ P.danger(U(I));
2283
2285
  }
2284
2286
  }
2285
- async function ce() {
2287
+ async function ye() {
2286
2288
  try {
2287
- await v.sortForms(p.value.map((N) => N.id));
2288
- } catch (N) {
2289
- P.danger(U(N, l("panel.reorder-failed"))), await w();
2289
+ await f.sortForms(p.value.map((A) => A.id));
2290
+ } catch (A) {
2291
+ P.danger(U(A, l("panel.reorder-failed"))), await _();
2290
2292
  }
2291
2293
  }
2292
- const be = C(() => {
2293
- const N = [];
2294
- return f.value && N.push({
2294
+ const pe = S(() => {
2295
+ const A = [];
2296
+ return b.value && A.push({
2295
2297
  key: "statuses",
2296
2298
  label: l("panel.statuses"),
2297
2299
  icon: "tag",
2298
2300
  run: () => {
2299
2301
  d.push(`${s.base}/statuses`);
2300
2302
  }
2301
- }), o.can("inbox.update") && b.value !== null && N.push({
2303
+ }), o.can("inbox.update") && h.value !== null && A.push({
2302
2304
  key: "new-submission",
2303
2305
  label: l("panel.new-submission"),
2304
2306
  icon: "plus",
2305
2307
  primary: !0,
2306
2308
  run: () => {
2307
- O.value?.create();
2309
+ L.value?.create();
2308
2310
  }
2309
- }), N;
2311
+ }), A;
2310
2312
  });
2311
- return (N, Z) => (u(), _(e(il), {
2313
+ return (A, Q) => (u(), w(e(ul), {
2312
2314
  title: c.value,
2313
- actions: be.value,
2315
+ actions: pe.value,
2314
2316
  card: !1
2315
2317
  }, Ne({
2316
2318
  default: a(() => [
2317
- t(e(oe), {
2319
+ t(e(se), {
2318
2320
  class: "wx-inbox",
2319
2321
  padding: "none"
2320
2322
  }, {
2321
2323
  default: a(() => [
2322
- t(e(Cl), {
2323
- "filters-open": F.value,
2324
- "onUpdate:filtersOpen": Z[2] || (Z[2] = (D) => F.value = D),
2324
+ t(e(zl), {
2325
+ "filters-open": T.value,
2326
+ "onUpdate:filtersOpen": Q[2] || (Q[2] = (I) => T.value = I),
2325
2327
  class: "wx-inbox__panes",
2326
2328
  "filters-width": 270,
2327
2329
  "detail-min": 420,
2328
2330
  "filters-title": e(l)("panel.forms"),
2329
- onFiltersInline: Z[3] || (Z[3] = (D) => z.value = D)
2331
+ onFiltersInline: Q[3] || (Q[3] = (I) => C.value = I)
2330
2332
  }, {
2331
- filters: a(({ inline: D, close: k }) => [
2332
- i.value ? (u(), _(e(We), {
2333
+ filters: a(({ inline: I, close: k }) => [
2334
+ i.value ? (u(), w(e(We), {
2333
2335
  key: 0,
2334
2336
  class: "wx-inbox__loading",
2335
2337
  rows: 5
2336
2338
  })) : (u(), j(ee, { key: 1 }, [
2337
- !D && f.value ? (u(), _(e(le), {
2339
+ !I && b.value ? (u(), w(e(le), {
2338
2340
  key: 0,
2339
2341
  class: "wx-inbox__new-form",
2340
2342
  variant: "outline",
2341
2343
  block: "",
2342
- onClick: $
2344
+ onClick: M
2343
2345
  }, {
2344
2346
  icon: a(() => [
2345
2347
  t(e($e), { name: "plus" })
2346
2348
  ]),
2347
2349
  default: a(() => [
2348
- T(" " + V(e(l)("panel.new-form")), 1)
2350
+ z(" " + V(e(l)("panel.new-form")), 1)
2349
2351
  ]),
2350
2352
  _: 1
2351
2353
  })) : H("", !0),
2352
2354
  t(e(Je), {
2353
2355
  modelValue: p.value,
2354
- "onUpdate:modelValue": Z[1] || (Z[1] = (h) => p.value = h),
2355
- class: el(["wx-inbox__forms", { "is-panel": !D }]),
2356
+ "onUpdate:modelValue": Q[1] || (Q[1] = (y) => p.value = y),
2357
+ class: ll(["wx-inbox__forms", { "is-panel": !I }]),
2356
2358
  plain: "",
2357
2359
  size: "sm",
2358
2360
  "item-key": "id",
2359
- "item-label": I,
2360
- disabled: !f.value,
2361
- title: D ? e(l)("panel.forms") : void 0,
2362
- onMove: ce
2361
+ "item-label": O,
2362
+ disabled: !b.value,
2363
+ title: I ? e(l)("panel.forms") : void 0,
2364
+ onMove: ye
2363
2365
  }, Ne({
2364
- default: a(({ item: h }) => [
2366
+ default: a(({ item: y }) => [
2365
2367
  G("button", {
2366
2368
  type: "button",
2367
- class: el(["wx-inbox-form", { "is-current": h.id === S.value, "is-off": !h.is_enabled }]),
2368
- onClick: (ne) => R(h, k)
2369
+ class: ll(["wx-inbox-form", { "is-current": y.id === $.value, "is-off": !y.is_enabled }]),
2370
+ onClick: (ue) => E(y, k)
2369
2371
  }, [
2370
- G("span", gt, [
2372
+ G("span", xt, [
2371
2373
  t(e(J), {
2372
2374
  truncate: "",
2373
2375
  weight: "medium",
2374
- tone: h.is_enabled ? "default" : "muted"
2376
+ tone: y.is_enabled ? "default" : "muted"
2375
2377
  }, {
2376
2378
  default: a(() => [
2377
- T(V(I(h)), 1)
2379
+ z(V(O(y)), 1)
2378
2380
  ]),
2379
2381
  _: 2
2380
2382
  }, 1032, ["tone"]),
2381
- h.unread_count ? (u(), _(e(al), {
2383
+ y.unread_count ? (u(), w(e(nl), {
2382
2384
  key: 0,
2383
2385
  class: "wx-inbox-form__count",
2384
2386
  type: "primary",
2385
- value: h.unread_count,
2387
+ value: y.unread_count,
2386
2388
  label: e(l)("panel.unread")
2387
- }, null, 8, ["value", "label"])) : h.submissions_count ? (u(), _(e(al), {
2389
+ }, null, 8, ["value", "label"])) : y.submissions_count ? (u(), w(e(nl), {
2388
2390
  key: 1,
2389
2391
  class: "wx-inbox-form__count",
2390
2392
  type: "neutral",
2391
- value: h.submissions_count,
2393
+ value: y.submissions_count,
2392
2394
  label: e(l)("panel.submissions")
2393
2395
  }, null, 8, ["value", "label"])) : H("", !0)
2394
2396
  ]),
@@ -2398,28 +2400,28 @@ const Gl = /* @__PURE__ */ ae({
2398
2400
  truncate: ""
2399
2401
  }, {
2400
2402
  default: a(() => [
2401
- T(V(h.slug), 1)
2403
+ z(V(y.slug), 1)
2402
2404
  ]),
2403
2405
  _: 2
2404
2406
  }, 1024)
2405
- ], 10, yt)
2407
+ ], 10, gt)
2406
2408
  ]),
2407
- actions: a(({ item: h }) => [
2409
+ actions: a(({ item: y }) => [
2408
2410
  t(e(Fe), {
2409
- actions: A(h),
2410
- label: I(h)
2411
+ actions: q(y),
2412
+ label: O(y)
2411
2413
  }, null, 8, ["actions", "label"])
2412
2414
  ]),
2413
2415
  _: 2
2414
2416
  }, [
2415
- D && f.value ? {
2417
+ I && b.value ? {
2416
2418
  name: "extra",
2417
2419
  fn: a(() => [
2418
2420
  t(e(Ve), {
2419
2421
  icon: "plus",
2420
2422
  size: "sm",
2421
2423
  title: e(l)("panel.new-form"),
2422
- onClick: $
2424
+ onClick: M
2423
2425
  }, null, 8, ["title"])
2424
2426
  ]),
2425
2427
  key: "0"
@@ -2428,18 +2430,18 @@ const Gl = /* @__PURE__ */ ae({
2428
2430
  ], 64))
2429
2431
  ]),
2430
2432
  list: a(() => [
2431
- i.value ? (u(), _(e(We), {
2433
+ i.value ? (u(), w(e(We), {
2432
2434
  key: 0,
2433
2435
  class: "wx-inbox__loading",
2434
2436
  rows: 6
2435
- })) : b.value ? (u(), _(ht, {
2437
+ })) : h.value ? (u(), w(yt, {
2436
2438
  ref_key: "pane",
2437
- ref: O,
2438
- key: b.value.id,
2439
- form: b.value,
2439
+ ref: L,
2440
+ key: h.value.id,
2441
+ form: h.value,
2440
2442
  base: s.base,
2441
- onChanged: w
2442
- }, null, 8, ["form", "base"])) : (u(), _(e(He), {
2443
+ onChanged: _
2444
+ }, null, 8, ["form", "base"])) : (u(), w(e(He), {
2443
2445
  key: 2,
2444
2446
  title: e(l)("panel.no-forms"),
2445
2447
  description: e(l)("panel.no-forms-help")
@@ -2453,18 +2455,18 @@ const Gl = /* @__PURE__ */ ae({
2453
2455
  ]),
2454
2456
  _: 2
2455
2457
  }, [
2456
- z.value ? void 0 : {
2458
+ C.value ? void 0 : {
2457
2459
  name: "actions",
2458
2460
  fn: a(() => [
2459
2461
  t(e(le), {
2460
2462
  variant: "outline",
2461
- onClick: Z[0] || (Z[0] = (D) => F.value = !0)
2463
+ onClick: Q[0] || (Q[0] = (I) => T.value = !0)
2462
2464
  }, {
2463
2465
  icon: a(() => [
2464
2466
  t(e($e), { name: "list" })
2465
2467
  ]),
2466
2468
  default: a(() => [
2467
- T(" " + V(e(l)("panel.forms")), 1)
2469
+ z(" " + V(e(l)("panel.forms")), 1)
2468
2470
  ]),
2469
2471
  _: 1
2470
2472
  })
@@ -2473,52 +2475,52 @@ const Gl = /* @__PURE__ */ ae({
2473
2475
  }
2474
2476
  ]), 1032, ["title", "actions"]));
2475
2477
  }
2476
- }), _t = { class: "wx-inbox-status-form" }, wt = { class: "wx-inbox-status-form__checks" }, kt = /* @__PURE__ */ ae({
2478
+ }), wt = { class: "wx-inbox-status-form" }, kt = { class: "wx-inbox-status-form__checks" }, Vt = /* @__PURE__ */ ae({
2477
2479
  __name: "StatusDialog",
2478
2480
  props: {
2479
2481
  status: {}
2480
2482
  },
2481
2483
  setup(r) {
2482
- const s = r, { resolve: o, dismiss: v, open: n } = Ee(), d = ie(), m = re(d);
2483
- de();
2484
- const l = te("webx-inbox"), U = fe(), p = W(""), i = W({}), O = W("default"), z = W(!1), F = W(!1), f = W(!1), q = W(!1), c = W({});
2484
+ const s = r, { resolve: o, dismiss: f, open: n } = Ee(), d = oe(), m = de(d);
2485
+ ce();
2486
+ const l = te("webx-inbox"), U = be(), p = F(""), i = F({}), L = F("default"), C = F(!1), T = F(!1), b = F(!1), W = F(!1), c = F({});
2485
2487
  Ce(
2486
2488
  () => s.status,
2487
- (w) => {
2488
- p.value = w?.key ?? "", i.value = { ...w?.title ?? {} }, O.value = w?.color ?? "default", z.value = w?.is_default ?? !1, F.value = w?.is_spam ?? !1, f.value = w?.is_closed ?? !1, c.value = {};
2489
+ (_) => {
2490
+ p.value = _?.key ?? "", i.value = { ..._?.title ?? {} }, L.value = _?.color ?? "default", C.value = _?.is_default ?? !1, T.value = _?.is_spam ?? !1, b.value = _?.is_closed ?? !1, c.value = {};
2489
2491
  },
2490
2492
  { immediate: !0 }
2491
2493
  );
2492
- const S = C(
2493
- () => Al.map((w) => ({ value: w, label: l(`panel.color-${w}`) }))
2494
+ const $ = S(
2495
+ () => Il.map((_) => ({ value: _, label: l(`panel.color-${_}`) }))
2494
2496
  );
2495
- function b(w) {
2496
- return c.value[w]?.[0];
2497
+ function h(_) {
2498
+ return c.value[_]?.[0];
2497
2499
  }
2498
- async function I() {
2499
- q.value = !0, c.value = {};
2500
- const w = {
2500
+ async function O() {
2501
+ W.value = !0, c.value = {};
2502
+ const _ = {
2501
2503
  key: p.value.trim(),
2502
2504
  title: i.value,
2503
- color: O.value,
2504
- is_default: z.value,
2505
- is_spam: F.value,
2506
- is_closed: f.value
2505
+ color: L.value,
2506
+ is_default: C.value,
2507
+ is_spam: T.value,
2508
+ is_closed: b.value
2507
2509
  };
2508
2510
  try {
2509
2511
  o(
2510
- s.status === null ? await m.createStatus(w) : await m.saveStatus(s.status.id, w)
2512
+ s.status === null ? await m.createStatus(_) : await m.saveStatus(s.status.id, _)
2511
2513
  );
2512
- } catch (R) {
2513
- const L = R.body;
2514
- L?.errors ? (c.value = L.errors, P.danger(l("panel.failed"))) : P.danger(U(R));
2514
+ } catch (E) {
2515
+ const N = E.body;
2516
+ N?.errors ? (c.value = N.errors, P.danger(l("panel.failed"))) : P.danger(U(E));
2515
2517
  } finally {
2516
- q.value = !1;
2518
+ W.value = !1;
2517
2519
  }
2518
2520
  }
2519
- return (w, R) => (u(), _(e(Re), {
2521
+ return (_, E) => (u(), w(e(Re), {
2520
2522
  open: e(n),
2521
- "onUpdate:open": R[7] || (R[7] = (L) => se(n) ? n.value = L : null),
2523
+ "onUpdate:open": E[7] || (E[7] = (N) => ne(n) ? n.value = N : null),
2522
2524
  title: r.status ? e(l)("panel.settings") : e(l)("panel.new-status"),
2523
2525
  width: 520
2524
2526
  }, {
@@ -2527,20 +2529,20 @@ const Gl = /* @__PURE__ */ ae({
2527
2529
  default: a(() => [
2528
2530
  t(e(le), {
2529
2531
  variant: "outline",
2530
- onClick: R[6] || (R[6] = (L) => e(v)())
2532
+ onClick: E[6] || (E[6] = (N) => e(f)())
2531
2533
  }, {
2532
2534
  default: a(() => [
2533
- T(V(e(l)("panel.cancel")), 1)
2535
+ z(V(e(l)("panel.cancel")), 1)
2534
2536
  ]),
2535
2537
  _: 1
2536
2538
  }),
2537
2539
  t(e(le), {
2538
2540
  type: "primary",
2539
- loading: q.value,
2540
- onClick: I
2541
+ loading: W.value,
2542
+ onClick: O
2541
2543
  }, {
2542
2544
  default: a(() => [
2543
- T(V(e(l)("panel.save")), 1)
2545
+ z(V(e(l)("panel.save")), 1)
2544
2546
  ]),
2545
2547
  _: 1
2546
2548
  }, 8, ["loading"])
@@ -2549,16 +2551,16 @@ const Gl = /* @__PURE__ */ ae({
2549
2551
  })
2550
2552
  ]),
2551
2553
  default: a(() => [
2552
- G("div", _t, [
2554
+ G("div", wt, [
2553
2555
  t(e(B), {
2554
2556
  label: e(l)("panel.title"),
2555
- error: b("title"),
2557
+ error: h("title"),
2556
2558
  required: ""
2557
2559
  }, {
2558
2560
  default: a(() => [
2559
2561
  t(e(X), {
2560
2562
  modelValue: i.value,
2561
- "onUpdate:modelValue": R[0] || (R[0] = (L) => i.value = L),
2563
+ "onUpdate:modelValue": E[0] || (E[0] = (N) => i.value = N),
2562
2564
  localized: ""
2563
2565
  }, null, 8, ["modelValue"])
2564
2566
  ]),
@@ -2566,13 +2568,13 @@ const Gl = /* @__PURE__ */ ae({
2566
2568
  }, 8, ["label", "error"]),
2567
2569
  t(e(B), {
2568
2570
  label: e(l)("panel.status-key"),
2569
- error: b("key"),
2571
+ error: h("key"),
2570
2572
  required: ""
2571
2573
  }, {
2572
2574
  default: a(() => [
2573
2575
  t(e(X), {
2574
2576
  modelValue: p.value,
2575
- "onUpdate:modelValue": R[1] || (R[1] = (L) => p.value = L),
2577
+ "onUpdate:modelValue": E[1] || (E[1] = (N) => p.value = N),
2576
2578
  placeholder: "in-progress"
2577
2579
  }, null, 8, ["modelValue"])
2578
2580
  ]),
@@ -2580,32 +2582,32 @@ const Gl = /* @__PURE__ */ ae({
2580
2582
  }, 8, ["label", "error"]),
2581
2583
  t(e(B), {
2582
2584
  label: e(l)("panel.status-color"),
2583
- error: b("color")
2585
+ error: h("color")
2584
2586
  }, {
2585
2587
  default: a(() => [
2586
- t(e(me), {
2587
- modelValue: O.value,
2588
- "onUpdate:modelValue": R[2] || (R[2] = (L) => O.value = L),
2589
- options: S.value
2588
+ t(e(ve), {
2589
+ modelValue: L.value,
2590
+ "onUpdate:modelValue": E[2] || (E[2] = (N) => L.value = N),
2591
+ options: $.value
2590
2592
  }, null, 8, ["modelValue", "options"])
2591
2593
  ]),
2592
2594
  _: 1
2593
2595
  }, 8, ["label", "error"]),
2594
- G("div", wt, [
2596
+ G("div", kt, [
2595
2597
  t(e(he), {
2596
- modelValue: z.value,
2597
- "onUpdate:modelValue": R[3] || (R[3] = (L) => z.value = L),
2598
+ modelValue: C.value,
2599
+ "onUpdate:modelValue": E[3] || (E[3] = (N) => C.value = N),
2598
2600
  label: e(l)("panel.status-default")
2599
2601
  }, null, 8, ["modelValue", "label"]),
2600
2602
  t(e(he), {
2601
- modelValue: F.value,
2602
- "onUpdate:modelValue": R[4] || (R[4] = (L) => F.value = L),
2603
+ modelValue: T.value,
2604
+ "onUpdate:modelValue": E[4] || (E[4] = (N) => T.value = N),
2603
2605
  label: e(l)("panel.status-spam")
2604
2606
  }, null, 8, ["modelValue", "label"]),
2605
2607
  t(e(he), {
2606
- modelValue: f.value,
2607
- "onUpdate:modelValue": R[5] || (R[5] = (L) => f.value = L),
2608
- disabled: F.value,
2608
+ modelValue: b.value,
2609
+ "onUpdate:modelValue": E[5] || (E[5] = (N) => b.value = N),
2610
+ disabled: T.value,
2609
2611
  label: e(l)("panel.status-closed")
2610
2612
  }, null, 8, ["modelValue", "disabled", "label"])
2611
2613
  ])
@@ -2614,67 +2616,67 @@ const Gl = /* @__PURE__ */ ae({
2614
2616
  _: 1
2615
2617
  }, 8, ["open", "title"]));
2616
2618
  }
2617
- }), Vt = /* @__PURE__ */ ue(kt, [["__scopeId", "data-v-b520b53b"]]), $t = { class: "wx-inbox-statuses" }, Ut = { class: "wx-inbox-status" }, St = /* @__PURE__ */ ae({
2619
+ }), $t = /* @__PURE__ */ ie(Vt, [["__scopeId", "data-v-b520b53b"]]), Ut = { class: "wx-inbox-statuses" }, St = { class: "wx-inbox-status" }, Ct = /* @__PURE__ */ ae({
2618
2620
  __name: "StatusesPage",
2619
2621
  props: {
2620
2622
  base: { default: "/inbox" }
2621
2623
  },
2622
2624
  setup(r) {
2623
- const s = r, o = ie(), v = re(o), n = xe();
2624
- de();
2625
- const d = te("webx-inbox"), m = fe(), l = W([]), U = W(!0), p = o.can("inbox.manage"), i = Be(Vt);
2626
- function O(b) {
2627
- return ve(b.title, n.active.value, b.key);
2625
+ const s = r, o = oe(), f = de(o), n = xe();
2626
+ ce();
2627
+ const d = te("webx-inbox"), m = be(), l = F([]), U = F(!0), p = o.can("inbox.manage"), i = Be($t);
2628
+ function L(h) {
2629
+ return fe(h.title, n.active.value, h.key);
2628
2630
  }
2629
- async function z() {
2631
+ async function C() {
2630
2632
  U.value = !0;
2631
2633
  try {
2632
- l.value = await v.statuses();
2633
- } catch (b) {
2634
- P.danger(m(b));
2634
+ l.value = await f.statuses();
2635
+ } catch (h) {
2636
+ P.danger(m(h));
2635
2637
  } finally {
2636
2638
  U.value = !1;
2637
2639
  }
2638
2640
  }
2639
- z();
2640
- async function F(b) {
2641
- await i({ status: b }) && await z();
2641
+ C();
2642
+ async function T(h) {
2643
+ await i({ status: h }) && await C();
2642
2644
  }
2643
- async function f(b) {
2645
+ async function b(h) {
2644
2646
  if (await ze({
2645
- title: d("panel.delete-status-title", { status: O(b) }),
2647
+ title: d("panel.delete-status-title", { status: L(h) }),
2646
2648
  message: d("panel.delete-status-text"),
2647
2649
  confirmText: d("panel.delete"),
2648
2650
  cancelText: d("panel.cancel"),
2649
2651
  tone: "danger"
2650
2652
  }))
2651
2653
  try {
2652
- await v.removeStatus(b.id), P.success(d("panel.deleted")), await z();
2653
- } catch (w) {
2654
- P.danger(m(w));
2654
+ await f.removeStatus(h.id), P.success(d("panel.deleted")), await C();
2655
+ } catch (_) {
2656
+ P.danger(m(_));
2655
2657
  }
2656
2658
  }
2657
- function q(b) {
2659
+ function W(h) {
2658
2660
  return p ? [
2659
2661
  { key: "edit", icon: "edit", label: d("panel.settings"), run: () => {
2660
- F(b);
2662
+ T(h);
2661
2663
  } },
2662
2664
  // A status with submissions in them cannot go: they would have nothing to be in. The
2663
2665
  // line is left out rather than greyed, the way every list of the panel does it.
2664
- ...b.submissions_count === 0 ? [
2666
+ ...h.submissions_count === 0 ? [
2665
2667
  {
2666
2668
  key: "delete",
2667
2669
  icon: "trash",
2668
2670
  label: d("panel.delete"),
2669
2671
  danger: !0,
2670
2672
  run: () => {
2671
- f(b);
2673
+ b(h);
2672
2674
  }
2673
2675
  }
2674
2676
  ] : []
2675
2677
  ] : [];
2676
2678
  }
2677
- const c = C(
2679
+ const c = S(
2678
2680
  () => p ? [
2679
2681
  {
2680
2682
  key: "new",
@@ -2682,47 +2684,47 @@ const Gl = /* @__PURE__ */ ae({
2682
2684
  icon: "plus",
2683
2685
  primary: !0,
2684
2686
  run: () => {
2685
- F(null);
2687
+ T(null);
2686
2688
  }
2687
2689
  }
2688
2690
  ] : []
2689
2691
  );
2690
- async function S() {
2692
+ async function $() {
2691
2693
  try {
2692
- await v.sortStatuses(l.value.map((b) => b.id));
2693
- } catch (b) {
2694
- P.danger(m(b, d("panel.reorder-failed"))), await z();
2694
+ await f.sortStatuses(l.value.map((h) => h.id));
2695
+ } catch (h) {
2696
+ P.danger(m(h, d("panel.reorder-failed"))), await C();
2695
2697
  }
2696
2698
  }
2697
- return (b, I) => (u(), j("div", $t, [
2698
- t(e(il), {
2699
+ return (h, O) => (u(), j("div", Ut, [
2700
+ t(e(ul), {
2699
2701
  title: e(d)("panel.statuses"),
2700
2702
  back: s.base,
2701
2703
  "back-label": e(d)("panel.forms"),
2702
2704
  actions: c.value
2703
2705
  }, {
2704
2706
  default: a(() => [
2705
- !U.value && l.value.length === 0 ? (u(), _(e(He), {
2707
+ !U.value && l.value.length === 0 ? (u(), w(e(He), {
2706
2708
  key: 0,
2707
2709
  title: e(d)("panel.no-statuses")
2708
- }, null, 8, ["title"])) : (u(), _(e(Je), {
2710
+ }, null, 8, ["title"])) : (u(), w(e(Je), {
2709
2711
  key: 1,
2710
2712
  modelValue: l.value,
2711
- "onUpdate:modelValue": I[0] || (I[0] = (w) => l.value = w),
2713
+ "onUpdate:modelValue": O[0] || (O[0] = (_) => l.value = _),
2712
2714
  plain: "",
2713
2715
  "item-key": "id",
2714
- "item-label": O,
2716
+ "item-label": L,
2715
2717
  disabled: !e(p),
2716
2718
  "aria-label": e(d)("panel.statuses"),
2717
- onMove: S
2719
+ onMove: $
2718
2720
  }, {
2719
- default: a(({ item: w }) => [
2720
- G("div", Ut, [
2721
+ default: a(({ item: _ }) => [
2722
+ G("div", St, [
2721
2723
  t(e(Se), {
2722
- type: w.color
2724
+ type: _.color
2723
2725
  }, {
2724
2726
  default: a(() => [
2725
- T(V(O(w)), 1)
2727
+ z(V(L(_)), 1)
2726
2728
  ]),
2727
2729
  _: 2
2728
2730
  }, 1032, ["type"]),
@@ -2732,27 +2734,27 @@ const Gl = /* @__PURE__ */ ae({
2732
2734
  truncate: ""
2733
2735
  }, {
2734
2736
  default: a(() => [
2735
- G("code", null, V(w.key), 1),
2736
- w.is_default ? (u(), j(ee, { key: 0 }, [
2737
- T(" · " + V(e(d)("panel.status-default")), 1)
2737
+ G("code", null, V(_.key), 1),
2738
+ _.is_default ? (u(), j(ee, { key: 0 }, [
2739
+ z(" · " + V(e(d)("panel.status-default")), 1)
2738
2740
  ], 64)) : H("", !0),
2739
- w.is_spam ? (u(), j(ee, { key: 1 }, [
2740
- T(" · " + V(e(d)("panel.status-spam")), 1)
2741
- ], 64)) : w.is_closed ? (u(), j(ee, { key: 2 }, [
2742
- T(" · " + V(e(d)("panel.status-closed")), 1)
2741
+ _.is_spam ? (u(), j(ee, { key: 1 }, [
2742
+ z(" · " + V(e(d)("panel.status-spam")), 1)
2743
+ ], 64)) : _.is_closed ? (u(), j(ee, { key: 2 }, [
2744
+ z(" · " + V(e(d)("panel.status-closed")), 1)
2743
2745
  ], 64)) : H("", !0),
2744
- w.submissions_count ? (u(), j(ee, { key: 3 }, [
2745
- T(" · " + V(e(d)("panel.in-use")) + " (" + V(w.submissions_count) + ") ", 1)
2746
+ _.submissions_count ? (u(), j(ee, { key: 3 }, [
2747
+ z(" · " + V(e(d)("panel.in-use")) + " (" + V(_.submissions_count) + ") ", 1)
2746
2748
  ], 64)) : H("", !0)
2747
2749
  ]),
2748
2750
  _: 2
2749
2751
  }, 1024)
2750
2752
  ])
2751
2753
  ]),
2752
- actions: a(({ item: w }) => [
2754
+ actions: a(({ item: _ }) => [
2753
2755
  t(e(Fe), {
2754
- actions: q(w),
2755
- label: O(w)
2756
+ actions: W(_),
2757
+ label: L(_)
2756
2758
  }, null, 8, ["actions", "label"])
2757
2759
  ]),
2758
2760
  _: 1
@@ -2762,90 +2764,90 @@ const Gl = /* @__PURE__ */ ae({
2762
2764
  }, 8, ["title", "back", "back-label", "actions"])
2763
2765
  ]));
2764
2766
  }
2765
- }), Ct = /* @__PURE__ */ ue(St, [["__scopeId", "data-v-f94bf140"]]), zt = { class: "wx-submission" }, Tt = {
2767
+ }), zt = /* @__PURE__ */ ie(Ct, [["__scopeId", "data-v-f94bf140"]]), Tt = { class: "wx-submission" }, Ft = {
2766
2768
  key: 1,
2767
2769
  class: "wx-submission__panes"
2768
- }, Ft = { class: "wx-submission__main" }, Wt = { class: "wx-submission__value" }, qt = { class: "wx-submission__files" }, At = { class: "wx-submission__by" }, It = { class: "wx-submission__fields" }, Nt = ["href"], Dt = {
2770
+ }, Wt = { class: "wx-submission__main" }, qt = { class: "wx-submission__value" }, At = { class: "wx-submission__files" }, It = { class: "wx-submission__by" }, Nt = { class: "wx-submission__fields" }, Dt = ["href"], Mt = {
2769
2771
  key: 1,
2770
2772
  class: "wx-submission__detail"
2771
- }, Mt = { class: "wx-submission__aside" }, Lt = { class: "wx-submission__fields" }, Ot = { class: "wx-submission__field" }, Pt = { class: "wx-submission__field" }, Et = /* @__PURE__ */ ae({
2773
+ }, Lt = { class: "wx-submission__aside" }, Ot = { class: "wx-submission__fields" }, Pt = { class: "wx-submission__field" }, Et = { class: "wx-submission__field" }, Rt = /* @__PURE__ */ ae({
2772
2774
  __name: "SubmissionPage",
2773
2775
  props: {
2774
2776
  base: { default: "/inbox" }
2775
2777
  },
2776
2778
  setup(r) {
2777
- const s = r, o = ie(), v = re(o), n = Oe(), d = Pe(), m = xe();
2778
- de();
2779
- const l = te("webx-inbox"), U = te("webx-admin"), p = fe(), i = W(null), O = W([]), z = W([]), F = W(!0), f = C(() => o.can("inbox.update")), q = C(() => Number(n.params.id)), c = C(() => ({
2779
+ const s = r, o = oe(), f = de(o), n = Oe(), d = Pe(), m = xe();
2780
+ ce();
2781
+ const l = te("webx-inbox"), U = te("webx-admin"), p = be(), i = F(null), L = F([]), C = F([]), T = F(!0), b = S(() => o.can("inbox.update")), W = S(() => Number(n.params.id)), c = S(() => ({
2780
2782
  view: typeof n.query.view == "string" ? n.query.view : void 0,
2781
2783
  search: typeof n.query.search == "string" ? n.query.search : void 0,
2782
2784
  assignee: typeof n.query.assignee == "string" ? n.query.assignee : void 0
2783
- })), S = C(() => ({ path: s.base, query: { ...n.query } })), b = C(
2784
- () => O.value.map((y) => ({ value: y.id, label: w(y) }))
2785
- ), I = C(
2786
- () => z.value.map((y) => ({ value: y.id, label: y.name }))
2785
+ })), $ = S(() => ({ path: s.base, query: { ...n.query } })), h = S(
2786
+ () => L.value.map((g) => ({ value: g.id, label: _(g) }))
2787
+ ), O = S(
2788
+ () => C.value.map((g) => ({ value: g.id, label: g.name }))
2787
2789
  );
2788
- function w(y) {
2789
- return ve(y.title, m.active.value, y.key);
2790
- }
2791
- const R = C(() => l("panel.submission", { id: String(q.value) })), L = C(() => {
2792
- const y = i.value?.form;
2793
- return y === void 0 ? "" : ve(y.title ?? {}, m.active.value, y.slug ?? "");
2794
- }), A = C(() => (i.value?.values ?? []).find((E) => E.type === "email" && (E.value ?? "") !== "")?.value ?? null), $ = C(() => {
2795
- if (A.value === null) return null;
2796
- const y = encodeURIComponent(`${L.value} — ${R.value}`);
2797
- return `mailto:${A.value}?subject=${y}`;
2790
+ function _(g) {
2791
+ return fe(g.title, m.active.value, g.key);
2792
+ }
2793
+ const E = S(() => l("panel.submission", { id: String(W.value) })), N = S(() => {
2794
+ const g = i.value?.form;
2795
+ return g === void 0 ? "" : fe(g.title ?? {}, m.active.value, g.slug ?? "");
2796
+ }), q = S(() => (i.value?.values ?? []).find((R) => R.type === "email" && (R.value ?? "") !== "")?.value ?? null), M = S(() => {
2797
+ if (q.value === null) return null;
2798
+ const g = encodeURIComponent(`${N.value} — ${E.value}`);
2799
+ return `mailto:${q.value}?subject=${g}`;
2798
2800
  });
2799
- async function x() {
2800
- F.value = !0;
2801
+ async function v() {
2802
+ T.value = !0;
2801
2803
  try {
2802
- i.value = await v.submission(q.value, c.value);
2803
- } catch (y) {
2804
- P.danger(p(y)), d.replace(S.value);
2804
+ i.value = await f.submission(W.value, c.value);
2805
+ } catch (g) {
2806
+ P.danger(p(g)), d.replace($.value);
2805
2807
  } finally {
2806
- F.value = !1;
2808
+ T.value = !1;
2807
2809
  }
2808
2810
  }
2809
- async function Q() {
2811
+ async function Y() {
2810
2812
  try {
2811
- O.value = await v.statuses(), f.value && (z.value = await v.recipients());
2812
- } catch (y) {
2813
- P.danger(p(y));
2813
+ L.value = await f.statuses(), b.value && (C.value = await f.recipients());
2814
+ } catch (g) {
2815
+ P.danger(p(g));
2814
2816
  }
2815
2817
  }
2816
- Ce(q, () => {
2817
- x();
2818
- }, { immediate: !0 }), Q();
2819
- async function ce(y) {
2818
+ Ce(W, () => {
2819
+ v();
2820
+ }, { immediate: !0 }), Y();
2821
+ async function ye(g) {
2820
2822
  try {
2821
- i.value = await v.saveSubmission(q.value, y), P.success(l("panel.saved"));
2822
- } catch (Y) {
2823
- P.danger(p(Y)), await x();
2823
+ i.value = await f.saveSubmission(W.value, g), P.success(l("panel.saved"));
2824
+ } catch (Z) {
2825
+ P.danger(p(Z)), await v();
2824
2826
  }
2825
2827
  }
2826
- function be(y) {
2827
- typeof y == "number" && ce({ status_id: y });
2828
+ function pe(g) {
2829
+ typeof g == "number" && ye({ status_id: g });
2828
2830
  }
2829
- function N(y) {
2830
- ce({ assignee_id: typeof y == "number" ? y : null });
2831
+ function A(g) {
2832
+ ye({ assignee_id: typeof g == "number" ? g : null });
2831
2833
  }
2832
- const Z = C(() => {
2833
- const y = [];
2834
- return $.value && y.push({
2834
+ const Q = S(() => {
2835
+ const g = [];
2836
+ return M.value && g.push({
2835
2837
  key: "reply",
2836
2838
  label: l("panel.reply"),
2837
2839
  icon: "mail",
2838
2840
  primary: !0,
2839
- href: $.value,
2841
+ href: M.value,
2840
2842
  target: "_self"
2841
- }), f.value && i.value !== null && y.push(
2843
+ }), b.value && i.value !== null && g.push(
2842
2844
  {
2843
2845
  key: "unread",
2844
2846
  icon: "eye-off",
2845
2847
  label: l("panel.mark-unread"),
2846
2848
  menu: !0,
2847
2849
  run: () => {
2848
- D();
2850
+ I();
2849
2851
  }
2850
2852
  },
2851
2853
  {
@@ -2857,13 +2859,13 @@ const Gl = /* @__PURE__ */ ae({
2857
2859
  k();
2858
2860
  }
2859
2861
  }
2860
- ), y;
2862
+ ), g;
2861
2863
  });
2862
- async function D() {
2864
+ async function I() {
2863
2865
  try {
2864
- await v.massSubmissions({ ids: [q.value], action: "unread" }), d.push(S.value);
2865
- } catch (y) {
2866
- P.danger(p(y));
2866
+ await f.massSubmissions({ ids: [W.value], action: "unread" }), d.push($.value);
2867
+ } catch (g) {
2868
+ P.danger(p(g));
2867
2869
  }
2868
2870
  }
2869
2871
  async function k() {
@@ -2875,52 +2877,52 @@ const Gl = /* @__PURE__ */ ae({
2875
2877
  tone: "danger"
2876
2878
  }))
2877
2879
  try {
2878
- await v.removeSubmission(q.value), P.success(l("panel.deleted")), d.push(S.value);
2879
- } catch (Y) {
2880
- P.danger(p(Y));
2880
+ await f.removeSubmission(W.value), P.success(l("panel.deleted")), d.push($.value);
2881
+ } catch (Z) {
2882
+ P.danger(p(Z));
2881
2883
  }
2882
2884
  }
2883
- function h(y) {
2884
- y !== null && d.push({ path: `${s.base}/submissions/${y}`, query: { ...n.query } });
2885
+ function y(g) {
2886
+ g !== null && d.push({ path: `${s.base}/submissions/${g}`, query: { ...n.query } });
2885
2887
  }
2886
- function ne(y) {
2887
- const Y = O.value.find((E) => E.key === y);
2888
- return Y === void 0 ? y : w(Y);
2888
+ function ue(g) {
2889
+ const Z = L.value.find((R) => R.key === g);
2890
+ return Z === void 0 ? g : _(Z);
2889
2891
  }
2890
- function ye(y) {
2891
- switch (y.type) {
2892
+ function re(g) {
2893
+ switch (g.type) {
2892
2894
  case "created":
2893
2895
  return l("panel.event-created");
2894
2896
  case "status":
2895
- return l("panel.event-status", { to: ne(y.to ?? "") });
2897
+ return l("panel.event-status", { to: ue(g.to ?? "") });
2896
2898
  case "assignee":
2897
- return y.to === null || y.to === "" ? l("panel.event-unassigned") : l("panel.event-assignee", { to: y.to });
2899
+ return g.to === null || g.to === "" ? l("panel.event-unassigned") : l("panel.event-assignee", { to: g.to });
2898
2900
  case "note":
2899
2901
  return l("panel.event-note");
2900
2902
  case "notified":
2901
2903
  return l("panel.event-notified");
2902
2904
  default:
2903
- return y.type;
2905
+ return g.type;
2904
2906
  }
2905
2907
  }
2906
- function _e(y) {
2907
- return `${Math.max(1, Math.round(y / 1024))} KB`;
2908
- }
2909
- const Ge = C(() => {
2910
- const y = i.value?.meta ?? {}, Y = [];
2911
- typeof y.page == "string" && y.page !== "" && Y.push({ label: l("panel.meta-page"), value: y.page, link: !0 });
2912
- const E = i.value?.placement;
2913
- typeof E == "string" && E !== "" && Y.push({ label: l("panel.meta-placement"), value: E }), typeof y.referrer == "string" && y.referrer !== "" && Y.push({ label: l("panel.meta-referrer"), value: y.referrer, link: !0 });
2914
- for (const [je, Ae] of Object.entries(y.utm ?? {}))
2915
- Y.push({ label: je, value: String(Ae) });
2916
- return typeof y.locale == "string" && y.locale !== "" && Y.push({ label: l("panel.meta-locale"), value: y.locale }), typeof y.ip == "string" && y.ip !== "" && Y.push({ label: l("panel.meta-ip"), value: y.ip }), typeof y.user_agent == "string" && y.user_agent !== "" && Y.push({ label: l("panel.meta-agent"), value: y.user_agent }), Y;
2908
+ function Ge(g) {
2909
+ return `${Math.max(1, Math.round(g / 1024))} KB`;
2910
+ }
2911
+ const _e = S(() => {
2912
+ const g = i.value?.meta ?? {}, Z = [];
2913
+ typeof g.page == "string" && g.page !== "" && Z.push({ label: l("panel.meta-page"), value: g.page, link: !0 });
2914
+ const R = i.value?.placement;
2915
+ typeof R == "string" && R !== "" && Z.push({ label: l("panel.meta-placement"), value: R }), typeof g.referrer == "string" && g.referrer !== "" && Z.push({ label: l("panel.meta-referrer"), value: g.referrer, link: !0 });
2916
+ for (const [Ae, je] of Object.entries(g.utm ?? {}))
2917
+ Z.push({ label: Ae, value: String(je) });
2918
+ return typeof g.locale == "string" && g.locale !== "" && Z.push({ label: l("panel.meta-locale"), value: g.locale }), typeof g.ip == "string" && g.ip !== "" && Z.push({ label: l("panel.meta-ip"), value: g.ip }), typeof g.user_agent == "string" && g.user_agent !== "" && Z.push({ label: l("panel.meta-agent"), value: g.user_agent }), Z;
2917
2919
  });
2918
- return (y, Y) => (u(), j("div", zt, [
2920
+ return (g, Z) => (u(), j("div", Tt, [
2919
2921
  t(e(Qe), {
2920
- title: R.value,
2921
- subtitle: L.value,
2922
- back: S.value,
2923
- actions: Z.value
2922
+ title: E.value,
2923
+ subtitle: N.value,
2924
+ back: $.value,
2925
+ actions: Q.value
2924
2926
  }, {
2925
2927
  extra: a(() => [
2926
2928
  t(e(Ve), {
@@ -2928,43 +2930,43 @@ const Gl = /* @__PURE__ */ ae({
2928
2930
  size: "lg",
2929
2931
  title: e(l)("panel.previous"),
2930
2932
  disabled: !i.value?.previous_id,
2931
- onClick: Y[0] || (Y[0] = (E) => h(i.value?.previous_id ?? null))
2933
+ onClick: Z[0] || (Z[0] = (R) => y(i.value?.previous_id ?? null))
2932
2934
  }, null, 8, ["title", "disabled"]),
2933
2935
  t(e(Ve), {
2934
2936
  icon: "chevron-right",
2935
2937
  size: "lg",
2936
2938
  title: e(l)("panel.next"),
2937
2939
  disabled: !i.value?.next_id,
2938
- onClick: Y[1] || (Y[1] = (E) => h(i.value?.next_id ?? null))
2940
+ onClick: Z[1] || (Z[1] = (R) => y(i.value?.next_id ?? null))
2939
2941
  }, null, 8, ["title", "disabled"])
2940
2942
  ]),
2941
2943
  _: 1
2942
2944
  }, 8, ["title", "subtitle", "back", "actions"]),
2943
- F.value ? (u(), _(e(We), {
2945
+ T.value ? (u(), w(e(We), {
2944
2946
  key: 0,
2945
2947
  rows: 6
2946
- })) : i.value ? (u(), j("div", Tt, [
2947
- G("div", Ft, [
2948
- t(e(oe), {
2948
+ })) : i.value ? (u(), j("div", Ft, [
2949
+ G("div", Wt, [
2950
+ t(e(se), {
2949
2951
  title: e(l)("panel.answers")
2950
2952
  }, {
2951
2953
  default: a(() => [
2952
- i.value.values.length === 0 ? (u(), _(e(He), {
2954
+ i.value.values.length === 0 ? (u(), w(e(He), {
2953
2955
  key: 0,
2954
2956
  size: "sm",
2955
2957
  description: e(l)("panel.no-answers")
2956
- }, null, 8, ["description"])) : (u(), _(e(nl), {
2958
+ }, null, 8, ["description"])) : (u(), w(e(sl), {
2957
2959
  key: 1,
2958
2960
  columns: 1,
2959
2961
  layout: "vertical"
2960
2962
  }, {
2961
2963
  default: a(() => [
2962
- (u(!0), j(ee, null, ke(i.value.values, (E) => (u(), _(e(Ie), {
2963
- key: E.id,
2964
- label: E.label ?? E.name
2964
+ (u(!0), j(ee, null, ke(i.value.values, (R) => (u(), w(e(Ie), {
2965
+ key: R.id,
2966
+ label: R.label ?? R.name
2965
2967
  }, {
2966
2968
  default: a(() => [
2967
- G("p", Wt, V(E.value || "—"), 1)
2969
+ G("p", qt, V(R.value || "—"), 1)
2968
2970
  ]),
2969
2971
  _: 2
2970
2972
  }, 1032, ["label"]))), 128))
@@ -2974,22 +2976,22 @@ const Gl = /* @__PURE__ */ ae({
2974
2976
  ]),
2975
2977
  _: 1
2976
2978
  }, 8, ["title"]),
2977
- i.value.files.length > 0 ? (u(), _(e(oe), {
2979
+ i.value.files.length > 0 ? (u(), w(e(se), {
2978
2980
  key: 0,
2979
2981
  title: e(l)("panel.attachments")
2980
2982
  }, {
2981
2983
  default: a(() => [
2982
- G("div", qt, [
2983
- (u(!0), j(ee, null, ke(i.value.files, (E) => (u(), _(e(zl), {
2984
- key: E.id,
2985
- name: E.name,
2986
- type: E.mime ?? void 0,
2987
- "download-url": E.url,
2984
+ G("div", At, [
2985
+ (u(!0), j(ee, null, ke(i.value.files, (R) => (u(), w(e(Tl), {
2986
+ key: R.id,
2987
+ name: R.name,
2988
+ type: R.mime ?? void 0,
2989
+ "download-url": R.url,
2988
2990
  "download-label": e(l)("panel.download"),
2989
2991
  size: "sm"
2990
2992
  }, {
2991
2993
  meta: a(() => [
2992
- T(V(_e(E.size)), 1)
2994
+ z(V(Ge(R.size)), 1)
2993
2995
  ]),
2994
2996
  _: 2
2995
2997
  }, 1032, ["name", "type", "download-url", "download-label"]))), 128))
@@ -2997,11 +2999,11 @@ const Gl = /* @__PURE__ */ ae({
2997
2999
  ]),
2998
3000
  _: 1
2999
3001
  }, 8, ["title"])) : H("", !0),
3000
- t(e(oe), { class: "wx-submission__more" }, {
3002
+ t(e(se), { class: "wx-submission__more" }, {
3001
3003
  default: a(() => [
3002
3004
  t(e(Xe), {
3003
3005
  variant: "pill",
3004
- "aria-label": R.value
3006
+ "aria-label": E.value
3005
3007
  }, {
3006
3008
  default: a(() => [
3007
3009
  t(e(ge), {
@@ -3009,12 +3011,12 @@ const Gl = /* @__PURE__ */ ae({
3009
3011
  label: e(U)("notes.title")
3010
3012
  }, {
3011
3013
  default: a(() => [
3012
- t(e(yl), {
3014
+ t(e(gl), {
3013
3015
  id: i.value.id,
3014
3016
  type: "inbox_submission",
3015
3017
  title: "",
3016
- can: f.value,
3017
- onChange: x
3018
+ can: b.value,
3019
+ onChange: v
3018
3020
  }, null, 8, ["id", "can"])
3019
3021
  ]),
3020
3022
  _: 1
@@ -3024,10 +3026,10 @@ const Gl = /* @__PURE__ */ ae({
3024
3026
  label: e(l)("panel.log")
3025
3027
  }, {
3026
3028
  default: a(() => [
3027
- t(e(Tl), { size: "sm" }, {
3029
+ t(e(Fl), { size: "sm" }, {
3028
3030
  default: a(() => [
3029
- (u(!0), j(ee, null, ke(i.value.events, (E) => (u(), _(e(Fl), {
3030
- key: E.id
3031
+ (u(!0), j(ee, null, ke(i.value.events, (R) => (u(), w(e(Wl), {
3032
+ key: R.id
3031
3033
  }, {
3032
3034
  default: a(() => [
3033
3035
  t(e(J), {
@@ -3036,22 +3038,22 @@ const Gl = /* @__PURE__ */ ae({
3036
3038
  class: "wx-submission__event"
3037
3039
  }, {
3038
3040
  default: a(() => [
3039
- T(V(ye(E)), 1)
3041
+ z(V(re(R)), 1)
3040
3042
  ]),
3041
3043
  _: 2
3042
3044
  }, 1024),
3043
- G("p", At, [
3045
+ G("p", It, [
3044
3046
  t(e(J), {
3045
3047
  size: "sm",
3046
3048
  tone: "muted"
3047
3049
  }, {
3048
3050
  default: a(() => [
3049
- T(V(E.author?.name ?? e(l)("panel.system")), 1)
3051
+ z(V(R.author?.name ?? e(l)("panel.system")), 1)
3050
3052
  ]),
3051
3053
  _: 2
3052
3054
  }, 1024),
3053
3055
  t(e(De), {
3054
- value: E.created_at
3056
+ value: R.created_at
3055
3057
  }, null, 8, ["value"])
3056
3058
  ])
3057
3059
  ]),
@@ -3068,8 +3070,8 @@ const Gl = /* @__PURE__ */ ae({
3068
3070
  label: e(l)("panel.details")
3069
3071
  }, {
3070
3072
  default: a(() => [
3071
- G("div", It, [
3072
- t(e(nl), {
3073
+ G("div", Nt, [
3074
+ t(e(sl), {
3073
3075
  columns: 1,
3074
3076
  layout: "vertical",
3075
3077
  size: "sm"
@@ -3094,55 +3096,55 @@ const Gl = /* @__PURE__ */ ae({
3094
3096
  type: i.value.source === "panel" ? "info" : "default"
3095
3097
  }, {
3096
3098
  default: a(() => [
3097
- T(V(i.value.source === "panel" ? e(l)("panel.source-panel") : e(l)("panel.source-web")), 1)
3099
+ z(V(i.value.source === "panel" ? e(l)("panel.source-panel") : e(l)("panel.source-web")), 1)
3098
3100
  ]),
3099
3101
  _: 1
3100
3102
  }, 8, ["type"])
3101
3103
  ]),
3102
3104
  _: 1
3103
3105
  }, 8, ["label"]),
3104
- (u(!0), j(ee, null, ke(Ge.value, (E) => (u(), _(e(Ie), {
3105
- key: E.label,
3106
- label: E.label
3106
+ (u(!0), j(ee, null, ke(_e.value, (R) => (u(), w(e(Ie), {
3107
+ key: R.label,
3108
+ label: R.label
3107
3109
  }, {
3108
3110
  default: a(() => [
3109
- E.link ? (u(), j("a", {
3111
+ R.link ? (u(), j("a", {
3110
3112
  key: 0,
3111
- href: E.value,
3113
+ href: R.value,
3112
3114
  target: "_blank",
3113
3115
  rel: "noreferrer"
3114
- }, V(E.value), 9, Nt)) : (u(), j("span", Dt, V(E.value), 1))
3116
+ }, V(R.value), 9, Dt)) : (u(), j("span", Mt, V(R.value), 1))
3115
3117
  ]),
3116
3118
  _: 2
3117
3119
  }, 1032, ["label"]))), 128))
3118
3120
  ]),
3119
3121
  _: 1
3120
3122
  }),
3121
- i.value.notify_error ? (u(), _(e(Me), {
3123
+ i.value.notify_error ? (u(), w(e(Me), {
3122
3124
  key: 0,
3123
3125
  type: "warning",
3124
3126
  closable: !1
3125
3127
  }, {
3126
3128
  default: a(() => [
3127
- T(V(e(l)("panel.notify-failed")), 1)
3129
+ z(V(e(l)("panel.notify-failed")), 1)
3128
3130
  ]),
3129
3131
  _: 1
3130
- })) : i.value.notified_at ? (u(), _(e(J), {
3132
+ })) : i.value.notified_at ? (u(), w(e(J), {
3131
3133
  key: 1,
3132
3134
  size: "sm",
3133
3135
  tone: "muted"
3134
3136
  }, {
3135
3137
  default: a(() => [
3136
- T(V(e(l)("panel.notified")), 1)
3138
+ z(V(e(l)("panel.notified")), 1)
3137
3139
  ]),
3138
3140
  _: 1
3139
- })) : (u(), _(e(J), {
3141
+ })) : (u(), w(e(J), {
3140
3142
  key: 2,
3141
3143
  size: "sm",
3142
3144
  tone: "muted"
3143
3145
  }, {
3144
3146
  default: a(() => [
3145
- T(V(e(l)("panel.not-notified")), 1)
3147
+ z(V(e(l)("panel.not-notified")), 1)
3146
3148
  ]),
3147
3149
  _: 1
3148
3150
  }))
@@ -3157,44 +3159,44 @@ const Gl = /* @__PURE__ */ ae({
3157
3159
  _: 1
3158
3160
  })
3159
3161
  ]),
3160
- G("aside", Mt, [
3161
- t(e(oe), null, {
3162
+ G("aside", Lt, [
3163
+ t(e(se), null, {
3162
3164
  default: a(() => [
3163
- G("div", Lt, [
3164
- G("label", Ot, [
3165
+ G("div", Ot, [
3166
+ G("label", Pt, [
3165
3167
  t(e(J), {
3166
3168
  size: "sm",
3167
3169
  tone: "muted"
3168
3170
  }, {
3169
3171
  default: a(() => [
3170
- T(V(e(l)("panel.status")), 1)
3172
+ z(V(e(l)("panel.status")), 1)
3171
3173
  ]),
3172
3174
  _: 1
3173
3175
  }),
3174
- t(e(me), {
3176
+ t(e(ve), {
3175
3177
  "model-value": i.value.status?.id ?? null,
3176
- options: b.value,
3177
- disabled: !f.value,
3178
- "onUpdate:modelValue": be
3178
+ options: h.value,
3179
+ disabled: !b.value,
3180
+ "onUpdate:modelValue": pe
3179
3181
  }, null, 8, ["model-value", "options", "disabled"])
3180
3182
  ]),
3181
- G("label", Pt, [
3183
+ G("label", Et, [
3182
3184
  t(e(J), {
3183
3185
  size: "sm",
3184
3186
  tone: "muted"
3185
3187
  }, {
3186
3188
  default: a(() => [
3187
- T(V(e(l)("panel.assignee")), 1)
3189
+ z(V(e(l)("panel.assignee")), 1)
3188
3190
  ]),
3189
3191
  _: 1
3190
3192
  }),
3191
- t(e(me), {
3193
+ t(e(ve), {
3192
3194
  "model-value": i.value.assignee?.id ?? null,
3193
- options: I.value,
3194
- disabled: !f.value,
3195
+ options: O.value,
3196
+ disabled: !b.value,
3195
3197
  clearable: "",
3196
3198
  placeholder: e(l)("panel.unassigned"),
3197
- "onUpdate:modelValue": N
3199
+ "onUpdate:modelValue": A
3198
3200
  }, null, 8, ["model-value", "options", "disabled", "placeholder"])
3199
3201
  ])
3200
3202
  ])
@@ -3205,8 +3207,8 @@ const Gl = /* @__PURE__ */ ae({
3205
3207
  ])) : H("", !0)
3206
3208
  ]));
3207
3209
  }
3208
- }), Rt = /* @__PURE__ */ ue(Et, [["__scopeId", "data-v-4ef3ff2d"]]);
3209
- function Kt(r = {}) {
3210
+ }), Bt = /* @__PURE__ */ ie(Rt, [["__scopeId", "data-v-4ef3ff2d"]]);
3211
+ function Yt(r = {}) {
3210
3212
  const s = r.path ?? "/inbox";
3211
3213
  return {
3212
3214
  id: "inbox",
@@ -3215,17 +3217,17 @@ function Kt(r = {}) {
3215
3217
  routes: [
3216
3218
  // The section's own path travels as a prop, so a panel that mounted it somewhere else
3217
3219
  // still links between its screens correctly.
3218
- { path: s, name: "webx.inbox", component: xt, props: { base: s } },
3220
+ { path: s, name: "webx.inbox", component: _t, props: { base: s } },
3219
3221
  {
3220
3222
  path: `${s}/statuses`,
3221
3223
  name: "webx.inbox.statuses",
3222
- component: Ct,
3224
+ component: zt,
3223
3225
  props: { base: s }
3224
3226
  },
3225
3227
  {
3226
3228
  path: `${s}/forms/:id(\\d+)`,
3227
3229
  name: "webx.inbox.form",
3228
- component: ot,
3230
+ component: it,
3229
3231
  props: { base: s }
3230
3232
  },
3231
3233
  // A submission has an address of its own, not a dialog over the list (§11): it goes in
@@ -3233,24 +3235,24 @@ function Kt(r = {}) {
3233
3235
  {
3234
3236
  path: `${s}/submissions/:id(\\d+)`,
3235
3237
  name: "webx.inbox.submission",
3236
- component: Rt,
3238
+ component: Bt,
3237
3239
  props: { base: s }
3238
3240
  }
3239
3241
  ]
3240
3242
  };
3241
3243
  }
3242
3244
  export {
3243
- ql as FIELD_TYPES,
3244
- Al as STATUS_COLORS,
3245
- Hl as WxInboxFieldList,
3246
- ot as WxInboxFormEditor,
3247
- xt as WxInboxPage,
3248
- Ct as WxInboxStatusesPage,
3249
- ht as WxInboxSubmissionList,
3250
- Rt as WxInboxSubmissionPage,
3251
- re as createInboxApi,
3252
- Kt as inbox,
3253
- Wl as inboxMessages,
3254
- pe as option
3245
+ Al as FIELD_TYPES,
3246
+ Il as STATUS_COLORS,
3247
+ Gl as WxInboxFieldList,
3248
+ it as WxInboxFormEditor,
3249
+ _t as WxInboxPage,
3250
+ zt as WxInboxStatusesPage,
3251
+ yt as WxInboxSubmissionList,
3252
+ Bt as WxInboxSubmissionPage,
3253
+ de as createInboxApi,
3254
+ Yt as inbox,
3255
+ ql as inboxMessages,
3256
+ me as option
3255
3257
  };
3256
3258
  //# sourceMappingURL=index.js.map