@medusajs/dashboard 2.12.3-preview-20251217123836 → 2.12.3-snapshot-20251216185234

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 (126) hide show
  1. package/dist/{api-key-management-detail-FRUN2KFK.mjs → api-key-management-detail-6RCDH73M.mjs} +1 -1
  2. package/dist/app.css +0 -19
  3. package/dist/app.js +679 -795
  4. package/dist/app.mjs +2 -2
  5. package/dist/{campaign-detail-HM3GQJLQ.mjs → campaign-detail-5Q4BYCPX.mjs} +1 -1
  6. package/dist/{categories-metadata-WKL3MGD7.mjs → categories-metadata-J7M3XWI7.mjs} +1 -1
  7. package/dist/{category-detail-UTWWDKFP.mjs → category-detail-S5IPXMHX.mjs} +2 -2
  8. package/dist/{category-products-XXBTCXFF.mjs → category-products-KPW6BA5J.mjs} +2 -2
  9. package/dist/{chunk-UMCJYHAD.mjs → chunk-CVHJAKLQ.mjs} +1 -1
  10. package/dist/{chunk-KSDXSKJ7.mjs → chunk-DBXWB3RF.mjs} +1 -1
  11. package/dist/{chunk-GLBHPDR4.mjs → chunk-GRZSG4EP.mjs} +16 -21
  12. package/dist/{chunk-FKNW5MLZ.mjs → chunk-LZFWCKOF.mjs} +4 -21
  13. package/dist/{chunk-5ISRTMYH.mjs → chunk-MJDHVDOW.mjs} +1 -1
  14. package/dist/{chunk-5F427YCP.mjs → chunk-OL24RDYM.mjs} +2 -2
  15. package/dist/{chunk-VFF5WB7C.mjs → chunk-OL6MEUKW.mjs} +104 -108
  16. package/dist/{chunk-OK6NZN2A.mjs → chunk-PHLCT2HA.mjs} +1 -1
  17. package/dist/{chunk-DQUXK4WW.mjs → chunk-ST4P6BQN.mjs} +1 -1
  18. package/dist/{chunk-HNJ65IND.mjs → chunk-WYATCUOM.mjs} +1 -1
  19. package/dist/{chunk-DTCIBQO2.mjs → chunk-YYOPBKME.mjs} +1 -1
  20. package/dist/{chunk-SG2JZPTG.mjs → chunk-ZMG5B4FG.mjs} +1 -1
  21. package/dist/{collection-add-products-42F7H77E.mjs → collection-add-products-FU2BS3D3.mjs} +2 -2
  22. package/dist/{collection-detail-PXIS3G64.mjs → collection-detail-VJE7XHLV.mjs} +2 -2
  23. package/dist/{collection-list-O74CGY24.mjs → collection-list-IGA6SCNF.mjs} +2 -2
  24. package/dist/{collection-metadata-U6FMA4IC.mjs → collection-metadata-QK7MI3D2.mjs} +1 -1
  25. package/dist/{customer-detail-OMTFJ6CE.mjs → customer-detail-MOV2T3LF.mjs} +1 -1
  26. package/dist/{customer-group-detail-ADK3M5LG.mjs → customer-group-detail-6T7OXGQD.mjs} +1 -1
  27. package/dist/{customer-group-list-7ZRQ2HWU.mjs → customer-group-list-AJEAF5D2.mjs} +1 -1
  28. package/dist/{customers-add-customer-group-5U27WHJB.mjs → customers-add-customer-group-QVTVSQYM.mjs} +1 -1
  29. package/dist/{edit-rules-BM2ERGVJ.mjs → edit-rules-SMVRTCUP.mjs} +1 -1
  30. package/dist/en.json +1 -1
  31. package/dist/{inventory-create-7MA7B5N2.mjs → inventory-create-BK52VALF.mjs} +2 -2
  32. package/dist/{inventory-detail-B4PRHZK3.mjs → inventory-detail-ZPSEMYI2.mjs} +1 -1
  33. package/dist/{inventory-metadata-C7MJ3GY5.mjs → inventory-metadata-FNEJ3RAT.mjs} +1 -1
  34. package/dist/{inventory-stock-WVTYPJTX.mjs → inventory-stock-6WYWLWJ7.mjs} +3 -3
  35. package/dist/{location-detail-KO6EBDK5.mjs → location-detail-N3GUZSY7.mjs} +1 -1
  36. package/dist/{location-fulfillment-providers-IORBE3E3.mjs → location-fulfillment-providers-7ZUJAGNY.mjs} +2 -2
  37. package/dist/{location-service-zone-shipping-option-create-2R3ZFLVK.mjs → location-service-zone-shipping-option-create-CNRWYZQC.mjs} +3 -3
  38. package/dist/{location-service-zone-shipping-option-pricing-5HN2Z5RB.mjs → location-service-zone-shipping-option-pricing-OGWI7VPT.mjs} +2 -2
  39. package/dist/{login-XKB6OR7I.mjs → login-VNOLI5YG.mjs} +1 -1
  40. package/dist/{order-create-claim-NKCOGF4A.mjs → order-create-claim-SCDJGM46.mjs} +1 -1
  41. package/dist/{order-create-edit-UNQYXGLL.mjs → order-create-edit-2WALBPXS.mjs} +1 -1
  42. package/dist/{order-create-exchange-WI7OA2WO.mjs → order-create-exchange-LQU4YN7F.mjs} +1 -1
  43. package/dist/{order-create-fulfillment-2LJTEWDY.mjs → order-create-fulfillment-OWUVTZXW.mjs} +1 -1
  44. package/dist/{order-create-refund-7K6UJXGP.mjs → order-create-refund-Q6HQY42R.mjs} +1 -1
  45. package/dist/{order-create-shipment-ZTDLLUBY.mjs → order-create-shipment-WAGGEPRW.mjs} +1 -1
  46. package/dist/{order-detail-JTRUMRLO.mjs → order-detail-PVPGEWGY.mjs} +1 -1
  47. package/dist/{order-edit-billing-address-YHYNVLOE.mjs → order-edit-billing-address-UM76J4KX.mjs} +1 -1
  48. package/dist/{order-edit-email-TCQPEVZY.mjs → order-edit-email-CL3KNOCM.mjs} +1 -1
  49. package/dist/{order-edit-shipping-address-CFSYQLKD.mjs → order-edit-shipping-address-PIESTGVL.mjs} +1 -1
  50. package/dist/{order-export-G4SBNEJ7.mjs → order-export-LE363ZLB.mjs} +1 -1
  51. package/dist/{order-metadata-KGPB37VL.mjs → order-metadata-FHBB7MTG.mjs} +1 -1
  52. package/dist/{order-receive-return-JER24SEV.mjs → order-receive-return-PRVKP6J2.mjs} +1 -1
  53. package/dist/{order-request-transfer-3FBUYZNT.mjs → order-request-transfer-XSAGRUMT.mjs} +1 -1
  54. package/dist/{price-list-create-CXZCFFTP.mjs → price-list-create-K5JEZT57.mjs} +4 -4
  55. package/dist/{price-list-detail-XOMU6U5J.mjs → price-list-detail-Q5VG5VGW.mjs} +2 -2
  56. package/dist/{price-list-prices-add-SDX5CQME.mjs → price-list-prices-add-2MQ226U4.mjs} +4 -4
  57. package/dist/{price-list-prices-edit-EKB6NI5D.mjs → price-list-prices-edit-OJZLV7OS.mjs} +2 -2
  58. package/dist/{product-attributes-MXDPSOWM.mjs → product-attributes-YF4TZOIO.mjs} +2 -2
  59. package/dist/{product-create-3O34JJLS.mjs → product-create-KJML2332.mjs} +3 -3
  60. package/dist/{product-create-variant-OTJKT6WI.mjs → product-create-variant-5EBCLM54.mjs} +2 -2
  61. package/dist/{product-detail-SYTLG5D3.mjs → product-detail-QG72542C.mjs} +2 -2
  62. package/dist/{product-edit-W72S22NM.mjs → product-edit-DZZR775Q.mjs} +2 -2
  63. package/dist/{product-export-57UUAGXF.mjs → product-export-5AD7NELI.mjs} +2 -2
  64. package/dist/{product-image-variants-edit-2BW5BJON.mjs → product-image-variants-edit-M6QF2RLE.mjs} +1 -1
  65. package/dist/{product-import-6EM4VUXP.mjs → product-import-V3KQN4TV.mjs} +1 -1
  66. package/dist/{product-list-5V5GEH5K.mjs → product-list-EUWZIFTM.mjs} +2 -2
  67. package/dist/{product-metadata-JZLHBLZQ.mjs → product-metadata-GL2MVPDI.mjs} +1 -1
  68. package/dist/{product-organization-SVXTCWIF.mjs → product-organization-O7RHELMQ.mjs} +2 -2
  69. package/dist/{product-prices-5ZL2RP7A.mjs → product-prices-YWV6MSM6.mjs} +1 -1
  70. package/dist/{product-stock-SJJABF6I.mjs → product-stock-AKEFMK5O.mjs} +3 -3
  71. package/dist/{product-tag-create-XXO4AQEC.mjs → product-tag-create-PQMDDKWH.mjs} +1 -1
  72. package/dist/{product-tag-detail-BSK64HXL.mjs → product-tag-detail-I3MBZX7U.mjs} +3 -3
  73. package/dist/{product-tag-edit-ENCGDT7E.mjs → product-tag-edit-K3BBQLJR.mjs} +1 -1
  74. package/dist/{product-tag-list-SLQGCNDZ.mjs → product-tag-list-JUWSOMB7.mjs} +3 -3
  75. package/dist/{product-tag-metadata-EPXHMU2K.mjs → product-tag-metadata-MJH5LH7E.mjs} +1 -1
  76. package/dist/{product-type-detail-4CRRU7YK.mjs → product-type-detail-RKHT5NBL.mjs} +2 -2
  77. package/dist/{product-type-metadata-73OKOGPP.mjs → product-type-metadata-CDJDFFGQ.mjs} +1 -1
  78. package/dist/{product-variant-detail-RPHLG4HU.mjs → product-variant-detail-XAYG5CKE.mjs} +1 -1
  79. package/dist/{product-variant-edit-JF7NN64Y.mjs → product-variant-edit-DEZEY2H2.mjs} +1 -1
  80. package/dist/{product-variant-metadata-HU2CXGPO.mjs → product-variant-metadata-VTZDNWUT.mjs} +1 -1
  81. package/dist/{promotion-create-BHA3FQG2.mjs → promotion-create-HWFNUQXG.mjs} +1 -1
  82. package/dist/{promotion-detail-F3QSR52W.mjs → promotion-detail-QC36KXB3.mjs} +1 -1
  83. package/dist/{refund-reason-create-ZA5TKW2Z.mjs → refund-reason-create-YHCDEHGQ.mjs} +1 -1
  84. package/dist/{refund-reason-edit-N2CRCLKZ.mjs → refund-reason-edit-CZ5QZ2SZ.mjs} +1 -1
  85. package/dist/{refund-reason-list-SE4TMGMT.mjs → refund-reason-list-OJYYEYJE.mjs} +1 -1
  86. package/dist/{region-metadata-O5NZBWXP.mjs → region-metadata-H6XXUQ4S.mjs} +1 -1
  87. package/dist/{reservation-detail-UFK6XIXE.mjs → reservation-detail-LZAQL4XA.mjs} +1 -1
  88. package/dist/{reservation-metadata-AEJEKGLV.mjs → reservation-metadata-5HZSDDOK.mjs} +1 -1
  89. package/dist/{sales-channel-add-products-2LMB7EF5.mjs → sales-channel-add-products-F7YV4MO5.mjs} +2 -2
  90. package/dist/{sales-channel-detail-EUQ4STQI.mjs → sales-channel-detail-MXIPZCGA.mjs} +2 -2
  91. package/dist/{sales-channel-list-JXKGHX4G.mjs → sales-channel-list-RLGL7FM3.mjs} +1 -1
  92. package/dist/{sales-channel-metadata-AJMQ5SQ2.mjs → sales-channel-metadata-M364R4RJ.mjs} +1 -1
  93. package/dist/{shipping-option-type-create-YVVIA2XC.mjs → shipping-option-type-create-C5WUWON7.mjs} +1 -1
  94. package/dist/{shipping-option-type-detail-ZZW36XLK.mjs → shipping-option-type-detail-PENS2K73.mjs} +2 -2
  95. package/dist/{shipping-option-type-edit-O6F74T3A.mjs → shipping-option-type-edit-CIU5EHRP.mjs} +1 -1
  96. package/dist/{shipping-option-type-list-SPTE7MT6.mjs → shipping-option-type-list-DIOX7VG7.mjs} +2 -2
  97. package/dist/{shipping-profile-metadata-7WFE55VG.mjs → shipping-profile-metadata-75G2NNMA.mjs} +1 -1
  98. package/dist/{chunk-IKTGFXWR.mjs → store-add-locales-VJ4RJ7UI.mjs} +67 -2
  99. package/dist/{store-detail-YLJLBBZE.mjs → store-detail-JSNPOB2F.mjs} +1 -1
  100. package/dist/{store-metadata-BZ57I2E6.mjs → store-metadata-CYXTVJUE.mjs} +1 -1
  101. package/dist/{tax-region-create-FGTV7VJL.mjs → tax-region-create-DWGL4EUT.mjs} +1 -1
  102. package/dist/{tax-region-detail-PPIMD7OX.mjs → tax-region-detail-2AE2EFI3.mjs} +5 -5
  103. package/dist/{tax-region-edit-ELZKA7YH.mjs → tax-region-edit-EEVEEU2Q.mjs} +1 -1
  104. package/dist/{tax-region-province-detail-FV2NDT3E.mjs → tax-region-province-detail-4ERSEQFF.mjs} +5 -5
  105. package/dist/{tax-region-tax-override-create-N572MQPZ.mjs → tax-region-tax-override-create-PHCGEF7V.mjs} +3 -3
  106. package/dist/{tax-region-tax-override-edit-5DCSJW6D.mjs → tax-region-tax-override-edit-SMRPSILC.mjs} +4 -4
  107. package/dist/{translation-list-FK7XYLHX.mjs → translation-list-UF7FLXOW.mjs} +141 -227
  108. package/dist/{translations-edit-VRXZI5KW.mjs → translations-edit-USQJNMAY.mjs} +253 -224
  109. package/dist/{user-metadata-GRJZZ524.mjs → user-metadata-2WPJOEJA.mjs} +1 -1
  110. package/dist/{workflow-execution-detail-HXTFWGKG.mjs → workflow-execution-detail-H2AKEZJX.mjs} +1 -1
  111. package/package.json +9 -9
  112. package/src/components/data-grid/hooks/use-data-grid-cell.tsx +0 -1
  113. package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +0 -1
  114. package/src/components/data-grid/hooks/use-data-grid-keydown-event.tsx +4 -22
  115. package/src/dashboard-app/routes/get-route.map.tsx +0 -4
  116. package/src/hooks/api/translations.tsx +17 -26
  117. package/src/i18n/translations/en.json +1 -1
  118. package/src/i18n/translations/es.json +1 -1
  119. package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +17 -42
  120. package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +1 -5
  121. package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +121 -182
  122. package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +330 -285
  123. package/dist/add-locales-GGNZCABB.mjs +0 -81
  124. package/dist/store-add-locales-GWCGIXHU.mjs +0 -81
  125. package/src/routes/translations/add-locales/add-locales.tsx +0 -29
  126. package/src/routes/translations/add-locales/index.tsx +0 -1
