@feedmepos/mf-brand-app-builder 0.5.33-dev.1 → 0.5.33-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as rt, resolveComponent as ne, createElementBlock as D, openBlock as R, createElementVNode as u, createVNode as S, createCommentVNode as z, withCtx as Le, unref as f, normalizeStyle as Er, toDisplayString as b, ref as re, shallowRef as qn, onMounted as dn, onBeforeUnmount as Xn, withDirectives as Rr, normalizeClass as cn, vShow as Lr, markRaw as pa, nextTick as Yn, watch as dt, createBlock as Ue, renderSlot as Zn, Fragment as $e, renderList as gt, computed as te, Teleport as Jn, Transition as pn, withKeys as Kn, createTextVNode as va } from "vue";
2
- import { B as nr } from "./index-C7Ax57OZ.js";
2
+ import { B as nr } from "./index-CVVQJJYY.js";
3
3
  import { B as Qn } from "./ColorPicker-RKWzhLBO.js";
4
- import { u as eo } from "./index-Bi5NByw1.js";
4
+ import { u as eo } from "./index-BA2J-Ffh.js";
5
5
  import { useCoreStore as Gr, useI18n as Hr, RestaurantSelector as to } from "@feedmepos/mf-common";
6
6
  import { u as ro, b as X } from "./brandkit-C8uulbNE.js";
7
7
  import { useDialogChild as ao, useDialog as $r, useSnackbar as Vr } from "@feedmepos/ui-library";
@@ -7,13 +7,13 @@ import { v as Ra } from "./v4-CKwdnpQf.js";
7
7
  import { _ as ho } from "./Icon.vue_vue_type_style_index_0_lang-BcRjQndc.js";
8
8
  import { B as sn } from "./BaDivider-Cp9gfB4r.js";
9
9
  import { useI18n as Ze, useCoreStore as We } from "@feedmepos/mf-common";
10
- import { C as $a, _ as yo, a as vo } from "./main-Bsoyt2_M.js";
10
+ import { C as $a, _ as yo, a as vo } from "./main-CnZ43lhk.js";
11
11
  import { useDialog as To, components as xo, useSnackbar as Co } from "@feedmepos/ui-library";
12
12
  import { useRouter as dn } from "vue-router";
13
13
  import { u as Ia, a as _o, b as wo } from "./brandkit-C8uulbNE.js";
14
- import { u as Ea } from "./index-Bi5NByw1.js";
14
+ import { u as Ea } from "./index-BA2J-Ffh.js";
15
15
  import { K as Io, V as Eo } from "./vue-sonner-CBFYmm8_.js";
