@feedmepos/mf-hrm-portal 2.2.0 → 2.2.1-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 (42) hide show
  1. package/dist/{ApprovalCodeList-S4hLycQ7.js → ApprovalCodeList-DZajn7xx.js} +5 -5
  2. package/dist/AuditLogList-CpKIq8I0.js +1611 -0
  3. package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-Db5yMCst.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-DCfvikJB.js} +10 -10
  4. package/dist/{EmployeeList-DVK6TFh7.js → EmployeeList-DDuxDdlJ.js} +10 -9
  5. package/dist/{GrantUserList-gcgVZRFe.js → GrantUserList-735upmIE.js} +6 -6
  6. package/dist/{Main-Bjo-Zb4r.js → Main-CHHR0r5b.js} +5 -5
  7. package/dist/{Main-CCIwJYOT.js → Main-DyZ6dJ2d.js} +8 -8
  8. package/dist/{Main-Dtw5H3tG.js → Main-tQ6MrkkP.js} +11 -11
  9. package/dist/{PermissionSetList-BfCrgZQi.js → PermissionSetList-ZxLNYPEB.js} +19 -19
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DH_L0NJq.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-MoFevdmL.js} +540 -540
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-pRHy5bGs.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js} +1 -1
  12. package/dist/{RoleList-Du18kaOT.js → RoleList-BZbEGpCi.js} +9 -9
  13. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
  14. package/dist/{TeamMemberList-2vosaS6u.js → TeamMemberList-B58boeR9.js} +25 -24
  15. package/dist/{TimesheetList-CbVxR3Nh.js → TimesheetList-DMnNVVlB.js} +7 -7
  16. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Gu52_TaA.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Ch8Ng6wi.js} +3 -3
  17. package/dist/{app-JkrwYC8k.js → app-CtuaUGnw.js} +904 -597
  18. package/dist/app.js +1 -1
  19. package/dist/{approval-code-C-7Qjk5q.js → approval-code-Q4666xp5.js} +1 -1
  20. package/dist/{dayjs.min-Ds1lSsW9.js → dayjs.min-9pRWRTS9.js} +1 -1
  21. package/dist/{employee-NVbuYwqa.js → employee-JmfN-rQF.js} +4 -4
  22. package/dist/{grant-user-B09JP3Fr.js → grant-user-CQZaTzVt.js} +1 -1
  23. package/dist/{iteration-BAS0Wr1D.js → iteration-CkzTvtOv.js} +1 -1
  24. package/dist/{lodash-CSqbTmkq.js → lodash-BNBzabCH.js} +1 -1
  25. package/dist/{restaurant-DSckEY5G.js → restaurant-YOVMuuFY.js} +2 -2
  26. package/dist/{role-B-btt9cX.js → role-R_9sO2QD.js} +2 -2
  27. package/dist/{rule-CW-i9AQB.js → rule-D1pKbnKR.js} +3 -3
  28. package/dist/src/api/audit-log/index.d.ts +6 -0
  29. package/dist/src/types/audit-log.d.ts +1 -1
  30. package/dist/src/views/audit-log/event-line.d.ts +13 -0
  31. package/dist/src/views/audit-log/locales/index.d.ts +296 -0
  32. package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
  33. package/dist/src/views/team/locales/index.d.ts +4 -0
  34. package/dist/style.css +1 -1
  35. package/dist/tsconfig.app.tsbuildinfo +1 -1
  36. package/dist/{useAppStore-0rmhkdGc.js → useAppStore-DNTlIeMv.js} +1 -1
  37. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  38. package/dist/{useLoading-kc23X-H9.js → useLoading-BH02lYns.js} +1 -1
  39. package/dist/{useReportPermissions-Bar0VbuP.js → useReportPermissions-ByxRc3kz.js} +3 -3
  40. package/package.json +2 -2
  41. package/dist/AuditLogList-B0qIy_XA.js +0 -1149
  42. package/dist/useDebounce-CWb5QR9G.js +0 -28
@@ -1,11 +1,11 @@
1
1
  var Rn = Object.defineProperty;
2
2
  var Xn = (e, t, s) => t in e ? Rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
3
  var xt = (e, t, s) => Xn(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { isRef as Qn, ref as Qe, shallowRef as kn, watchEffect as ir, computed as Os, h as Us, defineComponent as it, createBlock as Ut, renderSlot as cr, createCommentVNode as Tn, unref as ze, openBlock as ct, createElementBlock as lr, createElementVNode as Ze, toDisplayString as Ws, watch as Nn, nextTick as Sn, onMounted as ur, onBeforeUnmount as Zn, normalizeStyle as zn, resolveComponent as Fs, withCtx as Un, createVNode as Wn, defineAsyncComponent as Ln, readonly as vs } from "vue";
4
+ import { isRef as Qn, ref as Qe, shallowRef as kn, watchEffect as ir, computed as Os, h as zs, defineComponent as it, createBlock as zt, renderSlot as cr, createCommentVNode as Tn, unref as ze, openBlock as ct, createElementBlock as lr, createElementVNode as Ue, toDisplayString as Ws, watch as Sn, nextTick as Nn, onMounted as ur, onBeforeUnmount as Zn, normalizeStyle as Un, resolveComponent as Fs, withCtx as zn, createVNode as Wn, defineAsyncComponent as Ln, readonly as vs } from "vue";
5
5
  import { useBreakpoints as Kn } from "@feedmepos/ui-library";
6
6
  import { useRoute as Jn, useRouter as _n } from "vue-router";
7
7
  import { useCoreStore as Ar, useI18n as dr } from "@feedmepos/mf-common";
8
- var o = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(o || {}), d = /* @__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.crm_marketingMaterial = "business::crm::marketingMaterial", 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.hrm_approvalCode = "business::hrm::approvalCode", 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.kiosk_deviceManagement = "business::kiosk::deviceManagement", e.kiosk_deviceBinding = "business::kiosk::deviceBinding", 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.operation_orderSetting = "business::operation::orderSetting", e.media_assets = "business::media::assets", e))(d || {}), ee = /* @__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))(ee || {}), mr = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(mr || {});
8
+ var o = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(o || {}), d = /* @__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.crm_marketingMaterial = "business::crm::marketingMaterial", 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.hrm_approvalCode = "business::hrm::approvalCode", 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.kiosk_deviceManagement = "business::kiosk::deviceManagement", e.kiosk_deviceBinding = "business::kiosk::deviceBinding", e.eInvoice_management = "business::eInvoice::management", e.eInvoice_integration = "business::eInvoice::integration", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessOsDashboard = "business::report::accessOsDashboard", 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.operation_orderSetting = "business::operation::orderSetting", e.media_assets = "business::media::assets", e))(d || {}), ee = /* @__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))(ee || {}), mr = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(mr || {});
9
9
  const v = {
10
10
  general: "General",
11
11
  inventory: "Inventory",
@@ -21,7 +21,7 @@ const v = {
21
21
  miniProgram: "Mini Program",
22
22
  media: "Media"
23
23
  }, $n = "access-denied";
24
- var S;
24
+ var N;
25
25
  (function(e) {
26
26
  function t(n) {
27
27
  }
@@ -55,8 +55,8 @@ var S;
55
55
  return n.map((c) => typeof c == "string" ? `'${c}'` : c).join(a);
56
56
  }
57
57
  e.joinValues = r;
58
- })(S || (S = {}));
59
- const x = S.arrayToEnum([
58
+ })(N || (N = {}));
59
+ const x = N.arrayToEnum([
60
60
  "string",
61
61
  "nan",
62
62
  "number",
@@ -96,7 +96,7 @@ const x = S.arrayToEnum([
96
96
  default:
97
97
  return x.unknown;
98
98
  }
99
- }, C = S.arrayToEnum([
99
+ }, C = N.arrayToEnum([
100
100
  "invalid_type",
101
101
  "invalid_literal",
102
102
  "custom",
@@ -169,7 +169,7 @@ class qe extends Error {
169
169
  }
170
170
  }
171
171
  qe.create = (e) => new qe(e);
172
- const Bt = (e, t) => {
172
+ const wt = (e, t) => {
173
173
  let s;
174
174
  switch (e.code) {
175
175
  case C.invalid_type:
@@ -179,16 +179,16 @@ const Bt = (e, t) => {
179
179
  s = `Invalid literal value, expected ${JSON.stringify(e.expected, qs)}`;
180
180
  break;
181
181
  case C.unrecognized_keys:
182
- s = `Unrecognized key(s) in object: ${S.joinValues(e.keys, ", ")}`;
182
+ s = `Unrecognized key(s) in object: ${N.joinValues(e.keys, ", ")}`;
183
183
  break;
184
184
  case C.invalid_union:
185
185
  s = "Invalid input";
186
186
  break;
187
187
  case C.invalid_union_discriminator:
188
- s = `Invalid discriminator value. Expected ${S.joinValues(e.options)}`;
188
+ s = `Invalid discriminator value. Expected ${N.joinValues(e.options)}`;
189
189
  break;
190
190
  case C.invalid_enum_value:
191
- s = `Invalid enum value. Expected ${S.joinValues(e.options)}, received '${e.received}'`;
191
+ s = `Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;
192
192
  break;
193
193
  case C.invalid_arguments:
194
194
  s = "Invalid function arguments";
@@ -200,7 +200,7 @@ const Bt = (e, t) => {
200
200
  s = "Invalid date";
201
201
  break;
202
202
  case C.invalid_string:
203
- typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` : S.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
203
+ typeof e.validation == "object" ? "startsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? s = `Invalid input: must start with "${e.validation.endsWith}"` : N.assertNever(e.validation) : e.validation !== "regex" ? s = `Invalid ${e.validation}` : s = "Invalid";
204
204
  break;
205
205
  case C.too_small:
206
206
  e.type === "array" ? s = `Array must contain ${e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` : e.type === "string" ? s = `String must contain ${e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` : e.type === "number" ? s = `Number must be greater than ${e.inclusive ? "or equal to " : ""}${e.minimum}` : e.type === "date" ? s = `Date must be greater than ${e.inclusive ? "or equal to " : ""}${new Date(e.minimum)}` : s = "Invalid input";
@@ -218,11 +218,11 @@ const Bt = (e, t) => {
218
218
  s = `Number must be a multiple of ${e.multipleOf}`;
219
219
  break;
220
220
  default:
221
- s = t.defaultError, S.assertNever(e);
221
+ s = t.defaultError, N.assertNever(e);
222
222
  }
223
223
  return { message: s };
224
224
  };
225
- let gr = Bt;
225
+ let gr = wt;
226
226
  function ta(e) {
227
227
  gr = e;
228
228
  }
@@ -244,7 +244,7 @@ const Ot = (e) => {
244
244
  message: n.message || l
245
245
  };
246
246
  }, sa = [];
247
- function Y(e, t) {
247
+ function P(e, t) {
248
248
  const s = Ot({
249
249
  issueData: t,
250
250
  data: e.data,
@@ -253,7 +253,7 @@ function Y(e, t) {
253
253
  e.common.contextualErrorMap,
254
254
  e.schemaErrorMap,
255
255
  Vt(),
256
- Bt
256
+ wt
257
257
  ].filter((r) => !!r)
258
258
  });
259
259
  e.common.issues.push(s);
@@ -299,12 +299,12 @@ class ae {
299
299
  }
300
300
  const H = Object.freeze({
301
301
  status: "aborted"
302
- }), ra = (e) => ({ status: "dirty", value: e }), oe = (e) => ({ status: "valid", value: e }), Bs = (e) => e.status === "aborted", ws = (e) => e.status === "dirty", Ft = (e) => e.status === "valid", Ms = (e) => typeof Promise !== void 0 && e instanceof Promise, qs = (e, t) => typeof t == "bigint" ? t.toString() : t;
302
+ }), ra = (e) => ({ status: "dirty", value: e }), oe = (e) => ({ status: "valid", value: e }), ws = (e) => e.status === "aborted", Bs = (e) => e.status === "dirty", Ft = (e) => e.status === "valid", Ms = (e) => typeof Promise !== void 0 && e instanceof Promise, qs = (e, t) => typeof t == "bigint" ? t.toString() : t;
303
303
  var T;
304
304
  (function(e) {
305
305
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
306
306
  })(T || (T = {}));
307
- class Ye {
307
+ class Pe {
308
308
  constructor(t, s, r, n) {
309
309
  this.parent = t, this.data = s, this._path = r, this._key = n;
310
310
  }
@@ -437,19 +437,19 @@ class X {
437
437
  return Ee.create(this);
438
438
  }
439
439
  nullable() {
440
- return Ke.create(this);
440
+ return Je.create(this);
441
441
  }
442
442
  nullish() {
443
443
  return this.optional().nullable();
444
444
  }
445
445
  array() {
446
- return Ge.create(this);
446
+ return Ye.create(this);
447
447
  }
448
448
  promise() {
449
449
  return ot.create(this);
450
450
  }
451
451
  or(t) {
452
- return wt.create([this, t]);
452
+ return Bt.create([this, t]);
453
453
  }
454
454
  and(t) {
455
455
  return Mt.create(this, t);
@@ -498,7 +498,7 @@ class ke extends X {
498
498
  _parse(t) {
499
499
  if (this._getType(t) !== x.string) {
500
500
  const a = this._getOrReturnCtx(t);
501
- return Y(
501
+ return P(
502
502
  a,
503
503
  {
504
504
  code: C.invalid_type,
@@ -512,7 +512,7 @@ class ke extends X {
512
512
  let n;
513
513
  for (const a of this._def.checks)
514
514
  if (a.kind === "min")
515
- t.data.length < a.value && (n = this._getOrReturnCtx(t, n), Y(n, {
515
+ t.data.length < a.value && (n = this._getOrReturnCtx(t, n), P(n, {
516
516
  code: C.too_small,
517
517
  minimum: a.value,
518
518
  type: "string",
@@ -520,7 +520,7 @@ class ke extends X {
520
520
  message: a.message
521
521
  }), r.dirty());
522
522
  else if (a.kind === "max")
523
- t.data.length > a.value && (n = this._getOrReturnCtx(t, n), Y(n, {
523
+ t.data.length > a.value && (n = this._getOrReturnCtx(t, n), P(n, {
524
524
  code: C.too_big,
525
525
  maximum: a.value,
526
526
  type: "string",
@@ -528,19 +528,19 @@ class ke extends X {
528
528
  message: a.message
529
529
  }), r.dirty());
530
530
  else if (a.kind === "email")
531
- oa.test(t.data) || (n = this._getOrReturnCtx(t, n), Y(n, {
531
+ oa.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
532
532
  validation: "email",
533
533
  code: C.invalid_string,
534
534
  message: a.message
535
535
  }), r.dirty());
536
536
  else if (a.kind === "uuid")
537
- aa.test(t.data) || (n = this._getOrReturnCtx(t, n), Y(n, {
537
+ aa.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
538
538
  validation: "uuid",
539
539
  code: C.invalid_string,
540
540
  message: a.message
541
541
  }), r.dirty());
542
542
  else if (a.kind === "cuid")
543
- na.test(t.data) || (n = this._getOrReturnCtx(t, n), Y(n, {
543
+ na.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
544
544
  validation: "cuid",
545
545
  code: C.invalid_string,
546
546
  message: a.message
@@ -549,25 +549,25 @@ class ke extends X {
549
549
  try {
550
550
  new URL(t.data);
551
551
  } catch {
552
- n = this._getOrReturnCtx(t, n), Y(n, {
552
+ n = this._getOrReturnCtx(t, n), P(n, {
553
553
  validation: "url",
554
554
  code: C.invalid_string,
555
555
  message: a.message
556
556
  }), r.dirty();
557
557
  }
558
- else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), Y(n, {
558
+ else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), P(n, {
559
559
  validation: "regex",
560
560
  code: C.invalid_string,
561
561
  message: a.message
562
- }), r.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n), Y(n, {
562
+ }), r.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n), P(n, {
563
563
  code: C.invalid_string,
564
564
  validation: { startsWith: a.value },
565
565
  message: a.message
566
- }), r.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n), Y(n, {
566
+ }), r.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n), P(n, {
567
567
  code: C.invalid_string,
568
568
  validation: { endsWith: a.value },
569
569
  message: a.message
570
- }), r.dirty()) : S.assertNever(a);
570
+ }), r.dirty()) : N.assertNever(a);
571
571
  return { status: r.value, value: t.data };
572
572
  }
573
573
  _addCheck(t) {
@@ -660,14 +660,14 @@ function ia(e, t) {
660
660
  const s = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, n = s > r ? s : r, a = parseInt(e.toFixed(n).replace(".", "")), c = parseInt(t.toFixed(n).replace(".", ""));
661
661
  return a % c / Math.pow(10, n);
662
662
  }
663
- class Ue extends X {
663
+ class We extends X {
664
664
  constructor() {
665
665
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
666
666
  }
667
667
  _parse(t) {
668
668
  if (this._getType(t) !== x.number) {
669
669
  const a = this._getOrReturnCtx(t);
670
- return Y(a, {
670
+ return P(a, {
671
671
  code: C.invalid_type,
672
672
  expected: x.number,
673
673
  received: a.parsedType
@@ -676,28 +676,28 @@ class Ue extends X {
676
676
  let r;
677
677
  const n = new ae();
678
678
  for (const a of this._def.checks)
679
- a.kind === "int" ? S.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), Y(r, {
679
+ a.kind === "int" ? N.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), P(r, {
680
680
  code: C.invalid_type,
681
681
  expected: "integer",
682
682
  received: "float",
683
683
  message: a.message
684
- }), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r), Y(r, {
684
+ }), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r), P(r, {
685
685
  code: C.too_small,
686
686
  minimum: a.value,
687
687
  type: "number",
688
688
  inclusive: a.inclusive,
689
689
  message: a.message
690
- }), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r), Y(r, {
690
+ }), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r), P(r, {
691
691
  code: C.too_big,
692
692
  maximum: a.value,
693
693
  type: "number",
694
694
  inclusive: a.inclusive,
695
695
  message: a.message
696
- }), n.dirty()) : a.kind === "multipleOf" ? ia(t.data, a.value) !== 0 && (r = this._getOrReturnCtx(t, r), Y(r, {
696
+ }), n.dirty()) : a.kind === "multipleOf" ? ia(t.data, a.value) !== 0 && (r = this._getOrReturnCtx(t, r), P(r, {
697
697
  code: C.not_multiple_of,
698
698
  multipleOf: a.value,
699
699
  message: a.message
700
- }), n.dirty()) : S.assertNever(a);
700
+ }), n.dirty()) : N.assertNever(a);
701
701
  return { status: n.value, value: t.data };
702
702
  }
703
703
  gte(t, s) {
@@ -713,7 +713,7 @@ class Ue extends X {
713
713
  return this.setLimit("max", t, !1, T.toString(s));
714
714
  }
715
715
  setLimit(t, s, r, n) {
716
- return new Ue({
716
+ return new We({
717
717
  ...this._def,
718
718
  checks: [
719
719
  ...this._def.checks,
@@ -727,7 +727,7 @@ class Ue extends X {
727
727
  });
728
728
  }
729
729
  _addCheck(t) {
730
- return new Ue({
730
+ return new We({
731
731
  ...this._def,
732
732
  checks: [...this._def.checks, t]
733
733
  });
@@ -793,7 +793,7 @@ class Ue extends X {
793
793
  return !!this._def.checks.find((t) => t.kind === "int");
794
794
  }
795
795
  }
796
- Ue.create = (e) => new Ue({
796
+ We.create = (e) => new We({
797
797
  checks: [],
798
798
  typeName: I.ZodNumber,
799
799
  ...Q(e)
@@ -802,7 +802,7 @@ class qt extends X {
802
802
  _parse(t) {
803
803
  if (this._getType(t) !== x.bigint) {
804
804
  const r = this._getOrReturnCtx(t);
805
- return Y(r, {
805
+ return P(r, {
806
806
  code: C.invalid_type,
807
807
  expected: x.bigint,
808
808
  received: r.parsedType
@@ -819,7 +819,7 @@ class It extends X {
819
819
  _parse(t) {
820
820
  if (this._getType(t) !== x.boolean) {
821
821
  const r = this._getOrReturnCtx(t);
822
- return Y(r, {
822
+ return P(r, {
823
823
  code: C.invalid_type,
824
824
  expected: x.boolean,
825
825
  received: r.parsedType
@@ -836,7 +836,7 @@ class nt extends X {
836
836
  _parse(t) {
837
837
  if (this._getType(t) !== x.date) {
838
838
  const a = this._getOrReturnCtx(t);
839
- return Y(a, {
839
+ return P(a, {
840
840
  code: C.invalid_type,
841
841
  expected: x.date,
842
842
  received: a.parsedType
@@ -844,26 +844,26 @@ class nt extends X {
844
844
  }
845
845
  if (isNaN(t.data.getTime())) {
846
846
  const a = this._getOrReturnCtx(t);
847
- return Y(a, {
847
+ return P(a, {
848
848
  code: C.invalid_date
849
849
  }), H;
850
850
  }
851
851
  const r = new ae();
852
852
  let n;
853
853
  for (const a of this._def.checks)
854
- a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n), Y(n, {
854
+ a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n), P(n, {
855
855
  code: C.too_small,
856
856
  message: a.message,
857
857
  inclusive: !0,
858
858
  minimum: a.value,
859
859
  type: "date"
860
- }), r.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n), Y(n, {
860
+ }), r.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n), P(n, {
861
861
  code: C.too_big,
862
862
  message: a.message,
863
863
  inclusive: !0,
864
864
  maximum: a.value,
865
865
  type: "date"
866
- }), r.dirty()) : S.assertNever(a);
866
+ }), r.dirty()) : N.assertNever(a);
867
867
  return {
868
868
  status: r.value,
869
869
  value: new Date(t.data.getTime())
@@ -911,7 +911,7 @@ class Ht extends X {
911
911
  _parse(t) {
912
912
  if (this._getType(t) !== x.undefined) {
913
913
  const r = this._getOrReturnCtx(t);
914
- return Y(r, {
914
+ return P(r, {
915
915
  code: C.invalid_type,
916
916
  expected: x.undefined,
917
917
  received: r.parsedType
@@ -928,7 +928,7 @@ class Rt extends X {
928
928
  _parse(t) {
929
929
  if (this._getType(t) !== x.null) {
930
930
  const r = this._getOrReturnCtx(t);
931
- return Y(r, {
931
+ return P(r, {
932
932
  code: C.invalid_type,
933
933
  expected: x.null,
934
934
  received: r.parsedType
@@ -968,7 +968,7 @@ Xe.create = (e) => new Xe({
968
968
  class Te extends X {
969
969
  _parse(t) {
970
970
  const s = this._getOrReturnCtx(t);
971
- return Y(s, {
971
+ return P(s, {
972
972
  code: C.invalid_type,
973
973
  expected: x.never,
974
974
  received: s.parsedType
@@ -983,7 +983,7 @@ class Xt extends X {
983
983
  _parse(t) {
984
984
  if (this._getType(t) !== x.undefined) {
985
985
  const r = this._getOrReturnCtx(t);
986
- return Y(r, {
986
+ return P(r, {
987
987
  code: C.invalid_type,
988
988
  expected: x.void,
989
989
  received: r.parsedType
@@ -996,43 +996,43 @@ Xt.create = (e) => new Xt({
996
996
  typeName: I.ZodVoid,
997
997
  ...Q(e)
998
998
  });
999
- class Ge extends X {
999
+ class Ye extends X {
1000
1000
  _parse(t) {
1001
1001
  const { ctx: s, status: r } = this._processInputParams(t), n = this._def;
1002
1002
  if (s.parsedType !== x.array)
1003
- return Y(s, {
1003
+ return P(s, {
1004
1004
  code: C.invalid_type,
1005
1005
  expected: x.array,
1006
1006
  received: s.parsedType
1007
1007
  }), H;
1008
- if (n.minLength !== null && s.data.length < n.minLength.value && (Y(s, {
1008
+ if (n.minLength !== null && s.data.length < n.minLength.value && (P(s, {
1009
1009
  code: C.too_small,
1010
1010
  minimum: n.minLength.value,
1011
1011
  type: "array",
1012
1012
  inclusive: !0,
1013
1013
  message: n.minLength.message
1014
- }), r.dirty()), n.maxLength !== null && s.data.length > n.maxLength.value && (Y(s, {
1014
+ }), r.dirty()), n.maxLength !== null && s.data.length > n.maxLength.value && (P(s, {
1015
1015
  code: C.too_big,
1016
1016
  maximum: n.maxLength.value,
1017
1017
  type: "array",
1018
1018
  inclusive: !0,
1019
1019
  message: n.maxLength.message
1020
1020
  }), r.dirty()), s.common.async)
1021
- return Promise.all(s.data.map((c, l) => n.type._parseAsync(new Ye(s, c, s.path, l)))).then((c) => ae.mergeArray(r, c));
1022
- const a = s.data.map((c, l) => n.type._parseSync(new Ye(s, c, s.path, l)));
1021
+ return Promise.all(s.data.map((c, l) => n.type._parseAsync(new Pe(s, c, s.path, l)))).then((c) => ae.mergeArray(r, c));
1022
+ const a = s.data.map((c, l) => n.type._parseSync(new Pe(s, c, s.path, l)));
1023
1023
  return ae.mergeArray(r, a);
1024
1024
  }
1025
1025
  get element() {
1026
1026
  return this._def.type;
1027
1027
  }
1028
1028
  min(t, s) {
1029
- return new Ge({
1029
+ return new Ye({
1030
1030
  ...this._def,
1031
1031
  minLength: { value: t, message: T.toString(s) }
1032
1032
  });
1033
1033
  }
1034
1034
  max(t, s) {
1035
- return new Ge({
1035
+ return new Ye({
1036
1036
  ...this._def,
1037
1037
  maxLength: { value: t, message: T.toString(s) }
1038
1038
  });
@@ -1044,7 +1044,7 @@ class Ge extends X {
1044
1044
  return this.min(1, t);
1045
1045
  }
1046
1046
  }
1047
- Ge.create = (e, t) => new Ge({
1047
+ Ye.create = (e, t) => new Ye({
1048
1048
  type: e,
1049
1049
  minLength: null,
1050
1050
  maxLength: null,
@@ -1076,7 +1076,7 @@ function rt(e) {
1076
1076
  ...e._def,
1077
1077
  shape: () => t
1078
1078
  });
1079
- } else return e instanceof Ge ? Ge.create(rt(e.element)) : e instanceof Ee ? Ee.create(rt(e.unwrap())) : e instanceof Ke ? Ke.create(rt(e.unwrap())) : e instanceof Pe ? Pe.create(e.items.map((t) => rt(t))) : e;
1079
+ } else return e instanceof Ye ? Ye.create(rt(e.element)) : e instanceof Ee ? Ee.create(rt(e.unwrap())) : e instanceof Je ? Je.create(rt(e.unwrap())) : e instanceof Ge ? Ge.create(e.items.map((t) => rt(t))) : e;
1080
1080
  }
1081
1081
  class J extends X {
1082
1082
  constructor() {
@@ -1085,13 +1085,13 @@ class J extends X {
1085
1085
  _getCached() {
1086
1086
  if (this._cached !== null)
1087
1087
  return this._cached;
1088
- const t = this._def.shape(), s = S.objectKeys(t);
1088
+ const t = this._def.shape(), s = N.objectKeys(t);
1089
1089
  return this._cached = { shape: t, keys: s };
1090
1090
  }
1091
1091
  _parse(t) {
1092
1092
  if (this._getType(t) !== x.object) {
1093
1093
  const h = this._getOrReturnCtx(t);
1094
- return Y(h, {
1094
+ return P(h, {
1095
1095
  code: C.invalid_type,
1096
1096
  expected: x.object,
1097
1097
  received: h.parsedType
@@ -1102,49 +1102,49 @@ class J extends X {
1102
1102
  c.includes(h) || l.push(h);
1103
1103
  const y = [];
1104
1104
  for (const h of c) {
1105
- const B = a[h], O = n.data[h];
1105
+ const w = a[h], O = n.data[h];
1106
1106
  y.push({
1107
1107
  key: { status: "valid", value: h },
1108
- value: B._parse(new Ye(n, O, n.path, h)),
1108
+ value: w._parse(new Pe(n, O, n.path, h)),
1109
1109
  alwaysSet: h in n.data
1110
1110
  });
1111
1111
  }
1112
1112
  if (this._def.catchall instanceof Te) {
1113
1113
  const h = this._def.unknownKeys;
1114
1114
  if (h === "passthrough")
1115
- for (const B of l)
1115
+ for (const w of l)
1116
1116
  y.push({
1117
- key: { status: "valid", value: B },
1118
- value: { status: "valid", value: n.data[B] }
1117
+ key: { status: "valid", value: w },
1118
+ value: { status: "valid", value: n.data[w] }
1119
1119
  });
1120
1120
  else if (h === "strict")
1121
- l.length > 0 && (Y(n, {
1121
+ l.length > 0 && (P(n, {
1122
1122
  code: C.unrecognized_keys,
1123
1123
  keys: l
1124
1124
  }), r.dirty());
1125
1125
  else if (h !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1126
1126
  } else {
1127
1127
  const h = this._def.catchall;
1128
- for (const B of l) {
1129
- const O = n.data[B];
1128
+ for (const w of l) {
1129
+ const O = n.data[w];
1130
1130
  y.push({
1131
- key: { status: "valid", value: B },
1131
+ key: { status: "valid", value: w },
1132
1132
  value: h._parse(
1133
- new Ye(n, O, n.path, B)
1133
+ new Pe(n, O, n.path, w)
1134
1134
  //, ctx.child(key), value, getParsedType(value)
1135
1135
  ),
1136
- alwaysSet: B in n.data
1136
+ alwaysSet: w in n.data
1137
1137
  });
1138
1138
  }
1139
1139
  }
1140
1140
  return n.common.async ? Promise.resolve().then(async () => {
1141
1141
  const h = [];
1142
- for (const B of y) {
1143
- const O = await B.key;
1142
+ for (const w of y) {
1143
+ const O = await w.key;
1144
1144
  h.push({
1145
1145
  key: O,
1146
- value: await B.value,
1147
- alwaysSet: B.alwaysSet
1146
+ value: await w.value,
1147
+ alwaysSet: w.alwaysSet
1148
1148
  });
1149
1149
  }
1150
1150
  return h;
@@ -1206,7 +1206,7 @@ class J extends X {
1206
1206
  }
1207
1207
  pick(t) {
1208
1208
  const s = {};
1209
- return S.objectKeys(t).map((r) => {
1209
+ return N.objectKeys(t).map((r) => {
1210
1210
  this.shape[r] && (s[r] = this.shape[r]);
1211
1211
  }), new J({
1212
1212
  ...this._def,
@@ -1215,8 +1215,8 @@ class J extends X {
1215
1215
  }
1216
1216
  omit(t) {
1217
1217
  const s = {};
1218
- return S.objectKeys(this.shape).map((r) => {
1219
- S.objectKeys(t).indexOf(r) === -1 && (s[r] = this.shape[r]);
1218
+ return N.objectKeys(this.shape).map((r) => {
1219
+ N.objectKeys(t).indexOf(r) === -1 && (s[r] = this.shape[r]);
1220
1220
  }), new J({
1221
1221
  ...this._def,
1222
1222
  shape: () => s
@@ -1228,8 +1228,8 @@ class J extends X {
1228
1228
  partial(t) {
1229
1229
  const s = {};
1230
1230
  if (t)
1231
- return S.objectKeys(this.shape).map((r) => {
1232
- S.objectKeys(t).indexOf(r) === -1 ? s[r] = this.shape[r] : s[r] = this.shape[r].optional();
1231
+ return N.objectKeys(this.shape).map((r) => {
1232
+ N.objectKeys(t).indexOf(r) === -1 ? s[r] = this.shape[r] : s[r] = this.shape[r].optional();
1233
1233
  }), new J({
1234
1234
  ...this._def,
1235
1235
  shape: () => s
@@ -1257,7 +1257,7 @@ class J extends X {
1257
1257
  });
1258
1258
  }
1259
1259
  keyof() {
1260
- return pr(S.objectKeys(this.shape));
1260
+ return pr(N.objectKeys(this.shape));
1261
1261
  }
1262
1262
  }
1263
1263
  J.create = (e, t) => new J({
@@ -1281,7 +1281,7 @@ J.lazycreate = (e, t) => new J({
1281
1281
  typeName: I.ZodObject,
1282
1282
  ...Q(t)
1283
1283
  });
1284
- class wt extends X {
1284
+ class Bt extends X {
1285
1285
  _parse(t) {
1286
1286
  const { ctx: s } = this._processInputParams(t), r = this._def.options;
1287
1287
  function n(a) {
@@ -1292,7 +1292,7 @@ class wt extends X {
1292
1292
  if (l.result.status === "dirty")
1293
1293
  return s.common.issues.push(...l.ctx.common.issues), l.result;
1294
1294
  const c = a.map((l) => new qe(l.ctx.common.issues));
1295
- return Y(s, {
1295
+ return P(s, {
1296
1296
  code: C.invalid_union,
1297
1297
  unionErrors: c
1298
1298
  }), H;
@@ -1327,19 +1327,19 @@ class wt extends X {
1327
1327
  issues: []
1328
1328
  },
1329
1329
  parent: null
1330
- }, B = y._parseSync({
1330
+ }, w = y._parseSync({
1331
1331
  data: s.data,
1332
1332
  path: s.path,
1333
1333
  parent: h
1334
1334
  });
1335
- if (B.status === "valid")
1336
- return B;
1337
- B.status === "dirty" && !a && (a = { result: B, ctx: h }), h.common.issues.length && c.push(h.common.issues);
1335
+ if (w.status === "valid")
1336
+ return w;
1337
+ w.status === "dirty" && !a && (a = { result: w, ctx: h }), h.common.issues.length && c.push(h.common.issues);
1338
1338
  }
1339
1339
  if (a)
1340
1340
  return s.common.issues.push(...a.ctx.common.issues), a.result;
1341
1341
  const l = c.map((y) => new qe(y));
1342
- return Y(s, {
1342
+ return P(s, {
1343
1343
  code: C.invalid_union,
1344
1344
  unionErrors: l
1345
1345
  }), H;
@@ -1349,7 +1349,7 @@ class wt extends X {
1349
1349
  return this._def.options;
1350
1350
  }
1351
1351
  }
1352
- wt.create = (e, t) => new wt({
1352
+ Bt.create = (e, t) => new Bt({
1353
1353
  options: e,
1354
1354
  typeName: I.ZodUnion,
1355
1355
  ...Q(t)
@@ -1358,7 +1358,7 @@ class Wt extends X {
1358
1358
  _parse(t) {
1359
1359
  const { ctx: s } = this._processInputParams(t);
1360
1360
  if (s.parsedType !== x.object)
1361
- return Y(s, {
1361
+ return P(s, {
1362
1362
  code: C.invalid_type,
1363
1363
  expected: x.object,
1364
1364
  received: s.parsedType
@@ -1372,7 +1372,7 @@ class Wt extends X {
1372
1372
  data: s.data,
1373
1373
  path: s.path,
1374
1374
  parent: s
1375
- }) : (Y(s, {
1375
+ }) : (P(s, {
1376
1376
  code: C.invalid_union_discriminator,
1377
1377
  options: this.validDiscriminatorValues,
1378
1378
  path: [r]
@@ -1420,7 +1420,7 @@ function Cs(e, t) {
1420
1420
  if (e === t)
1421
1421
  return { valid: !0, data: e };
1422
1422
  if (s === x.object && r === x.object) {
1423
- const n = S.objectKeys(t), a = S.objectKeys(e).filter((l) => n.indexOf(l) !== -1), c = { ...e, ...t };
1423
+ const n = N.objectKeys(t), a = N.objectKeys(e).filter((l) => n.indexOf(l) !== -1), c = { ...e, ...t };
1424
1424
  for (const l of a) {
1425
1425
  const y = Cs(e[l], t[l]);
1426
1426
  if (!y.valid)
@@ -1444,10 +1444,10 @@ function Cs(e, t) {
1444
1444
  class Mt extends X {
1445
1445
  _parse(t) {
1446
1446
  const { status: s, ctx: r } = this._processInputParams(t), n = (a, c) => {
1447
- if (Bs(a) || Bs(c))
1447
+ if (ws(a) || ws(c))
1448
1448
  return H;
1449
1449
  const l = Cs(a.value, c.value);
1450
- return l.valid ? ((ws(a) || ws(c)) && s.dirty(), { status: s.value, value: l.data }) : (Y(r, {
1450
+ return l.valid ? ((Bs(a) || Bs(c)) && s.dirty(), { status: s.value, value: l.data }) : (P(r, {
1451
1451
  code: C.invalid_intersection_types
1452
1452
  }), H);
1453
1453
  };
@@ -1479,23 +1479,23 @@ Mt.create = (e, t, s) => new Mt({
1479
1479
  typeName: I.ZodIntersection,
1480
1480
  ...Q(s)
1481
1481
  });
1482
- class Pe extends X {
1482
+ class Ge extends X {
1483
1483
  _parse(t) {
1484
1484
  const { status: s, ctx: r } = this._processInputParams(t);
1485
1485
  if (r.parsedType !== x.array)
1486
- return Y(r, {
1486
+ return P(r, {
1487
1487
  code: C.invalid_type,
1488
1488
  expected: x.array,
1489
1489
  received: r.parsedType
1490
1490
  }), H;
1491
1491
  if (r.data.length < this._def.items.length)
1492
- return Y(r, {
1492
+ return P(r, {
1493
1493
  code: C.too_small,
1494
1494
  minimum: this._def.items.length,
1495
1495
  inclusive: !0,
1496
1496
  type: "array"
1497
1497
  }), H;
1498
- !this._def.rest && r.data.length > this._def.items.length && (Y(r, {
1498
+ !this._def.rest && r.data.length > this._def.items.length && (P(r, {
1499
1499
  code: C.too_big,
1500
1500
  maximum: this._def.items.length,
1501
1501
  inclusive: !0,
@@ -1503,7 +1503,7 @@ class Pe extends X {
1503
1503
  }), s.dirty());
1504
1504
  const a = r.data.map((c, l) => {
1505
1505
  const y = this._def.items[l] || this._def.rest;
1506
- return y ? y._parse(new Ye(r, c, r.path, l)) : null;
1506
+ return y ? y._parse(new Pe(r, c, r.path, l)) : null;
1507
1507
  }).filter((c) => !!c);
1508
1508
  return r.common.async ? Promise.all(a).then((c) => ae.mergeArray(s, c)) : ae.mergeArray(s, a);
1509
1509
  }
@@ -1511,13 +1511,13 @@ class Pe extends X {
1511
1511
  return this._def.items;
1512
1512
  }
1513
1513
  rest(t) {
1514
- return new Pe({
1514
+ return new Ge({
1515
1515
  ...this._def,
1516
1516
  rest: t
1517
1517
  });
1518
1518
  }
1519
1519
  }
1520
- Pe.create = (e, t) => new Pe({
1520
+ Ge.create = (e, t) => new Ge({
1521
1521
  items: e,
1522
1522
  typeName: I.ZodTuple,
1523
1523
  rest: null,
@@ -1533,7 +1533,7 @@ class Ct extends X {
1533
1533
  _parse(t) {
1534
1534
  const { status: s, ctx: r } = this._processInputParams(t);
1535
1535
  if (r.parsedType !== x.object)
1536
- return Y(r, {
1536
+ return P(r, {
1537
1537
  code: C.invalid_type,
1538
1538
  expected: x.object,
1539
1539
  received: r.parsedType
@@ -1541,8 +1541,8 @@ class Ct extends X {
1541
1541
  const n = [], a = this._def.keyType, c = this._def.valueType;
1542
1542
  for (const l in r.data)
1543
1543
  n.push({
1544
- key: a._parse(new Ye(r, l, r.path, l)),
1545
- value: c._parse(new Ye(r, r.data[l], r.path, l))
1544
+ key: a._parse(new Pe(r, l, r.path, l)),
1545
+ value: c._parse(new Pe(r, r.data[l], r.path, l))
1546
1546
  });
1547
1547
  return r.common.async ? ae.mergeObjectAsync(s, n) : ae.mergeObjectSync(s, n);
1548
1548
  }
@@ -1567,33 +1567,33 @@ class kt extends X {
1567
1567
  _parse(t) {
1568
1568
  const { status: s, ctx: r } = this._processInputParams(t);
1569
1569
  if (r.parsedType !== x.map)
1570
- return Y(r, {
1570
+ return P(r, {
1571
1571
  code: C.invalid_type,
1572
1572
  expected: x.map,
1573
1573
  received: r.parsedType
1574
1574
  }), H;
1575
1575
  const n = this._def.keyType, a = this._def.valueType, c = [...r.data.entries()].map(([l, y], h) => ({
1576
- key: n._parse(new Ye(r, l, r.path, [h, "key"])),
1577
- value: a._parse(new Ye(r, y, r.path, [h, "value"]))
1576
+ key: n._parse(new Pe(r, l, r.path, [h, "key"])),
1577
+ value: a._parse(new Pe(r, y, r.path, [h, "value"]))
1578
1578
  }));
1579
1579
  if (r.common.async) {
1580
1580
  const l = /* @__PURE__ */ new Map();
1581
1581
  return Promise.resolve().then(async () => {
1582
1582
  for (const y of c) {
1583
- const h = await y.key, B = await y.value;
1584
- if (h.status === "aborted" || B.status === "aborted")
1583
+ const h = await y.key, w = await y.value;
1584
+ if (h.status === "aborted" || w.status === "aborted")
1585
1585
  return H;
1586
- (h.status === "dirty" || B.status === "dirty") && s.dirty(), l.set(h.value, B.value);
1586
+ (h.status === "dirty" || w.status === "dirty") && s.dirty(), l.set(h.value, w.value);
1587
1587
  }
1588
1588
  return { status: s.value, value: l };
1589
1589
  });
1590
1590
  } else {
1591
1591
  const l = /* @__PURE__ */ new Map();
1592
1592
  for (const y of c) {
1593
- const h = y.key, B = y.value;
1594
- if (h.status === "aborted" || B.status === "aborted")
1593
+ const h = y.key, w = y.value;
1594
+ if (h.status === "aborted" || w.status === "aborted")
1595
1595
  return H;
1596
- (h.status === "dirty" || B.status === "dirty") && s.dirty(), l.set(h.value, B.value);
1596
+ (h.status === "dirty" || w.status === "dirty") && s.dirty(), l.set(h.value, w.value);
1597
1597
  }
1598
1598
  return { status: s.value, value: l };
1599
1599
  }
