@feedmepos/mf-menu 0.32.61-dev.3 → 0.32.63-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/{App-TgWTfhbY.js → App-DhfTGlgM.js} +466 -461
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BeW-aCRL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C5-8qdJK.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-C8il14gy.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-CXm-0H18.js} +8 -8
  4. package/dist/{Catalog-hnhpn9Of.js → Catalog-WuZJfM6l.js} +78 -78
  5. package/dist/{Category-DIubPG8Y.js → Category-BeIo7XWY.js} +20 -20
  6. package/dist/{Category-wXfspM5v.js → Category-D-cQQCPS.js} +19 -19
  7. package/dist/{CookingGuide-CR1cBZ3S.js → CookingGuide-B-yvD9ZA.js} +88 -88
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DlpZfbx-.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2_yzXoa4.js} +1 -1
  9. package/dist/{Group-DbG3cLfp.js → Group-13i5igrS.js} +5 -5
  10. package/dist/{Group-DTzbprcr.js → Group-CY8lUzQG.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-CMEdW613.js → Group.vue_vue_type_script_setup_true_lang-DZhxy0tb.js} +95 -94
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-aLcNgJLb.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CWqv-oUd.js} +13 -13
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CnChdePY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DTs4Vpdi.js} +219 -220
  14. package/dist/{Ingredient-BBGzGfS2.js → Ingredient-vrUOW6gk.js} +49 -49
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-B9CfZ7oA.js → InventoryBinding.vue_vue_type_script_setup_true_lang-xcVjRjqD.js} +2 -2
  16. package/dist/{LinkProductSideSheet-CLd4LEy4.js → LinkProductSideSheet-DMbJG6wf.js} +8 -8
  17. package/dist/{MenuSetting-BuS9_e0y.js → MenuSetting-Di2xwm00.js} +10 -10
  18. package/dist/{OrderPacing-2QPouAql.js → OrderPacing-CCe-IcGO.js} +28 -28
  19. package/dist/{PrintRoute-D-SiyoaP.js → PrintRoute-CcfObcHY.js} +27 -27
  20. package/dist/{Product-nmlc3rrr.js → Product-ChUVnMgG.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-DYn_bqcn.js → Product.vue_vue_type_script_setup_true_lang-C9Qp50hL.js} +153 -152
  22. package/dist/{ProductInternalTools-BgDSe1XP.js → ProductInternalTools-D9HXhgo5.js} +80 -79
  23. package/dist/{Products-BPa6wC-o.js → Products-Bly2ktEC.js} +82 -81
  24. package/dist/{Publish-DbI1wemN.js → Publish-C8ubb8Qf.js} +113 -113
  25. package/dist/{Recipe-CAgscHCL.js → Recipe-BpMRLsyO.js} +32 -32
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DNG5WX4W.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BD5OCDRn.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DNk48PUl.js → RuleView.vue_vue_type_script_setup_true_lang-Ba3djmX1.js} +313 -312
  28. package/dist/{Scheduler-C8TXHcb2.js → Scheduler-CiB4b2Fn.js} +9 -9
  29. package/dist/{ServingSequence-CQzQWvUA.js → ServingSequence-BlcyW-dv.js} +18 -18
  30. package/dist/{Setting-gun4ZUQ4.js → Setting-DqkL6YYU.js} +31 -31
  31. package/dist/{Subcategory-CqcWpp94.js → Subcategory-B4Jg_wtT.js} +43 -43
  32. package/dist/{Takeaway-DV_ND3Ts.js → Takeaway-5G3f7jWT.js} +1 -1
  33. package/dist/{Takeaway-DsRU9wBO.js → Takeaway-5rFPYYNA.js} +16 -16
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-GMA7-Hrb.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsOhg_E.js} +23 -23
  35. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-DAwsbPs4.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CPqxA6JD.js} +1 -1
  36. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DYVBVDBy.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-yrNuTD-3.js} +8 -9
  37. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-T71R68sq.js +5836 -0
  38. package/dist/{Unit-BcPn6opY.js → Unit-CAkdmQLg.js} +2 -2
  39. package/dist/{Variant-Wkd9mHWk.js → Variant-BbLQqbAK.js} +13 -13
  40. package/dist/{_id_-CuOgqnZ3.js → _id_-Dzacr40I.js} +13 -13
  41. package/dist/{app-BsNMWUZ9.js → app-4yWs09Fr.js} +495 -495
  42. package/dist/{app-kS8tUq_w.js → app-Deov1985.js} +3 -3
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/api/media.d.ts +161 -0
  45. package/dist/apps/mf-menu/src/app.d.ts +340 -0
  46. package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
  47. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +150 -0
  48. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/CustomDimensionDialog.vue.d.ts +17 -0
  49. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadDialog.vue.d.ts +16 -1
  50. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ManageImageDrawer.vue.d.ts +42 -0
  51. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ProductImageField.vue.d.ts +75 -0
  52. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/RegenerateImageDialog.vue.d.ts +17 -0
  53. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ProductDetail.vue.d.ts +3 -6
  54. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -1
  55. package/dist/apps/mf-menu/src/composable/remyImageTarget.d.ts +5 -0
  56. package/dist/apps/mf-menu/src/helper/menu.d.ts +14 -1
  57. package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
  58. package/dist/apps/mf-menu/src/types/rule.d.ts +2 -0
  59. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +3 -2
  60. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/ProductDetail.vue.d.ts +8 -8
  61. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/assets/{linked-status-CHvHJGH9.js → linked-status-B2WLhKkV.js} +4 -4
  63. package/dist/assets/{menu-export-Bd2A9o3e.js → menu-export-Dcw5a_dN.js} +3 -3
  64. package/dist/assets/{override-menu-cifFGmrk.js → override-menu-cBe2aMY6.js} +4 -4
  65. package/dist/assets/{validate-menu-B8cp1kCt.js → validate-menu-BM-5GK85.js} +3 -3
  66. package/dist/{catalog-BxfmkFrE.js → catalog-DKygS2Cs.js} +6 -6
  67. package/dist/{catalogSetting-ebS4mr1i.js → catalogSetting-Bn2TplvM.js} +1 -1
  68. package/dist/currency-DXgNHtK8.js +7 -0
  69. package/dist/dayjs.min-DpX65tgj.js +7 -0
  70. package/dist/discardConfirm-DZwzKO-Q.js +3704 -0
  71. package/dist/{index-CUrfs4iN.js → index-B48KLyqg.js} +61 -61
  72. package/dist/{index-BxvnAb0l.js → index-BEocaqRK.js} +30 -30
  73. package/dist/index-K-MBqJJo.js +222 -0
  74. package/dist/{index.vue_vue_type_script_setup_true_lang-C3c2B-qJ.js → index.vue_vue_type_script_setup_true_lang-Nl505vPi.js} +44918 -51563
  75. package/dist/item-Da3ArD-G.js +13213 -0
  76. package/dist/{jszip.min-DccvCJln.js → jszip.min-Cc2eR4Cq.js} +52 -52
  77. package/dist/linkProducts-GNuUxFEE.js +331 -0
  78. package/dist/{memberPricing-FatZi_6k.js → memberPricing-T-jr7tn1.js} +1 -1
  79. package/dist/{menu-DcPMF0nf.js → menu-DSDRAil-.js} +1 -1
  80. package/dist/{menuV2-CVo-19H-.js → menuV2-fTlJdjxi.js} +89 -87
  81. package/dist/mf-menu.css +1 -1
  82. package/dist/{order_pacing-CWDYwJcW.js → order_pacing-Dgo1fySS.js} +17 -17
  83. package/dist/packages/shared/src/helpers/agentCode.d.ts +9 -0
  84. package/dist/{priceTier-C58Ixr5m.js → priceTier-aT_gIfrN.js} +3 -3
  85. package/dist/{rules-DwomOoC9.js → rules-Cx2hkV20.js} +8 -8
  86. package/dist/{scheduler-CJcxPgeF.js → scheduler-Bd-q7yF8.js} +62 -62
  87. package/dist/{toExcel-DjWt9SEm.js → toExcel-qfjR83qT.js} +2 -2
  88. package/dist/{unit-KhTILQfe.js → unit-n1T9grbM.js} +64 -64
  89. package/package.json +3 -3
  90. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C5hn1NYM.js +0 -399
  91. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BFUOqfDO.js +0 -6058
  92. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/thumbnailUpload.d.ts +0 -6
  93. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadForm.vue.d.ts +0 -38
  94. package/dist/currency-BM5m7MDE.js +0 -7
  95. package/dist/dayjs.min-X4vHGjJn.js +0 -7
  96. package/dist/discardConfirm-BHni0LNu.js +0 -28
  97. package/dist/index-CisutoS9.js +0 -156
  98. package/dist/item-26-Gw7Ug.js +0 -9098
