@feedmepos/mf-hrm-portal 2.1.0-dev.3 → 2.1.1-dev
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.
- package/dist/{AuditLogList-C8VefmfL.js → AuditLogList-Cvp-5_0y.js} +4 -4
- package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-B25U2YoL.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-Cb8-YaiH.js} +104 -100
- package/dist/{EmployeeList-DDY8DxQr.js → EmployeeList-DgrD3Hjm.js} +6 -6
- package/dist/{Main-D8zj09ZS.js → Main-BLRr_ORG.js} +9 -9
- package/dist/{Main-BQ36wEVl.js → Main-G3am-0Xi.js} +4 -4
- package/dist/{Main-D7xrzW8p.js → Main-mTxcltDY.js} +6 -6
- package/dist/{PermissionSetList-zdFnxyCb.js → PermissionSetList-OzyfE-Yg.js} +6 -6
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ca2NnAAF.js +4121 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-DqY-OTuj.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_79737e32_lang-Czo3FLbc.js} +2 -1
- package/dist/{RoleList-CRYU_eRb.js → RoleList-DOZ5RJ6A.js} +8 -8
- package/dist/TeamMemberList-CAqLUyQK.js +1186 -0
- package/dist/{TimesheetList-C00-tU7K.js → TimesheetList-D21j4zLV.js} +6 -6
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-dT_CJJDV.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CRmmIfTk.js} +2 -2
- package/dist/{app-C-wWQrRY.js → app-CX-St7pv.js} +300 -284
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-Bk9YhjTx.js → dayjs.min-MDoe5X-P.js} +1 -1
- package/dist/{employee-DzKKMXNo.js → employee-B2cdx2t4.js} +3 -3
- package/dist/{iteration-BV93u72h.js → iteration-B38iapI_.js} +1 -1
- package/dist/{lodash-psyQLJ6h.js → lodash-DZAGPZLQ.js} +1 -1
- package/dist/{rule-mNiIG4E8.js → rule-DftQBR76.js} +17 -13
- package/dist/src/composables/useBasePermission.d.ts +1 -1
- package/dist/src/helpers/filter.d.ts +15 -0
- package/dist/src/helpers/permission-reconcile.d.ts +15 -0
- package/dist/src/helpers/permission-reconcile.test.d.ts +1 -0
- package/dist/src/helpers/permission-set.d.ts +4 -2
- package/dist/src/views/team/locales/index.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-CEgLVGO6.js → useAppStore-BBsP5C3E.js} +1 -1
- package/dist/{useLoading-CJtXNU4d.js → useLoading-qgSjOzRD.js} +1 -1
- package/dist/{useReportPermissions-DoQyFUKj.js → useReportPermissions-CIhkjN3B.js} +3 -3
- package/package.json +2 -2
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DOgOa3cu.js +0 -4042
- package/dist/TeamMemberList-CMK7Yfn6.js +0 -1169
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var Gn = Object.defineProperty;
|
|
2
2
|
var Vn = (e, t, s) => t in e ? Gn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
3
|
var Dt = (e, t, s) => Vn(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
-
import { isRef as Pn, ref as Re, shallowRef as On, watchEffect as cr, computed as Os, h as Ws, defineComponent as ot, createBlock as Ut, renderSlot as lr, createCommentVNode as Fn, unref as Ue, openBlock as ct, createElementBlock as ur, createElementVNode as Se, toDisplayString as Ls, watch as qn, nextTick as In, onMounted as Ar, onBeforeUnmount as Hn, normalizeStyle as Xn, resolveComponent as Fs, withCtx as Qn, createVNode as Rn, defineAsyncComponent as
|
|
5
|
-
import { useBreakpoints as
|
|
4
|
+
import { isRef as Pn, ref as Re, shallowRef as On, watchEffect as cr, computed as Os, h as Ws, defineComponent as ot, createBlock as Ut, renderSlot as lr, createCommentVNode as Fn, unref as Ue, openBlock as ct, createElementBlock as ur, createElementVNode as Se, toDisplayString as Ls, watch as qn, nextTick as In, onMounted as Ar, onBeforeUnmount as Hn, normalizeStyle as Xn, resolveComponent as Fs, withCtx as Qn, createVNode as Rn, defineAsyncComponent as Tn, readonly as bs } from "vue";
|
|
5
|
+
import { useBreakpoints as kn } from "@feedmepos/ui-library";
|
|
6
6
|
import { useRoute as Nn, useRouter as Zn } from "vue-router";
|
|
7
7
|
import { useCoreStore as qs, useI18n as mr } from "@feedmepos/mf-common";
|
|
8
|
-
var i = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(i || {}), m = /* @__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.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))(m || {}), 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 || {}), dr = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(dr || {});
|
|
8
|
+
var i = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(i || {}), m = /* @__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.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))(m || {}), 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 || {}), dr = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(dr || {});
|
|
9
9
|
const v = {
|
|
10
10
|
general: "General",
|
|
11
11
|
inventory: "Inventory",
|
|
@@ -18,7 +18,8 @@ const v = {
|
|
|
18
18
|
report: "Report",
|
|
19
19
|
reports: "Default Report",
|
|
20
20
|
customReports: "Custom Report",
|
|
21
|
-
miniProgram: "Mini Program"
|
|
21
|
+
miniProgram: "Mini Program",
|
|
22
|
+
media: "Media"
|
|
22
23
|
}, Sn = "access-denied";
|
|
23
24
|
var Z;
|
|
24
25
|
(function(e) {
|
|
@@ -139,10 +140,10 @@ class Oe extends Error {
|
|
|
139
140
|
else if (c.path.length === 0)
|
|
140
141
|
r._errors.push(s(c));
|
|
141
142
|
else {
|
|
142
|
-
let l = r,
|
|
143
|
-
for (;
|
|
144
|
-
const y = c.path[
|
|
145
|
-
|
|
143
|
+
let l = r, f = 0;
|
|
144
|
+
for (; f < c.path.length; ) {
|
|
145
|
+
const y = c.path[f];
|
|
146
|
+
f === c.path.length - 1 ? (l[y] = l[y] || { _errors: [] }, l[y]._errors.push(s(c))) : l[y] = l[y] || { _errors: [] }, l = l[y], f++;
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
149
|
};
|
|
@@ -234,8 +235,8 @@ const Pt = (e) => {
|
|
|
234
235
|
path: a
|
|
235
236
|
};
|
|
236
237
|
let l = "";
|
|
237
|
-
const
|
|
238
|
-
for (const y of
|
|
238
|
+
const f = r.filter((y) => !!y).slice().reverse();
|
|
239
|
+
for (const y of f)
|
|
239
240
|
l = y(c, { data: t, defaultError: l }).message;
|
|
240
241
|
return {
|
|
241
242
|
...n,
|
|
@@ -299,10 +300,10 @@ class ae {
|
|
|
299
300
|
const H = Object.freeze({
|
|
300
301
|
status: "aborted"
|
|
301
302
|
}), Ln = (e) => ({ status: "dirty", value: e }), ie = (e) => ({ status: "valid", value: e }), ws = (e) => e.status === "aborted", Bs = (e) => e.status === "dirty", Ot = (e) => e.status === "valid", Ms = (e) => typeof Promise !== void 0 && e instanceof Promise, Is = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
302
|
-
var
|
|
303
|
+
var k;
|
|
303
304
|
(function(e) {
|
|
304
305
|
e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
|
|
305
|
-
})(
|
|
306
|
+
})(k || (k = {}));
|
|
306
307
|
class Ee {
|
|
307
308
|
constructor(t, s, r, n) {
|
|
308
309
|
this.parent = t, this.data = s, this._path = r, this._key = n;
|
|
@@ -419,7 +420,7 @@ class Q {
|
|
|
419
420
|
code: C.custom,
|
|
420
421
|
...r(n)
|
|
421
422
|
});
|
|
422
|
-
return typeof Promise < "u" && c instanceof Promise ? c.then((
|
|
423
|
+
return typeof Promise < "u" && c instanceof Promise ? c.then((f) => f ? !0 : (l(), !1)) : c ? !0 : (l(), !1);
|
|
423
424
|
});
|
|
424
425
|
}
|
|
425
426
|
refinement(t, s) {
|
|
@@ -483,13 +484,13 @@ class Q {
|
|
|
483
484
|
}
|
|
484
485
|
}
|
|
485
486
|
const Kn = /^c[^\s-]{8,}$/i, Jn = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i, _n = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
|
|
486
|
-
class
|
|
487
|
+
class Te extends Q {
|
|
487
488
|
constructor() {
|
|
488
489
|
super(...arguments), this._regex = (t, s, r) => this.refinement((n) => t.test(n), {
|
|
489
490
|
validation: s,
|
|
490
491
|
code: C.invalid_string,
|
|
491
|
-
...
|
|
492
|
-
}), this.nonempty = (t) => this.min(1,
|
|
492
|
+
...k.errToObj(r)
|
|
493
|
+
}), this.nonempty = (t) => this.min(1, k.errToObj(t)), this.trim = () => new Te({
|
|
493
494
|
...this._def,
|
|
494
495
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
495
496
|
});
|
|
@@ -570,56 +571,56 @@ class ke extends Q {
|
|
|
570
571
|
return { status: r.value, value: t.data };
|
|
571
572
|
}
|
|
572
573
|
_addCheck(t) {
|
|
573
|
-
return new
|
|
574
|
+
return new Te({
|
|
574
575
|
...this._def,
|
|
575
576
|
checks: [...this._def.checks, t]
|
|
576
577
|
});
|
|
577
578
|
}
|
|
578
579
|
email(t) {
|
|
579
|
-
return this._addCheck({ kind: "email", ...
|
|
580
|
+
return this._addCheck({ kind: "email", ...k.errToObj(t) });
|
|
580
581
|
}
|
|
581
582
|
url(t) {
|
|
582
|
-
return this._addCheck({ kind: "url", ...
|
|
583
|
+
return this._addCheck({ kind: "url", ...k.errToObj(t) });
|
|
583
584
|
}
|
|
584
585
|
uuid(t) {
|
|
585
|
-
return this._addCheck({ kind: "uuid", ...
|
|
586
|
+
return this._addCheck({ kind: "uuid", ...k.errToObj(t) });
|
|
586
587
|
}
|
|
587
588
|
cuid(t) {
|
|
588
|
-
return this._addCheck({ kind: "cuid", ...
|
|
589
|
+
return this._addCheck({ kind: "cuid", ...k.errToObj(t) });
|
|
589
590
|
}
|
|
590
591
|
regex(t, s) {
|
|
591
592
|
return this._addCheck({
|
|
592
593
|
kind: "regex",
|
|
593
594
|
regex: t,
|
|
594
|
-
...
|
|
595
|
+
...k.errToObj(s)
|
|
595
596
|
});
|
|
596
597
|
}
|
|
597
598
|
startsWith(t, s) {
|
|
598
599
|
return this._addCheck({
|
|
599
600
|
kind: "startsWith",
|
|
600
601
|
value: t,
|
|
601
|
-
...
|
|
602
|
+
...k.errToObj(s)
|
|
602
603
|
});
|
|
603
604
|
}
|
|
604
605
|
endsWith(t, s) {
|
|
605
606
|
return this._addCheck({
|
|
606
607
|
kind: "endsWith",
|
|
607
608
|
value: t,
|
|
608
|
-
...
|
|
609
|
+
...k.errToObj(s)
|
|
609
610
|
});
|
|
610
611
|
}
|
|
611
612
|
min(t, s) {
|
|
612
613
|
return this._addCheck({
|
|
613
614
|
kind: "min",
|
|
614
615
|
value: t,
|
|
615
|
-
...
|
|
616
|
+
...k.errToObj(s)
|
|
616
617
|
});
|
|
617
618
|
}
|
|
618
619
|
max(t, s) {
|
|
619
620
|
return this._addCheck({
|
|
620
621
|
kind: "max",
|
|
621
622
|
value: t,
|
|
622
|
-
...
|
|
623
|
+
...k.errToObj(s)
|
|
623
624
|
});
|
|
624
625
|
}
|
|
625
626
|
length(t, s) {
|
|
@@ -650,7 +651,7 @@ class ke extends Q {
|
|
|
650
651
|
return t;
|
|
651
652
|
}
|
|
652
653
|
}
|
|
653
|
-
|
|
654
|
+
Te.create = (e) => new Te({
|
|
654
655
|
checks: [],
|
|
655
656
|
typeName: I.ZodString,
|
|
656
657
|
...R(e)
|
|
@@ -700,16 +701,16 @@ class ze extends Q {
|
|
|
700
701
|
return { status: n.value, value: t.data };
|
|
701
702
|
}
|
|
702
703
|
gte(t, s) {
|
|
703
|
-
return this.setLimit("min", t, !0,
|
|
704
|
+
return this.setLimit("min", t, !0, k.toString(s));
|
|
704
705
|
}
|
|
705
706
|
gt(t, s) {
|
|
706
|
-
return this.setLimit("min", t, !1,
|
|
707
|
+
return this.setLimit("min", t, !1, k.toString(s));
|
|
707
708
|
}
|
|
708
709
|
lte(t, s) {
|
|
709
|
-
return this.setLimit("max", t, !0,
|
|
710
|
+
return this.setLimit("max", t, !0, k.toString(s));
|
|
710
711
|
}
|
|
711
712
|
lt(t, s) {
|
|
712
|
-
return this.setLimit("max", t, !1,
|
|
713
|
+
return this.setLimit("max", t, !1, k.toString(s));
|
|
713
714
|
}
|
|
714
715
|
setLimit(t, s, r, n) {
|
|
715
716
|
return new ze({
|
|
@@ -720,7 +721,7 @@ class ze extends Q {
|
|
|
720
721
|
kind: t,
|
|
721
722
|
value: s,
|
|
722
723
|
inclusive: r,
|
|
723
|
-
message:
|
|
724
|
+
message: k.toString(n)
|
|
724
725
|
}
|
|
725
726
|
]
|
|
726
727
|
});
|
|
@@ -734,7 +735,7 @@ class ze extends Q {
|
|
|
734
735
|
int(t) {
|
|
735
736
|
return this._addCheck({
|
|
736
737
|
kind: "int",
|
|
737
|
-
message:
|
|
738
|
+
message: k.toString(t)
|
|
738
739
|
});
|
|
739
740
|
}
|
|
740
741
|
positive(t) {
|
|
@@ -742,7 +743,7 @@ class ze extends Q {
|
|
|
742
743
|
kind: "min",
|
|
743
744
|
value: 0,
|
|
744
745
|
inclusive: !1,
|
|
745
|
-
message:
|
|
746
|
+
message: k.toString(t)
|
|
746
747
|
});
|
|
747
748
|
}
|
|
748
749
|
negative(t) {
|
|
@@ -750,7 +751,7 @@ class ze extends Q {
|
|
|
750
751
|
kind: "max",
|
|
751
752
|
value: 0,
|
|
752
753
|
inclusive: !1,
|
|
753
|
-
message:
|
|
754
|
+
message: k.toString(t)
|
|
754
755
|
});
|
|
755
756
|
}
|
|
756
757
|
nonpositive(t) {
|
|
@@ -758,7 +759,7 @@ class ze extends Q {
|
|
|
758
759
|
kind: "max",
|
|
759
760
|
value: 0,
|
|
760
761
|
inclusive: !0,
|
|
761
|
-
message:
|
|
762
|
+
message: k.toString(t)
|
|
762
763
|
});
|
|
763
764
|
}
|
|
764
765
|
nonnegative(t) {
|
|
@@ -766,14 +767,14 @@ class ze extends Q {
|
|
|
766
767
|
kind: "min",
|
|
767
768
|
value: 0,
|
|
768
769
|
inclusive: !0,
|
|
769
|
-
message:
|
|
770
|
+
message: k.toString(t)
|
|
770
771
|
});
|
|
771
772
|
}
|
|
772
773
|
multipleOf(t, s) {
|
|
773
774
|
return this._addCheck({
|
|
774
775
|
kind: "multipleOf",
|
|
775
776
|
value: t,
|
|
776
|
-
message:
|
|
777
|
+
message: k.toString(s)
|
|
777
778
|
});
|
|
778
779
|
}
|
|
779
780
|
get minValue() {
|
|
@@ -878,14 +879,14 @@ class nt extends Q {
|
|
|
878
879
|
return this._addCheck({
|
|
879
880
|
kind: "min",
|
|
880
881
|
value: t.getTime(),
|
|
881
|
-
message:
|
|
882
|
+
message: k.toString(s)
|
|
882
883
|
});
|
|
883
884
|
}
|
|
884
885
|
max(t, s) {
|
|
885
886
|
return this._addCheck({
|
|
886
887
|
kind: "max",
|
|
887
888
|
value: t.getTime(),
|
|
888
|
-
message:
|
|
889
|
+
message: k.toString(s)
|
|
889
890
|
});
|
|
890
891
|
}
|
|
891
892
|
get minDate() {
|
|
@@ -964,7 +965,7 @@ Qe.create = (e) => new Qe({
|
|
|
964
965
|
typeName: I.ZodUnknown,
|
|
965
966
|
...R(e)
|
|
966
967
|
});
|
|
967
|
-
class
|
|
968
|
+
class ke extends Q {
|
|
968
969
|
_parse(t) {
|
|
969
970
|
const s = this._getOrReturnCtx(t);
|
|
970
971
|
return Y(s, {
|
|
@@ -974,7 +975,7 @@ class Te extends Q {
|
|
|
974
975
|
}), H;
|
|
975
976
|
}
|
|
976
977
|
}
|
|
977
|
-
|
|
978
|
+
ke.create = (e) => new ke({
|
|
978
979
|
typeName: I.ZodNever,
|
|
979
980
|
...R(e)
|
|
980
981
|
});
|
|
@@ -1027,13 +1028,13 @@ class Ye extends Q {
|
|
|
1027
1028
|
min(t, s) {
|
|
1028
1029
|
return new Ye({
|
|
1029
1030
|
...this._def,
|
|
1030
|
-
minLength: { value: t, message:
|
|
1031
|
+
minLength: { value: t, message: k.toString(s) }
|
|
1031
1032
|
});
|
|
1032
1033
|
}
|
|
1033
1034
|
max(t, s) {
|
|
1034
1035
|
return new Ye({
|
|
1035
1036
|
...this._def,
|
|
1036
|
-
maxLength: { value: t, message:
|
|
1037
|
+
maxLength: { value: t, message: k.toString(s) }
|
|
1037
1038
|
});
|
|
1038
1039
|
}
|
|
1039
1040
|
length(t, s) {
|
|
@@ -1099,20 +1100,20 @@ class J extends Q {
|
|
|
1099
1100
|
const { status: r, ctx: n } = this._processInputParams(t), { shape: a, keys: c } = this._getCached(), l = [];
|
|
1100
1101
|
for (const y in n.data)
|
|
1101
1102
|
c.includes(y) || l.push(y);
|
|
1102
|
-
const
|
|
1103
|
+
const f = [];
|
|
1103
1104
|
for (const y of c) {
|
|
1104
1105
|
const w = a[y], O = n.data[y];
|
|
1105
|
-
|
|
1106
|
+
f.push({
|
|
1106
1107
|
key: { status: "valid", value: y },
|
|
1107
1108
|
value: w._parse(new Ee(n, O, n.path, y)),
|
|
1108
1109
|
alwaysSet: y in n.data
|
|
1109
1110
|
});
|
|
1110
1111
|
}
|
|
1111
|
-
if (this._def.catchall instanceof
|
|
1112
|
+
if (this._def.catchall instanceof ke) {
|
|
1112
1113
|
const y = this._def.unknownKeys;
|
|
1113
1114
|
if (y === "passthrough")
|
|
1114
1115
|
for (const w of l)
|
|
1115
|
-
|
|
1116
|
+
f.push({
|
|
1116
1117
|
key: { status: "valid", value: w },
|
|
1117
1118
|
value: { status: "valid", value: n.data[w] }
|
|
1118
1119
|
});
|
|
@@ -1126,7 +1127,7 @@ class J extends Q {
|
|
|
1126
1127
|
const y = this._def.catchall;
|
|
1127
1128
|
for (const w of l) {
|
|
1128
1129
|
const O = n.data[w];
|
|
1129
|
-
|
|
1130
|
+
f.push({
|
|
1130
1131
|
key: { status: "valid", value: w },
|
|
1131
1132
|
value: y._parse(
|
|
1132
1133
|
new Ee(n, O, n.path, w)
|
|
@@ -1138,7 +1139,7 @@ class J extends Q {
|
|
|
1138
1139
|
}
|
|
1139
1140
|
return n.common.async ? Promise.resolve().then(async () => {
|
|
1140
1141
|
const y = [];
|
|
1141
|
-
for (const w of
|
|
1142
|
+
for (const w of f) {
|
|
1142
1143
|
const O = await w.key;
|
|
1143
1144
|
y.push({
|
|
1144
1145
|
key: O,
|
|
@@ -1147,23 +1148,23 @@ class J extends Q {
|
|
|
1147
1148
|
});
|
|
1148
1149
|
}
|
|
1149
1150
|
return y;
|
|
1150
|
-
}).then((y) => ae.mergeObjectSync(r, y)) : ae.mergeObjectSync(r,
|
|
1151
|
+
}).then((y) => ae.mergeObjectSync(r, y)) : ae.mergeObjectSync(r, f);
|
|
1151
1152
|
}
|
|
1152
1153
|
get shape() {
|
|
1153
1154
|
return this._def.shape();
|
|
1154
1155
|
}
|
|
1155
1156
|
strict(t) {
|
|
1156
|
-
return
|
|
1157
|
+
return k.errToObj, new J({
|
|
1157
1158
|
...this._def,
|
|
1158
1159
|
unknownKeys: "strict",
|
|
1159
1160
|
...t !== void 0 ? {
|
|
1160
1161
|
errorMap: (s, r) => {
|
|
1161
1162
|
var n, a, c, l;
|
|
1162
|
-
const
|
|
1163
|
+
const f = (c = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, s, r).message) !== null && c !== void 0 ? c : r.defaultError;
|
|
1163
1164
|
return s.code === "unrecognized_keys" ? {
|
|
1164
|
-
message: (l =
|
|
1165
|
+
message: (l = k.errToObj(t).message) !== null && l !== void 0 ? l : f
|
|
1165
1166
|
} : {
|
|
1166
|
-
message:
|
|
1167
|
+
message: f
|
|
1167
1168
|
};
|
|
1168
1169
|
}
|
|
1169
1170
|
} : {}
|
|
@@ -1262,21 +1263,21 @@ class J extends Q {
|
|
|
1262
1263
|
J.create = (e, t) => new J({
|
|
1263
1264
|
shape: () => e,
|
|
1264
1265
|
unknownKeys: "strip",
|
|
1265
|
-
catchall:
|
|
1266
|
+
catchall: ke.create(),
|
|
1266
1267
|
typeName: I.ZodObject,
|
|
1267
1268
|
...R(t)
|
|
1268
1269
|
});
|
|
1269
1270
|
J.strictCreate = (e, t) => new J({
|
|
1270
1271
|
shape: () => e,
|
|
1271
1272
|
unknownKeys: "strict",
|
|
1272
|
-
catchall:
|
|
1273
|
+
catchall: ke.create(),
|
|
1273
1274
|
typeName: I.ZodObject,
|
|
1274
1275
|
...R(t)
|
|
1275
1276
|
});
|
|
1276
1277
|
J.lazycreate = (e, t) => new J({
|
|
1277
1278
|
shape: e,
|
|
1278
1279
|
unknownKeys: "strip",
|
|
1279
|
-
catchall:
|
|
1280
|
+
catchall: ke.create(),
|
|
1280
1281
|
typeName: I.ZodObject,
|
|
1281
1282
|
...R(t)
|
|
1282
1283
|
});
|
|
@@ -1318,7 +1319,7 @@ class wt extends Q {
|
|
|
1318
1319
|
{
|
|
1319
1320
|
let a;
|
|
1320
1321
|
const c = [];
|
|
1321
|
-
for (const
|
|
1322
|
+
for (const f of r) {
|
|
1322
1323
|
const y = {
|
|
1323
1324
|
...s,
|
|
1324
1325
|
common: {
|
|
@@ -1326,7 +1327,7 @@ class wt extends Q {
|
|
|
1326
1327
|
issues: []
|
|
1327
1328
|
},
|
|
1328
1329
|
parent: null
|
|
1329
|
-
}, w =
|
|
1330
|
+
}, w = f._parseSync({
|
|
1330
1331
|
data: s.data,
|
|
1331
1332
|
path: s.path,
|
|
1332
1333
|
parent: y
|
|
@@ -1337,7 +1338,7 @@ class wt extends Q {
|
|
|
1337
1338
|
}
|
|
1338
1339
|
if (a)
|
|
1339
1340
|
return s.common.issues.push(...a.ctx.common.issues), a.result;
|
|
1340
|
-
const l = c.map((
|
|
1341
|
+
const l = c.map((f) => new Oe(f));
|
|
1341
1342
|
return Y(s, {
|
|
1342
1343
|
code: C.invalid_union,
|
|
1343
1344
|
unionErrors: l
|
|
@@ -1421,10 +1422,10 @@ function Cs(e, t) {
|
|
|
1421
1422
|
if (s === x.object && r === x.object) {
|
|
1422
1423
|
const n = Z.objectKeys(t), a = Z.objectKeys(e).filter((l) => n.indexOf(l) !== -1), c = { ...e, ...t };
|
|
1423
1424
|
for (const l of a) {
|
|
1424
|
-
const
|
|
1425
|
-
if (!
|
|
1425
|
+
const f = Cs(e[l], t[l]);
|
|
1426
|
+
if (!f.valid)
|
|
1426
1427
|
return { valid: !1 };
|
|
1427
|
-
c[l] =
|
|
1428
|
+
c[l] = f.data;
|
|
1428
1429
|
}
|
|
1429
1430
|
return { valid: !0, data: c };
|
|
1430
1431
|
} else if (s === x.array && r === x.array) {
|
|
@@ -1432,10 +1433,10 @@ function Cs(e, t) {
|
|
|
1432
1433
|
return { valid: !1 };
|
|
1433
1434
|
const n = [];
|
|
1434
1435
|
for (let a = 0; a < e.length; a++) {
|
|
1435
|
-
const c = e[a], l = t[a],
|
|
1436
|
-
if (!
|
|
1436
|
+
const c = e[a], l = t[a], f = Cs(c, l);
|
|
1437
|
+
if (!f.valid)
|
|
1437
1438
|
return { valid: !1 };
|
|
1438
|
-
n.push(
|
|
1439
|
+
n.push(f.data);
|
|
1439
1440
|
}
|
|
1440
1441
|
return { valid: !0, data: n };
|
|
1441
1442
|
} else return s === x.date && r === x.date && +e == +t ? { valid: !0, data: e } : { valid: !1 };
|
|
@@ -1501,8 +1502,8 @@ class Ge extends Q {
|
|
|
1501
1502
|
type: "array"
|
|
1502
1503
|
}), s.dirty());
|
|
1503
1504
|
const a = r.data.map((c, l) => {
|
|
1504
|
-
const
|
|
1505
|
-
return
|
|
1505
|
+
const f = this._def.items[l] || this._def.rest;
|
|
1506
|
+
return f ? f._parse(new Ee(r, c, r.path, l)) : null;
|
|
1506
1507
|
}).filter((c) => !!c);
|
|
1507
1508
|
return r.common.async ? Promise.all(a).then((c) => ae.mergeArray(s, c)) : ae.mergeArray(s, a);
|
|
1508
1509
|
}
|
|
@@ -1555,7 +1556,7 @@ class Mt extends Q {
|
|
|
1555
1556
|
typeName: I.ZodRecord,
|
|
1556
1557
|
...R(r)
|
|
1557
1558
|
}) : new Mt({
|
|
1558
|
-
keyType:
|
|
1559
|
+
keyType: Te.create(),
|
|
1559
1560
|
valueType: t,
|
|
1560
1561
|
typeName: I.ZodRecord,
|
|
1561
1562
|
...R(s)
|
|
@@ -1571,15 +1572,15 @@ class Rt extends Q {
|
|
|
1571
1572
|
expected: x.map,
|
|
1572
1573
|
received: r.parsedType
|
|
1573
1574
|
}), H;
|
|
1574
|
-
const n = this._def.keyType, a = this._def.valueType, c = [...r.data.entries()].map(([l,
|
|
1575
|
+
const n = this._def.keyType, a = this._def.valueType, c = [...r.data.entries()].map(([l, f], y) => ({
|
|
1575
1576
|
key: n._parse(new Ee(r, l, r.path, [y, "key"])),
|
|
1576
|
-
value: a._parse(new Ee(r,
|
|
1577
|
+
value: a._parse(new Ee(r, f, r.path, [y, "value"]))
|
|
1577
1578
|
}));
|
|
1578
1579
|
if (r.common.async) {
|
|
1579
1580
|
const l = /* @__PURE__ */ new Map();
|
|
1580
1581
|
return Promise.resolve().then(async () => {
|
|
1581
|
-
for (const
|
|
1582
|
-
const y = await
|
|
1582
|
+
for (const f of c) {
|
|
1583
|
+
const y = await f.key, w = await f.value;
|
|
1583
1584
|
if (y.status === "aborted" || w.status === "aborted")
|
|
1584
1585
|
return H;
|
|
1585
1586
|
(y.status === "dirty" || w.status === "dirty") && s.dirty(), l.set(y.value, w.value);
|
|
@@ -1588,8 +1589,8 @@ class Rt extends Q {
|
|
|
1588
1589
|
});
|
|
1589
1590
|
} else {
|
|
1590
1591
|
const l = /* @__PURE__ */ new Map();
|
|
1591
|
-
for (const
|
|
1592
|
-
const y =
|
|
1592
|
+
for (const f of c) {
|
|
1593
|
+
const y = f.key, w = f.value;
|
|
1593
1594
|
if (y.status === "aborted" || w.status === "aborted")
|
|
1594
1595
|
return H;
|
|
1595
1596
|
(y.status === "dirty" || w.status === "dirty") && s.dirty(), l.set(y.value, w.value);
|
|
@@ -1628,28 +1629,28 @@ class We extends Q {
|
|
|
1628
1629
|
message: n.maxSize.message
|
|
1629
1630
|
}), s.dirty());
|
|
1630
1631
|
const a = this._def.valueType;
|
|
1631
|
-
function c(
|
|
1632
|
+
function c(f) {
|
|
1632
1633
|
const y = /* @__PURE__ */ new Set();
|
|
1633
|
-
for (const w of
|
|
1634
|
+
for (const w of f) {
|
|
1634
1635
|
if (w.status === "aborted")
|
|
1635
1636
|
return H;
|
|
1636
1637
|
w.status === "dirty" && s.dirty(), y.add(w.value);
|
|
1637
1638
|
}
|
|
1638
1639
|
return { status: s.value, value: y };
|
|
1639
1640
|
}
|
|
1640
|
-
const l = [...r.data.values()].map((
|
|
1641
|
-
return r.common.async ? Promise.all(l).then((
|
|
1641
|
+
const l = [...r.data.values()].map((f, y) => a._parse(new Ee(r, f, r.path, y)));
|
|
1642
|
+
return r.common.async ? Promise.all(l).then((f) => c(f)) : c(l);
|
|
1642
1643
|
}
|
|
1643
1644
|
min(t, s) {
|
|
1644
1645
|
return new We({
|
|
1645
1646
|
...this._def,
|
|
1646
|
-
minSize: { value: t, message:
|
|
1647
|
+
minSize: { value: t, message: k.toString(s) }
|
|
1647
1648
|
});
|
|
1648
1649
|
}
|
|
1649
1650
|
max(t, s) {
|
|
1650
1651
|
return new We({
|
|
1651
1652
|
...this._def,
|
|
1652
|
-
maxSize: { value: t, message:
|
|
1653
|
+
maxSize: { value: t, message: k.toString(s) }
|
|
1653
1654
|
});
|
|
1654
1655
|
}
|
|
1655
1656
|
size(t, s) {
|
|
@@ -1678,7 +1679,7 @@ class Le extends Q {
|
|
|
1678
1679
|
expected: x.function,
|
|
1679
1680
|
received: s.parsedType
|
|
1680
1681
|
}), H;
|
|
1681
|
-
function r(l,
|
|
1682
|
+
function r(l, f) {
|
|
1682
1683
|
return Pt({
|
|
1683
1684
|
data: l,
|
|
1684
1685
|
path: s.path,
|
|
@@ -1690,11 +1691,11 @@ class Le extends Q {
|
|
|
1690
1691
|
].filter((y) => !!y),
|
|
1691
1692
|
issueData: {
|
|
1692
1693
|
code: C.invalid_arguments,
|
|
1693
|
-
argumentsError:
|
|
1694
|
+
argumentsError: f
|
|
1694
1695
|
}
|
|
1695
1696
|
});
|
|
1696
1697
|
}
|
|
1697
|
-
function n(l,
|
|
1698
|
+
function n(l, f) {
|
|
1698
1699
|
return Pt({
|
|
1699
1700
|
data: l,
|
|
1700
1701
|
path: s.path,
|
|
@@ -1706,23 +1707,23 @@ class Le extends Q {
|
|
|
1706
1707
|
].filter((y) => !!y),
|
|
1707
1708
|
issueData: {
|
|
1708
1709
|
code: C.invalid_return_type,
|
|
1709
|
-
returnTypeError:
|
|
1710
|
+
returnTypeError: f
|
|
1710
1711
|
}
|
|
1711
1712
|
});
|
|
1712
1713
|
}
|
|
1713
1714
|
const a = { errorMap: s.common.contextualErrorMap }, c = s.data;
|
|
1714
1715
|
return this._def.returns instanceof it ? ie(async (...l) => {
|
|
1715
|
-
const
|
|
1716
|
-
throw
|
|
1716
|
+
const f = new Oe([]), y = await this._def.args.parseAsync(l, a).catch((N) => {
|
|
1717
|
+
throw f.addIssue(r(l, N)), f;
|
|
1717
1718
|
}), w = await c(...y);
|
|
1718
1719
|
return await this._def.returns._def.type.parseAsync(w, a).catch((N) => {
|
|
1719
|
-
throw
|
|
1720
|
+
throw f.addIssue(n(w, N)), f;
|
|
1720
1721
|
});
|
|
1721
1722
|
}) : ie((...l) => {
|
|
1722
|
-
const
|
|
1723
|
-
if (!
|
|
1724
|
-
throw new Oe([r(l,
|
|
1725
|
-
const y = c(...
|
|
1723
|
+
const f = this._def.args.safeParse(l, a);
|
|
1724
|
+
if (!f.success)
|
|
1725
|
+
throw new Oe([r(l, f.error)]);
|
|
1726
|
+
const y = c(...f.data), w = this._def.returns.safeParse(y, a);
|
|
1726
1727
|
if (!w.success)
|
|
1727
1728
|
throw new Oe([n(y, w.error)]);
|
|
1728
1729
|
return w.data;
|
|
@@ -1759,7 +1760,7 @@ Le.create = (e, t, s) => new Le({
|
|
|
1759
1760
|
typeName: I.ZodFunction,
|
|
1760
1761
|
...R(s)
|
|
1761
1762
|
});
|
|
1762
|
-
class
|
|
1763
|
+
class Tt extends Q {
|
|
1763
1764
|
get schema() {
|
|
1764
1765
|
return this._def.getter();
|
|
1765
1766
|
}
|
|
@@ -1768,12 +1769,12 @@ class kt extends Q {
|
|
|
1768
1769
|
return this._def.getter()._parse({ data: s.data, path: s.path, parent: s });
|
|
1769
1770
|
}
|
|
1770
1771
|
}
|
|
1771
|
-
|
|
1772
|
+
Tt.create = (e, t) => new Tt({
|
|
1772
1773
|
getter: e,
|
|
1773
1774
|
typeName: I.ZodLazy,
|
|
1774
1775
|
...R(t)
|
|
1775
1776
|
});
|
|
1776
|
-
class
|
|
1777
|
+
class kt extends Q {
|
|
1777
1778
|
_parse(t) {
|
|
1778
1779
|
if (t.data !== this._def.value) {
|
|
1779
1780
|
const s = this._getOrReturnCtx(t);
|
|
@@ -1788,7 +1789,7 @@ class Tt extends Q {
|
|
|
1788
1789
|
return this._def.value;
|
|
1789
1790
|
}
|
|
1790
1791
|
}
|
|
1791
|
-
|
|
1792
|
+
kt.create = (e, t) => new kt({
|
|
1792
1793
|
value: e,
|
|
1793
1794
|
typeName: I.ZodLiteral,
|
|
1794
1795
|
...R(t)
|
|
@@ -1922,10 +1923,10 @@ class Ve extends Q {
|
|
|
1922
1923
|
};
|
|
1923
1924
|
if (a.addIssue = a.addIssue.bind(a), n.type === "refinement") {
|
|
1924
1925
|
const c = (l) => {
|
|
1925
|
-
const
|
|
1926
|
+
const f = n.refinement(l, a);
|
|
1926
1927
|
if (r.common.async)
|
|
1927
|
-
return Promise.resolve(
|
|
1928
|
-
if (
|
|
1928
|
+
return Promise.resolve(f);
|
|
1929
|
+
if (f instanceof Promise)
|
|
1929
1930
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
1930
1931
|
return l;
|
|
1931
1932
|
};
|
|
@@ -2045,7 +2046,7 @@ var I;
|
|
|
2045
2046
|
})(I || (I = {}));
|
|
2046
2047
|
const ta = (e, t = {
|
|
2047
2048
|
message: `Input not instance of ${e.name}`
|
|
2048
|
-
}) => fr((s) => s instanceof e, t, !0), hr =
|
|
2049
|
+
}) => fr((s) => s instanceof e, t, !0), hr = Te.create, yr = ze.create, sa = Zt.create, ra = Ft.create, br = qt.create, na = nt.create, aa = It.create, ia = Ht.create, oa = at.create, ca = Qe.create, la = ke.create, ua = Xt.create, Aa = Ye.create, ma = J.create, da = J.strictCreate, ga = wt.create, pa = zt.create, fa = Bt.create, ha = Ge.create, ya = Mt.create, ba = Rt.create, va = We.create, wa = Le.create, Ba = Tt.create, Ma = kt.create, Ca = Wt.create, Da = Nt.create, xa = it.create, _s = Ve.create, ja = je.create, Ea = Ke.create, Ya = Ve.createWithPreprocess, Ga = () => hr().optional(), Va = () => yr().optional(), Pa = () => br().optional();
|
|
2049
2050
|
var ft = /* @__PURE__ */ Object.freeze({
|
|
2050
2051
|
__proto__: null,
|
|
2051
2052
|
getParsedType: Xe,
|
|
@@ -2063,7 +2064,7 @@ var ft = /* @__PURE__ */ Object.freeze({
|
|
|
2063
2064
|
isAsync: Ms,
|
|
2064
2065
|
jsonStringifyReplacer: Is,
|
|
2065
2066
|
ZodType: Q,
|
|
2066
|
-
ZodString:
|
|
2067
|
+
ZodString: Te,
|
|
2067
2068
|
ZodNumber: ze,
|
|
2068
2069
|
ZodBigInt: Ft,
|
|
2069
2070
|
ZodBoolean: qt,
|
|
@@ -2072,7 +2073,7 @@ var ft = /* @__PURE__ */ Object.freeze({
|
|
|
2072
2073
|
ZodNull: Ht,
|
|
2073
2074
|
ZodAny: at,
|
|
2074
2075
|
ZodUnknown: Qe,
|
|
2075
|
-
ZodNever:
|
|
2076
|
+
ZodNever: ke,
|
|
2076
2077
|
ZodVoid: Xt,
|
|
2077
2078
|
ZodArray: Ye,
|
|
2078
2079
|
get objectUtil() {
|
|
@@ -2087,8 +2088,8 @@ var ft = /* @__PURE__ */ Object.freeze({
|
|
|
2087
2088
|
ZodMap: Rt,
|
|
2088
2089
|
ZodSet: We,
|
|
2089
2090
|
ZodFunction: Le,
|
|
2090
|
-
ZodLazy:
|
|
2091
|
-
ZodLiteral:
|
|
2091
|
+
ZodLazy: Tt,
|
|
2092
|
+
ZodLiteral: kt,
|
|
2092
2093
|
ZodEnum: Wt,
|
|
2093
2094
|
ZodNativeEnum: Nt,
|
|
2094
2095
|
ZodPromise: it,
|
|
@@ -2266,15 +2267,15 @@ function Ra(e) {
|
|
|
2266
2267
|
const t = e == null ? void 0 : e.shape;
|
|
2267
2268
|
return t ? Object.keys(t) : void 0;
|
|
2268
2269
|
}
|
|
2269
|
-
const wr = /* @__PURE__ */ new Map(), Et = [],
|
|
2270
|
-
function
|
|
2270
|
+
const wr = /* @__PURE__ */ new Map(), Et = [], Ta = /* @__PURE__ */ new Map(), $s = "prefix:";
|
|
2271
|
+
function ka(e) {
|
|
2271
2272
|
for (const [t, s] of Object.entries(e))
|
|
2272
2273
|
Na([t], s);
|
|
2273
2274
|
}
|
|
2274
2275
|
function Na(e, t) {
|
|
2275
2276
|
const s = Array.isArray(t) ? t : [t];
|
|
2276
2277
|
Za(s, e);
|
|
2277
|
-
for (const r of s)
|
|
2278
|
+
for (const r of s) Ta.set(r.builderKey, r);
|
|
2278
2279
|
for (const r of e)
|
|
2279
2280
|
if (r.startsWith($s)) {
|
|
2280
2281
|
const n = r.slice($s.length), a = Et.findIndex((c) => c.prefix === n);
|
|
@@ -2483,7 +2484,7 @@ const ri = {
|
|
|
2483
2484
|
// Flat POS report subject used by the restaurant role editor.
|
|
2484
2485
|
report: tt
|
|
2485
2486
|
};
|
|
2486
|
-
|
|
2487
|
+
ka(ai);
|
|
2487
2488
|
function tl(e, t) {
|
|
2488
2489
|
if (!e) return {};
|
|
2489
2490
|
const s = new Set(t.ownedFields);
|
|
@@ -4325,7 +4326,8 @@ const Br = {
|
|
|
4325
4326
|
permission_placeholder: "Filter by permission",
|
|
4326
4327
|
selected_permission_prefix: "Selected permissions: ",
|
|
4327
4328
|
assigned_role_placeholder: "Assigned Role",
|
|
4328
|
-
selected_assigned_role_prefix: "Assigned roles: "
|
|
4329
|
+
selected_assigned_role_prefix: "Assigned roles: ",
|
|
4330
|
+
unassigned_label: "Unassigned"
|
|
4329
4331
|
},
|
|
4330
4332
|
emptyState: {
|
|
4331
4333
|
title: "No team members found",
|
|
@@ -4577,7 +4579,8 @@ const Br = {
|
|
|
4577
4579
|
permission_placeholder: "กรองตามสิทธิ์",
|
|
4578
4580
|
selected_permission_prefix: "สิทธิ์ที่เลือก: ",
|
|
4579
4581
|
assigned_role_placeholder: "ตำแหน่งที่กำหนด",
|
|
4580
|
-
selected_assigned_role_prefix: "ตำแหน่งที่เลือก: "
|
|
4582
|
+
selected_assigned_role_prefix: "ตำแหน่งที่เลือก: ",
|
|
4583
|
+
unassigned_label: "ยังไม่ได้กำหนด"
|
|
4581
4584
|
},
|
|
4582
4585
|
emptyState: {
|
|
4583
4586
|
title: "ไม่พบผู้ดูแลระบบ",
|
|
@@ -4647,7 +4650,7 @@ const Br = {
|
|
|
4647
4650
|
selectPlaceholder: "เลือกตำแหน่งสิทธิ์"
|
|
4648
4651
|
}
|
|
4649
4652
|
}
|
|
4650
|
-
},
|
|
4653
|
+
}, Tr = {
|
|
4651
4654
|
title: "บทบาท",
|
|
4652
4655
|
createButtonLabel: "สร้างบทบาท",
|
|
4653
4656
|
search: {
|
|
@@ -4680,7 +4683,7 @@ const Br = {
|
|
|
4680
4683
|
includedSetsPlaceholder: "เลือกบทบาทหนึ่งรายการขึ้นไปเพื่อรับสิทธิ์ที่สืบทอดมา",
|
|
4681
4684
|
overrideInherited: {
|
|
4682
4685
|
title: "แทนที่สิทธิ์ที่กำหนดเอง?",
|
|
4683
|
-
message: "
|
|
4686
|
+
message: "การเปลี่ยนบทบาทสิทธิ์ที่เลือกอาจแทนที่สิทธิ์ที่เลือกอยู่ด้วยสิทธิ์ที่สืบทอดจากบทบาทเหล่านั้น ต้องการแทนที่รายการที่เลือกอยู่หรือไม่?",
|
|
4684
4687
|
override: "แทนที่",
|
|
4685
4688
|
keepCurrent: "เก็บรายการปัจจุบัน"
|
|
4686
4689
|
}
|
|
@@ -4777,13 +4780,13 @@ const Br = {
|
|
|
4777
4780
|
}
|
|
4778
4781
|
}, Ii = {
|
|
4779
4782
|
team: Rr,
|
|
4780
|
-
permissionSet:
|
|
4783
|
+
permissionSet: Tr
|
|
4781
4784
|
}, Hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4782
4785
|
__proto__: null,
|
|
4783
4786
|
default: Ii,
|
|
4784
|
-
permissionSet:
|
|
4787
|
+
permissionSet: Tr,
|
|
4785
4788
|
team: Rr
|
|
4786
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4789
|
+
}, Symbol.toStringTag, { value: "Module" })), kr = {
|
|
4787
4790
|
title: "团队成员",
|
|
4788
4791
|
subtitle: "管理可访问 Portal 和 POS 的团队成员,分配 Portal 权限和 POS 角色。",
|
|
4789
4792
|
actions: {
|
|
@@ -4829,7 +4832,8 @@ const Br = {
|
|
|
4829
4832
|
permission_placeholder: "按权限筛选",
|
|
4830
4833
|
selected_permission_prefix: "已选权限: ",
|
|
4831
4834
|
assigned_role_placeholder: "分配角色",
|
|
4832
|
-
selected_assigned_role_prefix: "已选角色: "
|
|
4835
|
+
selected_assigned_role_prefix: "已选角色: ",
|
|
4836
|
+
unassigned_label: "未分配"
|
|
4833
4837
|
},
|
|
4834
4838
|
emptyState: {
|
|
4835
4839
|
title: "没有团队成员",
|
|
@@ -5028,13 +5032,13 @@ const Br = {
|
|
|
5028
5032
|
}
|
|
5029
5033
|
}
|
|
5030
5034
|
}, Xi = {
|
|
5031
|
-
team:
|
|
5035
|
+
team: kr,
|
|
5032
5036
|
permissionSet: Nr
|
|
5033
5037
|
}, Qi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5034
5038
|
__proto__: null,
|
|
5035
5039
|
default: Xi,
|
|
5036
5040
|
permissionSet: Nr,
|
|
5037
|
-
team:
|
|
5041
|
+
team: kr
|
|
5038
5042
|
}, Symbol.toStringTag, { value: "Module" })), Zr = {
|
|
5039
5043
|
title: "團隊成員",
|
|
5040
5044
|
subtitle: "管理可存取 Portal 和 POS 的團隊成員,指派 Portal 權限和 POS 角色。",
|
|
@@ -5081,7 +5085,8 @@ const Br = {
|
|
|
5081
5085
|
permission_placeholder: "按權限篩選",
|
|
5082
5086
|
selected_permission_prefix: "已選權限: ",
|
|
5083
5087
|
assigned_role_placeholder: "分配角色",
|
|
5084
|
-
selected_assigned_role_prefix: "已選角色: "
|
|
5088
|
+
selected_assigned_role_prefix: "已選角色: ",
|
|
5089
|
+
unassigned_label: "未分配"
|
|
5085
5090
|
},
|
|
5086
5091
|
emptyState: {
|
|
5087
5092
|
title: "沒有團隊成員",
|
|
@@ -5289,16 +5294,16 @@ const Br = {
|
|
|
5289
5294
|
}, Ri = {
|
|
5290
5295
|
team: Zr,
|
|
5291
5296
|
permissionSet: Sr
|
|
5292
|
-
},
|
|
5297
|
+
}, Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5293
5298
|
__proto__: null,
|
|
5294
5299
|
default: Ri,
|
|
5295
5300
|
permissionSet: Sr,
|
|
5296
5301
|
team: Zr
|
|
5297
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5302
|
+
}, Symbol.toStringTag, { value: "Module" })), ki = {
|
|
5298
5303
|
"en-US": qi,
|
|
5299
5304
|
"zh-CN": Qi,
|
|
5300
5305
|
"th-TH": Hi,
|
|
5301
|
-
"zh-Hant":
|
|
5306
|
+
"zh-Hant": Ti
|
|
5302
5307
|
}, Ur = {
|
|
5303
5308
|
title: "POS Grant",
|
|
5304
5309
|
actions: {
|
|
@@ -6199,6 +6204,14 @@ const Br = {
|
|
|
6199
6204
|
actions: [i.manage],
|
|
6200
6205
|
category: v.miniProgram,
|
|
6201
6206
|
showByFeatureFlag: "hrm_enable_miniprogram_permission"
|
|
6207
|
+
},
|
|
6208
|
+
// Media
|
|
6209
|
+
mediaAssets: {
|
|
6210
|
+
label: "Media Library Management",
|
|
6211
|
+
subject: m.media_assets,
|
|
6212
|
+
actions: [i.manage],
|
|
6213
|
+
category: v.media,
|
|
6214
|
+
showByFeatureFlag: "hrm_enable_media_permission"
|
|
6202
6215
|
}
|
|
6203
6216
|
};
|
|
6204
6217
|
var S = /* @__PURE__ */ ((e) => (e.crm = "crm", e.crm_user = "crm::user", e.crm_segmentation = "crm::segmentation", e.crm_queue = "crm::queue", e.crm_transaction = "crm::transaction", e.crm_store = "crm::store", e.crm_location = "crm::location", e.crm_effect = "crm::effect", e.crm_setting = "crm::setting", e.crm_reward = "crm::reward", e.crm_campaign = "crm::campaign", e.crm_referral = "crm::referral", e.crm_marketingMaterial = "crm::marketingMaterial", e.crm_voucher = "crm::voucher", e.crm_membership = "crm::membership", e.crm_analytic = "crm::analytic", e.crm_tier = "crm::tier", e.crm_title = "crm::title", e.crm_broadcast = "crm::broadcast", e.crm_point = "crm::point", e.crm_credit = "crm::credit", e.crm_experience = "crm::experience", e.crm_game = "crm::game", e.crm_mission = "crm::mission", e.crm_loyaltyMember = "crm::loyaltyMember", e.crm_loyaltySegment = "crm::loyaltySegment", e.crm_loyaltyCard = "crm::loyaltyCard", e.crm_bin = "crm::bin", e))(S || {});
|
|
@@ -7257,13 +7270,13 @@ var Dn = { exports: {} };
|
|
|
7257
7270
|
if (1 & c && (a = n(a)), 8 & c || 4 & c && typeof a == "object" && a && a.__esModule) return a;
|
|
7258
7271
|
var l = /* @__PURE__ */ Object.create(null);
|
|
7259
7272
|
if (n.r(l), Object.defineProperty(l, "default", { enumerable: !0, value: a }), 2 & c && typeof a != "string")
|
|
7260
|
-
for (var
|
|
7273
|
+
for (var f in a)
|
|
7261
7274
|
n.d(
|
|
7262
7275
|
l,
|
|
7263
|
-
|
|
7276
|
+
f,
|
|
7264
7277
|
(function(y) {
|
|
7265
7278
|
return a[y];
|
|
7266
|
-
}).bind(null,
|
|
7279
|
+
}).bind(null, f)
|
|
7267
7280
|
);
|
|
7268
7281
|
return l;
|
|
7269
7282
|
}, n.n = function(a) {
|
|
@@ -7301,7 +7314,7 @@ var Dn = { exports: {} };
|
|
|
7301
7314
|
}), n.d(r, "comparable", function() {
|
|
7302
7315
|
return At;
|
|
7303
7316
|
});
|
|
7304
|
-
var l = c("Array"),
|
|
7317
|
+
var l = c("Array"), f = c("Object"), y = c("Function");
|
|
7305
7318
|
function w(d, p) {
|
|
7306
7319
|
return y(d.get) ? d.get(p) : d[p];
|
|
7307
7320
|
}
|
|
@@ -7523,14 +7536,14 @@ var Dn = { exports: {} };
|
|
|
7523
7536
|
return void V.push([g, A[b - 1], M]);
|
|
7524
7537
|
var F = w(A, b);
|
|
7525
7538
|
if (l(g) && isNaN(Number(F)))
|
|
7526
|
-
for (var
|
|
7539
|
+
for (var T = 0, j = g.length; T < j; T++) o(w(g, T), A, b, g, V);
|
|
7527
7540
|
else o(w(g, F), A, b + 1, g, V);
|
|
7528
7541
|
}(p, B, 0, p, G), G.length === 1) {
|
|
7529
7542
|
var q = G[0];
|
|
7530
7543
|
return U(D, q[0], q[1], q[2]);
|
|
7531
7544
|
}
|
|
7532
7545
|
for (var X = E && E.$ne !== void 0, _ = X, te = 0; te < G.length; te++) {
|
|
7533
|
-
var
|
|
7546
|
+
var h = G[te], u = U(D, h[0], h[1], h[2]);
|
|
7534
7547
|
X ? _ &= u : _ |= u;
|
|
7535
7548
|
}
|
|
7536
7549
|
return _;
|
|
@@ -7548,8 +7561,8 @@ var Dn = { exports: {} };
|
|
|
7548
7561
|
for (var _ in q) {
|
|
7549
7562
|
var te = q[_];
|
|
7550
7563
|
if (_ !== "$options") {
|
|
7551
|
-
var
|
|
7552
|
-
if (
|
|
7564
|
+
var h = $[_] || d && B && B[_];
|
|
7565
|
+
if (h) re[_] && (te = re[_](te, q, d)), X.push(de(p(te), h));
|
|
7553
7566
|
else {
|
|
7554
7567
|
if (_.charCodeAt(0) === 36)
|
|
7555
7568
|
throw new Error("Unknown operation " + _);
|
|
@@ -7561,8 +7574,8 @@ var Dn = { exports: {} };
|
|
|
7561
7574
|
return X.length === 1 ? X[0] : de(X, $.$and);
|
|
7562
7575
|
}, G = function(q) {
|
|
7563
7576
|
return q = D(q), function X(_, te) {
|
|
7564
|
-
if (!
|
|
7565
|
-
for (var
|
|
7577
|
+
if (!f(_)) return te;
|
|
7578
|
+
for (var h in _) te.push(h), X(_[h], te);
|
|
7566
7579
|
return te;
|
|
7567
7580
|
}(q, []).join(",").search(/[$.]/) === -1 ? de(q, Ne) : E(q);
|
|
7568
7581
|
};
|
|
@@ -7573,7 +7586,7 @@ var Dn = { exports: {} };
|
|
|
7573
7586
|
function Ne(d, p) {
|
|
7574
7587
|
if (Object.prototype.toString.call(d) !== Object.prototype.toString.call(p))
|
|
7575
7588
|
return !1;
|
|
7576
|
-
if (
|
|
7589
|
+
if (f(d)) {
|
|
7577
7590
|
if (Object.keys(d).length !== Object.keys(p).length) return !1;
|
|
7578
7591
|
for (var B in d) if (!Ne(d[B], p[B])) return !1;
|
|
7579
7592
|
return !0;
|
|
@@ -7626,7 +7639,7 @@ function Qo(e, t) {
|
|
|
7626
7639
|
function Ro(e, t, s) {
|
|
7627
7640
|
return t && Qo(e.prototype, t), e;
|
|
7628
7641
|
}
|
|
7629
|
-
function
|
|
7642
|
+
function To(e, t) {
|
|
7630
7643
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
|
|
7631
7644
|
}
|
|
7632
7645
|
function js(e) {
|
|
@@ -7639,7 +7652,7 @@ function St(e, t) {
|
|
|
7639
7652
|
return r.__proto__ = n, r;
|
|
7640
7653
|
}, St(e, t);
|
|
7641
7654
|
}
|
|
7642
|
-
function
|
|
7655
|
+
function ko() {
|
|
7643
7656
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
7644
7657
|
if (typeof Proxy == "function") return !0;
|
|
7645
7658
|
try {
|
|
@@ -7650,10 +7663,10 @@ function To() {
|
|
|
7650
7663
|
}
|
|
7651
7664
|
}
|
|
7652
7665
|
function Gt(e, t, s) {
|
|
7653
|
-
return
|
|
7666
|
+
return ko() ? Gt = Reflect.construct : Gt = function(n, a, c) {
|
|
7654
7667
|
var l = [null];
|
|
7655
7668
|
l.push.apply(l, a);
|
|
7656
|
-
var
|
|
7669
|
+
var f = Function.bind.apply(n, l), y = new f();
|
|
7657
7670
|
return c && St(y, c.prototype), y;
|
|
7658
7671
|
}, Gt.apply(null, arguments);
|
|
7659
7672
|
}
|
|
@@ -7691,7 +7704,7 @@ function nr(e) {
|
|
|
7691
7704
|
var xn = function(t) {
|
|
7692
7705
|
return 'Cannot execute "' + t.action + '" on "' + t.subjectName + '"';
|
|
7693
7706
|
}, xt = xn, Zo = /* @__PURE__ */ function(e) {
|
|
7694
|
-
|
|
7707
|
+
To(t, e), t.setDefaultMessage = function(n) {
|
|
7695
7708
|
n === null ? xt = xn : xt = typeof n == "string" ? function() {
|
|
7696
7709
|
return n;
|
|
7697
7710
|
} : n;
|
|
@@ -7719,8 +7732,8 @@ var xn = function(t) {
|
|
|
7719
7732
|
field: c,
|
|
7720
7733
|
subjectName: this.ability.subjectName(a)
|
|
7721
7734
|
});
|
|
7722
|
-
var
|
|
7723
|
-
throw this.message = this._customMessage ||
|
|
7735
|
+
var f = l ? l.reason : "";
|
|
7736
|
+
throw this.message = this._customMessage || f || xt(this), this;
|
|
7724
7737
|
}
|
|
7725
7738
|
}, s._setMetadata = function(n) {
|
|
7726
7739
|
this.subject = n.subject, this.subjectName = n.subjectName, this.action = n.action, this.field = n.field;
|
|
@@ -7808,8 +7821,8 @@ var tc = /* @__PURE__ */ function() {
|
|
|
7808
7821
|
var a = this.buildIndexFor(r);
|
|
7809
7822
|
return this[me].indexedRules = a.rules, this[me].hasPerFieldRules = a.hasPerFieldRules, this.emit("updated", n), this;
|
|
7810
7823
|
}, t.buildIndexFor = function(r) {
|
|
7811
|
-
for (var n = /* @__PURE__ */ Object.create(null), a = this[me].RuleType, c = !0, l = !1,
|
|
7812
|
-
var y = new a(r[
|
|
7824
|
+
for (var n = /* @__PURE__ */ Object.create(null), a = this[me].RuleType, c = !0, l = !1, f = 0; f < r.length; f++) {
|
|
7825
|
+
var y = new a(r[f]), w = this.expandActions(y.actions), O = Ys(y.subject), N = r.length - f - 1;
|
|
7813
7826
|
c = !!(c && y.inverted), !l && y.fields && (l = !0);
|
|
7814
7827
|
for (var U = 0; U < O.length; U++) {
|
|
7815
7828
|
var $ = O[U];
|
|
@@ -7845,8 +7858,8 @@ var tc = /* @__PURE__ */ function() {
|
|
|
7845
7858
|
var a = this.subjectName(n), c = this[me].mergedRules, l = a + "_" + r;
|
|
7846
7859
|
return c[l] || (c[l] = this.mergeRulesFor(r, a)), c[l];
|
|
7847
7860
|
}, t.mergeRulesFor = function(r, n) {
|
|
7848
|
-
var a = this[me].indexedRules, c = [n, "all"].reduce(function(l,
|
|
7849
|
-
var y = a[
|
|
7861
|
+
var a = this[me].indexedRules, c = [n, "all"].reduce(function(l, f) {
|
|
7862
|
+
var y = a[f];
|
|
7850
7863
|
return y ? Object.assign(l, y[r], y.manage) : l;
|
|
7851
7864
|
}, []);
|
|
7852
7865
|
return c.filter(Boolean);
|
|
@@ -7930,10 +7943,13 @@ function ac(e, t) {
|
|
|
7930
7943
|
const r = jn(t), n = En(r, e) ? e.coverSubject : void 0, a = [e.subject, n].filter(
|
|
7931
7944
|
(c) => c !== void 0
|
|
7932
7945
|
).flatMap((c) => {
|
|
7933
|
-
const l = Sa(c).
|
|
7934
|
-
|
|
7946
|
+
const l = Sa(c).filter((f) => {
|
|
7947
|
+
var y;
|
|
7948
|
+
return ((y = f.appliesToActions) == null ? void 0 : y.call(f, [e.action])) ?? !0;
|
|
7949
|
+
}).flatMap((f) => f.ownedFields);
|
|
7950
|
+
return l.length === 0 ? [] : r.rulesFor(e.action, c, e.field).filter((f) => !f.inverted).map((f) => ({ rule: f, ownedFields: l }));
|
|
7935
7951
|
});
|
|
7936
|
-
return a.length === 0 ? { ...s, conditionEvaluation: "not_enforced" } : a.some(({ rule: c, ownedFields: l }) => !(c.conditions ? Object.keys(c.conditions) : []).some((
|
|
7952
|
+
return a.length === 0 ? { ...s, conditionEvaluation: "not_enforced" } : a.some(({ rule: c, ownedFields: l }) => !(c.conditions ? Object.keys(c.conditions) : []).some((f) => l.includes(f))) ? { ...s, conditionEvaluation: "not_enforced" } : {
|
|
7937
7953
|
granted: !1,
|
|
7938
7954
|
decisivePermission: e,
|
|
7939
7955
|
decisiveRule: null,
|
|
@@ -7957,10 +7973,10 @@ function cc(e, t, s) {
|
|
|
7957
7973
|
evaluating: a = void 0,
|
|
7958
7974
|
shallow: c = !0,
|
|
7959
7975
|
onError: l = oc
|
|
7960
|
-
} = r,
|
|
7976
|
+
} = r, f = Re(!n), y = c ? On(t) : Re(t);
|
|
7961
7977
|
let w = 0;
|
|
7962
7978
|
return cr(async (O) => {
|
|
7963
|
-
if (!
|
|
7979
|
+
if (!f.value)
|
|
7964
7980
|
return;
|
|
7965
7981
|
w++;
|
|
7966
7982
|
const N = w;
|
|
@@ -7980,7 +7996,7 @@ function cc(e, t, s) {
|
|
|
7980
7996
|
} finally {
|
|
7981
7997
|
a && N === w && (a.value = !1), U = !0;
|
|
7982
7998
|
}
|
|
7983
|
-
}), n ? Os(() => (
|
|
7999
|
+
}), n ? Os(() => (f.value = !0, y.value)) : y;
|
|
7984
8000
|
}
|
|
7985
8001
|
async function lc(e) {
|
|
7986
8002
|
const { sessionUser: t, validationManifest: s } = e, { requiredRoles: r, requiredCaslPermissions: n, customValidationFunction: a } = s;
|
|
@@ -8131,7 +8147,7 @@ function Yc(e, t) {
|
|
|
8131
8147
|
const Gc = /* @__PURE__ */ ot({
|
|
8132
8148
|
__name: "FullWrapper",
|
|
8133
8149
|
setup(e) {
|
|
8134
|
-
const t =
|
|
8150
|
+
const t = kn(), s = Re(null), r = Yc(s), n = Os(() => {
|
|
8135
8151
|
var l;
|
|
8136
8152
|
const c = t.isAtMost("sm") ? 56 : 0;
|
|
8137
8153
|
return {
|
|
@@ -8161,7 +8177,7 @@ const Gc = /* @__PURE__ */ ot({
|
|
|
8161
8177
|
});
|
|
8162
8178
|
};
|
|
8163
8179
|
}
|
|
8164
|
-
}), Fe = (e) =>
|
|
8180
|
+
}), Fe = (e) => Tn({
|
|
8165
8181
|
loader: e,
|
|
8166
8182
|
loadingComponent: Pc
|
|
8167
8183
|
});
|
|
@@ -8175,10 +8191,10 @@ const vs = (e) => ({
|
|
|
8175
8191
|
}
|
|
8176
8192
|
]
|
|
8177
8193
|
}
|
|
8178
|
-
}), Oc = Lt(Fe(() => import("./Main-
|
|
8179
|
-
Fe(() => import("./AuditLogList-
|
|
8180
|
-
), Ic = Lt(Fe(() => import("./Main-
|
|
8181
|
-
() => import("./PermissionSetList-
|
|
8194
|
+
}), Oc = Lt(Fe(() => import("./Main-BLRr_ORG.js"))), Fc = Lt(Fe(() => import("./Main-mTxcltDY.js"))), qc = Lt(
|
|
8195
|
+
Fe(() => import("./AuditLogList-Cvp-5_0y.js"))
|
|
8196
|
+
), Ic = Lt(Fe(() => import("./Main-G3am-0Xi.js"))), Hc = Fe(() => import("./EmployeeList-DgrD3Hjm.js")), Xc = Fe(() => import("./RoleList-DOZ5RJ6A.js")), Qc = Fe(() => import("./TimesheetList-D21j4zLV.js")), Rc = Fe(() => import("./TeamMemberList-CAqLUyQK.js")), Tc = Fe(
|
|
8197
|
+
() => import("./PermissionSetList-OzyfE-Yg.js")
|
|
8182
8198
|
), il = [
|
|
8183
8199
|
{
|
|
8184
8200
|
path: "/",
|
|
@@ -8231,7 +8247,7 @@ const vs = (e) => ({
|
|
|
8231
8247
|
{
|
|
8232
8248
|
path: "role",
|
|
8233
8249
|
name: "team-role",
|
|
8234
|
-
component:
|
|
8250
|
+
component: Tc
|
|
8235
8251
|
}
|
|
8236
8252
|
]
|
|
8237
8253
|
},
|
|
@@ -8240,14 +8256,14 @@ const vs = (e) => ({
|
|
|
8240
8256
|
name: "pos-grant",
|
|
8241
8257
|
component: Ic
|
|
8242
8258
|
}
|
|
8243
|
-
],
|
|
8259
|
+
], kc = /* @__PURE__ */ ot({
|
|
8244
8260
|
__name: "Navigator",
|
|
8245
8261
|
emits: ["close-navigation"],
|
|
8246
8262
|
setup(e, { emit: t }) {
|
|
8247
8263
|
const s = t, { t: r } = mr(), n = Zn(), { sessionUser: a } = qs(), c = Os(() => {
|
|
8248
8264
|
var y;
|
|
8249
|
-
const
|
|
8250
|
-
return
|
|
8265
|
+
const f = [];
|
|
8266
|
+
return f.push({
|
|
8251
8267
|
label: r("hr.employee.title"),
|
|
8252
8268
|
value: "employee",
|
|
8253
8269
|
action: () => {
|
|
@@ -8256,7 +8272,7 @@ const vs = (e) => ({
|
|
|
8256
8272
|
query: n.currentRoute.value.query
|
|
8257
8273
|
}), s("close-navigation");
|
|
8258
8274
|
}
|
|
8259
|
-
}),
|
|
8275
|
+
}), f.push({
|
|
8260
8276
|
label: r("team.title"),
|
|
8261
8277
|
value: "team-member",
|
|
8262
8278
|
action: () => {
|
|
@@ -8265,7 +8281,7 @@ const vs = (e) => ({
|
|
|
8265
8281
|
query: n.currentRoute.value.query
|
|
8266
8282
|
}), s("close-navigation");
|
|
8267
8283
|
}
|
|
8268
|
-
}),
|
|
8284
|
+
}), f.push({
|
|
8269
8285
|
label: r("auditLog.title"),
|
|
8270
8286
|
value: "audit-log",
|
|
8271
8287
|
action: () => {
|
|
@@ -8273,7 +8289,7 @@ const vs = (e) => ({
|
|
|
8273
8289
|
name: se.AUDIT_LOG
|
|
8274
8290
|
}), s("close-navigation");
|
|
8275
8291
|
}
|
|
8276
|
-
}), (y = a.value) != null && y.role.isAdmin &&
|
|
8292
|
+
}), (y = a.value) != null && y.role.isAdmin && f.push({
|
|
8277
8293
|
label: r("grantUser.title"),
|
|
8278
8294
|
value: "pos-grant",
|
|
8279
8295
|
action: () => {
|
|
@@ -8282,32 +8298,32 @@ const vs = (e) => ({
|
|
|
8282
8298
|
query: n.currentRoute.value.query
|
|
8283
8299
|
}), s("close-navigation");
|
|
8284
8300
|
}
|
|
8285
|
-
}),
|
|
8301
|
+
}), f;
|
|
8286
8302
|
}), l = Re();
|
|
8287
8303
|
return cr(() => {
|
|
8288
8304
|
var y;
|
|
8289
|
-
let
|
|
8290
|
-
switch (
|
|
8305
|
+
let f = (y = n.currentRoute.value) == null ? void 0 : y.name;
|
|
8306
|
+
switch (f) {
|
|
8291
8307
|
case se.EMPLOYEE:
|
|
8292
8308
|
case se.ROLE:
|
|
8293
8309
|
case se.TIMESHEET:
|
|
8294
|
-
|
|
8310
|
+
f = se.EMPLOYEE;
|
|
8295
8311
|
break;
|
|
8296
8312
|
case se.TEAM_MEMBER:
|
|
8297
8313
|
case se.TEAM_ROLE:
|
|
8298
|
-
|
|
8314
|
+
f = se.TEAM_MEMBER;
|
|
8299
8315
|
break;
|
|
8300
8316
|
case se.AUDIT_LOG:
|
|
8301
|
-
|
|
8317
|
+
f = se.AUDIT_LOG;
|
|
8302
8318
|
break;
|
|
8303
8319
|
case se.POS_GRANT:
|
|
8304
|
-
|
|
8320
|
+
f = "pos-grant";
|
|
8305
8321
|
break;
|
|
8306
8322
|
default:
|
|
8307
|
-
|
|
8323
|
+
f = se.EMPLOYEE;
|
|
8308
8324
|
}
|
|
8309
|
-
l.value !==
|
|
8310
|
-
}), (
|
|
8325
|
+
l.value !== f && (l.value = f);
|
|
8326
|
+
}), (f, y) => {
|
|
8311
8327
|
const w = Fs("FmCollapsibleTabs");
|
|
8312
8328
|
return ct(), Ut(w, {
|
|
8313
8329
|
modelValue: l.value,
|
|
@@ -8323,62 +8339,62 @@ var Ps = { exports: {} };
|
|
|
8323
8339
|
(function(s, r) {
|
|
8324
8340
|
r(t);
|
|
8325
8341
|
})(yt, function(s) {
|
|
8326
|
-
var r = { getItemSync: function(
|
|
8342
|
+
var r = { getItemSync: function(h) {
|
|
8327
8343
|
try {
|
|
8328
|
-
return localStorage.getItem(
|
|
8344
|
+
return localStorage.getItem(h) || null;
|
|
8329
8345
|
} catch {
|
|
8330
8346
|
return null;
|
|
8331
8347
|
}
|
|
8332
|
-
}, getItem: function(
|
|
8348
|
+
}, getItem: function(h, u) {
|
|
8333
8349
|
var o = this;
|
|
8334
8350
|
return new Promise(function(g, A) {
|
|
8335
8351
|
try {
|
|
8336
|
-
var b = o.getItemSync(
|
|
8352
|
+
var b = o.getItemSync(h);
|
|
8337
8353
|
u == null || u(null, b), g(b);
|
|
8338
8354
|
} catch (M) {
|
|
8339
8355
|
u && u(M, null), A(M);
|
|
8340
8356
|
}
|
|
8341
8357
|
});
|
|
8342
|
-
}, setItem: function(
|
|
8358
|
+
}, setItem: function(h, u, o) {
|
|
8343
8359
|
return new Promise(function(g, A) {
|
|
8344
8360
|
try {
|
|
8345
|
-
localStorage.setItem(
|
|
8361
|
+
localStorage.setItem(h, u), o && o(null, u), g(u);
|
|
8346
8362
|
} catch (b) {
|
|
8347
8363
|
o && o(b, null), A(b);
|
|
8348
8364
|
}
|
|
8349
8365
|
});
|
|
8350
8366
|
} }, n = function() {
|
|
8351
|
-
return n = Object.assign || function(
|
|
8352
|
-
for (var u, o = 1, g = arguments.length; o < g; o++) for (var A in u = arguments[o]) Object.prototype.hasOwnProperty.call(u, A) && (
|
|
8353
|
-
return
|
|
8367
|
+
return n = Object.assign || function(h) {
|
|
8368
|
+
for (var u, o = 1, g = arguments.length; o < g; o++) for (var A in u = arguments[o]) Object.prototype.hasOwnProperty.call(u, A) && (h[A] = u[A]);
|
|
8369
|
+
return h;
|
|
8354
8370
|
}, n.apply(this, arguments);
|
|
8355
8371
|
};
|
|
8356
|
-
function a(
|
|
8372
|
+
function a(h, u, o, g) {
|
|
8357
8373
|
return new (o || (o = Promise))(function(A, b) {
|
|
8358
|
-
function M(
|
|
8374
|
+
function M(T) {
|
|
8359
8375
|
try {
|
|
8360
|
-
F(g.next(
|
|
8376
|
+
F(g.next(T));
|
|
8361
8377
|
} catch (j) {
|
|
8362
8378
|
b(j);
|
|
8363
8379
|
}
|
|
8364
8380
|
}
|
|
8365
|
-
function V(
|
|
8381
|
+
function V(T) {
|
|
8366
8382
|
try {
|
|
8367
|
-
F(g.throw(
|
|
8383
|
+
F(g.throw(T));
|
|
8368
8384
|
} catch (j) {
|
|
8369
8385
|
b(j);
|
|
8370
8386
|
}
|
|
8371
8387
|
}
|
|
8372
|
-
function F(
|
|
8388
|
+
function F(T) {
|
|
8373
8389
|
var j;
|
|
8374
|
-
|
|
8390
|
+
T.done ? A(T.value) : (j = T.value, j instanceof o ? j : new o(function(z) {
|
|
8375
8391
|
z(j);
|
|
8376
8392
|
})).then(M, V);
|
|
8377
8393
|
}
|
|
8378
|
-
F((g = g.apply(
|
|
8394
|
+
F((g = g.apply(h, [])).next());
|
|
8379
8395
|
});
|
|
8380
8396
|
}
|
|
8381
|
-
function c(
|
|
8397
|
+
function c(h, u) {
|
|
8382
8398
|
var o, g, A, b, M = { label: 0, sent: function() {
|
|
8383
8399
|
if (1 & A[0]) throw A[1];
|
|
8384
8400
|
return A[1];
|
|
@@ -8387,7 +8403,7 @@ var Ps = { exports: {} };
|
|
|
8387
8403
|
return this;
|
|
8388
8404
|
}), b;
|
|
8389
8405
|
function V(F) {
|
|
8390
|
-
return function(
|
|
8406
|
+
return function(T) {
|
|
8391
8407
|
return function(j) {
|
|
8392
8408
|
if (o) throw new TypeError("Generator is already executing.");
|
|
8393
8409
|
for (; M; ) try {
|
|
@@ -8425,7 +8441,7 @@ var Ps = { exports: {} };
|
|
|
8425
8441
|
A[2] && M.ops.pop(), M.trys.pop();
|
|
8426
8442
|
continue;
|
|
8427
8443
|
}
|
|
8428
|
-
j = u.call(
|
|
8444
|
+
j = u.call(h, M);
|
|
8429
8445
|
} catch (z) {
|
|
8430
8446
|
j = [6, z], g = 0;
|
|
8431
8447
|
} finally {
|
|
@@ -8433,22 +8449,22 @@ var Ps = { exports: {} };
|
|
|
8433
8449
|
}
|
|
8434
8450
|
if (5 & j[0]) throw j[1];
|
|
8435
8451
|
return { value: j[0] ? j[1] : void 0, done: !0 };
|
|
8436
|
-
}([F,
|
|
8452
|
+
}([F, T]);
|
|
8437
8453
|
};
|
|
8438
8454
|
}
|
|
8439
8455
|
}
|
|
8440
|
-
function l(
|
|
8456
|
+
function l(h, u, o) {
|
|
8441
8457
|
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]);
|
|
8442
|
-
return
|
|
8458
|
+
return h.concat(g || Array.prototype.slice.call(u));
|
|
8443
8459
|
}
|
|
8444
|
-
var
|
|
8460
|
+
var f = function h(u, o) {
|
|
8445
8461
|
if (u === o) return !0;
|
|
8446
8462
|
if (u && o && typeof u == "object" && typeof o == "object") {
|
|
8447
8463
|
if (u.constructor !== o.constructor) return !1;
|
|
8448
8464
|
var g, A, b;
|
|
8449
8465
|
if (Array.isArray(u)) {
|
|
8450
8466
|
if ((g = u.length) != o.length) return !1;
|
|
8451
|
-
for (A = g; A-- != 0; ) if (!
|
|
8467
|
+
for (A = g; A-- != 0; ) if (!h(u[A], o[A])) return !1;
|
|
8452
8468
|
return !0;
|
|
8453
8469
|
}
|
|
8454
8470
|
if (u.constructor === RegExp) return u.source === o.source && u.flags === o.flags;
|
|
@@ -8458,49 +8474,49 @@ var Ps = { exports: {} };
|
|
|
8458
8474
|
for (A = g; A-- != 0; ) if (!Object.prototype.hasOwnProperty.call(o, b[A])) return !1;
|
|
8459
8475
|
for (A = g; A-- != 0; ) {
|
|
8460
8476
|
var M = b[A];
|
|
8461
|
-
if (!
|
|
8477
|
+
if (!h(u[M], o[M])) return !1;
|
|
8462
8478
|
}
|
|
8463
8479
|
return !0;
|
|
8464
8480
|
}
|
|
8465
8481
|
return u != u && o != o;
|
|
8466
8482
|
};
|
|
8467
|
-
function y(
|
|
8483
|
+
function y(h, u) {
|
|
8468
8484
|
var o = Object.keys(u || {}).filter(function(g) {
|
|
8469
|
-
var A =
|
|
8470
|
-
return !
|
|
8485
|
+
var A = h == null ? void 0 : h[g], b = u == null ? void 0 : u[g];
|
|
8486
|
+
return !f(A, b);
|
|
8471
8487
|
});
|
|
8472
|
-
return Object.keys(
|
|
8488
|
+
return Object.keys(h || {}).filter(function(g) {
|
|
8473
8489
|
Object.keys(u || {}).includes(g) || o.push(g);
|
|
8474
8490
|
}), Object.keys(o).length ? o : null;
|
|
8475
8491
|
}
|
|
8476
8492
|
var w, O;
|
|
8477
|
-
function N(
|
|
8493
|
+
function N(h, u, o) {
|
|
8478
8494
|
var g = "shortString", A = !0;
|
|
8479
|
-
typeof o == "number" && (g = "javaDouble", A = !1),
|
|
8495
|
+
typeof o == "number" && (g = "javaDouble", A = !1), h[g] = h[g] || {}, h[g][u] = A ? o + "" : o;
|
|
8480
8496
|
}
|
|
8481
|
-
function U(
|
|
8482
|
-
return !!
|
|
8497
|
+
function U(h) {
|
|
8498
|
+
return !!h && typeof h == "object" && h.value !== void 0;
|
|
8483
8499
|
}
|
|
8484
|
-
function $(
|
|
8485
|
-
return Object.fromEntries(Object.entries(
|
|
8500
|
+
function $(h) {
|
|
8501
|
+
return Object.fromEntries(Object.entries(h).map(function(u) {
|
|
8486
8502
|
var o = u[0], g = u[1];
|
|
8487
8503
|
return [o, U(g) ? g : { value: g }];
|
|
8488
8504
|
}));
|
|
8489
8505
|
}
|
|
8490
|
-
function re(
|
|
8491
|
-
return n(n({},
|
|
8506
|
+
function re(h) {
|
|
8507
|
+
return n(n({}, h), { identity: h.identity ? n(n({}, h.identity), { traits: $(h.identity.traits || {}) }) : void 0 });
|
|
8492
8508
|
}
|
|
8493
|
-
(function(
|
|
8494
|
-
|
|
8509
|
+
(function(h) {
|
|
8510
|
+
h.NONE = "NONE", h.DEFAULT_FLAGS = "DEFAULT_FLAGS", h.CACHE = "CACHE", h.SERVER = "SERVER";
|
|
8495
8511
|
})(w || (w = {}));
|
|
8496
8512
|
var de, ne = null, Kt = "FLAGSMITH_EVENT", be = Kt, Ne = "https://edge.api.flagsmith.com/api/v1/", lt = "flagsmith_value_", Ct = "flagsmith_enabled_", ut = "flagsmith_trait_", At = function() {
|
|
8497
|
-
function
|
|
8513
|
+
function h(u) {
|
|
8498
8514
|
var o = this;
|
|
8499
8515
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
8500
8516
|
var g = o, A = g.api, b = g.evaluationContext;
|
|
8501
8517
|
o.log("Get Flags"), o.isLoading = !0, o.loadingState.isFetching || o.setLoadingState(n(n({}, o.loadingState), { isFetching: !0 }));
|
|
8502
8518
|
var M = "".concat(o.getContext().identity), V = function(F) {
|
|
8503
|
-
var
|
|
8519
|
+
var T, j, z, ce;
|
|
8504
8520
|
if (F && M === "".concat(o.getContext().identity)) {
|
|
8505
8521
|
var Be = F.flags, ge = F.traits, ve = F.identifier;
|
|
8506
8522
|
o.isLoading = !1;
|
|
@@ -8510,7 +8526,7 @@ var Ps = { exports: {} };
|
|
|
8510
8526
|
}), ge.forEach(function(W) {
|
|
8511
8527
|
fe[W.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: W.transient, value: W.trait_value };
|
|
8512
8528
|
}), o.oldFlags = n({}, o.flags);
|
|
8513
|
-
var Me = y(o.oldFlags, pe), mt = y((
|
|
8529
|
+
var Me = y(o.oldFlags, pe), mt = y((T = o.evaluationContext.identity) === null || T === void 0 ? void 0 : T.traits, fe);
|
|
8514
8530
|
if ((ve || Object.keys(fe).length) && (o.evaluationContext.identity = n(n({}, o.evaluationContext.identity), { traits: fe }), ve && (o.evaluationContext.identity.identifier = ve)), o.flags = pe, o.updateStorage(), o._onChange(o.oldFlags, { isFromServer: !0, flagsChanged: Me, traitsChanged: mt }, o._loadedState(null, w.SERVER)), o.datadogRum) try {
|
|
8515
8531
|
if (o.datadogRum.trackTraits) {
|
|
8516
8532
|
var dt = {};
|
|
@@ -8536,14 +8552,14 @@ var Ps = { exports: {} };
|
|
|
8536
8552
|
}
|
|
8537
8553
|
};
|
|
8538
8554
|
return b.identity ? Promise.all([b.identity.traits && Object.keys(b.identity.traits).length || !b.identity.identifier ? o.getJSON(A + "identities/", "POST", JSON.stringify({ identifier: b.identity.identifier, transient: b.identity.transient, traits: Object.entries(b.identity.traits).map(function(F) {
|
|
8539
|
-
var
|
|
8540
|
-
return { trait_key:
|
|
8555
|
+
var T = F[0], j = F[1];
|
|
8556
|
+
return { trait_key: T, trait_value: j == null ? void 0 : j.value, transient: j == null ? void 0 : j.transient };
|
|
8541
8557
|
}).filter(function(F) {
|
|
8542
8558
|
return F.trait_value !== void 0 || (o.log("Warning - attempted to set an undefined trait value for key", F.trait_key), !1);
|
|
8543
8559
|
}) })) : o.getJSON(A + "identities/?identifier=" + encodeURIComponent(b.identity.identifier) + (b.identity.transient ? "&transient=true" : ""))]).then(function(F) {
|
|
8544
8560
|
return o.evaluationContext.identity = n(n({}, o.evaluationContext.identity), { traits: {} }), V(F == null ? void 0 : F[0]);
|
|
8545
8561
|
}).catch(function(F) {
|
|
8546
|
-
var
|
|
8562
|
+
var T = F.message, j = new Error(T);
|
|
8547
8563
|
return Promise.reject(j);
|
|
8548
8564
|
}) : o.getJSON(A + "flags/").then(function(F) {
|
|
8549
8565
|
return V({ flags: F, traits: void 0 });
|
|
@@ -8602,10 +8618,10 @@ var Ps = { exports: {} };
|
|
|
8602
8618
|
}, this.getJSON = function(g, A, b) {
|
|
8603
8619
|
var M, V = o;
|
|
8604
8620
|
V.evaluationContext;
|
|
8605
|
-
var F = V.headers,
|
|
8606
|
-
o.evaluationContext.environment && (
|
|
8621
|
+
var F = V.headers, T = { method: A || "GET", body: b, cache: "no-cache", headers: {} };
|
|
8622
|
+
o.evaluationContext.environment && (T.headers["X-Environment-Key"] = o.evaluationContext.environment.apiKey), A && A !== "GET" && (T.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(T.headers, F), O || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
|
|
8607
8623
|
var j = "".concat((M = o.evaluationContext.identity) === null || M === void 0 ? void 0 : M.identifier);
|
|
8608
|
-
return O(g,
|
|
8624
|
+
return O(g, T).then(function(z) {
|
|
8609
8625
|
var ce, Be, ge = "".concat((ce = o.evaluationContext.identity) === null || ce === void 0 ? void 0 : ce.identifier);
|
|
8610
8626
|
if (j === ge) {
|
|
8611
8627
|
var ve = (Be = z.headers) === null || Be === void 0 ? void 0 : Be.get("x-flagsmith-document-updated-at");
|
|
@@ -8638,21 +8654,21 @@ var Ps = { exports: {} };
|
|
|
8638
8654
|
o.setLoadingState(b), (M = o.onChange) === null || M === void 0 || M.call(o, g, A, o.loadingState), (V = o._trigger) === null || V === void 0 || V.call(o);
|
|
8639
8655
|
}, O = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : yt == null ? void 0 : yt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (de = u.eventSource), u.AsyncStorage && (ne = u.AsyncStorage);
|
|
8640
8656
|
}
|
|
8641
|
-
return
|
|
8657
|
+
return h.prototype.init = function(u) {
|
|
8642
8658
|
var o, g, A;
|
|
8643
8659
|
return a(this, void 0, void 0, function() {
|
|
8644
|
-
var b, M, V, F,
|
|
8660
|
+
var b, M, V, F, T, j, z, ce, Be, ge, ve, pe, fe, Me, mt, dt, Je, le, W, Jt, gt, Ts, _e, _t, ks, Ns, $t, Zs, es, pt, $e, Ss, ue = this;
|
|
8645
8661
|
return c(this, function(we) {
|
|
8646
8662
|
switch (we.label) {
|
|
8647
8663
|
case 0:
|
|
8648
8664
|
b = re(u.evaluationContext || this.evaluationContext), we.label = 1;
|
|
8649
8665
|
case 1:
|
|
8650
|
-
if (we.trys.push([1, 13, , 14]), M = u.environmentID, V = u.api, F = V === void 0 ? Ne : V,
|
|
8666
|
+
if (we.trys.push([1, 13, , 14]), M = u.environmentID, V = u.api, F = V === void 0 ? Ne : V, T = u.headers, j = u.onChange, z = u.cacheFlags, ce = u.datadogRum, Be = u.onError, ge = u.defaultFlags, ve = u.fetch, pe = u.preventFetch, fe = u.enableLogs, Me = u.enableDynatrace, mt = u.enableAnalytics, dt = u.realtime, Je = u.eventSourceUrl, le = Je === void 0 ? "https://realtime.flagsmith.com/" : Je, W = u.AsyncStorage, Jt = u.identity, gt = u.traits, Ts = u.state, _e = u.cacheOptions, _t = u.angularHttpClient, ks = u._trigger, Ns = 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`");
|
|
8651
8667
|
if (b.identity = Jt || gt ? { identifier: Jt, traits: gt ? Object.fromEntries(Object.entries(gt).map(function(he) {
|
|
8652
8668
|
return [he[0], { value: he[1] }];
|
|
8653
|
-
})) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers =
|
|
8669
|
+
})) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = T, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, $t = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = ks || this._trigger, this._triggerLoadingState = Ns || this._triggerLoadingState, this.onError = function(he) {
|
|
8654
8670
|
ue.setLoadingState(n(n({}, ue.loadingState), { isFetching: !1, isLoading: !1, error: he })), Be == null || Be(he);
|
|
8655
|
-
}, 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 = mt || !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), dt && 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(
|
|
8671
|
+
}, 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 = mt || !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), dt && 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(Ts), this.log("Initialising with properties", u, this), Me && (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) {
|
|
8656
8672
|
return function(Ce, De) {
|
|
8657
8673
|
var qe = De.headers, K = De.method, et = De.body;
|
|
8658
8674
|
return new Promise(function(Ze) {
|
|
@@ -8760,45 +8776,45 @@ var Ps = { exports: {} };
|
|
|
8760
8776
|
}
|
|
8761
8777
|
});
|
|
8762
8778
|
});
|
|
8763
|
-
},
|
|
8779
|
+
}, h.prototype.getAllFlags = function() {
|
|
8764
8780
|
return this.flags;
|
|
8765
|
-
},
|
|
8781
|
+
}, h.prototype.identify = function(u, o, g) {
|
|
8766
8782
|
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), o && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(o).map(function(A) {
|
|
8767
8783
|
var b = A[0], M = A[1];
|
|
8768
8784
|
return [b, U(M) ? M : { value: M }];
|
|
8769
8785
|
}))), this.initialised ? this.getFlags() : Promise.resolve();
|
|
8770
|
-
},
|
|
8786
|
+
}, h.prototype.getState = function() {
|
|
8771
8787
|
return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
|
|
8772
|
-
},
|
|
8788
|
+
}, h.prototype.setState = function(u) {
|
|
8773
8789
|
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));
|
|
8774
|
-
},
|
|
8790
|
+
}, h.prototype.logout = function() {
|
|
8775
8791
|
return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
|
|
8776
|
-
},
|
|
8792
|
+
}, h.prototype.startListening = function(u) {
|
|
8777
8793
|
u === void 0 && (u = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, u);
|
|
8778
|
-
},
|
|
8794
|
+
}, h.prototype.stopListening = function() {
|
|
8779
8795
|
this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
|
|
8780
|
-
},
|
|
8796
|
+
}, h.prototype._loadedState = function(u, o, g) {
|
|
8781
8797
|
return u === void 0 && (u = null), g === void 0 && (g = !1), { error: u, isFetching: g, isLoading: !1, source: o };
|
|
8782
|
-
},
|
|
8798
|
+
}, h.prototype.log = function() {
|
|
8783
8799
|
for (var u = [], o = 0; o < arguments.length; o++) u[o] = arguments[o];
|
|
8784
8800
|
this.enableLogs && console.log.apply(this, l(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], u));
|
|
8785
|
-
},
|
|
8801
|
+
}, h.prototype.updateStorage = function() {
|
|
8786
8802
|
if (this.cacheFlags) {
|
|
8787
8803
|
this.ts = (/* @__PURE__ */ new Date()).valueOf();
|
|
8788
8804
|
var u = JSON.stringify(this.getState());
|
|
8789
8805
|
this.log("Setting storage", u), ne.setItem(this.getStorageKey(), u);
|
|
8790
8806
|
}
|
|
8791
|
-
},
|
|
8807
|
+
}, h.prototype.updateEventStorage = function() {
|
|
8792
8808
|
if (this.enableAnalytics) {
|
|
8793
8809
|
var u = JSON.stringify(this.getState().evaluationEvent);
|
|
8794
8810
|
ne.setItem(be, u).catch(function(o) {
|
|
8795
8811
|
return console.error("Flagsmith: Error setting item in async storage", o);
|
|
8796
8812
|
});
|
|
8797
8813
|
}
|
|
8798
|
-
},
|
|
8814
|
+
}, h.prototype.setLoadingState = function(u) {
|
|
8799
8815
|
var o;
|
|
8800
|
-
|
|
8801
|
-
},
|
|
8816
|
+
f(u, this.loadingState) || (this.loadingState = n({}, u), this.log("Loading state changed", u), (o = this._triggerLoadingState) === null || o === void 0 || o.call(this));
|
|
8817
|
+
}, h.prototype.setupRealtime = function(u, o) {
|
|
8802
8818
|
var g = this, A = u + "sse/environments/" + o + "/stream";
|
|
8803
8819
|
de ? this.eventSource || (this.log("Creating event source with url " + A), this.eventSource = new de(A), this.eventSource.addEventListener("environment_updated", function(b) {
|
|
8804
8820
|
var M;
|
|
@@ -8809,35 +8825,35 @@ var Ps = { exports: {} };
|
|
|
8809
8825
|
}
|
|
8810
8826
|
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);
|
|
8811
8827
|
})) : this.log("Error, EventSource is undefined");
|
|
8812
|
-
},
|
|
8828
|
+
}, h;
|
|
8813
8829
|
}();
|
|
8814
|
-
function d(
|
|
8815
|
-
var u =
|
|
8830
|
+
function d(h) {
|
|
8831
|
+
var u = h.fetch, o = h.AsyncStorage, g = h.eventSource;
|
|
8816
8832
|
return new At({ fetch: u, AsyncStorage: o, eventSource: g });
|
|
8817
8833
|
}
|
|
8818
|
-
var p, B = (p = function(
|
|
8834
|
+
var p, B = (p = function(h, u) {
|
|
8819
8835
|
return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, g) {
|
|
8820
8836
|
o.__proto__ = g;
|
|
8821
8837
|
} || function(o, g) {
|
|
8822
8838
|
for (var A in g) Object.prototype.hasOwnProperty.call(g, A) && (o[A] = g[A]);
|
|
8823
|
-
}, p(
|
|
8824
|
-
}, function(
|
|
8839
|
+
}, p(h, u);
|
|
8840
|
+
}, function(h, u) {
|
|
8825
8841
|
if (typeof u != "function" && u !== null) throw new TypeError("Class extends value " + String(u) + " is not a constructor or null");
|
|
8826
8842
|
function o() {
|
|
8827
|
-
this.constructor =
|
|
8843
|
+
this.constructor = h;
|
|
8828
8844
|
}
|
|
8829
|
-
p(
|
|
8830
|
-
}), D = function(
|
|
8831
|
-
var u = typeof Symbol == "function" && Symbol.iterator, o = u &&
|
|
8832
|
-
if (o) return o.call(
|
|
8833
|
-
if (
|
|
8834
|
-
return
|
|
8845
|
+
p(h, u), h.prototype = u === null ? Object.create(u) : (o.prototype = u.prototype, new o());
|
|
8846
|
+
}), D = function(h) {
|
|
8847
|
+
var u = typeof Symbol == "function" && Symbol.iterator, o = u && h[u], g = 0;
|
|
8848
|
+
if (o) return o.call(h);
|
|
8849
|
+
if (h && typeof h.length == "number") return { next: function() {
|
|
8850
|
+
return h && g >= h.length && (h = void 0), { value: h && h[g++], done: !h };
|
|
8835
8851
|
} };
|
|
8836
8852
|
throw new TypeError(u ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
8837
|
-
}, E = function(
|
|
8838
|
-
var o = typeof Symbol == "function" &&
|
|
8839
|
-
if (!o) return
|
|
8840
|
-
var g, A, b = o.call(
|
|
8853
|
+
}, E = function(h, u) {
|
|
8854
|
+
var o = typeof Symbol == "function" && h[Symbol.iterator];
|
|
8855
|
+
if (!o) return h;
|
|
8856
|
+
var g, A, b = o.call(h), M = [];
|
|
8841
8857
|
try {
|
|
8842
8858
|
for (; (u === void 0 || u-- > 0) && !(g = b.next()).done; ) M.push(g.value);
|
|
8843
8859
|
} catch (V) {
|
|
@@ -8850,26 +8866,26 @@ var Ps = { exports: {} };
|
|
|
8850
8866
|
}
|
|
8851
8867
|
}
|
|
8852
8868
|
return M;
|
|
8853
|
-
}, G = function(
|
|
8869
|
+
}, G = function(h, u, o) {
|
|
8854
8870
|
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]);
|
|
8855
|
-
return
|
|
8856
|
-
}, q = function(
|
|
8871
|
+
return h.concat(g || Array.prototype.slice.call(u));
|
|
8872
|
+
}, q = function(h) {
|
|
8857
8873
|
function u() {
|
|
8858
|
-
return
|
|
8874
|
+
return h.call(this, `EventSource not available.
|
|
8859
8875
|
Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
|
|
8860
8876
|
}
|
|
8861
|
-
return B(u,
|
|
8877
|
+
return B(u, h), u;
|
|
8862
8878
|
}(Error), X = function() {
|
|
8863
|
-
function
|
|
8879
|
+
function h(u, o) {
|
|
8864
8880
|
var g = this;
|
|
8865
8881
|
if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = o != null ? Object.assign({}, o) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = u.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new q();
|
|
8866
8882
|
this._onevent_wrapped = function(A) {
|
|
8867
8883
|
g._onevent(A);
|
|
8868
8884
|
}, this._start();
|
|
8869
8885
|
}
|
|
8870
|
-
return
|
|
8886
|
+
return h.prototype.dispatchEvent = function(u) {
|
|
8871
8887
|
throw new Error("Method not implemented.");
|
|
8872
|
-
},
|
|
8888
|
+
}, h.prototype._start = function() {
|
|
8873
8889
|
var u, o, g = this, A = this.url;
|
|
8874
8890
|
this._lastEventId && (A.indexOf("?") === -1 ? A += "?" : A += "&", A += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(A, this._configuration), this._eventSource.onopen = function(F) {
|
|
8875
8891
|
g._onopen(F);
|
|
@@ -8892,9 +8908,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
8892
8908
|
if (u) throw u.error;
|
|
8893
8909
|
}
|
|
8894
8910
|
}
|
|
8895
|
-
},
|
|
8911
|
+
}, h.prototype._onopen = function(u) {
|
|
8896
8912
|
this.readyState === 0 && (this.readyState = 1, this.onopen(u));
|
|
8897
|
-
},
|
|
8913
|
+
}, h.prototype._onerror = function(u) {
|
|
8898
8914
|
var o = this;
|
|
8899
8915
|
if (this.readyState === 1 && (this.readyState = 0, this.onerror(u)), this._eventSource) {
|
|
8900
8916
|
this._eventSource.close(), this._eventSource = null;
|
|
@@ -8903,7 +8919,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
8903
8919
|
return o._start();
|
|
8904
8920
|
}, g);
|
|
8905
8921
|
}
|
|
8906
|
-
},
|
|
8922
|
+
}, h.prototype._onevent = function(u) {
|
|
8907
8923
|
var o, g;
|
|
8908
8924
|
u && u.lastEventId && (this._lastEventId = u.lastEventId);
|
|
8909
8925
|
var A = this._listeners[u.type];
|
|
@@ -8920,24 +8936,24 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
8920
8936
|
}
|
|
8921
8937
|
}
|
|
8922
8938
|
u.type === "message" && this.onmessage(u);
|
|
8923
|
-
},
|
|
8924
|
-
},
|
|
8925
|
-
},
|
|
8926
|
-
},
|
|
8939
|
+
}, h.prototype.onopen = function(u) {
|
|
8940
|
+
}, h.prototype.onerror = function(u) {
|
|
8941
|
+
}, h.prototype.onmessage = function(u) {
|
|
8942
|
+
}, h.prototype.close = function() {
|
|
8927
8943
|
this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
|
|
8928
|
-
},
|
|
8944
|
+
}, h.prototype.addEventListener = function(u, o, g) {
|
|
8929
8945
|
this._listeners[u] == null && (this._listeners[u] = [], this._eventSource != null && this._eventSource.addEventListener(u, this._onevent_wrapped));
|
|
8930
8946
|
var A = this._listeners[u];
|
|
8931
8947
|
A.includes(o) || (this._listeners[u] = G(G([], E(A), !1), [o], !1));
|
|
8932
|
-
},
|
|
8948
|
+
}, h.prototype.removeEventListener = function(u, o, g) {
|
|
8933
8949
|
var A = this._listeners[u];
|
|
8934
8950
|
this._listeners[u] = A.filter(function(b) {
|
|
8935
8951
|
return b !== o;
|
|
8936
8952
|
});
|
|
8937
|
-
},
|
|
8953
|
+
}, h;
|
|
8938
8954
|
}();
|
|
8939
8955
|
globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
|
|
8940
|
-
var _ = function(
|
|
8956
|
+
var _ = function(h, u) {
|
|
8941
8957
|
return u = u || {}, new Promise(function(o, g) {
|
|
8942
8958
|
var A = new XMLHttpRequest(), b = [], M = [], V = {}, F = function() {
|
|
8943
8959
|
return { ok: (A.status / 100 | 0) == 2, statusText: A.statusText, status: A.status, url: A.responseURL, text: function() {
|
|
@@ -8956,11 +8972,11 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
8956
8972
|
return j.toLowerCase() in V;
|
|
8957
8973
|
} } };
|
|
8958
8974
|
};
|
|
8959
|
-
for (var
|
|
8975
|
+
for (var T in A.open(u.method || "get", h, !0), A.onload = function() {
|
|
8960
8976
|
A.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, z, ce) {
|
|
8961
8977
|
b.push(z = z.toLowerCase()), M.push([z, ce]), V[z] = V[z] ? V[z] + "," + ce : ce;
|
|
8962
8978
|
}), o(F());
|
|
8963
|
-
}, A.onerror = g, A.withCredentials = u.credentials == "include", u.headers) A.setRequestHeader(
|
|
8979
|
+
}, A.onerror = g, A.withCredentials = u.credentials == "include", u.headers) A.setRequestHeader(T, u.headers[T]);
|
|
8964
8980
|
A.send(u.body || null);
|
|
8965
8981
|
});
|
|
8966
8982
|
}, te = d({ AsyncStorage: r, fetch: _, eventSource: X });
|
|
@@ -9113,7 +9129,7 @@ function zc(e = Uc) {
|
|
|
9113
9129
|
} catch ($) {
|
|
9114
9130
|
return console.error(`Error getting user flag value for ${O}:`, $), N;
|
|
9115
9131
|
}
|
|
9116
|
-
},
|
|
9132
|
+
}, f = async (w, O, N = null, U) => l(`${or}-${w}`, O, N, U), y = () => {
|
|
9117
9133
|
try {
|
|
9118
9134
|
e.reset();
|
|
9119
9135
|
} catch (w) {
|
|
@@ -9132,7 +9148,7 @@ function zc(e = Uc) {
|
|
|
9132
9148
|
getFlagValue: a,
|
|
9133
9149
|
getFlag: c,
|
|
9134
9150
|
getUserFlagValue: l,
|
|
9135
|
-
getBusinessFlagValue:
|
|
9151
|
+
getBusinessFlagValue: f,
|
|
9136
9152
|
reset: y
|
|
9137
9153
|
};
|
|
9138
9154
|
}
|
|
@@ -9142,7 +9158,7 @@ const ol = /* @__PURE__ */ ot({
|
|
|
9142
9158
|
setup(e) {
|
|
9143
9159
|
const t = qs(), { init: s } = Wc();
|
|
9144
9160
|
return Ar(async () => {
|
|
9145
|
-
t.registerSidebarComponent(
|
|
9161
|
+
t.registerSidebarComponent(kc), await s({
|
|
9146
9162
|
apiKey: t.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
|
|
9147
9163
|
});
|
|
9148
9164
|
}), (r, n) => {
|
|
@@ -9152,7 +9168,7 @@ const ol = /* @__PURE__ */ ot({
|
|
|
9152
9168
|
}
|
|
9153
9169
|
}), cl = () => {
|
|
9154
9170
|
const e = [
|
|
9155
|
-
|
|
9171
|
+
ki,
|
|
9156
9172
|
Oi,
|
|
9157
9173
|
Ci,
|
|
9158
9174
|
Ji,
|