@@ -1605,23 +1605,23 @@ kt.create = (e, t, s) => new kt({
1605
1605
  typeName: I.ZodMap,
1606
1606
  ...Q(s)
1607
1607
  });
1608
- class We extends X {
1608
+ class Le extends X {
1609
1609
  _parse(t) {
1610
1610
  const { status: s, ctx: r } = this._processInputParams(t);
1611
1611
  if (r.parsedType !== x.set)
1612
- return Y(r, {
1612
+ return P(r, {
1613
1613
  code: C.invalid_type,
1614
1614
  expected: x.set,
1615
1615
  received: r.parsedType
1616
1616
  }), H;
1617
1617
  const n = this._def;
1618
- n.minSize !== null && r.data.size < n.minSize.value && (Y(r, {
1618
+ n.minSize !== null && r.data.size < n.minSize.value && (P(r, {
1619
1619
  code: C.too_small,
1620
1620
  minimum: n.minSize.value,
1621
1621
  type: "set",
1622
1622
  inclusive: !0,
1623
1623
  message: n.minSize.message
1624
- }), s.dirty()), n.maxSize !== null && r.data.size > n.maxSize.value && (Y(r, {
1624
+ }), s.dirty()), n.maxSize !== null && r.data.size > n.maxSize.value && (P(r, {
1625
1625
  code: C.too_big,
1626
1626
  maximum: n.maxSize.value,
1627
1627
  type: "set",
@@ -1631,24 +1631,24 @@ class We extends X {
1631
1631
  const a = this._def.valueType;
1632
1632
  function c(y) {
1633
1633
  const h = /* @__PURE__ */ new Set();
1634
- for (const B of y) {
1635
- if (B.status === "aborted")
1634
+ for (const w of y) {
1635
+ if (w.status === "aborted")
1636
1636
  return H;
1637
- B.status === "dirty" && s.dirty(), h.add(B.value);
1637
+ w.status === "dirty" && s.dirty(), h.add(w.value);
1638
1638
  }
1639
1639
  return { status: s.value, value: h };
1640
1640
  }
1641
- const l = [...r.data.values()].map((y, h) => a._parse(new Ye(r, y, r.path, h)));
1641
+ const l = [...r.data.values()].map((y, h) => a._parse(new Pe(r, y, r.path, h)));
1642
1642
  return r.common.async ? Promise.all(l).then((y) => c(y)) : c(l);
1643
1643
  }
1644
1644
  min(t, s) {
1645
- return new We({
1645
+ return new Le({
1646
1646
  ...this._def,
1647
1647
  minSize: { value: t, message: T.toString(s) }
1648
1648
  });
1649
1649
  }
1650
1650
  max(t, s) {
1651
- return new We({
1651
+ return new Le({
1652
1652
  ...this._def,
1653
1653
  maxSize: { value: t, message: T.toString(s) }
1654
1654
  });
@@ -1660,21 +1660,21 @@ class We extends X {
1660
1660
  return this.min(1, t);
1661
1661
  }
1662
1662
  }
1663
- We.create = (e, t) => new We({
1663
+ Le.create = (e, t) => new Le({
1664
1664
  valueType: e,
1665
1665
  minSize: null,
1666
1666
  maxSize: null,
1667
1667
  typeName: I.ZodSet,
1668
1668
  ...Q(t)
1669
1669
  });
1670
- class Le extends X {
1670
+ class Ke extends X {
1671
1671
  constructor() {
1672
1672
  super(...arguments), this.validate = this.implement;
1673
1673
  }
1674
1674
  _parse(t) {
1675
1675
  const { ctx: s } = this._processInputParams(t);
1676
1676
  if (s.parsedType !== x.function)
1677
- return Y(s, {
1677
+ return P(s, {
1678
1678
  code: C.invalid_type,
1679
1679
  expected: x.function,
1680
1680
  received: s.parsedType
@@ -1687,7 +1687,7 @@ class Le extends X {
1687
1687
  s.common.contextualErrorMap,
1688
1688
  s.schemaErrorMap,
1689
1689
  Vt(),
1690
- Bt
1690
+ wt
1691
1691
  ].filter((h) => !!h),
1692
1692
  issueData: {
1693
1693
  code: C.invalid_arguments,
@@ -1703,7 +1703,7 @@ class Le extends X {
1703
1703
  s.common.contextualErrorMap,
1704
1704
  s.schemaErrorMap,
1705
1705
  Vt(),
1706
- Bt
1706
+ wt
1707
1707
  ].filter((h) => !!h),
1708
1708
  issueData: {
1709
1709
  code: C.invalid_return_type,
@@ -1713,20 +1713,20 @@ class Le extends X {
1713
1713
  }
1714
1714
  const a = { errorMap: s.common.contextualErrorMap }, c = s.data;
1715
1715
  return this._def.returns instanceof ot ? oe(async (...l) => {
1716
- const y = new qe([]), h = await this._def.args.parseAsync(l, a).catch((N) => {
1717
- throw y.addIssue(r(l, N)), y;
1718
- }), B = await c(...h);
1719
- return await this._def.returns._def.type.parseAsync(B, a).catch((N) => {
1720
- throw y.addIssue(n(B, N)), y;
1716
+ const y = new qe([]), h = await this._def.args.parseAsync(l, a).catch((S) => {
1717
+ throw y.addIssue(r(l, S)), y;
1718
+ }), w = await c(...h);
1719
+ return await this._def.returns._def.type.parseAsync(w, a).catch((S) => {
1720
+ throw y.addIssue(n(w, S)), y;
1721
1721
  });
1722
1722
  }) : oe((...l) => {
1723
1723
  const y = this._def.args.safeParse(l, a);
1724
1724
  if (!y.success)
1725
1725
  throw new qe([r(l, y.error)]);
1726
- const h = c(...y.data), B = this._def.returns.safeParse(h, a);
1727
- if (!B.success)
1728
- throw new qe([n(h, B.error)]);
1729
- return B.data;
1726
+ const h = c(...y.data), w = this._def.returns.safeParse(h, a);
1727
+ if (!w.success)
1728
+ throw new qe([n(h, w.error)]);
1729
+ return w.data;
1730
1730
  });
1731
1731
  }
1732
1732
  parameters() {
@@ -1736,13 +1736,13 @@ class Le extends X {
1736
1736
  return this._def.returns;
1737
1737
  }
1738
1738
  args(...t) {
1739
- return new Le({
1739
+ return new Ke({
1740
1740
  ...this._def,
1741
- args: Pe.create(t).rest(Xe.create())
1741
+ args: Ge.create(t).rest(Xe.create())
1742
1742
  });
1743
1743
  }
1744
1744
  returns(t) {
1745
- return new Le({
1745
+ return new Ke({
1746
1746
  ...this._def,
1747
1747
  returns: t
1748
1748
  });
@@ -1754,8 +1754,8 @@ class Le extends X {
1754
1754
  return this.parse(t);
1755
1755
  }
1756
1756
  }
1757
- Le.create = (e, t, s) => new Le({
1758
- args: e ? e.rest(Xe.create()) : Pe.create([]).rest(Xe.create()),
1757
+ Ke.create = (e, t, s) => new Ke({
1758
+ args: e ? e.rest(Xe.create()) : Ge.create([]).rest(Xe.create()),
1759
1759
  returns: t || Xe.create(),
1760
1760
  typeName: I.ZodFunction,
1761
1761
  ...Q(s)
@@ -1774,11 +1774,11 @@ Tt.create = (e, t) => new Tt({
1774
1774
  typeName: I.ZodLazy,
1775
1775
  ...Q(t)
1776
1776
  });
1777
- class Nt extends X {
1777
+ class St extends X {
1778
1778
  _parse(t) {
1779
1779
  if (t.data !== this._def.value) {
1780
1780
  const s = this._getOrReturnCtx(t);
1781
- return Y(s, {
1781
+ return P(s, {
1782
1782
  code: C.invalid_literal,
1783
1783
  expected: this._def.value
1784
1784
  }), H;
@@ -1789,7 +1789,7 @@ class Nt extends X {
1789
1789
  return this._def.value;
1790
1790
  }
1791
1791
  }
1792
- Nt.create = (e, t) => new Nt({
1792
+ St.create = (e, t) => new St({
1793
1793
  value: e,
1794
1794
  typeName: I.ZodLiteral,
1795
1795
  ...Q(t)
@@ -1805,15 +1805,15 @@ class Lt extends X {
1805
1805
  _parse(t) {
1806
1806
  if (typeof t.data != "string") {
1807
1807
  const s = this._getOrReturnCtx(t), r = this._def.values;
1808
- return Y(s, {
1809
- expected: S.joinValues(r),
1808
+ return P(s, {
1809
+ expected: N.joinValues(r),
1810
1810
  received: s.parsedType,
1811
1811
  code: C.invalid_type
1812
1812
  }), H;
1813
1813
  }
1814
1814
  if (this._def.values.indexOf(t.data) === -1) {
1815
1815
  const s = this._getOrReturnCtx(t), r = this._def.values;
1816
- return Y(s, {
1816
+ return P(s, {
1817
1817
  received: s.data,
1818
1818
  code: C.invalid_enum_value,
1819
1819
  options: r
@@ -1844,20 +1844,20 @@ class Lt extends X {
1844
1844
  }
1845
1845
  }
1846
1846
  Lt.create = pr;
1847
- class St extends X {
1847
+ class Nt extends X {
1848
1848
  _parse(t) {
1849
- const s = S.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t);
1849
+ const s = N.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t);
1850
1850
  if (r.parsedType !== x.string && r.parsedType !== x.number) {
1851
- const n = S.objectValues(s);
1852
- return Y(r, {
1853
- expected: S.joinValues(n),
1851
+ const n = N.objectValues(s);
1852
+ return P(r, {
1853
+ expected: N.joinValues(n),
1854
1854
  received: r.parsedType,
1855
1855
  code: C.invalid_type
1856
1856
  }), H;
1857
1857
  }
1858
1858
  if (s.indexOf(t.data) === -1) {
1859
- const n = S.objectValues(s);
1860
- return Y(r, {
1859
+ const n = N.objectValues(s);
1860
+ return P(r, {
1861
1861
  received: r.data,
1862
1862
  code: C.invalid_enum_value,
1863
1863
  options: n
@@ -1869,7 +1869,7 @@ class St extends X {
1869
1869
  return this._def.values;
1870
1870
  }
1871
1871
  }
1872
- St.create = (e, t) => new St({
1872
+ Nt.create = (e, t) => new Nt({
1873
1873
  values: e,
1874
1874
  typeName: I.ZodNativeEnum,
1875
1875
  ...Q(t)
@@ -1878,7 +1878,7 @@ class ot extends X {
1878
1878
  _parse(t) {
1879
1879
  const { ctx: s } = this._processInputParams(t);
1880
1880
  if (s.parsedType !== x.promise && s.common.async === !1)
1881
- return Y(s, {
1881
+ return P(s, {
1882
1882
  code: C.invalid_type,
1883
1883
  expected: x.promise,
1884
1884
  received: s.parsedType
@@ -1915,7 +1915,7 @@ class Ve extends X {
1915
1915
  }
1916
1916
  const a = {
1917
1917
  addIssue: (c) => {
1918
- Y(r, c), c.fatal ? s.abort() : s.dirty();
1918
+ P(r, c), c.fatal ? s.abort() : s.dirty();
1919
1919
  },
1920
1920
  get path() {
1921
1921
  return r.path;
@@ -1955,7 +1955,7 @@ class Ve extends X {
1955
1955
  return { status: s.value, value: l };
1956
1956
  } else
1957
1957
  return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((c) => Ft(c) ? Promise.resolve(n.transform(c.value, a)).then((l) => ({ status: s.value, value: l })) : c);
1958
- S.assertNever(n);
1958
+ N.assertNever(n);
1959
1959
  }
1960
1960
  }
1961
1961
  Ve.create = (e, t, s) => new Ve({
@@ -1983,7 +1983,7 @@ Ee.create = (e, t) => new Ee({
1983
1983
  typeName: I.ZodOptional,
1984
1984
  ...Q(t)
1985
1985
  });
1986
- class Ke extends X {
1986
+ class Je extends X {
1987
1987
  _parse(t) {
1988
1988
  return this._getType(t) === x.null ? oe(null) : this._def.innerType._parse(t);
1989
1989
  }
@@ -1991,7 +1991,7 @@ class Ke extends X {
1991
1991
  return this._def.innerType;
1992
1992
  }
1993
1993
  }
1994
- Ke.create = (e, t) => new Ke({
1994
+ Je.create = (e, t) => new Je({
1995
1995
  innerType: e,
1996
1996
  typeName: I.ZodNullable,
1997
1997
  ...Q(t)
@@ -2019,7 +2019,7 @@ class Zt extends X {
2019
2019
  _parse(t) {
2020
2020
  if (this._getType(t) !== x.nan) {
2021
2021
  const r = this._getOrReturnCtx(t);
2022
- return Y(r, {
2022
+ return P(r, {
2023
2023
  code: C.invalid_type,
2024
2024
  expected: x.nan,
2025
2025
  received: r.parsedType
@@ -2046,26 +2046,26 @@ var I;
2046
2046
  })(I || (I = {}));
2047
2047
  const la = (e, t = {
2048
2048
  message: `Input not instance of ${e.name}`
2049
- }) => fr((s) => s instanceof e, t, !0), hr = ke.create, yr = Ue.create, ua = Zt.create, Aa = qt.create, br = It.create, da = nt.create, ma = Ht.create, ga = Rt.create, pa = at.create, fa = Xe.create, ha = Te.create, ya = Xt.create, ba = Ge.create, va = J.create, Ba = J.strictCreate, wa = wt.create, Ma = Wt.create, Ca = Mt.create, Da = Pe.create, xa = Ct.create, ja = kt.create, Ea = We.create, Ya = Le.create, Ga = Tt.create, Pa = Nt.create, Va = Lt.create, Oa = St.create, Fa = ot.create, Js = Ve.create, qa = Ee.create, Ia = Ke.create, Ha = Ve.createWithPreprocess, Ra = () => hr().optional(), Xa = () => yr().optional(), Qa = () => br().optional();
2049
+ }) => fr((s) => s instanceof e, t, !0), hr = ke.create, yr = We.create, ua = Zt.create, Aa = qt.create, br = It.create, da = nt.create, ma = Ht.create, ga = Rt.create, pa = at.create, fa = Xe.create, ha = Te.create, ya = Xt.create, ba = Ye.create, va = J.create, wa = J.strictCreate, Ba = Bt.create, Ma = Wt.create, Ca = Mt.create, Da = Ge.create, xa = Ct.create, ja = kt.create, Ea = Le.create, Pa = Ke.create, Ya = Tt.create, Ga = St.create, Va = Lt.create, Oa = Nt.create, Fa = ot.create, Js = Ve.create, qa = Ee.create, Ia = Je.create, Ha = Ve.createWithPreprocess, Ra = () => hr().optional(), Xa = () => yr().optional(), Qa = () => br().optional();
2050
2050
  var ft = /* @__PURE__ */ Object.freeze({
2051
2051
  __proto__: null,
2052
2052
  getParsedType: Re,
2053
2053
  ZodParsedType: x,
2054
2054
  makeIssue: Ot,
2055
2055
  EMPTY_PATH: sa,
2056
- addIssueToContext: Y,
2056
+ addIssueToContext: P,
2057
2057
  ParseStatus: ae,
2058
2058
  INVALID: H,
2059
2059
  DIRTY: ra,
2060
2060
  OK: oe,
2061
- isAborted: Bs,
2062
- isDirty: ws,
2061
+ isAborted: ws,
2062
+ isDirty: Bs,
2063
2063
  isValid: Ft,
2064
2064
  isAsync: Ms,
2065
2065
  jsonStringifyReplacer: qs,
2066
2066
  ZodType: X,
2067
2067
  ZodString: ke,
2068
- ZodNumber: Ue,
2068
+ ZodNumber: We,
2069
2069
  ZodBigInt: qt,
2070
2070
  ZodBoolean: It,
2071
2071
  ZodDate: nt,
@@ -2075,28 +2075,28 @@ var ft = /* @__PURE__ */ Object.freeze({
2075
2075
  ZodUnknown: Xe,
2076
2076
  ZodNever: Te,
2077
2077
  ZodVoid: Xt,
2078
- ZodArray: Ge,
2078
+ ZodArray: Ye,
2079
2079
  get objectUtil() {
2080
2080
  return Qt;
2081
2081
  },
2082
2082
  ZodObject: J,
2083
- ZodUnion: wt,
2083
+ ZodUnion: Bt,
2084
2084
  ZodDiscriminatedUnion: Wt,
2085
2085
  ZodIntersection: Mt,
2086
- ZodTuple: Pe,
2086
+ ZodTuple: Ge,
2087
2087
  ZodRecord: Ct,
2088
2088
  ZodMap: kt,
2089
- ZodSet: We,
2090
- ZodFunction: Le,
2089
+ ZodSet: Le,
2090
+ ZodFunction: Ke,
2091
2091
  ZodLazy: Tt,
2092
- ZodLiteral: Nt,
2092
+ ZodLiteral: St,
2093
2093
  ZodEnum: Lt,
2094
- ZodNativeEnum: St,
2094
+ ZodNativeEnum: Nt,
2095
2095
  ZodPromise: ot,
2096
2096
  ZodEffects: Ve,
2097
2097
  ZodTransformer: Ve,
2098
2098
  ZodOptional: Ee,
2099
- ZodNullable: Ke,
2099
+ ZodNullable: Je,
2100
2100
  ZodDefault: Is,
2101
2101
  ZodNaN: Zt,
2102
2102
  custom: fr,
@@ -2114,11 +2114,11 @@ var ft = /* @__PURE__ */ Object.freeze({
2114
2114
  discriminatedUnion: Ma,
2115
2115
  effect: Js,
2116
2116
  enum: Va,
2117
- function: Ya,
2117
+ function: Pa,
2118
2118
  instanceof: la,
2119
2119
  intersection: Ca,
2120
- lazy: Ga,
2121
- literal: Pa,
2120
+ lazy: Ya,
2121
+ literal: Ga,
2122
2122
  map: ja,
2123
2123
  nan: ua,
2124
2124
  nativeEnum: Oa,
@@ -2135,18 +2135,18 @@ var ft = /* @__PURE__ */ Object.freeze({
2135
2135
  promise: Fa,
2136
2136
  record: xa,
2137
2137
  set: Ea,
2138
- strictObject: Ba,
2138
+ strictObject: wa,
2139
2139
  string: hr,
2140
2140
  transformer: Js,
2141
2141
  tuple: Da,
2142
2142
  undefined: ma,
2143
- union: wa,
2143
+ union: Ba,
2144
2144
  unknown: fa,
2145
2145
  void: ya,
2146
2146
  ZodIssueCode: C,
2147
2147
  quotelessJson: ea,
2148
2148
  ZodError: qe,
2149
- defaultErrorMap: Bt,
2149
+ defaultErrorMap: wt,
2150
2150
  setErrorMap: ta,
2151
2151
  getErrorMap: Vt
2152
2152
  });
@@ -2201,7 +2201,7 @@ function Ds(e, t) {
2201
2201
  }
2202
2202
  function xs(e, t, s, r) {
2203
2203
  if (Hs(e))
2204
- return Na(e.$form, t, s) ? (r[e.$form] = t, !0) : !1;
2204
+ return Sa(e.$form, t, s) ? (r[e.$form] = t, !0) : !1;
2205
2205
  if (Array.isArray(e) || Array.isArray(t))
2206
2206
  return !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : e.every((n, a) => xs(n, t[a], s, r));
2207
2207
  if (typeof e == "object" && e !== null) {
@@ -2218,11 +2218,11 @@ function xs(e, t, s, r) {
2218
2218
  }
2219
2219
  return e === t;
2220
2220
  }
2221
- function Na(e, t, s) {
2221
+ function Sa(e, t, s) {
2222
2222
  const r = s.fields.find((n) => n.key === e);
2223
2223
  return (r == null ? void 0 : r.kind) === "number" ? typeof t == "number" : (r == null ? void 0 : r.kind) === "switch" ? typeof t == "boolean" : typeof t == "number" || typeof t == "string" || typeof t == "boolean";
2224
2224
  }
2225
- function Sa(e) {
2225
+ function Na(e) {
2226
2226
  return "fields" in e;
2227
2227
  }
2228
2228
  function Za(e, t) {
@@ -2231,17 +2231,17 @@ function Za(e, t) {
2231
2231
  const r = t[s.field];
2232
2232
  return "eq" in s ? r === s.eq : s.in ? s.in.includes(r) : !0;
2233
2233
  }
2234
- function za(e, t) {
2234
+ function Ua(e, t) {
2235
2235
  return e.fields.filter((s) => Za(s, t));
2236
2236
  }
2237
2237
  function El(e, t) {
2238
2238
  const s = { ...t };
2239
- for (const r of za(e, s))
2239
+ for (const r of Ua(e, s))
2240
2240
  (s[r.key] === void 0 || s[r.key] === null) && r.default !== void 0 && (s[r.key] = r.default);
2241
2241
  return s;
2242
2242
  }
2243
- function Ua(e) {
2244
- if (Sa(e.form)) {
2243
+ function za(e) {
2244
+ if (Na(e.form)) {
2245
2245
  const s = new Set(e.form.fields.map((r) => r.key));
2246
2246
  for (const r of e.form.fields)
2247
2247
  if (r.visibleWhen && !s.has(r.visibleWhen.field))
@@ -2267,7 +2267,7 @@ function Wa(e) {
2267
2267
  const t = e == null ? void 0 : e.shape;
2268
2268
  return t ? Object.keys(t) : void 0;
2269
2269
  }
2270
- const Br = /* @__PURE__ */ new Map(), Gt = [], La = /* @__PURE__ */ new Map(), _s = "prefix:";
2270
+ const wr = /* @__PURE__ */ new Map(), Yt = [], La = /* @__PURE__ */ new Map(), _s = "prefix:";
2271
2271
  function Ka(e) {
2272
2272
  for (const [t, s] of Object.entries(e))
2273
2273
  Ja([t], s);
@@ -2278,10 +2278,10 @@ function Ja(e, t) {
2278
2278
  for (const r of s) La.set(r.builderKey, r);
2279
2279
  for (const r of e)
2280
2280
  if (r.startsWith(_s)) {
2281
- const n = r.slice(_s.length), a = Gt.findIndex((c) => c.prefix === n);
2282
- a >= 0 ? Gt[a] = { prefix: n, builders: s } : Gt.push({ prefix: n, builders: s });
2281
+ const n = r.slice(_s.length), a = Yt.findIndex((c) => c.prefix === n);
2282
+ a >= 0 ? Yt[a] = { prefix: n, builders: s } : Yt.push({ prefix: n, builders: s });
2283
2283
  } else
2284
- Br.set(r, s);
2284
+ wr.set(r, s);
2285
2285
  }
2286
2286
  function _a(e, t) {
2287
2287
  const s = /* @__PURE__ */ new Map();
@@ -2300,10 +2300,10 @@ function _a(e, t) {
2300
2300
  }
2301
2301
  }
2302
2302
  function $a(e) {
2303
- const t = Br.get(e);
2303
+ const t = wr.get(e);
2304
2304
  if (t) return t;
2305
2305
  let s;
2306
- for (const r of Gt)
2306
+ for (const r of Yt)
2307
2307
  e.startsWith(r.prefix) && (!s || r.prefix.length > s.prefix.length) && (s = r);
2308
2308
  return (s == null ? void 0 : s.builders) ?? [];
2309
2309
  }
@@ -2438,7 +2438,7 @@ const Ao = {
2438
2438
  }
2439
2439
  }
2440
2440
  ]
2441
- }, mo = Ua({
2441
+ }, mo = za({
2442
2442
  version: 1,
2443
2443
  builderKey: io,
2444
2444
  contextSchema: to,
@@ -2471,21 +2471,22 @@ const Ao = {
2471
2471
  // onto the returned builder, so these survive untouched.
2472
2472
  appliesToActions: co,
2473
2473
  summarizeForm: uo
2474
- }), tt = [mo], go = {
2475
- [`prefix:${eo}`]: tt,
2476
- [d.report_reports_allDefaultReports]: tt,
2477
- [d.report_reports_allCustomReports]: tt,
2474
+ }), Ze = [mo], go = {
2475
+ [`prefix:${eo}`]: Ze,
2476
+ [d.report_reports_allDefaultReports]: Ze,
2477
+ [d.report_reports_allCustomReports]: Ze,
2478
2478
  // Overview / Insight are standalone page-access subjects with their own
2479
2479
  // independent window each. They are NOT category covers and have no cover
2480
2480
  // relationship, so CASL evaluates them in isolation — a per-report window on
2481
2481
  // `reports::<key>` can never bleed into these page checks.
2482
- [d.report_accessOverview]: tt,
2483
- [d.report_accessInsight]: tt,
2482
+ [d.report_accessOsDashboard]: Ze,
2483
+ [d.report_accessOverview]: Ze,
2484
+ [d.report_accessInsight]: Ze,
2484
2485
  // Flat POS report subject used by the restaurant role editor.
2485
- report: tt
2486
+ report: Ze
2486
2487
  };
2487
2488
  Ka(go);
2488
- function Yl(e, t) {
2489
+ function Pl(e, t) {
2489
2490
  if (!e) return {};
2490
2491
  const s = new Set(t.ownedFields);
2491
2492
  return Object.fromEntries(Object.entries(e).filter(([r]) => s.has(r)));
@@ -2495,7 +2496,7 @@ function po(e, t) {
2495
2496
  const s = new Set(t.flatMap((r) => r.ownedFields));
2496
2497
  return Object.fromEntries(Object.entries(e).filter(([r]) => !s.has(r)));
2497
2498
  }
2498
- function Gl(e, t) {
2499
+ function Yl(e, t) {
2499
2500
  return Object.assign(
2500
2501
  po(
2501
2502
  e,
@@ -2504,7 +2505,7 @@ function Gl(e, t) {
2504
2505
  ...t.map((s) => s.builder.toCondition(s.formValue))
2505
2506
  );
2506
2507
  }
2507
- const wr = {
2508
+ const Br = {
2508
2509
  mode: "Access window",
2509
2510
  unrestricted: "No restriction",
2510
2511
  since: "Since date",
@@ -2520,11 +2521,11 @@ const wr = {
2520
2521
  inheritedLastMonths: "last {amount} months",
2521
2522
  inheritedLastYears: "last {amount} years"
2522
2523
  }, fo = {
2523
- reportAccessWindow: wr
2524
+ reportAccessWindow: Br
2524
2525
  }, ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2525
2526
  __proto__: null,
2526
2527
  default: fo,
2527
- reportAccessWindow: wr
2528
+ reportAccessWindow: Br
2528
2529
  }, Symbol.toStringTag, { value: "Module" })), Mr = {
2529
2530
  mode: "访问期限",
2530
2531
  unrestricted: "无限制",
@@ -2563,7 +2564,7 @@ const wr = {
2563
2564
  inheritedLastYears: "最近 {amount} 年"
2564
2565
  }, vo = {
2565
2566
  reportAccessWindow: Cr
2566
- }, Bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2567
+ }, wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2567
2568
  __proto__: null,
2568
2569
  default: vo,
2569
2570
  reportAccessWindow: Cr
@@ -2582,16 +2583,16 @@ const wr = {
2582
2583
  inheritedLastDays: "ล่าสุด {amount} วัน",
2583
2584
  inheritedLastMonths: "ล่าสุด {amount} เดือน",
2584
2585
  inheritedLastYears: "ล่าสุด {amount} ปี"
2585
- }, wo = {
2586
+ }, Bo = {
2586
2587
  reportAccessWindow: Dr
2587
2588
  }, Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2588
2589
  __proto__: null,
2589
- default: wo,
2590
+ default: Bo,
2590
2591
  reportAccessWindow: Dr
2591
2592
  }, Symbol.toStringTag, { value: "Module" })), Co = {
2592
2593
  "en-US": { conditionBuilder: { ...ho } },
2593
2594
  "zh-CN": { conditionBuilder: { ...bo } },
2594
- "zh-Hant": { conditionBuilder: { ...Bo } },
2595
+ "zh-Hant": { conditionBuilder: { ...wo } },
2595
2596
  "th-TH": { conditionBuilder: { ...Mo } }
2596
2597
  }, xr = {
2597
2598
  predefinedRanges: {
@@ -2609,6 +2610,9 @@ const wr = {
2609
2610
  dateRange: {
2610
2611
  placeholder: "Select date range"
2611
2612
  },
2613
+ search: {
2614
+ placeholder: "Search user, event, or record"
2615
+ },
2612
2616
  user: {
2613
2617
  feedmeAdmin: "FeedMe Admin"
2614
2618
  },
@@ -2723,6 +2727,77 @@ const wr = {
2723
2727
  requestMethod: "Request Method",
2724
2728
  requestPath: "Request Path",
2725
2729
  requestBody: "Request Body"
2730
+ },
2731
+ operation: {
2732
+ toggle: "Toggle operations",
2733
+ rowHint: "Operation",
2734
+ unlabeled: "Operation",
2735
+ badge: "{count} ops",
2736
+ sheetHeader: "Operation Detail",
2737
+ entity: "Entity",
2738
+ duration: "Duration",
2739
+ durationValue: "{ms} ms",
2740
+ error: "Error",
2741
+ changes: "Changes",
2742
+ showData: "Show data",
2743
+ added: "Added",
2744
+ removed: "Removed",
2745
+ updated: "Updated",
2746
+ before: "Before",
2747
+ after: "After",
2748
+ noChanges: "No changes recorded for this operation.",
2749
+ wholeValue: "Value"
2750
+ },
2751
+ event: {
2752
+ sentence: {
2753
+ "audit-log": {
2754
+ view: "Viewed audit logs"
2755
+ },
2756
+ restaurant: {
2757
+ list: "Listed restaurants"
2758
+ },
2759
+ "permission-assignment": {
2760
+ manage: "Managed permission assignments",
2761
+ list: "Listed permission assignments",
2762
+ view: "Viewed permission assignment {id}"
2763
+ },
2764
+ "permission-set": {
2765
+ manage: "Managed permission sets",
2766
+ list: "Listed permission sets",
2767
+ view: "Viewed permission set {id}"
2768
+ },
2769
+ "portal-user": {
2770
+ list: "Listed team members",
2771
+ "list-page": "Listed team members",
2772
+ view: "Viewed team member {id}",
2773
+ create: "Added team member {name}",
2774
+ update: "Updated team member {name}",
2775
+ delete: "Removed team member {name}"
2776
+ },
2777
+ "pos-user": {
2778
+ list: "Listed employees",
2779
+ "list-page": "Listed employees",
2780
+ create: "Added employee {name}",
2781
+ "sync-meta": "Synced employee data",
2782
+ update: "Updated employee {id}",
2783
+ migrate: "Migrated employee {id}",
2784
+ "generate-passcode": "Generated employee passcode"
2785
+ },
2786
+ "pos-master-user": {
2787
+ create: "Added POS master employee {name}",
2788
+ update: "Updated POS master employee {name}",
2789
+ delete: "Removed POS master employee {name}"
2790
+ },
2791
+ "pos-role": {
2792
+ list: "Listed employee roles",
2793
+ create: "Added employee role {name}",
2794
+ update: "Updated employee role {name}"
2795
+ },
2796
+ timesheet: {
2797
+ view: "Viewed timesheets",
2798
+ update: "Updated timesheet"
2799
+ }
2800
+ }
2726
2801
  }
2727
2802
  }, Do = {
2728
2803
  date: xr,
@@ -2742,12 +2817,15 @@ const wr = {
2742
2817
  thisMonth: "เดือนนี้",
2743
2818
  lastMonth: "เดือนที่แล้ว"
2744
2819
  }
2745
- }, Yr = {
2820
+ }, Pr = {
2746
2821
  title: "ประวัติการใช้งาน",
2747
2822
  export: "ส่งออก",
2748
2823
  dateRange: {
2749
2824
  placeholder: "เลือกช่วงวันที่"
2750
2825
  },
2826
+ search: {
2827
+ placeholder: "ค้นหาผู้ใช้ เหตุการณ์ หรือรายการ"
2828
+ },
2751
2829
  user: {
2752
2830
  feedmeAdmin: "ผู้ดูแล FeedMe"
2753
2831
  },
@@ -2863,16 +2941,87 @@ const wr = {
2863
2941
  requestMethod: "วิธีการเข้าถึง",
2864
2942
  requestPath: "URL ที่เข้าถึง",
2865
2943
  requestBody: "เนื้อหาคำขอ"
2944
+ },
2945
+ operation: {
2946
+ toggle: "แสดง/ซ่อนการดำเนินการ",
2947
+ rowHint: "การดำเนินการ",
2948
+ unlabeled: "การดำเนินการ",
2949
+ badge: "{count} รายการ",
2950
+ sheetHeader: "รายละเอียดการดำเนินการ",
2951
+ entity: "ข้อมูลที่เกี่ยวข้อง",
2952
+ duration: "ระยะเวลา",
2953
+ durationValue: "{ms} มิลลิวินาที",
2954
+ error: "ข้อผิดพลาด",
2955
+ changes: "การเปลี่ยนแปลง",
2956
+ showData: "แสดงข้อมูล",
2957
+ added: "เพิ่ม",
2958
+ removed: "ลบ",
2959
+ updated: "อัปเดต",
2960
+ before: "ก่อนหน้า",
2961
+ after: "หลังจาก",
2962
+ noChanges: "ไม่มีการเปลี่ยนแปลงที่บันทึกไว้สำหรับการดำเนินการนี้",
2963
+ wholeValue: "ค่า"
2964
+ },
2965
+ event: {
2966
+ sentence: {
2967
+ "audit-log": {
2968
+ view: "ดูบันทึกการตรวจสอบ"
2969
+ },
2970
+ restaurant: {
2971
+ list: "ดูรายการร้านอาหาร"
2972
+ },
2973
+ "permission-assignment": {
2974
+ manage: "จัดการการกำหนดสิทธิ์",
2975
+ list: "ดูรายการการกำหนดสิทธิ์",
2976
+ view: "ดูการกำหนดสิทธิ์ {id}"
2977
+ },
2978
+ "permission-set": {
2979
+ manage: "จัดการกลุ่มสิทธิ์",
2980
+ list: "ดูรายการกลุ่มสิทธิ์",
2981
+ view: "ดูกลุ่มสิทธิ์ {id}"
2982
+ },
2983
+ "portal-user": {
2984
+ list: "ดูรายการสมาชิกทีม",
2985
+ "list-page": "ดูรายการสมาชิกทีม",
2986
+ view: "ดูสมาชิกทีม {id}",
2987
+ create: "เพิ่มสมาชิกทีม {name}",
2988
+ update: "อัปเดตสมาชิกทีม {name}",
2989
+ delete: "ลบสมาชิกทีม {name}"
2990
+ },
2991
+ "pos-user": {
2992
+ list: "ดูรายการพนักงาน",
2993
+ "list-page": "ดูรายการพนักงาน",
2994
+ create: "เพิ่มพนักงาน {name}",
2995
+ "sync-meta": "ซิงค์ข้อมูลพนักงาน",
2996
+ update: "อัปเดตพนักงาน {id}",
2997
+ migrate: "ย้ายพนักงาน {id}",
2998
+ "generate-passcode": "สร้างรหัสผ่านพนักงาน"
2999
+ },
3000
+ "pos-master-user": {
3001
+ create: "เพิ่มพนักงานหลัก POS {name}",
3002
+ update: "อัปเดตพนักงานหลัก POS {name}",
3003
+ delete: "ลบพนักงานหลัก POS {name}"
3004
+ },
3005
+ "pos-role": {
3006
+ list: "ดูรายการบทบาทพนักงาน",
3007
+ create: "เพิ่มบทบาทพนักงาน {name}",
3008
+ update: "อัปเดตบทบาทพนักงาน {name}"
3009
+ },
3010
+ timesheet: {
3011
+ view: "ดูใบบันทึกเวลา",
3012
+ update: "อัปเดตใบบันทึกเวลา"
3013
+ }
3014
+ }
2866
3015
  }
2867
3016
  }, jo = {
2868
3017
  date: Er,
2869
- auditLog: Yr
3018
+ auditLog: Pr
2870
3019
  }, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2871
3020
  __proto__: null,
2872
- auditLog: Yr,
3021
+ auditLog: Pr,
2873
3022
  date: Er,
2874
3023
  default: jo
2875
- }, Symbol.toStringTag, { value: "Module" })), Gr = {
3024
+ }, Symbol.toStringTag, { value: "Module" })), Yr = {
2876
3025
  predefinedRanges: {
2877
3026
  today: "今天",
2878
3027
  yesterday: "昨天",
@@ -2882,12 +3031,15 @@ const wr = {
2882
3031
  thisMonth: "本月",
2883
3032
  lastMonth: "上月"
2884
3033
  }
2885
- }, Pr = {
3034
+ }, Gr = {
2886
3035
  title: "审计日志",
2887
3036
  export: "导出",
2888
3037
  dateRange: {
2889
3038
  placeholder: "选择日期范围"
2890
3039
  },
3040
+ search: {
3041
+ placeholder: "搜索用户、事件或记录"
3042
+ },
2891
3043
  user: {
2892
3044
  feedmeAdmin: "FeedMe 管理员"
2893
3045
  },
@@ -3003,15 +3155,86 @@ const wr = {
3003
3155
  requestMethod: "请求方法",
3004
3156
  requestPath: "请求路径",
3005
3157
  requestBody: "请求内容"
3158
+ },
3159
+ operation: {
3160
+ toggle: "展开/收起操作",
3161
+ rowHint: "操作",
3162
+ unlabeled: "操作",
3163
+ badge: "{count} 项操作",
3164
+ sheetHeader: "操作详情",
3165
+ entity: "对象",
3166
+ duration: "耗时",
3167
+ durationValue: "{ms} 毫秒",
3168
+ error: "错误",
3169
+ changes: "变更内容",
3170
+ showData: "显示数据",
3171
+ added: "已添加",
3172
+ removed: "已移除",
3173
+ updated: "已更新",
3174
+ before: "变更前",
3175
+ after: "变更后",
3176
+ noChanges: "此操作未记录任何变更。",
3177
+ wholeValue: "值"
3178
+ },
3179
+ event: {
3180
+ sentence: {
3181
+ "audit-log": {
3182
+ view: "查看了审计日志"
3183
+ },
3184
+ restaurant: {
3185
+ list: "查看了餐厅列表"
3186
+ },
3187
+ "permission-assignment": {
3188
+ manage: "管理了权限分配",
3189
+ list: "查看了权限分配列表",
3190
+ view: "查看了权限分配 {id}"
3191
+ },
3192
+ "permission-set": {
3193
+ manage: "管理了权限集",
3194
+ list: "查看了权限集列表",
3195
+ view: "查看了权限集 {id}"
3196
+ },
3197
+ "portal-user": {
3198
+ list: "查看了团队成员列表",
3199
+ "list-page": "查看了团队成员列表",
3200
+ view: "查看了团队成员 {id}",
3201
+ create: "添加了团队成员 {name}",
3202
+ update: "更新了团队成员 {name}",
3203
+ delete: "移除了团队成员 {name}"
3204
+ },
3205
+ "pos-user": {
3206
+ list: "查看了员工列表",
3207
+ "list-page": "查看了员工列表",
3208
+ create: "添加了员工 {name}",
3209
+ "sync-meta": "同步了员工数据",
3210
+ update: "更新了员工 {id}",
3211
+ migrate: "迁移了员工 {id}",
3212
+ "generate-passcode": "生成了员工密码"
3213
+ },
3214
+ "pos-master-user": {
3215
+ create: "添加了 POS 主员工 {name}",
3216
+ update: "更新了 POS 主员工 {name}",
3217
+ delete: "移除了 POS 主员工 {name}"
3218
+ },
3219
+ "pos-role": {
3220
+ list: "查看了员工角色列表",
3221
+ create: "添加了员工角色 {name}",
3222
+ update: "更新了员工角色 {name}"
3223
+ },
3224
+ timesheet: {
3225
+ view: "查看了工时表",
3226
+ update: "更新了工时表"
3227
+ }
3228
+ }
3006
3229
  }
3007
- }, Yo = {
3008
- date: Gr,
3009
- auditLog: Pr
3010
- }, Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3230
+ }, Po = {
3231
+ date: Yr,
3232
+ auditLog: Gr
3233
+ }, Yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3011
3234
  __proto__: null,
3012
- auditLog: Pr,
3013
- date: Gr,
3014
- default: Yo
3235
+ auditLog: Gr,
3236
+ date: Yr,
3237
+ default: Po
3015
3238
  }, Symbol.toStringTag, { value: "Module" })), Vr = {
3016
3239
  predefinedRanges: {
3017
3240
  today: "今天",
@@ -3028,6 +3251,9 @@ const wr = {
3028
3251
  dateRange: {
3029
3252
  placeholder: "選擇日期範圍"
3030
3253
  },
3254
+ search: {
3255
+ placeholder: "搜尋使用者、事件或記錄"
3256
+ },
3031
3257
  user: {
3032
3258
  feedmeAdmin: "FeedMe 管理員"
3033
3259
  },
@@ -3143,18 +3369,89 @@ const wr = {
3143
3369
  requestMethod: "請求方法",
3144
3370
  requestPath: "請求路徑",
3145
3371
  requestBody: "請求內容"
3372
+ },
3373
+ operation: {
3374
+ toggle: "展開/收起操作",
3375
+ rowHint: "操作",
3376
+ unlabeled: "操作",
3377
+ badge: "{count} 項操作",
3378
+ sheetHeader: "操作詳情",
3379
+ entity: "對象",
3380
+ duration: "耗時",
3381
+ durationValue: "{ms} 毫秒",
3382
+ error: "錯誤",
3383
+ changes: "變更內容",
3384
+ showData: "顯示資料",
3385
+ added: "已新增",
3386
+ removed: "已移除",
3387
+ updated: "已更新",
3388
+ before: "變更前",
3389
+ after: "變更後",
3390
+ noChanges: "此操作未記錄任何變更。",
3391
+ wholeValue: "值"
3392
+ },
3393
+ event: {
3394
+ sentence: {
3395
+ "audit-log": {
3396
+ view: "查看了稽核紀錄"
3397
+ },
3398
+ restaurant: {
3399
+ list: "查看了餐廳列表"
3400
+ },
3401
+ "permission-assignment": {
3402
+ manage: "管理了權限指派",
3403
+ list: "查看了權限指派列表",
3404
+ view: "查看了權限指派 {id}"
3405
+ },
3406
+ "permission-set": {
3407
+ manage: "管理了權限集",
3408
+ list: "查看了權限集列表",
3409
+ view: "查看了權限集 {id}"
3410
+ },
3411
+ "portal-user": {
3412
+ list: "查看了團隊成員列表",
3413
+ "list-page": "查看了團隊成員列表",
3414
+ view: "查看了團隊成員 {id}",
3415
+ create: "新增了團隊成員 {name}",
3416
+ update: "更新了團隊成員 {name}",
3417
+ delete: "移除了團隊成員 {name}"
3418
+ },
3419
+ "pos-user": {
3420
+ list: "查看了員工列表",
3421
+ "list-page": "查看了員工列表",
3422
+ create: "新增了員工 {name}",
3423
+ "sync-meta": "同步了員工資料",
3424
+ update: "更新了員工 {id}",
3425
+ migrate: "移轉了員工 {id}",
3426
+ "generate-passcode": "產生了員工密碼"
3427
+ },
3428
+ "pos-master-user": {
3429
+ create: "新增了 POS 主員工 {name}",
3430
+ update: "更新了 POS 主員工 {name}",
3431
+ delete: "移除了 POS 主員工 {name}"
3432
+ },
3433
+ "pos-role": {
3434
+ list: "查看了員工角色列表",
3435
+ create: "新增了員工角色 {name}",
3436
+ update: "更新了員工角色 {name}"
3437
+ },
3438
+ timesheet: {
3439
+ view: "查看了工時表",
3440
+ update: "更新了工時表"
3441
+ }
3442
+ }
3146
3443
  }
3147
- }, Po = {
3444
+ }, Go = {
3148
3445
  date: Vr,
3149
3446
  auditLog: Or
3150
3447
  }, Vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3151
3448
  __proto__: null,
3152
3449
  auditLog: Or,
3153
3450
  date: Vr,
3154
- default: Po
3451
+ default: Go
3155
3452
  }, Symbol.toStringTag, { value: "Module" })), Oo = {
3156
3453
  "en-US": xo,
3157
- "zh-CN": Go,
3454
+ "zh-CN": Yo,
3158
3455
  "th-TH": Eo,
3159
3456
  "zh-Hant": Vo
3160
3457
  }, Fr = {
@@ -4222,6 +4519,7 @@ const wr = {
4222
4519
  "business::hrm::employee": "Employee Management",
4223
4520
  "business::hrm::auditLog": "Audit Log Management",
4224
4521
  "business::report::createReport": "Create Report",
4522
+ "business::report::accessOsDashboard": "Access FeedmeOS Dashboard",
4225
4523
  "business::report::accessOverview": "Access Overview Page",
4226
4524
  "business::report::accessInsight": "Access Insight Page",
4227
4525
  "business::report::accessSetting": "Access Setting Page",
@@ -4235,12 +4533,12 @@ const wr = {
4235
4533
  permissions: "Permissions"
4236
4534
  }
4237
4535
  }
4238
- }, No = {
4536
+ }, So = {
4239
4537
  team: Rr,
4240
4538
  permissionSet: Xr
4241
- }, So = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4539
+ }, No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4242
4540
  __proto__: null,
4243
- default: No,
4541
+ default: So,
4244
4542
  permissionSet: Xr,
4245
4543
  team: Rr
4246
4544
  }, Symbol.toStringTag, { value: "Module" })), Qr = {
@@ -4477,6 +4775,7 @@ const wr = {
4477
4775
  "business::hrm::employee": "จัดการพนักงาน",
4478
4776
  "business::hrm::auditLog": "จัดการประวัติการใช้งาน",
4479
4777
  "business::report::createReport": "สร้างรายงาน",
4778
+ "business::report::accessOsDashboard": "เข้าถึงแดชบอร์ด FeedmeOS",
4480
4779
  "business::report::accessOverview": "เข้าถึงหน้าภาพรวม",
4481
4780
  "business::report::accessInsight": "เข้าถึงหน้าข้อมูลเชิงลึก",
4482
4781
  "business::report::accessSetting": "เข้าถึงหน้าการตั้งค่า",
@@ -4493,7 +4792,7 @@ const wr = {
4493
4792
  }, Zo = {
4494
4793
  team: Qr,
4495
4794
  permissionSet: kr
4496
- }, zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4795
+ }, Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4497
4796
  __proto__: null,
4498
4797
  default: Zo,
4499
4798
  permissionSet: kr,
@@ -4617,7 +4916,7 @@ const wr = {
4617
4916
  selectPlaceholder: "选择权限角色"
4618
4917
  }
4619
4918
  }
4620
- }, Nr = {
4919
+ }, Sr = {
4621
4920
  title: "角色",
4622
4921
  createButtonLabel: "创建角色",
4623
4922
  search: {
@@ -4732,6 +5031,7 @@ const wr = {
4732
5031
  "business::hrm::employee": "员工管理",
4733
5032
  "business::hrm::auditLog": "审计日志管理",
4734
5033
  "business::report::createReport": "创建报告",
5034
+ "business::report::accessOsDashboard": "访问 FeedmeOS 仪表板",
4735
5035
  "business::report::accessOverview": "访问概览页面",
4736
5036
  "business::report::accessInsight": "访问洞察页面",
4737
5037
  "business::report::accessSetting": "访问设置页面",
@@ -4745,15 +5045,15 @@ const wr = {
4745
5045
  permissions: "权限"
4746
5046
  }
4747
5047
  }
4748
- }, Uo = {
5048
+ }, zo = {
4749
5049
  team: Tr,
4750
- permissionSet: Nr
5050
+ permissionSet: Sr
4751
5051
  }, Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4752
5052
  __proto__: null,
4753
- default: Uo,
4754
- permissionSet: Nr,
5053
+ default: zo,
5054
+ permissionSet: Sr,
4755
5055
  team: Tr
4756
- }, Symbol.toStringTag, { value: "Module" })), Sr = {
5056
+ }, Symbol.toStringTag, { value: "Module" })), Nr = {
4757
5057
  title: "團隊成員",
4758
5058
  subtitle: "管理可存取 Portal 和 POS 的團隊成員,指派 Portal 權限和 POS 角色。",
4759
5059
  actions: {
@@ -4994,6 +5294,7 @@ const wr = {
4994
5294
  "business::hrm::employee": "員工管理",
4995
5295
  "business::hrm::auditLog": "審計日誌管理",
4996
5296
  "business::report::createReport": "創建報告",
5297
+ "business::report::accessOsDashboard": "訪問 FeedmeOS 儀表板",
4997
5298
  "business::report::accessOverview": "訪問概覽頁面",
4998
5299
  "business::report::accessInsight": "訪問洞察頁面",
4999
5300
  "business::report::accessSetting": "訪問設置頁面",
@@ -5008,19 +5309,19 @@ const wr = {
5008
5309
  }
5009
5310
  }
5010
5311
  }, Lo = {
5011
- team: Sr,
5312
+ team: Nr,
5012
5313
  permissionSet: Zr
5013
5314
  }, Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5014
5315
  __proto__: null,
5015
5316
  default: Lo,
5016
5317
  permissionSet: Zr,
5017
- team: Sr
5318
+ team: Nr
5018
5319
  }, Symbol.toStringTag, { value: "Module" })), Jo = {
5019
- "en-US": So,
5320
+ "en-US": No,
5020
5321
  "zh-CN": Wo,
5021
- "th-TH": zo,
5322
+ "th-TH": Uo,
5022
5323
  "zh-Hant": Ko
5023
- }, zr = {
5324
+ }, Ur = {
5024
5325
  title: "POS Grant",
5025
5326
  actions: {
5026
5327
  create: "Create Passcode",
@@ -5075,12 +5376,12 @@ const wr = {
5075
5376
  copied: "Passcode copied"
5076
5377
  }
5077
5378
  }, _o = {
5078
- grantUser: zr
5379
+ grantUser: Ur
5079
5380
  }, $o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5080
5381
  __proto__: null,
5081
5382
  default: _o,
5082
- grantUser: zr
5083
- }, Symbol.toStringTag, { value: "Module" })), Ur = {
5383
+ grantUser: Ur
5384
+ }, Symbol.toStringTag, { value: "Module" })), zr = {
5084
5385
  title: "POS Grant",
5085
5386
  actions: {
5086
5387
  create: "สร้างรหัสผ่าน",
@@ -5135,11 +5436,11 @@ const wr = {
5135
5436
  copied: "คัดลอกรหัสผ่านแล้ว"
5136
5437
  }
5137
5438
  }, ei = {
5138
- grantUser: Ur
5439
+ grantUser: zr
5139
5440
  }, ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5140
5441
  __proto__: null,
5141
5442
  default: ei,
5142
- grantUser: Ur
5443
+ grantUser: zr
5143
5444
  }, Symbol.toStringTag, { value: "Module" })), Wr = {
5144
5445
  title: "POS 授予",
5145
5446
  actions: {
@@ -5668,7 +5969,7 @@ const wr = {
5668
5969
  }
5669
5970
  }, vi = {
5670
5971
  posAccess: sn
5671
- }, Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5972
+ }, wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5672
5973
  __proto__: null,
5673
5974
  default: vi,
5674
5975
  posAccess: sn
@@ -5680,15 +5981,15 @@ const wr = {
5680
5981
  codes: "授權碼",
5681
5982
  codesDescription: "產生一次性授權碼,用於核准退款、作廢等敏感操作。"
5682
5983
  }
5683
- }, wi = {
5984
+ }, Bi = {
5684
5985
  posAccess: rn
5685
5986
  }, Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5686
5987
  __proto__: null,
5687
- default: wi,
5988
+ default: Bi,
5688
5989
  posAccess: rn
5689
5990
  }, Symbol.toStringTag, { value: "Module" })), Ci = {
5690
5991
  "en-US": hi,
5691
- "zh-CN": Bi,
5992
+ "zh-CN": wi,
5692
5993
  "th-TH": bi,
5693
5994
  "zh-Hant": Mi
5694
5995
  }, yt = {
@@ -5715,7 +6016,7 @@ const wr = {
5715
6016
  [ee.integration]: d.inventory_integration,
5716
6017
  [ee.orderDraft]: d.inventory_orderDraftApproval,
5717
6018
  [ee.unitCostHistory]: d.inventory_unitCostHistory
5718
- }, Pl = {
6019
+ }, Gl = {
5719
6020
  // General
5720
6021
  restaurant: {
5721
6022
  label: "Restaurant Owner",
@@ -6150,6 +6451,12 @@ const wr = {
6150
6451
  actions: [o.manage],
6151
6452
  category: v.report
6152
6453
  },
6454
+ reportAccessOsDashboard: {
6455
+ label: "Access FeedmeOS Dashboard",
6456
+ subject: d.report_accessOsDashboard,
6457
+ actions: [o.manage],
6458
+ category: v.report
6459
+ },
6153
6460
  reportAccessOverview: {
6154
6461
  label: "Access Overview Page",
6155
6462
  subject: d.report_accessOverview,
@@ -6441,14 +6748,14 @@ const L = [
6441
6748
  o.delete
6442
6749
  ]
6443
6750
  }
6444
- ], Yi = [
6751
+ ], Pi = [
6445
6752
  ...L,
6446
6753
  {
6447
6754
  label: "Setting",
6448
6755
  subject: Z.crm_setting,
6449
6756
  actions: [o.read, o.update]
6450
6757
  }
6451
- ], Gi = [
6758
+ ], Yi = [
6452
6759
  ...L,
6453
6760
  {
6454
6761
  label: "Reward",
@@ -6503,7 +6810,7 @@ const L = [
6503
6810
  subject: Z.crm_analytic,
6504
6811
  actions: [o.read]
6505
6812
  }
6506
- ], Pi = [
6813
+ ], Gi = [
6507
6814
  ...L,
6508
6815
  {
6509
6816
  label: "Tier",
@@ -6644,7 +6951,7 @@ const L = [
6644
6951
  }
6645
6952
  ], pn = Ae(
6646
6953
  ye,
6647
- Pi
6954
+ Gi
6648
6955
  ), fn = Ae(
6649
6956
  ye,
6650
6957
  Vi
@@ -6660,10 +6967,10 @@ const L = [
6660
6967
  ), vn = Ae(
6661
6968
  ye,
6662
6969
  Ii
6663
- ), Bn = Ae(
6970
+ ), wn = Ae(
6664
6971
  ye,
6665
6972
  Hi
6666
- ), wn = Ae(
6973
+ ), Bn = Ae(
6667
6974
  ye,
6668
6975
  Ri
6669
6976
  ), Xi = Ae(
@@ -6671,7 +6978,7 @@ const L = [
6671
6978
  cn
6672
6979
  ), Mn = Ae(
6673
6980
  ye,
6674
- Yi
6981
+ Pi
6675
6982
  ), Qi = [
6676
6983
  ...L,
6677
6984
  {
@@ -6704,7 +7011,7 @@ const L = [
6704
7011
  ji,
6705
7012
  Ei,
6706
7013
  Mn,
6707
- Gi,
7014
+ Yi,
6708
7015
  un,
6709
7016
  pn,
6710
7017
  fn,
@@ -6712,20 +7019,20 @@ const L = [
6712
7019
  yn,
6713
7020
  bn,
6714
7021
  vn,
6715
- Bn,
6716
7022
  wn,
7023
+ Bn,
6717
7024
  An,
6718
7025
  dn,
6719
7026
  mn,
6720
7027
  gn
6721
- ), Ni = Ae(
7028
+ ), Si = Ae(
6722
7029
  ye,
6723
7030
  cn,
6724
7031
  ln
6725
- ), Si = Ae(
7032
+ ), Ni = Ae(
6726
7033
  ye,
6727
7034
  Qi
6728
- ), Zi = Ae(ki), zi = {
7035
+ ), Zi = Ae(ki), Ui = {
6729
7036
  [`set_${d.crm}`]: {
6730
7037
  key: "sys:crm:access",
6731
7038
  name: "CRM Access",
@@ -6734,12 +7041,12 @@ const L = [
6734
7041
  [`set_${d.crm_promotion}`]: {
6735
7042
  key: "sys:crm:promotion",
6736
7043
  name: "CRM Promotion",
6737
- permissions: Ni
7044
+ permissions: Si
6738
7045
  },
6739
7046
  [`set_${d.crm_voucher}`]: {
6740
7047
  key: "sys:crm:voucher",
6741
7048
  name: "CRM Voucher",
6742
- permissions: Si
7049
+ permissions: Ni
6743
7050
  },
6744
7051
  [`set_${d.crm_membership}`]: {
6745
7052
  key: "sys:crm:membership",
@@ -6784,12 +7091,12 @@ const L = [
6784
7091
  [`set_${d.crm_game}`]: {
6785
7092
  key: "sys:crm:game",
6786
7093
  name: "CRM Game",
6787
- permissions: Bn
7094
+ permissions: wn
6788
7095
  },
6789
7096
  [`set_${d.crm_mission}`]: {
6790
7097
  key: "sys:crm:mission",
6791
7098
  name: "CRM Mission",
6792
- permissions: wn
7099
+ permissions: Bn
6793
7100
  },
6794
7101
  [`set_${d.crm_loyaltyMember}`]: {
6795
7102
  key: "sys:crm:loyaltyMember",
@@ -6866,7 +7173,7 @@ const ie = [
6866
7173
  subject: V.inventory_unitCostHistory,
6867
7174
  actions: [o.read]
6868
7175
  }
6869
- ], Ui = [
7176
+ ], zi = [
6870
7177
  ...ie,
6871
7178
  {
6872
7179
  label: "Stock Adjustment",
@@ -7045,7 +7352,7 @@ const Wi = [
7045
7352
  subject: V.inventory_shipment,
7046
7353
  actions: [o.read, o.update]
7047
7354
  }
7048
- ], Yn = [
7355
+ ], Pn = [
7049
7356
  {
7050
7357
  label: "Purchase Order",
7051
7358
  subject: V.inventory_purchaseOrder,
@@ -7066,7 +7373,7 @@ const Wi = [
7066
7373
  subject: V.inventory_shipment,
7067
7374
  actions: [o.read, o.update]
7068
7375
  }
7069
- ], Gn = [
7376
+ ], Yn = [
7070
7377
  ...ie,
7071
7378
  {
7072
7379
  label: "Surcharge",
@@ -7083,7 +7390,7 @@ const Wi = [
7083
7390
  subject: V.inventory_supplier,
7084
7391
  actions: [o.read]
7085
7392
  }
7086
- ], Pn = [
7393
+ ], Gn = [
7087
7394
  ...ie,
7088
7395
  {
7089
7396
  label: "Order Template",
@@ -7115,9 +7422,9 @@ const Wi = [
7115
7422
  ];
7116
7423
  [
7117
7424
  ...En,
7425
+ ...Pn,
7118
7426
  ...Yn,
7119
- ...Gn,
7120
- ...Pn
7427
+ ...Gn
7121
7428
  ];
7122
7429
  const $i = [
7123
7430
  ...ie,
@@ -7183,7 +7490,7 @@ const nc = {
7183
7490
  [`set_${d.inventory_stockAdjustment}`]: {
7184
7491
  key: "sys:inventory:stock_adjustment",
7185
7492
  name: "Stock Adjustment",
7186
- permissions: Ui
7493
+ permissions: zi
7187
7494
  },
7188
7495
  [`set_${d.inventory_unitCostHistory}`]: {
7189
7496
  key: "sys:inventory:unit_cost_history",
@@ -7243,17 +7550,17 @@ const nc = {
7243
7550
  [`set_${d.inventory_transferOut}`]: {
7244
7551
  key: "sys:inventory:transfer_out",
7245
7552
  name: "Transfer Out",
7246
- permissions: Yn
7553
+ permissions: Pn
7247
7554
  },
7248
7555
  [`set_${d.inventory_surcharge}`]: {
7249
7556
  key: "sys:inventory:surcharge",
7250
7557
  name: "Surcharge",
7251
- permissions: Gn
7558
+ permissions: Yn
7252
7559
  },
7253
7560
  [`set_${d.inventory_orderTemplate}`]: {
7254
7561
  key: "sys:inventory:order_template",
7255
7562
  name: "Order Template",
7256
- permissions: Pn
7563
+ permissions: Gn
7257
7564
  },
7258
7565
  [`set_${d.inventory_supplier}`]: {
7259
7566
  key: "sys:inventory:supplier",
@@ -7396,7 +7703,7 @@ const sr = [
7396
7703
  permissions: sr
7397
7704
  }
7398
7705
  }, ic = {
7399
- ...zi,
7706
+ ...Ui,
7400
7707
  ...nc,
7401
7708
  ...ac,
7402
7709
  ...oc
@@ -7466,8 +7773,8 @@ var On = { exports: {} };
7466
7773
  }
7467
7774
  function c(m) {
7468
7775
  var p = "[object " + m + "]";
7469
- return function(w) {
7470
- return Object.prototype.toString.call(w) === p;
7776
+ return function(B) {
7777
+ return Object.prototype.toString.call(B) === p;
7471
7778
  };
7472
7779
  }
7473
7780
  n.r(r), n.d(r, "default", function() {
@@ -7478,33 +7785,33 @@ var On = { exports: {} };
7478
7785
  return At;
7479
7786
  });
7480
7787
  var l = c("Array"), y = c("Object"), h = c("Function");
7481
- function B(m, p) {
7788
+ function w(m, p) {
7482
7789
  return h(m.get) ? m.get(p) : m[p];
7483
7790
  }
7484
7791
  function O(m) {
7485
- return function(p, w) {
7486
- if (!l(w) || !w.length) return m(p, w);
7487
- for (var D = 0, E = w.length; D < E; D++)
7488
- if (m(p, B(w, D))) return !0;
7792
+ return function(p, B) {
7793
+ if (!l(B) || !B.length) return m(p, B);
7794
+ for (var D = 0, E = B.length; D < E; D++)
7795
+ if (m(p, w(B, D))) return !0;
7489
7796
  return !1;
7490
7797
  };
7491
7798
  }
7492
- function N(m) {
7493
- return function(p, w) {
7494
- if (!l(w) || !w.length) return m(p, w);
7495
- for (var D = 0, E = w.length; D < E; D++)
7496
- if (!m(p, B(w, D))) return !1;
7799
+ function S(m) {
7800
+ return function(p, B) {
7801
+ if (!l(B) || !B.length) return m(p, B);
7802
+ for (var D = 0, E = B.length; D < E; D++)
7803
+ if (!m(p, w(B, D))) return !1;
7497
7804
  return !0;
7498
7805
  };
7499
7806
  }
7500
- function z(m, p, w, D) {
7501
- return m.validate(m.options, p, w, D);
7807
+ function U(m, p, B, D) {
7808
+ return m.validate(m.options, p, B, D);
7502
7809
  }
7503
7810
  var $ = {
7504
7811
  $eq: O(function(m, p) {
7505
7812
  return m(p);
7506
7813
  }),
7507
- $ne: N(function(m, p) {
7814
+ $ne: S(function(m, p) {
7508
7815
  return m(p);
7509
7816
  }),
7510
7817
  $gt: O(function(m, p) {
@@ -7528,115 +7835,115 @@ var On = { exports: {} };
7528
7835
  $nin: function(m, p) {
7529
7836
  return m(p);
7530
7837
  },
7531
- $not: function(m, p, w, D) {
7532
- return m(p, w, D);
7838
+ $not: function(m, p, B, D) {
7839
+ return m(p, B, D);
7533
7840
  },
7534
7841
  $type: function(m, p) {
7535
7842
  return m(p);
7536
7843
  },
7537
- $all: function(m, p, w, D) {
7538
- return $.$and(m, p, w, D);
7844
+ $all: function(m, p, B, D) {
7845
+ return $.$and(m, p, B, D);
7539
7846
  },
7540
7847
  $size: function(m, p) {
7541
7848
  return !!p && m === p.length;
7542
7849
  },
7543
- $or: function(m, p, w, D) {
7544
- for (var E = 0, G = m.length; E < G; E++)
7545
- if (z(B(m, E), p, w, D)) return !0;
7850
+ $or: function(m, p, B, D) {
7851
+ for (var E = 0, Y = m.length; E < Y; E++)
7852
+ if (U(w(m, E), p, B, D)) return !0;
7546
7853
  return !1;
7547
7854
  },
7548
- $nor: function(m, p, w, D) {
7549
- return !$.$or(m, p, w, D);
7855
+ $nor: function(m, p, B, D) {
7856
+ return !$.$or(m, p, B, D);
7550
7857
  },
7551
- $and: function(m, p, w, D) {
7552
- for (var E = 0, G = m.length; E < G; E++)
7553
- if (!z(B(m, E), p, w, D)) return !1;
7858
+ $and: function(m, p, B, D) {
7859
+ for (var E = 0, Y = m.length; E < Y; E++)
7860
+ if (!U(w(m, E), p, B, D)) return !1;
7554
7861
  return !0;
7555
7862
  },
7556
7863
  $regex: O(function(m, p) {
7557
7864
  return typeof p == "string" && m.test(p);
7558
7865
  }),
7559
- $where: function(m, p, w, D) {
7560
- return m.call(p, p, w, D);
7866
+ $where: function(m, p, B, D) {
7867
+ return m.call(p, p, B, D);
7561
7868
  },
7562
- $elemMatch: function(m, p, w, D) {
7563
- return l(p) ? !!~function(E, G) {
7869
+ $elemMatch: function(m, p, B, D) {
7870
+ return l(p) ? !!~function(E, Y) {
7564
7871
  for (var q = 0; q < E.length; q++)
7565
- if (B(E, q), z(G, B(E, q))) return q;
7872
+ if (w(E, q), U(Y, w(E, q))) return q;
7566
7873
  return -1;
7567
- }(p, m) : z(m, p, w, D);
7874
+ }(p, m) : U(m, p, B, D);
7568
7875
  },
7569
- $exists: function(m, p, w, D) {
7570
- return D.hasOwnProperty(w) === m;
7876
+ $exists: function(m, p, B, D) {
7877
+ return D.hasOwnProperty(B) === m;
7571
7878
  }
7572
7879
  }, re = {
7573
- $eq: function(m, p, w) {
7574
- var D = w.comparable, E = w.compare;
7575
- return m instanceof RegExp ? O(function(G) {
7576
- return typeof G == "string" && m.test(G);
7577
- }) : m instanceof Function ? O(m) : l(m) && !m.length ? O(function(G) {
7578
- return l(G) && !G.length;
7880
+ $eq: function(m, p, B) {
7881
+ var D = B.comparable, E = B.compare;
7882
+ return m instanceof RegExp ? O(function(Y) {
7883
+ return typeof Y == "string" && m.test(Y);
7884
+ }) : m instanceof Function ? O(m) : l(m) && !m.length ? O(function(Y) {
7885
+ return l(Y) && !Y.length;
7579
7886
  }) : O(
7580
- m === null ? function(G) {
7581
- return G == null;
7582
- } : function(G) {
7583
- return E(D(G), D(m)) === 0;
7887
+ m === null ? function(Y) {
7888
+ return Y == null;
7889
+ } : function(Y) {
7890
+ return E(D(Y), D(m)) === 0;
7584
7891
  }
7585
7892
  );
7586
7893
  },
7587
- $gt: function(m, p, w) {
7588
- var D = w.comparable, E = w.compare;
7589
- return function(G) {
7590
- return E(D(G), D(m)) > 0;
7894
+ $gt: function(m, p, B) {
7895
+ var D = B.comparable, E = B.compare;
7896
+ return function(Y) {
7897
+ return E(D(Y), D(m)) > 0;
7591
7898
  };
7592
7899
  },
7593
- $gte: function(m, p, w) {
7594
- var D = w.comparable, E = w.compare;
7595
- return function(G) {
7596
- return E(D(G), D(m)) >= 0;
7900
+ $gte: function(m, p, B) {
7901
+ var D = B.comparable, E = B.compare;
7902
+ return function(Y) {
7903
+ return E(D(Y), D(m)) >= 0;
7597
7904
  };
7598
7905
  },
7599
- $lt: function(m, p, w) {
7600
- var D = w.comparable, E = w.compare;
7601
- return function(G) {
7602
- return E(D(G), D(m)) < 0;
7906
+ $lt: function(m, p, B) {
7907
+ var D = B.comparable, E = B.compare;
7908
+ return function(Y) {
7909
+ return E(D(Y), D(m)) < 0;
7603
7910
  };
7604
7911
  },
7605
- $lte: function(m, p, w) {
7606
- var D = w.comparable, E = w.compare;
7607
- return function(G) {
7608
- return E(D(G), D(m)) <= 0;
7912
+ $lte: function(m, p, B) {
7913
+ var D = B.comparable, E = B.compare;
7914
+ return function(Y) {
7915
+ return E(D(Y), D(m)) <= 0;
7609
7916
  };
7610
7917
  },
7611
- $in: function(m, p, w) {
7612
- var D = w.comparable;
7918
+ $in: function(m, p, B) {
7919
+ var D = B.comparable;
7613
7920
  return function(E) {
7614
7921
  if (!(E instanceof Array)) {
7615
- var G = D(E);
7616
- if (G === E && a(E) === "object") {
7922
+ var Y = D(E);
7923
+ if (Y === E && a(E) === "object") {
7617
7924
  for (R = m.length; R--; )
7618
7925
  if (String(m[R]) === String(E) && String(E) !== "[object Object]")
7619
7926
  return !0;
7620
7927
  }
7621
- if (G === void 0) {
7928
+ if (Y === void 0) {
7622
7929
  for (R = m.length; R--; ) if (m[R] == null) return !0;
7623
7930
  }
7624
7931
  for (R = m.length; R--; ) {
7625
- var q = z(lt(B(m, R), w), G, R, m);
7626
- if (q && String(q) !== "[object Object]" && String(G) !== "[object Object]")
7932
+ var q = U(lt(w(m, R), B), Y, R, m);
7933
+ if (q && String(q) !== "[object Object]" && String(Y) !== "[object Object]")
7627
7934
  return !0;
7628
7935
  }
7629
- return !!~m.indexOf(G);
7936
+ return !!~m.indexOf(Y);
7630
7937
  }
7631
7938
  for (var R = E.length; R--; )
7632
- if (~m.indexOf(D(B(E, R)))) return !0;
7939
+ if (~m.indexOf(D(w(E, R)))) return !0;
7633
7940
  return !1;
7634
7941
  };
7635
7942
  },
7636
- $nin: function(m, p, w) {
7637
- var D = re.$in(m, p, w);
7638
- return function(E, G, q, R) {
7639
- return !D(E, G, q, R);
7943
+ $nin: function(m, p, B) {
7944
+ var D = re.$in(m, p, B);
7945
+ return function(E, Y, q, R) {
7946
+ return !D(E, Y, q, R);
7640
7947
  };
7641
7948
  },
7642
7949
  $mod: function(m) {
@@ -7644,32 +7951,32 @@ var On = { exports: {} };
7644
7951
  return p % m[0] == m[1];
7645
7952
  };
7646
7953
  },
7647
- $ne: function(m, p, w) {
7648
- var D = re.$eq(m, p, w);
7649
- return N(function(E, G, q, R) {
7650
- return !D(E, G, q, R);
7954
+ $ne: function(m, p, B) {
7955
+ var D = re.$eq(m, p, B);
7956
+ return S(function(E, Y, q, R) {
7957
+ return !D(E, Y, q, R);
7651
7958
  });
7652
7959
  },
7653
- $and: function(m, p, w) {
7654
- return m.map(be(w));
7960
+ $and: function(m, p, B) {
7961
+ return m.map(be(B));
7655
7962
  },
7656
- $all: function(m, p, w) {
7657
- return re.$and(m, p, w);
7963
+ $all: function(m, p, B) {
7964
+ return re.$and(m, p, B);
7658
7965
  },
7659
- $or: function(m, p, w) {
7660
- return m.map(be(w));
7966
+ $or: function(m, p, B) {
7967
+ return m.map(be(B));
7661
7968
  },
7662
- $nor: function(m, p, w) {
7663
- return m.map(be(w));
7969
+ $nor: function(m, p, B) {
7970
+ return m.map(be(B));
7664
7971
  },
7665
- $not: function(m, p, w) {
7666
- var D = be(w)(m);
7667
- return function(E, G, q) {
7668
- return !z(D, E, G, q);
7972
+ $not: function(m, p, B) {
7973
+ var D = be(B)(m);
7974
+ return function(E, Y, q) {
7975
+ return !U(D, E, Y, q);
7669
7976
  };
7670
7977
  },
7671
7978
  $type: function(m) {
7672
- return function(p, w, D) {
7979
+ return function(p, B, D) {
7673
7980
  return p != null && (p instanceof m || p.constructor == m);
7674
7981
  };
7675
7982
  },
@@ -7682,8 +7989,8 @@ var On = { exports: {} };
7682
7989
  'In CSP mode, sift does not support strings in "$where" condition'
7683
7990
  );
7684
7991
  },
7685
- $elemMatch: function(m, p, w) {
7686
- return be(w)(m);
7992
+ $elemMatch: function(m, p, B) {
7993
+ return be(B)(m);
7687
7994
  },
7688
7995
  $exists: function(m) {
7689
7996
  return !!m;
@@ -7693,29 +8000,29 @@ var On = { exports: {} };
7693
8000
  return { options: m, validate: p };
7694
8001
  }
7695
8002
  function ne(m, p) {
7696
- var w = m.keyPath, D = m.child, E = m.query, G = [];
7697
- if (function i(g, A, b, M, P) {
8003
+ var B = m.keyPath, D = m.child, E = m.query, Y = [];
8004
+ if (function i(g, A, b, M, G) {
7698
8005
  if (b === A.length || g == null)
7699
- return void P.push([g, A[b - 1], M]);
7700
- var F = B(A, b);
8006
+ return void G.push([g, A[b - 1], M]);
8007
+ var F = w(A, b);
7701
8008
  if (l(g) && isNaN(Number(F)))
7702
- for (var k = 0, j = g.length; k < j; k++) i(B(g, k), A, b, g, P);
7703
- else i(B(g, F), A, b + 1, g, P);
7704
- }(p, w, 0, p, G), G.length === 1) {
7705
- var q = G[0];
7706
- return z(D, q[0], q[1], q[2]);
8009
+ for (var k = 0, j = g.length; k < j; k++) i(w(g, k), A, b, g, G);
8010
+ else i(w(g, F), A, b + 1, g, G);
8011
+ }(p, B, 0, p, Y), Y.length === 1) {
8012
+ var q = Y[0];
8013
+ return U(D, q[0], q[1], q[2]);
7707
8014
  }
7708
- for (var R = E && E.$ne !== void 0, _ = R, se = 0; se < G.length; se++) {
7709
- var f = G[se], u = z(D, f[0], f[1], f[2]);
8015
+ for (var R = E && E.$ne !== void 0, _ = R, se = 0; se < Y.length; se++) {
8016
+ var f = Y[se], u = U(D, f[0], f[1], f[2]);
7710
8017
  R ? _ &= u : _ |= u;
7711
8018
  }
7712
8019
  return _;
7713
8020
  }
7714
- function Jt(m, p, w) {
7715
- return me({ keyPath: m, child: p, query: w }, ne);
8021
+ function Jt(m, p, B) {
8022
+ return me({ keyPath: m, child: p, query: B }, ne);
7716
8023
  }
7717
8024
  function be(m) {
7718
- var p = m.comparable, w = m.expressions, D = function(q) {
8025
+ var p = m.comparable, B = m.expressions, D = function(q) {
7719
8026
  var R;
7720
8027
  return (!q || !(R = q) || R.constructor !== Object && R.constructor !== Array && R.constructor.toString() !== "function Object() { [native code] }" && R.constructor.toString() !== "function Array() { [native code] }" || R.toJSON) && (q = { $eq: q }), q;
7721
8028
  }, E = function(q) {
@@ -7724,61 +8031,61 @@ var On = { exports: {} };
7724
8031
  for (var _ in q) {
7725
8032
  var se = q[_];
7726
8033
  if (_ !== "$options") {
7727
- var f = $[_] || m && w && w[_];
8034
+ var f = $[_] || m && B && B[_];
7728
8035
  if (f) re[_] && (se = re[_](se, q, m)), R.push(me(p(se), f));
7729
8036
  else {
7730
8037
  if (_.charCodeAt(0) === 36)
7731
8038
  throw new Error("Unknown operation " + _);
7732
8039
  var u = _.split(".");
7733
- R.push(Jt(u, G(se), se));
8040
+ R.push(Jt(u, Y(se), se));
7734
8041
  }
7735
8042
  }
7736
8043
  }
7737
8044
  return R.length === 1 ? R[0] : me(R, $.$and);
7738
- }, G = function(q) {
8045
+ }, Y = function(q) {
7739
8046
  return q = D(q), function R(_, se) {
7740
8047
  if (!y(_)) return se;
7741
8048
  for (var f in _) se.push(f), R(_[f], se);
7742
8049
  return se;
7743
- }(q, []).join(",").search(/[$.]/) === -1 ? me(q, Ne) : E(q);
8050
+ }(q, []).join(",").search(/[$.]/) === -1 ? me(q, Se) : E(q);
7744
8051
  };
7745
8052
  return function(q) {
7746
8053
  return E(D(q));
7747
8054
  };
7748
8055
  }
7749
- function Ne(m, p) {
8056
+ function Se(m, p) {
7750
8057
  if (Object.prototype.toString.call(m) !== Object.prototype.toString.call(p))
7751
8058
  return !1;
7752
8059
  if (y(m)) {
7753
8060
  if (Object.keys(m).length !== Object.keys(p).length) return !1;
7754
- for (var w in m) if (!Ne(m[w], p[w])) return !1;
8061
+ for (var B in m) if (!Se(m[B], p[B])) return !1;
7755
8062
  return !0;
7756
8063
  }
7757
8064
  if (l(m)) {
7758
8065
  if (m.length !== p.length) return !1;
7759
8066
  for (var D = 0, E = m.length; D < E; D++)
7760
- if (!Ne(m[D], p[D])) return !1;
8067
+ if (!Se(m[D], p[D])) return !1;
7761
8068
  return !0;
7762
8069
  }
7763
8070
  return m === p;
7764
8071
  }
7765
8072
  function lt(m, p) {
7766
- var w = be(p)(m);
7767
- return p && p.select && (w = {
7768
- options: w,
7769
- validate: function(D, E, G, q) {
7770
- return z(D, E && p.select(E), G, q);
8073
+ var B = be(p)(m);
8074
+ return p && p.select && (B = {
8075
+ options: B,
8076
+ validate: function(D, E, Y, q) {
8077
+ return U(D, E && p.select(E), Y, q);
7771
8078
  }
7772
- }), w;
8079
+ }), B;
7773
8080
  }
7774
8081
  function Dt(m, p) {
7775
- var w = lt(m, p = Object.assign({ compare: ut, comparable: At }, p));
7776
- return function(D, E, G) {
7777
- return z(w, D, E, G);
8082
+ var B = lt(m, p = Object.assign({ compare: ut, comparable: At }, p));
8083
+ return function(D, E, Y) {
8084
+ return U(B, D, E, Y);
7778
8085
  };
7779
8086
  }
7780
8087
  function ut(m, p) {
7781
- if (Ne(m, p)) return 0;
8088
+ if (Se(m, p)) return 0;
7782
8089
  if (a(m) === a(p)) {
7783
8090
  if (m > p) return 1;
7784
8091
  if (m < p) return -1;
@@ -7810,10 +8117,10 @@ function js(e) {
7810
8117
  return s.__proto__ || Object.getPrototypeOf(s);
7811
8118
  }, js(e);
7812
8119
  }
7813
- function zt(e, t) {
7814
- return zt = Object.setPrototypeOf || function(r, n) {
8120
+ function Ut(e, t) {
8121
+ return Ut = Object.setPrototypeOf || function(r, n) {
7815
8122
  return r.__proto__ = n, r;
7816
- }, zt(e, t);
8123
+ }, Ut(e, t);
7817
8124
  }
7818
8125
  function gc() {
7819
8126
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
@@ -7825,13 +8132,13 @@ function gc() {
7825
8132
  return !1;
7826
8133
  }
7827
8134
  }
7828
- function Pt(e, t, s) {
7829
- return gc() ? Pt = Reflect.construct : Pt = function(n, a, c) {
8135
+ function Gt(e, t, s) {
8136
+ return gc() ? Gt = Reflect.construct : Gt = function(n, a, c) {
7830
8137
  var l = [null];
7831
8138
  l.push.apply(l, a);
7832
8139
  var y = Function.bind.apply(n, l), h = new y();
7833
- return c && zt(h, c.prototype), h;
7834
- }, Pt.apply(null, arguments);
8140
+ return c && Ut(h, c.prototype), h;
8141
+ }, Gt.apply(null, arguments);
7835
8142
  }
7836
8143
  function pc(e) {
7837
8144
  return Function.toString.call(e).indexOf("[native code]") !== -1;
@@ -7847,7 +8154,7 @@ function Es(e) {
7847
8154
  t.set(r, n);
7848
8155
  }
7849
8156
  function n() {
7850
- return Pt(r, arguments, js(this).constructor);
8157
+ return Gt(r, arguments, js(this).constructor);
7851
8158
  }
7852
8159
  return n.prototype = Object.create(r.prototype, {
7853
8160
  constructor: {
@@ -7856,7 +8163,7 @@ function Es(e) {
7856
8163
  writable: !0,
7857
8164
  configurable: !0
7858
8165
  }
7859
- }), zt(n, r);
8166
+ }), Ut(n, r);
7860
8167
  }, Es(e);
7861
8168
  }
7862
8169
  function rr(e) {
@@ -7902,7 +8209,7 @@ var Fn = function(t) {
7902
8209
  this.subject = n.subject, this.subjectName = n.subjectName, this.action = n.action, this.field = n.field;
7903
8210
  }, t;
7904
8211
  }(Es(Error));
7905
- function Ys(e) {
8212
+ function Ps(e) {
7906
8213
  return Array.isArray(e) ? e : [e];
7907
8214
  }
7908
8215
  function hc(e) {
@@ -7914,9 +8221,9 @@ function hc(e) {
7914
8221
  function yc(e) {
7915
8222
  return JSON.parse(JSON.stringify(e));
7916
8223
  }
7917
- var bc = /[-/\\^$+?.()|[\]{}]/g, vc = /\.?\*+\.?/g, Bc = /\*+/, wc = /\./g;
8224
+ var bc = /[-/\\^$+?.()|[\]{}]/g, vc = /\.?\*+\.?/g, wc = /\*+/, Bc = /\./g;
7918
8225
  function Mc(e, t, s) {
7919
- var r = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", n = e.indexOf("**") === -1 ? "[^.]" : ".", a = e.replace(wc, "\\$&").replace(Bc, n + r);
8226
+ var r = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", n = e.indexOf("**") === -1 ? "[^.]" : ".", a = e.replace(Bc, "\\$&").replace(wc, n + r);
7920
8227
  return t + e.length === s.length ? "(?:" + a + ")?" : a;
7921
8228
  }
7922
8229
  function Cc(e, t, s) {
@@ -7930,7 +8237,7 @@ function Dc(e) {
7930
8237
  }
7931
8238
  var xc = /* @__PURE__ */ function() {
7932
8239
  function e(s) {
7933
- this.actions = s.actions || s.action, this.subject = s.subject, this.fields = !s.fields || s.fields.length === 0 ? void 0 : Ys(s.fields), Object.defineProperty(this, "_fieldsPattern", {
8240
+ this.actions = s.actions || s.action, this.subject = s.subject, this.fields = !s.fields || s.fields.length === 0 ? void 0 : Ps(s.fields), Object.defineProperty(this, "_fieldsPattern", {
7934
8241
  writable: !0
7935
8242
  }), this.inverted = !!s.inverted, this.conditions = s.conditions, Object.defineProperty(this, "_matches", {
7936
8243
  writable: !0,
@@ -7985,14 +8292,14 @@ var jc = /* @__PURE__ */ function() {
7985
8292
  return this[de].indexedRules = a.rules, this[de].hasPerFieldRules = a.hasPerFieldRules, this.emit("updated", n), this;
7986
8293
  }, t.buildIndexFor = function(r) {
7987
8294
  for (var n = /* @__PURE__ */ Object.create(null), a = this[de].RuleType, c = !0, l = !1, y = 0; y < r.length; y++) {
7988
- var h = new a(r[y]), B = this.expandActions(h.actions), O = Ys(h.subject), N = r.length - y - 1;
8295
+ var h = new a(r[y]), w = this.expandActions(h.actions), O = Ps(h.subject), S = r.length - y - 1;
7989
8296
  c = !!(c && h.inverted), !l && h.fields && (l = !0);
7990
- for (var z = 0; z < O.length; z++) {
7991
- var $ = O[z];
8297
+ for (var U = 0; U < O.length; U++) {
8298
+ var $ = O[U];
7992
8299
  n[$] = n[$] || /* @__PURE__ */ Object.create(null);
7993
- for (var re = 0; re < B.length; re++) {
7994
- var me = B[re];
7995
- n[$][me] = n[$][me] || /* @__PURE__ */ Object.create(null), n[$][me][N] = h;
8300
+ for (var re = 0; re < w.length; re++) {
8301
+ var me = w[re];
8302
+ n[$][me] = n[$][me] || /* @__PURE__ */ Object.create(null), n[$][me][S] = h;
7996
8303
  }
7997
8304
  }
7998
8305
  }
@@ -8002,7 +8309,7 @@ var jc = /* @__PURE__ */ function() {
8002
8309
  rules: n
8003
8310
  };
8004
8311
  }, t.expandActions = function(r) {
8005
- for (var n = this[de].aliases, a = Ys(r), c = 0; c < a.length; ) {
8312
+ for (var n = this[de].aliases, a = Ps(r), c = 0; c < a.length; ) {
8006
8313
  var l = a[c++];
8007
8314
  n.hasOwnProperty(l) && (a = a.concat(n[l]));
8008
8315
  }
@@ -8066,7 +8373,7 @@ function Ol(e) {
8066
8373
  const t = Object.entries(nn).find(([, s]) => s === e);
8067
8374
  return t ? t[0] : e;
8068
8375
  }
8069
- function Yc(e) {
8376
+ function Pc(e) {
8070
8377
  return e.map((t) => ({
8071
8378
  ...t,
8072
8379
  subject: Ec(t.subject),
@@ -8074,15 +8381,15 @@ function Yc(e) {
8074
8381
  }));
8075
8382
  }
8076
8383
  function qn(e) {
8077
- return new jc(Yc(e));
8384
+ return new jc(Pc(e));
8078
8385
  }
8079
- function Gc(e, t) {
8386
+ function Yc(e, t) {
8080
8387
  return e.rulesFor(t.action, t.subject, t.field).some((s) => !s.inverted);
8081
8388
  }
8082
8389
  function In(e, t) {
8083
- return t.coverSubject === void 0 ? !1 : t.coverSubjectMode !== "directOverride" ? !0 : !Gc(e, t);
8390
+ return t.coverSubject === void 0 ? !1 : t.coverSubjectMode !== "directOverride" ? !0 : !Yc(e, t);
8084
8391
  }
8085
- function Gs(e, t) {
8392
+ function Ys(e, t) {
8086
8393
  const s = qn(t), r = (l) => s.can(l.action, l.subject, l.field) ? !0 : In(s, l) ? s.can(l.action, l.coverSubject, l.field) : !1, n = e.find((l) => !r(l));
8087
8394
  if (n) {
8088
8395
  const l = s.relevantRuleFor(
@@ -8099,8 +8406,8 @@ function Gs(e, t) {
8099
8406
  const a = e[0], c = s.relevantRuleFor(a.action, a.subject, a.field);
8100
8407
  return { granted: !0, decisivePermission: a, decisiveRule: c ?? null };
8101
8408
  }
8102
- function Pc(e, t) {
8103
- const s = Gs([e], t);
8409
+ function Gc(e, t) {
8410
+ const s = Ys([e], t);
8104
8411
  if (!s.granted)
8105
8412
  return { ...s, conditionEvaluation: "not_enforced" };
8106
8413
  const r = qn(t), n = In(r, e) ? e.coverSubject : void 0, a = [e.subject, n].filter(
@@ -8121,7 +8428,7 @@ function Pc(e, t) {
8121
8428
  }
8122
8429
  function Vc(e, t, s) {
8123
8430
  const r = arguments.length >= 3;
8124
- return Array.isArray(e) ? Gs(e, t) : r ? Pc(e, t) : Gs([e], t);
8431
+ return Array.isArray(e) ? Ys(e, t) : r ? Gc(e, t) : Ys([e], t);
8125
8432
  }
8126
8433
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8127
8434
  const Oc = () => {
@@ -8137,27 +8444,27 @@ function Fc(e, t, s) {
8137
8444
  shallow: c = !0,
8138
8445
  onError: l = Oc
8139
8446
  } = r, y = Qe(!n), h = c ? kn(t) : Qe(t);
8140
- let B = 0;
8447
+ let w = 0;
8141
8448
  return ir(async (O) => {
8142
8449
  if (!y.value)
8143
8450
  return;
8144
- B++;
8145
- const N = B;
8146
- let z = !1;
8451
+ w++;
8452
+ const S = w;
8453
+ let U = !1;
8147
8454
  a && Promise.resolve().then(() => {
8148
8455
  a.value = !0;
8149
8456
  });
8150
8457
  try {
8151
8458
  const $ = await e((re) => {
8152
8459
  O(() => {
8153
- a && (a.value = !1), z || re();
8460
+ a && (a.value = !1), U || re();
8154
8461
  });
8155
8462
  });
8156
- N === B && (h.value = $);
8463
+ S === w && (h.value = $);
8157
8464
  } catch ($) {
8158
8465
  l($);
8159
8466
  } finally {
8160
- a && N === B && (a.value = !1), z = !0;
8467
+ a && S === w && (a.value = !1), U = !0;
8161
8468
  }
8162
8469
  }), n ? Os(() => (y.value = !0, h.value)) : h;
8163
8470
  }
@@ -8203,7 +8510,7 @@ async function Ic(e, t) {
8203
8510
  canAccess: !0
8204
8511
  };
8205
8512
  }
8206
- var Ps = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Allowed = "allowed", e.Denied = "denied", e))(Ps || {});
8513
+ var Gs = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Allowed = "allowed", e.Denied = "denied", e))(Gs || {});
8207
8514
  function Hc() {
8208
8515
  const e = Jn(), { sessionUser: t } = Ar();
8209
8516
  return Fc(
@@ -8234,38 +8541,38 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
8234
8541
  subtitle: "哎呀!您没有权限访问此页面。"
8235
8542
  }, Tc = {
8236
8543
  noPermission: kc
8237
- }, Nc = {
8544
+ }, Sc = {
8238
8545
  title: "存取被拒絕",
8239
8546
  subtitle: "哎呀!您沒有權限存取此頁面。"
8240
- }, Sc = {
8241
- noPermission: Nc
8547
+ }, Nc = {
8548
+ noPermission: Sc
8242
8549
  }, Zc = {
8243
8550
  title: "การเข้าถึงถูกปฏิเสธ",
8244
8551
  subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
8245
- }, zc = {
8552
+ }, Uc = {
8246
8553
  noPermission: Zc
8247
- }, Uc = { class: "w-full h-full flex justify-center items-center" }, Wc = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Lc = { class: "w-[300px] h-[300px]" }, Kc = ["src"], Jc = { class: "text-2xl" }, _c = { class: "text-xl" }, $c = /* @__PURE__ */ it({
8554
+ }, zc = { class: "w-full h-full flex justify-center items-center" }, Wc = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Lc = { class: "w-[300px] h-[300px]" }, Kc = ["src"], Jc = { class: "text-2xl" }, _c = { class: "text-xl" }, $c = /* @__PURE__ */ it({
8248
8555
  __name: "NoPermission",
8249
8556
  setup(e) {
8250
8557
  const { t } = dr({
8251
8558
  messages: {
8252
8559
  "en-US": Qc,
8253
8560
  "zh-CN": Tc,
8254
- "zh-Hant": Sc,
8255
- "th-TH": zc
8561
+ "zh-Hant": Nc,
8562
+ "th-TH": Uc
8256
8563
  }
8257
8564
  });
8258
- return (s, r) => (ct(), lr("div", Uc, [
8259
- Ze("div", Wc, [
8260
- Ze("div", Lc, [
8261
- Ze("img", {
8565
+ return (s, r) => (ct(), lr("div", zc, [
8566
+ Ue("div", Wc, [
8567
+ Ue("div", Lc, [
8568
+ Ue("img", {
8262
8569
  src: ze(Rc),
8263
8570
  class: "w-full h-full"
8264
8571
  }, null, 8, Kc)
8265
8572
  ]),
8266
- Ze("div", null, [
8267
- Ze("h1", Jc, Ws(ze(t)("noPermission.title")), 1),
8268
- Ze("h2", _c, Ws(ze(t)("noPermission.subtitle")), 1)
8573
+ Ue("div", null, [
8574
+ Ue("h1", Jc, Ws(ze(t)("noPermission.title")), 1),
8575
+ Ue("h2", _c, Ws(ze(t)("noPermission.subtitle")), 1)
8269
8576
  ])
8270
8577
  ])
8271
8578
  ]));
@@ -8274,14 +8581,14 @@ const Rc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
8274
8581
  __name: "PermissionWrapper",
8275
8582
  setup(e) {
8276
8583
  const t = Hc();
8277
- return (s, r) => ze(t) === ze(Ps).Denied ? (ct(), Ut($c, { key: 0 })) : ze(t) === ze(Ps).Allowed ? cr(s.$slots, "default", { key: 1 }) : Tn("", !0);
8584
+ return (s, r) => ze(t) === ze(Gs).Denied ? (ct(), zt($c, { key: 0 })) : ze(t) === ze(Gs).Allowed ? cr(s.$slots, "default", { key: 1 }) : Tn("", !0);
8278
8585
  }
8279
8586
  });
8280
8587
  function Kt(e) {
8281
8588
  return {
8282
8589
  inheritAttrs: !1,
8283
8590
  setup(t, { attrs: s }) {
8284
- return () => Us(el, {}, { default: () => Us(e, s) });
8591
+ return () => zs(el, {}, { default: () => zs(e, s) });
8285
8592
  }
8286
8593
  };
8287
8594
  }
@@ -8299,8 +8606,8 @@ function tl(e, t) {
8299
8606
  }
8300
8607
  }
8301
8608
  let n = null;
8302
- return Nn(e, async (a) => {
8303
- a && (await Sn(), r());
8609
+ return Sn(e, async (a) => {
8610
+ a && (await Nn(), r());
8304
8611
  }), ur(() => {
8305
8612
  window.addEventListener("resize", r), n = new ResizeObserver(r), n.observe(document.body);
8306
8613
  }), Zn(() => {
@@ -8320,7 +8627,7 @@ const sl = /* @__PURE__ */ it({
8320
8627
  return (a, c) => (ct(), lr("div", {
8321
8628
  ref_key: "wrapper",
8322
8629
  ref: s,
8323
- style: zn(n.value)
8630
+ style: Un(n.value)
8324
8631
  }, [
8325
8632
  cr(a.$slots, "default")
8326
8633
  ], 4));
@@ -8330,9 +8637,9 @@ const sl = /* @__PURE__ */ it({
8330
8637
  setup(e) {
8331
8638
  return (t, s) => {
8332
8639
  const r = Fs("FmCircularProgress");
8333
- return ct(), Ut(sl, null, {
8334
- default: Un(() => [
8335
- Ze("div", rl, [
8640
+ return ct(), zt(sl, null, {
8641
+ default: zn(() => [
8642
+ Ue("div", rl, [
8336
8643
  Wn(r, { size: "xl" })
8337
8644
  ])
8338
8645
  ]),
@@ -8340,7 +8647,7 @@ const sl = /* @__PURE__ */ it({
8340
8647
  });
8341
8648
  };
8342
8649
  }
8343
- }), we = (e) => Ln({
8650
+ }), Be = (e) => Ln({
8344
8651
  loader: e,
8345
8652
  loadingComponent: nl
8346
8653
  });
@@ -8354,10 +8661,10 @@ const Et = (e) => ({
8354
8661
  }
8355
8662
  ]
8356
8663
  }
8357
- }), al = Kt(we(() => import("./Main-Dtw5H3tG.js"))), ol = Kt(we(() => import("./Main-CCIwJYOT.js"))), il = Kt(
8358
- we(() => import("./AuditLogList-B0qIy_XA.js"))
8359
- ), cl = Kt(we(() => import("./Main-Bjo-Zb4r.js"))), ll = we(() => import("./ApprovalCodeList-S4hLycQ7.js")), ul = we(() => import("./GrantUserList-gcgVZRFe.js")), Al = we(() => import("./EmployeeList-DVK6TFh7.js")), dl = we(() => import("./RoleList-Du18kaOT.js")), ml = we(() => import("./TimesheetList-CbVxR3Nh.js")), gl = we(() => import("./TeamMemberList-2vosaS6u.js")), pl = we(
8360
- () => import("./PermissionSetList-BfCrgZQi.js")
8664
+ }), al = Kt(Be(() => import("./Main-tQ6MrkkP.js"))), ol = Kt(Be(() => import("./Main-DyZ6dJ2d.js"))), il = Kt(
8665
+ Be(() => import("./AuditLogList-CpKIq8I0.js"))
8666
+ ), cl = Kt(Be(() => import("./Main-CHHR0r5b.js"))), ll = Be(() => import("./ApprovalCodeList-DZajn7xx.js")), ul = Be(() => import("./GrantUserList-735upmIE.js")), Al = Be(() => import("./EmployeeList-DDuxDdlJ.js")), dl = Be(() => import("./RoleList-BZbEGpCi.js")), ml = Be(() => import("./TimesheetList-DMnNVVlB.js")), gl = Be(() => import("./TeamMemberList-B58boeR9.js")), pl = Be(
8667
+ () => import("./PermissionSetList-ZxLNYPEB.js")
8361
8668
  ), Fl = [
8362
8669
  {
8363
8670
  path: "/",
@@ -8515,9 +8822,9 @@ const Et = (e) => ({
8515
8822
  c.value !== l && (c.value = l);
8516
8823
  }), (l, y) => {
8517
8824
  const h = Fs("FmCollapsibleTabs");
8518
- return ct(), Ut(h, {
8825
+ return ct(), zt(h, {
8519
8826
  modelValue: c.value,
8520
- "onUpdate:modelValue": y[0] || (y[0] = (B) => c.value = B),
8827
+ "onUpdate:modelValue": y[0] || (y[0] = (w) => c.value = w),
8521
8828
  items: a.value,
8522
8829
  class: "py-16"
8523
8830
  }, null, 8, ["modelValue", "items"]);
@@ -8568,7 +8875,7 @@ var Vs = { exports: {} };
8568
8875
  b(j);
8569
8876
  }
8570
8877
  }
8571
- function P(k) {
8878
+ function G(k) {
8572
8879
  try {
8573
8880
  F(g.throw(k));
8574
8881
  } catch (j) {
@@ -8577,9 +8884,9 @@ var Vs = { exports: {} };
8577
8884
  }
8578
8885
  function F(k) {
8579
8886
  var j;
8580
- k.done ? A(k.value) : (j = k.value, j instanceof i ? j : new i(function(U) {
8581
- U(j);
8582
- })).then(M, P);
8887
+ k.done ? A(k.value) : (j = k.value, j instanceof i ? j : new i(function(z) {
8888
+ z(j);
8889
+ })).then(M, G);
8583
8890
  }
8584
8891
  F((g = g.apply(f, [])).next());
8585
8892
  });
@@ -8589,10 +8896,10 @@ var Vs = { exports: {} };
8589
8896
  if (1 & A[0]) throw A[1];
8590
8897
  return A[1];
8591
8898
  }, trys: [], ops: [] };
8592
- return b = { next: P(0), throw: P(1), return: P(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
8899
+ return b = { next: G(0), throw: G(1), return: G(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
8593
8900
  return this;
8594
8901
  }), b;
8595
- function P(F) {
8902
+ function G(F) {
8596
8903
  return function(k) {
8597
8904
  return function(j) {
8598
8905
  if (i) throw new TypeError("Generator is already executing.");
@@ -8632,8 +8939,8 @@ var Vs = { exports: {} };
8632
8939
  continue;
8633
8940
  }
8634
8941
  j = u.call(f, M);
8635
- } catch (U) {
8636
- j = [6, U], g = 0;
8942
+ } catch (z) {
8943
+ j = [6, z], g = 0;
8637
8944
  } finally {
8638
8945
  i = A = 0;
8639
8946
  }
@@ -8679,18 +8986,18 @@ var Vs = { exports: {} };
8679
8986
  Object.keys(u || {}).includes(g) || i.push(g);
8680
8987
  }), Object.keys(i).length ? i : null;
8681
8988
  }
8682
- var B, O;
8683
- function N(f, u, i) {
8989
+ var w, O;
8990
+ function S(f, u, i) {
8684
8991
  var g = "shortString", A = !0;
8685
8992
  typeof i == "number" && (g = "javaDouble", A = !1), f[g] = f[g] || {}, f[g][u] = A ? i + "" : i;
8686
8993
  }
8687
- function z(f) {
8994
+ function U(f) {
8688
8995
  return !!f && typeof f == "object" && f.value !== void 0;
8689
8996
  }
8690
8997
  function $(f) {
8691
8998
  return Object.fromEntries(Object.entries(f).map(function(u) {
8692
8999
  var i = u[0], g = u[1];
8693
- return [i, z(g) ? g : { value: g }];
9000
+ return [i, U(g) ? g : { value: g }];
8694
9001
  }));
8695
9002
  }
8696
9003
  function re(f) {
@@ -8698,15 +9005,15 @@ var Vs = { exports: {} };
8698
9005
  }
8699
9006
  (function(f) {
8700
9007
  f.NONE = "NONE", f.DEFAULT_FLAGS = "DEFAULT_FLAGS", f.CACHE = "CACHE", f.SERVER = "SERVER";
8701
- })(B || (B = {}));
8702
- var me, ne = null, Jt = "FLAGSMITH_EVENT", be = Jt, Ne = "https://edge.api.flagsmith.com/api/v1/", lt = "flagsmith_value_", Dt = "flagsmith_enabled_", ut = "flagsmith_trait_", At = function() {
9008
+ })(w || (w = {}));
9009
+ var me, ne = null, Jt = "FLAGSMITH_EVENT", be = Jt, Se = "https://edge.api.flagsmith.com/api/v1/", lt = "flagsmith_value_", Dt = "flagsmith_enabled_", ut = "flagsmith_trait_", At = function() {
8703
9010
  function f(u) {
8704
9011
  var i = this;
8705
9012
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
8706
9013
  var g = i, A = g.api, b = g.evaluationContext;
8707
9014
  i.log("Get Flags"), i.isLoading = !0, i.loadingState.isFetching || i.setLoadingState(n(n({}, i.loadingState), { isFetching: !0 }));
8708
- var M = "".concat(i.getContext().identity), P = function(F) {
8709
- var k, j, U, ce;
9015
+ var M = "".concat(i.getContext().identity), G = function(F) {
9016
+ var k, j, z, ce;
8710
9017
  if (F && M === "".concat(i.getContext().identity)) {
8711
9018
  var Me = F.flags, ge = F.traits, ve = F.identifier;
8712
9019
  i.isLoading = !1;
@@ -8717,14 +9024,14 @@ var Vs = { exports: {} };
8717
9024
  fe[W.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: W.transient, value: W.trait_value };
8718
9025
  }), i.oldFlags = n({}, i.flags);
8719
9026
  var Ce = h(i.oldFlags, pe), dt = h((k = i.evaluationContext.identity) === null || k === void 0 ? void 0 : k.traits, fe);
8720
- if ((ve || Object.keys(fe).length) && (i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: fe }), ve && (i.evaluationContext.identity.identifier = ve)), i.flags = pe, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ce, traitsChanged: dt }, i._loadedState(null, B.SERVER)), i.datadogRum) try {
9027
+ if ((ve || Object.keys(fe).length) && (i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: fe }), ve && (i.evaluationContext.identity.identifier = ve)), i.flags = pe, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: Ce, traitsChanged: dt }, i._loadedState(null, w.SERVER)), i.datadogRum) try {
8721
9028
  if (i.datadogRum.trackTraits) {
8722
9029
  var mt = {};
8723
9030
  Object.keys(((j = i.evaluationContext.identity) === null || j === void 0 ? void 0 : j.traits) || {}).map(function(W) {
8724
9031
  mt[ut + W] = i.getTrait(W);
8725
9032
  });
8726
- var Je = n(n(n({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((U = i.evaluationContext.identity) === null || U === void 0 ? void 0 : U.identifier) }), mt);
8727
- i.log("Setting Datadog user", Je), i.datadogRum.client.setUser(Je);
9033
+ var _e = n(n(n({}, i.datadogRum.client.getUser()), { id: i.datadogRum.client.getUser().id || ((z = i.evaluationContext.identity) === null || z === void 0 ? void 0 : z.identifier) }), mt);
9034
+ i.log("Setting Datadog user", _e), i.datadogRum.client.setUser(_e);
8728
9035
  }
8729
9036
  } catch (W) {
8730
9037
  console.error(W);
@@ -8732,9 +9039,9 @@ var Vs = { exports: {} };
8732
9039
  if (i.dtrum) try {
8733
9040
  var le = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
8734
9041
  Object.keys(i.flags).map(function(W) {
8735
- N(le, lt + W, i.getValue(W, { skipAnalytics: !0 })), N(le, Dt + W, i.hasFeature(W, { skipAnalytics: !0 }));
9042
+ S(le, lt + W, i.getValue(W, { skipAnalytics: !0 })), S(le, Dt + W, i.hasFeature(W, { skipAnalytics: !0 }));
8736
9043
  }), Object.keys(((ce = i.evaluationContext.identity) === null || ce === void 0 ? void 0 : ce.traits) || {}).map(function(W) {
8737
- N(le, ut + W, i.getTrait(W));
9044
+ S(le, ut + W, i.getTrait(W));
8738
9045
  }), i.log("Sending javaLongOrObject traits to dynatrace", le.javaLongOrObject), i.log("Sending date traits to dynatrace", le.date), i.log("Sending shortString traits to dynatrace", le.shortString), i.log("Sending javaDouble to dynatrace", le.javaDouble), i.dtrum.sendSessionProperties(le.javaLongOrObject, le.date, le.shortString, le.javaDouble);
8739
9046
  } catch (W) {
8740
9047
  console.error(W);
@@ -8747,12 +9054,12 @@ var Vs = { exports: {} };
8747
9054
  }).filter(function(F) {
8748
9055
  return F.trait_value !== void 0 || (i.log("Warning - attempted to set an undefined trait value for key", F.trait_key), !1);
8749
9056
  }) })) : i.getJSON(A + "identities/?identifier=" + encodeURIComponent(b.identity.identifier) + (b.identity.transient ? "&transient=true" : ""))]).then(function(F) {
8750
- return i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: {} }), P(F == null ? void 0 : F[0]);
9057
+ return i.evaluationContext.identity = n(n({}, i.evaluationContext.identity), { traits: {} }), G(F == null ? void 0 : F[0]);
8751
9058
  }).catch(function(F) {
8752
9059
  var k = F.message, j = new Error(k);
8753
9060
  return Promise.reject(j);
8754
9061
  }) : i.getJSON(A + "flags/").then(function(F) {
8755
- return P({ flags: F, traits: void 0 });
9062
+ return G({ flags: F, traits: void 0 });
8756
9063
  });
8757
9064
  }, this.analyticsFlags = function() {
8758
9065
  var g = i.api;
@@ -8764,15 +9071,15 @@ var Vs = { exports: {} };
8764
9071
  }).catch(function(A) {
8765
9072
  i.log("Exception fetching evaluationEvent", A);
8766
9073
  }) : void 0;
8767
- }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: B.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, A, b) {
8768
- var M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], P = null;
8769
- if (M && (P = M.value), A != null && A.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), P === null && (A == null ? void 0 : A.fallback) !== void 0) return A.fallback;
9074
+ }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: w.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, A, b) {
9075
+ var M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = null;
9076
+ if (M && (G = M.value), A != null && A.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), G === null && (A == null ? void 0 : A.fallback) !== void 0) return A.fallback;
8770
9077
  if (A != null && A.json) try {
8771
- return P === null ? (i.log("Tried to parse null flag as JSON: " + g), null) : JSON.parse(P);
9078
+ return G === null ? (i.log("Tried to parse null flag as JSON: " + g), null) : JSON.parse(G);
8772
9079
  } catch {
8773
9080
  return A.fallback;
8774
9081
  }
8775
- return P;
9082
+ return G;
8776
9083
  }, this.getTrait = function(g) {
8777
9084
  var A, b;
8778
9085
  return ((A = i.evaluationContext.identity) === null || A === void 0 ? void 0 : A.traits) && ((b = i.evaluationContext.identity.traits[g.toLowerCase().replace(/ /g, "_")]) === null || b === void 0 ? void 0 : b.value);
@@ -8795,26 +9102,26 @@ var Vs = { exports: {} };
8795
9102
  }, this.setTraits = function(g) {
8796
9103
  var A;
8797
9104
  if (i.api) return i.setContext(n(n({}, i.evaluationContext), { identity: n(n({}, i.evaluationContext.identity), { traits: n(n({}, (A = i.evaluationContext.identity) === null || A === void 0 ? void 0 : A.traits), Object.fromEntries(Object.entries(g).map(function(b) {
8798
- var M = b[0], P = b[1];
8799
- return [M, z(P) ? P : { value: P }];
9105
+ var M = b[0], G = b[1];
9106
+ return [M, U(G) ? G : { value: G }];
8800
9107
  }))) }) }));
8801
9108
  console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
8802
9109
  }, this.hasFeature = function(g, A) {
8803
- var b = typeof A == "object", M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], P = !1;
8804
- return !M && b && A.fallback !== void 0 ? P = A == null ? void 0 : A.fallback : M && M.enabled && (P = !0), (b && !A.skipAnalytics || !A) && i.evaluateFlag(g, "ENABLED"), P;
9110
+ var b = typeof A == "object", M = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = !1;
9111
+ return !M && b && A.fallback !== void 0 ? G = A == null ? void 0 : A.fallback : M && M.enabled && (G = !0), (b && !A.skipAnalytics || !A) && i.evaluateFlag(g, "ENABLED"), G;
8805
9112
  }, this.getStorageKey = function() {
8806
9113
  var g, A;
8807
9114
  return ((g = i.cacheOptions) === null || g === void 0 ? void 0 : g.storageKey) || "FLAGSMITH_DB_" + ((A = i.evaluationContext.environment) === null || A === void 0 ? void 0 : A.apiKey);
8808
9115
  }, this.getJSON = function(g, A, b) {
8809
- var M, P = i;
8810
- P.evaluationContext;
8811
- var F = P.headers, k = { method: A || "GET", body: b, cache: "no-cache", headers: {} };
9116
+ var M, G = i;
9117
+ G.evaluationContext;
9118
+ var F = G.headers, k = { method: A || "GET", body: b, cache: "no-cache", headers: {} };
8812
9119
  i.evaluationContext.environment && (k.headers["X-Environment-Key"] = i.evaluationContext.environment.apiKey), A && A !== "GET" && (k.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(k.headers, F), O || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
8813
9120
  var j = "".concat((M = i.evaluationContext.identity) === null || M === void 0 ? void 0 : M.identifier);
8814
- return O(g, k).then(function(U) {
9121
+ return O(g, k).then(function(z) {
8815
9122
  var ce, Me, ge = "".concat((ce = i.evaluationContext.identity) === null || ce === void 0 ? void 0 : ce.identifier);
8816
9123
  if (j === ge) {
8817
- var ve = (Me = U.headers) === null || Me === void 0 ? void 0 : Me.get("x-flagsmith-document-updated-at");
9124
+ var ve = (Me = z.headers) === null || Me === void 0 ? void 0 : Me.get("x-flagsmith-document-updated-at");
8818
9125
  if (ve) try {
8819
9126
  var pe = parseFloat(ve);
8820
9127
  if (isNaN(pe)) return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
@@ -8822,13 +9129,13 @@ var Vs = { exports: {} };
8822
9129
  } catch (fe) {
8823
9130
  i.log(fe, "Failed to parse x-flagsmith-document-updated-at", ve);
8824
9131
  }
8825
- return i.log("Fetch response: " + U.status + " " + (A || "GET") + 0 + g), U.text().then(function(fe) {
9132
+ return i.log("Fetch response: " + z.status + " " + (A || "GET") + 0 + g), z.text().then(function(fe) {
8826
9133
  var Ce = fe;
8827
9134
  try {
8828
9135
  Ce = JSON.parse(fe);
8829
9136
  } catch {
8830
9137
  }
8831
- return !Ce && U.status && (Ce = "API Response: ".concat(U.status)), U.status && U.status >= 200 && U.status < 300 ? Ce : Promise.reject(new Error(Ce));
9138
+ return !Ce && z.status && (Ce = "API Response: ".concat(z.status)), z.status && z.status >= 200 && z.status < 300 ? Ce : Promise.reject(new Error(Ce));
8832
9139
  });
8833
9140
  }
8834
9141
  i.log("Received response with identity mismatch, ignoring response. Requested: ".concat(j, ", Current: ").concat(ge));
@@ -8840,39 +9147,39 @@ var Vs = { exports: {} };
8840
9147
  }
8841
9148
  i.updateEventStorage();
8842
9149
  }, this._onChange = function(g, A, b) {
8843
- var M, P;
8844
- i.setLoadingState(b), (M = i.onChange) === null || M === void 0 || M.call(i, g, A, i.loadingState), (P = i._trigger) === null || P === void 0 || P.call(i);
9150
+ var M, G;
9151
+ i.setLoadingState(b), (M = i.onChange) === null || M === void 0 || M.call(i, g, A, i.loadingState), (G = i._trigger) === null || G === void 0 || G.call(i);
8845
9152
  }, O = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : bt == null ? void 0 : bt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (me = u.eventSource), u.AsyncStorage && (ne = u.AsyncStorage);
8846
9153
  }
8847
9154
  return f.prototype.init = function(u) {
8848
9155
  var i, g, A;
8849
9156
  return a(this, void 0, void 0, function() {
8850
- var b, M, P, F, k, j, U, ce, Me, ge, ve, pe, fe, Ce, dt, mt, Je, le, W, _t, gt, Qs, _e, $t, ks, Ts, es, Ns, ts, pt, $e, Ss, ue = this;
8851
- return c(this, function(Be) {
8852
- switch (Be.label) {
9157
+ var b, M, G, F, k, j, z, ce, Me, ge, ve, pe, fe, Ce, dt, mt, _e, le, W, _t, gt, Qs, $e, $t, ks, Ts, es, Ss, ts, pt, et, Ns, ue = this;
9158
+ return c(this, function(we) {
9159
+ switch (we.label) {
8853
9160
  case 0:
8854
- b = re(u.evaluationContext || this.evaluationContext), Be.label = 1;
9161
+ b = re(u.evaluationContext || this.evaluationContext), we.label = 1;
8855
9162
  case 1:
8856
- if (Be.trys.push([1, 13, , 14]), M = u.environmentID, P = u.api, F = P === void 0 ? Ne : P, k = u.headers, j = u.onChange, U = u.cacheFlags, ce = u.datadogRum, Me = u.onError, ge = u.defaultFlags, ve = u.fetch, pe = u.preventFetch, fe = u.enableLogs, Ce = u.enableDynatrace, dt = u.enableAnalytics, mt = u.realtime, Je = u.eventSourceUrl, le = Je === void 0 ? "https://realtime.flagsmith.com/" : Je, W = u.AsyncStorage, _t = u.identity, gt = u.traits, Qs = u.state, _e = u.cacheOptions, $t = u.angularHttpClient, ks = u._trigger, Ts = u._triggerLoadingState, b.environment = M ? { apiKey: M } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
9163
+ if (we.trys.push([1, 13, , 14]), M = u.environmentID, G = u.api, F = G === void 0 ? Se : G, k = u.headers, j = u.onChange, z = u.cacheFlags, ce = u.datadogRum, Me = u.onError, ge = u.defaultFlags, ve = u.fetch, pe = u.preventFetch, fe = u.enableLogs, Ce = u.enableDynatrace, dt = u.enableAnalytics, mt = u.realtime, _e = u.eventSourceUrl, le = _e === void 0 ? "https://realtime.flagsmith.com/" : _e, W = u.AsyncStorage, _t = u.identity, gt = u.traits, Qs = u.state, $e = u.cacheOptions, $t = u.angularHttpClient, ks = u._trigger, Ts = u._triggerLoadingState, b.environment = M ? { apiKey: M } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
8857
9164
  if (b.identity = _t || gt ? { identifier: _t, traits: gt ? Object.fromEntries(Object.entries(gt).map(function(he) {
8858
9165
  return [he[0], { value: he[1] }];
8859
9166
  })) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = k, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, es = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = ks || this._trigger, this._triggerLoadingState = Ts || this._triggerLoadingState, this.onError = function(he) {
8860
9167
  ue.setLoadingState(n(n({}, ue.loadingState), { isFetching: !1, isLoading: !1, error: he })), Me == null || Me(he);
8861
- }, this.enableLogs = fe || !1, this.cacheOptions = _e ? { skipAPI: !!_e.skipAPI, ttl: _e.ttl || 0, storageKey: _e.storageKey, loadStale: !!_e.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."), ve && (O = ve), this.enableAnalytics = dt || !1, this.flags = Object.assign({}, ge) || {}, this.datadogRum = ce || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ne !== void 0 && !!U, be = "FLAGSMITH_EVENT_" + b.environment.apiKey, W && (ne = W), mt && typeof window < "u" && this.setupRealtime(le, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = n(n({}, this.loadingState), { isLoading: !1, source: B.DEFAULT_FLAGS })), this.setState(Qs), this.log("Initialising with properties", u, this), Ce && (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), $t && (O = /* @__PURE__ */ function(he) {
9168
+ }, this.enableLogs = fe || !1, this.cacheOptions = $e ? { skipAPI: !!$e.skipAPI, ttl: $e.ttl || 0, storageKey: $e.storageKey, loadStale: !!$e.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."), ve && (O = ve), this.enableAnalytics = dt || !1, this.flags = Object.assign({}, ge) || {}, this.datadogRum = ce || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ne !== void 0 && !!z, be = "FLAGSMITH_EVENT_" + b.environment.apiKey, W && (ne = W), mt && typeof window < "u" && this.setupRealtime(le, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = n(n({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Qs), this.log("Initialising with properties", u, this), Ce && (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), $t && (O = /* @__PURE__ */ function(he) {
8862
9169
  return function(De, xe) {
8863
- var Ie = xe.headers, K = xe.method, et = xe.body;
8864
- return new Promise(function(Se) {
9170
+ var Ie = xe.headers, K = xe.method, tt = xe.body;
9171
+ return new Promise(function(Ne) {
8865
9172
  switch (K) {
8866
9173
  case "GET":
8867
9174
  return he.get(De, { headers: Ie }).subscribe(function(Oe) {
8868
- Se({ ok: !0, text: function() {
9175
+ Ne({ ok: !0, text: function() {
8869
9176
  return Promise.resolve(Oe);
8870
9177
  } });
8871
9178
  });
8872
9179
  case "POST":
8873
9180
  case "PUT":
8874
- return he.post(De, et, { headers: Ie }).subscribe(function(Oe) {
8875
- Se({ ok: !0, text: function() {
9181
+ return he.post(De, tt, { headers: Ie }).subscribe(function(Oe) {
9182
+ Ne({ ok: !0, text: function() {
8876
9183
  return Promise.resolve(Oe);
8877
9184
  } });
8878
9185
  });
@@ -8894,20 +9201,20 @@ var Vs = { exports: {} };
8894
9201
  ue.log("Retrieved events from cache", De), ue.setState(n(n({}, Ie), { evaluationEvent: xe[ue.evaluationContext.environment.apiKey] }));
8895
9202
  }
8896
9203
  }
8897
- })), !U) return [3, 9];
9204
+ })), !z) return [3, 9];
8898
9205
  if (!ne || !this.canUseStorage) return [3, 8];
8899
- Ns = function(he, De) {
9206
+ Ss = function(he, De) {
8900
9207
  return a(ue, void 0, void 0, function() {
8901
- var xe, Ie, K, et, Se, Oe, ss, Zs, rs, ns, as, os, is, cs, ls, us, As, ds, ms, gs, ps, fs, hs, ys, zs = this;
9208
+ var xe, Ie, K, tt, Ne, Oe, ss, Zs, rs, ns, as, os, is, cs, ls, us, As, ds, ms, gs, ps, fs, hs, ys, Us = this;
8902
9209
  return c(this, function(He) {
8903
9210
  switch (He.label) {
8904
9211
  case 0:
8905
9212
  if (!De) return [3, 7];
8906
9213
  xe = null, Ie = null, He.label = 1;
8907
9214
  case 1:
8908
- return He.trys.push([1, 5, , 6]), K = JSON.parse(De), et = !1, Se = !1, K && K.api === this.api && ((ns = (rs = K.evaluationContext) === null || rs === void 0 ? void 0 : rs.environment) === null || ns === void 0 ? void 0 : ns.apiKey) === ((as = this.evaluationContext.environment) === null || as === void 0 ? void 0 : as.apiKey) && (Oe = !0, this.evaluationContext.identity && ((is = (os = K.evaluationContext) === null || os === void 0 ? void 0 : os.identity) === null || is === void 0 ? void 0 : is.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((ls = (cs = K.evaluationContext) === null || cs === void 0 ? void 0 : cs.identity) === null || ls === void 0 ? void 0 : ls.identifier) + " to " + this.evaluationContext.identity.identifier), Oe = !1), this.cacheOptions.ttl && (!K.ts || (/* @__PURE__ */ new Date()).valueOf() - K.ts > this.cacheOptions.ttl) && (K.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Oe = !1) : K.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Se = !0, Oe = !0)), Oe && (et = !0, Ie = h((us = this.evaluationContext.identity) === null || us === void 0 ? void 0 : us.traits, (ds = (As = K.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || ds === void 0 ? void 0 : ds.traits), xe = h(this.flags, K.flags), this.setState(n(n({}, K), { evaluationContext: re(n(n({}, K.evaluationContext), { identity: !((ms = K.evaluationContext) === null || ms === void 0) && ms.identity ? n(n({}, (gs = K.evaluationContext) === null || gs === void 0 ? void 0 : gs.identity), { traits: n(n({}, ((fs = (ps = K.evaluationContext) === null || ps === void 0 ? void 0 : ps.identity) === null || fs === void 0 ? void 0 : fs.traits) || {}), gt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", K))), et ? (ss = !pe && (!this.cacheOptions.skipAPI || Se), this._onChange(null, { isFromServer: !1, flagsChanged: xe, traitsChanged: Ie }, this._loadedState(null, B.CACHE, ss)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && et && !Se && this.log("Skipping API, using cache"), ss && this.getFlags().catch(function(Hn) {
9215
+ return He.trys.push([1, 5, , 6]), K = JSON.parse(De), tt = !1, Ne = !1, K && K.api === this.api && ((ns = (rs = K.evaluationContext) === null || rs === void 0 ? void 0 : rs.environment) === null || ns === void 0 ? void 0 : ns.apiKey) === ((as = this.evaluationContext.environment) === null || as === void 0 ? void 0 : as.apiKey) && (Oe = !0, this.evaluationContext.identity && ((is = (os = K.evaluationContext) === null || os === void 0 ? void 0 : os.identity) === null || is === void 0 ? void 0 : is.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((ls = (cs = K.evaluationContext) === null || cs === void 0 ? void 0 : cs.identity) === null || ls === void 0 ? void 0 : ls.identifier) + " to " + this.evaluationContext.identity.identifier), Oe = !1), this.cacheOptions.ttl && (!K.ts || (/* @__PURE__ */ new Date()).valueOf() - K.ts > this.cacheOptions.ttl) && (K.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Oe = !1) : K.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + K.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - K.ts) + "ms"), Ne = !0, Oe = !0)), Oe && (tt = !0, Ie = h((us = this.evaluationContext.identity) === null || us === void 0 ? void 0 : us.traits, (ds = (As = K.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || ds === void 0 ? void 0 : ds.traits), xe = h(this.flags, K.flags), this.setState(n(n({}, K), { evaluationContext: re(n(n({}, K.evaluationContext), { identity: !((ms = K.evaluationContext) === null || ms === void 0) && ms.identity ? n(n({}, (gs = K.evaluationContext) === null || gs === void 0 ? void 0 : gs.identity), { traits: n(n({}, ((fs = (ps = K.evaluationContext) === null || ps === void 0 ? void 0 : ps.identity) === null || fs === void 0 ? void 0 : fs.traits) || {}), gt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", K))), tt ? (ss = !pe && (!this.cacheOptions.skipAPI || Ne), this._onChange(null, { isFromServer: !1, flagsChanged: xe, traitsChanged: Ie }, this._loadedState(null, w.CACHE, ss)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && tt && !Ne && this.log("Skipping API, using cache"), ss && this.getFlags().catch(function(Hn) {
8909
9216
  var bs;
8910
- (bs = zs.onError) === null || bs === void 0 || bs.call(zs, Hn);
9217
+ (bs = Us.onError) === null || bs === void 0 || bs.call(Us, Hn);
8911
9218
  }), [3, 4]) : [3, 2];
8912
9219
  case 2:
8913
9220
  return pe ? [3, 4] : [4, this.getFlags()];
@@ -8924,10 +9231,10 @@ var Vs = { exports: {} };
8924
9231
  case 8:
8925
9232
  return He.sent(), [3, 10];
8926
9233
  case 9:
8927
- if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (hs = this.evaluationContext.identity) === null || hs === void 0 ? void 0 : hs.traits) }, this._loadedState(null, B.DEFAULT_FLAGS));
9234
+ if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (hs = this.evaluationContext.identity) === null || hs === void 0 ? void 0 : hs.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
8928
9235
  else {
8929
9236
  if (!this.flags) throw new Error(es);
8930
- this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (ys = this.evaluationContext.identity) === null || ys === void 0 ? void 0 : ys.traits) }, this._loadedState(null, B.DEFAULT_FLAGS));
9237
+ this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (ys = this.evaluationContext.identity) === null || ys === void 0 ? void 0 : ys.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
8931
9238
  }
8932
9239
  He.label = 10;
8933
9240
  case 10:
@@ -8935,32 +9242,32 @@ var Vs = { exports: {} };
8935
9242
  }
8936
9243
  });
8937
9244
  });
8938
- }, Be.label = 2;
9245
+ }, we.label = 2;
8939
9246
  case 2:
8940
- return Be.trys.push([2, 7, , 8]), ne.getItemSync ? (ts = ne.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
9247
+ return we.trys.push([2, 7, , 8]), ne.getItemSync ? (ts = ne.getItemSync(this.getStorageKey()), [3, 5]) : [3, 3];
8941
9248
  case 3:
8942
9249
  return [4, ne.getItem(this.getStorageKey())];
8943
9250
  case 4:
8944
- ts = Be.sent(), Be.label = 5;
9251
+ ts = we.sent(), we.label = 5;
8945
9252
  case 5:
8946
- return [4, Ns(null, ts)];
9253
+ return [4, Ss(null, ts)];
8947
9254
  case 6:
8948
9255
  case 7:
8949
- return Be.sent(), [3, 8];
9256
+ return we.sent(), [3, 8];
8950
9257
  case 8:
8951
9258
  return [3, 12];
8952
9259
  case 9:
8953
9260
  return pe ? [3, 11] : [4, this.getFlags()];
8954
9261
  case 10:
8955
- return Be.sent(), [3, 12];
9262
+ return we.sent(), [3, 12];
8956
9263
  case 11:
8957
- if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, ge), traitsChanged: h({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null, B.DEFAULT_FLAGS));
8958
- else if (this.flags && (pt = null, Object.keys(this.flags).length === 0 && (pt = es), this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(pt, B.DEFAULT_FLAGS)), pt)) throw new Error(pt);
8959
- Be.label = 12;
9264
+ if (ge) this._onChange(null, { isFromServer: !1, flagsChanged: h({}, ge), traitsChanged: h({}, (i = b.identity) === null || i === void 0 ? void 0 : i.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
9265
+ else if (this.flags && (pt = null, Object.keys(this.flags).length === 0 && (pt = es), this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (g = b.identity) === null || g === void 0 ? void 0 : g.traits) }, this._loadedState(pt, w.DEFAULT_FLAGS)), pt)) throw new Error(pt);
9266
+ we.label = 12;
8960
9267
  case 12:
8961
9268
  return [3, 14];
8962
9269
  case 13:
8963
- throw $e = Be.sent(), this.log("Error during initialisation ", $e), Ss = $e instanceof Error ? $e : new Error("".concat($e)), (A = this.onError) === null || A === void 0 || A.call(this, Ss), $e;
9270
+ throw et = we.sent(), this.log("Error during initialisation ", et), Ns = et instanceof Error ? et : new Error("".concat(et)), (A = this.onError) === null || A === void 0 || A.call(this, Ns), et;
8964
9271
  case 14:
8965
9272
  return [2];
8966
9273
  }
@@ -8971,12 +9278,12 @@ var Vs = { exports: {} };
8971
9278
  }, f.prototype.identify = function(u, i, g) {
8972
9279
  return this.evaluationContext.identity = { identifier: u, transient: g, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == u ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = u, this.log("Identify: " + this.evaluationContext.identity.identifier), i && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(i).map(function(A) {
8973
9280
  var b = A[0], M = A[1];
8974
- return [b, z(M) ? M : { value: M }];
9281
+ return [b, U(M) ? M : { value: M }];
8975
9282
  }))), this.initialised ? this.getFlags() : Promise.resolve();
8976
9283
  }, f.prototype.getState = function() {
8977
9284
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
8978
9285
  }, f.prototype.setState = function(u) {
8979
- u && (this.initialised = !0, this.api = u.api || this.api || Ne, this.flags = u.flags || this.flags, this.evaluationContext = u.evaluationContext || this.evaluationContext, this.evaluationEvent = u.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
9286
+ u && (this.initialised = !0, this.api = u.api || this.api || Se, this.flags = u.flags || this.flags, this.evaluationContext = u.evaluationContext || this.evaluationContext, this.evaluationEvent = u.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
8980
9287
  }, f.prototype.logout = function() {
8981
9288
  return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
8982
9289
  }, f.prototype.startListening = function(u) {
@@ -9010,8 +9317,8 @@ var Vs = { exports: {} };
9010
9317
  var M;
9011
9318
  try {
9012
9319
  M = JSON.parse(b.data).updated_at;
9013
- } catch (P) {
9014
- g.log("Could not parse sse event", P);
9320
+ } catch (G) {
9321
+ g.log("Could not parse sse event", G);
9015
9322
  }
9016
9323
  M ? !g.timestamp || M > g.timestamp ? g.isLoading ? g.log("updated_at is new, but flags are loading", b.data, g.timestamp) : (g.log("updated_at is new, fetching flags", b.data, g.timestamp), g.getFlags()) : g.log("updated_at is outdated, skipping get flags", b.data, g.timestamp) : g.log("No updated_at received, fetching flags", b);
9017
9324
  })) : this.log("Error, EventSource is undefined");
@@ -9021,7 +9328,7 @@ var Vs = { exports: {} };
9021
9328
  var u = f.fetch, i = f.AsyncStorage, g = f.eventSource;
9022
9329
  return new At({ fetch: u, AsyncStorage: i, eventSource: g });
9023
9330
  }
9024
- var p, w = (p = function(f, u) {
9331
+ var p, B = (p = function(f, u) {
9025
9332
  return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, g) {
9026
9333
  i.__proto__ = g;
9027
9334
  } || function(i, g) {
@@ -9046,8 +9353,8 @@ var Vs = { exports: {} };
9046
9353
  var g, A, b = i.call(f), M = [];
9047
9354
  try {
9048
9355
  for (; (u === void 0 || u-- > 0) && !(g = b.next()).done; ) M.push(g.value);
9049
- } catch (P) {
9050
- A = { error: P };
9356
+ } catch (G) {
9357
+ A = { error: G };
9051
9358
  } finally {
9052
9359
  try {
9053
9360
  g && !g.done && (i = b.return) && i.call(b);
@@ -9056,7 +9363,7 @@ var Vs = { exports: {} };
9056
9363
  }
9057
9364
  }
9058
9365
  return M;
9059
- }, G = function(f, u, i) {
9366
+ }, Y = function(f, u, i) {
9060
9367
  if (arguments.length === 2) for (var g, A = 0, b = u.length; A < b; A++) !g && A in u || (g || (g = Array.prototype.slice.call(u, 0, A)), g[A] = u[A]);
9061
9368
  return f.concat(g || Array.prototype.slice.call(u));
9062
9369
  }, q = function(f) {
@@ -9064,7 +9371,7 @@ var Vs = { exports: {} };
9064
9371
  return f.call(this, `EventSource not available.
9065
9372
  Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
9066
9373
  }
9067
- return w(u, f), u;
9374
+ return B(u, f), u;
9068
9375
  }(Error), R = function() {
9069
9376
  function f(u, i) {
9070
9377
  var g = this;
@@ -9086,8 +9393,8 @@ Consider loading an EventSource polyfill and making it available globally as Eve
9086
9393
  };
9087
9394
  try {
9088
9395
  for (var b = D(Object.keys(this._listeners)), M = b.next(); !M.done; M = b.next()) {
9089
- var P = M.value;
9090
- this._eventSource.addEventListener(P, this._onevent_wrapped);
9396
+ var G = M.value;
9397
+ this._eventSource.addEventListener(G, this._onevent_wrapped);
9091
9398
  }
9092
9399
  } catch (F) {
9093
9400
  u = { error: F };
@@ -9114,10 +9421,10 @@ Consider loading an EventSource polyfill and making it available globally as Eve
9114
9421
  u && u.lastEventId && (this._lastEventId = u.lastEventId);
9115
9422
  var A = this._listeners[u.type];
9116
9423
  if (A != null) try {
9117
- for (var b = D(G([], E(A), !1)), M = b.next(); !M.done; M = b.next())
9424
+ for (var b = D(Y([], E(A), !1)), M = b.next(); !M.done; M = b.next())
9118
9425
  M.value.call(this, u);
9119
- } catch (P) {
9120
- i = { error: P };
9426
+ } catch (G) {
9427
+ i = { error: G };
9121
9428
  } finally {
9122
9429
  try {
9123
9430
  M && !M.done && (g = b.return) && g.call(b);
@@ -9134,7 +9441,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
9134
9441
  }, f.prototype.addEventListener = function(u, i, g) {
9135
9442
  this._listeners[u] == null && (this._listeners[u] = [], this._eventSource != null && this._eventSource.addEventListener(u, this._onevent_wrapped));
9136
9443
  var A = this._listeners[u];
9137
- A.includes(i) || (this._listeners[u] = G(G([], E(A), !1), [i], !1));
9444
+ A.includes(i) || (this._listeners[u] = Y(Y([], E(A), !1), [i], !1));
9138
9445
  }, f.prototype.removeEventListener = function(u, i, g) {
9139
9446
  var A = this._listeners[u];
9140
9447
  this._listeners[u] = A.filter(function(b) {
@@ -9145,7 +9452,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
9145
9452
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
9146
9453
  var _ = function(f, u) {
9147
9454
  return u = u || {}, new Promise(function(i, g) {
9148
- var A = new XMLHttpRequest(), b = [], M = [], P = {}, F = function() {
9455
+ var A = new XMLHttpRequest(), b = [], M = [], G = {}, F = function() {
9149
9456
  return { ok: (A.status / 100 | 0) == 2, statusText: A.statusText, status: A.status, url: A.responseURL, text: function() {
9150
9457
  return Promise.resolve(A.responseText);
9151
9458
  }, json: function() {
@@ -9157,14 +9464,14 @@ Consider loading an EventSource polyfill and making it available globally as Eve
9157
9464
  }, entries: function() {
9158
9465
  return M;
9159
9466
  }, get: function(j) {
9160
- return P[j.toLowerCase()];
9467
+ return G[j.toLowerCase()];
9161
9468
  }, has: function(j) {
9162
- return j.toLowerCase() in P;
9469
+ return j.toLowerCase() in G;
9163
9470
  } } };
9164
9471
  };
9165
9472
  for (var k in A.open(u.method || "get", f, !0), A.onload = function() {
9166
- A.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, U, ce) {
9167
- b.push(U = U.toLowerCase()), M.push([U, ce]), P[U] = P[U] ? P[U] + "," + ce : ce;
9473
+ A.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, z, ce) {
9474
+ b.push(z = z.toLowerCase()), M.push([z, ce]), G[z] = G[z] ? G[z] + "," + ce : ce;
9168
9475
  }), i(F());
9169
9476
  }, A.onerror = g, A.withCredentials = u.credentials == "include", u.headers) A.setRequestHeader(k, u.headers[k]);
9170
9477
  A.send(u.body || null);
@@ -9279,57 +9586,57 @@ var hl = Vs.exports, yl = {
9279
9586
  reset() {
9280
9587
  this.flagsmithClient = null, this.userContext = null;
9281
9588
  }
9282
- }, xt(je, "instance"), je), vl = bl.getInstance(), ht = Qe(!1), Yt = Qe([]), st = Qe(null);
9283
- function Bl(e = vl) {
9284
- const t = () => ht.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (B, O = []) => {
9589
+ }, xt(je, "instance"), je), vl = bl.getInstance(), ht = Qe(!1), Pt = Qe([]), st = Qe(null);
9590
+ function wl(e = vl) {
9591
+ const t = () => ht.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (w, O = []) => {
9285
9592
  if (ht.value) {
9286
9593
  console.warn("FeatureFlag is already initialized.");
9287
9594
  return;
9288
9595
  }
9289
9596
  try {
9290
- await e.init(B, O), Yt.value = await e.getFlags(), ht.value = !0, st.value = null;
9291
- } catch (N) {
9292
- console.error("Failed to initialize feature flags:", N), st.value = N;
9597
+ await e.init(w, O), Pt.value = await e.getFlags(), ht.value = !0, st.value = null;
9598
+ } catch (S) {
9599
+ console.error("Failed to initialize feature flags:", S), st.value = S;
9293
9600
  }
9294
- }, r = async (B) => {
9601
+ }, r = async (w) => {
9295
9602
  if (t())
9296
9603
  try {
9297
- await e.setUser(B), Yt.value = await e.getFlags(), st.value = null;
9604
+ await e.setUser(w), Pt.value = await e.getFlags(), st.value = null;
9298
9605
  } catch (O) {
9299
9606
  console.error("Failed to set user:", O), st.value = O;
9300
9607
  }
9301
- }, n = async (B) => r(`${or}-${B}`), a = (B, O, N = null) => {
9302
- if (!t()) return N;
9608
+ }, n = async (w) => r(`${or}-${w}`), a = (w, O, S = null) => {
9609
+ if (!t()) return S;
9303
9610
  try {
9304
- return e.getFlagValue(B, O) ?? N;
9305
- } catch (z) {
9306
- return console.error(`Error getting flag value for ${B}:`, z), N;
9611
+ return e.getFlagValue(w, O) ?? S;
9612
+ } catch (U) {
9613
+ return console.error(`Error getting flag value for ${w}:`, U), S;
9307
9614
  }
9308
- }, c = (B, O) => {
9615
+ }, c = (w, O) => {
9309
9616
  if (!t()) return O ?? null;
9310
9617
  try {
9311
- return e.getFlag(B) ?? O ?? null;
9312
- } catch (N) {
9313
- return console.error(`Error getting flag for ${B}:`, N), O ?? null;
9618
+ return e.getFlag(w) ?? O ?? null;
9619
+ } catch (S) {
9620
+ return console.error(`Error getting flag for ${w}:`, S), O ?? null;
9314
9621
  }
9315
- }, l = async (B, O, N = null, z) => {
9316
- if (!t()) return N;
9622
+ }, l = async (w, O, S = null, U) => {
9623
+ if (!t()) return S;
9317
9624
  try {
9318
- return await e.getUserFlagValue(B, O, N, z);
9625
+ return await e.getUserFlagValue(w, O, S, U);
9319
9626
  } catch ($) {
9320
- return console.error(`Error getting user flag value for ${O}:`, $), N;
9627
+ return console.error(`Error getting user flag value for ${O}:`, $), S;
9321
9628
  }
9322
- }, y = async (B, O, N = null, z) => l(`${or}-${B}`, O, N, z), h = () => {
9629
+ }, y = async (w, O, S = null, U) => l(`${or}-${w}`, O, S, U), h = () => {
9323
9630
  try {
9324
9631
  e.reset();
9325
- } catch (B) {
9326
- console.error("Error resetting feature flags:", B);
9632
+ } catch (w) {
9633
+ console.error("Error resetting feature flags:", w);
9327
9634
  } finally {
9328
- Yt.value = [], ht.value = !1, st.value = null;
9635
+ Pt.value = [], ht.value = !1, st.value = null;
9329
9636
  }
9330
9637
  };
9331
9638
  return {
9332
- flags: vs(Yt),
9639
+ flags: vs(Pt),
9333
9640
  isInitialized: vs(ht),
9334
9641
  error: vs(st),
9335
9642
  init: s,
@@ -9342,18 +9649,18 @@ function Bl(e = vl) {
9342
9649
  reset: h
9343
9650
  };
9344
9651
  }
9345
- var wl = () => Bl();
9652
+ var Bl = () => wl();
9346
9653
  const ql = /* @__PURE__ */ it({
9347
9654
  __name: "App",
9348
9655
  setup(e) {
9349
- const t = Ar(), { init: s } = wl();
9656
+ const t = Ar(), { init: s } = Bl();
9350
9657
  return ur(async () => {
9351
9658
  t.registerSidebarComponent(fl), await s({
9352
9659
  apiKey: t.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
9353
9660
  });
9354
9661
  }), (r, n) => {
9355
9662
  const a = Fs("RouterView");
9356
- return ct(), Ut(a);
9663
+ return ct(), zt(a);
9357
9664
  };
9358
9665
  }
9359
9666
  }), Il = () => {
@@ -9378,18 +9685,19 @@ const ql = /* @__PURE__ */ it({
9378
9685
  );
9379
9686
  };
9380
9687
  export {
9381
- Yl as A,
9688
+ Pl as A,
9382
9689
  Vl as G,
9690
+ Ua as O,
9383
9691
  ic as P,
9384
9692
  te as R,
9385
- Gl as S,
9386
- Sa as U,
9693
+ Yl as S,
9694
+ Na as U,
9387
9695
  sl as _,
9388
9696
  nl as a,
9389
- Pl as b,
9697
+ v as b,
9390
9698
  bt as c,
9391
- yt as d,
9392
- za as e,
9699
+ Gl as d,
9700
+ yt as e,
9393
9701
  El as f,
9394
9702
  cc as g,
9395
9703
  Ec as h,
@@ -9399,6 +9707,5 @@ export {
9399
9707
  Ol as m,
9400
9708
  o as n,
9401
9709
  Fl as r,
9402
- wl as u,
9403
- v
9710
+ Bl as u
9404
9711
  };