package/dist/app.js CHANGED
@@ -11917,7 +11917,7 @@ var init_en = __esm({
11917
11917
  completion: {
11918
11918
  heading: "Translated fields",
11919
11919
  translated: "Translated",
11920
- toTranslate: "Missing",
11920
+ toTranslate: "To be translated",
11921
11921
  footer: "Languages"
11922
11922
  }
11923
11923
  },
@@ -15149,7 +15149,7 @@ var init_es = __esm({
15149
15149
  completion: {
15150
15150
  heading: "Textos traducidos",
15151
15151
  translated: "Traducidos",
15152
- toTranslate: "Faltantes",
15152
+ toTranslate: "Por traducir",
15153
15153
  footer: "Idiomas"
15154
15154
  }
15155
15155
  },
@@ -96929,7 +96929,7 @@ var init_tax_rates = __esm({
96929
96929
  });
96930
96930
 
96931
96931
  // src/hooks/api/translations.tsx
96932
- var import_react_query43, TRANSLATIONS_QUERY_KEY, translationsQueryKeys, TRANSLATION_SETTINGS_QUERY_KEY, translationSettingsQueryKeys, TRANSLATION_STATISTICS_QUERY_KEY, translationStatisticsQueryKeys, useReferenceTranslations, referenceInvalidationKeysMap, useBatchTranslations, useTranslationSettings, useTranslationStatistics;
96932
+ var import_react_query43, TRANSLATIONS_QUERY_KEY, translationsQueryKeys, TRANSLATION_SETTINGS_QUERY_KEY, translationSettingsQueryKeys, TRANSLATION_STATISTICS_QUERY_KEY, translationStatisticsQueryKeys, useReferenceTranslations, useBatchTranslations, useTranslationSettings, useTranslationStatistics;
96933
96933
  var init_translations2 = __esm({
96934
96934
  "src/hooks/api/translations.tsx"() {
96935
96935
  "use strict";
@@ -97085,33 +97085,28 @@ var init_translations2 = __esm({
97085
97085
  const { data, ...rest } = referenceHook();
97086
97086
  return { ...data, ...rest };
97087
97087
  };
97088
- referenceInvalidationKeysMap = /* @__PURE__ */ new Map([
97089
- ["product", productsQueryKeys.lists()],
97090
- ["product_variant", productVariantQueryKeys.lists()],
97091
- ["product_category", categoriesQueryKeys.lists()],
97092
- ["product_collection", collectionsQueryKeys.lists()],
97093
- ["product_type", productTypesQueryKeys.lists()],
97094
- ["product_tag", productTagsQueryKeys.lists()]
97095
- ]);
97096
97088
  useBatchTranslations = (reference, options) => {
97097
- const mutation = (0, import_react_query43.useMutation)({
97089
+ const referenceInvalidationKeysMap = /* @__PURE__ */ new Map([
97090
+ ["product", productsQueryKeys.lists()],
97091
+ ["product_variant", productVariantQueryKeys.lists()],
97092
+ ["product_category", categoriesQueryKeys.lists()],
97093
+ ["product_collection", collectionsQueryKeys.lists()],
97094
+ ["product_type", productTypesQueryKeys.lists()],
97095
+ ["product_tag", productTagsQueryKeys.lists()]
97096
+ ]);
97097
+ return (0, import_react_query43.useMutation)({
97098
97098
  mutationFn: (payload) => sdk.admin.translation.batch(payload),
97099
- ...options
97100
- });
97101
- const invalidateQueries = async () => {
97102
- await Promise.all([
97099
+ onSuccess: (data, variables, context) => {
97103
97100
  queryClient.invalidateQueries({
97104
97101
  queryKey: referenceInvalidationKeysMap.get(reference)
97105
- }),
97102
+ });
97106
97103
  queryClient.invalidateQueries({
97107
97104
  queryKey: translationStatisticsQueryKeys.lists()
97108
- })
97109
- ]);
97110
- };
97111
- return {
97112
- ...mutation,
97113
- invalidateQueries
97114
- };
97105
+ });
97106
+ options?.onSuccess?.(data, variables, context);
97107
+ },
97108
+ ...options
97109
+ });
97115
97110
  };
97116
97111
  useTranslationSettings = (query, options) => {
97117
97112
  const { data, ...rest } = (0, import_react_query43.useQuery)({
@@ -114125,7 +114120,6 @@ var init_use_data_grid_cell = __esm({
114125
114120
  case "number":
114126
114121
  return numberCharacterRegex.test(key);
114127
114122
  case "text":
114128
- case "multiline-text":
114129
114123
  return textCharacterRegex.test(key);
114130
114124
  default:
114131
114125
  return false;
@@ -115276,7 +115270,6 @@ function convertArrayToPrimitive(values, type) {
115276
115270
  case "boolean":
115277
115271
  return values.map(convertToBoolean);
115278
115272
  case "text":
115279
- case "multiline-text":
115280
115273
  return values.map(covertToString);
115281
115274
  default:
115282
115275
  throw new Error(`Unsupported target type "${type}".`);
@@ -115477,19 +115470,7 @@ var init_use_data_grid_keydown_event = __esm({
115477
115470
  },
115478
115471
  [rangeEnd, matrix, getSelectionValues, setSelectionValues, execute]
115479
115472
  );
115480
- const handleSpaceKeyText = (0, import_react99.useCallback)(
115481
- (anchor2) => {
115482
- const field = matrix.getCellField(anchor2);
115483
- const input = queryTool?.getInput(anchor2);
115484
- if (!field || !input) {
115485
- return;
115486
- }
115487
- createSnapshot(anchor2);
115488
- input.focus();
115489
- },
115490
- [matrix, queryTool, createSnapshot]
115491
- );
115492
- const handleSpaceKeyNumber = (0, import_react99.useCallback)(
115473
+ const handleSpaceKeyTextOrNumber = (0, import_react99.useCallback)(
115493
115474
  (anchor2) => {
115494
115475
  const field = matrix.getCellField(anchor2);
115495
115476
  const input = queryTool?.getInput(anchor2);
@@ -115560,12 +115541,10 @@ var init_use_data_grid_keydown_event = __esm({
115560
115541
  case "togglable-number":
115561
115542
  handleSpaceKeyTogglableNumber(anchor);
115562
115543
  break;
115544
+ case "number":
115563
115545
  case "text":
115564
115546
  case "multiline-text":
115565
- handleSpaceKeyText(anchor);
115566
- break;
115567
- case "number":
115568
- handleSpaceKeyNumber(anchor);
115547
+ handleSpaceKeyTextOrNumber(anchor);
115569
115548
  break;
115570
115549
  }
115571
115550
  },
@@ -115574,8 +115553,7 @@ var init_use_data_grid_keydown_event = __esm({
115574
115553
  isEditing,
115575
115554
  matrix,
115576
115555
  handleSpaceKeyBoolean,
115577
- handleSpaceKeyText,
115578
- handleSpaceKeyNumber,
115556
+ handleSpaceKeyTextOrNumber,
115579
115557
  handleSpaceKeyTogglableNumber
115580
115558
  ]
115581
115559
  );
@@ -190748,9 +190726,8 @@ var init_active_locales_section = __esm({
190748
190726
  }) => {
190749
190727
  const { t: t5 } = (0, import_react_i18next483.useTranslation)();
190750
190728
  const navigate = (0, import_react_router_dom245.useNavigate)();
190751
- const [isHovered, setIsHovered] = (0, import_react304.useState)(false);
190752
190729
  const handleManageLocales = (0, import_react304.useCallback)(() => {
190753
- navigate("/settings/translations/add-locales");
190730
+ navigate("/settings/store/locales");
190754
190731
  }, [navigate]);
190755
190732
  const renderLocales = (0, import_react304.useCallback)(() => {
190756
190733
  const maxLocalesToDetail = 2;
@@ -190762,31 +190739,16 @@ var init_active_locales_section = __esm({
190762
190739
  const hasLocales = locales.length > 0;
190763
190740
  return /* @__PURE__ */ (0, import_jsx_runtime686.jsxs)(import_ui450.Container, { className: "flex flex-col p-0", children: [
190764
190741
  /* @__PURE__ */ (0, import_jsx_runtime686.jsxs)("div", { className: "flex items-center justify-between px-6 py-4", children: [
190765
- /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Heading, { level: "h2", children: t5("translations.activeLocales.heading") }),
190742
+ /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Heading, { children: t5("translations.activeLocales.heading") }),
190766
190743
  /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.IconButton, { variant: "transparent", onClick: handleManageLocales, children: /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_icons174.PencilSquare, {}) })
190767
190744
  ] }),
190768
- /* @__PURE__ */ (0, import_jsx_runtime686.jsx)("div", { className: "px-1 pb-1", children: hasLocales ? /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(
190769
- import_ui450.Tooltip,
190770
- {
190771
- open: isHovered,
190772
- content: /* @__PURE__ */ (0, import_jsx_runtime686.jsx)("div", { className: "flex flex-col gap-y-1 p-1", children: locales.map((locale) => /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { size: "small", weight: "plus", children: locale.name }, locale.code)) }),
190773
- children: /* @__PURE__ */ (0, import_jsx_runtime686.jsxs)(
190774
- import_ui450.Container,
190775
- {
190776
- className: "bg-ui-bg-component border-r-1 flex items-center gap-x-4 px-[19px] py-2",
190777
- onMouseEnter: () => setIsHovered(true),
190778
- onMouseLeave: () => setIsHovered(false),
190779
- children: [
190780
- /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(IconAvatar, { className: "border-ui-border-base border", children: /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_icons174.Language, {}) }),
190781
- /* @__PURE__ */ (0, import_jsx_runtime686.jsxs)("div", { className: "flex flex-col", children: [
190782
- /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { size: "small", weight: "plus", children: t5("translations.activeLocales.subtitle") }),
190783
- /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { className: "text-ui-fg-subtle", size: "small", children: renderLocales() })
190784
- ] })
190785
- ]
190786
- }
190787
- )
190788
- }
190789
- ) : /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.InlineTip, { label: "Tip", children: t5("translations.activeLocales.noLocalesTip") }) })
190745
+ /* @__PURE__ */ (0, import_jsx_runtime686.jsx)("div", { className: "px-1 pb-1", children: hasLocales ? /* @__PURE__ */ (0, import_jsx_runtime686.jsxs)(import_ui450.Container, { className: "bg-ui-bg-component flex items-center gap-x-4 px-6 py-2", children: [
190746
+ /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(IconAvatar, { children: /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_icons174.Language, {}) }),
190747
+ /* @__PURE__ */ (0, import_jsx_runtime686.jsxs)("div", { className: "flex flex-col", children: [
190748
+ /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { size: "small", weight: "plus", children: t5("translations.activeLocales.subtitle") }),
190749
+ /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { className: "text-ui-fg-subtle", size: "small", children: renderLocales() })
190750
+ ] })
190751
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.InlineTip, { label: "Tip", children: t5("translations.activeLocales.noLocalesTip") }) })
190790
190752
  ] });
190791
190753
  };
190792
190754
  }
@@ -190820,15 +190782,7 @@ var init_translation_list_section = __esm({
190820
190782
  import_react_router_dom246.Link,
190821
190783
  {
190822
190784
  to: `/settings/translations/edit?reference=${entity.reference}`,
190823
- children: /* @__PURE__ */ (0, import_jsx_runtime687.jsx)(
190824
- import_ui451.Button,
190825
- {
190826
- variant: "secondary",
190827
- size: "small",
190828
- disabled: !hasLocales || !entity.totalCount,
190829
- children: "Edit"
190830
- }
190831
- )
190785
+ children: /* @__PURE__ */ (0, import_jsx_runtime687.jsx)(import_ui451.Button, { variant: "secondary", size: "small", disabled: !hasLocales, children: "Edit" })
190832
190786
  }
190833
190787
  )
190834
190788
  ]
@@ -190896,215 +190850,160 @@ var init_translations_completion_section = __esm({
190896
190850
  () => Math.max(...localeStats.map((s) => s.total), 1),
190897
190851
  [localeStats]
190898
190852
  );
190899
- const localeStatsCount = (0, import_react305.useMemo)(() => localeStats.length, [localeStats]);
190900
- return /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_ui452.Container, { className: "p-0", children: [
190901
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex flex-col gap-y-4 px-6 py-4", children: [
190902
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center justify-between", children: [
190903
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_ui452.Heading, { level: "h2", children: t5("translations.completion.heading") }),
190904
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_ui452.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
190905
- translatedCount.toLocaleString(),
190906
- " ",
190907
- t5("general.of"),
190908
- " ",
190909
- totalCount.toLocaleString()
190910
- ] })
190911
- ] }),
190912
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)("div", { className: "flex h-3 w-full overflow-hidden", children: percentage > 0 ? /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_jsx_runtime688.Fragment, { children: [
190913
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190914
- "div",
190915
- {
190916
- className: "mr-0.5 h-full rounded-sm transition-all",
190917
- style: {
190918
- width: `${percentage}%`,
190919
- backgroundColor: "var(--tag-blue-icon)",
190920
- boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
190921
- }
190922
- }
190923
- ),
190924
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190925
- "div",
190926
- {
190927
- className: "h-full flex-1 rounded-sm",
190928
- style: {
190929
- backgroundColor: "var(--tag-blue-border)",
190930
- boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
190931
- }
190853
+ return /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_ui452.Container, { className: "flex flex-col gap-y-3 px-6 py-4", children: [
190854
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center justify-between", children: [
190855
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_ui452.Heading, { children: t5("translations.completion.heading") }),
190856
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_ui452.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
190857
+ translatedCount.toLocaleString(),
190858
+ " ",
190859
+ t5("general.of"),
190860
+ " ",
190861
+ totalCount.toLocaleString()
190862
+ ] })
190863
+ ] }),
190864
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)("div", { className: "flex h-3 w-full overflow-hidden", children: percentage > 0 ? /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_jsx_runtime688.Fragment, { children: [
190865
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190866
+ "div",
190867
+ {
190868
+ className: "mr-0.5 h-full rounded-sm transition-all",
190869
+ style: {
190870
+ width: `${percentage}%`,
190871
+ backgroundColor: "var(--bg-interactive)"
190932
190872
  }
190933
- )
190934
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190873
+ }
190874
+ ),
190875
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190935
190876
  "div",
190936
190877
  {
190937
- className: "h-full w-full rounded-sm",
190878
+ className: "h-full flex-1 rounded-sm",
190938
190879
  style: {
190939
- backgroundColor: "var(--tag-blue-border)",
190940
- boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
190880
+ backgroundColor: "var(--bg-interactive)",
190881
+ opacity: 0.3
190941
190882
  }
190942
190883
  }
190943
- ) }),
190944
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center justify-between", children: [
190945
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_ui452.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
190946
- percentage.toFixed(1),
190947
- "%"
190948
- ] }),
190949
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_ui452.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
190950
- remaining.toLocaleString(),
190951
- " ",
190952
- t5("general.remaining").toLowerCase()
190953
- ] })
190884
+ )
190885
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190886
+ "div",
190887
+ {
190888
+ className: "h-full w-full rounded-full",
190889
+ style: {
190890
+ backgroundColor: "var(--bg-interactive)",
190891
+ opacity: 0.3
190892
+ }
190893
+ }
190894
+ ) }),
190895
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center justify-between", children: [
190896
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_ui452.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
190897
+ percentage.toFixed(1),
190898
+ "%"
190899
+ ] }),
190900
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_ui452.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
190901
+ remaining.toLocaleString(),
190902
+ " ",
190903
+ t5("general.remaining").toLowerCase()
190954
190904
  ] })
190955
190905
  ] }),
190956
- localeStats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_jsx_runtime688.Fragment, { children: [
190957
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_ui452.Divider, { variant: "dashed" }),
190958
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex flex-col gap-y-3 px-6 pb-6 pt-4", children: [
190959
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)("div", { className: "flex h-32 w-full items-end gap-1", children: localeStats.map((locale) => {
190960
- const heightPercent = locale.total / maxTotal * 100;
190961
- const translatedPercent = locale.total > 0 ? locale.translated / locale.total * 100 : 0;
190962
- return /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190963
- import_ui452.Tooltip,
190964
- {
190965
- open: hoveredLocale === locale.code,
190966
- content: /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex min-w-[150px] flex-col gap-y-1 p-1", children: [
190967
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_ui452.Text, { size: "small", weight: "plus", children: locale.name }),
190968
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center justify-between", children: [
190969
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center gap-x-2", children: [
190970
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190971
- "div",
190972
- {
190973
- className: "h-2 w-2 rounded-full",
190974
- style: {
190975
- backgroundColor: "var(--tag-blue-icon)",
190976
- boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
190977
- }
190978
- }
190979
- ),
190980
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190981
- import_ui452.Text,
190982
- {
190983
- size: "small",
190984
- weight: "plus",
190985
- className: "text-ui-fg-base",
190986
- children: t5("translations.completion.translated")
190987
- }
190988
- )
190989
- ] }),
190906
+ localeStats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "mt-4 flex flex-col gap-y-2", children: [
190907
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)("div", { className: "flex h-32 w-full items-end gap-1", children: localeStats.map((locale) => {
190908
+ const heightPercent = locale.total / maxTotal * 100;
190909
+ const translatedPercent = locale.total > 0 ? locale.translated / locale.total * 100 : 0;
190910
+ return /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190911
+ import_ui452.Tooltip,
190912
+ {
190913
+ open: hoveredLocale === locale.code,
190914
+ content: /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex flex-col gap-y-1 p-1", children: [
190915
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_ui452.Text, { size: "small", weight: "plus", children: locale.name }),
190916
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center justify-between", children: [
190917
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center gap-x-2", children: [
190990
190918
  /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190991
- import_ui452.Text,
190919
+ "div",
190992
190920
  {
190993
- size: "small",
190994
- weight: "plus",
190995
- className: "text-ui-fg-base",
190996
- children: locale.translated
190921
+ className: "h-2 w-2 rounded-full",
190922
+ style: { backgroundColor: "var(--bg-interactive)" }
190997
190923
  }
190998
- )
190999
- ] }),
191000
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center justify-between", children: [
191001
- /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center gap-x-2", children: [
191002
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191003
- "div",
191004
- {
191005
- className: "h-2 w-2 rounded-full",
191006
- style: {
191007
- backgroundColor: "var(--tag-blue-border)",
191008
- boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
191009
- }
191010
- }
191011
- ),
191012
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191013
- import_ui452.Text,
191014
- {
191015
- size: "small",
191016
- weight: "plus",
191017
- className: "text-ui-fg-base",
191018
- children: t5("translations.completion.toTranslate")
191019
- }
191020
- )
191021
- ] }),
190924
+ ),
191022
190925
  /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191023
190926
  import_ui452.Text,
191024
190927
  {
191025
190928
  size: "small",
191026
190929
  weight: "plus",
191027
- className: "text-ui-fg-base",
191028
- children: locale.toTranslate
190930
+ className: "text-ui-fg-subtle",
190931
+ children: t5("translations.completion.translated")
191029
190932
  }
191030
190933
  )
191031
- ] })
190934
+ ] }),
190935
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_ui452.Text, { size: "small", weight: "plus", children: locale.translated })
191032
190936
  ] }),
