@ozdao/prometheus-framework 0.0.86 → 0.0.87

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs +1944 -0
  3. package/dist/CardOrganization-ee5c34ab.js +1 -0
  4. package/dist/CardOrganization-f70bd169.mjs +202 -0
  5. package/dist/Comments-63f154a6.js +9 -0
  6. package/dist/Comments-c5afa4d6.mjs +459 -0
  7. package/dist/Feed-8fd41524.js +1 -0
  8. package/dist/Feed-ecf37814.mjs +367 -0
  9. package/dist/IconEdit-736c89be.js +1 -0
  10. package/dist/IconEdit-e9fd4c6c.mjs +21 -0
  11. package/dist/Popup-105ef2c3.js +1 -0
  12. package/dist/Popup-82fb2c8a.mjs +76 -0
  13. package/dist/Product-2f3d592f.mjs +837 -0
  14. package/dist/Product-2fbf9d99.js +7 -0
  15. package/dist/ProductEdit-20709821.mjs +349 -0
  16. package/dist/ProductEdit-a81d13b9.js +1 -0
  17. package/dist/ProfileBlogposts-eca9916c.js +1 -0
  18. package/dist/ProfileBlogposts-fb014bc6.mjs +63 -0
  19. package/dist/ProfileComments-58094a50.mjs +43 -0
  20. package/dist/ProfileComments-b919f021.js +1 -0
  21. package/dist/ProfileEvents-05485e20.js +1 -0
  22. package/dist/ProfileEvents-5d206e3d.mjs +55 -0
  23. package/dist/ProfileLikes-2f3a4488.js +1 -0
  24. package/dist/ProfileLikes-b5ac7f48.mjs +43 -0
  25. package/dist/ProfileOrganizations-0b76e38f.js +1 -0
  26. package/dist/ProfileOrganizations-32ab1e30.mjs +211 -0
  27. package/dist/Publics-3f277c17.js +1 -0
  28. package/dist/Publics-9ebffff1.mjs +122 -0
  29. package/dist/Tab-58cd105f.mjs +46 -0
  30. package/dist/Tab-6f0a4909.js +1 -0
  31. package/dist/UploadImage-441e8526.js +1 -0
  32. package/dist/UploadImage-ff8f9a0c.mjs +83 -0
  33. package/dist/auth.client.cjs +2 -2
  34. package/dist/auth.client.js +60 -40
  35. package/dist/community.client.cjs +1 -9
  36. package/dist/community.client.js +367 -739
  37. package/dist/community.server.js +16 -4
  38. package/dist/community.server.mjs +16 -4
  39. package/dist/events.client.cjs +1 -1
  40. package/dist/events.client.js +431 -329
  41. package/dist/events.server.js +19 -2
  42. package/dist/events.server.mjs +19 -2
  43. package/dist/inputs.validation-24ae76b9.js +1 -0
  44. package/dist/modules/constructor/components/elements/Bullets.vue.d.ts +15 -0
  45. package/dist/modules/constructor/components/elements/Caption.vue.d.ts +15 -0
  46. package/dist/modules/constructor/components/elements/H2.vue.d.ts +16 -0
  47. package/dist/modules/constructor/components/elements/Image.vue.d.ts +8 -0
  48. package/dist/modules/constructor/components/elements/ImageUpload.vue.d.ts +9 -0
  49. package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +12 -0
  50. package/dist/modules/constructor/components/sections/Constructor.vue.d.ts +7 -0
  51. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -0
  52. package/dist/organizations-1b4c84ee.mjs +121 -0
  53. package/dist/organizations-af43bda4.js +1 -0
  54. package/dist/organizations.client-253c8068.mjs +3179 -0
  55. package/dist/organizations.client-c60d7659.js +3 -0
  56. package/dist/organizations.client.cjs +1 -3
  57. package/dist/organizations.client.js +49 -3025
  58. package/dist/style.css +1 -1
  59. package/dist/users.client.cjs +1 -1
  60. package/dist/users.client.js +10 -10
  61. package/package.json +1 -1
  62. package/src/modules/auth/router/auth.js +28 -7
  63. package/src/modules/community/community.client.js +1 -12
  64. package/src/modules/community/components/pages/BlogPost.vue +1 -1
  65. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -151
  66. package/src/modules/community/middlewares/server/verifyBlogpost.js +24 -11
  67. package/src/modules/{community → constructor}/components/elements/Textarea.vue +3 -11
  68. package/src/modules/constructor/components/sections/Constructor.vue +167 -0
  69. package/src/modules/events/components/blocks/CardEvent.vue +14 -6
  70. package/src/modules/events/components/pages/EditEvent.vue +228 -133
  71. package/src/modules/events/components/sections/Feed.vue +7 -1
  72. package/src/modules/events/controllers/events.controller.js +9 -0
  73. package/src/modules/events/controllers/tickets.controller.js +2 -1
  74. package/src/modules/events/models/event.model.js +10 -0
  75. package/src/modules/events/store/events.js +15 -19
  76. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -3
  77. package/src/modules/organizations/components/sections/Publics.vue +2 -3
  78. package/src/modules/organizations/organizations.client.js +0 -2
  79. package/src/modules/users/components/pages/ProfileEvents.vue +3 -3
  80. package/src/modules/organizations/components/blocks/CardOrganizationSocial.vue +0 -46
  81. /package/src/modules/{community → constructor}/components/elements/Bullets.vue +0 -0
  82. /package/src/modules/{community → constructor}/components/elements/Caption.vue +0 -0
  83. /package/src/modules/{community → constructor}/components/elements/H2.vue +0 -0
  84. /package/src/modules/{community → constructor}/components/elements/Image.vue +0 -0
  85. /package/src/modules/{community → constructor}/components/elements/ImageUpload.vue +0 -0
@@ -1,15 +1,14 @@
1
1
  import { ref as _, onMounted as Et, openBlock as v, createBlock as ce, unref as c, withCtx as C, createElementBlock as b, Fragment as fe, renderList as $t, createElementVNode as u, normalizeStyle as H, toDisplayString as y, resolveComponent as be, createVNode as g, Transition as F, resolveDynamicComponent as Tt, reactive as ut, withDirectives as S, vModelText as Z, watch as At, withAsyncContext as Ft, defineComponent as Dt, resolveDirective as Rt, normalizeClass as G, withKeys as ie, createCommentVNode as M, vShow as K, vModelDynamic as Mt, renderSlot as xt, createTextVNode as x } from "vue";
2
- import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
3
- import { d as ct, s as p, e as oe, a as zt, F as D, b as Y, c as W, _ as kt } from "./auth-35ef1791.mjs";
4
- import { f as R1, t as M1 } from "./auth-35ef1791.mjs";
2
+ import { v as D, a as ct, b as _e, c as Ce } from "./inputs.validation-6960f71b.mjs";
3
+ import { d as ft, s as p, e as oe, a as zt, F as R, b as Y, c as W, _ as kt } from "./auth-35ef1791.mjs";
4
+ import { f as D1, t as R1 } from "./auth-35ef1791.mjs";
5
5
  import { C as Lt, S as jt } from "./carousel.es-44c501bc.mjs";
6
6
  import { useI18n as B } from "vue-i18n";
7
7
  import { useRoute as z, useRouter as k } from "vue-router";
8
- import { v as R, a as ft, b as _e, c as Ce } from "./inputs.validation-6960f71b.mjs";
9
8
  import { s as A } from "./globals-96ba60e4.mjs";
