@ozdao/prometheus-framework 0.1.24 → 0.1.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/dist/BackofficeGallery-0e0132f5.mjs +306 -0
  2. package/dist/BackofficeGallery-a52a27b6.js +1 -0
  3. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-19e23006.mjs +1945 -0
  4. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-f3d37f29.js +1 -0
  5. package/dist/Button-d8e72ac0.mjs +296 -0
  6. package/dist/Button-ee08e6bf.js +1 -0
  7. package/dist/ButtonFollow-00d85977.mjs +133 -0
  8. package/dist/ButtonFollow-7c0180b3.js +1 -0
  9. package/dist/CardOrganization-3f4a13d3.mjs +230 -0
  10. package/dist/CardOrganization-bf366e4e.js +1 -0
  11. package/dist/Feed-0b1dad65.js +1 -0
  12. package/dist/Feed-8110366a.mjs +439 -0
  13. package/dist/Feed-82ad8e29.mjs +368 -0
  14. package/dist/Feed-c8b1c72d.js +1 -0
  15. package/dist/Image-2269667e.js +9 -0
  16. package/dist/Image-7dcfe90d.mjs +477 -0
  17. package/dist/MenuItem-1216a99f.js +1 -0
  18. package/dist/MenuItem-97c50b97.mjs +93 -0
  19. package/dist/Popup-0420381f.js +1 -0
  20. package/dist/Popup-47b37484.mjs +76 -0
  21. package/dist/Product-977a8a7f.js +7 -0
  22. package/dist/Product-bbe7171a.mjs +842 -0
  23. package/dist/ProductEdit-e4cad9d1.js +1 -0
  24. package/dist/ProductEdit-f7a9af17.mjs +303 -0
  25. package/dist/ProfileBlogposts-5379335e.js +1 -0
  26. package/dist/ProfileBlogposts-5deee0c5.mjs +65 -0
  27. package/dist/ProfileComments-3cf3e265.mjs +44 -0
  28. package/dist/ProfileComments-8c9146ef.js +1 -0
  29. package/dist/ProfileEvents-7502ed90.mjs +57 -0
  30. package/dist/ProfileEvents-ea023c17.js +1 -0
  31. package/dist/ProfileLikes-23b6f2f9.js +1 -0
  32. package/dist/ProfileLikes-5b52e4ae.mjs +44 -0
  33. package/dist/ProfileOrganizations-769325c7.js +1 -0
  34. package/dist/ProfileOrganizations-c5151835.mjs +214 -0
  35. package/dist/Publics-4438ca51.js +1 -0
  36. package/dist/Publics-538180a8.mjs +45 -0
  37. package/dist/UploadImage-33f6a9f4.js +1 -0
  38. package/dist/UploadImage-f7b0335f.mjs +83 -0
  39. package/dist/UploadImageMultiple-297b3897.js +1 -0
  40. package/dist/UploadImageMultiple-7b132ba0.mjs +58 -0
  41. package/dist/auth-2f9b2dfc.js +7 -0
  42. package/dist/auth-b047fdc0.mjs +612 -0
  43. package/dist/auth.client.cjs +8 -8
  44. package/dist/auth.client.js +24 -23
  45. package/dist/auth.validation-02e0629b.mjs +20 -0
  46. package/dist/auth.validation-6a59443b.js +1 -0
  47. package/dist/backoffice.client.cjs +1 -1
  48. package/dist/backoffice.client.js +1 -1
  49. package/dist/community.client.cjs +1 -1
  50. package/dist/community.client.js +69 -68
  51. package/dist/events.client.cjs +2 -2
  52. package/dist/events.client.js +21 -20
  53. package/dist/index-0ab9d59c.mjs +934 -0
  54. package/dist/index-7ecbf72a.js +2 -0
  55. package/dist/legal.client.cjs +1 -0
  56. package/dist/legal.client.js +8460 -0
  57. package/dist/modules/landing/components/pages/Legal.vue.d.ts +2 -0
  58. package/dist/modules/landing/components/pages/legal/Cookies.vue.d.ts +2 -0
  59. package/dist/modules/landing/components/pages/legal/Privacy.vue.d.ts +2 -0
  60. package/dist/modules/landing/components/pages/legal/Terms.vue.d.ts +2 -0
  61. package/dist/modules/legal/components/pages/Legal.vue.d.ts +2 -0
  62. package/dist/modules/legal/components/pages/legal/Cookies.vue.d.ts +2 -0
  63. package/dist/modules/legal/components/pages/legal/Privacy.vue.d.ts +2 -0
  64. package/dist/modules/legal/components/pages/legal/Terms.vue.d.ts +2 -0
  65. package/dist/organizations-aed4245d.mjs +122 -0
  66. package/dist/organizations-bb8f676d.js +1 -0
  67. package/dist/organizations.client-5548024c.js +3 -0
  68. package/dist/organizations.client-976762d2.mjs +3021 -0
  69. package/dist/organizations.client.cjs +1 -1
  70. package/dist/organizations.client.js +45 -44
  71. package/dist/style.css +1 -1
  72. package/dist/users.client.cjs +1 -1
  73. package/dist/users.client.js +254 -324
  74. package/package.json +5 -1
  75. package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
  76. package/src/modules/constructor/components/sections/Constructor.vue +3 -3
  77. package/src/modules/landing/landing.client.js +1 -2
  78. package/src/modules/legal/components/pages/Legal.vue +43 -0
  79. package/src/modules/legal/components/pages/legal/Cookies.vue +370 -0
  80. package/src/modules/legal/components/pages/legal/Privacy.vue +4284 -0
  81. package/src/modules/legal/components/pages/legal/Terms.vue +1283 -0
  82. package/src/modules/legal/legal.client.js +18 -0
  83. package/src/modules/legal/router/legal.js +22 -0
  84. package/src/modules/users/components/pages/Profile.vue +13 -0