191033
- children: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)("div", { className: "flex h-full flex-1 items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191034
- "div",
191035
- {
191036
- className: "flex w-full min-w-2 max-w-[96px] flex-col justify-end overflow-hidden rounded-t-sm transition-opacity",
191037
- style: { height: `${heightPercent}%` },
191038
- onMouseEnter: () => setHoveredLocale(locale.code),
191039
- onMouseLeave: () => setHoveredLocale(null),
191040
- children: translatedPercent === 0 ? /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190937
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)("div", { className: "flex items-center gap-x-2", children: [
190938
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190939
+ "div",
190940
+ {
190941
+ className: "h-2 w-2 rounded-full",
190942
+ style: {
190943
+ backgroundColor: "var(--bg-interactive)",
190944
+ opacity: 0.3
190945
+ }
190946
+ }
190947
+ ),
190948
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190949
+ import_ui452.Text,
190950
+ {
190951
+ size: "small",
190952
+ weight: "plus",
190953
+ className: "text-ui-fg-subtle",
190954
+ children: t5("translations.completion.toTranslate")
190955
+ }
190956
+ ),
190957
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_ui452.Text, { size: "small", weight: "plus", children: locale.toTranslate })
190958
+ ] })
190959
+ ] }),
190960
+ children: /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(
190961
+ "div",
190962
+ {
190963
+ className: "flex min-w-2 flex-1 cursor-pointer flex-col justify-end overflow-hidden rounded-t-sm transition-opacity",
190964
+ style: { height: `${heightPercent}%` },
190965
+ onMouseEnter: () => setHoveredLocale(locale.code),
190966
+ onMouseLeave: () => setHoveredLocale(null),
190967
+ children: [
190968
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191041
190969
  "div",
191042
190970
  {
191043
- className: "w-full rounded-sm",
190971
+ className: "w-full rounded-t-sm",
191044
190972
  style: {
191045
- height: "100%",
191046
- backgroundColor: "var(--tag-neutral-bg)",
191047
- boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
190973
+ height: `${100 - translatedPercent}%`,
190974
+ backgroundColor: "var(--bg-interactive)",
190975
+ opacity: 0.3,
190976
+ minHeight: locale.toTranslate > 0 ? "2px" : "0"
191048
190977
  }
191049
190978
  }
191050
- ) : /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(import_jsx_runtime688.Fragment, { children: [
191051
- /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191052
- "div",
191053
- {
191054
- className: "w-full rounded-sm",
191055
- style: {
191056
- height: `${100 - translatedPercent}%`,
191057
- backgroundColor: "var(--tag-blue-border)",
191058
- boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
191059
- minHeight: locale.toTranslate > 0 ? "2px" : "0"
191060
- }
191061
- }
191062
- ),
191063
- translatedPercent > 0 && /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191064
- "div",
191065
- {
191066
- className: "mt-0.5 w-full rounded-sm",
191067
- style: {
191068
- height: `${translatedPercent}%`,
191069
- backgroundColor: "var(--tag-blue-icon)",
191070
- boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
191071
- minHeight: locale.translated > 0 ? "2px" : "0"
191072
- }
190979
+ ),
190980
+ translatedPercent > 0 && /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190981
+ "div",
190982
+ {
190983
+ className: "mt-0.5 w-full rounded-sm",
190984
+ style: {
190985
+ height: `${translatedPercent}%`,
190986
+ backgroundColor: "var(--bg-interactive)",
190987
+ minHeight: locale.translated > 0 ? "2px" : "0"
191073
190988
  }
191074
- )
191075
- ] })
191076
- }
191077
- ) })
191078
- },
191079
- locale.code
191080
- );
191081
- }) }),
191082
- localeStatsCount < 9 && /* @__PURE__ */ (0, import_jsx_runtime688.jsx)("div", { className: "flex w-full gap-1", children: localeStats.map((locale) => /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191083
- "div",
191084
- {
191085
- className: "flex flex-1 items-center justify-center",
191086
- children: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191087
- import_ui452.Text,
191088
- {
191089
- size: "xsmall",
191090
- weight: "plus",
191091
- className: "text-ui-fg-subtle min-w-2 whitespace-normal break-words text-center leading-tight",
191092
- children: localeStatsCount < 6 ? locale.name : locale.code
190989
+ }
190990
+ )
190991
+ ]
191093
190992
  }
191094
190993
  )
191095
190994
  },
191096
190995
  locale.code
191097
- )) }),
191098
- localeStatsCount > 9 && /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
191099
- import_ui452.Text,
191100
- {
191101
- weight: "plus",
191102
- size: "xsmall",
191103
- className: "text-ui-fg-subtle text-center",
191104
- children: t5("translations.completion.footer")
191105
- }
191106
- )
191107
- ] })
190996
+ );
190997
+ }) }),
190998
+ /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
190999
+ import_ui452.Text,
191000
+ {
191001
+ size: "small",
191002
+ weight: "plus",
191003
+ className: "text-ui-fg-muted text-center",
191004
+ children: t5("translations.completion.footer")
191005
+ }
191006
+ )
191108
191007
  ] })
191109
191008
  ] });
191110
191009
  };