10
- import { _ as we } from "./Tab-054b61f7.mjs";
9
+ import { _ as we } from "./Tab-58cd105f.mjs";
11
10
  import { r as V, a as ae, c as Te } from "./auth.validation-29113f37.mjs";
12
- const Bt = { class: "parent-div" }, Ut = { class: "mn-small" }, Gt = { class: "mn-big mn-r-small mn-l-small" }, E1 = {
11
+ const Bt = { class: "parent-div" }, Ut = { class: "mn-small" }, Gt = { class: "mn-big mn-r-small mn-l-small" }, N1 = {
13
12
  __name: "SliderFeatures",
14
13
  setup(e) {
15
14
  const n = _(null), t = {
@@ -1877,7 +1876,7 @@ const Qd = { class: "t-center pd-medium" }, er = { class: "mn-medium" }, tr = {
1877
1876
  }), i = _(null), o = _(0);
1878
1877
  async function a() {
1879
1878
  try {
1880
- await ct(p.user, n.query.type, p.user.phone ? "phone" : "email"), o.value = 30;
1879
+ await ft(p.user, n.query.type, p.user.phone ? "phone" : "email"), o.value = 30;
1881
1880
  const h = setInterval(() => {
1882
1881
  o.value > 0 ? o.value -= 1 : clearInterval(h);
1883
1882
  }, 1e3);
@@ -2018,7 +2017,7 @@ const E = ut({
2018
2017
  };
2019
2018
  At(E, (e, n) => {
2020
2019
  });
2021
- const T1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2020
+ const E1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2022
2021
  __proto__: null,
2023
2022
  actions: Ct,
2024
2023
  state: E
@@ -2031,9 +2030,9 @@ const ir = { class: "t-left pd-medium" }, or = /* @__PURE__ */ u("h3", { class:
2031
2030
  [n, t] = Ft(() => Ct.readOne(r.query.inviteCode)), await n, t();
2032
2031
  async function o() {
2033
2032
  try {
2034
- await R(
2033
+ await D(
2035
2034
  d,
2036
- ft,
2035
+ ct,
2037
2036
  p.user.password,
2038
2037
  "Некорректный пароль"
2039
2038
  );
@@ -2049,7 +2048,7 @@ const ir = { class: "t-left pd-medium" }, or = /* @__PURE__ */ u("h3", { class:
2049
2048
  or,
2050
2049
  ar,
2051
2050
  u("div", sr, [
2052
- g(D, {
2051
+ g(R, {
2053
2052
  field: p.user.password,
2054
2053
  "onUpdate:field": s[0] || (s[0] = (m) => p.user.password = m),
2055
2054
  type: "password",
@@ -2058,7 +2057,7 @@ const ir = { class: "t-left pd-medium" }, or = /* @__PURE__ */ u("h3", { class:
2058
2057
  placeholder: "******",
2059
2058
  class: "bg-white radius-small mn-small"
2060
2059
  }, null, 8, ["field", "validation"]),
2061
- g(D, {
2060
+ g(R, {
2062
2061
  field: p.user.passwordRepeat,
2063
2062
  "onUpdate:field": s[1] || (s[1] = (m) => p.user.passwordRepeat = m),
2064
2063
  type: "password",
@@ -2168,9 +2167,9 @@ const fr = { class: "t-left pd-medium" }, pr = { class: "mn-small" }, mr = {
2168
2167
  _("phone");
2169
2168
  async function i() {
2170
2169
  try {
2171
- await R(
2170
+ await D(
2172
2171
  n,
2173
- ft,
2172
+ ct,
2174
2173
  p.user.password,
2175
2174
  "Некорректный пароль"
2176
2175
  );
@@ -2186,7 +2185,7 @@ const fr = { class: "t-left pd-medium" }, pr = { class: "mn-small" }, mr = {
2186
2185
  u("h3", pr, y(c(t)("almostDone")), 1),
2187
2186
  c(d).query.method === "reset-password" ? (v(), b("p", mr, y(c(t)("newPasswordPrompt")), 1)) : (v(), b("p", hr, y(c(t)("registrationPasswordPrompt")), 1)),
2188
2187
  u("div", yr, [
2189
- g(D, {
2188
+ g(R, {
2190
2189
  field: p.user.password,
2191
2190
  "onUpdate:field": l[0] || (l[0] = (s) => p.user.password = s),
2192
2191
  type: "password",
@@ -2194,7 +2193,7 @@ const fr = { class: "t-left pd-medium" }, pr = { class: "mn-small" }, mr = {
2194
2193
  placeholder: c(t)("passwordPlaceholder"),
2195
2194
  class: "bg-grey pd-small radius-small mn-thin"
2196
2195
  }, null, 8, ["field", "validation", "placeholder"]),
2197
- g(D, {
2196
+ g(R, {
2198
2197
  field: p.user.passwordRepeat,
2199
2198
  "onUpdate:field": l[1] || (l[1] = (s) => p.user.passwordRepeat = s),
2200
2199
  type: "password",
@@ -3177,12 +3176,12 @@ const Lr = { class: "t-left pd-medium" }, jr = { class: "mn-small" }, Br = { cla
3177
3176
  const r = k(), i = _("phone");
3178
3177
  async function o() {
3179
3178
  try {
3180
- i.value === "phone" && await R(
3179
+ i.value === "phone" && await D(
3181
3180
  t,
3182
3181
  _e,
3183
3182
  p.user.phone,
3184
3183
  "Некорректный телефон"
3185
- ), i.value === "email" && await R(
3184
+ ), i.value === "email" && await D(
3186
3185
  d,
3187
3186
  Ce,
3188
3187
  p.user.email,
@@ -3239,7 +3238,7 @@ const Lr = { class: "t-left pd-medium" }, jr = { class: "mn-small" }, Br = { cla
3239
3238
  default: C(() => [
3240
3239
  i.value === "email" ? (v(), b("div", Hr, [
3241
3240
  u("p", Kr, y(c(n)("emailInfo")), 1),
3242
- g(D, {
3241
+ g(R, {
3243
3242
  field: p.user.email,
3244
3243
  "onUpdate:field": s[2] || (s[2] = (m) => p.user.email = m),
3245
3244
  placeholder: c(n)("emailPlaceholder"),
@@ -3372,12 +3371,12 @@ const qr = { class: "t-left pd-medium" }, Xr = { class: "mn-small" }, Yr = { cla
3372
3371
  const r = k(), i = _("phone");
3373
3372
  async function o() {
3374
3373
  try {
3375
- i.value === "phone" && await R(
3374
+ i.value === "phone" && await D(
3376
3375
  t,
3377
3376
  _e,
3378
3377
  p.user.phone,
3379
3378
  "Некорректный телефон"
3380
- ), i.value === "email" && await R(
3379
+ ), i.value === "email" && await D(
3381
3380
  d,
3382
3381
  Ce,
3383
3382
  p.user.email,
@@ -3387,7 +3386,7 @@ const qr = { class: "t-left pd-medium" }, Xr = { class: "mn-small" }, Yr = { cla
3387
3386
  throw new Error();
3388
3387
  }
3389
3388
  try {
3390
- await ct(p.user, "signup", i.value);
3389
+ await ft(p.user, "signup", i.value);
3391
3390
  } catch {
3392
3391
  throw new Error();
3393
3392
  }
@@ -3438,7 +3437,7 @@ const qr = { class: "t-left pd-medium" }, Xr = { class: "mn-small" }, Yr = { cla
3438
3437
  default: C(() => [
3439
3438
  S(u("div", t1, [
3440
3439
  u("p", n1, y(c(n)("emailNotice")), 1),
3441
- g(D, {
3440
+ g(R, {
3442
3441
  field: p.user.email,
3443
3442
  "onUpdate:field": s[2] || (s[2] = (h) => p.user.email = h),
3444
3443
  placeholder: c(n)("emailPlaceholder"),
@@ -3609,12 +3608,12 @@ const i1 = { class: "" }, o1 = { class: "mn-medium" }, a1 = /* @__PURE__ */ u("b
3609
3608
  const i = k(), o = _("phone");
3610
3609
  async function a() {
3611
3610
  try {
3612
- o.value === "phone" && await R(
3611
+ o.value === "phone" && await D(
3613
3612
  t,
3614
3613
  _e,
3615
3614
  p.user.phone,
3616
3615
  "Некорректный телефон"
3617
- ), o.value === "email" && await R(
3616
+ ), o.value === "email" && await D(
3618
3617
  r,
3619
3618
  Ce,
3620
3619
  p.user.email,
@@ -3683,7 +3682,7 @@ const i1 = { class: "" }, o1 = { class: "mn-medium" }, a1 = /* @__PURE__ */ u("b
3683
3682
  g(F, { name: "slide-fade" }, {
3684
3683
  default: C(() => [
3685
3684
  S(u("div", f1, [
3686
- g(D, {
3685
+ g(R, {
3687
3686
  field: p.user.email,
3688
3687
  "onUpdate:field": m[2] || (m[2] = ($) => p.user.email = $),
3689
3688
  placeholder: c(n)("emailPlaceholder"),
@@ -3697,7 +3696,7 @@ const i1 = { class: "" }, o1 = { class: "mn-medium" }, a1 = /* @__PURE__ */ u("b
3697
3696
  _: 1
3698
3697
  })
3699
3698
  ]),
3700
- g(D, {
3699
+ g(R, {
3701
3700
  field: p.user.password,
3702
3701
  "onUpdate:field": m[3] || (m[3] = ($) => p.user.password = $),
3703
3702
  type: "password",
@@ -3739,12 +3738,15 @@ typeof lt == "function" && lt(St);
3739
3738
  const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3740
3739
  __proto__: null,
3741
3740
  default: St
3742
- }, Symbol.toStringTag, { value: "Module" })), A1 = [
3741
+ }, Symbol.toStringTag, { value: "Module" })), T1 = [
3743
3742
  {
3744
3743
  path: "auth",
3745
3744
  name: "Authentication",
3746
3745
  meta: {
3747
- title: "Вход"
3746
+ title: {
3747
+ en: "Sign In",
3748
+ ru: "Вход"
3749
+ }
3748
3750
  },
3749
3751
  component: Jd,
3750
3752
  children: [{
@@ -3755,7 +3757,10 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3755
3757
  ae
3756
3758
  ],
3757
3759
  meta: {
3758
- title: "Вход"
3760
+ title: {
3761
+ en: "Sign In",
3762
+ ru: "Вход"
3763
+ }
3759
3764
  },
3760
3765
  component: () => Promise.resolve().then(() => g1)
3761
3766
  }, {
@@ -3766,7 +3771,10 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3766
3771
  ae
3767
3772
  ],
3768
3773
  meta: {
3769
- title: "Сбросить пароль"
3774
+ title: {
3775
+ en: "Reset Password",
3776
+ ru: "Сбросить Пароль"
3777
+ }
3770
3778
  },
3771
3779
  component: () => Promise.resolve().then(() => Wr)
3772
3780
  }, {
@@ -3777,7 +3785,10 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3777
3785
  ae
3778
3786
  ],
3779
3787
  meta: {
3780
- title: "Регистрация"
3788
+ title: {
3789
+ en: "Sign Up",
3790
+ ru: "Регистрация"
3791
+ }
3781
3792
  },
3782
3793
  component: () => Promise.resolve().then(() => r1)
3783
3794
  }, {
@@ -3788,7 +3799,10 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3788
3799
  Te
3789
3800
  ],
3790
3801
  meta: {
3791
- title: "Введите код"
3802
+ title: {
3803
+ en: "Enter Code",
3804
+ ru: "Введите Код"
3805
+ }
3792
3806
  },
3793
3807
  component: () => Promise.resolve().then(() => rr)
3794
3808
  }, {
@@ -3799,14 +3813,20 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3799
3813
  Te
3800
3814
  ],
3801
3815
  meta: {
3802
- title: "Введите пароль"
3816
+ title: {
3817
+ en: "Enter Password",
3818
+ ru: "Введите Пароль"
3819
+ }
3803
3820
  },
3804
3821
  component: () => Promise.resolve().then(() => br)
3805
3822
  }, {
3806
3823
  path: "invite",
3807
3824
  name: "Invite",
3808
3825
  meta: {
3809
- title: "Приглашение"
3826
+ title: {
3827
+ en: "Invite",
3828
+ ru: "Приглашение"
3829
+ }
3810
3830
  },
3811
3831
  component: () => Promise.resolve().then(() => cr)
3812
3832
  }]
@@ -3820,9 +3840,9 @@ export {
3820
3840
  Pt as ResetPassword,
3821
3841
  St as SignIn,
3822
3842
  Ot as SignUp,
3823
- E1 as SliderFeatures,
3824
- A1 as authRoutes,
3825
- R1 as authStore,
3826
- T1 as invitesStore,
3827
- M1 as twofaStore
3843
+ N1 as SliderFeatures,
3844
+ T1 as authRoutes,
3845
+ D1 as authStore,
3846
+ E1 as invitesStore,
3847
+ R1 as twofaStore
3828
3848
  };
@@ -1,9 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("vue-router"),D=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-c6f3a0f0.js"),g=require("./Feed-55c5907a.js"),_=require("./auth-5aa8e90c.js"),X=require("./Popup-9479e39a.js"),S=require("./Publics-49dbeafc.js"),Y=require("./vue-draggable-next.esm-bundler-80731ae0.js"),Z=require("./CardOrganization-58b54995.js"),ee=require("./EmptyState-7658d7d6.js"),F=require("./Comments-1aec0e5e.js"),te=require("vue-i18n");require("./globals-928eb13c.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");require("./ButtonFollow-2ce169ca.js");const oe={class:"min-h-100vh pd-thin"},ne={class:"mn-thin flex-v-center t-left flex-nowrap flex"},le={class:"flex-v-center flex-nowrap flex t-left"},ae=e.createElementVNode("span",{class:""},"Topics for ",-1),re={class:"bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},se={class:""},U={__name:"Community",setup(a){const r=B.useRoute(),o=B.useRouter();return(t,s)=>{const u=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("header",ne,[e.createElementVNode("h2",le,[ae,e.createVNode(D.Select,{options:["today","week","month","year"],select:g.state.filter.period,"onUpdate:select":s[0]||(s[0]=n=>g.state.filter.period=n),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",re,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"mn-r-small t-medium pd-small radius-small"]),onClick:s[1]||(s[1]=n=>e.unref(o).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="popular"},"mn-r-small t-medium pd-small radius-small"]),onClick:s[2]||(s[2]=n=>e.unref(o).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="new"},"mn-r-small t-medium pd-small radius-small"]),onClick:s[3]||(s[3]=n=>e.unref(o).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),_.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="following"},"t-medium pd-small radius-small"]),onClick:s[4]||(s[4]=n=>e.unref(o).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",se,[e.createVNode(u,null,{default:e.withCtx(({Component:n,route:c})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:c.query}))]),_:2},1024)]),_:1})])])}}};const ce=["placeholder"],I={__name:"Textarea",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:r}){const o=a;e.ref(o);const t=e.ref(null);e.ref(0);function s(l){let i=l.target.value.split(/\n+/);if(i.length>1){o.prop[o.content]=i[0],e.nextTick(()=>{c()});let m=i.slice(1).map(h=>({__name:"Textarea",content:h}));r("addBlock","Textarea","",o.index,{blocks:m,ref:t})}else l.target.value.trim()===""&&l.target.value.includes(`
2
-
3
- `)&&(console.log("We are adding new block:"+o.index+newBlocks+t),r("addBlock","Textarea","",o.index,{blocks:newBlocks,ref:t})),c()}function u(l){(l.keyCode===8||l.keyCode===46)&&o.prop[o.content].trim()===""&&r("deleteBlock",o.prop)}function n(){e.nextTick(()=>{t.value.focus(),r("updateBlock",o.prop,{setFocus:!1})})}function c(){t.value.style.height="1rem",t.value.style.height=t.value.scrollHeight+"px"}return e.onUpdated(()=>{o.setFocus&&e.nextTick(()=>{n()}),c()}),e.onMounted(()=>{o.setFocus&&e.nextTick(()=>{n()}),c()}),e.watch(()=>o.prop[o.content],l=>{}),(l,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":i[0]||(i[0]=m=>a.prop[a.content]=m),placeholder:a.placeholder?a.placeholder:"Enter text",onInput:s,onFocus:i[1]||(i[1]=m=>r("focus",t.value)),onKeyup:u,ref_key:"textarea",ref:t,class:"text-area mn-thin"},`
4
- `,40,ce),[[e.vModelText,a.prop[a.content]]])]))}};const ie=["placeholder"],z={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:r}){const o=a;e.ref(o);const t=e.ref(null);e.ref(0);function s(l){let i=l.target.value.split(/\n+/);if(i.length>1){o.prop[o.content]=i[0],e.nextTick(()=>{c()});let m=i.slice(1).map(h=>({type:"Textarea",content:h}));r("addBlock","Textarea","",o.index,{blocks:m,ref:t})}else l.target.value.trim()===""&&l.target.value.includes(`
5
-
6
- `)&&(console.log("We are adding new block:"+o.index+newBlocks+t),r("addBlock","Textarea","",o.index,{blocks:newBlocks,ref:t})),c()}function u(l){(l.keyCode===8||l.keyCode===46)&&o.prop[o.content].trim()===""&&r("deleteBlock",o.prop)}function n(){e.nextTick(()=>{t.value.focus(),r("updateBlock",o.prop,{setFocus:!1})})}function c(){t.value.style.height="1rem",t.value.style.height=t.value.scrollHeight+"px"}return e.onUpdated(()=>{o.setFocus&&e.nextTick(()=>{n()}),c()}),e.onMounted(()=>{o.setFocus&&e.nextTick(()=>{n()}),c()}),e.watch(()=>o.prop[o.content],l=>{}),(l,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":i[0]||(i[0]=m=>a.prop[a.content]=m),placeholder:a.placeholder?a.placeholder:"Enter text",onInput:s,onFocus:i[1]||(i[1]=m=>r("focus",t.value)),onKeyup:u,ref_key:"textarea",ref:t,class:"h3 text-area mn-thin"},`
7
- `,40,ie),[[e.vModelText,a.prop[a.content]]])]))}},ue=["placeholder"],q={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(a,{emit:r}){const o=a;e.ref(o);const t=e.ref(null);function s(n){const c=/^\s*[-*]\s+(.*)/;let i=n.target.value.split(/\n+/).map(m=>{const h=c.exec(m);return h?h[1]:null}).filter(m=>m!==null);i.length>0?(o.prop[o.content]=i,u()):n.target.value.trim()===""&&(o.prop[o.content]=[],u())}function u(){t.value.style.height="1rem",t.value.style.height=t.value.scrollHeight+"px"}return e.onUpdated(()=>{u()}),e.onMounted(()=>{u()}),e.watch(()=>o.prop[o.content],n=>{(!n||n.length===0)&&r("deleteBlock",o.prop)}),(n,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=l=>a.prop[a.content]=l),placeholder:a.placeholder?a.placeholder:"Enter text",onInput:s,onFocus:c[1]||(c[1]=l=>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,ue),[[e.vModelText,a.prop[a.content]]])]))}},de=["placeholder"],H={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(a,{emit:r}){const o=a;e.ref(o);const t=e.ref(null);function s(n){const c=/^\s*[-*]\s+(.*)/;let i=n.target.value.split(/\n+/).map(m=>{const h=c.exec(m);return h?h[1]:null}).filter(m=>m!==null);i.length>0?(o.prop[o.content]=i,u()):n.target.value.trim()===""&&(o.prop[o.content]=[],u())}function u(){t.value.style.height="1rem",t.value.style.height=t.value.scrollHeight+"px"}return e.onUpdated(()=>{u()}),e.onMounted(()=>{u()}),e.watch(()=>o.prop[o.content],n=>{(!n||n.length===0)&&r("deleteBlock",o.prop)}),(n,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createTextVNode(e.toDisplayString(a.prop[a.content])+" ",1),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=l=>a.prop[a.content]=l),placeholder:a.placeholder?a.placeholder:"Enter text",onInput:s,onFocus:c[1]||(c[1]=l=>r("focus",t.value)),ref_key:"textarea",ref:t,class:"text-area mn-small"},`
9
- `,40,de),[[e.vModelText,a.prop[a.content]]])]))}},pe=["src"],me={key:1,class:"t-transp pd-extra"},L={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(a,{emit:r}){const o=a,t=e.ref(null),s=e.ref(null);function u(){s.value.click()}async function n(l){let i=l.target.files[0];console.log(i);let m=new FormData,h="unsorted";m.append("file",i),console.log(m.has("file"));try{let V=await _.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(h)}`,m,{headers:{"Content-Type":"multipart/form-data"}});t.value=V.data.filepath,console.log(t.value),r("input",t.value),r("updateBlock",o.prop,{content:t.value})}catch(w){console.error(w)}}function c(l){l.preventDefault(),n({target:{files:l.dataTransfer.files}})}return(l,i)=>(e.openBlock(),e.createElementBlock("div",{onClick:u,onDrop:c,onDragover:i[0]||(i[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"},[a.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,pe)):(e.openBlock(),e.createElementBlock("span",me,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:s,onChange:n,style:{display:"none"}},null,544)],32))}},fe={class:"pd-thin"},ge={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},he={class:"w-full h-full"},ve=["onMouseover"],_e={key:0,class:"z-index-5 radius-thin mn-small relative left-0 mt-2 w-max bg-white shadow-lg rounded"},ke=["onClick"],be=["onClick"],ye=["onClick"],xe={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},we={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},Be={class:"w-m-66r t-left pd-big bg-white radius-big"},Ne=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),Ve=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),Ce={key:0,class:"mn-thin"},Ee={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},j={__name:"CreateBlogPost",setup(a){const r=B.useRoute(),o=B.useRouter();let t=e.ref(null),s=e.ref(null);const u=e.ref([]),n=e.ref(null);e.onMounted(async()=>{if(r.params.url){const p=await g.read({user:_.state.user._id,url:r.params.url});t.value=p.pop()}else g.clean(),t.value=g.state.current;t.value.owner||(t.value.owner={target:_.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:_.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(n.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const d=await Z.actions.read({user:_.state.user._id,postable:_.state.user._id});console.log(d),s.value=d.map(p=>({name:p.profile.name,_id:p._id,photo:p.profile.photo}))});const c=e.ref(""),l=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>l.value.filter(d=>d.text.toLowerCase().includes(c.value.toLowerCase()))),e.computed(()=>l.value.filter(d=>!u.value.some(p=>p.text===d.text)));const i=e.ref(!1);function m(){i.value=!0}function h(){i.value=!1}function w(){u.value.length>0&&u.value.map(d=>d.text),t.value.status="draft",r.params.url?g.update(t.value).then(d=>{o.push({name:"BlogPost",params:{url:d.url}})}).catch(d=>{console.log(d)}):g.create(t.value).then(d=>{o.push({name:"BlogPost",params:{url:d.url}})}).catch(d=>{console.log(d)})}function V(){n.value&&(t.value.owner={target:n.value._id,type:"organization"}),n.value||(t.value.creator.hidden=!1),n.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?g.update(t.value).then(d=>{o.push({name:"BlogPost",params:{url:d.url}})}).catch(d=>{console.log(d)}):g.create(t.value).then(d=>{o.push({name:"BlogPost",params:{url:d.url}})}).catch(d=>{console.log(d)})}function $(){confirm("Are you sure you want to delete this post?")&&g.remove(t.value._id).then(d=>{o.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(d=>{console.log(d)})}const E={Textarea:I,H2:z,Bullets:H,Caption:q,ImageUpload:L};function N(d="Textarea",p="",f,k){console.log("We are adding new block (functuin HandleAddBlock):"+d+p+f+k);let x={order:t.value.content.length+1,type:d,style:"",class:"",content:p,blocks:[],setFocus:!0};if(k&&k.blocks&&Array.isArray(k.blocks)){let P=k.blocks.map(Q=>({...x,content:Q.content})),W=[(k.index||f)+1,0].concat(P);t.value.content.splice.apply(t.value.content,W);const G=P[P.length-1];console.log("New block is"+G)}else f!==void 0?(t.value.content.splice(f+1,0,x),console.log("Latest block is"+x)):(console.log("Another block is"+x),t.value.content.push(x));b.value=null}function T(d,p){const f=t.value.content.findIndex(k=>k===d);f!==-1&&(t.value.content[f]={...t.value.content[f],...p})}function C(d){let p=t.value.content.findIndex(f=>f===d);p!==-1&&t.value.content.splice(p,1),t.value.content[p-1].setFocus=!0}const b=e.ref(null),v=e.ref(!1),y=e.ref(!1);function J(){v.value=!0}function K(){v.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&N("Textarea","")}),(d,p)=>(e.openBlock(),e.createElementBlock("article",fe,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",ge,[e.createElementVNode("div",he,[e.createVNode(I,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(Y.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:J,onEnd:K},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(f,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"relative"},[e.createElementVNode("div",{onMouseover:x=>(b.value=k,y.value=!1),class:"w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E[f.type]),{index:k,component:f,prop:f,class:e.normalizeClass(f.class),setFocus:f.setFocus,content:"content",onDeleteBlock:C,onAddBlock:N,onUpdateBlock:T},null,40,["index","component","prop","class","setFocus"]))],40,ve),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[b.value===k?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute pos-r-100 pos-t-0 z-index-4 i-semi",onMousedown:p[1]||(p[1]=e.withModifiers(x=>v.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:p[0]||(p[0]=x=>y.value=!y.value),class:"mn-small w-100 i-semi bg-white radius-thin"},e.toDisplayString(f.content?"...":"+"),1),y.value?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("button",{onClick:x=>C(f),class:"block w-max text-left px-4 py-2 hover:bg-gray-200"},"Удалить",8,ke),e.createElementVNode("button",{onClick:x=>N("ImageUpload","",k),class:"block w-max text-left px-4 py-2 hover:bg-gray-200"},"Добавить изображение",8,be),e.createElementVNode("button",{onClick:x=>N("H2","",k),class:"block w-max text-left px-4 py-2 hover:bg-gray-200"},"Добавить заголовок",8,ye)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",xe,[e.createElementVNode("div",we,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:p[2]||(p[2]=f=>$()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:p[3]||(p[3]=f=>w()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:p[4]||(p[4]=f=>m()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(X._sfc_main,{title:"Добавить участника",onClosePopup:h,isPopupOpen:i.value},{default:e.withCtx(()=>[e.createElementVNode("div",Be,[Ne,e.createVNode(S._sfc_main,{onTagsChanged:p[5]||(p[5]=f=>e.unref(t).tags=f),tags:e.unref(t).tags},null,8,["tags"]),Ve,e.createVNode(S.SelectMulti,{modelValue:n.value,"onUpdate:modelValue":p[6]||(p[6]=f=>n.value=f),options:e.unref(s),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),n.value?(e.openBlock(),e.createElementBlock("h5",Ce,"Options:")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(D.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":p[7]||(p[7]=f=>e.unref(t).creator.hidden=f),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(_._sfc_main,{submit:V,callback:d.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])])]),_:1},8,["isPopupOpen"])]))}},M=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"})),$e={},Te={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},Pe=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),Se=[Pe];function Ie(a,r){return e.openBlock(),e.createElementBlock("svg",Te,Se)}const Me=_._export_sfc($e,[["render",Ie]]),De={class:"w-100 bg-white radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small"},Fe=["src"],A={__name:"Image",props:["label","value","prop"],setup(a){return e.ref(null),(r,o)=>(e.openBlock(),e.createElementBlock("div",De,[a.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,Fe)):e.createCommentVNode("",!0)]))}},Ue={class:"pd-thin"},O={__name:"BlogPost",setup(a){const r=B.useRoute(),o=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const n=await g.read({user:_.state.user._id,url:r.params.url});o.value=n[0],t.value=!1});const s={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:A};function u(n){return n.type==="Textarea"?{innerHTML:n.content,class:"p-medium"}:n.type==="H2"?{innerHTML:n.content,class:"h3"}:n.type==="Caption"?{innerHTML:n.content}:n.type==="ImageUpload"?{src:n.content}:{}}return(n,c)=>(e.openBlock(),e.createElementBlock("section",Ue,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,l=>e.createVNode(Me,{key:l})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!o.value?(e.openBlock(),e.createBlock(ee._sfc_main,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!t.value&&o.value?(e.openBlock(),e.createBlock(g._sfc_main$1,{key:0,onClick:c[0]||(c[0]=l=>n.$router.push({name:"Blogpost",params:{url:o.value.url}})),blogpost:o.value,user:_.state.user._id,type:"blogpostPage",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":n.index!==o.value.length-1}])},{default:e.withCtx(()=>[e.createElementVNode("section",null,[o.value&&o.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.value.content,(l,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s[l.type]),e.mergeProps({key:i,index:i,component:l,prop:l,class:l.class,content:"content"},u(l),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode(S._sfc_main$1,{class:"mn-small"}),!t.value&&o.value?(e.openBlock(),e.createBlock(F._sfc_main,{key:1,type:"blogpost",target:o.value._id,owner:_.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ze=Object.freeze(Object.defineProperty({__proto__:null,default:O},Symbol.toStringTag,{value:"Module"})),R={__name:"Blog",setup(a){const r=B.useRoute(),o=B.useRouter();return r.params.category||(r.params.category="featured"),e.onMounted(()=>{if(r.query){const t=r.query,s={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"year"};g.state.filter=s}}),e.watch(()=>g.state.filter,(t,s)=>{const u={...r.query};Object.keys(s).forEach(c=>{u[c]&&delete u[c]});const n=Object.fromEntries(Object.entries(t).filter(([c,l])=>Array.isArray(l)&&l.length>0||typeof l=="string"&&l).map(([c,l])=>[c,Array.isArray(l)?l.join(","):l]));Object.assign(u,n),o.push({query:u})},{deep:!0}),(t,s)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(g._sfc_main,{category:e.unref(r).params.category,user:_.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},qe=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"})),He={class:"w-100 cols-4 t-left flex-nowrap flex"},Le={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},je=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),Ae={class:"t-semi uppercase"},Oe=e.createElementVNode("br",null,null,-1),Re={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},Je=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),Ke={class:"t-semi uppercase"},We=e.createElementVNode("br",null,null,-1),Ge={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},Qe=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),Xe={class:"t-semi uppercase"},Ye=e.createElementVNode("br",null,null,-1),Ze={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(a){return(r,o)=>(e.openBlock(),e.createElementBlock("section",He,[a.likes?(e.openBlock(),e.createElementBlock("div",Le,[je,e.createElementVNode("span",Ae,[e.createTextVNode(e.toDisplayString(a.likes),1),Oe,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),a.comments?(e.openBlock(),e.createElementBlock("div",Re,[Je,e.createElementVNode("span",Ke,[e.createTextVNode(e.toDisplayString(a.comments),1),We,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),a.subscriptions?(e.openBlock(),e.createElementBlock("div",Ge,[Qe,e.createElementVNode("span",Xe,[e.createTextVNode(e.toDisplayString(a.subscriptions),1),Ye,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},et={class:"pd-thin radius-extra flex-nowrap flex"},tt=["innerHTML"],ot={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["First placeholder","Second placeholder","Third placeholder"],ru:["Первый плейсхолдер","Второй плейсхолдер","Третий плейсхолдер"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(a,{emit:r}){const o=a,{t,locale:s}=te.useI18n();let u=e.ref(0),n=e.ref(o.input),c=e.ref(o.placeholder),l=e.ref(o.enableTyping),i=e.ref(null),m=e.ref(""),h=e.ref(!0),w=null;function V(){r("action")}function $(b){r("update:input",b),m.value=b}function E(){u.value=(u.value+1)%o.placeholderTexts[s.value].length}function N(){l.value=!1,clearInterval(i.value),c.value=o.placeholder,m.value||(n.value="")}function T(){!m.value&&o.enableTyping&&(l.value=!0,c.value="",C())}function C(){let b=o.placeholderTexts[s.value][u.value],v=0,y=!1;w=setInterval(()=>{h.value=!h.value},200),i.value=setInterval(()=>{l.value&&(y?(n.value=n.value.slice(0,-1),n.value=b.substring(0,v)+(h.value&&v%2?"|":""),v--):(n.value=b.substring(0,v)+(h.value&&v%2?"|":""),v++),v>b.length&&o.loopTyping&&setTimeout(()=>{y=!0,n.value=b.substring(0,v)},333),v===0&&y&&(y=!1,E(),b=o.placeholderTexts[s.value][u.value]))},o.typingSpeed)}return e.onMounted(()=>{o.enableTyping&&C()}),e.watchEffect(()=>{l.value||(clearInterval(i.value),clearInterval(w))}),(b,v)=>(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(_.Field,{field:e.unref(n),"onUpdate:field":[v[0]||(v[0]=y=>e.isRef(n)?n.value=y:n=y),$],placeholder:e.unref(c),onInput:E,onFocus:N,onBlur:T,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),a.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:V,class:"w-min hover_bg-white hover-t-black t-black bg-main button",innerHTML:a.action},null,8,tt)):e.createCommentVNode("",!0)]))}};const nt={class:"pd-thin"},lt={class:"o-hidden t-black bg-main pd-big radius-big"},at=e.createElementVNode("header",{class:"t-center z-index-1 mn-big"},[e.createElementVNode("h2",{class:"mn-l-auto mn-r-auto w-m-40r mn-medium"},"Stay Updated with The Latest in Cannabis."),e.createElementVNode("p",{class:"t-transp p-big"},"Subscribe to our newsletter for news, insights, and more from the Weeder universe.")],-1),rt={class:"z-index-1 mn-big w-100 flex-nowrap flex"},st=e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1),ct={__name:"SubscribeNewsletter",setup(a){let r=e.ref("");return(o,t)=>(e.openBlock(),e.createElementBlock("section",nt,[e.createElementVNode("div",lt,[at,e.createElementVNode("div",rt,[e.createVNode(ot,{input:e.unref(r),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=s=>e.isRef(r)?r.value=s:r=s),onAction:t[1]||(t[1]=s=>o.router.push({name:"Product Recommmendation",query:{mood:o.mood}})),class:"mn-l-auto mn-r-auto bg-white t-black w-50"},null,8,["input"])]),st])]))}};const it={class:"container container-joinus"},ut={class:"content"},dt={class:"h0 mn-big"},pt=e.createElementVNode("p",{class:"w-m-33r t-center mn-small p-big"},"Together, we're shaping the future of the globals cannabis community.",-1),mt=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),ft={__name:"JoinUs",setup(a){const r=e.ref(120950),o=e.ref(["/assets/images/reviews/01.png","/assets/images/reviews/02.png","/assets/images/reviews/03.png","/assets/images/reviews/04.png","/assets/images/reviews/05.png","/assets/images/reviews/06.png"]),t=()=>{setInterval(()=>{r.value+=Math.floor(Math.random()*5)+1},330)},s={minSize:"6rem",maxSize:"10rem",minDuration:5,maxDuration:15,spawnPoints:[10,90]};e.onMounted(()=>{u(),t()});const u=()=>{o.value.forEach((n,c)=>{let l=document.createElement("img");l.src=n,l.classList.add("floating-image");let i=s.spawnPoints[Math.floor(Math.random()*s.spawnPoints.length)],m=(Math.random()-.5)*2*10;l.style.left=`${i+m}%`,l.style.animationDuration=`${Math.random()*(s.maxDuration-s.minDuration)+s.minDuration}s`,document.querySelector(".container").appendChild(l),l.addEventListener("animationiteration",()=>{const h=s.spawnPoints[Math.floor(Math.random()*s.spawnPoints.length)],w=(Math.random()-.5)*2*10;l.style.left=`${h+w}%`})})};return(n,c)=>(e.openBlock(),e.createElementBlock("div",it,[e.createElementVNode("div",ut,[e.createElementVNode("span",dt,e.toDisplayString(r.value.toLocaleString()),1),pt,mt])]))}};const gt=a=>(e.pushScopeId("data-v-18db0d1b"),a=a(),e.popScopeId(),a),ht={class:"community-feed"},vt=gt(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),_t={class:"grid-container"},kt={__name:"HotPosts",async setup(a){let r,o;const t=e.ref([]),s=async()=>{const n=await g.read({skip:0,limit:7,period:"year"});console.log(n),t.value=n};[r,o]=e.withAsyncContext(()=>s()),await r,o();const u=n=>{switch(n){case 0:return"grid-item-2x2";case 1:return"grid-item-2x1";case 2:return"grid-item-1x1";case 3:case 4:return"grid-item-1x1";case 6:return"grid-item-2x1";default:return""}};return(n,c)=>(e.openBlock(),e.createElementBlock("section",ht,[vt,e.createElementVNode("div",_t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(l,i)=>(e.openBlock(),e.createBlock(g._sfc_main$1,{blogpost:l,owner:_.state.user._id,key:i,class:e.normalizeClass(u(i))},null,8,["blogpost","owner","class"]))),128))])]))}},bt=_._export_sfc(kt,[["__scopeId","data-v-18db0d1b"]]),yt=[{path:"community",component:U,meta:{title:{en:"Community",ru:"Коммьюнити"}},children:[{path:":category?",name:"Blog",component:()=>Promise.resolve().then(()=>qe)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>M)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ze)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>M)}];exports.CardBlogpost=g._sfc_main$1;exports.Feed=g._sfc_main;exports.FooterBlogpost=g._sfc_main$2;exports.blogpostsStore=g.blogposts;exports.reactionsStore=g.reactions;exports.Comments=F._sfc_main;exports.Activity=Ze;exports.Blog=R;exports.BlogPost=O;exports.Bullets=H;exports.Caption=q;exports.Community=U;exports.CreateBlogPost=j;exports.H2=z;exports.HotPosts=bt;exports.Image=A;exports.ImageUpload=L;exports.JoinUs=ft;exports.SubscribeNewsletter=ct;exports.Textarea=I;exports.blogpostsRoutes=yt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),$=require("./Publics-3f277c17.js"),u=require("./Feed-55c5907a.js"),g=require("./auth-5aa8e90c.js"),x=require("./Comments-63f154a6.js"),M=require("./Popup-105ef2c3.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js"),I=require("./organizations-af43bda4.js"),z=require("./EmptyState-7658d7d6.js"),D=require("vue-i18n");require("./globals-928eb13c.js");require("./CardOrganization-ee5c34ab.js");require("./ButtonFollow-2ce169ca.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");const F={class:"min-h-100vh pd-thin"},O={class:"mn-thin flex-v-center t-left flex-nowrap flex"},j={class:"flex-v-center flex-nowrap flex t-left"},L=e.createElementVNode("span",{class:""},"Topics for ",-1),U={class:"bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},A={class:""},P={__name:"Community",setup(i){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("header",O,[e.createElementVNode("h2",j,[L,e.createVNode($.Select,{options:["today","week","month","year"],select:u.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>u.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",U,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[1]||(a[1]=o=>e.unref(n).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="popular"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[2]||(a[2]=o=>e.unref(n).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="new"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),g.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="following"},"t-medium pd-small radius-small"]),onClick:a[4]||(a[4]=o=>e.unref(n).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",A,[e.createVNode(d,null,{default:e.withCtx(({Component:o,route:m})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:m.query}))]),_:2},1024)]),_:1})])])}}},H={class:"pd-thin"},R={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},J={class:"w-full h-full"},G={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},Q={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},W={class:"w-m-66r t-left pd-big bg-white radius-big"},K=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),X=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),Y={key:0,class:"mn-thin"},Z={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},T={__name:"CreateBlogPost",setup(i){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const d=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const c=await u.read({user:g.state.user._id,url:r.params.url});t.value=c.pop()}else u.clean(),t.value=u.state.current;t.value.owner||(t.value.owner={target:g.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:g.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const l=await I.actions.read({user:g.state.user._id,postable:g.state.user._id});console.log(l),a.value=l.map(c=>({name:c.profile.name,_id:c._id,photo:c.profile.photo}))});const m=e.ref(""),s=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>s.value.filter(l=>l.text.toLowerCase().includes(m.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!d.value.some(c=>c.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){d.value.length>0&&d.value.map(l=>l.text),t.value.status="draft",r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function B(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function N(){confirm("Are you sure you want to delete this post?")&&u.remove(t.value._id).then(l=>{n.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(l=>{console.log(l)})}return(l,c)=>(e.openBlock(),e.createElementBlock("article",H,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",R,[e.createElementVNode("div",J,[e.createVNode(x._sfc_main$2,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main,{content:e.unref(t).content,onUpdate:c[0]||(c[0]=f=>e.unref(t).content=f)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",G,[e.createElementVNode("div",Q,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:c[1]||(c[1]=f=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:c[2]||(c[2]=f=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:c[3]||(c[3]=f=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(M._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",W,[K,e.createVNode(V._sfc_main,{onTagsChanged:c[4]||(c[4]=f=>e.unref(t).tags=f),tags:e.unref(t).tags},null,8,["tags"]),X,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":c[5]||(c[5]=f=>o.value=f),options:e.unref(a),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",Y,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":c[6]||(c[6]=f=>e.unref(t).creator.hidden=f),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(g._sfc_main,{submit:B,callback:l.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])])]),_:1},8,["isPopupOpen"])]))}},C=Object.freeze(Object.defineProperty({__proto__:null,default:T},Symbol.toStringTag,{value:"Module"})),ee={},te={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},oe=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),ne=[oe];function ae(i,r){return e.openBlock(),e.createElementBlock("svg",te,ne)}const re=g._export_sfc(ee,[["render",ae]]),se={class:"w-100 bg-white radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small"},le=["src"],ie={__name:"Image",props:["label","value","prop"],setup(i){return e.ref(null),(r,n)=>(e.openBlock(),e.createElementBlock("div",se,[i.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,le)):e.createCommentVNode("",!0)]))}},ce={class:"pd-thin"},S={__name:"BlogPost",setup(i){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await u.read({user:g.state.user._id,url:r.params.url});n.value=o[0],t.value=!1});const a={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:ie};function d(o){return o.type==="Textarea"?{innerHTML:o.content,class:"p-medium"}:o.type==="H2"?{innerHTML:o.content,class:"h3"}:o.type==="Caption"?{innerHTML:o.content}:o.type==="ImageUpload"?{src:o.content}:{}}return(o,m)=>(e.openBlock(),e.createElementBlock("section",ce,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,s=>e.createVNode(re,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!t.value&&n.value?(e.openBlock(),e.createBlock(u._sfc_main$1,{key:0,onClick:m[0]||(m[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:g.state.user._id,type:"blogpostPage",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":o.index!==n.value.length-1}])},{default:e.withCtx(()=>[e.createElementVNode("section",null,[n.value&&n.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value.content,(s,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a[s.type]),e.mergeProps({key:p,index:p,component:s,prop:s,class:s.class,content:"content"},d(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode($._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$1,{key:1,type:"blogpost",target:n.value._id,owner:g.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ue=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),q={__name:"Blog",setup(i){const r=w.useRoute(),n=w.useRouter();return r.params.category||(r.params.category="featured"),e.onMounted(()=>{if(r.query){const t=r.query,a={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"year"};u.state.filter=a}}),e.watch(()=>u.state.filter,(t,a)=>{const d={...r.query};Object.keys(a).forEach(m=>{d[m]&&delete d[m]});const o=Object.fromEntries(Object.entries(t).filter(([m,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([m,s])=>[m,Array.isArray(s)?s.join(","):s]));Object.assign(d,o),n.push({query:d})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(u._sfc_main,{category:e.unref(r).params.category,user:g.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},de=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),me={class:"w-100 cols-4 t-left flex-nowrap flex"},pe={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ge=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),fe={class:"t-semi uppercase"},_e=e.createElementVNode("br",null,null,-1),he={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ve=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),be={class:"t-semi uppercase"},ye=e.createElementVNode("br",null,null,-1),we={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ke=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),xe={class:"t-semi uppercase"},Be=e.createElementVNode("br",null,null,-1),Ne={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(i){return(r,n)=>(e.openBlock(),e.createElementBlock("section",me,[i.likes?(e.openBlock(),e.createElementBlock("div",pe,[ge,e.createElementVNode("span",fe,[e.createTextVNode(e.toDisplayString(i.likes),1),_e,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),i.comments?(e.openBlock(),e.createElementBlock("div",he,[ve,e.createElementVNode("span",be,[e.createTextVNode(e.toDisplayString(i.comments),1),ye,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),i.subscriptions?(e.openBlock(),e.createElementBlock("div",we,[ke,e.createElementVNode("span",xe,[e.createTextVNode(e.toDisplayString(i.subscriptions),1),Be,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Ve={class:"pd-thin radius-extra flex-nowrap flex"},Ee=["innerHTML"],Ce={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["First placeholder","Second placeholder","Third placeholder"],ru:["Первый плейсхолдер","Второй плейсхолдер","Третий плейсхолдер"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(i,{emit:r}){const n=i,{t,locale:a}=D.useI18n();let d=e.ref(0),o=e.ref(n.input),m=e.ref(n.placeholder),s=e.ref(n.enableTyping),p=e.ref(null),b=e.ref(""),v=e.ref(!0),k=null;function B(){r("action")}function N(h){r("update:input",h),b.value=h}function l(){d.value=(d.value+1)%n.placeholderTexts[a.value].length}function c(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function f(){!b.value&&n.enableTyping&&(s.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][d.value],_=0,y=!1;k=setInterval(()=>{v.value=!v.value},200),p.value=setInterval(()=>{s.value&&(y?(o.value=o.value.slice(0,-1),o.value=h.substring(0,_)+(v.value&&_%2?"|":""),_--):(o.value=h.substring(0,_)+(v.value&&_%2?"|":""),_++),_>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,_)},333),_===0&&y&&(y=!1,l(),h=n.placeholderTexts[a.value][d.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&E()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(h,_)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(g.Field,{field:e.unref(o),"onUpdate:field":[_[0]||(_[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:c,onBlur:f,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),i.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:B,class:"w-min hover_bg-white hover-t-black t-black bg-main button",innerHTML:i.action},null,8,Ee)):e.createCommentVNode("",!0)]))}};const $e={class:"pd-thin"},Pe={class:"o-hidden t-black bg-main pd-big radius-big"},Te=e.createElementVNode("header",{class:"t-center z-index-1 mn-big"},[e.createElementVNode("h2",{class:"mn-l-auto mn-r-auto w-m-40r mn-medium"},"Stay Updated with The Latest in Cannabis."),e.createElementVNode("p",{class:"t-transp p-big"},"Subscribe to our newsletter for news, insights, and more from the Weeder universe.")],-1),Se={class:"z-index-1 mn-big w-100 flex-nowrap flex"},qe=e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1),Me={__name:"SubscribeNewsletter",setup(i){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",$e,[e.createElementVNode("div",Pe,[Te,e.createElementVNode("div",Se,[e.createVNode(Ce,{input:e.unref(r),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=a=>e.isRef(r)?r.value=a:r=a),onAction:t[1]||(t[1]=a=>n.router.push({name:"Product Recommmendation",query:{mood:n.mood}})),class:"mn-l-auto mn-r-auto bg-white t-black w-50"},null,8,["input"])]),qe])]))}};const Ie={class:"container container-joinus"},ze={class:"content"},De={class:"h0 mn-big"},Fe=e.createElementVNode("p",{class:"w-m-33r t-center mn-small p-big"},"Together, we're shaping the future of the globals cannabis community.",-1),Oe=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),je={__name:"JoinUs",setup(i){const r=e.ref(120950),n=e.ref(["/assets/images/reviews/01.png","/assets/images/reviews/02.png","/assets/images/reviews/03.png","/assets/images/reviews/04.png","/assets/images/reviews/05.png","/assets/images/reviews/06.png"]),t=()=>{setInterval(()=>{r.value+=Math.floor(Math.random()*5)+1},330)},a={minSize:"6rem",maxSize:"10rem",minDuration:5,maxDuration:15,spawnPoints:[10,90]};e.onMounted(()=>{d(),t()});const d=()=>{n.value.forEach((o,m)=>{let s=document.createElement("img");s.src=o,s.classList.add("floating-image");let p=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],b=(Math.random()-.5)*2*10;s.style.left=`${p+b}%`,s.style.animationDuration=`${Math.random()*(a.maxDuration-a.minDuration)+a.minDuration}s`,document.querySelector(".container").appendChild(s),s.addEventListener("animationiteration",()=>{const v=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],k=(Math.random()-.5)*2*10;s.style.left=`${v+k}%`})})};return(o,m)=>(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",ze,[e.createElementVNode("span",De,e.toDisplayString(r.value.toLocaleString()),1),Fe,Oe])]))}};const Le=i=>(e.pushScopeId("data-v-18db0d1b"),i=i(),e.popScopeId(),i),Ue={class:"community-feed"},Ae=Le(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),He={class:"grid-container"},Re={__name:"HotPosts",async setup(i){let r,n;const t=e.ref([]),a=async()=>{const o=await u.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[r,n]=e.withAsyncContext(()=>a()),await r,n();const d=o=>{switch(o){case 0:return"grid-item-2x2";case 1:return"grid-item-2x1";case 2:return"grid-item-1x1";case 3:case 4:return"grid-item-1x1";case 6:return"grid-item-2x1";default:return""}};return(o,m)=>(e.openBlock(),e.createElementBlock("section",Ue,[Ae,e.createElementVNode("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,p)=>(e.openBlock(),e.createBlock(u._sfc_main$1,{blogpost:s,owner:g.state.user._id,key:p,class:e.normalizeClass(d(p))},null,8,["blogpost","owner","class"]))),128))])]))}},Je=g._export_sfc(Re,[["__scopeId","data-v-18db0d1b"]]),Ge=[{path:"community",component:P,meta:{title:{en:"Community",ru:"Коммьюнити"}},children:[{path:":category?",name:"Blog",component:()=>Promise.resolve().then(()=>de)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ue)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)}];exports.CardBlogpost=u._sfc_main$1;exports.Feed=u._sfc_main;exports.FooterBlogpost=u._sfc_main$2;exports.blogpostsStore=u.blogposts;exports.reactionsStore=u.reactions;exports.Comments=x._sfc_main$1;exports.Activity=Ne;exports.Blog=q;exports.BlogPost=S;exports.Community=P;exports.CreateBlogPost=T;exports.HotPosts=Je;exports.JoinUs=je;exports.SubscribeNewsletter=Me;exports.blogpostsRoutes=Ge;