@feedmepos/mf-menu-portal 1.0.4-dev.3 → 1.0.4

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.
Files changed (80) hide show
  1. package/dist/{App-nS46pByh.js → App-CgYpEYgp.js} +3 -3
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js} +1 -1
  3. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-DnvN5R5w.js → BindingTable.vue_vue_type_script_setup_true_lang-CWe5_Sm5.js} +1 -1
  4. package/dist/{Catalog-B4RS8T29.js → Catalog-BrHGEI3p.js} +4 -4
  5. package/dist/{CatalogBinding-6_783kbu.js → CatalogBinding-BjTeOA91.js} +3 -3
  6. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BawCLY5-.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-doB3hsWD.js} +3 -3
  7. package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BjP8ZXyb.js → CatalogEditor.vue_vue_type_script_setup_true_lang-BpBR-N_x.js} +7 -7
  8. package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Diapahfp.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-P59vHZEn.js} +14 -14
  9. package/dist/{Category-CqneIGq4.js → Category-6-ppsSmZ.js} +5 -5
  10. package/dist/{Category-DNQH1CI7.js → Category-CdsbuUqi.js} +2 -2
  11. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-DlNUOgyu.js +847 -0
  12. package/dist/{CookingGuide-DTAiFmEL.js → CookingGuide-CRyRlBeV.js} +5 -5
  13. package/dist/{Group-5xO2j3CL.js → Group-DVrUlq4i.js} +2 -2
  14. package/dist/{Group-DeUqUomY.js → Group-DqyBHSFx.js} +5 -5
  15. package/dist/GroupList.vue_vue_type_script_setup_true_lang-oGNs8e8f.js +1807 -0
  16. package/dist/Ingredient-CGLfhbvN.js +505 -0
  17. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C0rc1FRO.js +782 -0
  18. package/dist/{MenuSetting-DdekHsQy.js → MenuSetting-Oct3vbHj.js} +4 -4
  19. package/dist/OrderPacing-BDkzflgE.js +769 -0
  20. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-C3SqQPSr.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-B259anSs.js} +2 -2
  21. package/dist/{Preview-DGTw0POk.js → Preview-V9cSpevb.js} +1 -1
  22. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DffhFv0Y.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-k5S4mGCN.js} +1 -1
  23. package/dist/PrintRoute-3UwiMoBU.js +518 -0
  24. package/dist/{Product-CsbcyIgD.js → Product-LaB-YRTQ.js} +4 -4
  25. package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +7931 -0
  26. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang--rBKdKV7.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-BBXGnZtc.js} +9 -9
  27. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-BUC6qUnG.js +2011 -0
  28. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-DtCzHjpN.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CjQRRqBx.js} +1 -1
  29. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-aDx01-WW.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-3yzUcogQ.js} +630 -587
  30. package/dist/{ProductInternalTools-Ccd4dAmx.js → ProductInternalTools-DWCgC825.js} +2 -2
  31. package/dist/{ProductInventoryDialog-DYcKdKHi.js → ProductInventoryDialog-D0d5RywR.js} +1 -1
  32. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DySFcCJz.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-CmYKO0ZX.js} +1 -1
  33. package/dist/ProductList.vue_vue_type_script_setup_true_lang-DeX8Exly.js +2765 -0
  34. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dw2xiPYX.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BFD6_Sbb.js} +1 -1
  35. package/dist/{Products-phZwCZhU.js → Products-BLUhwFT-.js} +3 -3
  36. package/dist/Publish-Dkjnls7p.js +1337 -0
  37. package/dist/Recipe-BGfofjHT.js +388 -0
  38. package/dist/{Scheduler-C-A5m92O.js → Scheduler-BL7t8aS7.js} +314 -254
  39. package/dist/ServingSequence-CDFXMCiN.js +374 -0
  40. package/dist/{Setting-C24V-lps.js → Setting-gYZoZxQG.js} +6 -6
  41. package/dist/Subcategory-CnlrVwCy.js +459 -0
  42. package/dist/{Takeaway-BFP2ohJn.js → Takeaway-BWVzwWnh.js} +5 -5
  43. package/dist/{Takeaway-DywX5BiX.js → Takeaway-D8FzvC2w.js} +2 -2
  44. package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-B3QS7o1v.js → TakeawayList.vue_vue_type_script_setup_true_lang-igS-FXq5.js} +4 -4
  45. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B8nXazx6.js +1291 -0
  46. package/dist/Unit-Do7Tt8U8.js +424 -0
  47. package/dist/{Variant-BBfWhH-s.js → Variant-D1kLupxx.js} +5 -5
  48. package/dist/{_id_-BooM3FX1.js → _id_-DomaBHrh.js} +3 -3
  49. package/dist/{app-Bmgb8ACe.js → app-C_XNYz8_.js} +312 -312
  50. package/dist/app.js +1 -1
  51. package/dist/apps/mf-menu/src/app.d.ts +60 -0
  52. package/dist/apps/mf-menu/src/components/Product/BulkCategorySelect.vue.d.ts +37 -0
  53. package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +11 -1
  54. package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +2 -2
  55. package/dist/apps/mf-menu/src/components/feature/NestedGroupManager/NestedGroupOverrideSheets.vue.d.ts +27 -0
  56. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesFilter.vue.d.ts +20 -0
  57. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/assets/{menu-compute-CG-fX5pi.js → menu-compute-Did75Kp9.js} +2 -2
  59. package/dist/assets/{validate-menu-BeGMWVns.js → validate-menu-DVMOLygB.js} +2 -2
  60. package/dist/mf-menu-portal.css +1 -1
  61. package/dist/{provide-CfF0FmUz.js → provide-Bwf3KcOV.js} +67991 -66892
  62. package/dist/{useActionFeedback-DyUCQl2x.js → useActionFeedback-CXx7dOVc.js} +1 -1
  63. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
  64. package/package.json +2 -2
  65. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-Bt_onPrP.js +0 -797
  66. package/dist/GroupList.vue_vue_type_script_setup_true_lang-Dgya_JLB.js +0 -2183
  67. package/dist/Ingredient-BlDW3TfZ.js +0 -463
  68. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-0tCpJlOf.js +0 -709
  69. package/dist/OrderPacing-Bb2n5wmI.js +0 -698
  70. package/dist/PrintRoute-CJB4gIP2.js +0 -473
  71. package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
  72. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-J6LpJ5wT.js +0 -1257
  73. package/dist/ProductList.vue_vue_type_script_setup_true_lang-DTLslTpK.js +0 -10353
  74. package/dist/Publish-BeKIXu3z.js +0 -1261
  75. package/dist/Recipe-Fo4tBkBv.js +0 -350
  76. package/dist/ServingSequence-BrCwLSO7.js +0 -336
  77. package/dist/Subcategory-B0oZIKbw.js +0 -412
  78. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D7mhnrXx.js +0 -1213
  79. package/dist/Unit-NhEwH-kr.js +0 -385
  80. package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