@@ -191247,113 +191146,153 @@ var init_translation_list2 = __esm({
191247
191146
  function isEntityRow(row) {
191248
191147
  return row._type === "entity";
191249
191148
  }
191250
- function buildLocaleSnapshot(translations, references, localeCode, translatableFields) {
191251
- const referenceTranslations = /* @__PURE__ */ new Map();
191149
+ function initTranslationsFormState(translations, references, availableLocales, translatableFields) {
191150
+ const existingMap = /* @__PURE__ */ new Map();
191252
191151
  for (const t5 of translations) {
191253
- if (t5.locale_code === localeCode) {
191254
- referenceTranslations.set(t5.reference_id, t5);
191255
- }
191256
- }
191257
- const entities = {};
191258
- for (const ref of references) {
191259
- const existing = referenceTranslations.get(ref.id);
191260
- const fields = {};
191261
- for (const fieldName of translatableFields) {
191262
- fields[fieldName] = existing?.translations?.[fieldName] ?? "";
191263
- }
191264
- entities[ref.id] = {
191265
- id: existing?.id ?? null,
191266
- fields
191267
- };
191268
- }
191269
- return { localeCode, entities };
191270
- }
191271
- function extendSnapshot(snapshot, translations, newReferences, translatableFields) {
191272
- const referenceTranslations = /* @__PURE__ */ new Map();
191273
- for (const t5 of translations) {
191274
- if (t5.locale_code === snapshot.localeCode) {
191275
- referenceTranslations.set(t5.reference_id, t5);
191276
- }
191277
- }
191278
- const extendedEntities = { ...snapshot.entities };
191279
- for (const ref of newReferences) {
191280
- if (!extendedEntities[ref.id]) {
191281
- const existing = referenceTranslations.get(ref.id);
191152
+ existingMap.set(`${t5.reference_id}:${t5.locale_code}`, t5);
191153
+ }
191154
+ const entitiesTranslationState = {};
191155
+ for (const reference of references) {
191156
+ const locales = {};
191157
+ for (const locale of availableLocales) {
191158
+ const key = `${reference.id}:${locale.locale_code}`;
191159
+ const existing = existingMap.get(key);
191282
191160
  const fields = {};
191283
191161
  for (const fieldName of translatableFields) {
191284
- fields[fieldName] = existing?.translations?.[fieldName] ?? "";
191162
+ const fieldValue = existing?.translations?.[fieldName] ?? "";
191163
+ fields[fieldName] = fieldValue;
191285
191164
  }
191286
- extendedEntities[ref.id] = {
191165
+ locales[locale.locale_code] = {
191287
191166
  id: existing?.id ?? null,
191167
+ locale_code: locale.locale_code,
191288
191168
  fields
191289
191169
  };
191290
191170
  }
191171
+ entitiesTranslationState[reference.id] = { locales };
191291
191172
  }
191292
- return { ...snapshot, entities: extendedEntities };
191173
+ return {
191174
+ entities: entitiesTranslationState
191175
+ };
191293
191176
  }
191294
- function snapshotToFormValues(snapshot) {
191295
- return { entities: snapshot.entities };
191177
+ function buildTranslationRows(references, translatableFields) {
191178
+ return references.map((reference) => ({
191179
+ _type: "entity",
191180
+ reference_id: reference.id,
191181
+ subRows: translatableFields.map((fieldName) => ({
191182
+ _type: "field",
191183
+ reference_id: reference.id,
191184
+ field_name: fieldName
191185
+ }))
191186
+ }));
191296
191187
  }
191297
- function computeChanges(currentState, snapshot, entityType, localeCode) {
191188
+ function transformToBatchPayload(currentState, initialState, entityType) {
191298
191189
  const payload = {
191299
191190
  create: [],
191300
191191
  update: [],
191301
191192
  delete: []
191302
191193
  };
191303
191194
  for (const [entityId, entityData] of Object.entries(currentState.entities)) {
191304
- const baseline = snapshot.entities[entityId];
191305
- if (!baseline) {
191195
+ for (const [localeCode, localeTranslations] of Object.entries(
191196
+ entityData.locales
191197
+ )) {
191198
+ const initial = initialState.entities[entityId]?.locales[localeCode];
191199
+ const hasContent = Object.values(localeTranslations.fields).some(
191200
+ (v) => v !== void 0 && v.trim() !== ""
191201
+ );
191202
+ const hadContent = initial && Object.values(initial.fields).some(
191203
+ (v) => v !== void 0 && v.trim() !== ""
191204
+ );
191205
+ if (!localeTranslations.id && hasContent) {
191206
+ payload.create.push({
191207
+ reference_id: entityId,
191208
+ reference: entityType,
191209
+ locale_code: localeTranslations.locale_code,
191210
+ translations: localeTranslations.fields
191211
+ });
191212
+ } else if (localeTranslations.id && hasContent) {
191213
+ const hasChanged = !initial || JSON.stringify(localeTranslations.fields) !== JSON.stringify(initial.fields);
191214
+ if (hasChanged) {
191215
+ payload.update.push({
191216
+ id: localeTranslations.id,
191217
+ translations: localeTranslations.fields
191218
+ });
191219
+ }
191220
+ } else if (localeTranslations.id && !hasContent && hadContent) {
191221
+ payload.delete.push(localeTranslations.id);
191222
+ }
191223
+ }
191224
+ }
191225
+ return payload;
191226
+ }
191227
+ function hasLocaleChanges(currentState, initialState, localeCode) {
191228
+ for (const [entityId, entityData] of Object.entries(currentState.entities)) {
191229
+ const currentLocale = entityData.locales[localeCode];
191230
+ const initialLocale = initialState.entities[entityId]?.locales[localeCode];
191231
+ if (!currentLocale || !initialLocale) {
191306
191232
  continue;
191307
191233
  }
191308
- const hasContent = Object.values(entityData.fields).some(
191234
+ for (const [fieldName, fieldValue] of Object.entries(
191235
+ currentLocale.fields
191236
+ )) {
191237
+ const initialValue = initialLocale.fields[fieldName] ?? "";
191238
+ const currentValue = fieldValue ?? "";
191239
+ if (currentValue !== initialValue) {
191240
+ return true;
191241
+ }
191242
+ }
191243
+ }
191244
+ return false;
191245
+ }
191246
+ function transformSingleLocaleToBatchPayload(currentState, initialState, entityType, localeCode) {
191247
+ const payload = {
191248
+ create: [],
191249
+ update: [],
191250
+ delete: []
191251
+ };
191252
+ for (const [entityId, entityData] of Object.entries(currentState.entities)) {
191253
+ const localeTranslations = entityData.locales[localeCode];
191254
+ if (!localeTranslations) continue;
191255
+ const initial = initialState.entities[entityId]?.locales[localeCode];
191256
+ const hasContent = Object.values(localeTranslations.fields).some(
191309
191257
  (v) => v !== void 0 && v.trim() !== ""
191310
191258
  );
191311
- const hadContent = Object.values(baseline.fields).some(
191259
+ const hadContent = initial && Object.values(initial.fields).some(
191312
191260
  (v) => v !== void 0 && v.trim() !== ""
191313
191261
  );
191314
- const hasChanged = JSON.stringify(entityData.fields) !== JSON.stringify(baseline.fields);
191315
- if (!entityData.id && hasContent) {
191262
+ if (!localeTranslations.id && hasContent) {
191316
191263
  payload.create.push({
191317
191264
  reference_id: entityId,
191318
191265
  reference: entityType,
191319
- locale_code: localeCode,
191320
- translations: entityData.fields
191321
- });
191322
- } else if (entityData.id && hasContent && hasChanged) {
191323
- payload.update.push({
191324
- id: entityData.id,
191325
- translations: entityData.fields
191326
- });
191327
- } else if (entityData.id && !hasContent && hadContent) {
191328
- payload.delete.push(entityData.id);
191266
+ locale_code: localeTranslations.locale_code,
191267
+ translations: localeTranslations.fields
191268
+ });
191269
+ } else if (localeTranslations.id && hasContent) {
191270
+ const hasChanged = !initial || JSON.stringify(localeTranslations.fields) !== JSON.stringify(initial.fields);
191271
+ if (hasChanged) {
191272
+ payload.update.push({
191273
+ id: localeTranslations.id,
191274
+ translations: localeTranslations.fields
191275
+ });
191276
+ }
191277
+ } else if (localeTranslations.id && !hasContent && hadContent) {
191278
+ payload.delete.push(localeTranslations.id);
191329
191279
  }
191330
191280
  }
191331
- const hasChanges = payload.create.length > 0 || payload.update.length > 0 || payload.delete.length > 0;
191332
- return { hasChanges, payload };
191333
- }
191334
- function buildTranslationRows(references, translatableFields) {
191335
- return references.map((reference) => ({
191336
- _type: "entity",
191337
- reference_id: reference.id,
191338
- subRows: translatableFields.map((fieldName) => ({
191339
- _type: "field",
191340
- reference_id: reference.id,
191341
- field_name: fieldName
191342
- }))
191343
- }));
191281
+ return payload;
191344
191282
  }
191345
191283
  function useTranslationsGridColumns({
191346
191284
  entities,
191285
+ translatableFields,
191347
191286
  availableLocales,
191348
191287
  selectedLocale,
191349
191288
  dynamicColumnWidth
191350
191289
  }) {
191351
191290
  const { t: t5 } = (0, import_react_i18next487.useTranslation)();
191352
- return (0, import_react307.useMemo)(() => {
191291
+ const columns = (0, import_react307.useMemo)(() => {
191353
191292
  const selectedLocaleData = availableLocales.find(
191354
191293
  (l) => l.locale_code === selectedLocale
191355
191294
  );
191356
- const columns = [
191295
+ const baseColumns = [
191357
191296
  columnHelper93.column({
191358
191297
  id: "field",
191359
191298
  name: "field",
@@ -191389,7 +191328,9 @@ function useTranslationsGridColumns({
191389
191328
  if (isEntityRow(row)) {
191390
191329
  return /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(DataGrid.ReadonlyCell, { context });
191391
191330
  }
191392
- const entity = entities.find((e) => e.id === row.reference_id);
191331
+ const entity = entities.find(
191332
+ (entity2) => entity2.id === row.reference_id
191333
+ );
191393
191334
  if (!entity) {
191394
191335
  return null;
191395
191336
  }
@@ -191398,7 +191339,7 @@ function useTranslationsGridColumns({
191398
191339
  })
191399
191340
  ];
191400
191341
  if (selectedLocaleData) {
191401
- columns.push(
191342
+ baseColumns.push(
191402
191343
  columnHelper93.column({
191403
191344
  id: selectedLocaleData.locale_code,
191404
191345
  name: selectedLocaleData.locale.name,
@@ -191416,16 +191357,24 @@ function useTranslationsGridColumns({
191416
191357
  if (isEntityRow(row)) {
191417
191358
  return null;
191418
191359
  }
191419
- return `entities.${row.reference_id}.fields.${row.field_name}`;
191360
+ return `entities.${row.reference_id}.locales.${selectedLocaleData.locale_code}.fields.${row.field_name}`;
191420
191361
  },
191421
191362
  type: "multiline-text"
191422
191363
  })
191423
191364
  );
191424
191365
  }
191425
- return columns;
191426
- }, [t5, availableLocales, selectedLocale, entities, dynamicColumnWidth]);
191366
+ return baseColumns;
191367
+ }, [
191368
+ t5,
191369
+ translatableFields,
191370
+ availableLocales,
191371
+ selectedLocale,
191372
+ entities,
191373
+ dynamicColumnWidth
191374
+ ]);
191375
+ return columns;
191427
191376
  }
191428
- var import_zod166, import_ui454, import_react307, import_react_hook_form145, import_react_i18next487, import_zod167, import_jsx_runtime690, EntityTranslationsSchema, TranslationsFormSchema, columnHelper93, FIELD_COLUMN_WIDTH, TranslationsEditForm;
191377
+ var import_zod166, import_ui454, import_react307, import_react_hook_form145, import_react_i18next487, import_zod167, import_jsx_runtime690, LocaleTranslationSchema, EntityTranslationsSchema, TranslationsFormSchema, columnHelper93, FIELD_COLUMN_WIDTH, TranslationsEditForm;
191429
191378
  var init_translations_edit_form = __esm({
191430
191379
  "src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx"() {
191431
191380
  "use strict";
@@ -191440,15 +191389,19 @@ var init_translations_edit_form = __esm({
191440
191389
  init_keybound_form2();
191441
191390
  init_translations2();
191442
191391
  import_jsx_runtime690 = require("react/jsx-runtime");
191443
- EntityTranslationsSchema = import_zod167.z.object({
191392
+ LocaleTranslationSchema = import_zod167.z.object({
191444
191393
  id: import_zod167.z.string().nullish(),
191394
+ locale_code: import_zod167.z.string(),
191445
191395
  fields: import_zod167.z.record(import_zod167.z.string().optional())
191446
191396
  });
191397
+ EntityTranslationsSchema = import_zod167.z.object({
191398
+ locales: import_zod167.z.record(LocaleTranslationSchema)
191399
+ });
191447
191400
  TranslationsFormSchema = import_zod167.z.object({
191448
191401
  entities: import_zod167.z.record(EntityTranslationsSchema)
191449
191402
  });
191450
191403
  columnHelper93 = createDataGridHelper();
191451
- FIELD_COLUMN_WIDTH = 350;
191404
+ FIELD_COLUMN_WIDTH = 150;
191452
191405
  TranslationsEditForm = ({
191453
191406
  translations,
191454
191407
  references,
@@ -191485,83 +191438,57 @@ var init_translations_edit_form = __esm({
191485
191438
  );
191486
191439
  const [showUnsavedPrompt, setShowUnsavedPrompt] = (0, import_react307.useState)(false);
191487
191440
  const [pendingLocale, setPendingLocale] = (0, import_react307.useState)(null);
191488
- const [isSwitchingLocale, setIsSwitchingLocale] = (0, import_react307.useState)(false);
191489
- const snapshotRef = (0, import_react307.useRef)(
191490
- buildLocaleSnapshot(
191441
+ const entities = (0, import_react307.useMemo)(() => references, [references]);
191442
+ const totalCount = (0, import_react307.useMemo)(
191443
+ () => referenceCount * (translatableFields.length + 1),
191444
+ [referenceCount, translatableFields]
191445
+ );
191446
+ const initialState = (0, import_react307.useRef)(
191447
+ initTranslationsFormState(
191491
191448
  translations,
191492
- references,
191493
- selectedLocale,
191449
+ entities,
191450
+ availableLocales,
191494
191451
  translatableFields
191495
191452
  )
191496
191453
  );
191497
- const knownEntityIdsRef = (0, import_react307.useRef)(
191498
- new Set(references.map((r) => r.id))
191499
- );
191500
- const latestPropsRef = (0, import_react307.useRef)({ translations, references });
191501
- (0, import_react307.useEffect)(() => {
191502
- latestPropsRef.current = { translations, references };
191503
- }, [translations, references]);
191504
191454
  const form = (0, import_react_hook_form145.useForm)({
191505
191455
  resolver: (0, import_zod166.zodResolver)(TranslationsFormSchema),
191506
- defaultValues: snapshotToFormValues(snapshotRef.current)
191456
+ defaultValues: initialState.current
191507
191457
  });
191508
- (0, import_react307.useEffect)(() => {
191509
- const currentIds = new Set(references.map((r) => r.id));
191510
- const newReferences = references.filter(
191511
- (r) => !knownEntityIdsRef.current.has(r.id)
191512
- );
191513
- if (newReferences.length === 0) {
191514
- return;
191515
- }
191516
- knownEntityIdsRef.current = currentIds;
191517
- snapshotRef.current = extendSnapshot(
191518
- snapshotRef.current,
191519
- translations,
191520
- newReferences,
191521
- translatableFields
191522
- );
191523
- const currentValues = form.getValues();
191524
- const newFormValues = {
191525
- entities: { ...currentValues.entities }
191526
- };
191527
- for (const ref of newReferences) {
191528
- if (!newFormValues.entities[ref.id]) {
191529
- newFormValues.entities[ref.id] = snapshotRef.current.entities[ref.id];
191530
- }
191531
- }
191532
- form.reset(newFormValues, {
191533
- keepDirty: true,
191534
- keepDirtyValues: true
191535
- });
191536
- }, [references, translations, translatableFields, form]);
191537
191458
  const rows = (0, import_react307.useMemo)(
191538
- () => buildTranslationRows(references, translatableFields),
191539
- [references, translatableFields]
191540
- );
191541
- const totalRowCount = (0, import_react307.useMemo)(
191542
- () => referenceCount * (translatableFields.length + 1),
191543
- [referenceCount, translatableFields]
191459
+ () => buildTranslationRows(entities, translatableFields),
191460
+ [entities, translatableFields]
191544
191461
  );
191545
- const selectedLocaleDisplay = (0, import_react307.useMemo)(
191546
- () => availableLocales.find((l) => l.locale_code === selectedLocale)?.locale.name,
191547
- [availableLocales, selectedLocale]
191462
+ const { mutateAsync, isPending } = useBatchTranslations(entityType);
191463
+ const handleLocaleChange = (0, import_react307.useCallback)(
191464
+ (newLocale) => {
191465
+ if (newLocale === selectedLocale) {
191466
+ return;
191467
+ }
191468
+ const currentValues = form.getValues();
191469
+ const hasChanges = hasLocaleChanges(
191470
+ currentValues,
191471
+ initialState.current,
191472
+ selectedLocale
191473
+ );
191474
+ if (hasChanges) {
191475
+ setPendingLocale(newLocale);
191476
+ setShowUnsavedPrompt(true);
191477
+ } else {
191478
+ setSelectedLocale(newLocale);
191479
+ }
191480
+ },
191481
+ [selectedLocale, form]
191548
191482
  );
191549
- const columns = useTranslationsGridColumns({
191550
- entities: references,
191551
- availableLocales,
191552
- selectedLocale,
191553
- dynamicColumnWidth
191554
- });
191555
- const { mutateAsync, isPending, invalidateQueries } = useBatchTranslations(entityType);
191556
191483
  const saveCurrentLocale = (0, import_react307.useCallback)(async () => {
191557
191484
  const currentValues = form.getValues();
191558
- const { hasChanges, payload } = computeChanges(
191485
+ const payload = transformSingleLocaleToBatchPayload(
191559
191486
  currentValues,
191560
- snapshotRef.current,
191487
+ initialState.current,
191561
191488
  entityType,
191562
191489
  selectedLocale
191563
191490
  );
191564
- if (!hasChanges) {
191491
+ if (payload.create.length === 0 && payload.update.length === 0 && payload.delete.length === 0) {
191565
191492
  return true;
191566
191493
  }
191567
191494
  try {
@@ -191585,32 +191512,20 @@ var init_translations_edit_form = __esm({
191585
191512
  }
191586
191513
  if (payload.delete.length > 0) {
191587
191514
  currentBatch.delete = payload.delete.splice(0, currentBatchAvailable);
191515
+ currentBatchAvailable -= currentBatch.delete.length;
191588
191516
  }
191589
- const response = await mutateAsync(currentBatch, {
191590
- onError: (error) => {
191591
- import_ui454.toast.error(error.message);
191592
- }
191593
- });
191594
- if (response.created) {
191595
- for (const created of response.created) {
191596
- form.setValue(`entities.${created.reference_id}.id`, created.id, {
191597
- shouldDirty: false
191598
- });
191599
- if (snapshotRef.current.entities[created.reference_id]) {
191600
- snapshotRef.current.entities[created.reference_id].id = created.id;
191601
- }
191602
- }
191603
- }
191517
+ await mutateAsync(currentBatch);
191604
191518
  }
191605
- const savedValues = form.getValues();
191606
- for (const entityId of Object.keys(savedValues.entities)) {
191607
- if (snapshotRef.current.entities[entityId]) {
191608
- snapshotRef.current.entities[entityId] = {
191609
- ...savedValues.entities[entityId]
191519
+ const updatedInitialState = { ...initialState.current };
191520
+ for (const entityId of Object.keys(currentValues.entities)) {
191521
+ if (updatedInitialState.entities[entityId]?.locales[selectedLocale]) {
191522
+ updatedInitialState.entities[entityId].locales[selectedLocale] = {
191523
+ ...currentValues.entities[entityId].locales[selectedLocale]
191610
191524
  };
191611
191525
  }
191612
191526
  }
191613
- form.reset(savedValues);
191527
+ initialState.current = updatedInitialState;
191528
+ form.reset(currentValues);
191614
191529
  return true;
191615
191530
  } catch (error) {
191616
191531
  import_ui454.toast.error(
@@ -191619,59 +191534,19 @@ var init_translations_edit_form = __esm({
191619
191534
  return false;
191620
191535
  }
191621
191536
  }, [form, entityType, selectedLocale, mutateAsync]);
191622
- const switchToLocale = (0, import_react307.useCallback)(
191623
- async (newLocale) => {
191624
- setIsSwitchingLocale(true);
191625
- try {
191626
- await invalidateQueries();
191627
- await new Promise((resolve) => requestAnimationFrame(resolve));
191628
- const { translations: translations2, references: references2 } = latestPropsRef.current;
191629
- const newSnapshot = buildLocaleSnapshot(
191630
- translations2,
191631
- references2,
191632
- newLocale,
191633
- translatableFields
191634
- );
191635
- snapshotRef.current = newSnapshot;
191636
- knownEntityIdsRef.current = new Set(references2.map((r) => r.id));
191637
- form.reset(snapshotToFormValues(newSnapshot));
191638
- setSelectedLocale(newLocale);
191639
- } finally {
191640
- setIsSwitchingLocale(false);
191641
- }
191642
- },
191643
- [translatableFields, form, invalidateQueries]
191644
- );
191645
- const handleLocaleChange = (0, import_react307.useCallback)(
191646
- (newLocale) => {
191647
- if (newLocale === selectedLocale) {
191648
- return;
191649
- }
191650
- const currentValues = form.getValues();
191651
- const { hasChanges } = computeChanges(
191652
- currentValues,
191653
- snapshotRef.current,
191654
- entityType,
191655
- selectedLocale
191656
- );
191657
- if (hasChanges) {
191658
- setPendingLocale(newLocale);
191659
- setShowUnsavedPrompt(true);
191660
- } else {
191661
- switchToLocale(newLocale);
191662
- }
191663
- },
191664
- [selectedLocale, form, entityType, switchToLocale]
191665
- );
191666
191537
  const handleSaveAndSwitch = (0, import_react307.useCallback)(async () => {
191667
191538
  const success = await saveCurrentLocale();
191668
191539
  if (success && pendingLocale) {
191669
- import_ui454.toast.success(t5("translations.edit.successToast"));
191670
- await switchToLocale(pendingLocale);
191540
+ import_ui454.toast.success(
191541
+ t5("translations.edit.localeChangesSaved", {
191542
+ defaultValue: "Changes saved successfully"
191543
+ })
191544
+ );
191545
+ setSelectedLocale(pendingLocale);
191671
191546
  }
191672
191547
  setShowUnsavedPrompt(false);
191673
191548
  setPendingLocale(null);
191674
- }, [saveCurrentLocale, pendingLocale, t5, switchToLocale]);
191549
+ }, [saveCurrentLocale, pendingLocale, t5]);
191675
191550
  const handleCancelSwitch = (0, import_react307.useCallback)(() => {
191676
191551
  setShowUnsavedPrompt(false);
191677
191552
  setPendingLocale(null);
@@ -191688,15 +191563,69 @@ var init_translations_edit_form = __esm({
191688
191563
  },
191689
191564
  [saveCurrentLocale, t5, handleSuccess]
191690
191565
  );
191691
- const handleClose = (0, import_react307.useCallback)(() => {
191692
- invalidateQueries();
191693
- }, [invalidateQueries]);
191694
- const isLoading = isPending || isSwitchingLocale;
191695
- return /* @__PURE__ */ (0, import_jsx_runtime690.jsxs)(RouteFocusModal.Form, { form, onClose: handleClose, children: [
191566
+ const handleSubmit = form.handleSubmit(async (values) => {
191567
+ const payload = transformToBatchPayload(
191568
+ values,
191569
+ initialState.current,
191570
+ entityType
191571
+ );
191572
+ if (payload.create.length === 0 && payload.update.length === 0 && payload.delete.length === 0) {
191573
+ return;
191574
+ }
191575
+ const BATCH_SIZE = 150;
191576
+ const totalItems = payload.create.length + payload.update.length + payload.delete.length;
191577
+ const batchCount = Math.ceil(totalItems / BATCH_SIZE);
191578
+ for (let i = 0; i < batchCount; i++) {
191579
+ let currentBatchAvailable = BATCH_SIZE;
191580
+ const currentBatch = {
191581
+ create: [],
191582
+ update: [],
191583
+ delete: []
191584
+ };
191585
+ if (payload.create.length > 0) {
191586
+ currentBatch.create = payload.create.splice(0, currentBatchAvailable);
191587
+ currentBatchAvailable -= currentBatch.create.length;
191588
+ }
191589
+ if (payload.update.length > 0) {
191590
+ currentBatch.update = payload.update.splice(0, currentBatchAvailable);
191591
+ currentBatchAvailable -= currentBatch.update.length;
191592
+ }
191593
+ if (payload.delete.length > 0) {
191594
+ currentBatch.delete = payload.delete.splice(0, currentBatchAvailable);
191595
+ currentBatchAvailable -= currentBatch.delete.length;
191596
+ }
191597
+ await mutateAsync(currentBatch, {
191598
+ onSuccess: () => {
191599
+ if (i === batchCount - 1) {
191600
+ import_ui454.toast.success(
191601
+ t5("translations.edit.successToast", {
191602
+ defaultValue: "Translations updated successfully"
191603
+ })
191604
+ );
191605
+ handleSuccess();
191606
+ }
191607
+ },
191608
+ onError: (error) => {
191609
+ import_ui454.toast.error(error.message);
191610
+ }
191611
+ });
191612
+ }
191613
+ });
191614
+ const columns = useTranslationsGridColumns({
191615
+ entities,
191616
+ translatableFields,
191617
+ availableLocales,
191618
+ selectedLocale,
191619
+ dynamicColumnWidth
191620
+ });
191621
+ const selectedLocaleDisplay = availableLocales.find(
191622
+ (l) => l.locale_code === selectedLocale
191623
+ )?.locale.name;
191624
+ return /* @__PURE__ */ (0, import_jsx_runtime690.jsxs)(RouteFocusModal.Form, { form, children: [
191696
191625
  /* @__PURE__ */ (0, import_jsx_runtime690.jsxs)(
191697
191626
  KeyboundForm,
191698
191627
  {
191699
- onSubmit: () => handleSave(true),
191628
+ onSubmit: handleSubmit,
191700
191629
  className: "flex h-full flex-col overflow-hidden",
191701
191630
  children: [
191702
191631
  /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(RouteFocusModal.Header, {}),
@@ -191713,14 +191642,13 @@ var init_translations_edit_form = __esm({
191713
191642
  },
191714
191643
  state: form,
191715
191644
  onEditingChange: (editing) => setCloseOnEscape(!editing),
191716
- totalRowCount,
191645
+ totalRowCount: totalCount,
191717
191646
  onFetchMore: fetchNextPage,
191718
191647
  isFetchingMore: isFetchingNextPage,
191719
191648
  hasNextPage,
191720
191649
  headerContent: /* @__PURE__ */ (0, import_jsx_runtime690.jsxs)(
191721
191650
  import_ui454.Select,
191722
191651
  {
191723
- disabled: isLoading,
191724
191652
  value: selectedLocale,
191725
191653
  onValueChange: handleLocaleChange,
191726
191654
  size: "small",
@@ -191740,28 +191668,28 @@ var init_translations_edit_form = __esm({
191740
191668
  }
191741
191669
  ) }) }),
191742
191670
  /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(RouteFocusModal.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime690.jsxs)("div", { className: "flex items-center justify-end gap-x-2", children: [
191743
- /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(
191671
+ /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(import_ui454.Button, { size: "small", variant: "secondary", children: t5("actions.cancel") }) }),
191672
+ /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(
191744
191673
  import_ui454.Button,
191745
191674
  {
191746
- type: "button",
191747
191675
  size: "small",
191676
+ type: "button",
191748
191677
  variant: "secondary",
191749
- isLoading,
191750
- children: t5("actions.cancel")
191678
+ onClick: () => handleSave(false),
191679
+ isLoading: isPending,
191680
+ children: t5("actions.saveChanges")
191751
191681
  }
191752
- ) }),
191682
+ ),
191753
191683
  /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(
191754
191684
  import_ui454.Button,
191755
191685
  {
191756
191686
  size: "small",
191757
191687
  type: "button",
191758
- variant: "secondary",
191759
- onClick: () => handleSave(false),
191760
- isLoading,
191761
- children: t5("actions.saveChanges")
191688
+ onClick: () => handleSave(true),
191689
+ isLoading: isPending,
191690
+ children: t5("actions.saveAndClose")
191762
191691
  }
191763
- ),
191764
- /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(import_ui454.Button, { size: "small", type: "submit", isLoading, children: t5("actions.saveAndClose") })
191692
+ )
191765
191693
  ] }) })
191766
191694
  ]
191767
191695
  }
@@ -191788,7 +191716,7 @@ var init_translations_edit_form = __esm({
191788
191716
  size: "small",
191789
191717
  onClick: handleSaveAndSwitch,
191790
191718
  type: "button",
191791
- isLoading,
191719
+ isLoading: isPending,
191792
191720
  children: t5("actions.saveChanges")
191793
191721
  }
191794
191722
  )
@@ -191897,55 +191825,15 @@ var init_translations_edit2 = __esm({
191897
191825
  }
191898
191826
  });
191899
191827
 
191900
- // src/routes/translations/add-locales/add-locales.tsx
191901
- var import_react_router_dom248, import_jsx_runtime692, TranslationsAddLocales;
191902
- var init_add_locales = __esm({
191903
- "src/routes/translations/add-locales/add-locales.tsx"() {
191904
- "use strict";
191905
- init_route_focus_modal2();
191906
- init_api();
191907
- init_feature_flag_provider();
191908
- import_react_router_dom248 = require("react-router-dom");
191909
- init_add_locales_form();
191910
- import_jsx_runtime692 = require("react/jsx-runtime");
191911
- TranslationsAddLocales = () => {
191912
- const isEnabled = useFeatureFlag("translation");
191913
- const navigate = (0, import_react_router_dom248.useNavigate)();
191914
- if (!isEnabled) {
191915
- navigate(-1);
191916
- return null;
191917
- }
191918
- const { store, isPending, isError, error } = useStore();
191919
- const ready = !!store && !isPending;
191920
- if (isError) {
191921
- throw error;
191922
- }
191923
- return /* @__PURE__ */ (0, import_jsx_runtime692.jsx)(RouteFocusModal, { children: ready && /* @__PURE__ */ (0, import_jsx_runtime692.jsx)(AddLocalesForm, { store }) });
191924
- };
191925
- }
191926
- });
191927
-
191928
- // src/routes/translations/add-locales/index.tsx
191929
- var add_locales_exports = {};
191930
- __export(add_locales_exports, {
191931
- Component: () => TranslationsAddLocales
191932
- });
191933
- var init_add_locales2 = __esm({
191934
- "src/routes/translations/add-locales/index.tsx"() {
191935
- "use strict";
191936
- init_add_locales();
191937
- }
191938
- });
191939
-
191940
191828
  // src/components/common/logo-box/avatar-box.tsx
191941
191829
  function AvatarBox({ checked }) {
191942
- return /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)(
191830
+ return /* @__PURE__ */ (0, import_jsx_runtime692.jsxs)(
191943
191831
  IconAvatar,
191944
191832
  {
191945
191833
  size: "xlarge",
191946
191834
  className: "bg-ui-button-neutral shadow-buttons-neutral after:button-neutral-gradient relative mb-4 flex h-[50px] w-[50px] items-center justify-center rounded-xl after:inset-0 after:content-['']",
191947
191835
  children: [
191948
- checked && /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
191836
+ checked && /* @__PURE__ */ (0, import_jsx_runtime692.jsx)(
191949
191837
  import_react309.motion.div,
191950
191838
  {
191951
191839
  className: "absolute -right-[5px] -top-1 flex size-5 items-center justify-center rounded-full border-[0.5px] border-[rgba(3,7,18,0.2)] bg-[#3B82F6] bg-gradient-to-b from-white/0 to-white/20 shadow-[0px_1px_2px_0px_rgba(3,7,18,0.12),0px_1px_2px_0px_rgba(255,255,255,0.10)_inset,0px_-1px_5px_0px_rgba(255,255,255,0.10)_inset,0px_0px_0px_0px_rgba(3,7,18,0.06)_inset]",
@@ -191956,7 +191844,7 @@ function AvatarBox({ checked }) {
191956
191844
  delay: 0.8,
191957
191845
  ease: [0, 0.71, 0.2, 1.01]
191958
191846
  },
191959
- children: /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
191847
+ children: /* @__PURE__ */ (0, import_jsx_runtime692.jsx)(
191960
191848
  "svg",
191961
191849
  {
191962
191850
  xmlns: "http://www.w3.org/2000/svg",
@@ -191964,7 +191852,7 @@ function AvatarBox({ checked }) {
191964
191852
  height: "20",
191965
191853
  viewBox: "0 0 20 20",
191966
191854
  fill: "none",
191967
- children: /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
191855
+ children: /* @__PURE__ */ (0, import_jsx_runtime692.jsx)(
191968
191856
  import_react309.motion.path,
191969
191857
  {
191970
191858
  d: "M5.8335 10.4167L9.16683 13.75L14.1668 6.25",
@@ -191986,7 +191874,7 @@ function AvatarBox({ checked }) {
191986
191874
  )
191987
191875
  }
191988
191876
  ),
191989
- /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)(
191877
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsxs)(
191990
191878
  "svg",
191991
191879
  {
191992
191880
  className: "rounded-[10px]",
@@ -191994,8 +191882,8 @@ function AvatarBox({ checked }) {
191994
191882
  fill: "none",
191995
191883
  xmlns: "http://www.w3.org/2000/svg",
191996
191884
  children: [
191997
- /* @__PURE__ */ (0, import_jsx_runtime693.jsx)("rect", { width: "400", height: "400", fill: "#18181B" }),
191998
- /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
191885
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsx)("rect", { width: "400", height: "400", fill: "#18181B" }),
191886
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsx)(
191999
191887
  "path",
192000
191888
  {
192001
191889
  d: "M238.088 51.1218L238.089 51.1223L310.605 92.8101C334.028 106.308 348.526 131.32 347.868 157.953L347.867 157.966V157.978V241.688C347.867 268.68 333.687 293.362 310.271 306.856L310.269 306.858L237.754 348.878C214.336 362.374 185.643 362.374 162.225 348.878L89.7127 306.859C66.6206 293.361 52.1113 268.674 52.1113 241.688V157.978C52.1113 131.326 66.6211 106.307 89.7088 92.8093C89.7101 92.8085 89.7114 92.8078 89.7127 92.807L162.556 51.1233L162.559 51.1218C185.977 37.6261 214.67 37.6261 238.088 51.1218ZM124.634 200C124.634 241.576 158.502 275.372 200.156 275.372C242.142 275.372 276.013 241.578 276.013 200C276.013 158.419 241.805 124.628 200.156 124.628C158.502 124.628 124.634 158.424 124.634 200Z",
@@ -192004,8 +191892,8 @@ function AvatarBox({ checked }) {
192004
191892
  strokeWidth: "2"
192005
191893
  }
192006
191894
  ),
192007
- /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)("defs", { children: [
192008
- /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)(
191895
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsxs)("defs", { children: [
191896
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsxs)(
192009
191897
  "linearGradient",
192010
191898
  {
192011
191899
  id: "paint0_linear_11869_12671",
@@ -192015,12 +191903,12 @@ function AvatarBox({ checked }) {
192015
191903
  y2: "360",
192016
191904
  gradientUnits: "userSpaceOnUse",
192017
191905
  children: [
192018
- /* @__PURE__ */ (0, import_jsx_runtime693.jsx)("stop", { stopColor: "white" }),
192019
- /* @__PURE__ */ (0, import_jsx_runtime693.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0.7" })
191906
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsx)("stop", { stopColor: "white" }),
191907
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0.7" })
192020
191908
  ]
192021
191909
  }
192022
191910
  ),
192023
- /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)(
191911
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsxs)(
192024
191912
  "linearGradient",
192025
191913
  {
192026
191914
  id: "paint1_linear_11869_12671",
@@ -192030,8 +191918,8 @@ function AvatarBox({ checked }) {
192030
191918
  y2: "360",
192031
191919
  gradientUnits: "userSpaceOnUse",
192032
191920
  children: [
192033
- /* @__PURE__ */ (0, import_jsx_runtime693.jsx)("stop", { stopColor: "white", stopOpacity: "0" }),
192034
- /* @__PURE__ */ (0, import_jsx_runtime693.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0.7" })
191921
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsx)("stop", { stopColor: "white", stopOpacity: "0" }),
191922
+ /* @__PURE__ */ (0, import_jsx_runtime692.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0.7" })
192035
191923
  ]
192036
191924
  }
192037
191925
  )
@@ -192043,18 +191931,18 @@ function AvatarBox({ checked }) {
192043
191931
  }
192044
191932
  );
192045
191933
  }
192046
- var import_react309, import_jsx_runtime693;
191934
+ var import_react309, import_jsx_runtime692;
192047
191935
  var init_avatar_box = __esm({
192048
191936
  "src/components/common/logo-box/avatar-box.tsx"() {
192049
191937
  "use strict";
192050
191938
  import_react309 = require("motion/react");
192051
191939
  init_icon_avatar2();
192052
- import_jsx_runtime693 = require("react/jsx-runtime");
191940
+ import_jsx_runtime692 = require("react/jsx-runtime");
192053
191941
  }
192054
191942
  });
192055
191943
 
192056
191944
  // src/routes/login/login.tsx
192057
- var import_zod168, import_ui455, import_react_hook_form146, import_react_i18next488, import_react_router_dom249, z64, import_jsx_runtime694, LoginSchema, Login;
191945
+ var import_zod168, import_ui455, import_react_hook_form146, import_react_i18next488, import_react_router_dom248, z64, import_jsx_runtime693, LoginSchema, Login;
192058
191946
  var init_login = __esm({
192059
191947
  "src/routes/login/login.tsx"() {
192060
191948
  "use strict";
@@ -192062,22 +191950,22 @@ var init_login = __esm({
192062
191950
  import_ui455 = require("@medusajs/ui");
192063
191951
  import_react_hook_form146 = require("react-hook-form");
192064
191952
  import_react_i18next488 = require("react-i18next");
192065
- import_react_router_dom249 = require("react-router-dom");
191953
+ import_react_router_dom248 = require("react-router-dom");
192066
191954
  z64 = __toESM(require("zod"));
192067
191955
  init_form2();
192068
191956
  init_avatar_box();
192069
191957
  init_api();
192070
191958
  init_is_fetch_error();
192071
191959
  init_extension_provider2();
192072
- import_jsx_runtime694 = require("react/jsx-runtime");
191960
+ import_jsx_runtime693 = require("react/jsx-runtime");
192073
191961
  LoginSchema = z64.object({
192074
191962
  email: z64.string().email(),
192075
191963
  password: z64.string()
192076
191964
  });
192077
191965
  Login = () => {
192078
191966
  const { t: t5 } = (0, import_react_i18next488.useTranslation)();
192079
- const location = (0, import_react_router_dom249.useLocation)();
192080
- const navigate = (0, import_react_router_dom249.useNavigate)();
191967
+ const location = (0, import_react_router_dom248.useLocation)();
191968
+ const navigate = (0, import_react_router_dom248.useNavigate)();
192081
191969
  const { getWidgets } = useExtension();
192082
191970
  const from = location.state?.from?.pathname || "/orders";
192083
191971
  const form = (0, import_react_hook_form146.useForm)({
@@ -192118,30 +192006,30 @@ var init_login = __esm({
192118
192006
  });
192119
192007
  const serverError = form.formState.errors?.root?.serverError?.message;
192120
192008
  const validationError = form.formState.errors.email?.message || form.formState.errors.password?.message;
192121
- return /* @__PURE__ */ (0, import_jsx_runtime694.jsx)("div", { className: "bg-ui-bg-subtle flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)("div", { className: "m-4 flex w-full max-w-[280px] flex-col items-center", children: [
192122
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(AvatarBox, {}),
192123
- /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
192124
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(import_ui455.Heading, { children: t5("login.title") }),
192125
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(import_ui455.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("login.hint") })
192009
+ return /* @__PURE__ */ (0, import_jsx_runtime693.jsx)("div", { className: "bg-ui-bg-subtle flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)("div", { className: "m-4 flex w-full max-w-[280px] flex-col items-center", children: [
192010
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(AvatarBox, {}),
192011
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
192012
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(import_ui455.Heading, { children: t5("login.title") }),
192013
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(import_ui455.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("login.hint") })
192126
192014
  ] }),
192127
- /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)("div", { className: "flex w-full flex-col gap-y-3", children: [
192015
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)("div", { className: "flex w-full flex-col gap-y-3", children: [
192128
192016
  getWidgets("login.before").map((Component5, i) => {
192129
- return /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(Component5, {}, i);
192017
+ return /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(Component5, {}, i);
192130
192018
  }),
192131
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)(
192019
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)(
192132
192020
  "form",
192133
192021
  {
192134
192022
  onSubmit: handleSubmit,
192135
192023
  className: "flex w-full flex-col gap-y-6",
192136
192024
  children: [
192137
- /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)("div", { className: "flex flex-col gap-y-1", children: [
192138
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192025
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)("div", { className: "flex flex-col gap-y-1", children: [
192026
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
192139
192027
  Form.Field,
192140
192028
  {
192141
192029
  control: form.control,
192142
192030
  name: "email",
192143
192031
  render: ({ field }) => {
192144
- return /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192032
+ return /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
192145
192033
  import_ui455.Input,
192146
192034
  {
192147
192035
  autoComplete: "email",
@@ -192153,15 +192041,15 @@ var init_login = __esm({
192153
192041
  }
192154
192042
  }
192155
192043
  ),
192156
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192044
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
192157
192045
  Form.Field,
192158
192046
  {
192159
192047
  control: form.control,
192160
192048
  name: "password",
192161
192049
  render: ({ field }) => {
192162
- return /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)(Form.Item, { children: [
192163
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(Form.Label, {}),
192164
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192050
+ return /* @__PURE__ */ (0, import_jsx_runtime693.jsxs)(Form.Item, { children: [
192051
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(Form.Label, {}),
192052
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
192165
192053
  import_ui455.Input,
192166
192054
  {
192167
192055
  type: "password",
@@ -192176,8 +192064,8 @@ var init_login = __esm({
192176
192064
  }
192177
192065
  )
192178
192066
  ] }),
192179
- validationError && /* @__PURE__ */ (0, import_jsx_runtime694.jsx)("div", { className: "text-center", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(import_ui455.Hint, { className: "inline-flex", variant: "error", children: validationError }) }),
192180
- serverError && /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192067
+ validationError && /* @__PURE__ */ (0, import_jsx_runtime693.jsx)("div", { className: "text-center", children: /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(import_ui455.Hint, { className: "inline-flex", variant: "error", children: validationError }) }),
192068
+ serverError && /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
192181
192069
  import_ui455.Alert,
192182
192070
  {
192183
192071
  className: "bg-ui-bg-base items-center p-2",
@@ -192186,21 +192074,21 @@ var init_login = __esm({
192186
192074
  children: serverError
192187
192075
  }
192188
192076
  ),
192189
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(import_ui455.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t5("actions.continueWithEmail") })
192077
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(import_ui455.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t5("actions.continueWithEmail") })
192190
192078
  ]
192191
192079
  }
192192
192080
  ) }),
192193
192081
  getWidgets("login.after").map((Component5, i) => {
192194
- return /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(Component5, {}, i);
192082
+ return /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(Component5, {}, i);
192195
192083
  })
192196
192084
  ] }),
192197
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)("span", { className: "text-ui-fg-muted txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192085
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)("span", { className: "text-ui-fg-muted txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
192198
192086
  import_react_i18next488.Trans,
192199
192087
  {
192200
192088
  i18nKey: "login.forgotPassword",
192201
192089
  components: [
192202
- /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192203
- import_react_router_dom249.Link,
192090
+ /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
192091
+ import_react_router_dom248.Link,
192204
192092
  {
192205
192093
  to: "/reset-password",
192206
192094
  className: "text-ui-fg-interactive transition-fg hover:text-ui-fg-interactive-hover focus-visible:text-ui-fg-interactive-hover font-medium outline-none"
@@ -192228,13 +192116,13 @@ var init_login2 = __esm({
192228
192116
  });
192229
192117
 
192230
192118
  // src/components/common/logo-box/logo-box.tsx
192231
- var import_ui456, import_react310, import_jsx_runtime695, LogoBox;
192119
+ var import_ui456, import_react310, import_jsx_runtime694, LogoBox;
192232
192120
  var init_logo_box = __esm({
192233
192121
  "src/components/common/logo-box/logo-box.tsx"() {
192234
192122
  "use strict";
192235
192123
  import_ui456 = require("@medusajs/ui");
192236
192124
  import_react310 = require("motion/react");
192237
- import_jsx_runtime695 = require("react/jsx-runtime");
192125
+ import_jsx_runtime694 = require("react/jsx-runtime");
192238
192126
  LogoBox = ({
192239
192127
  className,
192240
192128
  checked,
@@ -192249,7 +192137,7 @@ var init_logo_box = __esm({
192249
192137
  ease: [0.1, 0.8, 0.2, 1.01]
192250
192138
  }
192251
192139
  }) => {
192252
- return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)(
192140
+ return /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)(
192253
192141
  "div",
192254
192142
  {
192255
192143
  className: (0, import_ui456.clx)(
@@ -192258,14 +192146,14 @@ var init_logo_box = __esm({
192258
192146
  className
192259
192147
  ),
192260
192148
  children: [
192261
- checked && /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192149
+ checked && /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192262
192150
  import_react310.motion.div,
192263
192151
  {
192264
192152
  className: "size-5 absolute -right-[5px] -top-1 flex items-center justify-center rounded-full border-[0.5px] border-[rgba(3,7,18,0.2)] bg-[#3B82F6] bg-gradient-to-b from-white/0 to-white/20 shadow-[0px_1px_2px_0px_rgba(3,7,18,0.12),0px_1px_2px_0px_rgba(255,255,255,0.10)_inset,0px_-1px_5px_0px_rgba(255,255,255,0.10)_inset,0px_0px_0px_0px_rgba(3,7,18,0.06)_inset]",
192265
192153
  initial: { opacity: 0, scale: 0.5 },
192266
192154
  animate: { opacity: 1, scale: 1 },
192267
192155
  transition: containerTransition,
192268
- children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192156
+ children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192269
192157
  "svg",
192270
192158
  {
192271
192159
  xmlns: "http://www.w3.org/2000/svg",
@@ -192273,7 +192161,7 @@ var init_logo_box = __esm({
192273
192161
  height: "20",
192274
192162
  viewBox: "0 0 20 20",
192275
192163
  fill: "none",
192276
- children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192164
+ children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192277
192165
  import_react310.motion.path,
192278
192166
  {
192279
192167
  d: "M5.8335 10.4167L9.16683 13.75L14.1668 6.25",
@@ -192290,7 +192178,7 @@ var init_logo_box = __esm({
192290
192178
  )
192291
192179
  }
192292
192180
  ),
192293
- /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192181
+ /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192294
192182
  "svg",
192295
192183
  {
192296
192184
  width: "36",
@@ -192298,7 +192186,7 @@ var init_logo_box = __esm({
192298
192186
  viewBox: "0 0 36 38",
192299
192187
  fill: "none",
192300
192188
  xmlns: "http://www.w3.org/2000/svg",
192301
- children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192189
+ children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
192302
192190
  "path",
192303
192191
  {
192304
192192
  d: "M30.85 6.16832L22.2453 1.21782C19.4299 -0.405941 15.9801 -0.405941 13.1648 1.21782L4.52043 6.16832C1.74473 7.79208 0 10.802 0 14.0099V23.9505C0 27.198 1.74473 30.1683 4.52043 31.7921L13.1251 36.7822C15.9405 38.4059 19.3903 38.4059 22.2056 36.7822L30.8103 31.7921C33.6257 30.1683 35.3307 27.198 35.3307 23.9505V14.0099C35.41 10.802 33.6653 7.79208 30.85 6.16832ZM17.6852 27.8317C12.8079 27.8317 8.8426 23.8713 8.8426 19C8.8426 14.1287 12.8079 10.1683 17.6852 10.1683C22.5625 10.1683 26.5674 14.1287 26.5674 19C26.5674 23.8713 22.6022 27.8317 17.6852 27.8317Z",
@@ -192324,7 +192212,7 @@ var init_logo_box2 = __esm({
192324
192212
  });
192325
192213
 
192326
192214
  // src/routes/reset-password/reset-password.tsx
192327
- var import_zod169, import_ui457, import_react_hook_form147, import_react_i18next489, import_react_router_dom250, z65, import_react311, import_react_jwt, import_jsx_runtime696, ResetPasswordInstructionsSchema, ResetPasswordSchema, ResetPasswordTokenSchema, validateDecodedResetPasswordToken, InvalidResetToken, ChooseNewPassword, ResetPassword;
192215
+ var import_zod169, import_ui457, import_react_hook_form147, import_react_i18next489, import_react_router_dom249, z65, import_react311, import_react_jwt, import_jsx_runtime695, ResetPasswordInstructionsSchema, ResetPasswordSchema, ResetPasswordTokenSchema, validateDecodedResetPasswordToken, InvalidResetToken, ChooseNewPassword, ResetPassword;
192328
192216
  var init_reset_password = __esm({
192329
192217
  "src/routes/reset-password/reset-password.tsx"() {
192330
192218
  "use strict";
@@ -192332,7 +192220,7 @@ var init_reset_password = __esm({
192332
192220
  import_ui457 = require("@medusajs/ui");
192333
192221
  import_react_hook_form147 = require("react-hook-form");
192334
192222
  import_react_i18next489 = require("react-i18next");
192335
- import_react_router_dom250 = require("react-router-dom");
192223
+ import_react_router_dom249 = require("react-router-dom");
192336
192224
  z65 = __toESM(require("zod"));
192337
192225
  import_react311 = require("react");
192338
192226
  import_react_jwt = require("react-jwt");
@@ -192340,7 +192228,7 @@ var init_reset_password = __esm({
192340
192228
  init_logo_box2();
192341
192229
  init_i18n2();
192342
192230
  init_auth();
192343
- import_jsx_runtime696 = require("react/jsx-runtime");
192231
+ import_jsx_runtime695 = require("react/jsx-runtime");
192344
192232
  ResetPasswordInstructionsSchema = z65.object({
192345
192233
  email: z65.string().email()
192346
192234
  });
@@ -192367,14 +192255,14 @@ var init_reset_password = __esm({
192367
192255
  };
192368
192256
  InvalidResetToken = () => {
192369
192257
  const { t: t5 } = (0, import_react_i18next489.useTranslation)();
192370
- const navigate = (0, import_react_router_dom250.useNavigate)();
192371
- return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "bg-ui-bg-base flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "m-4 flex w-full max-w-[300px] flex-col items-center", children: [
192372
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(LogoBox, { className: "mb-4" }),
192373
- /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "mb-6 flex flex-col items-center", children: [
192374
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Heading, { children: t5("resetPassword.invalidLinkTitle") }),
192375
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("resetPassword.invalidLinkHint") })
192258
+ const navigate = (0, import_react_router_dom249.useNavigate)();
192259
+ return /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "bg-ui-bg-base flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "m-4 flex w-full max-w-[300px] flex-col items-center", children: [
192260
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(LogoBox, { className: "mb-4" }),
192261
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "mb-6 flex flex-col items-center", children: [
192262
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Heading, { children: t5("resetPassword.invalidLinkTitle") }),
192263
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("resetPassword.invalidLinkHint") })
192376
192264
  ] }),
192377
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192265
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192378
192266
  import_ui457.Button,
192379
192267
  {
192380
192268
  onClick: () => navigate("/reset-password", { replace: true }),
@@ -192383,13 +192271,13 @@ var init_reset_password = __esm({
192383
192271
  children: t5("resetPassword.goToResetPassword")
192384
192272
  }
192385
192273
  ) }),
192386
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192274
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192387
192275
  import_react_i18next489.Trans,
192388
192276
  {
192389
192277
  i18nKey: "resetPassword.backToLogin",
192390
192278
  components: [
192391
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192392
- import_react_router_dom250.Link,
192279
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192280
+ import_react_router_dom249.Link,
192393
192281
  {
192394
192282
  to: "/login",
192395
192283
  className: "text-ui-fg-interactive transition-fg hover:text-ui-fg-interactive-hover focus-visible:text-ui-fg-interactive-hover outline-none"
@@ -192435,30 +192323,30 @@ var init_reset_password = __esm({
192435
192323
  );
192436
192324
  });
192437
192325
  if (!isValidResetPasswordToken) {
192438
- return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(InvalidResetToken, {});
192326
+ return /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(InvalidResetToken, {});
192439
192327
  }
192440
- return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "bg-ui-bg-subtle flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "m-4 flex w-full max-w-[280px] flex-col items-center", children: [
192441
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(LogoBox, { className: "mb-4" }),
192442
- /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "mb-6 flex flex-col items-center", children: [
192443
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Heading, { children: t5("resetPassword.resetPassword") }),
192444
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("resetPassword.newPasswordHint") })
192328
+ return /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "bg-ui-bg-subtle flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "m-4 flex w-full max-w-[280px] flex-col items-center", children: [
192329
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(LogoBox, { className: "mb-4" }),
192330
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "mb-6 flex flex-col items-center", children: [
192331
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Heading, { children: t5("resetPassword.resetPassword") }),
192332
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("resetPassword.newPasswordHint") })
192445
192333
  ] }),
192446
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)(
192334
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)(
192447
192335
  "form",
192448
192336
  {
192449
192337
  onSubmit: handleSubmit,
192450
192338
  className: "flex w-full flex-col gap-y-6",
192451
192339
  children: [
192452
- /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col gap-y-4", children: [
192453
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Input, { type: "email", disabled: true, value: invite?.entity_id }),
192454
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192340
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col gap-y-4", children: [
192341
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Input, { type: "email", disabled: true, value: invite?.entity_id }),
192342
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192455
192343
  Form.Field,
192456
192344
  {
192457
192345
  control: form.control,
192458
192346
  name: "password",
192459
192347
  render: ({ field }) => {
192460
- return /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)(Form.Item, { children: [
192461
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192348
+ return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)(Form.Item, { children: [
192349
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192462
192350
  import_ui457.Input,
192463
192351
  {
192464
192352
  autoComplete: "new-password",
@@ -192467,19 +192355,19 @@ var init_reset_password = __esm({
192467
192355
  placeholder: t5("resetPassword.newPassword")
192468
192356
  }
192469
192357
  ) }),
192470
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.ErrorMessage, {})
192358
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(Form.ErrorMessage, {})
192471
192359
  ] });
192472
192360
  }
192473
192361
  }
192474
192362
  ),
192475
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192363
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192476
192364
  Form.Field,
192477
192365
  {
192478
192366
  control: form.control,
192479
192367
  name: "repeat_password",
192480
192368
  render: ({ field }) => {
192481
- return /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)(Form.Item, { children: [
192482
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192369
+ return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)(Form.Item, { children: [
192370
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192483
192371
  import_ui457.Input,
192484
192372
  {
192485
192373
  autoComplete: "off",
@@ -192488,27 +192376,27 @@ var init_reset_password = __esm({
192488
192376
  placeholder: t5("resetPassword.repeatNewPassword")
192489
192377
  }
192490
192378
  ) }),
192491
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.ErrorMessage, {})
192379
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(Form.ErrorMessage, {})
192492
192380
  ] });
192493
192381
  }
192494
192382
  }
192495
192383
  )
192496
192384
  ] }),
192497
- showAlert && /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Alert, { dismissible: true, variant: "success", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col", children: [
192498
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("span", { className: "text-ui-fg-base mb-1", children: t5("resetPassword.successfulResetTitle") }),
192499
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("span", { children: t5("resetPassword.successfulReset") })
192385
+ showAlert && /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Alert, { dismissible: true, variant: "success", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col", children: [
192386
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("span", { className: "text-ui-fg-base mb-1", children: t5("resetPassword.successfulResetTitle") }),
192387
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("span", { children: t5("resetPassword.successfulReset") })
192500
192388
  ] }) }),
192501
- !showAlert && /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t5("resetPassword.resetPassword") })
192389
+ !showAlert && /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t5("resetPassword.resetPassword") })
192502
192390
  ]
192503
192391
  }
192504
192392
  ) }) }),
192505
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192393
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192506
192394
  import_react_i18next489.Trans,
192507
192395
  {
192508
192396
  i18nKey: "resetPassword.backToLogin",
192509
192397
  components: [
192510
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192511
- import_react_router_dom250.Link,
192398
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192399
+ import_react_router_dom249.Link,
192512
192400
  {
192513
192401
  to: "/login",
192514
192402
  className: "text-ui-fg-base transition-fg hover:text-ui-fg-base-hover focus-visible:text-ui-fg-base-hover outline-none"
@@ -192522,7 +192410,7 @@ var init_reset_password = __esm({
192522
192410
  };
192523
192411
  ResetPassword = () => {
192524
192412
  const { t: t5 } = (0, import_react_i18next489.useTranslation)();
192525
- const [searchParams] = (0, import_react_router_dom250.useSearchParams)();
192413
+ const [searchParams] = (0, import_react_router_dom249.useSearchParams)();
192526
192414
  const [showAlert, setShowAlert] = (0, import_react311.useState)(false);
192527
192415
  const token = searchParams.get("token");
192528
192416
  const form = (0, import_react_hook_form147.useForm)({
@@ -192549,28 +192437,28 @@ var init_reset_password = __esm({
192549
192437
  );
192550
192438
  });
192551
192439
  if (token) {
192552
- return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(ChooseNewPassword, { token });
192440
+ return /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(ChooseNewPassword, { token });
192553
192441
  }
192554
- return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "bg-ui-bg-base flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "m-4 flex w-full max-w-[300px] flex-col items-center", children: [
192555
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(LogoBox, { className: "mb-4" }),
192556
- /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
192557
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Heading, { children: t5("resetPassword.resetPassword") }),
192558
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("resetPassword.hint") })
192442
+ return /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "bg-ui-bg-base flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "m-4 flex w-full max-w-[300px] flex-col items-center", children: [
192443
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(LogoBox, { className: "mb-4" }),
192444
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
192445
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Heading, { children: t5("resetPassword.resetPassword") }),
192446
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("resetPassword.hint") })
192559
192447
  ] }),
192560
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)(
192448
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)(
192561
192449
  "form",
192562
192450
  {
192563
192451
  onSubmit: handleSubmit,
192564
192452
  className: "flex w-full flex-col gap-y-6",
192565
192453
  children: [
192566
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "mt-4 flex flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192454
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "mt-4 flex flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192567
192455
  Form.Field,
192568
192456
  {
192569
192457
  control: form.control,
192570
192458
  name: "email",
192571
192459
  render: ({ field }) => {
192572
- return /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)(Form.Item, { children: [
192573
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192460
+ return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)(Form.Item, { children: [
192461
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192574
192462
  import_ui457.Input,
192575
192463
  {
192576
192464
  autoComplete: "email",
@@ -192578,26 +192466,26 @@ var init_reset_password = __esm({
192578
192466
  placeholder: t5("fields.email")
192579
192467
  }
192580
192468
  ) }),
192581
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.ErrorMessage, {})
192469
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(Form.ErrorMessage, {})
192582
192470
  ] });
192583
192471
  }
192584
192472
  }
192585
192473
  ) }),
192586
- showAlert && /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Alert, { dismissible: true, variant: "success", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col", children: [
192587
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("span", { className: "text-ui-fg-base mb-1", children: t5("resetPassword.successfulRequestTitle") }),
192588
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("span", { children: t5("resetPassword.successfulRequest") })
192474
+ showAlert && /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Alert, { dismissible: true, variant: "success", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col", children: [
192475
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("span", { className: "text-ui-fg-base mb-1", children: t5("resetPassword.successfulRequestTitle") }),
192476
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("span", { children: t5("resetPassword.successfulRequest") })
192589
192477
  ] }) }),
192590
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui457.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t5("resetPassword.sendResetInstructions") })
192478
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t5("resetPassword.sendResetInstructions") })
192591
192479
  ]
192592
192480
  }
192593
192481
  ) }) }),
192594
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192482
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192595
192483
  import_react_i18next489.Trans,
192596
192484
  {
192597
192485
  i18nKey: "resetPassword.backToLogin",
192598
192486
  components: [
192599
- /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192600
- import_react_router_dom250.Link,
192487
+ /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
192488
+ import_react_router_dom249.Link,
192601
192489
  {
192602
192490
  to: "/login",
192603
192491
  className: "text-ui-fg-base transition-fg hover:text-ui-fg-base-hover focus-visible:text-ui-fg-base-hover outline-none"
@@ -192625,7 +192513,7 @@ var init_reset_password2 = __esm({
192625
192513
  });
192626
192514
 
192627
192515
  // src/routes/invite/invite.tsx
192628
- var import_zod170, import_ui458, import_i18next8, import_react312, import_react313, import_react_hook_form148, import_react_i18next490, import_react_jwt2, import_react_router_dom251, z66, import_jsx_runtime697, CreateAccountSchema, Invite, LoginLink, InvalidView, CreateView, SuccessView, InviteSchema, validateDecodedInvite;
192516
+ var import_zod170, import_ui458, import_i18next8, import_react312, import_react313, import_react_hook_form148, import_react_i18next490, import_react_jwt2, import_react_router_dom250, z66, import_jsx_runtime696, CreateAccountSchema, Invite, LoginLink, InvalidView, CreateView, SuccessView, InviteSchema, validateDecodedInvite;
192629
192517
  var init_invite = __esm({
192630
192518
  "src/routes/invite/invite.tsx"() {
192631
192519
  "use strict";
@@ -192637,14 +192525,14 @@ var init_invite = __esm({
192637
192525
  import_react_hook_form148 = require("react-hook-form");
192638
192526
  import_react_i18next490 = require("react-i18next");
192639
192527
  import_react_jwt2 = require("react-jwt");
192640
- import_react_router_dom251 = require("react-router-dom");
192528
+ import_react_router_dom250 = require("react-router-dom");
192641
192529
  z66 = __toESM(require("zod"));
192642
192530
  init_form2();
192643
192531
  init_avatar_box();
192644
192532
  init_auth();
192645
192533
  init_invites();
192646
192534
  init_is_fetch_error();
192647
- import_jsx_runtime697 = require("react/jsx-runtime");
192535
+ import_jsx_runtime696 = require("react/jsx-runtime");
192648
192536
  CreateAccountSchema = z66.object({
192649
192537
  email: z66.string().email(),
192650
192538
  first_name: z66.string().min(1),
@@ -192661,14 +192549,14 @@ var init_invite = __esm({
192661
192549
  }
192662
192550
  });
192663
192551
  Invite = () => {
192664
- const [searchParams] = (0, import_react_router_dom251.useSearchParams)();
192552
+ const [searchParams] = (0, import_react_router_dom250.useSearchParams)();
192665
192553
  const [success, setSuccess] = (0, import_react313.useState)(false);
192666
192554
  const token = searchParams.get("token");
192667
192555
  const invite = token ? (0, import_react_jwt2.decodeToken)(token) : null;
192668
192556
  const isValidInvite = invite && validateDecodedInvite(invite);
192669
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsx)("div", { className: "bg-ui-bg-subtle relative flex min-h-dvh w-dvw items-center justify-center p-4", children: /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex w-full max-w-[360px] flex-col items-center", children: [
192670
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(AvatarBox, { checked: success }),
192671
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)("div", { className: "max-h-[557px] w-full will-change-contents", children: isValidInvite ? /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_react312.AnimatePresence, { children: !success ? /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192557
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "bg-ui-bg-subtle relative flex min-h-dvh w-dvw items-center justify-center p-4", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex w-full max-w-[360px] flex-col items-center", children: [
192558
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(AvatarBox, { checked: success }),
192559
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "max-h-[557px] w-full will-change-contents", children: isValidInvite ? /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_react312.AnimatePresence, { children: !success ? /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192672
192560
  import_react312.motion.div,
192673
192561
  {
192674
192562
  initial: false,
@@ -192686,7 +192574,7 @@ var init_invite = __esm({
192686
192574
  ease: [0, 0.71, 0.2, 1.01]
192687
192575
  },
192688
192576
  className: "w-full will-change-transform",
192689
- children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192577
+ children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192690
192578
  import_react312.motion.div,
192691
192579
  {
192692
192580
  initial: false,
@@ -192703,7 +192591,7 @@ var init_invite = __esm({
192703
192591
  delay: 0,
192704
192592
  ease: [0, 0.71, 0.2, 1.01]
192705
192593
  },
192706
- children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192594
+ children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192707
192595
  CreateView,
192708
192596
  {
192709
192597
  onSuccess: () => setSuccess(true),
@@ -192716,7 +192604,7 @@ var init_invite = __esm({
192716
192604
  )
192717
192605
  },
192718
192606
  "create-account"
192719
- ) : /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192607
+ ) : /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192720
192608
  import_react312.motion.div,
192721
192609
  {
192722
192610
  initial: {
@@ -192733,18 +192621,18 @@ var init_invite = __esm({
192733
192621
  ease: [0, 0.71, 0.2, 1.01]
192734
192622
  },
192735
192623
  className: "w-full",
192736
- children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(SuccessView, {})
192624
+ children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(SuccessView, {})
192737
192625
  },
192738
192626
  "success-view"
192739
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(InvalidView, {}) })
192627
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(InvalidView, {}) })
192740
192628
  ] }) });
192741
192629
  };
192742
192630
  LoginLink = () => {
192743
192631
  const { t: t5 } = (0, import_react_i18next490.useTranslation)();
192744
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex w-full flex-col items-center", children: [
192745
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)("div", { className: "my-6 h-px w-full border-b border-dotted" }),
192746
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192747
- import_react_router_dom251.Link,
192632
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex w-full flex-col items-center", children: [
192633
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "my-6 h-px w-full border-b border-dotted" }),
192634
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192635
+ import_react_router_dom250.Link,
192748
192636
  {
192749
192637
  to: "/login",
192750
192638
  className: "txt-small text-ui-fg-base transition-fg hover:text-ui-fg-base-hover focus-visible:text-ui-fg-base-hover font-medium outline-none",
@@ -192756,12 +192644,12 @@ var init_invite = __esm({
192756
192644
  };
192757
192645
  InvalidView = () => {
192758
192646
  const { t: t5 } = (0, import_react_i18next490.useTranslation)();
192759
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex flex-col items-center", children: [
192760
- /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
192761
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui458.Heading, { children: t5("invite.invalidTokenTitle") }),
192762
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui458.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("invite.invalidTokenHint") })
192647
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col items-center", children: [
192648
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
192649
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Heading, { children: t5("invite.invalidTokenTitle") }),
192650
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("invite.invalidTokenHint") })
192763
192651
  ] }),
192764
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(LoginLink, {})
192652
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(LoginLink, {})
192765
192653
  ] });
192766
192654
  };
192767
192655
  CreateView = ({
@@ -192771,7 +192659,7 @@ var init_invite = __esm({
192771
192659
  }) => {
192772
192660
  const { t: t5 } = (0, import_react_i18next490.useTranslation)();
192773
192661
  const [invalid, setInvalid] = (0, import_react313.useState)(false);
192774
- const [params2] = (0, import_react_router_dom251.useSearchParams)();
192662
+ const [params2] = (0, import_react_router_dom250.useSearchParams)();
192775
192663
  const isFirstRun = params2.get("first_run") === "true";
192776
192664
  const form = (0, import_react_hook_form148.useForm)({
192777
192665
  resolver: (0, import_zod170.zodResolver)(CreateAccountSchema),
@@ -192819,20 +192707,20 @@ var init_invite = __esm({
192819
192707
  });
192820
192708
  const serverError = form.formState.errors.root?.message;
192821
192709
  const validationError = form.formState.errors.email?.message || form.formState.errors.password?.message || form.formState.errors.repeat_password?.message || form.formState.errors.first_name?.message || form.formState.errors.last_name?.message;
192822
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex w-full flex-col items-center", children: [
192823
- /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
192824
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui458.Heading, { children: t5("invite.title") }),
192825
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui458.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("invite.hint") })
192710
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex w-full flex-col items-center", children: [
192711
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
192712
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Heading, { children: t5("invite.title") }),
192713
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("invite.hint") })
192826
192714
  ] }),
192827
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("form", { onSubmit: handleSubmit, className: "flex w-full flex-col gap-y-6", children: [
192828
- /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex flex-col gap-y-2", children: [
192829
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192715
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("form", { onSubmit: handleSubmit, className: "flex w-full flex-col gap-y-6", children: [
192716
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col gap-y-2", children: [
192717
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192830
192718
  Form.Field,
192831
192719
  {
192832
192720
  control: form.control,
192833
192721
  name: "email",
192834
192722
  render: ({ field }) => {
192835
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192723
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192836
192724
  import_ui458.Input,
192837
192725
  {
192838
192726
  autoComplete: "off",
@@ -192844,13 +192732,13 @@ var init_invite = __esm({
192844
192732
  }
192845
192733
  }
192846
192734
  ),
192847
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192735
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192848
192736
  Form.Field,
192849
192737
  {
192850
192738
  control: form.control,
192851
192739
  name: "first_name",
192852
192740
  render: ({ field }) => {
192853
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192741
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192854
192742
  import_ui458.Input,
192855
192743
  {
192856
192744
  autoComplete: "given-name",
@@ -192862,13 +192750,13 @@ var init_invite = __esm({
192862
192750
  }
192863
192751
  }
192864
192752
  ),
192865
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192753
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192866
192754
  Form.Field,
192867
192755
  {
192868
192756
  control: form.control,
192869
192757
  name: "last_name",
192870
192758
  render: ({ field }) => {
192871
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192759
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192872
192760
  import_ui458.Input,
192873
192761
  {
192874
192762
  autoComplete: "family-name",
@@ -192880,13 +192768,13 @@ var init_invite = __esm({
192880
192768
  }
192881
192769
  }
192882
192770
  ),
192883
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192771
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192884
192772
  Form.Field,
192885
192773
  {
192886
192774
  control: form.control,
192887
192775
  name: "password",
192888
192776
  render: ({ field }) => {
192889
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192777
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192890
192778
  import_ui458.Input,
192891
192779
  {
192892
192780
  autoComplete: "new-password",
@@ -192899,13 +192787,13 @@ var init_invite = __esm({
192899
192787
  }
192900
192788
  }
192901
192789
  ),
192902
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192790
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192903
192791
  Form.Field,
192904
192792
  {
192905
192793
  control: form.control,
192906
192794
  name: "repeat_password",
192907
192795
  render: ({ field }) => {
192908
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192796
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192909
192797
  import_ui458.Input,
192910
192798
  {
192911
192799
  autoComplete: "off",
@@ -192918,8 +192806,8 @@ var init_invite = __esm({
192918
192806
  }
192919
192807
  }
192920
192808
  ),
192921
- validationError && /* @__PURE__ */ (0, import_jsx_runtime697.jsx)("div", { className: "mt-6 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui458.Hint, { className: "inline-flex", variant: "error", children: validationError }) }),
192922
- serverError && /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192809
+ validationError && /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "mt-6 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Hint, { className: "inline-flex", variant: "error", children: validationError }) }),
192810
+ serverError && /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192923
192811
  import_ui458.Alert,
192924
192812
  {
192925
192813
  className: "bg-ui-bg-base items-center p-2",
@@ -192929,7 +192817,7 @@ var init_invite = __esm({
192929
192817
  }
192930
192818
  )
192931
192819
  ] }),
192932
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192820
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192933
192821
  import_ui458.Button,
192934
192822
  {
192935
192823
  className: "w-full",
@@ -192940,19 +192828,19 @@ var init_invite = __esm({
192940
192828
  }
192941
192829
  )
192942
192830
  ] }) }),
192943
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(LoginLink, {})
192831
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(LoginLink, {})
192944
192832
  ] });
192945
192833
  };
192946
192834
  SuccessView = () => {
192947
192835
  const { t: t5 } = (0, import_react_i18next490.useTranslation)();
192948
- return /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex w-full flex-col items-center gap-y-6", children: [
192949
- /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
192950
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui458.Heading, { className: "text-center", children: t5("invite.successTitle") }),
192951
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui458.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("invite.successHint") })
192836
+ return /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex w-full flex-col items-center gap-y-6", children: [
192837
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
192838
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Heading, { className: "text-center", children: t5("invite.successTitle") }),
192839
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t5("invite.successHint") })
192952
192840
  ] }),
192953
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui458.Button, { variant: "secondary", asChild: true, className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_react_router_dom251.Link, { to: "/login", replace: true, children: t5("invite.successAction") }) }),
192954
- /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
192955
- import_react_router_dom251.Link,
192841
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Button, { variant: "secondary", asChild: true, className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_react_router_dom250.Link, { to: "/login", replace: true, children: t5("invite.successAction") }) }),
192842
+ /* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
192843
+ import_react_router_dom250.Link,
192956
192844
  {
192957
192845
  to: "/login",
192958
192846
  className: "txt-small text-ui-fg-base transition-fg hover:text-ui-fg-base-hover focus-visible:text-ui-fg-base-hover font-medium outline-none",
@@ -192987,25 +192875,25 @@ var init_invite2 = __esm({
192987
192875
  });
192988
192876
 
192989
192877
  // src/routes/no-match/no-match.tsx
192990
- var import_icons175, import_ui459, import_react_i18next491, import_react_router_dom252, import_jsx_runtime698, NoMatch;
192878
+ var import_icons175, import_ui459, import_react_i18next491, import_react_router_dom251, import_jsx_runtime697, NoMatch;
192991
192879
  var init_no_match = __esm({
192992
192880
  "src/routes/no-match/no-match.tsx"() {
192993
192881
  "use strict";
192994
192882
  import_icons175 = require("@medusajs/icons");
192995
192883
  import_ui459 = require("@medusajs/ui");
192996
192884
  import_react_i18next491 = require("react-i18next");
192997
- import_react_router_dom252 = require("react-router-dom");
192998
- import_jsx_runtime698 = require("react/jsx-runtime");
192885
+ import_react_router_dom251 = require("react-router-dom");
192886
+ import_jsx_runtime697 = require("react/jsx-runtime");
192999
192887
  NoMatch = () => {
193000
192888
  const { t: t5 } = (0, import_react_i18next491.useTranslation)();
193001
192889
  const title = t5("errorBoundary.notFoundTitle");
193002
192890
  const message = t5("errorBoundary.noMatchMessage");
193003
- return /* @__PURE__ */ (0, import_jsx_runtime698.jsx)("div", { className: "flex size-full min-h-screen items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime698.jsxs)("div", { className: "flex flex-col items-center gap-y-6", children: [
193004
- /* @__PURE__ */ (0, import_jsx_runtime698.jsxs)("div", { className: "text-ui-fg-subtle flex flex-col items-center gap-y-3", children: [
193005
- /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_icons175.ExclamationCircle, {}),
193006
- /* @__PURE__ */ (0, import_jsx_runtime698.jsxs)("div", { className: "flex flex-col items-center justify-center gap-y-1", children: [
193007
- /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_ui459.Text, { size: "small", leading: "compact", weight: "plus", children: title }),
193008
- /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(
192891
+ return /* @__PURE__ */ (0, import_jsx_runtime697.jsx)("div", { className: "flex size-full min-h-screen items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex flex-col items-center gap-y-6", children: [
192892
+ /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "text-ui-fg-subtle flex flex-col items-center gap-y-3", children: [
192893
+ /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_icons175.ExclamationCircle, {}),
192894
+ /* @__PURE__ */ (0, import_jsx_runtime697.jsxs)("div", { className: "flex flex-col items-center justify-center gap-y-1", children: [
192895
+ /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui459.Text, { size: "small", leading: "compact", weight: "plus", children: title }),
192896
+ /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(
193009
192897
  import_ui459.Text,
193010
192898
  {
193011
192899
  size: "small",
@@ -193015,7 +192903,7 @@ var init_no_match = __esm({
193015
192903
  )
193016
192904
  ] })
193017
192905
  ] }),
193018
- /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_ui459.Button, { asChild: true, size: "small", variant: "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Link, { to: "/", children: t5("errorBoundary.backToDashboard") }) })
192906
+ /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_ui459.Button, { asChild: true, size: "small", variant: "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime697.jsx)(import_react_router_dom251.Link, { to: "/", children: t5("errorBoundary.backToDashboard") }) })
193019
192907
  ] }) });
193020
192908
  };
193021
192909
  }
@@ -193040,20 +192928,20 @@ function getRouteMap({
193040
192928
  }) {
193041
192929
  return [
193042
192930
  {
193043
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ProtectedRoute, {}),
193044
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
192931
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ProtectedRoute, {}),
192932
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193045
192933
  children: [
193046
192934
  {
193047
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(MainLayout, {}),
192935
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(MainLayout, {}),
193048
192936
  children: [
193049
192937
  {
193050
192938
  path: "/",
193051
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
192939
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193052
192940
  lazy: () => Promise.resolve().then(() => (init_home2(), home_exports))
193053
192941
  },
193054
192942
  {
193055
192943
  path: "/products",
193056
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
192944
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193057
192945
  handle: {
193058
192946
  breadcrumb: () => (0, import_i18next9.t)("products.domain")
193059
192947
  },
@@ -193078,14 +192966,14 @@ function getRouteMap({
193078
192966
  },
193079
192967
  {
193080
192968
  path: ":id",
193081
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
192969
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193082
192970
  lazy: async () => {
193083
192971
  const { Breadcrumb, loader } = await Promise.resolve().then(() => (init_product_detail2(), product_detail_exports));
193084
192972
  return {
193085
- Component: import_react_router_dom253.Outlet,
192973
+ Component: import_react_router_dom252.Outlet,
193086
192974
  loader,
193087
192975
  handle: {
193088
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
192976
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193089
192977
  }
193090
192978
  };
193091
192979
  },
@@ -193160,7 +193048,7 @@ function getRouteMap({
193160
193048
  Component: Component5,
193161
193049
  loader,
193162
193050
  handle: {
193163
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193051
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193164
193052
  }
193165
193053
  };
193166
193054
  },
@@ -193193,7 +193081,7 @@ function getRouteMap({
193193
193081
  },
193194
193082
  {
193195
193083
  path: "/categories",
193196
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193084
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193197
193085
  handle: {
193198
193086
  breadcrumb: () => (0, import_i18next9.t)("categories.domain")
193199
193087
  },
@@ -193220,7 +193108,7 @@ function getRouteMap({
193220
193108
  Component: Component5,
193221
193109
  loader,
193222
193110
  handle: {
193223
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193111
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193224
193112
  }
193225
193113
  };
193226
193114
  },
@@ -193247,7 +193135,7 @@ function getRouteMap({
193247
193135
  },
193248
193136
  {
193249
193137
  path: "/orders",
193250
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193138
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193251
193139
  handle: {
193252
193140
  breadcrumb: () => (0, import_i18next9.t)("orders.domain")
193253
193141
  },
@@ -193270,7 +193158,7 @@ function getRouteMap({
193270
193158
  Component: Component5,
193271
193159
  loader,
193272
193160
  handle: {
193273
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193161
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193274
193162
  }
193275
193163
  };
193276
193164
  },
@@ -193337,7 +193225,7 @@ function getRouteMap({
193337
193225
  },
193338
193226
  {
193339
193227
  path: "/promotions",
193340
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193228
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193341
193229
  handle: {
193342
193230
  breadcrumb: () => (0, import_i18next9.t)("promotions.domain")
193343
193231
  },
@@ -193358,7 +193246,7 @@ function getRouteMap({
193358
193246
  Component: Component5,
193359
193247
  loader,
193360
193248
  handle: {
193361
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193249
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193362
193250
  }
193363
193251
  };
193364
193252
  },
@@ -193381,7 +193269,7 @@ function getRouteMap({
193381
193269
  },
193382
193270
  {
193383
193271
  path: "/campaigns",
193384
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193272
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193385
193273
  handle: {
193386
193274
  breadcrumb: () => (0, import_i18next9.t)("campaigns.domain")
193387
193275
  },
@@ -193403,7 +193291,7 @@ function getRouteMap({
193403
193291
  Component: Component5,
193404
193292
  loader,
193405
193293
  handle: {
193406
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193294
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193407
193295
  }
193408
193296
  };
193409
193297
  },
@@ -193430,7 +193318,7 @@ function getRouteMap({
193430
193318
  },
193431
193319
  {
193432
193320
  path: "/collections",
193433
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193321
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193434
193322
  handle: {
193435
193323
  breadcrumb: () => (0, import_i18next9.t)("collections.domain")
193436
193324
  },
@@ -193453,7 +193341,7 @@ function getRouteMap({
193453
193341
  Component: Component5,
193454
193342
  loader,
193455
193343
  handle: {
193456
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193344
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193457
193345
  }
193458
193346
  };
193459
193347
  },
@@ -193476,7 +193364,7 @@ function getRouteMap({
193476
193364
  },
193477
193365
  {
193478
193366
  path: "/price-lists",
193479
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193367
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193480
193368
  handle: {
193481
193369
  breadcrumb: () => (0, import_i18next9.t)("priceLists.domain")
193482
193370
  },
@@ -193499,7 +193387,7 @@ function getRouteMap({
193499
193387
  Component: Component5,
193500
193388
  loader,
193501
193389
  handle: {
193502
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193390
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193503
193391
  }
193504
193392
  };
193505
193393
  },
@@ -193526,7 +193414,7 @@ function getRouteMap({
193526
193414
  },
193527
193415
  {
193528
193416
  path: "/customers",
193529
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193417
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193530
193418
  handle: {
193531
193419
  breadcrumb: () => (0, import_i18next9.t)("customers.domain")
193532
193420
  },
@@ -193549,7 +193437,7 @@ function getRouteMap({
193549
193437
  Component: Component5,
193550
193438
  loader,
193551
193439
  handle: {
193552
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193440
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193553
193441
  }
193554
193442
  };
193555
193443
  },
@@ -193580,7 +193468,7 @@ function getRouteMap({
193580
193468
  },
193581
193469
  {
193582
193470
  path: "/customer-groups",
193583
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193471
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193584
193472
  handle: {
193585
193473
  breadcrumb: () => (0, import_i18next9.t)("customerGroups.domain")
193586
193474
  },
@@ -193603,7 +193491,7 @@ function getRouteMap({
193603
193491
  Component: Component5,
193604
193492
  loader,
193605
193493
  handle: {
193606
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193494
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193607
193495
  }
193608
193496
  };
193609
193497
  },
@@ -193626,7 +193514,7 @@ function getRouteMap({
193626
193514
  },
193627
193515
  {
193628
193516
  path: "/reservations",
193629
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193517
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193630
193518
  handle: {
193631
193519
  breadcrumb: () => (0, import_i18next9.t)("reservations.domain")
193632
193520
  },
@@ -193649,7 +193537,7 @@ function getRouteMap({
193649
193537
  Component: Component5,
193650
193538
  loader,
193651
193539
  handle: {
193652
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193540
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193653
193541
  }
193654
193542
  };
193655
193543
  },
@@ -193668,7 +193556,7 @@ function getRouteMap({
193668
193556
  },
193669
193557
  {
193670
193558
  path: "/inventory",
193671
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193559
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193672
193560
  handle: {
193673
193561
  breadcrumb: () => (0, import_i18next9.t)("inventory.domain")
193674
193562
  },
@@ -193695,7 +193583,7 @@ function getRouteMap({
193695
193583
  Component: Component5,
193696
193584
  loader,
193697
193585
  handle: {
193698
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193586
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193699
193587
  }
193700
193588
  };
193701
193589
  },
@@ -193730,24 +193618,24 @@ function getRouteMap({
193730
193618
  ]
193731
193619
  },
193732
193620
  {
193733
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ProtectedRoute, {}),
193734
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193621
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ProtectedRoute, {}),
193622
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193735
193623
  children: [
193736
193624
  {
193737
193625
  path: "/settings",
193738
193626
  handle: {
193739
193627
  breadcrumb: () => (0, import_i18next9.t)("app.nav.settings.header")
193740
193628
  },
193741
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(SettingsLayout, {}),
193629
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(SettingsLayout, {}),
193742
193630
  children: [
193743
193631
  {
193744
193632
  index: true,
193745
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193633
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193746
193634
  lazy: () => Promise.resolve().then(() => (init_settings2(), settings_exports))
193747
193635
  },
193748
193636
  {
193749
193637
  path: "profile",
193750
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193638
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193751
193639
  lazy: () => Promise.resolve().then(() => (init_profile_detail2(), profile_detail_exports)),
193752
193640
  handle: {
193753
193641
  breadcrumb: () => (0, import_i18next9.t)("profile.domain")
@@ -193761,8 +193649,8 @@ function getRouteMap({
193761
193649
  },
193762
193650
  {
193763
193651
  path: "regions",
193764
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193765
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
193652
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193653
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
193766
193654
  handle: {
193767
193655
  breadcrumb: () => (0, import_i18next9.t)("regions.domain")
193768
193656
  },
@@ -193785,7 +193673,7 @@ function getRouteMap({
193785
193673
  Component: Component5,
193786
193674
  loader,
193787
193675
  handle: {
193788
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193676
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193789
193677
  }
193790
193678
  };
193791
193679
  },
@@ -193808,7 +193696,7 @@ function getRouteMap({
193808
193696
  },
193809
193697
  {
193810
193698
  path: "store",
193811
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193699
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193812
193700
  lazy: () => Promise.resolve().then(() => (init_store_detail2(), store_detail_exports)),
193813
193701
  handle: {
193814
193702
  breadcrumb: () => (0, import_i18next9.t)("store.domain")
@@ -193834,8 +193722,8 @@ function getRouteMap({
193834
193722
  },
193835
193723
  {
193836
193724
  path: "users",
193837
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193838
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
193725
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193726
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
193839
193727
  handle: {
193840
193728
  breadcrumb: () => (0, import_i18next9.t)("users.domain")
193841
193729
  },
@@ -193858,7 +193746,7 @@ function getRouteMap({
193858
193746
  Component: Component5,
193859
193747
  loader,
193860
193748
  handle: {
193861
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193749
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193862
193750
  }
193863
193751
  };
193864
193752
  },
@@ -193877,8 +193765,8 @@ function getRouteMap({
193877
193765
  },
193878
193766
  {
193879
193767
  path: "sales-channels",
193880
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193881
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
193768
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193769
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
193882
193770
  handle: {
193883
193771
  breadcrumb: () => (0, import_i18next9.t)("salesChannels.domain")
193884
193772
  },
@@ -193901,7 +193789,7 @@ function getRouteMap({
193901
193789
  Component: Component5,
193902
193790
  loader,
193903
193791
  handle: {
193904
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193792
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193905
193793
  }
193906
193794
  };
193907
193795
  },
@@ -193924,8 +193812,8 @@ function getRouteMap({
193924
193812
  },
193925
193813
  {
193926
193814
  path: "locations",
193927
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193928
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
193815
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193816
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
193929
193817
  handle: {
193930
193818
  breadcrumb: () => (0, import_i18next9.t)("locations.domain")
193931
193819
  },
@@ -193940,7 +193828,7 @@ function getRouteMap({
193940
193828
  },
193941
193829
  {
193942
193830
  path: "shipping-profiles",
193943
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
193831
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
193944
193832
  handle: {
193945
193833
  breadcrumb: () => (0, import_i18next9.t)("shippingProfile.domain")
193946
193834
  },
@@ -193963,7 +193851,7 @@ function getRouteMap({
193963
193851
  Component: Component5,
193964
193852
  loader,
193965
193853
  handle: {
193966
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193854
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
193967
193855
  }
193968
193856
  };
193969
193857
  },
@@ -193978,8 +193866,8 @@ function getRouteMap({
193978
193866
  },
193979
193867
  {
193980
193868
  path: "shipping-option-types",
193981
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
193982
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
193869
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193870
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
193983
193871
  handle: {
193984
193872
  breadcrumb: () => (0, import_i18next9.t)("shippingOptionTypes.domain")
193985
193873
  },
@@ -194002,7 +193890,7 @@ function getRouteMap({
194002
193890
  Component: Component5,
194003
193891
  loader,
194004
193892
  handle: {
194005
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193893
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
194006
193894
  }
194007
193895
  };
194008
193896
  },
@@ -194023,7 +193911,7 @@ function getRouteMap({
194023
193911
  Component: Component5,
194024
193912
  loader,
194025
193913
  handle: {
194026
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
193914
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
194027
193915
  }
194028
193916
  };
194029
193917
  },
@@ -194090,8 +193978,8 @@ function getRouteMap({
194090
193978
  },
194091
193979
  {
194092
193980
  path: "product-tags",
194093
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
194094
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
193981
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
193982
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194095
193983
  handle: {
194096
193984
  breadcrumb: () => (0, import_i18next9.t)("productTags.domain")
194097
193985
  },
@@ -194114,7 +194002,7 @@ function getRouteMap({
194114
194002
  Component: Component5,
194115
194003
  loader,
194116
194004
  handle: {
194117
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
194005
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
194118
194006
  }
194119
194007
  };
194120
194008
  },
@@ -194133,8 +194021,8 @@ function getRouteMap({
194133
194021
  },
194134
194022
  {
194135
194023
  path: "workflows",
194136
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
194137
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194024
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
194025
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194138
194026
  handle: {
194139
194027
  breadcrumb: () => (0, import_i18next9.t)("workflowExecutions.domain")
194140
194028
  },
@@ -194151,7 +194039,7 @@ function getRouteMap({
194151
194039
  Component: Component5,
194152
194040
  loader,
194153
194041
  handle: {
194154
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
194042
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
194155
194043
  }
194156
194044
  };
194157
194045
  }
@@ -194160,8 +194048,8 @@ function getRouteMap({
194160
194048
  },
194161
194049
  {
194162
194050
  path: "product-types",
194163
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
194164
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194051
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
194052
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194165
194053
  handle: {
194166
194054
  breadcrumb: () => (0, import_i18next9.t)("productTypes.domain")
194167
194055
  },
@@ -194184,7 +194072,7 @@ function getRouteMap({
194184
194072
  Component: Component5,
194185
194073
  loader,
194186
194074
  handle: {
194187
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
194075
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
194188
194076
  }
194189
194077
  };
194190
194078
  },
@@ -194203,14 +194091,14 @@ function getRouteMap({
194203
194091
  },
194204
194092
  {
194205
194093
  path: "publishable-api-keys",
194206
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194094
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194207
194095
  handle: {
194208
194096
  breadcrumb: () => (0, import_i18next9.t)("apiKeyManagement.domain.publishable")
194209
194097
  },
194210
194098
  children: [
194211
194099
  {
194212
194100
  path: "",
194213
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194101
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194214
194102
  children: [
194215
194103
  {
194216
194104
  path: "",
@@ -194232,7 +194120,7 @@ function getRouteMap({
194232
194120
  Component: Component5,
194233
194121
  loader,
194234
194122
  handle: {
194235
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
194123
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
194236
194124
  }
194237
194125
  };
194238
194126
  },
@@ -194251,14 +194139,14 @@ function getRouteMap({
194251
194139
  },
194252
194140
  {
194253
194141
  path: "secret-api-keys",
194254
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194142
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194255
194143
  handle: {
194256
194144
  breadcrumb: () => (0, import_i18next9.t)("apiKeyManagement.domain.secret")
194257
194145
  },
194258
194146
  children: [
194259
194147
  {
194260
194148
  path: "",
194261
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194149
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194262
194150
  children: [
194263
194151
  {
194264
194152
  path: "",
@@ -194280,7 +194168,7 @@ function getRouteMap({
194280
194168
  Component: Component5,
194281
194169
  loader,
194282
194170
  handle: {
194283
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
194171
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
194284
194172
  }
194285
194173
  };
194286
194174
  },
@@ -194295,7 +194183,7 @@ function getRouteMap({
194295
194183
  },
194296
194184
  {
194297
194185
  path: "tax-regions",
194298
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194186
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194299
194187
  handle: {
194300
194188
  breadcrumb: () => (0, import_i18next9.t)("taxRegions.domain")
194301
194189
  },
@@ -194312,10 +194200,10 @@ function getRouteMap({
194312
194200
  },
194313
194201
  {
194314
194202
  path: ":id",
194315
- Component: import_react_router_dom253.Outlet,
194203
+ Component: import_react_router_dom252.Outlet,
194316
194204
  loader: taxRegionLoader,
194317
194205
  handle: {
194318
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(TaxRegionDetailBreadcrumb, { ...match })
194206
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(TaxRegionDetailBreadcrumb, { ...match })
194319
194207
  },
194320
194208
  children: [
194321
194209
  {
@@ -194361,7 +194249,7 @@ function getRouteMap({
194361
194249
  Component: Component5,
194362
194250
  loader,
194363
194251
  handle: {
194364
- breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Breadcrumb, { ...match })
194252
+ breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(Breadcrumb, { ...match })
194365
194253
  }
194366
194254
  };
194367
194255
  },
@@ -194390,7 +194278,7 @@ function getRouteMap({
194390
194278
  },
194391
194279
  {
194392
194280
  path: "return-reasons",
194393
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194281
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194394
194282
  handle: {
194395
194283
  breadcrumb: () => (0, import_i18next9.t)("returnReasons.domain")
194396
194284
  },
@@ -194418,7 +194306,7 @@ function getRouteMap({
194418
194306
  },
194419
194307
  {
194420
194308
  path: "refund-reasons",
194421
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.Outlet, {}),
194309
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(import_react_router_dom252.Outlet, {}),
194422
194310
  handle: {
194423
194311
  breadcrumb: () => (0, import_i18next9.t)("refundReasons.domain")
194424
194312
  },
@@ -194446,7 +194334,7 @@ function getRouteMap({
194446
194334
  },
194447
194335
  {
194448
194336
  path: "translations",
194449
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
194337
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
194450
194338
  handle: {
194451
194339
  breadcrumb: () => (0, import_i18next9.t)("translations.domain")
194452
194340
  },
@@ -194458,10 +194346,6 @@ function getRouteMap({
194458
194346
  {
194459
194347
  path: "edit",
194460
194348
  lazy: () => Promise.resolve().then(() => (init_translations_edit2(), translations_edit_exports))
194461
- },
194462
- {
194463
- path: "add-locales",
194464
- lazy: () => Promise.resolve().then(() => (init_add_locales2(), add_locales_exports))
194465
194349
  }
194466
194350
  ]
194467
194351
  },
@@ -194471,10 +194355,10 @@ function getRouteMap({
194471
194355
  ]
194472
194356
  },
194473
194357
  {
194474
- element: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(PublicLayout, {}),
194358
+ element: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(PublicLayout, {}),
194475
194359
  children: [
194476
194360
  {
194477
- errorElement: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(ErrorBoundary, {}),
194361
+ errorElement: /* @__PURE__ */ (0, import_jsx_runtime698.jsx)(ErrorBoundary, {}),
194478
194362
  children: [
194479
194363
  {
194480
194364
  path: "/login",
@@ -194498,12 +194382,12 @@ function getRouteMap({
194498
194382
  }
194499
194383
  ];
194500
194384
  }
194501
- var import_i18next9, import_react_router_dom253, import_jsx_runtime699;
194385
+ var import_i18next9, import_react_router_dom252, import_jsx_runtime698;
194502
194386
  var init_get_route_map = __esm({
194503
194387
  "src/dashboard-app/routes/get-route.map.tsx"() {
194504
194388
  "use strict";
194505
194389
  import_i18next9 = require("i18next");
194506
- import_react_router_dom253 = require("react-router-dom");
194390
+ import_react_router_dom252 = require("react-router-dom");
194507
194391
  init_protected_route2();
194508
194392
  init_main_layout2();
194509
194393
  init_public_layout2();
@@ -194511,7 +194395,7 @@ var init_get_route_map = __esm({
194511
194395
  init_error_boundary2();
194512
194396
  init_breadcrumb();
194513
194397
  init_loader();
194514
- import_jsx_runtime699 = require("react/jsx-runtime");
194398
+ import_jsx_runtime698 = require("react/jsx-runtime");
194515
194399
  }
194516
194400
  });
194517
194401
 
@@ -194675,18 +194559,18 @@ var init_sort_menu_items_by_rank = __esm({
194675
194559
  });
194676
194560
 
194677
194561
  // src/dashboard-app/dashboard-app.tsx
194678
- var import_admin_shared, import_react_router_dom254, import_jsx_runtime700, OPTIONAL_LAST_SEGMENT_MATCH, DashboardApp;
194562
+ var import_admin_shared, import_react_router_dom253, import_jsx_runtime699, OPTIONAL_LAST_SEGMENT_MATCH, DashboardApp;
194679
194563
  var init_dashboard_app = __esm({
194680
194564
  "src/dashboard-app/dashboard-app.tsx"() {
194681
194565
  "use strict";
194682
194566
  import_admin_shared = require("@medusajs/admin-shared");
194683
- import_react_router_dom254 = require("react-router-dom");
194567
+ import_react_router_dom253 = require("react-router-dom");
194684
194568
  init_providers2();
194685
194569
  init_translations();
194686
194570
  init_get_route_map();
194687
194571
  init_utils14();
194688
194572
  init_sort_menu_items_by_rank();
194689
- import_jsx_runtime700 = require("react/jsx-runtime");
194573
+ import_jsx_runtime699 = require("react/jsx-runtime");
194690
194574
  OPTIONAL_LAST_SEGMENT_MATCH = /\/([^\/])+\?$/;
194691
194575
  DashboardApp = class {
194692
194576
  constructor({ plugins }) {
@@ -194792,7 +194676,7 @@ var init_dashboard_app = __esm({
194792
194676
  const navItem = {
194793
194677
  label: item.label,
194794
194678
  to: item.path,
194795
- icon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(item.icon, {}) : void 0,
194679
+ icon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(item.icon, {}) : void 0,
194796
194680
  items: [],
194797
194681
  nested: item.nested,
194798
194682
  rank: item.rank,
@@ -194999,10 +194883,10 @@ var init_dashboard_app = __esm({
194999
194883
  settingsRoutes: this.settingsRoutes,
195000
194884
  coreRoutes: this.coreRoutes
195001
194885
  });
195002
- const router = (0, import_react_router_dom254.createBrowserRouter)(routes, {
194886
+ const router = (0, import_react_router_dom253.createBrowserRouter)(routes, {
195003
194887
  basename: __BASE__ || "/"
195004
194888
  });
195005
- return /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(Providers, { api: this.api, children: /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(import_react_router_dom254.RouterProvider, { router }) });
194889
+ return /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Providers, { api: this.api, children: /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(import_react_router_dom253.RouterProvider, { router }) });
195006
194890
  }
195007
194891
  };
195008
194892
  }
@@ -195048,7 +194932,7 @@ function getFieldLabel(field) {
195048
194932
  }
195049
194933
  return field.name.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
195050
194934
  }
195051
- var import_ui460, import_react_i18next492, import_jsx_runtime701, FormExtensionZone, FormExtensionField, FormExtensionFieldComponent;
194935
+ var import_ui460, import_react_i18next492, import_jsx_runtime700, FormExtensionZone, FormExtensionField, FormExtensionFieldComponent;
195052
194936
  var init_form_extension_zone = __esm({
195053
194937
  "src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx"() {
195054
194938
  "use strict";
@@ -195056,9 +194940,9 @@ var init_form_extension_zone = __esm({
195056
194940
  import_react_i18next492 = require("react-i18next");
195057
194941
  init_form2();
195058
194942
  init_utils15();
195059
- import_jsx_runtime701 = require("react/jsx-runtime");
194943
+ import_jsx_runtime700 = require("react/jsx-runtime");
195060
194944
  FormExtensionZone = ({ fields, form }) => {
195061
- return /* @__PURE__ */ (0, import_jsx_runtime701.jsx)("div", { children: fields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(FormExtensionField, { field, form }, index)) });
194945
+ return /* @__PURE__ */ (0, import_jsx_runtime700.jsx)("div", { children: fields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(FormExtensionField, { field, form }, index)) });
195062
194946
  };
195063
194947
  FormExtensionField = ({ field, form }) => {
195064
194948
  const label = getFieldLabel(field);
@@ -195067,16 +194951,16 @@ var init_form_extension_zone = __esm({
195067
194951
  const Component5 = field.Component;
195068
194952
  const type = getFieldType(field.validation);
195069
194953
  const { control } = form;
195070
- return /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(
194954
+ return /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(
195071
194955
  Form.Field,
195072
194956
  {
195073
194957
  control,
195074
194958
  name: `additional_data.${field.name}`,
195075
194959
  render: ({ field: field2 }) => {
195076
- return /* @__PURE__ */ (0, import_jsx_runtime701.jsxs)(Form.Item, { children: [
195077
- /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(Form.Label, { children: label }),
195078
- description && /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(Form.Hint, { children: description }),
195079
- /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(
194960
+ return /* @__PURE__ */ (0, import_jsx_runtime700.jsxs)(Form.Item, { children: [
194961
+ /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(Form.Label, { children: label }),
194962
+ description && /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(Form.Hint, { children: description }),
194963
+ /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(
195080
194964
  FormExtensionFieldComponent,
195081
194965
  {
195082
194966
  field: field2,
@@ -195085,7 +194969,7 @@ var init_form_extension_zone = __esm({
195085
194969
  placeholder
195086
194970
  }
195087
194971
  ) }),
195088
- /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(Form.ErrorMessage, {})
194972
+ /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(Form.ErrorMessage, {})
195089
194973
  ] });
195090
194974
  }
195091
194975
  }
@@ -195100,20 +194984,20 @@ var init_form_extension_zone = __esm({
195100
194984
  const { t: t5 } = (0, import_react_i18next492.useTranslation)();
195101
194985
  if (component) {
195102
194986
  const Component5 = component;
195103
- return /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(Component5, { ...field, placeholder });
194987
+ return /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(Component5, { ...field, placeholder });
195104
194988
  }
195105
194989
  switch (type) {
195106
194990
  case "text": {
195107
- return /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(import_ui460.Input, { ...field, placeholder });
194991
+ return /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(import_ui460.Input, { ...field, placeholder });
195108
194992
  }
195109
194993
  case "number": {
195110
- return /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(import_ui460.Input, { ...field, placeholder, type: "number" });
194994
+ return /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(import_ui460.Input, { ...field, placeholder, type: "number" });
195111
194995
  }
195112
194996
  case "boolean": {
195113
- return /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(import_ui460.Switch, { className: "rtl:rotate-180", dir: "ltr", ...field });
194997
+ return /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(import_ui460.Switch, { className: "rtl:rotate-180", dir: "ltr", ...field });
195114
194998
  }
195115
194999
  default: {
195116
- return /* @__PURE__ */ (0, import_jsx_runtime701.jsx)(import_ui460.InlineTip, { variant: "warning", label: t5("general.warning"), children: "The field type does not support rendering a fallback component. Please provide a component prop." });
195000
+ return /* @__PURE__ */ (0, import_jsx_runtime700.jsx)(import_ui460.InlineTip, { variant: "warning", label: t5("general.warning"), children: "The field type does not support rendering a fallback component. Please provide a component prop." });
195117
195001
  }
195118
195002
  }
195119
195003
  };
@@ -195180,7 +195064,7 @@ var import_i18n6 = __toESM(require("virtual:medusa/i18n"));
195180
195064
  var import_menu_items = __toESM(require("virtual:medusa/menu-items"));
195181
195065
  var import_routes = __toESM(require("virtual:medusa/routes"));
195182
195066
  var import_widgets = __toESM(require("virtual:medusa/widgets"));
195183
- var import_jsx_runtime702 = require("react/jsx-runtime");
195067
+ var import_jsx_runtime701 = require("react/jsx-runtime");
195184
195068
  var localPlugin = {
195185
195069
  widgetModule: import_widgets.default,
195186
195070
  routeModule: import_routes.default,
@@ -195193,6 +195077,6 @@ function App({ plugins = [] }) {
195193
195077
  const app = new DashboardApp({
195194
195078
  plugins: [localPlugin, ...plugins]
195195
195079
  });
195196
- return /* @__PURE__ */ (0, import_jsx_runtime702.jsx)("div", { children: app.render() });
195080
+ return /* @__PURE__ */ (0, import_jsx_runtime701.jsx)("div", { children: app.render() });
195197
195081
  }
195198
195082
  var app_default = App;