@ozdao/prometheus-framework 0.1.17 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-2426cb6f.mjs +1945 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-c6aba800.js +1 -0
  3. package/dist/ButtonFollow-351486b0.js +1 -0
  4. package/dist/ButtonFollow-3a05d29f.mjs +132 -0
  5. package/dist/CardOrganization-4d22037e.js +1 -0
  6. package/dist/CardOrganization-8c5b582b.mjs +230 -0
  7. package/dist/Feed-416d84b0.mjs +439 -0
  8. package/dist/Feed-44beaa4c.mjs +368 -0
  9. package/dist/Feed-8a151970.js +1 -0
  10. package/dist/Feed-c9e6190e.js +1 -0
  11. package/dist/Gallery-9305f294.mjs +357 -0
  12. package/dist/Gallery-dea27e94.js +1 -0
  13. package/dist/Image-22e17cef.js +9 -0
  14. package/dist/Image-c0ae2c5f.mjs +477 -0
  15. package/dist/Popup-ad5f59d0.js +1 -0
  16. package/dist/Popup-e7c9a43e.mjs +76 -0
  17. package/dist/Product-2d05acc8.mjs +839 -0
  18. package/dist/Product-d9c3b9b9.js +7 -0
  19. package/dist/ProductEdit-ab0530e8.js +1 -0
  20. package/dist/ProductEdit-aca44ef7.mjs +300 -0
  21. package/dist/ProfileBlogposts-2063c511.mjs +65 -0
  22. package/dist/ProfileBlogposts-eaecd267.js +1 -0
  23. package/dist/ProfileComments-1ae70859.js +1 -0
  24. package/dist/ProfileComments-78231e6a.mjs +44 -0
  25. package/dist/ProfileEvents-4a2fa422.mjs +57 -0
  26. package/dist/ProfileEvents-90448f97.js +1 -0
  27. package/dist/ProfileLikes-74c78a16.mjs +44 -0
  28. package/dist/ProfileLikes-b48ce0ef.js +1 -0
  29. package/dist/ProfileOrganizations-43710687.js +1 -0
  30. package/dist/ProfileOrganizations-cf8a12f5.mjs +213 -0
  31. package/dist/Publics-5472f70c.mjs +123 -0
  32. package/dist/Publics-71b9efbe.js +1 -0
  33. package/dist/UploadImage-0f488170.js +1 -0
  34. package/dist/UploadImage-3c627d89.mjs +83 -0
  35. package/dist/UploadImageMultiple-cb6c7188.mjs +58 -0
  36. package/dist/UploadImageMultiple-eddaac87.js +1 -0
  37. package/dist/auth-4415a97a.js +7 -0
  38. package/dist/auth-afa25b86.mjs +905 -0
  39. package/dist/auth.client.cjs +1 -1
  40. package/dist/auth.client.js +4 -4
  41. package/dist/auth.validation-3e93dc23.mjs +20 -0
  42. package/dist/auth.validation-a17cd085.js +1 -0
  43. package/dist/backoffice.client.cjs +1 -1
  44. package/dist/backoffice.client.js +1 -1
  45. package/dist/community.client.cjs +1 -1
  46. package/dist/community.client.js +11 -11
  47. package/dist/events.client.cjs +1 -1
  48. package/dist/events.client.js +9 -9
  49. package/dist/gallery.server.js +23 -2
  50. package/dist/gallery.server.mjs +23 -2
  51. package/dist/index-a661083c.mjs +934 -0
  52. package/dist/index-b41aac19.js +2 -0
  53. package/dist/organizations-65937ba4.js +1 -0
  54. package/dist/organizations-af965fcf.mjs +122 -0
  55. package/dist/organizations.client-1e9361ec.js +3 -0
  56. package/dist/organizations.client-43816e25.mjs +3018 -0
  57. package/dist/organizations.client.cjs +1 -1
  58. package/dist/organizations.client.js +11 -11
  59. package/dist/users.client.cjs +1 -1
  60. package/dist/users.client.js +10 -10
  61. package/package.json +1 -1
  62. package/src/modules/gallery/gallery.server.js +2 -2
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("vue-router"),f=require("./Tab-dcd62005.js"),y=require("./EmptyState-7658d7d6.js"),h=require("./CardOrganization-4d22037e.js"),k=require("./_plugin-vue_export-helper-f246444f.js"),g=require("./organizations-65937ba4.js"),d=require("./auth-4415a97a.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./ButtonFollow-351486b0.js");require("./index-b41aac19.js");const _={},v={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},w=e.createStaticVNode('<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),x=[w];function B(u,t){return e.openBlock(),e.createElementBlock("svg",v,x)}const C=k._export_sfc(_,[["render",B]]),N={class:"feed"},p={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(u){const t=u,a=e.ref([]),o=e.ref(!1),r=e.ref(!0),l=e.ref(0),n=e.ref(20),c=async()=>{if(o.value){l.value+=n.value;const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=[...a.value,...i]}};return e.onMounted(async()=>{r.value=!0,console.log(t.selectedDate);const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=i,r.value=!1}),(i,O)=>(e.openBlock(),e.createElementBlock("section",N,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[r.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,s=>(e.openBlock(),e.createBlock(C,{key:s}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!r.value&&a.value.length<1?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!r.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(s,b)=>(e.openBlock(),e.createBlock(h._sfc_main,{onClick:$=>i.$router.push({name:"Organization",params:{_id:s._id}}),key:s._id,organization:s,user:u.user,type:"normal",class:e.normalizeClass(["w-100 radius-big mn-medium",{"br-b br-solid br-black-transp-10":b!==a.value.length-1}])},null,8,["onClick","organization","user","class"]))),128)):e.createCommentVNode("",!0),o.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}},q={class:"pd-thin"},z={class:"mn-medium flex-v-center flex-nowrap flex"},V=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),S={__name:"ProfileOrganizations",setup(u){const t=m.useRoute(),a=m.useRouter();let o=t.query.tab?t.query.tab:"member";const r=e.ref(o);return t.query.tab=r.value,e.watch(r,l=>{a.replace({query:{...t.query,tab:l}})}),(l,n)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("header",z,[V,d.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=c=>l.$router.push({name:"Create Organization"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(f._sfc_main,{selected:r.value,"onUpdate:selected":n[1]||(n[1]=c=>r.value=c),tabs:[{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="member"?(e.openBlock(),e.createBlock(p,{key:0,user:d.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(p,{key:0,user:d.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=S;
@@ -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-8c5b582b.mjs";
6
+ import { _ as B } from "./_plugin-vue_export-helper-dad06003.mjs";
7
+ import { a as x } from "./organizations-af965fcf.mjs";
8
+ import { s as _ } from "./auth-afa25b86.mjs";
9
+ import "./inputs.validation-14e8e01f.mjs";
10
+ import "./globals-96ba60e4.mjs";
11
+ import "vue-i18n";
12
+ import "./ButtonFollow-3a05d29f.mjs";
13
+ import "./index-a661083c.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-2426cb6f.mjs";
3
+ import { _ as O } from "./_plugin-vue_export-helper-dad06003.mjs";
4
+ import { _ as U } from "./CardOrganization-8c5b582b.mjs";
5
+ import { _ as E } from "./EmptyState-34d85f10.mjs";
6
+ import { s as x } from "./auth-afa25b86.mjs";
7
+ import { a as N } from "./organizations-af965fcf.mjs";
8
+ import { m as P } from "./ButtonFollow-3a05d29f.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-c6aba800.js");const p=require("./_plugin-vue_export-helper-f246444f.js"),f=require("./CardOrganization-4d22037e.js"),k=require("./EmptyState-7658d7d6.js"),d=require("./auth-4415a97a.js"),_=require("./organizations-65937ba4.js"),h=require("./ButtonFollow-351486b0.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"),h=require("./index-b41aac19.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-a661083c.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,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-a661083c.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 @@
1
+ "use strict";const e=require("vue"),m=require("./index-b41aac19.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,7 @@
1
+ "use strict";const a=require("vue"),de=require("./_plugin-vue_export-helper-f246444f.js"),W=require("./index-b41aac19.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;