@feedmepos/mf-hrm-portal 2.0.19 → 2.0.20-dev.2

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 (66) hide show
  1. package/dist/AuditLogList-ChxAzO74.js +1037 -0
  2. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +58 -0
  3. package/dist/EmployeeList-Cs-Mn6UA.js +843 -0
  4. package/dist/FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js +45 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
  6. package/dist/{Main-BPM7QyFL.js → Main-B9_TyRDo.js} +2009 -2005
  7. package/dist/Main-CdHW4UkN.js +90 -0
  8. package/dist/Main-DcvmP7s-.js +574 -0
  9. package/dist/PermissionSetList-VFVS0g0v.js +347 -0
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Dr3R9JjS.js +3444 -0
  11. package/dist/RoleList-BZ6RZvm2.js +556 -0
  12. package/dist/TeamMemberList-C-zhFauD.js +1115 -0
  13. package/dist/{TimesheetList-CdWXksIf.js → TimesheetList-CZex54an.js} +129 -115
  14. package/dist/{app-D6OxaCEx.js → app-CLL3p27X.js} +699 -653
  15. package/dist/app.js +1 -1
  16. package/dist/{dayjs.min-C0I-OiL6.js → dayjs.min-CDt1i9vl.js} +1 -1
  17. package/dist/employee-BpRvjWNh.js +200 -0
  18. package/dist/{iteration-CcZFMm5X.js → iteration-BVjUzYL5.js} +9314 -9272
  19. package/dist/{lodash-CW7MBjcM.js → lodash-CrwgACp2.js} +1 -1
  20. package/dist/{rule-6Lg9M_3I.js → rule-BlQ5YZ9Z.js} +274 -275
  21. package/dist/src/api/audit-log/index.d.ts +9 -0
  22. package/dist/src/api/index.d.ts +0 -1
  23. package/dist/src/api/restaurant/index.d.ts +5 -0
  24. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  25. package/dist/src/components/CollapsibleWrapper.vue.d.ts +2 -0
  26. package/dist/src/components/Skeleton.vue.d.ts +7 -0
  27. package/dist/src/composables/useBasePermission.d.ts +1 -0
  28. package/dist/src/composables/useRestaurantMap.d.ts +2 -329
  29. package/dist/src/stores/restaurant.d.ts +181 -0
  30. package/dist/src/stores/role.d.ts +7 -7
  31. package/dist/src/stores/team.d.ts +6 -6
  32. package/dist/src/types/restaurant.d.ts +11 -0
  33. package/dist/src/types/team.d.ts +2 -1
  34. package/dist/src/views/hr/locales/index.d.ts +16 -0
  35. package/dist/src/views/team/components/BasePermission.vue.d.ts +3 -7
  36. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +2 -2
  37. package/dist/src/views/team/locales/index.d.ts +32 -0
  38. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +5 -3
  39. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +3 -3
  40. package/dist/style.css +1 -1
  41. package/dist/{timesheet-CaSIm-Rv.js → timesheet-jFs4GTAL.js} +2 -2
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/useAppStore-DMAL8VFY.js +169 -0
  44. package/dist/useDebounce-CWb5QR9G.js +28 -0
  45. package/dist/useDiscardConfirm-DPhEV6v0.js +157 -0
  46. package/dist/{useLoading-cnpr1-pP.js → useLoading-AFTjRLyO.js} +1 -1
  47. package/dist/{useReportPermissions-CNr0AdOf.js → useReportPermissions-hODG0Xx3.js} +3 -3
  48. package/package.json +1 -1
  49. package/dist/AuditLogList-Bw3sRBhW.js +0 -980
  50. package/dist/EmployeeList-C4tVWPJE.js +0 -736
  51. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +0 -71
  52. package/dist/HorizontalSplitter-o860F4xM.js +0 -12
  53. package/dist/Main-BC20s7cs.js +0 -560
  54. package/dist/Main-eN8MDWpv.js +0 -85
  55. package/dist/PermissionSetList-CPSRrCsu.js +0 -341
  56. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CXt721Zo.js +0 -3480
  57. package/dist/RoleList-tRu19xyl.js +0 -530
  58. package/dist/TeamMemberList-CvitYIKw.js +0 -1114
  59. package/dist/TeamMemberList.vue_vue_type_style_index_0_scoped_473cbd86_lang-BDjrD45a.js +0 -34
  60. package/dist/employee-yT17VCCS.js +0 -204
  61. package/dist/src/api/account/index.d.ts +0 -4
  62. package/dist/src/composables/useSupportedCountries.d.ts +0 -5
  63. package/dist/useAppStore-CONZvtGc.js +0 -171
  64. package/dist/useDebounce-B8ZPVS5C.js +0 -15
  65. package/dist/useDiscardConfirm-BHni0LNu.js +0 -28
  66. package/dist/useSearch-B6WK1LBB.js +0 -15
@@ -1,11 +1,11 @@
1
- var $s = Object.defineProperty;
2
- var er = (e, A, u) => A in e ? $s(e, A, { enumerable: !0, configurable: !0, writable: !0, value: u }) : e[A] = u;
3
- var Ne = (e, A, u) => er(e, typeof A != "symbol" ? A + "" : A, u);
4
- import { isRef as tr, ref as ve, shallowRef as sr, watchEffect as St, computed as jt, h as Qt, defineComponent as xe, createBlock as ke, renderSlot as kt, createCommentVNode as rr, unref as Me, openBlock as Ve, createElementBlock as Kt, createElementVNode as we, toDisplayString as It, watch as Rt, nextTick as Zt, onMounted as Lt, onBeforeUnmount as nr, normalizeStyle as ar, resolveComponent as Gt, withCtx as or, createVNode as ir, defineAsyncComponent as lr, readonly as vt } from "vue";
5
- import { useBreakpoints as cr } from "@feedmepos/ui-library";
6
- import { useRoute as Ar, useRouter as ur } from "vue-router";
7
- import { useCoreStore as Yt, useI18n as Jt } from "@feedmepos/mf-common";
8
- const _t = {
1
+ var Js = Object.defineProperty;
2
+ var _s = (e, A, u) => A in e ? Js(e, A, { enumerable: !0, configurable: !0, writable: !0, value: u }) : e[A] = u;
3
+ var Ze = (e, A, u) => _s(e, typeof A != "symbol" ? A + "" : A, u);
4
+ import { isRef as $s, ref as ve, shallowRef as en, watchEffect as Wt, computed as jt, h as Qt, defineComponent as xe, createBlock as ke, renderSlot as Tt, createCommentVNode as tn, unref as Me, openBlock as Ve, createElementBlock as St, createElementVNode as we, toDisplayString as It, watch as sn, nextTick as nn, onMounted as kt, onBeforeUnmount as rn, normalizeStyle as an, resolveComponent as Gt, withCtx as on, createVNode as ln, defineAsyncComponent as cn, readonly as vt } from "vue";
5
+ import { useBreakpoints as An } from "@feedmepos/ui-library";
6
+ import { useRoute as un, useRouter as mn } from "vue-router";
7
+ import { useCoreStore as Yt, useI18n as Kt } from "@feedmepos/mf-common";
8
+ const Lt = {
9
9
  predefinedRanges: {
10
10
  today: "Today",
11
11
  yesterday: "Yesterday",
@@ -15,7 +15,7 @@ const _t = {
15
15
  thisMonth: "This month",
16
16
  lastMonth: "Last month"
17
17
  }
18
- }, $t = {
18
+ }, Jt = {
19
19
  title: "Audit Log",
20
20
  export: "Export",
21
21
  dateRange: {
@@ -134,15 +134,15 @@ const _t = {
134
134
  requestPath: "Request Path",
135
135
  requestBody: "Request Body"
136
136
  }
137
- }, mr = {
138
- date: _t,
139
- auditLog: $t
140
- }, gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
137
+ }, gn = {
138
+ date: Lt,
139
+ auditLog: Jt
140
+ }, dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
141
141
  __proto__: null,
142
- auditLog: $t,
143
- date: _t,
144
- default: mr
145
- }, Symbol.toStringTag, { value: "Module" })), es = {
142
+ auditLog: Jt,
143
+ date: Lt,
144
+ default: gn
145
+ }, Symbol.toStringTag, { value: "Module" })), _t = {
146
146
  predefinedRanges: {
147
147
  today: "วันนี้",
148
148
  yesterday: "เมื่อวาน",
@@ -152,7 +152,7 @@ const _t = {
152
152
  thisMonth: "เดือนนี้",
153
153
  lastMonth: "เดือนที่แล้ว"
154
154
  }
155
- }, ts = {
155
+ }, $t = {
156
156
  title: "บันทึกการตรวจสอบ",
157
157
  export: "ส่งออก",
158
158
  dateRange: {
@@ -272,15 +272,15 @@ const _t = {
272
272
  requestPath: "เส้นทางร้องขอ",
273
273
  requestBody: "เนื้อหาคำขอ"
274
274
  }
275
- }, dr = {
276
- date: es,
277
- auditLog: ts
278
- }, pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
275
+ }, pn = {
276
+ date: _t,
277
+ auditLog: $t
278
+ }, bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
279
279
  __proto__: null,
280
- auditLog: ts,
281
- date: es,
282
- default: dr
283
- }, Symbol.toStringTag, { value: "Module" })), ss = {
280
+ auditLog: $t,
281
+ date: _t,
282
+ default: pn
283
+ }, Symbol.toStringTag, { value: "Module" })), es = {
284
284
  predefinedRanges: {
285
285
  today: "今天",
286
286
  yesterday: "昨天",
@@ -290,7 +290,7 @@ const _t = {
290
290
  thisMonth: "本月",
291
291
  lastMonth: "上月"
292
292
  }
293
- }, rs = {
293
+ }, ts = {
294
294
  title: "审计日志",
295
295
  export: "导出",
296
296
  dateRange: {
@@ -410,15 +410,15 @@ const _t = {
410
410
  requestPath: "请求路径",
411
411
  requestBody: "请求内容"
412
412
  }
413
- }, br = {
414
- date: ss,
415
- auditLog: rs
416
- }, fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
413
+ }, fn = {
414
+ date: es,
415
+ auditLog: ts
416
+ }, yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
417
417
  __proto__: null,
418
- auditLog: rs,
419
- date: ss,
420
- default: br
421
- }, Symbol.toStringTag, { value: "Module" })), ns = {
418
+ auditLog: ts,
419
+ date: es,
420
+ default: fn
421
+ }, Symbol.toStringTag, { value: "Module" })), ss = {
422
422
  predefinedRanges: {
423
423
  today: "今天",
424
424
  yesterday: "昨天",
@@ -428,7 +428,7 @@ const _t = {
428
428
  thisMonth: "本月",
429
429
  lastMonth: "上月"
430
430
  }
431
- }, as = {
431
+ }, ns = {
432
432
  title: "審計日誌",
433
433
  export: "匯出",
434
434
  dateRange: {
@@ -548,20 +548,20 @@ const _t = {
548
548
  requestPath: "請求路徑",
549
549
  requestBody: "請求內容"
550
550
  }
551
- }, yr = {
552
- date: ns,
553
- auditLog: as
554
- }, vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
551
+ }, vn = {
552
+ date: ss,
553
+ auditLog: ns
554
+ }, hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
555
555
  __proto__: null,
556
- auditLog: as,
557
- date: ns,
558
- default: yr
559
- }, Symbol.toStringTag, { value: "Module" })), hr = {
560
- "en-US": gr,
561
- "zh-CN": fr,
562
- "th-TH": pr,
563
- "zh-Hant": vr
564
- }, os = {
556
+ auditLog: ns,
557
+ date: ss,
558
+ default: vn
559
+ }, Symbol.toStringTag, { value: "Module" })), Bn = {
560
+ "en-US": dn,
561
+ "zh-CN": yn,
562
+ "th-TH": bn,
563
+ "zh-Hant": hn
564
+ }, rs = {
565
565
  employee: {
566
566
  title: "Employee",
567
567
  exportButtonLabel: "Export",
@@ -570,12 +570,15 @@ const _t = {
570
570
  code: "Code",
571
571
  name: "Name",
572
572
  restaurants: "Restaurant",
573
+ assignedRole: "Assigned Role",
573
574
  since: "Join Since"
574
575
  },
575
576
  form: {
576
577
  add: "Create employee",
577
578
  update: "Update employee",
578
579
  employeeSetting: "Employee setting",
580
+ assignmentSection: "Outlet & Role Assignment",
581
+ addAnother: "Add another",
579
582
  masterUserConfig: "Master user configuration",
580
583
  code: "Code",
581
584
  masterUser: "Master User",
@@ -585,6 +588,7 @@ const _t = {
585
588
  passcodeRequired: "Passcode must be 4 digits",
586
589
  passcodeGenerate: "Generate code",
587
590
  atLeastOneRestaurant: "Select at least one restaurant",
591
+ roleRequired: "Select a role for every restaurant",
588
592
  all: "All",
589
593
  role: "Role",
590
594
  name: "Name"
@@ -757,13 +761,13 @@ const _t = {
757
761
  placeholder: "Search restaurant"
758
762
  }
759
763
  }
760
- }, Br = {
761
- hr: os
762
- }, wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
764
+ }, wn = {
765
+ hr: rs
766
+ }, Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
763
767
  __proto__: null,
764
- default: Br,
765
- hr: os
766
- }, Symbol.toStringTag, { value: "Module" })), is = {
768
+ default: wn,
769
+ hr: rs
770
+ }, Symbol.toStringTag, { value: "Module" })), as = {
767
771
  employee: {
768
772
  title: "พนักงาน",
769
773
  exportButtonLabel: "ส่งออก",
@@ -772,12 +776,15 @@ const _t = {
772
776
  code: "รหัส",
773
777
  name: "ชื่อ",
774
778
  restaurants: "ร้านอาหาร",
779
+ assignedRole: "บทบาทที่ได้รับมอบหมาย",
775
780
  since: "เข้าร่วมตั้งแต่"
776
781
  },
777
782
  form: {
778
783
  add: "สร้างพนักงาน",
779
784
  update: "อัพเดทพนักงาน",
780
785
  employeeSetting: "ตั้งค่าพนักงาน",
786
+ assignmentSection: "การกำหนดสาขาและบทบาท",
787
+ addAnother: "เพิ่มอีกหนึ่งรายการ",
781
788
  masterUserConfig: "ตั้งค่าผู้ใช้หลัก",
782
789
  code: "รหัส",
783
790
  masterUser: "ผู้ใช้หลัก",
@@ -787,6 +794,7 @@ const _t = {
787
794
  passcodeRequired: "รหัสผ่านต้องเป็นตัวเลข 4 หลัก",
788
795
  passcodeGenerate: "สร้างรหัส",
789
796
  atLeastOneRestaurant: "เลือกร้านอาหารอย่างน้อยหนึ่งสาขา",
797
+ roleRequired: "กรุณาเลือกบทบาทให้ทุกร้านอาหาร",
790
798
  all: "ทั้งหมด",
791
799
  role: "บทบาท",
792
800
  name: "ชื่อ"
@@ -958,13 +966,13 @@ const _t = {
958
966
  placeholder: "ค้นหาร้านอาหาร"
959
967
  }
960
968
  }
961
- }, Mr = {
962
- hr: is
963
- }, Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
969
+ }, Cn = {
970
+ hr: as
971
+ }, Dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
964
972
  __proto__: null,
965
- default: Mr,
966
- hr: is
967
- }, Symbol.toStringTag, { value: "Module" })), ls = {
973
+ default: Cn,
974
+ hr: as
975
+ }, Symbol.toStringTag, { value: "Module" })), os = {
968
976
  employee: {
969
977
  title: "员工",
970
978
  exportButtonLabel: "导出",
@@ -973,12 +981,15 @@ const _t = {
973
981
  code: "工号",
974
982
  name: "姓名",
975
983
  restaurants: "餐厅",
984
+ assignedRole: "分配角色",
976
985
  since: "入职时间"
977
986
  },
978
987
  form: {
979
988
  add: "添加员工",
980
989
  update: "更新员工",
981
990
  employeeSetting: "员工设置",
991
+ assignmentSection: "门店与角色分配",
992
+ addAnother: "新增一项",
982
993
  masterUserConfig: "主用户配置",
983
994
  code: "工号",
984
995
  masterUser: "主用户",
@@ -988,6 +999,7 @@ const _t = {
988
999
  passcodeRequired: "密码必须为4位数字",
989
1000
  passcodeGenerate: "生成密码",
990
1001
  atLeastOneRestaurant: "至少选择一个餐厅",
1002
+ roleRequired: "请为每个餐厅选择角色",
991
1003
  all: "全选",
992
1004
  role: "角色",
993
1005
  name: "姓名"
@@ -1160,13 +1172,13 @@ const _t = {
1160
1172
  placeholder: "搜索餐厅"
1161
1173
  }
1162
1174
  }
1163
- }, Dr = {
1164
- hr: ls
1165
- }, jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1175
+ }, jn = {
1176
+ hr: os
1177
+ }, Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1166
1178
  __proto__: null,
1167
- default: Dr,
1168
- hr: ls
1169
- }, Symbol.toStringTag, { value: "Module" })), cs = {
1179
+ default: jn,
1180
+ hr: os
1181
+ }, Symbol.toStringTag, { value: "Module" })), is = {
1170
1182
  employee: {
1171
1183
  title: "員工",
1172
1184
  exportButtonLabel: "導出",
@@ -1175,12 +1187,15 @@ const _t = {
1175
1187
  code: "工號",
1176
1188
  name: "姓名",
1177
1189
  restaurants: "餐廳",
1190
+ assignedRole: "分配角色",
1178
1191
  since: "入職時間"
1179
1192
  },
1180
1193
  form: {
1181
1194
  add: "添加員工",
1182
1195
  update: "更新員工",
1183
1196
  employeeSetting: "員工設置",
1197
+ assignmentSection: "門店與角色分配",
1198
+ addAnother: "新增一項",
1184
1199
  masterUserConfig: "主用户配置",
1185
1200
  code: "工號",
1186
1201
  masterUser: "主用户",
@@ -1190,6 +1205,7 @@ const _t = {
1190
1205
  passcodeRequired: "密碼必須為4位數字",
1191
1206
  passcodeGenerate: "生成密碼",
1192
1207
  atLeastOneRestaurant: "至少選擇一個餐廳",
1208
+ roleRequired: "請為每個餐廳選擇角色",
1193
1209
  all: "全選",
1194
1210
  role: "角色",
1195
1211
  name: "姓名"
@@ -1357,18 +1373,18 @@ const _t = {
1357
1373
  subtitle: ""
1358
1374
  }
1359
1375
  }
1360
- }, Gr = {
1361
- hr: cs
1362
- }, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1376
+ }, Yn = {
1377
+ hr: is
1378
+ }, En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1363
1379
  __proto__: null,
1364
- default: Gr,
1365
- hr: cs
1366
- }, Symbol.toStringTag, { value: "Module" })), Er = {
1367
- "en-US": wr,
1368
- "zh-CN": jr,
1369
- "th-TH": Cr,
1370
- "zh-Hant": Yr
1371
- }, As = {
1380
+ default: Yn,
1381
+ hr: is
1382
+ }, Symbol.toStringTag, { value: "Module" })), xn = {
1383
+ "en-US": Mn,
1384
+ "zh-CN": Gn,
1385
+ "th-TH": Dn,
1386
+ "zh-Hant": En
1387
+ }, ls = {
1372
1388
  title: "Team members",
1373
1389
  actions: {
1374
1390
  addMember: "Add member",
@@ -1411,7 +1427,9 @@ const _t = {
1411
1427
  },
1412
1428
  filter: {
1413
1429
  permission_placeholder: "Filter by permission",
1414
- selected_permission_prefix: "Selected permissions: "
1430
+ selected_permission_prefix: "Selected permissions: ",
1431
+ assigned_role_placeholder: "Assigned Role",
1432
+ selected_assigned_role_prefix: "Assigned roles: "
1415
1433
  },
1416
1434
  emptyState: {
1417
1435
  title: "No team members found",
@@ -1433,6 +1451,7 @@ const _t = {
1433
1451
  emailAddress: "Email address"
1434
1452
  },
1435
1453
  permissions: {
1454
+ title: "Permissions",
1436
1455
  manageable: "Manageable {context}",
1437
1456
  search: "Search {context}",
1438
1457
  general: "General permissions",
@@ -1442,13 +1461,18 @@ const _t = {
1442
1461
  includedFuture: "Include future {context}",
1443
1462
  includedNewRole: "Include new added role",
1444
1463
  roles: "Usable POS roles",
1445
- inherited: "Inherited permission from:"
1464
+ inherited: "Inherited permission from:",
1465
+ allowedCount: "{count} permissions allowed",
1466
+ columnName: "Name",
1467
+ columnManage: "Manage"
1446
1468
  },
1447
1469
  masterUser: {
1448
1470
  title: "Master user",
1449
1471
  passcode: "Master user passcode",
1450
1472
  passcodeRequired: "Passcode must be 4 digits",
1451
1473
  sublabel: "Master user can access restaurant POS system.",
1474
+ assignmentSection: "Outlet & Role Assignment",
1475
+ addAnother: "Add another",
1452
1476
  code: "Code",
1453
1477
  name: "Name",
1454
1478
  role: "Role",
@@ -1464,7 +1488,7 @@ const _t = {
1464
1488
  selectPlaceholder: "Select permission role"
1465
1489
  }
1466
1490
  }
1467
- }, us = {
1491
+ }, cs = {
1468
1492
  title: "Permission Set",
1469
1493
  createButtonLabel: "Create permission set",
1470
1494
  search: {
@@ -1586,15 +1610,15 @@ const _t = {
1586
1610
  permissions: "Permissions"
1587
1611
  }
1588
1612
  }
1589
- }, xr = {
1590
- team: As,
1591
- permissionSet: us
1592
- }, Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1613
+ }, Vn = {
1614
+ team: ls,
1615
+ permissionSet: cs
1616
+ }, Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1593
1617
  __proto__: null,
1594
- default: xr,
1595
- permissionSet: us,
1596
- team: As
1597
- }, Symbol.toStringTag, { value: "Module" })), ms = {
1618
+ default: Vn,
1619
+ permissionSet: cs,
1620
+ team: ls
1621
+ }, Symbol.toStringTag, { value: "Module" })), As = {
1598
1622
  title: "สมาชิกในทีม",
1599
1623
  actions: {
1600
1624
  addMember: "เพิ่มสมาชิก",
@@ -1637,7 +1661,9 @@ const _t = {
1637
1661
  },
1638
1662
  filter: {
1639
1663
  permission_placeholder: "กรองตามสิทธิ์อนุญาต",
1640
- selected_permission_prefix: "สิทธิ์ที่เลือก: "
1664
+ selected_permission_prefix: "สิทธิ์ที่เลือก: ",
1665
+ assigned_role_placeholder: "บทบาทที่กำหนด",
1666
+ selected_assigned_role_prefix: "บทบาทที่เลือก: "
1641
1667
  },
1642
1668
  emptyState: {
1643
1669
  title: "ไม่พบสมาชิกในทีม",
@@ -1659,6 +1685,7 @@ const _t = {
1659
1685
  emailAddress: "ที่อยู่อีเมล"
1660
1686
  },
1661
1687
  permissions: {
1688
+ title: "สิทธิ์อนุญาต",
1662
1689
  manageable: "จัดการได้ {context}",
1663
1690
  search: "ค้นหา {context}",
1664
1691
  general: "สิทธิ์ทั่วไป",
@@ -1668,13 +1695,18 @@ const _t = {
1668
1695
  includedFuture: "รวม {context} ในอนาคต",
1669
1696
  includedNewRole: "รวมบทบาทใหม่ที่เพิ่มเข้ามา",
1670
1697
  roles: "บทบาท POS ที่สามารถใช้ได้",
1671
- inherited: "สิทธิ์ที่ได้รับการสืบทอดจาก:"
1698
+ inherited: "สิทธิ์ที่ได้รับการสืบทอดจาก:",
1699
+ allowedCount: "{count} สิทธิ์ที่อนุญาต",
1700
+ columnName: "ชื่อ",
1701
+ columnManage: "จัดการ"
1672
1702
  },
1673
1703
  masterUser: {
1674
1704
  title: "ผู้ใช้หลัก",
1675
1705
  passcode: "รหัสผ่านผู้ใช้หลัก",
1676
1706
  passcodeRequired: "รหัสผ่านต้องเป็นตัวเลข 4 หลัก",
1677
1707
  sublabel: "ผู้ใช้หลักสามารถเข้าถึงระบบ POS ของร้านอาหารได้",
1708
+ assignmentSection: "การกำหนดสาขาและบทบาท",
1709
+ addAnother: "เพิ่มอีก",
1678
1710
  code: "รหัส",
1679
1711
  name: "ชื่อ",
1680
1712
  role: "บทบาท",
@@ -1690,7 +1722,7 @@ const _t = {
1690
1722
  selectPlaceholder: "เลือกบทบาทสิทธิ์"
1691
1723
  }
1692
1724
  }
1693
- }, gs = {
1725
+ }, us = {
1694
1726
  title: "ชุดสิทธิ์",
1695
1727
  createButtonLabel: "สร้างชุดสิทธิ์",
1696
1728
  search: {
@@ -1812,15 +1844,15 @@ const _t = {
1812
1844
  permissions: "สิทธิ์อนุญาต"
1813
1845
  }
1814
1846
  }
1815
- }, Pr = {
1816
- team: ms,
1817
- permissionSet: gs
1818
- }, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1847
+ }, Fn = {
1848
+ team: As,
1849
+ permissionSet: us
1850
+ }, On = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1819
1851
  __proto__: null,
1820
- default: Pr,
1821
- permissionSet: gs,
1822
- team: ms
1823
- }, Symbol.toStringTag, { value: "Module" })), ds = {
1852
+ default: Fn,
1853
+ permissionSet: us,
1854
+ team: As
1855
+ }, Symbol.toStringTag, { value: "Module" })), ms = {
1824
1856
  title: "团队成员",
1825
1857
  actions: {
1826
1858
  addMember: "添加成员",
@@ -1863,7 +1895,9 @@ const _t = {
1863
1895
  },
1864
1896
  filter: {
1865
1897
  permission_placeholder: "按权限筛选",
1866
- selected_permission_prefix: "已选权限: "
1898
+ selected_permission_prefix: "已选权限: ",
1899
+ assigned_role_placeholder: "分配角色",
1900
+ selected_assigned_role_prefix: "已选角色: "
1867
1901
  },
1868
1902
  emptyState: {
1869
1903
  title: "没有团队成员",
@@ -1885,6 +1919,7 @@ const _t = {
1885
1919
  emailAddress: "邮箱地址"
1886
1920
  },
1887
1921
  permissions: {
1922
+ title: "权限",
1888
1923
  manageable: "可管理{context}",
1889
1924
  search: "搜索{context}",
1890
1925
  general: "通用权限",
@@ -1894,13 +1929,18 @@ const _t = {
1894
1929
  includedFuture: "包含未来{context}",
1895
1930
  includedNewRole: "包含新添加的角色",
1896
1931
  roles: "可用 POS 角色",
1897
- inherited: "继承权限来自:"
1932
+ inherited: "继承权限来自:",
1933
+ allowedCount: "{count} 个权限已启用",
1934
+ columnName: "名称",
1935
+ columnManage: "管理"
1898
1936
  },
1899
1937
  masterUser: {
1900
1938
  title: "主用户",
1901
1939
  passcode: "主用户密码",
1902
1940
  passcodeRequired: "密码必须为4位数字",
1903
1941
  sublabel: "主用户可以访问餐厅 POS 系统。",
1942
+ assignmentSection: "门店与角色分配",
1943
+ addAnother: "再添加一项",
1904
1944
  code: "工号",
1905
1945
  name: "姓名",
1906
1946
  role: "角色",
@@ -1916,7 +1956,7 @@ const _t = {
1916
1956
  selectPlaceholder: "选择权限角色"
1917
1957
  }
1918
1958
  }
1919
- }, ps = {
1959
+ }, gs = {
1920
1960
  title: "权限集",
1921
1961
  createButtonLabel: "创建权限集",
1922
1962
  search: {
@@ -2038,15 +2078,15 @@ const _t = {
2038
2078
  permissions: "权限"
2039
2079
  }
2040
2080
  }
2041
- }, Or = {
2042
- team: ds,
2043
- permissionSet: ps
2044
- }, qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2081
+ }, qn = {
2082
+ team: ms,
2083
+ permissionSet: gs
2084
+ }, Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2045
2085
  __proto__: null,
2046
- default: Or,
2047
- permissionSet: ps,
2048
- team: ds
2049
- }, Symbol.toStringTag, { value: "Module" })), bs = {
2086
+ default: qn,
2087
+ permissionSet: gs,
2088
+ team: ms
2089
+ }, Symbol.toStringTag, { value: "Module" })), ds = {
2050
2090
  title: "團隊成員",
2051
2091
  actions: {
2052
2092
  addMember: "添加成員",
@@ -2089,7 +2129,9 @@ const _t = {
2089
2129
  },
2090
2130
  filter: {
2091
2131
  permission_placeholder: "按權限篩選",
2092
- selected_permission_prefix: "已選權限: "
2132
+ selected_permission_prefix: "已選權限: ",
2133
+ assigned_role_placeholder: "分配角色",
2134
+ selected_assigned_role_prefix: "已選角色: "
2093
2135
  },
2094
2136
  emptyState: {
2095
2137
  title: "沒有團隊成員",
@@ -2111,6 +2153,7 @@ const _t = {
2111
2153
  emailAddress: "郵箱地址"
2112
2154
  },
2113
2155
  permissions: {
2156
+ title: "權限",
2114
2157
  manageable: "可管理{context}",
2115
2158
  search: "搜索{context}",
2116
2159
  general: "通用權限",
@@ -2120,13 +2163,18 @@ const _t = {
2120
2163
  includedFuture: "包含未來{context}",
2121
2164
  includedNewRole: "包含新添加的角色",
2122
2165
  roles: "可用 POS 角色",
2123
- inherited: "繼承權限來自:"
2166
+ inherited: "繼承權限來自:",
2167
+ allowedCount: "{count} 個權限已啟用",
2168
+ columnName: "名稱",
2169
+ columnManage: "管理"
2124
2170
  },
2125
2171
  masterUser: {
2126
2172
  title: "主用户",
2127
2173
  passcode: "主用户密碼",
2128
2174
  passcodeRequired: "密碼必須為4位數字",
2129
2175
  sublabel: "主用户可以訪問餐廳 POS 系統。",
2176
+ assignmentSection: "門店與角色分配",
2177
+ addAnother: "再新增一項",
2130
2178
  code: "工號",
2131
2179
  name: "姓名",
2132
2180
  role: "角色",
@@ -2149,7 +2197,7 @@ const _t = {
2149
2197
  placeholder: "搜索角色"
2150
2198
  }
2151
2199
  }
2152
- }, fs = {
2200
+ }, ps = {
2153
2201
  title: "權限集",
2154
2202
  createButtonLabel: "創建權限集",
2155
2203
  search: {
@@ -2271,20 +2319,20 @@ const _t = {
2271
2319
  permissions: "權限"
2272
2320
  }
2273
2321
  }
2274
- }, Hr = {
2275
- team: bs,
2276
- permissionSet: fs
2277
- }, Xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2322
+ }, Xn = {
2323
+ team: ds,
2324
+ permissionSet: ps
2325
+ }, Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2278
2326
  __proto__: null,
2279
- default: Hr,
2280
- permissionSet: fs,
2281
- team: bs
2282
- }, Symbol.toStringTag, { value: "Module" })), Qr = {
2283
- "en-US": Vr,
2284
- "zh-CN": qr,
2285
- "th-TH": Fr,
2286
- "zh-Hant": Xr
2287
- }, ys = {
2327
+ default: Xn,
2328
+ permissionSet: ps,
2329
+ team: ds
2330
+ }, Symbol.toStringTag, { value: "Module" })), In = {
2331
+ "en-US": Pn,
2332
+ "zh-CN": Hn,
2333
+ "th-TH": On,
2334
+ "zh-Hant": Qn
2335
+ }, bs = {
2288
2336
  title: "POS Grant",
2289
2337
  actions: {
2290
2338
  create: "Create Passcode",
@@ -2338,13 +2386,13 @@ const _t = {
2338
2386
  passcode: {
2339
2387
  copied: "Passcode copied"
2340
2388
  }
2341
- }, Ir = {
2342
- grantUser: ys
2343
- }, Rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2389
+ }, Rn = {
2390
+ grantUser: bs
2391
+ }, Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2344
2392
  __proto__: null,
2345
- default: Ir,
2346
- grantUser: ys
2347
- }, Symbol.toStringTag, { value: "Module" })), vs = {
2393
+ default: Rn,
2394
+ grantUser: bs
2395
+ }, Symbol.toStringTag, { value: "Module" })), fs = {
2348
2396
  title: "POS Grant",
2349
2397
  actions: {
2350
2398
  create: "สร้างรหัสผ่าน",
@@ -2398,13 +2446,13 @@ const _t = {
2398
2446
  passcode: {
2399
2447
  copied: "คัดลอกรหัสผ่านแล้ว"
2400
2448
  }
2401
- }, Zr = {
2402
- grantUser: vs
2403
- }, Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2449
+ }, Zn = {
2450
+ grantUser: fs
2451
+ }, zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2404
2452
  __proto__: null,
2405
- default: Zr,
2406
- grantUser: vs
2407
- }, Symbol.toStringTag, { value: "Module" })), hs = {
2453
+ default: Zn,
2454
+ grantUser: fs
2455
+ }, Symbol.toStringTag, { value: "Module" })), ys = {
2408
2456
  title: "POS 授予",
2409
2457
  actions: {
2410
2458
  create: "创建密码",
@@ -2458,13 +2506,13 @@ const _t = {
2458
2506
  passcode: {
2459
2507
  copied: "密码已复制"
2460
2508
  }
2461
- }, zr = {
2462
- grantUser: hs
2463
- }, Ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2509
+ }, Un = {
2510
+ grantUser: ys
2511
+ }, Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2464
2512
  __proto__: null,
2465
- default: zr,
2466
- grantUser: hs
2467
- }, Symbol.toStringTag, { value: "Module" })), Bs = {
2513
+ default: Un,
2514
+ grantUser: ys
2515
+ }, Symbol.toStringTag, { value: "Module" })), vs = {
2468
2516
  title: "POS 授予",
2469
2517
  actions: {
2470
2518
  create: "创建密码",
@@ -2518,19 +2566,19 @@ const _t = {
2518
2566
  passcode: {
2519
2567
  copied: "密碼已複製"
2520
2568
  }
2521
- }, Wr = {
2522
- grantUser: Bs
2523
- }, Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2569
+ }, Tn = {
2570
+ grantUser: vs
2571
+ }, Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2524
2572
  __proto__: null,
2525
- default: Wr,
2526
- grantUser: Bs
2527
- }, Symbol.toStringTag, { value: "Module" })), Sr = {
2528
- "en-US": Rr,
2529
- "zh-CN": Ur,
2530
- "th-TH": Nr,
2531
- "zh-Hant": Tr
2573
+ default: Tn,
2574
+ grantUser: vs
2575
+ }, Symbol.toStringTag, { value: "Module" })), kn = {
2576
+ "en-US": Nn,
2577
+ "zh-CN": Wn,
2578
+ "th-TH": zn,
2579
+ "zh-Hant": Sn
2532
2580
  };
