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