@@ -1,16 +1,17 @@
1
1
  import { ref as C, onMounted as ut, openBlock as g, createBlock as ce, unref as f, withCtx as w, createElementBlock as b, Fragment as fe, renderList as ct, createElementVNode as p, normalizeStyle as q, toDisplayString as h, resolveComponent as be, createVNode as y, Transition as R, resolveDynamicComponent as Ft, reactive as ft, watch as pt, withDirectives as I, vModelText as J, withAsyncContext as Dt, defineComponent as Rt, resolveDirective as Mt, normalizeClass as K, withKeys as ie, createCommentVNode as L, vShow as X, vModelDynamic as zt, renderSlot as Lt, createTextVNode as D, inject as Te } from "vue";
2
2
  import { v as M, b as mt, c as _e, d as Ce } from "./inputs.validation-14e8e01f.mjs";
3
- import { a as xt, F as z, _ as G } from "./index-9128ade5.mjs";
3
+ import { a as xt } from "./index-0ab9d59c.mjs";
4
4
  import { C as kt, S as jt } from "./carousel.es-44c501bc.mjs";
5
5
  import { useI18n as H } from "vue-i18n";
6
6
  import { useRoute as k, useRouter as j } from "vue-router";
7
- import { b as oe, c as ht, s as m, a as V } from "./auth-78d9392a.mjs";
8
- import { d as Di, t as Ri } from "./auth-78d9392a.mjs";
7
+ import { b as oe, c as ht, s as m, a as G } from "./auth-b047fdc0.mjs";
8
+ import { d as Ri, t as Mi } from "./auth-b047fdc0.mjs";
9
9
  import { s as x } from "./globals-96ba60e4.mjs";
10
+ import { F as z, _ as V } from "./Button-d8e72ac0.mjs";
10
11
  import { _ as we } from "./Tab-a243605d.mjs";
