@feedmepos/mf-hrm-portal 2.3.2-dev → 2.3.2-dev.10

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 (295) hide show
  1. package/dist/{ApprovalCodeList-xOyDG5ug.js → ApprovalCodeList-RKU5B8SO.js} +14 -15
  2. package/dist/AuditLogList-DuDCMjGR.js +2026 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Cixg_icC.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-pL2zRc67.js} +10 -10
  4. package/dist/{EmployeeList-BG2KPvOB.js → EmployeeList-nrYsS5uz.js} +196 -208
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-7S2w36aY.js +90 -0
  6. package/dist/{GrantUserList-CUkuf3VV.js → GrantUserList-BSjeC4MC.js} +15 -16
  7. package/dist/{Main-Cg9SOzcz.js → Main-CpuHaXU6.js} +5 -5
  8. package/dist/{Main-BSHf8gTE.js → Main-DbdoVLCE.js} +12 -11
  9. package/dist/{Main-BcixH7R5.js → Main-DtmCBbTR.js} +1005 -999
  10. package/dist/MyPosProfile-CsTCfGNT.js +360 -0
  11. package/dist/{PermissionSetList-I3u2_qHR.js → PermissionSetList-B1c-uGZO.js} +82 -80
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Toq6qrLx.js +4208 -0
  13. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-D6Z9z_Yt.js +1831 -0
  14. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-TWTVo_9Y.js +547 -0
  16. package/dist/RoleList-CwaGNsFy.js +265 -0
  17. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-C2ekVXdR.js +544 -0
  18. package/dist/ScheduleGeneralPage-BVtXmxtp.js +811 -0
  19. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-DdsQ8v-5.js +2557 -0
  20. package/dist/SchedulePage-3qksmT2I.js +19446 -0
  21. package/dist/SchedulePositionPage-DAU20KPZ.js +282 -0
  22. package/dist/SelectFilter-BpzBwBmQ.js +263 -0
  23. package/dist/TeamMemberList-Bdpm40i3.js +2087 -0
  24. package/dist/TimesheetList-CL_eJp2h.js +437 -0
  25. package/dist/{app-CdrnR_Pw.js → app-DEZT4wdV.js} +14439 -5834
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-Bwvwehz9.js → approval-code-BZTz5OXK.js} +4 -4
  28. package/dist/{dayjs.min-BO8bcI17.js → dayjs.min-B55I-uhI.js} +12 -12
  29. package/dist/employee-C6z5i6O4.js +172 -0
  30. package/dist/{grant-user-whFOaPZI.js → grant-user-B2rYztyf.js} +2 -2
  31. package/dist/{iteration-ZpERYj3o.js → index-Bfdseotz.js} +698 -726
  32. package/dist/iteration-CcXrOMQe.js +30 -0
  33. package/dist/{lodash-7SZBZ8VQ.js → lodash-B8bqa6a9.js} +1 -1
  34. package/dist/member-grant-BIpKkuu8.js +54 -0
  35. package/dist/object-Dwyg2LgX.js +16 -0
  36. package/dist/restaurant-ejyX2jEG.js +52 -0
  37. package/dist/role-C_t3DDlG.js +98 -0
  38. package/dist/rule-Ccopk8R_.js +843 -0
  39. package/dist/src/api/audit-log/index.d.ts +6 -0
  40. package/dist/src/api/employee/index.d.ts +3 -4
  41. package/dist/src/api/my-pos-profile/index.d.ts +1 -3
  42. package/dist/src/api/restaurant/index.d.ts +2 -0
  43. package/dist/src/api/schedule/index.d.ts +68 -0
  44. package/dist/src/api/sso-provider/index.d.ts +5 -0
  45. package/dist/src/api/staff-invite/index.d.ts +1 -2
  46. package/dist/src/api/timesheet/index.d.ts +1 -1
  47. package/dist/src/components/AppForm.vue.d.ts +2 -2
  48. package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
  49. package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
  50. package/dist/src/components/layout/SchedulePromoBanner.vue.d.ts +2 -0
  51. package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
  52. package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
  53. package/dist/src/composables/useMessage.d.ts +8 -2
  54. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  55. package/dist/src/composables/useStaffInviteProviders.d.ts +1 -12
  56. package/dist/src/helpers/permission-set.d.ts +1 -102
  57. package/dist/src/helpers/pos-assignment-rows.d.ts +2 -0
  58. package/dist/src/helpers/rule.d.ts +2 -2
  59. package/dist/src/helpers/staff-invite.d.ts +3 -0
  60. package/dist/src/router/shared.d.ts +3 -0
  61. package/dist/src/stores/approval-code.d.ts +1 -1
  62. package/dist/src/stores/employee.d.ts +15 -21
  63. package/dist/src/stores/grant-user.d.ts +1 -1
  64. package/dist/src/stores/permission-assignment.d.ts +2 -2
  65. package/dist/src/stores/permission-set.d.ts +2 -2
  66. package/dist/src/stores/restaurant.d.ts +63 -3
  67. package/dist/src/stores/role.d.ts +2 -2
  68. package/dist/src/stores/team.d.ts +1 -1
  69. package/dist/src/stores/timesheet.d.ts +68 -53
  70. package/dist/src/types/employee.d.ts +1 -0
  71. package/dist/src/types/my-pos-profile.d.ts +2 -3
  72. package/dist/src/types/schedule.d.ts +23 -0
  73. package/dist/src/types/sso-provider.d.ts +10 -0
  74. package/dist/src/types/timesheet.d.ts +3 -0
  75. package/dist/src/views/audit-log/constants.d.ts +9 -30
  76. package/dist/src/views/audit-log/locales/index.d.ts +528 -0
  77. package/dist/src/views/audit-log/pos-row.d.ts +27 -0
  78. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
  79. package/dist/src/views/hr/locales/index.d.ts +24 -4
  80. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  81. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
  82. package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -4
  83. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
  84. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
  85. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
  86. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
  87. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +12 -0
  88. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
  89. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
  90. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
  91. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
  92. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
  93. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  94. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +41 -0
  95. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
  96. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +2 -0
  97. package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -0
  98. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +25 -0
  99. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
  100. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
  101. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +29 -0
  102. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +34 -0
  103. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +26 -0
  104. package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
  105. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
  106. package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
  107. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  108. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
  109. package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
  110. package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +6 -0
  111. package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +15 -0
  112. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +33 -0
  113. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +17 -0
  114. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
  115. package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
  116. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
  117. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
  118. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +17 -0
  119. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
  120. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
  121. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
  122. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
  123. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
  124. package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +7 -0
  125. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
  126. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
  127. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
  128. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  129. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +6 -0
  130. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
  131. package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
  132. package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +6 -0
  133. package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +6 -0
  134. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +6 -0
  135. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
  136. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
  137. package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
  138. package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
  139. package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
  140. package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
  141. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
  142. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +11 -0
  143. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
  144. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
  145. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
  146. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
  147. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
  148. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
  149. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +70 -0
  150. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
  151. package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
  152. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
  153. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
  154. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
  155. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +8 -0
  156. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
  157. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
  158. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
  159. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
  160. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +16 -0
  161. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +50 -0
  162. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
  163. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
  164. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
  165. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
  166. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +35 -0
  167. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +7 -0
  168. package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
  169. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +51 -0
  170. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +15 -0
  171. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +82 -0
  172. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +63 -0
  173. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +9 -0
  174. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +17 -0
  175. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +24 -0
  176. package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
  177. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +21 -0
  178. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +23 -0
  179. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
  180. package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
  181. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
  182. package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +9 -0
  183. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  184. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +23 -0
  185. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +29 -0
  186. package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
  187. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +9 -0
  188. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  189. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +16 -0
  190. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +137 -0
  191. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +75 -0
  192. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
  193. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +11 -0
  194. package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
  195. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +301 -0
  196. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +615 -0
  197. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
  198. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +28 -0
  199. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +21 -0
  200. package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
  201. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +12 -0
  202. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +60 -0
  203. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +44 -0
  204. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +111 -0
  205. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +59 -0
  206. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +47 -0
  207. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +166 -0
  208. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +55 -0
  209. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +24 -0
  210. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
  211. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +49 -0
  212. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
  213. package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
  214. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +50 -0
  215. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +38 -0
  216. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +32 -0
  217. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
  218. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
  219. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +52 -0
  220. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
  221. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +79 -0
  222. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +60 -0
  223. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
  224. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
  225. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
  226. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +231 -0
  227. package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
  228. package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
  229. package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
  230. package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
  231. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1543 -0
  232. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +25 -0
  233. package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
  234. package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
  235. package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
  236. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +20 -0
  237. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +33 -0
  238. package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
  239. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +21 -0
  240. package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
  241. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +55 -0
  242. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +35 -0
  243. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +127 -0
  244. package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
  245. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
  246. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +313 -0
  247. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +40 -0
  248. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +17 -0
  249. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +245 -0
  250. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
  251. package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
  252. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +255 -0
  253. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +27 -0
  254. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
  255. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +95 -0
  256. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  257. package/dist/src/views/scheduling/country-rules/index.d.ts +33 -0
  258. package/dist/src/views/scheduling/data.d.ts +123 -0
  259. package/dist/src/views/scheduling/locales/index.d.ts +6988 -0
  260. package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
  261. package/dist/src/views/scheduling/schedule-state.d.ts +767 -0
  262. package/dist/src/views/scheduling/schedule-store.d.ts +140 -0
  263. package/dist/src/views/scheduling/types.d.ts +381 -0
  264. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +2 -6
  265. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  266. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -2
  267. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  268. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +0 -2
  269. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -2
  270. package/dist/style.css +1 -1
  271. package/dist/timesheet-CZHcebqS.js +76 -0
  272. package/dist/tsconfig.app.tsbuildinfo +1 -1
  273. package/dist/{useAppStore-CL6EEDuw.js → useAppStore-DfqsbhT2.js} +1 -1
  274. package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
  275. package/dist/{useLoading-BBjBUzGJ.js → useLoading-CQnX5WjI.js} +1 -1
  276. package/dist/useMessage-_ywT_N9X.js +17 -0
  277. package/dist/{useReportPermissions-Bg0fma6m.js → useReportPermissions-kTjftFk7.js} +13 -13
  278. package/package.json +7 -5
  279. package/dist/AuditLogList-Dd6HyFhk.js +0 -1777
  280. package/dist/FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js +0 -45
  281. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  282. package/dist/MyPosProfile-CN8Bj3aV.js +0 -301
  283. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBoRXQPn.js +0 -4243
  284. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B5QDOF0L.js +0 -1840
  285. package/dist/RoleList-ALmAwN0U.js +0 -739
  286. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  287. package/dist/TeamMemberList-DZfEnOs1.js +0 -2097
  288. package/dist/TimesheetList-CECFKt7H.js +0 -402
  289. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RIyoAmeb.js +0 -58
  290. package/dist/employee-Dg-J9goA.js +0 -205
  291. package/dist/member-grant-C46lvrh2.js +0 -55
  292. package/dist/restaurant-CKhT6kgj.js +0 -45
  293. package/dist/role-C6hFKOfU.js +0 -93
  294. package/dist/rule-BlMymDXm.js +0 -788
  295. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
