@feedmepos/mf-inventory-portal 1.8.0-dev.2 → 1.8.0-dev.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 (132) hide show
  1. package/dist/{App-DVHgBTHP.js → App-FeJnwZme.js} +364 -377
  2. package/dist/{ApprovalView-RaXuWWSu.js → ApprovalView-Eo-cGWyA.js} +9 -9
  3. package/dist/{BindingsDialog-DomvXijP.js → BindingsDialog-DkjuXydb.js} +2 -2
  4. package/dist/{BindingsPicker-DGnzxEs7.js → BindingsPicker-DUOQcOlj.js} +2 -2
  5. package/dist/{BindingsTable-DfG9kWrv.js → BindingsTable-CoDdU5xh.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-DxHWrfbi.js → BulkReceiveRequestView-BGh8fbEX.js} +19 -19
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CVekIoiN.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CStISRqy.js} +1 -1
  8. package/dist/{ClosingDraftView-C3n66bbh.js → ClosingDraftView-Cwnhrv5P.js} +20 -20
  9. package/dist/{ClosingHistoryView-kdpYGy1Y.js → ClosingHistoryView-oHf77Lal.js} +5 -5
  10. package/dist/{ClosingTemplateView-DwGloYxn.js → ClosingTemplateView-1P8J1vAn.js} +18 -18
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-9eY_r8LF.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BuEPaqQK.js} +1 -1
  12. package/dist/{DefaultView-JC_e4xgC.js → DefaultView-3Z8aVFSU.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-BBCvI67S.js → DeliveryOrderPrintPreview-uT_e3Suw.js} +2 -2
  14. package/dist/{DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-5Cc08Svt.js → DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-D_vmtZDZ.js} +1 -1
  15. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-H4FWc9ga.js → EmailDialog.vue_vue_type_script_setup_true_lang-BCgnXxEi.js} +26 -25
  16. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-D-RzUmqA.js +81 -0
  17. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Q8Mptiv3.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BlKpGdCx.js} +1 -1
  18. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CE1_yyHe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DKkxn1J-.js} +2 -2
  19. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CGJi3f86.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-dOXDST-E.js} +2 -2
  20. package/dist/{FmMultiselectDialog-yVPY5aBV.js → FmMultiselectDialog-C8uYx8rr.js} +1 -1
  21. package/dist/{FmMultiselectDialog-DCaRlBIy.js → FmMultiselectDialog-DRxZAkcu.js} +2 -2
  22. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-ClaLVtpK.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DRSzQqVJ.js} +6 -6
  23. package/dist/{ImportView-DQrVMzxN.js → ImportView-Qigtf3ik.js} +6 -6
  24. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-7lT5UZc8.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8PJeYrP.js} +1 -1
  25. package/dist/{IngredientGroupView-BMUnEaY7.js → IngredientGroupView-RNYZLkQu.js} +7 -7
  26. package/dist/{IngredientsView-DPj9lBTK.js → IngredientsView-N9U7tdI_.js} +29 -23
  27. package/dist/{IntegrationExplorerView-CO2wpUR_.js → IntegrationExplorerView-CjmeGQ14.js} +4 -4
  28. package/dist/{IntegrationView-DIeZoey0.js → IntegrationView-DAdpmuxx.js} +15 -15
  29. package/dist/{InventoryBindingForm-Cj4_Chue.js → InventoryBindingForm-CAj3MurI.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CaBOK7NC.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-3pYuu62C.js} +5 -5
  31. package/dist/{InventoryBindingSummary-yzGzd7jJ.js → InventoryBindingSummary-B-1OBUdw.js} +1 -1
  32. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DzzTPdyF.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CUYYEuW3.js} +1 -1
  33. package/dist/{ProductionRunDetailView-Cw-ecaey.js → ProductionRunDetailView-eFvl8-By.js} +4 -4
  34. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BYyiiAWb.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DaC7e4qS.js} +7 -7
  35. package/dist/{ProductionRunView-C11eseXQ.js → ProductionRunView-C_NJJKLr.js} +3 -3
  36. package/dist/{PublishView-CPK9NeVF.js → PublishView-BglAEkzU.js} +3 -3
  37. package/dist/{PurchaseOrderPrintPreview-DosqWQeN.js → PurchaseOrderPrintPreview-BTF9ikpQ.js} +2 -2
  38. package/dist/{ReceiveRequestView-BxSkpK2t.js → ReceiveRequestView-BUvehG10.js} +13 -13
  39. package/dist/{RecipeView-oHDWsT0P.js → RecipeView-DO5-jgwh.js} +17 -17
  40. package/dist/{SettingsView-QlUNwFhM.js → SettingsView-DRR86cHo.js} +12 -13
  41. package/dist/{StockView-a8LbVZ_7.js → StockView-D1oEnbZp.js} +25 -23
  42. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-GdGJCuc0.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxU92-io.js} +1 -1
  43. package/dist/{SupplierView-BKxKoi_0.js → SupplierView-D68wz0-g.js} +14 -14
  44. package/dist/{SurchargeView-Db4cwhZv.js → SurchargeView-Cw9rTw2h.js} +7 -7
  45. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CpkF77Ow.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-Az-a1Dsp.js} +2 -2
  46. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CCCj4WVF.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C-sxbacO.js} +1 -1
  47. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CFNPXqt5.js → TransferDetails.vue_vue_type_script_setup_true_lang-CsHfLaCv.js} +234 -234
  48. package/dist/{TransferTemplateView-CzwxOBMQ.js → TransferTemplateView-CHPJMjYC.js} +20 -20
  49. package/dist/{UnitCostHistoryView-CqcyjCCd.js → UnitCostHistoryView-DM8OzWhe.js} +4 -4
  50. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DO80_8SZ.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DpwK5mFH.js} +4 -4
  51. package/dist/{UnitView-BqdK1AM_.js → UnitView-90uR-ZzQ.js} +8 -8
  52. package/dist/{WarehouseView-COJM9IXM.js → WarehouseView-Bulg6Vac.js} +8 -8
  53. package/dist/{WastageTemplateView-DW3viTHN.js → WastageTemplateView-BmAHnnwm.js} +15 -15
  54. package/dist/api/inventory.d.ts +9 -9
  55. package/dist/{app-yvK__CBL.js → app-Ccdgbe4f.js} +19 -18
  56. package/dist/app.js +1 -1
  57. package/dist/{closing-template-DezidSM0.js → closing-template-DuBZxoXx.js} +1 -1
  58. package/dist/components/FeatureCapabilityBadge.vue.d.ts +4 -0
  59. package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
  60. package/dist/{date2-2XjepIqc.js → date2-IBrLdtni.js} +1 -1
  61. package/dist/{dayjs.min-CNp5DLBB.js → dayjs.min-DEkq-Hpp.js} +1 -1
  62. package/dist/{decimal-Z7oJdGk8.js → decimal-g6jRdlSk.js} +2 -2
  63. package/dist/{defineDeepModel-CMxJn_H2.js → defineDeepModel-P5a5Ffpn.js} +1 -1
  64. package/dist/{duplicate-template-BetV5oy_.js → duplicate-template-Do8s80ei.js} +1 -1
  65. package/dist/{feature-CkWaZ-5K.js → feature-ChVm5JED.js} +875 -645
  66. package/dist/feature-flags/core.d.ts +3 -2
  67. package/dist/feature-flags/portal-feature-catalog.d.ts +2 -5
  68. package/dist/feature-flags/premium-flags.spec.d.ts +1 -0
  69. package/dist/feature-flags/vue.d.ts +2 -0
  70. package/dist/{format-time-from-id-DatSI9uD.js → format-time-from-id-BgbBOII7.js} +1 -1
  71. package/dist/{format-unit-display-DM5We5cx.js → format-unit-display-hSXy2iu6.js} +13 -13
  72. package/dist/{id-to-date-Dxw2jKhy.js → id-to-date-DlGYysU8.js} +1 -1
  73. package/dist/{import-export.helper-BOmADwUw.js → import-export.helper-LrZhiz2W.js} +6 -6
  74. package/dist/{index-7fz5sGDO.js → index-BTNJ1fk2.js} +3 -3
  75. package/dist/{index-ClYgfwW7.js → index-DCiNwlw2.js} +1 -1
  76. package/dist/{index-CIH9NCvs.js → index-DsOmtywr.js} +1 -1
  77. package/dist/{lz-string-CCsc2X7t.js → lz-string-DRuyjE9G.js} +1 -1
  78. package/dist/{netsuite-COumFXC2.js → netsuite-B6y8GZCP.js} +2 -2
  79. package/dist/{number-gSLvxNqA.js → number-Besn-1-5.js} +3 -3
  80. package/dist/{predefined-templates-Bw9A9LNA.js → predefined-templates-D92mN_2S.js} +1 -1
  81. package/dist/{purchase-order-template-BaZjdGq8.js → purchase-order-template-hvq2pfWx.js} +1 -1
  82. package/dist/{recalculationUtils-t32wAurN.js → recalculationUtils-BlZR5O2G.js} +1 -1
  83. package/dist/{row-action.enum-BDeudY4d.js → row-action.enum-R2bi3eAv.js} +1 -1
  84. package/dist/{rules-C1btu0Md.js → rules-DzwoRKUS.js} +2 -2
  85. package/dist/{stock-BF86TMW0.js → stock-Cq37EARQ.js} +3 -3
  86. package/dist/{stock-B59sfN28.js → stock-oJqnUrtt.js} +1 -1
  87. package/dist/stores/feature.d.ts +1 -0
  88. package/dist/stores/integration/netsuite.d.ts +2 -2
  89. package/dist/stores/location.d.ts +42 -42
  90. package/dist/stores/supplier.d.ts +48 -48
  91. package/dist/stores/warehouse.d.ts +1 -1
  92. package/dist/{supplier-DnbLJ_cS.js → supplier-DtdwvcPr.js} +2 -2
  93. package/dist/{surcharge-C1uE3uQa.js → surcharge-CjdJGIsM.js} +1 -1
  94. package/dist/tsconfig.app.tsbuildinfo +1 -1
  95. package/dist/{uom-rules-DjfyrFHJ.js → uom-rules-BqPn_GoZ.js} +1 -1
  96. package/dist/{use-ingredient-select-dialog-7A7fWyEH.js → use-ingredient-select-dialog-0hRCj6Fu.js} +2 -2
  97. package/dist/{use-inventory-binding-dialog-Cc1tjTfV.js → use-inventory-binding-dialog-BLRcIC1u.js} +2 -2
  98. package/dist/{use-template-enabled-locations-C-Hqqgzt.js → use-template-enabled-locations-8ZfTj4YB.js} +2 -2
  99. package/dist/{use-transfer-locations-CqsXvOI2.js → use-transfer-locations-BGS1EBEt.js} +2 -2
  100. package/dist/{useHrmPermission-BzwD3Ctc.js → useHrmPermission-BcQ2KPD-.js} +1 -1
  101. package/dist/{useNavigationMenu-PrZg9HS7.js → useNavigationMenu-DImtns81.js} +95 -93
  102. package/dist/{useSseClient-FCyLWq8k.js → useSseClient-DPSFFVci.js} +1 -1
  103. package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
  104. package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
  105. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
  106. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
  107. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
  108. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
  109. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
  110. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
  111. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
  112. package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
  113. package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
  114. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
  115. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +5 -5
  116. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
  117. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
  118. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
  119. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
  120. package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
  121. package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
  122. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
  123. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
  124. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
  125. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
  126. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
  127. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
  128. package/dist/{vue-i18n-C34f-Tph.js → vue-i18n-DTyGIjTI.js} +219 -219
  129. package/dist/{xlsx.util-X4amwe_k.js → xlsx.util-CK9Lnq3Q.js} +2 -2
  130. package/package.json +5 -5
  131. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js +0 -61
  132. package/dist/portal-feature-catalog-yGIESKTc.js +0 -246