11
12
  import { _ as Bt } from "./_plugin-vue_export-helper-dad06003.mjs";
12
- import { r as W, a as ae, c as Ae } from "./auth.validation-9e493d2f.mjs";
13
- const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "mn-big mn-r-small mn-l-small" }, Ni = {
13
+ import { r as W, a as ae, c as Ae } from "./auth.validation-02e0629b.mjs";
14
+ const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "mn-big mn-r-small mn-l-small" }, Ei = {
14
15
  __name: "SliderFeatures",
15
16
  setup(e) {
16
17
  const n = C(null), t = {
@@ -2024,7 +2025,7 @@ const T = ft({
2024
2025
  };
2025
2026
  pt(T, (e, n) => {
2026
2027
  });
2027
- const Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2028
+ const Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2028
2029
  __proto__: null,
2029
2030
  actions: Ot,
2030
2031
  state: T
@@ -2046,7 +2047,7 @@ const or = { class: "t-left pd-medium" }, ar = /* @__PURE__ */ p("h3", { class:
2046
2047
  } catch {
2047
2048
  throw new Error();
2048
2049
  }
2049
- await V.signup(m.user, r.query.type, r.query.inviteCode);
2050
+ await G.signup(m.user, r.query.type, r.query.inviteCode);
2050
2051
  }
2051
2052
  function a() {
2052
2053
  i.push({ name: "Dashboard" });
@@ -2073,7 +2074,7 @@ const or = { class: "t-left pd-medium" }, ar = /* @__PURE__ */ p("h3", { class:
2073
2074
  class: "bg-white radius-small mn-semi"
2074
2075
  }, null, 8, ["field"])
2075
2076
  ]),
2076
- y(G, {
2077
+ y(V, {
2077
2078
  disabled: T.invite === null,
2078
2079
  submit: o,
2079
2080
  callback: a,
@@ -2183,7 +2184,7 @@ const pr = { class: "t-left pd-medium" }, mr = { class: "mn-small" }, hr = {
2183
2184
  } catch {
2184
2185
  throw new Error();
2185
2186
  }
2186
- d.query.method === "reset-password" && await V.updatePassword(m.user, d.query.type), d.query.method !== "reset-password" && await V.signup(m.user, d.query.type);
2187
+ d.query.method === "reset-password" && await G.updatePassword(m.user, d.query.type), d.query.method !== "reset-password" && await G.signup(m.user, d.query.type);
2187
2188
  }
2188
2189
  function o() {
2189
2190
  r.push({ name: "User Profile", params: { _id: m.user._id } });
@@ -2208,7 +2209,7 @@ const pr = { class: "t-left pd-medium" }, mr = { class: "mn-small" }, hr = {
2208
2209
  class: "bg-grey pd-small radius-small mn-thin"
2209
2210
  }, null, 8, ["field", "placeholder"])
2210
2211
  ]),
2211
- y(G, {
2212
+ y(V, {
2212
2213
  submit: i,
2213
2214
  callback: o,
2214
2215
  class: "mn-big"
@@ -3198,7 +3199,7 @@ const jr = { class: "t-left pd-medium" }, Br = { class: "mn-small" }, Ur = { cla
3198
3199
  throw new Error();
3199
3200
  }
3200
3201
  try {
3201
- await V.resetPassword(m.user, i.value, "reset-password");
3202
+ await G.resetPassword(m.user, i.value, "reset-password");
3202
3203
  } catch (l) {
3203
3204
  throw console.log(l), new Error();
3204
3205
  }
@@ -3257,7 +3258,7 @@ const jr = { class: "t-left pd-medium" }, Br = { class: "mn-small" }, Ur = { cla
3257
3258
  _: 1
3258
3259
  })
3259
3260
  ]),
3260
- y(G, {
3261
+ y(V, {
3261
3262
  submit: o,
3262
3263
  callback: a,
3263
3264
  class: "mn-big"
@@ -3458,7 +3459,7 @@ const Xr = { class: "t-left pd-medium" }, Yr = { class: "mn-small" }, Zr = { cla
3458
3459
  _: 1
3459
3460
  })
3460
3461
  ]),
3461
- y(G, {
3462
+ y(V, {
3462
3463
  submit: o,
3463
3464
  callback: a,
3464
3465
  class: "mn-big"
@@ -3635,7 +3636,7 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ p("b
3635
3636
  } catch {
3636
3637
  throw new Error();
3637
3638
  }
3638
- m.user.phone = m.user.phone.number, await V.login(m.user, o.value);
3639
+ m.user.phone = m.user.phone.number, await G.login(m.user, o.value);
3639
3640
  }
3640
3641
  async function $() {
3641
3642
  try {
@@ -3646,7 +3647,7 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ p("b
3646
3647
  usePopup: !0
3647
3648
  });
3648
3649
  let v = await window.AppleID.auth.signIn();
3649
- v && (console.log(v), await V.login(v, "apple"));
3650
+ v && (console.log(v), await G.login(v, "apple"));
3650
3651
  } catch (v) {
3651
3652
  throw console.error(v), new Error("Error during Apple authentication");
3652
3653
  }
@@ -3742,7 +3743,7 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ p("b
3742
3743
  _: 1
3743
3744
  })
3744
3745
  ]),
3745
- y(G, {
3746
+ y(V, {
3746
3747
  submit: u,
3747
3748
  callback: c,
3748
3749
  class: "mn-thin"
@@ -3752,7 +3753,7 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ p("b
3752
3753
  ]),
3753
3754
  _: 1
3754
3755
  }),
3755
- y(G, {
3756
+ y(V, {
3756
3757
  submit: $,
3757
3758
  callback: c,
3758
3759
  class: "mn-thin bg-black t-white"
@@ -3770,7 +3771,7 @@ typeof $t == "function" && $t(Et);
3770
3771
  const hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3771
3772
  __proto__: null,
3772
3773
  default: Et
3773
- }, Symbol.toStringTag, { value: "Module" })), Ti = [
3774
+ }, Symbol.toStringTag, { value: "Module" })), Ai = [
3774
3775
  {
3775
3776
  path: "auth",
3776
3777
  name: "Authentication",
@@ -3872,9 +3873,9 @@ export {
3872
3873
  It as ResetPassword,
3873
3874
  Et as SignIn,
3874
3875
  Nt as SignUp,
3875
- Ni as SliderFeatures,
3876
- Ti as authRoutes,
3877
- Di as authStore,
3878
- Ei as invitesStore,
3879
- Ri as twofaStore
3876
+ Ei as SliderFeatures,
3877
+ Ai as authRoutes,
3878
+ Ri as authStore,
3879
+ Ti as invitesStore,
3880
+ Mi as twofaStore
3880
3881
  };
@@ -0,0 +1,20 @@
1
+ import { useRouter as i } from "vue-router";
2
+ import { s } from "./auth-b047fdc0.mjs";
3
+ i();
4
+ function n(r, o, e) {
5
+ e(), s.user.phone = "", s.user.email = "", s.user.password = "", s.user.passwordRepeat = "";
6
+ }
7
+ function f(r, o, e) {
8
+ console.log(s.user), s.user.phone === "" && s.user.email === "" ? e("/auth/signin") : e();
9
+ }
10
+ i();
11
+ function c(r, o, e) {
12
+ if (s.access.status)
13
+ return e("/profile/" + s.user._id);
14
+ e();
15
+ }
16
+ export {
17
+ n as a,
18
+ f as c,
19
+ c as r
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("vue-router"),e=require("./auth-2f9b2dfc.js");u.useRouter();function o(t,r,s){s(),e.state.user.phone="",e.state.user.email="",e.state.user.password="",e.state.user.passwordRepeat=""}function i(t,r,s){console.log(e.state.user),e.state.user.phone===""&&e.state.user.email===""?s("/auth/signin"):s()}u.useRouter();function a(t,r,s){if(e.state.access.status)return s("/profile/"+e.state.user._id);s()}exports.checkUser=i;exports.requiresNoAuth=a;exports.resetUser=o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./_plugin-vue_export-helper-f246444f.js");const i={},l={id:"account",class:"cols-2-1_3 gap-medium pd-medium"},s={class:"pd-medium menu-tabs"},u={class:"w-100"};function m(t,o){const c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",l,[e.createElementVNode("div",s,[e.createElementVNode("button",{onClick:o[0]||(o[0]=n=>t.$router.push("/account/community")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/community"},"mn-small product-tab"])}," Blog ",2),e.createElementVNode("button",{onClick:o[1]||(o[1]=n=>t.$router.push("/account/gallery")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/gallery"},"product-tab"])}," Gallery ",2)]),e.createElementVNode("div",u,[e.createVNode(c,null,{default:e.withCtx(({Component:n,route:a})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:a.path}))]),_:2},1024)]),_:1})])])}const d=r._export_sfc(i,[["render",m]]),p=[{path:"backoffice",component:d,children:[{path:":_id",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./BackofficeGallery-2e695fed.js"))}]}];exports.backofficeRoutes=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./_plugin-vue_export-helper-f246444f.js");const i={},l={id:"account",class:"cols-2-1_3 gap-medium pd-medium"},s={class:"pd-medium menu-tabs"},u={class:"w-100"};function m(t,o){const c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",l,[e.createElementVNode("div",s,[e.createElementVNode("button",{onClick:o[0]||(o[0]=n=>t.$router.push("/account/community")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/community"},"mn-small product-tab"])}," Blog ",2),e.createElementVNode("button",{onClick:o[1]||(o[1]=n=>t.$router.push("/account/gallery")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/gallery"},"product-tab"])}," Gallery ",2)]),e.createElementVNode("div",u,[e.createVNode(c,null,{default:e.withCtx(({Component:n,route:a})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:a.path}))]),_:2},1024)]),_:1})])])}const d=r._export_sfc(i,[["render",m]]),p=[{path:"backoffice",component:d,children:[{path:":_id",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./BackofficeGallery-a52a27b6.js"))}]}];exports.backofficeRoutes=p;
@@ -53,7 +53,7 @@ const B = /* @__PURE__ */ _(k, [["render", b]]), $ = [{
53
53
  },
54
54
  component: () => import(
55
55
  /* webpackChunkName: 'BackofficeGallery' */
56
- "./BackofficeGallery-08d96af1.mjs"
56
+ "./BackofficeGallery-0e0132f5.mjs"
57
57
  )
58
58
  }]