@@ -1,34 +1,35 @@
1
- import { defineComponent as Z, ref as v, computed as $, resolveComponent as J, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as B, toDisplayString as U, createStaticVNode as E, Fragment as P, renderList as O, createBlock as oe, withCtx as R } from "vue";
2
- import { J as A, F as ne } from "./jszip.min-DccvCJln.js";
3
- import { B as le, u as ie, H as D, a3 as re, M as ce, N as de, O as me } from "./index.vue_vue_type_script_setup_true_lang-C3c2B-qJ.js";
4
- import { useI18n as ue } from "@feedmepos/mf-common";
5
- import { FmButtonVariant as z, useSnackbar as V, useDialog as ge, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
6
- import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
7
- import { u as fe, a as he } from "./menu-DcPMF0nf.js";
8
- import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-DYn_bqcn.js";
9
- import { J as be, K as ve, L as _e } from "./item-26-Gw7Ug.js";
1
+ import { defineComponent as Z, ref as v, computed as $, resolveComponent as q, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as E, toDisplayString as U, createStaticVNode as B, Fragment as P, renderList as R, createBlock as oe, withCtx as A } from "vue";
2
+ import { J as O, F as ne } from "./jszip.min-Cc2eR4Cq.js";
3
+ import { l as D } from "./discardConfirm-DZwzKO-Q.js";
4
+ import { useI18n as le } from "@feedmepos/mf-common";
5
+ import { FmButtonVariant as z, useSnackbar as V, useDialog as ie, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
6
+ import { b as re, u as ce, p as de, q as me } from "./index.vue_vue_type_script_setup_true_lang-Nl505vPi.js";
7
+ import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
8
+ import { u as pe, a as ge } from "./menu-DSDRAil-.js";
9
+ import { a as fe } from "./Product.vue_vue_type_script_setup_true_lang-C9Qp50hL.js";
10
+ import { aj as he, ak as ye, al as be, am as ve, an as _e } from "./item-Da3ArD-G.js";
10
11
  const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center justify-between p-16 border-b border-gray-200" }, Ie = { class: "flex gap-8" }, ke = { class: "border-b border-gray-200" }, Ce = { class: "flex" }, Ue = { class: "flex-1 overflow-hidden" }, je = {
11
12
  key: 0,
12
13
  class: "h-full flex flex-col"
13
14
  }, Fe = {
14
15
  key: 0,
15
16
  class: "flex-1 flex items-center justify-center"
16
- }, Me = {
17
+ }, Se = {
17
18
  key: 1,
18
19
  class: "flex-1 overflow-y-auto p-16"
19
- }, Se = { class: "space-y-12" }, $e = { class: "fm-typo-en-body-sm font-medium" }, ze = { class: "flex" }, Pe = { class: "w-64 h-64 bg-gray-100 rounded-md overflow-hidden flex items-center justify-center" }, Le = ["src", "alt"], Ne = {
20
+ }, Me = { class: "space-y-12" }, $e = { class: "fm-typo-en-body-sm font-medium" }, ze = { class: "flex" }, Pe = { class: "w-64 h-64 bg-gray-100 rounded-md overflow-hidden flex items-center justify-center" }, Le = ["src", "alt"], Ne = {
20
21
  key: 1,
21
22
  class: "text-gray-400 text-xs"
22
- }, Te = { class: "flex" }, Be = { class: "w-64 h-64 bg-gray-100 rounded-md overflow-hidden" }, Ee = ["src", "alt"], Oe = {
23
+ }, Te = { class: "flex" }, Ee = { class: "w-64 h-64 bg-gray-100 rounded-md overflow-hidden" }, Be = ["src", "alt"], Re = {
23
24
  key: 1,
24
25
  class: "h-full flex flex-col"
25
- }, Re = {
26
+ }, Ae = {
26
27
  key: 0,
27
28
  class: "flex-1 flex items-center justify-center"
28
- }, Ae = {
29
+ }, Oe = {
29
30
  key: 1,
30
31
  class: "flex-1 overflow-y-auto p-16"
31
- }, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" }, Je = { class: "w-64 h-64 bg-gray-100 rounded-md overflow-hidden" }, We = ["src", "alt"], qe = /* @__PURE__ */ Z({
32
+ }, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" }, qe = { class: "w-64 h-64 bg-gray-100 rounded-md overflow-hidden" }, We = ["src", "alt"], Ge = /* @__PURE__ */ Z({
32
33
  __name: "ImageUpdatePreview",
