@webx-ui/module-inbox 0.4.11 → 0.5.0

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