@@ -0,0 +1,847 @@
1
+ import { defineComponent as Ve, computed as U, ref as Y, watch as ae, onMounted as Qe, onUnmounted as Ie, openBlock as g, createElementBlock as z, createElementVNode as v, createTextVNode as Pe, toDisplayString as D, unref as o, isRef as be, createVNode as b, createBlock as T, createCommentVNode as N, withCtx as E, shallowRef as J, h as ge, withModifiers as he, resolveComponent as ie, renderSlot as pe, Fragment as Re, renderList as Xe, normalizeClass as Ye, withDirectives as Ze, mergeProps as ea } from "vue";
2
+ import { useI18n as De } from "@feedmepos/mf-common";
3
+ import { components as te, useDialog as aa, useBreakpoints as ta, FmButtonVariant as we } from "@feedmepos/ui-library";
4
+ import { _ as oa } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
5
+ import { f as la } from "./ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CjQRRqBx.js";
6
+ import { useAppStore as na } from "@feedmepos/mf-remy-panel";
7
+ import { _ as sa } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
8
+ import { _ as ia } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
9
+ import { _ as Ee } from "./vuedraggable-CBtQLb_S.js";
10
+ import { _ as ra } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
11
+ import { _ as ua } from "./ProductEditorHost.vue_vue_type_script_setup_true_lang-BBXGnZtc.js";
12
+ import { _ as ca } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
13
+ import { u as da } from "./useActionFeedback-CXx7dOVc.js";
14
+ import { u as $e } from "./useEditorValidation-Ctef5Bxt.js";
15
+ import { b as ma, u as va } from "./provide-Bwf3KcOV.js";
16
+ import { v as ga } from "./tableSemantics-C9WFO_I_.js";
17
+ const pa = {
18
+ key: 0,
19
+ class: "space-y-4"
20
+ }, fa = { class: "fm-typo-en-body-lg-600" }, ya = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ba = { class: "fm-typo-en-body-lg-600 pb-4" }, ha = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, wa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _a = /* @__PURE__ */ Ve({
21
+ __name: "CategoryImageField",
22
+ props: {
23
+ thumbnailUrl: {},
24
+ change: {},
25
+ disabled: { type: Boolean }
26
+ },
27
+ emits: ["select", "clear", "encoding"],
28
+ setup(fe, { emit: h }) {
29
+ const a = fe, M = h, { t: F } = De(), j = na(), O = U(() => !!j.showRemy), r = Y(a.thumbnailUrl);
30
+ let $ = null, P = 0, K = !1, m = !1, Q = !1, X = !1;
31
+ function w(i) {
32
+ X !== i && (X = i, M("encoding", i));
33
+ }
34
+ function p() {
35
+ $ && URL.revokeObjectURL($), $ = null;
36
+ }
37
+ ae(
38
+ () => [a.thumbnailUrl, a.change],
39
+ () => {
40
+ a.change !== "selected" && (P++, w(!1), K = !1, m = !1, p(), r.value = a.change === "cleared" ? null : a.thumbnailUrl);
41
+ }
42
+ );
43
+ function G(i) {
44
+ return new Promise((u, c) => {
45
+ const y = URL.createObjectURL(i), d = new Image();
46
+ d.onload = () => {
47
+ URL.revokeObjectURL(y);
48
+ const _ = d.naturalWidth, V = d.naturalHeight;
49
+ if (!_ || !V) {
50
+ c(new Error("Empty category image"));
51
+ return;
52
+ }
53
+ const W = Math.max(_, V * 16 / 9), R = Math.max(V, _ * 9 / 16), k = 2e3 / W, I = document.createElement("canvas");
54
+ I.width = 2e3, I.height = Math.round(R * k);
55
+ const q = I.getContext("2d");
56
+ if (!q) {
57
+ c(new Error("Category image canvas unavailable"));
58
+ return;
59
+ }
60
+ const ue = getComputedStyle(document.documentElement).getPropertyValue("--fm-color-neutral-white").trim();
61
+ if (!ue) {
62
+ c(new Error("Category image theme unavailable"));
63
+ return;
64
+ }
65
+ q.fillStyle = ue, q.fillRect(0, 0, I.width, I.height), q.drawImage(
66
+ d,
67
+ (W - _) / 2 * k,
68
+ (R - V) / 2 * k,
69
+ _ * k,
70
+ V * k
71
+ ), I.toBlob(
72
+ (ne) => ne ? u(ne) : c(new Error("Category image encoding failed")),
73
+ "image/png"
74
+ );
75
+ }, d.onerror = () => {
76
+ URL.revokeObjectURL(y), c(new Error("Category image could not be read"));
77
+ }, d.src = y;
78
+ });
79
+ }
80
+ async function oe(i) {
81
+ const u = Array.isArray(i) ? i[0] : i;
82
+ if (!u || a.disabled) return;
83
+ const c = ++P;
84
+ w(!0);
85
+ try {
86
+ const y = await G(u);
87
+ if (c !== P) return;
88
+ p(), $ = URL.createObjectURL(y), K = !0, m = !1, r.value = $;
89
+ } catch {
90
+ c === P && w(!1);
91
+ }
92
+ }
93
+ function l(i) {
94
+ if (!K && !m || a.disabled || !i.canvas) return;
95
+ const u = ++P, { width: c, height: y } = i.canvas;
96
+ w(!0), i.canvas.toBlob(
97
+ (d) => {
98
+ u === P && (d && M("select", {
99
+ bytes: d,
100
+ contentType: d.type || "image/jpeg",
101
+ width: c,
102
+ height: y
103
+ }), w(!1));
104
+ },
105
+ "image/jpeg",
106
+ 0.75
107
+ );
108
+ }
109
+ function le() {
110
+ P++, w(!1);
111
+ }
112
+ function re() {
113
+ a.disabled || (P++, w(!1), K = !1, m = !1, Q = !1, p(), r.value = null, M("clear"));
114
+ }
115
+ async function Z() {
116
+ if (a.disabled || !r.value) return;
117
+ let i;
118
+ try {
119
+ const u = await fetch(r.value);
120
+ if (u.ok) {
121
+ const c = await u.blob();
122
+ i = await new Promise((y, d) => {
123
+ const _ = new FileReader();
124
+ _.onload = () => y(String(_.result)), _.onerror = () => d(_.error), _.readAsDataURL(c);
125
+ });
126
+ }
127
+ } catch {
128
+ }
129
+ Q = !0, j.activate({ imageData: i, command: "modifyImage" });
130
+ }
131
+ function B(i) {
132
+ var c;
133
+ if (!Q || a.disabled) return;
134
+ const u = (c = i.detail) == null ? void 0 : c.imageData;
135
+ typeof u != "string" || !u || (Q = !1, P++, w(!0), K = !0, m = !1, p(), r.value = u);
136
+ }
137
+ return Qe(() => window.addEventListener("apply-image", B)), Ie(() => {
138
+ window.removeEventListener("apply-image", B), P++, w(!1), p();
139
+ }), (i, u) => r.value ? (g(), z("div", pa, [
140
+ v("p", fa, [
141
+ Pe(D(o(F)("menu.common.labels.category_image")) + " ", 1),
142
+ v("span", ya, D(o(F)("menu.common.labels.optional")), 1)
143
+ ]),
144
+ v("div", {
145
+ class: "relative h-[150px] w-[200px] overflow-hidden rounded-md border-2 border-dashed border-fm-color-neutral-gray-300",
146
+ onPointerdown: u[0] || (u[0] = (c) => be(m) ? m.value = !0 : m = !0),
147
+ onWheel: u[1] || (u[1] = (c) => be(m) ? m.value = !0 : m = !0),
148
+ onKeydown: u[2] || (u[2] = (c) => be(m) ? m.value = !0 : m = !0)
149
+ }, [
150
+ b(o(la), {
151
+ class: "h-[150px] w-[200px]",
152
+ src: r.value,
153
+ "stencil-props": { handlers: {}, movable: !1, scalable: !1 },
154
+ "stencil-size": { width: 200, height: 150 },
155
+ "image-restriction": "stencil",
156
+ onChange: l,
157
+ onError: le
158
+ }, null, 8, ["src"]),
159
+ b(o(te).FmButton, {
160
+ "aria-label": o(F)("menu.category.image.remove"),
161
+ disabled: i.disabled,
162
+ label: o(F)("menu.category.image.remove"),
163
+ class: "!absolute right-12 top-12 z-10 !h-24 !w-24 !rounded-full !p-0",
164
+ "bg-color": "neutral-white",
165
+ icon: "close",
166
+ variant: "tertiary",
167
+ onClick: re
168
+ }, null, 8, ["aria-label", "disabled", "label"]),
169
+ O.value ? (g(), T(o(te).FmButton, {
170
+ key: 0,
171
+ "aria-label": o(F)("menu.remy.title"),
172
+ disabled: i.disabled,
173
+ label: o(F)("menu.remy.title"),
174
+ class: "!absolute right-12 top-[44px] z-10 !h-24 !w-24 !rounded-full !p-0",
175
+ "bg-color": "neutral-white",
176
+ icon: "auto_awesome",
177
+ variant: "tertiary",
178
+ onClick: Z
179
+ }, null, 8, ["aria-label", "disabled", "label"])) : N("", !0)
180
+ ], 32)
181
+ ])) : (g(), T(o(te).FmDropField, {
182
+ key: 1,
183
+ accept: ".jpg, .jpeg, .png, .gif, .JPG, .JPEG, .PNG, .GIF",
184
+ "content-class": "h-[150px] w-[200px]",
185
+ disabled: i.disabled,
186
+ onFileUpload: oe
187
+ }, {
188
+ label: E(() => [
189
+ v("p", ba, [
190
+ Pe(D(o(F)("menu.common.labels.category_image")) + " ", 1),
191
+ v("span", ha, D(o(F)("menu.common.labels.optional")), 1)
192
+ ])
193
+ ]),
194
+ "accept-text": E(() => [
195
+ v("p", wa, D(o(F)("menu.common.file.accepts")), 1)
196
+ ]),
197
+ _: 1
198
+ }, 8, ["disabled"]));
199
+ }
200
+ }), ka = {
201
+ key: 0,
202
+ class: "flex-1 flex justify-between gap-8 pl-8"
203
+ }, Ca = { class: "flex items-center" }, xa = {
204
+ key: 1,
205
+ class: "flex items-center gap-8 ml-auto"
206
+ }, Sa = {
207
+ key: 0,
208
+ class: "text-fm-color-typo-secondary",
209
+ role: "alert"
210
+ }, La = {
211
+ key: 1,
212
+ class: "text-fm-color-typo-secondary"
213
+ }, Ua = {
214
+ key: 4,
215
+ class: "flex-1 flex flex-col min-h-0"
216
+ }, Fa = { class: "p-8" }, Pa = { class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64" }, Ra = ["onClick"], Ea = { class: "min-w-0 flex-1 space-y-4" }, $a = { class: "fm-typo-en-body-lg-600 break-words" }, Va = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ia = {
217
+ key: 0,
218
+ class: "fixed right-16 bottom-[72px] z-[100]"
219
+ }, Da = { class: "w-[320px]" }, Ma = { class: "fm-typo-en-title-md-600" }, Ba = { class: "flex flex-col gap-32 h-full min-h-0 py-16" }, za = { class: "flex gap-24 items-center" }, Ta = { class: "text-fm-color-typo-secondary" }, ja = { class: "flex-1" }, Oa = { class: "flex-1 overflow-hidden min-h-[300px]" }, Aa = { class: "flex gap-8 items-center justify-start" }, nt = /* @__PURE__ */ Ve({
220
+ __name: "CategoryList",
221
+ props: {
222
+ sdk: {},
223
+ catalogPage: { type: Boolean, default: !1 },
224
+ heading: { default: "" }
225
+ },
226
+ setup(fe) {
227
+ const h = fe, { t: a } = De(), M = ma(), F = aa(), { run: j } = da(), O = va(h.sdk.category.list), r = U(
228
+ () => O.value.status === "ready" ? O.value.value : null
229
+ ), $ = U(() => {
230
+ var e;
231
+ return ((e = r.value) == null ? void 0 : e.query) ?? "";
232
+ }), { breakpoints: P } = ta(), K = U(() => P.value.xs && !h.catalogPage), m = Y(!1), Q = Y(0), X = Y(!1), w = Y(""), p = J(
233
+ h.sdk.category.editor()
234
+ ), G = J(
235
+ p.value.get()
236
+ );
237
+ let oe = p.value.subscribe((e) => {
238
+ G.value = e;
239
+ });
240
+ const l = U(
241
+ () => G.value.status === "ready" ? G.value.value : null
242
+ ), le = $e(() => p.value), re = U(
243
+ () => l.value ? le.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
244
+ ), Z = Y(!1), B = J(null), i = J({ status: "loading" });
245
+ let u = null;
246
+ const c = U(
247
+ () => i.value.status === "ready" ? i.value.value : null
248
+ ), y = Y(!1), d = J(null), _ = $e(() => d.value), V = J({
249
+ status: "loading"
250
+ }), W = U(
251
+ () => V.value.status === "ready" ? V.value.value : null
252
+ );
253
+ let R = null, k = null;
254
+ function I() {
255
+ var e;
256
+ k == null || k(), k = null, (e = d.value) == null || e.dispose(), d.value = null, R == null || R.dispose(), R = null, V.value = { status: "loading" };
257
+ }
258
+ function q(e, t) {
259
+ var n;
260
+ k == null || k(), (n = d.value) == null || n.dispose(), d.value = h.sdk.item.editor(e, {
261
+ initialCategoryId: t
262
+ }), V.value = d.value.get(), k = d.value.subscribe((C) => {
263
+ V.value = C;
264
+ });
265
+ }
266
+ function ue() {
267
+ var t, n;
268
+ const e = (t = l.value) == null ? void 0 : t.categoryId;
269
+ !e || ((n = l.value) == null ? void 0 : n.products.state) !== "allowed" || (I(), R = h.sdk.item.editorScope(), q(void 0, e), y.value = !0);
270
+ }
271
+ function ne(e) {
272
+ var t;
273
+ ((t = l.value) == null ? void 0 : t.products.state) === "allowed" && (I(), R = h.sdk.item.editorScope(), q(e.id), y.value = !0);
274
+ }
275
+ function Me(e) {
276
+ var n;
277
+ const t = ((n = W.value) == null ? void 0 : n.itemId) ?? void 0;
278
+ R == null || R.select(e), q(t);
279
+ }
280
+ async function Be() {
281
+ const e = d.value;
282
+ if (!e) return;
283
+ (await j(
284
+ () => _.submit(() => e.submit()),
285
+ {
286
+ showLoading: () => {
287
+ var n;
288
+ return ((n = W.value) == null ? void 0 : n.status) === "submitting";
289
+ },
290
+ successMessage: W.value ? M(W.value.saveMessage) : ""
291
+ }
292
+ )).kind === "success" && d.value === e && (y.value = !1);
293
+ }
294
+ function H(e) {
295
+ var t;
296
+ u == null || u(), u = null, e && ((t = B.value) == null || t.dispose()), B.value = null, i.value = { status: "loading" }, Z.value = !1;
297
+ }
298
+ function ze() {
299
+ var t;
300
+ if (((t = l.value) == null ? void 0 : t.translation.state) !== "allowed") return;
301
+ H(!0);
302
+ const e = p.value.translationEditor();
303
+ B.value = e, i.value = e.get(), u = e.subscribe((n) => {
304
+ i.value = n;
305
+ }), Z.value = !0;
306
+ }
307
+ function Te(e) {
308
+ var C;
309
+ const t = B.value, n = (C = c.value) == null ? void 0 : C.nameLocale;
310
+ if (!(!t || !n)) {
311
+ for (const f of Object.keys(n))
312
+ f in e || t.removeLocale(f);
313
+ for (const [f, x] of Object.entries(e))
314
+ f in n || t.addLocale(f), t.setNameLocale(f, x);
315
+ }
316
+ }
317
+ async function je() {
318
+ const e = B.value;
319
+ if (!e) return;
320
+ (await j(async () => e.apply(), {
321
+ showLoading: !1
322
+ })).kind === "success" && H(!1);
323
+ }
324
+ function _e() {
325
+ H(!0);
326
+ }
327
+ function Oe(e) {
328
+ e ? Z.value = !0 : _e();
329
+ }
330
+ function ke(e) {
331
+ H(!0), oe(), p.value.dispose(), p.value = h.sdk.category.editor(e), Q.value++, X.value = !1, G.value = p.value.get(), oe = p.value.subscribe((t) => {
332
+ G.value = t;
333
+ });
334
+ }
335
+ function ye() {
336
+ ke(), m.value = !0;
337
+ }
338
+ function Ce(e) {
339
+ !e.id && !e.isSynthetic || (ke(e.isSynthetic ? null : e.id), m.value = !0);
340
+ }
341
+ function ce() {
342
+ H(!0), m.value = !1;
343
+ }
344
+ function xe() {
345
+ var e;
346
+ if (!((e = l.value) != null && e.dirty)) {
347
+ ce();
348
+ return;
349
+ }
350
+ F.open({
351
+ zIndex: 101,
352
+ title: a("menu.common.dialog.dismiss.title"),
353
+ message: a("menu.common.dialog.dismiss.message"),
354
+ primaryActions: {
355
+ text: a("menu.common.dialog.dismiss.discard"),
356
+ close: !0,
357
+ variant: we.Destructive
358
+ },
359
+ secondaryActions: {
360
+ text: a("menu.common.actions.cancel"),
361
+ close: !0
362
+ }
363
+ }).onPrimary(ce);
364
+ }
365
+ function Ae(e) {
366
+ e ? m.value = !0 : xe();
367
+ }
368
+ ae(m, (e) => {
369
+ e || H(!0);
370
+ }), ae(y, (e) => {
371
+ e || I();
372
+ }), ae(G, (e) => {
373
+ B.value && (e.status !== "ready" || e.value.translation.state !== "allowed") && H(!0);
374
+ });
375
+ async function Ne() {
376
+ var C, f, x;
377
+ if (X.value) return;
378
+ const e = (C = l.value) == null ? void 0 : C.mode, t = ((x = (f = l.value) == null ? void 0 : f.name) == null ? void 0 : x.trim()) ?? "";
379
+ (await j(
380
+ () => le.submit(() => p.value.submit()),
381
+ {
382
+ successMessage: e === "update" ? a("menu.category.manager.dialog.update.success", { name: t }) : a("menu.category.manager.dialog.add.success", { name: t }),
383
+ showLoading: () => {
384
+ var A;
385
+ return ((A = l.value) == null ? void 0 : A.status) === "submitting";
386
+ },
387
+ // The approved Storage 403 baseline closes Loading but leaves the image
388
+ // preview and sheet open without a settled snackbar.
389
+ silentFailureCodes: ["menu.category.image.upload_failed"]
390
+ }
391
+ )).kind === "success" && ce();
392
+ }
393
+ function Se(e) {
394
+ e.remove.state !== "allowed" || !e.id || F.open({
395
+ title: a("menu.category.dialog.remove.title"),
396
+ message: a("menu.common.dialog.remove_confirmation", {
397
+ name: e.name
398
+ }),
399
+ primaryActions: {
400
+ text: a("menu.common.actions.remove"),
401
+ close: !0,
402
+ variant: we.Destructive
403
+ },
404
+ secondaryActions: {
405
+ text: a("menu.common.actions.cancel"),
406
+ close: !0
407
+ }
408
+ }).onPrimary(async () => {
409
+ await j(() => h.sdk.category.remove(e.id), {
410
+ successMessage: a("menu.category.dialog.remove.success", {
411
+ name: e.name
412
+ })
413
+ });
414
+ });
415
+ }
416
+ const Ke = U(() => {
417
+ var e;
418
+ return $.value || ((e = r.value) == null ? void 0 : e.reorder.state) !== "allowed" ? () => !1 : (t) => !t.isSynthetic;
419
+ }), de = J([]);
420
+ ae(
421
+ () => {
422
+ var e;
423
+ return (e = r.value) == null ? void 0 : e.rows;
424
+ },
425
+ (e) => {
426
+ e && (de.value = [...e]);
427
+ },
428
+ { immediate: !0 }
429
+ );
430
+ async function Ge(e) {
431
+ var f, x, A;
432
+ if ($.value || ((f = r.value) == null ? void 0 : f.reorder.state) !== "allowed") return;
433
+ const t = e.map((s) => s.id).filter((s) => !!s);
434
+ if (t.length === 0) return;
435
+ const n = de.value;
436
+ (await j(() => h.sdk.category.reorder(t), {
437
+ successMessage: ((x = r.value) == null ? void 0 : x.reorderScope) === "catalog" ? a("menu.catalog.saved", { name: a("menu.category.entity") }) : a("menu.category.reorder.success")
438
+ })).kind !== "success" && (de.value = [...((A = r.value) == null ? void 0 : A.rows) ?? n]);
439
+ }
440
+ function Le(e) {
441
+ h.sdk.category.search(e);
442
+ }
443
+ const We = U(() => [
444
+ {
445
+ accessorKey: "name",
446
+ header: () => a("menu.category.columns.title"),
447
+ enableSorting: !1,
448
+ meta: { width: "auto" },
449
+ cell: (e) => e.row.original.nameMessage ? M(e.row.original.nameMessage) : e.row.original.name
450
+ },
451
+ {
452
+ accessorKey: "linkedProductCount",
453
+ header: () => a("menu.category.columns.products"),
454
+ enableSorting: !1,
455
+ size: 200,
456
+ // Plural selection is an i18n concern, never a template expression
457
+ // (ADR-0003 §3). The legacy table treats zero and one alike
458
+ // (`CategoryTable.vue:73-78`), so the message has its own zero form.
459
+ cell: (e) => a("menu.common.labels.product_linked", {
460
+ count: e.row.original.linkedProductCount
461
+ })
462
+ },
463
+ // Catalog scope only changes membership/order. Categories remain master
464
+ // entities, so the scoped table deliberately has no destructive action
465
+ // column — the legacy editor renders just its two data columns there.
466
+ ...h.catalogPage ? [] : [
467
+ {
468
+ id: "actions",
469
+ size: 52,
470
+ meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
471
+ header: "",
472
+ cell: (e) => {
473
+ const t = e.row.original;
474
+ return ge("div", { class: "flex justify-end" }, [
475
+ ge(te.FmButton, {
476
+ icon: "delete",
477
+ disabled: t.remove.state !== "allowed",
478
+ variant: "tertiary",
479
+ textColor: "neutral-gray-400",
480
+ "aria-label": a("menu.category.dialog.remove.title"),
481
+ onClick: he(
482
+ () => Se(t),
483
+ ["stop", "prevent"]
484
+ )
485
+ })
486
+ ]);
487
+ }
488
+ }
489
+ ]
490
+ ]), me = U(() => {
491
+ var n;
492
+ const e = ((n = l.value) == null ? void 0 : n.productRows) ?? [], t = w.value.trim().toLocaleLowerCase();
493
+ return t ? e.filter(
494
+ (C) => C.name.toLocaleLowerCase().includes(t) || (C.code ?? "").toLocaleLowerCase().includes(t)
495
+ ) : e;
496
+ }), ve = J([]);
497
+ ae(
498
+ me,
499
+ (e) => {
500
+ ve.value = [...e];
501
+ },
502
+ { immediate: !0 }
503
+ );
504
+ const qe = U(() => {
505
+ var e, t;
506
+ return me.value.length === 0 ? !1 : w.value || ((e = l.value) == null ? void 0 : e.products.state) !== "allowed" || me.value.length < 2 ? () => !1 : (t = l.value) != null && t.synthetic ? () => !1 : () => !0;
507
+ });
508
+ async function He(e) {
509
+ var f, x;
510
+ const t = (f = l.value) == null ? void 0 : f.categoryId;
511
+ if (!t || w.value || ((x = l.value) == null ? void 0 : x.products.state) !== "allowed")
512
+ return;
513
+ const n = ve.value;
514
+ (await j(
515
+ () => h.sdk.item.reorderForCategory(
516
+ t,
517
+ e.map((A) => A.id)
518
+ ),
519
+ {
520
+ successMessage: a("menu.product.table.bulk_edit.saved", {
521
+ count: e.length
522
+ })
523
+ }
524
+ )).kind !== "success" && (ve.value = [...me.value ?? n]);
525
+ }
526
+ const Je = U(() => [
527
+ {
528
+ accessorKey: "name",
529
+ header: () => a("menu.category.products.columns.name"),
530
+ enableSorting: !1
531
+ },
532
+ {
533
+ accessorKey: "code",
534
+ header: () => a("menu.category.products.columns.code"),
535
+ enableSorting: !1
536
+ },
537
+ {
538
+ id: "actions",
539
+ size: 52,
540
+ meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
541
+ header: "",
542
+ cell: (e) => ge("div", { class: "flex justify-end" }, [
543
+ ge(te.FmButton, {
544
+ icon: "edit",
545
+ variant: we.Tertiary,
546
+ textColor: "neutral-gray-400",
547
+ "aria-label": a("menu.common.labels.a11y_labelled_name", {
548
+ label: a("menu.common.actions.edit"),
549
+ name: e.row.original.name
550
+ }),
551
+ onClick: he(
552
+ () => ne(e.row.original),
553
+ ["stop", "prevent"]
554
+ )
555
+ })
556
+ ])
557
+ }
558
+ ]);
559
+ return Ie(() => {
560
+ h.sdk.category.search(""), H(!0), I(), oe(), p.value.dispose();
561
+ }), (e, t) => {
562
+ const n = ie("FmButton"), C = ie("FmCircularProgress"), f = ie("FmSearch"), x = ie("FmTable"), A = ie("FmSideSheet");
563
+ return g(), T(ra, {
564
+ heading: e.catalogPage ? e.heading : o(a)("menu.category.title")
565
+ }, {
566
+ "prepend-heading": E(() => [
567
+ pe(e.$slots, "prepend-heading")
568
+ ]),
569
+ "append-heading": E(() => {
570
+ var s;
571
+ return [
572
+ e.catalogPage ? N("", !0) : (g(), z("div", ka, [
573
+ v("div", Ca, [
574
+ b(sa, {
575
+ value: ((s = r.value) == null ? void 0 : s.totalCount) ?? 0
576
+ }, null, 8, ["value"])
577
+ ]),
578
+ r.value && r.value.totalCount > 0 && !K.value ? (g(), T(n, {
579
+ key: 0,
580
+ disabled: r.value.create.state !== "allowed",
581
+ label: o(a)("menu.category.add"),
582
+ "prepend-icon": "add",
583
+ onClick: ye
584
+ }, null, 8, ["disabled", "label"])) : N("", !0)
585
+ ])),
586
+ e.catalogPage ? (g(), z("div", xa, [
587
+ pe(e.$slots, "append-heading")
588
+ ])) : pe(e.$slots, "append-heading", { key: 2 })
589
+ ];
590
+ }),
591
+ default: E(() => [
592
+ pe(e.$slots, "navigation"),
593
+ o(O).status === "error" ? (g(), z("p", Sa, D(o(M)(o(O).error.message)), 1)) : o(O).status === "unavailable" ? (g(), z("p", La, D(o(M)(o(O).reason)), 1)) : o(O).status === "loading" ? (g(), T(C, { key: 2 })) : r.value && r.value.rows.length === 0 && !$.value ? (g(), T(o(oa), {
594
+ key: 3,
595
+ action: e.catalogPage ? void 0 : { text: o(a)("menu.category.add"), callback: ye },
596
+ subtitle: o(a)("menu.category.empty.subtitle"),
597
+ title: o(a)("menu.category.empty.title")
598
+ }, null, 8, ["action", "subtitle", "title"])) : r.value && K.value ? (g(), z("div", Ua, [
599
+ v("div", Fa, [
600
+ b(f, {
601
+ class: "w-full",
602
+ "model-value": $.value,
603
+ placeholder: o(a)("menu.common.labels.search_placeholder", {
604
+ type: o(a)("menu.category.title")
605
+ }),
606
+ "onUpdate:modelValue": Le
607
+ }, null, 8, ["model-value", "placeholder"])
608
+ ]),
609
+ v("div", Pa, [
610
+ (g(!0), z(Re, null, Xe(r.value.rows, (s) => (g(), z("div", {
611
+ key: s.id ?? "",
612
+ class: "flex flex-row py-12 px-16",
613
+ onClick: (S) => Ce(s)
614
+ }, [
615
+ v("div", Ea, [
616
+ v("p", $a, D(s.nameMessage ? o(M)(s.nameMessage) : s.name), 1),
617
+ v("p", Va, D(o(a)("menu.common.labels.product_linked", {
618
+ count: s.linkedProductCount
619
+ })), 1)
620
+ ]),
621
+ b(n, {
622
+ class: "shrink-0",
623
+ "aria-label": o(a)("menu.category.dialog.remove.title"),
624
+ disabled: s.remove.state !== "allowed",
625
+ "prepend-icon": "delete",
626
+ "text-color": "neutral-gray-400",
627
+ variant: "tertiary",
628
+ onClick: he((S) => Se(s), ["stop"])
629
+ }, null, 8, ["aria-label", "disabled", "onClick"])
630
+ ], 8, Ra))), 128))
631
+ ]),
632
+ r.value.totalCount > 0 ? (g(), z("div", Ia, [
633
+ b(n, {
634
+ disabled: r.value.create.state !== "allowed",
635
+ label: o(a)("menu.category.add"),
636
+ "prepend-icon": "add",
637
+ variant: "fab",
638
+ onClick: ye
639
+ }, null, 8, ["disabled", "label"])
640
+ ])) : N("", !0)
641
+ ])) : r.value ? (g(), z(Re, { key: 5 }, [
642
+ v("div", {
643
+ class: Ye(["flex justify-end items-center", { "pt-16": e.catalogPage }])
644
+ }, [
645
+ v("div", Da, [
646
+ b(f, {
647
+ class: "mb-8",
648
+ "model-value": $.value,
649
+ placeholder: o(a)("menu.common.labels.search_placeholder", {
650
+ type: o(a)("menu.category.title")
651
+ }),
652
+ "onUpdate:modelValue": Le
653
+ }, null, 8, ["model-value", "placeholder"])
654
+ ])
655
+ ], 2),
656
+ Ze(b(x, {
657
+ "column-defs": We.value,
658
+ draggable: Ke.value,
659
+ "page-size": r.value.rows.length,
660
+ "row-data": de.value,
661
+ "shrink-at": !1,
662
+ "hide-footer": "",
663
+ "pin-header-row": "",
664
+ onDndChanged: Ge,
665
+ onRowClick: t[0] || (t[0] = (s) => Ce(s.original))
666
+ }, null, 8, ["column-defs", "draggable", "page-size", "row-data"]), [
667
+ [o(ga), o(a)("menu.category.columns.title")]
668
+ ])
669
+ ], 64)) : N("", !0),
670
+ b(A, {
671
+ "model-value": m.value && !y.value,
672
+ "is-container": o(te).FmForm,
673
+ "is-container-props": { onValidationSuccess: Ne },
674
+ "max-width": 560,
675
+ "z-index": 100,
676
+ "onOn:clickedAway": xe,
677
+ "onUpdate:modelValue": Ae
678
+ }, {
679
+ "side-sheet-header": E(() => {
680
+ var s, S;
681
+ return [
682
+ v("p", Ma, D((s = l.value) != null && s.synthetic ? o(a)("menu.category.entity") : ((S = l.value) == null ? void 0 : S.mode) === "update" ? o(a)("menu.category.manager.dialog.update.title") : o(a)("menu.category.manager.dialog.add.title")), 1)
683
+ ];
684
+ }),
685
+ "side-sheet-footer": E(() => {
686
+ var s, S, se;
687
+ return [
688
+ v("div", Aa, [
689
+ ((s = l.value) == null ? void 0 : s.submit.state) !== "hidden" ? (g(), T(n, {
690
+ key: 0,
691
+ disabled: ((S = l.value) == null ? void 0 : S.submit.state) !== "allowed" || X.value,
692
+ label: ((se = l.value) == null ? void 0 : se.mode) === "update" ? o(a)("menu.common.actions.update") : o(a)("menu.category.manager.dialog.add.action"),
693
+ size: "lg",
694
+ type: "submit",
695
+ variant: "primary"
696
+ }, null, 8, ["disabled", "label"])) : N("", !0),
697
+ b(n, {
698
+ label: o(a)("menu.common.actions.cancel"),
699
+ size: "lg",
700
+ variant: "tertiary",
701
+ onClick: ce
702
+ }, null, 8, ["label"])
703
+ ])
704
+ ];
705
+ }),
706
+ default: E(() => {
707
+ var s, S, se;
708
+ return [
709
+ v("div", Ba, [
710
+ b(Ee, {
711
+ title: o(a)("menu.category.detail")
712
+ }, {
713
+ default: E(() => {
714
+ var L, ee;
715
+ return [
716
+ b(ia, ea({
717
+ "error-messages": re.value ? [o(M)(re.value)] : [],
718
+ label: o(a)("menu.category.name"),
719
+ readonly: (L = l.value) == null ? void 0 : L.synthetic,
720
+ "model-value": ((ee = l.value) == null ? void 0 : ee.name) ?? ""
721
+ }, o(le).field("name", p.value.setName)), {
722
+ append: E(() => {
723
+ var Ue, Fe;
724
+ return [
725
+ ((Ue = l.value) == null ? void 0 : Ue.translation.state) !== "hidden" ? (g(), T(n, {
726
+ key: 0,
727
+ "aria-label": o(a)("menu.common.translation.translation_label"),
728
+ disabled: ((Fe = l.value) == null ? void 0 : Fe.translation.state) !== "allowed",
729
+ class: "!p-0",
730
+ icon: "g_translate",
731
+ variant: "tertiary",
732
+ onClick: ze
733
+ }, null, 8, ["aria-label", "disabled"])) : N("", !0)
734
+ ];
735
+ }),
736
+ _: 1
737
+ }, 16, ["error-messages", "label", "readonly", "model-value"])
738
+ ];
739
+ }),
740
+ _: 1
741
+ }, 8, ["title"]),
742
+ l.value && l.value.image.capability.state !== "hidden" ? (g(), T(_a, {
743
+ key: Q.value,
744
+ "thumbnail-url": ((s = l.value) == null ? void 0 : s.image.thumbnailUrl) ?? null,
745
+ change: ((S = l.value) == null ? void 0 : S.image.change) ?? "unchanged",
746
+ disabled: ((se = l.value) == null ? void 0 : se.image.capability.state) !== "allowed",
747
+ onSelect: t[1] || (t[1] = (L) => p.value.setImage(L)),
748
+ onClear: t[2] || (t[2] = (L) => p.value.clearImage()),
749
+ onEncoding: t[3] || (t[3] = (L) => X.value = L)
750
+ }, null, 8, ["thumbnail-url", "change", "disabled"])) : N("", !0),
751
+ b(Ee, {
752
+ class: "flex-1 min-h-0",
753
+ shrinkable: !0,
754
+ title: o(a)("menu.category.products.title")
755
+ }, {
756
+ "append-title": E(() => {
757
+ var L;
758
+ return [
759
+ b(n, {
760
+ "border-color": "primary",
761
+ disabled: ((L = l.value) == null ? void 0 : L.products.state) !== "allowed",
762
+ label: o(a)("menu.category.products.add"),
763
+ "prepend-icon": "add",
764
+ "text-color": "primary",
765
+ variant: "secondary",
766
+ onClick: ue
767
+ }, null, 8, ["disabled", "label"])
768
+ ];
769
+ }),
770
+ default: E(() => {
771
+ var L;
772
+ return [
773
+ v("div", za, [
774
+ v("div", Ta, D(o(a)("menu.category.products.linked_count", {
775
+ count: ((L = l.value) == null ? void 0 : L.productRows.length) ?? 0
776
+ })), 1),
777
+ v("div", ja, [
778
+ b(f, {
779
+ modelValue: w.value,
780
+ "onUpdate:modelValue": t[4] || (t[4] = (ee) => w.value = ee),
781
+ placeholder: o(a)("menu.common.actions.search")
782
+ }, null, 8, ["modelValue", "placeholder"])
783
+ ])
784
+ ]),
785
+ v("div", Oa, [
786
+ b(x, {
787
+ "column-defs": Je.value,
788
+ draggable: qe.value,
789
+ "hide-footer": "",
790
+ "pin-header-row": "",
791
+ "row-data": ve.value,
792
+ "shrink-at": !1,
793
+ onDndChanged: He,
794
+ onRowClick: t[5] || (t[5] = (ee) => ne(ee.original))
795
+ }, null, 8, ["column-defs", "draggable", "row-data"])
796
+ ])
797
+ ];
798
+ }),
799
+ _: 1
800
+ }, 8, ["title"])
801
+ ])
802
+ ];
803
+ }),
804
+ _: 1
805
+ }, 8, ["model-value", "is-container", "is-container-props"]),
806
+ b(ua, {
807
+ open: y.value,
808
+ "onUpdate:open": t[6] || (t[6] = (s) => y.value = s),
809
+ sdk: e.sdk,
810
+ session: d.value,
811
+ validation: o(_),
812
+ view: W.value,
813
+ onSelectScope: Me,
814
+ onSubmit: Be
815
+ }, null, 8, ["open", "sdk", "session", "validation", "view"]),
816
+ c.value ? (g(), T(ca, {
817
+ key: 6,
818
+ "model-value": Z.value,
819
+ dirty: c.value.dirty,
820
+ name: c.value.name,
821
+ "name-locale": c.value.nameLocale,
822
+ "supported-locales": c.value.supportedLocales,
823
+ title: o(a)("menu.common.translation.sheet_title", {
824
+ entity: o(a)("menu.category.entity")
825
+ }),
826
+ "name-section-label": o(a)("menu.common.translation.name_section", {
827
+ entity: o(a)("menu.category.entity")
828
+ }),
829
+ "z-index": 200,
830
+ onDiscard: _e,
831
+ onSave: je,
832
+ "onUpdate:modelValue": Oe,
833
+ "onUpdate:name": t[7] || (t[7] = (s) => {
834
+ var S;
835
+ return (S = B.value) == null ? void 0 : S.setName(s);
836
+ }),
837
+ "onUpdate:nameLocale": Te
838
+ }, null, 8, ["model-value", "dirty", "name", "name-locale", "supported-locales", "title", "name-section-label"])) : N("", !0)
839
+ ]),
840
+ _: 3
841
+ }, 8, ["heading"]);
842
+ };
843
+ }
844
+ });
845
+ export {
846
+ nt as _
847
+ };