@ozdao/prometheus-framework 0.1.30 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. package/dist/BackofficeGallery-02c9721b.mjs +304 -0
  2. package/dist/BackofficeGallery-1d117a40.js +1 -0
  3. package/dist/BackofficeReports-cb4b180d.mjs +44 -0
  4. package/dist/BackofficeReports-d021871f.js +1 -0
  5. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-505c3ca5.js +1 -0
  6. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-b1873cb7.mjs +1945 -0
  7. package/dist/Button-2ca405bd.js +1 -0
  8. package/dist/Button-c59d387c.mjs +283 -0
  9. package/dist/Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  10. package/dist/Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  11. package/dist/ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-0ea8fbf8.js +1 -0
  12. package/dist/ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-4ed993c7.mjs +1 -0
  13. package/dist/CardOrganization-18c1e3fa.mjs +297 -0
  14. package/dist/CardOrganization-26714a5e.mjs +297 -0
  15. package/dist/CardOrganization-7d679e75.js +1 -0
  16. package/dist/CardOrganization-88c6d479.js +1 -0
  17. package/dist/Chips-0e5bdd54.js +1 -0
  18. package/dist/Chips-2ada5eda.mjs +200 -0
  19. package/dist/Chips-5e32c8cb.mjs +200 -0
  20. package/dist/Chips-8d0a1d2c.js +1 -0
  21. package/dist/Dashboard-239fb7a6.mjs +52 -0
  22. package/dist/Dashboard-94267906.js +1 -0
  23. package/dist/EULA-8265b0cf.mjs +4218 -0
  24. package/dist/EULA-cbb27503.js +1 -0
  25. package/dist/Feed-275a14d8.mjs +371 -0
  26. package/dist/Feed-505b3fa8.mjs +383 -0
  27. package/dist/Feed-66095e66.js +1 -0
  28. package/dist/Feed-76fc4475.mjs +383 -0
  29. package/dist/Feed-d0da2943.js +1 -0
  30. package/dist/Feed-e55bc6fa.js +1 -0
  31. package/dist/Feed-ee36f80b.js +1 -0
  32. package/dist/Feed-ef6c6ca3.mjs +371 -0
  33. package/dist/IconEdit-1b7b5874.js +1 -0
  34. package/dist/IconEdit-680dc269.mjs +339 -0
  35. package/dist/IconEdit-c98d3d06.mjs +339 -0
  36. package/dist/IconEdit-e4d0cc6e.js +1 -0
  37. package/dist/Image-052a3cc2.mjs +480 -0
  38. package/dist/Image-2d2e606a.js +9 -0
  39. package/dist/Image-95c0fb07.mjs +480 -0
  40. package/dist/Image-c90ee624.js +9 -0
  41. package/dist/MenuItem-0b249b94.mjs +93 -0
  42. package/dist/MenuItem-8b70d2cf.js +1 -0
  43. package/dist/Product-4b58701f.js +7 -0
  44. package/dist/Product-6aa1c9ee.mjs +844 -0
  45. package/dist/Product-6ca8d04d.js +7 -0
  46. package/dist/Product-a6251018.mjs +844 -0
  47. package/dist/ProductEdit-2e309add.js +1 -0
  48. package/dist/ProductEdit-3ff2af92.js +1 -0
  49. package/dist/ProductEdit-6abcc97b.mjs +306 -0
  50. package/dist/ProductEdit-f901314c.mjs +306 -0
  51. package/dist/ProfileBlogposts-57931834.mjs +70 -0
  52. package/dist/ProfileBlogposts-62d5e809.mjs +70 -0
  53. package/dist/ProfileBlogposts-af88ce98.js +1 -0
  54. package/dist/ProfileBlogposts-c31917ec.js +1 -0
  55. package/dist/ProfileEvents-588eadf9.js +1 -0
  56. package/dist/ProfileEvents-89471c05.js +1 -0
  57. package/dist/ProfileEvents-e070d9d4.mjs +62 -0
  58. package/dist/ProfileEvents-ed7f9603.mjs +62 -0
  59. package/dist/ProfileOrganizations-7911deec.mjs +219 -0
  60. package/dist/ProfileOrganizations-ae258581.js +1 -0
  61. package/dist/ProfileOrganizations-bee6a3ae.js +1 -0
  62. package/dist/ProfileOrganizations-db313b5e.mjs +219 -0
  63. package/dist/Publics-24f055eb.js +1 -0
  64. package/dist/Publics-50c0ff6c.js +1 -0
  65. package/dist/Publics-b1cbfd97.mjs +45 -0
  66. package/dist/Publics-f34131bf.mjs +45 -0
  67. package/dist/Select-11ddabf5.mjs +79 -0
  68. package/dist/Select-3ca5ab39.js +1 -0
  69. package/dist/Socials-3fe01af1.mjs +275 -0
  70. package/dist/Socials-9b2d27a6.js +1 -0
  71. package/dist/Socials-b19d0cb1.js +1 -0
  72. package/dist/Socials-becde7dc.mjs +275 -0
  73. package/dist/addMembersQuantity-ea216f92.mjs +85 -0
  74. package/dist/addMembersQuantity-f922d82b.js +84 -0
  75. package/dist/auth-98fe3efb.mjs +612 -0
  76. package/dist/auth-acbe3ae1.js +7 -0
  77. package/dist/auth.client.cjs +7 -8
  78. package/dist/auth.client.js +378 -379
  79. package/dist/auth.validation-495e9d6d.js +1 -0
  80. package/dist/auth.validation-e265b496.mjs +23 -0
  81. package/dist/backoffice.client.cjs +1 -1
  82. package/dist/backoffice.client.js +55 -28
  83. package/dist/click-outside-0b0727d1.js +2 -0
  84. package/dist/click-outside-6101836c.mjs +19 -0
  85. package/dist/community.client.cjs +1 -1
  86. package/dist/community.client.js +121 -121
  87. package/dist/community.server.js +35 -5
  88. package/dist/community.server.mjs +35 -5
  89. package/dist/components/Button/Button.vue.d.ts +3 -0
  90. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  91. package/dist/components/CardHeader/CardHeader.vue.d.ts +3 -0
  92. package/dist/components/Dropdown/Dropdown.vue.d.ts +3 -0
  93. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  94. package/dist/components/Field/Field.vue.d.ts +1 -1
  95. package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
  96. package/dist/components/Popup/Popup.vue.d.ts +2 -1
  97. package/dist/components/Popup/Popup.vue.d.ts.map +1 -1
  98. package/dist/components/Select/Select.vue.d.ts +1 -1
  99. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  100. package/dist/components/Upload/Upload.vue.d.ts +1 -1
  101. package/dist/events.client.cjs +2 -2
  102. package/dist/events.client.js +219 -217
  103. package/dist/events.server.js +1 -0
  104. package/dist/events.server.mjs +1 -0
  105. package/dist/legal.client.cjs +1 -1
  106. package/dist/legal.client.js +2565 -2545
  107. package/dist/main.css +1 -1
  108. package/dist/main.d.ts +1 -1
  109. package/dist/modules/backoffice/components/pages/Dashboard.vue.d.ts +6 -0
  110. package/dist/modules/icons/navigation/IconCross.vue.d.ts +4 -0
  111. package/dist/modules/legal/components/pages/legal/EULA.vue.d.ts +2 -0
  112. package/dist/modules/organizations/components/elements/ButtonFollow.vue.d.ts +1 -1
  113. package/dist/modules/organizations/components/elements/ButtonToggleMembership.vue.d.ts +12 -0
  114. package/dist/modules/organizations/components/sections/DetailsTab.vue.d.ts +2 -58
  115. package/dist/modules/organizations/components/sections/Feed.vue.d.ts +1 -1
  116. package/dist/modules/reports/components/pages/BackofficeReports.vue.d.ts +2 -0
  117. package/dist/modules/reports/components/sections/FormReport.vue.d.ts +75 -0
  118. package/dist/modules/reports/store/reports.d.ts +41 -0
  119. package/dist/organizations-a241b21d.js +1 -0
  120. package/dist/organizations-ea9de495.mjs +122 -0
  121. package/dist/organizations.client-292e8444.js +3 -0
  122. package/dist/organizations.client-6a69b54a.js +3 -0
  123. package/dist/organizations.client-6fc91683.mjs +3072 -0
  124. package/dist/organizations.client-c288ff44.mjs +3072 -0
  125. package/dist/organizations.client.cjs +1 -1
  126. package/dist/organizations.client.js +51 -49
  127. package/dist/organizations.server.js +20 -28
  128. package/dist/organizations.server.mjs +20 -28
  129. package/dist/prometheus-framework.cjs.js +19 -19
  130. package/dist/prometheus-framework.es.js +1635 -1608
  131. package/dist/reports-270f69df.js +1 -0
  132. package/dist/reports-79cd9459.mjs +91 -0
  133. package/dist/reports.client.cjs +1 -0
  134. package/dist/reports.client.js +8 -0
  135. package/dist/reports.server.js +159 -0
  136. package/dist/reports.server.mjs +160 -0
  137. package/dist/states.validation-02ba0aee.js +1 -0
  138. package/dist/states.validation-e5f4fa3a.mjs +13 -0
  139. package/dist/style.css +1 -1
  140. package/dist/users.client.cjs +1 -1
  141. package/dist/users.client.js +286 -242
  142. package/dist/users.server.js +6 -18
  143. package/dist/users.server.mjs +6 -18
  144. package/package.json +9 -1
  145. package/src/components/Button/Button.vue +66 -60
  146. package/src/components/CardHeader/CardHeader.vue +51 -50
  147. package/src/components/Dropdown/Dropdown.vue +28 -12
  148. package/src/components/FieldPhone/click-outside.js +0 -48
  149. package/src/components/Popup/Popup.vue +74 -23
  150. package/src/components/Select/Select.vue +10 -6
  151. package/src/main.ts +1 -1
  152. package/src/modules/auth/components/pages/EnterPassword.vue +6 -0
  153. package/src/modules/auth/store/auth.js +1 -1
  154. package/src/modules/backoffice/components/layouts/Backoffice.vue +3 -3
  155. package/src/modules/backoffice/components/pages/Dashboard.vue +62 -0
  156. package/src/modules/backoffice/router/backoffice.js +26 -0
  157. package/src/modules/community/components/blocks/CardBlogpost.vue +3 -0
  158. package/src/modules/community/components/layouts/Community.vue +4 -4
  159. package/src/modules/community/components/pages/CreateBlogPost.vue +27 -28
  160. package/src/modules/community/components/sections/Comments.vue +4 -2
  161. package/src/modules/community/components/sections/Feed.vue +1 -1
  162. package/src/modules/community/controllers/blog.controller.js +22 -3
  163. package/src/modules/community/controllers/comments.controller.js +23 -5
  164. package/src/modules/events/components/blocks/CardEvent.vue +4 -0
  165. package/src/modules/events/components/pages/EditEvent.vue +27 -28
  166. package/src/modules/events/components/sections/Feed.vue +1 -1
  167. package/src/modules/events/controllers/events.controller.js +3 -0
  168. package/src/modules/gallery/components/sections/BackofficeGallery.vue +7 -23
  169. package/src/modules/icons/navigation/IconCross.vue +22 -0
  170. package/src/modules/legal/components/pages/Legal.vue +3 -0
  171. package/src/modules/legal/components/pages/legal/EULA.vue +2148 -0
  172. package/src/modules/legal/router/legal.js +11 -4
  173. package/src/modules/middlewares/client/auth.validation.js +14 -0
  174. package/src/modules/mobile/components/Menu/Menu.vue +1 -1
  175. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  176. package/src/modules/organizations/components/elements/ButtonFollow.vue +9 -7
  177. package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +101 -0
  178. package/src/modules/organizations/components/pages/Organization.vue +1 -34
  179. package/src/modules/organizations/components/sections/DetailsTab.vue +86 -8
  180. package/src/modules/organizations/controllers/memberships.controller.js +10 -7
  181. package/src/modules/organizations/controllers/organizations.controller.js +9 -20
  182. package/src/modules/organizations/controllers/utils/addMembersQuantity.js +21 -0
  183. package/src/modules/organizations/controllers/utils/addUserStatusFields.js +65 -0
  184. package/src/modules/organizations/controllers/utils/excludeBlockedMembers.js +18 -0
  185. package/src/modules/organizations/models/membership.model.js +5 -5
  186. package/src/modules/organizations/store/memberships.js +6 -6
  187. package/src/modules/organizations/store/organizations.js +0 -1
  188. package/src/modules/products/products.server.js +5 -0
  189. package/src/modules/reports/components/pages/BackofficeReports.vue +67 -0
  190. package/src/modules/reports/components/sections/FormReport.vue +116 -0
  191. package/src/modules/reports/controllers/reports.controller.js +67 -0
  192. package/src/modules/reports/models/report.model.js +58 -0
  193. package/src/modules/reports/reports.client.js +17 -0
  194. package/src/modules/reports/reports.server.js +13 -0
  195. package/src/modules/reports/routes/reports.routes.js +43 -0
  196. package/src/modules/reports/store/reports.js +118 -0
  197. package/src/modules/users/components/pages/Profile.vue +57 -10
  198. package/src/modules/users/controllers/users.controller.js +6 -19
  199. package/src/styles/base/all.scss +2 -0
  200. package/src/styles/layout.scss +39 -63
  201. package/src/styles/theme.scss +0 -1
  202. package/src/styles/components/popup.scss +0 -55