@@ -1,31 +1,30 @@
1
- import { ref as k, onUnmounted as mt, computed as R, defineComponent as ce, watch as Z, onMounted as Ve, resolveComponent as Y, createElementBlock as c, openBlock as i, createBlock as pe, createCommentVNode as N, unref as $, createVNode as V, createElementVNode as h, toDisplayString as y, Fragment as j, renderList as oe, withKeys as Me, normalizeClass as ae, withModifiers as pt, withCtx as le, createTextVNode as ie, h as vt, onBeforeUnmount as gt, nextTick as yt, Teleport as ht, normalizeStyle as _t, mergeModels as bt, useModel as xt } from "vue";
2
- import { _ as wt } from "./empty-placeholder-B0QU467o.js";
3
- import { u as Ee, a as He, R as ue, d as kt, S as St, b as $t } from "./app-yvK__CBL.js";
4
- import { useCoreStore as ve, useI18n as he } from "@feedmepos/mf-common";
5
- import { useRouter as Ne, useRoute as Ct } from "vue-router";
6
- import { u as Je } from "./feature-CkWaZ-5K.js";
7
- import { u as Lt } from "./netsuite-COumFXC2.js";
8
- import { u as Ye, n as Rt, e as Dt } from "./useNavigationMenu-PrZg9HS7.js";
9
- import { useBreakpoints as It } from "@feedmepos/ui-library";
10
- import { F as We } from "./FmAdminBadge-DlplQOHb.js";
11
- import { i as Vt, _ as Et } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Q8Mptiv3.js";
12
- import { F as Nt } from "./decimal-Z7oJdGk8.js";
13
- import { t as Pt, a as Tt } from "./date2-2XjepIqc.js";
14
- import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- import { u as Ut } from "./useTabStorage-BkIVScW_.js";
16
- import { _ as Ft } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js";
17
- import { _ as At } from "./DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-5Cc08Svt.js";
18
- import { g as Oe } from "./portal-feature-catalog-yGIESKTc.js";
19
- import { u as Mt } from "./googlemap-D9vA7GsS.js";
20
- function Ot() {
1
+ import { ref as k, onUnmounted as ft, computed as D, defineComponent as ce, watch as Z, onMounted as Ie, resolveComponent as Y, createElementBlock as c, openBlock as i, createBlock as pe, createCommentVNode as N, unref as $, createVNode as I, createElementVNode as h, toDisplayString as y, Fragment as j, renderList as oe, withKeys as Ae, normalizeClass as ae, withModifiers as mt, withCtx as le, createTextVNode as ie, h as pt, onBeforeUnmount as vt, nextTick as gt, Teleport as yt, normalizeStyle as ht, mergeModels as _t, useModel as bt } from "vue";
2
+ import { _ as xt } from "./empty-placeholder-B0QU467o.js";
3
+ import { u as je, a as He, R as ue, d as wt, S as kt, b as St } from "./app-Ccdgbe4f.js";
4
+ import { useCoreStore as ge, useI18n as he } from "@feedmepos/mf-common";
5
+ import { useRouter as Ee, useRoute as $t } from "vue-router";
6
+ import { u as Ct, g as Me } from "./feature-ChVm5JED.js";
7
+ import { u as Lt } from "./netsuite-B6y8GZCP.js";
8
+ import { u as Je, n as Rt, e as Dt } from "./useNavigationMenu-DImtns81.js";
9
+ import { useBreakpoints as Vt } from "@feedmepos/ui-library";
10
+ import { F as Ye } from "./FmAdminBadge-DlplQOHb.js";
11
+ import { i as It, _ as Et } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BlKpGdCx.js";
12
+ import { F as Nt } from "./decimal-g6jRdlSk.js";
13
+ import { t as Pt, a as Tt } from "./date2-IBrLdtni.js";
14
+ import { _ as Ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
+ import { u as Bt } from "./useTabStorage-BkIVScW_.js";
16
+ import { _ as Ft, u as At } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-D-RzUmqA.js";
17
+ import { _ as Mt } from "./DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-D_vmtZDZ.js";
18
+ import { u as Ot } from "./googlemap-D9vA7GsS.js";
19
+ function Kt() {
21
20
  return {
22
21
  loadingHookInstalled: !1,
23
22
  isLoading: !1
24
23
  };
25
24
  }
26
- const me = k(Ot());
27
- function Kt() {
28
- const o = Ne();
25
+ const me = k(Kt());
26
+ function Gt() {
27
+ const o = Ee();
29
28
  if (!me.value.loadingHookInstalled) {
30
29
  me.value.loadingHookInstalled = !0;
31
30
  const e = o.beforeEach(() => {
@@ -33,7 +32,7 @@ function Kt() {
33
32
  }), t = o.afterEach(() => {
34
33
  me.value.isLoading = !1;
35
34
  });
36
- mt(() => {
35
+ ft(() => {
37
36
  me.value.loadingHookInstalled = !1, e(), t();
38
37
  });
39
38
  }
@@ -43,34 +42,34 @@ function Kt() {
43
42
  }
44
43
  };
45
44
  }
46
- function Gt() {
47
- const { firstAccessibleRouteName: o } = Ye();
48
- return { hasAnyAccessibleInventoryRoute: R(() => o.value !== null) };
45
+ function zt() {
46
+ const { firstAccessibleRouteName: o } = Je();
47
+ return { hasAnyAccessibleInventoryRoute: D(() => o.value !== null) };
49
48
  }
50
- const zt = {
49
+ const jt = {
51
50
  key: 0,
52
51
  class: "flex flex-col items-center w-full h-full gap-24"
53
- }, jt = {
52
+ }, Ht = {
54
53
  key: 1,
55
54
  class: "flex flex-col pt-[200px] gap-32 items-center"
56
- }, Ht = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, Jt = { class: "fm-typo-en-title-lg-600" }, Yt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Wt = {
55
+ }, Jt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, Yt = { class: "fm-typo-en-title-lg-600" }, Wt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Xt = {
57
56
  key: 2,
58
57
  class: "flex flex-col pt-[200px] gap-32 items-center"
59
- }, Xt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, qt = { class: "fm-typo-en-title-lg-600" }, Zt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Qt = { class: "flex gap-16" }, en = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, tn = { href: "https://feedme.ai/form" }, nn = /* @__PURE__ */ ce({
58
+ }, qt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Zt = { class: "fm-typo-en-title-lg-600" }, Qt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, en = { class: "flex gap-16" }, tn = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, nn = { href: "https://feedme.ai/form" }, on = /* @__PURE__ */ ce({
60
59
  __name: "InventoryView",
61
60
  setup(o) {
62
- const e = Ee(), t = He(), l = Lt(), a = ve(), s = Ne(), r = Kt(), u = Je(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: p } = Gt();
61
+ const e = je(), t = He(), l = Lt(), a = ge(), s = Ee(), r = Gt(), u = Ct(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: p } = zt();
63
62
  Z(
64
63
  [() => a.sessionUser.value, () => a.currentBusiness.value],
65
64
  ([O, C]) => {
66
- I(O, C);
65
+ V(O, C);
67
66
  }
68
- ), Ve(async () => {
67
+ ), Ie(async () => {
69
68
  await u.init(), await a.readBusinesses();
70
69
  const O = a.sessionUser.value, C = a.currentBusiness.value;
71
- I(O, C);
70
+ V(O, C);
72
71
  });
73
- function I(O, C) {
72
+ function V(O, C) {
74
73
  !O || !C || E();
75
74
  }
76
75
  async function E() {
@@ -78,13 +77,13 @@ const zt = {
78
77
  console.error("[all] error on reading netsuite store", O);
79
78
  }), await t.init();
80
79
  }
81
- const P = R(() => s.currentRoute.value.name === ue.TRANSFER_TEMPLATE ? u.enablePoTemplate : s.currentRoute.value.name === ue.INGREDIENT_GROUP ? u.enableIngredientGroup : !0), F = R(
80
+ const P = D(() => s.currentRoute.value.name === ue.TRANSFER_TEMPLATE ? u.enablePoTemplate : s.currentRoute.value.name === ue.INGREDIENT_GROUP ? u.enableIngredientGroup : !0), F = D(
82
81
  () => s.currentRoute.value.matched.some((O) => {
83
82
  var L;
84
83
  const C = O.meta, H = C == null ? void 0 : C.validationManifest;
85
84
  return (((L = H == null ? void 0 : H.requiredCaslPermissions) == null ? void 0 : L.length) ?? 0) > 0;
86
85
  })
87
- ), Q = R(() => {
86
+ ), Q = D(() => {
88
87
  if (!a.sessionUser.value) return !1;
89
88
  if (e._locations !== null && e.locations.length === 0) return !0;
90
89
  if (!u.isLoaded) return !1;
@@ -94,37 +93,37 @@ const zt = {
94
93
  return (O, C) => {
95
94
  const H = Y("FmSpacer"), L = Y("FmCircularProgress"), _ = Y("FmButton"), w = Y("RouterView");
96
95
  return i(), c("div", null, [
97
- $(r).isLoading ? (i(), c("div", zt, [
98
- V(H),
96
+ $(r).isLoading ? (i(), c("div", jt, [
97
+ I(H),
99
98
  h("div", null, [
100
- V(L, { size: "xl" })
99
+ I(L, { size: "xl" })
101
100
  ]),
102
101
  C[0] || (C[0] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
103
- V(H)
104
- ])) : Q.value ? (i(), c("div", jt, [
102
+ I(H)
103
+ ])) : Q.value ? (i(), c("div", Ht, [
105
104
  C[1] || (C[1] = h("img", {
106
- src: wt,
105
+ src: xt,
107
106
  alt: "No permission",
108
107
  class: "w-[200px] h-[200px]"
109
108
  }, null, -1)),
110
- h("div", Ht, [
111
- h("div", Jt, y($(v)("inventory.common.noPermission.title")), 1),
112
- h("div", Yt, y($(v)("inventory.common.noPermission.description")), 1)
109
+ h("div", Jt, [
110
+ h("div", Yt, y($(v)("inventory.common.noPermission.title")), 1),
111
+ h("div", Wt, y($(v)("inventory.common.noPermission.description")), 1)
113
112
  ])
114
- ])) : P.value ? $(a).sessionUser.value ? (i(), pe(w, { key: 3 })) : N("", !0) : (i(), c("div", Wt, [
115
- h("div", Xt, [
116
- h("div", qt, y($(v)("inventory.common.proPlan.title")), 1),
117
- h("div", Zt, y($(v)("inventory.common.proPlan.subtitle")), 1)
113
+ ])) : P.value ? $(a).sessionUser.value ? (i(), pe(w, { key: 3 })) : N("", !0) : (i(), c("div", Xt, [
114
+ h("div", qt, [
115
+ h("div", Zt, y($(v)("inventory.common.proPlan.title")), 1),
116
+ h("div", Qt, y($(v)("inventory.common.proPlan.subtitle")), 1)
118
117
  ]),
119
- h("div", Qt, [
120
- h("a", en, [
121
- V(_, {
118
+ h("div", en, [
119
+ h("a", tn, [
120
+ I(_, {
122
121
  label: $(v)("inventory.common.proPlan.comparePlans"),
123
122
  variant: "secondary"
124
123
  }, null, 8, ["label"])
125
124
  ]),
126
- h("a", tn, [
127
- V(_, {
125
+ h("a", nn, [
126
+ I(_, {
128
127
  label: $(v)("inventory.common.proPlan.callUs"),
129
128
  "prepend-icon": "call"
130
129
  }, null, 8, ["label"])
@@ -207,10 +206,10 @@ const zt = {
207
206
  "contains.alternatives": "_id"
208
207
  }
209
208
  };
210
- function on(o) {
211
- return o instanceof St && o.errorResponse.statusCode === 409;
209
+ function an(o) {
210
+ return o instanceof kt && o.errorResponse.statusCode === 409;
212
211
  }
213
- const _e = kt((o, e) => ({
212
+ const _e = wt((o, e) => ({
214
213
  /**
215
214
  * Commits for one record. recordId is the changelog docId, `${dbName}/${id}`.
216
215
  * The dbName scopes the (access-checked) backend route; only the bare id is
@@ -221,8 +220,8 @@ const _e = kt((o, e) => ({
221
220
  if (r < 0) return [];
222
221
  const u = t.slice(0, r), v = t.slice(r + 1), p = new URLSearchParams({ id: v });
223
222
  l != null && p.set("limit", String(l)), s && p.set("before", s), a && (p.set("explain", "1"), p.set("schema", JSON.stringify(a)));
224
- const I = `${o.inventoryBackendUrl}/${u}/changelog?${p.toString()}`;
225
- return await e.get(I);
223
+ const V = `${o.inventoryBackendUrl}/${u}/changelog?${p.toString()}`;
224
+ return await e.get(V);
226
225
  },
227
226
  /**
228
227
  * Purchase orders in a date range, each with when it last changed. The
@@ -288,10 +287,10 @@ const _e = kt((o, e) => ({
288
287
  return await e.get(a);
289
288
  }
290
289
  })), Se = 50;
291
- function an() {
290
+ function sn() {
292
291
  const o = _e(), e = k([]), t = k(!1), l = k(!1);
293
292
  let a = null, s = 0;
294
- async function r(v, p, I) {
293
+ async function r(v, p, V) {
295
294
  const E = ++s;
296
295
  if (a = null, l.value = !1, !v) {
297
296
  e.value = [];
@@ -299,9 +298,9 @@ function an() {
299
298
  }
300
299
  t.value = !0;
301
300
  try {
302
- const P = p ?? Se, F = await o.getRecordChangelog(v, P, I);
301
+ const P = p ?? Se, F = await o.getRecordChangelog(v, P, V);
303
302
  if (E !== s) return;
304
- e.value = F, p == null && (a = { recordId: v, explain: I }, l.value = F.length === P);
303
+ e.value = F, p == null && (a = { recordId: v, explain: V }, l.value = F.length === P);
305
304
  } catch (P) {
306
305
  throw E === s && (e.value = []), P;
307
306
  } finally {
@@ -314,33 +313,33 @@ function an() {
314
313
  const p = s;
315
314
  t.value = !0;
316
315
  try {
317
- const I = await o.getRecordChangelog(a.recordId, Se, a.explain, v.id);
316
+ const V = await o.getRecordChangelog(a.recordId, Se, a.explain, v.id);
318
317
  if (p !== s) return;
319
- e.value = [...e.value, ...I], l.value = I.length === Se;
318
+ e.value = [...e.value, ...V], l.value = V.length === Se;
320
319
  } finally {
321
320
  p === s && (t.value = !1);
322
321
  }
323
322
  }
324
323
  return { commits: e, isLoading: t, hasMore: l, load: r, loadMore: u };
325
324
  }
326
- const Xe = 1e3;
327
- function Ke(o) {
325
+ const We = 1e3;
326
+ function Oe(o) {
328
327
  const e = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d+))?/.exec(o);
329
328
  return e ? `${e[1]}.${(e[2] ?? "").padEnd(9, "0").slice(0, 9)}` : o;
330
329
  }
331
- function sn(o, e) {
330
+ function ln(o, e) {
332
331
  return [...o, ...e].sort(
333
- (t, l) => Ke(l.at).localeCompare(Ke(t.at)) || l.id.localeCompare(t.id)
332
+ (t, l) => Oe(l.at).localeCompare(Oe(t.at)) || l.id.localeCompare(t.id)
334
333
  );
335
334
  }
336
- function ln() {
335
+ function rn() {
337
336
  const o = _e(), e = k([]);
338
337
  async function t(l) {
339
338
  if (e.value = [], !!l)
340
339
  try {
341
340
  e.value = await o.getRecordChangelog(
342
341
  l,
343
- Xe,
342
+ We,
344
343
  Re
345
344
  );
346
345
  } catch (a) {
@@ -349,7 +348,7 @@ function ln() {
349
348
  }
350
349
  return { commits: e, load: t };
351
350
  }
352
- function qe(o) {
351
+ function Xe(o) {
353
352
  if (!o) return null;
354
353
  try {
355
354
  const e = JSON.parse(o);
@@ -362,28 +361,28 @@ function qe(o) {
362
361
  return null;
363
362
  }
364
363
  }
365
- function Ze(o) {
364
+ function qe(o) {
366
365
  return o.startsWith("inventory.changelog.");
367
366
  }
368
- const Qe = "";
367
+ const Ze = "";
369
368
  function De(o) {
370
- const e = o.indexOf(Qe);
369
+ const e = o.indexOf(Ze);
371
370
  return e === -1 ? { raw: o, human: o } : { raw: o.slice(0, e), human: o.slice(e + 1) };
372
371
  }
373
- const rn = [
372
+ const un = [
374
373
  "inventory.changelog.label.recipe",
375
374
  "inventory.changelog.label.sku",
376
375
  "inventory.changelog.label.unit"
377
- ], un = [...rn, "Recipe", "Ingredient", "Unit"];
378
- function cn(o) {
376
+ ], cn = [...un, "Recipe", "Ingredient", "Unit"];
377
+ function dn(o) {
379
378
  const { human: e } = De(o);
380
379
  if (!e) return { type: "Document", name: "", field: [] };
381
380
  const t = e.split(" › ");
382
- return t.length >= 2 && un.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
381
+ return t.length >= 2 && cn.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
383
382
  }
384
- const Ge = 800;
385
- function et(o, e, t = 2) {
386
- const l = ze(o), a = ze(e);
383
+ const Ke = 800;
384
+ function Qe(o, e, t = 2) {
385
+ const l = Ge(o), a = Ge(e);
387
386
  if (!l || !a) return null;
388
387
  let s = 0;
389
388
  for (; s < l.length && s < a.length && l[s] === a[s]; ) s++;
@@ -391,14 +390,14 @@ function et(o, e, t = 2) {
391
390
  for (; r < l.length - s && r < a.length - s && l[l.length - 1 - r] === a[a.length - 1 - r]; )
392
391
  r++;
393
392
  const u = l.slice(s, l.length - r), v = a.slice(s, a.length - r);
394
- if (u.length > Ge || v.length > Ge) return null;
395
- const p = (I) => ({ type: "same", text: I });
396
- return fn(
397
- [...l.slice(0, s).map(p), ...dn(u, v), ...l.slice(l.length - r).map(p)],
393
+ if (u.length > Ke || v.length > Ke) return null;
394
+ const p = (V) => ({ type: "same", text: V });
395
+ return mn(
396
+ [...l.slice(0, s).map(p), ...fn(u, v), ...l.slice(l.length - r).map(p)],
398
397
  t
399
398
  );
400
399
  }
401
- function ze(o) {
400
+ function Ge(o) {
402
401
  try {
403
402
  const e = JSON.parse(o);
404
403
  return e === null || typeof e != "object" ? null : JSON.stringify(e, null, 2).split(`
@@ -407,7 +406,7 @@ function ze(o) {
407
406
  return null;
408
407
  }
409
408
  }
410
- function dn(o, e) {
409
+ function fn(o, e) {
411
410
  const t = o.length, l = e.length, a = Array.from({ length: t + 1 }, () => new Uint32Array(l + 1));
412
411
  for (let v = t - 1; v >= 0; v--)
413
412
  for (let p = l - 1; p >= 0; p--)
@@ -420,7 +419,7 @@ function dn(o, e) {
420
419
  for (; u < l; ) s.push({ type: "add", text: e[u++] });
421
420
  return s;
422
421
  }
423
- function fn(o, e) {
422
+ function mn(o, e) {
424
423
  const t = o.map(() => !1);
425
424
  o.forEach((s, r) => {
426
425
  if (s.type !== "same")
@@ -433,7 +432,7 @@ function fn(o, e) {
433
432
  t[r] ? (l.push(s), a = !1) : a || (l.push({ type: "skip", text: "⋯" }), a = !0);
434
433
  }), l;
435
434
  }
436
- function mn(o, e) {
435
+ function pn(o, e) {
437
436
  let t;
438
437
  try {
439
438
  t = JSON.parse(o);
@@ -442,32 +441,32 @@ function mn(o, e) {
442
441
  }
443
442
  return t === null ? "—" : typeof t == "number" ? t.toLocaleString() : typeof t == "boolean" ? e(t ? "inventory.changelog.yes" : "inventory.changelog.no") : String(t);
444
443
  }
445
- function Ie(o, e, t = 0, l) {
444
+ function Ve(o, e, t = 0, l) {
446
445
  var p;
447
- const a = o.label == null ? void 0 : Ze(o.label) ? e(o.label) : o.label, s = a != null || o.value != null || o.display != null, r = !((p = o.kids) != null && p.length), u = [];
446
+ const a = o.label == null ? void 0 : qe(o.label) ? e(o.label) : o.label, s = a != null || o.value != null || o.display != null, r = !((p = o.kids) != null && p.length), u = [];
448
447
  s && u.push({
449
448
  depth: t,
450
449
  // A bare array index says nothing a reader needs — a leaf list entry
451
450
  // shows just its value. Branch nodes keep the index as their header.
452
451
  label: a != null && r && /^\d+$/.test(a) ? void 0 : a,
453
- text: r ? pn(o, e, l) : void 0,
452
+ text: r ? vn(o, e, l) : void 0,
454
453
  bookkeeping: !!o.bookkeeping
455
454
  });
456
455
  const v = s ? t + 1 : t;
457
- for (const I of o.kids ?? [])
458
- u.push(...Ie(I, e, v, l));
456
+ for (const V of o.kids ?? [])
457
+ u.push(...Ve(V, e, v, l));
459
458
  return u;
460
459
  }
461
- function pn(o, e, t) {
460
+ function vn(o, e, t) {
462
461
  if (o.value == null) return o.display || void 0;
463
- const l = mn(o.value, e);
462
+ const l = pn(o.value, e);
464
463
  return (t == null ? void 0 : t(l)) ?? o.display ?? l;
465
464
  }
466
465
  function $e(o, e) {
467
466
  return JSON.stringify(o, null, 2).split(`
468
467
  `).map((t) => ({ type: e, text: t }));
469
468
  }
470
- function vn() {
469
+ function gn() {
471
470
  const o = _e(), e = /* @__PURE__ */ new Map(), t = k(!1), l = k(null);
472
471
  async function a(s) {
473
472
  const r = e.get(s.id);
@@ -477,16 +476,16 @@ function vn() {
477
476
  }
478
477
  t.value = !0;
479
478
  try {
480
- const u = s.doc_id.indexOf("/"), v = s.doc_id.slice(0, u), p = s.doc_id.slice(u + 1), [I, E] = await Promise.all([
479
+ const u = s.doc_id.indexOf("/"), v = s.doc_id.slice(0, u), p = s.doc_id.slice(u + 1), [V, E] = await Promise.all([
481
480
  s.parent ? o.getState(v, p, s.parent) : Promise.resolve({}),
482
481
  o.getState(v, p, s.id)
483
- ]), F = { diff: s.parent ? et(JSON.stringify(I), JSON.stringify(E)) ?? [
484
- ...$e(I, "del"),
482
+ ]), F = { diff: s.parent ? Qe(JSON.stringify(V), JSON.stringify(E)) ?? [
483
+ ...$e(V, "del"),
485
484
  ...$e(E, "add")
486
485
  ] : $e(E, "add"), conflict: !1 };
487
486
  e.set(s.id, F), l.value = F;
488
487
  } catch (u) {
489
- if (!on(u))
488
+ if (!an(u))
490
489
  throw l.value = null, u;
491
490
  const v = { diff: null, conflict: !0 };
492
491
  e.set(s.id, v), l.value = v;
@@ -496,67 +495,67 @@ function vn() {
496
495
  }
497
496
  return { isLoading: t, result: l, load: a };
498
497
  }
499
- const gn = {
498
+ const yn = {
500
499
  key: 0,
501
500
  class: "flex justify-center p-16"
502
- }, yn = {
501
+ }, hn = {
503
502
  key: 1,
504
503
  class: "p-16 text-center text-gray-500"
505
- }, hn = {
504
+ }, _n = {
506
505
  key: 2,
507
506
  class: "flex h-full min-h-0 gap-8"
508
- }, _n = { class: "w-1/3 shrink-0 overflow-y-auto border-r border-gray-200 pr-4" }, bn = ["onClick", "onKeydown"], xn = { class: "fm-typo-en-body-md-600" }, wn = { class: "text-xs text-gray-500" }, kn = {
507
+ }, bn = { class: "w-1/3 shrink-0 overflow-y-auto border-r border-gray-200 pr-4" }, xn = ["onClick", "onKeydown"], wn = { class: "fm-typo-en-body-md-600" }, kn = { class: "text-xs text-gray-500" }, Sn = {
509
508
  key: 0,
510
509
  class: "flex-1 overflow-y-auto pl-4"
511
- }, Sn = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, $n = { class: "flex flex-wrap items-center gap-8" }, Cn = { class: "fm-typo-en-body-lg-600" }, Ln = {
510
+ }, $n = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, Cn = { class: "flex flex-wrap items-center gap-8" }, Ln = { class: "fm-typo-en-body-lg-600" }, Rn = {
512
511
  key: 0,
513
512
  class: "rounded-full bg-gray-100 px-8 text-xs text-gray-500"
514
- }, Rn = { class: "text-xs text-gray-500" }, Dn = { class: "mb-12" }, In = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, Vn = {
513
+ }, Dn = { class: "text-xs text-gray-500" }, Vn = { class: "mb-12" }, In = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, En = {
515
514
  key: 0,
516
515
  class: "mb-12"
517
- }, En = {
516
+ }, Nn = {
518
517
  key: 1,
519
518
  class: "text-sm text-gray-400"
520
- }, Nn = {
519
+ }, Pn = {
521
520
  key: 2,
522
521
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
523
- }, Pn = {
522
+ }, Tn = {
524
523
  key: 0,
525
524
  class: "text-xs text-gray-400"
526
- }, Tn = { class: "fm-typo-en-body-md-600" }, Bn = { class: "flex flex-col gap-6" }, Un = {
525
+ }, Un = { class: "fm-typo-en-body-md-600" }, Bn = { class: "flex flex-col gap-6" }, Fn = {
527
526
  key: 0,
528
527
  class: "text-gray-700"
529
- }, Fn = { class: "min-w-[120px] shrink-0 text-gray-500" }, An = {
528
+ }, An = { class: "min-w-[120px] shrink-0 text-gray-500" }, Mn = {
530
529
  key: 0,
531
530
  class: "flex w-full flex-col gap-4"
532
- }, Mn = {
531
+ }, On = {
533
532
  key: 0,
534
533
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
535
- }, On = { key: 0 }, Kn = { key: 1 }, Gn = {
534
+ }, Kn = { key: 0 }, Gn = { key: 1 }, zn = {
536
535
  key: 1,
537
536
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
538
- }, zn = { key: 0 }, jn = { key: 1 }, Hn = {
537
+ }, jn = { key: 0 }, Hn = { key: 1 }, Jn = {
539
538
  key: 1,
540
539
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
541
- }, Jn = {
540
+ }, Yn = {
542
541
  key: 2,
543
542
  class: "flex w-full flex-wrap items-baseline gap-4"
544
- }, Yn = {
543
+ }, Wn = {
545
544
  key: 0,
546
545
  class: "rounded bg-red-50 px-4 text-red-700"
547
- }, Wn = {
546
+ }, Xn = {
548
547
  key: 1,
549
548
  class: "text-gray-400"
550
- }, Xn = {
549
+ }, qn = {
551
550
  key: 2,
552
551
  class: "rounded bg-green-50 px-4 text-green-700"
553
- }, qn = {
552
+ }, Zn = {
554
553
  key: 1,
555
554
  class: "text-sm text-gray-500"
556
- }, Zn = {
555
+ }, Qn = {
557
556
  key: 2,
558
557
  class: "mt-16 break-all border-t border-gray-200 pt-8 font-mono text-xs text-gray-400"
559
- }, Qn = { key: 0 }, eo = "capture baseline", to = /* @__PURE__ */ ce({
558
+ }, eo = { key: 0 }, to = "capture baseline", no = /* @__PURE__ */ ce({
560
559
  __name: "ChangelogPanel",
561
560
  props: {
562
561
  commits: {},
@@ -564,9 +563,9 @@ const gn = {
564
563
  resolveName: { type: Function }
565
564
  },
566
565
  setup(o) {
567
- const e = o, { t } = he(), l = k(null), a = R(
566
+ const e = o, { t } = he(), l = k(null), a = D(
568
567
  () => e.commits.find((f) => f.id === l.value)
569
- ), s = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), r = R(() => {
568
+ ), s = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), r = D(() => {
570
569
  var b;
571
570
  return (((b = a.value) == null ? void 0 : b.changes) ?? []).filter((M) => {
572
571
  const { raw: A } = De(M.path);
@@ -581,9 +580,9 @@ const gn = {
581
580
  },
582
581
  { immediate: !0 }
583
582
  );
584
- const u = k(!1), { isLoading: v, result: p, load: I } = vn();
583
+ const u = k(!1), { isLoading: v, result: p, load: V } = gn();
585
584
  Z([u, a], ([f, b]) => {
586
- p.value = null, !(!f || !b) && I(b).catch((M) => {
585
+ p.value = null, !(!f || !b) && V(b).catch((M) => {
587
586
  console.error("changelog snapshot load failed", M), u.value = !1;
588
587
  });
589
588
  });
@@ -607,38 +606,38 @@ const gn = {
607
606
  return (f.authors || []).join(", ") || t("inventory.changelog.unknownActor");
608
607
  }
609
608
  function O(f) {
610
- if (f.message === eo) return t("inventory.changelog.captureBaseline");
611
- const b = qe(f.message);
609
+ if (f.message === to) return t("inventory.changelog.captureBaseline");
610
+ const b = Xe(f.message);
612
611
  if (!b) return f.message || t("inventory.changelog.noMessage");
613
612
  const M = C(b.labelKey);
614
613
  return b.name ? t(`inventory.changelog.message.${b.verb}`, { module: M, name: b.name }) : t(`inventory.changelog.message.${b.verb}NoName`, { module: M });
615
614
  }
616
615
  function C(f) {
617
- return Ze(f) ? t(f) : f;
616
+ return qe(f) ? t(f) : f;
618
617
  }
619
618
  const H = (f) => /[^a-zA-Z]/.test(f);
620
619
  function L(f, b) {
621
- return f == null || b == null ? null : et(f, b);
620
+ return f == null || b == null ? null : Qe(f, b);
622
621
  }
623
622
  function _(f) {
624
623
  if (!(!f.to_value && !f.from_value))
625
624
  return {
626
- toTree: f.to_value ? Ie(f.to_value, t, 0, e.resolveName) : void 0,
627
- fromTree: f.from_value ? Ie(f.from_value, t, 0, e.resolveName) : void 0
625
+ toTree: f.to_value ? Ve(f.to_value, t, 0, e.resolveName) : void 0,
626
+ fromTree: f.from_value ? Ve(f.from_value, t, 0, e.resolveName) : void 0
628
627
  };
629
628
  }
630
629
  function w(f) {
631
630
  return f === "add" ? "bg-green-50 text-green-700" : f === "del" ? "bg-red-50 text-red-700" : f === "skip" ? "text-gray-400" : "text-gray-600";
632
631
  }
633
- function B(f) {
632
+ function U(f) {
634
633
  return f.type === "skip" ? f.text : (f.type === "add" ? "+ " : f.type === "del" ? "- " : " ") + f.text;
635
634
  }
636
- const K = R(() => {
635
+ const K = D(() => {
637
636
  const f = /* @__PURE__ */ new Map(), b = [], M = (g, m) => {
638
637
  let T = f.get(g);
639
638
  return T || (T = m(), f.set(g, T), b.push(T)), T;
640
639
  }, A = () => M("@doc", () => ({ header: "", lines: [] })), X = (g, m) => {
641
- var U;
640
+ var B;
642
641
  if (g == null) return m;
643
642
  let T;
644
643
  try {
@@ -646,19 +645,19 @@ const gn = {
646
645
  } catch {
647
646
  T = g;
648
647
  }
649
- return (typeof T == "string" ? (U = e.resolveName) == null ? void 0 : U.call(e, T) : void 0) ?? m;
648
+ return (typeof T == "string" ? (B = e.resolveName) == null ? void 0 : B.call(e, T) : void 0) ?? m;
650
649
  }, J = (g, m, T) => {
651
- var U, W, ee, te;
650
+ var B, W, ee, te;
652
651
  const x = _(m);
653
652
  x ? g.lines.push({ label: T, ...x }) : m.from != null && m.to != null ? g.lines.push({
654
653
  label: T,
655
654
  from: m.from,
656
655
  to: m.to,
657
656
  diff: L(m.from, m.to),
658
- fromDisplay: X(m.from, (U = m.display) == null ? void 0 : U.from),
657
+ fromDisplay: X(m.from, (B = m.display) == null ? void 0 : B.from),
659
658
  toDisplay: X(m.to, (W = m.display) == null ? void 0 : W.to)
660
659
  }) : m.to != null ? g.lines.push({ label: T, to: m.to, toDisplay: X(m.to, (ee = m.display) == null ? void 0 : ee.to) }) : g.lines.push({ label: T, from: m.from, fromDisplay: X(m.from, (te = m.display) == null ? void 0 : te.from) });
661
- }, D = (g) => {
660
+ }, R = (g) => {
662
661
  var T;
663
662
  const m = g.element;
664
663
  if (m) {
@@ -671,8 +670,8 @@ const gn = {
671
670
  J(x, g, g.field.map(C).join(" › "));
672
671
  else {
673
672
  x.badge = g.to != null ? "added" : "removed";
674
- const U = _(g);
675
- U && x.lines.push(U);
673
+ const B = _(g);
674
+ B && x.lines.push(B);
676
675
  }
677
676
  return;
678
677
  }
@@ -687,17 +686,17 @@ const gn = {
687
686
  );
688
687
  continue;
689
688
  }
690
- if (!g.path.includes(Qe) && (g.field || g.element)) {
691
- D(g);
689
+ if (!g.path.includes(Ze) && (g.field || g.element)) {
690
+ R(g);
692
691
  continue;
693
692
  }
694
- const x = m ? m.split(".") : [], U = T ? T.split(" › ") : [], W = x.findIndex((ee, te) => te > 0 && H(ee));
695
- if (W > 0 && U.length === x.length) {
696
- const ee = U[W], te = M(x.slice(0, W + 1).join("."), () => ({
697
- kind: U.slice(0, W).map(C).join(" › "),
693
+ const x = m ? m.split(".") : [], B = T ? T.split(" › ") : [], W = x.findIndex((ee, te) => te > 0 && H(ee));
694
+ if (W > 0 && B.length === x.length) {
695
+ const ee = B[W], te = M(x.slice(0, W + 1).join("."), () => ({
696
+ kind: B.slice(0, W).map(C).join(" › "),
698
697
  header: ee,
699
698
  lines: []
700
- })), re = U.slice(W + 1).map(C).join(" › ");
699
+ })), re = B.slice(W + 1).map(C).join(" › ");
701
700
  if (re) J(te, g, re);
702
701
  else if (g.from != null && g.to != null) J(te, g, ee);
703
702
  else {
@@ -707,162 +706,162 @@ const gn = {
707
706
  }
708
707
  continue;
709
708
  }
710
- J(A(), g, U.map(C).join(" › "));
709
+ J(A(), g, B.map(C).join(" › "));
711
710
  }
712
711
  return b;
713
712
  });
714
713
  return (f, b) => {
715
714
  var X, J;
716
715
  const M = Y("FmCircularProgress"), A = Y("FmSwitch");
717
- return f.isLoading ? (i(), c("div", gn, [
718
- V(M)
719
- ])) : f.commits.length ? (i(), c("div", hn, [
720
- h("ol", _n, [
721
- (i(!0), c(j, null, oe(f.commits, (D) => (i(), c("li", {
722
- key: D.id,
716
+ return f.isLoading ? (i(), c("div", yn, [
717
+ I(M)
718
+ ])) : f.commits.length ? (i(), c("div", _n, [
719
+ h("ol", bn, [
720
+ (i(!0), c(j, null, oe(f.commits, (R) => (i(), c("li", {
721
+ key: R.id,
723
722
  role: "button",
724
723
  tabindex: "0",
725
724
  class: ae([
726
725
  "cursor-pointer border-l-2 py-8 pl-12",
727
- D.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
726
+ R.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
728
727
  ]),
729
- onClick: (g) => l.value = D.id,
728
+ onClick: (g) => l.value = R.id,
730
729
  onKeydown: [
731
- Me((g) => l.value = D.id, ["enter"]),
732
- Me(pt((g) => l.value = D.id, ["prevent"]), ["space"])
730
+ Ae((g) => l.value = R.id, ["enter"]),
731
+ Ae(mt((g) => l.value = R.id, ["prevent"]), ["space"])
733
732
  ]
734
733
  }, [
735
- h("div", xn, y(O(D)), 1),
736
- h("div", wn, y(Q(D)) + " · " + y(P(D.at)) + " · " + y(E(D.id)), 1)
737
- ], 42, bn))), 128))
734
+ h("div", wn, y(O(R)), 1),
735
+ h("div", kn, y(Q(R)) + " · " + y(P(R.at)) + " · " + y(E(R.id)), 1)
736
+ ], 42, xn))), 128))
738
737
  ]),
739
- a.value ? (i(), c("div", kn, [
740
- h("div", Sn, [
741
- h("div", $n, [
742
- h("div", Cn, y(O(a.value)), 1),
743
- a.value.parent ? N("", !0) : (i(), c("span", Ln, y($(t)("inventory.changelog.rootCommit")), 1))
738
+ a.value ? (i(), c("div", Sn, [
739
+ h("div", $n, [
740
+ h("div", Cn, [
741
+ h("div", Ln, y(O(a.value)), 1),
742
+ a.value.parent ? N("", !0) : (i(), c("span", Rn, y($(t)("inventory.changelog.rootCommit")), 1))
744
743
  ]),
745
- h("div", Rn, y(Q(a.value)) + " · " + y(P(a.value.at)), 1)
744
+ h("div", Dn, y(Q(a.value)) + " · " + y(P(a.value.at)), 1)
746
745
  ]),
747
- h("div", Dn, [
748
- V(We, null, {
746
+ h("div", Vn, [
747
+ I(Ye, null, {
749
748
  default: le(() => [
750
749
  h("span", In, y($(t)("inventory.changelog.dataDiff")), 1),
751
- V(A, {
750
+ I(A, {
752
751
  modelValue: u.value,
753
- "onUpdate:modelValue": b[0] || (b[0] = (D) => u.value = D)
752
+ "onUpdate:modelValue": b[0] || (b[0] = (R) => u.value = R)
754
753
  }, null, 8, ["modelValue"])
755
754
  ]),
756
755
  _: 1
757
756
  })
758
757
  ]),
759
- u.value ? (i(), c("div", Vn, [
760
- $(v) ? (i(), pe(M, { key: 0 })) : (X = $(p)) != null && X.conflict ? (i(), c("div", En, y($(t)("inventory.changelog.snapshotUnavailable")), 1)) : (J = $(p)) != null && J.diff ? (i(), c("div", Nn, [
761
- (i(!0), c(j, null, oe($(p).diff, (D, g) => (i(), c("div", {
758
+ u.value ? (i(), c("div", En, [
759
+ $(v) ? (i(), pe(M, { key: 0 })) : (X = $(p)) != null && X.conflict ? (i(), c("div", Nn, y($(t)("inventory.changelog.snapshotUnavailable")), 1)) : (J = $(p)) != null && J.diff ? (i(), c("div", Pn, [
760
+ (i(!0), c(j, null, oe($(p).diff, (R, g) => (i(), c("div", {
762
761
  key: g,
763
- class: ae(["whitespace-pre px-4", w(D.type)])
764
- }, y(B(D)), 3))), 128))
762
+ class: ae(["whitespace-pre px-4", w(R.type)])
763
+ }, y(U(R)), 3))), 128))
765
764
  ])) : N("", !0)
766
765
  ])) : N("", !0),
767
- (i(!0), c(j, null, oe(K.value, (D, g) => (i(), c("div", {
766
+ (i(!0), c(j, null, oe(K.value, (R, g) => (i(), c("div", {
768
767
  key: g,
769
768
  class: "mb-12 rounded-lg border border-gray-200 p-12"
770
769
  }, [
771
- D.kind || D.header || D.badge ? (i(), c("div", {
770
+ R.kind || R.header || R.badge ? (i(), c("div", {
772
771
  key: 0,
773
- class: ae(["flex flex-wrap items-baseline gap-8", D.lines.length ? "mb-8" : ""])
772
+ class: ae(["flex flex-wrap items-baseline gap-8", R.lines.length ? "mb-8" : ""])
774
773
  }, [
775
- D.kind ? (i(), c("span", Pn, y(D.kind), 1)) : N("", !0),
776
- h("span", Tn, y(D.header), 1),
777
- D.badge ? (i(), c("span", {
774
+ R.kind ? (i(), c("span", Tn, y(R.kind), 1)) : N("", !0),
775
+ h("span", Un, y(R.header), 1),
776
+ R.badge ? (i(), c("span", {
778
777
  key: 1,
779
- class: ae(["rounded-full px-8 text-xs", D.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
780
- }, y(D.badge === "added" ? $(t)("inventory.changelog.added") : $(t)("inventory.changelog.kind.removed")), 3)) : N("", !0)
778
+ class: ae(["rounded-full px-8 text-xs", R.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
779
+ }, y(R.badge === "added" ? $(t)("inventory.changelog.added") : $(t)("inventory.changelog.kind.removed")), 3)) : N("", !0)
781
780
  ], 2)) : N("", !0),
782
781
  h("ul", Bn, [
783
- (i(!0), c(j, null, oe(D.lines, (m, T) => (i(), c("li", {
782
+ (i(!0), c(j, null, oe(R.lines, (m, T) => (i(), c("li", {
784
783
  key: T,
785
784
  class: "flex flex-wrap items-baseline gap-8 text-sm"
786
785
  }, [
787
- m.text ? (i(), c("span", Un, y(m.text), 1)) : (i(), c(j, { key: 1 }, [
788
- h("span", Fn, y(m.label), 1),
789
- m.toTree || m.fromTree ? (i(), c("div", An, [
790
- m.fromTree ? (i(), c("div", Mn, [
791
- (i(!0), c(j, null, oe(m.fromTree, (x, U) => (i(), c("div", {
792
- key: U,
786
+ m.text ? (i(), c("span", Fn, y(m.text), 1)) : (i(), c(j, { key: 1 }, [
787
+ h("span", An, y(m.label), 1),
788
+ m.toTree || m.fromTree ? (i(), c("div", Mn, [
789
+ m.fromTree ? (i(), c("div", On, [
790
+ (i(!0), c(j, null, oe(m.fromTree, (x, B) => (i(), c("div", {
791
+ key: B,
793
792
  class: ae(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-red-700"])
794
793
  }, [
795
794
  (i(!0), c(j, null, oe(x.depth, (W) => (i(), c("span", {
796
795
  key: W,
797
796
  class: "inline-block w-16"
798
797
  }))), 128)),
799
- x.label ? (i(), c("span", On, [
798
+ x.label ? (i(), c("span", Kn, [
800
799
  ie(y(x.label), 1),
801
800
  x.text ? (i(), c(j, { key: 0 }, [
802
801
  ie(":")
803
802
  ], 64)) : N("", !0)
804
803
  ])) : N("", !0),
805
- x.text ? (i(), c("span", Kn, y(x.text), 1)) : N("", !0)
804
+ x.text ? (i(), c("span", Gn, y(x.text), 1)) : N("", !0)
806
805
  ], 2))), 128))
807
806
  ])) : N("", !0),
808
- m.toTree ? (i(), c("div", Gn, [
809
- (i(!0), c(j, null, oe(m.toTree, (x, U) => (i(), c("div", {
810
- key: U,
807
+ m.toTree ? (i(), c("div", zn, [
808
+ (i(!0), c(j, null, oe(m.toTree, (x, B) => (i(), c("div", {
809
+ key: B,
811
810
  class: ae(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-green-700"])
812
811
  }, [
813
812
  (i(!0), c(j, null, oe(x.depth, (W) => (i(), c("span", {
814
813
  key: W,
815
814
  class: "inline-block w-16"
816
815
  }))), 128)),
817
- x.label ? (i(), c("span", zn, [
816
+ x.label ? (i(), c("span", jn, [
818
817
  ie(y(x.label), 1),
819
818
  x.text ? (i(), c(j, { key: 0 }, [
820
819
  ie(":")
821
820
  ], 64)) : N("", !0)
822
821
  ])) : N("", !0),
823
- x.text ? (i(), c("span", jn, y(x.text), 1)) : N("", !0)
822
+ x.text ? (i(), c("span", Hn, y(x.text), 1)) : N("", !0)
824
823
  ], 2))), 128))
825
824
  ])) : N("", !0)
826
- ])) : m.diff ? (i(), c("div", Hn, [
827
- (i(!0), c(j, null, oe(m.diff, (x, U) => (i(), c("div", {
828
- key: U,
825
+ ])) : m.diff ? (i(), c("div", Jn, [
826
+ (i(!0), c(j, null, oe(m.diff, (x, B) => (i(), c("div", {
827
+ key: B,
829
828
  class: ae(["whitespace-pre px-4", w(x.type)])
830
- }, y(B(x)), 3))), 128))
831
- ])) : (i(), c("span", Jn, [
832
- m.from != null ? (i(), c("span", Yn, y(m.fromDisplay ?? F(m.from)), 1)) : N("", !0),
833
- m.from != null && m.to != null ? (i(), c("span", Wn, "→")) : N("", !0),
834
- m.to != null ? (i(), c("span", Xn, y(m.toDisplay ?? F(m.to)), 1)) : N("", !0)
829
+ }, y(U(x)), 3))), 128))
830
+ ])) : (i(), c("span", Yn, [
831
+ m.from != null ? (i(), c("span", Wn, y(m.fromDisplay ?? F(m.from)), 1)) : N("", !0),
832
+ m.from != null && m.to != null ? (i(), c("span", Xn, "→")) : N("", !0),
833
+ m.to != null ? (i(), c("span", qn, y(m.toDisplay ?? F(m.to)), 1)) : N("", !0)
835
834
  ]))
836
835
  ], 64))
837
836
  ]))), 128))
838
837
  ])
839
838
  ]))), 128)),
840
- K.value.length ? N("", !0) : (i(), c("div", qn, y($(t)("inventory.changelog.empty")), 1)),
841
- u.value ? (i(), c("div", Zn, [
839
+ K.value.length ? N("", !0) : (i(), c("div", Zn, y($(t)("inventory.changelog.empty")), 1)),
840
+ u.value ? (i(), c("div", Qn, [
842
841
  ie(y(a.value.id) + " ", 1),
843
- a.value.parent ? (i(), c("span", Qn, "← " + y(a.value.parent), 1)) : N("", !0)
842
+ a.value.parent ? (i(), c("span", eo, "← " + y(a.value.parent), 1)) : N("", !0)
844
843
  ])) : N("", !0)
845
844
  ])) : N("", !0)
846
- ])) : (i(), c("div", yn, y($(t)("inventory.changelog.empty")), 1));
845
+ ])) : (i(), c("div", hn, y($(t)("inventory.changelog.empty")), 1));
847
846
  };
848
847
  }
849
- }), no = { class: "flex flex-col gap-8" }, oo = { class: "flex flex-wrap items-center gap-16" }, ao = { class: "fm-typo-en-heading-lg-600" }, so = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lo = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, ro = { class: "flex flex-wrap items-center gap-12" }, io = { class: "flex shrink-0 items-center gap-8" }, uo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, co = { class: "flex flex-wrap items-center gap-12" }, fo = {
848
+ }), oo = { class: "flex flex-col gap-8" }, ao = { class: "flex flex-wrap items-center gap-16" }, so = { class: "fm-typo-en-heading-lg-600" }, lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ro = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, io = { class: "flex flex-wrap items-center gap-12" }, uo = { class: "flex shrink-0 items-center gap-8" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fo = { class: "flex flex-wrap items-center gap-12" }, mo = {
850
849
  key: 0,
851
850
  class: "fm-typo-en-body-md-600"
852
- }, mo = { class: "fm-typo-en-heading-md-600" }, po = {
851
+ }, po = { class: "fm-typo-en-heading-md-600" }, vo = {
853
852
  key: 0,
854
853
  class: "flex justify-center py-8"
855
- }, Ce = "inventory.changelog.label.", vo = /* @__PURE__ */ ce({
854
+ }, Ce = "inventory.changelog.label.", go = /* @__PURE__ */ ce({
856
855
  __name: "ChangelogDialog",
857
856
  props: {
858
857
  modelValue: { type: Boolean }
859
858
  },
860
859
  emits: ["update:modelValue"],
861
860
  setup(o, { emit: e }) {
862
- const t = o, l = e, a = R({
861
+ const t = o, l = e, a = D({
863
862
  get: () => t.modelValue,
864
863
  set: (n) => l("update:modelValue", n)
865
- }), { t: s } = he(), r = ve(), u = He(), v = Ee(), p = _e(), { breakpoints: I } = It(), E = R(() => I.value.xs || I.value.sm), P = R(() => E.value ? "98vw" : "72vw"), { commits: F, isLoading: Q, hasMore: O, load: C, loadMore: H } = an();
864
+ }), { t: s } = he(), r = ge(), u = He(), v = je(), p = _e(), { breakpoints: V } = Vt(), E = D(() => V.value.xs || V.value.sm), P = D(() => E.value ? "98vw" : "72vw"), { commits: F, isLoading: Q, hasMore: O, load: C, loadMore: H } = sn();
866
865
  function L() {
867
866
  H().catch((n) => console.error("changelog load more failed", n));
868
867
  }
@@ -872,7 +871,7 @@ const gn = {
872
871
  function w(n) {
873
872
  return [...n].sort((d, S) => (S.lastUpdate ?? "").localeCompare(d.lastUpdate ?? ""));
874
873
  }
875
- function B(n, d, S) {
874
+ function U(n, d, S) {
876
875
  C(n, d, S).catch((G) => console.error("changelog load failed", G));
877
876
  }
878
877
  const K = k([]);
@@ -886,29 +885,29 @@ const gn = {
886
885
  console.error("changelog domain list load failed", S), K.value = [];
887
886
  }
888
887
  }
889
- const b = R(() => [
888
+ const b = D(() => [
890
889
  { label: s("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
891
890
  { label: s("inventory.changelog.label.closingDraft"), value: "closingDraft" },
892
891
  { label: s("inventory.changelog.domainInventory"), value: "inventory" },
893
892
  ...K.value.map((n) => ({ label: s(n.labelKey), value: n.domain }))
894
- ]), M = k(b.value[0]), A = R(() => {
893
+ ]), M = k(b.value[0]), A = D(() => {
895
894
  var n;
896
895
  return ((n = M.value) == null ? void 0 : n.value) ?? "purchaseOrder";
897
- }), X = R(
896
+ }), X = D(
898
897
  () => K.value.some((n) => n.domain === A.value)
899
- ), J = k(!1), D = R(
898
+ ), J = k(!1), R = D(
900
899
  () => ["sku", "recipe", "unit"].map((n) => ({
901
900
  label: s(Ce + n),
902
901
  value: n
903
902
  }))
904
- ), g = k(D.value[0]), m = R(() => {
903
+ ), g = k(R.value[0]), m = D(() => {
905
904
  var n;
906
905
  return ((n = g.value) == null ? void 0 : n.value) ?? "sku";
907
- }), T = k(""), x = k(null), U = k(!1), W = R(() => {
906
+ }), T = k(""), x = k(null), B = k(!1), W = D(() => {
908
907
  var S;
909
908
  const n = (S = r.currentBusiness.value) == null ? void 0 : S._id, d = u.inventory._id;
910
909
  return n && d ? `business_${n}/${d}` : "";
911
- }), ee = R(() => {
910
+ }), ee = D(() => {
912
911
  const n = /* @__PURE__ */ new Map(), d = u.inventory;
913
912
  for (const S of [d.sku, d.recipe, d.unit, d.skuGroup])
914
913
  for (const G of S ?? [])
@@ -923,7 +922,7 @@ const gn = {
923
922
  }
924
923
  return n;
925
924
  }), te = (n) => ee.value.get(n), re = k([]), de = k(!1);
926
- async function Pe() {
925
+ async function Ne() {
927
926
  var d;
928
927
  const n = (d = r.currentBusiness.value) == null ? void 0 : d._id;
929
928
  if (n) {
@@ -939,9 +938,9 @@ const gn = {
939
938
  }
940
939
  }
941
940
  }
942
- const tt = R(
943
- () => U.value ? re.value : re.value.filter((n) => !n.deleted)
944
- ), nt = R(() => [
941
+ const et = D(
942
+ () => B.value ? re.value : re.value.filter((n) => !n.deleted)
943
+ ), tt = D(() => [
945
944
  { accessorKey: "id", header: () => s("inventory.closing.draft.table.id"), size: 320 },
946
945
  {
947
946
  id: "name",
@@ -949,7 +948,7 @@ const gn = {
949
948
  accessorFn: (n) => n.name,
950
949
  // Deleted records sit in the same list as live ones, so the row says which
951
950
  // it is; nothing else distinguishes them.
952
- cell: ({ row: n }) => n.original.deleted ? vt(
951
+ cell: ({ row: n }) => n.original.deleted ? pt(
953
952
  "span",
954
953
  { "data-deleted": "" },
955
954
  `${n.original.name} (${s("inventory.changelog.deleted")})`
@@ -964,26 +963,26 @@ const gn = {
964
963
  accessorFn: (n) => n.lastUpdate ?? "",
965
964
  cell: ({ getValue: n }) => _(n() || void 0)
966
965
  }
967
- ]), { commits: ot, load: at } = ln();
968
- function st(n) {
969
- x.value = n, J.value = !0, B(W.value, Xe, Re), n.id && at(`${W.value}/${m.value}/${n.id}`).catch(
966
+ ]), { commits: nt, load: ot } = rn();
967
+ function at(n) {
968
+ x.value = n, J.value = !0, U(W.value, We, Re), n.id && ot(`${W.value}/${m.value}/${n.id}`).catch(
970
969
  (d) => console.error("changelog per-entity load failed", d)
971
970
  );
972
971
  }
973
- function lt(n, d) {
974
- const S = qe(n.message);
972
+ function st(n, d) {
973
+ const S = Xe(n.message);
975
974
  return S && S.labelKey === Ce + m.value && S.name === d.name ? !0 : (n.changes ?? []).some((G) => {
976
- const q = cn(G.path);
975
+ const q = dn(G.path);
977
976
  return q.type === Ce + m.value && q.name === d.name;
978
977
  });
979
978
  }
980
- const rt = R(() => {
979
+ const lt = D(() => {
981
980
  const n = x.value;
982
981
  if (!n) return [];
983
- const d = F.value.filter((S) => lt(S, n));
984
- return sn(d, ot.value);
982
+ const d = F.value.filter((S) => st(S, n));
983
+ return ln(d, nt.value);
985
984
  }), be = k([]), xe = k(!1), we = k(null);
986
- async function it() {
985
+ async function rt() {
987
986
  var d;
988
987
  const n = (d = r.currentBusiness.value) == null ? void 0 : d._id;
989
988
  if (n) {
@@ -999,15 +998,15 @@ const gn = {
999
998
  }
1000
999
  }
1001
1000
  }
1002
- function ut(n) {
1001
+ function it(n) {
1003
1002
  var S;
1004
1003
  const d = (S = r.currentBusiness.value) == null ? void 0 : S._id;
1005
- d && (we.value = n, J.value = !0, B(`business_${d}/${n.id}`, void 0, Le));
1004
+ d && (we.value = n, J.value = !0, U(`business_${d}/${n.id}`, void 0, Le));
1006
1005
  }
1007
- const ge = k(Vt()), ye = k([]), ke = k(!1), fe = k(null), Te = R(() => {
1006
+ const ve = k(It()), ye = k([]), ke = k(!1), fe = k(null), Pe = D(() => {
1008
1007
  const n = v._currentLocation;
1009
1008
  return n ? `${n.name} (${n.doc.profile.code ?? "--"})` : "";
1010
- }), Be = R(() => [
1009
+ }), Te = D(() => [
1011
1010
  { accessorKey: "id", header: () => s("inventory.closing.draft.table.id"), size: 320 },
1012
1011
  {
1013
1012
  accessorKey: "name",
@@ -1027,7 +1026,7 @@ const gn = {
1027
1026
  var G;
1028
1027
  const n = (G = v._currentLocation) == null ? void 0 : G.dbName;
1029
1028
  if (!n) return;
1030
- const d = Pt(new Date(ge.value.startDate)).toISOString(), S = Tt(new Date(ge.value.endDate)).toISOString();
1029
+ const d = Pt(new Date(ve.value.startDate)).toISOString(), S = Tt(new Date(ve.value.endDate)).toISOString();
1031
1030
  ke.value = !0;
1032
1031
  try {
1033
1032
  ye.value = w(
@@ -1041,41 +1040,41 @@ const gn = {
1041
1040
  fe.value && !ye.value.find((q) => {
1042
1041
  var ne;
1043
1042
  return q.id === ((ne = fe.value) == null ? void 0 : ne.id);
1044
- }) && (fe.value = null, B(""));
1043
+ }) && (fe.value = null, U(""));
1045
1044
  }
1046
- function ct(n) {
1047
- fe.value = n, J.value = !0, B(`${v.currentLocationDBName}/${n.id}`, void 0, Le);
1045
+ function ut(n) {
1046
+ fe.value = n, J.value = !0, U(`${v.currentLocationDBName}/${n.id}`, void 0, Le);
1048
1047
  }
1049
- const dt = R(() => {
1048
+ const ct = D(() => {
1050
1049
  var n, d, S;
1051
1050
  return A.value === "inventory" ? ((n = x.value) == null ? void 0 : n.name) ?? "" : X.value ? ((d = we.value) == null ? void 0 : d.name) ?? "" : ((S = fe.value) == null ? void 0 : S.name) ?? "";
1052
1051
  });
1053
- function Fe() {
1054
- J.value = !1, A.value === "inventory" ? (x.value = null, U.value = !1, B(""), Pe().catch(
1052
+ function Be() {
1053
+ J.value = !1, A.value === "inventory" ? (x.value = null, B.value = !1, U(""), Ne().catch(
1055
1054
  (n) => console.error("changelog inventory list failed", n)
1056
- )) : X.value ? (we.value = null, B(""), it().catch(
1055
+ )) : X.value ? (we.value = null, U(""), rt().catch(
1057
1056
  (n) => console.error("changelog domain records failed", n)
1058
- )) : (fe.value = null, B(""), Ue().catch((n) => console.error("changelog location list failed", n)));
1057
+ )) : (fe.value = null, U(""), Ue().catch((n) => console.error("changelog location list failed", n)));
1059
1058
  }
1060
1059
  return Z(a, (n) => {
1061
- n && (f().catch((d) => console.error("changelog domain list failed", d)), Fe());
1060
+ n && (f().catch((d) => console.error("changelog domain list failed", d)), Be());
1062
1061
  }), Z(A, () => {
1063
- a.value && Fe();
1064
- }), Z(ge, () => {
1062
+ a.value && Be();
1063
+ }), Z(ve, () => {
1065
1064
  a.value && A.value !== "inventory" && !X.value && Ue().catch((n) => console.error("changelog location list failed", n));
1066
- }), Z(U, (n) => {
1065
+ }), Z(B, (n) => {
1067
1066
  var d;
1068
1067
  !n && ((d = x.value) != null && d.deleted) && (x.value = null, J.value = !1);
1069
1068
  }), Z(m, () => {
1070
- x.value = null, J.value = !1, a.value && A.value === "inventory" && Pe().catch(
1069
+ x.value = null, J.value = !1, a.value && A.value === "inventory" && Ne().catch(
1071
1070
  (n) => console.error("changelog inventory list failed", n)
1072
1071
  );
1073
1072
  }), Z(W, (n) => {
1074
- x.value = null, a.value && A.value === "inventory" && B(n, void 0, Re);
1073
+ x.value = null, a.value && A.value === "inventory" && U(n, void 0, Re);
1075
1074
  }), (n, d) => {
1076
- const S = Y("FmButtonGroup"), G = Y("FmSearch"), q = Y("FmSwitch"), ne = Y("FmTable"), Ae = Y("FmDialog"), ft = Y("FmButton");
1075
+ const S = Y("FmButtonGroup"), G = Y("FmSearch"), q = Y("FmSwitch"), ne = Y("FmTable"), Fe = Y("FmDialog"), dt = Y("FmButton");
1077
1076
  return i(), c(j, null, [
1078
- V(Ae, {
1077
+ I(Fe, {
1079
1078
  modelValue: a.value,
1080
1079
  "onUpdate:modelValue": d[8] || (d[8] = (z) => a.value = z),
1081
1080
  "close-button": "",
@@ -1086,80 +1085,80 @@ const gn = {
1086
1085
  "content-class": "!p-0 h-[86vh]"
1087
1086
  }, {
1088
1087
  "dialog-header": le(() => [
1089
- h("div", no, [
1090
- h("div", oo, [
1091
- h("div", ao, y($(s)("inventory.changelog.title")), 1),
1092
- V(S, {
1088
+ h("div", oo, [
1089
+ h("div", ao, [
1090
+ h("div", so, y($(s)("inventory.changelog.title")), 1),
1091
+ I(S, {
1093
1092
  modelValue: M.value,
1094
1093
  "onUpdate:modelValue": d[0] || (d[0] = (z) => M.value = z),
1095
1094
  items: b.value
1096
1095
  }, null, 8, ["modelValue", "items"])
1097
1096
  ]),
1098
- h("div", so, y($(s)("inventory.changelog.scopeDescription")), 1)
1097
+ h("div", lo, y($(s)("inventory.changelog.scopeDescription")), 1)
1099
1098
  ])
1100
1099
  ]),
1101
1100
  default: le(() => [
1102
- h("div", lo, [
1101
+ h("div", ro, [
1103
1102
  A.value === "inventory" ? (i(), c(j, { key: 0 }, [
1104
- h("div", ro, [
1105
- V(S, {
1103
+ h("div", io, [
1104
+ I(S, {
1106
1105
  modelValue: g.value,
1107
1106
  "onUpdate:modelValue": d[1] || (d[1] = (z) => g.value = z),
1108
- items: D.value
1107
+ items: R.value
1109
1108
  }, null, 8, ["modelValue", "items"]),
1110
- V(G, {
1109
+ I(G, {
1111
1110
  modelValue: T.value,
1112
1111
  "onUpdate:modelValue": d[2] || (d[2] = (z) => T.value = z),
1113
1112
  class: "flex-1",
1114
1113
  placeholder: $(s)("inventory.changelog.searchInventory")
1115
1114
  }, null, 8, ["modelValue", "placeholder"]),
1116
- h("div", io, [
1117
- h("span", uo, y($(s)("inventory.changelog.includeDeleted")), 1),
1118
- V(q, {
1119
- modelValue: U.value,
1120
- "onUpdate:modelValue": d[3] || (d[3] = (z) => U.value = z)
1115
+ h("div", uo, [
1116
+ h("span", co, y($(s)("inventory.changelog.includeDeleted")), 1),
1117
+ I(q, {
1118
+ modelValue: B.value,
1119
+ "onUpdate:modelValue": d[3] || (d[3] = (z) => B.value = z)
1121
1120
  }, null, 8, ["modelValue"])
1122
1121
  ])
1123
1122
  ]),
1124
- V(ne, {
1123
+ I(ne, {
1125
1124
  class: "min-h-0 flex-1",
1126
- "row-data": tt.value,
1127
- "column-defs": nt.value,
1125
+ "row-data": et.value,
1126
+ "column-defs": tt.value,
1128
1127
  "search-value": T.value,
1129
1128
  loading: de.value,
1130
1129
  "page-size": 20,
1131
- onRowClick: d[4] || (d[4] = (z) => st(z.original))
1130
+ onRowClick: d[4] || (d[4] = (z) => at(z.original))
1132
1131
  }, null, 8, ["row-data", "column-defs", "search-value", "loading"])
1133
1132
  ], 64)) : X.value ? (i(), pe(ne, {
1134
1133
  key: 1,
1135
1134
  class: "min-h-0 flex-1",
1136
1135
  "row-data": be.value,
1137
- "column-defs": Be.value,
1136
+ "column-defs": Te.value,
1138
1137
  loading: xe.value,
1139
1138
  "page-size": 20,
1140
- onRowClick: d[5] || (d[5] = (z) => ut(z.original))
1139
+ onRowClick: d[5] || (d[5] = (z) => it(z.original))
1141
1140
  }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), c(j, { key: 2 }, [
1142
- h("div", co, [
1143
- V(Et, {
1144
- modelValue: ge.value,
1145
- "onUpdate:modelValue": d[6] || (d[6] = (z) => ge.value = z)
1141
+ h("div", fo, [
1142
+ I(Et, {
1143
+ modelValue: ve.value,
1144
+ "onUpdate:modelValue": d[6] || (d[6] = (z) => ve.value = z)
1146
1145
  }, null, 8, ["modelValue"]),
1147
- Te.value ? (i(), c("span", fo, y(Te.value), 1)) : N("", !0)
1146
+ Pe.value ? (i(), c("span", mo, y(Pe.value), 1)) : N("", !0)
1148
1147
  ]),
1149
- V(ne, {
1148
+ I(ne, {
1150
1149
  class: "min-h-0 flex-1",
1151
1150
  "row-data": ye.value,
1152
- "column-defs": Be.value,
1151
+ "column-defs": Te.value,
1153
1152
  loading: ke.value,
1154
1153
  "page-size": 20,
1155
- onRowClick: d[7] || (d[7] = (z) => ct(z.original))
1154
+ onRowClick: d[7] || (d[7] = (z) => ut(z.original))
1156
1155
  }, null, 8, ["row-data", "column-defs", "loading"])
1157
1156
  ], 64))
1158
1157
  ])
1159
1158
  ]),
1160
1159
  _: 1
1161
1160
  }, 8, ["modelValue"]),
1162
- V(Ae, {
1161
+ I(Fe, {
1163
1162
  modelValue: J.value,
1164
1163
  "onUpdate:modelValue": d[9] || (d[9] = (z) => J.value = z),
1165
1164
  "close-button": "",
@@ -1169,16 +1168,16 @@ const gn = {
1169
1168
  "max-height": "86vh"
1170
1169
  }, {
1171
1170
  "dialog-header": le(() => [
1172
- h("div", mo, y(dt.value), 1)
1171
+ h("div", po, y(ct.value), 1)
1173
1172
  ]),
1174
1173
  default: le(() => [
1175
- V(to, {
1176
- commits: A.value === "inventory" ? rt.value : $(F),
1174
+ I(no, {
1175
+ commits: A.value === "inventory" ? lt.value : $(F),
1177
1176
  "is-loading": $(Q),
1178
1177
  "resolve-name": te
1179
1178
  }, null, 8, ["commits", "is-loading"]),
1180
- A.value !== "inventory" && $(O) ? (i(), c("div", po, [
1181
- V(ft, {
1179
+ A.value !== "inventory" && $(O) ? (i(), c("div", vo, [
1180
+ I(dt, {
1182
1181
  label: $(s)("inventory.changelog.loadMore"),
1183
1182
  variant: "secondary",
1184
1183
  disabled: $(Q),
@@ -1191,22 +1190,22 @@ const gn = {
1191
1190
  ], 64);
1192
1191
  };
1193
1192
  }
1194
- }), go = /* @__PURE__ */ Bt(vo, [["__scopeId", "data-v-ae9bd171"]]), se = 8;
1195
- function yo(o, e) {
1193
+ }), yo = /* @__PURE__ */ Ut(go, [["__scopeId", "data-v-ae9bd171"]]), se = 8;
1194
+ function ho(o, e) {
1196
1195
  return { x: se, y: Math.max(se, e - o - se) };
1197
1196
  }
1198
- const ho = ["title"], je = 48, _o = 8, bo = /* @__PURE__ */ ce({
1197
+ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
1199
1198
  __name: "ChangelogFloatingButton",
1200
1199
  setup(o) {
1201
- const { t: e } = he(), t = ve(), l = R(() => {
1200
+ const { t: e } = he(), t = ge(), l = D(() => {
1202
1201
  var L;
1203
1202
  return !!((L = t.sessionUser.value) != null && L.role.isAdmin);
1204
1203
  }), a = k(!1), s = k(null);
1205
1204
  function r() {
1206
1205
  var L, _;
1207
1206
  return {
1208
- width: ((L = s.value) == null ? void 0 : L.offsetWidth) ?? je,
1209
- height: ((_ = s.value) == null ? void 0 : _.offsetHeight) ?? je
1207
+ width: ((L = s.value) == null ? void 0 : L.offsetWidth) ?? ze,
1208
+ height: ((_ = s.value) == null ? void 0 : _.offsetHeight) ?? ze
1210
1209
  };
1211
1210
  }
1212
1211
  const u = k({ x: 0, y: 0 });
@@ -1214,21 +1213,21 @@ const ho = ["title"], je = 48, _o = 8, bo = /* @__PURE__ */ ce({
1214
1213
  return Math.min(Math.max(L, _), w);
1215
1214
  }
1216
1215
  function p() {
1217
- const { width: L, height: _ } = r(), w = Math.max(se, window.innerWidth - L - se - _o), B = Math.max(se, window.innerHeight - _ - se), K = u.value.x + L / 2;
1216
+ const { width: L, height: _ } = r(), w = Math.max(se, window.innerWidth - L - se - bo), U = Math.max(se, window.innerHeight - _ - se), K = u.value.x + L / 2;
1218
1217
  u.value = {
1219
1218
  x: K < window.innerWidth / 2 ? se : w,
1220
- y: v(u.value.y, se, B)
1219
+ y: v(u.value.y, se, U)
1221
1220
  };
1222
1221
  }
1223
- function I() {
1224
- u.value = yo(r().height, window.innerHeight);
1222
+ function V() {
1223
+ u.value = ho(r().height, window.innerHeight);
1225
1224
  }
1226
- Ve(() => {
1227
- I(), window.addEventListener("resize", p), window.addEventListener("orientationchange", p);
1228
- }), gt(() => {
1225
+ Ie(() => {
1226
+ V(), window.addEventListener("resize", p), window.addEventListener("orientationchange", p);
1227
+ }), vt(() => {
1229
1228
  window.removeEventListener("resize", p), window.removeEventListener("orientationchange", p);
1230
1229
  }), Z(l, async (L) => {
1231
- L && (await yt(), I());
1230
+ L && (await gt(), V());
1232
1231
  });
1233
1232
  const E = k(!1);
1234
1233
  let P = null, F = !1;
@@ -1239,9 +1238,9 @@ const ho = ["title"], je = 48, _o = 8, bo = /* @__PURE__ */ ce({
1239
1238
  if (!P) return;
1240
1239
  const _ = L.clientX - P.x, w = L.clientY - P.y;
1241
1240
  Math.abs(_) + Math.abs(w) > 3 && (F = !0);
1242
- const { width: B, height: K } = r();
1241
+ const { width: U, height: K } = r();
1243
1242
  u.value = {
1244
- x: v(P.px + _, 0, window.innerWidth - B),
1243
+ x: v(P.px + _, 0, window.innerWidth - U),
1245
1244
  y: v(P.py + w, 0, window.innerHeight - K)
1246
1245
  };
1247
1246
  }
@@ -1253,15 +1252,15 @@ const ho = ["title"], je = 48, _o = 8, bo = /* @__PURE__ */ ce({
1253
1252
  }
1254
1253
  return (L, _) => {
1255
1254
  const w = Y("FmIcon");
1256
- return i(), pe(ht, { to: "body" }, [
1255
+ return i(), pe(yt, { to: "body" }, [
1257
1256
  l.value ? (i(), c(j, { key: 0 }, [
1258
1257
  h("div", {
1259
1258
  ref_key: "wrapperRef",
1260
1259
  ref: s,
1261
1260
  class: ae(["fixed z-50 cursor-grab touch-none", E.value ? "" : "transition-[left,top] duration-200 ease-out"]),
1262
- style: _t({ left: `${u.value.x}px`, top: `${u.value.y}px` })
1261
+ style: ht({ left: `${u.value.x}px`, top: `${u.value.y}px` })
1263
1262
  }, [
1264
- V(We, null, {
1263
+ I(Ye, null, {
1265
1264
  default: le(() => [
1266
1265
  h("button", {
1267
1266
  type: "button",
@@ -1272,36 +1271,36 @@ const ho = ["title"], je = 48, _o = 8, bo = /* @__PURE__ */ ce({
1272
1271
  onPointerup: H,
1273
1272
  onPointercancel: C
1274
1273
  }, [
1275
- V(w, {
1274
+ I(w, {
1276
1275
  name: "history",
1277
1276
  size: "md",
1278
1277
  outline: ""
1279
1278
  }),
1280
1279
  h("span", null, y($(e)("inventory.changelog.fabLabel")), 1)
1281
- ], 42, ho)
1280
+ ], 42, _o)
1282
1281
  ]),
1283
1282
  _: 1
1284
1283
  })
1285
1284
  ], 6),
1286
- V(go, {
1285
+ I(yo, {
1287
1286
  modelValue: a.value,
1288
- "onUpdate:modelValue": _[0] || (_[0] = (B) => a.value = B)
1287
+ "onUpdate:modelValue": _[0] || (_[0] = (U) => a.value = U)
1289
1288
  }, null, 8, ["modelValue"])
1290
1289
  ], 64)) : N("", !0)
1291
1290
  ]);
1292
1291
  };
1293
1292
  }
1294
- }), xo = { class: "flex items-center gap-8" }, wo = { class: "flex flex-col gap-12 text-fm-color-typo-secondary" }, ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, So = { class: "fm-typo-en-body-sm-400" }, $o = {
1293
+ }), wo = { class: "flex items-center gap-8" }, ko = { class: "flex flex-col gap-12 text-fm-color-typo-secondary" }, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, $o = { class: "fm-typo-en-body-sm-400" }, Co = {
1295
1294
  key: 0,
1296
1295
  class: "fm-typo-en-body-sm-400"
1297
- }, Co = {
1296
+ }, Lo = {
1298
1297
  key: 0,
1299
1298
  href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices",
1300
1299
  target: "_blank",
1301
1300
  rel: "noopener"
1302
- }, Lo = /* @__PURE__ */ ce({
1301
+ }, Ro = /* @__PURE__ */ ce({
1303
1302
  __name: "PlanUpgradeDialog",
1304
- props: /* @__PURE__ */ bt({
1303
+ props: /* @__PURE__ */ _t({
1305
1304
  capability: {},
1306
1305
  result: {}
1307
1306
  }, {
@@ -1310,16 +1309,16 @@ const ho = ["title"], je = 48, _o = 8, bo = /* @__PURE__ */ ce({
1310
1309
  }),
1311
1310
  emits: ["update:modelValue"],
1312
1311
  setup(o) {
1313
- const e = o, t = xt(o, "modelValue"), l = R(() => {
1312
+ const e = o, t = bt(o, "modelValue"), l = D(() => {
1314
1313
  var r;
1315
1314
  return ((r = e.capability) == null ? void 0 : r.tier) ?? "premium";
1316
- }), a = R(() => {
1315
+ }), a = D(() => {
1317
1316
  var r;
1318
1317
  return ((r = e.result) == null ? void 0 : r.stage) === "off";
1319
- }), s = R(() => a.value ? "Feature unavailable" : `Upgrade to ${l.value} plan`);
1318
+ }), s = D(() => a.value ? "Feature unavailable" : `Upgrade to ${l.value} plan`);
1320
1319
  return (r, u) => {
1321
- const v = Y("FmSpacer"), p = Y("FmButton"), I = Y("FmDialog");
1322
- return i(), pe(I, {
1320
+ const v = Y("FmSpacer"), p = Y("FmButton"), V = Y("FmDialog");
1321
+ return i(), pe(V, {
1323
1322
  modelValue: t.value,
1324
1323
  "onUpdate:modelValue": u[1] || (u[1] = (E) => t.value = E),
1325
1324
  overlay: !0,
@@ -1328,35 +1327,35 @@ const ho = ["title"], je = 48, _o = 8, bo = /* @__PURE__ */ ce({
1328
1327
  "max-width": "520px"
1329
1328
  }, {
1330
1329
  "dialog-header": le(() => [
1331
- h("div", xo, [
1330
+ h("div", wo, [
1332
1331
  h("span", null, y(s.value), 1),
1333
- V(Ft, { tier: l.value }, null, 8, ["tier"])
1332
+ I(Ft, { tier: l.value }, null, 8, ["tier"])
1334
1333
  ])
1335
1334
  ]),
1336
1335
  "dialog-footer": le(() => [
1337
- V(v, { class: "sm:hidden xs:hidden" }),
1338
- V(p, {
1336
+ I(v, { class: "sm:hidden xs:hidden" }),
1337
+ I(p, {
1339
1338
  variant: "tertiary",
1340
1339
  label: "Not now",
1341
1340
  onClick: u[0] || (u[0] = (E) => t.value = !1)
1342
1341
  }),
1343
- a.value ? N("", !0) : (i(), c("a", Co, [
1344
- V(p, { label: "Compare plans" })
1342
+ a.value ? N("", !0) : (i(), c("a", Lo, [
1343
+ I(p, { label: "Compare plans" })
1345
1344
  ]))
1346
1345
  ]),
1347
1346
  default: le(() => {
1348
1347
  var E, P, F;
1349
1348
  return [
1350
- h("div", wo, [
1351
- h("p", ko, [
1349
+ h("div", ko, [
1350
+ h("p", So, [
1352
1351
  a.value ? (i(), c(j, { key: 0 }, [
1353
1352
  ie(y((E = r.result) == null ? void 0 : E.reason), 1)
1354
1353
  ], 64)) : (i(), c(j, { key: 1 }, [
1355
1354
  ie(y((P = r.capability) == null ? void 0 : P.module) + " is available on the " + y(l.value) + " plan. ", 1)
1356
1355
  ], 64))
1357
1356
  ]),
1358
- h("p", So, y((F = r.capability) == null ? void 0 : F.description), 1),
1359
- a.value ? N("", !0) : (i(), c("p", $o, " Upgrade your plan to unlock this functionality for your business. "))
1357
+ h("p", $o, y((F = r.capability) == null ? void 0 : F.description), 1),
1358
+ a.value ? N("", !0) : (i(), c("p", Co, " Upgrade your plan to unlock this functionality for your business. "))
1360
1359
  ])
1361
1360
  ];
1362
1361
  }),
@@ -1364,31 +1363,19 @@ const ho = ["title"], je = 48, _o = 8, bo = /* @__PURE__ */ ce({
1364
1363
  }, 8, ["modelValue"]);
1365
1364
  };
1366
1365
  }
1367
- });
1368
- function Ro() {
1369
- const o = Je(), e = ve(), t = Ee();
1370
- return R(() => {
1371
- var l, a;
1372
- return {
1373
- planTier: o.planTier,
1374
- businessId: (l = e.currentBusiness.value) == null ? void 0 : l._id,
1375
- locationId: (a = t._currentLocation) == null ? void 0 : a.doc._id
1376
- };
1377
- });
1378
- }
1379
- const Do = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Io = /* @__PURE__ */ ce({
1366
+ }), Do = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Vo = /* @__PURE__ */ ce({
1380
1367
  __name: "NavigationTab",
1381
1368
  setup(o) {
1382
- const e = Ct(), t = Ne(), l = ve(), a = Ro(), s = Ut(), r = k(!1), u = k(null), v = k(null), p = k(!1), I = k(null), E = k(null), P = R(
1369
+ const e = $t(), t = Ee(), l = ge(), a = At(), s = Bt(), r = k(!1), u = k(null), v = k(null), p = k(!1), V = k(null), E = k(null), P = D(
1383
1370
  () => {
1384
1371
  var _, w;
1385
- return (w = Oe(((_ = I.value) == null ? void 0 : _.featureKey) ?? "")) == null ? void 0 : w.label;
1372
+ return (w = Me(((_ = V.value) == null ? void 0 : _.featureKey) ?? "")) == null ? void 0 : w.label;
1386
1373
  }
1387
- ), { menuItems: F } = Ye();
1374
+ ), { menuItems: F } = Je();
1388
1375
  Z([() => l.currentBusiness.value, () => e.name], ([_, w]) => {
1389
1376
  (_ == null ? void 0 : _.menuVersion) === "v3" && (w === ue.INGREDIENTS || w === ue.RECIPE || w === ue.UNIT) && t.push({ name: ue.STOCK });
1390
1377
  });
1391
- const Q = R({
1378
+ const Q = D({
1392
1379
  get() {
1393
1380
  if (e.name)
1394
1381
  return String(e.name);
@@ -1396,13 +1383,13 @@ const Do = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Io = /*
1396
1383
  set(_) {
1397
1384
  var f;
1398
1385
  if (!_) return;
1399
- const w = String(_), B = Rt.find((b) => b.route === w), K = Dt(w, a.value);
1400
- if ((f = Oe((B == null ? void 0 : B.featureKey) ?? "")) != null && f.deprecateSoon) {
1401
- I.value = B ?? null, E.value = w, p.value = !0;
1386
+ const w = String(_), U = Rt.find((b) => b.route === w), K = Dt(w, a.value);
1387
+ if ((f = Me((U == null ? void 0 : U.featureKey) ?? "")) != null && f.deprecateSoon) {
1388
+ V.value = U ?? null, E.value = w, p.value = !0;
1402
1389
  return;
1403
1390
  }
1404
- if (B && K.disabled) {
1405
- u.value = B, v.value = K, r.value = !0;
1391
+ if (U && K.disabled) {
1392
+ u.value = U, v.value = K, r.value = !0;
1406
1393
  return;
1407
1394
  }
1408
1395
  t.push({ name: w });
@@ -1411,12 +1398,12 @@ const Do = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Io = /*
1411
1398
  function O() {
1412
1399
  E.value && (t.push({ name: E.value }), E.value = null);
1413
1400
  }
1414
- const C = R(
1401
+ const C = D(
1415
1402
  () => {
1416
1403
  var _;
1417
1404
  return `NavigationTab.${(_ = l.currentBusiness.value) == null ? void 0 : _._id}`;
1418
1405
  }
1419
- ), H = k(!1), L = R({
1406
+ ), H = k(!1), L = D({
1420
1407
  get() {
1421
1408
  return H.value;
1422
1409
  },
@@ -1429,20 +1416,20 @@ const Do = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Io = /*
1429
1416
  L.value = !s.getItem(C.value);
1430
1417
  }, 2e3);
1431
1418
  }), (_, w) => {
1432
- const B = Y("FmCollapsibleTabs");
1419
+ const U = Y("FmCollapsibleTabs");
1433
1420
  return i(), c("div", Do, [
1434
- V(B, {
1421
+ I(U, {
1435
1422
  modelValue: Q.value,
1436
1423
  "onUpdate:modelValue": w[0] || (w[0] = (K) => Q.value = K),
1437
1424
  items: $(F)
1438
1425
  }, null, 8, ["modelValue", "items"]),
1439
- V(Lo, {
1426
+ I(Ro, {
1440
1427
  modelValue: r.value,
1441
1428
  "onUpdate:modelValue": w[1] || (w[1] = (K) => r.value = K),
1442
1429
  capability: u.value,
1443
1430
  result: v.value
1444
1431
  }, null, 8, ["modelValue", "capability", "result"]),
1445
- V(At, {
1432
+ I(Mt, {
1446
1433
  modelValue: p.value,
1447
1434
  "onUpdate:modelValue": w[2] || (w[2] = (K) => p.value = K),
1448
1435
  "feature-name": P.value,
@@ -1461,19 +1448,19 @@ typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
1461
1448
  typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(o) {
1462
1449
  return await new Promise((e) => setTimeout(e, o)), Promise.resolve(this);
1463
1450
  });
1464
- const Vo = {
1451
+ const Io = {
1465
1452
  key: 0,
1466
1453
  class: "flex h-5 items-center justify-center bg-amber-100 px-12 text-xs font-medium text-amber-800 shadow-sm"
1467
- }, qo = /* @__PURE__ */ ce({
1454
+ }, Xo = /* @__PURE__ */ ce({
1468
1455
  __name: "App",
1469
1456
  setup(o) {
1470
- const e = ve(), t = Mt(), l = $t(), a = window.location.href.includes("print-preview");
1471
- Ve(() => {
1457
+ const e = ge(), t = Ot(), l = St(), a = window.location.href.includes("print-preview");
1458
+ Ie(() => {
1472
1459
  if (window.location.href.includes("print-preview")) {
1473
1460
  e.setEmbedded(!0), document.body.classList.add("print-mode");
1474
1461
  return;
1475
1462
  }
1476
- e.registerSidebarComponent(Io), t.initGoogleMap(l.appApi.googleMap).catch(() => {
1463
+ e.registerSidebarComponent(Vo), t.initGoogleMap(l.appApi.googleMap).catch(() => {
1477
1464
  console.error("Google map cannot be loaded");
1478
1465
  });
1479
1466
  }), Z([() => e.currentCountry.value], () => {
@@ -1488,12 +1475,12 @@ const Vo = {
1488
1475
  }
1489
1476
  }
1490
1477
  return (r, u) => (i(), c(j, null, [
1491
- $(l).isDev && !$(a) ? (i(), c("div", Vo, " Non-production environment ")) : N("", !0),
1492
- V(nn),
1493
- $(a) ? N("", !0) : (i(), pe(bo, { key: 1 }))
1478
+ $(l).isDev && !$(a) ? (i(), c("div", Io, " Non-production environment ")) : N("", !0),
1479
+ I(on),
1480
+ $(a) ? N("", !0) : (i(), pe(xo, { key: 1 }))
1494
1481
  ], 64));
1495
1482
  }
1496
1483
  });
1497
1484
  export {
1498
- qo as default
1485
+ Xo as default
1499
1486
  };