2533
- var t = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(t || {}), o = /* @__PURE__ */ ((e) => (e.miniProgram_profile = "business::miniProgram::profile", e.miniProgram_brandkit = "business::miniProgram::brandkit", e.miniProgram_template = "business::miniProgram::template", e.miniProgram_publish = "business::miniProgram::publish", e.miniProgram_assets = "business::miniProgram::assets", e.miniProgram_nativeCredentials = "business::miniProgram::nativeCredentials", e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.crm_analytic = "business::crm::analytic", e.crm_tier = "business::crm::tier", e.crm_title = "business::crm::title", e.crm_broadcast = "business::crm::broadcast", e.crm_point = "business::crm::point", e.crm_credit = "business::crm::credit", e.crm_experience = "business::crm::experience", e.crm_game = "business::crm::game", e.crm_mission = "business::crm::mission", e.crm_loyaltyMember = "business::crm::loyaltyMember", e.crm_loyaltySegment = "business::crm::loyaltySegment", e.crm_loyaltyCard = "business::crm::loyaltyCard", e.crm_referral = "business::crm::referral", e.crm_store = "business::crm::store", e.crm_transaction = "business::crm::transaction", e.crm_setting = "business::crm::setting", e.crm_bin = "business::crm::bin", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.menu_item = "business::menu::item", e.menu_catalog = "business::menu::catalog", e.menu_category = "business::menu::category", e.menu_subCategory = "business::menu::subCategory", e.menu_group = "business::menu::group", e.menu_takeaway = "business::menu::takeaway", e.menu_scheduler = "business::menu::scheduler", e.menu_variant = "business::menu::variant", e.menu_cookingGuide = "business::menu::cookingGuide", e.menu_printRoute = "business::menu::printRoute", e.menu_servingSequence = "business::menu::servingSequence", e.menu_settings = "business::menu::settings", e.menu_publish = "business::menu::publish", e.menu_menuManagement = "business::menu::menuManagement", e.menu_importExport = "business::menu::importExport", e.menu_unit = "business::menu::unit", e.menu_ingredient = "business::menu::ingredient", e.menu_recipe = "business::menu::recipe", e.restaurant = "business::restaurant", e.role = "business::role", e.mdm_deviceManagement = "business::mdm::deviceManagement", e.mdm_createDevice = "business::mdm::createDevice", e.mdm_deviceBinding = "business::mdm::deviceBinding", e.mdm_customerDisplay = "business::mdm::customerDisplay", e.eInvoice_management = "business::eInvoice::management", e.eInvoice_integration = "business::eInvoice::integration", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e.operation_receipt = "business::operation::receipt", e.operation_tableManagement = "business::operation::tableManagement", e.operation_offlinePayment = "business::operation::offlinePayment", e.operation_reasonTemplate = "business::operation::reasonTemplate", e.operation_discountRule = "business::operation::discountRule", e.operation_serviceCharge = "business::operation::serviceCharge", e.operation_kitchenPrintTemplate = "business::operation::kitchenPrintTemplate", e))(o || {}), U = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(U || {}), ws = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(ws || {});
2581
+ var t = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(t || {}), o = /* @__PURE__ */ ((e) => (e.miniProgram_profile = "business::miniProgram::profile", e.miniProgram_brandkit = "business::miniProgram::brandkit", e.miniProgram_template = "business::miniProgram::template", e.miniProgram_publish = "business::miniProgram::publish", e.miniProgram_assets = "business::miniProgram::assets", e.miniProgram_nativeCredentials = "business::miniProgram::nativeCredentials", e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.crm_analytic = "business::crm::analytic", e.crm_tier = "business::crm::tier", e.crm_title = "business::crm::title", e.crm_broadcast = "business::crm::broadcast", e.crm_point = "business::crm::point", e.crm_credit = "business::crm::credit", e.crm_experience = "business::crm::experience", e.crm_game = "business::crm::game", e.crm_mission = "business::crm::mission", e.crm_loyaltyMember = "business::crm::loyaltyMember", e.crm_loyaltySegment = "business::crm::loyaltySegment", e.crm_loyaltyCard = "business::crm::loyaltyCard", e.crm_referral = "business::crm::referral", e.crm_store = "business::crm::store", e.crm_transaction = "business::crm::transaction", e.crm_setting = "business::crm::setting", e.crm_bin = "business::crm::bin", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.menu_item = "business::menu::item", e.menu_catalog = "business::menu::catalog", e.menu_category = "business::menu::category", e.menu_subCategory = "business::menu::subCategory", e.menu_group = "business::menu::group", e.menu_takeaway = "business::menu::takeaway", e.menu_scheduler = "business::menu::scheduler", e.menu_variant = "business::menu::variant", e.menu_cookingGuide = "business::menu::cookingGuide", e.menu_printRoute = "business::menu::printRoute", e.menu_servingSequence = "business::menu::servingSequence", e.menu_settings = "business::menu::settings", e.menu_publish = "business::menu::publish", e.menu_menuManagement = "business::menu::menuManagement", e.menu_importExport = "business::menu::importExport", e.menu_unit = "business::menu::unit", e.menu_ingredient = "business::menu::ingredient", e.menu_recipe = "business::menu::recipe", e.restaurant = "business::restaurant", e.role = "business::role", e.mdm_deviceManagement = "business::mdm::deviceManagement", e.mdm_createDevice = "business::mdm::createDevice", e.mdm_deviceBinding = "business::mdm::deviceBinding", e.mdm_customerDisplay = "business::mdm::customerDisplay", e.eInvoice_management = "business::eInvoice::management", e.eInvoice_integration = "business::eInvoice::integration", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e.operation_receipt = "business::operation::receipt", e.operation_tableManagement = "business::operation::tableManagement", e.operation_offlinePayment = "business::operation::offlinePayment", e.operation_reasonTemplate = "business::operation::reasonTemplate", e.operation_discountRule = "business::operation::discountRule", e.operation_serviceCharge = "business::operation::serviceCharge", e.operation_kitchenPrintTemplate = "business::operation::kitchenPrintTemplate", e))(o || {}), U = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(U || {}), hs = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(hs || {});
2534
2582
  const b = {
2535
2583
  general: "General",
2536
2584
  inventory: "Inventory",
@@ -2544,13 +2592,13 @@ const b = {
2544
2592
  reports: "Default Report",
2545
2593
  customReports: "Custom Report",
2546
2594
  miniProgram: "Mini Program"
2547
- }, kr = "access-denied", We = {
2595
+ }, Kn = "access-denied", We = {
2548
2596
  Action: t,
2549
2597
  Subject: {
2550
2598
  Business: o,
2551
- Restaurant: ws
2599
+ Restaurant: hs
2552
2600
  }
2553
- }, Ms = {
2601
+ }, Bs = {
2554
2602
  [U.permission]: o.hrm_teamMember,
2555
2603
  [U.promotion]: o.crm_promotion,
2556
2604
  [U.voucher]: o.crm_voucher,
@@ -3180,7 +3228,7 @@ const R = [
3180
3228
  subject: q.crm,
3181
3229
  actions: [t.read]
3182
3230
  }
3183
- ], $ = (...e) => e.flat(), Kr = [
3231
+ ], $ = (...e) => e.flat(), Ln = [
3184
3232
  ...R,
3185
3233
  {
3186
3234
  label: "User",
@@ -3192,7 +3240,7 @@ const R = [
3192
3240
  t.delete
3193
3241
  ]
3194
3242
  }
3195
- ], Lr = [
3243
+ ], Jn = [
3196
3244
  ...R,
3197
3245
  {
3198
3246
  label: "Segmentation",
@@ -3204,7 +3252,7 @@ const R = [
3204
3252
  t.delete
3205
3253
  ]
3206
3254
  }
3207
- ], Cs = [
3255
+ ], ws = [
3208
3256
  ...R,
3209
3257
  {
3210
3258
  label: "Transaction",
@@ -3216,7 +3264,7 @@ const R = [
3216
3264
  t.delete
3217
3265
  ]
3218
3266
  }
3219
- ], Ds = [
3267
+ ], Ms = [
3220
3268
  ...R,
3221
3269
  {
3222
3270
  label: "Store",
@@ -3228,7 +3276,7 @@ const R = [
3228
3276
  t.delete
3229
3277
  ]
3230
3278
  }
3231
- ], Jr = [
3279
+ ], _n = [
3232
3280
  ...R,
3233
3281
  {
3234
3282
  label: "Location",
@@ -3240,7 +3288,7 @@ const R = [
3240
3288
  t.delete
3241
3289
  ]
3242
3290
  }
3243
- ], _r = [
3291
+ ], $n = [
3244
3292
  ...R,
3245
3293
  {
3246
3294
  label: "Effect",
@@ -3252,14 +3300,14 @@ const R = [
3252
3300
  t.delete
3253
3301
  ]
3254
3302
  }
3255
- ], $r = [
3303
+ ], er = [
3256
3304
  ...R,
3257
3305
  {
3258
3306
  label: "Setting",
3259
3307
  subject: q.crm_setting,
3260
3308
  actions: [t.read, t.update]
3261
3309
  }
3262
- ], en = [
3310
+ ], tr = [
3263
3311
  ...R,
3264
3312
  {
3265
3313
  label: "Reward",
@@ -3283,7 +3331,7 @@ const R = [
3283
3331
  t.delete
3284
3332
  ]
3285
3333
  }
3286
- ], js = [
3334
+ ], Cs = [
3287
3335
  ...R,
3288
3336
  {
3289
3337
  label: "Referral",
@@ -3295,7 +3343,7 @@ const R = [
3295
3343
  t.delete
3296
3344
  ]
3297
3345
  }
3298
- ], tn = [
3346
+ ], sr = [
3299
3347
  ...R,
3300
3348
  {
3301
3349
  label: "Marketing Material",
@@ -3307,14 +3355,14 @@ const R = [
3307
3355
  t.delete
3308
3356
  ]
3309
3357
  }
3310
- ], Gs = [
3358
+ ], Ds = [
3311
3359
  ...R,
3312
3360
  {
3313
3361
  label: "Analytic",
3314
3362
  subject: q.crm_analytic,
3315
3363
  actions: [t.read]
3316
3364
  }
3317
- ], sn = [
3365
+ ], nr = [
3318
3366
  ...R,
3319
3367
  {
3320
3368
  label: "Tier",
@@ -3326,7 +3374,7 @@ const R = [
3326
3374
  t.delete
3327
3375
  ]
3328
3376
  }
3329
- ], rn = [
3377
+ ], rr = [
3330
3378
  ...R,
3331
3379
  {
3332
3380
  label: "Title",
@@ -3338,7 +3386,7 @@ const R = [
3338
3386
  t.delete
3339
3387
  ]
3340
3388
  }
3341
- ], nn = [
3389
+ ], ar = [
3342
3390
  ...R,
3343
3391
  {
3344
3392
  label: "Broadcast",
@@ -3350,7 +3398,7 @@ const R = [
3350
3398
  t.delete
3351
3399
  ]
3352
3400
  }
3353
- ], an = [
3401
+ ], or = [
3354
3402
  ...R,
3355
3403
  {
3356
3404
  label: "Point",
@@ -3362,7 +3410,7 @@ const R = [
3362
3410
  t.delete
3363
3411
  ]
3364
3412
  }
3365
- ], on = [
3413
+ ], ir = [
3366
3414
  ...R,
3367
3415
  {
3368
3416
  label: "Credit",
@@ -3374,7 +3422,7 @@ const R = [
3374
3422
  t.delete
3375
3423
  ]
3376
3424
  }
3377
- ], ln = [
3425
+ ], lr = [
3378
3426
  ...R,
3379
3427
  {
3380
3428
  label: "Experience",
@@ -3386,7 +3434,7 @@ const R = [
3386
3434
  t.delete
3387
3435
  ]
3388
3436
  }
3389
- ], cn = [
3437
+ ], cr = [
3390
3438
  ...R,
3391
3439
  {
3392
3440
  label: "Game",
@@ -3398,7 +3446,7 @@ const R = [
3398
3446
  t.delete
3399
3447
  ]
3400
3448
  }
3401
- ], An = [
3449
+ ], Ar = [
3402
3450
  ...R,
3403
3451
  {
3404
3452
  label: "Mission",
@@ -3410,7 +3458,7 @@ const R = [
3410
3458
  t.delete
3411
3459
  ]
3412
3460
  }
3413
- ], Ys = [
3461
+ ], js = [
3414
3462
  ...R,
3415
3463
  {
3416
3464
  label: "Loyalty Member",
@@ -3422,7 +3470,7 @@ const R = [
3422
3470
  t.delete
3423
3471
  ]
3424
3472
  }
3425
- ], Es = [
3473
+ ], Gs = [
3426
3474
  ...R,
3427
3475
  {
3428
3476
  label: "Loyalty Segment",
@@ -3434,7 +3482,7 @@ const R = [
3434
3482
  t.delete
3435
3483
  ]
3436
3484
  }
3437
- ], xs = [
3485
+ ], Ys = [
3438
3486
  ...R,
3439
3487
  {
3440
3488
  label: "Loyalty Card",
@@ -3446,44 +3494,44 @@ const R = [
3446
3494
  t.delete
3447
3495
  ]
3448
3496
  }
3449
- ], Vs = [
3497
+ ], Es = [
3450
3498
  ...R,
3451
3499
  {
3452
3500
  label: "Bin",
3453
3501
  subject: q.crm_bin,
3454
3502
  actions: [t.read, t.update, t.delete]
3455
3503
  }
3456
- ], Ps = $(
3504
+ ], xs = $(
3505
+ oe,
3506
+ nr
3507
+ ), Vs = $(
3508
+ oe,
3509
+ rr
3510
+ ), Ps = $(
3457
3511
  oe,
3458
- sn
3512
+ ar
3459
3513
  ), Fs = $(
3460
3514
  oe,
3461
- rn
3515
+ or
3462
3516
  ), Os = $(
3463
3517
  oe,
3464
- nn
3518
+ ir
3465
3519
  ), qs = $(
3466
3520
  oe,
3467
- an
3521
+ lr
3468
3522
  ), Hs = $(
3469
3523
  oe,
3470
- on
3524
+ cr
3471
3525
  ), Xs = $(
3472
3526
  oe,
3473
- ln
3474
- ), Qs = $(
3475
- oe,
3476
- cn
3477
- ), Is = $(
3478
- oe,
3479
- An
3480
- ), un = $(
3527
+ Ar
3528
+ ), ur = $(
3481
3529
  oe,
3482
- js
3483
- ), Rs = $(
3530
+ Cs
3531
+ ), Qs = $(
3484
3532
  oe,
3485
- $r
3486
- ), mn = [
3533
+ er
3534
+ ), mr = [
3487
3535
  ...R,
3488
3536
  {
3489
3537
  label: "Voucher",
@@ -3495,7 +3543,7 @@ const R = [
3495
3543
  t.delete
3496
3544
  ]
3497
3545
  }
3498
- ], gn = [
3546
+ ], gr = [
3499
3547
  ...R,
3500
3548
  {
3501
3549
  label: "Membership",
@@ -3507,140 +3555,140 @@ const R = [
3507
3555
  t.delete
3508
3556
  ]
3509
3557
  }
3510
- ], dn = $(
3511
- Kr,
3512
- Lr,
3513
- Cs,
3558
+ ], dr = $(
3559
+ Ln,
3560
+ Jn,
3561
+ ws,
3562
+ Ms,
3563
+ _n,
3564
+ $n,
3565
+ Qs,
3566
+ tr,
3514
3567
  Ds,
3515
- Jr,
3516
- _r,
3517
- Rs,
3518
- en,
3519
- Gs,
3568
+ xs,
3569
+ Vs,
3520
3570
  Ps,
3521
3571
  Fs,
3522
3572
  Os,
3523
3573
  qs,
3524
3574
  Hs,
3525
3575
  Xs,
3526
- Qs,
3527
- Is,
3576
+ js,
3577
+ Gs,
3528
3578
  Ys,
3529
- Es,
3530
- xs,
3531
- Vs
3532
- ), pn = $(
3579
+ Es
3580
+ ), pr = $(
3533
3581
  oe,
3534
- js,
3535
- tn
3536
- ), bn = $(
3582
+ Cs,
3583
+ sr
3584
+ ), br = $(
3537
3585
  oe,
3538
- mn
3539
- ), fn = $(gn), yn = {
3586
+ mr
3587
+ ), fr = $(gr), yr = {
3540
3588
  [`set_${o.crm}`]: {
3541
3589
  key: "sys:crm:access",
3542
3590
  name: "CRM Access",
3543
- permissions: dn
3591
+ permissions: dr
3544
3592
  },
3545
3593
  [`set_${o.crm_promotion}`]: {
3546
3594
  key: "sys:crm:promotion",
3547
3595
  name: "CRM Promotion",
3548
- permissions: pn
3596
+ permissions: pr
3549
3597
  },
3550
3598
  [`set_${o.crm_voucher}`]: {
3551
3599
  key: "sys:crm:voucher",
3552
3600
  name: "CRM Voucher",
3553
- permissions: bn
3601
+ permissions: br
3554
3602
  },
3555
3603
  [`set_${o.crm_membership}`]: {
3556
3604
  key: "sys:crm:membership",
3557
3605
  name: "CRM Membership",
3558
- permissions: fn
3606
+ permissions: fr
3559
3607
  },
3560
3608
  [`set_${o.crm_analytic}`]: {
3561
3609
  key: "sys:crm:analytic",
3562
3610
  name: "CRM Analytic",
3563
- permissions: Gs
3611
+ permissions: Ds
3564
3612
  },
3565
3613
  [`set_${o.crm_tier}`]: {
3566
3614
  key: "sys:crm:tier",
3567
3615
  name: "CRM Tier",
3568
- permissions: Ps
3616
+ permissions: xs
3569
3617
  },
3570
3618
  [`set_${o.crm_title}`]: {
3571
3619
  key: "sys:crm:title",
3572
3620
  name: "CRM Title",
3573
- permissions: Fs
3621
+ permissions: Vs
3574
3622
  },
3575
3623
  [`set_${o.crm_broadcast}`]: {
3576
3624
  key: "sys:crm:broadcast",
3577
3625
  name: "CRM Broadcast",
3578
- permissions: Os
3626
+ permissions: Ps
3579
3627
  },
3580
3628
  [`set_${o.crm_point}`]: {
3581
3629
  key: "sys:crm:point",
3582
3630
  name: "CRM Point",
3583
- permissions: qs
3631
+ permissions: Fs
3584
3632
  },
3585
3633
  [`set_${o.crm_credit}`]: {
3586
3634
  key: "sys:crm:credit",
3587
3635
  name: "CRM Credit",
3588
- permissions: Hs
3636
+ permissions: Os
3589
3637
  },
3590
3638
  [`set_${o.crm_experience}`]: {
3591
3639
  key: "sys:crm:experience",
3592
3640
  name: "CRM Experience",
3593
- permissions: Xs
3641
+ permissions: qs
3594
3642
  },
3595
3643
  [`set_${o.crm_game}`]: {
3596
3644
  key: "sys:crm:game",
3597
3645
  name: "CRM Game",
3598
- permissions: Qs
3646
+ permissions: Hs
3599
3647
  },
3600
3648
  [`set_${o.crm_mission}`]: {
3601
3649
  key: "sys:crm:mission",
3602
3650
  name: "CRM Mission",
3603
- permissions: Is
3651
+ permissions: Xs
3604
3652
  },
3605
3653
  [`set_${o.crm_loyaltyMember}`]: {
3606
3654
  key: "sys:crm:loyaltyMember",
3607
3655
  name: "CRM Loyalty Member",
3608
- permissions: Ys
3656
+ permissions: js
3609
3657
  },
3610
3658
  [`set_${o.crm_loyaltySegment}`]: {
3611
3659
  key: "sys:crm:loyaltySegment",
3612
3660
  name: "CRM Loyalty Segment",
3613
- permissions: Es
3661
+ permissions: Gs
3614
3662
  },
3615
3663
  [`set_${o.crm_loyaltyCard}`]: {
3616
3664
  key: "sys:crm:loyaltyCard",
3617
3665
  name: "CRM Loyalty Card",
3618
- permissions: xs
3666
+ permissions: Ys
3619
3667
  },
3620
3668
  [`set_${o.crm_referral}`]: {
3621
3669
  key: "sys:crm:referral",
3622
3670
  name: "CRM Referral",
3623
- permissions: un
3671
+ permissions: ur
3624
3672
  },
3625
3673
  [`set_${o.crm_store}`]: {
3626
3674
  key: "sys:crm:store",
3627
3675
  name: "CRM Store",
3628
- permissions: Ds
3676
+ permissions: Ms
3629
3677
  },
3630
3678
  [`set_${o.crm_transaction}`]: {
3631
3679
  key: "sys:crm:transaction",
3632
3680
  name: "CRM Transaction",
3633
- permissions: Cs
3681
+ permissions: ws
3634
3682
  },
3635
3683
  [`set_${o.crm_setting}`]: {
3636
3684
  key: "sys:crm:setting",
3637
3685
  name: "CRM Setting",
3638
- permissions: Rs
3686
+ permissions: Qs
3639
3687
  },
3640
3688
  [`set_${o.crm_bin}`]: {
3641
3689
  key: "sys:crm:bin",
3642
3690
  name: "CRM Bin",
3643
- permissions: Vs
3691
+ permissions: Es
3644
3692
  }
3645
3693
  };
3646
3694
  var G = /* @__PURE__ */ ((e) => (e.inventory = "inventory", e.inventory_stock = "inventory::stock", e.inventory_stockAdjustment = "inventory::stockAdjustment", e.inventory_stockRecalculation = "inventory::stockRecalculation", e.inventory_unitCostHistory = "inventory::unitCostHistory", e.inventory_wastageTemplate = "inventory::wastageTemplate", e.inventory_closing = "inventory::closing", e.inventory_closingDraft = "inventory::closingDraft", e.inventory_closingTemplate = "inventory::closingTemplate", e.inventory_ingredient = "inventory::ingredient", e.inventory_ingredientGroup = "inventory::ingredientGroup", e.inventory_recipe = "inventory::recipe", e.inventory_unit = "inventory::unit", e.inventory_orderTemplate = "inventory::orderTemplate", e.inventory_orderDraft = "inventory::orderDraft", e.inventory_printTemplate = "inventory::printTemplate", e.inventory_purchaseOrder = "inventory::purchaseOrder", e.inventory_transferOutApproval = "inventory::transferOutApproval", e.inventory_adjustmentTemplate = "inventory::adjustmentTemplate", e.inventory_surcharge = "inventory::surcharge", e.inventory_supplier = "inventory::supplier", e.inventory_warehouse = "inventory::warehouse", e.inventory_publish = "inventory::publish", e.inventory_integration = "inventory::integration", e.inventory_deliveryOrder = "inventory::deliveryOrder", e.inventory_shipment = "inventory::shipment", e.inventory_orderDraftApproval = "inventory::orderDraftApproval", e))(G || {});
@@ -3672,21 +3720,21 @@ const K = [
3672
3720
  subject: G.inventory_unitCostHistory,
3673
3721
  actions: [t.read]
3674
3722
  }
3675
- ], vn = [
3723
+ ], vr = [
3676
3724
  ...K,
3677
3725
  {
3678
3726
  label: "Stock Adjustment",
3679
3727
  subject: G.inventory_stockAdjustment,
3680
3728
  actions: [t.update]
3681
3729
  }
3682
- ], Zs = [
3730
+ ], Is = [
3683
3731
  ...K,
3684
3732
  {
3685
3733
  label: "Unit Cost History",
3686
3734
  subject: G.inventory_unitCostHistory,
3687
3735
  actions: [t.read, t.update]
3688
3736
  }
3689
- ], Ns = [
3737
+ ], Rs = [
3690
3738
  ...K,
3691
3739
  {
3692
3740
  label: "Wastage Template",
@@ -3701,8 +3749,8 @@ const K = [
3701
3749
  ];
3702
3750
  [
3703
3751
  ...Et,
3704
- ...Zs,
3705
- ...Ns
3752
+ ...Is,
3753
+ ...Rs
3706
3754
  ];
3707
3755
  const xt = [
3708
3756
  ...K,
@@ -3721,7 +3769,7 @@ const xt = [
3721
3769
  subject: G.inventory_closingDraft,
3722
3770
  actions: [t.read]
3723
3771
  }
3724
- ], zs = [
3772
+ ], Ns = [
3725
3773
  ...K,
3726
3774
  {
3727
3775
  label: "Closing Draft",
@@ -3748,7 +3796,7 @@ const xt = [
3748
3796
  subject: G.inventory_stockAdjustment,
3749
3797
  actions: [t.read]
3750
3798
  }
3751
- ], Us = [
3799
+ ], Zs = [
3752
3800
  ...K,
3753
3801
  {
3754
3802
  label: "Closing Template",
@@ -3768,10 +3816,10 @@ const xt = [
3768
3816
  ];
3769
3817
  [
3770
3818
  ...xt,
3771
- ...zs,
3772
- ...Us
3819
+ ...Ns,
3820
+ ...Zs
3773
3821
  ];
3774
- const hn = [
3822
+ const hr = [
3775
3823
  {
3776
3824
  label: "Inventory",
3777
3825
  subject: G.inventory,
@@ -3792,25 +3840,25 @@ const hn = [
3792
3840
  subject: G.inventory_closingTemplate,
3793
3841
  actions: [t.read, t.update]
3794
3842
  }
3795
- ], Bn = [
3843
+ ], Br = [
3796
3844
  {
3797
3845
  label: "Inventory",
3798
3846
  subject: G.inventory,
3799
3847
  actions: [t.read, t.update]
3800
3848
  }
3801
- ], wn = [
3849
+ ], wr = [
3802
3850
  {
3803
3851
  label: "Inventory",
3804
3852
  subject: G.inventory,
3805
3853
  actions: [t.read, t.update]
3806
3854
  }
3807
- ], Mn = [
3855
+ ], Mr = [
3808
3856
  {
3809
3857
  label: "Inventory",
3810
3858
  subject: G.inventory,
3811
3859
  actions: [t.read, t.update]
3812
3860
  }
3813
- ], Ws = [
3861
+ ], zs = [
3814
3862
  {
3815
3863
  label: "Purchase Order",
3816
3864
  subject: G.inventory_purchaseOrder,
@@ -3851,7 +3899,7 @@ const hn = [
3851
3899
  subject: G.inventory_shipment,
3852
3900
  actions: [t.read, t.update]
3853
3901
  }
3854
- ], Ts = [
3902
+ ], Us = [
3855
3903
  {
3856
3904
  label: "Purchase Order",
3857
3905
  subject: G.inventory_purchaseOrder,
@@ -3872,7 +3920,7 @@ const hn = [
3872
3920
  subject: G.inventory_shipment,
3873
3921
  actions: [t.read, t.update]
3874
3922
  }
3875
- ], Ss = [
3923
+ ], Ws = [
3876
3924
  ...K,
3877
3925
  {
3878
3926
  label: "Surcharge",
@@ -3889,7 +3937,7 @@ const hn = [
3889
3937
  subject: G.inventory_supplier,
3890
3938
  actions: [t.read]
3891
3939
  }
3892
- ], ks = [
3940
+ ], Ts = [
3893
3941
  ...K,
3894
3942
  {
3895
3943
  label: "Order Template",
@@ -3911,7 +3959,7 @@ const hn = [
3911
3959
  subject: G.inventory_shipment,
3912
3960
  actions: [t.read, t.update]
3913
3961
  }
3914
- ], Cn = [
3962
+ ], Cr = [
3915
3963
  ...K,
3916
3964
  {
3917
3965
  label: "Order Draft Approval",
@@ -3920,12 +3968,12 @@ const hn = [
3920
3968
  }
3921
3969
  ];
3922
3970
  [
3971
+ ...zs,
3972
+ ...Us,
3923
3973
  ...Ws,
3924
- ...Ts,
3925
- ...Ss,
3926
- ...ks
3974
+ ...Ts
3927
3975
  ];
3928
- const Dn = [
3976
+ const Dr = [
3929
3977
  ...K,
3930
3978
  {
3931
3979
  label: "Supplier",
@@ -3942,7 +3990,7 @@ const Dn = [
3942
3990
  subject: G.inventory_orderTemplate,
3943
3991
  actions: [t.read, t.update]
3944
3992
  }
3945
- ], jn = [
3993
+ ], jr = [
3946
3994
  ...K,
3947
3995
  {
3948
3996
  label: "Warehouse",
@@ -3954,20 +4002,20 @@ const Dn = [
3954
4002
  t.delete
3955
4003
  ]
3956
4004
  }
3957
- ], Gn = [
4005
+ ], Gr = [
3958
4006
  {
3959
4007
  label: "Inventory",
3960
4008
  subject: G.inventory,
3961
4009
  actions: [t.read, t.update]
3962
4010
  }
3963
- ], Yn = [
4011
+ ], Yr = [
3964
4012
  ...K,
3965
4013
  {
3966
4014
  label: "Inventory",
3967
4015
  subject: G.inventory,
3968
4016
  actions: [t.update]
3969
4017
  }
3970
- ], En = [
4018
+ ], Er = [
3971
4019
  ...K,
3972
4020
  {
3973
4021
  label: "Integration",
@@ -3980,7 +4028,7 @@ const Dn = [
3980
4028
  ...Et,
3981
4029
  ...xt
3982
4030
  ];
3983
- const xn = {
4031
+ const xr = {
3984
4032
  [`set_${o.inventory_stockBalance}`]: {
3985
4033
  key: "sys:inventory:stock_balance",
3986
4034
  name: "Stock Balance",
@@ -3989,17 +4037,17 @@ const xn = {
3989
4037
  [`set_${o.inventory_stockAdjustment}`]: {
3990
4038
  key: "sys:inventory:stock_adjustment",
3991
4039
  name: "Stock Adjustment",
3992
- permissions: vn
4040
+ permissions: vr
3993
4041
  },
3994
4042
  [`set_${o.inventory_unitCostHistory}`]: {
3995
4043
  key: "sys:inventory:unit_cost_history",
3996
4044
  name: "Unit Cost History",
3997
- permissions: Zs
4045
+ permissions: Is
3998
4046
  },
3999
4047
  [`set_${o.inventory_wastageTemplate}`]: {
4000
4048
  key: "sys:inventory:wastage_template",
4001
4049
  name: "Wastage Template",
4002
- permissions: Ns
4050
+ permissions: Rs
4003
4051
  },
4004
4052
  [`set_${o.inventory_closingHistory}`]: {
4005
4053
  key: "sys:inventory:closing_history",
@@ -4009,86 +4057,86 @@ const xn = {
4009
4057
  [`set_${o.inventory_closingTemplate}`]: {
4010
4058
  key: "sys:inventory:closing_template",
4011
4059
  name: "Closing Template",
4012
- permissions: Us
4060
+ permissions: Zs
4013
4061
  },
4014
4062
  [`set_${o.inventory_closingDraft}`]: {
4015
4063
  key: "sys:inventory:closing_draft",
4016
4064
  name: "Closing Draft",
4017
- permissions: zs
4065
+ permissions: Ns
4018
4066
  },
4019
4067
  [`set_${o.inventory_ingredient}`]: {
4020
4068
  key: "sys:inventory:ingredient",
4021
4069
  name: "Ingredient",
4022
- permissions: hn
4070
+ permissions: hr
4023
4071
  },
4024
4072
  [`set_${o.inventory_ingredientGroup}`]: {
4025
4073
  key: "sys:inventory:ingredient_group",
4026
4074
  name: "Ingredient Group",
4027
- permissions: Bn
4075
+ permissions: Br
4028
4076
  },
4029
4077
  [`set_${o.inventory_recipe}`]: {
4030
4078
  key: "sys:inventory:recipe",
4031
4079
  name: "Recipe",
4032
- permissions: wn
4080
+ permissions: wr
4033
4081
  },
4034
4082
  [`set_${o.inventory_unit}`]: {
4035
4083
  key: "sys:inventory:unit",
4036
4084
  name: "Unit",
4037
- permissions: Mn
4085
+ permissions: Mr
4038
4086
  },
4039
4087
  [`set_${o.inventory_purchaseTransfer}`]: {
4040
4088
  key: "sys:inventory:purchase_transfer",
4041
4089
  name: "Purchase Transfer",
4042
- permissions: Ws
4090
+ permissions: zs
4043
4091
  },
4044
4092
  [`set_${o.inventory_orderDraftApproval}`]: {
4045
4093
  key: "sys:inventory:order_draft_approval",
4046
4094
  name: "Order Draft Approval",
4047
- permissions: Cn
4095
+ permissions: Cr
4048
4096
  },
4049
4097
  [`set_${o.inventory_transferOut}`]: {
4050
4098
  key: "sys:inventory:transfer_out",
4051
4099
  name: "Transfer Out",
4052
- permissions: Ts
4100
+ permissions: Us
4053
4101
  },
4054
4102
  [`set_${o.inventory_surcharge}`]: {
4055
4103
  key: "sys:inventory:surcharge",
4056
4104
  name: "Surcharge",
4057
- permissions: Ss
4105
+ permissions: Ws
4058
4106
  },
4059
4107
  [`set_${o.inventory_orderTemplate}`]: {
4060
4108
  key: "sys:inventory:order_template",
4061
4109
  name: "Order Template",
4062
- permissions: ks
4110
+ permissions: Ts
4063
4111
  },
4064
4112
  [`set_${o.inventory_supplier}`]: {
4065
4113
  key: "sys:inventory:supplier",
4066
4114
  name: "Supplier",
4067
- permissions: Dn
4115
+ permissions: Dr
4068
4116
  },
4069
4117
  [`set_${o.inventory_warehouse}`]: {
4070
4118
  key: "sys:inventory:warehouse",
4071
4119
  name: "Warehouse",
4072
- permissions: jn
4120
+ permissions: jr
4073
4121
  },
4074
4122
  [`set_${o.inventory_publish}`]: {
4075
4123
  key: "sys:inventory:publish",
4076
4124
  name: "Publish",
4077
- permissions: Gn
4125
+ permissions: Gr
4078
4126
  },
4079
4127
  [`set_${o.inventory_import}`]: {
4080
4128
  key: "sys:inventory:import",
4081
4129
  name: "Import",
4082
- permissions: Yn
4130
+ permissions: Yr
4083
4131
  },
4084
4132
  [`set_${o.inventory_integration}`]: {
4085
4133
  key: "sys:inventory:integration",
4086
4134
  name: "Integration",
4087
- permissions: En
4135
+ permissions: Er
4088
4136
  }
4089
4137
  };
4090
4138
  var Ee = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e))(Ee || {});
4091
- const Vn = {
4139
+ const Vr = {
4092
4140
  /**
4093
4141
  * Triggered by: hrm_teamMember:manage (portal toggle)
4094
4142
  * Injects: team member list read + pos role read
@@ -4158,8 +4206,8 @@ const Vn = {
4158
4206
  ]
4159
4207
  }
4160
4208
  };
4161
- var Ks = /* @__PURE__ */ ((e) => (e.payment_terminals = "payment::terminals", e))(Ks || {});
4162
- const Nt = [
4209
+ var Ss = /* @__PURE__ */ ((e) => (e.payment_terminals = "payment::terminals", e))(Ss || {});
4210
+ const Rt = [
4163
4211
  {
4164
4212
  label: "Payout Account",
4165
4213
  subject: o.payment_payoutAccount,
@@ -4167,27 +4215,27 @@ const Nt = [
4167
4215
  },
4168
4216
  {
4169
4217
  label: "Payment Terminals",
4170
- subject: Ks.payment_terminals,
4218
+ subject: Ss.payment_terminals,
4171
4219
  actions: [t.read]
4172
4220
  }
4173
- ], Pn = {
4221
+ ], Pr = {
4174
4222
  [`set_${o.payment_transactions}`]: {
4175
4223
  key: "sys:payment:transactions",
4176
4224
  name: "Payment Transactions Access",
4177
- permissions: Nt
4225
+ permissions: Rt
4178
4226
  },
4179
4227
  [`set_${o.payment_settlements}`]: {
4180
4228
  key: "sys:payment:settlements",
4181
4229
  name: "Payment Settlements Access",
4182
- permissions: Nt
4230
+ permissions: Rt
4183
4231
  }
4184
- }, Fn = {
4185
- ...yn,
4186
- ...xn,
4187
- ...Vn,
4188
- ...Pn
4232
+ }, Fr = {
4233
+ ...yr,
4234
+ ...xr,
4235
+ ...Vr,
4236
+ ...Pr
4189
4237
  }, _a = Object.values(
4190
- Fn
4238
+ Fr
4191
4239
  ).flatMap((e) => e.permissions ?? []).reduce(
4192
4240
  (e, A) => {
4193
4241
  var u;
@@ -4196,31 +4244,31 @@ const Nt = [
4196
4244
  {}
4197
4245
  );
4198
4246
  var Re = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4199
- function On(e) {
4247
+ function Or(e) {
4200
4248
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4201
4249
  }
4202
- var Ls = { exports: {} };
4250
+ var ks = { exports: {} };
4203
4251
  (function(e, A) {
4204
4252
  (function(u, c) {
4205
4253
  e.exports = c();
4206
4254
  })(Re, function() {
4207
4255
  return function(u) {
4208
4256
  var c = {};
4209
- function r(m) {
4257
+ function n(m) {
4210
4258
  if (c[m]) return c[m].exports;
4211
4259
  var y = c[m] = { i: m, l: !1, exports: {} };
4212
- return u[m].call(y.exports, y, y.exports, r), y.l = !0, y.exports;
4260
+ return u[m].call(y.exports, y, y.exports, n), y.l = !0, y.exports;
4213
4261
  }
4214
- return r.m = u, r.c = c, r.d = function(m, y, h) {
4215
- r.o(m, y) || Object.defineProperty(m, y, { enumerable: !0, get: h });
4216
- }, r.r = function(m) {
4262
+ return n.m = u, n.c = c, n.d = function(m, y, h) {
4263
+ n.o(m, y) || Object.defineProperty(m, y, { enumerable: !0, get: h });
4264
+ }, n.r = function(m) {
4217
4265
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(m, "__esModule", { value: !0 });
4218
- }, r.t = function(m, y) {
4219
- if (1 & y && (m = r(m)), 8 & y || 4 & y && typeof m == "object" && m && m.__esModule) return m;
4266
+ }, n.t = function(m, y) {
4267
+ if (1 & y && (m = n(m)), 8 & y || 4 & y && typeof m == "object" && m && m.__esModule) return m;
4220
4268
  var h = /* @__PURE__ */ Object.create(null);
4221
- if (r.r(h), Object.defineProperty(h, "default", { enumerable: !0, value: m }), 2 & y && typeof m != "string")
4269
+ if (n.r(h), Object.defineProperty(h, "default", { enumerable: !0, value: m }), 2 & y && typeof m != "string")
4222
4270
  for (var E in m)
4223
- r.d(
4271
+ n.d(
4224
4272
  h,
4225
4273
  E,
4226
4274
  (function(Y) {
@@ -4228,21 +4276,21 @@ var Ls = { exports: {} };
4228
4276
  }).bind(null, E)
4229
4277
  );
4230
4278
  return h;
4231
- }, r.n = function(m) {
4279
+ }, n.n = function(m) {
4232
4280
  var y = m && m.__esModule ? function() {
4233
4281
  return m.default;
4234
4282
  } : function() {
4235
4283
  return m;
4236
4284
  };
4237
- return r.d(y, "a", y), y;
4238
- }, r.o = function(m, y) {
4285
+ return n.d(y, "a", y), y;
4286
+ }, n.o = function(m, y) {
4239
4287
  return Object.prototype.hasOwnProperty.call(m, y);
4240
- }, r.p = "", r(r.s = 0);
4288
+ }, n.p = "", n(n.s = 0);
4241
4289
  }([
4242
- function(u, c, r) {
4243
- u.exports = r(1);
4290
+ function(u, c, n) {
4291
+ u.exports = n(1);
4244
4292
  },
4245
- function(u, c, r) {
4293
+ function(u, c, n) {
4246
4294
  function m(i) {
4247
4295
  return (m = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(g) {
4248
4296
  return typeof g;
@@ -4256,11 +4304,11 @@ var Ls = { exports: {} };
4256
4304
  return Object.prototype.toString.call(f) === g;
4257
4305
  };
4258
4306
  }
4259
- r.r(c), r.d(c, "default", function() {
4260
- return Ze;
4261
- }), r.d(c, "compare", function() {
4307
+ n.r(c), n.d(c, "default", function() {
4308
+ return Ne;
4309
+ }), n.d(c, "compare", function() {
4262
4310
  return Fe;
4263
- }), r.d(c, "comparable", function() {
4311
+ }), n.d(c, "comparable", function() {
4264
4312
  return Oe;
4265
4313
  });
4266
4314
  var h = y("Array"), E = y("Object"), Y = y("Function");
@@ -4491,11 +4539,11 @@ var Ls = { exports: {} };
4491
4539
  var V = D[0];
4492
4540
  return H(B, V[0], V[1], V[2]);
4493
4541
  }
4494
- for (var F = C && C.$ne !== void 0, N = F, W = 0; W < D.length; W++) {
4495
- var d = D[W], n = H(B, d[0], d[1], d[2]);
4496
- F ? N &= n : N |= n;
4542
+ for (var F = C && C.$ne !== void 0, Z = F, W = 0; W < D.length; W++) {
4543
+ var d = D[W], r = H(B, d[0], d[1], d[2]);
4544
+ F ? Z &= r : Z |= r;
4497
4545
  }
4498
- return N;
4546
+ return Z;
4499
4547
  }
4500
4548
  function Le(i, g, f) {
4501
4549
  return te({ keyPath: i, child: g, query: f }, k);
@@ -4507,24 +4555,24 @@ var Ls = { exports: {} };
4507
4555
  }, C = function(V) {
4508
4556
  V = g(V);
4509
4557
  var F = [];
4510
- for (var N in V) {
4511
- var W = V[N];
4512
- if (N !== "$options") {
4513
- var d = z[N] || i && f && f[N];
4514
- if (d) S[N] && (W = S[N](W, V, i)), F.push(te(g(W), d));
4558
+ for (var Z in V) {
4559
+ var W = V[Z];
4560
+ if (Z !== "$options") {
4561
+ var d = z[Z] || i && f && f[Z];
4562
+ if (d) S[Z] && (W = S[Z](W, V, i)), F.push(te(g(W), d));
4515
4563
  else {
4516
- if (N.charCodeAt(0) === 36)
4517
- throw new Error("Unknown operation " + N);
4518
- var n = N.split(".");
4519
- F.push(Le(n, D(W), W));
4564
+ if (Z.charCodeAt(0) === 36)
4565
+ throw new Error("Unknown operation " + Z);
4566
+ var r = Z.split(".");
4567
+ F.push(Le(r, D(W), W));
4520
4568
  }
4521
4569
  }
4522
4570
  }
4523
4571
  return F.length === 1 ? F[0] : te(F, z.$and);
4524
4572
  }, D = function(V) {
4525
- return V = B(V), function F(N, W) {
4526
- if (!E(N)) return W;
4527
- for (var d in N) W.push(d), F(N[d], W);
4573
+ return V = B(V), function F(Z, W) {
4574
+ if (!E(Z)) return W;
4575
+ for (var d in Z) W.push(d), F(Z[d], W);
4528
4576
  return W;
4529
4577
  }(V, []).join(",").search(/[$.]/) === -1 ? te(V, he) : C(V);
4530
4578
  };
@@ -4557,7 +4605,7 @@ var Ls = { exports: {} };
4557
4605
  }
4558
4606
  }), f;
4559
4607
  }
4560
- function Ze(i, g) {
4608
+ function Ne(i, g) {
4561
4609
  var f = Pe(i, g = Object.assign({ compare: Fe, comparable: Oe }, g));
4562
4610
  return function(B, C, D) {
4563
4611
  return H(f, B, C, D);
@@ -4576,19 +4624,19 @@ var Ls = { exports: {} };
4576
4624
  }
4577
4625
  ]);
4578
4626
  });
4579
- })(Ls);
4580
- var qn = Ls.exports;
4581
- const Hn = /* @__PURE__ */ On(qn);
4582
- function Xn(e, A) {
4627
+ })(ks);
4628
+ var qr = ks.exports;
4629
+ const Hr = /* @__PURE__ */ Or(qr);
4630
+ function Xr(e, A) {
4583
4631
  for (var u = 0; u < A.length; u++) {
4584
4632
  var c = A[u];
4585
4633
  c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(e, c.key, c);
4586
4634
  }
4587
4635
  }
4588
- function Qn(e, A, u) {
4589
- return A && Xn(e.prototype, A), e;
4636
+ function Qr(e, A, u) {
4637
+ return A && Xr(e.prototype, A), e;
4590
4638
  }
4591
- function In(e, A) {
4639
+ function Ir(e, A) {
4592
4640
  e.prototype = Object.create(A.prototype), e.prototype.constructor = e, e.__proto__ = A;
4593
4641
  }
4594
4642
  function Bt(e) {
@@ -4597,11 +4645,11 @@ function Bt(e) {
4597
4645
  }, Bt(e);
4598
4646
  }
4599
4647
  function Se(e, A) {
4600
- return Se = Object.setPrototypeOf || function(c, r) {
4601
- return c.__proto__ = r, c;
4648
+ return Se = Object.setPrototypeOf || function(c, n) {
4649
+ return c.__proto__ = n, c;
4602
4650
  }, Se(e, A);
4603
4651
  }
4604
- function Rn() {
4652
+ function Rr() {
4605
4653
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
4606
4654
  if (typeof Proxy == "function") return !0;
4607
4655
  try {
@@ -4612,71 +4660,71 @@ function Rn() {
4612
4660
  }
4613
4661
  }
4614
4662
  function Te(e, A, u) {
4615
- return Rn() ? Te = Reflect.construct : Te = function(r, m, y) {
4663
+ return Rr() ? Te = Reflect.construct : Te = function(n, m, y) {
4616
4664
  var h = [null];
4617
4665
  h.push.apply(h, m);
4618
- var E = Function.bind.apply(r, h), Y = new E();
4666
+ var E = Function.bind.apply(n, h), Y = new E();
4619
4667
  return y && Se(Y, y.prototype), Y;
4620
4668
  }, Te.apply(null, arguments);
4621
4669
  }
4622
- function Zn(e) {
4670
+ function Nr(e) {
4623
4671
  return Function.toString.call(e).indexOf("[native code]") !== -1;
4624
4672
  }
4625
4673
  function wt(e) {
4626
4674
  var A = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
4627
4675
  return wt = function(c) {
4628
- if (c === null || !Zn(c)) return c;
4676
+ if (c === null || !Nr(c)) return c;
4629
4677
  if (typeof c != "function")
4630
4678
  throw new TypeError("Super expression must either be null or a function");
4631
4679
  if (typeof A < "u") {
4632
4680
  if (A.has(c)) return A.get(c);
4633
- A.set(c, r);
4681
+ A.set(c, n);
4634
4682
  }
4635
- function r() {
4683
+ function n() {
4636
4684
  return Te(c, arguments, Bt(this).constructor);
4637
4685
  }
4638
- return r.prototype = Object.create(c.prototype, {
4686
+ return n.prototype = Object.create(c.prototype, {
4639
4687
  constructor: {
4640
- value: r,
4688
+ value: n,
4641
4689
  enumerable: !1,
4642
4690
  writable: !0,
4643
4691
  configurable: !0
4644
4692
  }
4645
- }), Se(r, c);
4693
+ }), Se(n, c);
4646
4694
  }, wt(e);
4647
4695
  }
4648
- function zt(e) {
4696
+ function Nt(e) {
4649
4697
  if (e === void 0)
4650
4698
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4651
4699
  return e;
4652
4700
  }
4653
- var Js = function(A) {
4701
+ var Ks = function(A) {
4654
4702
  return 'Cannot execute "' + A.action + '" on "' + A.subjectName + '"';
4655
- }, ze = Js, Nn = /* @__PURE__ */ function(e) {
4656
- In(A, e), A.setDefaultMessage = function(r) {
4657
- r === null ? ze = Js : ze = typeof r == "string" ? function() {
4658
- return r;
4659
- } : r;
4660
- }, A.from = function(r) {
4703
+ }, ze = Ks, Zr = /* @__PURE__ */ function(e) {
4704
+ Ir(A, e), A.setDefaultMessage = function(n) {
4705
+ n === null ? ze = Ks : ze = typeof n == "string" ? function() {
4706
+ return n;
4707
+ } : n;
4708
+ }, A.from = function(n) {
4661
4709
  var m = new this("");
4662
4710
  return Object.defineProperty(m, "ability", {
4663
- value: r
4711
+ value: n
4664
4712
  }), m;
4665
4713
  };
4666
- function A(c, r) {
4714
+ function A(c, n) {
4667
4715
  var m;
4668
- return r === void 0 && (r = {}), m = e.call(this, c) || this, m._setMetadata(r), m.message = c || ze(zt(m)), m._customMessage = null, typeof Error.captureStackTrace == "function" && (m.name = m.constructor.name, Error.captureStackTrace(zt(m), m.constructor)), m;
4716
+ return n === void 0 && (n = {}), m = e.call(this, c) || this, m._setMetadata(n), m.message = c || ze(Nt(m)), m._customMessage = null, typeof Error.captureStackTrace == "function" && (m.name = m.constructor.name, Error.captureStackTrace(Nt(m), m.constructor)), m;
4669
4717
  }
4670
4718
  var u = A.prototype;
4671
- return u.setMessage = function(r) {
4672
- return this._customMessage = r, this;
4673
- }, u.throwUnlessCan = function(r, m, y) {
4719
+ return u.setMessage = function(n) {
4720
+ return this._customMessage = n, this;
4721
+ }, u.throwUnlessCan = function(n, m, y) {
4674
4722
  if (!this.ability)
4675
4723
  throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
4676
- var h = this.ability.relevantRuleFor(r, m, y);
4724
+ var h = this.ability.relevantRuleFor(n, m, y);
4677
4725
  if (!(h && !h.inverted)) {
4678
4726
  this._setMetadata({
4679
- action: r,
4727
+ action: n,
4680
4728
  subject: m,
4681
4729
  field: y,
4682
4730
  subjectName: this.ability.subjectName(m)
@@ -4684,138 +4732,138 @@ var Js = function(A) {
4684
4732
  var E = h ? h.reason : "";
4685
4733
  throw this.message = this._customMessage || E || ze(this), this;
4686
4734
  }
4687
- }, u._setMetadata = function(r) {
4688
- this.subject = r.subject, this.subjectName = r.subjectName, this.action = r.action, this.field = r.field;
4735
+ }, u._setMetadata = function(n) {
4736
+ this.subject = n.subject, this.subjectName = n.subjectName, this.action = n.action, this.field = n.field;
4689
4737
  }, A;
4690
4738
  }(wt(Error));
4691
4739
  function Mt(e) {
4692
4740
  return Array.isArray(e) ? e : [e];
4693
4741
  }
4694
- function zn(e) {
4742
+ function zr(e) {
4695
4743
  if (!e || typeof e == "string")
4696
4744
  return e;
4697
4745
  var A = typeof e == "object" ? e.constructor : e;
4698
4746
  return A.modelName || A.name;
4699
4747
  }
4700
- function Un(e) {
4748
+ function Ur(e) {
4701
4749
  return JSON.parse(JSON.stringify(e));
4702
4750
  }
4703
- var Wn = /[-/\\^$+?.()|[\]{}]/g, Tn = /\.?\*+\.?/g, Sn = /\*+/, kn = /\./g;
4704
- function Kn(e, A, u) {
4705
- var c = u[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", r = e.indexOf("**") === -1 ? "[^.]" : ".", m = e.replace(kn, "\\$&").replace(Sn, r + c);
4751
+ var Wr = /[-/\\^$+?.()|[\]{}]/g, Tr = /\.?\*+\.?/g, Sr = /\*+/, kr = /\./g;
4752
+ function Kr(e, A, u) {
4753
+ var c = u[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", n = e.indexOf("**") === -1 ? "[^.]" : ".", m = e.replace(kr, "\\$&").replace(Sr, n + c);
4706
4754
  return A + e.length === u.length ? "(?:" + m + ")?" : m;
4707
4755
  }
4708
- function Ln(e, A, u) {
4756
+ function Lr(e, A, u) {
4709
4757
  return e === "." && (u[A - 1] === "*" || u[A + 1] === "*") ? e : "\\" + e;
4710
4758
  }
4711
- function Jn(e) {
4759
+ function Jr(e) {
4712
4760
  var A = e.map(function(c) {
4713
- return c.replace(Wn, Ln).replace(Tn, Kn);
4761
+ return c.replace(Wr, Lr).replace(Tr, Kr);
4714
4762
  }), u = A.length > 1 ? "(?:" + A.join("|") + ")" : A[0];
4715
4763
  return new RegExp("^" + u + "$");
4716
4764
  }
4717
- var _n = /* @__PURE__ */ function() {
4765
+ var _r = /* @__PURE__ */ function() {
4718
4766
  function e(u) {
4719
4767
  this.actions = u.actions || u.action, this.subject = u.subject, this.fields = !u.fields || u.fields.length === 0 ? void 0 : Mt(u.fields), Object.defineProperty(this, "_fieldsPattern", {
4720
4768
  writable: !0
4721
4769
  }), this.inverted = !!u.inverted, this.conditions = u.conditions, Object.defineProperty(this, "_matches", {
4722
4770
  writable: !0,
4723
- value: this.conditions ? Hn(this.conditions) : void 0
4771
+ value: this.conditions ? Hr(this.conditions) : void 0
4724
4772
  }), this.reason = u.reason;
4725
4773
  }
4726
4774
  var A = e.prototype;
4727
4775
  return A.matches = function(c) {
4728
4776
  return this._matches ? typeof c == "string" ? !this.inverted : this._matches(c) : !0;
4729
- }, A.isRelevantFor = function(c, r) {
4730
- return this.fields ? r ? this.matchesField(r) : !this.inverted : !0;
4777
+ }, A.isRelevantFor = function(c, n) {
4778
+ return this.fields ? n ? this.matchesField(n) : !this.inverted : !0;
4731
4779
  }, A.matchesField = function(c) {
4732
- return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Jn(this.fields)), this._fieldsPattern === null || c.indexOf("*") !== -1 ? this.fields.indexOf(c) !== -1 : this._fieldsPattern.test(c);
4780
+ return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Jr(this.fields)), this._fieldsPattern === null || c.indexOf("*") !== -1 ? this.fields.indexOf(c) !== -1 : this._fieldsPattern.test(c);
4733
4781
  }, e;
4734
- }(), ee = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), Ut = {
4782
+ }(), ee = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), Zt = {
4735
4783
  crud: ["create", "read", "update", "delete"]
4736
4784
  };
4737
- function Wt(e, A) {
4785
+ function zt(e, A) {
4738
4786
  return e === A || Array.isArray(A) && A.indexOf(e) !== -1;
4739
4787
  }
4740
- var $n = /* @__PURE__ */ function() {
4741
- e.addAlias = function(c, r) {
4742
- if (c === "manage" || Wt("manage", r))
4788
+ var $r = /* @__PURE__ */ function() {
4789
+ e.addAlias = function(c, n) {
4790
+ if (c === "manage" || zt("manage", n))
4743
4791
  throw new Error('Cannot add alias for "manage" action because it represents any action');
4744
- if (Wt(c, r))
4745
- throw new Error("Attempt to alias action to itself: " + c + " -> " + r.toString());
4746
- return Ut[c] = r, this;
4792
+ if (zt(c, n))
4793
+ throw new Error("Attempt to alias action to itself: " + c + " -> " + n.toString());
4794
+ return Zt[c] = n, this;
4747
4795
  };
4748
4796
  function e(u, c) {
4749
4797
  c === void 0 && (c = {}), Object.defineProperty(this, "subjectName", {
4750
- value: c.subjectName || zn
4798
+ value: c.subjectName || zr
4751
4799
  }), this[ee] = {
4752
- RuleType: c.RuleType || _n,
4800
+ RuleType: c.RuleType || _r,
4753
4801
  originalRules: u || [],
4754
4802
  hasPerFieldRules: !1,
4755
4803
  indexedRules: /* @__PURE__ */ Object.create(null),
4756
4804
  mergedRules: /* @__PURE__ */ Object.create(null),
4757
4805
  events: {},
4758
- aliases: Un(Ut)
4806
+ aliases: Ur(Zt)
4759
4807
  }, this.update(u);
4760
4808
  }
4761
4809
  var A = e.prototype;
4762
4810
  return A.update = function(c) {
4763
4811
  if (!Array.isArray(c))
4764
4812
  return this;
4765
- var r = {
4813
+ var n = {
4766
4814
  rules: c,
4767
4815
  ability: this
4768
4816
  };
4769
- this.emit("update", r), this[ee].originalRules = c.slice(0), this[ee].mergedRules = /* @__PURE__ */ Object.create(null);
4817
+ this.emit("update", n), this[ee].originalRules = c.slice(0), this[ee].mergedRules = /* @__PURE__ */ Object.create(null);
4770
4818
  var m = this.buildIndexFor(c);
4771
- return this[ee].indexedRules = m.rules, this[ee].hasPerFieldRules = m.hasPerFieldRules, this.emit("updated", r), this;
4819
+ return this[ee].indexedRules = m.rules, this[ee].hasPerFieldRules = m.hasPerFieldRules, this.emit("updated", n), this;
4772
4820
  }, A.buildIndexFor = function(c) {
4773
- for (var r = /* @__PURE__ */ Object.create(null), m = this[ee].RuleType, y = !0, h = !1, E = 0; E < c.length; E++) {
4821
+ for (var n = /* @__PURE__ */ Object.create(null), m = this[ee].RuleType, y = !0, h = !1, E = 0; E < c.length; E++) {
4774
4822
  var Y = new m(c[E]), w = this.expandActions(Y.actions), P = Mt(Y.subject), I = c.length - E - 1;
4775
4823
  y = !!(y && Y.inverted), !h && Y.fields && (h = !0);
4776
4824
  for (var H = 0; H < P.length; H++) {
4777
4825
  var z = P[H];
4778
- r[z] = r[z] || /* @__PURE__ */ Object.create(null);
4826
+ n[z] = n[z] || /* @__PURE__ */ Object.create(null);
4779
4827
  for (var S = 0; S < w.length; S++) {
4780
4828
  var te = w[S];
4781
- r[z][te] = r[z][te] || /* @__PURE__ */ Object.create(null), r[z][te][I] = Y;
4829
+ n[z][te] = n[z][te] || /* @__PURE__ */ Object.create(null), n[z][te][I] = Y;
4782
4830
  }
4783
4831
  }
4784
4832
  }
4785
4833
  return {
4786
4834
  isAllInverted: y,
4787
4835
  hasPerFieldRules: h,
4788
- rules: r
4836
+ rules: n
4789
4837
  };
4790
4838
  }, A.expandActions = function(c) {
4791
- for (var r = this[ee].aliases, m = Mt(c), y = 0; y < m.length; ) {
4839
+ for (var n = this[ee].aliases, m = Mt(c), y = 0; y < m.length; ) {
4792
4840
  var h = m[y++];
4793
- r.hasOwnProperty(h) && (m = m.concat(r[h]));
4841
+ n.hasOwnProperty(h) && (m = m.concat(n[h]));
4794
4842
  }
4795
4843
  return m;
4796
- }, A.can = function(c, r, m) {
4844
+ }, A.can = function(c, n, m) {
4797
4845
  if (m && typeof m != "string")
4798
4846
  throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
4799
- var y = this.relevantRuleFor(c, r, m);
4847
+ var y = this.relevantRuleFor(c, n, m);
4800
4848
  return !!y && !y.inverted;
4801
- }, A.relevantRuleFor = function(c, r, m) {
4802
- for (var y = this.rulesFor(c, r, m), h = 0; h < y.length; h++)
4803
- if (y[h].matches(r))
4849
+ }, A.relevantRuleFor = function(c, n, m) {
4850
+ for (var y = this.rulesFor(c, n, m), h = 0; h < y.length; h++)
4851
+ if (y[h].matches(n))
4804
4852
  return y[h];
4805
4853
  return null;
4806
- }, A.possibleRulesFor = function(c, r) {
4807
- var m = this.subjectName(r), y = this[ee].mergedRules, h = m + "_" + c;
4854
+ }, A.possibleRulesFor = function(c, n) {
4855
+ var m = this.subjectName(n), y = this[ee].mergedRules, h = m + "_" + c;
4808
4856
  return y[h] || (y[h] = this.mergeRulesFor(c, m)), y[h];
4809
- }, A.mergeRulesFor = function(c, r) {
4810
- var m = this[ee].indexedRules, y = [r, "all"].reduce(function(h, E) {
4857
+ }, A.mergeRulesFor = function(c, n) {
4858
+ var m = this[ee].indexedRules, y = [n, "all"].reduce(function(h, E) {
4811
4859
  var Y = m[E];
4812
4860
  return Y ? Object.assign(h, Y[c], Y.manage) : h;
4813
4861
  }, []);
4814
4862
  return y.filter(Boolean);
4815
- }, A.rulesFor = function(c, r, m) {
4816
- var y = this.possibleRulesFor(c, r);
4863
+ }, A.rulesFor = function(c, n, m) {
4864
+ var y = this.possibleRulesFor(c, n);
4817
4865
  return this[ee].hasPerFieldRules ? y.filter(function(h) {
4818
- return h.isRelevantFor(r, m);
4866
+ return h.isRelevantFor(n, m);
4819
4867
  }) : y;
4820
4868
  }, A.cannot = function() {
4821
4869
  return !this.can.apply(this, arguments);
@@ -4824,21 +4872,21 @@ var $n = /* @__PURE__ */ function() {
4824
4872
  console.warn(`
4825
4873
  Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
4826
4874
  Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
4827
- `.trim()), (c = Nn.from(this)).throwUnlessCan.apply(c, arguments);
4828
- }, A.on = function(c, r) {
4875
+ `.trim()), (c = Zr.from(this)).throwUnlessCan.apply(c, arguments);
4876
+ }, A.on = function(c, n) {
4829
4877
  var m = this[ee].events, y = !0;
4830
- return m[c] || (m[c] = []), m[c].push(r), function() {
4878
+ return m[c] || (m[c] = []), m[c].push(n), function() {
4831
4879
  if (y) {
4832
- var h = m[c].indexOf(r);
4880
+ var h = m[c].indexOf(n);
4833
4881
  m[c].splice(h, 1), y = !1;
4834
4882
  }
4835
4883
  };
4836
- }, A.emit = function(c, r) {
4884
+ }, A.emit = function(c, n) {
4837
4885
  var m = this[ee].events[c];
4838
4886
  m && m.slice(0).forEach(function(y) {
4839
- return y(r);
4887
+ return y(n);
4840
4888
  });
4841
- }, Qn(e, [{
4889
+ }, Qr(e, [{
4842
4890
  key: "rules",
4843
4891
  get: function() {
4844
4892
  return this[ee].originalRules;
@@ -4846,10 +4894,10 @@ var $n = /* @__PURE__ */ function() {
4846
4894
  }]), e;
4847
4895
  }();
4848
4896
  function ea(e) {
4849
- return Ms[e] ?? e;
4897
+ return Bs[e] ?? e;
4850
4898
  }
4851
4899
  function $a(e) {
4852
- const A = Object.entries(Ms).find(([, u]) => u === e);
4900
+ const A = Object.entries(Bs).find(([, u]) => u === e);
4853
4901
  return A ? A[0] : e;
4854
4902
  }
4855
4903
  function ta(e) {
@@ -4860,12 +4908,12 @@ function ta(e) {
4860
4908
  }));
4861
4909
  }
4862
4910
  function sa(e) {
4863
- return new $n(ta(e));
4911
+ return new $r(ta(e));
4864
4912
  }
4865
- function ra(e, A, u) {
4866
- const c = Array.isArray(e) ? e : [e], r = sa(A), m = (w) => w.subject, y = (w) => r.can(w.action, m(w), w.field) ? !0 : w.coverSubject !== void 0 ? r.can(w.action, w.coverSubject, w.field) : !1, h = c.find((w) => !y(w));
4913
+ function na(e, A, u) {
4914
+ const c = Array.isArray(e) ? e : [e], n = sa(A), m = (w) => w.subject, y = (w) => n.can(w.action, m(w), w.field) ? !0 : w.coverSubject !== void 0 ? n.can(w.action, w.coverSubject, w.field) : !1, h = c.find((w) => !y(w));
4867
4915
  if (h) {
4868
- const w = r.relevantRuleFor(
4916
+ const w = n.relevantRuleFor(
4869
4917
  h.action,
4870
4918
  m(h),
4871
4919
  h.field
@@ -4876,25 +4924,25 @@ function ra(e, A, u) {
4876
4924
  decisiveRule: w ?? null
4877
4925
  };
4878
4926
  }
4879
- const E = c[0], Y = r.relevantRuleFor(E.action, m(E), E.field);
4927
+ const E = c[0], Y = n.relevantRuleFor(E.action, m(E), E.field);
4880
4928
  return { granted: !0, decisivePermission: E, decisiveRule: Y ?? null };
4881
4929
  }
4882
4930
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
4883
- const na = () => {
4931
+ const ra = () => {
4884
4932
  };
4885
4933
  function aa(e, A, u) {
4886
4934
  let c;
4887
- tr(u) ? c = {
4935
+ $s(u) ? c = {
4888
4936
  evaluating: u
4889
4937
  } : c = {};
4890
4938
  const {
4891
- lazy: r = !1,
4939
+ lazy: n = !1,
4892
4940
  evaluating: m = void 0,
4893
4941
  shallow: y = !0,
4894
- onError: h = na
4895
- } = c, E = ve(!r), Y = y ? sr(A) : ve(A);
4942
+ onError: h = ra
4943
+ } = c, E = ve(!n), Y = y ? en(A) : ve(A);
4896
4944
  let w = 0;
4897
- return St(async (P) => {
4945
+ return Wt(async (P) => {
4898
4946
  if (!E.value)
4899
4947
  return;
4900
4948
  w++;
@@ -4915,10 +4963,10 @@ function aa(e, A, u) {
4915
4963
  } finally {
4916
4964
  m && I === w && (m.value = !1), H = !0;
4917
4965
  }
4918
- }), r ? jt(() => (E.value = !0, Y.value)) : Y;
4966
+ }), n ? jt(() => (E.value = !0, Y.value)) : Y;
4919
4967
  }
4920
4968
  async function oa(e) {
4921
- const { sessionUser: A, validationManifest: u } = e, { requiredRoles: c, requiredCaslPermissions: r, customValidationFunction: m } = u;
4969
+ const { sessionUser: A, validationManifest: u } = e, { requiredRoles: c, requiredCaslPermissions: n, customValidationFunction: m } = u;
4922
4970
  if (!A)
4923
4971
  return { canAccess: !1 };
4924
4972
  if (c && c.length > 0 && !c.includes(A._role || ""))
@@ -4926,8 +4974,8 @@ async function oa(e) {
4926
4974
  canAccess: !1,
4927
4975
  message: "User does not have permission to access"
4928
4976
  });
4929
- if (r && r.length > 0) {
4930
- const { granted: y } = ra(r, A.permissions);
4977
+ if (n && n.length > 0) {
4978
+ const { granted: y } = na(n, A.permissions);
4931
4979
  if (!y)
4932
4980
  return Promise.resolve({
4933
4981
  canAccess: !1,
@@ -4952,7 +5000,7 @@ async function ia(e, A) {
4952
5000
  return {
4953
5001
  canAccess: !1,
4954
5002
  message: c.message,
4955
- redirectTo: kr
5003
+ redirectTo: Kn
4956
5004
  };
4957
5005
  }
4958
5006
  return {
@@ -4961,7 +5009,7 @@ async function ia(e, A) {
4961
5009
  }
4962
5010
  var Ct = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Allowed = "allowed", e.Denied = "denied", e))(Ct || {});
4963
5011
  function la() {
4964
- const e = Ar(), { sessionUser: A } = Yt();
5012
+ const e = un(), { sessionUser: A } = Yt();
4965
5013
  return aa(
4966
5014
  async () => {
4967
5015
  e.matched;
@@ -5003,7 +5051,7 @@ const ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
5003
5051
  }, ya = { class: "w-full h-full flex justify-center items-center" }, va = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, ha = { class: "w-[300px] h-[300px]" }, Ba = ["src"], wa = { class: "text-2xl" }, Ma = { class: "text-xl" }, Ca = /* @__PURE__ */ xe({
5004
5052
  __name: "NoPermission",
5005
5053
  setup(e) {
5006
- const { t: A } = Jt({
5054
+ const { t: A } = Kt({
5007
5055
  messages: {
5008
5056
  "en-US": ua,
5009
5057
  "zh-CN": ga,
@@ -5011,7 +5059,7 @@ const ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
5011
5059
  "th-TH": fa
5012
5060
  }
5013
5061
  });
5014
- return (u, c) => (Ve(), Kt("div", ya, [
5062
+ return (u, c) => (Ve(), St("div", ya, [
5015
5063
  we("div", va, [
5016
5064
  we("div", ha, [
5017
5065
  we("img", {
@@ -5030,7 +5078,7 @@ const ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
5030
5078
  __name: "PermissionWrapper",
5031
5079
  setup(e) {
5032
5080
  const A = la();
5033
- return (u, c) => Me(A) === Me(Ct).Denied ? (Ve(), ke(Ca, { key: 0 })) : Me(A) === Me(Ct).Allowed ? kt(u.$slots, "default", { key: 1 }) : rr("", !0);
5081
+ return (u, c) => Me(A) === Me(Ct).Denied ? (Ve(), ke(Ca, { key: 0 })) : Me(A) === Me(Ct).Allowed ? Tt(u.$slots, "default", { key: 1 }) : tn("", !0);
5034
5082
  }
5035
5083
  });
5036
5084
  function Ke(e) {
@@ -5045,41 +5093,39 @@ function ja(e, A) {
5045
5093
  const u = ve({ top: 0, bottom: 0, left: 0, right: 0 });
5046
5094
  function c() {
5047
5095
  if (e.value) {
5048
- const r = e.value.getBoundingClientRect();
5096
+ const n = e.value.getBoundingClientRect();
5049
5097
  u.value = {
5050
- top: r.top,
5051
- bottom: r.bottom,
5052
- left: r.left,
5053
- right: r.right
5098
+ top: n.top,
5099
+ bottom: n.bottom,
5100
+ left: n.left,
5101
+ right: n.right
5054
5102
  };
5055
5103
  }
5056
5104
  }
5057
- return Rt(A, async () => {
5058
- await Zt(), c();
5059
- }), Rt(e, async (r) => {
5060
- r && (await Zt(), c());
5061
- }), Lt(() => {
5105
+ return sn(e, async (n) => {
5106
+ n && (await nn(), c());
5107
+ }), kt(() => {
5062
5108
  window.addEventListener("resize", c);
5063
- }), nr(() => {
5109
+ }), rn(() => {
5064
5110
  window.removeEventListener("resize", c);
5065
5111
  }), u;
5066
5112
  }
5067
5113
  const Ga = /* @__PURE__ */ xe({
5068
5114
  __name: "FullWrapper",
5069
5115
  setup(e) {
5070
- const A = cr(), u = ve(null), c = ja(u), r = jt(() => {
5116
+ const A = An(), u = ve(null), c = ja(u), n = jt(() => {
5071
5117
  var h;
5072
5118
  const y = A.isAtMost("sm") ? 56 : 0;
5073
5119
  return {
5074
5120
  height: `calc(100dvh - ${((h = c.value) == null ? void 0 : h.top) + 24 + y}px)`
5075
5121
  };
5076
5122
  });
5077
- return (m, y) => (Ve(), Kt("div", {
5123
+ return (m, y) => (Ve(), St("div", {
5078
5124
  ref_key: "wrapper",
5079
5125
  ref: u,
5080
- style: ar(r.value)
5126
+ style: an(n.value)
5081
5127
  }, [
5082
- kt(m.$slots, "default")
5128
+ Tt(m.$slots, "default")
5083
5129
  ], 4));
5084
5130
  }
5085
5131
  }), Ya = { class: "flex justify-center items-center h-full w-full" }, Ea = /* @__PURE__ */ xe({
@@ -5088,16 +5134,16 @@ const Ga = /* @__PURE__ */ xe({
5088
5134
  return (A, u) => {
5089
5135
  const c = Gt("FmCircularProgress");
5090
5136
  return Ve(), ke(Ga, null, {
5091
- default: or(() => [
5137
+ default: on(() => [
5092
5138
  we("div", Ya, [
5093
- ir(c, { size: "xl" })
5139
+ ln(c, { size: "xl" })
5094
5140
  ])
5095
5141
  ]),
5096
5142
  _: 1
5097
5143
  });
5098
5144
  };
5099
5145
  }
5100
- }), be = (e) => lr({
5146
+ }), be = (e) => cn({
5101
5147
  loader: e,
5102
5148
  loadingComponent: Ea
5103
5149
  });
@@ -5111,10 +5157,10 @@ const ht = (e) => ({
5111
5157
  }
5112
5158
  ]
5113
5159
  }
5114
- }), xa = Ke(be(() => import("./Main-BPM7QyFL.js"))), Va = Ke(be(() => import("./Main-eN8MDWpv.js"))), Pa = Ke(
5115
- be(() => import("./AuditLogList-Bw3sRBhW.js"))
5116
- ), Fa = Ke(be(() => import("./Main-BC20s7cs.js"))), Oa = be(() => import("./EmployeeList-C4tVWPJE.js")), qa = be(() => import("./RoleList-tRu19xyl.js")), Ha = be(() => import("./TimesheetList-CdWXksIf.js")), Xa = be(() => import("./TeamMemberList-CvitYIKw.js")), Qa = be(
5117
- () => import("./PermissionSetList-CPSRrCsu.js")
5160
+ }), xa = Ke(be(() => import("./Main-B9_TyRDo.js"))), Va = Ke(be(() => import("./Main-CdHW4UkN.js"))), Pa = Ke(
5161
+ be(() => import("./AuditLogList-ChxAzO74.js"))
5162
+ ), Fa = Ke(be(() => import("./Main-DcvmP7s-.js"))), Oa = be(() => import("./EmployeeList-Cs-Mn6UA.js")), qa = be(() => import("./RoleList-BZ6RZvm2.js")), Ha = be(() => import("./TimesheetList-CZex54an.js")), Xa = be(() => import("./TeamMemberList-C-zhFauD.js")), Qa = be(
5163
+ () => import("./PermissionSetList-VFVS0g0v.js")
5118
5164
  ), eo = [
5119
5165
  {
5120
5166
  path: "/",
@@ -5180,32 +5226,32 @@ const ht = (e) => ({
5180
5226
  __name: "Navigator",
5181
5227
  emits: ["close-navigation"],
5182
5228
  setup(e, { emit: A }) {
5183
- const u = A, { t: c } = Jt(), r = ur(), { sessionUser: m } = Yt(), y = jt(() => {
5229
+ const u = A, { t: c } = Kt(), n = mn(), { sessionUser: m } = Yt(), y = jt(() => {
5184
5230
  var Y;
5185
5231
  const E = [];
5186
5232
  return E.push({
5187
5233
  label: c("hr.employee.title"),
5188
5234
  value: "employee",
5189
5235
  action: () => {
5190
- r.push({
5236
+ n.push({
5191
5237
  name: T.EMPLOYEE,
5192
- query: r.currentRoute.value.query
5238
+ query: n.currentRoute.value.query
5193
5239
  }), u("close-navigation");
5194
5240
  }
5195
5241
  }), E.push({
5196
5242
  label: c("team.title"),
5197
5243
  value: "team-member",
5198
5244
  action: () => {
5199
- r.push({
5245
+ n.push({
5200
5246
  name: T.TEAM,
5201
- query: r.currentRoute.value.query
5247
+ query: n.currentRoute.value.query
5202
5248
  }), u("close-navigation");
5203
5249
  }
5204
5250
  }), E.push({
5205
5251
  label: c("auditLog.title"),
5206
5252
  value: "audit-log",
5207
5253
  action: () => {
5208
- r.push({
5254
+ n.push({
5209
5255
  name: T.AUDIT_LOG
5210
5256
  }), u("close-navigation");
5211
5257
  }
@@ -5213,16 +5259,16 @@ const ht = (e) => ({
5213
5259
  label: c("grantUser.title"),
5214
5260
  value: "pos-grant",
5215
5261
  action: () => {
5216
- r.push({
5262
+ n.push({
5217
5263
  name: T.POS_GRANT,
5218
- query: r.currentRoute.value.query
5264
+ query: n.currentRoute.value.query
5219
5265
  }), u("close-navigation");
5220
5266
  }
5221
5267
  }), E;
5222
5268
  }), h = ve();
5223
- return St(() => {
5269
+ return Wt(() => {
5224
5270
  var Y;
5225
- let E = (Y = r.currentRoute.value) == null ? void 0 : Y.name;
5271
+ let E = (Y = n.currentRoute.value) == null ? void 0 : Y.name;
5226
5272
  switch (E) {
5227
5273
  case T.EMPLOYEE:
5228
5274
  case T.ROLE:
@@ -5265,31 +5311,31 @@ var Dt = { exports: {} };
5265
5311
  } catch {
5266
5312
  return null;
5267
5313
  }
5268
- }, getItem: function(d, n) {
5314
+ }, getItem: function(d, r) {
5269
5315
  var s = this;
5270
5316
  return new Promise(function(l, a) {
5271
5317
  try {
5272
5318
  var p = s.getItemSync(d);
5273
- n == null || n(null, p), l(p);
5319
+ r == null || r(null, p), l(p);
5274
5320
  } catch (v) {
5275
- n && n(v, null), a(v);
5321
+ r && r(v, null), a(v);
5276
5322
  }
5277
5323
  });
5278
- }, setItem: function(d, n, s) {
5324
+ }, setItem: function(d, r, s) {
5279
5325
  return new Promise(function(l, a) {
5280
5326
  try {
5281
- localStorage.setItem(d, n), s && s(null, n), l(n);
5327
+ localStorage.setItem(d, r), s && s(null, r), l(r);
5282
5328
  } catch (p) {
5283
5329
  s && s(p, null), a(p);
5284
5330
  }
5285
5331
  });
5286
- } }, r = function() {
5287
- return r = Object.assign || function(d) {
5288
- for (var n, s = 1, l = arguments.length; s < l; s++) for (var a in n = arguments[s]) Object.prototype.hasOwnProperty.call(n, a) && (d[a] = n[a]);
5332
+ } }, n = function() {
5333
+ return n = Object.assign || function(d) {
5334
+ for (var r, s = 1, l = arguments.length; s < l; s++) for (var a in r = arguments[s]) Object.prototype.hasOwnProperty.call(r, a) && (d[a] = r[a]);
5289
5335
  return d;
5290
- }, r.apply(this, arguments);
5336
+ }, n.apply(this, arguments);
5291
5337
  };
5292
- function m(d, n, s, l) {
5338
+ function m(d, r, s, l) {
5293
5339
  return new (s || (s = Promise))(function(a, p) {
5294
5340
  function v(O) {
5295
5341
  try {
@@ -5314,7 +5360,7 @@ var Dt = { exports: {} };
5314
5360
  x((l = l.apply(d, [])).next());
5315
5361
  });
5316
5362
  }
5317
- function y(d, n) {
5363
+ function y(d, r) {
5318
5364
  var s, l, a, p, v = { label: 0, sent: function() {
5319
5365
  if (1 & a[0]) throw a[1];
5320
5366
  return a[1];
@@ -5361,7 +5407,7 @@ var Dt = { exports: {} };
5361
5407
  a[2] && v.ops.pop(), v.trys.pop();
5362
5408
  continue;
5363
5409
  }
5364
- M = n.call(d, v);
5410
+ M = r.call(d, v);
5365
5411
  } catch (X) {
5366
5412
  M = [6, X], l = 0;
5367
5413
  } finally {
@@ -5373,87 +5419,87 @@ var Dt = { exports: {} };
5373
5419
  };
5374
5420
  }
5375
5421
  }
5376
- function h(d, n, s) {
5377
- for (var l, a = 0, p = n.length; a < p; a++) !l && a in n || (l || (l = Array.prototype.slice.call(n, 0, a)), l[a] = n[a]);
5378
- return d.concat(l || Array.prototype.slice.call(n));
5422
+ function h(d, r, s) {
5423
+ for (var l, a = 0, p = r.length; a < p; a++) !l && a in r || (l || (l = Array.prototype.slice.call(r, 0, a)), l[a] = r[a]);
5424
+ return d.concat(l || Array.prototype.slice.call(r));
5379
5425
  }
5380
- var E = function d(n, s) {
5381
- if (n === s) return !0;
5382
- if (n && s && typeof n == "object" && typeof s == "object") {
5383
- if (n.constructor !== s.constructor) return !1;
5426
+ var E = function d(r, s) {
5427
+ if (r === s) return !0;
5428
+ if (r && s && typeof r == "object" && typeof s == "object") {
5429
+ if (r.constructor !== s.constructor) return !1;
5384
5430
  var l, a, p;
5385
- if (Array.isArray(n)) {
5386
- if ((l = n.length) != s.length) return !1;
5387
- for (a = l; a-- != 0; ) if (!d(n[a], s[a])) return !1;
5431
+ if (Array.isArray(r)) {
5432
+ if ((l = r.length) != s.length) return !1;
5433
+ for (a = l; a-- != 0; ) if (!d(r[a], s[a])) return !1;
5388
5434
  return !0;
5389
5435
  }
5390
- if (n.constructor === RegExp) return n.source === s.source && n.flags === s.flags;
5391
- if (n.valueOf !== Object.prototype.valueOf) return n.valueOf() === s.valueOf();
5392
- if (n.toString !== Object.prototype.toString) return n.toString() === s.toString();
5393
- if ((l = (p = Object.keys(n)).length) !== Object.keys(s).length) return !1;
5436
+ if (r.constructor === RegExp) return r.source === s.source && r.flags === s.flags;
5437
+ if (r.valueOf !== Object.prototype.valueOf) return r.valueOf() === s.valueOf();
5438
+ if (r.toString !== Object.prototype.toString) return r.toString() === s.toString();
5439
+ if ((l = (p = Object.keys(r)).length) !== Object.keys(s).length) return !1;
5394
5440
  for (a = l; a-- != 0; ) if (!Object.prototype.hasOwnProperty.call(s, p[a])) return !1;
5395
5441
  for (a = l; a-- != 0; ) {
5396
5442
  var v = p[a];
5397
- if (!d(n[v], s[v])) return !1;
5443
+ if (!d(r[v], s[v])) return !1;
5398
5444
  }
5399
5445
  return !0;
5400
5446
  }
5401
- return n != n && s != s;
5447
+ return r != r && s != s;
5402
5448
  };
5403
- function Y(d, n) {
5404
- var s = Object.keys(n || {}).filter(function(l) {
5405
- var a = d == null ? void 0 : d[l], p = n == null ? void 0 : n[l];
5449
+ function Y(d, r) {
5450
+ var s = Object.keys(r || {}).filter(function(l) {
5451
+ var a = d == null ? void 0 : d[l], p = r == null ? void 0 : r[l];
5406
5452
  return !E(a, p);
5407
5453
  });
5408
5454
  return Object.keys(d || {}).filter(function(l) {
5409
- Object.keys(n || {}).includes(l) || s.push(l);
5455
+ Object.keys(r || {}).includes(l) || s.push(l);
5410
5456
  }), Object.keys(s).length ? s : null;
5411
5457
  }
5412
5458
  var w, P;
5413
- function I(d, n, s) {
5459
+ function I(d, r, s) {
5414
5460
  var l = "shortString", a = !0;
5415
- typeof s == "number" && (l = "javaDouble", a = !1), d[l] = d[l] || {}, d[l][n] = a ? s + "" : s;
5461
+ typeof s == "number" && (l = "javaDouble", a = !1), d[l] = d[l] || {}, d[l][r] = a ? s + "" : s;
5416
5462
  }
5417
5463
  function H(d) {
5418
5464
  return !!d && typeof d == "object" && d.value !== void 0;
5419
5465
  }
5420
5466
  function z(d) {
5421
- return Object.fromEntries(Object.entries(d).map(function(n) {
5422
- var s = n[0], l = n[1];
5467
+ return Object.fromEntries(Object.entries(d).map(function(r) {
5468
+ var s = r[0], l = r[1];
5423
5469
  return [s, H(l) ? l : { value: l }];
5424
5470
  }));
5425
5471
  }
5426
5472
  function S(d) {
5427
- return r(r({}, d), { identity: d.identity ? r(r({}, d.identity), { traits: z(d.identity.traits || {}) }) : void 0 });
5473
+ return n(n({}, d), { identity: d.identity ? n(n({}, d.identity), { traits: z(d.identity.traits || {}) }) : void 0 });
5428
5474
  }
5429
5475
  (function(d) {
5430
5476
  d.NONE = "NONE", d.DEFAULT_FLAGS = "DEFAULT_FLAGS", d.CACHE = "CACHE", d.SERVER = "SERVER";
5431
5477
  })(w || (w = {}));
5432
- var te, k = null, Le = "FLAGSMITH_EVENT", ie = Le, he = "https://edge.api.flagsmith.com/api/v1/", Pe = "flagsmith_value_", Ze = "flagsmith_enabled_", Fe = "flagsmith_trait_", Oe = function() {
5433
- function d(n) {
5478
+ var te, k = null, Le = "FLAGSMITH_EVENT", ie = Le, he = "https://edge.api.flagsmith.com/api/v1/", Pe = "flagsmith_value_", Ne = "flagsmith_enabled_", Fe = "flagsmith_trait_", Oe = function() {
5479
+ function d(r) {
5434
5480
  var s = this;
5435
5481
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
5436
5482
  var l = s, a = l.api, p = l.evaluationContext;
5437
- s.log("Get Flags"), s.isLoading = !0, s.loadingState.isFetching || s.setLoadingState(r(r({}, s.loadingState), { isFetching: !0 }));
5483
+ s.log("Get Flags"), s.isLoading = !0, s.loadingState.isFetching || s.setLoadingState(n(n({}, s.loadingState), { isFetching: !0 }));
5438
5484
  var v = "".concat(s.getContext().identity), j = function(x) {
5439
5485
  var O, M, X, L;
5440
5486
  if (x && v === "".concat(s.getContext().identity)) {
5441
5487
  var Ae = x.flags, se = x.traits, le = x.identifier;
5442
5488
  s.isLoading = !1;
5443
- var re = {}, ne = {};
5489
+ var ne = {}, re = {};
5444
5490
  se = se || [], (Ae = Ae || []).forEach(function(Q) {
5445
- re[Q.feature.name.toLowerCase().replace(/ /g, "_")] = { id: Q.feature.id, enabled: Q.enabled, value: Q.feature_state_value };
5491
+ ne[Q.feature.name.toLowerCase().replace(/ /g, "_")] = { id: Q.feature.id, enabled: Q.enabled, value: Q.feature_state_value };
5446
5492
  }), se.forEach(function(Q) {
5447
- ne[Q.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: Q.transient, value: Q.trait_value };
5448
- }), s.oldFlags = r({}, s.flags);
5449
- var ue = Y(s.oldFlags, re), qe = Y((O = s.evaluationContext.identity) === null || O === void 0 ? void 0 : O.traits, ne);
5450
- if ((le || Object.keys(ne).length) && (s.evaluationContext.identity = r(r({}, s.evaluationContext.identity), { traits: ne }), le && (s.evaluationContext.identity.identifier = le)), s.flags = re, s.updateStorage(), s._onChange(s.oldFlags, { isFromServer: !0, flagsChanged: ue, traitsChanged: qe }, s._loadedState(null, w.SERVER)), s.datadogRum) try {
5493
+ re[Q.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: Q.transient, value: Q.trait_value };
5494
+ }), s.oldFlags = n({}, s.flags);
5495
+ var ue = Y(s.oldFlags, ne), qe = Y((O = s.evaluationContext.identity) === null || O === void 0 ? void 0 : O.traits, re);
5496
+ if ((le || Object.keys(re).length) && (s.evaluationContext.identity = n(n({}, s.evaluationContext.identity), { traits: re }), le && (s.evaluationContext.identity.identifier = le)), s.flags = ne, s.updateStorage(), s._onChange(s.oldFlags, { isFromServer: !0, flagsChanged: ue, traitsChanged: qe }, s._loadedState(null, w.SERVER)), s.datadogRum) try {
5451
5497
  if (s.datadogRum.trackTraits) {
5452
5498
  var He = {};
5453
5499
  Object.keys(((M = s.evaluationContext.identity) === null || M === void 0 ? void 0 : M.traits) || {}).map(function(Q) {
5454
5500
  He[Fe + Q] = s.getTrait(Q);
5455
5501
  });
5456
- var Ce = r(r(r({}, s.datadogRum.client.getUser()), { id: s.datadogRum.client.getUser().id || ((X = s.evaluationContext.identity) === null || X === void 0 ? void 0 : X.identifier) }), He);
5502
+ var Ce = n(n(n({}, s.datadogRum.client.getUser()), { id: s.datadogRum.client.getUser().id || ((X = s.evaluationContext.identity) === null || X === void 0 ? void 0 : X.identifier) }), He);
5457
5503
  s.log("Setting Datadog user", Ce), s.datadogRum.client.setUser(Ce);
5458
5504
  }
5459
5505
  } catch (Q) {
@@ -5462,7 +5508,7 @@ var Dt = { exports: {} };
5462
5508
  if (s.dtrum) try {
5463
5509
  var J = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
5464
5510
  Object.keys(s.flags).map(function(Q) {
5465
- I(J, Pe + Q, s.getValue(Q, { skipAnalytics: !0 })), I(J, Ze + Q, s.hasFeature(Q, { skipAnalytics: !0 }));
5511
+ I(J, Pe + Q, s.getValue(Q, { skipAnalytics: !0 })), I(J, Ne + Q, s.hasFeature(Q, { skipAnalytics: !0 }));
5466
5512
  }), Object.keys(((L = s.evaluationContext.identity) === null || L === void 0 ? void 0 : L.traits) || {}).map(function(Q) {
5467
5513
  I(J, Fe + Q, s.getTrait(Q));
5468
5514
  }), s.log("Sending javaLongOrObject traits to dynatrace", J.javaLongOrObject), s.log("Sending date traits to dynatrace", J.date), s.log("Sending shortString traits to dynatrace", J.shortString), s.log("Sending javaDouble to dynatrace", J.javaDouble), s.dtrum.sendSessionProperties(J.javaLongOrObject, J.date, J.shortString, J.javaDouble);
@@ -5477,7 +5523,7 @@ var Dt = { exports: {} };
5477
5523
  }).filter(function(x) {
5478
5524
  return x.trait_value !== void 0 || (s.log("Warning - attempted to set an undefined trait value for key", x.trait_key), !1);
5479
5525
  }) })) : s.getJSON(a + "identities/?identifier=" + encodeURIComponent(p.identity.identifier) + (p.identity.transient ? "&transient=true" : ""))]).then(function(x) {
5480
- return s.evaluationContext.identity = r(r({}, s.evaluationContext.identity), { traits: {} }), j(x == null ? void 0 : x[0]);
5526
+ return s.evaluationContext.identity = n(n({}, s.evaluationContext.identity), { traits: {} }), j(x == null ? void 0 : x[0]);
5481
5527
  }).catch(function(x) {
5482
5528
  var O = x.message, M = new Error(O);
5483
5529
  return Promise.reject(M);
@@ -5489,7 +5535,7 @@ var Dt = { exports: {} };
5489
5535
  if (s.evaluationEvent && s.evaluationContext.environment && s.evaluationEvent[s.evaluationContext.environment.apiKey]) return s.evaluationEvent && Object.getOwnPropertyNames(s.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(s.evaluationEvent[s.evaluationContext.environment.apiKey]).length !== 0 ? s.getJSON(l + "analytics/flags/", "POST", JSON.stringify(s.evaluationEvent[s.evaluationContext.environment.apiKey])).then(function(a) {
5490
5536
  if (s.evaluationContext.environment) {
5491
5537
  var p = s.getState();
5492
- s.evaluationEvent || (s.evaluationEvent = {}), s.evaluationEvent[s.evaluationContext.environment.apiKey] = {}, s.setState(r(r({}, p), { evaluationEvent: s.evaluationEvent })), s.updateEventStorage();
5538
+ s.evaluationEvent || (s.evaluationEvent = {}), s.evaluationEvent[s.evaluationContext.environment.apiKey] = {}, s.setState(n(n({}, p), { evaluationEvent: s.evaluationEvent })), s.updateEventStorage();
5493
5539
  }
5494
5540
  }).catch(function(a) {
5495
5541
  s.log("Exception fetching evaluationEvent", a);
@@ -5514,17 +5560,17 @@ var Dt = { exports: {} };
5514
5560
  }));
5515
5561
  }, this.setContext = function(l) {
5516
5562
  var a = S(l);
5517
- return s.evaluationContext = r(r({}, a), { environment: a.environment || s.evaluationContext.environment }), s.initialised ? s.getFlags() : Promise.resolve();
5563
+ return s.evaluationContext = n(n({}, a), { environment: a.environment || s.evaluationContext.environment }), s.initialised ? s.getFlags() : Promise.resolve();
5518
5564
  }, this.getContext = function() {
5519
5565
  return s.evaluationContext;
5520
5566
  }, this.updateContext = function(l) {
5521
- return s.setContext(r(r({}, s.getContext()), l));
5567
+ return s.setContext(n(n({}, s.getContext()), l));
5522
5568
  }, this.setTrait = function(l, a) {
5523
5569
  var p;
5524
- if (s.api) return s.setContext(r(r({}, s.evaluationContext), { identity: r(r({}, s.evaluationContext.identity), { traits: r(r({}, (p = s.evaluationContext.identity) === null || p === void 0 ? void 0 : p.traits), z(Object.fromEntries([[l, a]]))) }) }));
5570
+ if (s.api) return s.setContext(n(n({}, s.evaluationContext), { identity: n(n({}, s.evaluationContext.identity), { traits: n(n({}, (p = s.evaluationContext.identity) === null || p === void 0 ? void 0 : p.traits), z(Object.fromEntries([[l, a]]))) }) }));
5525
5571
  }, this.setTraits = function(l) {
5526
5572
  var a;
5527
- if (s.api) return s.setContext(r(r({}, s.evaluationContext), { identity: r(r({}, s.evaluationContext.identity), { traits: r(r({}, (a = s.evaluationContext.identity) === null || a === void 0 ? void 0 : a.traits), Object.fromEntries(Object.entries(l).map(function(p) {
5573
+ if (s.api) return s.setContext(n(n({}, s.evaluationContext), { identity: n(n({}, s.evaluationContext.identity), { traits: n(n({}, (a = s.evaluationContext.identity) === null || a === void 0 ? void 0 : a.traits), Object.fromEntries(Object.entries(l).map(function(p) {
5528
5574
  var v = p[0], j = p[1];
5529
5575
  return [v, H(j) ? j : { value: j }];
5530
5576
  }))) }) }));
@@ -5546,16 +5592,16 @@ var Dt = { exports: {} };
5546
5592
  if (M === se) {
5547
5593
  var le = (Ae = X.headers) === null || Ae === void 0 ? void 0 : Ae.get("x-flagsmith-document-updated-at");
5548
5594
  if (le) try {
5549
- var re = parseFloat(le);
5550
- if (isNaN(re)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
5551
- s.timestamp = re;
5552
- } catch (ne) {
5553
- s.log(ne, "Failed to parse x-flagsmith-document-updated-at", le);
5595
+ var ne = parseFloat(le);
5596
+ if (isNaN(ne)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
5597
+ s.timestamp = ne;
5598
+ } catch (re) {
5599
+ s.log(re, "Failed to parse x-flagsmith-document-updated-at", le);
5554
5600
  }
5555
- return s.log("Fetch response: " + X.status + " " + (a || "GET") + 0 + l), X.text().then(function(ne) {
5556
- var ue = ne;
5601
+ return s.log("Fetch response: " + X.status + " " + (a || "GET") + 0 + l), X.text().then(function(re) {
5602
+ var ue = re;
5557
5603
  try {
5558
- ue = JSON.parse(ne);
5604
+ ue = JSON.parse(re);
5559
5605
  } catch {
5560
5606
  }
5561
5607
  return !ue && X.status && (ue = "API Response: ".concat(X.status)), X.status && X.status >= 200 && X.status < 300 ? ue : Promise.reject(new Error(ue));
@@ -5564,7 +5610,7 @@ var Dt = { exports: {} };
5564
5610
  s.log("Received response with identity mismatch, ignoring response. Requested: ".concat(M, ", Current: ").concat(se));
5565
5611
  });
5566
5612
  }, this.evaluateFlag = function(l, a) {
5567
- if (s.datadogRum && (s.datadogRum.client.addFeatureFlagEvaluation ? a === "VALUE" ? s.datadogRum.client.addFeatureFlagEvaluation(Pe + l, s.getValue(l, {}, !0)) : s.datadogRum.client.addFeatureFlagEvaluation(Ze + l, s.hasFeature(l, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), s.enableAnalytics) {
5613
+ if (s.datadogRum && (s.datadogRum.client.addFeatureFlagEvaluation ? a === "VALUE" ? s.datadogRum.client.addFeatureFlagEvaluation(Pe + l, s.getValue(l, {}, !0)) : s.datadogRum.client.addFeatureFlagEvaluation(Ne + l, s.hasFeature(l, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), s.enableAnalytics) {
5568
5614
  if (!s.evaluationEvent || !s.evaluationContext.environment) return;
5569
5615
  s.evaluationEvent[s.evaluationContext.environment.apiKey] || (s.evaluationEvent[s.evaluationContext.environment.apiKey] = {}), s.evaluationEvent[s.evaluationContext.environment.apiKey][l] === void 0 && (s.evaluationEvent[s.evaluationContext.environment.apiKey][l] = 0), s.evaluationEvent[s.evaluationContext.environment.apiKey][l] += 1;
5570
5616
  }
@@ -5572,27 +5618,27 @@ var Dt = { exports: {} };
5572
5618
  }, this._onChange = function(l, a, p) {
5573
5619
  var v, j;
5574
5620
  s.setLoadingState(p), (v = s.onChange) === null || v === void 0 || v.call(s, l, a, s.loadingState), (j = s._trigger) === null || j === void 0 || j.call(s);
5575
- }, P = n.fetch ? n.fetch : typeof fetch < "u" ? fetch : Re == null ? void 0 : Re.fetch, this.canUseStorage = typeof window < "u" || !!n.browserlessStorage, this.log("Constructing flagsmith instance " + n), n.eventSource && (te = n.eventSource), n.AsyncStorage && (k = n.AsyncStorage);
5621
+ }, P = r.fetch ? r.fetch : typeof fetch < "u" ? fetch : Re == null ? void 0 : Re.fetch, this.canUseStorage = typeof window < "u" || !!r.browserlessStorage, this.log("Constructing flagsmith instance " + r), r.eventSource && (te = r.eventSource), r.AsyncStorage && (k = r.AsyncStorage);
5576
5622
  }
5577
- return d.prototype.init = function(n) {
5623
+ return d.prototype.init = function(r) {
5578
5624
  var s, l, a;
5579
5625
  return m(this, void 0, void 0, function() {
5580
- var p, v, j, x, O, M, X, L, Ae, se, le, re, ne, ue, qe, He, Ce, J, Q, Je, Xe, Vt, De, _e, Pt, Ft, $e, Ot, et, Qe, je, qt, _ = this;
5626
+ var p, v, j, x, O, M, X, L, Ae, se, le, ne, re, ue, qe, He, Ce, J, Q, Je, Xe, Vt, De, _e, Pt, Ft, $e, Ot, et, Qe, je, qt, _ = this;
5581
5627
  return y(this, function(ce) {
5582
5628
  switch (ce.label) {
5583
5629
  case 0:
5584
- p = S(n.evaluationContext || this.evaluationContext), ce.label = 1;
5630
+ p = S(r.evaluationContext || this.evaluationContext), ce.label = 1;
5585
5631
  case 1:
5586
- if (ce.trys.push([1, 13, , 14]), v = n.environmentID, j = n.api, x = j === void 0 ? he : j, O = n.headers, M = n.onChange, X = n.cacheFlags, L = n.datadogRum, Ae = n.onError, se = n.defaultFlags, le = n.fetch, re = n.preventFetch, ne = n.enableLogs, ue = n.enableDynatrace, qe = n.enableAnalytics, He = n.realtime, Ce = n.eventSourceUrl, J = Ce === void 0 ? "https://realtime.flagsmith.com/" : Ce, Q = n.AsyncStorage, Je = n.identity, Xe = n.traits, Vt = n.state, De = n.cacheOptions, _e = n.angularHttpClient, Pt = n._trigger, Ft = n._triggerLoadingState, p.environment = v ? { apiKey: v } : p.environment, !p.environment || !p.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
5632
+ if (ce.trys.push([1, 13, , 14]), v = r.environmentID, j = r.api, x = j === void 0 ? he : j, O = r.headers, M = r.onChange, X = r.cacheFlags, L = r.datadogRum, Ae = r.onError, se = r.defaultFlags, le = r.fetch, ne = r.preventFetch, re = r.enableLogs, ue = r.enableDynatrace, qe = r.enableAnalytics, He = r.realtime, Ce = r.eventSourceUrl, J = Ce === void 0 ? "https://realtime.flagsmith.com/" : Ce, Q = r.AsyncStorage, Je = r.identity, Xe = r.traits, Vt = r.state, De = r.cacheOptions, _e = r.angularHttpClient, Pt = r._trigger, Ft = r._triggerLoadingState, p.environment = v ? { apiKey: v } : p.environment, !p.environment || !p.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
5587
5633
  if (p.identity = Je || Xe ? { identifier: Je, traits: Xe ? Object.fromEntries(Object.entries(Xe).map(function(ae) {
5588
5634
  return [ae[0], { value: ae[1] }];
5589
5635
  })) : {} } : p.identity, this.evaluationContext = p, this.api = x, this.headers = O, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = M, $e = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Pt || this._trigger, this._triggerLoadingState = Ft || this._triggerLoadingState, this.onError = function(ae) {
5590
- _.setLoadingState(r(r({}, _.loadingState), { isFetching: !1, isLoading: !1, error: ae })), Ae == null || Ae(ae);
5591
- }, this.enableLogs = ne || !1, this.cacheOptions = De ? { skipAPI: !!De.skipAPI, ttl: De.ttl || 0, storageKey: De.storageKey, loadStale: !!De.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), le && (P = le), this.enableAnalytics = qe || !1, this.flags = Object.assign({}, se) || {}, this.datadogRum = L || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = k !== void 0 && !!X, ie = "FLAGSMITH_EVENT_" + p.environment.apiKey, Q && (k = Q), He && typeof window < "u" && this.setupRealtime(J, p.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = r(r({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Vt), this.log("Initialising with properties", n, this), ue && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), _e && (P = /* @__PURE__ */ function(ae) {
5636
+ _.setLoadingState(n(n({}, _.loadingState), { isFetching: !1, isLoading: !1, error: ae })), Ae == null || Ae(ae);
5637
+ }, this.enableLogs = re || !1, this.cacheOptions = De ? { skipAPI: !!De.skipAPI, ttl: De.ttl || 0, storageKey: De.storageKey, loadStale: !!De.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), le && (P = le), this.enableAnalytics = qe || !1, this.flags = Object.assign({}, se) || {}, this.datadogRum = L || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = k !== void 0 && !!X, ie = "FLAGSMITH_EVENT_" + p.environment.apiKey, Q && (k = Q), He && typeof window < "u" && this.setupRealtime(J, p.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = n(n({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Vt), this.log("Initialising with properties", r, this), ue && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), _e && (P = /* @__PURE__ */ function(ae) {
5592
5638
  return function(me, ge) {
5593
- var fe = ge.headers, Z = ge.method, Ge = ge.body;
5639
+ var fe = ge.headers, N = ge.method, Ge = ge.body;
5594
5640
  return new Promise(function(Be) {
5595
- switch (Z) {
5641
+ switch (N) {
5596
5642
  case "GET":
5597
5643
  return ae.get(me, { headers: fe }).subscribe(function(pe) {
5598
5644
  Be({ ok: !0, text: function() {
@@ -5621,26 +5667,26 @@ var Dt = { exports: {} };
5621
5667
  var ge = JSON.parse(me);
5622
5668
  if (ge[_.evaluationContext.environment.apiKey]) {
5623
5669
  var fe = _.getState();
5624
- _.log("Retrieved events from cache", me), _.setState(r(r({}, fe), { evaluationEvent: ge[_.evaluationContext.environment.apiKey] }));
5670
+ _.log("Retrieved events from cache", me), _.setState(n(n({}, fe), { evaluationEvent: ge[_.evaluationContext.environment.apiKey] }));
5625
5671
  }
5626
5672
  }
5627
5673
  })), !X) return [3, 9];
5628
5674
  if (!k || !this.canUseStorage) return [3, 8];
5629
5675
  Ot = function(ae, me) {
5630
5676
  return m(_, void 0, void 0, function() {
5631
- var ge, fe, Z, Ge, Be, pe, tt, Ht, st, rt, nt, at, ot, it, lt, ct, At, ut, mt, gt, dt, pt, bt, ft, Xt = this;
5677
+ var ge, fe, N, Ge, Be, pe, tt, Ht, st, nt, rt, at, ot, it, lt, ct, At, ut, mt, gt, dt, pt, bt, ft, Xt = this;
5632
5678
  return y(this, function(ye) {
5633
5679
  switch (ye.label) {
5634
5680
  case 0:
5635
5681
  if (!me) return [3, 7];
5636
5682
  ge = null, fe = null, ye.label = 1;
5637
5683
  case 1:
5638
- return ye.trys.push([1, 5, , 6]), Z = JSON.parse(me), Ge = !1, Be = !1, Z && Z.api === this.api && ((rt = (st = Z.evaluationContext) === null || st === void 0 ? void 0 : st.environment) === null || rt === void 0 ? void 0 : rt.apiKey) === ((nt = this.evaluationContext.environment) === null || nt === void 0 ? void 0 : nt.apiKey) && (pe = !0, this.evaluationContext.identity && ((ot = (at = Z.evaluationContext) === null || at === void 0 ? void 0 : at.identity) === null || ot === void 0 ? void 0 : ot.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((lt = (it = Z.evaluationContext) === null || it === void 0 ? void 0 : it.identity) === null || lt === void 0 ? void 0 : lt.identifier) + " to " + this.evaluationContext.identity.identifier), pe = !1), this.cacheOptions.ttl && (!Z.ts || (/* @__PURE__ */ new Date()).valueOf() - Z.ts > this.cacheOptions.ttl) && (Z.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Z.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Z.ts) + "ms"), pe = !1) : Z.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Z.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Z.ts) + "ms"), Be = !0, pe = !0)), pe && (Ge = !0, fe = Y((ct = this.evaluationContext.identity) === null || ct === void 0 ? void 0 : ct.traits, (ut = (At = Z.evaluationContext) === null || At === void 0 ? void 0 : At.identity) === null || ut === void 0 ? void 0 : ut.traits), ge = Y(this.flags, Z.flags), this.setState(r(r({}, Z), { evaluationContext: S(r(r({}, Z.evaluationContext), { identity: !((mt = Z.evaluationContext) === null || mt === void 0) && mt.identity ? r(r({}, (gt = Z.evaluationContext) === null || gt === void 0 ? void 0 : gt.identity), { traits: r(r({}, ((pt = (dt = Z.evaluationContext) === null || dt === void 0 ? void 0 : dt.identity) === null || pt === void 0 ? void 0 : pt.traits) || {}), Xe || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Z))), Ge ? (tt = !re && (!this.cacheOptions.skipAPI || Be), this._onChange(null, { isFromServer: !1, flagsChanged: ge, traitsChanged: fe }, this._loadedState(null, w.CACHE, tt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Ge && !Be && this.log("Skipping API, using cache"), tt && this.getFlags().catch(function(_s) {
5684
+ return ye.trys.push([1, 5, , 6]), N = JSON.parse(me), Ge = !1, Be = !1, N && N.api === this.api && ((nt = (st = N.evaluationContext) === null || st === void 0 ? void 0 : st.environment) === null || nt === void 0 ? void 0 : nt.apiKey) === ((rt = this.evaluationContext.environment) === null || rt === void 0 ? void 0 : rt.apiKey) && (pe = !0, this.evaluationContext.identity && ((ot = (at = N.evaluationContext) === null || at === void 0 ? void 0 : at.identity) === null || ot === void 0 ? void 0 : ot.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((lt = (it = N.evaluationContext) === null || it === void 0 ? void 0 : it.identity) === null || lt === void 0 ? void 0 : lt.identifier) + " to " + this.evaluationContext.identity.identifier), pe = !1), this.cacheOptions.ttl && (!N.ts || (/* @__PURE__ */ new Date()).valueOf() - N.ts > this.cacheOptions.ttl) && (N.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + N.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - N.ts) + "ms"), pe = !1) : N.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + N.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - N.ts) + "ms"), Be = !0, pe = !0)), pe && (Ge = !0, fe = Y((ct = this.evaluationContext.identity) === null || ct === void 0 ? void 0 : ct.traits, (ut = (At = N.evaluationContext) === null || At === void 0 ? void 0 : At.identity) === null || ut === void 0 ? void 0 : ut.traits), ge = Y(this.flags, N.flags), this.setState(n(n({}, N), { evaluationContext: S(n(n({}, N.evaluationContext), { identity: !((mt = N.evaluationContext) === null || mt === void 0) && mt.identity ? n(n({}, (gt = N.evaluationContext) === null || gt === void 0 ? void 0 : gt.identity), { traits: n(n({}, ((pt = (dt = N.evaluationContext) === null || dt === void 0 ? void 0 : dt.identity) === null || pt === void 0 ? void 0 : pt.traits) || {}), Xe || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", N))), Ge ? (tt = !ne && (!this.cacheOptions.skipAPI || Be), this._onChange(null, { isFromServer: !1, flagsChanged: ge, traitsChanged: fe }, this._loadedState(null, w.CACHE, tt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Ge && !Be && this.log("Skipping API, using cache"), tt && this.getFlags().catch(function(Ls) {
5639
5685
  var yt;
5640
- (yt = Xt.onError) === null || yt === void 0 || yt.call(Xt, _s);
5686
+ (yt = Xt.onError) === null || yt === void 0 || yt.call(Xt, Ls);
5641
5687
  }), [3, 4]) : [3, 2];
5642
5688
  case 2:
5643
- return re ? [3, 4] : [4, this.getFlags()];
5689
+ return ne ? [3, 4] : [4, this.getFlags()];
5644
5690
  case 3:
5645
5691
  ye.sent(), ye.label = 4;
5646
5692
  case 4:
@@ -5650,7 +5696,7 @@ var Dt = { exports: {} };
5650
5696
  case 6:
5651
5697
  return [3, 10];
5652
5698
  case 7:
5653
- return re ? [3, 9] : [4, this.getFlags()];
5699
+ return ne ? [3, 9] : [4, this.getFlags()];
5654
5700
  case 8:
5655
5701
  return ye.sent(), [3, 10];
5656
5702
  case 9:
@@ -5680,7 +5726,7 @@ var Dt = { exports: {} };
5680
5726
  case 8:
5681
5727
  return [3, 12];
5682
5728
  case 9:
5683
- return re ? [3, 11] : [4, this.getFlags()];
5729
+ return ne ? [3, 11] : [4, this.getFlags()];
5684
5730
  case 10:
5685
5731
  return ce.sent(), [3, 12];
5686
5732
  case 11:
@@ -5698,44 +5744,44 @@ var Dt = { exports: {} };
5698
5744
  });
5699
5745
  }, d.prototype.getAllFlags = function() {
5700
5746
  return this.flags;
5701
- }, d.prototype.identify = function(n, s, l) {
5702
- return this.evaluationContext.identity = { identifier: n, transient: l, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == n ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = n, this.log("Identify: " + this.evaluationContext.identity.identifier), s && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(s).map(function(a) {
5747
+ }, d.prototype.identify = function(r, s, l) {
5748
+ return this.evaluationContext.identity = { identifier: r, transient: l, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == r ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = r, this.log("Identify: " + this.evaluationContext.identity.identifier), s && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(s).map(function(a) {
5703
5749
  var p = a[0], v = a[1];
5704
5750
  return [p, H(v) ? v : { value: v }];
5705
5751
  }))), this.initialised ? this.getFlags() : Promise.resolve();
5706
5752
  }, d.prototype.getState = function() {
5707
5753
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
5708
- }, d.prototype.setState = function(n) {
5709
- n && (this.initialised = !0, this.api = n.api || this.api || he, this.flags = n.flags || this.flags, this.evaluationContext = n.evaluationContext || this.evaluationContext, this.evaluationEvent = n.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
5754
+ }, d.prototype.setState = function(r) {
5755
+ r && (this.initialised = !0, this.api = r.api || this.api || he, this.flags = r.flags || this.flags, this.evaluationContext = r.evaluationContext || this.evaluationContext, this.evaluationEvent = r.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
5710
5756
  }, d.prototype.logout = function() {
5711
5757
  return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
5712
- }, d.prototype.startListening = function(n) {
5713
- n === void 0 && (n = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, n);
5758
+ }, d.prototype.startListening = function(r) {
5759
+ r === void 0 && (r = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, r);
5714
5760
  }, d.prototype.stopListening = function() {
5715
5761
  this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
5716
- }, d.prototype._loadedState = function(n, s, l) {
5717
- return n === void 0 && (n = null), l === void 0 && (l = !1), { error: n, isFetching: l, isLoading: !1, source: s };
5762
+ }, d.prototype._loadedState = function(r, s, l) {
5763
+ return r === void 0 && (r = null), l === void 0 && (l = !1), { error: r, isFetching: l, isLoading: !1, source: s };
5718
5764
  }, d.prototype.log = function() {
5719
- for (var n = [], s = 0; s < arguments.length; s++) n[s] = arguments[s];
5720
- this.enableLogs && console.log.apply(this, h(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], n));
5765
+ for (var r = [], s = 0; s < arguments.length; s++) r[s] = arguments[s];
5766
+ this.enableLogs && console.log.apply(this, h(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], r));
5721
5767
  }, d.prototype.updateStorage = function() {
5722
5768
  if (this.cacheFlags) {
5723
5769
  this.ts = (/* @__PURE__ */ new Date()).valueOf();
5724
- var n = JSON.stringify(this.getState());
5725
- this.log("Setting storage", n), k.setItem(this.getStorageKey(), n);
5770
+ var r = JSON.stringify(this.getState());
5771
+ this.log("Setting storage", r), k.setItem(this.getStorageKey(), r);
5726
5772
  }
5727
5773
  }, d.prototype.updateEventStorage = function() {
5728
5774
  if (this.enableAnalytics) {
5729
- var n = JSON.stringify(this.getState().evaluationEvent);
5730
- k.setItem(ie, n).catch(function(s) {
5775
+ var r = JSON.stringify(this.getState().evaluationEvent);
5776
+ k.setItem(ie, r).catch(function(s) {
5731
5777
  return console.error("Flagsmith: Error setting item in async storage", s);
5732
5778
  });
5733
5779
  }
5734
- }, d.prototype.setLoadingState = function(n) {
5780
+ }, d.prototype.setLoadingState = function(r) {
5735
5781
  var s;
5736
- E(n, this.loadingState) || (this.loadingState = r({}, n), this.log("Loading state changed", n), (s = this._triggerLoadingState) === null || s === void 0 || s.call(this));
5737
- }, d.prototype.setupRealtime = function(n, s) {
5738
- var l = this, a = n + "sse/environments/" + s + "/stream";
5782
+ E(r, this.loadingState) || (this.loadingState = n({}, r), this.log("Loading state changed", r), (s = this._triggerLoadingState) === null || s === void 0 || s.call(this));
5783
+ }, d.prototype.setupRealtime = function(r, s) {
5784
+ var l = this, a = r + "sse/environments/" + s + "/stream";
5739
5785
  te ? this.eventSource || (this.log("Creating event source with url " + a), this.eventSource = new te(a), this.eventSource.addEventListener("environment_updated", function(p) {
5740
5786
  var v;
5741
5787
  try {
@@ -5748,34 +5794,34 @@ var Dt = { exports: {} };
5748
5794
  }, d;
5749
5795
  }();
5750
5796
  function i(d) {
5751
- var n = d.fetch, s = d.AsyncStorage, l = d.eventSource;
5752
- return new Oe({ fetch: n, AsyncStorage: s, eventSource: l });
5797
+ var r = d.fetch, s = d.AsyncStorage, l = d.eventSource;
5798
+ return new Oe({ fetch: r, AsyncStorage: s, eventSource: l });
5753
5799
  }
5754
- var g, f = (g = function(d, n) {
5800
+ var g, f = (g = function(d, r) {
5755
5801
  return g = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(s, l) {
5756
5802
  s.__proto__ = l;
5757
5803
  } || function(s, l) {
5758
5804
  for (var a in l) Object.prototype.hasOwnProperty.call(l, a) && (s[a] = l[a]);
5759
- }, g(d, n);
5760
- }, function(d, n) {
5761
- if (typeof n != "function" && n !== null) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
5805
+ }, g(d, r);
5806
+ }, function(d, r) {
5807
+ if (typeof r != "function" && r !== null) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
5762
5808
  function s() {
5763
5809
  this.constructor = d;
5764
5810
  }
5765
- g(d, n), d.prototype = n === null ? Object.create(n) : (s.prototype = n.prototype, new s());
5811
+ g(d, r), d.prototype = r === null ? Object.create(r) : (s.prototype = r.prototype, new s());
5766
5812
  }), B = function(d) {
5767
- var n = typeof Symbol == "function" && Symbol.iterator, s = n && d[n], l = 0;
5813
+ var r = typeof Symbol == "function" && Symbol.iterator, s = r && d[r], l = 0;
5768
5814
  if (s) return s.call(d);
5769
5815
  if (d && typeof d.length == "number") return { next: function() {
5770
5816
  return d && l >= d.length && (d = void 0), { value: d && d[l++], done: !d };
5771
5817
  } };
5772
- throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
5773
- }, C = function(d, n) {
5818
+ throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
5819
+ }, C = function(d, r) {
5774
5820
  var s = typeof Symbol == "function" && d[Symbol.iterator];
5775
5821
  if (!s) return d;
5776
5822
  var l, a, p = s.call(d), v = [];
5777
5823
  try {
5778
- for (; (n === void 0 || n-- > 0) && !(l = p.next()).done; ) v.push(l.value);
5824
+ for (; (r === void 0 || r-- > 0) && !(l = p.next()).done; ) v.push(l.value);
5779
5825
  } catch (j) {
5780
5826
  a = { error: j };
5781
5827
  } finally {
@@ -5786,27 +5832,27 @@ var Dt = { exports: {} };
5786
5832
  }
5787
5833
  }
5788
5834
  return v;
5789
- }, D = function(d, n, s) {
5790
- if (arguments.length === 2) for (var l, a = 0, p = n.length; a < p; a++) !l && a in n || (l || (l = Array.prototype.slice.call(n, 0, a)), l[a] = n[a]);
5791
- return d.concat(l || Array.prototype.slice.call(n));
5835
+ }, D = function(d, r, s) {
5836
+ if (arguments.length === 2) for (var l, a = 0, p = r.length; a < p; a++) !l && a in r || (l || (l = Array.prototype.slice.call(r, 0, a)), l[a] = r[a]);
5837
+ return d.concat(l || Array.prototype.slice.call(r));
5792
5838
  }, V = function(d) {
5793
- function n() {
5839
+ function r() {
5794
5840
  return d.call(this, `EventSource not available.
5795
5841
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
5796
5842
  }
5797
- return f(n, d), n;
5843
+ return f(r, d), r;
5798
5844
  }(Error), F = function() {
5799
- function d(n, s) {
5845
+ function d(r, s) {
5800
5846
  var l = this;
5801
- if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = s != null ? Object.assign({}, s) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = n.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new V();
5847
+ if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = s != null ? Object.assign({}, s) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = r.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new V();
5802
5848
  this._onevent_wrapped = function(a) {
5803
5849
  l._onevent(a);
5804
5850
  }, this._start();
5805
5851
  }
5806
- return d.prototype.dispatchEvent = function(n) {
5852
+ return d.prototype.dispatchEvent = function(r) {
5807
5853
  throw new Error("Method not implemented.");
5808
5854
  }, d.prototype._start = function() {
5809
- var n, s, l = this, a = this.url;
5855
+ var r, s, l = this, a = this.url;
5810
5856
  this._lastEventId && (a.indexOf("?") === -1 ? a += "?" : a += "&", a += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(a, this._configuration), this._eventSource.onopen = function(x) {
5811
5857
  l._onopen(x);
5812
5858
  }, this._eventSource.onerror = function(x) {
@@ -5820,32 +5866,32 @@ Consider loading an EventSource polyfill and making it available globally as Eve
5820
5866
  this._eventSource.addEventListener(j, this._onevent_wrapped);
5821
5867
  }
5822
5868
  } catch (x) {
5823
- n = { error: x };
5869
+ r = { error: x };
5824
5870
  } finally {
5825
5871
  try {
5826
5872
  v && !v.done && (s = p.return) && s.call(p);
5827
5873
  } finally {
5828
- if (n) throw n.error;
5874
+ if (r) throw r.error;
5829
5875
  }
5830
5876
  }
5831
- }, d.prototype._onopen = function(n) {
5832
- this.readyState === 0 && (this.readyState = 1, this.onopen(n));
5833
- }, d.prototype._onerror = function(n) {
5877
+ }, d.prototype._onopen = function(r) {
5878
+ this.readyState === 0 && (this.readyState = 1, this.onopen(r));
5879
+ }, d.prototype._onerror = function(r) {
5834
5880
  var s = this;
5835
- if (this.readyState === 1 && (this.readyState = 0, this.onerror(n)), this._eventSource) {
5881
+ if (this.readyState === 1 && (this.readyState = 0, this.onerror(r)), this._eventSource) {
5836
5882
  this._eventSource.close(), this._eventSource = null;
5837
5883
  var l = Math.round(this.max_retry_time * Math.random());
5838
5884
  this._timer = setTimeout(function() {
5839
5885
  return s._start();
5840
5886
  }, l);
5841
5887
  }
5842
- }, d.prototype._onevent = function(n) {
5888
+ }, d.prototype._onevent = function(r) {
5843
5889
  var s, l;
5844
- n && n.lastEventId && (this._lastEventId = n.lastEventId);
5845
- var a = this._listeners[n.type];
5890
+ r && r.lastEventId && (this._lastEventId = r.lastEventId);
5891
+ var a = this._listeners[r.type];
5846
5892
  if (a != null) try {
5847
5893
  for (var p = B(D([], C(a), !1)), v = p.next(); !v.done; v = p.next())
5848
- v.value.call(this, n);
5894
+ v.value.call(this, r);
5849
5895
  } catch (j) {
5850
5896
  s = { error: j };
5851
5897
  } finally {
@@ -5855,26 +5901,26 @@ Consider loading an EventSource polyfill and making it available globally as Eve
5855
5901
  if (s) throw s.error;
5856
5902
  }
5857
5903
  }
5858
- n.type === "message" && this.onmessage(n);
5859
- }, d.prototype.onopen = function(n) {
5860
- }, d.prototype.onerror = function(n) {
5861
- }, d.prototype.onmessage = function(n) {
5904
+ r.type === "message" && this.onmessage(r);
5905
+ }, d.prototype.onopen = function(r) {
5906
+ }, d.prototype.onerror = function(r) {
5907
+ }, d.prototype.onmessage = function(r) {
5862
5908
  }, d.prototype.close = function() {
5863
5909
  this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
5864
- }, d.prototype.addEventListener = function(n, s, l) {
5865
- this._listeners[n] == null && (this._listeners[n] = [], this._eventSource != null && this._eventSource.addEventListener(n, this._onevent_wrapped));
5866
- var a = this._listeners[n];
5867
- a.includes(s) || (this._listeners[n] = D(D([], C(a), !1), [s], !1));
5868
- }, d.prototype.removeEventListener = function(n, s, l) {
5869
- var a = this._listeners[n];
5870
- this._listeners[n] = a.filter(function(p) {
5910
+ }, d.prototype.addEventListener = function(r, s, l) {
5911
+ this._listeners[r] == null && (this._listeners[r] = [], this._eventSource != null && this._eventSource.addEventListener(r, this._onevent_wrapped));
5912
+ var a = this._listeners[r];
5913
+ a.includes(s) || (this._listeners[r] = D(D([], C(a), !1), [s], !1));
5914
+ }, d.prototype.removeEventListener = function(r, s, l) {
5915
+ var a = this._listeners[r];
5916
+ this._listeners[r] = a.filter(function(p) {
5871
5917
  return p !== s;
5872
5918
  });
5873
5919
  }, d;
5874
5920
  }();
5875
5921
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
5876
- var N = function(d, n) {
5877
- return n = n || {}, new Promise(function(s, l) {
5922
+ var Z = function(d, r) {
5923
+ return r = r || {}, new Promise(function(s, l) {
5878
5924
  var a = new XMLHttpRequest(), p = [], v = [], j = {}, x = function() {
5879
5925
  return { ok: (a.status / 100 | 0) == 2, statusText: a.statusText, status: a.status, url: a.responseURL, text: function() {
5880
5926
  return Promise.resolve(a.responseText);
@@ -5892,38 +5938,38 @@ Consider loading an EventSource polyfill and making it available globally as Eve
5892
5938
  return M.toLowerCase() in j;
5893
5939
  } } };
5894
5940
  };
5895
- for (var O in a.open(n.method || "get", d, !0), a.onload = function() {
5941
+ for (var O in a.open(r.method || "get", d, !0), a.onload = function() {
5896
5942
  a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(M, X, L) {
5897
5943
  p.push(X = X.toLowerCase()), v.push([X, L]), j[X] = j[X] ? j[X] + "," + L : L;
5898
5944
  }), s(x());
5899
- }, a.onerror = l, a.withCredentials = n.credentials == "include", n.headers) a.setRequestHeader(O, n.headers[O]);
5900
- a.send(n.body || null);
5945
+ }, a.onerror = l, a.withCredentials = r.credentials == "include", r.headers) a.setRequestHeader(O, r.headers[O]);
5946
+ a.send(r.body || null);
5901
5947
  });
5902
- }, W = i({ AsyncStorage: c, fetch: N, eventSource: F });
5948
+ }, W = i({ AsyncStorage: c, fetch: Z, eventSource: F });
5903
5949
  typeof window < "u" && (window.flagsmith = W), u.createFlagsmithInstance = function() {
5904
- return i({ AsyncStorage: c, fetch: N, eventSource: F });
5950
+ return i({ AsyncStorage: c, fetch: Z, eventSource: F });
5905
5951
  }, u.default = W, Object.defineProperty(u, "__esModule", { value: !0 });
5906
5952
  });
5907
5953
  })(Dt, Dt.exports);
5908
- var Ra = Dt.exports, Za = {
5954
+ var Ra = Dt.exports, Na = {
5909
5955
  NOT_INITIALIZED: "FeatureFlag not initialized. Call init() first."
5910
- }, Tt = "business", de, Na = (de = class {
5956
+ }, Ut = "business", de, Za = (de = class {
5911
5957
  constructor() {
5912
- Ne(this, "flagsmithClient", null);
5913
- Ne(this, "userContext", null);
5958
+ Ze(this, "flagsmithClient", null);
5959
+ Ze(this, "userContext", null);
5914
5960
  }
5915
5961
  static getInstance() {
5916
5962
  return de.instance || (de.instance = new de()), de.instance;
5917
5963
  }
5918
5964
  ensureInitialized() {
5919
5965
  if (!this.flagsmithClient)
5920
- throw new Error(Za.NOT_INITIALIZED);
5966
+ throw new Error(Na.NOT_INITIALIZED);
5921
5967
  }
5922
5968
  async init(A, u = []) {
5923
5969
  if (!this.flagsmithClient)
5924
5970
  try {
5925
5971
  this.flagsmithClient = Ra.createFlagsmithInstance();
5926
- const c = u.reduce((r, m) => (r[m.feature.name] = m, r), {});
5972
+ const c = u.reduce((n, m) => (n[m.feature.name] = m, n), {});
5927
5973
  await this.flagsmithClient.init({
5928
5974
  environmentID: A.apiKey,
5929
5975
  api: (A == null ? void 0 : A.url) ?? "https://feature-flag-proxy.feedme.farm/api/v1/",
@@ -5954,14 +6000,14 @@ var Ra = Dt.exports, Za = {
5954
6000
  this.ensureInitialized();
5955
6001
  const A = this.flagsmithClient.getAllFlags();
5956
6002
  return Object.entries(A).map(([u, c]) => {
5957
- var r;
6003
+ var n;
5958
6004
  return {
5959
6005
  feature: {
5960
6006
  name: u,
5961
6007
  id: (c == null ? void 0 : c.id) ?? 0
5962
6008
  },
5963
6009
  enabled: c.enabled,
5964
- value: ((r = c.value) == null ? void 0 : r.toString()) ?? null
6010
+ value: ((n = c.value) == null ? void 0 : n.toString()) ?? null
5965
6011
  };
5966
6012
  });
5967
6013
  }
@@ -5971,10 +6017,10 @@ var Ra = Dt.exports, Za = {
5971
6017
  if (c == null)
5972
6018
  return null;
5973
6019
  try {
5974
- const r = c.toString();
5975
- return u ? u(r) : typeof {} == "number" ? isNaN(Number(r)) ? null : Number(r) : typeof {} == "boolean" ? r.toLowerCase() === "true" : r;
5976
- } catch (r) {
5977
- return console.error("Error transforming flag value:", r), null;
6020
+ const n = c.toString();
6021
+ return u ? u(n) : typeof {} == "number" ? isNaN(Number(n)) ? null : Number(n) : typeof {} == "boolean" ? n.toLowerCase() === "true" : n;
6022
+ } catch (n) {
6023
+ return console.error("Error transforming flag value:", n), null;
5978
6024
  }
5979
6025
  }
5980
6026
  getFlag(A) {
@@ -5991,11 +6037,11 @@ var Ra = Dt.exports, Za = {
5991
6037
  value: u.toString()
5992
6038
  };
5993
6039
  }
5994
- async getUserFlagValue(A, u, c = null, r) {
6040
+ async getUserFlagValue(A, u, c = null, n) {
5995
6041
  var y;
5996
6042
  const m = this.userContext;
5997
6043
  try {
5998
- return await this.setUser(A), this.getFlagValue(u, r) ?? c;
6044
+ return await this.setUser(A), this.getFlagValue(u, n) ?? c;
5999
6045
  } catch (h) {
6000
6046
  return console.error(`Error getting user flag value for ${u}:`, h), c;
6001
6047
  } finally {
@@ -6009,7 +6055,7 @@ var Ra = Dt.exports, Za = {
6009
6055
  reset() {
6010
6056
  this.flagsmithClient = null, this.userContext = null;
6011
6057
  }
6012
- }, Ne(de, "instance"), de), za = Na.getInstance(), Ie = ve(!1), Ue = ve([]), Ye = ve(null);
6058
+ }, Ze(de, "instance"), de), za = Za.getInstance(), Ie = ve(!1), Ue = ve([]), Ye = ve(null);
6013
6059
  function Ua(e = za) {
6014
6060
  const A = () => Ie.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), u = async (w, P = []) => {
6015
6061
  if (Ie.value) {
@@ -6028,7 +6074,7 @@ function Ua(e = za) {
6028
6074
  } catch (P) {
6029
6075
  console.error("Failed to set user:", P), Ye.value = P;
6030
6076
  }
6031
- }, r = async (w) => c(`${Tt}-${w}`), m = (w, P, I = null) => {
6077
+ }, n = async (w) => c(`${Ut}-${w}`), m = (w, P, I = null) => {
6032
6078
  if (!A()) return I;
6033
6079
  try {
6034
6080
  return e.getFlagValue(w, P) ?? I;
@@ -6049,7 +6095,7 @@ function Ua(e = za) {
6049
6095
  } catch (z) {
6050
6096
  return console.error(`Error getting user flag value for ${P}:`, z), I;
6051
6097
  }
6052
- }, E = async (w, P, I = null, H) => h(`${Tt}-${w}`, P, I, H), Y = () => {
6098
+ }, E = async (w, P, I = null, H) => h(`${Ut}-${w}`, P, I, H), Y = () => {
6053
6099
  try {
6054
6100
  e.reset();
6055
6101
  } catch (w) {
@@ -6064,7 +6110,7 @@ function Ua(e = za) {
6064
6110
  error: vt(Ye),
6065
6111
  init: u,
6066
6112
  setUser: c,
6067
- setBusiness: r,
6113
+ setBusiness: n,
6068
6114
  getFlagValue: m,
6069
6115
  getFlag: y,
6070
6116
  getUserFlagValue: h,
@@ -6077,23 +6123,23 @@ const to = /* @__PURE__ */ xe({
6077
6123
  __name: "App",
6078
6124
  setup(e) {
6079
6125
  const A = Yt(), { init: u } = Wa();
6080
- return Lt(async () => {
6126
+ return kt(async () => {
6081
6127
  A.registerSidebarComponent(Ia), await u({
6082
6128
  apiKey: A.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
6083
6129
  });
6084
- }), (c, r) => {
6130
+ }), (c, n) => {
6085
6131
  const m = Gt("RouterView");
6086
6132
  return Ve(), ke(m);
6087
6133
  };
6088
6134
  }
6089
6135
  }), so = () => {
6090
- const e = [Qr, Er, hr, Sr], A = new Set(e.flatMap((u) => Object.keys(u)));
6136
+ const e = [In, xn, Bn, kn], A = new Set(e.flatMap((u) => Object.keys(u)));
6091
6137
  return Array.from(A).reduce(
6092
6138
  (u, c) => {
6093
- const r = c;
6139
+ const n = c;
6094
6140
  return u[c] = e.reduce((m, y) => ({
6095
6141
  ...m,
6096
- ...y[r] || {}
6142
+ ...y[n] || {}
6097
6143
  }), {}), u;
6098
6144
  },
6099
6145
  {}
@@ -6110,8 +6156,8 @@ export {
6110
6156
  We as d,
6111
6157
  ea as e,
6112
6158
  to as f,
6113
- On as g,
6114
- Fn as h,
6159
+ Or as g,
6160
+ Fr as h,
6115
6161
  so as i,
6116
6162
  t as l,
6117
6163
  $a as m,