33
34
  props: {
34
35
  matchedImages: {},
@@ -40,11 +41,11 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
40
41
  function _() {
41
42
  F("cancel");
42
43
  }
43
- function M() {
44
+ function S() {
44
45
  F("update", u.matchedImages);
45
46
  }
46
47
  return (w, l) => {
47
- const x = J("fm-button");
48
+ const x = q("fm-button");
48
49
  return r(), c("div", we, [
49
50
  s("div", xe, [
50
51
  l[2] || (l[2] = s("h2", { class: "fm-typo-en-headline-sm font-semibold" }, "Update Product Images", -1)),
@@ -58,14 +59,14 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
58
59
  variant: h(z).Primary,
59
60
  label: "Update",
60
61
  disabled: b.value === 0,
61
- onClick: M
62
+ onClick: S
62
63
  }, null, 8, ["variant", "disabled"])
63
64
  ])
64
65
  ]),
65
66
  s("div", ke, [
66
67
  s("div", Ce, [
67
68
  s("button", {
68
- class: B([
69
+ class: E([
69
70
  "px-16 py-12 font-medium text-sm border-b-2 transition-colors",
70
71
  y.value === "matched" ? "border-blue-500 text-blue-600 bg-blue-50" : "border-transparent text-gray-500 hover:text-gray-700"
71
72
  ]),
@@ -73,7 +74,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
73
74
  }, " Matched Images (" + U(b.value) + ") ", 3),
74
75
  k.value > 0 ? (r(), c("button", {
75
76
  key: 0,
76
- class: B([
77
+ class: E([
77
78
  "px-16 py-12 font-medium text-sm border-b-2 transition-colors",
78
79
  y.value === "unmatched" ? "border-blue-500 text-blue-600 bg-blue-50" : "border-transparent text-gray-500 hover:text-gray-700"
79
80
  ]),
@@ -84,15 +85,15 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
84
85
  s("div", Ue, [
85
86
  y.value === "matched" ? (r(), c("div", je, [
86
87
  b.value === 0 ? (r(), c("div", Fe, l[3] || (l[3] = [
87
- E('<div class="text-center text-gray-500"><svg class="mx-auto h-48 w-48 text-gray-400 mb-16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg><p class="fm-typo-en-body-lg text-gray-500">No matched images found</p><p class="fm-typo-en-body-sm text-gray-400 mt-4"> Make sure your image filenames match product names </p></div>', 1)
88
- ]))) : (r(), c("div", Me, [
88
+ B('<div class="text-center text-gray-500"><svg class="mx-auto h-48 w-48 text-gray-400 mb-16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg><p class="fm-typo-en-body-lg text-gray-500">No matched images found</p><p class="fm-typo-en-body-sm text-gray-400 mt-4"> Make sure your image filenames match product names </p></div>', 1)
89
+ ]))) : (r(), c("div", Se, [
89
90
  l[4] || (l[4] = s("div", { class: "grid grid-cols-3 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
90
91
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Product Name"),
91
92
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Current Image"),
92
93
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "New Image")
93
94
  ], -1)),
94
- s("div", Se, [
95
- (r(!0), c(P, null, O(u.matchedImages, (m, C) => (r(), c("div", {
95
+ s("div", Me, [
96
+ (r(!0), c(P, null, R(u.matchedImages, (m, C) => (r(), c("div", {
96
97
  key: C,
97
98
  class: "grid grid-cols-3 gap-16 py-12 border-b border-gray-100 items-center"
98
99
  }, [
@@ -108,33 +109,33 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
108
109
  ])
109
110
  ]),
110
111
  s("div", Te, [
111
- s("div", Be, [
112
+ s("div", Ee, [
112
113
  s("img", {
113
114
  src: m.newImageUrl,
114
115
  alt: m.newImage.name,
115
116
  class: "w-full h-full object-cover"
116
- }, null, 8, Ee)
117
+ }, null, 8, Be)
117
118
  ])
118
119
  ])
119
120
  ]))), 128))
120
121
  ])
121
122
  ]))
122
- ])) : y.value === "unmatched" ? (r(), c("div", Oe, [
123
- k.value === 0 ? (r(), c("div", Re, l[5] || (l[5] = [
124
- E('<div class="text-center text-gray-500"><svg class="mx-auto h-48 w-48 text-gray-400 mb-16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg><p class="fm-typo-en-body-lg text-gray-500">All images matched!</p><p class="fm-typo-en-body-sm text-gray-400 mt-4">No unmatched images found</p></div>', 1)
125
- ]))) : (r(), c("div", Ae, [
123
+ ])) : y.value === "unmatched" ? (r(), c("div", Re, [
124
+ k.value === 0 ? (r(), c("div", Ae, l[5] || (l[5] = [
125
+ B('<div class="text-center text-gray-500"><svg class="mx-auto h-48 w-48 text-gray-400 mb-16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg><p class="fm-typo-en-body-lg text-gray-500">All images matched!</p><p class="fm-typo-en-body-sm text-gray-400 mt-4">No unmatched images found</p></div>', 1)
126
+ ]))) : (r(), c("div", Oe, [
126
127
  l[6] || (l[6] = s("div", { class: "grid grid-cols-2 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
127
128
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Filename"),
128
129
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Image")
129
130
  ], -1)),
130
131
  s("div", De, [
131
- (r(!0), c(P, null, O(u.unmatchedImages, (m, C) => (r(), c("div", {
132
+ (r(!0), c(P, null, R(u.unmatchedImages, (m, C) => (r(), c("div", {
132
133
  key: C,
133
134
  class: "grid grid-cols-2 gap-16 py-12 border-b border-gray-100 items-center"
134
135
  }, [
135
136
  s("div", Ve, U(m.filename), 1),
136
137
  s("div", Ze, [
137
- s("div", Je, [
138
+ s("div", qe, [
138
139
  s("img", {
139
140
  src: m.imageUrl,
140
141
  alt: m.filename,
@@ -151,32 +152,32 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
151
152
  };
152
153
  }
153
154
  });
154
- var Ge = { firebase: { storageBucket: "image.feedmedev.cc" } };
155
+ var Je = { firebase: { storageBucket: "image.feedmedev.cc" } };
155
156
  const He = {
156
157
  key: 0,
157
158
  class: "h-screen"
158
- }, Ke = { class: "flex-1 flex justify-between gap-8 pl-8" }, Xe = { class: "flex items-center" }, Qe = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ye = { class: "fm-typo-en-body-md-600 font-semibold" }, et = { class: "flex gap-8" }, dt = /* @__PURE__ */ Z({
159
+ }, Xe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ke = { class: "flex items-center" }, Qe = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ye = { class: "fm-typo-en-body-md-600 font-semibold" }, et = { class: "flex gap-8" }, mt = /* @__PURE__ */ Z({
159
160
  __name: "ProductInternalTools",
160
161
  setup(L) {
161
- const { t: j } = ue(), u = le(V()), F = V(), y = ge(), b = ie(), { selectedCategories: k } = fe(), _ = v(!1), M = v(), w = v([]), l = v([]), x = $(() => {
162
+ const { t: j } = le(), u = re(V()), F = V(), y = ie(), b = ce(), { selectedCategories: k } = pe(), _ = v(!1), S = v(), w = v([]), l = v([]), x = $(() => {
162
163
  const e = D.flatten(k.value.map((a) => a.items));
163
164
  return D.uniqBy(e, (a) => a._id);
164
165
  }), m = $(() => x.value.length);
165
166
  async function C(e, a) {
166
- return await _e(e, {
167
+ return await be(e, {
167
168
  withTimestamp: !0,
168
169
  filename: a
169
170
  });
170
171
  }
171
172
  async function W(e, a = "images.zip") {
172
- const o = new A();
173
+ const o = new O();
173
174
  e.forEach(({ blob: d, filename: n }) => {
174
175
  d && o.file(n, d);
175
176
  });
176
- const g = await o.generateAsync({ type: "blob" });
177
- ne.saveAs(g, a);
177
+ const p = await o.generateAsync({ type: "blob" });
178
+ ne.saveAs(p, a);
178
179
  }
179
- async function q() {
180
+ async function G() {
180
181
  const e = x.value.filter((a) => a.thumbnail);
181
182
  if (e.length === 0) {
182
183
  F.open({ type: "error", title: "No downloadable images found" });
@@ -197,16 +198,16 @@ const He = {
197
198
  const a = v("Preparing download...");
198
199
  await u.minor(
199
200
  async () => {
200
- const o = e.filter((n) => n.thumbnail).map((n, p) => {
201
- let t = n.name || `image_${Date.now()}_${p}`;
201
+ const o = e.filter((n) => n.thumbnail).map((n, g) => {
202
+ let t = n.name || `image_${Date.now()}_${g}`;
202
203
  return t += ".jpg", {
203
204
  url: n.thumbnail,
204
205
  filename: t,
205
- index: p + 1
206
+ index: g + 1
206
207
  };
207
208
  });
208
209
  a.value = `Starting download of ${o.length} images...`;
209
- const d = (await be(o, C, {
210
+ const d = (await he(o, C, {
210
211
  batchSize: 5,
211
212
  // Download 5 images at a time
212
213
  batchDelay: 200,
@@ -227,15 +228,15 @@ const He = {
227
228
  );
228
229
  });
229
230
  }
230
- async function G(e) {
231
- const o = await new A().loadAsync(e), g = [];
231
+ async function J(e) {
232
+ const o = await new O().loadAsync(e), p = [];
232
233
  for (const [d, n] of Object.entries(o.files)) {
233
234
  if (n.dir || d.includes("__MACOSX/") || !N(d))
234
235
  continue;
235
- const p = await n.async("blob"), t = d.split("/").pop() || d, i = new File([p], t, { type: H(t) });
236
- g.push(i);
236
+ const g = await n.async("blob"), t = d.split("/").pop() || d, i = new File([g], t, { type: H(t) });
237
+ p.push(i);
237
238
  }
238
- return g;
239
+ return p;
239
240
  }
240
241
  function N(e) {
241
242
  const a = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp"], o = e.toLowerCase().substring(e.lastIndexOf("."));
@@ -252,17 +253,17 @@ const He = {
252
253
  ".bmp": "image/bmp"
253
254
  }[a] || "image/jpeg";
254
255
  }
255
- function K(e) {
256
+ function X(e) {
256
257
  return (e.substring(0, e.lastIndexOf(".")) || e).toLowerCase().trim().replace(/[_\-\s]+/g, " ");
257
258
  }
258
- function X(e) {
259
+ function K(e) {
259
260
  return e.toLowerCase().trim().replace(/[_\-\s]+/g, " ");
260
261
  }
261
262
  async function Q(e) {
262
263
  const a = [];
263
264
  for (const t of e)
264
265
  if (t.type === "application/zip" || t.name.toLowerCase().endsWith(".zip")) {
265
- const i = await G(t);
266
+ const i = await J(t);
266
267
  a.push(...i);
267
268
  } else N(t.name) && a.push(t);
268
269
  const o = /* @__PURE__ */ new Map();
@@ -270,13 +271,13 @@ const He = {
270
271
  const i = t.name.toLowerCase();
271
272
  o.has(i) || o.set(i, t);
272
273
  });
273
- const g = Array.from(o.values()), d = [], n = [], p = /* @__PURE__ */ new Map();
274
+ const p = Array.from(o.values()), d = [], n = [], g = /* @__PURE__ */ new Map();
274
275
  x.value.forEach((t) => {
275
- const i = X(t.name);
276
- p.set(i, t);
276
+ const i = K(t.name);
277
+ g.set(i, t);
277
278
  });
278
- for (const t of g) {
279
- const i = K(t.name), f = p.get(i);
279
+ for (const t of p) {
280
+ const i = X(t.name), f = g.get(i);
280
281
  f ? d.push({
281
282
  productId: f._id,
282
283
  productName: f.name,
@@ -308,12 +309,12 @@ const He = {
308
309
  await u.minor(
309
310
  async () => {
310
311
  const o = async (t) => {
311
- const i = ce(t.productId);
312
+ const i = ve(t.productId);
312
313
  let f = "";
313
- return t.newImage && (await de.update(i, t.newImage, Ge.firebase.storageBucket), f = me(i)), { productId: t.productId, newImageUrl: f };
314
+ return t.newImage && (await _e.update(i, t.newImage, Je.firebase.storageBucket), f = me(i)), { productId: t.productId, newImageUrl: f };
314
315
  };
315
316
  a.value = `Starting upload of ${e.length} product images...`;
316
- const g = await ve({
317
+ const p = await ye({
317
318
  items: e,
318
319
  processor: o,
319
320
  batchSize: 5,
@@ -325,9 +326,9 @@ const He = {
325
326
  }
326
327
  });
327
328
  a.value = "Updating product data...";
328
- const d = b.state.menu, n = re(d), p = new Map(g.map((t) => [t == null ? void 0 : t.productId, t]));
329
+ const d = b.state.menu, n = de(d), g = new Map(p.map((t) => [t == null ? void 0 : t.productId, t]));
329
330
  n.modules.item = n.modules.item.map((t) => {
330
- const i = p.get(t._id);
331
+ const i = g.get(t._id);
331
332
  return i && i.newImageUrl ? { ...t, thumbnail: i.newImageUrl } : t;
332
333
  }), await b.updateMenuSetting(n), await b.importMenu(n);
333
334
  },
@@ -343,7 +344,7 @@ const He = {
343
344
  }
344
345
  function ae() {
345
346
  var e;
346
- (e = M.value) == null || e.click();
347
+ (e = S.value) == null || e.click();
347
348
  }
348
349
  function se(e) {
349
350
  const a = e.target;
@@ -353,41 +354,41 @@ const He = {
353
354
  }
354
355
  a.value = "";
355
356
  }
356
- return he().resetOnMount(), (e, a) => {
357
- const o = J("fm-button");
357
+ return ge().resetOnMount(), (e, a) => {
358
+ const o = q("fm-button");
358
359
  return r(), c(P, null, [
359
360
  _.value ? (r(), c("div", He, [
360
- I(qe, {
361
+ I(Ge, {
361
362
  "matched-images": w.value,
362
363
  "unmatched-images": l.value,
363
364
  onCancel: te,
364
365
  onUpdate: ee
365
366
  }, null, 8, ["matched-images", "unmatched-images"])
366
- ])) : (r(), oe(pe, {
367
+ ])) : (r(), oe(ue, {
367
368
  key: 1,
368
369
  heading: h(j)("menu.productInternalTools.title")
369
370
  }, {
370
- default: R(() => [
371
- I(ye)
371
+ default: A(() => [
372
+ I(fe)
372
373
  ]),
373
- "append-heading": R(() => [
374
- s("div", Ke, [
375
- s("div", Xe, [
374
+ "append-heading": A(() => [
375
+ s("div", Xe, [
376
+ s("div", Ke, [
376
377
  s("div", Qe, [
377
378
  s("p", Ye, U(m.value), 1)
378
379
  ])
379
380
  ]),
380
381
  s("div", et, [
381
382
  I(o, {
382
- "bg-color": h(S).NeutralGray100,
383
- "text-color": h(S).TypoSecondary,
383
+ "bg-color": h(M).NeutralGray100,
384
+ "text-color": h(M).TypoSecondary,
384
385
  variant: h(z).Primary,
385
386
  label: "Download Images",
386
- onClick: q
387
+ onClick: G
387
388
  }, null, 8, ["bg-color", "text-color", "variant"]),
388
389
  I(o, {
389
- "bg-color": h(S).NeutralGray100,
390
- "text-color": h(S).TypoSecondary,
390
+ "bg-color": h(M).NeutralGray100,
391
+ "text-color": h(M).TypoSecondary,
391
392
  variant: h(z).Primary,
392
393
  label: "Update Images",
393
394
  onClick: ae
@@ -399,7 +400,7 @@ const He = {
399
400
  }, 8, ["heading"])),
400
401
  s("input", {
401
402
  ref_key: "fileInput",
402
- ref: M,
403
+ ref: S,
403
404
  type: "file",
404
405
  multiple: "",
405
406
  accept: "image/*,.zip",
@@ -411,5 +412,5 @@ const He = {
411
412
  }
412
413
  });
413
414
  export {
414
- dt as default
415
+ mt as default
415
416
  };