59
59
  }];
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),I=require("./Select-b9299fb6.js"),u=require("./Feed-ff3b96b2.js"),f=require("./auth-96449d96.js"),x=require("./Image-8e67dd2d.js"),z=require("./Popup-b7609baa.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-8660f9cb.js"),$=require("./index-2a0269fc.js"),D=require("./organizations-195ec134.js"),F=require("./EmptyState-7658d7d6.js"),P=require("./_plugin-vue_export-helper-f246444f.js"),O=require("./Publics-bbab7a79.js"),L=require("vue-i18n");require("./globals-928eb13c.js");require("./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");require("./CardOrganization-d8f209ee.js");require("./ButtonFollow-df6317f0.js");const j={class:"min-h-100vh pd-thin"},U={class:"mn-thin flex-v-center t-left flex-nowrap flex"},A={class:"flex-v-center flex-nowrap flex t-left"},H=e.createElementVNode("span",{class:""},"Topics for ",-1),R={class:"w-max bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},J={class:""},T={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("header",U,[e.createElementVNode("h2",A,[H,e.createVNode(I.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",R,[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),f.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",J,[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})])])}}},G={class:"pd-thin"},Q={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},W={class:"w-full h-full"},K={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},X={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},Y={class:"w-m-66r t-left pd-big bg-white radius-big"},Z=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),ee=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),te={key:0,class:"mn-thin"},oe={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},S={__name:"CreateBlogPost",setup(c){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 i=await u.read({user:f.state.user._id,url:r.params.url});t.value=i.pop()}else u.clean(),t.value=u.state.current;t.value.owner||(t.value.owner={target:f.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:f.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 D.actions.read({user:f.state.user._id,postable:f.state.user._id,limit:100});console.log(l),a.value=l.map(i=>({name:i.profile.name,_id:i._id,photo:i.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(i=>i.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,i)=>(e.openBlock(),e.createElementBlock("article",G,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",Q,[e.createElementVNode("div",W,[e.createVNode(x._sfc_main,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main$1,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=g=>e.unref(t).content=g)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",K,[e.createElementVNode("div",X,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=g=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=g=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=g=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(z._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",Y,[Z,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=g=>e.unref(t).tags=g),tags:e.unref(t).tags},null,8,["tags"]),ee,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=g=>o.value=g),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",te,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=g=>e.unref(t).creator.hidden=g),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode($._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:S},Symbol.toStringTag,{value:"Module"})),ne={},ae={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},re=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=[re];function le(c,r){return e.openBlock(),e.createElementBlock("svg",ae,se)}const ie=P._export_sfc(ne,[["render",le]]),ce={class:"pd-thin"},q={__name:"BlogPost",setup(c){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await u.read({user:f.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:x._sfc_main$3};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(ie,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(F._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:f.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(O._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$2,{key:1,type:"blogpost",target:n.value._id,owner:f.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ue=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),M={__name:"Blog",setup(c){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:"week"};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.replace({query:d})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(u._sfc_main,{category:e.unref(r).params.category,user:f.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},de=Object.freeze(Object.defineProperty({__proto__:null,default:M},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),_e={class:"t-semi uppercase"},fe=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(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",me,[c.likes?(e.openBlock(),e.createElementBlock("div",pe,[ge,e.createElementVNode("span",_e,[e.createTextVNode(e.toDisplayString(c.likes),1),fe,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",he,[ve,e.createElementVNode("span",be,[e.createTextVNode(e.toDisplayString(c.comments),1),ye,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",we,[ke,e.createElementVNode("span",xe,[e.createTextVNode(e.toDisplayString(c.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(c,{emit:r}){const n=c,{t,locale:a}=L.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 i(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function g(){!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($.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:i,onBlur:g,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),c.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:c.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(c){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),Le={__name:"JoinUs",setup(c){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 je=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Ue={class:"community-feed"},Ae=je(()=>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(c){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:f.state.user._id,key:p,class:e.normalizeClass(d(p))},null,8,["blogpost","owner","class"]))),128))])]))}},Je=P._export_sfc(Re,[["__scopeId","data-v-18db0d1b"]]),Ge=[{path:"community",component:T,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},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$2;exports.Activity=Ne;exports.Blog=M;exports.BlogPost=q;exports.Community=T;exports.CreateBlogPost=S;exports.HotPosts=Je;exports.JoinUs=Le;exports.SubscribeNewsletter=Me;exports.blogpostsRoutes=Ge;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),I=require("./Select-b9299fb6.js"),u=require("./Feed-0b1dad65.js"),f=require("./auth-2f9b2dfc.js"),x=require("./Image-2269667e.js"),z=require("./Popup-0420381f.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-f3d37f29.js"),$=require("./Button-ee08e6bf.js"),D=require("./organizations-bb8f676d.js"),F=require("./EmptyState-7658d7d6.js"),P=require("./_plugin-vue_export-helper-f246444f.js"),O=require("./Publics-4438ca51.js"),L=require("vue-i18n");require("./globals-928eb13c.js");require("./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./index-7ecbf72a.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");require("./CardOrganization-bf366e4e.js");require("./ButtonFollow-7c0180b3.js");const j={class:"min-h-100vh pd-thin"},U={class:"mn-thin flex-v-center t-left flex-nowrap flex"},A={class:"flex-v-center flex-nowrap flex t-left"},H=e.createElementVNode("span",{class:""},"Topics for ",-1),R={class:"w-max bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},J={class:""},T={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("header",U,[e.createElementVNode("h2",A,[H,e.createVNode(I.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",R,[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),f.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",J,[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})])])}}},G={class:"pd-thin"},Q={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},W={class:"w-full h-full"},K={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},X={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},Y={class:"w-m-66r t-left pd-big bg-white radius-big"},Z=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),ee=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),te={key:0,class:"mn-thin"},oe={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},S={__name:"CreateBlogPost",setup(c){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 i=await u.read({user:f.state.user._id,url:r.params.url});t.value=i.pop()}else u.clean(),t.value=u.state.current;t.value.owner||(t.value.owner={target:f.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:f.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 D.actions.read({user:f.state.user._id,postable:f.state.user._id,limit:100});console.log(l),a.value=l.map(i=>({name:i.profile.name,_id:i._id,photo:i.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(i=>i.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,i)=>(e.openBlock(),e.createElementBlock("article",G,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",Q,[e.createElementVNode("div",W,[e.createVNode(x._sfc_main,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main$1,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=g=>e.unref(t).content=g)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",K,[e.createElementVNode("div",X,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=g=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=g=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=g=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(z._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",Y,[Z,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=g=>e.unref(t).tags=g),tags:e.unref(t).tags},null,8,["tags"]),ee,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=g=>o.value=g),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",te,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=g=>e.unref(t).creator.hidden=g),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode($._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:S},Symbol.toStringTag,{value:"Module"})),ne={},ae={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},re=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=[re];function le(c,r){return e.openBlock(),e.createElementBlock("svg",ae,se)}const ie=P._export_sfc(ne,[["render",le]]),ce={class:"pd-thin"},q={__name:"BlogPost",setup(c){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await u.read({user:f.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:x._sfc_main$3};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(ie,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(F._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:f.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(O._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$2,{key:1,type:"blogpost",target:n.value._id,owner:f.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ue=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),M={__name:"Blog",setup(c){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:"week"};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.replace({query:d})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(u._sfc_main,{category:e.unref(r).params.category,user:f.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},de=Object.freeze(Object.defineProperty({__proto__:null,default:M},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),_e={class:"t-semi uppercase"},fe=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(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",me,[c.likes?(e.openBlock(),e.createElementBlock("div",pe,[ge,e.createElementVNode("span",_e,[e.createTextVNode(e.toDisplayString(c.likes),1),fe,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",he,[ve,e.createElementVNode("span",be,[e.createTextVNode(e.toDisplayString(c.comments),1),ye,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",we,[ke,e.createElementVNode("span",xe,[e.createTextVNode(e.toDisplayString(c.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(c,{emit:r}){const n=c,{t,locale:a}=L.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 i(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function g(){!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($.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:i,onBlur:g,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),c.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:c.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(c){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),Le={__name:"JoinUs",setup(c){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 je=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Ue={class:"community-feed"},Ae=je(()=>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(c){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:f.state.user._id,key:p,class:e.normalizeClass(d(p))},null,8,["blogpost","owner","class"]))),128))])]))}},Je=P._export_sfc(Re,[["__scopeId","data-v-18db0d1b"]]),Ge=[{path:"community",component:T,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},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$2;exports.Activity=Ne;exports.Blog=M;exports.BlogPost=q;exports.Community=T;exports.CreateBlogPost=S;exports.HotPosts=Je;exports.JoinUs=Le;exports.SubscribeNewsletter=Me;exports.blogpostsRoutes=Ge;