@@ -0,0 +1,339 @@
1
+ import { openBlock as p, createElementBlock as d, createElementVNode as i, watch as C, createBlock as k, Teleport as S, createVNode as u, Transition as y, withCtx as f, mergeProps as O, renderSlot as w, createCommentVNode as g, normalizeClass as M, reactive as $, ref as P, Fragment as R, createTextVNode as x, withDirectives as L, withModifiers as T, toDisplayString as I, normalizeStyle as j, vShow as B, unref as Z } from "vue";
2
+ import { _ as v } from "./_plugin-vue_export-helper-dad06003.mjs";
3
+ import { useRoute as z, useRouter as D } from "vue-router";
4
+ import { useI18n as U } from "vue-i18n";
5
+ import { _ as q } from "./Button-c59d387c.mjs";
6
+ import { S as E } from "./Select-11ddabf5.mjs";
7
+ import { a as V } from "./reports-79cd9459.mjs";
8
+ import { c as A } from "./click-outside-6101836c.mjs";
9
+ import { a as N } from "./index-a661083c.mjs";
10
+ import { s as _ } from "./globals-96ba60e4.mjs";
11
+ const Y = {}, F = {
12
+ width: "26",
13
+ height: "26",
14
+ viewBox: "0 0 26 26",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg"
17
+ }, H = /* @__PURE__ */ i("rect", {
18
+ width: "24",
19
+ height: "24",
20
+ transform: "translate(1 1)"
21
+ }, null, -1), W = /* @__PURE__ */ i("path", {
22
+ fill: "rgb(var(--black))",
23
+ "fill-rule": "evenodd",
24
+ "clip-rule": "evenodd",
25
+ d: "M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"
26
+ }, null, -1), G = [
27
+ H,
28
+ W
29
+ ];
30
+ function J(t, e) {
31
+ return p(), d("svg", F, G);
32
+ }
33
+ const K = /* @__PURE__ */ v(Y, [["render", J]]);
34
+ const Q = {
35
+ key: "popup-content",
36
+ class: "pd-small popup-wrapper"
37
+ }, X = {
38
+ __name: "Popup",
39
+ props: {
40
+ isPopupOpen: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ style: String
45
+ },
46
+ emits: ["close-popup"],
47
+ setup(t, { emit: e }) {
48
+ const r = t;
49
+ function a() {
50
+ e("close-popup");
51
+ }
52
+ return C(() => r.isPopupOpen, (n) => {
53
+ n ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
54
+ }), z(), D(), U({
55
+ messages: {
56
+ en: {},
57
+ ru: {}
58
+ }
59
+ }), (n, s) => t.isPopupOpen ? (p(), k(S, {
60
+ key: 0,
61
+ to: "body"
62
+ }, [
63
+ u(y, {
64
+ name: "TransitionTranslateY",
65
+ appear: ""
66
+ }, {
67
+ default: f(() => [
68
+ t.isPopupOpen ? (p(), d("div", Q, [
69
+ u(y, {
70
+ name: "TransitionTranslateY",
71
+ mode: "out-in"
72
+ }, {
73
+ default: f(() => [
74
+ t.isPopupOpen ? (p(), d("section", O({
75
+ key: 0,
76
+ class: "pos-relative z-index-4"
77
+ }, n.$attrs), [
78
+ i("button", {
79
+ onClick: s[0] || (s[0] = (l) => a()),
80
+ class: "pd-regular hover-scale-1 z-index-5 button-close-popup button"
81
+ }, [
82
+ u(K)
83
+ ]),
84
+ w(n.$slots, "default")
85
+ ], 16)) : g("", !0)
86
+ ]),
87
+ _: 3
88
+ }),
89
+ i("div", {
90
+ onClick: s[1] || (s[1] = (l) => a()),
91
+ class: M([{ active: t.isPopupOpen === !0 }, "color-overlay z-index-3"])
92
+ }, null, 2)
93
+ ])) : g("", !0)
94
+ ]),
95
+ _: 3
96
+ })
97
+ ])) : g("", !0);
98
+ }
99
+ }, ee = {}, te = {
100
+ viewBox: "0 0 42 42",
101
+ fill: "none",
102
+ xmlns: "http://www.w3.org/2000/svg"
103
+ }, se = /* @__PURE__ */ i("circle", {
104
+ fill: "rgb(var(--main))",
105
+ cx: "21",
106
+ cy: "21",
107
+ r: "21"
108
+ }, null, -1), re = /* @__PURE__ */ i("path", {
109
+ fill: "#242424",
110
+ "fill-opacity": "0.1",
111
+ "fill-rule": "evenodd",
112
+ "clip-rule": "evenodd",
113
+ d: "M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"
114
+ }, null, -1), oe = [
115
+ se,
116
+ re
117
+ ];
118
+ function ne(t, e) {
119
+ return p(), d("svg", te, oe);
120
+ }
121
+ const ke = /* @__PURE__ */ v(ee, [["render", ne]]), ie = /* @__PURE__ */ i("h3", { class: "mn-small" }, " Report Content ", -1), ae = /* @__PURE__ */ i("p", { class: "p-medium mn-small" }, " We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ", -1), le = /* @__PURE__ */ i("p", { class: "p-medium mn-small" }, "Our moderators will review your report within 24 hours and take action if it violates our policies.", -1), Se = {
122
+ __name: "FormReport",
123
+ props: {
124
+ user: {
125
+ type: String,
126
+ required: !1
127
+ },
128
+ type: {
129
+ type: String,
130
+ required: !1
131
+ },
132
+ reason: {
133
+ type: String,
134
+ required: !1
135
+ },
136
+ target: {
137
+ type: String,
138
+ required: !0
139
+ },
140
+ text: {
141
+ type: String,
142
+ default: "!"
143
+ },
144
+ status: {
145
+ type: String,
146
+ default: "new"
147
+ }
148
+ },
149
+ setup(t) {
150
+ const e = t, r = $({
151
+ user: e.user,
152
+ type: e.type,
153
+ reason: e.reason,
154
+ target: e.target,
155
+ status: e.status
156
+ });
157
+ function a() {
158
+ r.user === null && delete r.user, V.create(r);
159
+ }
160
+ const o = P(!1);
161
+ function n() {
162
+ o.value = !0;
163
+ }
164
+ function s() {
165
+ o.value = !1;
166
+ }
167
+ return (l, m) => (p(), d(R, null, [
168
+ i("div", {
169
+ onClick: m[0] || (m[0] = (b) => n())
170
+ }, [
171
+ w(l.$slots, "default")
172
+ ]),
173
+ u(X, {
174
+ onClosePopup: s,
175
+ isPopupOpen: o.value,
176
+ class: "w-m-33r t-left pd-big bg-white radius-big"
177
+ }, {
178
+ default: f(() => [
179
+ ie,
180
+ ae,
181
+ u(E, {
182
+ select: r.reason,
183
+ "onUpdate:select": m[1] || (m[1] = (b) => r.reason = b),
184
+ options: [
185
+ "harassment",
186
+ "spam",
187
+ "inappropriate",
188
+ "misinformation",
189
+ "copyright",
190
+ "other"
191
+ ],
192
+ placeholder: "Select reason",
193
+ class: "mn-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"
194
+ }, null, 8, ["select"]),
195
+ le,
196
+ u(q, {
197
+ submit: a,
198
+ callback: s,
199
+ class: "w-100 bg-black t-white"
200
+ }, {
201
+ default: f(() => [
202
+ x(" Report ")
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]),
207
+ _: 1
208
+ }, 8, ["isPopupOpen"])
209
+ ], 64));
210
+ }
211
+ };
212
+ const pe = {
213
+ __name: "Dropdown",
214
+ props: {
215
+ label: {
216
+ type: String,
217
+ default: "Open"
218
+ },
219
+ align: {
220
+ type: String,
221
+ default: "left"
222
+ }
223
+ },
224
+ setup(t) {
225
+ let e = A;
226
+ const r = P(!1);
227
+ function a() {
228
+ r.value = !1;
229
+ }
230
+ return (o, n) => L((p(), d("div", {
231
+ class: "dropdown pos-relative",
232
+ onClick: n[0] || (n[0] = T((s) => r.value = !r.value, ["stop"]))
233
+ }, [
234
+ x(I(t.label) + " ", 1),
235
+ u(y, {
236
+ name: "TransitionTranslateY",
237
+ mode: "out-in"
238
+ }, {
239
+ default: f(() => [
240
+ L(i("div", {
241
+ style: j({ left: t.align === "left" ? "0" : "auto", right: t.align === "right" ? "0" : "auto" }),
242
+ class: "dropdown-content w-15r radius-big"
243
+ }, [
244
+ w(o.$slots, "default", {}, void 0, !0)
245
+ ], 4), [
246
+ [B, r.value]
247
+ ])
248
+ ]),
249
+ _: 3
250
+ })
251
+ ])), [
252
+ [Z(e), a]
253
+ ]);
254
+ }
255
+ }, Oe = /* @__PURE__ */ v(pe, [["__scopeId", "data-v-5646d77f"]]), h = N.create({
256
+ baseURL: process.env.API_URL,
257
+ withCredentials: !0
258
+ }), c = $({
259
+ memberships: [],
260
+ error: null
261
+ }), ce = {
262
+ async read({ user: t, type: e, target: r, role: a }) {
263
+ try {
264
+ const o = await h.get("/api/memberships", { params: { user: t, type: e, target: r, role: a } });
265
+ return c.error = null, c.memberships = o.data, Promise.resolve(o.data);
266
+ } catch (o) {
267
+ return _(o), Promise.reject(o);
268
+ }
269
+ },
270
+ async create(t) {
271
+ try {
272
+ const e = await h.post("/api/memberships/create", t);
273
+ return c.error = null, Promise.resolve(e.data);
274
+ } catch (e) {
275
+ return _(e), Promise.reject(e);
276
+ }
277
+ },
278
+ async update(t) {
279
+ try {
280
+ const e = await h.post("/api/memberships/update", t);
281
+ return c.error = null, Promise.resolve(e.data);
282
+ } catch (e) {
283
+ return _(e), Promise.reject(e);
284
+ }
285
+ },
286
+ async delete(t) {
287
+ try {
288
+ const e = await h.post("/api/memberships/delete", t);
289
+ return c.error = null, Promise.resolve(e.data);
290
+ } catch (e) {
291
+ return _(e), Promise.reject(e);
292
+ }
293
+ }
294
+ }, ue = {
295
+ handleMembershipUpdate(t, e, r, a, o, n) {
296
+ let s;
297
+ if (Array.isArray(t) ? s = t.find((l) => l._id === e.target) : typeof t == "object" && t._id === e.target && (s = t), s)
298
+ if (s[o] = r, r)
299
+ s.memberships.push(e), s[n] += 1;
300
+ else {
301
+ const l = s.memberships.findIndex((m) => m._id === e._id);
302
+ l !== -1 && (s.memberships.splice(l, 1), s[n] -= 1);
303
+ }
304
+ }
305
+ };
306
+ C(c, (t) => {
307
+ });
308
+ const Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
309
+ __proto__: null,
310
+ actions: ce,
311
+ mutations: ue,
312
+ state: c
313
+ }, Symbol.toStringTag, { value: "Module" })), de = {}, me = {
314
+ width: "652",
315
+ height: "652",
316
+ viewBox: "0 0 652 652",
317
+ fill: "none",
318
+ xmlns: "http://www.w3.org/2000/svg"
319
+ }, fe = /* @__PURE__ */ i("path", {
320
+ fill: "rgb(var(--black))",
321
+ d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z"
322
+ }, null, -1), _e = [
323
+ fe
324
+ ];
325
+ function he(t, e) {
326
+ return p(), d("svg", me, _e);
327
+ }
328
+ const Re = /* @__PURE__ */ v(de, [["render", he]]);
329
+ export {
330
+ Oe as D,
331
+ Re as I,
332
+ ke as P,
333
+ Se as _,
334
+ ce as a,
335
+ X as b,
336
+ Me as c,
337
+ ue as m,
338
+ c as s
339
+ };
@@ -0,0 +1,339 @@
1
+ import { openBlock as p, createElementBlock as d, createElementVNode as i, watch as C, createBlock as k, Teleport as S, createVNode as u, Transition as y, withCtx as f, mergeProps as O, renderSlot as w, createCommentVNode as g, normalizeClass as M, reactive as $, ref as P, Fragment as R, createTextVNode as x, withDirectives as L, withModifiers as T, toDisplayString as I, normalizeStyle as j, vShow as B, unref as Z } from "vue";
2
+ import { _ as v } from "./_plugin-vue_export-helper-dad06003.mjs";
3
+ import { useRoute as z, useRouter as D } from "vue-router";
4
+ import { useI18n as U } from "vue-i18n";
5
+ import { _ as q } from "./Button-c59d387c.mjs";
6
+ import { S as E } from "./Select-11ddabf5.mjs";
7
+ import { a as V } from "./reports-79cd9459.mjs";
8
+ import { c as A } from "./click-outside-6101836c.mjs";
9
+ import { a as N } from "./index-a661083c.mjs";
10
+ import { s as _ } from "./globals-96ba60e4.mjs";
11
+ const Y = {}, F = {
12
+ width: "26",
13
+ height: "26",
14
+ viewBox: "0 0 26 26",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg"
17
+ }, H = /* @__PURE__ */ i("rect", {
18
+ width: "24",
19
+ height: "24",
20
+ transform: "translate(1 1)"
21
+ }, null, -1), W = /* @__PURE__ */ i("path", {
22
+ fill: "rgb(var(--black))",
23
+ "fill-rule": "evenodd",
24
+ "clip-rule": "evenodd",
25
+ d: "M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"
26
+ }, null, -1), G = [
27
+ H,
28
+ W
29
+ ];
30
+ function J(t, e) {
31
+ return p(), d("svg", F, G);
32
+ }
33
+ const K = /* @__PURE__ */ v(Y, [["render", J]]);
34
+ const Q = {
35
+ key: "popup-content",
36
+ class: "pd-small popup-wrapper"
37
+ }, X = {
38
+ __name: "Popup",
39
+ props: {
40
+ isPopupOpen: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ style: String
45
+ },
46
+ emits: ["close-popup"],
47
+ setup(t, { emit: e }) {
48
+ const r = t;
49
+ function a() {
50
+ e("close-popup");
51
+ }
52
+ return C(() => r.isPopupOpen, (n) => {
53
+ n ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
54
+ }), z(), D(), U({
55
+ messages: {
56
+ en: {},
57
+ ru: {}
58
+ }
59
+ }), (n, s) => t.isPopupOpen ? (p(), k(S, {
60
+ key: 0,
61
+ to: "body"
62
+ }, [
63
+ u(y, {
64
+ name: "TransitionTranslateY",
65
+ appear: ""
66
+ }, {
67
+ default: f(() => [
68
+ t.isPopupOpen ? (p(), d("div", Q, [
69
+ u(y, {
70
+ name: "TransitionTranslateY",
71
+ mode: "out-in"
72
+ }, {
73
+ default: f(() => [
74
+ t.isPopupOpen ? (p(), d("section", O({
75
+ key: 0,
76
+ class: "pos-relative z-index-4"
77
+ }, n.$attrs), [
78
+ i("button", {
79
+ onClick: s[0] || (s[0] = (l) => a()),
80
+ class: "pd-regular hover-scale-1 z-index-5 button-close-popup button"
81
+ }, [
82
+ u(K)
83
+ ]),
84
+ w(n.$slots, "default")
85
+ ], 16)) : g("", !0)
86
+ ]),
87
+ _: 3
88
+ }),
89
+ i("div", {
90
+ onClick: s[1] || (s[1] = (l) => a()),
91
+ class: M([{ active: t.isPopupOpen === !0 }, "color-overlay z-index-3"])
92
+ }, null, 2)
93
+ ])) : g("", !0)
94
+ ]),
95
+ _: 3
96
+ })
97
+ ])) : g("", !0);
98
+ }
99
+ }, ee = {}, te = {
100
+ viewBox: "0 0 42 42",
101
+ fill: "none",
102
+ xmlns: "http://www.w3.org/2000/svg"
103
+ }, se = /* @__PURE__ */ i("circle", {
104
+ fill: "rgb(var(--main))",
105
+ cx: "21",
106
+ cy: "21",
107
+ r: "21"
108
+ }, null, -1), re = /* @__PURE__ */ i("path", {
109
+ fill: "#242424",
110
+ "fill-opacity": "0.1",
111
+ "fill-rule": "evenodd",
112
+ "clip-rule": "evenodd",
113
+ d: "M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"
114
+ }, null, -1), oe = [
115
+ se,
116
+ re
117
+ ];
118
+ function ne(t, e) {
119
+ return p(), d("svg", te, oe);
120
+ }
121
+ const ke = /* @__PURE__ */ v(ee, [["render", ne]]), ie = /* @__PURE__ */ i("h3", { class: "mn-small" }, " Report Content ", -1), ae = /* @__PURE__ */ i("p", { class: "p-medium mn-small" }, " We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ", -1), le = /* @__PURE__ */ i("p", { class: "p-medium mn-small" }, "Our moderators will review your report within 24 hours and take action if it violates our policies.", -1), Se = {
122
+ __name: "FormReport",
123
+ props: {
124
+ user: {
125
+ type: String,
126
+ required: !1
127
+ },
128
+ type: {
129
+ type: String,
130
+ required: !1
131
+ },
132
+ reason: {
133
+ type: String,
134
+ required: !1
135
+ },
136
+ target: {
137
+ type: String,
138
+ required: !0
139
+ },
140
+ text: {
141
+ type: String,
142
+ default: "!"
143
+ },
144
+ status: {
145
+ type: String,
146
+ default: "new"
147
+ }
148
+ },
149
+ setup(t) {
150
+ const e = t, r = $({
151
+ user: e.user,
152
+ type: e.type,
153
+ reason: e.reason,
154
+ target: e.target,
155
+ status: e.status
156
+ });
157
+ function a() {
158
+ V.create(r);
159
+ }
160
+ const o = P(!1);
161
+ function n() {
162
+ o.value = !0;
163
+ }
164
+ function s() {
165
+ o.value = !1;
166
+ }
167
+ return (l, m) => (p(), d(R, null, [
168
+ i("div", {
169
+ onClick: m[0] || (m[0] = (b) => n())
170
+ }, [
171
+ w(l.$slots, "default")
172
+ ]),
173
+ u(X, {
174
+ onClosePopup: s,
175
+ isPopupOpen: o.value,
176
+ class: "w-m-33r t-left pd-big bg-white radius-big"
177
+ }, {
178
+ default: f(() => [
179
+ ie,
180
+ ae,
181
+ u(E, {
182
+ select: r.reason,
183
+ "onUpdate:select": m[1] || (m[1] = (b) => r.reason = b),
184
+ options: [
185
+ "harassment",
186
+ "spam",
187
+ "inappropriate",
188
+ "misinformation",
189
+ "copyright",
190
+ "other"
191
+ ],
192
+ placeholder: "Select reason",
193
+ class: "mn-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"
194
+ }, null, 8, ["select"]),
195
+ le,
196
+ u(q, {
197
+ submit: a,
198
+ callback: s,
199
+ class: "w-100 bg-black t-white"
200
+ }, {
201
+ default: f(() => [
202
+ x(" Report ")
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]),
207
+ _: 1
208
+ }, 8, ["isPopupOpen"])
209
+ ], 64));
210
+ }
211
+ };
212
+ const pe = {
213
+ __name: "Dropdown",
214
+ props: {
215
+ label: {
216
+ type: String,
217
+ default: "Open"
218
+ },
219
+ align: {
220
+ type: String,
221
+ default: "left"
222
+ }
223
+ },
224
+ setup(t) {
225
+ let e = A;
226
+ const r = P(!1);
227
+ function a() {
228
+ r.value = !1;
229
+ }
230
+ return (o, n) => L((p(), d("div", {
231
+ class: "dropdown pos-relative",
232
+ onClick: n[0] || (n[0] = T((s) => r.value = !r.value, ["stop"]))
233
+ }, [
234
+ x(I(t.label) + " ", 1),
235
+ u(y, {
236
+ name: "TransitionTranslateY",
237
+ mode: "out-in"
238
+ }, {
239
+ default: f(() => [
240
+ L(i("div", {
241
+ style: j({ left: t.align === "left" ? "0" : "auto", right: t.align === "right" ? "0" : "auto" }),
242
+ class: "dropdown-content w-15r radius-big"
243
+ }, [
244
+ w(o.$slots, "default", {}, void 0, !0)
245
+ ], 4), [
246
+ [B, r.value]
247
+ ])
248
+ ]),
249
+ _: 3
250
+ })
251
+ ])), [
252
+ [Z(e), a]
253
+ ]);
254
+ }
255
+ }, Oe = /* @__PURE__ */ v(pe, [["__scopeId", "data-v-5646d77f"]]), h = N.create({
256
+ baseURL: process.env.API_URL,
257
+ withCredentials: !0
258
+ }), c = $({
259
+ memberships: [],
260
+ error: null
261
+ }), ce = {
262
+ async read({ user: t, type: e, target: r, role: a }) {
263
+ try {
264
+ const o = await h.get("/api/memberships", { params: { user: t, type: e, target: r, role: a } });
265
+ return c.error = null, c.memberships = o.data, Promise.resolve(o.data);
266
+ } catch (o) {
267
+ return _(o), Promise.reject(o);
268
+ }
269
+ },
270
+ async create(t) {
271
+ try {
272
+ const e = await h.post("/api/memberships/create", t);
273
+ return c.error = null, Promise.resolve(e.data);
274
+ } catch (e) {
275
+ return _(e), Promise.reject(e);
276
+ }
277
+ },
278
+ async update(t) {
279
+ try {
280
+ const e = await h.post("/api/memberships/update", t);
281
+ return c.error = null, Promise.resolve(e.data);
282
+ } catch (e) {
283
+ return _(e), Promise.reject(e);
284
+ }
285
+ },
286
+ async delete(t) {
287
+ try {
288
+ const e = await h.post("/api/memberships/delete", t);
289
+ return c.error = null, Promise.resolve(e.data);
290
+ } catch (e) {
291
+ return _(e), Promise.reject(e);
292
+ }
293
+ }
294
+ }, ue = {
295
+ handleMembershipUpdate(t, e, r, a, o, n) {
296
+ let s;
297
+ if (Array.isArray(t) ? s = t.find((l) => l._id === e.target) : typeof t == "object" && t._id === e.target && (s = t), s)
298
+ if (s[o] = r, r)
299
+ s.memberships.push(e), s[n] += 1;
300
+ else {
301
+ const l = s.memberships.findIndex((m) => m._id === e._id);
302
+ l !== -1 && (s.memberships.splice(l, 1), s[n] -= 1);
303
+ }
304
+ }
305
+ };
306
+ C(c, (t) => {
307
+ });
308
+ const Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
309
+ __proto__: null,
310
+ actions: ce,
311
+ mutations: ue,
312
+ state: c
313
+ }, Symbol.toStringTag, { value: "Module" })), de = {}, me = {
314
+ width: "652",
315
+ height: "652",
316
+ viewBox: "0 0 652 652",
317
+ fill: "none",
318
+ xmlns: "http://www.w3.org/2000/svg"
319
+ }, fe = /* @__PURE__ */ i("path", {
320
+ fill: "rgb(var(--black))",
321
+ d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z"
322
+ }, null, -1), _e = [
323
+ fe
324
+ ];
325
+ function he(t, e) {
326
+ return p(), d("svg", me, _e);
327
+ }
328
+ const Re = /* @__PURE__ */ v(de, [["render", he]]);
329
+ export {
330
+ Oe as D,
331
+ Re as I,
332
+ ke as P,
333
+ Se as _,
334
+ ce as a,
335
+ X as b,
336
+ Me as c,
337
+ ue as m,
338
+ c as s
339
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),m=require("./_plugin-vue_export-helper-f246444f.js"),f=require("vue-router"),w=require("vue-i18n"),y=require("./Button-2ca405bd.js"),b=require("./Select-3ca5ab39.js"),C=require("./reports-270f69df.js"),k=require("./click-outside-0b0727d1.js"),x=require("./index-b41aac19.js"),u=require("./globals-928eb13c.js"),L={},P={width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$=e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"},null,-1),E=e.createElementVNode("path",{fill:"rgb(var(--black))","fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"},null,-1),V=[$,E];function N(r,t){return e.openBlock(),e.createElementBlock("svg",P,V)}const S=m._export_sfc(L,[["render",N]]);const B={key:"popup-content",class:"pd-small popup-wrapper"},h={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(r,{emit:t}){const n=r;function l(){t("close-popup")}e.watch(()=>n.isPopupOpen,i=>{i?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),f.useRoute(),f.useRouter();const s={messages:{en:{},ru:{}}};return w.useI18n(s),(i,o)=>r.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[r.isPopupOpen?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[r.isPopupOpen?(e.openBlock(),e.createElementBlock("section",e.mergeProps({key:0,class:"pos-relative z-index-4"},i.$attrs),[e.createElementVNode("button",{onClick:o[0]||(o[0]=a=>l()),class:"pd-regular hover-scale-1 z-index-5 button-close-popup button"},[e.createVNode(S)]),e.renderSlot(i.$slots,"default")],16)):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("div",{onClick:o[1]||(o[1]=a=>l()),class:e.normalizeClass([{active:r.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)}},O={},q={viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},T=e.createElementVNode("circle",{fill:"rgb(var(--main))",cx:"21",cy:"21",r:"21"},null,-1),R=e.createElementVNode("path",{fill:"#242424","fill-opacity":"0.1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"},null,-1),M=[T,R];function I(r,t){return e.openBlock(),e.createElementBlock("svg",q,M)}const j=m._export_sfc(O,[["render",I]]),D=e.createElementVNode("h3",{class:"mn-small"}," Report Content ",-1),Z=e.createElementVNode("p",{class:"p-medium mn-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),z=e.createElementVNode("p",{class:"p-medium mn-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),U={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(r){const t=r,n=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){C.actions.create(n)}const s=e.ref(!1);function i(){s.value=!0}function o(){s.value=!1}return(a,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:p[0]||(p[0]=_=>i())},[e.renderSlot(a.$slots,"default")]),e.createVNode(h,{onClosePopup:o,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,Z,e.createVNode(b.Select,{select:n.reason,"onUpdate:select":p[1]||(p[1]=_=>n.reason=_),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),z,e.createVNode(y._sfc_main,{submit:l,callback:o,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])],64))}};const A={__name:"Dropdown",props:{label:{type:String,default:"Open"},align:{type:String,default:"left"}},setup(r){let t=k.clickOutside;const n=e.ref(!1);function l(){n.value=!1}return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:i[0]||(i[0]=e.withModifiers(o=>n.value=!n.value,["stop"]))},[e.createTextVNode(e.toDisplayString(r.label)+" ",1),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:r.align==="left"?"0":"auto",right:r.align==="right"?"0":"auto"}),class:"dropdown-content w-15r radius-big"},[e.renderSlot(s.$slots,"default",{},void 0,!0)],4),[[e.vShow,n.value]])]),_:3})])),[[e.unref(t),l]])}},H=m._export_sfc(A,[["__scopeId","data-v-5646d77f"]]),d=x.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),c=e.reactive({memberships:[],error:null}),v={async read({user:r,type:t,target:n,role:l}){try{const s=await d.get("/api/memberships",{params:{user:r,type:t,target:n,role:l}});return c.error=null,c.memberships=s.data,Promise.resolve(s.data)}catch(s){return u.setError(s),Promise.reject(s)}},async create(r){try{const t=await d.post("/api/memberships/create",r);return c.error=null,Promise.resolve(t.data)}catch(t){return u.setError(t),Promise.reject(t)}},async update(r){try{const t=await d.post("/api/memberships/update",r);return c.error=null,Promise.resolve(t.data)}catch(t){return u.setError(t),Promise.reject(t)}},async delete(r){try{const t=await d.post("/api/memberships/delete",r);return c.error=null,Promise.resolve(t.data)}catch(t){return u.setError(t),Promise.reject(t)}}},g={handleMembershipUpdate(r,t,n,l,s,i){let o;if(Array.isArray(r)?o=r.find(a=>a._id===t.target):typeof r=="object"&&r._id===t.target&&(o=r),o)if(o[s]=n,n)o.memberships.push(t),o[i]+=1;else{const a=o.memberships.findIndex(p=>p._id===t._id);a!==-1&&(o.memberships.splice(a,1),o[i]-=1)}}};e.watch(c,r=>{});const Y=Object.freeze(Object.defineProperty({__proto__:null,actions:v,mutations:g,state:c},Symbol.toStringTag,{value:"Module"})),F={},W={width:"652",height:"652",viewBox:"0 0 652 652",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G=e.createElementVNode("path",{fill:"rgb(var(--black))",d:"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z"},null,-1),J=[G];function K(r,t){return e.openBlock(),e.createElementBlock("svg",W,J)}const Q=m._export_sfc(F,[["render",K]]);exports.Dropdown=H;exports.IconEdit=Q;exports.PlaceholderUserpic=j;exports._sfc_main=U;exports._sfc_main$1=h;exports.actions=v;exports.memberships=Y;exports.mutations=g;exports.state=c;