@feedmepos/mf-settings 0.0.59-beta.1 → 0.0.60-prod

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.
@@ -1,3928 +0,0 @@
1
- var Or = Object.defineProperty;
2
- var Sr = (t, e, r) => e in t ? Or(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var He = (t, e, r) => (Sr(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { defineComponent as re, ref as ae, resolveComponent as q, openBlock as F, createBlock as te, withCtx as K, withModifiers as st, createCommentVNode as ce, renderSlot as de, createElementVNode as $, nextTick as Pr, createElementBlock as B, normalizeClass as ee, createTextVNode as Ve, toDisplayString as G, computed as Y, normalizeStyle as Fe, createVNode as N, reactive as ct, Fragment as oe, unref as _, renderList as he, h as Rt, Teleport as Tr, Transition as Lr, withKeys as Nr, watch as It, onMounted as Cr, onUnmounted as xr, toRaw as At, normalizeProps as kr, guardReactiveProps as Vr, getCurrentInstance as Fr, isRef as Ot } from "vue";
5
- import { useCoreStore as pe, useI18n as ve, CustomAttributesForm as jr } from "@feedmepos/mf-common";
6
- import { useSnackbar as dt, components as Mr, useDialog as ft, useDialogChild as Ur, useBreakpoints as ur } from "@feedmepos/ui-library";
7
- import { a as Dr, _ as Gr } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-08a69f88.js";
8
- import { _ as Br, c as ze } from "./createForm-d3b97d2e.js";
9
- import { D as mt, u as cr } from "./dayjs.min-2edeb0fb.js";
10
- import { _ as Re, c as Kr } from "./FormSection.vue_vue_type_script_setup_true_lang-6aab82f2.js";
11
- import { e as pt, g as dr, c as qr } from "./index-cc4114ab.js";
12
- import { u as fr, b as Pe, a as Xe, g as je } from "./index-d43d45c9.js";
13
- import { c as $e } from "./object-27ce045b.js";
14
- import { b as Hr } from "./business-a1966413.js";
15
- import { t as Ye, w as We, x as zr, y as Xr, z as Yr, A as Wr, B as Me, u as be, D as Jr, G as Zr } from "./map-695afd6f.js";
16
- import { _ as mr } from "./_plugin-vue_export-helper-dad06003.js";
17
- import { u as Qr } from "./app-14f51ab7.js";
18
- import { r as fe } from "./rules-2bee6632.js";
19
- import "pinia";
20
- import "@feedmepos/mf-mdm";
21
- import "vue-router";
22
- import "@feedmepos/mf-e-invoice";
23
- var en = {};
24
- (function(t) {
25
- Object.defineProperty(t, "__esModule", { value: !0 }), function(e) {
26
- e.SLOT_SALE = "SLOT_SALE";
27
- }(t.ReportWidgetType || (t.ReportWidgetType = {})), function(e) {
28
- e.v2 = "v2", e.v3 = "v3", e.v4 = "v4";
29
- }(t.MENU_VERSION || (t.MENU_VERSION = {})), function(e) {
30
- e.Polygon = "Polygon";
31
- }(t.GeometryType || (t.GeometryType = {})), function(e) {
32
- e.stock = "stock", e.discovery = "discovery", e.pickup = "pickup", e.delivery = "delivery", e.foodpanda = "foodpanda", e.deliveryIntegration = "deliveryIntegration", e.kds = "kds", e.ods = "ods";
33
- }(t.RestaurantFeature || (t.RestaurantFeature = {})), function(e) {
34
- e.alpha = "alpha", e.beta = "beta", e.latest = "latest";
35
- }(t.RestaurantChannel || (t.RestaurantChannel = {})), function(e) {
36
- e.pickup = "pickup", e.delivery = "delivery";
37
- }(t.DiscoveryType || (t.DiscoveryType = {})), function(e) {
38
- e.new = "NEW", e.pending = "PENDING", e.approved = "APPROVED";
39
- }(t.PAYOUT_ACCOUNT_STATUS || (t.PAYOUT_ACCOUNT_STATUS = {})), function(e) {
40
- e.maybank = "MAYBANK", e.cimbBank = "CIMB_BANK", e.rhbBank = "RHB_BANK", e.bankIslam = "BANK_ISLAM", e.bankMuamalat = "BANK_MUAMALAT", e.bankRakyat = "BANK_RAKYAT", e.bankSimpananNasional = "BANK_SIMPANAN_NASIONAL", e.citiBank = "CITIBANK", e.hongLeongBank = "HONG_LEONG_BANK", e.hsbcBank = "HSBC_BANK", e.ocbcBank = "OCBC_BANK", e.publicBank = "PUBLIC_BANK", e.affinBank = "AFFIN_BANK", e.amBank = "AMBANK", e.agroBank = "AGRO_BANK", e.allianceBank = "ALLIANCE_BANK", e.alRajhiBank = "AL_RAJHI_BANK", e.bankOfChina = "BANK_OF_CHINA", e.bankOfAmerica = "BANK_OF_AMERICA", e.bankOfTokyoMitsubishiUFJ = "BANK_OF_TOKYO_MITSUBISHI_UFJ", e.bnpParibas = "BNP_PARIBAS", e.deutscheBank = "DEUTSCHE_BANK", e.industrialCommercialBankOfChina = "INDUSTRIAL_COMMERCIAL_BANK_OF_CHINA", e.jpMorganChaseBank = "JP_MORGAN_CHASE_BANK", e.kuwaitFinanceHouse = "KUWAIT_FINANCE_HOUSE", e.mizuhoBank = "MIZUHO_BANK", e.standardCharteredBank = "STANDARD_CHARTERED_BANK", e.sumitomoMitsuiBankingCorporation = "SUMITOMO_MITSUI_BANKING_CORPORATION", e.theRoyalBankOfScotland = "THE_ROYAL_BANK_OF_SCOTLAND", e.unitedOverseasBank = "UNITED_OVERSEAS_BANK";
41
- }(t.BankName || (t.BankName = {})), function(e) {
42
- e.current = "CURRENT_ACCOUNT", e.saving = "SAVING_ACCOUNT";
43
- }(t.BankType || (t.BankType = {})), function(e) {
44
- e[e.maybank = 100002270] = "maybank", e[e.cimbBank = 100002050] = "cimbBank", e[e.rhbBank = 100002186] = "rhbBank", e[e.bankIslam = 100002458] = "bankIslam", e[e.bankMuamalat = 100002458] = "bankMuamalat", e[e.bankRakyat = 100016020] = "bankRakyat", e[e.bankSimpananNasional = 100016017] = "bankSimpananNasional", e[e.citiBank = 100002173] = "citiBank", e[e.hongLeongBank = 100002241] = "hongLeongBank", e[e.hsbcBank = 100002225] = "hsbcBank", e[e.ocbcBank = 100002296] = "ocbcBank", e[e.publicBank = 100002335] = "publicBank", e[e.affinBank = 100002322] = "affinBank", e[e.amBank = 100002089] = "amBank", e[e.agroBank = 100033061] = "agroBank", e[e.allianceBank = 100002128] = "allianceBank", e[e.alRajhiBank = 100003509] = "alRajhiBank", e[e.bankOfChina = 100002429] = "bankOfChina", e[e.bankOfAmerica = 100002076] = "bankOfAmerica", e[e.bankOfTokyoMitsubishiUFJ = 100002102] = "bankOfTokyoMitsubishiUFJ", e[e.bnpParibas = 100002636] = "bnpParibas", e[e.deutscheBank = 100002199] = "deutscheBank", e[e.industrialCommercialBankOfChina = 100002597] = "industrialCommercialBankOfChina", e[e.jpMorganChaseBank = 100002157] = "jpMorganChaseBank", e[e.kuwaitFinanceHouse = 100003460] = "kuwaitFinanceHouse", e[e.mizuhoBank = 100002610] = "mizuhoBank", e[e.standardCharteredBank = 100002144] = "standardCharteredBank", e[e.sumitomoMitsuiBankingCorporation = 100002623] = "sumitomoMitsuiBankingCorporation", e[e.unitedOverseasBank = 100002267] = "unitedOverseasBank";
45
- }(t.BankRouting || (t.BankRouting = {})), function(e) {
46
- e.maybank = "MBBEMYKL", e.cimbBank = "CIBBMYKL", e.rhbBank = "RHBBMYKL", e.bankIslam = "BIMBMYKL", e.bankMuamalat = "BMMBMYKL", e.bankRakyat = "BKRMMYKL", e.bankSimpananNasional = "BSNAMYK1", e.citiBank = "CITIMYKL", e.hongLeongBank = "HLBBMYKL", e.hsbcBank = "HBMBMYKL", e.ocbcBank = "OCBCMYKL", e.publicBank = "PBBEMYKL", e.affinBank = "PHBMMYKL", e.amBank = "ARBKMYKL", e.agroBank = "AGOBMYKL", e.allianceBank = "MFBBMYKL", e.alRajhiBank = "RJHIMYKL", e.bankOfChina = "BKCHMYKL", e.bankOfAmerica = "BOFAMY2X", e.bankOfTokyoMitsubishiUFJ = "BOTKMYKX", e.bnpParibas = "BNPAMYKL", e.deutscheBank = "DEUTMYKL", e.industrialCommercialBankOfChina = "ICBKMYKL", e.jpMorganChaseBank = "CHASMYKX", e.kuwaitFinanceHouse = "KFHOMYKL", e.mizuhoBank = "MHCBMYKA", e.standardCharteredBank = "SCBLMYKX", e.sumitomoMitsuiBankingCorporation = "SMBCMYKL", e.unitedOverseasBank = "UOVBMYKL";
47
- }(t.BankSwiftCode || (t.BankSwiftCode = {})), function(e) {
48
- e.grab = "Grab", e.merchant = "Merchant", e.partner = "Partner";
49
- }(t.GF_CAMPAIGN_CREATED_BY || (t.GF_CAMPAIGN_CREATED_BY = {})), function(e) {
50
- e.all = "all", e.new = "new";
51
- }(t.GF_CAMPAIGN_EATER_TYPE || (t.GF_CAMPAIGN_EATER_TYPE = {})), function(e) {
52
- e.net = "net", e.percentage = "percentage", e.delivery = "delivery", e.freeItem = "freeItem";
53
- }(t.GF_CAMPAIGN_DISCOUNT_TYPE || (t.GF_CAMPAIGN_DISCOUNT_TYPE = {})), function(e) {
54
- e.order = "order", e.items = "items";
55
- }(t.GF_CAMPAIGN_SCOPE_TYPE || (t.GF_CAMPAIGN_SCOPE_TYPE = {}));
56
- })(en);
57
- const tn = /* @__PURE__ */ re({
58
- __name: "BottomSheetMenu",
59
- setup(t) {
60
- const e = ae(!1);
61
- async function r() {
62
- await Pr(), e.value = !e.value;
63
- }
64
- return (n, s) => {
65
- const o = q("FmButton"), i = q("FmBottomSheet");
66
- return F(), te(i, {
67
- modelValue: e.value,
68
- "onUpdate:modelValue": s[1] || (s[1] = (f) => e.value = f),
69
- "dismiss-away": "",
70
- "no-header": "",
71
- "z-index": 110
72
- }, {
73
- "bottom-sheet-button": K(() => [
74
- n.$slots.button ? ce("", !0) : (F(), te(o, {
75
- key: 0,
76
- icon: "more_vert",
77
- variant: "tertiary",
78
- onClick: st(r, ["stop"])
79
- })),
80
- de(n.$slots, "button")
81
- ]),
82
- default: K(() => [
83
- $("div", {
84
- onClick: s[0] || (s[0] = (f) => e.value = !1)
85
- }, [
86
- de(n.$slots, "default")
87
- ])
88
- ]),
89
- _: 3
90
- }, 8, ["modelValue"]);
91
- };
92
- }
93
- }), rn = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, nn = /* @__PURE__ */ re({
94
- __name: "BottomSheetMenuItem",
95
- props: {
96
- label: {},
97
- icon: {},
98
- disabled: { type: Boolean },
99
- itemClass: {}
100
- },
101
- setup(t) {
102
- const e = t;
103
- return (r, n) => {
104
- const s = q("FmIcon");
105
- return F(), B("div", rn, [
106
- r.$slots.content ? ce("", !0) : (F(), B("div", {
107
- key: 0,
108
- class: ee(["flex items-center", {
109
- "text-fm-color-typo-disabled": e.disabled,
110
- "cursor-pointer": !e.disabled,
111
- "cursor-not-allowed": e.disabled,
112
- [e.itemClass || ""]: e.itemClass && !e.disabled
113
- }])
114
- }, [
115
- r.icon ? (F(), te(s, {
116
- key: 0,
117
- name: r.icon
118
- }, null, 8, ["name"])) : ce("", !0),
119
- Ve(" " + G(r.label), 1)
120
- ], 2)),
121
- de(r.$slots, "content")
122
- ]);
123
- };
124
- }
125
- }), sn = {
126
- key: 0,
127
- class: "space-y-4"
128
- }, an = { class: "fm-typo-en-body-lg-600" }, on = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ln = {
129
- class: /* @__PURE__ */ ee(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
130
- }, un = {
131
- class: /* @__PURE__ */ ee(["relative z-0", "w-full h-full", "overflow-hidden"])
132
- }, cn = ["src"], dn = { class: "fm-typo-en-body-lg-600" }, fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ye = /* @__PURE__ */ re({
133
- __name: "ImageDropField",
134
- props: {
135
- label: {},
136
- subLabel: {},
137
- modelValue: {},
138
- previousUrl: {},
139
- width: { default: 323 },
140
- height: { default: 216 },
141
- canDelete: { type: Boolean, default: !0 }
142
- },
143
- emits: ["update:model-value", "reset:model-value"],
144
- setup(t, { emit: e }) {
145
- const r = t, n = e, s = Y(() => r.modelValue ? URL.createObjectURL(r.modelValue) : r.previousUrl);
146
- return (o, i) => {
147
- const f = q("fm-icon"), d = q("fm-drop-field");
148
- return s.value ? (F(), B("div", sn, [
149
- $("p", an, [
150
- Ve(G(r.label) + " ", 1),
151
- $("span", on, G(o.subLabel), 1)
152
- ]),
153
- $("div", {
154
- class: ee(["relative", "border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md"]),
155
- style: Fe({ width: `${r.width}px`, height: `${r.height}px` })
156
- }, [
157
- $("div", ln, [
158
- $("div", un, [
159
- $("img", {
160
- class: ee(["h-full w-full", "object-cover"]),
161
- src: s.value,
162
- alt: "product image"
163
- }, null, 8, cn)
164
- ])
165
- ]),
166
- o.canDelete ? (F(), B("button", {
167
- key: 0,
168
- class: ee([
169
- "absolute top-12 right-12 z-10",
170
- "w-24 h-24 rounded-[50%]",
171
- "bg-fm-color-neutral-white"
172
- ]),
173
- type: "button",
174
- onClick: i[0] || (i[0] = (u) => n("reset:model-value"))
175
- }, [
176
- N(f, { name: "close" })
177
- ])) : ce("", !0)
178
- ], 4)
179
- ])) : (F(), te(d, {
180
- key: 1,
181
- accept: ".jpg, .jpeg, .png, .gif",
182
- style: Fe({ width: `${r.width}px`, height: `${r.height}px` }),
183
- onFileUpload: i[1] || (i[1] = (u) => n("update:model-value", u))
184
- }, {
185
- label: K(() => [
186
- $("p", dn, [
187
- Ve(G(r.label) + " ", 1),
188
- $("span", fn, G(r.subLabel), 1)
189
- ])
190
- ]),
191
- "accept-text": K(() => i[2] || (i[2] = [
192
- $("p", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Accepts .jpg, .jpeg, .png, .gif ", -1)
193
- ])),
194
- _: 1
195
- }, 8, ["style"]));
196
- };
197
- }
198
- }), pr = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), hr = [
199
- "home",
200
- "app",
201
- "about",
202
- "tnc",
203
- "terms-and-conditions",
204
- "redirection",
205
- "redirect",
206
- "auth",
207
- "login",
208
- "logout",
209
- "register",
210
- "user",
211
- "discovery",
212
- "discover",
213
- "order",
214
- "orders",
215
- "membership",
216
- "memberships",
217
- "member",
218
- "members",
219
- "benefit",
220
- "benefits",
221
- "reward",
222
- "rewards",
223
- "voucher",
224
- "vouchers",
225
- "search",
226
- "restaurant",
227
- "restaurants",
228
- "business",
229
- "businesses",
230
- "dine",
231
- "profile",
232
- "scan",
233
- "scanner",
234
- "menu",
235
- "cart",
236
- "me",
237
- "v",
238
- "active-orders",
239
- "qr",
240
- "setting",
241
- "settings",
242
- "error",
243
- "supportdetails",
244
- "support-details",
245
- "stacks",
246
- "imulus",
247
- "github",
248
- "twitter",
249
- "facebook",
250
- "google",
251
- "apple",
252
- "about",
253
- "account",
254
- "activate",
255
- "add",
256
- "admin",
257
- "administrator",
258
- "api",
259
- "app",
260
- "apps",
261
- "archive",
262
- "archives",
263
- "auth",
264
- "blog",
265
- "cache",
266
- "cancel",
267
- "careers",
268
- "cart",
269
- "changelog",
270
- "checkout",
271
- "codereview",
272
- "compare",
273
- "config",
274
- "configuration",
275
- "connect",
276
- "contact",
277
- "create",
278
- "delete",
279
- "direct_messages",
280
- "documentation",
281
- "download",
282
- "downloads",
283
- "edit",
284
- "email",
285
- "employment",
286
- "enterprise",
287
- "faq",
288
- "favorites",
289
- "feed",
290
- "feedback",
291
- "feeds",
292
- "fleet",
293
- "fleets",
294
- "follow",
295
- "followers",
296
- "following",
297
- "friend",
298
- "friends",
299
- "gist",
300
- "group",
301
- "groups",
302
- "help",
303
- "home",
304
- "hosting",
305
- "hostmaster",
306
- "idea",
307
- "ideas",
308
- "index",
309
- "info",
310
- "invitations",
311
- "invite",
312
- "is",
313
- "it",
314
- "job",
315
- "jobs",
316
- "json",
317
- "language",
318
- "languages",
319
- "lists",
320
- "login",
321
- "logout",
322
- "logs",
323
- "mail",
324
- "map",
325
- "maps",
326
- "mine",
327
- "mis",
328
- "news",
329
- "oauth",
330
- "oauth_clients",
331
- "offers",
332
- "openid",
333
- "order",
334
- "orders",
335
- "organizations",
336
- "plans",
337
- "popular",
338
- "post",
339
- "postmaster",
340
- "privacy",
341
- "projects",
342
- "put",
343
- "recruitment",
344
- "register",
345
- "remove",
346
- "replies",
347
- "root",
348
- "rss",
349
- "sales",
350
- "save",
351
- "search",
352
- "security",
353
- "sessions",
354
- "settings",
355
- "shop",
356
- "signup",
357
- "sitemap",
358
- "ssl",
359
- "ssladmin",
360
- "ssladministrator",
361
- "sslwebmaster",
362
- "status",
363
- "stories",
364
- "styleguide",
365
- "subscribe",
366
- "subscriptions",
367
- "support",
368
- "sysadmin",
369
- "sysadministrator",
370
- "terms",
371
- "tour",
372
- "translations",
373
- "trends",
374
- "unfollow",
375
- "unsubscribe",
376
- "update",
377
- "url",
378
- "user",
379
- "weather",
380
- "webmaster",
381
- "widget",
382
- "widgets",
383
- "wiki",
384
- "ww",
385
- "www",
386
- "wwww",
387
- "xfn",
388
- "xml",
389
- "xmpp",
390
- "yaml",
391
- "yml",
392
- "chinese",
393
- "mandarin",
394
- "spanish",
395
- "english",
396
- "bengali",
397
- "hindi",
398
- "portuguese",
399
- "russian",
400
- "japanese",
401
- "german",
402
- "wu",
403
- "javanese",
404
- "korean",
405
- "french",
406
- "vietnamese",
407
- "telugu",
408
- "chinese",
409
- "marathi",
410
- "tamil",
411
- "turkish",
412
- "urdu",
413
- "min-nan",
414
- "jinyu",
415
- "gujarati",
416
- "polish",
417
- "arabic",
418
- "ukrainian",
419
- "italian",
420
- "xiang",
421
- "malayalam",
422
- "hakka",
423
- "kannada",
424
- "oriya",
425
- "panjabi",
426
- "sunda",
427
- "panjabi",
428
- "romanian",
429
- "bhojpuri",
430
- "azerbaijani",
431
- "farsi",
432
- "maithili",
433
- "hausa",
434
- "arabic",
435
- "burmese",
436
- "serbo-croatian",
437
- "gan",
438
- "awadhi",
439
- "thai",
440
- "dutch",
441
- "yoruba",
442
- "sindhi",
443
- "ac",
444
- "ad",
445
- "ae",
446
- "af",
447
- "ag",
448
- "ai",
449
- "al",
450
- "am",
451
- "an",
452
- "ao",
453
- "aq",
454
- "ar",
455
- "as",
456
- "at",
457
- "au",
458
- "aw",
459
- "ax",
460
- "az",
461
- "ba",
462
- "bb",
463
- "bd",
464
- "be",
465
- "bf",
466
- "bg",
467
- "bh",
468
- "bi",
469
- "bj",
470
- "bm",
471
- "bn",
472
- "bo",
473
- "br",
474
- "bs",
475
- "bt",
476
- "bv",
477
- "bw",
478
- "by",
479
- "bz",
480
- "ca",
481
- "cc",
482
- "cd",
483
- "cf",
484
- "cg",
485
- "ch",
486
- "ci",
487
- "ck",
488
- "cl",
489
- "cm",
490
- "cn",
491
- "co",
492
- "cr",
493
- "cs",
494
- "cu",
495
- "cv",
496
- "cx",
497
- "cy",
498
- "cz",
499
- "dd",
500
- "de",
501
- "dj",
502
- "dk",
503
- "dm",
504
- "do",
505
- "dz",
506
- "ec",
507
- "ee",
508
- "eg",
509
- "eh",
510
- "er",
511
- "es",
512
- "et",
513
- "eu",
514
- "fi",
515
- "fj",
516
- "fk",
517
- "fm",
518
- "fo",
519
- "fr",
520
- "ga",
521
- "gb",
522
- "gd",
523
- "ge",
524
- "gf",
525
- "gg",
526
- "gh",
527
- "gi",
528
- "gl",
529
- "gm",
530
- "gn",
531
- "gp",
532
- "gq",
533
- "gr",
534
- "gs",
535
- "gt",
536
- "gu",
537
- "gw",
538
- "gy",
539
- "hk",
540
- "hm",
541
- "hn",
542
- "hr",
543
- "ht",
544
- "hu",
545
- "id",
546
- "ie",
547
- "il",
548
- "im",
549
- "in",
550
- "io",
551
- "iq",
552
- "ir",
553
- "is",
554
- "it",
555
- "je",
556
- "jm",
557
- "jo",
558
- "jp",
559
- "ke",
560
- "kg",
561
- "kh",
562
- "ki",
563
- "km",
564
- "kn",
565
- "kp",
566
- "kr",
567
- "kw",
568
- "ky",
569
- "kz",
570
- "la",
571
- "lb",
572
- "lc",
573
- "li",
574
- "lk",
575
- "lr",
576
- "ls",
577
- "lt",
578
- "lu",
579
- "lv",
580
- "ly",
581
- "ma",
582
- "mc",
583
- "md",
584
- "me",
585
- "mg",
586
- "mh",
587
- "mk",
588
- "ml",
589
- "mm",
590
- "mn",
591
- "mo",
592
- "mp",
593
- "mq",
594
- "mr",
595
- "ms",
596
- "mt",
597
- "mu",
598
- "mv",
599
- "mw",
600
- "mx",
601
- "my",
602
- "mz",
603
- "na",
604
- "nc",
605
- "ne",
606
- "nf",
607
- "ng",
608
- "ni",
609
- "nl",
610
- "no",
611
- "np",
612
- "nr",
613
- "nu",
614
- "nz",
615
- "om",
616
- "pa",
617
- "pe",
618
- "pf",
619
- "pg",
620
- "ph",
621
- "pk",
622
- "pl",
623
- "pm",
624
- "pn",
625
- "pr",
626
- "ps",
627
- "pt",
628
- "pw",
629
- "py",
630
- "qa",
631
- "re",
632
- "ro",
633
- "rs",
634
- "ru",
635
- "rw",
636
- "sa",
637
- "sb",
638
- "sc",
639
- "sd",
640
- "se",
641
- "sg",
642
- "sh",
643
- "si",
644
- "sj",
645
- "sk",
646
- "sl",
647
- "sm",
648
- "sn",
649
- "so",
650
- "sr",
651
- "ss",
652
- "st",
653
- "su",
654
- "sv",
655
- "sy",
656
- "sz",
657
- "tc",
658
- "td",
659
- "tf",
660
- "tg",
661
- "th",
662
- "tj",
663
- "tk",
664
- "tl",
665
- "tm",
666
- "tn",
667
- "to",
668
- "tp",
669
- "tr",
670
- "tt",
671
- "tv",
672
- "tw",
673
- "tz",
674
- "ua",
675
- "ug",
676
- "uk",
677
- "us",
678
- "uy",
679
- "uz",
680
- "va",
681
- "vc",
682
- "ve",
683
- "vg",
684
- "vi",
685
- "vn",
686
- "vu",
687
- "wf",
688
- "ws",
689
- "ye",
690
- "yt",
691
- "yu",
692
- "za",
693
- "zm",
694
- "zw"
695
- ], Je = {
696
- async get(t, e) {
697
- const r = Ye(void 0, e), n = We(r, t);
698
- return await (await zr(n)).text();
699
- },
700
- async update(t, e, r) {
701
- const n = Ye(void 0, r), s = We(n, t);
702
- return await Xr(s, e), await Yr(s);
703
- },
704
- async delete(t, e) {
705
- const r = Ye(void 0, e), n = We(r, t);
706
- await Wr(n);
707
- }
708
- }, me = {
709
- async get(t) {
710
- return await Je.get(t);
711
- },
712
- async update(t, e, r) {
713
- return await Je.update(t, e);
714
- },
715
- async delete(t) {
716
- await Je.delete(t);
717
- }
718
- }, mn = { class: "fm-typo-en-title-md-600" }, pn = { class: "pt-8 space-y-24" }, hn = { class: "flex gap-8 items-center justify-start" }, vn = /* @__PURE__ */ re({
719
- __name: "BusinessForm",
720
- props: {
721
- businessId: {
722
- type: String,
723
- required: !0
724
- },
725
- initialValue: {
726
- type: Object,
727
- default: void 0
728
- }
729
- },
730
- setup(t, { expose: e }) {
731
- const r = t, n = dt(), s = fr(n), o = "https://feedmedev.cc", i = ct(
732
- r.initialValue ? $e(r.initialValue) : {
733
- thumbnail: void 0,
734
- name: "",
735
- url: void 0,
736
- newThumbnail: void 0
737
- }
738
- );
739
- Y(() => i.newThumbnail ? URL.createObjectURL(i.newThumbnail) : i.thumbnail);
740
- const f = Y(() => pe().currentCountry.value), d = ae(!1), u = ae(!1), v = (b) => {
741
- u.value = !u.value;
742
- };
743
- function g() {
744
- i.thumbnail = void 0, i.newThumbnail = void 0;
745
- }
746
- const T = async () => {
747
- const b = i;
748
- await s.minor(async () => {
749
- var k, V, I;
750
- if (b.newThumbnail) {
751
- const M = await me.update(
752
- `business/${r.businessId}/thumbnail/${mt().toISOString()}.png`,
753
- b.newThumbnail
754
- );
755
- b.thumbnail = M, (k = r.initialValue) != null && k.thumbnail && await me.delete(r.initialValue.thumbnail);
756
- } else
757
- (V = r.initialValue) != null && V.thumbnail && !b.thumbnail && await me.delete((I = r.initialValue) == null ? void 0 : I.thumbnail);
758
- const O = await Hr.updateBusinessProfile(r.businessId, b), y = pe().currentBusiness;
759
- y.value = { ...y.value, ...O }, v();
760
- });
761
- };
762
- e({
763
- show: u,
764
- trigger: v
765
- });
766
- const { t: c } = ve();
767
- return (b, O) => {
768
- const y = q("FmTextField"), k = q("fm-button"), V = q("fm-side-sheet");
769
- return F(), B(oe, null, [
770
- de(b.$slots, "default", { trigger: v }),
771
- N(V, {
772
- id: "unit-form",
773
- modelValue: u.value,
774
- "onUpdate:modelValue": O[4] || (O[4] = (I) => u.value = I),
775
- "is-container": _(Mr).FmForm,
776
- "is-container-props": {
777
- onValidationSuccess: T,
778
- blameFormChildOnValidationFailed: !0
779
- },
780
- "max-width": 560,
781
- "z-index": 100
782
- }, {
783
- "side-sheet-header": K(() => [
784
- $("p", mn, G(_(c)("settings.business.form.title")), 1)
785
- ]),
786
- "side-sheet-footer": K(() => [
787
- $("div", hn, [
788
- N(k, {
789
- label: _(c)("common.update"),
790
- loading: d.value,
791
- size: "lg",
792
- type: "submit",
793
- variant: "primary"
794
- }, null, 8, ["label", "loading"]),
795
- N(k, {
796
- label: _(c)("common.cancel"),
797
- size: "lg",
798
- variant: "tertiary",
799
- onClick: O[3] || (O[3] = () => u.value = !1)
800
- }, null, 8, ["label"])
801
- ])
802
- ]),
803
- default: K(() => [
804
- $("div", pn, [
805
- $("div", null, [
806
- N(ye, {
807
- label: _(c)("settings.business.form.cover_photo.label"),
808
- "sub-label": _(c)("settings.business.form.cover_photo.optional"),
809
- "previous-url": i.thumbnail,
810
- modelValue: i.newThumbnail,
811
- "onUpdate:modelValue": O[0] || (O[0] = (I) => i.newThumbnail = I),
812
- "onReset:modelValue": g
813
- }, null, 8, ["label", "sub-label", "previous-url", "modelValue"])
814
- ]),
815
- $("div", null, [
816
- N(y, {
817
- label: _(c)("settings.business.form.name"),
818
- modelValue: i.name,
819
- "onUpdate:modelValue": O[1] || (O[1] = (I) => i.name = I)
820
- }, null, 8, ["label", "modelValue"])
821
- ]),
822
- $("div", null, [
823
- N(y, {
824
- label: _(c)("settings.business.form.url.label"),
825
- "model-value": i.url || "",
826
- "onUpdate:modelValue": O[2] || (O[2] = (I) => i.url = I),
827
- placeholder: t.businessId,
828
- rules: [
829
- (I) => {
830
- var M;
831
- return !I || ((M = t.initialValue) == null ? void 0 : M.url) == i.url || f.value == _(pt.F_COUNTRY).enum.MY || _(c)("settings.business.form.url.errors.disabled");
832
- },
833
- (I) => !I || _(pr).test(I) || _(c)("settings.business.form.url.errors.format"),
834
- (I) => !I || !_(hr).includes(I) || _(c)("settings.business.form.url.errors.reserved")
835
- ]
836
- }, {
837
- prepend: K(() => [
838
- $("span", null, G(_(o) + "/"), 1)
839
- ]),
840
- _: 1
841
- }, 8, ["label", "model-value", "placeholder", "rules"])
842
- ])
843
- ])
844
- ]),
845
- _: 1
846
- }, 8, ["modelValue", "is-container", "is-container-props"])
847
- ], 64);
848
- };
849
- }
850
- }), gn = { class: "fm-typo-en-body-lg-600" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, St = /* @__PURE__ */ re({
851
- __name: "FormLabel",
852
- props: {
853
- label: {},
854
- optional: { type: Boolean, default: !1 },
855
- subLabel: {}
856
- },
857
- setup(t) {
858
- const e = t, r = Y(() => e.optional && !e.subLabel ? "(optional)" : e.subLabel);
859
- return (n, s) => (F(), B("p", gn, [
860
- Ve(G(n.label) + " ", 1),
861
- $("span", bn, G(r.value), 1)
862
- ]));
863
- }
864
- }), yn = { class: "space-y-4" }, $n = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _n = { class: "fm-typo-en-body-lg-600" }, Pt = /* @__PURE__ */ re({
865
- __name: "InfoBasic",
866
- props: {
867
- name: {
868
- type: String,
869
- required: !0
870
- },
871
- value: {
872
- type: String,
873
- required: !0
874
- }
875
- },
876
- setup(t) {
877
- return (e, r) => (F(), B("div", yn, [
878
- $("div", $n, G(t.name), 1),
879
- $("div", _n, G(t.value), 1)
880
- ]));
881
- }
882
- }), En = {};
883
- function wn(t, e) {
884
- return F(), B("div", null, e[0] || (e[0] = [
885
- $("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
886
- ]));
887
- }
888
- const Rn = /* @__PURE__ */ mr(En, [["render", wn]]), In = {
889
- key: 0,
890
- class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
891
- }, An = { class: "fm-typo-en-title-sm-600" }, Tt = /* @__PURE__ */ re({
892
- __name: "Summary",
893
- props: {
894
- title: {},
895
- variant: {},
896
- items: {}
897
- },
898
- setup(t) {
899
- const e = t, r = ft();
900
- function n() {
901
- r.open({
902
- title: e.title,
903
- contentComponent: Rt("div", { class: "space-y-4" }, [
904
- ...e.items.map(
905
- (s) => Rt(Pt, {
906
- name: s.name,
907
- value: s.value || "--"
908
- })
909
- )
910
- ])
911
- });
912
- }
913
- return (s, o) => {
914
- const i = q("FmButton");
915
- return e.variant === "full" ? (F(), B("div", In, [
916
- $("div", An, G(s.title), 1),
917
- N(Rn),
918
- (F(!0), B(oe, null, he(s.items, (f) => (F(), te(Pt, {
919
- key: f.name,
920
- name: f.name,
921
- value: f.value || "--"
922
- }, null, 8, ["name", "value"]))), 128))
923
- ])) : (F(), te(i, {
924
- key: 1,
925
- icon: "info",
926
- variant: "tertiary",
927
- onClick: n
928
- }));
929
- };
930
- }
931
- }), On = {
932
- class: /* @__PURE__ */ ee([
933
- "flex items-center",
934
- "px-24 pt-16 pb-8",
935
- "border-b border-fm-color-neutral-gray-100",
936
- "space-x-4"
937
- ])
938
- }, Sn = { class: "fm-typo-en-title-sm-600 mr-auto" }, Pn = {
939
- class: /* @__PURE__ */ ee(["flex flex-col", "flex-1 overflow-scroll", "w-full", "px-24"])
940
- }, Tn = /* @__PURE__ */ re({
941
- __name: "FullScreenForm",
942
- props: {
943
- show: { type: Boolean },
944
- title: {},
945
- primaryAction: {},
946
- secondaryActions: {},
947
- zIndex: { default: 50 }
948
- },
949
- emits: ["onPrimary", "onCancel"],
950
- setup(t, { emit: e }) {
951
- const r = e, n = () => {
952
- r("onPrimary");
953
- }, s = () => {
954
- r("onCancel");
955
- };
956
- return (o, i) => {
957
- const f = q("fm-button"), d = q("fm-form");
958
- return F(), te(Tr, { to: "body" }, [
959
- N(Lr, { name: "fade" }, {
960
- default: K(() => [
961
- o.show ? (F(), te(d, {
962
- key: 0,
963
- "blame-form-child-on-validation-failed": "",
964
- class: ee(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
965
- style: Fe({ zIndex: o.zIndex }),
966
- tabindex: "-1",
967
- onValidationSuccess: n,
968
- onKeyup: Nr(s, ["esc"])
969
- }, {
970
- default: K(() => [
971
- $("div", On, [
972
- $("p", Sn, G(o.title), 1),
973
- de(o.$slots, "append-title", {}, void 0, !0),
974
- (F(!0), B(oe, null, he(o.secondaryActions, (u) => (F(), te(f, {
975
- label: u.label,
976
- variant: "tertiary",
977
- onClick: u.click
978
- }, null, 8, ["label", "onClick"]))), 256)),
979
- N(f, {
980
- label: o.primaryAction.label,
981
- type: "submit",
982
- variant: "primary"
983
- }, null, 8, ["label"])
984
- ]),
985
- $("div", Pn, [
986
- de(o.$slots, "default", {}, void 0, !0)
987
- ])
988
- ]),
989
- _: 3
990
- }, 8, ["style"])) : ce("", !0)
991
- ]),
992
- _: 3
993
- })
994
- ]);
995
- };
996
- }
997
- });
998
- const Ln = /* @__PURE__ */ mr(Tn, [["__scopeId", "data-v-5b5c7179"]]);
999
- var at = { exports: {} };
1000
- const Nn = "2.0.0", vr = 256, Cn = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
1001
- 9007199254740991, xn = 16, kn = vr - 6, Vn = [
1002
- "major",
1003
- "premajor",
1004
- "minor",
1005
- "preminor",
1006
- "patch",
1007
- "prepatch",
1008
- "prerelease"
1009
- ];
1010
- var De = {
1011
- MAX_LENGTH: vr,
1012
- MAX_SAFE_COMPONENT_LENGTH: xn,
1013
- MAX_SAFE_BUILD_LENGTH: kn,
1014
- MAX_SAFE_INTEGER: Cn,
1015
- RELEASE_TYPES: Vn,
1016
- SEMVER_SPEC_VERSION: Nn,
1017
- FLAG_INCLUDE_PRERELEASE: 1,
1018
- FLAG_LOOSE: 2
1019
- };
1020
- const Fn = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => {
1021
- };
1022
- var Ge = Fn;
1023
- (function(t, e) {
1024
- const {
1025
- MAX_SAFE_COMPONENT_LENGTH: r,
1026
- MAX_SAFE_BUILD_LENGTH: n,
1027
- MAX_LENGTH: s
1028
- } = De, o = Ge;
1029
- e = t.exports = {};
1030
- const i = e.re = [], f = e.safeRe = [], d = e.src = [], u = e.t = {};
1031
- let v = 0;
1032
- const g = "[a-zA-Z0-9-]", T = [
1033
- ["\\s", 1],
1034
- ["\\d", s],
1035
- [g, n]
1036
- ], c = (O) => {
1037
- for (const [y, k] of T)
1038
- O = O.split(`${y}*`).join(`${y}{0,${k}}`).split(`${y}+`).join(`${y}{1,${k}}`);
1039
- return O;
1040
- }, b = (O, y, k) => {
1041
- const V = c(y), I = v++;
1042
- o(O, I, y), u[O] = I, d[I] = y, i[I] = new RegExp(y, k ? "g" : void 0), f[I] = new RegExp(V, k ? "g" : void 0);
1043
- };
1044
- b("NUMERICIDENTIFIER", "0|[1-9]\\d*"), b("NUMERICIDENTIFIERLOOSE", "\\d+"), b("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${g}*`), b("MAINVERSION", `(${d[u.NUMERICIDENTIFIER]})\\.(${d[u.NUMERICIDENTIFIER]})\\.(${d[u.NUMERICIDENTIFIER]})`), b("MAINVERSIONLOOSE", `(${d[u.NUMERICIDENTIFIERLOOSE]})\\.(${d[u.NUMERICIDENTIFIERLOOSE]})\\.(${d[u.NUMERICIDENTIFIERLOOSE]})`), b("PRERELEASEIDENTIFIER", `(?:${d[u.NUMERICIDENTIFIER]}|${d[u.NONNUMERICIDENTIFIER]})`), b("PRERELEASEIDENTIFIERLOOSE", `(?:${d[u.NUMERICIDENTIFIERLOOSE]}|${d[u.NONNUMERICIDENTIFIER]})`), b("PRERELEASE", `(?:-(${d[u.PRERELEASEIDENTIFIER]}(?:\\.${d[u.PRERELEASEIDENTIFIER]})*))`), b("PRERELEASELOOSE", `(?:-?(${d[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[u.PRERELEASEIDENTIFIERLOOSE]})*))`), b("BUILDIDENTIFIER", `${g}+`), b("BUILD", `(?:\\+(${d[u.BUILDIDENTIFIER]}(?:\\.${d[u.BUILDIDENTIFIER]})*))`), b("FULLPLAIN", `v?${d[u.MAINVERSION]}${d[u.PRERELEASE]}?${d[u.BUILD]}?`), b("FULL", `^${d[u.FULLPLAIN]}$`), b("LOOSEPLAIN", `[v=\\s]*${d[u.MAINVERSIONLOOSE]}${d[u.PRERELEASELOOSE]}?${d[u.BUILD]}?`), b("LOOSE", `^${d[u.LOOSEPLAIN]}$`), b("GTLT", "((?:<|>)?=?)"), b("XRANGEIDENTIFIERLOOSE", `${d[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), b("XRANGEIDENTIFIER", `${d[u.NUMERICIDENTIFIER]}|x|X|\\*`), b("XRANGEPLAIN", `[v=\\s]*(${d[u.XRANGEIDENTIFIER]})(?:\\.(${d[u.XRANGEIDENTIFIER]})(?:\\.(${d[u.XRANGEIDENTIFIER]})(?:${d[u.PRERELEASE]})?${d[u.BUILD]}?)?)?`), b("XRANGEPLAINLOOSE", `[v=\\s]*(${d[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[u.XRANGEIDENTIFIERLOOSE]})(?:${d[u.PRERELEASELOOSE]})?${d[u.BUILD]}?)?)?`), b("XRANGE", `^${d[u.GTLT]}\\s*${d[u.XRANGEPLAIN]}$`), b("XRANGELOOSE", `^${d[u.GTLT]}\\s*${d[u.XRANGEPLAINLOOSE]}$`), b("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), b("COERCE", `${d[u.COERCEPLAIN]}(?:$|[^\\d])`), b("COERCEFULL", d[u.COERCEPLAIN] + `(?:${d[u.PRERELEASE]})?(?:${d[u.BUILD]})?(?:$|[^\\d])`), b("COERCERTL", d[u.COERCE], !0), b("COERCERTLFULL", d[u.COERCEFULL], !0), b("LONETILDE", "(?:~>?)"), b("TILDETRIM", `(\\s*)${d[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", b("TILDE", `^${d[u.LONETILDE]}${d[u.XRANGEPLAIN]}$`), b("TILDELOOSE", `^${d[u.LONETILDE]}${d[u.XRANGEPLAINLOOSE]}$`), b("LONECARET", "(?:\\^)"), b("CARETTRIM", `(\\s*)${d[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", b("CARET", `^${d[u.LONECARET]}${d[u.XRANGEPLAIN]}$`), b("CARETLOOSE", `^${d[u.LONECARET]}${d[u.XRANGEPLAINLOOSE]}$`), b("COMPARATORLOOSE", `^${d[u.GTLT]}\\s*(${d[u.LOOSEPLAIN]})$|^$`), b("COMPARATOR", `^${d[u.GTLT]}\\s*(${d[u.FULLPLAIN]})$|^$`), b("COMPARATORTRIM", `(\\s*)${d[u.GTLT]}\\s*(${d[u.LOOSEPLAIN]}|${d[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", b("HYPHENRANGE", `^\\s*(${d[u.XRANGEPLAIN]})\\s+-\\s+(${d[u.XRANGEPLAIN]})\\s*$`), b("HYPHENRANGELOOSE", `^\\s*(${d[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[u.XRANGEPLAINLOOSE]})\\s*$`), b("STAR", "(<|>)?=?\\s*\\*"), b("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), b("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
1045
- })(at, at.exports);
1046
- var Se = at.exports;
1047
- const jn = Object.freeze({ loose: !0 }), Mn = Object.freeze({}), Un = (t) => t ? typeof t != "object" ? jn : t : Mn;
1048
- var ht = Un;
1049
- const Lt = /^[0-9]+$/, gr = (t, e) => {
1050
- const r = Lt.test(t), n = Lt.test(e);
1051
- return r && n && (t = +t, e = +e), t === e ? 0 : r && !n ? -1 : n && !r ? 1 : t < e ? -1 : 1;
1052
- }, Dn = (t, e) => gr(e, t);
1053
- var br = {
1054
- compareIdentifiers: gr,
1055
- rcompareIdentifiers: Dn
1056
- };
1057
- const Te = Ge, { MAX_LENGTH: Nt, MAX_SAFE_INTEGER: Le } = De, { safeRe: Ct, t: xt } = Se, Gn = ht, { compareIdentifiers: ge } = br;
1058
- let Bn = class ue {
1059
- constructor(e, r) {
1060
- if (r = Gn(r), e instanceof ue) {
1061
- if (e.loose === !!r.loose && e.includePrerelease === !!r.includePrerelease)
1062
- return e;
1063
- e = e.version;
1064
- } else if (typeof e != "string")
1065
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
1066
- if (e.length > Nt)
1067
- throw new TypeError(
1068
- `version is longer than ${Nt} characters`
1069
- );
1070
- Te("SemVer", e, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
1071
- const n = e.trim().match(r.loose ? Ct[xt.LOOSE] : Ct[xt.FULL]);
1072
- if (!n)
1073
- throw new TypeError(`Invalid Version: ${e}`);
1074
- if (this.raw = e, this.major = +n[1], this.minor = +n[2], this.patch = +n[3], this.major > Le || this.major < 0)
1075
- throw new TypeError("Invalid major version");
1076
- if (this.minor > Le || this.minor < 0)
1077
- throw new TypeError("Invalid minor version");
1078
- if (this.patch > Le || this.patch < 0)
1079
- throw new TypeError("Invalid patch version");
1080
- n[4] ? this.prerelease = n[4].split(".").map((s) => {
1081
- if (/^[0-9]+$/.test(s)) {
1082
- const o = +s;
1083
- if (o >= 0 && o < Le)
1084
- return o;
1085
- }
1086
- return s;
1087
- }) : this.prerelease = [], this.build = n[5] ? n[5].split(".") : [], this.format();
1088
- }
1089
- format() {
1090
- return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
1091
- }
1092
- toString() {
1093
- return this.version;
1094
- }
1095
- compare(e) {
1096
- if (Te("SemVer.compare", this.version, this.options, e), !(e instanceof ue)) {
1097
- if (typeof e == "string" && e === this.version)
1098
- return 0;
1099
- e = new ue(e, this.options);
1100
- }
1101
- return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
1102
- }
1103
- compareMain(e) {
1104
- return e instanceof ue || (e = new ue(e, this.options)), ge(this.major, e.major) || ge(this.minor, e.minor) || ge(this.patch, e.patch);
1105
- }
1106
- comparePre(e) {
1107
- if (e instanceof ue || (e = new ue(e, this.options)), this.prerelease.length && !e.prerelease.length)
1108
- return -1;
1109
- if (!this.prerelease.length && e.prerelease.length)
1110
- return 1;
1111
- if (!this.prerelease.length && !e.prerelease.length)
1112
- return 0;
1113
- let r = 0;
1114
- do {
1115
- const n = this.prerelease[r], s = e.prerelease[r];
1116
- if (Te("prerelease compare", r, n, s), n === void 0 && s === void 0)
1117
- return 0;
1118
- if (s === void 0)
1119
- return 1;
1120
- if (n === void 0)
1121
- return -1;
1122
- if (n === s)
1123
- continue;
1124
- return ge(n, s);
1125
- } while (++r);
1126
- }
1127
- compareBuild(e) {
1128
- e instanceof ue || (e = new ue(e, this.options));
1129
- let r = 0;
1130
- do {
1131
- const n = this.build[r], s = e.build[r];
1132
- if (Te("build compare", r, n, s), n === void 0 && s === void 0)
1133
- return 0;
1134
- if (s === void 0)
1135
- return 1;
1136
- if (n === void 0)
1137
- return -1;
1138
- if (n === s)
1139
- continue;
1140
- return ge(n, s);
1141
- } while (++r);
1142
- }
1143
- // preminor will bump the version up to the next minor release, and immediately
1144
- // down to pre-release. premajor and prepatch work the same way.
1145
- inc(e, r, n) {
1146
- switch (e) {
1147
- case "premajor":
1148
- this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", r, n);
1149
- break;
1150
- case "preminor":
1151
- this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", r, n);
1152
- break;
1153
- case "prepatch":
1154
- this.prerelease.length = 0, this.inc("patch", r, n), this.inc("pre", r, n);
1155
- break;
1156
- case "prerelease":
1157
- this.prerelease.length === 0 && this.inc("patch", r, n), this.inc("pre", r, n);
1158
- break;
1159
- case "major":
1160
- (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
1161
- break;
1162
- case "minor":
1163
- (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
1164
- break;
1165
- case "patch":
1166
- this.prerelease.length === 0 && this.patch++, this.prerelease = [];
1167
- break;
1168
- case "pre": {
1169
- const s = Number(n) ? 1 : 0;
1170
- if (!r && n === !1)
1171
- throw new Error("invalid increment argument: identifier is empty");
1172
- if (this.prerelease.length === 0)
1173
- this.prerelease = [s];
1174
- else {
1175
- let o = this.prerelease.length;
1176
- for (; --o >= 0; )
1177
- typeof this.prerelease[o] == "number" && (this.prerelease[o]++, o = -2);
1178
- if (o === -1) {
1179
- if (r === this.prerelease.join(".") && n === !1)
1180
- throw new Error("invalid increment argument: identifier already exists");
1181
- this.prerelease.push(s);
1182
- }
1183
- }
1184
- if (r) {
1185
- let o = [r, s];
1186
- n === !1 && (o = [r]), ge(this.prerelease[0], r) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = o) : this.prerelease = o;
1187
- }
1188
- break;
1189
- }
1190
- default:
1191
- throw new Error(`invalid increment argument: ${e}`);
1192
- }
1193
- return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
1194
- }
1195
- };
1196
- var ne = Bn;
1197
- const kt = ne, Kn = (t, e, r = !1) => {
1198
- if (t instanceof kt)
1199
- return t;
1200
- try {
1201
- return new kt(t, e);
1202
- } catch (n) {
1203
- if (!r)
1204
- return null;
1205
- throw n;
1206
- }
1207
- };
1208
- var Ee = Kn;
1209
- const qn = Ee, Hn = (t, e) => {
1210
- const r = qn(t, e);
1211
- return r ? r.version : null;
1212
- };
1213
- var zn = Hn;
1214
- const Xn = Ee, Yn = (t, e) => {
1215
- const r = Xn(t.trim().replace(/^[=v]+/, ""), e);
1216
- return r ? r.version : null;
1217
- };
1218
- var Wn = Yn;
1219
- const Vt = ne, Jn = (t, e, r, n, s) => {
1220
- typeof r == "string" && (s = n, n = r, r = void 0);
1221
- try {
1222
- return new Vt(
1223
- t instanceof Vt ? t.version : t,
1224
- r
1225
- ).inc(e, n, s).version;
1226
- } catch {
1227
- return null;
1228
- }
1229
- };
1230
- var Zn = Jn;
1231
- const Ft = Ee, Qn = (t, e) => {
1232
- const r = Ft(t, null, !0), n = Ft(e, null, !0), s = r.compare(n);
1233
- if (s === 0)
1234
- return null;
1235
- const o = s > 0, i = o ? r : n, f = o ? n : r, d = !!i.prerelease.length;
1236
- if (!!f.prerelease.length && !d)
1237
- return !f.patch && !f.minor ? "major" : i.patch ? "patch" : i.minor ? "minor" : "major";
1238
- const v = d ? "pre" : "";
1239
- return r.major !== n.major ? v + "major" : r.minor !== n.minor ? v + "minor" : r.patch !== n.patch ? v + "patch" : "prerelease";
1240
- };
1241
- var es = Qn;
1242
- const ts = ne, rs = (t, e) => new ts(t, e).major;
1243
- var ns = rs;
1244
- const ss = ne, as = (t, e) => new ss(t, e).minor;
1245
- var os = as;
1246
- const is = ne, ls = (t, e) => new is(t, e).patch;
1247
- var us = ls;
1248
- const cs = Ee, ds = (t, e) => {
1249
- const r = cs(t, e);
1250
- return r && r.prerelease.length ? r.prerelease : null;
1251
- };
1252
- var fs = ds;
1253
- const jt = ne, ms = (t, e, r) => new jt(t, r).compare(new jt(e, r));
1254
- var ie = ms;
1255
- const ps = ie, hs = (t, e, r) => ps(e, t, r);
1256
- var vs = hs;
1257
- const gs = ie, bs = (t, e) => gs(t, e, !0);
1258
- var ys = bs;
1259
- const Mt = ne, $s = (t, e, r) => {
1260
- const n = new Mt(t, r), s = new Mt(e, r);
1261
- return n.compare(s) || n.compareBuild(s);
1262
- };
1263
- var vt = $s;
1264
- const _s = vt, Es = (t, e) => t.sort((r, n) => _s(r, n, e));
1265
- var ws = Es;
1266
- const Rs = vt, Is = (t, e) => t.sort((r, n) => Rs(n, r, e));
1267
- var As = Is;
1268
- const Os = ie, Ss = (t, e, r) => Os(t, e, r) > 0;
1269
- var Be = Ss;
1270
- const Ps = ie, Ts = (t, e, r) => Ps(t, e, r) < 0;
1271
- var gt = Ts;
1272
- const Ls = ie, Ns = (t, e, r) => Ls(t, e, r) === 0;
1273
- var yr = Ns;
1274
- const Cs = ie, xs = (t, e, r) => Cs(t, e, r) !== 0;
1275
- var $r = xs;
1276
- const ks = ie, Vs = (t, e, r) => ks(t, e, r) >= 0;
1277
- var bt = Vs;
1278
- const Fs = ie, js = (t, e, r) => Fs(t, e, r) <= 0;
1279
- var yt = js;
1280
- const Ms = yr, Us = $r, Ds = Be, Gs = bt, Bs = gt, Ks = yt, qs = (t, e, r, n) => {
1281
- switch (e) {
1282
- case "===":
1283
- return typeof t == "object" && (t = t.version), typeof r == "object" && (r = r.version), t === r;
1284
- case "!==":
1285
- return typeof t == "object" && (t = t.version), typeof r == "object" && (r = r.version), t !== r;
1286
- case "":
1287
- case "=":
1288
- case "==":
1289
- return Ms(t, r, n);
1290
- case "!=":
1291
- return Us(t, r, n);
1292
- case ">":
1293
- return Ds(t, r, n);
1294
- case ">=":
1295
- return Gs(t, r, n);
1296
- case "<":
1297
- return Bs(t, r, n);
1298
- case "<=":
1299
- return Ks(t, r, n);
1300
- default:
1301
- throw new TypeError(`Invalid operator: ${e}`);
1302
- }
1303
- };
1304
- var _r = qs;
1305
- const Hs = ne, zs = Ee, { safeRe: Ne, t: Ce } = Se, Xs = (t, e) => {
1306
- if (t instanceof Hs)
1307
- return t;
1308
- if (typeof t == "number" && (t = String(t)), typeof t != "string")
1309
- return null;
1310
- e = e || {};
1311
- let r = null;
1312
- if (!e.rtl)
1313
- r = t.match(e.includePrerelease ? Ne[Ce.COERCEFULL] : Ne[Ce.COERCE]);
1314
- else {
1315
- const d = e.includePrerelease ? Ne[Ce.COERCERTLFULL] : Ne[Ce.COERCERTL];
1316
- let u;
1317
- for (; (u = d.exec(t)) && (!r || r.index + r[0].length !== t.length); )
1318
- (!r || u.index + u[0].length !== r.index + r[0].length) && (r = u), d.lastIndex = u.index + u[1].length + u[2].length;
1319
- d.lastIndex = -1;
1320
- }
1321
- if (r === null)
1322
- return null;
1323
- const n = r[2], s = r[3] || "0", o = r[4] || "0", i = e.includePrerelease && r[5] ? `-${r[5]}` : "", f = e.includePrerelease && r[6] ? `+${r[6]}` : "";
1324
- return zs(`${n}.${s}.${o}${i}${f}`, e);
1325
- };
1326
- var Ys = Xs;
1327
- class Ws {
1328
- constructor() {
1329
- this.max = 1e3, this.map = /* @__PURE__ */ new Map();
1330
- }
1331
- get(e) {
1332
- const r = this.map.get(e);
1333
- if (r !== void 0)
1334
- return this.map.delete(e), this.map.set(e, r), r;
1335
- }
1336
- delete(e) {
1337
- return this.map.delete(e);
1338
- }
1339
- set(e, r) {
1340
- if (!this.delete(e) && r !== void 0) {
1341
- if (this.map.size >= this.max) {
1342
- const s = this.map.keys().next().value;
1343
- this.delete(s);
1344
- }
1345
- this.map.set(e, r);
1346
- }
1347
- return this;
1348
- }
1349
- }
1350
- var Js = Ws, Ze, Ut;
1351
- function le() {
1352
- if (Ut)
1353
- return Ze;
1354
- Ut = 1;
1355
- const t = /\s+/g;
1356
- class e {
1357
- constructor(p, E) {
1358
- if (E = s(E), p instanceof e)
1359
- return p.loose === !!E.loose && p.includePrerelease === !!E.includePrerelease ? p : new e(p.raw, E);
1360
- if (p instanceof o)
1361
- return this.raw = p.value, this.set = [[p]], this.formatted = void 0, this;
1362
- if (this.options = E, this.loose = !!E.loose, this.includePrerelease = !!E.includePrerelease, this.raw = p.trim().replace(t, " "), this.set = this.raw.split("||").map((A) => this.parseRange(A.trim())).filter((A) => A.length), !this.set.length)
1363
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
1364
- if (this.set.length > 1) {
1365
- const A = this.set[0];
1366
- if (this.set = this.set.filter((C) => !O(C[0])), this.set.length === 0)
1367
- this.set = [A];
1368
- else if (this.set.length > 1) {
1369
- for (const C of this.set)
1370
- if (C.length === 1 && y(C[0])) {
1371
- this.set = [C];
1372
- break;
1373
- }
1374
- }
1375
- }
1376
- this.formatted = void 0;
1377
- }
1378
- get range() {
1379
- if (this.formatted === void 0) {
1380
- this.formatted = "";
1381
- for (let p = 0; p < this.set.length; p++) {
1382
- p > 0 && (this.formatted += "||");
1383
- const E = this.set[p];
1384
- for (let A = 0; A < E.length; A++)
1385
- A > 0 && (this.formatted += " "), this.formatted += E[A].toString().trim();
1386
- }
1387
- }
1388
- return this.formatted;
1389
- }
1390
- format() {
1391
- return this.range;
1392
- }
1393
- toString() {
1394
- return this.range;
1395
- }
1396
- parseRange(p) {
1397
- const A = ((this.options.includePrerelease && c) | (this.options.loose && b)) + ":" + p, C = n.get(A);
1398
- if (C)
1399
- return C;
1400
- const P = this.options.loose, x = P ? d[u.HYPHENRANGELOOSE] : d[u.HYPHENRANGE];
1401
- p = p.replace(x, R(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(d[u.COMPARATORTRIM], v), i("comparator trim", p), p = p.replace(d[u.TILDETRIM], g), i("tilde trim", p), p = p.replace(d[u.CARETTRIM], T), i("caret trim", p);
1402
- let w = p.split(" ").map((H) => V(H, this.options)).join(" ").split(/\s+/).map((H) => h(H, this.options));
1403
- P && (w = w.filter((H) => (i("loose invalid filter", H, this.options), !!H.match(d[u.COMPARATORLOOSE])))), i("range list", w);
1404
- const L = /* @__PURE__ */ new Map(), U = w.map((H) => new o(H, this.options));
1405
- for (const H of U) {
1406
- if (O(H))
1407
- return [H];
1408
- L.set(H.value, H);
1409
- }
1410
- L.size > 1 && L.has("") && L.delete("");
1411
- const X = [...L.values()];
1412
- return n.set(A, X), X;
1413
- }
1414
- intersects(p, E) {
1415
- if (!(p instanceof e))
1416
- throw new TypeError("a Range is required");
1417
- return this.set.some((A) => k(A, E) && p.set.some((C) => k(C, E) && A.every((P) => C.every((x) => P.intersects(x, E)))));
1418
- }
1419
- // if ANY of the sets match ALL of its comparators, then pass
1420
- test(p) {
1421
- if (!p)
1422
- return !1;
1423
- if (typeof p == "string")
1424
- try {
1425
- p = new f(p, this.options);
1426
- } catch {
1427
- return !1;
1428
- }
1429
- for (let E = 0; E < this.set.length; E++)
1430
- if (S(this.set[E], p, this.options))
1431
- return !0;
1432
- return !1;
1433
- }
1434
- }
1435
- Ze = e;
1436
- const r = Js, n = new r(), s = ht, o = Ke(), i = Ge, f = ne, {
1437
- safeRe: d,
1438
- t: u,
1439
- comparatorTrimReplace: v,
1440
- tildeTrimReplace: g,
1441
- caretTrimReplace: T
1442
- } = Se, { FLAG_INCLUDE_PRERELEASE: c, FLAG_LOOSE: b } = De, O = (m) => m.value === "<0.0.0-0", y = (m) => m.value === "", k = (m, p) => {
1443
- let E = !0;
1444
- const A = m.slice();
1445
- let C = A.pop();
1446
- for (; E && A.length; )
1447
- E = A.every((P) => C.intersects(P, p)), C = A.pop();
1448
- return E;
1449
- }, V = (m, p) => (i("comp", m, p), m = Z(m, p), i("caret", m), m = M(m, p), i("tildes", m), m = W(m, p), i("xrange", m), m = l(m, p), i("stars", m), m), I = (m) => !m || m.toLowerCase() === "x" || m === "*", M = (m, p) => m.trim().split(/\s+/).map((E) => J(E, p)).join(" "), J = (m, p) => {
1450
- const E = p.loose ? d[u.TILDELOOSE] : d[u.TILDE];
1451
- return m.replace(E, (A, C, P, x, w) => {
1452
- i("tilde", m, A, C, P, x, w);
1453
- let L;
1454
- return I(C) ? L = "" : I(P) ? L = `>=${C}.0.0 <${+C + 1}.0.0-0` : I(x) ? L = `>=${C}.${P}.0 <${C}.${+P + 1}.0-0` : w ? (i("replaceTilde pr", w), L = `>=${C}.${P}.${x}-${w} <${C}.${+P + 1}.0-0`) : L = `>=${C}.${P}.${x} <${C}.${+P + 1}.0-0`, i("tilde return", L), L;
1455
- });
1456
- }, Z = (m, p) => m.trim().split(/\s+/).map((E) => D(E, p)).join(" "), D = (m, p) => {
1457
- i("caret", m, p);
1458
- const E = p.loose ? d[u.CARETLOOSE] : d[u.CARET], A = p.includePrerelease ? "-0" : "";
1459
- return m.replace(E, (C, P, x, w, L) => {
1460
- i("caret", m, C, P, x, w, L);
1461
- let U;
1462
- return I(P) ? U = "" : I(x) ? U = `>=${P}.0.0${A} <${+P + 1}.0.0-0` : I(w) ? P === "0" ? U = `>=${P}.${x}.0${A} <${P}.${+x + 1}.0-0` : U = `>=${P}.${x}.0${A} <${+P + 1}.0.0-0` : L ? (i("replaceCaret pr", L), P === "0" ? x === "0" ? U = `>=${P}.${x}.${w}-${L} <${P}.${x}.${+w + 1}-0` : U = `>=${P}.${x}.${w}-${L} <${P}.${+x + 1}.0-0` : U = `>=${P}.${x}.${w}-${L} <${+P + 1}.0.0-0`) : (i("no pr"), P === "0" ? x === "0" ? U = `>=${P}.${x}.${w}${A} <${P}.${x}.${+w + 1}-0` : U = `>=${P}.${x}.${w}${A} <${P}.${+x + 1}.0-0` : U = `>=${P}.${x}.${w} <${+P + 1}.0.0-0`), i("caret return", U), U;
1463
- });
1464
- }, W = (m, p) => (i("replaceXRanges", m, p), m.split(/\s+/).map((E) => a(E, p)).join(" ")), a = (m, p) => {
1465
- m = m.trim();
1466
- const E = p.loose ? d[u.XRANGELOOSE] : d[u.XRANGE];
1467
- return m.replace(E, (A, C, P, x, w, L) => {
1468
- i("xRange", m, A, C, P, x, w, L);
1469
- const U = I(P), X = U || I(x), H = X || I(w), j = H;
1470
- return C === "=" && j && (C = ""), L = p.includePrerelease ? "-0" : "", U ? C === ">" || C === "<" ? A = "<0.0.0-0" : A = "*" : C && j ? (X && (x = 0), w = 0, C === ">" ? (C = ">=", X ? (P = +P + 1, x = 0, w = 0) : (x = +x + 1, w = 0)) : C === "<=" && (C = "<", X ? P = +P + 1 : x = +x + 1), C === "<" && (L = "-0"), A = `${C + P}.${x}.${w}${L}`) : X ? A = `>=${P}.0.0${L} <${+P + 1}.0.0-0` : H && (A = `>=${P}.${x}.0${L} <${P}.${+x + 1}.0-0`), i("xRange return", A), A;
1471
- });
1472
- }, l = (m, p) => (i("replaceStars", m, p), m.trim().replace(d[u.STAR], "")), h = (m, p) => (i("replaceGTE0", m, p), m.trim().replace(d[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), R = (m) => (p, E, A, C, P, x, w, L, U, X, H, j) => (I(A) ? E = "" : I(C) ? E = `>=${A}.0.0${m ? "-0" : ""}` : I(P) ? E = `>=${A}.${C}.0${m ? "-0" : ""}` : x ? E = `>=${E}` : E = `>=${E}${m ? "-0" : ""}`, I(U) ? L = "" : I(X) ? L = `<${+U + 1}.0.0-0` : I(H) ? L = `<${U}.${+X + 1}.0-0` : j ? L = `<=${U}.${X}.${H}-${j}` : m ? L = `<${U}.${X}.${+H + 1}-0` : L = `<=${L}`, `${E} ${L}`.trim()), S = (m, p, E) => {
1473
- for (let A = 0; A < m.length; A++)
1474
- if (!m[A].test(p))
1475
- return !1;
1476
- if (p.prerelease.length && !E.includePrerelease) {
1477
- for (let A = 0; A < m.length; A++)
1478
- if (i(m[A].semver), m[A].semver !== o.ANY && m[A].semver.prerelease.length > 0) {
1479
- const C = m[A].semver;
1480
- if (C.major === p.major && C.minor === p.minor && C.patch === p.patch)
1481
- return !0;
1482
- }
1483
- return !1;
1484
- }
1485
- return !0;
1486
- };
1487
- return Ze;
1488
- }
1489
- var Qe, Dt;
1490
- function Ke() {
1491
- if (Dt)
1492
- return Qe;
1493
- Dt = 1;
1494
- const t = Symbol("SemVer ANY");
1495
- class e {
1496
- static get ANY() {
1497
- return t;
1498
- }
1499
- constructor(v, g) {
1500
- if (g = r(g), v instanceof e) {
1501
- if (v.loose === !!g.loose)
1502
- return v;
1503
- v = v.value;
1504
- }
1505
- v = v.trim().split(/\s+/).join(" "), i("comparator", v, g), this.options = g, this.loose = !!g.loose, this.parse(v), this.semver === t ? this.value = "" : this.value = this.operator + this.semver.version, i("comp", this);
1506
- }
1507
- parse(v) {
1508
- const g = this.options.loose ? n[s.COMPARATORLOOSE] : n[s.COMPARATOR], T = v.match(g);
1509
- if (!T)
1510
- throw new TypeError(`Invalid comparator: ${v}`);
1511
- this.operator = T[1] !== void 0 ? T[1] : "", this.operator === "=" && (this.operator = ""), T[2] ? this.semver = new f(T[2], this.options.loose) : this.semver = t;
1512
- }
1513
- toString() {
1514
- return this.value;
1515
- }
1516
- test(v) {
1517
- if (i("Comparator.test", v, this.options.loose), this.semver === t || v === t)
1518
- return !0;
1519
- if (typeof v == "string")
1520
- try {
1521
- v = new f(v, this.options);
1522
- } catch {
1523
- return !1;
1524
- }
1525
- return o(v, this.operator, this.semver, this.options);
1526
- }
1527
- intersects(v, g) {
1528
- if (!(v instanceof e))
1529
- throw new TypeError("a Comparator is required");
1530
- return this.operator === "" ? this.value === "" ? !0 : new d(v.value, g).test(this.value) : v.operator === "" ? v.value === "" ? !0 : new d(this.value, g).test(v.semver) : (g = r(g), g.includePrerelease && (this.value === "<0.0.0-0" || v.value === "<0.0.0-0") || !g.includePrerelease && (this.value.startsWith("<0.0.0") || v.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && v.operator.startsWith(">") || this.operator.startsWith("<") && v.operator.startsWith("<") || this.semver.version === v.semver.version && this.operator.includes("=") && v.operator.includes("=") || o(this.semver, "<", v.semver, g) && this.operator.startsWith(">") && v.operator.startsWith("<") || o(this.semver, ">", v.semver, g) && this.operator.startsWith("<") && v.operator.startsWith(">")));
1531
- }
1532
- }
1533
- Qe = e;
1534
- const r = ht, { safeRe: n, t: s } = Se, o = _r, i = Ge, f = ne, d = le();
1535
- return Qe;
1536
- }
1537
- const Zs = le(), Qs = (t, e, r) => {
1538
- try {
1539
- e = new Zs(e, r);
1540
- } catch {
1541
- return !1;
1542
- }
1543
- return e.test(t);
1544
- };
1545
- var qe = Qs;
1546
- const ea = le(), ta = (t, e) => new ea(t, e).set.map((r) => r.map((n) => n.value).join(" ").trim().split(" "));
1547
- var ra = ta;
1548
- const na = ne, sa = le(), aa = (t, e, r) => {
1549
- let n = null, s = null, o = null;
1550
- try {
1551
- o = new sa(e, r);
1552
- } catch {
1553
- return null;
1554
- }
1555
- return t.forEach((i) => {
1556
- o.test(i) && (!n || s.compare(i) === -1) && (n = i, s = new na(n, r));
1557
- }), n;
1558
- };
1559
- var oa = aa;
1560
- const ia = ne, la = le(), ua = (t, e, r) => {
1561
- let n = null, s = null, o = null;
1562
- try {
1563
- o = new la(e, r);
1564
- } catch {
1565
- return null;
1566
- }
1567
- return t.forEach((i) => {
1568
- o.test(i) && (!n || s.compare(i) === 1) && (n = i, s = new ia(n, r));
1569
- }), n;
1570
- };
1571
- var ca = ua;
1572
- const et = ne, da = le(), Gt = Be, fa = (t, e) => {
1573
- t = new da(t, e);
1574
- let r = new et("0.0.0");
1575
- if (t.test(r) || (r = new et("0.0.0-0"), t.test(r)))
1576
- return r;
1577
- r = null;
1578
- for (let n = 0; n < t.set.length; ++n) {
1579
- const s = t.set[n];
1580
- let o = null;
1581
- s.forEach((i) => {
1582
- const f = new et(i.semver.version);
1583
- switch (i.operator) {
1584
- case ">":
1585
- f.prerelease.length === 0 ? f.patch++ : f.prerelease.push(0), f.raw = f.format();
1586
- case "":
1587
- case ">=":
1588
- (!o || Gt(f, o)) && (o = f);
1589
- break;
1590
- case "<":
1591
- case "<=":
1592
- break;
1593
- default:
1594
- throw new Error(`Unexpected operation: ${i.operator}`);
1595
- }
1596
- }), o && (!r || Gt(r, o)) && (r = o);
1597
- }
1598
- return r && t.test(r) ? r : null;
1599
- };
1600
- var ma = fa;
1601
- const pa = le(), ha = (t, e) => {
1602
- try {
1603
- return new pa(t, e).range || "*";
1604
- } catch {
1605
- return null;
1606
- }
1607
- };
1608
- var va = ha;
1609
- const ga = ne, Er = Ke(), { ANY: ba } = Er, ya = le(), $a = qe, Bt = Be, Kt = gt, _a = yt, Ea = bt, wa = (t, e, r, n) => {
1610
- t = new ga(t, n), e = new ya(e, n);
1611
- let s, o, i, f, d;
1612
- switch (r) {
1613
- case ">":
1614
- s = Bt, o = _a, i = Kt, f = ">", d = ">=";
1615
- break;
1616
- case "<":
1617
- s = Kt, o = Ea, i = Bt, f = "<", d = "<=";
1618
- break;
1619
- default:
1620
- throw new TypeError('Must provide a hilo val of "<" or ">"');
1621
- }
1622
- if ($a(t, e, n))
1623
- return !1;
1624
- for (let u = 0; u < e.set.length; ++u) {
1625
- const v = e.set[u];
1626
- let g = null, T = null;
1627
- if (v.forEach((c) => {
1628
- c.semver === ba && (c = new Er(">=0.0.0")), g = g || c, T = T || c, s(c.semver, g.semver, n) ? g = c : i(c.semver, T.semver, n) && (T = c);
1629
- }), g.operator === f || g.operator === d || (!T.operator || T.operator === f) && o(t, T.semver))
1630
- return !1;
1631
- if (T.operator === d && i(t, T.semver))
1632
- return !1;
1633
- }
1634
- return !0;
1635
- };
1636
- var $t = wa;
1637
- const Ra = $t, Ia = (t, e, r) => Ra(t, e, ">", r);
1638
- var Aa = Ia;
1639
- const Oa = $t, Sa = (t, e, r) => Oa(t, e, "<", r);
1640
- var Pa = Sa;
1641
- const qt = le(), Ta = (t, e, r) => (t = new qt(t, r), e = new qt(e, r), t.intersects(e, r));
1642
- var La = Ta;
1643
- const Na = qe, Ca = ie;
1644
- var xa = (t, e, r) => {
1645
- const n = [];
1646
- let s = null, o = null;
1647
- const i = t.sort((v, g) => Ca(v, g, r));
1648
- for (const v of i)
1649
- Na(v, e, r) ? (o = v, s || (s = v)) : (o && n.push([s, o]), o = null, s = null);
1650
- s && n.push([s, null]);
1651
- const f = [];
1652
- for (const [v, g] of n)
1653
- v === g ? f.push(v) : !g && v === i[0] ? f.push("*") : g ? v === i[0] ? f.push(`<=${g}`) : f.push(`${v} - ${g}`) : f.push(`>=${v}`);
1654
- const d = f.join(" || "), u = typeof e.raw == "string" ? e.raw : String(e);
1655
- return d.length < u.length ? d : e;
1656
- };
1657
- const Ht = le(), _t = Ke(), { ANY: tt } = _t, Ie = qe, Et = ie, ka = (t, e, r = {}) => {
1658
- if (t === e)
1659
- return !0;
1660
- t = new Ht(t, r), e = new Ht(e, r);
1661
- let n = !1;
1662
- e:
1663
- for (const s of t.set) {
1664
- for (const o of e.set) {
1665
- const i = Fa(s, o, r);
1666
- if (n = n || i !== null, i)
1667
- continue e;
1668
- }
1669
- if (n)
1670
- return !1;
1671
- }
1672
- return !0;
1673
- }, Va = [new _t(">=0.0.0-0")], zt = [new _t(">=0.0.0")], Fa = (t, e, r) => {
1674
- if (t === e)
1675
- return !0;
1676
- if (t.length === 1 && t[0].semver === tt) {
1677
- if (e.length === 1 && e[0].semver === tt)
1678
- return !0;
1679
- r.includePrerelease ? t = Va : t = zt;
1680
- }
1681
- if (e.length === 1 && e[0].semver === tt) {
1682
- if (r.includePrerelease)
1683
- return !0;
1684
- e = zt;
1685
- }
1686
- const n = /* @__PURE__ */ new Set();
1687
- let s, o;
1688
- for (const c of t)
1689
- c.operator === ">" || c.operator === ">=" ? s = Xt(s, c, r) : c.operator === "<" || c.operator === "<=" ? o = Yt(o, c, r) : n.add(c.semver);
1690
- if (n.size > 1)
1691
- return null;
1692
- let i;
1693
- if (s && o) {
1694
- if (i = Et(s.semver, o.semver, r), i > 0)
1695
- return null;
1696
- if (i === 0 && (s.operator !== ">=" || o.operator !== "<="))
1697
- return null;
1698
- }
1699
- for (const c of n) {
1700
- if (s && !Ie(c, String(s), r) || o && !Ie(c, String(o), r))
1701
- return null;
1702
- for (const b of e)
1703
- if (!Ie(c, String(b), r))
1704
- return !1;
1705
- return !0;
1706
- }
1707
- let f, d, u, v, g = o && !r.includePrerelease && o.semver.prerelease.length ? o.semver : !1, T = s && !r.includePrerelease && s.semver.prerelease.length ? s.semver : !1;
1708
- g && g.prerelease.length === 1 && o.operator === "<" && g.prerelease[0] === 0 && (g = !1);
1709
- for (const c of e) {
1710
- if (v = v || c.operator === ">" || c.operator === ">=", u = u || c.operator === "<" || c.operator === "<=", s) {
1711
- if (T && c.semver.prerelease && c.semver.prerelease.length && c.semver.major === T.major && c.semver.minor === T.minor && c.semver.patch === T.patch && (T = !1), c.operator === ">" || c.operator === ">=") {
1712
- if (f = Xt(s, c, r), f === c && f !== s)
1713
- return !1;
1714
- } else if (s.operator === ">=" && !Ie(s.semver, String(c), r))
1715
- return !1;
1716
- }
1717
- if (o) {
1718
- if (g && c.semver.prerelease && c.semver.prerelease.length && c.semver.major === g.major && c.semver.minor === g.minor && c.semver.patch === g.patch && (g = !1), c.operator === "<" || c.operator === "<=") {
1719
- if (d = Yt(o, c, r), d === c && d !== o)
1720
- return !1;
1721
- } else if (o.operator === "<=" && !Ie(o.semver, String(c), r))
1722
- return !1;
1723
- }
1724
- if (!c.operator && (o || s) && i !== 0)
1725
- return !1;
1726
- }
1727
- return !(s && u && !o && i !== 0 || o && v && !s && i !== 0 || T || g);
1728
- }, Xt = (t, e, r) => {
1729
- if (!t)
1730
- return e;
1731
- const n = Et(t.semver, e.semver, r);
1732
- return n > 0 ? t : n < 0 || e.operator === ">" && t.operator === ">=" ? e : t;
1733
- }, Yt = (t, e, r) => {
1734
- if (!t)
1735
- return e;
1736
- const n = Et(t.semver, e.semver, r);
1737
- return n < 0 ? t : n > 0 || e.operator === "<" && t.operator === "<=" ? e : t;
1738
- };
1739
- var ja = ka;
1740
- const rt = Se, Wt = De, Ma = ne, Jt = br, Ua = Ee, Da = zn, Ga = Wn, Ba = Zn, Ka = es, qa = ns, Ha = os, za = us, Xa = fs, Ya = ie, Wa = vs, Ja = ys, Za = vt, Qa = ws, eo = As, to = Be, ro = gt, no = yr, so = $r, ao = bt, oo = yt, io = _r, lo = Ys, uo = Ke(), co = le(), fo = qe, mo = ra, po = oa, ho = ca, vo = ma, go = va, bo = $t, yo = Aa, $o = Pa, _o = La, Eo = xa, wo = ja;
1741
- var Ro = {
1742
- parse: Ua,
1743
- valid: Da,
1744
- clean: Ga,
1745
- inc: Ba,
1746
- diff: Ka,
1747
- major: qa,
1748
- minor: Ha,
1749
- patch: za,
1750
- prerelease: Xa,
1751
- compare: Ya,
1752
- rcompare: Wa,
1753
- compareLoose: Ja,
1754
- compareBuild: Za,
1755
- sort: Qa,
1756
- rsort: eo,
1757
- gt: to,
1758
- lt: ro,
1759
- eq: no,
1760
- neq: so,
1761
- gte: ao,
1762
- lte: oo,
1763
- cmp: io,
1764
- coerce: lo,
1765
- Comparator: uo,
1766
- Range: co,
1767
- satisfies: fo,
1768
- toComparators: mo,
1769
- maxSatisfying: po,
1770
- minSatisfying: ho,
1771
- minVersion: vo,
1772
- validRange: go,
1773
- outside: bo,
1774
- gtr: yo,
1775
- ltr: $o,
1776
- intersects: _o,
1777
- simplifyRange: Eo,
1778
- subset: wo,
1779
- SemVer: Ma,
1780
- re: rt.re,
1781
- src: rt.src,
1782
- tokens: rt.t,
1783
- SEMVER_SPEC_VERSION: Wt.SEMVER_SPEC_VERSION,
1784
- RELEASE_TYPES: Wt.RELEASE_TYPES,
1785
- compareIdentifiers: Jt.compareIdentifiers,
1786
- rcompareIdentifiers: Jt.rcompareIdentifiers
1787
- };
1788
- const Zt = /* @__PURE__ */ dr(Ro);
1789
- var ot = /* @__PURE__ */ ((t) => (t[t.menuV3 = 0] = "menuV3", t[t.applyEffectOnOrder = 1] = "applyEffectOnOrder", t[t.nestedAddon = 2] = "nestedAddon", t[t.feedmeDelivery = 3] = "feedmeDelivery", t[t.taxAndServiceChargeV4 = 4] = "taxAndServiceChargeV4", t[t.itemCombo = 5] = "itemCombo", t[t.itemTakeaway = 6] = "itemTakeaway", t[t.transferInventory = 7] = "transferInventory", t[t.qrEPayment = 8] = "qrEPayment", t[t.deliveryIntegration = 9] = "deliveryIntegration", t[t.rmsPayment = 10] = "rmsPayment", t[t.queue = 11] = "queue", t[t.paymentVoucher = 12] = "paymentVoucher", t))(ot || {});
1790
- const wr = {
1791
- 0: "3.0.0-alpha",
1792
- 1: "3.5.0-alpha",
1793
- 2: "4.0.0-alpha",
1794
- 4: "4.0.0-alpha",
1795
- 5: "4.1.0-alpha",
1796
- // TODO: #475 make sure current pos version
1797
- 6: "4.3.10-alpha",
1798
- 7: "4.5.0-alpha",
1799
- 8: "6.9.0-alpha",
1800
- 9: "6.11.0-alpha",
1801
- 3: "6.12.0-alpha",
1802
- 10: "6.21.0-alpha",
1803
- 11: "6.21.0-alpha",
1804
- 12: "6.31.0-alpha"
1805
- };
1806
- function Io(t, e) {
1807
- return Zt.valid(e) && Zt.gte(e, wr[t]);
1808
- }
1809
- function Ao(t) {
1810
- return wr[t].replace("-alpha", "");
1811
- }
1812
- function Qt(t = "no name") {
1813
- return {
1814
- name: t,
1815
- address: {
1816
- line1: "",
1817
- line2: "",
1818
- state: "",
1819
- city: "",
1820
- postcode: "",
1821
- country: "",
1822
- coordinates: []
1823
- },
1824
- phoneNo: "",
1825
- regNo: "",
1826
- email: ""
1827
- };
1828
- }
1829
- function er() {
1830
- return Oe({
1831
- line1: "",
1832
- line2: "",
1833
- city: "",
1834
- postcode: "",
1835
- state: "",
1836
- country: "",
1837
- coordinates: []
1838
- });
1839
- }
1840
- function Oe(t) {
1841
- return {
1842
- ...t,
1843
- get formatted() {
1844
- const { line1: e, line2: r, postcode: n, city: s, state: o, country: i } = t;
1845
- return [e, r || "", n, s, o, i].map((f) => f.replace(/,\s*$/, "")).filter((f) => !!f.trim()).join(", ");
1846
- },
1847
- get isValidPostcode() {
1848
- const e = Number.parseInt(t.postcode);
1849
- return !isNaN(e);
1850
- },
1851
- get isValid() {
1852
- const e = ["line2"];
1853
- return Object.keys(t).filter((r) => !e.includes(r)).every((r) => !!t[r]);
1854
- },
1855
- get isValidCoordinate() {
1856
- return (t.coordinates || []).length === 2;
1857
- }
1858
- };
1859
- }
1860
- function Oo({ posVersion: t, payoutAccount: e }) {
1861
- return !!t && Io(ot.qrEPayment, t) ? !e || !e.enable ? "Payout account is required" : e.status !== pt.F_PAYOUT_ACCOUNT_STATUS.enum.APPROVED ? "Payout account under review" : !0 : `For POS ${Ao(ot.qrEPayment)} or above`;
1862
- }
1863
- function Rr(t) {
1864
- return {
1865
- id: t._id,
1866
- ...t,
1867
- profile: {
1868
- ...t.profile,
1869
- address: Oe(t.profile.address)
1870
- },
1871
- allowEPayment: Oo(t)
1872
- };
1873
- }
1874
- function nt(t) {
1875
- return Rr(je(t));
1876
- }
1877
- async function tr(t) {
1878
- const e = je(t), r = [];
1879
- for (const n of e)
1880
- r.push(await Rr(n));
1881
- return r;
1882
- }
1883
- const Ae = {
1884
- async readRestaurant(t) {
1885
- return await nt(await Pe().get(`/restaurants/${t}`));
1886
- },
1887
- async readRestaurants() {
1888
- return await tr(await Xe().get("/restaurants"));
1889
- },
1890
- async readRestaurantsByBusiness() {
1891
- return await tr(await Xe().get("/restaurant-list"));
1892
- },
1893
- async createRestaurant(t) {
1894
- return await nt(await Xe().post("/restaurants", t));
1895
- },
1896
- async updateRestaurantProfile(t, e) {
1897
- return await nt(
1898
- await Pe().put(`/restaurants/${t}/profile`, e)
1899
- );
1900
- },
1901
- async updateRestaurantAttributes(t, e) {
1902
- return je(
1903
- await Pe().put(`/restaurants/${t}/attributes`, {
1904
- attributes: e
1905
- })
1906
- );
1907
- },
1908
- async createRestaurantFeature(t) {
1909
- return je(await Pe().post(`/license/restaurant/${t}`));
1910
- }
1911
- }, So = /* @__PURE__ */ re({
1912
- __name: "GoogleMap",
1913
- props: {
1914
- markers: {
1915
- type: Array,
1916
- default: () => []
1917
- },
1918
- polygons: {
1919
- type: Array,
1920
- default: () => []
1921
- },
1922
- zoom: {
1923
- type: Number,
1924
- default: 14
1925
- },
1926
- editable: {
1927
- type: Boolean,
1928
- default: !1
1929
- },
1930
- center: {
1931
- type: Object,
1932
- default: Me.jb
1933
- }
1934
- },
1935
- emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
1936
- setup(t, { expose: e, emit: r }) {
1937
- const n = t, s = r;
1938
- e({
1939
- setCenter: (a) => {
1940
- var l;
1941
- (l = i.value) == null || l.setCenter(a);
1942
- }
1943
- });
1944
- const o = ae(), i = ae(null), f = [];
1945
- function d(a) {
1946
- return {
1947
- lat: a.latLng.lat(),
1948
- lng: a.latLng.lng()
1949
- };
1950
- }
1951
- function u(a, l, h) {
1952
- const R = be().maps.event.addListener(a, l, h);
1953
- f.push(R);
1954
- }
1955
- const v = ae([]);
1956
- function g(a, l, h) {
1957
- u(a, l, h);
1958
- }
1959
- function T(a) {
1960
- c(null), v.value = a.map((l, h) => {
1961
- const R = be(), S = new R.maps.Marker({
1962
- position: l,
1963
- draggable: !0
1964
- });
1965
- return g(S, "dragend", (m) => {
1966
- s("marker-change", { index: h, position: d(m) });
1967
- }), S;
1968
- }), c(i.value);
1969
- }
1970
- function c(a) {
1971
- v.value.map((l) => At(l).setMap(a));
1972
- }
1973
- const b = ae([]);
1974
- function O(a, l, h) {
1975
- u(a, l, h);
1976
- }
1977
- function y(a, l, h) {
1978
- u(a, l, h);
1979
- }
1980
- function k(a) {
1981
- return b.value[a].getPath().getArray().map(({ lat: h, lng: R }) => ({
1982
- lat: h(),
1983
- lng: R()
1984
- }));
1985
- }
1986
- function V(a) {
1987
- const l = k(a);
1988
- s("polygon-change", { index: a, path: l });
1989
- }
1990
- function I(a, l) {
1991
- const R = k(a).filter((S, m) => m !== l);
1992
- s("polygon-change", { index: a, path: R });
1993
- }
1994
- function M(a, l) {
1995
- l.vertex !== void 0 ? I(a, l.vertex) : s("polygon-right-click", a);
1996
- }
1997
- function J(a) {
1998
- Z(null), b.value = a.map((l, h) => {
1999
- const R = be(), S = new R.maps.Polygon({
2000
- paths: l.paths,
2001
- strokeColor: l.strokeColor,
2002
- fillColor: l.fillColor,
2003
- fillOpacity: 0.5,
2004
- editable: n.editable
2005
- });
2006
- return O(S, "contextmenu", (m) => M(h, m)), S.getPaths().forEach((m) => {
2007
- y(m, "insert_at", () => V(h)), y(m, "set_at", () => V(h));
2008
- }), S;
2009
- }), Z(i.value);
2010
- }
2011
- function Z(a) {
2012
- b.value.map((l) => At(l).setMap(a));
2013
- }
2014
- function D(a, l, h) {
2015
- u(a, l, h);
2016
- }
2017
- function W() {
2018
- const a = be().maps.Map;
2019
- i.value = new a(o.value, {
2020
- center: n.center,
2021
- zoom: n.zoom,
2022
- mapTypeControl: !1,
2023
- streetViewControl: !1,
2024
- draggable: !0,
2025
- scrollwheel: !0
2026
- }), D(i.value, "click", (l) => s("map-click", d(l)));
2027
- }
2028
- return It(() => n.markers, T, { deep: !0 }), It(() => n.polygons, J, { deep: !0 }), Cr(() => {
2029
- !o.value || !be() || (W(), T(n.markers), J(n.polygons));
2030
- }), xr(() => {
2031
- f.forEach((a) => a.remove());
2032
- }), (a, l) => (F(), B("div", {
2033
- ref_key: "mapRef",
2034
- ref: o,
2035
- class: "map app-map"
2036
- }, null, 512));
2037
- }
2038
- }), Po = { class: "space-y-24" }, To = { class: "flex flex-row gap-8" }, Lo = { class: "flex gap-8" }, No = { class: "flex gap-8" }, Co = /* @__PURE__ */ re({
2039
- __name: "CoordinateDialog",
2040
- props: {
2041
- address: {
2042
- type: String,
2043
- required: !0
2044
- },
2045
- coordinate: {
2046
- type: Object,
2047
- default: void 0
2048
- }
2049
- },
2050
- setup(t) {
2051
- const { t: e } = ve(), r = t, { emitData: n } = Ur(), s = ct(
2052
- $e(r.coordinate ? r.coordinate : Me.jb)
2053
- );
2054
- function o({ position: i }) {
2055
- s.lat = i.lat, s.lng = i.lng, n(s);
2056
- }
2057
- return n(s), (i, f) => (F(), B("div", Po, [
2058
- $("div", null, [
2059
- $("div", To, [
2060
- $("div", null, G(_(e)("settings.coordinate_dialog.address")) + ":", 1),
2061
- $("div", null, G(t.address || "--"), 1)
2062
- ]),
2063
- $("div", Lo, [
2064
- $("div", null, G(_(e)("settings.coordinate_dialog.latitude")) + ":", 1),
2065
- $("div", null, G(s.lat), 1)
2066
- ]),
2067
- $("div", No, [
2068
- $("div", null, G(_(e)("settings.coordinate_dialog.longitude")) + ":", 1),
2069
- $("div", null, G(s.lng), 1)
2070
- ])
2071
- ]),
2072
- N(So, {
2073
- class: "w-full",
2074
- style: { height: "300px" },
2075
- editable: "",
2076
- center: s,
2077
- markers: [s],
2078
- onMarkerChange: o,
2079
- onMapClick: f[0] || (f[0] = (d) => o({ position: d }))
2080
- }, null, 8, ["center", "markers"])
2081
- ]));
2082
- }
2083
- }), xo = /* @__PURE__ */ re({
2084
- __name: "CoordinateInput",
2085
- props: {
2086
- modelValue: {
2087
- type: Array,
2088
- default: void 0
2089
- },
2090
- address: {
2091
- type: Object,
2092
- required: !0
2093
- },
2094
- required: {
2095
- type: Boolean,
2096
- default: !1
2097
- }
2098
- },
2099
- emits: ["update:model-value"],
2100
- setup(t, { emit: e }) {
2101
- const { t: r } = ve(), n = t, s = e, o = ft(), i = Y(() => {
2102
- const g = n.modelValue || [];
2103
- return g.length < 2 ? null : Jr(g);
2104
- }), f = Y(() => i.value ? `${i.value.lat}, ${i.value.lng}` : "");
2105
- async function d() {
2106
- const g = be().maps.Geocoder, T = new g();
2107
- let c = i.value;
2108
- c || await new Promise((b) => {
2109
- n.address.formatted ? T.geocode({ address: n.address.formatted }, (O) => {
2110
- var k;
2111
- const y = (k = O == null ? void 0 : O[0]) == null ? void 0 : k.geometry;
2112
- c = y ? { lng: y.location.lng(), lat: y.location.lat() } : Me.jb, b(!0);
2113
- }) : (c = Me.jb, b(!0));
2114
- }), o.open({
2115
- contentComponent: Co,
2116
- contentComponentProps: {
2117
- address: n.address.formatted,
2118
- coordinate: c
2119
- },
2120
- title: r("settings.coordinate_input.dialog.title"),
2121
- primaryActions: {
2122
- text: r("settings.coordinate_input.dialog.confirm"),
2123
- variant: "primary",
2124
- close: !0
2125
- },
2126
- secondaryActions: {
2127
- text: r("settings.coordinate_input.dialog.delete"),
2128
- variant: "destructive",
2129
- close: !0
2130
- }
2131
- }).onPrimary(async (b) => {
2132
- const O = b ? Zr(b) : [];
2133
- v(), s("update:model-value", O);
2134
- }).onSecondary(() => {
2135
- v(), s("update:model-value", []);
2136
- });
2137
- }
2138
- const u = ae(!1);
2139
- function v() {
2140
- u.value = !1;
2141
- }
2142
- return (g, T) => {
2143
- const c = q("FmIcon"), b = q("FmField"), O = q("FmFormGroup");
2144
- return F(), te(O, {
2145
- modelValue: i.value,
2146
- "onUpdate:modelValue": T[0] || (T[0] = (y) => i.value = y),
2147
- label: _(r)("settings.coordinate_input.title")
2148
- }, {
2149
- default: K(() => [
2150
- N(b, {
2151
- class: "cursor-pointer",
2152
- onClick: d
2153
- }, {
2154
- prepend: K(() => [
2155
- de(g.$slots, "prepend")
2156
- ]),
2157
- append: K(() => [
2158
- N(c, {
2159
- class: "text-fm-color-neutral-gray-400",
2160
- name: "location_on",
2161
- outline: "",
2162
- size: "md"
2163
- })
2164
- ]),
2165
- default: K(() => [
2166
- de(g.$slots, "default", {}, () => [
2167
- $("div", {
2168
- class: ee([[i.value ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
2169
- }, G(i.value ? f.value : _(r)("settings.coordinate_input.not_set")), 3)
2170
- ])
2171
- ]),
2172
- _: 3
2173
- })
2174
- ]),
2175
- _: 3
2176
- }, 8, ["modelValue", "label"]);
2177
- };
2178
- }
2179
- }), ko = { class: "w-[140px] pt-16" }, Vo = { class: "pl-32" }, Fo = {
2180
- key: 1,
2181
- class: "flex gap-8 items-center my-8"
2182
- }, jo = /* @__PURE__ */ re({
2183
- __name: "OperationHoursInput",
2184
- props: {
2185
- modelValue: {
2186
- type: Object,
2187
- default: void 0
2188
- },
2189
- title: {
2190
- type: String,
2191
- required: !1
2192
- }
2193
- },
2194
- emits: ["update:model-value"],
2195
- setup(t, { emit: e }) {
2196
- const r = t, n = e, s = dt(), { t: o } = ve();
2197
- mt().startOf("week");
2198
- const i = Y(
2199
- () => [
2200
- o("settings.operation_hours.mon"),
2201
- o("settings.operation_hours.tue"),
2202
- o("settings.operation_hours.wed"),
2203
- o("settings.operation_hours.thu"),
2204
- o("settings.operation_hours.fri"),
2205
- o("settings.operation_hours.sat"),
2206
- o("settings.operation_hours.sun")
2207
- ].map((k, V) => ({
2208
- key: V.toString(),
2209
- label: k,
2210
- value: V < 6 ? V + 1 : 0,
2211
- // key of OperatingHours, since data start from sunday, UI start from monday
2212
- slot: `checkbox-${V}-end`
2213
- }))
2214
- ), f = Y(
2215
- () => r.modelValue ? Object.values(r.modelValue) : Array.from(Array(7)).map(() => ({
2216
- enable: !1,
2217
- hours: []
2218
- }))
2219
- ), d = Y(() => Object.values(f.value).map((k) => k.hours)), u = Y(() => f.value.reduce((k, V, I) => (V.hours.length > 0 && k.push(I), k), []));
2220
- function v() {
2221
- return { start: "00:00", end: "23:59" };
2222
- }
2223
- function g(k) {
2224
- const V = u.value.find((M) => !k.includes(M));
2225
- if (V !== void 0) {
2226
- y((M) => (M[V].enable = !1, M[V].hours = [], M));
2227
- return;
2228
- }
2229
- const I = k.find((M) => !u.value.includes(M));
2230
- I !== void 0 && f.value[I].hours.length === 0 && y((M) => (M[I].enable = !0, M[I].hours = [v()], M));
2231
- }
2232
- function T(k) {
2233
- y((V) => (V[k].hours.push(v()), V));
2234
- }
2235
- function c(k, V) {
2236
- d.value[k].length > 1 ? y((I) => (I[k].hours.splice(V, 1), I)) : s.open({ title: o("settings.operation_hours.cannot_remove_last"), type: "error" });
2237
- }
2238
- function b(k, V, I) {
2239
- I && y((M) => (M[k].hours[V].start = I, M));
2240
- }
2241
- function O(k, V, I) {
2242
- I && y((M) => (M[k].hours[V].end = I, M));
2243
- }
2244
- function y(k) {
2245
- const V = k($e(f.value)), I = {
2246
- 0: V[0],
2247
- 1: V[1],
2248
- 2: V[2],
2249
- 3: V[3],
2250
- 4: V[4],
2251
- 5: V[5],
2252
- 6: V[6]
2253
- };
2254
- n("update:model-value", I);
2255
- }
2256
- return (k, V) => {
2257
- const I = q("FmCheckbox"), M = q("FmTimePicker"), J = q("FmButton"), Z = q("FmField");
2258
- return F(), B("div", null, [
2259
- (F(!0), B(oe, null, he(i.value, (D) => (F(), B("div", {
2260
- key: D.value,
2261
- class: "flex flex-col items-start"
2262
- }, [
2263
- $("div", ko, [
2264
- N(I, {
2265
- "model-value": u.value,
2266
- label: D.label,
2267
- value: D.value,
2268
- "onUpdate:modelValue": g
2269
- }, null, 8, ["model-value", "label", "value"])
2270
- ]),
2271
- $("div", Vo, [
2272
- $("div", null, [
2273
- u.value.includes(D.value) ? (F(!0), B(oe, { key: 0 }, he(d.value[D.value], (W, a) => (F(), B("div", {
2274
- key: a,
2275
- class: "flex items-center gap-8"
2276
- }, [
2277
- N(M, {
2278
- "model-value": W.start,
2279
- "onUpdate:modelValue": (l) => b(D.value, a, l)
2280
- }, null, 8, ["model-value", "onUpdate:modelValue"]),
2281
- $("span", {
2282
- class: ee([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
2283
- }, G(_(o)("settings.operation_hours.to")), 1),
2284
- N(M, {
2285
- "model-value": W.end,
2286
- "onUpdate:modelValue": (l) => O(D.value, a, l)
2287
- }, null, 8, ["model-value", "onUpdate:modelValue"]),
2288
- N(J, {
2289
- icon: "close",
2290
- variant: "tertiary",
2291
- onClick: (l) => c(D.value, a)
2292
- }, null, 8, ["onClick"]),
2293
- N(J, {
2294
- class: ee(a === 0 ? "" : "invisible"),
2295
- icon: "add",
2296
- color: "primary",
2297
- variant: "secondary",
2298
- onClick: (l) => T(D.value)
2299
- }, null, 8, ["class", "onClick"])
2300
- ]))), 128)) : (F(), B("div", Fo, [
2301
- N(Z, null, {
2302
- default: K(() => [
2303
- $("div", {
2304
- class: ee([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
2305
- }, G(_(o)("settings.operation_hours.close")), 1)
2306
- ]),
2307
- _: 1
2308
- }),
2309
- $("span", {
2310
- class: ee([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
2311
- }, G(_(o)("settings.operation_hours.to")), 1),
2312
- N(Z, null, {
2313
- default: K(() => [
2314
- $("div", {
2315
- class: ee([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
2316
- }, G(_(o)("settings.operation_hours.close")), 1)
2317
- ]),
2318
- _: 1
2319
- })
2320
- ]))
2321
- ])
2322
- ])
2323
- ]))), 128))
2324
- ]);
2325
- };
2326
- }
2327
- }), Mo = { class: "space-y-24" }, Uo = { class: "flex gap-16 xs:flex-col xs:gap-24" }, Do = { class: "flex-1" }, Go = { class: "flex-1" }, Bo = { class: "flex gap-16 xs:flex-col xs:gap-24" }, Ko = { class: "flex-1" }, qo = { class: "flex-1" }, Ho = { class: "flex gap-16 xs:flex-col xs:gap-24" }, zo = { class: "flex-1" }, Xo = { class: "flex-1" }, Yo = /* @__PURE__ */ re({
2328
- __name: "RestaurantAddress",
2329
- props: {
2330
- modelValue: {
2331
- type: Object,
2332
- required: !0
2333
- }
2334
- },
2335
- emits: ["update:model-value"],
2336
- setup(t, { emit: e }) {
2337
- const { t: r } = ve();
2338
- er();
2339
- const n = t, s = e, o = Y(() => $e(n.modelValue || er()));
2340
- function i(d) {
2341
- return (d || "").toString();
2342
- }
2343
- function f(d) {
2344
- s("update:model-value", d(o.value));
2345
- }
2346
- return (d, u) => {
2347
- const v = q("FmTextField");
2348
- return F(), B("div", Mo, [
2349
- $("div", Uo, [
2350
- $("div", Do, [
2351
- N(v, {
2352
- "model-value": o.value.line1,
2353
- label: _(r)("settings.address.line1"),
2354
- "label-mark": "required",
2355
- rules: [_(fe)],
2356
- "onUpdate:modelValue": u[0] || (u[0] = (g) => f((T) => ({ ...T, line1: i(g) })))
2357
- }, null, 8, ["model-value", "label", "rules"])
2358
- ]),
2359
- $("div", Go, [
2360
- N(v, {
2361
- "model-value": o.value.line2,
2362
- label: _(r)("settings.address.line2"),
2363
- "onUpdate:modelValue": u[1] || (u[1] = (g) => f((T) => ({ ...T, line2: i(g) })))
2364
- }, null, 8, ["model-value", "label"])
2365
- ])
2366
- ]),
2367
- $("div", Bo, [
2368
- $("div", Ko, [
2369
- N(v, {
2370
- "model-value": o.value.city,
2371
- rules: [_(fe)],
2372
- label: _(r)("settings.address.city"),
2373
- "label-mark": "required",
2374
- "onUpdate:modelValue": u[2] || (u[2] = (g) => f((T) => ({ ...T, city: i(g) })))
2375
- }, null, 8, ["model-value", "rules", "label"])
2376
- ]),
2377
- $("div", qo, [
2378
- N(v, {
2379
- "model-value": o.value.postcode,
2380
- label: _(r)("settings.address.postal_code"),
2381
- "label-mark": "required",
2382
- rules: [_(fe)],
2383
- "onUpdate:modelValue": u[3] || (u[3] = (g) => f((T) => ({ ...T, postcode: i(g) })))
2384
- }, null, 8, ["model-value", "label", "rules"])
2385
- ])
2386
- ]),
2387
- $("div", Ho, [
2388
- $("div", zo, [
2389
- N(v, {
2390
- "model-value": o.value.state,
2391
- label: _(r)("settings.address.state"),
2392
- "label-mark": "required",
2393
- rules: [_(fe)],
2394
- "onUpdate:modelValue": u[4] || (u[4] = (g) => f((T) => ({ ...T, state: i(g) })))
2395
- }, null, 8, ["model-value", "label", "rules"])
2396
- ]),
2397
- $("div", Xo, [
2398
- N(v, {
2399
- "model-value": o.value.country,
2400
- label: _(r)("settings.address.country"),
2401
- "label-mark": "required",
2402
- rules: [_(fe)],
2403
- "onUpdate:modelValue": u[5] || (u[5] = (g) => f((T) => ({ ...T, country: i(g) })))
2404
- }, null, 8, ["model-value", "label", "rules"])
2405
- ])
2406
- ])
2407
- ]);
2408
- };
2409
- }
2410
- });
2411
- function rr(t) {
2412
- return t.replace(/\s+/g, "").replace(/-/g, "");
2413
- }
2414
- class Wo {
2415
- constructor(e, r) {
2416
- He(this, "restaurant");
2417
- He(this, "data");
2418
- this.restaurant = e, this.data = r;
2419
- }
2420
- generateUrl(e) {
2421
- const r = e === "normal" ? mt().toISOString() : "photo";
2422
- return `restaurant/${this.restaurant.id}/${e}/${r}`;
2423
- }
2424
- async manageThumbnail() {
2425
- const { newThumbnailPhoto: e, thumbnailPhoto: r } = this.data;
2426
- if (e) {
2427
- const s = await me.update(this.generateUrl("thumbnail"), e, {
2428
- includedTime: !0
2429
- });
2430
- this.data.thumbnailPhoto = s;
2431
- return;
2432
- }
2433
- const n = this.restaurant.profile.thumbnailPhoto;
2434
- n && !r && (await me.delete(n), this.data.thumbnailPhoto = void 0);
2435
- }
2436
- async manageCover() {
2437
- const { newCoverPhoto: e, coverPhoto: r } = this.data;
2438
- if (e) {
2439
- const s = await me.update(this.generateUrl("cover"), e, {
2440
- includedTime: !0
2441
- });
2442
- this.data.coverPhoto = s;
2443
- return;
2444
- }
2445
- const n = this.restaurant.profile.coverPhoto;
2446
- n && !r && (await me.delete(n), this.data.coverPhoto = void 0);
2447
- }
2448
- async manageCarousels() {
2449
- const e = this.data.newPhotos || [];
2450
- for (const r of e) {
2451
- const n = await me.update(this.generateUrl("normal"), r);
2452
- this.data.photos = [...this.data.photos || [], n];
2453
- }
2454
- }
2455
- async run() {
2456
- return await this.manageThumbnail(), await this.manageCover(), await this.manageCarousels(), this.data;
2457
- }
2458
- }
2459
- async function nr(t, e) {
2460
- const r = new Wo(t, e);
2461
- await r.run(), await Ae.updateRestaurantProfile(t.id, r.data), await pe().readRestaurants();
2462
- }
2463
- const Jo = () => {
2464
- const t = pe();
2465
- return {
2466
- async createRestaurant(e, r, n) {
2467
- const s = await Ae.createRestaurant({
2468
- businessId: e,
2469
- features: [],
2470
- profile: r
2471
- });
2472
- n && await Ae.updateRestaurantAttributes(s.id, n), await nr(s, r), await Ae.createRestaurantFeature(s.id), await t.readRestaurants();
2473
- },
2474
- async updateRestaurantProfile(e, r) {
2475
- await nr(e, r);
2476
- }
2477
- };
2478
- }, Zo = { class: "flex justify-center" }, Qo = { class: "space-y-24" }, ei = { class: "space-y-24" }, ti = { class: "flex gap-16 xs:flex-col xs:gap-24" }, ri = { class: "flex-1" }, ni = { class: "flex-1" }, si = { class: "space-y-24" }, ai = { class: "space-y-24" }, oi = { class: "space-y-8" }, ii = { class: "space-y-24" }, sr = /* @__PURE__ */ re({
2479
- __name: "RestaurantForm",
2480
- props: {
2481
- restaurantId: {
2482
- type: String,
2483
- default: void 0
2484
- },
2485
- restaurant: {
2486
- type: Object
2487
- },
2488
- initialValue: {
2489
- type: Object,
2490
- default: void 0
2491
- },
2492
- enableFeedmeExpress: {
2493
- type: Boolean,
2494
- required: !0
2495
- }
2496
- },
2497
- setup(t, { expose: e }) {
2498
- var P;
2499
- const r = t, { restaurants: n, currentBusiness: s, restaurantAttributeSettings: o, enabledCountries: i } = pe(), f = dt(), d = fr(f), { copyTextToClipboard: u } = cr(), v = ae(!1), g = (x, w) => {
2500
- v.value = !v.value;
2501
- }, T = Y(() => {
2502
- var x;
2503
- return (x = r.restaurant) == null ? void 0 : x.profile;
2504
- }), c = ct(
2505
- T.value ? $e(T.value) : {
2506
- ...Qt(),
2507
- address: Oe(Qt().address),
2508
- legalName: "",
2509
- sstRegNo: "",
2510
- description: "",
2511
- url: "",
2512
- thumbnailPhoto: void 0,
2513
- coverPhoto: void 0,
2514
- newThumbnailPhoto: void 0,
2515
- newCoverPhoto: void 0,
2516
- newPhotos: [],
2517
- operatingHours: {
2518
- 0: {
2519
- enable: !1,
2520
- hours: []
2521
- },
2522
- 1: {
2523
- enable: !1,
2524
- hours: []
2525
- },
2526
- 2: {
2527
- enable: !1,
2528
- hours: []
2529
- },
2530
- 3: {
2531
- enable: !1,
2532
- hours: []
2533
- },
2534
- 4: {
2535
- enable: !1,
2536
- hours: []
2537
- },
2538
- 5: {
2539
- enable: !1,
2540
- hours: []
2541
- },
2542
- 6: {
2543
- enable: !1,
2544
- hours: []
2545
- }
2546
- }
2547
- }
2548
- ), b = "https://feedmedev.cc/", O = Y(() => pe().currentCountry.value), { t: y } = ve(), k = ae(
2549
- r.restaurantId ? y("settings.business.restaurant.form.title.update") : y("settings.business.restaurant.form.title.add")
2550
- ), V = ae(((P = r.restaurant) == null ? void 0 : P.customAttributes) || {});
2551
- async function I(x) {
2552
- Object.values(V.value).length !== 0 && await Ae.updateRestaurantAttributes(x, V.value);
2553
- }
2554
- const M = Y(() => Oe(c.address)), J = Y(() => M.value.formatted);
2555
- function Z(x) {
2556
- var w;
2557
- if (typeof x == "string") {
2558
- const L = (w = n.value.find((U) => U._id === x)) == null ? void 0 : w.profile.operatingHours;
2559
- L ? c.operatingHours = $e(L) : f.open({
2560
- title: y("settings.business.restaurant.form.sections.operation_hours.invalid"),
2561
- type: "error"
2562
- });
2563
- }
2564
- }
2565
- function D() {
2566
- const x = b + (c.url || r.restaurantId);
2567
- u(x);
2568
- }
2569
- function W() {
2570
- c.thumbnailPhoto = void 0, c.newThumbnailPhoto = void 0;
2571
- }
2572
- function a() {
2573
- c.coverPhoto = void 0, c.newCoverPhoto = void 0;
2574
- }
2575
- function l(x) {
2576
- c.newPhotos = c.newPhotos || [], c.newPhotos.push(x);
2577
- }
2578
- const h = Jo(), R = ft();
2579
- function S() {
2580
- var w, L;
2581
- !((w = T.value) != null && w.code) && ((L = c.code) == null ? void 0 : L.trim()) ? R.open({
2582
- title: y("settings.business.restaurant.codeConfirmation.title"),
2583
- message: y("settings.business.restaurant.codeConfirmation.message", {
2584
- name: c.name,
2585
- code: c.code
2586
- }),
2587
- primaryActions: {
2588
- text: y("common.ok"),
2589
- variant: "destructive",
2590
- close: !0
2591
- },
2592
- secondaryActions: {
2593
- text: y("common.cancel"),
2594
- close: !0
2595
- }
2596
- }).onPrimary(() => {
2597
- m();
2598
- }) : m();
2599
- }
2600
- function m() {
2601
- var x, w;
2602
- if (g(), r.restaurantId) {
2603
- if (!((x = s.value) != null && x.id))
2604
- return;
2605
- d.minor(async () => {
2606
- var L, U;
2607
- r.restaurant && (await I(r.restaurantId), await h.updateRestaurantProfile(r.restaurant, {
2608
- ...c,
2609
- url: ((L = c.url) == null ? void 0 : L.trim()) || null,
2610
- code: ((U = c.code) == null ? void 0 : U.trim()) || null,
2611
- phoneNo: rr(c.phoneNo)
2612
- }), y("settings.business.restaurant.form.message.updated"));
2613
- });
2614
- } else {
2615
- if (!((w = s.value) != null && w.id))
2616
- return;
2617
- d.minor(async () => {
2618
- var L, U;
2619
- await h.createRestaurant(
2620
- s.value.id,
2621
- {
2622
- ...c,
2623
- url: ((L = c.url) == null ? void 0 : L.trim()) || null,
2624
- code: ((U = c.code) == null ? void 0 : U.trim()) || null,
2625
- phoneNo: rr(c.phoneNo)
2626
- },
2627
- V.value
2628
- ), y("settings.business.restaurant.form.message.created");
2629
- });
2630
- }
2631
- }
2632
- const p = Y(() => ({
2633
- title: y("settings.business.restaurant.form.summary.title"),
2634
- items: [
2635
- {
2636
- name: y("settings.business.restaurant.form.summary.name"),
2637
- value: c.name
2638
- },
2639
- {
2640
- name: y("settings.business.restaurant.form.summary.legal_name"),
2641
- value: c.legalName
2642
- },
2643
- {
2644
- name: y("settings.business.restaurant.form.summary.contact"),
2645
- value: c.phoneNo
2646
- },
2647
- {
2648
- name: y("settings.business.restaurant.form.summary.address"),
2649
- value: J.value
2650
- }
2651
- ]
2652
- })), { isAtMost: E } = ur();
2653
- Y(() => E("sm"));
2654
- const A = ae(null), C = Qr(A);
2655
- return e({ trigger: g }), (x, w) => {
2656
- const L = q("FmTextField"), U = q("FmPhoneNumber"), X = q("FmTextarea"), H = q("FmButton");
2657
- return F(), B(oe, null, [
2658
- de(x.$slots, "trigger", kr(Vr({
2659
- trigger: g
2660
- }))),
2661
- N(Ln, {
2662
- title: k.value,
2663
- show: v.value,
2664
- "primary-action": { label: _(y)("common.save") },
2665
- "secondary-actions": [
2666
- { label: _(y)("settings.business.restaurant.actions.discard"), click: () => v.value = !1 }
2667
- ],
2668
- onOnPrimary: S,
2669
- onOnCancel: w[17] || (w[17] = (j) => v.value = !1)
2670
- }, {
2671
- "append-title": K(() => [
2672
- _(E)("sm") ? (F(), te(Tt, {
2673
- key: 0,
2674
- variant: "dialog",
2675
- title: p.value.title,
2676
- items: p.value.items
2677
- }, null, 8, ["title", "items"])) : ce("", !0)
2678
- ]),
2679
- default: K(() => [
2680
- $("div", Zo, [
2681
- $("div", {
2682
- ref_key: "formWrapper",
2683
- ref: A,
2684
- class: "py-24 pr-[400px] w-[1150px] xs:pr-0 sm:pr-0 xs:w-full"
2685
- }, [
2686
- _(E)("sm") ? ce("", !0) : (F(), te(Tt, {
2687
- key: 0,
2688
- class: "fixed",
2689
- style: Fe({
2690
- top: "85px",
2691
- left: _(C).right - 400 + "px"
2692
- }),
2693
- variant: "full",
2694
- title: p.value.title,
2695
- items: p.value.items
2696
- }, null, 8, ["style", "title", "items"])),
2697
- $("div", Qo, [
2698
- N(Re, {
2699
- title: _(y)("settings.business.restaurant.form.sections.basic_info.title")
2700
- }, {
2701
- default: K(() => {
2702
- var j, Q;
2703
- return [
2704
- $("div", ei, [
2705
- $("div", null, [
2706
- N(L, {
2707
- label: _(y)("settings.business.restaurant.form.sections.basic_info.code.label"),
2708
- modelValue: c.code,
2709
- "onUpdate:modelValue": w[0] || (w[0] = (z) => c.code = z),
2710
- "label-mark": "optional",
2711
- "helper-text": _(y)("settings.business.restaurant.form.sections.basic_info.code.helper"),
2712
- disabled: ((j = T.value) == null ? void 0 : j.code) !== void 0 && ((Q = T.value) == null ? void 0 : Q.code) !== null
2713
- }, null, 8, ["label", "modelValue", "helper-text", "disabled"])
2714
- ]),
2715
- $("div", null, [
2716
- N(L, {
2717
- label: _(y)("settings.business.restaurant.form.sections.basic_info.name.label"),
2718
- modelValue: c.name,
2719
- "onUpdate:modelValue": w[1] || (w[1] = (z) => c.name = z),
2720
- "label-mark": "required",
2721
- rules: [_(fe)]
2722
- }, null, 8, ["label", "modelValue", "rules"])
2723
- ]),
2724
- $("div", null, [
2725
- N(L, {
2726
- label: _(y)("settings.business.restaurant.form.sections.basic_info.legal_name.label"),
2727
- modelValue: c.legalName,
2728
- "onUpdate:modelValue": w[2] || (w[2] = (z) => c.legalName = z),
2729
- "label-mark": "required",
2730
- rules: [_(fe)]
2731
- }, null, 8, ["label", "modelValue", "rules"])
2732
- ]),
2733
- $("div", null, [
2734
- N(L, {
2735
- label: _(y)("settings.business.restaurant.form.sections.basic_info.reg_no.label"),
2736
- modelValue: c.regNo,
2737
- "onUpdate:modelValue": w[3] || (w[3] = (z) => c.regNo = z),
2738
- "label-mark": "required",
2739
- rules: [_(fe)]
2740
- }, null, 8, ["label", "modelValue", "rules"])
2741
- ]),
2742
- $("div", null, [
2743
- N(L, {
2744
- modelValue: c.sstRegNo,
2745
- "onUpdate:modelValue": w[4] || (w[4] = (z) => c.sstRegNo = z),
2746
- label: _(y)("settings.business.restaurant.form.sections.basic_info.tax_no.label"),
2747
- "label-mark": "optional"
2748
- }, null, 8, ["modelValue", "label"])
2749
- ]),
2750
- $("div", ti, [
2751
- $("div", ri, [
2752
- N(U, {
2753
- class: "w-full",
2754
- label: _(y)("settings.business.restaurant.form.sections.basic_info.contact.label"),
2755
- modelValue: c.phoneNo,
2756
- "onUpdate:modelValue": w[5] || (w[5] = (z) => c.phoneNo = z),
2757
- "label-mark": "optional",
2758
- "extra-country-codes": _(i)
2759
- }, null, 8, ["label", "modelValue", "extra-country-codes"])
2760
- ]),
2761
- $("div", ni, [
2762
- N(L, {
2763
- class: "w-full",
2764
- modelValue: c.email,
2765
- "onUpdate:modelValue": w[6] || (w[6] = (z) => c.email = z),
2766
- label: _(y)("settings.business.restaurant.form.sections.basic_info.email.label"),
2767
- "label-mark": "optional"
2768
- }, null, 8, ["modelValue", "label"])
2769
- ])
2770
- ]),
2771
- $("div", null, [
2772
- N(ye, {
2773
- label: _(y)("settings.business.restaurant.form.sections.basic_info.image.label"),
2774
- "sub-label": _(y)("settings.business.restaurant.form.sections.basic_info.image.optional"),
2775
- "previous-url": c.thumbnailPhoto,
2776
- modelValue: c.newThumbnailPhoto,
2777
- "onUpdate:modelValue": w[7] || (w[7] = (z) => c.newThumbnailPhoto = z),
2778
- "onReset:modelValue": W
2779
- }, null, 8, ["label", "sub-label", "previous-url", "modelValue"])
2780
- ])
2781
- ])
2782
- ];
2783
- }),
2784
- _: 1
2785
- }, 8, ["title"]),
2786
- _(o).length > 0 ? (F(), B(oe, { key: 0 }, [
2787
- w[18] || (w[18] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
2788
- N(Re, {
2789
- title: _(y)("settings.restaurantTagging.title"),
2790
- "sub-title": _(y)("settings.restaurantTagging.subtitle")
2791
- }, {
2792
- default: K(() => [
2793
- N(_(jr), {
2794
- entity: "restaurant",
2795
- modelValue: V.value,
2796
- "onUpdate:modelValue": w[8] || (w[8] = (j) => V.value = j)
2797
- }, null, 8, ["modelValue"])
2798
- ]),
2799
- _: 1
2800
- }, 8, ["title", "sub-title"])
2801
- ], 64)) : ce("", !0),
2802
- w[19] || (w[19] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
2803
- N(Re, {
2804
- title: _(y)("settings.business.restaurant.form.sections.address.title")
2805
- }, {
2806
- default: K(() => [
2807
- $("div", si, [
2808
- N(Yo, {
2809
- modelValue: c.address,
2810
- "onUpdate:modelValue": w[9] || (w[9] = (j) => c.address = j)
2811
- }, null, 8, ["modelValue"]),
2812
- N(xo, {
2813
- address: M.value,
2814
- modelValue: c.address.coordinates,
2815
- "onUpdate:modelValue": w[10] || (w[10] = (j) => c.address.coordinates = j)
2816
- }, null, 8, ["address", "modelValue"])
2817
- ])
2818
- ]),
2819
- _: 1
2820
- }, 8, ["title"]),
2821
- w[20] || (w[20] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
2822
- N(Re, {
2823
- title: _(y)("settings.business.restaurant.form.sections.operation_hours.title")
2824
- }, {
2825
- default: K(() => [
2826
- $("div", ai, [
2827
- $("div", oi, [
2828
- N(St, {
2829
- label: _(y)("settings.business.restaurant.form.sections.operation_hours.copy_with"),
2830
- optional: !1
2831
- }, null, 8, ["label"]),
2832
- N(Dr, {
2833
- class: "w-[320px]",
2834
- "exclude-restaurants": t.restaurantId ? [t.restaurantId] : [],
2835
- "model-value": "",
2836
- "onUpdate:modelValue": w[11] || (w[11] = (j) => Z(j))
2837
- }, null, 8, ["exclude-restaurants"]),
2838
- N(jo, {
2839
- modelValue: c.operatingHours,
2840
- "onUpdate:modelValue": w[12] || (w[12] = (j) => c.operatingHours = j)
2841
- }, null, 8, ["modelValue"])
2842
- ])
2843
- ])
2844
- ]),
2845
- _: 1
2846
- }, 8, ["title"]),
2847
- w[21] || (w[21] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
2848
- N(Re, {
2849
- title: _(y)("settings.business.restaurant.form.sections.branding.title")
2850
- }, {
2851
- default: K(() => [
2852
- $("div", ii, [
2853
- N(X, {
2854
- label: _(y)("settings.business.restaurant.form.sections.branding.description"),
2855
- "model-value": c.description ?? "",
2856
- "onUpdate:modelValue": w[13] || (w[13] = (j) => c.description = j)
2857
- }, null, 8, ["label", "model-value"]),
2858
- N(L, {
2859
- label: _(y)("settings.business.restaurant.form.sections.branding.url.label"),
2860
- placeholder: t.restaurantId,
2861
- "model-value": c.url,
2862
- "onUpdate:modelValue": w[14] || (w[14] = (j) => c.url = j),
2863
- rules: [
2864
- (j) => {
2865
- var Q;
2866
- return !j || ((Q = T.value) == null ? void 0 : Q.url) == c.url || O.value == _(pt.F_COUNTRY).enum.MY || _(y)("settings.business.restaurant.form.sections.branding.url.errors.disabled");
2867
- },
2868
- (j) => !j || _(pr).test(j) || _(y)("settings.business.restaurant.form.sections.branding.url.errors.invalid"),
2869
- (j) => !j || !_(hr).includes(j) || _(y)("settings.business.restaurant.form.sections.branding.url.errors.reserved")
2870
- ]
2871
- }, {
2872
- prepend: K(() => [
2873
- $("span", null, G(b))
2874
- ]),
2875
- append: K(() => [
2876
- N(H, {
2877
- variant: "tertiary",
2878
- icon: "file_copy",
2879
- "text-color": "neutral-gray-400",
2880
- onClick: D
2881
- })
2882
- ]),
2883
- _: 1
2884
- }, 8, ["label", "placeholder", "model-value", "rules"]),
2885
- $("div", null, [
2886
- N(ye, {
2887
- label: _(y)("settings.business.form.cover_photo.label"),
2888
- "previous-url": c.coverPhoto,
2889
- modelValue: c.newCoverPhoto,
2890
- "onUpdate:modelValue": w[15] || (w[15] = (j) => c.newCoverPhoto = j),
2891
- "onReset:modelValue": a
2892
- }, null, 8, ["label", "previous-url", "modelValue"])
2893
- ]),
2894
- $("div", null, [
2895
- N(St, {
2896
- label: _(y)("settings.business.restaurant.form.sections.branding.carousel_photos.label")
2897
- }, null, 8, ["label"]),
2898
- (F(!0), B(oe, null, he(c.photos || [], (j, Q) => (F(), te(ye, {
2899
- key: Q,
2900
- "previous-url": j,
2901
- "model-value": void 0,
2902
- "onReset:modelValue": (z) => {
2903
- var we;
2904
- return (we = c.photos) == null ? void 0 : we.splice(Q, 1);
2905
- }
2906
- }, null, 8, ["previous-url", "onReset:modelValue"]))), 128)),
2907
- (F(!0), B(oe, null, he(c.newPhotos || [], (j, Q) => {
2908
- var z;
2909
- return F(), te(ye, {
2910
- key: Q,
2911
- "model-value": ((z = c.newPhotos) == null ? void 0 : z[Q]) || void 0,
2912
- "previous-url": void 0,
2913
- "onReset:modelValue": (we) => {
2914
- var wt;
2915
- return (wt = c.photos) == null ? void 0 : wt.splice(Q, 1);
2916
- }
2917
- }, null, 8, ["model-value", "onReset:modelValue"]);
2918
- }), 128)),
2919
- N(ye, {
2920
- "model-value": void 0,
2921
- "previous-url": void 0,
2922
- "onUpdate:modelValue": w[16] || (w[16] = (j) => l(j))
2923
- })
2924
- ])
2925
- ])
2926
- ]),
2927
- _: 1
2928
- }, 8, ["title"])
2929
- ])
2930
- ], 512)
2931
- ])
2932
- ]),
2933
- _: 1
2934
- }, 8, ["title", "show", "primary-action", "secondary-actions"])
2935
- ], 64);
2936
- };
2937
- }
2938
- }), li = (t) => {
2939
- const e = ae(t || "");
2940
- function r(o) {
2941
- return `${o}`.trim().toLowerCase();
2942
- }
2943
- const n = Y(() => r(e.value));
2944
- function s(o) {
2945
- return n.value ? o.some((i) => r(i).includes(n.value)) : !0;
2946
- }
2947
- return { searchKey: e, filter: s };
2948
- };
2949
- var Ir = { exports: {} };
2950
- (function(t, e) {
2951
- (function(r, n) {
2952
- t.exports = n();
2953
- })(qr, function() {
2954
- return function(r) {
2955
- var n = {};
2956
- function s(o) {
2957
- if (n[o])
2958
- return n[o].exports;
2959
- var i = n[o] = { i: o, l: !1, exports: {} };
2960
- return r[o].call(i.exports, i, i.exports, s), i.l = !0, i.exports;
2961
- }
2962
- return s.m = r, s.c = n, s.d = function(o, i, f) {
2963
- s.o(o, i) || Object.defineProperty(o, i, { enumerable: !0, get: f });
2964
- }, s.r = function(o) {
2965
- typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(o, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(o, "__esModule", { value: !0 });
2966
- }, s.t = function(o, i) {
2967
- if (1 & i && (o = s(o)), 8 & i || 4 & i && typeof o == "object" && o && o.__esModule)
2968
- return o;
2969
- var f = /* @__PURE__ */ Object.create(null);
2970
- if (s.r(f), Object.defineProperty(f, "default", { enumerable: !0, value: o }), 2 & i && typeof o != "string")
2971
- for (var d in o)
2972
- s.d(
2973
- f,
2974
- d,
2975
- (function(u) {
2976
- return o[u];
2977
- }).bind(null, d)
2978
- );
2979
- return f;
2980
- }, s.n = function(o) {
2981
- var i = o && o.__esModule ? function() {
2982
- return o.default;
2983
- } : function() {
2984
- return o;
2985
- };
2986
- return s.d(i, "a", i), i;
2987
- }, s.o = function(o, i) {
2988
- return Object.prototype.hasOwnProperty.call(o, i);
2989
- }, s.p = "", s(s.s = 0);
2990
- }([
2991
- function(r, n, s) {
2992
- r.exports = s(1);
2993
- },
2994
- function(r, n, s) {
2995
- function o(a) {
2996
- return (o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(l) {
2997
- return typeof l;
2998
- } : function(l) {
2999
- return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l;
3000
- })(a);
3001
- }
3002
- function i(a) {
3003
- var l = "[object " + a + "]";
3004
- return function(h) {
3005
- return Object.prototype.toString.call(h) === l;
3006
- };
3007
- }
3008
- s.r(n), s.d(n, "default", function() {
3009
- return Z;
3010
- }), s.d(n, "compare", function() {
3011
- return D;
3012
- }), s.d(n, "comparable", function() {
3013
- return W;
3014
- });
3015
- var f = i("Array"), d = i("Object"), u = i("Function");
3016
- function v(a, l) {
3017
- return u(a.get) ? a.get(l) : a[l];
3018
- }
3019
- function g(a) {
3020
- return function(l, h) {
3021
- if (!f(h) || !h.length)
3022
- return a(l, h);
3023
- for (var R = 0, S = h.length; R < S; R++)
3024
- if (a(l, v(h, R)))
3025
- return !0;
3026
- return !1;
3027
- };
3028
- }
3029
- function T(a) {
3030
- return function(l, h) {
3031
- if (!f(h) || !h.length)
3032
- return a(l, h);
3033
- for (var R = 0, S = h.length; R < S; R++)
3034
- if (!a(l, v(h, R)))
3035
- return !1;
3036
- return !0;
3037
- };
3038
- }
3039
- function c(a, l, h, R) {
3040
- return a.validate(a.options, l, h, R);
3041
- }
3042
- var b = {
3043
- $eq: g(function(a, l) {
3044
- return a(l);
3045
- }),
3046
- $ne: T(function(a, l) {
3047
- return a(l);
3048
- }),
3049
- $gt: g(function(a, l) {
3050
- return a(l);
3051
- }),
3052
- $gte: g(function(a, l) {
3053
- return a(l);
3054
- }),
3055
- $lt: g(function(a, l) {
3056
- return a(l);
3057
- }),
3058
- $lte: g(function(a, l) {
3059
- return a(l);
3060
- }),
3061
- $mod: g(function(a, l) {
3062
- return a(l);
3063
- }),
3064
- $in: function(a, l) {
3065
- return a(l);
3066
- },
3067
- $nin: function(a, l) {
3068
- return a(l);
3069
- },
3070
- $not: function(a, l, h, R) {
3071
- return a(l, h, R);
3072
- },
3073
- $type: function(a, l) {
3074
- return a(l);
3075
- },
3076
- $all: function(a, l, h, R) {
3077
- return b.$and(a, l, h, R);
3078
- },
3079
- $size: function(a, l) {
3080
- return !!l && a === l.length;
3081
- },
3082
- $or: function(a, l, h, R) {
3083
- for (var S = 0, m = a.length; S < m; S++)
3084
- if (c(v(a, S), l, h, R))
3085
- return !0;
3086
- return !1;
3087
- },
3088
- $nor: function(a, l, h, R) {
3089
- return !b.$or(a, l, h, R);
3090
- },
3091
- $and: function(a, l, h, R) {
3092
- for (var S = 0, m = a.length; S < m; S++)
3093
- if (!c(v(a, S), l, h, R))
3094
- return !1;
3095
- return !0;
3096
- },
3097
- $regex: g(function(a, l) {
3098
- return typeof l == "string" && a.test(l);
3099
- }),
3100
- $where: function(a, l, h, R) {
3101
- return a.call(l, l, h, R);
3102
- },
3103
- $elemMatch: function(a, l, h, R) {
3104
- return f(l) ? !!~function(S, m) {
3105
- for (var p = 0; p < S.length; p++)
3106
- if (v(S, p), c(m, v(S, p)))
3107
- return p;
3108
- return -1;
3109
- }(l, a) : c(a, l, h, R);
3110
- },
3111
- $exists: function(a, l, h, R) {
3112
- return R.hasOwnProperty(h) === a;
3113
- }
3114
- }, O = {
3115
- $eq: function(a, l, h) {
3116
- var R = h.comparable, S = h.compare;
3117
- return a instanceof RegExp ? g(function(m) {
3118
- return typeof m == "string" && a.test(m);
3119
- }) : a instanceof Function ? g(a) : f(a) && !a.length ? g(function(m) {
3120
- return f(m) && !m.length;
3121
- }) : g(
3122
- a === null ? function(m) {
3123
- return m == null;
3124
- } : function(m) {
3125
- return S(R(m), R(a)) === 0;
3126
- }
3127
- );
3128
- },
3129
- $gt: function(a, l, h) {
3130
- var R = h.comparable, S = h.compare;
3131
- return function(m) {
3132
- return S(R(m), R(a)) > 0;
3133
- };
3134
- },
3135
- $gte: function(a, l, h) {
3136
- var R = h.comparable, S = h.compare;
3137
- return function(m) {
3138
- return S(R(m), R(a)) >= 0;
3139
- };
3140
- },
3141
- $lt: function(a, l, h) {
3142
- var R = h.comparable, S = h.compare;
3143
- return function(m) {
3144
- return S(R(m), R(a)) < 0;
3145
- };
3146
- },
3147
- $lte: function(a, l, h) {
3148
- var R = h.comparable, S = h.compare;
3149
- return function(m) {
3150
- return S(R(m), R(a)) <= 0;
3151
- };
3152
- },
3153
- $in: function(a, l, h) {
3154
- var R = h.comparable;
3155
- return function(S) {
3156
- if (!(S instanceof Array)) {
3157
- var m = R(S);
3158
- if (m === S && o(S) === "object") {
3159
- for (E = a.length; E--; )
3160
- if (String(a[E]) === String(S) && String(S) !== "[object Object]")
3161
- return !0;
3162
- }
3163
- if (m === void 0) {
3164
- for (E = a.length; E--; )
3165
- if (a[E] == null)
3166
- return !0;
3167
- }
3168
- for (E = a.length; E--; ) {
3169
- var p = c(J(v(a, E), h), m, E, a);
3170
- if (p && String(p) !== "[object Object]" && String(m) !== "[object Object]")
3171
- return !0;
3172
- }
3173
- return !!~a.indexOf(m);
3174
- }
3175
- for (var E = S.length; E--; )
3176
- if (~a.indexOf(R(v(S, E))))
3177
- return !0;
3178
- return !1;
3179
- };
3180
- },
3181
- $nin: function(a, l, h) {
3182
- var R = O.$in(a, l, h);
3183
- return function(S, m, p, E) {
3184
- return !R(S, m, p, E);
3185
- };
3186
- },
3187
- $mod: function(a) {
3188
- return function(l) {
3189
- return l % a[0] == a[1];
3190
- };
3191
- },
3192
- $ne: function(a, l, h) {
3193
- var R = O.$eq(a, l, h);
3194
- return T(function(S, m, p, E) {
3195
- return !R(S, m, p, E);
3196
- });
3197
- },
3198
- $and: function(a, l, h) {
3199
- return a.map(I(h));
3200
- },
3201
- $all: function(a, l, h) {
3202
- return O.$and(a, l, h);
3203
- },
3204
- $or: function(a, l, h) {
3205
- return a.map(I(h));
3206
- },
3207
- $nor: function(a, l, h) {
3208
- return a.map(I(h));
3209
- },
3210
- $not: function(a, l, h) {
3211
- var R = I(h)(a);
3212
- return function(S, m, p) {
3213
- return !c(R, S, m, p);
3214
- };
3215
- },
3216
- $type: function(a) {
3217
- return function(l, h, R) {
3218
- return l != null && (l instanceof a || l.constructor == a);
3219
- };
3220
- },
3221
- $regex: function(a, l) {
3222
- return new RegExp(a, l.$options);
3223
- },
3224
- $where: function(a) {
3225
- if (typeof a == "function")
3226
- return a;
3227
- throw new Error(
3228
- 'In CSP mode, sift does not support strings in "$where" condition'
3229
- );
3230
- },
3231
- $elemMatch: function(a, l, h) {
3232
- return I(h)(a);
3233
- },
3234
- $exists: function(a) {
3235
- return !!a;
3236
- }
3237
- };
3238
- function y(a, l) {
3239
- return { options: a, validate: l };
3240
- }
3241
- function k(a, l) {
3242
- var h = a.keyPath, R = a.child, S = a.query, m = [];
3243
- if (function w(L, U, X, H, j) {
3244
- if (X === U.length || L == null)
3245
- return void j.push([L, U[X - 1], H]);
3246
- var Q = v(U, X);
3247
- if (f(L) && isNaN(Number(Q)))
3248
- for (var z = 0, we = L.length; z < we; z++)
3249
- w(v(L, z), U, X, L, j);
3250
- else
3251
- w(v(L, Q), U, X + 1, L, j);
3252
- }(l, h, 0, l, m), m.length === 1) {
3253
- var p = m[0];
3254
- return c(R, p[0], p[1], p[2]);
3255
- }
3256
- for (var E = S && S.$ne !== void 0, A = E, C = 0; C < m.length; C++) {
3257
- var P = m[C], x = c(R, P[0], P[1], P[2]);
3258
- E ? A &= x : A |= x;
3259
- }
3260
- return A;
3261
- }
3262
- function V(a, l, h) {
3263
- return y({ keyPath: a, child: l, query: h }, k);
3264
- }
3265
- function I(a) {
3266
- var l = a.comparable, h = a.expressions, R = function(p) {
3267
- var E;
3268
- return (!p || !(E = p) || E.constructor !== Object && E.constructor !== Array && E.constructor.toString() !== "function Object() { [native code] }" && E.constructor.toString() !== "function Array() { [native code] }" || E.toJSON) && (p = { $eq: p }), p;
3269
- }, S = function(p) {
3270
- p = l(p);
3271
- var E = [];
3272
- for (var A in p) {
3273
- var C = p[A];
3274
- if (A !== "$options") {
3275
- var P = b[A] || a && h && h[A];
3276
- if (P)
3277
- O[A] && (C = O[A](C, p, a)), E.push(y(l(C), P));
3278
- else {
3279
- if (A.charCodeAt(0) === 36)
3280
- throw new Error("Unknown operation " + A);
3281
- var x = A.split(".");
3282
- E.push(V(x, m(C), C));
3283
- }
3284
- }
3285
- }
3286
- return E.length === 1 ? E[0] : y(E, b.$and);
3287
- }, m = function(p) {
3288
- return p = R(p), function E(A, C) {
3289
- if (!d(A))
3290
- return C;
3291
- for (var P in A)
3292
- C.push(P), E(A[P], C);
3293
- return C;
3294
- }(p, []).join(",").search(/[$.]/) === -1 ? y(p, M) : S(p);
3295
- };
3296
- return function(p) {
3297
- return S(R(p));
3298
- };
3299
- }
3300
- function M(a, l) {
3301
- if (Object.prototype.toString.call(a) !== Object.prototype.toString.call(l))
3302
- return !1;
3303
- if (d(a)) {
3304
- if (Object.keys(a).length !== Object.keys(l).length)
3305
- return !1;
3306
- for (var h in a)
3307
- if (!M(a[h], l[h]))
3308
- return !1;
3309
- return !0;
3310
- }
3311
- if (f(a)) {
3312
- if (a.length !== l.length)
3313
- return !1;
3314
- for (var R = 0, S = a.length; R < S; R++)
3315
- if (!M(a[R], l[R]))
3316
- return !1;
3317
- return !0;
3318
- }
3319
- return a === l;
3320
- }
3321
- function J(a, l) {
3322
- var h = I(l)(a);
3323
- return l && l.select && (h = {
3324
- options: h,
3325
- validate: function(R, S, m, p) {
3326
- return c(R, S && l.select(S), m, p);
3327
- }
3328
- }), h;
3329
- }
3330
- function Z(a, l) {
3331
- var h = J(a, l = Object.assign({ compare: D, comparable: W }, l));
3332
- return function(R, S, m) {
3333
- return c(h, R, S, m);
3334
- };
3335
- }
3336
- function D(a, l) {
3337
- if (M(a, l))
3338
- return 0;
3339
- if (o(a) === o(l)) {
3340
- if (a > l)
3341
- return 1;
3342
- if (a < l)
3343
- return -1;
3344
- }
3345
- }
3346
- function W(a) {
3347
- return a instanceof Date ? a.getTime() : f(a) ? a.map(W) : a && typeof a.toJSON == "function" ? a.toJSON() : a;
3348
- }
3349
- }
3350
- ]);
3351
- });
3352
- })(Ir);
3353
- var ui = Ir.exports;
3354
- const ci = /* @__PURE__ */ dr(ui);
3355
- function ar(t, e) {
3356
- for (var r = 0; r < e.length; r++) {
3357
- var n = e[r];
3358
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
3359
- }
3360
- }
3361
- function di(t, e, r) {
3362
- return e && ar(t.prototype, e), r && ar(t, r), t;
3363
- }
3364
- function fi(t, e) {
3365
- t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
3366
- }
3367
- function it(t) {
3368
- return it = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
3369
- return r.__proto__ || Object.getPrototypeOf(r);
3370
- }, it(t);
3371
- }
3372
- function Ue(t, e) {
3373
- return Ue = Object.setPrototypeOf || function(n, s) {
3374
- return n.__proto__ = s, n;
3375
- }, Ue(t, e);
3376
- }
3377
- function mi() {
3378
- if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
3379
- return !1;
3380
- if (typeof Proxy == "function")
3381
- return !0;
3382
- try {
3383
- return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
3384
- })), !0;
3385
- } catch {
3386
- return !1;
3387
- }
3388
- }
3389
- function ke(t, e, r) {
3390
- return mi() ? ke = Reflect.construct : ke = function(s, o, i) {
3391
- var f = [null];
3392
- f.push.apply(f, o);
3393
- var d = Function.bind.apply(s, f), u = new d();
3394
- return i && Ue(u, i.prototype), u;
3395
- }, ke.apply(null, arguments);
3396
- }
3397
- function pi(t) {
3398
- return Function.toString.call(t).indexOf("[native code]") !== -1;
3399
- }
3400
- function lt(t) {
3401
- var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
3402
- return lt = function(n) {
3403
- if (n === null || !pi(n))
3404
- return n;
3405
- if (typeof n != "function")
3406
- throw new TypeError("Super expression must either be null or a function");
3407
- if (typeof e < "u") {
3408
- if (e.has(n))
3409
- return e.get(n);
3410
- e.set(n, s);
3411
- }
3412
- function s() {
3413
- return ke(n, arguments, it(this).constructor);
3414
- }
3415
- return s.prototype = Object.create(n.prototype, {
3416
- constructor: {
3417
- value: s,
3418
- enumerable: !1,
3419
- writable: !0,
3420
- configurable: !0
3421
- }
3422
- }), Ue(s, n);
3423
- }, lt(t);
3424
- }
3425
- function or(t) {
3426
- if (t === void 0)
3427
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3428
- return t;
3429
- }
3430
- var Ar = function(e) {
3431
- return 'Cannot execute "' + e.action + '" on "' + e.subjectName + '"';
3432
- }, xe = Ar, hi = /* @__PURE__ */ function(t) {
3433
- fi(e, t), e.setDefaultMessage = function(s) {
3434
- s === null ? xe = Ar : xe = typeof s == "string" ? function() {
3435
- return s;
3436
- } : s;
3437
- }, e.from = function(s) {
3438
- var o = new this("");
3439
- return Object.defineProperty(o, "ability", {
3440
- value: s
3441
- }), o;
3442
- };
3443
- function e(n, s) {
3444
- var o;
3445
- return s === void 0 && (s = {}), o = t.call(this, n) || this, o._setMetadata(s), o.message = n || xe(or(o)), o._customMessage = null, typeof Error.captureStackTrace == "function" && (o.name = o.constructor.name, Error.captureStackTrace(or(o), o.constructor)), o;
3446
- }
3447
- var r = e.prototype;
3448
- return r.setMessage = function(s) {
3449
- return this._customMessage = s, this;
3450
- }, r.throwUnlessCan = function(s, o, i) {
3451
- if (!this.ability)
3452
- throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
3453
- var f = this.ability.relevantRuleFor(s, o, i);
3454
- if (!(f && !f.inverted)) {
3455
- this._setMetadata({
3456
- action: s,
3457
- subject: o,
3458
- field: i,
3459
- subjectName: this.ability.subjectName(o)
3460
- });
3461
- var d = f ? f.reason : "";
3462
- throw this.message = this._customMessage || d || xe(this), this;
3463
- }
3464
- }, r._setMetadata = function(s) {
3465
- this.subject = s.subject, this.subjectName = s.subjectName, this.action = s.action, this.field = s.field;
3466
- }, e;
3467
- }(lt(Error));
3468
- function ut(t) {
3469
- return Array.isArray(t) ? t : [t];
3470
- }
3471
- function vi(t) {
3472
- if (!t || typeof t == "string")
3473
- return t;
3474
- var e = typeof t == "object" ? t.constructor : t;
3475
- return e.modelName || e.name;
3476
- }
3477
- function gi(t) {
3478
- return JSON.parse(JSON.stringify(t));
3479
- }
3480
- var bi = /[-/\\^$+?.()|[\]{}]/g, yi = /\.?\*+\.?/g, $i = /\*+/, _i = /\./g;
3481
- function Ei(t, e, r) {
3482
- var n = r[0] === "*" || t[0] === "." && t[t.length - 1] === "." ? "+" : "*", s = t.indexOf("**") === -1 ? "[^.]" : ".", o = t.replace(_i, "\\$&").replace($i, s + n);
3483
- return e + t.length === r.length ? "(?:" + o + ")?" : o;
3484
- }
3485
- function wi(t, e, r) {
3486
- return t === "." && (r[e - 1] === "*" || r[e + 1] === "*") ? t : "\\" + t;
3487
- }
3488
- function Ri(t) {
3489
- var e = t.map(function(n) {
3490
- return n.replace(bi, wi).replace(yi, Ei);
3491
- }), r = e.length > 1 ? "(?:" + e.join("|") + ")" : e[0];
3492
- return new RegExp("^" + r + "$");
3493
- }
3494
- var Ii = /* @__PURE__ */ function() {
3495
- function t(r) {
3496
- this.actions = r.actions || r.action, this.subject = r.subject, this.fields = !r.fields || r.fields.length === 0 ? void 0 : ut(r.fields), Object.defineProperty(this, "_fieldsPattern", {
3497
- writable: !0
3498
- }), this.inverted = !!r.inverted, this.conditions = r.conditions, Object.defineProperty(this, "_matches", {
3499
- writable: !0,
3500
- value: this.conditions ? ci(this.conditions) : void 0
3501
- }), this.reason = r.reason;
3502
- }
3503
- var e = t.prototype;
3504
- return e.matches = function(n) {
3505
- return this._matches ? typeof n == "string" ? !this.inverted : this._matches(n) : !0;
3506
- }, e.isRelevantFor = function(n, s) {
3507
- return this.fields ? s ? this.matchesField(s) : !this.inverted : !0;
3508
- }, e.matchesField = function(n) {
3509
- return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Ri(this.fields)), this._fieldsPattern === null || n.indexOf("*") !== -1 ? this.fields.indexOf(n) !== -1 : this._fieldsPattern.test(n);
3510
- }, t;
3511
- }(), se = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), ir = {
3512
- crud: ["create", "read", "update", "delete"]
3513
- };
3514
- function lr(t, e) {
3515
- return t === e || Array.isArray(e) && e.indexOf(t) !== -1;
3516
- }
3517
- var Ai = /* @__PURE__ */ function() {
3518
- t.addAlias = function(n, s) {
3519
- if (n === "manage" || lr("manage", s))
3520
- throw new Error('Cannot add alias for "manage" action because it represents any action');
3521
- if (lr(n, s))
3522
- throw new Error("Attempt to alias action to itself: " + n + " -> " + s.toString());
3523
- return ir[n] = s, this;
3524
- };
3525
- function t(r, n) {
3526
- n === void 0 && (n = {}), Object.defineProperty(this, "subjectName", {
3527
- value: n.subjectName || vi
3528
- }), this[se] = {
3529
- RuleType: n.RuleType || Ii,
3530
- originalRules: r || [],
3531
- hasPerFieldRules: !1,
3532
- indexedRules: /* @__PURE__ */ Object.create(null),
3533
- mergedRules: /* @__PURE__ */ Object.create(null),
3534
- events: {},
3535
- aliases: gi(ir)
3536
- }, this.update(r);
3537
- }
3538
- var e = t.prototype;
3539
- return e.update = function(n) {
3540
- if (!Array.isArray(n))
3541
- return this;
3542
- var s = {
3543
- rules: n,
3544
- ability: this
3545
- };
3546
- this.emit("update", s), this[se].originalRules = n.slice(0), this[se].mergedRules = /* @__PURE__ */ Object.create(null);
3547
- var o = this.buildIndexFor(n);
3548
- return process.env.NODE_ENV !== "production" && o.isAllInverted && n.length && console.warn("[casl]: Ability contains only inverted rules. That means user will not be able to do any actions. This will be changed to Error throw in the next major version"), this[se].indexedRules = o.rules, this[se].hasPerFieldRules = o.hasPerFieldRules, this.emit("updated", s), this;
3549
- }, e.buildIndexFor = function(n) {
3550
- for (var s = /* @__PURE__ */ Object.create(null), o = this[se].RuleType, i = !0, f = !1, d = 0; d < n.length; d++) {
3551
- var u = new o(n[d]), v = this.expandActions(u.actions), g = ut(u.subject), T = n.length - d - 1;
3552
- i = !!(i && u.inverted), !f && u.fields && (f = !0);
3553
- for (var c = 0; c < g.length; c++) {
3554
- var b = g[c];
3555
- s[b] = s[b] || /* @__PURE__ */ Object.create(null);
3556
- for (var O = 0; O < v.length; O++) {
3557
- var y = v[O];
3558
- s[b][y] = s[b][y] || /* @__PURE__ */ Object.create(null), s[b][y][T] = u;
3559
- }
3560
- }
3561
- }
3562
- return {
3563
- isAllInverted: i,
3564
- hasPerFieldRules: f,
3565
- rules: s
3566
- };
3567
- }, e.expandActions = function(n) {
3568
- for (var s = this[se].aliases, o = ut(n), i = 0; i < o.length; ) {
3569
- var f = o[i++];
3570
- s.hasOwnProperty(f) && (o = o.concat(s[f]));
3571
- }
3572
- return o;
3573
- }, e.can = function(n, s, o) {
3574
- if (o && typeof o != "string")
3575
- throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
3576
- var i = this.relevantRuleFor(n, s, o);
3577
- return !!i && !i.inverted;
3578
- }, e.relevantRuleFor = function(n, s, o) {
3579
- for (var i = this.rulesFor(n, s, o), f = 0; f < i.length; f++)
3580
- if (i[f].matches(s))
3581
- return i[f];
3582
- return null;
3583
- }, e.possibleRulesFor = function(n, s) {
3584
- var o = this.subjectName(s), i = this[se].mergedRules, f = o + "_" + n;
3585
- return i[f] || (i[f] = this.mergeRulesFor(n, o)), i[f];
3586
- }, e.mergeRulesFor = function(n, s) {
3587
- var o = this[se].indexedRules, i = [s, "all"].reduce(function(f, d) {
3588
- var u = o[d];
3589
- return u ? Object.assign(f, u[n], u.manage) : f;
3590
- }, []);
3591
- return i.filter(Boolean);
3592
- }, e.rulesFor = function(n, s, o) {
3593
- var i = this.possibleRulesFor(n, s);
3594
- return this[se].hasPerFieldRules ? i.filter(function(f) {
3595
- return f.isRelevantFor(s, o);
3596
- }) : i;
3597
- }, e.cannot = function() {
3598
- return !this.can.apply(this, arguments);
3599
- }, e.throwUnlessCan = function() {
3600
- var n;
3601
- console.warn(`
3602
- Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
3603
- Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
3604
- `.trim()), (n = hi.from(this)).throwUnlessCan.apply(n, arguments);
3605
- }, e.on = function(n, s) {
3606
- var o = this[se].events, i = !0;
3607
- return o[n] || (o[n] = []), o[n].push(s), function() {
3608
- if (i) {
3609
- var f = o[n].indexOf(s);
3610
- o[n].splice(f, 1), i = !1;
3611
- }
3612
- };
3613
- }, e.emit = function(n, s) {
3614
- var o = this[se].events[n];
3615
- o && o.slice(0).forEach(function(i) {
3616
- return i(s);
3617
- });
3618
- }, di(t, [{
3619
- key: "rules",
3620
- get: function() {
3621
- return this[se].originalRules;
3622
- }
3623
- }]), t;
3624
- }(), _e;
3625
- ((t) => {
3626
- ((e) => {
3627
- e[e.feedMe = 0] = "feedMe", e[e.business = 1] = "business", e[e.restaurant = 2] = "restaurant";
3628
- })(t.Level || (t.Level = {})), ((e) => {
3629
- e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete";
3630
- })(t.Action || (t.Action = {}));
3631
- })(_e || (_e = {}));
3632
- ((t) => {
3633
- ((e) => {
3634
- ((r) => {
3635
- r.all = "all", r.restaurant = "restaurant", r.business = "business", r.delivery = "delivery", r.agent = "agent";
3636
- })(e.Feedme || (e.Feedme = {})), ((r) => {
3637
- r.quota = "quota", r.owner = "owner";
3638
- })(e.FeedmeBusinessField || (e.FeedmeBusinessField = {})), ((r) => {
3639
- r.profile = "business::profile", r.restaurant = "business::restaurant", r.menu = "business::menu", r.promotion = "business::promotion", r.voucher = "business::voucher", r.membership = "business::membership", r.stock = "business::stock", r.permission = "business::permission", r.role = "business::role";
3640
- })(e.Business || (e.Business = {})), ((r) => {
3641
- r.restaurant = "restaurant";
3642
- })(e.Restaurant || (e.Restaurant = {}));
3643
- })(t.Subject || (t.Subject = {}));
3644
- })(_e || (_e = {}));
3645
- function Oi(t, e) {
3646
- const n = pe().sessionUser.value;
3647
- if (!n)
3648
- return;
3649
- const { isAdmin: s } = n.role, o = n.permissions, i = e.filter((f) => f.businessId === t._id).length;
3650
- return t.restaurantQuota > i && ((n == null ? void 0 : n.id) === t.ownerId || s) && new Ai(o).can(
3651
- _e.Action.manage,
3652
- _e.Subject.Feedme.all
3653
- );
3654
- }
3655
- const Si = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex xs:flex-col" }, Pi = { class: "flex flex-1" }, Ti = {
3656
- key: 0,
3657
- class: "flex gap-8"
3658
- }, Li = {
3659
- key: 0,
3660
- class: "space-y-4"
3661
- }, Ni = { class: "fm-typo-en-body-md-600" }, Ci = {
3662
- key: 0,
3663
- class: "space-y-8"
3664
- }, xi = { class: "flex justify-end" }, ki = { class: "flex-1 pb-64 overflow-auto divide-y divide-fm-color-neutral-gray-100" }, Vi = { key: 0 }, Fi = ["onClick"], ji = { class: "flex justify-between items-center" }, Mi = { class: "fm-typo-en-body-lg-600" }, Ui = { class: "flex gap-8" }, Di = { class: "text-fm-color-typo-secondary" }, Gi = { class: "text-fm-color-typo-secondary" }, Bi = { class: "text-fm-color-typo-secondary" }, cl = /* @__PURE__ */ re({
3665
- __name: "Business",
3666
- setup(t) {
3667
- const { searchKey: e, filter: r } = li(), { copyTextToClipboard: n } = cr(), s = ur(), o = Y(() => s.breakpoints.value.xs), { t: i } = ve(), f = Y(() => {
3668
- const { currentBusiness: b, restaurants: O } = pe(), y = b.value;
3669
- if (!y)
3670
- return null;
3671
- const { id: k, name: V, thumbnail: I, url: M } = y, J = O.value.filter((D) => D.managable).map((D) => {
3672
- var p;
3673
- const { _id: W, profile: a } = D, { name: l, email: h, phoneNo: R, address: S, sstRegNo: m } = {
3674
- ...a,
3675
- address: Oe(a.address)
3676
- };
3677
- return {
3678
- id: W,
3679
- code: ((p = D.profile) == null ? void 0 : p.code) || "--",
3680
- name: l,
3681
- email: h,
3682
- phone: R,
3683
- address: S.formatted,
3684
- withSST: !!m,
3685
- doc: D
3686
- };
3687
- });
3688
- return {
3689
- id: k,
3690
- name: V,
3691
- thumbnail: I,
3692
- url: `https://feedmedev.cc/${M || k}`,
3693
- doc: y,
3694
- canCreateRestaurant: Oi(y, O.value),
3695
- restaurants: J.filter(
3696
- ({ code: D, name: W, address: a, phone: l, email: h }) => r([D, W, a, l, h])
3697
- )
3698
- };
3699
- }), d = Y(() => [
3700
- {
3701
- header: i("settings.business.restaurant.code"),
3702
- accessorKey: "code",
3703
- enableSorting: !1
3704
- },
3705
- {
3706
- header: i("settings.business.restaurant.title"),
3707
- accessorKey: "name",
3708
- enableSorting: !1
3709
- },
3710
- {
3711
- header: i("settings.business.restaurant.address"),
3712
- accessorKey: "address",
3713
- size: 200,
3714
- enableSorting: !1
3715
- },
3716
- {
3717
- header: i("settings.business.restaurant.contact"),
3718
- accessorKey: "phone",
3719
- enableSorting: !1
3720
- },
3721
- {
3722
- header: i("settings.business.restaurant.email"),
3723
- accessorKey: "email",
3724
- enableSorting: !1
3725
- },
3726
- {
3727
- header: i("settings.business.restaurant.tax.title"),
3728
- enableSorting: !1,
3729
- cell: (b) => {
3730
- var y;
3731
- const O = b.row.original;
3732
- return (y = O.doc.profile.sstRegNo) != null && y.length ? O.doc.profile.sstRegNo : i("settings.business.restaurant.tax.not_set");
3733
- }
3734
- },
3735
- {
3736
- id: "action",
3737
- header: "",
3738
- size: 80,
3739
- cell: (b) => {
3740
- const O = b.row.original;
3741
- return Kr([
3742
- {
3743
- name: "edit",
3744
- onClick: () => c(O)
3745
- },
3746
- {
3747
- name: "file_copy",
3748
- onClick: () => {
3749
- n(O.id);
3750
- }
3751
- }
3752
- ]);
3753
- }
3754
- }
3755
- ]);
3756
- function u() {
3757
- var b;
3758
- n(((b = f.value) == null ? void 0 : b.url) || "");
3759
- }
3760
- function v() {
3761
- if (!f.value)
3762
- return;
3763
- const { name: b, url: O, thumbnail: y } = f.value.doc;
3764
- ze(g, vn, {
3765
- businessId: f.value.id,
3766
- initialValue: {
3767
- name: b,
3768
- url: O,
3769
- thumbnail: y
3770
- }
3771
- });
3772
- }
3773
- const g = Fr();
3774
- function T() {
3775
- ze(g, sr, {
3776
- enableFeedmeExpress: !1
3777
- });
3778
- }
3779
- function c(b) {
3780
- var O;
3781
- ze(g, sr, {
3782
- restaurantId: b.id,
3783
- restaurant: b.doc,
3784
- enableFeedmeExpress: ((O = b.doc.feedmeDelivery) == null ? void 0 : O.enable) || !1
3785
- });
3786
- }
3787
- return (b, O) => {
3788
- var Z;
3789
- const y = q("FmSpacer"), k = q("FmButton"), V = q("FmTooltip"), I = q("FmSearch"), M = q("FmTable"), J = q("FmCircularProgress");
3790
- return F(), te(Br, {
3791
- heading: ((Z = f.value) == null ? void 0 : Z.name) || "--"
3792
- }, {
3793
- "sub-heading": K(() => {
3794
- var D;
3795
- return [
3796
- $("div", Si, [
3797
- $("span", null, G(_(i)("settings.business.url")) + ": ", 1),
3798
- $("span", {
3799
- class: "cursor-pointer xs:w-max-[200px] truncate",
3800
- onClick: u
3801
- }, G((D = f.value) == null ? void 0 : D.url), 1)
3802
- ])
3803
- ];
3804
- }),
3805
- "append-heading": K(() => [
3806
- $("div", Pi, [
3807
- N(y),
3808
- o.value ? (F(), B(oe, { key: 1 }, [
3809
- N(Gr, {
3810
- onClick: T,
3811
- label: _(i)("settings.business.add_restaurant"),
3812
- "prepend-icon": "add"
3813
- }, null, 8, ["label"]),
3814
- N(tn, null, {
3815
- default: K(() => [
3816
- N(nn, {
3817
- label: _(i)("common.edit"),
3818
- onClick: v
3819
- }, null, 8, ["label"])
3820
- ]),
3821
- _: 1
3822
- })
3823
- ], 64)) : (F(), B("div", Ti, [
3824
- N(k, {
3825
- onClick: v,
3826
- variant: "secondary",
3827
- label: _(i)("common.edit")
3828
- }, null, 8, ["label"]),
3829
- N(V, {
3830
- variant: "rich",
3831
- placement: "left",
3832
- "z-index": 100
3833
- }, {
3834
- content: K(() => {
3835
- var D;
3836
- return [
3837
- (D = f.value) != null && D.canCreateRestaurant ? ce("", !0) : (F(), B("div", Li, [
3838
- $("p", Ni, G(_(i)("settings.business.quota.limit_title")), 1),
3839
- $("p", null, G(_(i)("settings.business.quota.limit_message")), 1)
3840
- ]))
3841
- ];
3842
- }),
3843
- default: K(() => {
3844
- var D;
3845
- return [
3846
- N(k, {
3847
- onClick: T,
3848
- label: _(i)("settings.business.add_restaurant"),
3849
- disabled: !((D = f.value) != null && D.canCreateRestaurant),
3850
- "prepend-icon": "add"
3851
- }, null, 8, ["label", "disabled"])
3852
- ];
3853
- }),
3854
- _: 1
3855
- })
3856
- ]))
3857
- ])
3858
- ]),
3859
- default: K(() => {
3860
- var D, W;
3861
- return [
3862
- o.value ? (F(), B(oe, { key: 1 }, [
3863
- N(I, {
3864
- class: "my-8 mx-16",
3865
- modelValue: _(e),
3866
- "onUpdate:modelValue": O[2] || (O[2] = (a) => Ot(e) ? e.value = a : null),
3867
- placeholder: _(i)("settings.business.search_restaurants")
3868
- }, null, 8, ["modelValue", "placeholder"]),
3869
- $("div", ki, [
3870
- f.value ? (F(!0), B(oe, { key: 1 }, he((W = f.value) == null ? void 0 : W.restaurants, (a) => {
3871
- var l;
3872
- return F(), B("div", {
3873
- key: a.id,
3874
- class: "py-12 px-16 space-y-4",
3875
- onClick: (h) => c(a)
3876
- }, [
3877
- $("div", ji, [
3878
- $("div", Mi, G(a.name), 1),
3879
- $("div", Ui, [
3880
- N(k, {
3881
- icon: "edit",
3882
- "text-color": "neutral-gray-400",
3883
- variant: "tertiary",
3884
- onClick: st((h) => c(a), ["stop"])
3885
- }, null, 8, ["onClick"]),
3886
- N(k, {
3887
- icon: "file_copy",
3888
- "text-color": "neutral-gray-400",
3889
- variant: "tertiary",
3890
- onClick: st((h) => _(n)(a.id), ["stop"])
3891
- }, null, 8, ["onClick"])
3892
- ])
3893
- ]),
3894
- $("div", Di, G(_(i)("settings.business.restaurant.contact")) + ": " + G(a.phone), 1),
3895
- $("div", Gi, G(_(i)("settings.business.restaurant.email")) + ": " + G(a.email), 1),
3896
- $("div", Bi, G(_(i)("settings.business.restaurant.tax.title")) + ": " + G((l = a.doc.profile.sstRegNo) != null && l.length ? a.doc.profile.sstRegNo : _(i)("settings.business.restaurant.tax.not_set")), 1)
3897
- ], 8, Fi);
3898
- }), 128)) : (F(), B("div", Vi, [
3899
- N(J, { size: "lg" })
3900
- ]))
3901
- ])
3902
- ], 64)) : (F(), B("div", Ci, [
3903
- $("div", xi, [
3904
- N(I, {
3905
- class: "w-[320px]",
3906
- modelValue: _(e),
3907
- "onUpdate:modelValue": O[0] || (O[0] = (a) => Ot(e) ? e.value = a : null),
3908
- placeholder: _(i)("settings.business.search_restaurants")
3909
- }, null, 8, ["modelValue", "placeholder"])
3910
- ]),
3911
- N(M, {
3912
- "column-defs": d.value,
3913
- "row-data": ((D = f.value) == null ? void 0 : D.restaurants) || [],
3914
- "shrink-at": !1,
3915
- loading: !f.value,
3916
- onRowClick: O[1] || (O[1] = (a) => c(a.original))
3917
- }, null, 8, ["column-defs", "row-data", "loading"])
3918
- ]))
3919
- ];
3920
- }),
3921
- _: 1
3922
- }, 8, ["heading"]);
3923
- };
3924
- }
3925
- });
3926
- export {
3927
- cl as default
3928
- };