@ozdao/prometheus-framework 0.1.27 → 0.1.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Chips-493042f7.js +1 -0
- package/dist/Chips-9cf6c0da.mjs +286 -0
- package/dist/Feed-27f62b1c.mjs +368 -0
- package/dist/Feed-7c8c901a.mjs +380 -0
- package/dist/Feed-aee74095.js +1 -0
- package/dist/Feed-bfd7d1d9.js +1 -0
- package/dist/Image-1f7252c0.mjs +477 -0
- package/dist/Image-448f9228.js +9 -0
- package/dist/Product-3c9c8197.js +7 -0
- package/dist/Product-748ec8b7.mjs +842 -0
- package/dist/Product-852f952c.js +7 -0
- package/dist/Product-bbdc8460.mjs +841 -0
- package/dist/ProductEdit-17f4e395.mjs +304 -0
- package/dist/ProductEdit-4af06681.js +1 -0
- package/dist/ProductEdit-4f9b6d56.js +1 -0
- package/dist/ProductEdit-a1050ab6.mjs +303 -0
- package/dist/ProfileBlogposts-03d04b92.mjs +66 -0
- package/dist/ProfileBlogposts-f9312adf.js +1 -0
- package/dist/ProfileComments-6d863cd3.mjs +45 -0
- package/dist/ProfileComments-e6970923.js +1 -0
- package/dist/ProfileEvents-917169c6.mjs +58 -0
- package/dist/ProfileEvents-996bce18.js +1 -0
- package/dist/ProfileLikes-0402d1fb.js +1 -0
- package/dist/ProfileLikes-92196922.mjs +45 -0
- package/dist/auth.client.cjs +8 -8
- package/dist/auth.client.js +581 -602
- package/dist/auth.validation-2cdd2231.mjs +17 -0
- package/dist/auth.validation-30bb0efd.js +1 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +65 -65
- package/dist/components/CardFooter/CardFooter.vue.d.ts +1 -1
- package/dist/components/CardHeader/CardHeader.vue.d.ts +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +6 -6
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +2596 -2567
- package/dist/modules/community/components/blocks/FooterBlogpost.vue.d.ts +1 -1
- package/dist/modules/community/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/events/components/blocks/CardEvent.vue.d.ts +3 -3
- package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/events/components/sections/List.vue.d.ts +1 -1
- package/dist/modules/organizations/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/organizations/components/sections/Organizations.vue.d.ts +1 -1
- package/dist/organizations.client-13fc2cbe.js +3 -0
- package/dist/organizations.client-39196bef.mjs +3041 -0
- package/dist/organizations.client-85a2ae66.js +3 -0
- package/dist/organizations.client-91e84d4f.mjs +3022 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +43 -42
- package/dist/states.validation-766a62a6.mjs +13 -0
- package/dist/states.validation-92231934.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +199 -194
- package/package.json +1 -1
- package/src/components/CardFooter/CardFooter.vue +27 -30
- package/src/components/CardHeader/CardHeader.vue +56 -3
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
- package/src/modules/community/components/layouts/Community.vue +5 -5
- package/src/modules/events/components/blocks/CardEvent.vue +3 -2
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/events/router/events.js +1 -0
- package/src/modules/legal/components/pages/Legal.vue +33 -17
- package/src/modules/legal/router/legal.js +51 -21
- package/src/modules/organizations/router/organizations.js +19 -0
- package/src/modules/users/router/users.js +36 -31
@@ -0,0 +1,17 @@
|
|
1
|
+
import { useRouter as u } from "vue-router";
|
2
|
+
import { s as i } from "./auth-b047fdc0.mjs";
|
3
|
+
u();
|
4
|
+
function a(o, r, s) {
|
5
|
+
if (i.access.status !== !0)
|
6
|
+
return s("/auth/signin");
|
7
|
+
s();
|
8
|
+
}
|
9
|
+
function f(o, r, s) {
|
10
|
+
if (i.access.status)
|
11
|
+
return s("/profile/" + i.user._id);
|
12
|
+
s();
|
13
|
+
}
|
14
|
+
export {
|
15
|
+
f as a,
|
16
|
+
a as r
|
17
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const i=require("vue-router"),s=require("./auth-2f9b2dfc.js");i.useRouter();function o(e,u,t){if(s.state.access.status!==!0)return t("/auth/signin");t()}function n(e,u,t){if(s.state.access.status)return t("/profile/"+s.state.user._id);t()}exports.requiresAuth=o;exports.requiresNoAuth=n;
|
@@ -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-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;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),z=require("./Select-b9299fb6.js"),d=require("./Feed-aee74095.js"),f=require("./auth-2f9b2dfc.js"),x=require("./Image-448f9228.js"),$=require("./Chips-493042f7.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-f3d37f29.js"),P=require("./Button-ee08e6bf.js"),D=require("./organizations-bb8f676d.js"),F=require("./EmptyState-7658d7d6.js"),T=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("./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-100 bg-grey pd-small radius-big mn-semi flex-nowrap flex"},J={class:""},S={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const u=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("header",U,[e.createElementVNode("h2",A,[H,e.createVNode(z.Select,{options:["today","week","month","year"],select:d.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>d.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-thin 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-thin 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-thin 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-thin 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(u,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"},q={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const u=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await d.read({user:f.state.user._id,url:r.params.url});t.value=i.pop()}else d.clean(),t.value=d.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=>!u.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){u.value.length>0&&u.value.map(l=>l.text),t.value.status="draft",r.params.url?d.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):d.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?d.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):d.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?")&&d.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($._sfc_main$2,{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(P._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:q},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=T._export_sfc(ne,[["render",le]]),ce={class:"pd-thin"},M={__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 d.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 u(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(d._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"},u(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:M},Symbol.toStringTag,{value:"Module"})),I={__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"};d.state.filter=a}}),e.watch(()=>d.state.filter,(t,a)=>{const u={...r.query};Object.keys(a).forEach(m=>{u[m]&&delete u[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(u,o),n.replace({query:u})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(d._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:I},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 u=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(){u.value=(u.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][u.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][u.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(P.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(()=>{u(),t()});const u=()=>{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 d.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[r,n]=e.withAsyncContext(()=>a()),await r,n();const u=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(d._sfc_main$1,{blogpost:s,owner:f.state.user._id,key:p,class:e.normalizeClass(u(p))},null,8,["blogpost","owner","class"]))),128))])]))}},Je=T._export_sfc(Re,[["__scopeId","data-v-18db0d1b"]]),Ge=[{path:"community",component:S,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=d._sfc_main$1;exports.Feed=d._sfc_main;exports.FooterBlogpost=d._sfc_main$2;exports.blogpostsStore=d.blogposts;exports.Comments=x._sfc_main$2;exports.reactionsStore=$.reactions;exports.Activity=Ne;exports.Blog=I;exports.BlogPost=M;exports.Community=S;exports.CreateBlogPost=q;exports.HotPosts=Je;exports.JoinUs=Le;exports.SubscribeNewsletter=Me;exports.blogpostsRoutes=Ge;
|
package/dist/community.client.js
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import { resolveComponent as Y, openBlock as i, createElementBlock as p, createElementVNode as o, createVNode as h, normalizeClass as B, unref as c, createCommentVNode as v, withCtx as k, Transition as G, createBlock as I, resolveDynamicComponent as Q, ref as g, onMounted as F, computed as V, createTextVNode as T, createStaticVNode as Z, TransitionGroup as H, Fragment as D, renderList as U, mergeProps as ee, watch as te, toDisplayString as N, watchEffect as se, isRef as W, withAsyncContext as ae, pushScopeId as oe, popScopeId as ne } from "vue";
|
2
2
|
import { useRoute as z, useRouter as A } from "vue-router";
|
3
3
|
import { S as le } from "./Select-90d4b7c8.mjs";
|
4
|
-
import { s as M, r as L, c as re, u as q, a as R, b as ie, d as K, _ as ue } from "./Feed-
|
5
|
-
import { e as
|
4
|
+
import { s as M, r as L, c as re, u as q, a as R, b as ie, d as K, _ as ue } from "./Feed-7c8c901a.mjs";
|
5
|
+
import { e as os, f as ns } from "./Feed-7c8c901a.mjs";
|
6
6
|
import { s as w } from "./auth-b047fdc0.mjs";
|
7
|
-
import { _ as ce, a as pe, b as
|
8
|
-
import {
|
7
|
+
import { _ as ce, a as pe, b as de, c as me } from "./Image-1f7252c0.mjs";
|
8
|
+
import { c as ge } from "./Chips-9cf6c0da.mjs";
|
9
|
+
import { r as rs } from "./Chips-9cf6c0da.mjs";
|
9
10
|
import { _ as _e, S as he, C as fe } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-19e23006.mjs";
|
10
11
|
import { _ as ve, F as be } from "./Button-d8e72ac0.mjs";
|
11
12
|
import { a as ye } from "./organizations-aed4245d.mjs";
|
@@ -15,18 +16,17 @@ import { _ as xe } from "./Publics-538180a8.mjs";
|
|
15
16
|
import { useI18n as $e } from "vue-i18n";
|
16
17
|
import "./globals-96ba60e4.mjs";
|
17
18
|
import "./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs";
|
18
|
-
import "./Chips-03ff0c34.mjs";
|
19
19
|
import "./IconEdit-eacf3856.mjs";
|
20
20
|
import "./index-0ab9d59c.mjs";
|
21
21
|
import "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
22
22
|
import "./CardOrganization-3f4a13d3.mjs";
|
23
23
|
import "./ButtonFollow-00d85977.mjs";
|
24
|
-
const ke = { class: "min-h-100vh pd-thin" }, Pe = { class: "mn-thin flex-v-center t-left flex-nowrap flex" }, Ce = { class: "flex-v-center flex-nowrap flex t-left" }, Te = /* @__PURE__ */ o("span", { class: "" }, "Topics for ", -1), Se = { class: "w-
|
24
|
+
const ke = { class: "min-h-100vh pd-thin" }, Pe = { class: "mn-thin flex-v-center t-left flex-nowrap flex" }, Ce = { class: "flex-v-center flex-nowrap flex t-left" }, Te = /* @__PURE__ */ o("span", { class: "" }, "Topics for ", -1), Se = { class: "w-100 bg-grey pd-small radius-big mn-semi flex-nowrap flex" }, Be = { class: "" }, Ie = {
|
25
25
|
__name: "Community",
|
26
|
-
setup(
|
26
|
+
setup(d) {
|
27
27
|
const n = z(), s = A();
|
28
28
|
return (e, a) => {
|
29
|
-
const
|
29
|
+
const m = Y("router-view");
|
30
30
|
return i(), p("div", ke, [
|
31
31
|
o("header", Pe, [
|
32
32
|
o("h2", Ce, [
|
@@ -42,25 +42,25 @@ const ke = { class: "min-h-100vh pd-thin" }, Pe = { class: "mn-thin flex-v-cente
|
|
42
42
|
]),
|
43
43
|
o("ul", Se, [
|
44
44
|
o("li", {
|
45
|
-
class: B([{ "t-white bg-black": c(n).params.category === "featured" }, "mn-r-small t-medium pd-
|
45
|
+
class: B([{ "t-white bg-black": c(n).params.category === "featured" }, "mn-r-small t-medium pd-thin radius-small"]),
|
46
46
|
onClick: a[1] || (a[1] = (t) => c(s).push({ name: "Blog" }))
|
47
47
|
}, "👑 Featured", 2),
|
48
48
|
o("li", {
|
49
|
-
class: B([{ "t-white bg-black": c(n).params.category === "popular" }, "mn-r-small t-medium pd-
|
49
|
+
class: B([{ "t-white bg-black": c(n).params.category === "popular" }, "mn-r-small t-medium pd-thin radius-small"]),
|
50
50
|
onClick: a[2] || (a[2] = (t) => c(s).push({ name: "Blog", params: { category: "popular" } }))
|
51
51
|
}, "🔥 Popular", 2),
|
52
52
|
o("li", {
|
53
|
-
class: B([{ "t-white bg-black": c(n).params.category === "new" }, "mn-r-small t-medium pd-
|
53
|
+
class: B([{ "t-white bg-black": c(n).params.category === "new" }, "mn-r-small t-medium pd-thin radius-small"]),
|
54
54
|
onClick: a[3] || (a[3] = (t) => c(s).push({ name: "Blog", params: { category: "new" } }))
|
55
55
|
}, "🆕 New", 2),
|
56
56
|
w.user._id ? (i(), p("li", {
|
57
57
|
key: 0,
|
58
|
-
class: B([{ "t-white bg-black": c(n).params.category === "following" }, "t-medium pd-
|
58
|
+
class: B([{ "t-white bg-black": c(n).params.category === "following" }, "t-medium pd-thin radius-small"]),
|
59
59
|
onClick: a[4] || (a[4] = (t) => c(s).push({ name: "Blog", params: { category: "following" } }))
|
60
60
|
}, "👥 Following", 2)) : v("", !0)
|
61
61
|
]),
|
62
62
|
o("section", Be, [
|
63
|
-
h(
|
63
|
+
h(m, null, {
|
64
64
|
default: k(({ Component: t, route: _ }) => [
|
65
65
|
h(G, {
|
66
66
|
name: "scaleIn",
|
@@ -95,10 +95,10 @@ const ke = { class: "min-h-100vh pd-thin" }, Pe = { class: "mn-thin flex-v-cente
|
|
95
95
|
class: "mn-medium br-grey br-2px br-solid pd-small radius-big"
|
96
96
|
}, Ee = {
|
97
97
|
__name: "CreateBlogPost",
|
98
|
-
setup(
|
98
|
+
setup(d) {
|
99
99
|
const n = z(), s = A();
|
100
100
|
let e = g(null), a = g(null);
|
101
|
-
const
|
101
|
+
const m = g([]), t = g(null);
|
102
102
|
F(async () => {
|
103
103
|
if (n.params.url) {
|
104
104
|
const u = await L({ user: w.user._id, url: n.params.url });
|
@@ -135,7 +135,7 @@ const ke = { class: "min-h-100vh pd-thin" }, Pe = { class: "mn-thin flex-v-cente
|
|
135
135
|
{ text: "discussion" },
|
136
136
|
{ text: "photos" }
|
137
137
|
]);
|
138
|
-
V(() => l.value.filter((r) => r.text.toLowerCase().includes(_.value.toLowerCase()))), V(() => l.value.filter((r) => !
|
138
|
+
V(() => l.value.filter((r) => r.text.toLowerCase().includes(_.value.toLowerCase()))), V(() => l.value.filter((r) => !m.value.some((u) => u.text === r.text)));
|
139
139
|
const f = g(!1);
|
140
140
|
function P() {
|
141
141
|
f.value = !0;
|
@@ -144,7 +144,7 @@ const ke = { class: "min-h-100vh pd-thin" }, Pe = { class: "mn-thin flex-v-cente
|
|
144
144
|
f.value = !1;
|
145
145
|
}
|
146
146
|
function S() {
|
147
|
-
|
147
|
+
m.value.length > 0 && m.value.map((r) => r.text), e.value.status = "draft", n.params.url ? q(e.value).then((r) => {
|
148
148
|
s.push({ name: "BlogPost", params: { url: r.url } });
|
149
149
|
}).catch((r) => {
|
150
150
|
console.log(r);
|
@@ -267,12 +267,12 @@ const ke = { class: "min-h-100vh pd-thin" }, Pe = { class: "mn-thin flex-v-cente
|
|
267
267
|
}, qe = /* @__PURE__ */ Z('<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), Re = [
|
268
268
|
qe
|
269
269
|
];
|
270
|
-
function Je(
|
270
|
+
function Je(d, n) {
|
271
271
|
return i(), p("svg", He, Re);
|
272
272
|
}
|
273
273
|
const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, We = {
|
274
274
|
__name: "BlogPost",
|
275
|
-
setup(
|
275
|
+
setup(d) {
|
276
276
|
const n = z(), s = g(null), e = g(!0);
|
277
277
|
F(async () => {
|
278
278
|
e.value = !0;
|
@@ -284,9 +284,9 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
284
284
|
H2: "h2",
|
285
285
|
Bullets: "p",
|
286
286
|
Caption: "p",
|
287
|
-
ImageUpload:
|
287
|
+
ImageUpload: me
|
288
288
|
};
|
289
|
-
function
|
289
|
+
function m(t) {
|
290
290
|
return t.type === "Textarea" ? { innerHTML: t.content, class: "p-medium" } : t.type === "H2" ? { innerHTML: t.content, class: "h3" } : t.type === "Caption" ? { innerHTML: t.content } : t.type === "ImageUpload" ? { src: t.content } : {};
|
291
291
|
}
|
292
292
|
return (t, _) => (i(), p("section", Qe, [
|
@@ -336,13 +336,13 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
336
336
|
prop: l,
|
337
337
|
class: l.class,
|
338
338
|
content: "content"
|
339
|
-
},
|
339
|
+
}, m(l), { class: "mn-regular" }), null, 16, ["index", "component", "prop", "class"]))), 128)) : v("", !0)
|
340
340
|
])
|
341
341
|
]),
|
342
342
|
_: 1
|
343
343
|
}, 8, ["blogpost", "user", "class"])) : v("", !0),
|
344
344
|
h(xe, { class: "mn-small" }),
|
345
|
-
!e.value && s.value ? (i(), I(
|
345
|
+
!e.value && s.value ? (i(), I(de, {
|
346
346
|
key: 1,
|
347
347
|
type: "blogpost",
|
348
348
|
target: s.value._id,
|
@@ -358,7 +358,7 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
358
358
|
default: We
|
359
359
|
}, Symbol.toStringTag, { value: "Module" })), Xe = {
|
360
360
|
__name: "Blog",
|
361
|
-
setup(
|
361
|
+
setup(d) {
|
362
362
|
const n = z(), s = A();
|
363
363
|
return n.params.category || (n.params.category = "featured"), F(() => {
|
364
364
|
if (n.query) {
|
@@ -369,14 +369,14 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
369
369
|
M.filter = a;
|
370
370
|
}
|
371
371
|
}), te(() => M.filter, (e, a) => {
|
372
|
-
const
|
372
|
+
const m = { ...n.query };
|
373
373
|
Object.keys(a).forEach((_) => {
|
374
|
-
|
374
|
+
m[_] && delete m[_];
|
375
375
|
});
|
376
376
|
const t = Object.fromEntries(
|
377
377
|
Object.entries(e).filter(([_, l]) => Array.isArray(l) && l.length > 0 || typeof l == "string" && l).map(([_, l]) => [_, Array.isArray(l) ? l.join(",") : l])
|
378
378
|
);
|
379
|
-
Object.assign(
|
379
|
+
Object.assign(m, t), s.replace({ query: m });
|
380
380
|
}, { deep: !0 }), (e, a) => (i(), p("section", null, [
|
381
381
|
h(ue, {
|
382
382
|
category: c(n).params.category,
|
@@ -397,42 +397,42 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
397
397
|
}, nt = /* @__PURE__ */ o("p", { class: "h4 i-medium mn-r-small" }, "💬", -1), lt = { class: "t-semi uppercase" }, rt = /* @__PURE__ */ o("br", null, null, -1), it = {
|
398
398
|
key: 2,
|
399
399
|
class: "w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"
|
400
|
-
}, ut = /* @__PURE__ */ o("p", { class: "h4 i-medium mn-r-small" }, "👍", -1), ct = { class: "t-semi uppercase" }, pt = /* @__PURE__ */ o("br", null, null, -1),
|
400
|
+
}, ut = /* @__PURE__ */ o("p", { class: "h4 i-medium mn-r-small" }, "👍", -1), ct = { class: "t-semi uppercase" }, pt = /* @__PURE__ */ o("br", null, null, -1), Xt = {
|
401
401
|
__name: "Activity",
|
402
402
|
props: {
|
403
403
|
likes: Number,
|
404
404
|
comments: Number,
|
405
405
|
subscriptions: Number
|
406
406
|
},
|
407
|
-
setup(
|
407
|
+
setup(d) {
|
408
408
|
return (n, s) => (i(), p("section", Ze, [
|
409
|
-
|
409
|
+
d.likes ? (i(), p("div", et, [
|
410
410
|
tt,
|
411
411
|
o("span", st, [
|
412
|
-
T(N(
|
412
|
+
T(N(d.likes), 1),
|
413
413
|
at,
|
414
414
|
T("likes")
|
415
415
|
])
|
416
416
|
])) : v("", !0),
|
417
|
-
|
417
|
+
d.comments ? (i(), p("div", ot, [
|
418
418
|
nt,
|
419
419
|
o("span", lt, [
|
420
|
-
T(N(
|
420
|
+
T(N(d.comments), 1),
|
421
421
|
rt,
|
422
422
|
T("comments")
|
423
423
|
])
|
424
424
|
])) : v("", !0),
|
425
|
-
|
425
|
+
d.subscriptions ? (i(), p("div", it, [
|
426
426
|
ut,
|
427
427
|
o("span", ct, [
|
428
|
-
T(N(
|
428
|
+
T(N(d.subscriptions), 1),
|
429
429
|
pt,
|
430
430
|
T("subscriptions")
|
431
431
|
])
|
432
432
|
])) : v("", !0)
|
433
433
|
]));
|
434
434
|
}
|
435
|
-
},
|
435
|
+
}, dt = { class: "pd-thin radius-extra flex-nowrap flex" }, mt = ["innerHTML"], gt = {
|
436
436
|
__name: "FieldBig",
|
437
437
|
props: {
|
438
438
|
input: String,
|
@@ -464,9 +464,9 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
464
464
|
}
|
465
465
|
},
|
466
466
|
emits: ["update:input", "action"],
|
467
|
-
setup(
|
468
|
-
const s =
|
469
|
-
let
|
467
|
+
setup(d, { emit: n }) {
|
468
|
+
const s = d, { t: e, locale: a } = $e();
|
469
|
+
let m = g(0), t = g(s.input), _ = g(s.placeholder), l = g(s.enableTyping), f = g(null), P = g(""), $ = g(!0), S = null;
|
470
470
|
function O() {
|
471
471
|
n("action");
|
472
472
|
}
|
@@ -474,7 +474,7 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
474
474
|
n("update:input", x), P.value = x;
|
475
475
|
}
|
476
476
|
function r() {
|
477
|
-
|
477
|
+
m.value = (m.value + 1) % s.placeholderTexts[a.value].length;
|
478
478
|
}
|
479
479
|
function u() {
|
480
480
|
l.value = !1, clearInterval(f.value), _.value = s.placeholder, P.value || (t.value = "");
|
@@ -483,20 +483,20 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
483
483
|
!P.value && s.enableTyping && (l.value = !0, _.value = "", E());
|
484
484
|
}
|
485
485
|
function E() {
|
486
|
-
let x = s.placeholderTexts[a.value][
|
486
|
+
let x = s.placeholderTexts[a.value][m.value], y = 0, C = !1;
|
487
487
|
S = setInterval(() => {
|
488
488
|
$.value = !$.value;
|
489
489
|
}, 200), f.value = setInterval(() => {
|
490
490
|
l.value && (C ? (t.value = t.value.slice(0, -1), t.value = x.substring(0, y) + ($.value && y % 2 ? "|" : ""), y--) : (t.value = x.substring(0, y) + ($.value && y % 2 ? "|" : ""), y++), y > x.length && s.loopTyping && setTimeout(() => {
|
491
491
|
C = !0, t.value = x.substring(0, y);
|
492
|
-
}, 333), y === 0 && C && (C = !1, r(), x = s.placeholderTexts[a.value][
|
492
|
+
}, 333), y === 0 && C && (C = !1, r(), x = s.placeholderTexts[a.value][m.value]));
|
493
493
|
}, s.typingSpeed);
|
494
494
|
}
|
495
495
|
return F(() => {
|
496
496
|
s.enableTyping && E();
|
497
497
|
}), se(() => {
|
498
498
|
l.value || (clearInterval(f.value), clearInterval(S));
|
499
|
-
}), (x, y) => (i(), p("div",
|
499
|
+
}), (x, y) => (i(), p("div", dt, [
|
500
500
|
h(be, {
|
501
501
|
field: c(t),
|
502
502
|
"onUpdate:field": [
|
@@ -509,12 +509,12 @@ const Ge = /* @__PURE__ */ X(Ve, [["render", Je]]), Qe = { class: "pd-thin" }, W
|
|
509
509
|
onBlur: b,
|
510
510
|
class: "w-100 pd-small p-big"
|
511
511
|
}, null, 8, ["field", "placeholder"]),
|
512
|
-
|
512
|
+
d.action ? (i(), p("button", {
|
513
513
|
key: 0,
|
514
514
|
onClick: O,
|
515
515
|
class: "w-min hover_bg-white hover-t-black t-black bg-main button",
|
516
|
-
innerHTML:
|
517
|
-
}, null, 8,
|
516
|
+
innerHTML: d.action
|
517
|
+
}, null, 8, mt)) : v("", !0)
|
518
518
|
]));
|
519
519
|
}
|
520
520
|
};
|
@@ -523,9 +523,9 @@ const _t = { class: "pd-thin" }, ht = { class: "o-hidden t-black bg-main pd-big
|
|
523
523
|
/* @__PURE__ */ o("p", { class: "t-transp p-big" }, "Subscribe to our newsletter for news, insights, and more from the Weeder universe.")
|
524
524
|
], -1), vt = { class: "z-index-1 mn-big w-100 flex-nowrap flex" }, bt = /* @__PURE__ */ o("div", { class: "w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid" }, [
|
525
525
|
/* @__PURE__ */ o("div", { class: "spiral" })
|
526
|
-
], -1),
|
526
|
+
], -1), Yt = {
|
527
527
|
__name: "SubscribeNewsletter",
|
528
|
-
setup(
|
528
|
+
setup(d) {
|
529
529
|
let n = g("");
|
530
530
|
return (s, e) => (i(), p("section", _t, [
|
531
531
|
o("div", ht, [
|
@@ -548,9 +548,9 @@ const _t = { class: "pd-thin" }, ht = { class: "o-hidden t-black bg-main pd-big
|
|
548
548
|
]));
|
549
549
|
}
|
550
550
|
};
|
551
|
-
const yt = { class: "container container-joinus" }, wt = { class: "content" }, xt = { class: "h0 mn-big" }, $t = /* @__PURE__ */ o("p", { class: "w-m-33r t-center mn-small p-big" }, "Together, we're shaping the future of the globals cannabis community.", -1), kt = /* @__PURE__ */ o("button", { class: "bg-black t-white button" }, "Join Now", -1),
|
551
|
+
const yt = { class: "container container-joinus" }, wt = { class: "content" }, xt = { class: "h0 mn-big" }, $t = /* @__PURE__ */ o("p", { class: "w-m-33r t-center mn-small p-big" }, "Together, we're shaping the future of the globals cannabis community.", -1), kt = /* @__PURE__ */ o("button", { class: "bg-black t-white button" }, "Join Now", -1), Zt = {
|
552
552
|
__name: "JoinUs",
|
553
|
-
setup(
|
553
|
+
setup(d) {
|
554
554
|
const n = g(120950), s = g([
|
555
555
|
"/assets/images/reviews/01.png",
|
556
556
|
"/assets/images/reviews/02.png",
|
@@ -570,9 +570,9 @@ const yt = { class: "container container-joinus" }, wt = { class: "content" }, x
|
|
570
570
|
spawnPoints: [10, 90]
|
571
571
|
};
|
572
572
|
F(() => {
|
573
|
-
|
573
|
+
m(), e();
|
574
574
|
});
|
575
|
-
const
|
575
|
+
const m = () => {
|
576
576
|
s.value.forEach((t, _) => {
|
577
577
|
let l = document.createElement("img");
|
578
578
|
l.src = t, l.classList.add("floating-image");
|
@@ -592,16 +592,16 @@ const yt = { class: "container container-joinus" }, wt = { class: "content" }, x
|
|
592
592
|
]));
|
593
593
|
}
|
594
594
|
};
|
595
|
-
const Pt = (
|
595
|
+
const Pt = (d) => (oe("data-v-18db0d1b"), d = d(), ne(), d), Ct = { class: "community-feed" }, Tt = /* @__PURE__ */ Pt(() => /* @__PURE__ */ o("h2", { class: "w-m-75r mn-auto pd-t-big pd-b-big t-center" }, "Discover the Vibrant Community", -1)), St = { class: "grid-container" }, Bt = {
|
596
596
|
__name: "HotPosts",
|
597
|
-
async setup(
|
597
|
+
async setup(d) {
|
598
598
|
let n, s;
|
599
599
|
const e = g([]), a = async () => {
|
600
600
|
const t = await L({ skip: 0, limit: 7, period: "year" });
|
601
601
|
console.log(t), e.value = t;
|
602
602
|
};
|
603
603
|
[n, s] = ae(() => a()), await n, s();
|
604
|
-
const
|
604
|
+
const m = (t) => {
|
605
605
|
switch (t) {
|
606
606
|
case 0:
|
607
607
|
return "grid-item-2x2";
|
@@ -625,12 +625,12 @@ const Pt = (m) => (oe("data-v-18db0d1b"), m = m(), ne(), m), Ct = { class: "comm
|
|
625
625
|
blogpost: l,
|
626
626
|
owner: w.user._id,
|
627
627
|
key: f,
|
628
|
-
class: B(
|
628
|
+
class: B(m(f))
|
629
629
|
}, null, 8, ["blogpost", "owner", "class"]))), 128))
|
630
630
|
])
|
631
631
|
]));
|
632
632
|
}
|
633
|
-
},
|
633
|
+
}, es = /* @__PURE__ */ X(Bt, [["__scopeId", "data-v-18db0d1b"]]), ts = [
|
634
634
|
{
|
635
635
|
path: "community",
|
636
636
|
component: Ie,
|
@@ -691,19 +691,19 @@ const Pt = (m) => (oe("data-v-18db0d1b"), m = m(), ne(), m), Ct = { class: "comm
|
|
691
691
|
}
|
692
692
|
];
|
693
693
|
export {
|
694
|
-
|
694
|
+
Xt as Activity,
|
695
695
|
Xe as Blog,
|
696
696
|
We as BlogPost,
|
697
697
|
K as CardBlogpost,
|
698
|
-
|
698
|
+
de as Comments,
|
699
699
|
Ie as Community,
|
700
700
|
Ee as CreateBlogPost,
|
701
701
|
ue as Feed,
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
702
|
+
os as FooterBlogpost,
|
703
|
+
es as HotPosts,
|
704
|
+
Zt as JoinUs,
|
705
|
+
Yt as SubscribeNewsletter,
|
706
|
+
ts as blogpostsRoutes,
|
707
|
+
ns as blogpostsStore,
|
708
708
|
rs as reactionsStore
|
709
709
|
};
|
@@ -2,7 +2,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
$props: {
|
3
3
|
readonly entity?: any;
|
4
4
|
readonly entityType?: any;
|
5
|
-
readonly
|
5
|
+
readonly user?: any;
|
6
6
|
};
|
7
7
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
8
8
|
export default _default;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
2
2
|
$props: {
|
3
3
|
readonly type?: any;
|
4
|
-
readonly owner?: any;
|
5
4
|
readonly date?: any;
|
6
5
|
readonly dateFormatted?: any;
|
6
|
+
readonly owner?: any;
|
7
7
|
readonly creator?: any;
|
8
8
|
readonly members?: any;
|
9
9
|
readonly membersPhotos?: any;
|