@ozdao/prometheus-framework 0.1.27 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Chips-493042f7.js +1 -0
- package/dist/Chips-9cf6c0da.mjs +286 -0
- package/dist/Feed-27f62b1c.mjs +368 -0
- package/dist/Feed-7c8c901a.mjs +380 -0
- package/dist/Feed-aee74095.js +1 -0
- package/dist/Feed-bfd7d1d9.js +1 -0
- package/dist/Image-1f7252c0.mjs +477 -0
- package/dist/Image-448f9228.js +9 -0
- package/dist/Product-3c9c8197.js +7 -0
- package/dist/Product-748ec8b7.mjs +842 -0
- package/dist/Product-852f952c.js +7 -0
- package/dist/Product-bbdc8460.mjs +841 -0
- package/dist/ProductEdit-17f4e395.mjs +304 -0
- package/dist/ProductEdit-4af06681.js +1 -0
- package/dist/ProductEdit-4f9b6d56.js +1 -0
- package/dist/ProductEdit-a1050ab6.mjs +303 -0
- package/dist/ProfileBlogposts-03d04b92.mjs +66 -0
- package/dist/ProfileBlogposts-f9312adf.js +1 -0
- package/dist/ProfileComments-6d863cd3.mjs +45 -0
- package/dist/ProfileComments-e6970923.js +1 -0
- package/dist/ProfileEvents-917169c6.mjs +58 -0
- package/dist/ProfileEvents-996bce18.js +1 -0
- package/dist/ProfileLikes-0402d1fb.js +1 -0
- package/dist/ProfileLikes-92196922.mjs +45 -0
- package/dist/auth.client.cjs +8 -8
- package/dist/auth.client.js +581 -602
- package/dist/auth.validation-2cdd2231.mjs +17 -0
- package/dist/auth.validation-30bb0efd.js +1 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +65 -65
- package/dist/components/CardFooter/CardFooter.vue.d.ts +1 -1
- package/dist/components/CardHeader/CardHeader.vue.d.ts +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +6 -6
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +2596 -2567
- package/dist/modules/community/components/blocks/FooterBlogpost.vue.d.ts +1 -1
- package/dist/modules/community/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/events/components/blocks/CardEvent.vue.d.ts +3 -3
- package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/events/components/sections/List.vue.d.ts +1 -1
- package/dist/modules/organizations/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/organizations/components/sections/Organizations.vue.d.ts +1 -1
- package/dist/organizations.client-13fc2cbe.js +3 -0
- package/dist/organizations.client-39196bef.mjs +3041 -0
- package/dist/organizations.client-85a2ae66.js +3 -0
- package/dist/organizations.client-91e84d4f.mjs +3022 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +43 -42
- package/dist/states.validation-766a62a6.mjs +13 -0
- package/dist/states.validation-92231934.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +199 -194
- package/package.json +1 -1
- package/src/components/CardFooter/CardFooter.vue +27 -30
- package/src/components/CardHeader/CardHeader.vue +56 -3
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
- package/src/modules/community/components/layouts/Community.vue +5 -5
- package/src/modules/events/components/blocks/CardEvent.vue +3 -2
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/events/router/events.js +1 -0
- package/src/modules/legal/components/pages/Legal.vue +33 -17
- package/src/modules/legal/router/legal.js +51 -21
- package/src/modules/organizations/router/organizations.js +19 -0
- package/src/modules/users/components/pages/Profile.vue +2 -2
- package/src/modules/users/router/users.js +36 -31
@@ -0,0 +1,477 @@
|
|
1
|
+
import { ref as d, onUpdated as U, nextTick as b, onMounted as F, openBlock as i, createElementBlock as p, withDirectives as B, createElementVNode as v, vModelText as $, watch as E, createTextVNode as j, toDisplayString as I, withModifiers as D, watchEffect as K, unref as _, createBlock as R, withCtx as L, Fragment as V, renderList as A, resolveDynamicComponent as P, normalizeClass as W, createVNode as H, Transition as q, createCommentVNode as w } from "vue";
|
2
|
+
import { a as S } from "./index-0ab9d59c.mjs";
|
3
|
+
import { V as G } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
4
|
+
import { _ as J } from "./Chips-9cf6c0da.mjs";
|
5
|
+
const O = ["placeholder"], Q = {
|
6
|
+
__name: "Textarea",
|
7
|
+
props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
|
8
|
+
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
9
|
+
setup(n, { emit: s }) {
|
10
|
+
const t = n;
|
11
|
+
d(t);
|
12
|
+
const e = d(null);
|
13
|
+
d(0);
|
14
|
+
function f(o) {
|
15
|
+
let l = o.target.value.split(/\n+/);
|
16
|
+
if (l.length > 1) {
|
17
|
+
t.prop[t.content] = l[0], b(() => {
|
18
|
+
a();
|
19
|
+
});
|
20
|
+
let r = l.slice(1).map((h) => ({ __name: "Textarea", content: h }));
|
21
|
+
s("addBlock", "Textarea", "", t.index, { blocks: r, ref: e });
|
22
|
+
} else
|
23
|
+
o.target.value.trim() === "" && o.target.value.includes(`
|
24
|
+
|
25
|
+
`) && (console.log("We are adding new block:" + t.index + newBlocks + e), s("addBlock", "Textarea", "", t.index, { blocks: newBlocks, ref: e })), a();
|
26
|
+
}
|
27
|
+
function u(o) {
|
28
|
+
(o.keyCode === 8 || o.keyCode === 46) && t.prop[t.content].trim() === "" && s("deleteBlock", t.prop);
|
29
|
+
}
|
30
|
+
function c() {
|
31
|
+
b(() => {
|
32
|
+
e.value.focus(), s("updateBlock", t.prop, { setFocus: !1 });
|
33
|
+
});
|
34
|
+
}
|
35
|
+
function a() {
|
36
|
+
e.value.style.height = "1rem", e.value.style.height = e.value.scrollHeight + "px";
|
37
|
+
}
|
38
|
+
return U(() => {
|
39
|
+
t.setFocus && b(() => {
|
40
|
+
c();
|
41
|
+
}), a();
|
42
|
+
}), F(() => {
|
43
|
+
t.setFocus && b(() => {
|
44
|
+
c();
|
45
|
+
}), a();
|
46
|
+
}), (o, l) => (i(), p("div", null, [
|
47
|
+
B(v("textarea", {
|
48
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => n.prop[n.content] = r),
|
49
|
+
placeholder: n.placeholder ? n.placeholder : "Enter text",
|
50
|
+
onInput: f,
|
51
|
+
onFocus: l[1] || (l[1] = (r) => s("focus", e.value)),
|
52
|
+
onKeyup: u,
|
53
|
+
ref_key: "textarea",
|
54
|
+
ref: e,
|
55
|
+
class: "text-area mn-thin"
|
56
|
+
}, `
|
57
|
+
`, 40, O), [
|
58
|
+
[$, n.prop[n.content]]
|
59
|
+
])
|
60
|
+
]));
|
61
|
+
}
|
62
|
+
};
|
63
|
+
const X = ["placeholder"], Y = {
|
64
|
+
__name: "H2",
|
65
|
+
props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref", "setFocus"],
|
66
|
+
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
67
|
+
setup(n, { emit: s }) {
|
68
|
+
const t = n;
|
69
|
+
d(t);
|
70
|
+
const e = d(null);
|
71
|
+
d(0);
|
72
|
+
function f(o) {
|
73
|
+
let l = o.target.value.split(/\n+/);
|
74
|
+
if (l.length > 1) {
|
75
|
+
t.prop[t.content] = l[0], b(() => {
|
76
|
+
a();
|
77
|
+
});
|
78
|
+
let r = l.slice(1).map((h) => ({ type: "Textarea", content: h }));
|
79
|
+
s("addBlock", "Textarea", "", t.index, { blocks: r, ref: e });
|
80
|
+
} else
|
81
|
+
o.target.value.trim() === "" && o.target.value.includes(`
|
82
|
+
|
83
|
+
`) && (console.log("We are adding new block:" + t.index + newBlocks + e), s("addBlock", "Textarea", "", t.index, { blocks: newBlocks, ref: e })), a();
|
84
|
+
}
|
85
|
+
function u(o) {
|
86
|
+
(o.keyCode === 8 || o.keyCode === 46) && t.prop[t.content].trim() === "" && s("deleteBlock", t.prop);
|
87
|
+
}
|
88
|
+
function c() {
|
89
|
+
b(() => {
|
90
|
+
e.value.focus(), s("updateBlock", t.prop, { setFocus: !1 });
|
91
|
+
});
|
92
|
+
}
|
93
|
+
function a() {
|
94
|
+
e.value.style.height = "1rem", e.value.style.height = e.value.scrollHeight + "px";
|
95
|
+
}
|
96
|
+
return U(() => {
|
97
|
+
t.setFocus && b(() => {
|
98
|
+
c();
|
99
|
+
}), a();
|
100
|
+
}), F(() => {
|
101
|
+
t.setFocus && b(() => {
|
102
|
+
c();
|
103
|
+
}), a();
|
104
|
+
}), E(() => t.prop[t.content], (o) => {
|
105
|
+
}), (o, l) => (i(), p("div", null, [
|
106
|
+
B(v("textarea", {
|
107
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => n.prop[n.content] = r),
|
108
|
+
placeholder: n.placeholder ? n.placeholder : "Enter text",
|
109
|
+
onInput: f,
|
110
|
+
onFocus: l[1] || (l[1] = (r) => s("focus", e.value)),
|
111
|
+
onKeyup: u,
|
112
|
+
ref_key: "textarea",
|
113
|
+
ref: e,
|
114
|
+
class: "h3 text-area mn-thin"
|
115
|
+
}, `
|
116
|
+
`, 40, X), [
|
117
|
+
[$, n.prop[n.content]]
|
118
|
+
])
|
119
|
+
]));
|
120
|
+
}
|
121
|
+
}, Z = ["placeholder"], ee = {
|
122
|
+
__name: "Caption",
|
123
|
+
props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
|
124
|
+
emits: ["deleteBlock", "addBlock", "focus"],
|
125
|
+
setup(n, { emit: s }) {
|
126
|
+
const t = n;
|
127
|
+
d(t);
|
128
|
+
const e = d(null);
|
129
|
+
function f(c) {
|
130
|
+
const a = /^\s*[-*]\s+(.*)/;
|
131
|
+
let l = c.target.value.split(/\n+/).map((r) => {
|
132
|
+
const h = a.exec(r);
|
133
|
+
return h ? h[1] : null;
|
134
|
+
}).filter((r) => r !== null);
|
135
|
+
l.length > 0 ? (t.prop[t.content] = l, u()) : c.target.value.trim() === "" && (t.prop[t.content] = [], u());
|
136
|
+
}
|
137
|
+
function u() {
|
138
|
+
e.value.style.height = "1rem", e.value.style.height = e.value.scrollHeight + "px";
|
139
|
+
}
|
140
|
+
return U(() => {
|
141
|
+
u();
|
142
|
+
}), F(() => {
|
143
|
+
u();
|
144
|
+
}), E(() => t.prop[t.content], (c) => {
|
145
|
+
(!c || c.length === 0) && s("deleteBlock", t.prop);
|
146
|
+
}), (c, a) => (i(), p("div", null, [
|
147
|
+
B(v("textarea", {
|
148
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => n.prop[n.content] = o),
|
149
|
+
placeholder: n.placeholder ? n.placeholder : "Enter text",
|
150
|
+
onInput: f,
|
151
|
+
onFocus: a[1] || (a[1] = (o) => s("focus", e.value)),
|
152
|
+
ref_key: "textarea",
|
153
|
+
ref: e,
|
154
|
+
class: "br-l br-solid br-main pd-l-small text-area mn-small"
|
155
|
+
}, `
|
156
|
+
`, 40, Z), [
|
157
|
+
[$, n.prop[n.content]]
|
158
|
+
])
|
159
|
+
]));
|
160
|
+
}
|
161
|
+
}, te = ["placeholder"], ne = {
|
162
|
+
__name: "Bullets",
|
163
|
+
props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
|
164
|
+
emits: ["deleteBlock", "addBlock", "focus"],
|
165
|
+
setup(n, { emit: s }) {
|
166
|
+
const t = n;
|
167
|
+
d(t);
|
168
|
+
const e = d(null);
|
169
|
+
function f(c) {
|
170
|
+
const a = /^\s*[-*]\s+(.*)/;
|
171
|
+
let l = c.target.value.split(/\n+/).map((r) => {
|
172
|
+
const h = a.exec(r);
|
173
|
+
return h ? h[1] : null;
|
174
|
+
}).filter((r) => r !== null);
|
175
|
+
l.length > 0 ? (t.prop[t.content] = l, u()) : c.target.value.trim() === "" && (t.prop[t.content] = [], u());
|
176
|
+
}
|
177
|
+
function u() {
|
178
|
+
e.value.style.height = "1rem", e.value.style.height = e.value.scrollHeight + "px";
|
179
|
+
}
|
180
|
+
return U(() => {
|
181
|
+
u();
|
182
|
+
}), F(() => {
|
183
|
+
u();
|
184
|
+
}), E(() => t.prop[t.content], (c) => {
|
185
|
+
(!c || c.length === 0) && s("deleteBlock", t.prop);
|
186
|
+
}), (c, a) => (i(), p("div", null, [
|
187
|
+
j(I(n.prop[n.content]) + " ", 1),
|
188
|
+
B(v("textarea", {
|
189
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => n.prop[n.content] = o),
|
190
|
+
placeholder: n.placeholder ? n.placeholder : "Enter text",
|
191
|
+
onInput: f,
|
192
|
+
onFocus: a[1] || (a[1] = (o) => s("focus", e.value)),
|
193
|
+
ref_key: "textarea",
|
194
|
+
ref: e,
|
195
|
+
class: "text-area mn-small"
|
196
|
+
}, `
|
197
|
+
`, 40, te), [
|
198
|
+
[$, n.prop[n.content]]
|
199
|
+
])
|
200
|
+
]));
|
201
|
+
}
|
202
|
+
}, le = ["src"], oe = {
|
203
|
+
key: 1,
|
204
|
+
class: "t-transp pd-extra"
|
205
|
+
}, ae = {
|
206
|
+
__name: "ImageUpload",
|
207
|
+
props: [
|
208
|
+
"label",
|
209
|
+
"value",
|
210
|
+
"prop"
|
211
|
+
],
|
212
|
+
emits: ["input", "updateBlock"],
|
213
|
+
setup(n, { emit: s }) {
|
214
|
+
const t = n, e = d(null), f = d(null);
|
215
|
+
function u() {
|
216
|
+
f.value.click();
|
217
|
+
}
|
218
|
+
async function c(o) {
|
219
|
+
let l = o.target.files[0];
|
220
|
+
console.log(l);
|
221
|
+
let r = new FormData(), h = "unsorted";
|
222
|
+
r.append("file", l), console.log(r.has("file"));
|
223
|
+
try {
|
224
|
+
let y = await S.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(h)}`, r, {
|
225
|
+
headers: {
|
226
|
+
"Content-Type": "multipart/form-data"
|
227
|
+
}
|
228
|
+
});
|
229
|
+
e.value = y.data.filepath, console.log(e.value), s("input", e.value), s("updateBlock", t.prop, { content: e.value });
|
230
|
+
} catch (C) {
|
231
|
+
console.error(C);
|
232
|
+
}
|
233
|
+
}
|
234
|
+
function a(o) {
|
235
|
+
o.preventDefault(), c({
|
236
|
+
target: {
|
237
|
+
files: o.dataTransfer.files
|
238
|
+
}
|
239
|
+
});
|
240
|
+
}
|
241
|
+
return (o, l) => (i(), p("div", {
|
242
|
+
onClick: u,
|
243
|
+
onDrop: a,
|
244
|
+
onDragover: l[0] || (l[0] = D(() => {
|
245
|
+
}, ["prevent"])),
|
246
|
+
class: "w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"
|
247
|
+
}, [
|
248
|
+
n.prop.content ? (i(), p("img", {
|
249
|
+
key: 0,
|
250
|
+
src: (o.FILE_SERVER_URL || "") + n.prop.content,
|
251
|
+
alt: "Uploaded image",
|
252
|
+
class: "w-100 h-30r object-fit-contain"
|
253
|
+
}, null, 8, le)) : (i(), p("span", oe, "Click or drag-and-drop your image")),
|
254
|
+
v("input", {
|
255
|
+
type: "file",
|
256
|
+
ref_key: "fileInput",
|
257
|
+
ref: f,
|
258
|
+
onChange: c,
|
259
|
+
style: { display: "none" }
|
260
|
+
}, null, 544)
|
261
|
+
], 32));
|
262
|
+
}
|
263
|
+
}, se = ["onMouseover"], ce = {
|
264
|
+
key: 0,
|
265
|
+
class: "z-index-5 radius-thin mn-small relative left-0 mt-2 w-max bg-white shadow-lg rounded"
|
266
|
+
}, re = ["onClick"], ue = ["onClick"], ie = ["onClick"], Ce = {
|
267
|
+
__name: "Constructor",
|
268
|
+
props: ["content"],
|
269
|
+
emits: ["update"],
|
270
|
+
setup(n, { emit: s }) {
|
271
|
+
const t = n;
|
272
|
+
let e = d(null);
|
273
|
+
d(null), e.value = { content: t.content };
|
274
|
+
const f = {
|
275
|
+
Textarea: Q,
|
276
|
+
H2: Y,
|
277
|
+
Bullets: ne,
|
278
|
+
Caption: ee,
|
279
|
+
ImageUpload: ae
|
280
|
+
};
|
281
|
+
function u(y = "Textarea", x = "", m, g) {
|
282
|
+
console.log("We are adding new block (functuin HandleAddBlock):" + y + x + m + g);
|
283
|
+
let k = {
|
284
|
+
order: e.value.content.length + 1,
|
285
|
+
type: y,
|
286
|
+
style: "",
|
287
|
+
class: "",
|
288
|
+
content: x,
|
289
|
+
blocks: [],
|
290
|
+
setFocus: !0
|
291
|
+
};
|
292
|
+
if (g && g.blocks && Array.isArray(g.blocks)) {
|
293
|
+
let T = g.blocks.map((N) => ({
|
294
|
+
...k,
|
295
|
+
content: N.content
|
296
|
+
})), z = [(g.index || m) + 1, 0].concat(T);
|
297
|
+
e.value.content.splice.apply(e.value.content, z);
|
298
|
+
const M = T[T.length - 1];
|
299
|
+
console.log("New block is" + M);
|
300
|
+
} else
|
301
|
+
m !== void 0 ? (e.value.content.splice(m + 1, 0, k), console.log("Latest block is" + k)) : (console.log("Another block is" + k), e.value.content.push(k));
|
302
|
+
o.value = null, s("update", e.value.content);
|
303
|
+
}
|
304
|
+
function c(y, x) {
|
305
|
+
const m = e.value.content.findIndex((g) => g === y);
|
306
|
+
m !== -1 && (e.value.content[m] = { ...e.value.content[m], ...x }), s("update", e.value.content);
|
307
|
+
}
|
308
|
+
function a(y) {
|
309
|
+
let x = e.value.content.findIndex((m) => m === y);
|
310
|
+
x !== -1 && e.value.content.splice(x, 1), e.value.content[x - 1].setFocus = !0, s("update", e.value.content);
|
311
|
+
}
|
312
|
+
const o = d(null), l = d(!1), r = d(!1);
|
313
|
+
function h() {
|
314
|
+
l.value = !0;
|
315
|
+
}
|
316
|
+
function C() {
|
317
|
+
l.value = !1;
|
318
|
+
}
|
319
|
+
return K(() => {
|
320
|
+
e.value && e.value.content.length === 0 && u("Textarea", ""), s("update", e.value.content);
|
321
|
+
}), (y, x) => (i(), p("section", null, [
|
322
|
+
_(e).content ? (i(), R(_(G), {
|
323
|
+
key: 0,
|
324
|
+
class: "w-full",
|
325
|
+
list: _(e).content,
|
326
|
+
onStart: h,
|
327
|
+
onEnd: C
|
328
|
+
}, {
|
329
|
+
default: L(() => [
|
330
|
+
(i(!0), p(V, null, A(_(e).content, (m, g) => (i(), p("div", {
|
331
|
+
key: g,
|
332
|
+
class: "pos-relative"
|
333
|
+
}, [
|
334
|
+
v("div", {
|
335
|
+
onMouseover: (k) => (o.value = g, r.value = !1),
|
336
|
+
class: "pos-relative w-full h-full"
|
337
|
+
}, [
|
338
|
+
(i(), R(P(f[m.type]), {
|
339
|
+
index: g,
|
340
|
+
component: m,
|
341
|
+
prop: m,
|
342
|
+
class: W(m.class),
|
343
|
+
setFocus: m.setFocus,
|
344
|
+
content: "content",
|
345
|
+
onDeleteBlock: a,
|
346
|
+
onAddBlock: u,
|
347
|
+
onUpdateBlock: c
|
348
|
+
}, null, 40, ["index", "component", "prop", "class", "setFocus"]))
|
349
|
+
], 40, se),
|
350
|
+
H(q, { name: "fade" }, {
|
351
|
+
default: L(() => [
|
352
|
+
o.value === g ? (i(), p("div", {
|
353
|
+
key: 0,
|
354
|
+
class: "pos-absolute pos-r-100 pos-t-0 z-index-4 i-semi",
|
355
|
+
onMousedown: x[1] || (x[1] = D((k) => l.value = !0, ["prevent"]))
|
356
|
+
}, [
|
357
|
+
v("button", {
|
358
|
+
onClick: x[0] || (x[0] = (k) => r.value = !r.value),
|
359
|
+
class: "mn-small w-100 i-semi bg-white radius-thin"
|
360
|
+
}, I(m.content ? "..." : "+"), 1),
|
361
|
+
r.value ? (i(), p("div", ce, [
|
362
|
+
v("button", {
|
363
|
+
onClick: (k) => a(m),
|
364
|
+
class: "block w-max text-left px-4 py-2 hover:bg-gray-200"
|
365
|
+
}, "Remove", 8, re),
|
366
|
+
v("button", {
|
367
|
+
onClick: (k) => u("ImageUpload", "", g),
|
368
|
+
class: "block w-max text-left px-4 py-2 hover:bg-gray-200"
|
369
|
+
}, "Add Image", 8, ue),
|
370
|
+
v("button", {
|
371
|
+
onClick: (k) => u("H2", "", g),
|
372
|
+
class: "block w-max text-left px-4 py-2 hover:bg-gray-200"
|
373
|
+
}, "Add Title", 8, ie)
|
374
|
+
])) : w("", !0)
|
375
|
+
], 32)) : w("", !0)
|
376
|
+
]),
|
377
|
+
_: 2
|
378
|
+
}, 1024)
|
379
|
+
]))), 128))
|
380
|
+
]),
|
381
|
+
_: 1
|
382
|
+
}, 8, ["list"])) : w("", !0)
|
383
|
+
]));
|
384
|
+
}
|
385
|
+
}, de = { class: "mn-small" }, pe = /* @__PURE__ */ v("p", { class: "t-semi uppercase" }, "Please log in to leave a comment.", -1), fe = [
|
386
|
+
pe
|
387
|
+
], me = {
|
388
|
+
key: 1,
|
389
|
+
class: "mn-small"
|
390
|
+
}, ve = ["onSubmit"], ge = /* @__PURE__ */ v("button", {
|
391
|
+
type: "submit",
|
392
|
+
class: "mn-l-auto bg-main button"
|
393
|
+
}, "Send", -1), he = { class: "pd-t-zero" }, xe = { class: "p-big" }, _e = {
|
394
|
+
__name: "Comments",
|
395
|
+
props: ["target", "owner", "type"],
|
396
|
+
setup(n) {
|
397
|
+
const s = n, t = S.create({ baseURL: process.env.API_URL }), e = d([]), f = d(""), u = async () => {
|
398
|
+
const { data: a } = await t.get(`/comments/read?type=${s.type}&target=${s.target}`);
|
399
|
+
e.value = a;
|
400
|
+
}, c = async () => {
|
401
|
+
if (f.value)
|
402
|
+
try {
|
403
|
+
const a = await t.post("/comments/create", {
|
404
|
+
target: s.target,
|
405
|
+
user: s.owner,
|
406
|
+
type: s.type,
|
407
|
+
content: f.value
|
408
|
+
});
|
409
|
+
a.data.owner = s.owner, e.value.push(a.data), f.value = "";
|
410
|
+
} catch (a) {
|
411
|
+
console.error(a);
|
412
|
+
}
|
413
|
+
};
|
414
|
+
return u(), (a, o) => (i(), p("div", null, [
|
415
|
+
v("div", null, [
|
416
|
+
v("h3", de, I(e.value.length) + " comments", 1),
|
417
|
+
n.owner ? w("", !0) : (i(), p("div", {
|
418
|
+
key: 0,
|
419
|
+
onClick: o[0] || (o[0] = (l) => a.$router.push({ name: "Sign In" })),
|
420
|
+
class: "cursor-pointer mn-small section bg-black t-white flex-center flex radius-big"
|
421
|
+
}, fe)),
|
422
|
+
n.owner ? (i(), p("div", me, [
|
423
|
+
v("form", {
|
424
|
+
onSubmit: D(c, ["prevent"]),
|
425
|
+
class: "bg-grey radius-big pd-medium"
|
426
|
+
}, [
|
427
|
+
B(v("textarea", {
|
428
|
+
"onUpdate:modelValue": o[1] || (o[1] = (l) => f.value = l),
|
429
|
+
placeholder: "Enter your comment",
|
430
|
+
class: "pd-small p-big w-100 radius-small mn-r-small"
|
431
|
+
}, null, 512), [
|
432
|
+
[$, f.value]
|
433
|
+
]),
|
434
|
+
ge
|
435
|
+
], 40, ve)
|
436
|
+
])) : w("", !0)
|
437
|
+
]),
|
438
|
+
(i(!0), p(V, null, A(e.value, (l) => (i(), p("div", {
|
439
|
+
key: l._id,
|
440
|
+
class: "comment mn-small radius-big pd-medium bg-grey"
|
441
|
+
}, [
|
442
|
+
H(J, {
|
443
|
+
class: "mn-medium",
|
444
|
+
owner: { target: l.user },
|
445
|
+
creator: { target: l.user },
|
446
|
+
date: l.createdAt
|
447
|
+
}, null, 8, ["owner", "creator", "date"]),
|
448
|
+
v("div", he, [
|
449
|
+
v("p", xe, I(l.content), 1)
|
450
|
+
])
|
451
|
+
]))), 128))
|
452
|
+
]));
|
453
|
+
}
|
454
|
+
}, ke = { class: "w-100 bg-white radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small" }, ye = ["src"], Ie = {
|
455
|
+
__name: "Image",
|
456
|
+
props: [
|
457
|
+
"label",
|
458
|
+
"value",
|
459
|
+
"prop"
|
460
|
+
],
|
461
|
+
setup(n) {
|
462
|
+
return d(null), (s, t) => (i(), p("div", ke, [
|
463
|
+
n.prop.content ? (i(), p("img", {
|
464
|
+
key: 0,
|
465
|
+
src: (s.FILE_SERVER_URL || "") + n.prop.content,
|
466
|
+
alt: "Uploaded image",
|
467
|
+
class: "w-100 h-30r object-fit-contain"
|
468
|
+
}, null, 8, ye)) : w("", !0)
|
469
|
+
]));
|
470
|
+
}
|
471
|
+
};
|
472
|
+
export {
|
473
|
+
Q as _,
|
474
|
+
Ce as a,
|
475
|
+
_e as b,
|
476
|
+
Ie as c
|
477
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";const e=require("vue"),B=require("./index-7ecbf72a.js"),C=require("./vue-draggable-next.esm-bundler-80731ae0.js"),$=require("./Chips-493042f7.js");const _=["placeholder"],y={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(o,{emit:r}){const n=o;e.ref(n);const t=e.ref(null);e.ref(0);function d(a){let l=a.target.value.split(/\n+/);if(l.length>1){n.prop[n.content]=l[0],e.nextTick(()=>{c()});let u=l.slice(1).map(f=>({__name:"Textarea",content:f}));r("addBlock","Textarea","",n.index,{blocks:u,ref:t})}else a.target.value.trim()===""&&a.target.value.includes(`
|
2
|
+
|
3
|
+
`)&&(console.log("We are adding new block:"+n.index+newBlocks+t),r("addBlock","Textarea","",n.index,{blocks:newBlocks,ref:t})),c()}function i(a){(a.keyCode===8||a.keyCode===46)&&n.prop[n.content].trim()===""&&r("deleteBlock",n.prop)}function s(){e.nextTick(()=>{t.value.focus(),r("updateBlock",n.prop,{setFocus:!1})})}function c(){t.value.style.height="1rem",t.value.style.height=t.value.scrollHeight+"px"}return e.onUpdated(()=>{n.setFocus&&e.nextTick(()=>{s()}),c()}),e.onMounted(()=>{n.setFocus&&e.nextTick(()=>{s()}),c()}),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=u=>o.prop[o.content]=u),placeholder:o.placeholder?o.placeholder:"Enter text",onInput:d,onFocus:l[1]||(l[1]=u=>r("focus",t.value)),onKeyup:i,ref_key:"textarea",ref:t,class:"text-area mn-thin"},`
|
4
|
+
`,40,_),[[e.vModelText,o.prop[o.content]]])]))}};const V=["placeholder"],N={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(o,{emit:r}){const n=o;e.ref(n);const t=e.ref(null);e.ref(0);function d(a){let l=a.target.value.split(/\n+/);if(l.length>1){n.prop[n.content]=l[0],e.nextTick(()=>{c()});let u=l.slice(1).map(f=>({type:"Textarea",content:f}));r("addBlock","Textarea","",n.index,{blocks:u,ref:t})}else a.target.value.trim()===""&&a.target.value.includes(`
|
5
|
+
|
6
|
+
`)&&(console.log("We are adding new block:"+n.index+newBlocks+t),r("addBlock","Textarea","",n.index,{blocks:newBlocks,ref:t})),c()}function i(a){(a.keyCode===8||a.keyCode===46)&&n.prop[n.content].trim()===""&&r("deleteBlock",n.prop)}function s(){e.nextTick(()=>{t.value.focus(),r("updateBlock",n.prop,{setFocus:!1})})}function c(){t.value.style.height="1rem",t.value.style.height=t.value.scrollHeight+"px"}return e.onUpdated(()=>{n.setFocus&&e.nextTick(()=>{s()}),c()}),e.onMounted(()=>{n.setFocus&&e.nextTick(()=>{s()}),c()}),e.watch(()=>n.prop[n.content],a=>{}),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=u=>o.prop[o.content]=u),placeholder:o.placeholder?o.placeholder:"Enter text",onInput:d,onFocus:l[1]||(l[1]=u=>r("focus",t.value)),onKeyup:i,ref_key:"textarea",ref:t,class:"h3 text-area mn-thin"},`
|
7
|
+
`,40,V),[[e.vModelText,o.prop[o.content]]])]))}},T=["placeholder"],U={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(o,{emit:r}){const n=o;e.ref(n);const t=e.ref(null);function d(s){const c=/^\s*[-*]\s+(.*)/;let l=s.target.value.split(/\n+/).map(u=>{const f=c.exec(u);return f?f[1]:null}).filter(u=>u!==null);l.length>0?(n.prop[n.content]=l,i()):s.target.value.trim()===""&&(n.prop[n.content]=[],i())}function i(){t.value.style.height="1rem",t.value.style.height=t.value.scrollHeight+"px"}return e.onUpdated(()=>{i()}),e.onMounted(()=>{i()}),e.watch(()=>n.prop[n.content],s=>{(!s||s.length===0)&&r("deleteBlock",n.prop)}),(s,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=a=>o.prop[o.content]=a),placeholder:o.placeholder?o.placeholder:"Enter text",onInput:d,onFocus:c[1]||(c[1]=a=>r("focus",t.value)),ref_key:"textarea",ref:t,class:"br-l br-solid br-main pd-l-small text-area mn-small"},`
|
8
|
+
`,40,T),[[e.vModelText,o.prop[o.content]]])]))}},D=["placeholder"],F={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(o,{emit:r}){const n=o;e.ref(n);const t=e.ref(null);function d(s){const c=/^\s*[-*]\s+(.*)/;let l=s.target.value.split(/\n+/).map(u=>{const f=c.exec(u);return f?f[1]:null}).filter(u=>u!==null);l.length>0?(n.prop[n.content]=l,i()):s.target.value.trim()===""&&(n.prop[n.content]=[],i())}function i(){t.value.style.height="1rem",t.value.style.height=t.value.scrollHeight+"px"}return e.onUpdated(()=>{i()}),e.onMounted(()=>{i()}),e.watch(()=>n.prop[n.content],s=>{(!s||s.length===0)&&r("deleteBlock",n.prop)}),(s,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createTextVNode(e.toDisplayString(o.prop[o.content])+" ",1),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=a=>o.prop[o.content]=a),placeholder:o.placeholder?o.placeholder:"Enter text",onInput:d,onFocus:c[1]||(c[1]=a=>r("focus",t.value)),ref_key:"textarea",ref:t,class:"text-area mn-small"},`
|
9
|
+
`,40,D),[[e.vModelText,o.prop[o.content]]])]))}},I=["src"],M={key:1,class:"t-transp pd-extra"},R={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(o,{emit:r}){const n=o,t=e.ref(null),d=e.ref(null);function i(){d.value.click()}async function s(a){let l=a.target.files[0];console.log(l);let u=new FormData,f="unsorted";u.append("file",l),console.log(u.has("file"));try{let h=await B.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(f)}`,u,{headers:{"Content-Type":"multipart/form-data"}});t.value=h.data.filepath,console.log(t.value),r("input",t.value),r("updateBlock",n.prop,{content:t.value})}catch(g){console.error(g)}}function c(a){a.preventDefault(),s({target:{files:a.dataTransfer.files}})}return(a,l)=>(e.openBlock(),e.createElementBlock("div",{onClick:i,onDrop:c,onDragover:l[0]||(l[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[o.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(a.FILE_SERVER_URL||"")+o.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,I)):(e.openBlock(),e.createElementBlock("span",M,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:d,onChange:s,style:{display:"none"}},null,544)],32))}},L=["onMouseover"],S={key:0,class:"z-index-5 radius-thin mn-small relative left-0 mt-2 w-max bg-white shadow-lg rounded"},A=["onClick"],H=["onClick"],z=["onClick"],j={__name:"Constructor",props:["content"],emits:["update"],setup(o,{emit:r}){const n=o;let t=e.ref(null);e.ref(null),t.value={content:n.content};const d={Textarea:y,H2:N,Bullets:F,Caption:U,ImageUpload:R};function i(h="Textarea",k="",p,m){console.log("We are adding new block (functuin HandleAddBlock):"+h+k+p+m);let v={order:t.value.content.length+1,type:h,style:"",class:"",content:k,blocks:[],setFocus:!0};if(m&&m.blocks&&Array.isArray(m.blocks)){let x=m.blocks.map(E=>({...v,content:E.content})),b=[(m.index||p)+1,0].concat(x);t.value.content.splice.apply(t.value.content,b);const w=x[x.length-1];console.log("New block is"+w)}else p!==void 0?(t.value.content.splice(p+1,0,v),console.log("Latest block is"+v)):(console.log("Another block is"+v),t.value.content.push(v));a.value=null,r("update",t.value.content)}function s(h,k){const p=t.value.content.findIndex(m=>m===h);p!==-1&&(t.value.content[p]={...t.value.content[p],...k}),r("update",t.value.content)}function c(h){let k=t.value.content.findIndex(p=>p===h);k!==-1&&t.value.content.splice(k,1),t.value.content[k-1].setFocus=!0,r("update",t.value.content)}const a=e.ref(null),l=e.ref(!1),u=e.ref(!1);function f(){l.value=!0}function g(){l.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&i("Textarea",""),r("update",t.value.content)}),(h,k)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(C.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:f,onEnd:g},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(p,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:v=>(a.value=m,u.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d[p.type]),{index:m,component:p,prop:p,class:e.normalizeClass(p.class),setFocus:p.setFocus,content:"content",onDeleteBlock:c,onAddBlock:i,onUpdateBlock:s},null,40,["index","component","prop","class","setFocus"]))],40,L),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value===m?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute pos-r-100 pos-t-0 z-index-4 i-semi",onMousedown:k[1]||(k[1]=e.withModifiers(v=>l.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:k[0]||(k[0]=v=>u.value=!u.value),class:"mn-small w-100 i-semi bg-white radius-thin"},e.toDisplayString(p.content?"...":"+"),1),u.value?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("button",{onClick:v=>c(p),class:"block w-max text-left px-4 py-2 hover:bg-gray-200"},"Remove",8,A),e.createElementVNode("button",{onClick:v=>i("ImageUpload","",m),class:"block w-max text-left px-4 py-2 hover:bg-gray-200"},"Add Image",8,H),e.createElementVNode("button",{onClick:v=>i("H2","",m),class:"block w-max text-left px-4 py-2 hover:bg-gray-200"},"Add Title",8,z)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}},q={class:"mn-small"},K=e.createElementVNode("p",{class:"t-semi uppercase"},"Please log in to leave a comment.",-1),P=[K],W={key:1,class:"mn-small"},G=["onSubmit"],J=e.createElementVNode("button",{type:"submit",class:"mn-l-auto bg-main button"},"Send",-1),O={class:"pd-t-zero"},Q={class:"p-big"},X={__name:"Comments",props:["target","owner","type"],setup(o){const r=o,n=B.axios.create({baseURL:process.env.API_URL}),t=e.ref([]),d=e.ref(""),i=async()=>{const{data:c}=await n.get(`/comments/read?type=${r.type}&target=${r.target}`);t.value=c},s=async()=>{if(d.value)try{const c=await n.post("/comments/create",{target:r.target,user:r.owner,type:r.type,content:d.value});c.data.owner=r.owner,t.value.push(c.data),d.value=""}catch(c){console.error(c)}};return i(),(c,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[e.createElementVNode("h3",q,e.toDisplayString(t.value.length)+" comments",1),o.owner?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:a[0]||(a[0]=l=>c.$router.push({name:"Sign In"})),class:"cursor-pointer mn-small section bg-black t-white flex-center flex radius-big"},P)),o.owner?(e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("form",{onSubmit:e.withModifiers(s,["prevent"]),class:"bg-grey radius-big pd-medium"},[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":a[1]||(a[1]=l=>d.value=l),placeholder:"Enter your comment",class:"pd-small p-big w-100 radius-small mn-r-small"},null,512),[[e.vModelText,d.value]]),J],40,G)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l._id,class:"comment mn-small radius-big pd-medium bg-grey"},[e.createVNode($._sfc_main,{class:"mn-medium",owner:{target:l.user},creator:{target:l.user},date:l.createdAt},null,8,["owner","creator","date"]),e.createElementVNode("div",O,[e.createElementVNode("p",Q,e.toDisplayString(l.content),1)])]))),128))]))}},Y={class:"w-100 bg-white radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small"},Z=["src"],ee={__name:"Image",props:["label","value","prop"],setup(o){return e.ref(null),(r,n)=>(e.openBlock(),e.createElementBlock("div",Y,[o.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(r.FILE_SERVER_URL||"")+o.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,Z)):e.createCommentVNode("",!0)]))}};exports._sfc_main=y;exports._sfc_main$1=j;exports._sfc_main$2=X;exports._sfc_main$3=ee;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./organizations.client-85a2ae66.js"),V=require("vue-router"),k=require("vue-i18n"),B=require("./carousel.es-ee047568.js"),x=require("./vuex.esm-bundler-e8cf3cd2.js"),L=require("./Feed-aee74095.js"),N=require("./_plugin-vue_export-helper-f246444f.js"),I=require("./Chips-493042f7.js");require("./auth-2f9b2dfc.js");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-f3d37f29.js");require("./index-7ecbf72a.js");require("./Tab-6f0a4909.js");require("./inputs.validation-24ae76b9.js");require("./ButtonFollow-7c0180b3.js");require("./Button-ee08e6bf.js");require("./Feed-bfd7d1d9.js");require("./EmptyState-7658d7d6.js");require("./IconEdit-4cfe2115.js");require("./Socials-821bd677.js");require("./CardOrganization-bf366e4e.js");require("./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js");require("./organizations-bb8f676d.js");require("./UploadImage-33f6a9f4.js");require("./Select-b9299fb6.js");require("./Publics-4438ca51.js");require("./auth.validation-30bb0efd.js");/**
|
2
|
+
* vue-meta v3.0.0-alpha.10
|
3
|
+
* (c) 2022
|
4
|
+
* - Pim (@pimlie)
|
5
|
+
* - All the amazing contributors
|
6
|
+
* @license MIT
|
7
|
+
*/const M=t=>t!==null&&typeof t=="object";function $(t,o,n){for(const c in o)c in n?M(t[c])?$(t[c],o[c],n[c]):o[c]!==n[c]&&(t[c]=o[c]):t[c]=o[c];for(const c in n)o&&c in o||delete t[c]}function b(t){if(t||(t=e.getCurrentInstance()||void 0),t)return t.appContext.config.globalProperties.$metaManager}function q(t,o){const n=e.getCurrentInstance()||void 0;if(!o&&n&&(o=b(n)),!o)throw new Error("No manager or current instance");e.isProxy(t)&&(e.watch(t,(a,r)=>{$(c.meta,a,r)}),t=t.value);const c=o.addMeta(t,n);return c}e.defineComponent({name:"Metainfo",inheritAttrs:!1,setup:(t,{slots:o})=>()=>{const n=b();if(n)return n.render({slots:o})}});const D={class:"pd-t-zero pd-thin"},z={class:"bg-black t-white radius-big footer"},A={id:"top-footer",class:"cols-3 section"},P={href:"mailto:hello@weeder.delivery",class:"w-100 radius-small contact col"},T={class:"t-transp"},R={class:"h4 mn-small"},F=e.createElementVNode("div",{class:"store-buttons"},null,-1),H={href:"https://t.me/weeder_support",target:"_blank",class:"w-100 radius-small contact col"},O={class:"h4 mn-small"},Z=e.createElementVNode("div",{class:"socials flex-nojustify flex"},[e.createElementVNode("a",{class:"mn-r-small",href:"https://t.me/weederdelivery",target:"_blank"}),e.createElementVNode("a",{class:"mn-r-small",href:"https://t.me/weederdelivery",target:"_blank"}),e.createElementVNode("a",{class:"mn-r-small",href:"https://t.me/weederdelivery",target:"_blank"})],-1),j={class:"cols-3 section"},X={class:"lh-semi nav-footer col"},U={class:"mn-small t-semi h5"},W={class:"mn-medium ol"},J=["innerHTML"],Y=e.createElementVNode("a",{href:"https://ozdao.dev",target:"_blank"},null,-1),G={class:"lh-semi nav-footer col"},Q={class:"mn-small t-semi h5"},K={class:"lh-semi col"},ee={class:"mn-small t-semi h5"},te=e.createElementVNode("div",{class:"mn-medium"},[e.createElementVNode("li",null,"Phuket,"),e.createElementVNode("li",null,"43 283 Soi Boathouse,"),e.createElementVNode("li",null,"Rawai")],-1),oe={class:"pd-small t-center br-top-dark copyright"},ne={__name:"Footer",async setup(t){let o,n;V.useRouter(),[o,n]=e.withAsyncContext(()=>p.actions$1.fetchCategories()),await o,n();const c={locale:"en",messages:{en:{store:"Online Store",information:"Information",description:"Weeder Delivery stocks a wide range of quality!",app:"Get Our App",adress:"Adress",support:"Get Online Support",socials:"Find Us in Socials",email:"Contact by email",time:"24 / 7 Seven days a week",copyright:"2022 © Weeder Delivery. Proudly created with OZ DAO.",pages:[],categories:[]},ru:{store:"Онлайн Каталог",information:"Информация",description:"Weeder Delivery предлагает широкий ассортимент качественных!",app:"Скачайте Наше Приложение",adress:"Адрес",support:"Онлайн Поддержка",socials:"Найдите Нас в Социальных Сетях",email:"Связаться по email",time:"24 / 7 без перерывов",copyright:"2022 © Weeder Delivery. С гордостью создано OZ DAO.",pages:[],categories:[]}}};p.state.all.forEach(r=>{r.localization.forEach(m=>{c.messages[m.locale].categories.push(m.text)})});const{t:a}=k.useI18n(c);return(r,m)=>(e.openBlock(),e.createElementBlock("div",D,[e.createElementVNode("footer",z,[e.createElementVNode("div",A,[e.createElementVNode("a",P,[e.createElementVNode("p",T,e.toDisplayString(e.unref(a)("description")),1)]),e.createElementVNode("div",{onClick:m[0]||(m[0]=i=>this.$router.push({name:"Home"})),class:"flex-v-center flex logo-link col"},[e.createElementVNode("p",R,e.toDisplayString(e.unref(a)("app")),1),F]),e.createElementVNode("a",H,[e.createElementVNode("p",O,e.toDisplayString(e.unref(a)("socials")),1),Z])]),e.createElementVNode("div",j,[e.createElementVNode("ul",X,[e.createElementVNode("li",U,e.toDisplayString(e.unref(a)("store")),1),e.createElementVNode("div",W,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.state.all,(i,l)=>(e.openBlock(),e.createElementBlock("li",null,[e.createElementVNode("span",{innerHTML:e.unref(a)("categories["+l+"]")},null,8,J)]))),256))]),Y]),e.createElementVNode("ul",G,[e.createElementVNode("li",Q,e.toDisplayString(e.unref(a)("information")),1)]),e.createElementVNode("ul",K,[e.createElementVNode("li",ee,e.toDisplayString(e.unref(a)("email")),1),te])]),e.createElementVNode("p",oe,e.toDisplayString(e.unref(a)("copyright")),1)])]))}},ce={key:0,class:"thc"},ae={class:"t-bold t-white"},re=e.createElementVNode("p",{class:"t-white h6"},"THC",-1),se={key:0,width:"60",height:"66",viewBox:"0 0 60 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ie=e.createElementVNode("path",{fill:"#FF0000",stroke:"white","stroke-width":"3",d:"M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"},null,-1),le=[ie],de={key:1,width:"60",height:"66",viewBox:"0 0 60 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ue=e.createElementVNode("path",{fill:"#FF0099",stroke:"white","stroke-width":"3",d:"M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"},null,-1),me=[ue],he={key:2,width:"60",height:"66",viewBox:"0 0 60 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pe=e.createElementVNode("path",{fill:"#EB00FF",stroke:"white","stroke-width":"3",d:"M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"},null,-1),fe=[pe],ge={key:3,width:"60",height:"66",viewBox:"0 0 60 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_e=e.createElementVNode("path",{fill:"#00FF29",stroke:"white","stroke-width":"3",d:"M26 3.3094C28.4752 1.88034 31.5248 1.88034 34 3.3094L53.7128 14.6906C56.188 16.1197 57.7128 18.7607 57.7128 21.6188V44.3812C57.7128 47.2393 56.188 49.8803 53.7128 51.3094L34 62.6906C31.5248 64.1197 28.4752 64.1197 26 62.6906L6.28719 51.3094C3.81198 49.8803 2.28719 47.2393 2.28719 44.3812V21.6188C2.28719 18.7607 3.81198 16.1197 6.28719 14.6906L26 3.3094Z"},null,-1),ve=[_e],Ce={__name:"THC",props:{product:Object},setup(t){return(o,n)=>t.product.information[1]?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("p",ae,e.toDisplayString(t.product.information[1].value)+" %",1),re,Number(t.product.information[1].value)>=18?(e.openBlock(),e.createElementBlock("svg",se,le)):e.createCommentVNode("",!0),Number(t.product.information[1].value)<=18&&Number(t.product.information[1].value)>=14?(e.openBlock(),e.createElementBlock("svg",de,me)):e.createCommentVNode("",!0),Number(t.product.information[1].value)<=14&&Number(t.product.information[1].value)>=10?(e.openBlock(),e.createElementBlock("svg",he,fe)):e.createCommentVNode("",!0),Number(t.product.information[1].value)<=10?(e.openBlock(),e.createElementBlock("svg",ge,ve)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}},ke={class:"price-tag radius-small"},ye={key:0,class:"t-transp t-main p-medium line-through price"},S={__name:"Price",props:{product:Object,size:String},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("p",{class:e.normalizeClass({"t-main":t.product.sale,h4:!t.size,"h5 t-semi pd-thin":t.size==="small","h3 t-semi pd-small":t.size==="big"})},e.toDisplayString(t.product.price)+" "+e.toDisplayString(o.returnCurrency()),3),t.product.sale?(e.openBlock(),e.createElementBlock("p",ye,e.toDisplayString(t.product.price/100*(100+t.product.sale))+" "+e.toDisplayString(o.returnCurrency()),1)):e.createCommentVNode("",!0)]))}},we=["src"],Ve={key:1,class:"h-100 w-100",style:{"object-fit":"cover"},width:"524",height:"345",viewBox:"0 0 524 345",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ee=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),Ne=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),Be=e.createElementVNode("circle",{cx:"262",cy:"172",r:"56",fill:"#00ff88","fill-opacity":"0.1"},null,-1),$e=e.createElementVNode("path",{fill:"#00ff88",d:"M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"},null,-1),be=[Ee,Ne,Be,$e],Se={class:"pd-medium t-left product-card-content"},xe={class:"mn-thin h4"},Le={key:1,class:"mn-small t-transp p-small"},Ie=e.createElementVNode("div",null,null,-1),Me={__name:"ProductCard",props:["product"],setup(t){const o=t,n=x.useStore();return k.useI18n(),e.computed(()=>n.state.favorites.items.filter(function(c,a){if(c._id===o.product._id)return!0})),(c,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["radius-big product",t.product.information[2]&&t.product.information[2].value==="AAAA"?"bg-black t-white":"bg-white"])},[e.createElementVNode("div",{class:e.normalizeClass(["o-hidden w-100 h-100 square",t.product.information[2]&&t.product.information[2].value==="AAAA"?"bg-black":"bg-white"])},[t.product.images[0]?(e.openBlock(),e.createElementBlock("img",{key:0,src:(c.FILE_SERVER_URL||"")+t.product.images[0],class:"w-100 h-100"},null,8,we)):(e.openBlock(),e.createElementBlock("svg",Ve,be)),t.product.information.length>0?(e.openBlock(),e.createBlock(Ce,{key:2,product:t.product},null,8,["product"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",Se,[t.product.information.length>0?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["t-semi h6",t.product.information[2]&&t.product.information[2].value==="AAAA"?"t-violet":"t-main"])},e.toDisplayString(t.product.information[0].value),3)):e.createCommentVNode("",!0),e.createElementVNode("p",xe,e.toDisplayString(t.product.name),1),t.product.description&&!t.product.localization?(e.openBlock(),e.createElementBlock("p",Le,e.toDisplayString(t.product.description.substring(0,99))+"... ",1)):e.createCommentVNode("",!0),e.createVNode(S,{product:t.product,size:"small",class:e.normalizeClass(t.product.information[2]&&t.product.information[2].value==="AAAA"?"bg-third t-white":"")},null,8,["product","class"])]),Ie],2))}},qe={id:"popularProducts",class:"pd-thin"},De={class:"bg-grey radius-big pd-t-big pd-b-big"},ze={class:"mn-semi t-center title"},Ae={class:""},Pe={__name:"PopularProducts",async setup(t){let o,n;V.useRouter(),[o,n]=e.withAsyncContext(()=>p.actions$1.read({limit:10})),await o,n();const c={messages:{en:{title:"Explore Hot Products 🔥",subtitle:"We attach great importance to high quality and customer satisfaction"},ru:{title:"Самое Горячее 🔥",subtitle:"Мы придаем большое значение высокому качеству товаров и удовлетворенности клиентов"}}},{t:a}=k.useI18n(c),r=e.ref(null),m={320:{itemsToShow:1},640:{itemsToShow:3},1024:{itemsToShow:3}};return e.onMounted(async()=>{setTimeout(()=>{r.value.updateSlideWidth()},500)}),(i,l)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",De,[e.createElementVNode("div",ze,[e.createElementVNode("h2",Ae,e.toDisplayString(e.unref(a)("title")),1)]),e.createVNode(e.unref(B.Carousel),{ref_key:"myCarousel",ref:r,"items-to-show":3,transition:330,wrapAround:!0,autoplay:3e3,pauseAutoplayOnHover:!0,breakpoints:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.state.all,(d,u,f)=>(e.openBlock(),e.createBlock(e.unref(B.Slide),{class:"pd-thin",key:u},{default:e.withCtx(()=>[e.createVNode(Me,{class:"carousel__item h-100 w-100",product:d},null,8,["product"])]),_:2},1024))),128))]),_:1},512)])]))}};const Te={class:"product-360-viewer"},Re=e.createStaticVNode('<svg class="pos-absolute z-index-2 pos-b-0 pd-small" width="73" height="50" viewBox="0 0 73 50" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6accd1fb><path d="M42.5934 17.2017C42.5934 20.8208 39.8428 23.7544 36.45 23.7544C33.0573 23.7544 30.3066 20.8208 30.3066 17.2017C30.3066 13.5826 33.0573 10.6484 36.45 10.6484C39.8428 10.6484 42.5934 13.5826 42.5934 17.2017Z" fill="black" fill-opacity="0.1" data-v-6accd1fb></path><path d="M22.5953 29.4883H50.3053C53.7389 29.4883 56.5197 26.778 56.5197 23.4405V10.8396C56.5197 7.49996 53.739 4.79176 50.3053 4.79176H48.8712C48.2747 2.05313 45.7826 0 42.7962 0H30.1063C27.1179 0 24.6257 2.053 24.0313 4.78967H22.5971C19.1656 4.78967 16.3828 7.49788 16.3828 10.8375V23.4384C16.3807 26.778 19.1634 29.4882 22.595 29.4882L22.5953 29.4883ZM36.449 8.31471C41.4535 8.31471 45.5123 12.2648 45.5123 17.1352C45.5123 22.0062 41.4535 25.9582 36.449 25.9582C31.4445 25.9582 27.3856 22.0081 27.3856 17.1377C27.3856 12.2673 31.4445 8.31471 36.449 8.31471ZM20.9092 9.32597H24.0182C24.9472 9.32597 25.7019 10.0584 25.7019 10.9625C25.7019 11.8686 24.9493 12.6011 24.0182 12.6011H20.9092C19.9823 12.6011 19.2254 11.8707 19.2254 10.9625C19.2275 10.0604 19.9822 9.32597 20.9092 9.32597Z" fill="black" fill-opacity="0.1" data-v-6accd1fb></path><path d="M58.8645 12.2878C58.8645 12.2878 77.1839 21.8549 65.5604 32.0445C63.6718 33.6967 55.2747 38.9138 42.5947 39.9368V45.0519C50.0424 44.2514 61.7635 41.887 68.4037 34.9253C82.5323 20.1097 58.8657 12.2871 58.8657 12.2871L58.8645 12.2878Z" fill="black" fill-opacity="0.1" data-v-6accd1fb></path><path d="M37.6664 41.209L29.1818 35.5097C28.077 34.7658 27.1702 35.2358 27.1702 36.5516V39.5855C16.2598 38.0408 9.07761 33.565 7.35125 32.0517C-4.2894 21.858 14.0557 12.2871 14.0557 12.2871C14.0557 12.2871 -9.64257 20.1134 4.5039 34.9343C10.2723 40.9769 19.8619 43.5552 27.1712 44.656V44.952V48.5701C27.1712 49.8901 28.078 50.3554 29.1827 49.6141L37.6673 43.9127C38.7757 43.1683 38.7757 41.9525 37.6673 41.2092L37.6664 41.209Z" fill="black" fill-opacity="0.1" data-v-6accd1fb></path></svg>',1),Fe={key:0,class:"h-100 w-100 transition-ease"},He=["src"],Oe={__name:"Images360",props:{imagePath:{type:String,required:!0},imageCount:{type:Number,default:36},autoRotateSpeed:{type:Number,default:100}},setup(t){const o=t,n=e.ref(0),c=e.ref(!1),a=e.ref(0),r=e.ref(0);e.ref(!0);const m=async()=>{const h=[];for(let g=1;g<=o.imageCount;g++){const v=new Image;v.src=`${o.imagePath}/${g}.jpg`;try{await v.decode(),r.value++}catch(E){console.warn(`Failed to decode ${o.imagePath}/${g}.jpg:`,E)}h.push(v)}return h},i=e.computed(()=>Math.round(r.value/o.imageCount*100)),l=e.ref([]),d=e.ref(""),u=e.ref(null);e.watch(n,h=>{d.value=l.value[h]||""});function f(h){c.value=!0,a.value=h.clientX||h.touches[0].clientX}function y(h){if(!c.value)return;const g=h.clientX||h.touches[0].clientX,v=g-a.value;if(Math.abs(v)>=5){const E=v>0?1:-1;n.value=(n.value+E)%o.imageCount,n.value<0&&(n.value=o.imageCount-1),a.value=g}}function C(){c.value=!1}let _=null;const w=()=>{l.value=[]};return e.onMounted(async()=>{l.value=await m(),d.value=l.value[0]||""}),e.onUnmounted(()=>{clearInterval(_),w()}),(h,g)=>(e.openBlock(),e.createElementBlock("div",Te,[Re,e.createVNode(e.Transition,{name:"scale5",css:!u.value,appear:""},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",Fe,[d.value?(e.openBlock(),e.createElementBlock("img",{key:d.value,class:"h-100 w-100 transition-ease",src:(h.FILE_SERVER_URL||"")+d.value.src,alt:"360 product view",onMousedown:f,onMousemove:y,onMouseup:C,onMouseleave:C,onTouchstart:f,onTouchmove:y,onTouchend:C,onDragstart:g[0]||(g[0]=e.withModifiers(()=>{},["prevent"]))},null,40,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1},8,["css"]),e.createVNode(e.Transition,{name:"scale5"},{default:e.withCtx(()=>[d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L.Loader,{key:0,progress:e.unref(i),class:"center z-index-5"},null,8,["progress"]))]),_:1})]))}},Ze=N._export_sfc(Oe,[["__scopeId","data-v-6accd1fb"]]);const je=["src"],Xe={__name:"Magnifier",props:{imageSrc:String,zoomFactor:{type:Number,default:2}},setup(t){const o=t,n=e.ref(!1),c=e.ref({});function a(u){const f=u.target.getBoundingClientRect(),y=u.clientX-f.left,C=u.clientY-f.top,_=100,w=Math.max(0,Math.min(y-_/2,f.width-_)),h=Math.max(0,Math.min(C-_/2,f.height-_));c.value={left:`${w}px`,top:`${h}px`,backgroundPosition:`-${w*o.zoomFactor}px -${h*o.zoomFactor}px`,backgroundImage:`url(${o.imageSrc})`,backgroundSize:`${f.width*o.zoomFactor}px ${f.height*o.zoomFactor}px`}}function r(u){n.value=!0,a(u)}function m(){n.value=!1}function i(u){u.preventDefault(),n.value=!0,a(u.touches[0])}function l(u){u.preventDefault(),a(u.touches[0])}function d(){n.value=!1}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"w-100 image-container",onMousemove:r,onMouseleave:m,onTouchstart:i,onTouchmove:l,onTouchend:d},[e.createElementVNode("img",{src:(u.FILE_SERVER_URL||"")+t.imageSrc,class:"w-100"},null,8,je),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"zoom-lens",style:e.normalizeStyle(c.value)},null,4)):e.createCommentVNode("",!0)],32))}},Ue=N._export_sfc(Xe,[["__scopeId","data-v-c3815eaf"]]);const We={class:"product-images"},Je={class:"no-responsive cols-4 thumbnails"},Ye=["src","onClick"],Ge={__name:"ImagesThumbnails",props:{images:{type:Array,required:!0}},setup(t){const o=e.ref(!1),n=e.ref(0),c=r=>{n.value=r,o.value=!0},a=()=>{o.value=!1};return(r,m)=>(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("div",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.images,(i,l)=>(e.openBlock(),e.createElementBlock("img",{key:l,src:(r.FILE_SERVER_URL||"")+i,onClick:d=>c(l),class:"radius-medium bg-white o-hidden thumbnail"},null,8,Ye))),128))]),e.createVNode(I._sfc_main$2,{onClosePopup:a,isPopupOpen:o.value,class:"radius-medium o-hidden"},{default:e.withCtx(()=>[e.createVNode(Ue,{imageSrc:r.path+t.images[n.value],class:"magnifier z-index-4"},null,8,["imageSrc"])]),_:1},8,["isPopupOpen"])]))}},Qe=N._export_sfc(Ge,[["__scopeId","data-v-732c99c3"]]),s=e.reactive({items:[],currentState:!1}),Ke={toggleShopcart(){s.currentState=!s.currentState},setShopcart(){try{localStorage.getItem("shopcart")&&(s.items=JSON.parse(localStorage.getItem("shopcart")))}catch(t){throw console.error(t),t}},addProductToCart(t){const o=s.items.find(n=>n._id===t._id);o?o.quantity++:s.items.push({_id:t._id,images:t.images,name:t.name,price:t.price,quantity:1}),localStorage.setItem("shopcart",JSON.stringify(s.items))},removeProduct(t){const o=s.items.find(c=>c._id===t),n=s.items.indexOf(o);n>-1&&(s.items.splice(n,1),localStorage.setItem("shopcart",JSON.stringify(s.items)))},decrementItemQuantity(t){const o=s.items.find(c=>c._id===t),n=s.items.indexOf(o);n>-1&&(o.quantity--,o.quantity<1&&s.items.splice(n,1),localStorage.setItem("shopcart",JSON.stringify(s.items)))},incrementItemQuantity(t){const o=s.items.find(n=>n._id===t);o&&(o.quantity++,localStorage.setItem("shopcart",JSON.stringify(s.items)))},resetShopcart({state:t}){t.items=[],localStorage.removeItem("shopcart")}};e.computed(()=>Number(s.items.reduce((t,o)=>t+o.price*o.quantity,0))),e.computed(()=>Number(s.items.reduce((t,o)=>t+o.quantity,0))),e.computed(()=>Number(s.currentState));e.watch(s,(t,o)=>{});const et={class:"cols-2-1_2 gap-big product-data-wrapper"},tt={class:"flex-nowrap flex-column flex"},ot={class:"h-100 bg-white radius-medium o-hidden"},nt=["src"],ct={key:2,width:"524",height:"345",viewBox:"0 0 524 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"h-100 w-100",style:{"object-fit":"cover"}},at=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),rt=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),st=e.createElementVNode("circle",{cx:"262",cy:"172",r:"56",fill:"#00ff88","fill-opacity":"0.1"},null,-1),it=e.createElementVNode("path",{fill:"#00ff88",d:"M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"},null,-1),lt=[at,rt,st,it],dt={class:"h-100 flex-justify flex col"},ut={key:0,class:"t-main t-semi p-big"},mt={class:"w-100 h1-product mn-thin"},ht={key:1,class:"mn-semi"},pt={key:2,class:"w-100 mn-medium t-transp"},ft={key:3,class:"w-100 mn-medium t-transp"},gt={class:"cols-2 w-100 gap-small mn-semi"},_t={class:"w-100 pd-small radius-small bg-white product-information"},vt={class:"t-demi"},Ct={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},kt=["disabled"],yt={__name:"SectionProduct",props:{product:{type:Object,required:!0},recommendation:{type:String}},setup(t){const o=t,n=e.computed(()=>o.product.images),c={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI Рекомендует вам",description:"",addtoorder:"Добавить в корзину",fastorder:"Быстрый заказ"}}};o.product.localization.forEach(i=>{c.messages[i.locale].description=i.text});const{t:a}=k.useI18n(c);function r(i){return!(i.quantity>0)}function m(i){Ke.addProductToCart(i)}return(i,l)=>(e.openBlock(),e.createElementBlock("div",et,[e.createElementVNode("div",tt,[e.createElementVNode("div",ot,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(Ze,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),e.unref(n)[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 w-100",style:{"object-fit":"cover"},src:(i.FILE_SERVER_URL||"")+e.unref(n)[0]},null,8,nt)):e.createCommentVNode("",!0),!e.unref(n)[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("svg",ct,lt)):e.createCommentVNode("",!0)]),e.unref(n).length>1?(e.openBlock(),e.createBlock(Qe,{key:0,images:e.unref(n),class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",dt,[t.recommendation?(e.openBlock(),e.createElementBlock("h2",ut,e.toDisplayString(e.unref(a)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",mt,e.toDisplayString(t.product.name),1),e.createVNode(S,{product:t.product,size:"big",class:"mn-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",ht,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",pt,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",ft,e.toDisplayString(e.unref(a)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",gt,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,d=>(e.openBlock(),e.createElementBlock("div",_t,[e.createElementVNode("p",vt,e.toDisplayString(d.name),1),e.createElementVNode("p",null,e.toDisplayString(d.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ct,[e.createElementVNode("button",{disabled:r(t.product),onClick:l[0]||(l[0]=d=>m(t.product)),class:"w-100 mn-r-small bg-main button"},e.toDisplayString(e.unref(a)("addtoorder")),9,kt)])])]))}};const wt={__name:"Product",async setup(t){let o,n;const c=V.useRoute();V.useRouter(),[o,n]=e.withAsyncContext(()=>p.actions$1.read({_id:c.params.product})),await o,n(),c.meta.title.en=p.state.current.name,c.meta.title.ru=p.state.current.name;const a=e.computed(()=>p.state.current),r={messages:{en:{},ru:{}}};p.state.current.localization.forEach(l=>{r.messages[l.locale].description=l.text});const{t:m}=k.useI18n(r),i=e.computed(()=>({title:p.state.current.name,description:m("description")}));return q(i),e.onMounted(()=>{}),(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(p._sfc_main,{class:"section"}),e.createVNode(yt,{product:e.unref(a),class:"section"},null,8,["product"]),e.createVNode(Pe),e.createVNode(ne)]))}};exports.default=wt;
|