@@ -0,0 +1,4208 @@
1
+ import { getCurrentInstance as Yt, inject as ur, ref as st, shallowRef as mr, computed as K, watch as Mt, onMounted as xn, onUnmounted as dr, defineComponent as Le, h as Vn, createVNode as oe, Text as fr, Fragment as Me, resolveComponent as we, createBlock as Ce, openBlock as $, withCtx as ce, createElementVNode as ie, createElementBlock as re, toDisplayString as Oe, unref as X, renderList as Ee, toRef as qt, normalizeStyle as rt, renderSlot as Re, createCommentVNode as Ne, normalizeClass as Ie, createTextVNode as _r, useSlots as pr, createSlots as tt, mergeModels as en, useModel as vr } from "vue";
2
+ import { useI18n as Ke, useCoreStore as hr } from "@feedmepos/mf-common";
3
+ import { useDialog as br, useBreakpoints as gr } from "@feedmepos/ui-library";
4
+ import "@vue/devtools-api";
5
+ import { p as Gn, N as Wn, Y as tn, V as yr, a as Ir, j as Er, Q as Nr, A as Cr, D as Tr, C as Or } from "./rule-Ccopk8R_.js";
6
+ import { _ as Bt, a as Rr, b as nn, u as Sr } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-pL2zRc67.js";
7
+ import { u as Lr, v as kr, g as Ar, b as Mr, P as Zn, S as wt, A as nt, m as Ye, j as rn } from "./app-DEZT4wdV.js";
8
+ import { c as Yn } from "./iteration-CcXrOMQe.js";
9
+ import { r as wr, s as Bn } from "./string-DZQ1uNjn.js";
10
+ import "./index-Bfdseotz.js";
11
+ import { W as Dr } from "./member-grant-BIpKkuu8.js";
12
+ import { u as Fr } from "./role-C_t3DDlG.js";
13
+ function Rt(e, t, n) {
14
+ const r = /* @__PURE__ */ new Map();
15
+ return e.forEach(
16
+ ({ name: a, permissions: o }) => o.forEach(({ conditions: f, actions: d }) => {
17
+ var b, E;
18
+ const i = JSON.parse(f || "{}");
19
+ (b = i[t]) != null && b.$in ? (E = i[t]) == null || E.$in.forEach(
20
+ (C) => (r.get(C) ?? r.set(C, /* @__PURE__ */ new Set()).get(C)).add(a)
21
+ ) : d[0] === "manage" && n.forEach((C) => {
22
+ (r.get(C) ?? r.set(C, /* @__PURE__ */ new Set()).get(C)).add(a);
23
+ });
24
+ })
25
+ ), [...r].map(([a, o]) => ({
26
+ id: a,
27
+ setNames: [...o]
28
+ }));
29
+ }
30
+ /*!
31
+ * shared v10.0.5
32
+ * (c) 2024 kazuya kawaguchi
33
+ * Released under the MIT License.
34
+ */
35
+ const sn = typeof window < "u", ze = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Pr = (e, t, n) => jr({ l: e, k: t, s: n }), jr = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), be = (e) => typeof e == "number" && isFinite(e), Ur = (e) => Xt(e) === "[object Date]", It = (e) => Xt(e) === "[object RegExp]", Nt = (e) => q(e) && Object.keys(e).length === 0, ge = Object.assign, xr = Object.create, se = (e = null) => xr(e);
36
+ let an;
37
+ const Je = () => an || (an = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : se());
38
+ function on(e) {
39
+ return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
40
+ }
41
+ const Vr = Object.prototype.hasOwnProperty;
42
+ function Se(e, t) {
43
+ return Vr.call(e, t);
44
+ }
45
+ const pe = Array.isArray, ue = (e) => typeof e == "function", G = (e) => typeof e == "string", _e = (e) => typeof e == "boolean", ee = (e) => e !== null && typeof e == "object", Gr = (e) => ee(e) && ue(e.then) && ue(e.catch), Xn = Object.prototype.toString, Xt = (e) => Xn.call(e), q = (e) => Xt(e) === "[object Object]", Wr = (e) => e == null ? "" : pe(e) || q(e) && e.toString === Xn ? JSON.stringify(e, null, 2) : String(e);
46
+ function Ht(e, t = "") {
47
+ return e.reduce((n, r, a) => a === 0 ? n + r : n + t + r, "");
48
+ }
49
+ function Zr(e, t) {
50
+ typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
51
+ }
52
+ const ft = (e) => !ee(e) || pe(e);
53
+ function yt(e, t) {
54
+ if (ft(e) || ft(t))
55
+ throw new Error("Invalid value");
56
+ const n = [{ src: e, des: t }];
57
+ for (; n.length; ) {
58
+ const { src: r, des: a } = n.pop();
59
+ Object.keys(r).forEach((o) => {
60
+ o !== "__proto__" && (ee(r[o]) && !ee(a[o]) && (a[o] = Array.isArray(r[o]) ? [] : se()), ft(a[o]) || ft(r[o]) ? a[o] = r[o] : n.push({ src: r[o], des: a[o] }));
61
+ });
62
+ }
63
+ }
64
+ function Yr(e, t, n) {
65
+ return { line: e, column: t, offset: n };
66
+ }
67
+ function Dt(e, t, n) {
68
+ return { start: e, end: t };
69
+ }
70
+ const ne = {
71
+ // tokenizer error codes
72
+ EXPECTED_TOKEN: 1,
73
+ INVALID_TOKEN_IN_PLACEHOLDER: 2,
74
+ UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
75
+ UNKNOWN_ESCAPE_SEQUENCE: 4,
76
+ INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
77
+ UNBALANCED_CLOSING_BRACE: 6,
78
+ UNTERMINATED_CLOSING_BRACE: 7,
79
+ EMPTY_PLACEHOLDER: 8,
80
+ NOT_ALLOW_NEST_PLACEHOLDER: 9,
81
+ INVALID_LINKED_FORMAT: 10,
82
+ // parser error codes
83
+ MUST_HAVE_MESSAGES_IN_PLURAL: 11,
84
+ UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
85
+ UNEXPECTED_EMPTY_LINKED_KEY: 13,
86
+ UNEXPECTED_LEXICAL_ANALYSIS: 14
87
+ }, Br = 17;
88
+ function Ct(e, t, n = {}) {
89
+ const { domain: r, messages: a, args: o } = n, f = e, d = new SyntaxError(String(f));
90
+ return d.code = e, t && (d.location = t), d.domain = r, d;
91
+ }
92
+ function Xr(e) {
93
+ throw e;
94
+ }
95
+ const je = " ", Hr = "\r", ye = `
96
+ `, $r = "\u2028", Jr = "\u2029";
97
+ function Kr(e) {
98
+ const t = e;
99
+ let n = 0, r = 1, a = 1, o = 0;
100
+ const f = (v) => t[v] === Hr && t[v + 1] === ye, d = (v) => t[v] === ye, i = (v) => t[v] === Jr, b = (v) => t[v] === $r, E = (v) => f(v) || d(v) || i(v) || b(v), C = () => n, T = () => r, w = () => a, A = () => o, L = (v) => f(v) || i(v) || b(v) ? ye : t[v], M = () => L(n), p = () => L(n + o);
101
+ function h() {
102
+ return o = 0, E(n) && (r++, a = 0), f(n) && n++, n++, a++, t[n];
103
+ }
104
+ function R() {
105
+ return f(n + o) && o++, o++, t[n + o];
106
+ }
107
+ function m() {
108
+ n = 0, r = 1, a = 1, o = 0;
109
+ }
110
+ function g(v = 0) {
111
+ o = v;
112
+ }
113
+ function I() {
114
+ const v = n + o;
115
+ for (; v !== n; )
116
+ h();
117
+ o = 0;
118
+ }
119
+ return {
120
+ index: C,
121
+ line: T,
122
+ column: w,
123
+ peekOffset: A,
124
+ charAt: L,
125
+ currentChar: M,
126
+ currentPeek: p,
127
+ next: h,
128
+ peek: R,
129
+ reset: m,
130
+ resetPeek: g,
131
+ skipToPeek: I
132
+ };
133
+ }
134
+ const Ze = void 0, zr = ".", ln = "'", Qr = "tokenizer";
135
+ function qr(e, t = {}) {
136
+ const n = t.location !== !1, r = Kr(e), a = () => r.index(), o = () => Yr(r.line(), r.column(), r.index()), f = o(), d = a(), i = {
137
+ currentType: 13,
138
+ offset: d,
139
+ startLoc: f,
140
+ endLoc: f,
141
+ lastType: 13,
142
+ lastOffset: d,
143
+ lastStartLoc: f,
144
+ lastEndLoc: f,
145
+ braceNest: 0,
146
+ inLinked: !1,
147
+ text: ""
148
+ }, b = () => i, { onError: E } = t;
149
+ function C(l, s, c, ...y) {
150
+ const U = b();
151
+ if (s.column += c, s.offset += c, E) {
152
+ const W = n ? Dt(U.startLoc, s) : null, u = Ct(l, W, {
153
+ domain: Qr,
154
+ args: y
155
+ });
156
+ E(u);
157
+ }
158
+ }
159
+ function T(l, s, c) {
160
+ l.endLoc = o(), l.currentType = s;
161
+ const y = { type: s };
162
+ return n && (y.loc = Dt(l.startLoc, l.endLoc)), c != null && (y.value = c), y;
163
+ }
164
+ const w = (l) => T(
165
+ l,
166
+ 13
167
+ /* TokenTypes.EOF */
168
+ );
169
+ function A(l, s) {
170
+ return l.currentChar() === s ? (l.next(), s) : (C(ne.EXPECTED_TOKEN, o(), 0, s), "");
171
+ }
172
+ function L(l) {
173
+ let s = "";
174
+ for (; l.currentPeek() === je || l.currentPeek() === ye; )
175
+ s += l.currentPeek(), l.peek();
176
+ return s;
177
+ }
178
+ function M(l) {
179
+ const s = L(l);
180
+ return l.skipToPeek(), s;
181
+ }
182
+ function p(l) {
183
+ if (l === Ze)
184
+ return !1;
185
+ const s = l.charCodeAt(0);
186
+ return s >= 97 && s <= 122 || // a-z
187
+ s >= 65 && s <= 90 || // A-Z
188
+ s === 95;
189
+ }
190
+ function h(l) {
191
+ if (l === Ze)
192
+ return !1;
193
+ const s = l.charCodeAt(0);
194
+ return s >= 48 && s <= 57;
195
+ }
196
+ function R(l, s) {
197
+ const { currentType: c } = s;
198
+ if (c !== 2)
199
+ return !1;
200
+ L(l);
201
+ const y = p(l.currentPeek());
202
+ return l.resetPeek(), y;
203
+ }
204
+ function m(l, s) {
205
+ const { currentType: c } = s;
206
+ if (c !== 2)
207
+ return !1;
208
+ L(l);
209
+ const y = l.currentPeek() === "-" ? l.peek() : l.currentPeek(), U = h(y);
210
+ return l.resetPeek(), U;
211
+ }
212
+ function g(l, s) {
213
+ const { currentType: c } = s;
214
+ if (c !== 2)
215
+ return !1;
216
+ L(l);
217
+ const y = l.currentPeek() === ln;
218
+ return l.resetPeek(), y;
219
+ }
220
+ function I(l, s) {
221
+ const { currentType: c } = s;
222
+ if (c !== 7)
223
+ return !1;
224
+ L(l);
225
+ const y = l.currentPeek() === ".";
226
+ return l.resetPeek(), y;
227
+ }
228
+ function v(l, s) {
229
+ const { currentType: c } = s;
230
+ if (c !== 8)
231
+ return !1;
232
+ L(l);
233
+ const y = p(l.currentPeek());
234
+ return l.resetPeek(), y;
235
+ }
236
+ function k(l, s) {
237
+ const { currentType: c } = s;
238
+ if (!(c === 7 || c === 11))
239
+ return !1;
240
+ L(l);
241
+ const y = l.currentPeek() === ":";
242
+ return l.resetPeek(), y;
243
+ }
244
+ function S(l, s) {
245
+ const { currentType: c } = s;
246
+ if (c !== 9)
247
+ return !1;
248
+ const y = () => {
249
+ const W = l.currentPeek();
250
+ return W === "{" ? p(l.peek()) : W === "@" || W === "|" || W === ":" || W === "." || W === je || !W ? !1 : W === ye ? (l.peek(), y()) : x(l, !1);
251
+ }, U = y();
252
+ return l.resetPeek(), U;
253
+ }
254
+ function H(l) {
255
+ L(l);
256
+ const s = l.currentPeek() === "|";
257
+ return l.resetPeek(), s;
258
+ }
259
+ function x(l, s = !0) {
260
+ const c = (U = !1, W = "") => {
261
+ const u = l.currentPeek();
262
+ return u === "{" || u === "@" || !u ? U : u === "|" ? !(W === je || W === ye) : u === je ? (l.peek(), c(!0, je)) : u === ye ? (l.peek(), c(!0, ye)) : !0;
263
+ }, y = c();
264
+ return s && l.resetPeek(), y;
265
+ }
266
+ function _(l, s) {
267
+ const c = l.currentChar();
268
+ return c === Ze ? Ze : s(c) ? (l.next(), c) : null;
269
+ }
270
+ function O(l) {
271
+ const s = l.charCodeAt(0);
272
+ return s >= 97 && s <= 122 || // a-z
273
+ s >= 65 && s <= 90 || // A-Z
274
+ s >= 48 && s <= 57 || // 0-9
275
+ s === 95 || // _
276
+ s === 36;
277
+ }
278
+ function P(l) {
279
+ return _(l, O);
280
+ }
281
+ function F(l) {
282
+ const s = l.charCodeAt(0);
283
+ return s >= 97 && s <= 122 || // a-z
284
+ s >= 65 && s <= 90 || // A-Z
285
+ s >= 48 && s <= 57 || // 0-9
286
+ s === 95 || // _
287
+ s === 36 || // $
288
+ s === 45;
289
+ }
290
+ function D(l) {
291
+ return _(l, F);
292
+ }
293
+ function V(l) {
294
+ const s = l.charCodeAt(0);
295
+ return s >= 48 && s <= 57;
296
+ }
297
+ function j(l) {
298
+ return _(l, V);
299
+ }
300
+ function Z(l) {
301
+ const s = l.charCodeAt(0);
302
+ return s >= 48 && s <= 57 || // 0-9
303
+ s >= 65 && s <= 70 || // A-F
304
+ s >= 97 && s <= 102;
305
+ }
306
+ function B(l) {
307
+ return _(l, Z);
308
+ }
309
+ function te(l) {
310
+ let s = "", c = "";
311
+ for (; s = j(l); )
312
+ c += s;
313
+ return c;
314
+ }
315
+ function z(l) {
316
+ let s = "";
317
+ for (; ; ) {
318
+ const c = l.currentChar();
319
+ if (c === "{" || c === "}" || c === "@" || c === "|" || !c)
320
+ break;
321
+ if (c === je || c === ye)
322
+ if (x(l))
323
+ s += c, l.next();
324
+ else {
325
+ if (H(l))
326
+ break;
327
+ s += c, l.next();
328
+ }
329
+ else
330
+ s += c, l.next();
331
+ }
332
+ return s;
333
+ }
334
+ function de(l) {
335
+ M(l);
336
+ let s = "", c = "";
337
+ for (; s = D(l); )
338
+ c += s;
339
+ return l.currentChar() === Ze && C(ne.UNTERMINATED_CLOSING_BRACE, o(), 0), c;
340
+ }
341
+ function ve(l) {
342
+ M(l);
343
+ let s = "";
344
+ return l.currentChar() === "-" ? (l.next(), s += `-${te(l)}`) : s += te(l), l.currentChar() === Ze && C(ne.UNTERMINATED_CLOSING_BRACE, o(), 0), s;
345
+ }
346
+ function he(l) {
347
+ return l !== ln && l !== ye;
348
+ }
349
+ function ae(l) {
350
+ M(l), A(l, "'");
351
+ let s = "", c = "";
352
+ for (; s = _(l, he); )
353
+ s === "\\" ? c += le(l) : c += s;
354
+ const y = l.currentChar();
355
+ return y === ye || y === Ze ? (C(ne.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, o(), 0), y === ye && (l.next(), A(l, "'")), c) : (A(l, "'"), c);
356
+ }
357
+ function le(l) {
358
+ const s = l.currentChar();
359
+ switch (s) {
360
+ case "\\":
361
+ case "'":
362
+ return l.next(), `\\${s}`;
363
+ case "u":
364
+ return ke(l, s, 4);
365
+ case "U":
366
+ return ke(l, s, 6);
367
+ default:
368
+ return C(ne.UNKNOWN_ESCAPE_SEQUENCE, o(), 0, s), "";
369
+ }
370
+ }
371
+ function ke(l, s, c) {
372
+ A(l, s);
373
+ let y = "";
374
+ for (let U = 0; U < c; U++) {
375
+ const W = B(l);
376
+ if (!W) {
377
+ C(ne.INVALID_UNICODE_ESCAPE_SEQUENCE, o(), 0, `\\${s}${y}${l.currentChar()}`);
378
+ break;
379
+ }
380
+ y += W;
381
+ }
382
+ return `\\${s}${y}`;
383
+ }
384
+ function Y(l) {
385
+ return l !== "{" && l !== "}" && l !== je && l !== ye;
386
+ }
387
+ function fe(l) {
388
+ M(l);
389
+ let s = "", c = "";
390
+ for (; s = _(l, Y); )
391
+ c += s;
392
+ return c;
393
+ }
394
+ function $e(l) {
395
+ let s = "", c = "";
396
+ for (; s = P(l); )
397
+ c += s;
398
+ return c;
399
+ }
400
+ function Qe(l) {
401
+ const s = (c) => {
402
+ const y = l.currentChar();
403
+ return y === "{" || y === "@" || y === "|" || y === "(" || y === ")" || !y || y === je ? c : (c += y, l.next(), s(c));
404
+ };
405
+ return s("");
406
+ }
407
+ function Ve(l) {
408
+ M(l);
409
+ const s = A(
410
+ l,
411
+ "|"
412
+ /* TokenChars.Pipe */
413
+ );
414
+ return M(l), s;
415
+ }
416
+ function De(l, s) {
417
+ let c = null;
418
+ switch (l.currentChar()) {
419
+ case "{":
420
+ return s.braceNest >= 1 && C(ne.NOT_ALLOW_NEST_PLACEHOLDER, o(), 0), l.next(), c = T(
421
+ s,
422
+ 2,
423
+ "{"
424
+ /* TokenChars.BraceLeft */
425
+ ), M(l), s.braceNest++, c;
426
+ case "}":
427
+ return s.braceNest > 0 && s.currentType === 2 && C(ne.EMPTY_PLACEHOLDER, o(), 0), l.next(), c = T(
428
+ s,
429
+ 3,
430
+ "}"
431
+ /* TokenChars.BraceRight */
432
+ ), s.braceNest--, s.braceNest > 0 && M(l), s.inLinked && s.braceNest === 0 && (s.inLinked = !1), c;
433
+ case "@":
434
+ return s.braceNest > 0 && C(ne.UNTERMINATED_CLOSING_BRACE, o(), 0), c = Fe(l, s) || w(s), s.braceNest = 0, c;
435
+ default: {
436
+ let U = !0, W = !0, u = !0;
437
+ if (H(l))
438
+ return s.braceNest > 0 && C(ne.UNTERMINATED_CLOSING_BRACE, o(), 0), c = T(s, 1, Ve(l)), s.braceNest = 0, s.inLinked = !1, c;
439
+ if (s.braceNest > 0 && (s.currentType === 4 || s.currentType === 5 || s.currentType === 6))
440
+ return C(ne.UNTERMINATED_CLOSING_BRACE, o(), 0), s.braceNest = 0, Ge(l, s);
441
+ if (U = R(l, s))
442
+ return c = T(s, 4, de(l)), M(l), c;
443
+ if (W = m(l, s))
444
+ return c = T(s, 5, ve(l)), M(l), c;
445
+ if (u = g(l, s))
446
+ return c = T(s, 6, ae(l)), M(l), c;
447
+ if (!U && !W && !u)
448
+ return c = T(s, 12, fe(l)), C(ne.INVALID_TOKEN_IN_PLACEHOLDER, o(), 0, c.value), M(l), c;
449
+ break;
450
+ }
451
+ }
452
+ return c;
453
+ }
454
+ function Fe(l, s) {
455
+ const { currentType: c } = s;
456
+ let y = null;
457
+ const U = l.currentChar();
458
+ switch ((c === 7 || c === 8 || c === 11 || c === 9) && (U === ye || U === je) && C(ne.INVALID_LINKED_FORMAT, o(), 0), U) {
459
+ case "@":
460
+ return l.next(), y = T(
461
+ s,
462
+ 7,
463
+ "@"
464
+ /* TokenChars.LinkedAlias */
465
+ ), s.inLinked = !0, y;
466
+ case ".":
467
+ return M(l), l.next(), T(
468
+ s,
469
+ 8,
470
+ "."
471
+ /* TokenChars.LinkedDot */
472
+ );
473
+ case ":":
474
+ return M(l), l.next(), T(
475
+ s,
476
+ 9,
477
+ ":"
478
+ /* TokenChars.LinkedDelimiter */
479
+ );
480
+ default:
481
+ return H(l) ? (y = T(s, 1, Ve(l)), s.braceNest = 0, s.inLinked = !1, y) : I(l, s) || k(l, s) ? (M(l), Fe(l, s)) : v(l, s) ? (M(l), T(s, 11, $e(l))) : S(l, s) ? (M(l), U === "{" ? De(l, s) || y : T(s, 10, Qe(l))) : (c === 7 && C(ne.INVALID_LINKED_FORMAT, o(), 0), s.braceNest = 0, s.inLinked = !1, Ge(l, s));
482
+ }
483
+ }
484
+ function Ge(l, s) {
485
+ let c = {
486
+ type: 13
487
+ /* TokenTypes.EOF */
488
+ };
489
+ if (s.braceNest > 0)
490
+ return De(l, s) || w(s);
491
+ if (s.inLinked)
492
+ return Fe(l, s) || w(s);
493
+ switch (l.currentChar()) {
494
+ case "{":
495
+ return De(l, s) || w(s);
496
+ case "}":
497
+ return C(ne.UNBALANCED_CLOSING_BRACE, o(), 0), l.next(), T(
498
+ s,
499
+ 3,
500
+ "}"
501
+ /* TokenChars.BraceRight */
502
+ );
503
+ case "@":
504
+ return Fe(l, s) || w(s);
505
+ default: {
506
+ if (H(l))
507
+ return c = T(s, 1, Ve(l)), s.braceNest = 0, s.inLinked = !1, c;
508
+ if (x(l))
509
+ return T(s, 0, z(l));
510
+ break;
511
+ }
512
+ }
513
+ return c;
514
+ }
515
+ function Pe() {
516
+ const { currentType: l, offset: s, startLoc: c, endLoc: y } = i;
517
+ return i.lastType = l, i.lastOffset = s, i.lastStartLoc = c, i.lastEndLoc = y, i.offset = a(), i.startLoc = o(), r.currentChar() === Ze ? T(
518
+ i,
519
+ 13
520
+ /* TokenTypes.EOF */
521
+ ) : Ge(r, i);
522
+ }
523
+ return {
524
+ nextToken: Pe,
525
+ currentOffset: a,
526
+ currentPosition: o,
527
+ context: b
528
+ };
529
+ }
530
+ const es = "parser", ts = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
531
+ function ns(e, t, n) {
532
+ switch (e) {
533
+ case "\\\\":
534
+ return "\\";
535
+ case "\\'":
536
+ return "'";
537
+ default: {
538
+ const r = parseInt(t || n, 16);
539
+ return r <= 55295 || r >= 57344 ? String.fromCodePoint(r) : "�";
540
+ }
541
+ }
542
+ }
543
+ function rs(e = {}) {
544
+ const t = e.location !== !1, { onError: n } = e;
545
+ function r(p, h, R, m, ...g) {
546
+ const I = p.currentPosition();
547
+ if (I.offset += m, I.column += m, n) {
548
+ const v = t ? Dt(R, I) : null, k = Ct(h, v, {
549
+ domain: es,
550
+ args: g
551
+ });
552
+ n(k);
553
+ }
554
+ }
555
+ function a(p, h, R) {
556
+ const m = { type: p };
557
+ return t && (m.start = h, m.end = h, m.loc = { start: R, end: R }), m;
558
+ }
559
+ function o(p, h, R, m) {
560
+ t && (p.end = h, p.loc && (p.loc.end = R));
561
+ }
562
+ function f(p, h) {
563
+ const R = p.context(), m = a(3, R.offset, R.startLoc);
564
+ return m.value = h, o(m, p.currentOffset(), p.currentPosition()), m;
565
+ }
566
+ function d(p, h) {
567
+ const R = p.context(), { lastOffset: m, lastStartLoc: g } = R, I = a(5, m, g);
568
+ return I.index = parseInt(h, 10), p.nextToken(), o(I, p.currentOffset(), p.currentPosition()), I;
569
+ }
570
+ function i(p, h) {
571
+ const R = p.context(), { lastOffset: m, lastStartLoc: g } = R, I = a(4, m, g);
572
+ return I.key = h, p.nextToken(), o(I, p.currentOffset(), p.currentPosition()), I;
573
+ }
574
+ function b(p, h) {
575
+ const R = p.context(), { lastOffset: m, lastStartLoc: g } = R, I = a(9, m, g);
576
+ return I.value = h.replace(ts, ns), p.nextToken(), o(I, p.currentOffset(), p.currentPosition()), I;
577
+ }
578
+ function E(p) {
579
+ const h = p.nextToken(), R = p.context(), { lastOffset: m, lastStartLoc: g } = R, I = a(8, m, g);
580
+ return h.type !== 11 ? (r(p, ne.UNEXPECTED_EMPTY_LINKED_MODIFIER, R.lastStartLoc, 0), I.value = "", o(I, m, g), {
581
+ nextConsumeToken: h,
582
+ node: I
583
+ }) : (h.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, R.lastStartLoc, 0, Ae(h)), I.value = h.value || "", o(I, p.currentOffset(), p.currentPosition()), {
584
+ node: I
585
+ });
586
+ }
587
+ function C(p, h) {
588
+ const R = p.context(), m = a(7, R.offset, R.startLoc);
589
+ return m.value = h, o(m, p.currentOffset(), p.currentPosition()), m;
590
+ }
591
+ function T(p) {
592
+ const h = p.context(), R = a(6, h.offset, h.startLoc);
593
+ let m = p.nextToken();
594
+ if (m.type === 8) {
595
+ const g = E(p);
596
+ R.modifier = g.node, m = g.nextConsumeToken || p.nextToken();
597
+ }
598
+ switch (m.type !== 9 && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(m)), m = p.nextToken(), m.type === 2 && (m = p.nextToken()), m.type) {
599
+ case 10:
600
+ m.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(m)), R.key = C(p, m.value || "");
601
+ break;
602
+ case 4:
603
+ m.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(m)), R.key = i(p, m.value || "");
604
+ break;
605
+ case 5:
606
+ m.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(m)), R.key = d(p, m.value || "");
607
+ break;
608
+ case 6:
609
+ m.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(m)), R.key = b(p, m.value || "");
610
+ break;
611
+ default: {
612
+ r(p, ne.UNEXPECTED_EMPTY_LINKED_KEY, h.lastStartLoc, 0);
613
+ const g = p.context(), I = a(7, g.offset, g.startLoc);
614
+ return I.value = "", o(I, g.offset, g.startLoc), R.key = I, o(R, g.offset, g.startLoc), {
615
+ nextConsumeToken: m,
616
+ node: R
617
+ };
618
+ }
619
+ }
620
+ return o(R, p.currentOffset(), p.currentPosition()), {
621
+ node: R
622
+ };
623
+ }
624
+ function w(p) {
625
+ const h = p.context(), R = h.currentType === 1 ? p.currentOffset() : h.offset, m = h.currentType === 1 ? h.endLoc : h.startLoc, g = a(2, R, m);
626
+ g.items = [];
627
+ let I = null;
628
+ do {
629
+ const S = I || p.nextToken();
630
+ switch (I = null, S.type) {
631
+ case 0:
632
+ S.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(S)), g.items.push(f(p, S.value || ""));
633
+ break;
634
+ case 5:
635
+ S.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(S)), g.items.push(d(p, S.value || ""));
636
+ break;
637
+ case 4:
638
+ S.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(S)), g.items.push(i(p, S.value || ""));
639
+ break;
640
+ case 6:
641
+ S.value == null && r(p, ne.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, Ae(S)), g.items.push(b(p, S.value || ""));
642
+ break;
643
+ case 7: {
644
+ const H = T(p);
645
+ g.items.push(H.node), I = H.nextConsumeToken || null;
646
+ break;
647
+ }
648
+ }
649
+ } while (h.currentType !== 13 && h.currentType !== 1);
650
+ const v = h.currentType === 1 ? h.lastOffset : p.currentOffset(), k = h.currentType === 1 ? h.lastEndLoc : p.currentPosition();
651
+ return o(g, v, k), g;
652
+ }
653
+ function A(p, h, R, m) {
654
+ const g = p.context();
655
+ let I = m.items.length === 0;
656
+ const v = a(1, h, R);
657
+ v.cases = [], v.cases.push(m);
658
+ do {
659
+ const k = w(p);
660
+ I || (I = k.items.length === 0), v.cases.push(k);
661
+ } while (g.currentType !== 13);
662
+ return I && r(p, ne.MUST_HAVE_MESSAGES_IN_PLURAL, R, 0), o(v, p.currentOffset(), p.currentPosition()), v;
663
+ }
664
+ function L(p) {
665
+ const h = p.context(), { offset: R, startLoc: m } = h, g = w(p);
666
+ return h.currentType === 13 ? g : A(p, R, m, g);
667
+ }
668
+ function M(p) {
669
+ const h = qr(p, ge({}, e)), R = h.context(), m = a(0, R.offset, R.startLoc);
670
+ return t && m.loc && (m.loc.source = p), m.body = L(h), e.onCacheKey && (m.cacheKey = e.onCacheKey(p)), R.currentType !== 13 && r(h, ne.UNEXPECTED_LEXICAL_ANALYSIS, R.lastStartLoc, 0, p[R.offset] || ""), o(m, h.currentOffset(), h.currentPosition()), m;
671
+ }
672
+ return { parse: M };
673
+ }
674
+ function Ae(e) {
675
+ if (e.type === 13)
676
+ return "EOF";
677
+ const t = (e.value || "").replace(/\r?\n/gu, "\\n");
678
+ return t.length > 10 ? t.slice(0, 9) + "…" : t;
679
+ }
680
+ function ss(e, t = {}) {
681
+ const n = {
682
+ ast: e,
683
+ helpers: /* @__PURE__ */ new Set()
684
+ };
685
+ return { context: () => n, helper: (o) => (n.helpers.add(o), o) };
686
+ }
687
+ function cn(e, t) {
688
+ for (let n = 0; n < e.length; n++)
689
+ $t(e[n], t);
690
+ }
691
+ function $t(e, t) {
692
+ switch (e.type) {
693
+ case 1:
694
+ cn(e.cases, t), t.helper(
695
+ "plural"
696
+ /* HelperNameMap.PLURAL */
697
+ );
698
+ break;
699
+ case 2:
700
+ cn(e.items, t);
701
+ break;
702
+ case 6: {
703
+ $t(e.key, t), t.helper(
704
+ "linked"
705
+ /* HelperNameMap.LINKED */
706
+ ), t.helper(
707
+ "type"
708
+ /* HelperNameMap.TYPE */
709
+ );
710
+ break;
711
+ }
712
+ case 5:
713
+ t.helper(
714
+ "interpolate"
715
+ /* HelperNameMap.INTERPOLATE */
716
+ ), t.helper(
717
+ "list"
718
+ /* HelperNameMap.LIST */
719
+ );
720
+ break;
721
+ case 4:
722
+ t.helper(
723
+ "interpolate"
724
+ /* HelperNameMap.INTERPOLATE */
725
+ ), t.helper(
726
+ "named"
727
+ /* HelperNameMap.NAMED */
728
+ );
729
+ break;
730
+ }
731
+ }
732
+ function as(e, t = {}) {
733
+ const n = ss(e);
734
+ n.helper(
735
+ "normalize"
736
+ /* HelperNameMap.NORMALIZE */
737
+ ), e.body && $t(e.body, n);
738
+ const r = n.context();
739
+ e.helpers = Array.from(r.helpers);
740
+ }
741
+ function os(e) {
742
+ const t = e.body;
743
+ return t.type === 2 ? un(t) : t.cases.forEach((n) => un(n)), e;
744
+ }
745
+ function un(e) {
746
+ if (e.items.length === 1) {
747
+ const t = e.items[0];
748
+ (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
749
+ } else {
750
+ const t = [];
751
+ for (let n = 0; n < e.items.length; n++) {
752
+ const r = e.items[n];
753
+ if (!(r.type === 3 || r.type === 9) || r.value == null)
754
+ break;
755
+ t.push(r.value);
756
+ }
757
+ if (t.length === e.items.length) {
758
+ e.static = Ht(t);
759
+ for (let n = 0; n < e.items.length; n++) {
760
+ const r = e.items[n];
761
+ (r.type === 3 || r.type === 9) && delete r.value;
762
+ }
763
+ }
764
+ }
765
+ }
766
+ function et(e) {
767
+ switch (e.t = e.type, e.type) {
768
+ case 0: {
769
+ const t = e;
770
+ et(t.body), t.b = t.body, delete t.body;
771
+ break;
772
+ }
773
+ case 1: {
774
+ const t = e, n = t.cases;
775
+ for (let r = 0; r < n.length; r++)
776
+ et(n[r]);
777
+ t.c = n, delete t.cases;
778
+ break;
779
+ }
780
+ case 2: {
781
+ const t = e, n = t.items;
782
+ for (let r = 0; r < n.length; r++)
783
+ et(n[r]);
784
+ t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
785
+ break;
786
+ }
787
+ case 3:
788
+ case 9:
789
+ case 8:
790
+ case 7: {
791
+ const t = e;
792
+ t.value && (t.v = t.value, delete t.value);
793
+ break;
794
+ }
795
+ case 6: {
796
+ const t = e;
797
+ et(t.key), t.k = t.key, delete t.key, t.modifier && (et(t.modifier), t.m = t.modifier, delete t.modifier);
798
+ break;
799
+ }
800
+ case 5: {
801
+ const t = e;
802
+ t.i = t.index, delete t.index;
803
+ break;
804
+ }
805
+ case 4: {
806
+ const t = e;
807
+ t.k = t.key, delete t.key;
808
+ break;
809
+ }
810
+ }
811
+ delete e.type;
812
+ }
813
+ function ls(e, t) {
814
+ const { filename: n, breakLineCode: r, needIndent: a } = t, o = t.location !== !1, f = {
815
+ filename: n,
816
+ code: "",
817
+ column: 1,
818
+ line: 1,
819
+ offset: 0,
820
+ map: void 0,
821
+ breakLineCode: r,
822
+ needIndent: a,
823
+ indentLevel: 0
824
+ };
825
+ o && e.loc && (f.source = e.loc.source);
826
+ const d = () => f;
827
+ function i(L, M) {
828
+ f.code += L;
829
+ }
830
+ function b(L, M = !0) {
831
+ const p = M ? r : "";
832
+ i(a ? p + " ".repeat(L) : p);
833
+ }
834
+ function E(L = !0) {
835
+ const M = ++f.indentLevel;
836
+ L && b(M);
837
+ }
838
+ function C(L = !0) {
839
+ const M = --f.indentLevel;
840
+ L && b(M);
841
+ }
842
+ function T() {
843
+ b(f.indentLevel);
844
+ }
845
+ return {
846
+ context: d,
847
+ push: i,
848
+ indent: E,
849
+ deindent: C,
850
+ newline: T,
851
+ helper: (L) => `_${L}`,
852
+ needIndent: () => f.needIndent
853
+ };
854
+ }
855
+ function is(e, t) {
856
+ const { helper: n } = e;
857
+ e.push(`${n(
858
+ "linked"
859
+ /* HelperNameMap.LINKED */
860
+ )}(`), at(e, t.key), t.modifier ? (e.push(", "), at(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
861
+ }
862
+ function cs(e, t) {
863
+ const { helper: n, needIndent: r } = e;
864
+ e.push(`${n(
865
+ "normalize"
866
+ /* HelperNameMap.NORMALIZE */
867
+ )}([`), e.indent(r());
868
+ const a = t.items.length;
869
+ for (let o = 0; o < a && (at(e, t.items[o]), o !== a - 1); o++)
870
+ e.push(", ");
871
+ e.deindent(r()), e.push("])");
872
+ }
873
+ function us(e, t) {
874
+ const { helper: n, needIndent: r } = e;
875
+ if (t.cases.length > 1) {
876
+ e.push(`${n(
877
+ "plural"
878
+ /* HelperNameMap.PLURAL */
879
+ )}([`), e.indent(r());
880
+ const a = t.cases.length;
881
+ for (let o = 0; o < a && (at(e, t.cases[o]), o !== a - 1); o++)
882
+ e.push(", ");
883
+ e.deindent(r()), e.push("])");
884
+ }
885
+ }
886
+ function ms(e, t) {
887
+ t.body ? at(e, t.body) : e.push("null");
888
+ }
889
+ function at(e, t) {
890
+ const { helper: n } = e;
891
+ switch (t.type) {
892
+ case 0:
893
+ ms(e, t);
894
+ break;
895
+ case 1:
896
+ us(e, t);
897
+ break;
898
+ case 2:
899
+ cs(e, t);
900
+ break;
901
+ case 6:
902
+ is(e, t);
903
+ break;
904
+ case 8:
905
+ e.push(JSON.stringify(t.value), t);
906
+ break;
907
+ case 7:
908
+ e.push(JSON.stringify(t.value), t);
909
+ break;
910
+ case 5:
911
+ e.push(`${n(
912
+ "interpolate"
913
+ /* HelperNameMap.INTERPOLATE */
914
+ )}(${n(
915
+ "list"
916
+ /* HelperNameMap.LIST */
917
+ )}(${t.index}))`, t);
918
+ break;
919
+ case 4:
920
+ e.push(`${n(
921
+ "interpolate"
922
+ /* HelperNameMap.INTERPOLATE */
923
+ )}(${n(
924
+ "named"
925
+ /* HelperNameMap.NAMED */
926
+ )}(${JSON.stringify(t.key)}))`, t);
927
+ break;
928
+ case 9:
929
+ e.push(JSON.stringify(t.value), t);
930
+ break;
931
+ case 3:
932
+ e.push(JSON.stringify(t.value), t);
933
+ break;
934
+ }
935
+ }
936
+ const ds = (e, t = {}) => {
937
+ const n = G(t.mode) ? t.mode : "normal", r = G(t.filename) ? t.filename : "message.intl";
938
+ t.sourceMap;
939
+ const a = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
940
+ `, o = t.needIndent ? t.needIndent : n !== "arrow", f = e.helpers || [], d = ls(e, {
941
+ filename: r,
942
+ breakLineCode: a,
943
+ needIndent: o
944
+ });
945
+ d.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), d.indent(o), f.length > 0 && (d.push(`const { ${Ht(f.map((E) => `${E}: _${E}`), ", ")} } = ctx`), d.newline()), d.push("return "), at(d, e), d.deindent(o), d.push("}"), delete e.helpers;
946
+ const { code: i, map: b } = d.context();
947
+ return {
948
+ ast: e,
949
+ code: i,
950
+ map: b ? b.toJSON() : void 0
951
+ // eslint-disable-line @typescript-eslint/no-explicit-any
952
+ };
953
+ };
954
+ function fs(e, t = {}) {
955
+ const n = ge({}, t), r = !!n.jit, a = !!n.minify, o = n.optimize == null ? !0 : n.optimize, d = rs(n).parse(e);
956
+ return r ? (o && os(d), a && et(d), { ast: d, code: "" }) : (as(d, n), ds(d, n));
957
+ }
958
+ var _s = { env: { NODE_ENV: "production" } };
959
+ function ps() {
960
+ typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Je().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Je().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
961
+ }
962
+ function St(e) {
963
+ return (n) => vs(n, e);
964
+ }
965
+ function vs(e, t) {
966
+ const n = bs(t);
967
+ if (n == null)
968
+ throw ct(
969
+ 0
970
+ /* NodeTypes.Resource */
971
+ );
972
+ if (Jt(n) === 1) {
973
+ const o = ys(n);
974
+ return e.plural(o.reduce((f, d) => [
975
+ ...f,
976
+ mn(e, d)
977
+ ], []));
978
+ } else
979
+ return mn(e, n);
980
+ }
981
+ const hs = ["b", "body"];
982
+ function bs(e) {
983
+ return Xe(e, hs);
984
+ }
985
+ const gs = ["c", "cases"];
986
+ function ys(e) {
987
+ return Xe(e, gs, []);
988
+ }
989
+ function mn(e, t) {
990
+ const n = Es(t);
991
+ if (n != null)
992
+ return e.type === "text" ? n : e.normalize([n]);
993
+ {
994
+ const r = Cs(t).reduce((a, o) => [...a, Ft(e, o)], []);
995
+ return e.normalize(r);
996
+ }
997
+ }
998
+ const Is = ["s", "static"];
999
+ function Es(e) {
1000
+ return Xe(e, Is);
1001
+ }
1002
+ const Ns = ["i", "items"];
1003
+ function Cs(e) {
1004
+ return Xe(e, Ns, []);
1005
+ }
1006
+ function Ft(e, t) {
1007
+ const n = Jt(t);
1008
+ switch (n) {
1009
+ case 3:
1010
+ return _t(t, n);
1011
+ case 9:
1012
+ return _t(t, n);
1013
+ case 4: {
1014
+ const r = t;
1015
+ if (Se(r, "k") && r.k)
1016
+ return e.interpolate(e.named(r.k));
1017
+ if (Se(r, "key") && r.key)
1018
+ return e.interpolate(e.named(r.key));
1019
+ throw ct(n);
1020
+ }
1021
+ case 5: {
1022
+ const r = t;
1023
+ if (Se(r, "i") && be(r.i))
1024
+ return e.interpolate(e.list(r.i));
1025
+ if (Se(r, "index") && be(r.index))
1026
+ return e.interpolate(e.list(r.index));
1027
+ throw ct(n);
1028
+ }
1029
+ case 6: {
1030
+ const r = t, a = Ss(r), o = ks(r);
1031
+ return e.linked(Ft(e, o), a ? Ft(e, a) : void 0, e.type);
1032
+ }
1033
+ case 7:
1034
+ return _t(t, n);
1035
+ case 8:
1036
+ return _t(t, n);
1037
+ default:
1038
+ throw new Error(`unhandled node on format message part: ${n}`);
1039
+ }
1040
+ }
1041
+ const Ts = ["t", "type"];
1042
+ function Jt(e) {
1043
+ return Xe(e, Ts);
1044
+ }
1045
+ const Os = ["v", "value"];
1046
+ function _t(e, t) {
1047
+ const n = Xe(e, Os);
1048
+ if (n)
1049
+ return n;
1050
+ throw ct(t);
1051
+ }
1052
+ const Rs = ["m", "modifier"];
1053
+ function Ss(e) {
1054
+ return Xe(e, Rs);
1055
+ }
1056
+ const Ls = ["k", "key"];
1057
+ function ks(e) {
1058
+ const t = Xe(e, Ls);
1059
+ if (t)
1060
+ return t;
1061
+ throw ct(
1062
+ 6
1063
+ /* NodeTypes.Linked */
1064
+ );
1065
+ }
1066
+ function Xe(e, t, n) {
1067
+ for (let r = 0; r < t.length; r++) {
1068
+ const a = t[r];
1069
+ if (Se(e, a) && e[a] != null)
1070
+ return e[a];
1071
+ }
1072
+ return n;
1073
+ }
1074
+ function ct(e) {
1075
+ return new Error(`unhandled node type: ${e}`);
1076
+ }
1077
+ const As = (e) => e;
1078
+ let pt = se();
1079
+ function ot(e) {
1080
+ return ee(e) && Jt(e) === 0 && (Se(e, "b") || Se(e, "body"));
1081
+ }
1082
+ function Ms(e, t = {}) {
1083
+ let n = !1;
1084
+ const r = t.onError || Xr;
1085
+ return t.onError = (a) => {
1086
+ n = !0, r(a);
1087
+ }, { ...fs(e, t), detectError: n };
1088
+ }
1089
+ // @__NO_SIDE_EFFECTS__
1090
+ function ws(e, t) {
1091
+ if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && G(e)) {
1092
+ _e(t.warnHtmlMessage) && t.warnHtmlMessage;
1093
+ const r = (t.onCacheKey || As)(e), a = pt[r];
1094
+ if (a)
1095
+ return a;
1096
+ const { ast: o, detectError: f } = Ms(e, {
1097
+ ...t,
1098
+ location: _s.env.NODE_ENV !== "production",
1099
+ jit: !0
1100
+ }), d = St(o);
1101
+ return f ? d : pt[r] = d;
1102
+ } else {
1103
+ const n = e.cacheKey;
1104
+ if (n) {
1105
+ const r = pt[n];
1106
+ return r || (pt[n] = St(e));
1107
+ } else
1108
+ return St(e);
1109
+ }
1110
+ }
1111
+ let ut = null;
1112
+ function Ds(e) {
1113
+ ut = e;
1114
+ }
1115
+ function Fs(e, t, n) {
1116
+ ut && ut.emit("i18n:init", {
1117
+ timestamp: Date.now(),
1118
+ i18n: e,
1119
+ version: t,
1120
+ meta: n
1121
+ });
1122
+ }
1123
+ const Ps = /* @__PURE__ */ js("function:translate");
1124
+ function js(e) {
1125
+ return (t) => ut && ut.emit(e, t);
1126
+ }
1127
+ const Ue = {
1128
+ INVALID_ARGUMENT: Br,
1129
+ // 17
1130
+ INVALID_DATE_ARGUMENT: 18,
1131
+ INVALID_ISO_DATE_ARGUMENT: 19,
1132
+ NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1133
+ NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1134
+ NOT_SUPPORT_LOCALE_TYPE: 23
1135
+ }, Us = 24;
1136
+ function xe(e) {
1137
+ return Ct(e, null, void 0);
1138
+ }
1139
+ function Kt(e, t) {
1140
+ return t.locale != null ? dn(t.locale) : dn(e.locale);
1141
+ }
1142
+ let Lt;
1143
+ function dn(e) {
1144
+ if (G(e))
1145
+ return e;
1146
+ if (ue(e)) {
1147
+ if (e.resolvedOnce && Lt != null)
1148
+ return Lt;
1149
+ if (e.constructor.name === "Function") {
1150
+ const t = e();
1151
+ if (Gr(t))
1152
+ throw xe(Ue.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1153
+ return Lt = t;
1154
+ } else
1155
+ throw xe(Ue.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1156
+ } else
1157
+ throw xe(Ue.NOT_SUPPORT_LOCALE_TYPE);
1158
+ }
1159
+ function xs(e, t, n) {
1160
+ return [.../* @__PURE__ */ new Set([
1161
+ n,
1162
+ ...pe(t) ? t : ee(t) ? Object.keys(t) : G(t) ? [t] : [n]
1163
+ ])];
1164
+ }
1165
+ function Hn(e, t, n) {
1166
+ const r = G(n) ? n : Et, a = e;
1167
+ a.__localeChainCache || (a.__localeChainCache = /* @__PURE__ */ new Map());
1168
+ let o = a.__localeChainCache.get(r);
1169
+ if (!o) {
1170
+ o = [];
1171
+ let f = [n];
1172
+ for (; pe(f); )
1173
+ f = fn(o, f, t);
1174
+ const d = pe(t) || !q(t) ? t : t.default ? t.default : null;
1175
+ f = G(d) ? [d] : d, pe(f) && fn(o, f, !1), a.__localeChainCache.set(r, o);
1176
+ }
1177
+ return o;
1178
+ }
1179
+ function fn(e, t, n) {
1180
+ let r = !0;
1181
+ for (let a = 0; a < t.length && _e(r); a++) {
1182
+ const o = t[a];
1183
+ G(o) && (r = Vs(e, t[a], n));
1184
+ }
1185
+ return r;
1186
+ }
1187
+ function Vs(e, t, n) {
1188
+ let r;
1189
+ const a = t.split("-");
1190
+ do {
1191
+ const o = a.join("-");
1192
+ r = Gs(e, o, n), a.splice(-1, 1);
1193
+ } while (a.length && r === !0);
1194
+ return r;
1195
+ }
1196
+ function Gs(e, t, n) {
1197
+ let r = !1;
1198
+ if (!e.includes(t) && (r = !0, t)) {
1199
+ r = t[t.length - 1] !== "!";
1200
+ const a = t.replace(/!/g, "");
1201
+ e.push(a), (pe(n) || q(n)) && n[a] && (r = n[a]);
1202
+ }
1203
+ return r;
1204
+ }
1205
+ const He = [];
1206
+ He[
1207
+ 0
1208
+ /* States.BEFORE_PATH */
1209
+ ] = {
1210
+ w: [
1211
+ 0
1212
+ /* States.BEFORE_PATH */
1213
+ ],
1214
+ i: [
1215
+ 3,
1216
+ 0
1217
+ /* Actions.APPEND */
1218
+ ],
1219
+ "[": [
1220
+ 4
1221
+ /* States.IN_SUB_PATH */
1222
+ ],
1223
+ o: [
1224
+ 7
1225
+ /* States.AFTER_PATH */
1226
+ ]
1227
+ };
1228
+ He[
1229
+ 1
1230
+ /* States.IN_PATH */
1231
+ ] = {
1232
+ w: [
1233
+ 1
1234
+ /* States.IN_PATH */
1235
+ ],
1236
+ ".": [
1237
+ 2
1238
+ /* States.BEFORE_IDENT */
1239
+ ],
1240
+ "[": [
1241
+ 4
1242
+ /* States.IN_SUB_PATH */
1243
+ ],
1244
+ o: [
1245
+ 7
1246
+ /* States.AFTER_PATH */
1247
+ ]
1248
+ };
1249
+ He[
1250
+ 2
1251
+ /* States.BEFORE_IDENT */
1252
+ ] = {
1253
+ w: [
1254
+ 2
1255
+ /* States.BEFORE_IDENT */
1256
+ ],
1257
+ i: [
1258
+ 3,
1259
+ 0
1260
+ /* Actions.APPEND */
1261
+ ],
1262
+ 0: [
1263
+ 3,
1264
+ 0
1265
+ /* Actions.APPEND */
1266
+ ]
1267
+ };
1268
+ He[
1269
+ 3
1270
+ /* States.IN_IDENT */
1271
+ ] = {
1272
+ i: [
1273
+ 3,
1274
+ 0
1275
+ /* Actions.APPEND */
1276
+ ],
1277
+ 0: [
1278
+ 3,
1279
+ 0
1280
+ /* Actions.APPEND */
1281
+ ],
1282
+ w: [
1283
+ 1,
1284
+ 1
1285
+ /* Actions.PUSH */
1286
+ ],
1287
+ ".": [
1288
+ 2,
1289
+ 1
1290
+ /* Actions.PUSH */
1291
+ ],
1292
+ "[": [
1293
+ 4,
1294
+ 1
1295
+ /* Actions.PUSH */
1296
+ ],
1297
+ o: [
1298
+ 7,
1299
+ 1
1300
+ /* Actions.PUSH */
1301
+ ]
1302
+ };
1303
+ He[
1304
+ 4
1305
+ /* States.IN_SUB_PATH */
1306
+ ] = {
1307
+ "'": [
1308
+ 5,
1309
+ 0
1310
+ /* Actions.APPEND */
1311
+ ],
1312
+ '"': [
1313
+ 6,
1314
+ 0
1315
+ /* Actions.APPEND */
1316
+ ],
1317
+ "[": [
1318
+ 4,
1319
+ 2
1320
+ /* Actions.INC_SUB_PATH_DEPTH */
1321
+ ],
1322
+ "]": [
1323
+ 1,
1324
+ 3
1325
+ /* Actions.PUSH_SUB_PATH */
1326
+ ],
1327
+ o: 8,
1328
+ l: [
1329
+ 4,
1330
+ 0
1331
+ /* Actions.APPEND */
1332
+ ]
1333
+ };
1334
+ He[
1335
+ 5
1336
+ /* States.IN_SINGLE_QUOTE */
1337
+ ] = {
1338
+ "'": [
1339
+ 4,
1340
+ 0
1341
+ /* Actions.APPEND */
1342
+ ],
1343
+ o: 8,
1344
+ l: [
1345
+ 5,
1346
+ 0
1347
+ /* Actions.APPEND */
1348
+ ]
1349
+ };
1350
+ He[
1351
+ 6
1352
+ /* States.IN_DOUBLE_QUOTE */
1353
+ ] = {
1354
+ '"': [
1355
+ 4,
1356
+ 0
1357
+ /* Actions.APPEND */
1358
+ ],
1359
+ o: 8,
1360
+ l: [
1361
+ 6,
1362
+ 0
1363
+ /* Actions.APPEND */
1364
+ ]
1365
+ };
1366
+ const Ws = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1367
+ function Zs(e) {
1368
+ return Ws.test(e);
1369
+ }
1370
+ function Ys(e) {
1371
+ const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1372
+ return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1373
+ }
1374
+ function Bs(e) {
1375
+ if (e == null)
1376
+ return "o";
1377
+ switch (e.charCodeAt(0)) {
1378
+ case 91:
1379
+ case 93:
1380
+ case 46:
1381
+ case 34:
1382
+ case 39:
1383
+ return e;
1384
+ case 95:
1385
+ case 36:
1386
+ case 45:
1387
+ return "i";
1388
+ case 9:
1389
+ case 10:
1390
+ case 13:
1391
+ case 160:
1392
+ case 65279:
1393
+ case 8232:
1394
+ case 8233:
1395
+ return "w";
1396
+ }
1397
+ return "i";
1398
+ }
1399
+ function Xs(e) {
1400
+ const t = e.trim();
1401
+ return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Zs(t) ? Ys(t) : "*" + t;
1402
+ }
1403
+ function Hs(e) {
1404
+ const t = [];
1405
+ let n = -1, r = 0, a = 0, o, f, d, i, b, E, C;
1406
+ const T = [];
1407
+ T[
1408
+ 0
1409
+ /* Actions.APPEND */
1410
+ ] = () => {
1411
+ f === void 0 ? f = d : f += d;
1412
+ }, T[
1413
+ 1
1414
+ /* Actions.PUSH */
1415
+ ] = () => {
1416
+ f !== void 0 && (t.push(f), f = void 0);
1417
+ }, T[
1418
+ 2
1419
+ /* Actions.INC_SUB_PATH_DEPTH */
1420
+ ] = () => {
1421
+ T[
1422
+ 0
1423
+ /* Actions.APPEND */
1424
+ ](), a++;
1425
+ }, T[
1426
+ 3
1427
+ /* Actions.PUSH_SUB_PATH */
1428
+ ] = () => {
1429
+ if (a > 0)
1430
+ a--, r = 4, T[
1431
+ 0
1432
+ /* Actions.APPEND */
1433
+ ]();
1434
+ else {
1435
+ if (a = 0, f === void 0 || (f = Xs(f), f === !1))
1436
+ return !1;
1437
+ T[
1438
+ 1
1439
+ /* Actions.PUSH */
1440
+ ]();
1441
+ }
1442
+ };
1443
+ function w() {
1444
+ const A = e[n + 1];
1445
+ if (r === 5 && A === "'" || r === 6 && A === '"')
1446
+ return n++, d = "\\" + A, T[
1447
+ 0
1448
+ /* Actions.APPEND */
1449
+ ](), !0;
1450
+ }
1451
+ for (; r !== null; )
1452
+ if (n++, o = e[n], !(o === "\\" && w())) {
1453
+ if (i = Bs(o), C = He[r], b = C[i] || C.l || 8, b === 8 || (r = b[0], b[1] !== void 0 && (E = T[b[1]], E && (d = o, E() === !1))))
1454
+ return;
1455
+ if (r === 7)
1456
+ return t;
1457
+ }
1458
+ }
1459
+ const _n = /* @__PURE__ */ new Map();
1460
+ function $s(e, t) {
1461
+ return ee(e) ? e[t] : null;
1462
+ }
1463
+ function Js(e, t) {
1464
+ if (!ee(e))
1465
+ return null;
1466
+ let n = _n.get(t);
1467
+ if (n || (n = Hs(t), n && _n.set(t, n)), !n)
1468
+ return null;
1469
+ const r = n.length;
1470
+ let a = e, o = 0;
1471
+ for (; o < r; ) {
1472
+ const f = a[n[o]];
1473
+ if (f === void 0 || ue(a))
1474
+ return null;
1475
+ a = f, o++;
1476
+ }
1477
+ return a;
1478
+ }
1479
+ const Ks = "10.0.5", Tt = -1, Et = "en-US", pn = "", vn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1480
+ function zs() {
1481
+ return {
1482
+ upper: (e, t) => t === "text" && G(e) ? e.toUpperCase() : t === "vnode" && ee(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1483
+ lower: (e, t) => t === "text" && G(e) ? e.toLowerCase() : t === "vnode" && ee(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1484
+ capitalize: (e, t) => t === "text" && G(e) ? vn(e) : t === "vnode" && ee(e) && "__v_isVNode" in e ? vn(e.children) : e
1485
+ };
1486
+ }
1487
+ let $n;
1488
+ function Qs(e) {
1489
+ $n = e;
1490
+ }
1491
+ let Jn;
1492
+ function qs(e) {
1493
+ Jn = e;
1494
+ }
1495
+ let Kn;
1496
+ function ea(e) {
1497
+ Kn = e;
1498
+ }
1499
+ let zn = null;
1500
+ const ta = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1501
+ zn = e;
1502
+ }, na = /* @__NO_SIDE_EFFECTS__ */ () => zn;
1503
+ let Qn = null;
1504
+ const hn = (e) => {
1505
+ Qn = e;
1506
+ }, ra = () => Qn;
1507
+ let bn = 0;
1508
+ function sa(e = {}) {
1509
+ const t = ue(e.onWarn) ? e.onWarn : Zr, n = G(e.version) ? e.version : Ks, r = G(e.locale) || ue(e.locale) ? e.locale : Et, a = ue(r) ? Et : r, o = pe(e.fallbackLocale) || q(e.fallbackLocale) || G(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : a, f = q(e.messages) ? e.messages : kt(a), d = q(e.datetimeFormats) ? e.datetimeFormats : kt(a), i = q(e.numberFormats) ? e.numberFormats : kt(a), b = ge(se(), e.modifiers, zs()), E = e.pluralRules || se(), C = ue(e.missing) ? e.missing : null, T = _e(e.missingWarn) || It(e.missingWarn) ? e.missingWarn : !0, w = _e(e.fallbackWarn) || It(e.fallbackWarn) ? e.fallbackWarn : !0, A = !!e.fallbackFormat, L = !!e.unresolving, M = ue(e.postTranslation) ? e.postTranslation : null, p = q(e.processor) ? e.processor : null, h = _e(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, R = !!e.escapeParameter, m = ue(e.messageCompiler) ? e.messageCompiler : $n, g = ue(e.messageResolver) ? e.messageResolver : Jn || $s, I = ue(e.localeFallbacker) ? e.localeFallbacker : Kn || xs, v = ee(e.fallbackContext) ? e.fallbackContext : void 0, k = e, S = ee(k.__datetimeFormatters) ? k.__datetimeFormatters : /* @__PURE__ */ new Map(), H = ee(k.__numberFormatters) ? k.__numberFormatters : /* @__PURE__ */ new Map(), x = ee(k.__meta) ? k.__meta : {};
1510
+ bn++;
1511
+ const _ = {
1512
+ version: n,
1513
+ cid: bn,
1514
+ locale: r,
1515
+ fallbackLocale: o,
1516
+ messages: f,
1517
+ modifiers: b,
1518
+ pluralRules: E,
1519
+ missing: C,
1520
+ missingWarn: T,
1521
+ fallbackWarn: w,
1522
+ fallbackFormat: A,
1523
+ unresolving: L,
1524
+ postTranslation: M,
1525
+ processor: p,
1526
+ warnHtmlMessage: h,
1527
+ escapeParameter: R,
1528
+ messageCompiler: m,
1529
+ messageResolver: g,
1530
+ localeFallbacker: I,
1531
+ fallbackContext: v,
1532
+ onWarn: t,
1533
+ __meta: x
1534
+ };
1535
+ return _.datetimeFormats = d, _.numberFormats = i, _.__datetimeFormatters = S, _.__numberFormatters = H, __INTLIFY_PROD_DEVTOOLS__ && Fs(_, n, x), _;
1536
+ }
1537
+ const kt = (e) => ({ [e]: se() });
1538
+ function zt(e, t, n, r, a) {
1539
+ const { missing: o, onWarn: f } = e;
1540
+ if (o !== null) {
1541
+ const d = o(e, n, t, a);
1542
+ return G(d) ? d : t;
1543
+ } else
1544
+ return t;
1545
+ }
1546
+ function it(e, t, n) {
1547
+ const r = e;
1548
+ r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1549
+ }
1550
+ function aa(e, t) {
1551
+ return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1552
+ }
1553
+ function oa(e, t) {
1554
+ const n = t.indexOf(e);
1555
+ if (n === -1)
1556
+ return !1;
1557
+ for (let r = n + 1; r < t.length; r++)
1558
+ if (aa(e, t[r]))
1559
+ return !0;
1560
+ return !1;
1561
+ }
1562
+ function gn(e, ...t) {
1563
+ const { datetimeFormats: n, unresolving: r, fallbackLocale: a, onWarn: o, localeFallbacker: f } = e, { __datetimeFormatters: d } = e, [i, b, E, C] = Pt(...t), T = _e(E.missingWarn) ? E.missingWarn : e.missingWarn;
1564
+ _e(E.fallbackWarn) ? E.fallbackWarn : e.fallbackWarn;
1565
+ const w = !!E.part, A = Kt(e, E), L = f(
1566
+ e,
1567
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1568
+ a,
1569
+ A
1570
+ );
1571
+ if (!G(i) || i === "")
1572
+ return new Intl.DateTimeFormat(A, C).format(b);
1573
+ let M = {}, p, h = null;
1574
+ const R = "datetime format";
1575
+ for (let I = 0; I < L.length && (p = L[I], M = n[p] || {}, h = M[i], !q(h)); I++)
1576
+ zt(e, i, p, T, R);
1577
+ if (!q(h) || !G(p))
1578
+ return r ? Tt : i;
1579
+ let m = `${p}__${i}`;
1580
+ Nt(C) || (m = `${m}__${JSON.stringify(C)}`);
1581
+ let g = d.get(m);
1582
+ return g || (g = new Intl.DateTimeFormat(p, ge({}, h, C)), d.set(m, g)), w ? g.formatToParts(b) : g.format(b);
1583
+ }
1584
+ const qn = [
1585
+ "localeMatcher",
1586
+ "weekday",
1587
+ "era",
1588
+ "year",
1589
+ "month",
1590
+ "day",
1591
+ "hour",
1592
+ "minute",
1593
+ "second",
1594
+ "timeZoneName",
1595
+ "formatMatcher",
1596
+ "hour12",
1597
+ "timeZone",
1598
+ "dateStyle",
1599
+ "timeStyle",
1600
+ "calendar",
1601
+ "dayPeriod",
1602
+ "numberingSystem",
1603
+ "hourCycle",
1604
+ "fractionalSecondDigits"
1605
+ ];
1606
+ function Pt(...e) {
1607
+ const [t, n, r, a] = e, o = se();
1608
+ let f = se(), d;
1609
+ if (G(t)) {
1610
+ const i = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1611
+ if (!i)
1612
+ throw xe(Ue.INVALID_ISO_DATE_ARGUMENT);
1613
+ const b = i[3] ? i[3].trim().startsWith("T") ? `${i[1].trim()}${i[3].trim()}` : `${i[1].trim()}T${i[3].trim()}` : i[1].trim();
1614
+ d = new Date(b);
1615
+ try {
1616
+ d.toISOString();
1617
+ } catch {
1618
+ throw xe(Ue.INVALID_ISO_DATE_ARGUMENT);
1619
+ }
1620
+ } else if (Ur(t)) {
1621
+ if (isNaN(t.getTime()))
1622
+ throw xe(Ue.INVALID_DATE_ARGUMENT);
1623
+ d = t;
1624
+ } else if (be(t))
1625
+ d = t;
1626
+ else
1627
+ throw xe(Ue.INVALID_ARGUMENT);
1628
+ return G(n) ? o.key = n : q(n) && Object.keys(n).forEach((i) => {
1629
+ qn.includes(i) ? f[i] = n[i] : o[i] = n[i];
1630
+ }), G(r) ? o.locale = r : q(r) && (f = r), q(a) && (f = a), [o.key || "", d, o, f];
1631
+ }
1632
+ function yn(e, t, n) {
1633
+ const r = e;
1634
+ for (const a in n) {
1635
+ const o = `${t}__${a}`;
1636
+ r.__datetimeFormatters.has(o) && r.__datetimeFormatters.delete(o);
1637
+ }
1638
+ }
1639
+ function In(e, ...t) {
1640
+ const { numberFormats: n, unresolving: r, fallbackLocale: a, onWarn: o, localeFallbacker: f } = e, { __numberFormatters: d } = e, [i, b, E, C] = jt(...t), T = _e(E.missingWarn) ? E.missingWarn : e.missingWarn;
1641
+ _e(E.fallbackWarn) ? E.fallbackWarn : e.fallbackWarn;
1642
+ const w = !!E.part, A = Kt(e, E), L = f(
1643
+ e,
1644
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1645
+ a,
1646
+ A
1647
+ );
1648
+ if (!G(i) || i === "")
1649
+ return new Intl.NumberFormat(A, C).format(b);
1650
+ let M = {}, p, h = null;
1651
+ const R = "number format";
1652
+ for (let I = 0; I < L.length && (p = L[I], M = n[p] || {}, h = M[i], !q(h)); I++)
1653
+ zt(e, i, p, T, R);
1654
+ if (!q(h) || !G(p))
1655
+ return r ? Tt : i;
1656
+ let m = `${p}__${i}`;
1657
+ Nt(C) || (m = `${m}__${JSON.stringify(C)}`);
1658
+ let g = d.get(m);
1659
+ return g || (g = new Intl.NumberFormat(p, ge({}, h, C)), d.set(m, g)), w ? g.formatToParts(b) : g.format(b);
1660
+ }
1661
+ const er = [
1662
+ "localeMatcher",
1663
+ "style",
1664
+ "currency",
1665
+ "currencyDisplay",
1666
+ "currencySign",
1667
+ "useGrouping",
1668
+ "minimumIntegerDigits",
1669
+ "minimumFractionDigits",
1670
+ "maximumFractionDigits",
1671
+ "minimumSignificantDigits",
1672
+ "maximumSignificantDigits",
1673
+ "compactDisplay",
1674
+ "notation",
1675
+ "signDisplay",
1676
+ "unit",
1677
+ "unitDisplay",
1678
+ "roundingMode",
1679
+ "roundingPriority",
1680
+ "roundingIncrement",
1681
+ "trailingZeroDisplay"
1682
+ ];
1683
+ function jt(...e) {
1684
+ const [t, n, r, a] = e, o = se();
1685
+ let f = se();
1686
+ if (!be(t))
1687
+ throw xe(Ue.INVALID_ARGUMENT);
1688
+ const d = t;
1689
+ return G(n) ? o.key = n : q(n) && Object.keys(n).forEach((i) => {
1690
+ er.includes(i) ? f[i] = n[i] : o[i] = n[i];
1691
+ }), G(r) ? o.locale = r : q(r) && (f = r), q(a) && (f = a), [o.key || "", d, o, f];
1692
+ }
1693
+ function En(e, t, n) {
1694
+ const r = e;
1695
+ for (const a in n) {
1696
+ const o = `${t}__${a}`;
1697
+ r.__numberFormatters.has(o) && r.__numberFormatters.delete(o);
1698
+ }
1699
+ }
1700
+ const la = (e) => e, ia = (e) => "", ca = "text", ua = (e) => e.length === 0 ? "" : Ht(e), ma = Wr;
1701
+ function Nn(e, t) {
1702
+ return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1703
+ }
1704
+ function da(e) {
1705
+ const t = be(e.pluralIndex) ? e.pluralIndex : -1;
1706
+ return e.named && (be(e.named.count) || be(e.named.n)) ? be(e.named.count) ? e.named.count : be(e.named.n) ? e.named.n : t : t;
1707
+ }
1708
+ function fa(e, t) {
1709
+ t.count || (t.count = e), t.n || (t.n = e);
1710
+ }
1711
+ function _a(e = {}) {
1712
+ const t = e.locale, n = da(e), r = ee(e.pluralRules) && G(t) && ue(e.pluralRules[t]) ? e.pluralRules[t] : Nn, a = ee(e.pluralRules) && G(t) && ue(e.pluralRules[t]) ? Nn : void 0, o = (p) => p[r(n, p.length, a)], f = e.list || [], d = (p) => f[p], i = e.named || se();
1713
+ be(e.pluralIndex) && fa(n, i);
1714
+ const b = (p) => i[p];
1715
+ function E(p, h) {
1716
+ const R = ue(e.messages) ? e.messages(p, !!h) : ee(e.messages) ? e.messages[p] : !1;
1717
+ return R || (e.parent ? e.parent.message(p) : ia);
1718
+ }
1719
+ const C = (p) => e.modifiers ? e.modifiers[p] : la, T = q(e.processor) && ue(e.processor.normalize) ? e.processor.normalize : ua, w = q(e.processor) && ue(e.processor.interpolate) ? e.processor.interpolate : ma, A = q(e.processor) && G(e.processor.type) ? e.processor.type : ca, M = {
1720
+ list: d,
1721
+ named: b,
1722
+ plural: o,
1723
+ linked: (p, ...h) => {
1724
+ const [R, m] = h;
1725
+ let g = "text", I = "";
1726
+ h.length === 1 ? ee(R) ? (I = R.modifier || I, g = R.type || g) : G(R) && (I = R || I) : h.length === 2 && (G(R) && (I = R || I), G(m) && (g = m || g));
1727
+ const v = E(p, !0)(M), k = (
1728
+ // The message in vnode resolved with linked are returned as an array by processor.nomalize
1729
+ g === "vnode" && pe(v) && I ? v[0] : v
1730
+ );
1731
+ return I ? C(I)(k, g) : k;
1732
+ },
1733
+ message: E,
1734
+ type: A,
1735
+ interpolate: w,
1736
+ normalize: T,
1737
+ values: ge(se(), f, i)
1738
+ };
1739
+ return M;
1740
+ }
1741
+ const Cn = () => "", Te = (e) => ue(e);
1742
+ function Tn(e, ...t) {
1743
+ const { fallbackFormat: n, postTranslation: r, unresolving: a, messageCompiler: o, fallbackLocale: f, messages: d } = e, [i, b] = Ut(...t), E = _e(b.missingWarn) ? b.missingWarn : e.missingWarn, C = _e(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn, T = _e(b.escapeParameter) ? b.escapeParameter : e.escapeParameter, w = !!b.resolvedMessage, A = G(b.default) || _e(b.default) ? _e(b.default) ? o ? i : () => i : b.default : n ? o ? i : () => i : null, L = n || A != null && (G(A) || ue(A)), M = Kt(e, b);
1744
+ T && pa(b);
1745
+ let [p, h, R] = w ? [
1746
+ i,
1747
+ M,
1748
+ d[M] || se()
1749
+ ] : tr(e, i, M, f, C, E), m = p, g = i;
1750
+ if (!w && !(G(m) || ot(m) || Te(m)) && L && (m = A, g = m), !w && (!(G(m) || ot(m) || Te(m)) || !G(h)))
1751
+ return a ? Tt : i;
1752
+ let I = !1;
1753
+ const v = () => {
1754
+ I = !0;
1755
+ }, k = Te(m) ? m : nr(e, i, h, m, g, v);
1756
+ if (I)
1757
+ return m;
1758
+ const S = ba(e, h, R, b), H = _a(S), x = va(e, k, H), _ = r ? r(x, i) : x;
1759
+ if (__INTLIFY_PROD_DEVTOOLS__) {
1760
+ const O = {
1761
+ timestamp: Date.now(),
1762
+ key: G(i) ? i : Te(m) ? m.key : "",
1763
+ locale: h || (Te(m) ? m.locale : ""),
1764
+ format: G(m) ? m : Te(m) ? m.source : "",
1765
+ message: _
1766
+ };
1767
+ O.meta = ge({}, e.__meta, /* @__PURE__ */ na() || {}), Ps(O);
1768
+ }
1769
+ return _;
1770
+ }
1771
+ function pa(e) {
1772
+ pe(e.list) ? e.list = e.list.map((t) => G(t) ? on(t) : t) : ee(e.named) && Object.keys(e.named).forEach((t) => {
1773
+ G(e.named[t]) && (e.named[t] = on(e.named[t]));
1774
+ });
1775
+ }
1776
+ function tr(e, t, n, r, a, o) {
1777
+ const { messages: f, onWarn: d, messageResolver: i, localeFallbacker: b } = e, E = b(e, r, n);
1778
+ let C = se(), T, w = null;
1779
+ const A = "translate";
1780
+ for (let L = 0; L < E.length && (T = E[L], C = f[T] || se(), (w = i(C, t)) === null && (w = C[t]), !(G(w) || ot(w) || Te(w))); L++)
1781
+ if (!oa(T, E)) {
1782
+ const M = zt(
1783
+ e,
1784
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1785
+ t,
1786
+ T,
1787
+ o,
1788
+ A
1789
+ );
1790
+ M !== t && (w = M);
1791
+ }
1792
+ return [w, T, C];
1793
+ }
1794
+ function nr(e, t, n, r, a, o) {
1795
+ const { messageCompiler: f, warnHtmlMessage: d } = e;
1796
+ if (Te(r)) {
1797
+ const b = r;
1798
+ return b.locale = b.locale || n, b.key = b.key || t, b;
1799
+ }
1800
+ if (f == null) {
1801
+ const b = () => r;
1802
+ return b.locale = n, b.key = t, b;
1803
+ }
1804
+ const i = f(r, ha(e, n, a, r, d, o));
1805
+ return i.locale = n, i.key = t, i.source = r, i;
1806
+ }
1807
+ function va(e, t, n) {
1808
+ return t(n);
1809
+ }
1810
+ function Ut(...e) {
1811
+ const [t, n, r] = e, a = se();
1812
+ if (!G(t) && !be(t) && !Te(t) && !ot(t))
1813
+ throw xe(Ue.INVALID_ARGUMENT);
1814
+ const o = be(t) ? String(t) : (Te(t), t);
1815
+ return be(n) ? a.plural = n : G(n) ? a.default = n : q(n) && !Nt(n) ? a.named = n : pe(n) && (a.list = n), be(r) ? a.plural = r : G(r) ? a.default = r : q(r) && ge(a, r), [o, a];
1816
+ }
1817
+ function ha(e, t, n, r, a, o) {
1818
+ return {
1819
+ locale: t,
1820
+ key: n,
1821
+ warnHtmlMessage: a,
1822
+ onError: (f) => {
1823
+ throw o && o(f), f;
1824
+ },
1825
+ onCacheKey: (f) => Pr(t, n, f)
1826
+ };
1827
+ }
1828
+ function ba(e, t, n, r) {
1829
+ const { modifiers: a, pluralRules: o, messageResolver: f, fallbackLocale: d, fallbackWarn: i, missingWarn: b, fallbackContext: E } = e, T = {
1830
+ locale: t,
1831
+ modifiers: a,
1832
+ pluralRules: o,
1833
+ messages: (w, A) => {
1834
+ let L = f(n, w);
1835
+ if (L == null && (E || A)) {
1836
+ const [, , M] = tr(
1837
+ E || e,
1838
+ // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1839
+ w,
1840
+ t,
1841
+ d,
1842
+ i,
1843
+ b
1844
+ );
1845
+ L = f(M, w);
1846
+ }
1847
+ if (G(L) || ot(L)) {
1848
+ let M = !1;
1849
+ const h = nr(e, w, t, L, w, () => {
1850
+ M = !0;
1851
+ });
1852
+ return M ? Cn : h;
1853
+ } else return Te(L) ? L : Cn;
1854
+ }
1855
+ };
1856
+ return e.processor && (T.processor = e.processor), r.list && (T.list = r.list), r.named && (T.named = r.named), be(r.plural) && (T.pluralIndex = r.plural), T;
1857
+ }
1858
+ ps();
1859
+ var ga = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_3ab4eec8-2e90-4ef0-a961-d2af4b347b02", DOTNET_NOLOGO: "1", USER: "runner", npm_config_always_auth: "", npm_config_user_agent: "pnpm/10.8.0 npm/? node/v24.5.0 linux x64", CI: "true", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_3ab4eec8-2e90-4ef0-a961-d2af4b347b02", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/24.5.0/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", HCA_CLOUD_PROVIDER: "azure", HOME: "/home/runner", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_config_save_workspace_protocol: "true", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", NODE_OPTIONS: "--max-old-space-size=10240", GRADLE_HOME: "/usr/share/gradle-9.8.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/30.0.16248370", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", SYSTEMD_EXEC_PID: "1845", ACTIONS_ORCHESTRATION_ID: "a341921c-9dd7-4f87-a747-fedc05720d6d.publish.publish.__default", npm_config_engine_strict: "true", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_config_prefer_workspace_packages: "true", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20261023.334.3", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GITHUB_ARTIFACTS: "/home/runner/work/_temp/_runner_file_commands/artifacts_3ab4eec8-2e90-4ef0-a961-d2af4b347b02", SWIFT_PATH: "/usr/share/swift/usr/bin", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "9:12093", GITHUB_WORKFLOW: "Publish hrm-portal", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.14/x64", GITHUB_RUN_ID: "40631620754", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "e395368a5c7d968f5c3e5d83c414dfd9fd0efe01", GOROOT_1_26_X64: "/opt/hostedtoolcache/go/1.26.9/x64", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", GITHUB_WORKFLOW_REF: "feedmepos/hrm-service/.github/workflows/publish-hrm-portal-trusted.yml@refs/heads/dev", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9kZXZcIixcIlBlcm1pc3Npb25cIjozfSx7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6MX1dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOjZmOTZmYTg5LWI3YmYtNDg3OC1iYWQzLTg5ODAwNjU2NmI2ZSIsImJpbGxpbmdfb3duZXJfaWQiOiJFX2tnRE9BQUpvWVEiLCJleHAiOjE3OTMxODMzNDIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc5MzE2MTE0MiwiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6IjM0NzQ5NGRiLWIxZDAtNTU0ZC04ODIzLTJmZjI4MGZjNWJmNiIsImpvYl93b3JrZmxvd19yZWYiOiJmZWVkbWVwb3MvYWN0aW9ucy8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoLW5wbS1naXRodWIueWFtbEByZWZzL2hlYWRzL21haW4iLCJqb2Jfd29ya2Zsb3dfc2hhIjoiNTBmOTYzNDk4MWZjYjJjYTcwZjRlMTFkODNhMzM2Y2VhYmZjOGI3YSIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc5MzE2MDg0Miwib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJNaXJvb245OVwiLFwiYWN0b3JfaWRcIjpcIjY1NjM3NDIxXCIsXCJiYXNlX3JlZlwiOlwiXCIsXCJjaGVja19ydW5faWRcIjpcIjEyMjYyOTEwMTUxMVwiLFwiZXZlbnRfbmFtZVwiOlwid29ya2Zsb3dfZGlzcGF0Y2hcIixcImhlYWRfcmVmXCI6XCJcIixcImpvYl93b3JrZmxvd19yZWZcIjpcImZlZWRtZXBvcy9hY3Rpb25zLy5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2gtbnBtLWdpdGh1Yi55YW1sQHJlZnMvaGVhZHMvbWFpblwiLFwiam9iX3dvcmtmbG93X3NoYVwiOlwiNTBmOTYzNDk4MWZjYjJjYTcwZjRlMTFkODNhMzM2Y2VhYmZjOGI3YVwiLFwicmVmXCI6XCJyZWZzL2hlYWRzL2RldlwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImZlZWRtZXBvcy9ocm0tc2VydmljZVwiLFwicmVwb3NpdG9yeV9pZFwiOlwiMTEyNDY3MjIzNVwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiZmVlZG1lcG9zXCIsXCJyZXBvc2l0b3J5X293bmVyX2lkXCI6XCI1NDgzMTUxNVwiLFwicmVwb3NpdG9yeV92aXNpYmlsaXR5XCI6XCJwcml2YXRlXCIsXCJydW5fYXR0ZW1wdFwiOlwiMVwiLFwicnVuX2lkXCI6XCI0MDYzMTYyMDc1NFwiLFwicnVuX251bWJlclwiOlwiMjM1XCIsXCJydW5uZXJfZW52aXJvbm1lbnRcIjpcImdpdGh1Yi1ob3N0ZWRcIixcInNoYVwiOlwiZTM5NTM2OGE1YzdkOTY4ZjVjM2U1ZDgzYzQxNGRmZDlmZDBlZmUwMVwiLFwid29ya2Zsb3dcIjpcIlB1Ymxpc2ggaHJtLXBvcnRhbFwiLFwid29ya2Zsb3dfcmVmXCI6XCJmZWVkbWVwb3MvaHJtLXNlcnZpY2UvLmdpdGh1Yi93b3JrZmxvd3MvcHVibGlzaC1ocm0tcG9ydGFsLXRydXN0ZWQueW1sQHJlZnMvaGVhZHMvZGV2XCIsXCJ3b3JrZmxvd19zaGFcIjpcImUzOTUzNjhhNWM3ZDk2OGY1YzNlNWQ4M2M0MTRkZmQ5ZmQwZWZlMDFcIn0iLCJvaWRjX3N1YiI6InJlcG86ZmVlZG1lcG9zL2hybS1zZXJ2aWNlOnJlZjpyZWZzL2hlYWRzL2RldiIsIm9yY2hfaWQiOiJhMzQxOTIxYy05ZGQ3LTRmODctYTc0Ny1mZWRjMDU3MjBkNmQucHVibGlzaC5wdWJsaXNoLl9fZGVmYXVsdCIsIm93bmVyX2lkIjoiRV9rZ0RPQUFKb1lRIiwicGxhbl9pZCI6ImEzNDE5MjFjLTlkZDctNGY4Ny1hNzQ3LWZlZGMwNTcyMGQ2ZCIsInJlcG9zaXRvcnlfaWQiOiIxMTI0NjcyMjM1IiwicmVwb3NpdG9yeV9vd25lcl9pZCI6IjU0ODMxNTE1IiwicmVwb3NpdG9yeV92aXNpYmlsaXR5IjoicHJpdmF0ZSIsInJ1bl9pZCI6IjQwNjMxNjIwNzU0IiwicnVuX251bWJlciI6IjIzNSIsInJ1bl90eXBlIjoiZnVsbCIsInJ1bm5lcl9pZCI6IjEwMDAyMzI5ODEiLCJydW5uZXJfdHlwZSI6Imhvc3RlZCIsInNjcCI6IkFjdGlvbnMuUmVzdWx0czphMzQxOTIxYy05ZGQ3LTRmODctYTc0Ny1mZWRjMDU3MjBkNmQ6MzQ3NDk0ZGItYjFkMC01NTRkLTg4MjMtMmZmMjgwZmM1YmY2IEFjdGlvbnMuUnVubmVyOmEzNDE5MjFjLTlkZDctNGY4Ny1hNzQ3LWZlZGMwNTcyMGQ2ZDozNDc0OTRkYi1iMWQwLTU1NGQtODgyMy0yZmYyODBmYzViZjYgQWN0aW9ucy5VcGxvYWRBcnRpZmFjdHM6YTM0MTkyMWMtOWRkNy00Zjg3LWE3NDctZmVkYzA1NzIwZDZkOjM0NzQ5NGRiLWIxZDAtNTU0ZC04ODIzLTJmZjI4MGZjNWJmNiBnZW5lcmF0ZV9pZF90b2tlbjphMzQxOTIxYy05ZGQ3LTRmODctYTc0Ny1mZWRjMDU3MjBkNmQ6MzQ3NDk0ZGItYjFkMC01NTRkLTg4MjMtMmZmMjgwZmM1YmY2IEFjdGlvbnMuR2VuZXJpY1JlYWQ6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIiwic2hhIjoiZTM5NTM2OGE1YzdkOTY4ZjVjM2U1ZDgzYzQxNGRmZDlmZDBlZmUwMSIsInRydXN0X3RpZXIiOiIxIn0.JPUOyyNDqSqHYUeXoXEVkND0iLITpdgp6mjVT75a5U1kTMBNBgRf2oTJa265UvTG_iszpvu8h6GqARaGbPZZI7_NaIxjfpJDrMrnl_NiC2X-gIcie4rv_YHuBHP3ywmeJ3UpTil7iNiMSzpwkofK7VPZasRKpoX8SU0VvKmB--rcyEesDGXRNPnbMBS3T4XqFLBexyEw2hcCUDxBGdGYMpZZCxa4ziFdk2VnlX2d0RvLyEtSQIOXrn8EuYWkJbrXuZW0woDK_vL9cCmNtCKkojjTwKBKTT7HIxqOQ38Gbldwv1dMa760KwNolMhnhFRjku0SuD6aw1IvubQzCchiUw", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/hrm-service/hrm-service/node_modules/.bin:/home/runner/work/hrm-service/hrm-service/apps/hrm-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/hrm-service/hrm-service/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/24.5.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_5570f3e0-19f5-4419-8685-a96ac3efa60e", INVOCATION_ID: "b8c1012cf4824ff9a24175925c2ec4bd", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/24.5.0/x64/bin/node", npm_package_name: "@feedmepos/mf-hrm-portal", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "235", GITHUB_TRIGGERING_ACTOR: "Miroon99", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000232981", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/hrm-service", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "1124672235", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules/vite/bin/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules/vite/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "2.3.2-dev.10", npm_config_verify_deps_before_run: "false", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "false", GITHUB_WORKSPACE: "/home/runner/work/hrm-service/hrm-service", ACCEPT_EULA: "Y", GITHUB_JOB: "publish", npm_config_overrides: '{"proxy-addr":">=2.0.8 <3","@fastify/busboy":">=3.2.1 <4","@grpc/grpc-js":">=1.14.5 <2","brace-expansion@^2":"^2.1.6","js-yaml@^4":"^4.3.2","source-map-js":"^1.2.2","dompurify":">=3.4.17 <4","undici@^6":">=6.29.1 <7","body-parser@^1":">=1.20.9 <2","multer":">=2.5.0 <3"}', npm_config_package_extensions: '{"@feedmepos/entity":{"dependencies":{"@feedmepos/core":"2.14.52"}}}', GITHUB_SHA: "e395368a5c7d968f5c3e5d83c414dfd9fd0efe01", GITHUB_RUN_ATTEMPT: "1", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "Miroon99", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", VITE_TARGET_ENV: "dev", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_3ab4eec8-2e90-4ef0-a961-d2af4b347b02", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", GITHUB_ACTOR_ID: "65637421", RUNNER_WORKSPACE: "/home/runner/work/hrm-service", npm_config_link_workspace_packages: "true", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", ACTIONS_ID_TOKEN_REQUEST_URL: "https://run-actions-1-azure-eastus.actions.githubusercontent.com/201//idtoken/a341921c-9dd7-4f87-a747-fedc05720d6d/347494db-b1d0-554d-8823-2ff280fc5bf6?api-version=2.0", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_3ab4eec8-2e90-4ef0-a961-d2af4b347b02", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ARTIFACTS_LIST: "/home/runner/work/_temp/_runner_file_commands/artifacts_list_3ab4eec8-2e90-4ef0-a961-d2af4b347b02", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_15.6.1", CHROME_BIN: "/usr/bin/google-chrome", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_3ab4eec8-2e90-4ef0-a961-d2af4b347b02", INIT_CWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", NODE_ENV: "production" } };
1860
+ const ya = "10.0.5";
1861
+ function Ia() {
1862
+ typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Je().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Je().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Je().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Je().__INTLIFY_PROD_DEVTOOLS__ = !1);
1863
+ }
1864
+ const lt = {
1865
+ // composer module errors
1866
+ UNEXPECTED_RETURN_TYPE: Us,
1867
+ // 24
1868
+ // legacy module errors
1869
+ INVALID_ARGUMENT: 25,
1870
+ // i18n module errors
1871
+ MUST_BE_CALL_SETUP_TOP: 26,
1872
+ NOT_INSTALLED: 27,
1873
+ NOT_INSTALLED_WITH_PROVIDE: 31,
1874
+ // unexpected error
1875
+ UNEXPECTED_ERROR: 32
1876
+ };
1877
+ function mt(e, ...t) {
1878
+ return Ct(e, null, void 0);
1879
+ }
1880
+ const xt = /* @__PURE__ */ ze("__translateVNode"), Vt = /* @__PURE__ */ ze("__datetimeParts"), Gt = /* @__PURE__ */ ze("__numberParts"), Ea = ze("__setPluralRules"), rr = /* @__PURE__ */ ze("__injectWithOption"), Wt = /* @__PURE__ */ ze("__dispose");
1881
+ function dt(e) {
1882
+ if (!ee(e))
1883
+ return e;
1884
+ for (const t in e)
1885
+ if (Se(e, t))
1886
+ if (!t.includes("."))
1887
+ ee(e[t]) && dt(e[t]);
1888
+ else {
1889
+ const n = t.split("."), r = n.length - 1;
1890
+ let a = e, o = !1;
1891
+ for (let f = 0; f < r; f++) {
1892
+ if (n[f] in a || (a[n[f]] = se()), !ee(a[n[f]])) {
1893
+ o = !0;
1894
+ break;
1895
+ }
1896
+ a = a[n[f]];
1897
+ }
1898
+ o || (a[n[r]] = e[t], delete e[t]), ee(a[n[r]]) && dt(a[n[r]]);
1899
+ }
1900
+ return e;
1901
+ }
1902
+ function sr(e, t) {
1903
+ const { messages: n, __i18n: r, messageResolver: a, flatJson: o } = t, f = q(n) ? n : pe(r) ? se() : { [e]: se() };
1904
+ if (pe(r) && r.forEach((d) => {
1905
+ if ("locale" in d && "resource" in d) {
1906
+ const { locale: i, resource: b } = d;
1907
+ i ? (f[i] = f[i] || se(), yt(b, f[i])) : yt(b, f);
1908
+ } else
1909
+ G(d) && yt(JSON.parse(d), f);
1910
+ }), a == null && o)
1911
+ for (const d in f)
1912
+ Se(f, d) && dt(f[d]);
1913
+ return f;
1914
+ }
1915
+ function ar(e) {
1916
+ return e.type;
1917
+ }
1918
+ function Na(e, t, n) {
1919
+ let r = ee(t.messages) ? t.messages : se();
1920
+ "__i18nGlobal" in n && (r = sr(e.locale.value, {
1921
+ messages: r,
1922
+ __i18n: n.__i18nGlobal
1923
+ }));
1924
+ const a = Object.keys(r);
1925
+ a.length && a.forEach((o) => {
1926
+ e.mergeLocaleMessage(o, r[o]);
1927
+ });
1928
+ {
1929
+ if (ee(t.datetimeFormats)) {
1930
+ const o = Object.keys(t.datetimeFormats);
1931
+ o.length && o.forEach((f) => {
1932
+ e.mergeDateTimeFormat(f, t.datetimeFormats[f]);
1933
+ });
1934
+ }
1935
+ if (ee(t.numberFormats)) {
1936
+ const o = Object.keys(t.numberFormats);
1937
+ o.length && o.forEach((f) => {
1938
+ e.mergeNumberFormat(f, t.numberFormats[f]);
1939
+ });
1940
+ }
1941
+ }
1942
+ }
1943
+ function On(e) {
1944
+ return oe(fr, null, e, 0);
1945
+ }
1946
+ const Rn = "__INTLIFY_META__", Sn = () => [], Ca = () => !1;
1947
+ let Ln = 0;
1948
+ function kn(e) {
1949
+ return (t, n, r, a) => e(n, r, Yt() || void 0, a);
1950
+ }
1951
+ const Ta = /* @__NO_SIDE_EFFECTS__ */ () => {
1952
+ const e = Yt();
1953
+ let t = null;
1954
+ return e && (t = ar(e)[Rn]) ? { [Rn]: t } : null;
1955
+ };
1956
+ function Oa(e = {}) {
1957
+ const { __root: t, __injectWithOption: n } = e, r = t === void 0, a = e.flatJson, o = sn ? st : mr;
1958
+ let f = _e(e.inheritLocale) ? e.inheritLocale : !0;
1959
+ const d = o(
1960
+ // prettier-ignore
1961
+ t && f ? t.locale.value : G(e.locale) ? e.locale : Et
1962
+ ), i = o(
1963
+ // prettier-ignore
1964
+ t && f ? t.fallbackLocale.value : G(e.fallbackLocale) || pe(e.fallbackLocale) || q(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : d.value
1965
+ ), b = o(sr(d.value, e)), E = o(q(e.datetimeFormats) ? e.datetimeFormats : { [d.value]: {} }), C = o(q(e.numberFormats) ? e.numberFormats : { [d.value]: {} });
1966
+ let T = t ? t.missingWarn : _e(e.missingWarn) || It(e.missingWarn) ? e.missingWarn : !0, w = t ? t.fallbackWarn : _e(e.fallbackWarn) || It(e.fallbackWarn) ? e.fallbackWarn : !0, A = t ? t.fallbackRoot : _e(e.fallbackRoot) ? e.fallbackRoot : !0, L = !!e.fallbackFormat, M = ue(e.missing) ? e.missing : null, p = ue(e.missing) ? kn(e.missing) : null, h = ue(e.postTranslation) ? e.postTranslation : null, R = t ? t.warnHtmlMessage : _e(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, m = !!e.escapeParameter;
1967
+ const g = t ? t.modifiers : q(e.modifiers) ? e.modifiers : {};
1968
+ let I = e.pluralRules || t && t.pluralRules, v;
1969
+ v = (() => {
1970
+ r && hn(null);
1971
+ const u = {
1972
+ version: ya,
1973
+ locale: d.value,
1974
+ fallbackLocale: i.value,
1975
+ messages: b.value,
1976
+ modifiers: g,
1977
+ pluralRules: I,
1978
+ missing: p === null ? void 0 : p,
1979
+ missingWarn: T,
1980
+ fallbackWarn: w,
1981
+ fallbackFormat: L,
1982
+ unresolving: !0,
1983
+ postTranslation: h === null ? void 0 : h,
1984
+ warnHtmlMessage: R,
1985
+ escapeParameter: m,
1986
+ messageResolver: e.messageResolver,
1987
+ messageCompiler: e.messageCompiler,
1988
+ __meta: { framework: "vue" }
1989
+ };
1990
+ u.datetimeFormats = E.value, u.numberFormats = C.value, u.__datetimeFormatters = q(v) ? v.__datetimeFormatters : void 0, u.__numberFormatters = q(v) ? v.__numberFormatters : void 0;
1991
+ const N = sa(u);
1992
+ return r && hn(N), N;
1993
+ })(), it(v, d.value, i.value);
1994
+ function S() {
1995
+ return [
1996
+ d.value,
1997
+ i.value,
1998
+ b.value,
1999
+ E.value,
2000
+ C.value
2001
+ ];
2002
+ }
2003
+ const H = K({
2004
+ get: () => d.value,
2005
+ set: (u) => {
2006
+ d.value = u, v.locale = d.value;
2007
+ }
2008
+ }), x = K({
2009
+ get: () => i.value,
2010
+ set: (u) => {
2011
+ i.value = u, v.fallbackLocale = i.value, it(v, d.value, u);
2012
+ }
2013
+ }), _ = K(() => b.value), O = /* @__PURE__ */ K(() => E.value), P = /* @__PURE__ */ K(() => C.value);
2014
+ function F() {
2015
+ return ue(h) ? h : null;
2016
+ }
2017
+ function D(u) {
2018
+ h = u, v.postTranslation = u;
2019
+ }
2020
+ function V() {
2021
+ return M;
2022
+ }
2023
+ function j(u) {
2024
+ u !== null && (p = kn(u)), M = u, v.missing = p;
2025
+ }
2026
+ const Z = (u, N, Q, J, me, We) => {
2027
+ S();
2028
+ let qe;
2029
+ try {
2030
+ ga.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (v.fallbackContext = t ? ra() : void 0), qe = u(v);
2031
+ } finally {
2032
+ __INTLIFY_PROD_DEVTOOLS__, r || (v.fallbackContext = void 0);
2033
+ }
2034
+ if (Q !== "translate exists" && // for not `te` (e.g `t`)
2035
+ be(qe) && qe === Tt || Q === "translate exists" && !qe) {
2036
+ const [cr, po] = N();
2037
+ return t && A ? J(t) : me(cr);
2038
+ } else {
2039
+ if (We(qe))
2040
+ return qe;
2041
+ throw mt(lt.UNEXPECTED_RETURN_TYPE);
2042
+ }
2043
+ };
2044
+ function B(...u) {
2045
+ return Z((N) => Reflect.apply(Tn, null, [N, ...u]), () => Ut(...u), "translate", (N) => Reflect.apply(N.t, N, [...u]), (N) => N, (N) => G(N));
2046
+ }
2047
+ function te(...u) {
2048
+ const [N, Q, J] = u;
2049
+ if (J && !ee(J))
2050
+ throw mt(lt.INVALID_ARGUMENT);
2051
+ return B(N, Q, ge({ resolvedMessage: !0 }, J || {}));
2052
+ }
2053
+ function z(...u) {
2054
+ return Z((N) => Reflect.apply(gn, null, [N, ...u]), () => Pt(...u), "datetime format", (N) => Reflect.apply(N.d, N, [...u]), () => pn, (N) => G(N));
2055
+ }
2056
+ function de(...u) {
2057
+ return Z((N) => Reflect.apply(In, null, [N, ...u]), () => jt(...u), "number format", (N) => Reflect.apply(N.n, N, [...u]), () => pn, (N) => G(N));
2058
+ }
2059
+ function ve(u) {
2060
+ return u.map((N) => G(N) || be(N) || _e(N) ? On(String(N)) : N);
2061
+ }
2062
+ const ae = {
2063
+ normalize: ve,
2064
+ interpolate: (u) => u,
2065
+ type: "vnode"
2066
+ };
2067
+ function le(...u) {
2068
+ return Z((N) => {
2069
+ let Q;
2070
+ const J = N;
2071
+ try {
2072
+ J.processor = ae, Q = Reflect.apply(Tn, null, [J, ...u]);
2073
+ } finally {
2074
+ J.processor = null;
2075
+ }
2076
+ return Q;
2077
+ }, () => Ut(...u), "translate", (N) => N[xt](...u), (N) => [On(N)], (N) => pe(N));
2078
+ }
2079
+ function ke(...u) {
2080
+ return Z((N) => Reflect.apply(In, null, [N, ...u]), () => jt(...u), "number format", (N) => N[Gt](...u), Sn, (N) => G(N) || pe(N));
2081
+ }
2082
+ function Y(...u) {
2083
+ return Z((N) => Reflect.apply(gn, null, [N, ...u]), () => Pt(...u), "datetime format", (N) => N[Vt](...u), Sn, (N) => G(N) || pe(N));
2084
+ }
2085
+ function fe(u) {
2086
+ I = u, v.pluralRules = I;
2087
+ }
2088
+ function $e(u, N) {
2089
+ return Z(() => {
2090
+ if (!u)
2091
+ return !1;
2092
+ const Q = G(N) ? N : d.value, J = De(Q), me = v.messageResolver(J, u);
2093
+ return ot(me) || Te(me) || G(me);
2094
+ }, () => [u], "translate exists", (Q) => Reflect.apply(Q.te, Q, [u, N]), Ca, (Q) => _e(Q));
2095
+ }
2096
+ function Qe(u) {
2097
+ let N = null;
2098
+ const Q = Hn(v, i.value, d.value);
2099
+ for (let J = 0; J < Q.length; J++) {
2100
+ const me = b.value[Q[J]] || {}, We = v.messageResolver(me, u);
2101
+ if (We != null) {
2102
+ N = We;
2103
+ break;
2104
+ }
2105
+ }
2106
+ return N;
2107
+ }
2108
+ function Ve(u) {
2109
+ const N = Qe(u);
2110
+ return N ?? (t ? t.tm(u) || {} : {});
2111
+ }
2112
+ function De(u) {
2113
+ return b.value[u] || {};
2114
+ }
2115
+ function Fe(u, N) {
2116
+ if (a) {
2117
+ const Q = { [u]: N };
2118
+ for (const J in Q)
2119
+ Se(Q, J) && dt(Q[J]);
2120
+ N = Q[u];
2121
+ }
2122
+ b.value[u] = N, v.messages = b.value;
2123
+ }
2124
+ function Ge(u, N) {
2125
+ b.value[u] = b.value[u] || {};
2126
+ const Q = { [u]: N };
2127
+ if (a)
2128
+ for (const J in Q)
2129
+ Se(Q, J) && dt(Q[J]);
2130
+ N = Q[u], yt(N, b.value[u]), v.messages = b.value;
2131
+ }
2132
+ function Pe(u) {
2133
+ return E.value[u] || {};
2134
+ }
2135
+ function l(u, N) {
2136
+ E.value[u] = N, v.datetimeFormats = E.value, yn(v, u, N);
2137
+ }
2138
+ function s(u, N) {
2139
+ E.value[u] = ge(E.value[u] || {}, N), v.datetimeFormats = E.value, yn(v, u, N);
2140
+ }
2141
+ function c(u) {
2142
+ return C.value[u] || {};
2143
+ }
2144
+ function y(u, N) {
2145
+ C.value[u] = N, v.numberFormats = C.value, En(v, u, N);
2146
+ }
2147
+ function U(u, N) {
2148
+ C.value[u] = ge(C.value[u] || {}, N), v.numberFormats = C.value, En(v, u, N);
2149
+ }
2150
+ Ln++, t && sn && (Mt(t.locale, (u) => {
2151
+ f && (d.value = u, v.locale = u, it(v, d.value, i.value));
2152
+ }), Mt(t.fallbackLocale, (u) => {
2153
+ f && (i.value = u, v.fallbackLocale = u, it(v, d.value, i.value));
2154
+ }));
2155
+ const W = {
2156
+ id: Ln,
2157
+ locale: H,
2158
+ fallbackLocale: x,
2159
+ get inheritLocale() {
2160
+ return f;
2161
+ },
2162
+ set inheritLocale(u) {
2163
+ f = u, u && t && (d.value = t.locale.value, i.value = t.fallbackLocale.value, it(v, d.value, i.value));
2164
+ },
2165
+ get availableLocales() {
2166
+ return Object.keys(b.value).sort();
2167
+ },
2168
+ messages: _,
2169
+ get modifiers() {
2170
+ return g;
2171
+ },
2172
+ get pluralRules() {
2173
+ return I || {};
2174
+ },
2175
+ get isGlobal() {
2176
+ return r;
2177
+ },
2178
+ get missingWarn() {
2179
+ return T;
2180
+ },
2181
+ set missingWarn(u) {
2182
+ T = u, v.missingWarn = T;
2183
+ },
2184
+ get fallbackWarn() {
2185
+ return w;
2186
+ },
2187
+ set fallbackWarn(u) {
2188
+ w = u, v.fallbackWarn = w;
2189
+ },
2190
+ get fallbackRoot() {
2191
+ return A;
2192
+ },
2193
+ set fallbackRoot(u) {
2194
+ A = u;
2195
+ },
2196
+ get fallbackFormat() {
2197
+ return L;
2198
+ },
2199
+ set fallbackFormat(u) {
2200
+ L = u, v.fallbackFormat = L;
2201
+ },
2202
+ get warnHtmlMessage() {
2203
+ return R;
2204
+ },
2205
+ set warnHtmlMessage(u) {
2206
+ R = u, v.warnHtmlMessage = u;
2207
+ },
2208
+ get escapeParameter() {
2209
+ return m;
2210
+ },
2211
+ set escapeParameter(u) {
2212
+ m = u, v.escapeParameter = u;
2213
+ },
2214
+ t: B,
2215
+ getLocaleMessage: De,
2216
+ setLocaleMessage: Fe,
2217
+ mergeLocaleMessage: Ge,
2218
+ getPostTranslationHandler: F,
2219
+ setPostTranslationHandler: D,
2220
+ getMissingHandler: V,
2221
+ setMissingHandler: j,
2222
+ [Ea]: fe
2223
+ };
2224
+ return W.datetimeFormats = O, W.numberFormats = P, W.rt = te, W.te = $e, W.tm = Ve, W.d = z, W.n = de, W.getDateTimeFormat = Pe, W.setDateTimeFormat = l, W.mergeDateTimeFormat = s, W.getNumberFormat = c, W.setNumberFormat = y, W.mergeNumberFormat = U, W[rr] = n, W[xt] = le, W[Vt] = Y, W[Gt] = ke, W;
2225
+ }
2226
+ const Qt = {
2227
+ tag: {
2228
+ type: [String, Object]
2229
+ },
2230
+ locale: {
2231
+ type: String
2232
+ },
2233
+ scope: {
2234
+ type: String,
2235
+ // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2236
+ validator: (e) => e === "parent" || e === "global",
2237
+ default: "parent"
2238
+ /* ComponentI18nScope */
2239
+ },
2240
+ i18n: {
2241
+ type: Object
2242
+ }
2243
+ };
2244
+ function Ra({ slots: e }, t) {
2245
+ return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, a) => [
2246
+ ...r,
2247
+ // prettier-ignore
2248
+ ...a.type === Me ? a.children : [a]
2249
+ ], []) : t.reduce((n, r) => {
2250
+ const a = e[r];
2251
+ return a && (n[r] = a()), n;
2252
+ }, se());
2253
+ }
2254
+ function or() {
2255
+ return Me;
2256
+ }
2257
+ ge({
2258
+ keypath: {
2259
+ type: String,
2260
+ required: !0
2261
+ },
2262
+ plural: {
2263
+ type: [Number, String],
2264
+ validator: (e) => be(e) || !isNaN(e)
2265
+ }
2266
+ }, Qt);
2267
+ function Sa(e) {
2268
+ return pe(e) && !G(e[0]);
2269
+ }
2270
+ function lr(e, t, n, r) {
2271
+ const { slots: a, attrs: o } = t;
2272
+ return () => {
2273
+ const f = { part: !0 };
2274
+ let d = se();
2275
+ e.locale && (f.locale = e.locale), G(e.format) ? f.key = e.format : ee(e.format) && (G(e.format.key) && (f.key = e.format.key), d = Object.keys(e.format).reduce((T, w) => n.includes(w) ? ge(se(), T, { [w]: e.format[w] }) : T, se()));
2276
+ const i = r(e.value, f, d);
2277
+ let b = [f.key];
2278
+ pe(i) ? b = i.map((T, w) => {
2279
+ const A = a[T.type], L = A ? A({ [T.type]: T.value, index: w, parts: i }) : [T.value];
2280
+ return Sa(L) && (L[0].key = `${T.type}-${w}`), L;
2281
+ }) : G(i) && (b = [i]);
2282
+ const E = ge(se(), o), C = G(e.tag) || ee(e.tag) ? e.tag : or();
2283
+ return Vn(C, E, b);
2284
+ };
2285
+ }
2286
+ ge({
2287
+ value: {
2288
+ type: Number,
2289
+ required: !0
2290
+ },
2291
+ format: {
2292
+ type: [String, Object]
2293
+ }
2294
+ }, Qt);
2295
+ ge({
2296
+ value: {
2297
+ type: [Number, Date],
2298
+ required: !0
2299
+ },
2300
+ format: {
2301
+ type: [String, Object]
2302
+ }
2303
+ }, Qt);
2304
+ const La = /* @__PURE__ */ ze("global-vue-i18n");
2305
+ function Ot(e = {}) {
2306
+ const t = Yt();
2307
+ if (t == null)
2308
+ throw mt(lt.MUST_BE_CALL_SETUP_TOP);
2309
+ if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2310
+ throw mt(lt.NOT_INSTALLED);
2311
+ const n = ka(t), r = Ma(n), a = ar(t), o = Aa(e, a);
2312
+ if (o === "global")
2313
+ return Na(r, e, a), r;
2314
+ if (o === "parent") {
2315
+ let i = wa(n, t, e.__useComponent);
2316
+ return i == null && (i = r), i;
2317
+ }
2318
+ const f = n;
2319
+ let d = f.__getInstance(t);
2320
+ if (d == null) {
2321
+ const i = ge({}, e);
2322
+ "__i18n" in a && (i.__i18n = a.__i18n), r && (i.__root = r), d = Oa(i), f.__composerExtend && (d[Wt] = f.__composerExtend(d)), Fa(f, t, d), f.__setInstance(t, d);
2323
+ }
2324
+ return d;
2325
+ }
2326
+ function ka(e) {
2327
+ const t = ur(e.isCE ? La : e.appContext.app.__VUE_I18N_SYMBOL__);
2328
+ if (!t)
2329
+ throw mt(e.isCE ? lt.NOT_INSTALLED_WITH_PROVIDE : lt.UNEXPECTED_ERROR);
2330
+ return t;
2331
+ }
2332
+ function Aa(e, t) {
2333
+ return Nt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2334
+ }
2335
+ function Ma(e) {
2336
+ return e.mode === "composition" ? e.global : e.global.__composer;
2337
+ }
2338
+ function wa(e, t, n = !1) {
2339
+ let r = null;
2340
+ const a = t.root;
2341
+ let o = Da(t, n);
2342
+ for (; o != null; ) {
2343
+ const f = e;
2344
+ if (e.mode === "composition")
2345
+ r = f.__getInstance(o);
2346
+ else if (__VUE_I18N_LEGACY_API__) {
2347
+ const d = f.__getInstance(o);
2348
+ d != null && (r = d.__composer, n && r && !r[rr] && (r = null));
2349
+ }
2350
+ if (r != null || a === o)
2351
+ break;
2352
+ o = o.parent;
2353
+ }
2354
+ return r;
2355
+ }
2356
+ function Da(e, t = !1) {
2357
+ return e == null ? null : t && e.vnode.ctx || e.parent;
2358
+ }
2359
+ function Fa(e, t, n) {
2360
+ xn(() => {
2361
+ }, t), dr(() => {
2362
+ const r = n;
2363
+ e.__deleteInstance(t);
2364
+ const a = r[Wt];
2365
+ a && (a(), delete r[Wt]);
2366
+ }, t);
2367
+ }
2368
+ Ia();
2369
+ Qs(ws);
2370
+ qs(Js);
2371
+ ea(Hn);
2372
+ if (__INTLIFY_PROD_DEVTOOLS__) {
2373
+ const e = Je();
2374
+ e.__INTLIFY__ = !0, Ds(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2375
+ }
2376
+ const vt = /* @__PURE__ */ Le({
2377
+ __name: "InheritPermissionTooltip",
2378
+ props: {
2379
+ item: {
2380
+ type: Object,
2381
+ required: !0
2382
+ }
2383
+ },
2384
+ setup(e) {
2385
+ const { t } = Ot();
2386
+ return (n, r) => {
2387
+ const a = we("FmIcon"), o = we("FmTooltip");
2388
+ return $(), Ce(o, {
2389
+ variant: "plain",
2390
+ placement: "right",
2391
+ "z-index": 50
2392
+ }, {
2393
+ content: ce(() => [
2394
+ ie("div", null, Oe(X(t)("team.memberForm.permissions.inherited")), 1),
2395
+ ($(!0), re(Me, null, Ee(e.item.setNames, (f) => ($(), re("div", { key: f }, [
2396
+ ie("div", null, "- " + Oe(f), 1)
2397
+ ]))), 128))
2398
+ ]),
2399
+ default: ce(() => [
2400
+ oe(a, {
2401
+ name: "admin_panel_settings",
2402
+ size: "sm",
2403
+ class: "ml-1 text-fm-color-typo-info"
2404
+ })
2405
+ ]),
2406
+ _: 1
2407
+ });
2408
+ };
2409
+ }
2410
+ });
2411
+ function An(e, t, n) {
2412
+ const r = n.filter((d) => d !== "manage");
2413
+ if (r.length === 0) return;
2414
+ const a = e.findIndex((d) => d.subject === t && !d.inverted);
2415
+ if (a < 0) return;
2416
+ const o = new Set(e[a].actions), f = r.every((d) => o.has(d));
2417
+ f && !o.has("manage") ? (o.add("manage"), e[a] = {
2418
+ ...e[a],
2419
+ actions: Array.from(o)
2420
+ }) : !f && o.has("manage") && (o.delete("manage"), o.size === 0 ? e.splice(a, 1) : e[a] = {
2421
+ ...e[a],
2422
+ actions: Array.from(o)
2423
+ });
2424
+ }
2425
+ const Mn = Object.values(kr), Pa = {
2426
+ read: "View",
2427
+ create: "Duplicate",
2428
+ update: "Edit"
2429
+ };
2430
+ function ja(e, t, n, r) {
2431
+ const { t: a } = Ke(), { getFlagValue: o, getFlag: f } = Lr(), d = K(() => {
2432
+ var D;
2433
+ const _ = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
2434
+ for (const V of t.value) {
2435
+ const j = V.category;
2436
+ if (!j) continue;
2437
+ const Z = V.subject;
2438
+ if (n.value.includes(V.subject) || V.showByFeatureFlag && ((D = f(V.showByFeatureFlag)) == null ? void 0 : D.enabled) === !1 && o(V.showByFeatureFlag) === "true")
2439
+ continue;
2440
+ _.has(j) || _.set(j, []);
2441
+ const B = P.get(Z) ?? 0;
2442
+ P.set(Z, B + 1), _.get(j).push({
2443
+ label: a(`permissionSet.permissionLabels.${Z}`, V.label),
2444
+ value: Z,
2445
+ optionKey: `${Z}::${B}`
2446
+ }), O.has(Z) || O.set(Z, V);
2447
+ }
2448
+ return [..._.keys()].sort((V, j) => {
2449
+ const Z = Mn.indexOf(V), B = Mn.indexOf(j);
2450
+ return Z === -1 && B === -1 ? V.localeCompare(j) : Z === -1 ? 1 : B === -1 ? -1 : Z - B;
2451
+ }).map((V) => {
2452
+ const j = _.get(V), Z = a(`permissionSet.categoryLabels.${V}`, V), B = /* @__PURE__ */ new Map();
2453
+ for (const Y of j) {
2454
+ const fe = O.get(Y.value);
2455
+ fe && B.set(Y.value, fe.actions);
2456
+ }
2457
+ const te = j.some((Y) => {
2458
+ const fe = B.get(Y.value);
2459
+ return fe && fe.length > 1;
2460
+ }), z = te ? [
2461
+ ...new Set(
2462
+ j.flatMap((Y) => B.get(Y.value) ?? []).filter((Y) => Y !== "manage")
2463
+ )
2464
+ ] : [], de = /* @__PURE__ */ new Map();
2465
+ for (const Y of e.value)
2466
+ j.some((fe) => fe.value === Y.subject) && !Y.inverted && de.set(Y.subject, new Set(Y.actions));
2467
+ const ve = te ? e.value.filter(
2468
+ (Y) => j.some((fe) => fe.value === Y.subject) && !Y.inverted && Y.actions.includes("manage")
2469
+ ).map((Y) => Y.subject) : e.value.filter((Y) => j.some((fe) => fe.value === Y.subject) && !Y.inverted).map((Y) => Y.subject), he = j.find((Y) => {
2470
+ var fe;
2471
+ return (fe = O.get(Y.value)) == null ? void 0 : fe.isCategoryCover;
2472
+ }), ae = (he == null ? void 0 : he.value) ?? null, le = ae ? de.get(ae) ?? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set(), ke = le.has("manage");
2473
+ return {
2474
+ category: V,
2475
+ label: Z,
2476
+ options: j,
2477
+ selectedSubjects: ve,
2478
+ isMultiAction: te,
2479
+ actionColumns: z,
2480
+ permissionActionsMap: B,
2481
+ selectedActionsMap: de,
2482
+ coverSubject: ae,
2483
+ coverSelectedActions: le,
2484
+ coverCoversAll: ke
2485
+ };
2486
+ });
2487
+ });
2488
+ function i(_, O) {
2489
+ const P = d.value.find((z) => z.category === _), F = (P == null ? void 0 : P.options) ?? [], D = new Set(F.map((z) => z.value)), V = new Set(O), j = /* @__PURE__ */ new Map();
2490
+ for (const z of e.value)
2491
+ D.has(z.subject) && !z.inverted && j.set(z.subject, z.conditions);
2492
+ const Z = P != null && P.coverSubject ? j.get(P.coverSubject) : void 0, B = /* @__PURE__ */ new Set(), te = t.value.flatMap(
2493
+ ({ category: z, showByFeatureFlag: de, isCategoryCover: ve, ...he }) => {
2494
+ const ae = he.subject;
2495
+ if (!V.has(ae) || B.has(ae)) return [];
2496
+ B.add(ae);
2497
+ let le;
2498
+ return j.has(ae) ? le = j.get(ae) : P != null && P.coverSubject && ae !== P.coverSubject && (le = Z), [
2499
+ { ...he, ...le !== void 0 && { conditions: le } }
2500
+ ];
2501
+ }
2502
+ );
2503
+ r("update:model-value", [
2504
+ ...e.value.filter((z) => !D.has(z.subject)),
2505
+ ...te
2506
+ ]);
2507
+ }
2508
+ function b(_, O) {
2509
+ return w(_, O) || m(_, O);
2510
+ }
2511
+ function E(_) {
2512
+ return _.options.length > 0 && _.options.every((O) => b(_, O.value));
2513
+ }
2514
+ function C(_) {
2515
+ return _.options.length === 0 || E(_) ? !1 : _.options.some(
2516
+ (O) => b(_, O.value) || A(_, O.value).length > 0
2517
+ );
2518
+ }
2519
+ function T(_) {
2520
+ const O = new Set(_.options.map((F) => F.value)), P = e.value.filter((F) => !O.has(F.subject));
2521
+ if (E(_))
2522
+ r("update:model-value", P);
2523
+ else {
2524
+ const F = /* @__PURE__ */ new Map();
2525
+ for (const Z of e.value)
2526
+ O.has(Z.subject) && !Z.inverted && F.set(Z.subject, Z.conditions);
2527
+ const D = _.coverSubject ? F.get(_.coverSubject) : void 0, V = /* @__PURE__ */ new Set(), j = t.value.flatMap(
2528
+ ({ category: Z, showByFeatureFlag: B, isCategoryCover: te, ...z }) => {
2529
+ const de = z.subject;
2530
+ if (!O.has(de) || V.has(de)) return [];
2531
+ V.add(de);
2532
+ let ve;
2533
+ return F.has(de) ? ve = F.get(de) : _.coverSubject && de !== _.coverSubject && (ve = D), [
2534
+ { ...z, ...ve !== void 0 && { conditions: ve } }
2535
+ ];
2536
+ }
2537
+ );
2538
+ r("update:model-value", [...P, ...j]);
2539
+ }
2540
+ }
2541
+ function w(_, O) {
2542
+ const P = _.selectedActionsMap.get(O);
2543
+ return P ? P.has("manage") : !1;
2544
+ }
2545
+ function A(_, O) {
2546
+ const P = _.permissionActionsMap.get(O);
2547
+ return P ? P.filter((D) => D !== "manage").filter(
2548
+ (D) => R(_, O, D) || g(_, O, D)
2549
+ ) : [];
2550
+ }
2551
+ function L(_, O) {
2552
+ return m(_, O) ? !1 : !w(_, O) && A(_, O).length > 0;
2553
+ }
2554
+ function M(_, O) {
2555
+ if (!_.coverSubject || O === _.coverSubject) return;
2556
+ const P = e.value.find(
2557
+ (F) => !F.inverted && F.subject === _.coverSubject
2558
+ );
2559
+ return (P == null ? void 0 : P.conditions) || void 0;
2560
+ }
2561
+ function p(_, O, P) {
2562
+ if (P) {
2563
+ const F = t.value.find((z) => z.subject === O);
2564
+ if (!F) return;
2565
+ const {
2566
+ category: D,
2567
+ showByFeatureFlag: V,
2568
+ isCategoryCover: j,
2569
+ ...Z
2570
+ } = F, B = M(_, O), te = e.value.filter((z) => z.subject !== O);
2571
+ te.push({
2572
+ ...Z,
2573
+ ...B !== void 0 && { conditions: B }
2574
+ }), r("update:model-value", te);
2575
+ } else
2576
+ r(
2577
+ "update:model-value",
2578
+ e.value.filter((F) => F.subject !== O)
2579
+ );
2580
+ }
2581
+ function h(_, O) {
2582
+ const P = _.permissionActionsMap.get(O);
2583
+ return P ? P.some((F) => F !== "manage") : !1;
2584
+ }
2585
+ function R(_, O, P) {
2586
+ const F = _.selectedActionsMap.get(O);
2587
+ return F ? F.has(P) : !1;
2588
+ }
2589
+ function m(_, O) {
2590
+ return !_.coverSubject || O === _.coverSubject ? !1 : _.coverCoversAll;
2591
+ }
2592
+ function g(_, O, P) {
2593
+ return !_.coverSubject || O === _.coverSubject ? !1 : _.coverCoversAll ? !0 : _.coverSelectedActions.has(P);
2594
+ }
2595
+ function I(_, O, P) {
2596
+ const F = _.permissionActionsMap.get(O);
2597
+ return F ? F.includes(P) : !1;
2598
+ }
2599
+ function v(_, O, P) {
2600
+ const F = [...e.value], D = F.findIndex((j) => j.subject === _ && !j.inverted);
2601
+ if (P)
2602
+ if (D >= 0) {
2603
+ const j = { ...F[D] }, Z = new Set(j.actions);
2604
+ Z.add(O), j.actions = Array.from(Z), F[D] = j;
2605
+ } else {
2606
+ const j = t.value.find((he) => he.subject === _);
2607
+ if (!j) return;
2608
+ const {
2609
+ category: Z,
2610
+ showByFeatureFlag: B,
2611
+ isCategoryCover: te,
2612
+ ...z
2613
+ } = j, de = d.value.find(
2614
+ (he) => he.options.some((ae) => ae.value === _)
2615
+ ), ve = de ? M(de, _) : void 0;
2616
+ F.push({
2617
+ ...z,
2618
+ actions: [O],
2619
+ ...ve !== void 0 && { conditions: ve }
2620
+ });
2621
+ }
2622
+ else if (D >= 0) {
2623
+ const j = { ...F[D] }, Z = j.actions.filter((B) => B !== O);
2624
+ Z.length === 0 ? F.splice(D, 1) : (j.actions = Z, F[D] = j);
2625
+ }
2626
+ const V = t.value.find((j) => j.subject === _);
2627
+ V && An(F, _, V.actions), r("update:model-value", F);
2628
+ }
2629
+ function k(_, O) {
2630
+ const P = _.options.filter(
2631
+ (F) => I(_, F.value, O)
2632
+ );
2633
+ return P.length === 0 ? !1 : P.every(
2634
+ (F) => R(_, F.value, O) || g(_, F.value, O)
2635
+ );
2636
+ }
2637
+ function S(_, O) {
2638
+ const P = _.options.filter(
2639
+ (D) => I(_, D.value, O)
2640
+ );
2641
+ if (P.length === 0) return !1;
2642
+ const F = P.filter(
2643
+ (D) => R(_, D.value, O) || g(_, D.value, O)
2644
+ ).length;
2645
+ return F > 0 && F < P.length;
2646
+ }
2647
+ function H(_, O, P) {
2648
+ const F = [...e.value];
2649
+ for (const D of _.options) {
2650
+ if (!I(_, D.value, O)) continue;
2651
+ const V = D.value, j = F.findIndex(
2652
+ (B) => B.subject === V && !B.inverted
2653
+ );
2654
+ if (P)
2655
+ if (j >= 0) {
2656
+ const B = { ...F[j] }, te = new Set(B.actions);
2657
+ te.add(O), B.actions = Array.from(te), F[j] = B;
2658
+ } else {
2659
+ const B = t.value.find((ae) => ae.subject === V);
2660
+ if (!B) continue;
2661
+ const {
2662
+ category: te,
2663
+ showByFeatureFlag: z,
2664
+ isCategoryCover: de,
2665
+ ...ve
2666
+ } = B, he = M(_, V);
2667
+ F.push({
2668
+ ...ve,
2669
+ actions: [O],
2670
+ ...he !== void 0 && { conditions: he }
2671
+ });
2672
+ }
2673
+ else if (j >= 0) {
2674
+ const B = { ...F[j] }, te = B.actions.filter((z) => z !== O);
2675
+ te.length === 0 ? F.splice(j, 1) : (B.actions = te, F[j] = B);
2676
+ }
2677
+ const Z = t.value.find((B) => B.subject === V);
2678
+ Z && An(F, V, Z.actions);
2679
+ }
2680
+ r("update:model-value", F);
2681
+ }
2682
+ function x(_) {
2683
+ const O = `permissionSet.actionLabels.${_}`, P = Pa[_] ?? _.charAt(0).toUpperCase() + _.slice(1);
2684
+ return a(O, P);
2685
+ }
2686
+ return {
2687
+ categoryGroups: d,
2688
+ toggleCategory: i,
2689
+ isAllManageChecked: E,
2690
+ isAllManageIndeterminate: C,
2691
+ toggleAllManage: T,
2692
+ isManageChecked: w,
2693
+ isManageIndeterminate: L,
2694
+ toggleManage: p,
2695
+ hasNonManageActions: h,
2696
+ isActionChecked: R,
2697
+ isRowFullyCoveredByCover: m,
2698
+ isActionCoveredByCover: g,
2699
+ permissionDefinesAction: I,
2700
+ toggleAction: v,
2701
+ isAllActionChecked: k,
2702
+ isAllActionIndeterminate: S,
2703
+ toggleAllAction: H,
2704
+ actionLabel: x
2705
+ };
2706
+ }
2707
+ const Ua = { class: "flex flex-col gap-16" }, xa = { class: "mt-16" }, Va = { class: "text-center text-sm font-semibold text-fm-color-typo-primary" }, Ga = ["onClick"], Wa = { class: "flex justify-center" }, Za = { class: "flex items-center min-w-0 gap-8" }, Ya = ["title", "onClick"], Ba = { class: "flex justify-center" }, Xa = /* @__PURE__ */ Le({
2708
+ __name: "BasePermission",
2709
+ props: {
2710
+ modelValue: {
2711
+ type: Array,
2712
+ required: !0
2713
+ },
2714
+ disable: {
2715
+ type: Boolean,
2716
+ default: !1
2717
+ },
2718
+ excludedSubjects: {
2719
+ type: Array,
2720
+ required: !0
2721
+ },
2722
+ additionalPermissions: {
2723
+ type: Array,
2724
+ default: () => []
2725
+ },
2726
+ /** 'leading': the member sheet's layout, collapsed with the count under each category. */
2727
+ layout: {
2728
+ type: String,
2729
+ default: "trailing"
2730
+ }
2731
+ },
2732
+ emits: ["update:model-value"],
2733
+ setup(e, { emit: t }) {
2734
+ const n = e, r = t, { t: a } = Ke(), o = K(() => [...Gn, ...n.additionalPermissions]), {
2735
+ categoryGroups: f,
2736
+ isAllManageChecked: d,
2737
+ isAllManageIndeterminate: i,
2738
+ toggleAllManage: b,
2739
+ isManageChecked: E,
2740
+ isManageIndeterminate: C,
2741
+ toggleManage: T,
2742
+ isActionChecked: w,
2743
+ isRowFullyCoveredByCover: A,
2744
+ isActionCoveredByCover: L,
2745
+ permissionDefinesAction: M,
2746
+ toggleAction: p,
2747
+ isAllActionChecked: h,
2748
+ isAllActionIndeterminate: R,
2749
+ toggleAllAction: m,
2750
+ actionLabel: g
2751
+ } = ja(
2752
+ qt(n, "modelValue"),
2753
+ o,
2754
+ qt(n, "excludedSubjects"),
2755
+ (k, S) => r("update:model-value", S)
2756
+ );
2757
+ function I(k) {
2758
+ const S = k.selectedSubjects.length;
2759
+ return S === 0 && n.layout !== "leading" ? "" : a("team.memberForm.permissions.allowedCount", { count: S });
2760
+ }
2761
+ function v(k, S) {
2762
+ return E(k, S) || A(k, S) ? !0 : k.actionColumns.some(
2763
+ (H) => M(k, S, H) && (w(k, S, H) || L(k, S, H))
2764
+ );
2765
+ }
2766
+ return (k, S) => {
2767
+ const H = we("FmCheckbox");
2768
+ return $(), re("div", Ua, [
2769
+ ($(!0), re(Me, null, Ee(X(f), (x) => ($(), Ce(Bt, {
2770
+ key: x.category,
2771
+ subtitle: I(x),
2772
+ layout: e.layout,
2773
+ "initially-collapsed": e.layout === "leading"
2774
+ }, {
2775
+ title: ce(() => [
2776
+ ie("p", {
2777
+ class: Ie(e.layout === "leading" ? "text-[18px] font-semibold leading-[24px] tracking-[-0.27px]" : "fm-typo-en-title-sm-600")
2778
+ }, Oe(x.label), 3)
2779
+ ]),
2780
+ default: ce(() => [
2781
+ ie("div", xa, [
2782
+ ie("div", {
2783
+ class: "grid items-center px-12 py-8",
2784
+ style: rt({
2785
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${x.actionColumns.length + 1}, 80px)`
2786
+ })
2787
+ }, [
2788
+ S[0] || (S[0] = ie("div", null, null, -1)),
2789
+ ie("div", Va, Oe(X(a)("team.memberForm.permissions.columnManage")), 1),
2790
+ ($(!0), re(Me, null, Ee(x.actionColumns, (_) => ($(), re("div", {
2791
+ key: `header-${_}`,
2792
+ class: "text-center text-sm font-semibold text-fm-color-typo-primary"
2793
+ }, Oe(X(g)(_)), 1))), 128))
2794
+ ], 4),
2795
+ ie("div", {
2796
+ class: "grid items-center bg-fm-color-neutral-gray-100 px-12 py-8",
2797
+ style: rt({
2798
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${x.actionColumns.length + 1}, 80px)`
2799
+ })
2800
+ }, [
2801
+ ie("div", {
2802
+ class: "cursor-pointer font-semibold",
2803
+ onClick: (_) => !e.disable && X(b)(x)
2804
+ }, Oe(X(a)("team.labels.all")), 9, Ga),
2805
+ ie("div", Wa, [
2806
+ oe(H, {
2807
+ "model-value": X(d)(x),
2808
+ indeterminate: X(i)(x),
2809
+ value: !0,
2810
+ disabled: e.disable,
2811
+ size: "sm",
2812
+ dense: "",
2813
+ "onUpdate:modelValue": (_) => X(b)(x)
2814
+ }, null, 8, ["model-value", "indeterminate", "disabled", "onUpdate:modelValue"])
2815
+ ]),
2816
+ ($(!0), re(Me, null, Ee(x.actionColumns, (_) => ($(), re("div", {
2817
+ key: `all-${_}`,
2818
+ class: "flex justify-center"
2819
+ }, [
2820
+ oe(H, {
2821
+ "model-value": X(h)(x, _),
2822
+ indeterminate: X(R)(x, _),
2823
+ value: _,
2824
+ disabled: e.disable,
2825
+ size: "sm",
2826
+ dense: "",
2827
+ "onUpdate:modelValue": (O) => X(m)(x, _, O)
2828
+ }, null, 8, ["model-value", "indeterminate", "value", "disabled", "onUpdate:modelValue"])
2829
+ ]))), 128))
2830
+ ], 4),
2831
+ S[1] || (S[1] = ie("div", { class: "h-px bg-fm-color-neutral-gray-200" }, null, -1)),
2832
+ ($(!0), re(Me, null, Ee(x.options, (_) => ($(), re("div", {
2833
+ key: _.optionKey,
2834
+ class: "grid items-center rounded px-12 py-8 transition-colors hover:bg-fm-color-neutral-gray-100",
2835
+ style: rt({
2836
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${x.actionColumns.length + 1}, 80px)`
2837
+ })
2838
+ }, [
2839
+ ie("div", Za, [
2840
+ ie("span", {
2841
+ class: "block truncate cursor-pointer",
2842
+ title: _.label,
2843
+ onClick: (O) => !e.disable && !X(A)(x, _.value) && X(T)(x, _.value, !X(E)(x, _.value))
2844
+ }, Oe(_.label), 9, Ya),
2845
+ Re(k.$slots, `checkbox-${_.value}-append`, {
2846
+ option: _,
2847
+ isEffectiveSelected: v(x, _.value),
2848
+ isCoveredByCover: X(A)(x, _.value) || x.actionColumns.some((O) => X(L)(x, _.value, O))
2849
+ }),
2850
+ Re(k.$slots, `checkbox-${_.value}-icon`, {
2851
+ option: _,
2852
+ isEffectiveSelected: v(x, _.value),
2853
+ isCoveredByCover: X(A)(x, _.value) || x.actionColumns.some((O) => X(L)(x, _.value, O))
2854
+ })
2855
+ ]),
2856
+ ie("div", Ba, [
2857
+ oe(H, {
2858
+ "model-value": X(E)(x, _.value) || X(A)(x, _.value),
2859
+ value: _.value,
2860
+ disabled: e.disable || X(A)(x, _.value),
2861
+ indeterminate: X(C)(x, _.value),
2862
+ size: "sm",
2863
+ "onUpdate:modelValue": (O) => X(T)(x, _.value, O)
2864
+ }, null, 8, ["model-value", "value", "disabled", "indeterminate", "onUpdate:modelValue"])
2865
+ ]),
2866
+ ($(!0), re(Me, null, Ee(x.actionColumns, (O) => ($(), re("div", {
2867
+ key: `${_.optionKey}-${O}`,
2868
+ class: "flex justify-center"
2869
+ }, [
2870
+ X(M)(x, _.value, O) ? ($(), Ce(H, {
2871
+ key: 0,
2872
+ "model-value": X(w)(x, _.value, O) || X(L)(x, _.value, O),
2873
+ value: O,
2874
+ disabled: e.disable || X(L)(x, _.value, O),
2875
+ size: "sm",
2876
+ "onUpdate:modelValue": (P) => X(p)(_.value, O, P)
2877
+ }, null, 8, ["model-value", "value", "disabled", "onUpdate:modelValue"])) : Ne("", !0)
2878
+ ]))), 128))
2879
+ ], 4))), 128))
2880
+ ])
2881
+ ]),
2882
+ _: 2
2883
+ }, 1032, ["subtitle", "layout", "initially-collapsed"]))), 128))
2884
+ ]);
2885
+ };
2886
+ }
2887
+ }), Ha = { class: "space-y-16" }, $a = {
2888
+ key: 0,
2889
+ class: "flex fm-typo-en-title-sm-600"
2890
+ }, Ja = {
2891
+ key: 0,
2892
+ class: "q-mr-xs text-red col"
2893
+ }, Ka = { class: "form-input" }, za = /* @__PURE__ */ Le({
2894
+ __name: "AppForm",
2895
+ props: {
2896
+ title: {
2897
+ type: String,
2898
+ default: void 0
2899
+ },
2900
+ required: {
2901
+ type: [Boolean, String],
2902
+ default: !1
2903
+ },
2904
+ inline: {
2905
+ type: Boolean,
2906
+ default: !1
2907
+ }
2908
+ },
2909
+ setup(e) {
2910
+ const t = e;
2911
+ return (n, r) => ($(), re("div", Ha, [
2912
+ Re(n.$slots, "top", {}, () => [
2913
+ t.title ? ($(), re("div", $a, [
2914
+ ie("div", null, [
2915
+ t.required ? ($(), re("span", Ja, "*")) : Ne("", !0),
2916
+ _r(Oe(t.title), 1)
2917
+ ]),
2918
+ Re(n.$slots, "title-right")
2919
+ ])) : Ne("", !0)
2920
+ ]),
2921
+ ie("div", Ka, [
2922
+ Re(n.$slots, "default")
2923
+ ])
2924
+ ]));
2925
+ }
2926
+ }), Qa = { class: "col flex items-center" }, qa = {
2927
+ key: 1,
2928
+ class: "q-pa-sm form-error-message text-error"
2929
+ }, ir = /* @__PURE__ */ Le({
2930
+ __name: "CheckboxInput",
2931
+ props: {
2932
+ options: {
2933
+ type: Array,
2934
+ required: !0
2935
+ },
2936
+ title: {
2937
+ type: String,
2938
+ required: !0
2939
+ },
2940
+ modelValue: {
2941
+ type: Array,
2942
+ required: !0
2943
+ },
2944
+ showAllToggle: {
2945
+ type: [Boolean, String],
2946
+ default: !0
2947
+ },
2948
+ includeDisabledOptionsWhenSelectAll: {
2949
+ type: Boolean,
2950
+ default: !1
2951
+ },
2952
+ disable: {
2953
+ type: Boolean,
2954
+ default: !1
2955
+ },
2956
+ min: {
2957
+ type: Number,
2958
+ default: 0
2959
+ },
2960
+ max: {
2961
+ type: Number,
2962
+ default: void 0
2963
+ },
2964
+ showIntermediate: {
2965
+ type: Boolean,
2966
+ default: !0
2967
+ },
2968
+ gutter: {
2969
+ type: Number,
2970
+ default: void 0
2971
+ },
2972
+ falsyShowSlot: {
2973
+ type: Boolean,
2974
+ default: !1
2975
+ },
2976
+ bottomSlotIndent: {
2977
+ type: String,
2978
+ default: "36px"
2979
+ },
2980
+ alignCenter: {
2981
+ type: Boolean,
2982
+ default: !0
2983
+ }
2984
+ },
2985
+ emits: ["update:model-value"],
2986
+ setup(e, { emit: t }) {
2987
+ const n = e, r = t, { t: a } = Ke(), o = st(!1), f = pr(), d = K(() => n.modelValue.length < n.min ? `Min selection ${n.min}` : n.max !== void 0 && n.modelValue.length > n.max ? `Max selection ${n.max}` : !0), i = `checkbox-${wr(6)}`, b = K(() => d.value !== !0), E = K(
2988
+ () => n.modelValue.filter((L) => n.options.some((M) => M.value === L))
2989
+ ), C = K(
2990
+ () => typeof n.showAllToggle == "boolean" ? a("team.labels.all") : n.showAllToggle
2991
+ ), T = K(() => n.options.length > 0 && n.options.length === E.value.length);
2992
+ function w() {
2993
+ const L = n.modelValue.filter((M) => !E.value.includes(M));
2994
+ if (T.value === !0)
2995
+ r("update:model-value", L);
2996
+ else {
2997
+ const M = n.includeDisabledOptionsWhenSelectAll ? n.options.map((p) => p.value) : n.options.filter((p) => !p.disabled).map((p) => p.value);
2998
+ r("update:model-value", [...L, ...M]);
2999
+ }
3000
+ }
3001
+ function A(L, M) {
3002
+ let p = Yn(n.modelValue);
3003
+ M ? p.every((h) => h !== L) && p.push(L) : p = p.filter((h) => h !== L), r("update:model-value", p);
3004
+ }
3005
+ return (L, M) => {
3006
+ const p = we("FmCheckbox");
3007
+ return $(), Ce(za, {
3008
+ id: i,
3009
+ title: e.title,
3010
+ required: !1
3011
+ }, {
3012
+ top: ce(() => [
3013
+ Re(L.$slots, "top")
3014
+ ]),
3015
+ default: ce(() => [
3016
+ n.showAllToggle ? ($(), Ce(p, {
3017
+ key: 0,
3018
+ "model-value": T.value,
3019
+ disabled: e.disable,
3020
+ label: C.value,
3021
+ style: rt(`margin-bottom: ${n.gutter}px`),
3022
+ size: "sm",
3023
+ dense: "",
3024
+ value: C.value,
3025
+ "onUpdate:modelValue": w
3026
+ }, null, 8, ["model-value", "disabled", "label", "style", "value"])) : Ne("", !0),
3027
+ ($(!0), re(Me, null, Ee(e.options, (h, R) => ($(), re("div", {
3028
+ key: h.value,
3029
+ style: rt(`margin-bottom: ${R < e.options.length - 1 ? n.gutter : 0}px`),
3030
+ class: Ie(R < e.options.length - 1 ? "q-mb-sm" : "")
3031
+ }, [
3032
+ ie("div", {
3033
+ class: Ie(["row justify-between", e.alignCenter ? "items-center" : "items-start"])
3034
+ }, [
3035
+ ie("div", Qa, [
3036
+ oe(p, {
3037
+ "model-value": e.modelValue.includes(h.value),
3038
+ disabled: e.disable || h.disabled,
3039
+ size: "sm",
3040
+ label: h.label,
3041
+ value: h.label,
3042
+ "onUpdate:modelValue": (m) => A(h.value, m)
3043
+ }, null, 8, ["model-value", "disabled", "label", "value", "onUpdate:modelValue"]),
3044
+ Re(L.$slots, `checkbox-${h.key || h.value}-append`, {
3045
+ option: h,
3046
+ selected: e.modelValue.includes(h.value)
3047
+ })
3048
+ ]),
3049
+ X(f)[`checkbox-${h.key || h.value}-end`] && (e.modelValue.includes(h.value) || e.falsyShowSlot) ? ($(), re("div", {
3050
+ key: 0,
3051
+ class: Ie([{ "q-checkbox disabled": e.disable || h.disabled }, "col"])
3052
+ }, [
3053
+ Re(L.$slots, `checkbox-${h.key || h.value}-end`, {
3054
+ option: h,
3055
+ value: e.modelValue.includes(h.value),
3056
+ disable: e.disable || h.disabled
3057
+ })
3058
+ ], 2)) : Ne("", !0)
3059
+ ], 2),
3060
+ X(f)[`checkbox-${h.key || h.value}-bottom`] && (e.modelValue.includes(h.value) || e.falsyShowSlot) ? ($(), re("div", {
3061
+ key: 0,
3062
+ class: Ie(["q-mt-sm", { "q-checkbox disabled": e.disable || h.disabled }]),
3063
+ style: rt(`margin-left: ${e.bottomSlotIndent}`)
3064
+ }, [
3065
+ Re(L.$slots, `checkbox-${h.key || h.value}-bottom`, {
3066
+ option: h,
3067
+ disable: e.disable || h.disabled,
3068
+ value: e.modelValue.includes(h.value)
3069
+ })
3070
+ ], 6)) : Ne("", !0)
3071
+ ], 6))), 128)),
3072
+ o.value && b.value ? ($(), re("div", qa, Oe(d.value), 1)) : Ne("", !0)
3073
+ ]),
3074
+ _: 3
3075
+ }, 8, ["title"]);
3076
+ };
3077
+ }
3078
+ }), ht = "includedFuture", wn = /* @__PURE__ */ Le({
3079
+ __name: "ConditionPermission",
3080
+ props: {
3081
+ modelValue: {
3082
+ type: Array,
3083
+ default: null
3084
+ },
3085
+ options: {
3086
+ type: Array,
3087
+ required: !0
3088
+ },
3089
+ disable: {
3090
+ type: Boolean,
3091
+ default: !1
3092
+ },
3093
+ context: {
3094
+ type: String,
3095
+ required: !0
3096
+ },
3097
+ /** 'leading': the member sheet's layout, with the chosen names under the title. */
3098
+ layout: {
3099
+ type: String,
3100
+ default: "trailing"
3101
+ }
3102
+ },
3103
+ emits: ["update:model-value"],
3104
+ setup(e, { emit: t }) {
3105
+ const n = e, r = t, { t: a } = Ke(), o = K(() => [
3106
+ {
3107
+ label: a("team.memberForm.permissions.includedFuture", { context: n.context }),
3108
+ value: ht,
3109
+ // Can only be selected if all other options are selected
3110
+ disabled: !!n.modelValue && n.options.length > n.modelValue.length
3111
+ },
3112
+ ...n.options.filter(
3113
+ (E) => E.label.toLocaleLowerCase().includes(b.value.toLocaleLowerCase())
3114
+ )
3115
+ ]), f = K(() => n.modelValue ? n.modelValue : [ht, ...n.options.map((E) => E.value)]), d = K(() => {
3116
+ if (n.layout === "leading") {
3117
+ const C = n.modelValue ? n.options.filter((T) => n.modelValue.includes(T.value)).map((T) => T.label) : null;
3118
+ return Bn(C, {
3119
+ all: a("team.labels.all"),
3120
+ none: a("team.labels.none"),
3121
+ more: (T) => a("team.labels.more", { count: T })
3122
+ });
3123
+ }
3124
+ const E = f.value.filter((C) => C !== ht).length;
3125
+ return E === 0 ? "" : a("team.memberForm.permissions.allowedCount", { count: E });
3126
+ });
3127
+ function i(E) {
3128
+ const C = E.length === o.value.length;
3129
+ r("update:model-value", C ? null : E.filter((T) => T !== ht));
3130
+ }
3131
+ const b = st("");
3132
+ return (E, C) => {
3133
+ const T = we("fm-search");
3134
+ return $(), Ce(Bt, {
3135
+ subtitle: d.value,
3136
+ layout: e.layout,
3137
+ "initially-collapsed": e.layout === "leading"
3138
+ }, {
3139
+ title: ce(() => [
3140
+ ie("p", {
3141
+ class: Ie(
3142
+ e.layout === "leading" ? "text-[18px] font-semibold leading-[24px] tracking-[-0.27px]" : "fm-typo-en-title-sm-600"
3143
+ )
3144
+ }, Oe(X(a)("team.memberForm.permissions.manageable", { context: e.context })), 3)
3145
+ ]),
3146
+ default: ce(() => [
3147
+ e.options.length > 1 ? ($(), Ce(T, {
3148
+ key: 0,
3149
+ modelValue: b.value,
3150
+ "onUpdate:modelValue": C[0] || (C[0] = (w) => b.value = w),
3151
+ class: "mt-16",
3152
+ placeholder: X(a)("team.memberForm.permissions.search", { context: e.context })
3153
+ }, null, 8, ["modelValue", "placeholder"])) : Ne("", !0),
3154
+ oe(ir, {
3155
+ "model-value": f.value,
3156
+ options: o.value,
3157
+ "show-intermediate": !1,
3158
+ "show-all-toggle": !0,
3159
+ disable: e.disable,
3160
+ "include-disabled-options-when-select-all": !0,
3161
+ title: "",
3162
+ class: "mt-16",
3163
+ "onUpdate:modelValue": i
3164
+ }, tt({ _: 2 }, [
3165
+ Ee(o.value, (w) => ({
3166
+ name: `checkbox-${w.value}-append`,
3167
+ fn: ce(({ option: A }) => [
3168
+ Re(E.$slots, `checkbox-${w.value}-append`, { option: A })
3169
+ ])
3170
+ }))
3171
+ ]), 1032, ["model-value", "options", "disable"])
3172
+ ]),
3173
+ _: 3
3174
+ }, 8, ["subtitle", "layout", "initially-collapsed"]);
3175
+ };
3176
+ }
3177
+ }), bt = "includedNewRole", eo = /* @__PURE__ */ Le({
3178
+ __name: "PosRolePermission",
3179
+ props: {
3180
+ modelValue: {
3181
+ type: Array,
3182
+ default: null
3183
+ },
3184
+ roles: {
3185
+ type: Array,
3186
+ required: !0
3187
+ },
3188
+ restaurantIds: {
3189
+ type: Array,
3190
+ default: null
3191
+ },
3192
+ disable: {
3193
+ type: Boolean,
3194
+ default: !1
3195
+ },
3196
+ /** 'leading': the member sheet's layout, with the chosen roles under the title. */
3197
+ layout: {
3198
+ type: String,
3199
+ default: "trailing"
3200
+ }
3201
+ },
3202
+ emits: ["update:model-value"],
3203
+ setup(e, { emit: t }) {
3204
+ const n = e, r = t, { t: a } = Ke(), o = K(() => {
3205
+ const b = n.restaurantIds;
3206
+ return [
3207
+ {
3208
+ label: a("team.memberForm.permissions.includedNewRole"),
3209
+ value: bt,
3210
+ disabled: !!n.modelValue && n.roles.length > n.modelValue.length
3211
+ },
3212
+ ...n.roles.map((E) => ({
3213
+ label: E.name,
3214
+ value: E._id,
3215
+ disabled: !!b && E.restaurants.every(({ id: C }) => !b.includes(C))
3216
+ }))
3217
+ ];
3218
+ }), f = K(() => n.modelValue ? n.modelValue : [bt, ...n.roles.map((b) => b._id)]), d = K(() => {
3219
+ if (n.layout === "leading") {
3220
+ const E = n.modelValue ? n.roles.filter((C) => n.modelValue.includes(C._id)).map((C) => C.name) : null;
3221
+ return Bn(E, {
3222
+ all: a("team.labels.all"),
3223
+ none: a("team.labels.none"),
3224
+ more: (C) => a("team.labels.more", { count: C })
3225
+ });
3226
+ }
3227
+ const b = f.value.filter((E) => E !== bt).length;
3228
+ return b === 0 ? "" : a("team.memberForm.permissions.allowedCount", { count: b });
3229
+ });
3230
+ function i(b) {
3231
+ const E = b.length === o.value.length;
3232
+ r("update:model-value", E ? null : b.filter((C) => C !== bt));
3233
+ }
3234
+ return (b, E) => ($(), Ce(Bt, {
3235
+ subtitle: d.value,
3236
+ layout: e.layout,
3237
+ "initially-collapsed": e.layout === "leading"
3238
+ }, {
3239
+ title: ce(() => [
3240
+ ie("p", {
3241
+ class: Ie(
3242
+ e.layout === "leading" ? "text-[18px] font-semibold leading-[24px] tracking-[-0.27px]" : "fm-typo-en-title-sm-600"
3243
+ )
3244
+ }, Oe(X(a)("team.memberForm.permissions.roles")), 3)
3245
+ ]),
3246
+ default: ce(() => [
3247
+ oe(ir, {
3248
+ "model-value": f.value,
3249
+ options: o.value,
3250
+ "show-intermediate": !1,
3251
+ "show-all-toggle": !1,
3252
+ disable: e.disable,
3253
+ title: "",
3254
+ class: "mt-16",
3255
+ "onUpdate:modelValue": i
3256
+ }, tt({ _: 2 }, [
3257
+ Ee(o.value, (C) => ({
3258
+ name: `checkbox-${C.value}-append`,
3259
+ fn: ce(({ option: T }) => [
3260
+ Re(b.$slots, `checkbox-${C.value}-append`, { option: T })
3261
+ ])
3262
+ }))
3263
+ ]), 1032, ["model-value", "options", "disable"])
3264
+ ]),
3265
+ _: 3
3266
+ }, 8, ["subtitle", "layout", "initially-collapsed"]));
3267
+ }
3268
+ }), to = {
3269
+ key: 0,
3270
+ class: "flex flex-col gap-8"
3271
+ }, no = {
3272
+ key: 0,
3273
+ class: "ml-32",
3274
+ style: { "font-size": "12px", "line-height": "16px", color: "#8a8f98", "font-weight": "400" }
3275
+ }, ro = {
3276
+ key: 0,
3277
+ class: "ml-32"
3278
+ }, Dn = /* @__PURE__ */ Le({
3279
+ __name: "PortalConditionForm",
3280
+ props: {
3281
+ entry: {},
3282
+ builders: {},
3283
+ subject: {},
3284
+ timeZone: {},
3285
+ coverOverride: {},
3286
+ inheritModeFor: {},
3287
+ formValueFor: {},
3288
+ hasChanges: { type: Boolean },
3289
+ disable: { type: Boolean, default: !1 },
3290
+ fullWidth: { type: Boolean, default: !1 },
3291
+ title: { default: "" }
3292
+ },
3293
+ emits: ["update-inherit-mode", "update-form", "apply"],
3294
+ setup(e, { emit: t }) {
3295
+ const n = t, { t: r } = Ke();
3296
+ return (a, o) => {
3297
+ const f = we("FmRadio"), d = we("FmRadioGroup");
3298
+ return $(), Ce(Rr, {
3299
+ title: e.title,
3300
+ builders: e.builders,
3301
+ "form-value-for": e.formValueFor,
3302
+ "has-changes": e.hasChanges,
3303
+ disable: e.disable,
3304
+ "full-width": e.fullWidth,
3305
+ onUpdateForm: o[0] || (o[0] = (i) => n("update-form", i)),
3306
+ onApply: o[1] || (o[1] = (i) => n("apply"))
3307
+ }, {
3308
+ section: ce(({ builder: i }) => [
3309
+ e.coverOverride.shouldShowInheritToggle(e.entry, i) ? ($(), re("div", to, [
3310
+ oe(d, {
3311
+ "model-value": e.inheritModeFor(i),
3312
+ disabled: e.disable,
3313
+ "onUpdate:modelValue": (b) => n("update-inherit-mode", { builder: i, mode: b })
3314
+ }, {
3315
+ default: ce(() => [
3316
+ ie("div", null, [
3317
+ oe(f, {
3318
+ value: "inherit",
3319
+ label: X(r)("team.memberForm.permissions.conditionCover.inherit", {
3320
+ cover: e.coverOverride.coverLabel(e.subject)
3321
+ })
3322
+ }, null, 8, ["label"]),
3323
+ e.coverOverride.inheritedSummary(e.entry, i, e.timeZone) ? ($(), re("p", no, " (" + Oe(X(r)(
3324
+ e.coverOverride.inheritedSummary(e.entry, i, e.timeZone).labelKey,
3325
+ e.coverOverride.inheritedSummary(e.entry, i, e.timeZone).params ?? {}
3326
+ )) + ") ", 1)) : Ne("", !0)
3327
+ ]),
3328
+ oe(f, {
3329
+ value: "custom",
3330
+ label: X(r)("team.memberForm.permissions.conditionCover.custom")
3331
+ }, null, 8, ["label"])
3332
+ ]),
3333
+ _: 2
3334
+ }, 1032, ["model-value", "disabled", "onUpdate:modelValue"]),
3335
+ e.inheritModeFor(i) === "custom" ? ($(), re("div", ro, [
3336
+ oe(nn, {
3337
+ builder: i,
3338
+ "model-value": e.formValueFor(i),
3339
+ disable: e.disable,
3340
+ "onUpdate:modelValue": (b) => n("update-form", { builder: i, form: b })
3341
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"])
3342
+ ])) : Ne("", !0)
3343
+ ])) : ($(), Ce(nn, {
3344
+ key: 1,
3345
+ builder: i,
3346
+ "model-value": e.formValueFor(i),
3347
+ disable: e.disable,
3348
+ "onUpdate:modelValue": (b) => n("update-form", { builder: i, form: b })
3349
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"]))
3350
+ ]),
3351
+ _: 1
3352
+ }, 8, ["title", "builders", "form-value-for", "has-changes", "disable", "full-width"]);
3353
+ };
3354
+ }
3355
+ }), so = {
3356
+ async readWarehouses() {
3357
+ return Ar(await Mr().get("/warehouses"));
3358
+ }
3359
+ };
3360
+ function Fn(e, t) {
3361
+ return Wn(e, Zn).some(
3362
+ (n) => n.subject === t && !n.inverted && n.actions.includes("manage")
3363
+ );
3364
+ }
3365
+ function Pn(e, t) {
3366
+ return e.some((n) => n.subject === t && n.inverted) ? e : [...e, { subject: t, actions: ["manage"], inverted: !0 }];
3367
+ }
3368
+ function jn(e, t, n) {
3369
+ const { category: r, showByFeatureFlag: a, isCategoryCover: o, ...f } = e;
3370
+ return {
3371
+ ...f,
3372
+ actions: t,
3373
+ ...n !== void 0 && { conditions: n }
3374
+ };
3375
+ }
3376
+ function ao(e, t, n, r) {
3377
+ const a = new Set(
3378
+ e.filter((i) => !i.inverted).map((i) => i.subject)
3379
+ ), o = new Set(
3380
+ t.filter((i) => !i.inverted).map((i) => i.subject)
3381
+ ), f = new Set(
3382
+ n.filter((i) => !i.inverted).map((i) => i.subject)
3383
+ );
3384
+ let d = [...n];
3385
+ for (const i of a)
3386
+ o.has(i) || (f.has(i) && (d = d.filter((E) => E.subject !== i)), (!f.has(i) || Fn(d, i)) && (d = Pn(d, i)));
3387
+ for (const i of o)
3388
+ if (!a.has(i)) {
3389
+ const b = d.some((E) => E.subject === i && E.inverted);
3390
+ if (d = d.filter((E) => !(E.subject === i && E.inverted)), !b && !f.has(i)) {
3391
+ const E = t.find(
3392
+ (T) => T.subject === i && !T.inverted
3393
+ ), C = r(i);
3394
+ C && E && d.push(jn(C, E.actions, E.conditions));
3395
+ }
3396
+ }
3397
+ for (const i of o) {
3398
+ if (!a.has(i)) continue;
3399
+ const b = e.find((A) => A.subject === i && !A.inverted), E = t.find((A) => A.subject === i && !A.inverted);
3400
+ if (!b || !E) continue;
3401
+ const C = new Set(b.actions), T = new Set(E.actions);
3402
+ if (C.size === T.size && [...C].every((A) => T.has(A)))
3403
+ continue;
3404
+ const w = d.findIndex((A) => A.subject === i && !A.inverted);
3405
+ if (w >= 0)
3406
+ d[w] = {
3407
+ ...d[w],
3408
+ actions: Array.from(T)
3409
+ };
3410
+ else {
3411
+ const A = r(i);
3412
+ A && d.push(jn(A, Array.from(T)));
3413
+ }
3414
+ C.has("manage") && !T.has("manage") && Fn(d, i) && (d = Pn(d, i)), !C.has("manage") && T.has("manage") && (d = d.filter((A) => !(A.subject === i && A.inverted)));
3415
+ }
3416
+ return d;
3417
+ }
3418
+ const oo = {
3419
+ MY: "Asia/Kuala_Lumpur",
3420
+ SG: "Asia/Singapore",
3421
+ TH: "Asia/Bangkok",
3422
+ ID: "Asia/Jakarta",
3423
+ MO: "Asia/Macau",
3424
+ BN: "Asia/Brunei",
3425
+ PK: "Asia/Karachi",
3426
+ MV: "Indian/Maldives",
3427
+ VN: "Asia/Ho_Chi_Minh",
3428
+ JP: "Asia/Tokyo",
3429
+ AU: "Australia/Sydney",
3430
+ AE: "Asia/Dubai",
3431
+ UK: "Europe/London"
3432
+ };
3433
+ function lo(e) {
3434
+ const t = (e || "").toUpperCase();
3435
+ return oo[t] ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
3436
+ }
3437
+ function io(e, t) {
3438
+ return e != null && e.timezone ? e.timezone : e != null && e.timeZone ? e.timeZone : lo((e == null ? void 0 : e.country) ?? t);
3439
+ }
3440
+ function gt(e, t) {
3441
+ return `${e}::${t.builderKey}`;
3442
+ }
3443
+ function Be(e) {
3444
+ try {
3445
+ return e.conditions ? JSON.parse(e.conditions) : void 0;
3446
+ } catch {
3447
+ return;
3448
+ }
3449
+ }
3450
+ function co(e, t) {
3451
+ return e.find((n) => !n.inverted && n.subject === t);
3452
+ }
3453
+ function At(e, t) {
3454
+ const n = new Set(e.actions);
3455
+ return n.has(Ye.Action.manage) ? !0 : t.actions.every((r) => n.has(r));
3456
+ }
3457
+ function Zt(e, t) {
3458
+ const n = Be(e);
3459
+ return wt(n, [{ builder: t, formValue: t.fromCondition(void 0) }]);
3460
+ }
3461
+ function Un(e, t, n) {
3462
+ return {
3463
+ ...Zt(e, n),
3464
+ ...nt(Be(t), n)
3465
+ };
3466
+ }
3467
+ function uo(e, t, n) {
3468
+ const r = st(/* @__PURE__ */ new Set());
3469
+ function a(m) {
3470
+ return yr(m, t.value);
3471
+ }
3472
+ function o(m) {
3473
+ return t.value.find((g) => g.subject === m);
3474
+ }
3475
+ function f(m) {
3476
+ var I;
3477
+ const g = a(m);
3478
+ return g ? (I = o(g)) == null ? void 0 : I.label : void 0;
3479
+ }
3480
+ function d(m) {
3481
+ return co(e.value, m);
3482
+ }
3483
+ function i(m, g) {
3484
+ return nt(Be(m), g);
3485
+ }
3486
+ function b(m, g) {
3487
+ var k;
3488
+ if (!(((k = g.appliesToActions) == null ? void 0 : k.call(g, m.actions)) ?? !0)) return !1;
3489
+ const I = a(m.subject);
3490
+ if (!I) return !1;
3491
+ const v = d(I);
3492
+ return v ? Object.keys(i(v, g)).length > 0 : !1;
3493
+ }
3494
+ function E(m, g) {
3495
+ if (!b(m, g) || r.value.has(gt(m.subject, g))) return "custom";
3496
+ if (m.index === null) return "inherit";
3497
+ const I = e.value[m.index], v = a(m.subject), k = v ? d(v) : void 0;
3498
+ if (I && k) {
3499
+ const S = nt(Be(I), g), H = i(k, g);
3500
+ if (JSON.stringify(S) === JSON.stringify(H)) return "inherit";
3501
+ }
3502
+ return "custom";
3503
+ }
3504
+ function C(m, g, I) {
3505
+ if (!g.summarizeForm) return;
3506
+ const v = a(m.subject);
3507
+ if (!v) return;
3508
+ const k = d(v);
3509
+ if (!k) return;
3510
+ const S = g.fromCondition(i(k, g));
3511
+ return g.summarizeForm(S, { timeZone: I });
3512
+ }
3513
+ function T(m, g) {
3514
+ if (m.index === null) return;
3515
+ const I = [...e.value], v = { ...I[m.index] }, k = Zt(v, g), S = Object.keys(k).length === 0, H = a(m.subject), x = H ? d(H) : void 0, _ = x ? At(x, v) : !1;
3516
+ if (S && _)
3517
+ I.splice(m.index, 1);
3518
+ else if (x) {
3519
+ const O = Un(v, x, g);
3520
+ Object.keys(O).length === 0 ? delete v.conditions : v.conditions = JSON.stringify(O), I[m.index] = v;
3521
+ } else
3522
+ S ? delete v.conditions : v.conditions = JSON.stringify(k), I[m.index] = v;
3523
+ n(I);
3524
+ }
3525
+ function w(m, g, I) {
3526
+ const v = gt(m.subject, g);
3527
+ if (I === "inherit") {
3528
+ const S = new Set(r.value);
3529
+ S.delete(v), r.value = S, T(m, g);
3530
+ return;
3531
+ }
3532
+ const k = new Set(r.value);
3533
+ k.add(v), r.value = k, m.index === null && h(m, g, g.fromCondition(void 0), {
3534
+ forceCreateRule: !0
3535
+ });
3536
+ }
3537
+ function A(m) {
3538
+ const g = a(m);
3539
+ if (!g) return [];
3540
+ const I = d(g);
3541
+ return (I == null ? void 0 : I.actions) ?? [];
3542
+ }
3543
+ function L(m, g) {
3544
+ return e.value.filter((I) => {
3545
+ if (I.inverted) return !1;
3546
+ const v = I.subject;
3547
+ return v === m || a(v) !== m ? !1 : r.value.has(gt(v, g)) ? !0 : Object.keys(nt(Be(I), g)).length > 0;
3548
+ });
3549
+ }
3550
+ function M(m, g) {
3551
+ const I = `::${g.builderKey}`, v = new Set(r.value);
3552
+ for (const k of v) {
3553
+ if (!k.endsWith(I)) continue;
3554
+ const S = k.slice(0, -I.length);
3555
+ a(S) === m && v.delete(k);
3556
+ }
3557
+ r.value = v;
3558
+ }
3559
+ function p(m, g, I) {
3560
+ const v = g.subject;
3561
+ return m.reduce((k, S) => {
3562
+ if (S.inverted)
3563
+ return k.push(S), k;
3564
+ const H = S.subject;
3565
+ if (H === v || a(H) !== v)
3566
+ return k.push(S), k;
3567
+ if (At(g, S) && Object.keys(Zt(S, I)).length === 0)
3568
+ return k;
3569
+ const _ = Un(S, g, I);
3570
+ if (Object.keys(_).length === 0) {
3571
+ const { conditions: O, ...P } = S;
3572
+ k.push(P);
3573
+ } else
3574
+ k.push({ ...S, conditions: JSON.stringify(_) });
3575
+ return k;
3576
+ }, []);
3577
+ }
3578
+ function h(m, g, I, v = {}) {
3579
+ var F;
3580
+ const k = [...e.value];
3581
+ let S = m.index;
3582
+ const H = g.toCondition(I), x = Object.keys(H).length > 0;
3583
+ if (S === null && !x && !v.forceCreateRule) return;
3584
+ if (S === null) {
3585
+ const D = k.findIndex((V) => !V.inverted && V.subject === m.subject);
3586
+ if (D !== -1)
3587
+ S = D;
3588
+ else {
3589
+ const V = t.value.find((z) => z.subject === m.subject);
3590
+ if (!V) return;
3591
+ const {
3592
+ category: j,
3593
+ showByFeatureFlag: Z,
3594
+ isCategoryCover: B,
3595
+ ...te
3596
+ } = V;
3597
+ k.push({
3598
+ ...te,
3599
+ actions: m.actions.length > 0 ? m.actions : te.actions
3600
+ }), S = k.length - 1;
3601
+ }
3602
+ }
3603
+ const _ = { ...k[S] };
3604
+ _.actions = [
3605
+ .../* @__PURE__ */ new Set([..._.actions, ...m.actions])
3606
+ ];
3607
+ const O = Be(_), P = wt(O, [{ builder: g, formValue: I }]);
3608
+ if (Object.keys(P).length === 0 ? delete _.conditions : _.conditions = JSON.stringify(P), k[S] = _, tn(m.subject, t.value)) {
3609
+ const D = L(m.subject, g), V = () => {
3610
+ var Z;
3611
+ M(m.subject, g), n(p(k, _, g)), (Z = v.afterCommit) == null || Z.call(v);
3612
+ }, j = () => {
3613
+ var Z;
3614
+ n(k), (Z = v.afterCommit) == null || Z.call(v);
3615
+ };
3616
+ if (D.length === 0) {
3617
+ V();
3618
+ return;
3619
+ }
3620
+ v.onOverridesConflict ? v.onOverridesConflict({ override: V, keep: j }) : j();
3621
+ return;
3622
+ }
3623
+ n(k), (F = v.afterCommit) == null || F.call(v);
3624
+ }
3625
+ function R(m, g, I = {}) {
3626
+ if (g.length === 0) return;
3627
+ const v = [...e.value];
3628
+ let k = v.findIndex((D) => !D.inverted && D.subject === m.subject), S = k === -1 ? void 0 : { ...v[k] }, H = Be(S ?? {}) ?? {};
3629
+ for (const D of g) {
3630
+ const V = D.mode === "inherit" ? D.builder.fromCondition(void 0) : D.form;
3631
+ H = wt(H, [{ builder: D.builder, formValue: V }]);
3632
+ }
3633
+ const x = g.some((D) => D.mode === "custom");
3634
+ if (!S && (Object.keys(H).length > 0 || x)) {
3635
+ const D = t.value.find((te) => te.subject === m.subject);
3636
+ if (!D) return;
3637
+ const {
3638
+ category: V,
3639
+ showByFeatureFlag: j,
3640
+ isCategoryCover: Z,
3641
+ ...B
3642
+ } = D;
3643
+ S = {
3644
+ ...B,
3645
+ actions: m.actions.length > 0 ? m.actions : B.actions
3646
+ }, v.push(S), k = v.length - 1;
3647
+ }
3648
+ if (S) {
3649
+ const D = a(m.subject), V = D ? d(D) : void 0;
3650
+ if (!x && Object.keys(H).length === 0 && !!V && At(V, S))
3651
+ v.splice(k, 1), S = void 0;
3652
+ else {
3653
+ if (S.actions = [
3654
+ .../* @__PURE__ */ new Set([...S.actions, ...m.actions])
3655
+ ], V)
3656
+ for (const Z of g)
3657
+ Z.mode === "inherit" && (H = {
3658
+ ...H,
3659
+ ...nt(Be(V), Z.builder)
3660
+ });
3661
+ Object.keys(H).length === 0 ? delete S.conditions : S.conditions = JSON.stringify(H), v[k] = S;
3662
+ }
3663
+ }
3664
+ const _ = () => {
3665
+ const D = new Set(r.value);
3666
+ for (const V of g) {
3667
+ const j = gt(m.subject, V.builder);
3668
+ V.mode === "custom" ? D.add(j) : D.delete(j);
3669
+ }
3670
+ r.value = D;
3671
+ }, O = (D) => {
3672
+ var V;
3673
+ _(), n(D), (V = I.afterCommit) == null || V.call(I);
3674
+ };
3675
+ if (!tn(m.subject, t.value) || !S) {
3676
+ O(v);
3677
+ return;
3678
+ }
3679
+ const P = g.map((D) => D.builder).filter((D) => L(m.subject, D).length > 0), F = () => {
3680
+ let D = v;
3681
+ for (const V of g.map((j) => j.builder))
3682
+ M(m.subject, V), D = p(D, S, V);
3683
+ O(D);
3684
+ };
3685
+ if (P.length > 0 && I.onOverridesConflict) {
3686
+ I.onOverridesConflict({ override: F, keep: () => O(v) });
3687
+ return;
3688
+ }
3689
+ P.length > 0 ? O(v) : F();
3690
+ }
3691
+ return {
3692
+ getCoverSubject: a,
3693
+ coverLabel: f,
3694
+ shouldShowInheritToggle: b,
3695
+ inheritMode: E,
3696
+ setInheritMode: w,
3697
+ inheritedSummary: C,
3698
+ getEffectiveActions: A,
3699
+ updateBuilderCondition: h,
3700
+ applyConditionDrafts: R
3701
+ };
3702
+ }
3703
+ const mo = { class: "h-[24px] w-[24px] flex items-center justify-center" }, fo = { class: "h-[24px] w-[24px] flex items-center justify-center" }, _o = "condition-form-select-menu", So = /* @__PURE__ */ Le({
3704
+ __name: "PortalPermissionEditor",
3705
+ props: /* @__PURE__ */ en({
3706
+ disable: {
3707
+ type: Boolean,
3708
+ default: !1
3709
+ },
3710
+ inheritPermissions: {
3711
+ type: Array,
3712
+ default: () => []
3713
+ },
3714
+ /**
3715
+ * 'all': every section in its own box (permission roles page).
3716
+ * 'workplace': only manageable restaurant / warehouse / usable POS roles ("Where they work").
3717
+ * 'portal': only the portal permission categories ("Portal access").
3718
+ * The member sheet renders the two parts in separate cards over the same rules.
3719
+ */
3720
+ part: {
3721
+ type: String,
3722
+ default: "all"
3723
+ }
3724
+ }, {
3725
+ modelValue: { default: () => [] },
3726
+ modelModifiers: {}
3727
+ }),
3728
+ emits: /* @__PURE__ */ en(["permissionChanged"], ["update:modelValue"]),
3729
+ setup(e, { emit: t }) {
3730
+ const n = vr(e, "modelValue"), r = e, a = K(() => r.part === "all" ? "trailing" : "leading"), o = K(
3731
+ () => r.part === "all" ? "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" : ""
3732
+ ), f = t, { t: d } = Ke(), i = hr(), b = br(), { breakpoints: E } = gr(), C = K(() => E.value.xs || E.value.sm), {
3733
+ fetchCustomReportPermissions: T,
3734
+ customReportPermissions: w
3735
+ } = Ir(), A = K(() => [
3736
+ ...Gn,
3737
+ ...w.value
3738
+ ]), L = K(() => {
3739
+ const s = i.currentBusiness.value, c = i.currentCountry.value, y = c instanceof Object ? c.code : c;
3740
+ return io(s, y);
3741
+ });
3742
+ function M(s) {
3743
+ return A.value.find((c) => c.subject === s);
3744
+ }
3745
+ function p(s, c) {
3746
+ return rn(s).filter(
3747
+ (y) => {
3748
+ var U;
3749
+ return ((U = y.appliesToActions) == null ? void 0 : U.call(y, c)) ?? !0;
3750
+ }
3751
+ );
3752
+ }
3753
+ const h = K(() => {
3754
+ const s = A.value.filter((y) => !I.includes(y.subject)).map((y) => y.subject);
3755
+ return Er(
3756
+ r.inheritPermissions.map((y) => ({
3757
+ ...y,
3758
+ permissions: y.permissions.filter((U) => s.includes(U.subject))
3759
+ }))
3760
+ ).map((y) => ({
3761
+ id: y.subject,
3762
+ setNames: y.setNames
3763
+ }));
3764
+ }), R = K(() => {
3765
+ const s = r.inheritPermissions.map((c) => ({
3766
+ ...c,
3767
+ permissions: c.permissions.filter(
3768
+ (y) => y.subject === Ye.Subject.Business.inventory_stock
3769
+ )
3770
+ }));
3771
+ return Rt(
3772
+ s,
3773
+ "warehouseId",
3774
+ k.value.map((c) => c._id)
3775
+ );
3776
+ }), m = K(() => {
3777
+ const s = r.inheritPermissions.map((c) => ({
3778
+ ...c,
3779
+ permissions: c.permissions.filter(
3780
+ (y) => y.subject === Ye.Subject.Restaurant.restaurant
3781
+ )
3782
+ }));
3783
+ return Rt(
3784
+ s,
3785
+ "restaurantId",
3786
+ _.value.map((c) => c._id)
3787
+ );
3788
+ }), g = K(() => {
3789
+ const s = r.inheritPermissions.map((c) => ({
3790
+ ...c,
3791
+ permissions: c.permissions.filter((y) => y.subject === Ye.Subject.Business.role)
3792
+ }));
3793
+ return Rt(
3794
+ s,
3795
+ "roleId",
3796
+ O.value.map((c) => c._id)
3797
+ );
3798
+ }), I = [...Dr], v = K(() => {
3799
+ var c;
3800
+ const s = (c = n.value) == null ? void 0 : c.find(
3801
+ (y) => y.subject === Ye.Subject.Business.inventory_stock
3802
+ );
3803
+ return s ? s.conditions ? JSON.parse(s.conditions).warehouseId.$in : null : [];
3804
+ }), k = st([]), S = K(() => k.value.map((s) => ({
3805
+ label: s.profile.name,
3806
+ value: s._id
3807
+ })));
3808
+ function H(s) {
3809
+ const c = x(n.value, s);
3810
+ n.value = c;
3811
+ }
3812
+ function x(s, c) {
3813
+ let y = Yn(
3814
+ s.filter((U) => U.subject !== Ye.Subject.Business.inventory_stock)
3815
+ );
3816
+ if (!c || c.length > 0) {
3817
+ const U = {
3818
+ actions: [Ye.Action.manage],
3819
+ subject: Ye.Subject.Business.inventory_stock
3820
+ };
3821
+ c && (U.conditions = JSON.stringify({ warehouseId: { $in: c } })), y.push(U);
3822
+ }
3823
+ return y;
3824
+ }
3825
+ const { restaurants: _ } = i, O = Fr().roles, P = K(() => _.value.map((s) => ({
3826
+ label: `${s.profile.code ? s.profile.code + "-" : ""}${s.profile.name}`,
3827
+ value: s._id
3828
+ }))), F = K(() => _.value.reduce((s, c) => (s[c._id] = O.value.filter((y) => y.restaurants.some((U) => U.id === c._id)).map((y) => y._id), s), {})), D = K(() => Nr(n.value));
3829
+ function V(s) {
3830
+ const c = Z(n.value, s);
3831
+ n.value = c;
3832
+ }
3833
+ const j = K(() => Cr(n.value));
3834
+ function Z(s, c) {
3835
+ return Tr(s, c, {
3836
+ restaurantRoles: F.value,
3837
+ allRoleIds: O.value.map((y) => y._id)
3838
+ });
3839
+ }
3840
+ function B(s) {
3841
+ const c = te(n.value, s);
3842
+ n.value = c;
3843
+ }
3844
+ function te(s, c) {
3845
+ return Or(s, c);
3846
+ }
3847
+ xn(async () => {
3848
+ await Promise.all([
3849
+ r.part !== "portal" && so.readWarehouses().then((s) => k.value = s),
3850
+ T()
3851
+ ]);
3852
+ });
3853
+ const z = K(() => Wn(
3854
+ n.value,
3855
+ Zn
3856
+ ).filter((y) => {
3857
+ const U = y.source;
3858
+ return (U == null ? void 0 : U.type) !== "systemPermissionSet" ? !0 : y.actions.includes("manage");
3859
+ }).map((y) => {
3860
+ if (y.inverted) return y;
3861
+ const U = y.actions;
3862
+ if (!U.includes("manage")) return y;
3863
+ const W = M(y.subject);
3864
+ if (!W) return y;
3865
+ const u = W.actions;
3866
+ return u.length <= 1 || u.filter((Q) => !U.includes(Q)).length === 0 ? y : { ...y, actions: [...u] };
3867
+ }));
3868
+ function de(s) {
3869
+ n.value = ao(
3870
+ z.value,
3871
+ s,
3872
+ n.value,
3873
+ M
3874
+ );
3875
+ }
3876
+ const ve = K(() => new Set(
3877
+ A.value.filter((s) => rn(s.subject).length > 0).map((s) => s.subject)
3878
+ )), he = K(() => {
3879
+ const s = /* @__PURE__ */ new Map();
3880
+ return z.value.map((c) => ({
3881
+ rule: c,
3882
+ index: n.value.findIndex(
3883
+ (y) => !y.inverted && y.subject === c.subject
3884
+ )
3885
+ })).filter(({ rule: c }) => !c.inverted).forEach(({ rule: c, index: y }) => {
3886
+ var N;
3887
+ const U = c.actions, W = p(c.subject, U);
3888
+ if (W.length === 0) return;
3889
+ let u;
3890
+ try {
3891
+ u = c.conditions ? JSON.parse(c.conditions) : void 0;
3892
+ } catch {
3893
+ u = void 0;
3894
+ }
3895
+ s.set(c.subject, {
3896
+ index: y >= 0 ? y : null,
3897
+ subject: c.subject,
3898
+ label: ((N = M(c.subject)) == null ? void 0 : N.label) ?? c.subject,
3899
+ actions: U,
3900
+ // Each builder only ever sees its own slice of the stored condition.
3901
+ sections: W.map((Q) => ({
3902
+ builder: Q,
3903
+ formValue: Q.fromCondition(nt(u, Q))
3904
+ }))
3905
+ });
3906
+ }), s;
3907
+ }), ae = uo(n, A, (s) => {
3908
+ n.value = s;
3909
+ }), le = Sr(n), ke = st(null);
3910
+ function Y(s, c) {
3911
+ const y = he.value.get(s);
3912
+ if (y) return y;
3913
+ const U = ae.getEffectiveActions(s), W = p(s, U);
3914
+ if (W.length !== 0)
3915
+ return {
3916
+ index: null,
3917
+ subject: s,
3918
+ label: c,
3919
+ actions: U,
3920
+ sections: W.map((u) => ({
3921
+ builder: u,
3922
+ formValue: u.fromCondition(void 0)
3923
+ }))
3924
+ };
3925
+ }
3926
+ function fe(s, c) {
3927
+ const y = le.getDraft({ subject: s.subject, builderKey: c.builderKey });
3928
+ if (y) return y.formValue;
3929
+ const U = s.sections.find((W) => W.builder.builderKey === c.builderKey);
3930
+ return U == null ? void 0 : U.formValue;
3931
+ }
3932
+ function $e(s, c) {
3933
+ const y = le.getDraft({ subject: s.subject, builderKey: c.builderKey });
3934
+ return y != null && y.inheritMode ? y.inheritMode : ae.inheritMode(s, c);
3935
+ }
3936
+ function Qe(s, c, y) {
3937
+ const U = le.getDraft({
3938
+ subject: s.subject,
3939
+ builderKey: c.builderKey
3940
+ });
3941
+ le.setDraft(
3942
+ { subject: s.subject, builderKey: c.builderKey },
3943
+ {
3944
+ formValue: y,
3945
+ inheritMode: (U == null ? void 0 : U.inheritMode) ?? $e(s, c)
3946
+ }
3947
+ );
3948
+ }
3949
+ function Ve(s, c, y) {
3950
+ const U = le.getDraft({
3951
+ subject: s.subject,
3952
+ builderKey: c.builderKey
3953
+ }), W = s.sections.find((u) => u.builder.builderKey === c.builderKey);
3954
+ le.setDraft(
3955
+ { subject: s.subject, builderKey: c.builderKey },
3956
+ {
3957
+ formValue: (U == null ? void 0 : U.formValue) ?? (W == null ? void 0 : W.formValue),
3958
+ inheritMode: y
3959
+ }
3960
+ );
3961
+ }
3962
+ function De(s) {
3963
+ return le.hasDraftsForSubject(s);
3964
+ }
3965
+ function Fe(s, c) {
3966
+ const y = s.sections.flatMap((U) => {
3967
+ const W = le.getDraft({
3968
+ subject: s.subject,
3969
+ builderKey: U.builder.builderKey
3970
+ });
3971
+ return W ? [{ builder: U.builder, form: W.formValue, mode: W.inheritMode ?? "custom" }] : [];
3972
+ });
3973
+ ae.applyConditionDrafts(s, y, {
3974
+ afterCommit: () => {
3975
+ le.clearDraftsForSubject(s.subject), c();
3976
+ },
3977
+ onOverridesConflict: l(s).onOverridesConflict
3978
+ });
3979
+ }
3980
+ function Ge(s) {
3981
+ return s.sections.some((c) => ae.shouldShowInheritToggle(s, c.builder) ? ae.inheritMode(s, c.builder) === "custom" : Object.keys(c.builder.toCondition(c.formValue)).length > 0);
3982
+ }
3983
+ let Pe = !1;
3984
+ function l(s, c = {}) {
3985
+ return {
3986
+ ...c,
3987
+ onOverridesConflict: ({ override: y, keep: U }) => {
3988
+ Pe || (Pe = !0, b.open({
3989
+ title: d("team.memberForm.permissions.conditionCover.confirmTitle"),
3990
+ message: d("team.memberForm.permissions.conditionCover.confirmMessage", {
3991
+ cover: s.label
3992
+ }),
3993
+ minWidth: E.value.lg ? 588 : 0,
3994
+ zIndex: 200,
3995
+ primaryActions: {
3996
+ text: d("team.memberForm.permissions.conditionCover.override"),
3997
+ close: !1
3998
+ },
3999
+ secondaryActions: {
4000
+ text: d("team.memberForm.permissions.conditionCover.keep"),
4001
+ close: !1
4002
+ }
4003
+ }).onPrimary(() => {
4004
+ y(), Pe = !1, b.close();
4005
+ }).onSecondary(() => {
4006
+ U(), Pe = !1, b.close();
4007
+ }).onClose(() => {
4008
+ Pe = !1;
4009
+ }));
4010
+ }
4011
+ };
4012
+ }
4013
+ return Mt(
4014
+ n,
4015
+ (s) => {
4016
+ f("permissionChanged", s);
4017
+ },
4018
+ { deep: !0 }
4019
+ ), (s, c) => {
4020
+ const y = we("FmIcon"), U = we("FmBottomSheet"), W = we("FmPopover");
4021
+ return $(), re("div", {
4022
+ class: Ie(["flex flex-col", e.part === "all" ? "gap-32" : "gap-16"])
4023
+ }, [
4024
+ e.part !== "workplace" ? ($(), re("div", {
4025
+ key: 0,
4026
+ class: Ie(o.value)
4027
+ }, [
4028
+ oe(Xa, {
4029
+ "model-value": z.value,
4030
+ "excluded-subjects": I,
4031
+ "additional-permissions": X(w),
4032
+ layout: a.value,
4033
+ "onUpdate:modelValue": de
4034
+ }, tt({ _: 2 }, [
4035
+ Ee(h.value, (u) => ({
4036
+ name: `checkbox-${u.id}-append`,
4037
+ fn: ce(() => [
4038
+ oe(vt, { item: u }, null, 8, ["item"])
4039
+ ])
4040
+ })),
4041
+ Ee(ve.value, (u) => ({
4042
+ name: `checkbox-${u}-icon`,
4043
+ fn: ce(({ option: N, isEffectiveSelected: Q }) => [
4044
+ Q && Y(u, N.label) ? ($(), re(Me, { key: 0 }, [
4045
+ C.value ? ($(), Ce(U, {
4046
+ key: 0,
4047
+ "model-value": ke.value === u,
4048
+ header: X(d)("team.memberForm.permissions.conditionTitle", {
4049
+ context: Y(u, N.label).label
4050
+ }),
4051
+ "dismiss-away": "",
4052
+ "z-index": 100,
4053
+ class: "h-5 flex items-center",
4054
+ "onUpdate:modelValue": (J) => {
4055
+ ke.value = J ? u : null, J || X(le).clearDraftsForSubject(u);
4056
+ }
4057
+ }, {
4058
+ "bottom-sheet-button": ce(() => [
4059
+ ie("div", mo, [
4060
+ oe(y, {
4061
+ name: "settings",
4062
+ size: "sm",
4063
+ class: Ie([
4064
+ "cursor-pointer transition-colors",
4065
+ Ge(Y(u, N.label)) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
4066
+ ])
4067
+ }, null, 8, ["class"])
4068
+ ])
4069
+ ]),
4070
+ default: ce(() => [
4071
+ oe(Dn, {
4072
+ entry: Y(u, N.label),
4073
+ builders: Y(u, N.label).sections.map((J) => J.builder),
4074
+ subject: u,
4075
+ "time-zone": L.value,
4076
+ "cover-override": X(ae),
4077
+ "inherit-mode-for": (J) => $e(Y(u, N.label), J),
4078
+ "form-value-for": (J) => fe(Y(u, N.label), J),
4079
+ "has-changes": De(u),
4080
+ disable: e.disable,
4081
+ "full-width": !0,
4082
+ onUpdateInheritMode: ({ builder: J, mode: me }) => Ve(Y(u, N.label), J, me),
4083
+ onUpdateForm: ({ builder: J, form: me }) => Qe(Y(u, N.label), J, me),
4084
+ onApply: (J) => Fe(Y(u, N.label), () => ke.value = null)
4085
+ }, null, 8, ["entry", "builders", "subject", "time-zone", "cover-override", "inherit-mode-for", "form-value-for", "has-changes", "disable", "onUpdateInheritMode", "onUpdateForm", "onApply"])
4086
+ ]),
4087
+ _: 2
4088
+ }, 1032, ["model-value", "header", "onUpdate:modelValue"])) : ($(), Ce(W, {
4089
+ key: 1,
4090
+ disabled: e.disable,
4091
+ "z-index": 100,
4092
+ "exclude-el-from-click-outside": [_o],
4093
+ class: "h-5 flex items-center",
4094
+ onPopoverChanged: (J) => {
4095
+ J || X(le).clearDraftsForSubject(u);
4096
+ }
4097
+ }, {
4098
+ "popover-button": ce(() => [
4099
+ ie("div", fo, [
4100
+ oe(y, {
4101
+ name: "settings",
4102
+ size: "sm",
4103
+ class: Ie([
4104
+ "cursor-pointer transition-colors",
4105
+ Ge(Y(u, N.label)) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
4106
+ ])
4107
+ }, null, 8, ["class"])
4108
+ ])
4109
+ ]),
4110
+ default: ce(({ hide: J }) => [
4111
+ oe(Dn, {
4112
+ entry: Y(u, N.label),
4113
+ builders: Y(u, N.label).sections.map((me) => me.builder),
4114
+ subject: u,
4115
+ "time-zone": L.value,
4116
+ "cover-override": X(ae),
4117
+ title: X(d)("team.memberForm.permissions.conditionTitle", {
4118
+ context: Y(u, N.label).label
4119
+ }),
4120
+ "inherit-mode-for": (me) => $e(Y(u, N.label), me),
4121
+ "form-value-for": (me) => fe(Y(u, N.label), me),
4122
+ "has-changes": De(u),
4123
+ disable: e.disable,
4124
+ onUpdateInheritMode: ({ builder: me, mode: We }) => Ve(
4125
+ Y(u, N.label),
4126
+ me,
4127
+ We
4128
+ ),
4129
+ onUpdateForm: ({ builder: me, form: We }) => Qe(Y(u, N.label), me, We),
4130
+ onApply: (me) => Fe(Y(u, N.label), J)
4131
+ }, null, 8, ["entry", "builders", "subject", "time-zone", "cover-override", "title", "inherit-mode-for", "form-value-for", "has-changes", "disable", "onUpdateInheritMode", "onUpdateForm", "onApply"])
4132
+ ]),
4133
+ _: 2
4134
+ }, 1032, ["disabled", "exclude-el-from-click-outside", "onPopoverChanged"]))
4135
+ ], 64)) : ($(), Ce(y, {
4136
+ key: 1,
4137
+ name: "settings",
4138
+ size: "sm",
4139
+ class: "invisible"
4140
+ }))
4141
+ ])
4142
+ }))
4143
+ ]), 1032, ["model-value", "additional-permissions", "layout"])
4144
+ ], 2)) : Ne("", !0),
4145
+ e.part !== "portal" ? ($(), re("div", {
4146
+ key: 1,
4147
+ class: Ie(o.value)
4148
+ }, [
4149
+ oe(wn, {
4150
+ "model-value": v.value,
4151
+ options: S.value,
4152
+ context: X(d)("team.labels.warehouse"),
4153
+ layout: a.value,
4154
+ "onUpdate:modelValue": H
4155
+ }, tt({ _: 2 }, [
4156
+ Ee(R.value, (u) => ({
4157
+ name: `checkbox-${u.id}-append`,
4158
+ fn: ce(() => [
4159
+ oe(vt, { item: u }, null, 8, ["item"])
4160
+ ])
4161
+ }))
4162
+ ]), 1032, ["model-value", "options", "context", "layout"])
4163
+ ], 2)) : Ne("", !0),
4164
+ e.part !== "portal" ? ($(), re("div", {
4165
+ key: 2,
4166
+ class: Ie([o.value, { "order-first": e.part === "workplace" }])
4167
+ }, [
4168
+ oe(wn, {
4169
+ "model-value": D.value,
4170
+ options: P.value,
4171
+ context: X(d)("team.labels.restaurant"),
4172
+ layout: a.value,
4173
+ "onUpdate:modelValue": V
4174
+ }, tt({ _: 2 }, [
4175
+ Ee(m.value, (u) => ({
4176
+ name: `checkbox-${u.id}-append`,
4177
+ fn: ce(() => [
4178
+ oe(vt, { item: u }, null, 8, ["item"])
4179
+ ])
4180
+ }))
4181
+ ]), 1032, ["model-value", "options", "context", "layout"])
4182
+ ], 2)) : Ne("", !0),
4183
+ e.part !== "portal" ? ($(), re("div", {
4184
+ key: 3,
4185
+ class: Ie(o.value)
4186
+ }, [
4187
+ oe(eo, {
4188
+ roles: X(O),
4189
+ "model-value": j.value,
4190
+ "restaurant-ids": D.value,
4191
+ layout: a.value,
4192
+ "onUpdate:modelValue": B
4193
+ }, tt({ _: 2 }, [
4194
+ Ee(g.value, (u) => ({
4195
+ name: `checkbox-${u.id}-append`,
4196
+ fn: ce(() => [
4197
+ oe(vt, { item: u }, null, 8, ["item"])
4198
+ ])
4199
+ }))
4200
+ ]), 1032, ["roles", "model-value", "restaurant-ids", "layout"])
4201
+ ], 2)) : Ne("", !0)
4202
+ ], 2);
4203
+ };
4204
+ }
4205
+ });
4206
+ export {
4207
+ So as _
4208
+ };