@ozdao/prometheus-framework 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-579e2c7a.mjs +1945 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cab2bcd2.js +1 -0
- package/dist/ButtonFollow-23c4d9fc.mjs +132 -0
- package/dist/ButtonFollow-bf5e6d42.js +1 -0
- package/dist/CardOrganization-63dcc83b.js +1 -0
- package/dist/CardOrganization-e530c9d5.mjs +230 -0
- package/dist/Chips-3dac276c.js +1 -0
- package/dist/Feed-4d9001aa.mjs +368 -0
- package/dist/Feed-51eef23f.js +1 -0
- package/dist/Feed-d78d4b91.mjs +439 -0
- package/dist/Feed-f4e9769e.js +1 -0
- package/dist/Gallery-1f82841a.mjs +357 -0
- package/dist/Gallery-dd29c7f6.js +1 -0
- package/dist/Image-a2c2ab9c.js +9 -0
- package/dist/Image-ad6d4f0f.mjs +477 -0
- package/dist/Popup-383abb2e.js +1 -0
- package/dist/Popup-f7a5e86b.mjs +76 -0
- package/dist/Product-b32fb0e1.js +7 -0
- package/dist/Product-d01e3a0d.mjs +839 -0
- package/dist/ProductEdit-2b4d1d88.js +1 -0
- package/dist/ProductEdit-5e479343.mjs +300 -0
- package/dist/ProfileBlogposts-070cb7e9.mjs +65 -0
- package/dist/ProfileBlogposts-b6bf0c42.js +1 -0
- package/dist/ProfileComments-8a0c489c.mjs +44 -0
- package/dist/ProfileComments-f0000ea6.js +1 -0
- package/dist/ProfileEvents-8b88287a.js +1 -0
- package/dist/ProfileEvents-d978617d.mjs +57 -0
- package/dist/ProfileLikes-d5f9f058.js +1 -0
- package/dist/ProfileLikes-f5ad4497.mjs +44 -0
- package/dist/ProfileOrganizations-422d1fa5.js +1 -0
- package/dist/ProfileOrganizations-6b1bc5b2.mjs +213 -0
- package/dist/Publics-640d32fc.mjs +123 -0
- package/dist/Publics-8595ab7e.js +1 -0
- package/dist/Socials-43293869.js +1 -0
- package/dist/Tab-dcd62005.js +1 -0
- package/dist/UploadImage-dfb36cdb.js +1 -0
- package/dist/UploadImage-e4418b43.mjs +83 -0
- package/dist/UploadImageMultiple-c9a7b54f.js +1 -0
- package/dist/UploadImageMultiple-d2d48f39.mjs +58 -0
- package/dist/auth-45a454f2.js +7 -0
- package/dist/auth-5cd34aae.mjs +905 -0
- package/dist/auth.client.cjs +8 -8
- package/dist/auth.client.js +16 -15
- package/dist/auth.validation-4b016fa5.js +1 -0
- package/dist/auth.validation-a52304cf.mjs +20 -0
- package/dist/backoffice.client.cjs +1 -0
- package/dist/backoffice.client.js +69 -0
- package/dist/carousel.es-cdfb392c.js +5 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +23 -22
- package/dist/components/EditImages/EditImages.vue.d.ts +7 -0
- package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
- package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +17 -16
- package/dist/files.server.js +149 -112
- package/dist/files.server.mjs +149 -112
- package/dist/gallery.server.js +127 -0
- package/dist/gallery.server.mjs +128 -0
- package/dist/index-2059e444.js +2 -0
- package/dist/index-4e469a71.mjs +941 -0
- package/dist/landing.client.cjs +1 -1
- package/dist/modules/gallery/components/sections/Gallery.vue.d.ts +2 -0
- package/dist/modules/icons/navigation/IconChevronRight.vue.d.ts +13 -1
- package/dist/modules/mobile/components/Menu/MenuItem.vue.d.ts +14 -2
- package/dist/organizations-81e762e7.mjs +122 -0
- package/dist/organizations-cf1ab766.js +1 -0
- package/dist/organizations.client-b692a78a.mjs +3018 -0
- package/dist/organizations.client-bdc9b044.js +3 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +44 -43
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +224 -184
- package/dist/vue-draggable-next.esm-bundler-21a209c6.js +10 -0
- package/dist/vuex.esm-bundler-685cf29f.js +5 -0
- package/package.json +10 -1
- package/src/components/EditImages/EditImages.vue +55 -0
- package/src/configurator/components/layouts/layoutConfigurator.vue +0 -40
- package/src/modules/backoffice/backoffice.client.js +15 -0
- package/src/modules/backoffice/components/layouts/Account.vue +48 -58
- package/src/modules/backoffice/router/backoffice.js +20 -0
- package/src/modules/files/controllers/files.controller.js +27 -131
- package/src/modules/files/middlewares/server/index.js +10 -0
- package/src/modules/files/middlewares/server/md.js +151 -0
- package/src/modules/files/middlewares/server/middlewareMulter.js +121 -0
- package/src/modules/files/routes/files.routes.js +20 -6
- package/src/modules/gallery/components/sections/Gallery.vue +414 -0
- package/src/modules/gallery/controllers/gallery.controller.js +87 -73
- package/src/modules/gallery/gallery.client.js +17 -0
- package/src/modules/gallery/gallery.server.js +13 -0
- package/src/modules/gallery/models/photo.model.js +20 -14
- package/src/modules/gallery/routes/gallery.routes.js +18 -9
- package/src/modules/gallery/store/gallery.js +25 -19
- package/src/modules/icons/navigation/IconChevronRight.vue +14 -2
- package/src/modules/mobile/components/Menu/Menu.vue +1 -1
- package/src/modules/mobile/components/Menu/MenuItem.vue +8 -2
- package/src/modules/users/components/pages/Profile.vue +22 -1
- package/src/modules/backoffice/components/pages/Profile.vue +0 -109
- package/src/modules/backoffice/components/pages/profile/ProfileEdit.vue +0 -132
@@ -0,0 +1,213 @@
|
|
1
|
+
import { openBlock as r, createElementBlock as o, createStaticVNode as $, ref as c, onMounted as C, createVNode as d, TransitionGroup as v, withCtx as g, Fragment as k, renderList as w, createBlock as f, createCommentVNode as u, Transition as h, normalizeClass as N, watch as q, createElementVNode as O, unref as y } from "vue";
|
2
|
+
import { useRoute as M, useRouter as D } from "vue-router";
|
3
|
+
import { _ as F } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as L } from "./EmptyState-34d85f10.mjs";
|
5
|
+
import { _ as V } from "./CardOrganization-e530c9d5.mjs";
|
6
|
+
import { _ as B } from "./_plugin-vue_export-helper-dad06003.mjs";
|
7
|
+
import { a as x } from "./organizations-81e762e7.mjs";
|
8
|
+
import { s as _ } from "./auth-5cd34aae.mjs";
|
9
|
+
import "./inputs.validation-14e8e01f.mjs";
|
10
|
+
import "./globals-96ba60e4.mjs";
|
11
|
+
import "vue-i18n";
|
12
|
+
import "./ButtonFollow-23c4d9fc.mjs";
|
13
|
+
import "./index-4e469a71.mjs";
|
14
|
+
const E = {}, G = {
|
15
|
+
width: "100%",
|
16
|
+
height: "20rem",
|
17
|
+
xmlns: "http://www.w3.org/2000/svg"
|
18
|
+
}, P = /* @__PURE__ */ $('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), R = [
|
19
|
+
P
|
20
|
+
];
|
21
|
+
function T(p, e) {
|
22
|
+
return r(), o("svg", G, R);
|
23
|
+
}
|
24
|
+
const U = /* @__PURE__ */ B(E, [["render", T]]), j = { class: "feed" }, z = {
|
25
|
+
__name: "Feed",
|
26
|
+
props: {
|
27
|
+
category: {
|
28
|
+
type: String,
|
29
|
+
default: null
|
30
|
+
},
|
31
|
+
selectedDate: {
|
32
|
+
type: String,
|
33
|
+
default: null
|
34
|
+
},
|
35
|
+
organization: {
|
36
|
+
type: String,
|
37
|
+
default: null
|
38
|
+
},
|
39
|
+
owner: {
|
40
|
+
type: String,
|
41
|
+
default: null
|
42
|
+
},
|
43
|
+
user: {
|
44
|
+
type: [String, Number],
|
45
|
+
default: null
|
46
|
+
},
|
47
|
+
member: {
|
48
|
+
type: [String, Number],
|
49
|
+
default: null
|
50
|
+
},
|
51
|
+
subscriber: {
|
52
|
+
type: [String, Number],
|
53
|
+
default: null
|
54
|
+
},
|
55
|
+
sortOrder: {
|
56
|
+
type: String,
|
57
|
+
default: "desc"
|
58
|
+
},
|
59
|
+
participant: {
|
60
|
+
type: String,
|
61
|
+
default: null
|
62
|
+
},
|
63
|
+
period: {
|
64
|
+
type: String,
|
65
|
+
default: null
|
66
|
+
},
|
67
|
+
status: {
|
68
|
+
type: String,
|
69
|
+
default: null
|
70
|
+
}
|
71
|
+
},
|
72
|
+
setup(p) {
|
73
|
+
const e = p, a = c([]), n = c(!1), t = c(!0), i = c(0), s = c(20), b = async () => {
|
74
|
+
if (n.value) {
|
75
|
+
i.value += s.value;
|
76
|
+
const l = await x.read({
|
77
|
+
skip: i.value,
|
78
|
+
limit: s.value,
|
79
|
+
category: e.category,
|
80
|
+
sortOrder: e.sortOrder,
|
81
|
+
member: e.member,
|
82
|
+
subscriber: e.subscriber,
|
83
|
+
onlyuser: e.onlyuser,
|
84
|
+
user: e.user,
|
85
|
+
date: e.selectedDate,
|
86
|
+
owner: e.owner,
|
87
|
+
organization: e.organization,
|
88
|
+
period: e.period,
|
89
|
+
status: e.status
|
90
|
+
});
|
91
|
+
l.length === 0 ? n.value = !1 : n.value = !0, a.value = [...a.value, ...l];
|
92
|
+
}
|
93
|
+
};
|
94
|
+
return C(async () => {
|
95
|
+
t.value = !0, console.log(e.selectedDate);
|
96
|
+
const l = await x.read({
|
97
|
+
skip: i.value,
|
98
|
+
limit: s.value,
|
99
|
+
category: e.category,
|
100
|
+
member: e.member,
|
101
|
+
subscriber: e.subscriber,
|
102
|
+
onlyuser: e.onlyuser,
|
103
|
+
sortOrder: e.sortOrder,
|
104
|
+
user: e.user,
|
105
|
+
owner: e.owner,
|
106
|
+
date: e.selectedDate,
|
107
|
+
organization: e.organization,
|
108
|
+
period: e.period,
|
109
|
+
status: e.status
|
110
|
+
});
|
111
|
+
l.length === 0 ? n.value = !1 : n.value = !0, a.value = l, t.value = !1;
|
112
|
+
}), (l, J) => (r(), o("section", j, [
|
113
|
+
d(v, {
|
114
|
+
tag: "ul",
|
115
|
+
name: "fade",
|
116
|
+
class: "o-hidden bg-grey radius-big"
|
117
|
+
}, {
|
118
|
+
default: g(() => [
|
119
|
+
t.value ? (r(!0), o(k, { key: 0 }, w(s.value, (m) => (r(), f(U, { key: m }))), 128)) : u("", !0)
|
120
|
+
]),
|
121
|
+
_: 1
|
122
|
+
}),
|
123
|
+
d(h, { name: "fade" }, {
|
124
|
+
default: g(() => [
|
125
|
+
!t.value && a.value.length < 1 ? (r(), f(L, {
|
126
|
+
key: 0,
|
127
|
+
title: "No Organizations Found",
|
128
|
+
description: "Currently, there are no organizations available. Please check back later.",
|
129
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
130
|
+
})) : u("", !0)
|
131
|
+
]),
|
132
|
+
_: 1
|
133
|
+
}),
|
134
|
+
d(v, {
|
135
|
+
tag: "ul",
|
136
|
+
name: "fade",
|
137
|
+
class: "container"
|
138
|
+
}, {
|
139
|
+
default: g(() => [
|
140
|
+
!t.value && a.value.length > 0 ? (r(!0), o(k, { key: 0 }, w(a.value, (m, S) => (r(), f(V, {
|
141
|
+
onClick: (K) => l.$router.push({ name: "Organization", params: { _id: m._id } }),
|
142
|
+
key: m._id,
|
143
|
+
organization: m,
|
144
|
+
user: p.user,
|
145
|
+
type: "normal",
|
146
|
+
class: N(["w-100 radius-big mn-medium", {
|
147
|
+
"br-b br-solid br-black-transp-10": S !== a.value.length - 1
|
148
|
+
}])
|
149
|
+
}, null, 8, ["onClick", "organization", "user", "class"]))), 128)) : u("", !0),
|
150
|
+
n.value && a.value.length > 0 ? (r(), o("button", {
|
151
|
+
key: 1,
|
152
|
+
onClick: b,
|
153
|
+
class: "w-100 bg-main button"
|
154
|
+
}, "Load more")) : u("", !0)
|
155
|
+
]),
|
156
|
+
_: 1
|
157
|
+
})
|
158
|
+
]));
|
159
|
+
}
|
160
|
+
}, A = { class: "pd-thin" }, H = { class: "mn-medium flex-v-center flex-nowrap flex" }, I = /* @__PURE__ */ O("h2", { class: "mn-r-medium" }, "Groups", -1), oe = {
|
161
|
+
__name: "ProfileOrganizations",
|
162
|
+
setup(p) {
|
163
|
+
const e = M(), a = D();
|
164
|
+
let n = e.query.tab ? e.query.tab : "member";
|
165
|
+
const t = c(n);
|
166
|
+
return e.query.tab = t.value, q(t, (i) => {
|
167
|
+
a.replace({ query: { ...e.query, tab: i } });
|
168
|
+
}), (i, s) => (r(), o("div", A, [
|
169
|
+
O("header", H, [
|
170
|
+
I,
|
171
|
+
_.user._id === y(e).params._id ? (r(), o("button", {
|
172
|
+
key: 0,
|
173
|
+
onClick: s[0] || (s[0] = (b) => i.$router.push({
|
174
|
+
name: "Create Organization"
|
175
|
+
})),
|
176
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
177
|
+
}, " + ")) : u("", !0)
|
178
|
+
]),
|
179
|
+
d(F, {
|
180
|
+
selected: t.value,
|
181
|
+
"onUpdate:selected": s[1] || (s[1] = (b) => t.value = b),
|
182
|
+
tabs: [
|
183
|
+
{ name: "Member", value: "member" },
|
184
|
+
{ name: "Follower", value: "follower" }
|
185
|
+
],
|
186
|
+
class: "mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"
|
187
|
+
}, null, 8, ["selected"]),
|
188
|
+
d(h, { name: "slide-fade" }, {
|
189
|
+
default: g(() => [
|
190
|
+
t.value === "member" ? (r(), f(z, {
|
191
|
+
key: 0,
|
192
|
+
user: _.user._id,
|
193
|
+
owner: y(e).params._id
|
194
|
+
}, null, 8, ["user", "owner"])) : u("", !0)
|
195
|
+
]),
|
196
|
+
_: 1
|
197
|
+
}),
|
198
|
+
d(h, { name: "slide-fade" }, {
|
199
|
+
default: g(() => [
|
200
|
+
t.value === "follower" ? (r(), f(z, {
|
201
|
+
key: 0,
|
202
|
+
user: _.user._id,
|
203
|
+
subscriber: y(e).params._id
|
204
|
+
}, null, 8, ["user", "subscriber"])) : u("", !0)
|
205
|
+
]),
|
206
|
+
_: 1
|
207
|
+
})
|
208
|
+
]));
|
209
|
+
}
|
210
|
+
};
|
211
|
+
export {
|
212
|
+
oe as default
|
213
|
+
};
|
@@ -0,0 +1,123 @@
|
|
1
|
+
import { ref as _, watch as C, computed as S, openBlock as e, createElementBlock as t, Fragment as h, createElementVNode as m, normalizeClass as b, toDisplayString as p, createCommentVNode as c, withModifiers as z, createVNode as y, Transition as g, withCtx as k, renderList as M, unref as u, onMounted as B, createBlock as w } from "vue";
|
2
|
+
import "./Breadcrumbs.vue_vue_type_style_index_0_lang-579e2c7a.mjs";
|
3
|
+
import { _ as O } from "./_plugin-vue_export-helper-dad06003.mjs";
|
4
|
+
import { _ as U } from "./CardOrganization-e530c9d5.mjs";
|
5
|
+
import { _ as E } from "./EmptyState-34d85f10.mjs";
|
6
|
+
import { s as x } from "./auth-5cd34aae.mjs";
|
7
|
+
import { a as N } from "./organizations-81e762e7.mjs";
|
8
|
+
import { m as P } from "./ButtonFollow-23c4d9fc.mjs";
|
9
|
+
const V = {
|
10
|
+
key: 0,
|
11
|
+
class: "t-transp mn-r-small"
|
12
|
+
}, L = ["onClick"], j = ["onClick"], A = {
|
13
|
+
key: 0,
|
14
|
+
class: "mn-t-thin invalid-feedback"
|
15
|
+
}, D = {
|
16
|
+
__name: "Select",
|
17
|
+
props: {
|
18
|
+
label: String,
|
19
|
+
select: [String, Object],
|
20
|
+
placeholder: { type: String, default: "Please select an item" },
|
21
|
+
options: { type: Array, default: () => [] },
|
22
|
+
validation: Boolean
|
23
|
+
},
|
24
|
+
emits: ["update:select", "focus", "blur"],
|
25
|
+
setup(o, { emit: s }) {
|
26
|
+
const a = o, l = _(a.select), i = _(!1);
|
27
|
+
C(() => a.select, (n) => {
|
28
|
+
l.value = n;
|
29
|
+
});
|
30
|
+
const r = S(() => a.select ? a.options.filter((n) => n !== a.select) : a.options), f = () => {
|
31
|
+
i.value = !i.value, s(i.value ? "focus" : "blur");
|
32
|
+
}, $ = (n) => {
|
33
|
+
l.value = n, f(), s("update:select", l.value);
|
34
|
+
};
|
35
|
+
return (n, T) => {
|
36
|
+
var v;
|
37
|
+
return e(), t(h, null, [
|
38
|
+
m("div", {
|
39
|
+
class: b([n.$attrs.class, "flex-nowrap flex"])
|
40
|
+
}, [
|
41
|
+
o.label ? (e(), t("div", V, [
|
42
|
+
m("span", null, p(o.label), 1)
|
43
|
+
])) : c("", !0),
|
44
|
+
m("li", {
|
45
|
+
onClick: z(f, ["stop"]),
|
46
|
+
class: "w-100"
|
47
|
+
}, [
|
48
|
+
m("span", null, p(((v = l.value) == null ? void 0 : v.name) || l.value || o.placeholder), 1)
|
49
|
+
], 8, L),
|
50
|
+
y(g, {
|
51
|
+
mode: "out-in",
|
52
|
+
name: "fade"
|
53
|
+
}, {
|
54
|
+
default: k(() => [
|
55
|
+
i.value ? (e(), t("ul", {
|
56
|
+
key: 0,
|
57
|
+
class: b([n.$attrs.class, "pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])
|
58
|
+
}, [
|
59
|
+
(e(!0), t(h, null, M(u(r), (d) => (e(), t("li", null, [
|
60
|
+
d ? (e(), t("span", {
|
61
|
+
key: 0,
|
62
|
+
onClick: (q) => $(d),
|
63
|
+
class: "w-100"
|
64
|
+
}, p(d.name || d), 9, j)) : c("", !0)
|
65
|
+
]))), 256))
|
66
|
+
], 2)) : c("", !0)
|
67
|
+
]),
|
68
|
+
_: 1
|
69
|
+
})
|
70
|
+
], 2),
|
71
|
+
y(g, {
|
72
|
+
mode: "out-in",
|
73
|
+
name: "fade"
|
74
|
+
}, {
|
75
|
+
default: k(() => [
|
76
|
+
o.validation ? (e(), t("div", A, " * " + p(o.validation.message), 1)) : c("", !0)
|
77
|
+
]),
|
78
|
+
_: 1
|
79
|
+
})
|
80
|
+
], 64);
|
81
|
+
};
|
82
|
+
}
|
83
|
+
}, Y = /* @__PURE__ */ O(D, [["__scopeId", "data-v-a78dbba1"]]);
|
84
|
+
const F = { class: "w-100 o-scroll" }, I = {
|
85
|
+
key: 1,
|
86
|
+
class: "w-max gap-thin flex-nowrap flex"
|
87
|
+
}, Z = {
|
88
|
+
__name: "Publics",
|
89
|
+
setup(o) {
|
90
|
+
let s = _(null);
|
91
|
+
B(async () => {
|
92
|
+
s.value = await N.read({
|
93
|
+
user: x.user._id,
|
94
|
+
sort: "numberOfMemberships",
|
95
|
+
limit: 10,
|
96
|
+
types: ["public"]
|
97
|
+
});
|
98
|
+
});
|
99
|
+
const a = ({ membership: l, isMember: i, targetId: r }) => {
|
100
|
+
P.handleMembershipUpdate(s.value, l, i, r);
|
101
|
+
};
|
102
|
+
return (l, i) => (e(), t("div", F, [
|
103
|
+
!u(s) || u(s).length < 1 ? (e(), w(E, {
|
104
|
+
key: 0,
|
105
|
+
title: "Unfortunately, we couldn't find any recommendations for you",
|
106
|
+
description: "Explore and find a community or organization that suits your interests.",
|
107
|
+
class: "radius-big bg-grey pd-medium"
|
108
|
+
})) : (e(), t("div", I, [
|
109
|
+
u(s) ? (e(!0), t(h, { key: 0 }, M(u(s), (r, f) => (e(), w(U, {
|
110
|
+
key: r._id,
|
111
|
+
organization: r,
|
112
|
+
user: x.user,
|
113
|
+
onUpdateMembership: a,
|
114
|
+
class: "flex-child-1 flex-child w-25r"
|
115
|
+
}, null, 8, ["organization", "user"]))), 128)) : c("", !0)
|
116
|
+
]))
|
117
|
+
]));
|
118
|
+
}
|
119
|
+
};
|
120
|
+
export {
|
121
|
+
Y as S,
|
122
|
+
Z as _
|
123
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-cab2bcd2.js");const p=require("./_plugin-vue_export-helper-f246444f.js"),f=require("./CardOrganization-63dcc83b.js"),k=require("./EmptyState-7658d7d6.js"),d=require("./auth-45a454f2.js"),_=require("./organizations-cf1ab766.js"),h=require("./ButtonFollow-bf5e6d42.js"),y={key:0,class:"t-transp mn-r-small"},B=["onClick"],g=["onClick"],v={key:0,class:"mn-t-thin invalid-feedback"},b={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(a,{emit:t}){const n=a,l=e.ref(n.select),s=e.ref(!1);e.watch(()=>n.select,o=>{l.value=o});const c=e.computed(()=>n.select?n.options.filter(o=>o!==n.select):n.options),i=()=>{s.value=!s.value,t(s.value?"focus":"blur")},m=o=>{l.value=o,i(),t("update:select",l.value)};return(o,V)=>{var u;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([o.$attrs.class,"flex-nowrap flex"])},[a.label?(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("span",null,e.toDisplayString(a.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",{onClick:e.withModifiers(i,["stop"]),class:"w-100"},[e.createElementVNode("span",null,e.toDisplayString(((u=l.value)==null?void 0:u.name)||l.value||a.placeholder),1)],8,B),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([o.$attrs.class,"pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),r=>(e.openBlock(),e.createElementBlock("li",null,[r?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:N=>m(r),class:"w-100"},e.toDisplayString(r.name||r),9,g)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0)]),_:1})],2),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[a.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(a.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},w=p._export_sfc(b,[["__scopeId","data-v-a78dbba1"]]);const E={class:"w-100 o-scroll"},x={key:1,class:"w-max gap-thin flex-nowrap flex"},C={__name:"Publics",setup(a){let t=e.ref(null);e.onMounted(async()=>{t.value=await _.actions.read({user:d.state.user._id,sort:"numberOfMemberships",limit:10,types:["public"]})});const n=({membership:l,isMember:s,targetId:c})=>{h.mutations.handleMembershipUpdate(t.value,l,s,c)};return(l,s)=>(e.openBlock(),e.createElementBlock("div",E,[!e.unref(t)||e.unref(t).length<1?(e.openBlock(),e.createBlock(k._sfc_main,{key:0,title:"Unfortunately, we couldn't find any recommendations for you",description:"Explore and find a community or organization that suits your interests.",class:"radius-big bg-grey pd-medium"})):(e.openBlock(),e.createElementBlock("div",x,[e.unref(t)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(t),(c,i)=>(e.openBlock(),e.createBlock(f._sfc_main,{key:c._id,organization:c,user:d.state.user,onUpdateMembership:n,class:"flex-child-1 flex-child w-25r"},null,8,["organization","user"]))),128)):e.createCommentVNode("",!0)]))]))}};exports.Select=w;exports._sfc_main=C;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),c=require("./_plugin-vue_export-helper-f246444f.js"),i={},_={width:"40",height:"33",viewBox:"0 0 40 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a=e.createElementVNode("path",{d:"M9.75391 18.7989L14.1454 30.9541C14.1454 30.9541 14.6945 32.0914 15.2824 32.0914C15.8704 32.0914 24.6149 22.9943 24.6149 22.9943L34.3391 4.21216L9.9106 15.6613L9.75391 18.7989Z",fill:"#C8DAEA"},null,-1),d=e.createElementVNode("path",{d:"M15.5785 21.916L14.7355 30.8755C14.7355 30.8755 14.3826 33.6208 17.1273 30.8755C19.8719 28.1302 22.4991 26.0133 22.4991 26.0133",fill:"#A9C6D8"},null,-1),h=e.createElementVNode("path",{d:"M9.8345 19.2327L0.800944 16.2894C0.800944 16.2894 -0.278665 15.8514 0.0689689 14.8581C0.140532 14.6533 0.28489 14.479 0.716734 14.1795C2.71833 12.7844 37.7646 0.18778 37.7646 0.18778C37.7646 0.18778 38.7541 -0.145665 39.3377 0.0761175C39.4821 0.120809 39.612 0.20305 39.7142 0.314426C39.8164 0.425801 39.8871 0.562314 39.9192 0.710002C39.9823 0.970857 40.0086 1.23923 39.9975 1.50737C39.9948 1.73933 39.9667 1.95433 39.9454 2.29148C39.732 5.73543 33.3444 31.4388 33.3444 31.4388C33.3444 31.4388 32.9622 32.9428 31.5929 32.9943C31.2564 33.0052 30.9212 32.9482 30.6072 32.8267C30.2932 32.7053 30.0069 32.5218 29.7653 32.2873C27.0783 29.976 17.7912 23.7347 15.739 22.362C15.6927 22.3305 15.6538 22.2894 15.6247 22.2415C15.5957 22.1936 15.5772 22.14 15.5706 22.0844C15.5419 21.9397 15.6992 21.7605 15.6992 21.7605C15.6992 21.7605 31.8706 7.38631 32.3009 5.87732C32.3342 5.76041 32.2083 5.70273 32.0393 5.75394C30.9652 6.14908 12.346 17.9073 10.291 19.2049C10.1431 19.2497 9.98675 19.2592 9.8345 19.2327V19.2327Z",fill:"white"},null,-1),m=[a,d,h];function f(n,t){return e.openBlock(),e.createElementBlock("svg",_,m)}const w=c._export_sfc(i,[["render",f]]),p={},u={fill:"none",height:"40",viewBox:"0 0 40 40",width:"40",xmlns:"http://www.w3.org/2000/svg"},g=e.createElementVNode("path",{d:"m20 0c-11.046 0-20 9.0085-20 20.1217 0 10.0428 7.314 18.3672 16.876 19.8783v-14.0631h-5.08v-5.8152h5.08v-4.4328c0-5.0425 2.984-7.82734 7.554-7.82734 2.188 0 4.476.39238 4.476.39238v4.94996h-2.52c-2.486 0-3.26 1.5514-3.26 3.143v3.7748h5.546l-.886 5.8152h-4.66v14.0631c9.56-1.5091 16.874-9.8375 16.874-19.8783 0-11.1132-8.954-20.1217-20-20.1217z",fill:"#fff"},null,-1),x=[g];function $(n,t){return e.openBlock(),e.createElementBlock("svg",u,x)}const v=c._export_sfc(p,[["render",$]]),V={},b={width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k=e.createElementVNode("path",{d:"M20.0019 0C14.5702 0 13.8885 0.0237504 11.7551 0.120834C9.62593 0.218334 8.17259 0.555417 6.90091 1.05C5.58547 1.56083 4.46963 2.24417 3.35795 3.35625C2.24544 4.46792 1.5621 5.58375 1.04959 6.89875C0.553755 8.17083 0.216252 9.62458 0.120418 11.7529C0.0250001 13.8862 0 14.5683 0 20C0 25.4317 0.0241673 26.1113 0.120835 28.2446C0.218753 30.3738 0.555839 31.8271 1.05001 33.0987C1.56127 34.4142 2.24461 35.53 3.3567 36.6417C4.46796 37.7542 5.58381 38.4392 6.89841 38.95C8.17092 39.4446 9.62468 39.7817 11.7535 39.8792C13.8868 39.9762 14.5681 40 19.9994 40C25.4315 40 26.1111 39.9762 28.2445 39.8792C30.3737 39.7817 31.8287 39.4446 33.1012 38.95C34.4162 38.4392 35.5304 37.7542 36.6416 36.6417C37.7541 35.53 38.4375 34.4142 38.95 33.0992C39.4417 31.8271 39.7792 30.3733 39.8792 28.245C39.975 26.1117 40 25.4317 40 20C40 14.5683 39.975 13.8867 39.8792 11.7533C39.7792 9.62417 39.4417 8.17083 38.95 6.89917C38.4375 5.58375 37.7541 4.46792 36.6416 3.35625C35.5291 2.24375 34.4166 1.56042 33.0999 1.05C31.8249 0.555417 30.3707 0.218334 28.2415 0.120834C26.1082 0.0237504 25.429 0 19.9956 0H20.0019ZM18.2077 3.60417C18.7402 3.60333 19.3344 3.60417 20.0019 3.60417C25.3419 3.60417 25.9749 3.62333 28.0836 3.71917C30.0336 3.80833 31.092 4.13417 31.797 4.40792C32.7303 4.77042 33.3958 5.20375 34.0954 5.90375C34.7954 6.60375 35.2287 7.27042 35.592 8.20375C35.8658 8.90792 36.192 9.96625 36.2808 11.9162C36.3766 14.0246 36.3975 14.6579 36.3975 19.9954C36.3975 25.3329 36.3766 25.9662 36.2808 28.0746C36.1916 30.0246 35.8658 31.0829 35.592 31.7871C35.2295 32.7204 34.7954 33.385 34.0954 34.0846C33.3953 34.7846 32.7308 35.2179 31.797 35.5804C31.0928 35.8554 30.0336 36.1804 28.0836 36.2696C25.9753 36.3654 25.3419 36.3863 20.0019 36.3863C14.6614 36.3863 14.0285 36.3654 11.9201 36.2696C9.9701 36.1796 8.91176 35.8537 8.20634 35.58C7.27299 35.2175 6.60632 34.7842 5.90631 34.0842C5.2063 33.3842 4.77297 32.7192 4.40963 31.7854C4.13588 31.0813 3.80962 30.0229 3.72087 28.0729C3.62504 25.9646 3.60587 25.3312 3.60587 19.9904C3.60587 14.6496 3.62504 14.0196 3.72087 11.9113C3.81004 9.96125 4.13588 8.90292 4.40963 8.19792C4.77213 7.26458 5.2063 6.59792 5.90631 5.89792C6.60632 5.19792 7.27299 4.76458 8.20634 4.40125C8.91134 4.12625 9.9701 3.80125 11.9201 3.71167C13.7651 3.62833 14.4802 3.60333 18.2077 3.59917V3.60417ZM30.6778 6.925C29.3528 6.925 28.2778 7.99875 28.2778 9.32417C28.2778 10.6492 29.3528 11.7242 30.6778 11.7242C32.0028 11.7242 33.0778 10.6492 33.0778 9.32417C33.0778 7.99917 32.0028 6.92417 30.6778 6.92417V6.925ZM20.0019 9.72917C14.3297 9.72917 9.73093 14.3279 9.73093 20C9.73093 25.6721 14.3297 30.2687 20.0019 30.2687C25.674 30.2687 30.2711 25.6721 30.2711 20C30.2711 14.3279 25.6736 9.72917 20.0015 9.72917H20.0019ZM20.0019 13.3333C23.6836 13.3333 26.6686 16.3179 26.6686 20C26.6686 23.6817 23.6836 26.6667 20.0019 26.6667C16.3198 26.6667 13.3351 23.6817 13.3351 20C13.3351 16.3179 16.3198 13.3333 20.0019 13.3333V13.3333Z",fill:"white"},null,-1),B=[k];function E(n,t){return e.openBlock(),e.createElementBlock("svg",b,B)}const H=c._export_sfc(V,[["render",E]]),M={},Z={width:"40",height:"33",viewBox:"0 0 40 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L=e.createElementVNode("path",{d:"M35.9049 8.17058C35.9293 8.52666 35.9293 8.88274 35.9293 9.2421C35.9293 20.192 27.6742 32.8205 12.5793 32.8205V32.814C8.12025 32.8205 3.75381 31.5307 0 29.0989C0.648385 29.1777 1.30002 29.217 1.95328 29.2187C5.64859 29.222 9.23827 27.9699 12.1454 25.6645C8.63376 25.5972 5.55434 23.2851 4.47857 19.9097C5.70871 20.1493 6.97623 20.1001 8.18363 19.767C4.35507 18.9859 1.60065 15.5892 1.60065 11.6444V11.5394C2.74142 12.181 4.01869 12.5371 5.32521 12.5765C1.71928 10.143 0.607759 5.29897 2.78529 1.51172C6.95186 6.68883 13.0993 9.83612 19.6986 10.1692C19.0372 7.29105 19.9407 4.27503 22.0727 2.25178C25.378 -0.885667 30.5765 -0.724857 33.6835 2.61114C35.5214 2.24521 37.283 1.56423 38.895 0.599367C38.2823 2.51761 37.0002 4.14704 35.2874 5.18246C36.9141 4.98883 38.5034 4.54907 40 3.87793C38.8982 5.54511 37.5105 6.99732 35.9049 8.17058Z",fill:"white"},null,-1),y=[L];function I(n,t){return e.openBlock(),e.createElementBlock("svg",Z,y)}const N=c._export_sfc(M,[["render",I]]),S={},z={width:"40",height:"36",viewBox:"0 0 40 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D=e.createElementVNode("path",{d:"M40 17.9021C40 15.4963 38.0287 13.5858 35.6272 13.5858C34.4444 13.5858 33.3692 14.0457 32.5806 14.7887C29.5699 12.6659 25.448 11.2861 20.8602 11.1092L22.8674 1.83974L29.3907 3.21955C29.4624 4.84701 30.8244 6.15605 32.509 6.15605C34.2294 6.15605 35.6272 4.77625 35.6272 3.07803C35.6272 1.37981 34.2294 0 32.509 0C31.2903 0 30.2151 0.707593 29.7133 1.7336L22.4373 0.21228C22.2222 0.1769 22.0072 0.212278 21.8638 0.318417C21.6846 0.424556 21.5771 0.601454 21.5412 0.813732L19.319 11.1446C14.6595 11.2861 10.466 12.6659 7.41936 14.8241C6.63083 14.0811 5.55556 13.6211 4.37276 13.6211C1.93549 13.6211 0 15.567 0 17.9375C0 19.7064 1.07527 21.1924 2.58065 21.8646C2.50896 22.2892 2.47312 22.7137 2.47312 23.1736C2.47312 29.825 10.3226 35.2381 20 35.2381C29.6774 35.2381 37.5269 29.8604 37.5269 23.1736C37.5269 22.7491 37.491 22.2892 37.4194 21.8646C38.9247 21.1924 40 19.6711 40 17.9021V17.9021ZM9.96416 20.9801C9.96416 19.2819 11.362 17.9021 13.0824 17.9021C14.8029 17.9021 16.2007 19.2819 16.2007 20.9801C16.2007 22.6783 14.8029 24.0581 13.0824 24.0581C11.362 24.0935 9.96416 22.6783 9.96416 20.9801V20.9801ZM27.4194 29.1528C25.2688 31.2756 21.1828 31.4171 20 31.4171C18.7814 31.4171 14.6953 31.2402 12.5806 29.1528C12.2581 28.8344 12.2581 28.3391 12.5806 28.0206C12.9032 27.7022 13.405 27.7022 13.7276 28.0206C15.0896 29.3651 17.957 29.825 20 29.825C22.043 29.825 24.9462 29.3651 26.2724 28.0206C26.595 27.7022 27.0968 27.7022 27.4194 28.0206C27.7061 28.3391 27.7061 28.8344 27.4194 29.1528ZM26.8459 24.0935C25.1254 24.0935 23.7276 22.7137 23.7276 21.0155C23.7276 19.3173 25.1254 17.9375 26.8459 17.9375C28.5663 17.9375 29.9642 19.3173 29.9642 21.0155C29.9642 22.6783 28.5663 24.0935 26.8459 24.0935Z",fill:"white"},null,-1),q=[D];function A(n,t){return e.openBlock(),e.createElementBlock("svg",z,q)}const F=c._export_sfc(S,[["render",A]]),T={},R={width:"67",height:"64",viewBox:"0 0 67 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j=e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M66.2237 27.2403C66.2237 12.4467 51.4301 0.287598 33.1914 0.287598C14.9528 0.287598 0.15918 12.4467 0.15918 27.2403C0.15918 40.4127 11.913 51.5585 27.7198 53.585C31.5702 54.3956 31.1649 55.8142 30.3543 61.0832C30.1517 61.8938 29.5437 64.3256 33.1914 62.907C36.6365 61.4885 52.2407 51.7612 59.1309 43.6551C63.9945 38.3861 66.2237 33.1172 66.2237 27.2403ZM43.1214 35.1437V20.7554C43.1214 20.3501 42.7161 19.9448 42.3108 20.1475H40.0816C39.6763 20.1475 39.4736 20.3501 39.4736 20.7554V29.2668L32.7861 20.3501C32.7861 20.1475 32.5835 20.1475 32.3808 20.1475H29.949C29.5437 20.1475 29.341 20.3501 29.341 20.7554V35.1437C29.341 35.549 29.5437 35.7517 29.949 35.7517H32.3808C32.5835 35.7517 32.9888 35.549 32.9888 35.1437V26.6323L39.4736 35.549C39.575 35.549 39.6763 35.5997 39.7776 35.6503C39.8789 35.701 39.9803 35.7517 40.0816 35.7517H42.3108C42.7161 35.7517 43.1214 35.549 43.1214 35.1437ZM27.1119 20.7554C27.1119 20.3501 26.7066 19.9448 26.5039 19.9448H24.0721C23.6668 19.9448 23.4641 20.3501 23.4641 20.7554V35.1437C23.4641 35.549 23.6668 35.7517 24.0721 35.7517H26.5039C26.7066 35.7517 27.1119 35.549 27.1119 35.1437V20.7554ZM21.4376 32.7119C21.4376 32.5092 21.235 32.1039 20.8297 32.1039H14.5475V20.7554C14.5475 20.3501 14.3448 19.9448 13.9395 19.9448H11.5077C11.305 19.9448 10.8997 20.3501 10.8997 20.7554V35.1437C10.8997 35.245 10.9504 35.2957 11.0011 35.3464C11.0517 35.397 11.1024 35.4477 11.1024 35.549C11.2037 35.549 11.2544 35.5997 11.305 35.6503C11.3557 35.701 11.4064 35.7517 11.5077 35.7517H20.8297C21.235 35.7517 21.4376 35.3464 21.4376 35.1437V32.7119ZM55.8884 20.7554C55.8884 20.3501 55.4831 19.9448 55.2805 19.9448H45.9585C45.5532 19.9448 45.3505 20.3501 45.3505 20.7554V35.1437C45.3505 35.3464 45.5532 35.7517 45.9585 35.7517H55.2805C55.4831 35.7517 55.8884 35.549 55.8884 35.1437V32.7119C55.8884 32.5092 55.4831 32.1039 55.2805 32.1039H48.9983V29.6721H55.2805C55.4831 29.6721 55.8884 29.4695 55.8884 29.0642V26.6323C55.8884 26.4297 55.4831 26.0244 55.2805 26.0244H48.9983V23.5926H55.2805C55.4831 23.5926 55.8884 23.3899 55.8884 22.9846V20.7554Z",fill:"white"},null,-1),G=[j];function J(n,t){return e.openBlock(),e.createElementBlock("svg",R,G)}const K=c._export_sfc(T,[["render",J]]),O={},P={fill:"none",height:"40",viewBox:"0 0 40 40",width:"40",xmlns:"http://www.w3.org/2000/svg"},Q=e.createElementVNode("path",{d:"m35.7603 19.144c-.1629-3.1482-1.2512-6.1768-3.1269-8.702-.5715.6193-1.1824 1.2005-1.8289 1.74-1.9861 1.6597-4.2054 3.0144-6.5859 4.02.332.7.6361 1.378.9045 2.018v.006c.0757.1788.1486.3588.2186.54 3.0097-.34 6.1824-.216 9.2577.202.4095.056.7952.116 1.1609.176zm-18.6564-14.9c1.9373 2.74635 3.7238 5.59727 5.3514 8.54 2.4312-.964 4.441-2.18 6.0591-3.534.5617-.46574 1.0905-.97029 1.5824-1.51-2.8606-2.42057-6.4799-3.74534-10.2178-3.74-.9303-.00064-1.8588.08033-2.7751.242zm-12.62516 11.75c1.35421-.0344 2.70681-.1164 4.05531-.246 3.25945-.2933 6.49105-.843 9.66515-1.644-1.6589-2.8996-3.4499-5.72058-5.3673-8.454-2.0481 1.02079-3.85403 2.47282-5.29529 4.25758-1.44125 1.78472-2.48412 3.86052-3.05787 6.08642zm3.04149 14.076c.7713-1.134 1.78513-2.41 3.13097-3.798 2.8904-2.98 6.3016-5.3 10.2496-6.58l.1232-.036c-.328-.728-.6361-1.378-.9462-1.99-3.6498 1.07-7.4944 1.738-11.32508 2.084-1.86862.17-3.54442.244-4.77692.256-.00352 3.6652 1.24899 7.2195 3.54641 10.064zm18.33237 4.76c-.7666-3.8895-1.8517-7.7085-3.2442-11.418-3.9798 1.454-7.1505 3.58-9.6016 6.116-.9891 1.0048-1.867 2.1146-2.618 3.31 2.7409 2.0576 6.0704 3.1669 9.4902 3.162 2.0474.003 4.0759-.393 5.9736-1.166zm3.7234-2.15c3.1036-2.4005 5.2179-5.8686 5.9378-9.74-.6759-.17-1.5326-.34-2.4749-.472-2.095-.3035-4.2207-.3257-6.3215-.066 1.1829 3.3577 2.138 6.7922 2.8586 10.28zm-9.697 7.32c-10.97917 0-19.879-8.954-19.879-20s8.89983-20 19.879-20c10.9792 0 19.879 8.954 19.879 20s-8.8998 20-19.879 20z",fill:"#fff"},null,-1),U=[Q];function W(n,t){return e.openBlock(),e.createElementBlock("svg",P,U)}const X=c._export_sfc(O,[["render",W]]),Y={class:"gap-small flex-nowrap flex"},e2=["href"],t2={__name:"Socials",props:{telegram:{type:String,default:""},facebook:{type:String,default:""},instagram:{type:String,default:""},twitter:{type:String,default:""},reddit:{type:String,default:""},line:{type:String,default:""},dribbble:{type:String,default:""}},setup(n){const t=n,r=e.computed(()=>[{name:"telegram",base:"https://t.me/"},{name:"facebook",base:"https://www.facebook.com/"},{name:"instagram",base:"https://www.instagram.com/"},{name:"twitter",base:"https://twitter.com/"},{name:"reddit",base:"https://www.reddit.com/user/"},{name:"line",base:""},{name:"dribbble",base:"https://dribbble.com/"}].filter(o=>t[o.name]).map(o=>({name:o.name,href:o.base+t[o.name]})));function l(C){return{telegram:w,facebook:v,instagram:H,twitter:N,reddit:F,line:K,dribbble:X}[C]||null}return(C,o)=>(e.openBlock(),e.createElementBlock("div",Y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),s=>(e.openBlock(),e.createElementBlock("a",{key:s.name,href:s.href,target:"_blank",class:"i-big bg-second t-white flex-nowrap flex-center flex radius-extra"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(s.name)),{class:"i-medium"}))],8,e2))),128))]))}};exports._sfc_main=t2;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue");require("./inputs.validation-24ae76b9.js");const b={class:""},m={class:"flex-nowrap flex-v-center flex"},p=["onClick"],k={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const l=s,n=e.ref(0);if(l.selected){const t=l.tabs.findIndex(c=>c.value===l.selected);t!==-1&&(n.value=t)}function i(t,c){n.value=t,o("update:selected",c.value),l.callback&&l.callback()}function u(t){return`${100/l.tabs.length*t}%`}function d(){return`${100/l.tabs.length}%`}const f=e.computed(()=>({left:u(n.value),width:d()}));return(t,c)=>(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,onClick:v=>i(a,r),class:e.normalizeClass([{"t-transp":a!==n.value},"z-index-1 t-center pd-small w-100"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,p))),128)),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(f)),class:"radius-extra bg-main t-white tab-selector"},null,4)])]))}};exports._sfc_main=k;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),h=require("./index-2059e444.js"),C=["src"],m={key:1,class:"flex-v-center flex-h-center flex w-100 h-100 bg-second"},v=e.createElementVNode("svg",{class:"i-medium",width:"104",height:"104",viewBox:"0 0 104 104",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{fill:"white",d:"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"})],-1),g=[v],w={__name:"UploadImage",props:["uploadPath","photo"],emits:["update:photo"],setup(l,{emit:p}){const a=l,o=e.ref(null),r=e.ref(null);e.watch(a,({photo:t})=>{t&&(o.value=t)});function f(){r.value.click()}async function i(t){let n=t.target.files[0],s=new FormData;s.append("file",n);try{let u=await h.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(a.uploadPath)}`,s,{headers:{"Content-Type":"multipart/form-data"}});o.value=u.data.filepath,p("update:photo",o.value)}catch(c){console.error(c)}}function d(t){t.preventDefault(),i({target:{files:t.dataTransfer.files}})}return(t,n)=>(e.openBlock(),e.createElementBlock("div",{onClick:f,onDrop:d,onDragover:n[0]||(n[0]=e.withModifiers(()=>{},["prevent"])),class:"image-upload-area flex-v-center flex-h-center flex"},[o.value||l.photo?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+(o.value||l.photo),alt:"Uploaded image",class:"w-100 h-100 object-fit-cover"},null,8,C)):(e.openBlock(),e.createElementBlock("div",m,g)),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:r,onChange:i,style:{display:"none"}},null,544)],32))}};exports._sfc_main=w;
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { ref as d, watch as v, openBlock as l, createElementBlock as n, withModifiers as g, createElementVNode as i } from "vue";
|
2
|
+
import { a as w } from "./index-4e469a71.mjs";
|
3
|
+
const x = ["src"], _ = {
|
4
|
+
key: 1,
|
5
|
+
class: "flex-v-center flex-h-center flex w-100 h-100 bg-second"
|
6
|
+
}, y = /* @__PURE__ */ i("svg", {
|
7
|
+
class: "i-medium",
|
8
|
+
width: "104",
|
9
|
+
height: "104",
|
10
|
+
viewBox: "0 0 104 104",
|
11
|
+
fill: "none",
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
13
|
+
}, [
|
14
|
+
/* @__PURE__ */ i("path", {
|
15
|
+
fill: "white",
|
16
|
+
d: "M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"
|
17
|
+
})
|
18
|
+
], -1), k = [
|
19
|
+
y
|
20
|
+
], D = {
|
21
|
+
__name: "UploadImage",
|
22
|
+
props: [
|
23
|
+
"uploadPath",
|
24
|
+
// only necessary prop
|
25
|
+
"photo"
|
26
|
+
// new prop for holding the image url
|
27
|
+
],
|
28
|
+
emits: ["update:photo"],
|
29
|
+
setup(a, { emit: u }) {
|
30
|
+
const r = a, t = d(null), s = d(null);
|
31
|
+
v(r, ({ photo: e }) => {
|
32
|
+
e && (t.value = e);
|
33
|
+
});
|
34
|
+
function h() {
|
35
|
+
s.value.click();
|
36
|
+
}
|
37
|
+
async function c(e) {
|
38
|
+
let o = e.target.files[0], p = new FormData();
|
39
|
+
p.append("file", o);
|
40
|
+
try {
|
41
|
+
let m = await w.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(r.uploadPath)}`, p, {
|
42
|
+
headers: {
|
43
|
+
"Content-Type": "multipart/form-data"
|
44
|
+
}
|
45
|
+
});
|
46
|
+
t.value = m.data.filepath, u("update:photo", t.value);
|
47
|
+
} catch (f) {
|
48
|
+
console.error(f);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
function C(e) {
|
52
|
+
e.preventDefault(), c({
|
53
|
+
target: {
|
54
|
+
files: e.dataTransfer.files
|
55
|
+
}
|
56
|
+
});
|
57
|
+
}
|
58
|
+
return (e, o) => (l(), n("div", {
|
59
|
+
onClick: h,
|
60
|
+
onDrop: C,
|
61
|
+
onDragover: o[0] || (o[0] = g(() => {
|
62
|
+
}, ["prevent"])),
|
63
|
+
class: "image-upload-area flex-v-center flex-h-center flex"
|
64
|
+
}, [
|
65
|
+
t.value || a.photo ? (l(), n("img", {
|
66
|
+
key: 0,
|
67
|
+
src: (e.FILE_SERVER_URL || "") + (t.value || a.photo),
|
68
|
+
alt: "Uploaded image",
|
69
|
+
class: "w-100 h-100 object-fit-cover"
|
70
|
+
}, null, 8, x)) : (l(), n("div", _, k)),
|
71
|
+
i("input", {
|
72
|
+
type: "file",
|
73
|
+
ref_key: "fileInput",
|
74
|
+
ref: s,
|
75
|
+
onChange: c,
|
76
|
+
style: { display: "none" }
|
77
|
+
}, null, 544)
|
78
|
+
], 32));
|
79
|
+
}
|
80
|
+
};
|
81
|
+
export {
|
82
|
+
D as _
|
83
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),m=require("./index-2059e444.js"),h=e.createElementVNode("div",{class:"flex-v-center flex-h-center flex w-100 h-100"}," upload ",-1),v={__name:"UploadImageMultiple",props:["uploadPath"],emits:["update:images"],setup(i,{emit:p}){const c=i,a=e.ref([]),l=e.ref(null);function f(){l.value.click()}async function r(n){let o=n.target.files,s=new FormData;for(let t=0;t<o.length;t++)s.append("file",o[t]);try{(await m.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(c.uploadPath)}`,s,{headers:{"Content-Type":"multipart/form-data"}})).data.forEach(d=>{a.value.push(d.filepath)}),p("update:images",a.value)}catch(t){console.error(t)}}function u(n){n.preventDefault(),r({target:{files:n.dataTransfer.files}})}return(n,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:f,onDrop:u,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"flex-v-center flex-h-center flex"},[h,e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:l,onChange:r,multiple:"",style:{display:"none"}},null,544)],32))}};exports._sfc_main=v;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import { ref as s, openBlock as h, createElementBlock as v, withModifiers as x, createElementVNode as i } from "vue";
|
2
|
+
import { a as g } from "./index-4e469a71.mjs";
|
3
|
+
const _ = /* @__PURE__ */ i("div", { class: "flex-v-center flex-h-center flex w-100 h-100" }, " upload ", -1), D = {
|
4
|
+
__name: "UploadImageMultiple",
|
5
|
+
props: [
|
6
|
+
"uploadPath"
|
7
|
+
],
|
8
|
+
emits: ["update:images"],
|
9
|
+
setup(p, { emit: f }) {
|
10
|
+
const c = p, a = s([]), n = s(null);
|
11
|
+
function u() {
|
12
|
+
n.value.click();
|
13
|
+
}
|
14
|
+
async function l(t) {
|
15
|
+
let o = t.target.files, r = new FormData();
|
16
|
+
for (let e = 0; e < o.length; e++)
|
17
|
+
r.append("file", o[e]);
|
18
|
+
try {
|
19
|
+
(await g.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(c.uploadPath)}`, r, {
|
20
|
+
headers: {
|
21
|
+
"Content-Type": "multipart/form-data"
|
22
|
+
}
|
23
|
+
})).data.forEach((d) => {
|
24
|
+
a.value.push(d.filepath);
|
25
|
+
}), f("update:images", a.value);
|
26
|
+
} catch (e) {
|
27
|
+
console.error(e);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
function m(t) {
|
31
|
+
t.preventDefault(), l({
|
32
|
+
target: {
|
33
|
+
files: t.dataTransfer.files
|
34
|
+
}
|
35
|
+
});
|
36
|
+
}
|
37
|
+
return (t, o) => (h(), v("div", {
|
38
|
+
onClick: u,
|
39
|
+
onDrop: m,
|
40
|
+
onDragover: o[0] || (o[0] = x(() => {
|
41
|
+
}, ["prevent"])),
|
42
|
+
class: "flex-v-center flex-h-center flex"
|
43
|
+
}, [
|
44
|
+
_,
|
45
|
+
i("input", {
|
46
|
+
type: "file",
|
47
|
+
ref_key: "fileInput",
|
48
|
+
ref: n,
|
49
|
+
onChange: l,
|
50
|
+
multiple: "",
|
51
|
+
style: { display: "none" }
|
52
|
+
}, null, 544)
|
53
|
+
], 32));
|
54
|
+
}
|
55
|
+
};
|
56
|
+
export {
|
57
|
+
D as _
|
58
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";const a=require("vue"),de=require("./_plugin-vue_export-helper-f246444f.js"),W=require("./index-2059e444.js"),L=require("./globals-928eb13c.js");const ue={key:0,class:"t-transp mn-r-small"},fe={class:"w-100"},pe=["type","value","placeholder"],me=["value","placeholder"],ge={key:0,class:"mn-t-thin mn-thin mn-b-thin invalid-feedback"},he={__name:"Field",props:{label:null,type:"text",placeholder:"Enter something here",field:null,validation:!1,disabled:!1},emits:["update:field","focus","blur"],setup(t,{emit:e}){const n=t,s=a.ref(n.field);return(o,r)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:a.normalizeClass([[o.$attrs.class,{"bg-fourth-nano":t.validation}],"flex-center flex-nowrap flex"])},[t.label?(a.openBlock(),a.createElementBlock("div",ue,[a.createElementVNode("span",null,a.toDisplayString(t.label),1)])):a.createCommentVNode("",!0),a.createElementVNode("div",fe,[t.type!=="textarea"?(a.openBlock(),a.createElementBlock("input",{key:0,onInput:r[0]||(r[0]=i=>s.value=e("update:field",i.target.value)),onFocus:r[1]||(r[1]=i=>e("focus",i)),onBlur:r[2]||(r[2]=i=>e("blur",i)),type:t.type,class:"w-100",value:t.field,placeholder:t.placeholder},null,40,pe)):(a.openBlock(),a.createElementBlock("textarea",{key:1,onInput:r[3]||(r[3]=i=>s.value=e("update:field",i.target.value)),onFocus:r[4]||(r[4]=i=>e("focus",i)),onBlur:r[5]||(r[5]=i=>e("blur",i)),class:"w-100",value:t.field,placeholder:t.placeholder},null,40,me))])],2),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[t.validation?(a.openBlock(),a.createElementBlock("div",ge," * "+a.toDisplayString(t.validation.message),1)):a.createCommentVNode("",!0)]),_:1})],64))}},ve=de._export_sfc(he,[["__scopeId","data-v-e4056b41"]]);const we=["onClick","disabled"],be={key:0},ye={key:0,class:"loading"},Pe=a.createElementVNode("span",null,[a.createElementVNode("svg",{class:"i-small",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[a.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[a.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),a.createTextVNode(),a.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),a.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[a.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),a.createTextVNode(),a.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),a.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[a.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),a.createTextVNode(),a.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),a.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[a.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),a.createTextVNode(),a.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),a.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[a.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),a.createTextVNode(),a.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])])],-1),Ce=[Pe],ke={key:0,class:"h4 loading"},Ee=a.createElementVNode("span",{class:"p-small t-white"},"✔",-1),xe=[Ee],_e={key:0,class:"error"},Oe={__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},callbackDelay:{type:Number,default:750},validation:{type:Boolean,default:!1}},setup(t){const e=t,n=a.ref(null),s=a.ref(null),o=a.ref(!1),r=a.ref(!1);async function i(){n.value.style["pointer-events"]="none",s.value=null,o.value=!0;try{await e.submit(),n.value.classList.replace("bg-main","bg-light-main"),o.value=!1,r.value=!0,setTimeout(()=>{n.value&&(n.value.classList.replace("bg-light-main","bg-main"),n.value.style.pointerEvents="auto",o.value=!1,r.value=!1,s.value=null)},500),e.callback&&setTimeout(()=>e.callback(),e.callbackDelay)}catch{n.value.classList.replace("bg-main","bg-fourth-nano"),s.value="❌",setTimeout(()=>{n.value.classList.replace("bg-fourth-nano","bg-main"),n.value.style.pointerEvents="auto",o.value=!1,r.value=!1,s.value=null},1330)}}return(l,u)=>(a.openBlock(),a.createElementBlock("button",{onClick:a.withModifiers(i,["stop"]),disabled:t.validation,ref_key:"button",ref:n,class:"w-100 bg-main button"},[a.createVNode(a.Transition,{mode:"out-in",name:"fadeIn"},{default:a.withCtx(()=>[!o.value&&!s.value&&!r.value?(a.openBlock(),a.createElementBlock("span",be,[a.renderSlot(l.$slots,"default")])):a.createCommentVNode("",!0)]),_:3}),a.createVNode(a.Transition,{mode:"out-in",name:"fadeIn"},{default:a.withCtx(()=>[o.value&&!s.value?(a.openBlock(),a.createElementBlock("div",ye,Ce)):a.createCommentVNode("",!0)]),_:1}),a.createVNode(a.Transition,{mode:"out-in",name:"fadeIn"},{default:a.withCtx(()=>[r.value?(a.openBlock(),a.createElementBlock("div",ke,xe)):a.createCommentVNode("",!0)]),_:1}),a.createVNode(a.Transition,{mode:"out-in",name:"fadeIn"},{default:a.withCtx(()=>[s.value?(a.openBlock(),a.createElementBlock("div",_e,[a.createElementVNode("span",null,a.toDisplayString(s.value),1)])):a.createCommentVNode("",!0)]),_:1})],8,we))}};var Z={exports:{}};/*!
|
2
|
+
* JavaScript Cookie v2.2.1
|
3
|
+
* https://github.com/js-cookie/js-cookie
|
4
|
+
*
|
5
|
+
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
6
|
+
* Released under the MIT license
|
7
|
+
*/(function(t,e){(function(n){var s;if(t.exports=n(),s=!0,!s){var o=window.Cookies,r=window.Cookies=n();r.noConflict=function(){return window.Cookies=o,r}}})(function(){function n(){for(var r=0,i={};r<arguments.length;r++){var l=arguments[r];for(var u in l)i[u]=l[u]}return i}function s(r){return r.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function o(r){function i(){}function l(c,m,d){if(!(typeof document>"u")){d=n({path:"/"},i.defaults,d),typeof d.expires=="number"&&(d.expires=new Date(new Date*1+d.expires*864e5)),d.expires=d.expires?d.expires.toUTCString():"";try{var P=JSON.stringify(m);/^[\{\[]/.test(P)&&(m=P)}catch{}m=r.write?r.write(m,c):encodeURIComponent(String(m)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),c=encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var C="";for(var k in d)d[k]&&(C+="; "+k,d[k]!==!0&&(C+="="+d[k].split(";")[0]));return document.cookie=c+"="+m+C}}function u(c,m){if(!(typeof document>"u")){for(var d={},P=document.cookie?document.cookie.split("; "):[],C=0;C<P.length;C++){var k=P[C].split("="),w=k.slice(1).join("=");!m&&w.charAt(0)==='"'&&(w=w.slice(1,-1));try{var $=s(k[0]);if(w=(r.read||r)(w,$)||s(w),m)try{w=JSON.parse(w)}catch{}if(d[$]=w,c===$)break}catch{}}return c?d[c]:d}}return i.set=l,i.get=function(c){return u(c,!1)},i.getJSON=function(c){return u(c,!0)},i.remove=function(c,m){l(c,"",n(m,{expires:-1}))},i.defaults={},i.withConverter=o,i}return o(function(){})})})(Z);var Le=Z.exports;const T=W.getDefaultExportFromCjs(Le);/*! Capacitor: https://capacitorjs.com/ - MIT License */const Ne=t=>{const e=new Map;e.set("web",{name:"web"});const n=t.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},s=(r,i)=>{n.platforms.set(r,i)},o=r=>{n.platforms.has(r)&&(n.currentPlatform=n.platforms.get(r))};return n.addPlatform=s,n.setPlatform=o,n},je=t=>t.CapacitorPlatforms=Ne(t),Q=je(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Q.addPlatform;Q.setPlatform;var S;(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(S||(S={}));class H extends Error{constructor(e,n,s){super(e),this.message=e,this.code=n,this.data=s}}const Se=t=>{var e,n;return t!=null&&t.androidBridge?"android":!((n=(e=t==null?void 0:t.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},Ve=t=>{var e,n,s,o,r;const i=t.CapacitorCustomPlatform||null,l=t.Capacitor||{},u=l.Plugins=l.Plugins||{},c=t.CapacitorPlatforms,m=()=>i!==null?i.name:Se(t),d=((e=c==null?void 0:c.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||m,P=()=>d()!=="web",C=((n=c==null?void 0:c.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||P,k=f=>{const p=M.get(f);return!!(p!=null&&p.platforms.has(d())||U(f))},w=((s=c==null?void 0:c.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||k,$=f=>{var p;return(p=l.PluginHeaders)===null||p===void 0?void 0:p.find(N=>N.name===f)},U=((o=c==null?void 0:c.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||$,re=f=>t.console.error(f),ae=(f,p,N)=>Promise.reject(`${N} does not have an implementation of "${p}".`),M=new Map,oe=(f,p={})=>{const N=M.get(f);if(N)return console.warn(`Capacitor plugin "${f}" already registered. Cannot register plugins twice.`),N.proxy;const O=d(),j=U(f);let E;const ie=async()=>(!E&&O in p?E=typeof p[O]=="function"?E=await p[O]():E=p[O]:i!==null&&!E&&"web"in p&&(E=typeof p.web=="function"?E=await p.web():E=p.web),E),le=(g,v)=>{var y,x;if(j){const _=j==null?void 0:j.methods.find(b=>v===b.name);if(_)return _.rtype==="promise"?b=>l.nativePromise(f,v.toString(),b):(b,A)=>l.nativeCallback(f,v.toString(),b,A);if(g)return(y=g[v])===null||y===void 0?void 0:y.bind(g)}else{if(g)return(x=g[v])===null||x===void 0?void 0:x.bind(g);throw new H(`"${f}" plugin is not implemented on ${O}`,S.Unimplemented)}},D=g=>{let v;const y=(...x)=>{const _=ie().then(b=>{const A=le(b,g);if(A){const R=A(...x);return v=R==null?void 0:R.remove,R}else throw new H(`"${f}.${g}()" is not implemented on ${O}`,S.Unimplemented)});return g==="addListener"&&(_.remove=async()=>v()),_};return y.toString=()=>`${g.toString()}() { [capacitor code] }`,Object.defineProperty(y,"name",{value:g,writable:!1,configurable:!1}),y},J=D("addListener"),G=D("removeListener"),ce=(g,v)=>{const y=J({eventName:g},v),x=async()=>{const b=await y;G({eventName:g,callbackId:b},v)},_=new Promise(b=>y.then(()=>b({remove:x})));return _.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await x()},_},F=new Proxy({},{get(g,v){switch(v){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return j?ce:J;case"removeListener":return G;default:return D(v)}}});return u[f]=F,M.set(f,{name:f,proxy:F,platforms:new Set([...Object.keys(p),...j?[O]:[]])}),F},se=((r=c==null?void 0:c.currentPlatform)===null||r===void 0?void 0:r.registerPlugin)||oe;return l.convertFileSrc||(l.convertFileSrc=f=>f),l.getPlatform=d,l.handleError=re,l.isNativePlatform=C,l.isPluginAvailable=w,l.pluginMethodNoop=ae,l.registerPlugin=se,l.Exception=H,l.DEBUG=!!l.DEBUG,l.isLoggingEnabled=!!l.isLoggingEnabled,l.platform=l.getPlatform(),l.isNative=l.isNativePlatform(),l},$e=t=>t.Capacitor=Ve(t),I=$e(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),X=I.registerPlugin;I.Plugins;class Y{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(n);const o=this.windowListeners[e];o&&!o.registered&&this.addWindowListener(o);const r=async()=>this.removeListener(e,n),i=Promise.resolve({remove:r});return Object.defineProperty(i,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await r()}}),i}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,n){const s=this.listeners[e];s&&s.forEach(o=>o(n))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,n){this.windowListeners[n]={registered:!1,windowEventName:e,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(e="not implemented"){return new I.Exception(e,S.Unimplemented)}unavailable(e="not available"){return new I.Exception(e,S.Unavailable)}async removeListener(e,n){const s=this.listeners[e];if(!s)return;const o=s.indexOf(n);this.listeners[e].splice(o,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const z=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),K=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Be extends Y{async getCookies(){const e=document.cookie,n={};return e.split(";").forEach(s=>{if(s.length<=0)return;let[o,r]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=K(o).trim(),r=K(r).trim(),n[o]=r}),n}async setCookie(e){try{const n=z(e.key),s=z(e.value),o=`; expires=${(e.expires||"").replace("expires=","")}`,r=(e.path||"/").replace("path=",""),i=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${r}; ${i};`}catch(n){return Promise.reject(n)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const n of e)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}const ee=X("CapacitorCookies",{web:()=>new Be}),Te=async t=>new Promise((e,n)=>{const s=new FileReader;s.onload=()=>{const o=s.result;e(o.indexOf(",")>=0?o.split(",")[1]:o)},s.onerror=o=>n(o),s.readAsDataURL(t)}),Ue=(t={})=>{const e=Object.keys(t);return Object.keys(t).map(o=>o.toLocaleLowerCase()).reduce((o,r,i)=>(o[r]=t[e[i]],o),{})},Ae=(t,e=!0)=>t?Object.entries(t).reduce((s,o)=>{const[r,i]=o;let l,u;return Array.isArray(i)?(u="",i.forEach(c=>{l=e?encodeURIComponent(c):c,u+=`${r}=${l}&`}),u.slice(0,-1)):(l=e?encodeURIComponent(i):i,u=`${r}=${l}`),`${s}&${u}`},"").substr(1):null,Re=(t,e={})=>{const n=Object.assign({method:t.method||"GET",headers:t.headers},e),o=Ue(t.headers)["content-type"]||"";if(typeof t.data=="string")n.body=t.data;else if(o.includes("application/x-www-form-urlencoded")){const r=new URLSearchParams;for(const[i,l]of Object.entries(t.data||{}))r.set(i,l);n.body=r.toString()}else if(o.includes("multipart/form-data")){const r=new FormData;if(t.data instanceof FormData)t.data.forEach((l,u)=>{r.append(u,l)});else for(const l of Object.keys(t.data))r.append(l,t.data[l]);n.body=r;const i=new Headers(n.headers);i.delete("content-type"),n.headers=i}else(o.includes("application/json")||typeof t.data=="object")&&(n.body=JSON.stringify(t.data));return n};class Ie extends Y{async request(e){const n=Re(e,e.webFetchExtra),s=Ae(e.params,e.shouldEncodeUrlParams),o=s?`${e.url}?${s}`:e.url,r=await fetch(o,n),i=r.headers.get("content-type")||"";let{responseType:l="text"}=r.ok?e:{};i.includes("application/json")&&(l="json");let u,c;switch(l){case"arraybuffer":case"blob":c=await r.blob(),u=await Te(c);break;case"json":u=await r.json();break;case"document":case"text":default:u=await r.text()}const m={};return r.headers.forEach((d,P)=>{m[P]=d}),{data:u,headers:m,status:r.status,url:r.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}X("CapacitorHttp",{web:()=>new Ie});const Me=W.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),V=a.reactive({code:{value:"",type:"",method:"",isSended:!1,isValid:!1}});async function te(t,e,n){return await Me.post("/api/twofa/sendcode",{phone:t.phone.number,email:t.email,method:e,type:n}).then(s=>(V.code=s.data,V.code.isSended=!0,Promise.resolve(s.data)),s=>(console.log(s),L.setError(s),Promise.reject(s)))}a.watch(V,(t,e)=>{});const De=Object.freeze(Object.defineProperty({__proto__:null,sendCode:te,state:V},Symbol.toStringTag,{value:"Module"})),B=W.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),h=a.reactive({user:{_id:"",username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});if(T.get("user")){const{_id:t,email:e,phone:n,roles:s,accessToken:o}=JSON.parse(T.get("user"));Object.assign(h.user,{_id:t,email:e,phone:n}),Object.assign(h.access,{token:o,roles:s,status:!!o}),B.interceptors.request.use(r=>(o&&(r.headers["x-access-token"]=o),r),r=>Promise.reject(r))}const ne={async login(t,e){try{const n=await B.post("/api/auth/signin",{...t,type:e});return q("user",n.data),Object.assign(h.user,{...n.data}),Object.assign(h.access,{token:n.data.accessToken,status:!0,roles:n.data.roles}),n.data}catch(n){return Object.assign(h.access,{token:null,status:!1,roles:null}),L.setError(n),Promise.reject(n)}},async signup(t,e,n){const{password:s,passwordRepeat:o}=h.user;if(s!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw L.setError(r),new Error(r.response.status)}try{t.phone=t.phone.number;const r=await B.post("/api/auth/signup",{...t,type:e,inviteCode:n});return r.data.accessToken&&q("user",r.data),Object.assign(h.user,{...r.data}),Object.assign(h.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw L.setError(r),console.log("Sign up falied"),r}},logout(){He("user"),Object.assign(h.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(h.access,{token:null,status:!1})},async resetPassword(t,e){try{const n=await B.post("/api/auth/reset-password",{email:t.email,phone:t.phone.number,type:e});return Object.assign(V.code,{...n.data,isSended:!0}),n.data}catch(n){return L.setError(n),Promise.reject(n)}},async updatePassword(t,e){const{password:n,passwordRepeat:s}=h.user;if(n!==s){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw L.setError(o),new Error(o.response.status)}try{const o=await B.post("/api/auth/update-password",{email:t.email,phone:t.phone.number,password:t.password,passwordRepeat:t.passwordRepeat,type:e});return o.data.accessToken&&q("user",o.data),Object.assign(h.user,{...o.data}),Object.assign(h.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return L.setError(o),Promise.reject(o)}}},Fe={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function q(t,e,n=process.env.NODE_ENV){process.env.MOBILE_APP?ee.setCookie({url:process.env.API_URL,key:t,value:JSON.stringify(e)}):T.set(t,JSON.stringify(e),Fe[n])}function He(t,e=process.env.NODE_ENV){if(process.env.MOBILE_APP)ee.deleteCookie({url:process.env.API_URL,key:t});else{const n=e==="production"?{domain:process.env.API_URL}:{};T.remove(t,n)}}a.watch(h,(t,e)=>{});const qe=Object.freeze(Object.defineProperty({__proto__:null,actions:ne,state:h},Symbol.toStringTag,{value:"Module"}));exports.Cookies=T;exports.Field=ve;exports._sfc_main=Oe;exports.actions=ne;exports.auth=qe;exports.sendCode=te;exports.state=h;exports.state$1=V;exports.twofa=De;
|