16
- import { F as So, a as Ao } from "./app-P1hJEtTw.js";
16
+ import { F as So, a as Ao } from "./app-C842VHiz.js";
17
17
  /**!
18
18
  * Sortable 1.14.0
19
19
  * @author RubaXa <trash@rubaxa.org>
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as y, ref as b, resolveComponent as w, createElementBlock as r, openBlock as s, createVNode as c, createCommentVNode as f, Fragment as C, createElementVNode as i, unref as u } from "vue";
2
2
  import { r as g, I as h } from "./image-D_Djf1PS.js";
3
3
  import { useCoreStore as I } from "@feedmepos/mf-common";
4
- import "./main-Bsoyt2_M.js";
4
+ import "./main-CnZ43lhk.js";
5
5
  import { _ as $ } from "./Icon.vue_vue_type_style_index_0_lang-BcRjQndc.js";
6
6
  import { C as k } from "./CircularProgress-DdblYCtV.js";
7
7
  import { v as F } from "./v4-CKwdnpQf.js";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as b, resolveComponent as y, createBlock as s, openBlock as c, unref as u, withCtx as i, createElementBlock as m, Fragment as x, renderList as g, createElementVNode as p, createVNode as n, resolveDynamicComponent as F } from "vue";
2
- import { F as f } from "./app-P1hJEtTw.js";
2
+ import { F as f } from "./app-C842VHiz.js";
3
3
  const h = { class: "flex justify-end gap-4 items-center w-full py-16 px-12 border-b" }, z = { class: "flex flex-col gap-4 w-full p-12" }, I = /* @__PURE__ */ b({
4
4
  __name: "ListRepeater",
5
5
  props: {
@@ -1,10 +1,10 @@
1
- import { defineComponent as C, ref as y, computed as S, watch as $, resolveComponent as d, createElementBlock as k, openBlock as g, createElementVNode as o, createVNode as u, toDisplayString as _, unref as i, createBlock as F, withCtx as U } from "vue";
2
- import { useCoreStore as P, useI18n as V } from "@feedmepos/mf-common";
3
- import { B as h } from "./index-C7Ax57OZ.js";
4
- import { K as q } from "./vue-sonner-CBFYmm8_.js";
5
- import { r as I, I as T } from "./image-D_Djf1PS.js";
6
- import { useSnackbar as A } from "@feedmepos/ui-library";
7
- const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
1
+ import { defineComponent as C, ref as k, computed as S, watch as F, resolveComponent as d, createElementBlock as _, openBlock as g, createElementVNode as o, createVNode as m, toDisplayString as B, unref as l, createBlock as I, withCtx as P } from "vue";
2
+ import { useCoreStore as V, useI18n as q } from "@feedmepos/mf-common";
3
+ import { B as v } from "./index-CVVQJJYY.js";
4
+ import { K as T } from "./vue-sonner-CBFYmm8_.js";
5
+ import { r as A, I as D } from "./image-D_Djf1PS.js";
6
+ import { useSnackbar as E } from "@feedmepos/ui-library";
7
+ const N = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), R = [
8
8
  "brand",
9
9
  "home",
10
10
  "app",
@@ -502,122 +502,133 @@ const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
502
502
  "za",
503
503
  "zm",
504
504
  "zw"
505
- ], D = { class: "w-full flex flex-col gap-40" }, K = { class: "flex flex-col gap-24" }, R = { class: "w-full flex items-center justify-between h-[36px]" }, L = { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, M = { class: "w-full flex gap-32" }, O = { class: "relative shrink-0 h-[100px] w-[100px]" }, G = ["src"], H = { class: "absolute -top-8 -right-8 rounded-full h-32 w-32 border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white flex justify-center items-center" }, J = { class: "w-full flex flex-col gap-24 max-w-[400px]" }, Q = { class: "text-fm-color-typo-secondary" }, te = /* @__PURE__ */ C({
505
+ ], K = { class: "w-full flex flex-col gap-40" }, L = { class: "flex flex-col gap-24" }, M = { class: "w-full flex items-center justify-between h-[36px]" }, O = { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, G = { class: "w-full flex gap-32" }, H = { class: "relative shrink-0 h-[100px] w-[100px]" }, J = ["src"], Q = { class: "absolute -top-8 -right-8 rounded-full h-32 w-32 border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white flex justify-center items-center" }, W = { class: "w-full flex flex-col gap-24 max-w-[400px]" }, X = { class: "text-fm-color-typo-secondary" }, re = /* @__PURE__ */ C({
506
506
  __name: "ManagementSettings",
507
- setup(W) {
508
- const s = P(), b = A(), { t: n } = V(), p = y(!0), a = y({
507
+ setup(Y) {
508
+ const e = V(), b = E(), { t: r } = q(), p = k(!0), n = k({
509
509
  name: "",
510
510
  url: "",
511
511
  thumbnail: ""
512
512
  }), x = S(
513
513
  () => "https://{slug}.feedmedev.vip".replace("https://{slug}", "")
514
514
  );
515
- function B() {
516
- var t, e;
515
+ function h(t) {
516
+ var a;
517
+ const s = (a = e.currentBusiness.value) == null ? void 0 : a._id;
518
+ return s ? t || s : "";
519
+ }
520
+ function j(t) {
521
+ var a;
522
+ const s = (a = e.currentBusiness.value) == null ? void 0 : a._id;
523
+ return !t || t === s ? "" : t;
524
+ }
525
+ function z() {
526
+ var t;
517
527
  navigator.clipboard.writeText(
518
528
  "https://{slug}.feedmedev.vip".replace(
519
529
  "{slug}",
520
- ((t = s.currentBusiness.value) == null ? void 0 : t.url) ?? ((e = s.currentBusiness.value) == null ? void 0 : e._id)
530
+ h((t = e.currentBusiness.value) == null ? void 0 : t.url)
521
531
  )
522
532
  ).then(() => {
523
533
  b.open(
524
534
  {
525
- message: n("brand.settings.management.toast.copiedUrl"),
535
+ message: r("brand.settings.management.toast.copiedUrl"),
526
536
  type: "success"
527
537
  },
528
538
  1500
529
539
  );
530
- }).catch((l) => {
540
+ }).catch((s) => {
531
541
  b.open(
532
542
  {
533
- message: n("brand.settings.management.toast.failedToCopyUrl"),
543
+ message: r("brand.settings.management.toast.failedToCopyUrl"),
534
544
  type: "error"
535
545
  },
536
546
  1500
537
547
  );
538
548
  });
539
549
  }
540
- function j() {
541
- q.promise(
550
+ function $() {
551
+ T.promise(
542
552
  async () => {
543
- var t;
544
- return a.value.url != ((t = s.currentBusiness.value) == null ? void 0 : t.url) && await h.setShortUrl(
545
- a.value.url,
546
- s.currentBusiness.value.url ?? "",
547
- s.currentBusiness.value._id
548
- ).catch((e) => {
549
- throw { message: e.message };
550
- }), await h.updateBusinessProfile(s.currentBusiness.value._id, {
551
- name: a.value.name,
552
- url: a.value.url,
553
- thumbnail: s.currentBusiness.value.thumbnail,
554
- coverPhoto: s.currentBusiness.value.coverPhoto
555
- }).then((e) => e).catch((e) => {
556
- throw { message: e.message };
553
+ var s;
554
+ const t = h(n.value.url);
555
+ return n.value.url != ((s = e.currentBusiness.value) == null ? void 0 : s.url) && await v.setShortUrl(
556
+ n.value.url,
557
+ e.currentBusiness.value.url ?? "",
558
+ e.currentBusiness.value._id
559
+ ).catch((a) => {
560
+ throw { message: a.message };
561
+ }), await v.updateBusinessProfile(e.currentBusiness.value._id, {
562
+ name: n.value.name,
563
+ url: n.value.url,
564
+ thumbnail: e.currentBusiness.value.thumbnail,
565
+ coverPhoto: e.currentBusiness.value.coverPhoto
566
+ }).then((a) => (e.currentBusiness.value.name = n.value.name, e.currentBusiness.value.url = t, a)).catch((a) => {
567
+ throw { message: a.message };
557
568
  });
558
569
  },
559
570
  {
560
- loading: n("brand.settings.management.toast.saving"),
561
- success: () => n("brand.settings.management.toast.saved"),
562
- error: (t) => t.message ?? n("brand.settings.management.toast.errorSaving")
571
+ loading: r("brand.settings.management.toast.saving"),
572
+ success: () => r("brand.settings.management.toast.saved"),
573
+ error: (t) => t.message ?? r("brand.settings.management.toast.errorSaving")
563
574
  }
564
575
  );
565
576
  }
566
- function z(t) {
567
- var l, m;
568
- const e = ((l = t.dataTransfer) == null ? void 0 : l.files[0]) ?? ((m = t.target) == null ? void 0 : m.files[0]);
569
- T.uploadImage(
570
- s.currentBusiness.value._id,
571
- `thumbnail/${(/* @__PURE__ */ new Date()).toISOString()}.${e.name.split(".").pop()}`,
572
- e
573
- ).then(async (c) => {
574
- await h.updateBusinessProfile(s.currentBusiness.value._id, {
575
- name: a.value.name,
576
- url: a.value.url,
577
- thumbnail: `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`,
578
- coverPhoto: s.currentBusiness.value.coverPhoto
579
- }), a.value.thumbnail = `https://image.feedmedev.cc/business/${s.currentBusiness.value._id}/${c.imagePath}`;
577
+ function U(t) {
578
+ var a, c;
579
+ const s = ((a = t.dataTransfer) == null ? void 0 : a.files[0]) ?? ((c = t.target) == null ? void 0 : c.files[0]);
580
+ D.uploadImage(
581
+ e.currentBusiness.value._id,
582
+ `thumbnail/${(/* @__PURE__ */ new Date()).toISOString()}.${s.name.split(".").pop()}`,
583
+ s
584
+ ).then(async (u) => {
585
+ await v.updateBusinessProfile(e.currentBusiness.value._id, {
586
+ name: n.value.name,
587
+ url: n.value.url,
588
+ thumbnail: `https://image.feedmedev.cc/business/${e.currentBusiness.value._id}/${u.imagePath}`,
589
+ coverPhoto: e.currentBusiness.value.coverPhoto
590
+ }), e.currentBusiness.value.thumbnail = `https://image.feedmedev.cc/business/${e.currentBusiness.value._id}/${u.imagePath}`, n.value.thumbnail = `https://image.feedmedev.cc/business/${e.currentBusiness.value._id}/${u.imagePath}`;
580
591
  });
581
592
  }
582
- return $(
583
- () => s.currentBusiness.value,
593
+ return F(
594
+ () => e.currentBusiness.value,
584
595
  () => {
585
- var t, e, l;
586
- a.value.name = ((t = s.currentBusiness.value) == null ? void 0 : t.name) ?? "", a.value.url = ((e = s.currentBusiness.value) == null ? void 0 : e.url) ?? "", a.value.thumbnail = ((l = s.currentBusiness.value) == null ? void 0 : l.thumbnail) ?? "";
596
+ var t, s, a;
597
+ n.value.name = ((t = e.currentBusiness.value) == null ? void 0 : t.name) ?? "", n.value.url = j((s = e.currentBusiness.value) == null ? void 0 : s.url), n.value.thumbnail = ((a = e.currentBusiness.value) == null ? void 0 : a.thumbnail) ?? "";
587
598
  },
588
599
  { immediate: !0 }
589
- ), (t, e) => {
590
- var v, w;
591
- const l = d("FmButton"), m = d("FmAvatar"), c = d("FmIcon"), f = d("FmTextField");
592
- return g(), k("div", D, [
593
- o("div", K, [
594
- o("div", R, [
595
- o("h2", L, _(i(n)("brand.settings.management.details")), 1),
596
- u(l, {
600
+ ), (t, s) => {
601
+ var w, y;
602
+ const a = d("FmButton"), c = d("FmAvatar"), u = d("FmIcon"), f = d("FmTextField");
603
+ return g(), _("div", K, [
604
+ o("div", L, [
605
+ o("div", M, [
606
+ o("h2", O, B(l(r)("brand.settings.management.details")), 1),
607
+ m(a, {
597
608
  disabled: p.value,
598
- label: i(n)("brand.settings.management.save"),
599
- onClick: j
609
+ label: l(r)("brand.settings.management.save"),
610
+ onClick: $
600
611
  }, null, 8, ["disabled", "label"])
601
612
  ]),
602
- o("div", M, [
603
- o("div", O, [
604
- a.value.thumbnail ? (g(), k("img", {
613
+ o("div", G, [
614
+ o("div", H, [
615
+ n.value.thumbnail ? (g(), _("img", {
605
616
  key: 0,
606
617
  class: "h-full w-full rounded-full",
607
- src: i(I)(a.value.thumbnail)
608
- }, null, 8, G)) : (g(), F(m, {
618
+ src: l(A)(n.value.thumbnail)
619
+ }, null, 8, J)) : (g(), I(c, {
609
620
  key: 1,
610
- name: ((v = i(s).currentBusiness.value) == null ? void 0 : v.name) ?? "",
621
+ name: ((w = l(e).currentBusiness.value) == null ? void 0 : w.name) ?? "",
611
622
  class: "h-full w-full !fm-typo-en-title-md-600 bg-fm-color-primary-oats text-fm-color-primary"
612
623
  }, null, 8, ["name"])),
613
- o("button", H, [
624
+ o("button", Q, [
614
625
  o("input", {
615
626
  class: "absolute top-0 left-0 h-32 w-32 opacity-0 cursor-pointer",
616
627
  type: "file",
617
628
  accept: "image/*",
618
- onChange: z
629
+ onChange: U
619
630
  }, null, 32),
620
- u(c, {
631
+ m(u, {
621
632
  size: "md",
622
633
  name: "edit",
623
634
  color: "neutral-black",
@@ -625,36 +636,36 @@ const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
625
636
  })
626
637
  ])
627
638
  ]),
628
- o("div", J, [
629
- u(f, {
639
+ o("div", W, [
640
+ m(f, {
630
641
  class: "w-full",
631
- label: i(n)("brand.settings.management.businessName"),
632
- modelValue: a.value.name,
642
+ label: l(r)("brand.settings.management.businessName"),
643
+ modelValue: n.value.name,
633
644
  "onUpdate:modelValue": [
634
- e[0] || (e[0] = (r) => a.value.name = r),
635
- e[1] || (e[1] = (r) => p.value = !1)
645
+ s[0] || (s[0] = (i) => n.value.name = i),
646
+ s[1] || (s[1] = (i) => p.value = !1)
636
647
  ]
637
648
  }, null, 8, ["label", "modelValue"]),
638
- u(f, {
649
+ m(f, {
639
650
  class: "w-full",
640
- label: i(n)("brand.settings.management.url"),
641
- placeholder: (w = i(s).currentBusiness.value) == null ? void 0 : w._id,
642
- modelValue: a.value.url,
651
+ label: l(r)("brand.settings.management.url"),
652
+ placeholder: (y = l(e).currentBusiness.value) == null ? void 0 : y._id,
653
+ modelValue: n.value.url,
643
654
  "onUpdate:modelValue": [
644
- e[2] || (e[2] = (r) => a.value.url = r),
645
- e[3] || (e[3] = (r) => p.value = !1)
655
+ s[2] || (s[2] = (i) => n.value.url = i),
656
+ s[3] || (s[3] = (i) => p.value = !1)
646
657
  ],
647
658
  rules: [
648
- (r) => !r || i(E).test(r) || i(n)("brand.settings.management.validation.minCharacters"),
649
- (r) => !r || !i(N).includes(r) || i(n)("brand.settings.management.validation.reservedUrl")
659
+ (i) => !i || l(N).test(i) || l(r)("brand.settings.management.validation.minCharacters"),
660
+ (i) => !i || !l(R).includes(i) || l(r)("brand.settings.management.validation.reservedUrl")
650
661
  ]
651
662
  }, {
652
- append: U(() => [
653
- o("span", Q, _(x.value), 1),
654
- u(l, {
663
+ append: P(() => [
664
+ o("span", X, B(x.value), 1),
665
+ m(a, {
655
666
  icon: "content_copy",
656
667
  variant: "plain",
657
- onClick: B
668
+ onClick: z
658
669
  })
659
670
  ]),
660
671
  _: 1
@@ -667,5 +678,5 @@ const E = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), N = [
667
678
  }
668
679
  });
669
680
  export {
670
- te as default
681
+ re as default
671
682
  };
@@ -9400,7 +9400,7 @@ const Ln = {
9400
9400
  {
9401
9401
  path: "/",
9402
9402
  name: "brandkit",
9403
- component: () => import("./BrandkitView-DfjrGwmH.js")
9403
+ component: () => import("./BrandkitView-CngvcS-w.js")
9404
9404
  },
9405
9405
  {
9406
9406
  path: "/projects",
@@ -9414,7 +9414,7 @@ const Ln = {
9414
9414
  {
9415
9415
  path: ":templateId(.*)*",
9416
9416
  name: "builder",
9417
- component: () => import("./BuilderView-CkHuNWOP.js")
9417
+ component: () => import("./BuilderView-C_Uq2Nd5.js")
9418
9418
  }
9419
9419
  ]
9420
9420
  },
@@ -9427,12 +9427,12 @@ const Ln = {
9427
9427
  {
9428
9428
  path: "assets",
9429
9429
  name: "settings-assets",
9430
- component: () => import("./AssetsSettings-EAeO3NaT.js")
9430
+ component: () => import("./AssetsSettings-DtZ6goQl.js")
9431
9431
  },
9432
9432
  {
9433
9433
  path: "management",
9434
9434
  name: "settings-management",
9435
- component: () => import("./ManagementSettings--4kOBME_.js")
9435
+ component: () => import("./ManagementSettings-D0goBMzs.js")
9436
9436
  }
9437
9437
  ]
9438
9438
  },
@@ -14110,7 +14110,7 @@ const Eu = (e) => {
14110
14110
  ),
14111
14111
  BaListRepeater: G(
14112
14112
  V(
14113
- () => import("./ListRepeater-ygi8XTiR.js")
14113
+ () => import("./ListRepeater-CRLAn6mb.js")
14114
14114
  )
14115
14115
  ),
14116
14116
  BaTextStyleList: G(
@@ -14130,7 +14130,7 @@ const Eu = (e) => {
14130
14130
  ),
14131
14131
  BaImageUpload: G(
14132
14132
  V(
14133
- () => import("./ImageUpload-BEj0dhz8.js")
14133
+ () => import("./ImageUpload-DQWBWRVn.js")
14134
14134
  ),
14135
14135
  { props: ["ignoreUpdate"] }
14136
14136
  ),
@@ -14159,7 +14159,7 @@ const Eu = (e) => {
14159
14159
  "ko-KR": { ...Hn, ...xi },
14160
14160
  "vi-VN": { ...zn, ...Ni },
14161
14161
  "ms-MY": { ...ai, ...Ki }
14162
- }, Vu = V(() => import("./App-7wbhEmII.js"));
14162
+ }, Vu = V(() => import("./App-D9q9FDSW.js"));
14163
14163
  export {
14164
14164
  hn as F,
14165
14165
  pn as a,
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { c as i, d as o, i as e, r as m } from "./app-P1hJEtTw.js";
2
+ import { c as i, d as o, i as e, r as m } from "./app-C842VHiz.js";
3
3
  export {
4
4
  i as FmApp,
5
5
  o as FormKitPlugin,
@@ -1,4 +1,4 @@
1
- import { B as u } from "./index-C7Ax57OZ.js";
1
+ import { B as u } from "./index-CVVQJJYY.js";
2
2
  import { defineStore as a } from "pinia";
3
3
  import { ref as r } from "vue";
4
4
  const c = a("business", () => {
@@ -1,12 +1,12 @@
1
- import { H as a, a as i } from "./index-D0LOMBBD.js";
2
- const d = () => i().PORTAL_V2_BACKEND, o = () => i().LICENSE_BACKEND;
1
+ import { H as a, a as d } from "./index-D0LOMBBD.js";
2
+ const o = () => d().PORTAL_V2_BACKEND, c = () => d().LICENSE_BACKEND;
3
3
  async function p(t) {
4
4
  return (await a.Get(
5
5
  "https://api.feedmedev.vip",
6
6
  `/short-url/${t}`
7
7
  )).data;
8
8
  }
9
- async function c(t, e, s) {
9
+ async function u(t, e, s) {
10
10
  return await a.Post(
11
11
  "https://api.feedmedev.vip",
12
12
  "/short-url",
@@ -23,13 +23,13 @@ async function c(t, e, s) {
23
23
  throw (r = n.response) == null ? void 0 : r.data;
24
24
  });
25
25
  }
26
- async function u(t) {
26
+ async function f(t) {
27
27
  return (await a.Get(
28
28
  "https://api.feedmedev.vip",
29
29
  `/metadata/${t}/config`
30
30
  )).data;
31
31
  }
32
- async function f(t, e, s) {
32
+ async function m(t, e, s) {
33
33
  return (await a.Post(
34
34
  "https://api.feedmedev.vip",
35
35
  `/metadata/${t}/config`,
@@ -42,7 +42,7 @@ async function f(t, e, s) {
42
42
  }
43
43
  )).data;
44
44
  }
45
- async function m(t) {
45
+ async function l(t) {
46
46
  return (await a.Get(
47
47
  "https://api.feedmedev.vip",
48
48
  `/metadata/${t}/brandkit`
@@ -57,51 +57,55 @@ async function h(t, e) {
57
57
  }
58
58
  )).data;
59
59
  }
60
- async function l(t, e) {
60
+ async function v(t, e) {
61
61
  return (await a.Get(
62
62
  "https://api.feedmedev.vip",
63
63
  `/metadata/${t}/brandkit/template-history/${e}`
64
64
  )).data;
65
65
  }
66
- async function v(t, e, s) {
66
+ async function y(t, e, s) {
67
67
  return (await a.Post(
68
68
  "https://api.feedmedev.vip",
69
69
  `/metadata/${t}/brandkit/template-restore/${e}/${s}`,
70
70
  {}
71
71
  )).data;
72
72
  }
73
- async function y(t, e) {
73
+ async function $(t, e) {
74
74
  return (await a.Delete(
75
75
  "https://api.feedmedev.vip",
76
76
  `/metadata/${t}/brandkit/template-history/${e}`
77
77
  )).data;
78
78
  }
79
- async function $(t, e) {
79
+ async function w(t, e) {
80
+ const s = {
81
+ ...e,
82
+ url: e.url || t
83
+ };
80
84
  return await a.Put(
81
- d(),
85
+ o(),
82
86
  `businesses/${t}/profile`,
83
87
  {
84
- data: e
88
+ data: s
85
89
  }
86
- ).catch((n) => {
87
- var r;
88
- throw (r = n.response) == null ? void 0 : r.data;
90
+ ).catch((r) => {
91
+ var i;
92
+ throw (i = r.response) == null ? void 0 : i.data;
89
93
  });
90
94
  }
91
- async function w(t) {
95
+ async function g(t) {
92
96
  return await a.Get(
93
- o(),
97
+ c(),
94
98
  `api/business/${t}/feature/miniprogram`
95
99
  ).then((e) => e.data).catch(() => !1);
96
100
  }
97
- async function g(t) {
101
+ async function B(t) {
98
102
  return (await a.Get(
99
103
  "https://api.feedmedev.vip",
100
104
  `/metadata/${t}/credentials`,
101
105
  {}
102
106
  )).data;
103
107
  }
104
- async function B(t, e) {
108
+ async function P(t, e) {
105
109
  return (await a.Post(
106
110
  "https://api.feedmedev.vip",
107
111
  `/metadata/${t}/credentials`,
@@ -110,21 +114,21 @@ async function B(t, e) {
110
114
  }
111
115
  )).data;
112
116
  }
113
- const P = {
117
+ const k = {
114
118
  getGlobalSlug: p,
115
- setShortUrl: c,
116
- getBusinessMetadata: u,
117
- setBusinessMetadata: f,
118
- getBusinessBrandkit: m,
119
+ setShortUrl: u,
120
+ getBusinessMetadata: f,
121
+ setBusinessMetadata: m,
122
+ getBusinessBrandkit: l,
119
123
  setBusinessBrandkit: h,
120
- getTemplateHistory: l,
121
- restoreTemplateVersion: v,
122
- clearTemplateHistory: y,
123
- updateBusinessProfile: $,
124
- getBusinessPremiumStatus: w,
125
- getCredentials: g,
126
- updateCredentials: B
124
+ getTemplateHistory: v,
125
+ restoreTemplateVersion: y,
126
+ clearTemplateHistory: $,
127
+ updateBusinessProfile: w,
128
+ getBusinessPremiumStatus: g,
129
+ getCredentials: B,
130
+ updateCredentials: P
127
131
  };
128
132
  export {
129
- P as B
133
+ k as B
130
134
  };