@ozdao/prometheus-framework 0.0.86 → 0.0.88

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs +1944 -0
  3. package/dist/CardOrganization-ee5c34ab.js +1 -0
  4. package/dist/CardOrganization-f70bd169.mjs +202 -0
  5. package/dist/Comments-63f154a6.js +9 -0
  6. package/dist/Comments-c5afa4d6.mjs +459 -0
  7. package/dist/Feed-51e4e232.js +1 -0
  8. package/dist/Feed-8fd41524.js +1 -0
  9. package/dist/Feed-dc8b66bf.mjs +367 -0
  10. package/dist/Feed-ecf37814.mjs +367 -0
  11. package/dist/IconEdit-736c89be.js +1 -0
  12. package/dist/IconEdit-e9fd4c6c.mjs +21 -0
  13. package/dist/Image-6c7584f5.mjs +477 -0
  14. package/dist/Image-9a870c88.js +9 -0
  15. package/dist/Popup-105ef2c3.js +1 -0
  16. package/dist/Popup-82fb2c8a.mjs +76 -0
  17. package/dist/Product-1724d88d.mjs +837 -0
  18. package/dist/Product-2f3d592f.mjs +837 -0
  19. package/dist/Product-2fbf9d99.js +7 -0
  20. package/dist/Product-a94d8b65.js +7 -0
  21. package/dist/ProductEdit-20709821.mjs +349 -0
  22. package/dist/ProductEdit-57484f1e.mjs +349 -0
  23. package/dist/ProductEdit-a81d13b9.js +1 -0
  24. package/dist/ProductEdit-ef301baa.js +1 -0
  25. package/dist/ProfileBlogposts-eca9916c.js +1 -0
  26. package/dist/ProfileBlogposts-fb014bc6.mjs +63 -0
  27. package/dist/ProfileComments-58094a50.mjs +43 -0
  28. package/dist/ProfileComments-b919f021.js +1 -0
  29. package/dist/ProfileEvents-05485e20.js +1 -0
  30. package/dist/ProfileEvents-1cfe6858.mjs +55 -0
  31. package/dist/ProfileEvents-5d206e3d.mjs +55 -0
  32. package/dist/ProfileEvents-d8e16509.js +1 -0
  33. package/dist/ProfileLikes-2f3a4488.js +1 -0
  34. package/dist/ProfileLikes-b5ac7f48.mjs +43 -0
  35. package/dist/ProfileOrganizations-0b76e38f.js +1 -0
  36. package/dist/ProfileOrganizations-32ab1e30.mjs +211 -0
  37. package/dist/Publics-3f277c17.js +1 -0
  38. package/dist/Publics-9ebffff1.mjs +122 -0
  39. package/dist/Tab-58cd105f.mjs +46 -0
  40. package/dist/Tab-6f0a4909.js +1 -0
  41. package/dist/UploadImage-441e8526.js +1 -0
  42. package/dist/UploadImage-ff8f9a0c.mjs +83 -0
  43. package/dist/auth.client.cjs +2 -2
  44. package/dist/auth.client.js +60 -40
  45. package/dist/community.client.cjs +1 -9
  46. package/dist/community.client.js +361 -750
  47. package/dist/community.server.js +16 -4
  48. package/dist/community.server.mjs +16 -4
  49. package/dist/events.client.cjs +1 -1
  50. package/dist/events.client.js +442 -321
  51. package/dist/events.server.js +96 -2
  52. package/dist/events.server.mjs +96 -2
  53. package/dist/inputs.validation-24ae76b9.js +1 -0
  54. package/dist/modules/constructor/components/elements/Bullets.vue.d.ts +15 -0
  55. package/dist/modules/constructor/components/elements/Caption.vue.d.ts +15 -0
  56. package/dist/modules/constructor/components/elements/H2.vue.d.ts +16 -0
  57. package/dist/modules/constructor/components/elements/Image.vue.d.ts +8 -0
  58. package/dist/modules/constructor/components/elements/ImageUpload.vue.d.ts +9 -0
  59. package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +12 -0
  60. package/dist/modules/constructor/components/sections/Constructor.vue.d.ts +7 -0
  61. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -0
  62. package/dist/organizations-1b4c84ee.mjs +121 -0
  63. package/dist/organizations-af43bda4.js +1 -0
  64. package/dist/organizations.client-253c8068.mjs +3179 -0
  65. package/dist/organizations.client-686845be.mjs +3179 -0
  66. package/dist/organizations.client-99bfc474.js +3 -0
  67. package/dist/organizations.client-c60d7659.js +3 -0
  68. package/dist/organizations.client.cjs +1 -3
  69. package/dist/organizations.client.js +49 -3025
  70. package/dist/style.css +1 -1
  71. package/dist/users.client.cjs +1 -1
  72. package/dist/users.client.js +10 -10
  73. package/package.json +1 -1
  74. package/src/modules/auth/router/auth.js +28 -7
  75. package/src/modules/community/community.client.js +1 -12
  76. package/src/modules/community/components/pages/BlogPost.vue +1 -1
  77. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -151
  78. package/src/modules/community/middlewares/server/verifyBlogpost.js +24 -11
  79. package/src/modules/{community → constructor}/components/elements/Textarea.vue +3 -11
  80. package/src/modules/constructor/components/sections/Constructor.vue +167 -0
  81. package/src/modules/events/components/blocks/CardEvent.vue +15 -7
  82. package/src/modules/events/components/pages/EditEvent.vue +233 -133
  83. package/src/modules/events/components/pages/Event.vue +43 -4
  84. package/src/modules/events/components/sections/Feed.vue +7 -1
  85. package/src/modules/events/controllers/events.controller.js +9 -0
  86. package/src/modules/events/controllers/tickets.controller.js +2 -1
  87. package/src/modules/events/middlewares/server/index.js +10 -0
  88. package/src/modules/events/middlewares/server/verifyEvent.js +60 -0
  89. package/src/modules/events/models/event.model.js +10 -0
  90. package/src/modules/events/routes/events.routes.js +14 -1
  91. package/src/modules/events/store/events.js +15 -19
  92. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -3
  93. package/src/modules/organizations/components/sections/Publics.vue +2 -3
  94. package/src/modules/organizations/organizations.client.js +0 -2
  95. package/src/modules/users/components/pages/ProfileEvents.vue +3 -3
  96. package/src/modules/organizations/components/blocks/CardOrganizationSocial.vue +0 -46
  97. /package/src/modules/{community → constructor}/components/elements/Bullets.vue +0 -0
  98. /package/src/modules/{community → constructor}/components/elements/Caption.vue +0 -0
  99. /package/src/modules/{community → constructor}/components/elements/H2.vue +0 -0
  100. /package/src/modules/{community → constructor}/components/elements/Image.vue +0 -0
  101. /package/src/modules/{community → constructor}/components/elements/ImageUpload.vue +0 -0
@@ -562,15 +562,27 @@ function requireVerifyBlogpost() {
562
562
  try {
563
563
  const url = req.body.url ? req.body.url : req.body.name.toLowerCase().replace(/ /g, "-").replace(/[^\w-]+/g, "");
564
564
  if (!req.body._id) {
565
- res.status(400).send({ errorCode: "MISSING_BLOGPOST_ID", accessToken: null });
565
+ const blogpost = await Blogpost.findOne({ url });
566
+ if (blogpost) {
567
+ res.status(400).send({ errorCode: "POST_URL_ALREADY_IN_USE", accessToken: null });
568
+ return;
569
+ }
570
+ next();
566
571
  return;
567
572
  }
568
- const blogpost = await Blogpost.findOne({ url });
569
573
  const updatingBlogpostId = req.body._id;
570
- if (blogpost && String(blogpost._id) !== String(updatingBlogpostId)) {
571
- res.status(400).send({ errorCode: "POST_URL_ALREADY_IN_USE", accessToken: null });
574
+ const existingBlogpost = await Blogpost.findById(updatingBlogpostId);
575
+ if (!existingBlogpost) {
576
+ res.status(404).send({ errorCode: "BLOGPOST_NOT_FOUND", accessToken: null });
572
577
  return;
573
578
  }
579
+ if (existingBlogpost.url !== url) {
580
+ const blogpost = await Blogpost.findOne({ url });
581
+ if (blogpost) {
582
+ res.status(400).send({ errorCode: "POST_URL_ALREADY_IN_USE", accessToken: null });
583
+ return;
584
+ }
585
+ }
574
586
  next();
575
587
  } catch (err) {
576
588
  console.log(err);
@@ -561,15 +561,27 @@ function requireVerifyBlogpost() {
561
561
  try {
562
562
  const url = req.body.url ? req.body.url : req.body.name.toLowerCase().replace(/ /g, "-").replace(/[^\w-]+/g, "");
563
563
  if (!req.body._id) {
564
- res.status(400).send({ errorCode: "MISSING_BLOGPOST_ID", accessToken: null });
564
+ const blogpost = await Blogpost.findOne({ url });
565
+ if (blogpost) {
566
+ res.status(400).send({ errorCode: "POST_URL_ALREADY_IN_USE", accessToken: null });
567
+ return;
568
+ }
569
+ next();
565
570
  return;
566
571
  }
567
- const blogpost = await Blogpost.findOne({ url });
568
572
  const updatingBlogpostId = req.body._id;
569
- if (blogpost && String(blogpost._id) !== String(updatingBlogpostId)) {
570
- res.status(400).send({ errorCode: "POST_URL_ALREADY_IN_USE", accessToken: null });
573
+ const existingBlogpost = await Blogpost.findById(updatingBlogpostId);
574
+ if (!existingBlogpost) {
575
+ res.status(404).send({ errorCode: "BLOGPOST_NOT_FOUND", accessToken: null });
571
576
  return;
572
577
  }
578
+ if (existingBlogpost.url !== url) {
579
+ const blogpost = await Blogpost.findOne({ url });
580
+ if (blogpost) {
581
+ res.status(400).send({ errorCode: "POST_URL_ALREADY_IN_USE", accessToken: null });
582
+ return;
583
+ }
584
+ }
573
585
  next();
574
586
  } catch (err) {
575
587
  console.log(err);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./Feed-f4cad6c3.js"),e=require("vue"),C=require("./EmptyState-7658d7d6.js"),g=require("./auth-5aa8e90c.js"),v=require("vue-router"),T=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-c6f3a0f0.js"),d=require("./categories-75b7d14b.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("vue-i18n");const b=require("./EditProductImages-11510b66.js"),E=require("./globals-928eb13c.js"),P=require("./Comments-1aec0e5e.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");require("./vuex.esm-bundler-e8cf3cd2.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");const I={},q={width:"100%",height:"50",xmlns:"http://www.w3.org/2000/svg"},z=e.createStaticVNode('<rect x="0" y="0" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="3" ry="3" width="40" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="65" y="15" rx="3" ry="3" width="150" height="20" fill="rgba(var(--black),0.05)"></rect><circle cx="250" cy="25" r="10" fill="rgba(var(--black),0.1)"></circle><circle cx="265" cy="25" r="10" fill="rgba(var(--black),0.05)"></circle><circle cx="280" cy="25" r="10" fill="rgba(var(--black),0.025)"></circle><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',7),L=[z];function j(c,t){return e.openBlock(),e.createElementBlock("svg",q,L)}const O=g._export_sfc(I,[["render",j]]);const F={class:"today-events"},R={__name:"List",props:{category:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(c){const t=c,a=e.ref([]),r=e.ref(!0),n=e.ref(0),u=e.ref(5);return e.onMounted(async()=>{const o=await m.read({skip:n.value,limit:u.value,sortOrder:"desc",category:t.category,user:t.user,owner:t.owner,organization:t.organization,period:t.period,status:t.status});a.value=o,r.value=!1}),(o,l)=>(e.openBlock(),e.createElementBlock("section",F,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[r.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,i=>(e.openBlock(),e.createBlock(O,{key:i}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!r.value&&a.value.length<1?(e.openBlock(),e.createBlock(C._sfc_main,{key:0,title:"No Events Today",description:"Today, are no events 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(()=>[!r.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(i,f)=>(e.openBlock(),e.createBlock(m._sfc_main$1,{onClick:_=>o.$router.push({name:"Event",params:{url:i.url}}),key:i._id,event:i,owner:c.user,type:"short",class:e.normalizeClass(["pd-medium",{"br-b br-solid br-black-transp-10":f!==a.value.length-1}])},null,8,["onClick","event","owner","class"]))),128)):e.createCommentVNode("",!0)]),_:1})]))}},A=["onClick"],M={class:"t-transp"},U={__name:"DatePicker",props:["date","locale"],setup(c,{emit:t}){const a=c,r=e.ref(null);let n;if(a.date){const s=parseInt(a.date.substring(0,2)),h=parseInt(a.date.substring(2,4))-1,p=parseInt(a.date.substring(4));n=new Date(p,h,s),console.log("Data"+n)}else n=new Date,console.log("No data"+n);n.setHours(0,0,0,0);const u=e.ref(new Date(n)),o=_(n,30);e.onMounted(()=>{if(r.value){const s=r.value.getElementsByClassName("selected")[0]||r.value.getElementsByClassName("bg-main")[0];s&&(r.value.scrollLeft=s.offsetLeft-r.value.offsetWidth/2+s.offsetWidth/2)}});function l(s){u.value=s;const h=i(s);t("update:date",h)}function i(s){return`${s.getDate().toString().padStart(2,"0")}${(s.getMonth()+1).toString().padStart(2,"0")}${s.getFullYear()}`}function f(s){return s.toLocaleDateString(a.locale?a.locale:"en",{weekday:"narrow"}).toUpperCase()}function _(s,h){const p=[];for(let k=-15;k<h-15;k++){const B=new Date(s);B.setDate(s.getDate()+k),B.setHours(0,0,0,0),p.push(B)}return p}return(s,h)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:"w-100 o-scroll flex-nowrap flex",ref_key:"scrollContainer",ref:r,style:{"scroll-snap-type":"x mandatory"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),p=>(e.openBlock(),e.createElementBlock("div",{key:p.toString(),onClick:k=>l(p),class:e.normalizeClass([{selected:u.value.toDateString()===p.toDateString()},"cursor-pointer mn-r-small mn-l-small flex-column flex-center flex"])},[e.createElementVNode("span",M,e.toDisplayString(f(p)),1),e.createElementVNode("span",{class:e.normalizeClass([{"bg-main":u.value.toDateString()===p.toDateString()},"transition-ease-in-out t-semi flex-center flex radius-big i-semi day-number"])},e.toDisplayString(p.getDate()),3)],10,A))),128))],512)]))}},J={class:"pd-thin min-h-100vh"},G=e.createElementVNode("div",{class:"mn-thin br-solid br-1px br-grey bg-grey radius-big"},null,-1),H={class:""},V={__name:"layoutEvents",setup(c){const t=v.useRoute(),a=v.useRouter(),n=u(new Date);function u(o){return`${o.getDate().toString().padStart(2,"0")}${(o.getMonth()+1).toString().padStart(2,"0")}${o.getFullYear()}`}if(t.query){const o=t.query,l={tags:o.tags?o.tags.split(","):null,date:o.date?o.date:n};m.state.filter=l}else{const o={date:n};m.state.filter=o}return e.watch(()=>m.state.filter,(o,l)=>{const i={...t.query};Object.keys(l).forEach(_=>{i[_]&&delete i[_]});const f=Object.fromEntries(Object.entries(o).filter(([_,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([_,s])=>[_,Array.isArray(s)?s.join(","):s]));Object.assign(i,f),a.push({query:i})},{deep:!0}),(o,l)=>{const i=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",J,[e.createVNode(U,{date:m.state.filter.date,"onUpdate:date":l[0]||(l[0]=f=>m.state.filter.date=f),locale:o.$i18n.locale,class:"radius-small bg-grey pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),G,e.createElementVNode("section",H,[e.createVNode(i,null,{default:e.withCtx(({Component:f,route:_})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f),{ref:"page",key:_.query}))]),_:2},1024)]),_:1})])])}}};const W={class:"for-transition w-100"},Y={class:"pd-b-zero pd-t-zero pd-thin"},Q={class:"pd-thin"},K={class:"flex-nowrap flex bg-grey pd-medium radius-big"},X={key:0,class:"mn-r-auto"},Z={key:1,class:"mn-r-auto"},ee={class:"flex-nowrap flex pd-thin"},te={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},re={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},ae=e.createElementVNode("h3",{class:"mn-semi"},"Profile",-1),ne={class:"mn-semi"},oe=e.createElementVNode("h5",null,"Categories",-1),se={class:""},ce={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},le=e.createElementVNode("h3",{class:"mn-semi"},"Images",-1),S={__name:"EditEvent",async setup(c){let t,a;const r=v.useRoute(),n=v.useRouter();[t,a]=e.withAsyncContext(()=>d.actions.fetchCategories()),await t,a(),r.params.product&&([t,a]=e.withAsyncContext(()=>d.actions$1.read({_id:r.params.product})),await t,a());function u(){d.state.current.information.push({name:"",value:""})}function o(s){d.state.current.information.splice(s,1)}function l(){d.state.current.localization.push({locale:"",text:""})}function i(s){d.state.current.localization.splice(s,1)}function f(){r.params.product?d.actions$1.update(r.params.product,d.state.current):d.actions$1.create(r.params._id,d.state.current)}function _(){n.push({name:"ProductEdit",params:{_id:r.params._id,product:d.state.current._id}})}return(s,h)=>(e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("div",Y,[e.createVNode(d._sfc_main,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",Q,[e.createElementVNode("header",K,[e.unref(r).params.product?(e.openBlock(),e.createElementBlock("h1",X,"Edit Product")):(e.openBlock(),e.createElementBlock("h1",Z,"Create Product")),e.createElementVNode("section",ee,[e.createVNode(g._sfc_main,{submit:f,callback:_},{default:e.withCtx(()=>[e.createTextVNode("Save Product")]),_:1})])])]),e.createElementVNode("div",te,[e.createElementVNode("div",re,[ae,e.createVNode(b._sfc_main,{product:d.state.current},null,8,["product"]),e.createElementVNode("div",ne,[oe,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state$1.all,(p,k)=>(e.openBlock(),e.createBlock(T.Checkbox,{label:p.name,name:"categories",value:p.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:d.state.current.category},null,8,["label","value","radio"]))),256))]),e.createVNode(b._sfc_main$1,{items:d.state.current.information,title:"Parameters",emptyMessage:"No parameters",addButtonLabel:"Add parameter",keyName:"name",valueName:"value",onAddInfo:u,onDeleteInfo:o},null,8,["items"]),e.createVNode(b._sfc_main$1,{items:d.state.current.localization,title:"Localization",emptyMessage:"No localizations",addButtonLabel:"Add localization",keyName:"locale",valueName:"text",onAddInfo:l,onDeleteInfo:i},null,8,["items"])]),e.createElementVNode("div",se,[e.createElementVNode("div",ce,[le,e.createVNode(b._sfc_main$2,{product:d.state.current},null,8,["product"])])])])]))}},x=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),w=g.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),y=e.reactive({tickets:[],error:null}),N={async read({user:c,type:t,target:a,role:r}){try{const n=await w.get("/api/tickets",{params:{user:c,type:t,target:a,role:r}});return y.error=null,y.tickets=n.data,Promise.resolve(n.data)}catch(n){return E.setError(n),Promise.reject(n)}},async create(c){try{const t=await w.post("/api/tickets/create",c);return y.error=null,Promise.resolve(t.data)}catch(t){return E.setError(t),Promise.reject(t)}},async update(c){try{const t=await w.post("/api/tickets/update",c);return y.error=null,Promise.resolve(t.data)}catch(t){return E.setError(t),Promise.reject(t)}},async delete(c){try{const t=await w.post("/api/tickets/delete",c);return y.error=null,Promise.resolve(t.data)}catch(t){return E.setError(t),Promise.reject(t)}}},ie={handleTicketUpdate(c,t,a){let r;if(Array.isArray(c)?r=c.find(n=>n._id===t.target):typeof c=="object"&&c._id===t.target&&(r=c),r)if(r.hasTicket=a,a)r.tickets.push(t),r.numberOfTickets+=1;else{const n=r.tickets.findIndex(u=>u._id===t._id);n!==-1&&(r.tickets.splice(n,1),r.numberOfTickets-=1)}}};e.watch(y,c=>{});const ue={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(c,{emit:t}){const a=c,r=async()=>{a.hasTicket?await u(a.targetId):await n(a.targetId)};async function n(o){try{const l={type:a.type,target:o,user:a.userId},i=await N.create(l);t("updateTicket",{ticket:i,hasTicket:!0,targetId:a.targetId})}catch(l){throw console.log(l),l}}async function u(o){const l={type:a.type,target:o,user:a.userId};try{const i=await N.delete(l);t("updateTicket",{ticket:i,hasTicket:!1,targetId:a.targetId})}catch(i){throw console.log(i),i}}return(o,l)=>(e.openBlock(),e.createBlock(g._sfc_main,{submit:r,class:"bg-main button-small button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.hasTicket?"Leave":"Join"),1)]),_:1}))}},de=g._export_sfc(ue,[["__scopeId","data-v-d5c351bb"]]),me={class:"pd-thin"},$={__name:"Event",setup(c){const t=v.useRoute(),a=({ticket:u,hasTicket:o,targetId:l})=>{ie.handleTicketUpdate(r.value,u,o,l)},r=e.ref(null),n=e.ref(!0);return e.onMounted(async()=>{n.value=!0;const u=await m.read({user:g.state.user._id,url:t.params.url});r.value=u[0],n.value=!1}),(u,o)=>(e.openBlock(),e.createElementBlock("section",me,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,l=>e.createVNode(m.SkeletonEvent,{key:l})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!n.value&&!r.value?(e.openBlock(),e.createBlock(C._sfc_main,{key:0,title:"No Event Found",description:"Currently, there are no events 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(()=>[!n.value&&r.value?(e.openBlock(),e.createBlock(m._sfc_main$1,{key:0,onClick:o[0]||(o[0]=l=>u.$router.push({name:"Event",params:{url:r.value.url}})),event:r.value,owner:r.value.owner,user:g.state.user._id,type:"normal",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":u.index!==r.value.length-1}])},{default:e.withCtx(()=>[g.state.user._id?(e.openBlock(),e.createBlock(de,{key:0,type:"event",hasTicket:r.value.hasTicket,targetId:r.value._id,userId:g.state.user._id,class:"mn-small w-100 pd-medium mn-auto",onUpdateTicket:a},null,8,["hasTicket","targetId","userId"])):e.createCommentVNode("",!0)]),_:1},8,["event","owner","user","class"])):e.createCommentVNode("",!0),!n.value&&r.value?(e.openBlock(),e.createBlock(P._sfc_main,{key:1,type:"event",target:r.value._id,owner:g.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},pe=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),D={__name:"Events",setup(c){const t=v.useRoute();return v.useRouter(),(a,r)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(m._sfc_main,{category:e.unref(t).params.category,user:g.state.user._id,period:e.unref(t).query.period,selectedDate:m.state.filter.date},null,8,["category","user","period","selectedDate"])]))}},_e=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"})),fe=[{path:"events",component:V,meta:{title:{en:"Events",ru:"События"}},children:[{path:":category?",name:"Events",component:()=>Promise.resolve().then(()=>_e)}]},{path:"events/create",name:"Create Event",meta:{title:{en:"Create Event",ru:"Создать Событие"},authorize:[]},component:()=>Promise.resolve().then(()=>x)},{path:"events/:url",name:"Event",meta:{title:{en:"Event",ru:"Событие"}},component:()=>Promise.resolve().then(()=>pe)},{path:"events/:url/edit",name:"Edit Event",meta:{authorize:[]},component:()=>Promise.resolve().then(()=>x)}];exports.CardEvent=m._sfc_main$1;exports.Feed=m._sfc_main;exports.eventsStore=m.events;exports.EditEvent=S;exports.EventPage=$;exports.EventsLayout=V;exports.EventsPage=D;exports.List=R;exports.eventsRoutes=fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./Feed-51e4e232.js"),e=require("vue"),V=require("./EmptyState-7658d7d6.js"),v=require("./auth-5aa8e90c.js"),y=require("vue-router"),E=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js"),B=require("./Image-9a870c88.js"),P=require("./Popup-105ef2c3.js"),$=require("./UploadImage-441e8526.js"),q=require("./organizations-af43bda4.js"),b=require("./globals-928eb13c.js");require("vue-i18n");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");const I={},L={width:"100%",height:"50",xmlns:"http://www.w3.org/2000/svg"},O=e.createStaticVNode('<rect x="0" y="0" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="3" ry="3" width="40" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="65" y="15" rx="3" ry="3" width="150" height="20" fill="rgba(var(--black),0.05)"></rect><circle cx="250" cy="25" r="10" fill="rgba(var(--black),0.1)"></circle><circle cx="265" cy="25" r="10" fill="rgba(var(--black),0.05)"></circle><circle cx="280" cy="25" r="10" fill="rgba(var(--black),0.025)"></circle><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',7),U=[O];function F(p,r){return e.openBlock(),e.createElementBlock("svg",L,U)}const j=v._export_sfc(I,[["render",F]]);const z={class:"today-events"},M={__name:"List",props:{category:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(p){const r=p,n=e.ref([]),t=e.ref(!0),i=e.ref(0),c=e.ref(5);return e.onMounted(async()=>{const a=await g.read({skip:i.value,limit:c.value,sortOrder:"desc",category:r.category,user:r.user,owner:r.owner,organization:r.organization,period:r.period,status:r.status});n.value=a,t.value=!1}),(a,o)=>(e.openBlock(),e.createElementBlock("section",z,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,d=>(e.openBlock(),e.createBlock(j,{key:d}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&n.value.length<1?(e.openBlock(),e.createBlock(V._sfc_main,{key:0,title:"No Events Today",description:"Today, are no events 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.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,(d,f)=>(e.openBlock(),e.createBlock(g._sfc_main$1,{onClick:_=>a.$router.push({name:"Event",params:{url:d.url}}),key:d._id,event:d,owner:p.user,type:"short",class:e.normalizeClass(["pd-medium",{"br-b br-solid br-black-transp-10":f!==n.value.length-1}])},null,8,["onClick","event","owner","class"]))),128)):e.createCommentVNode("",!0)]),_:1})]))}},R=["onClick"],A={class:"t-transp"},H={__name:"DatePicker",props:["date","locale"],setup(p,{emit:r}){const n=p,t=e.ref(null);let i;if(n.date){const u=parseInt(n.date.substring(0,2)),h=parseInt(n.date.substring(2,4))-1,s=parseInt(n.date.substring(4));i=new Date(s,h,u),console.log("Data"+i)}else i=new Date,console.log("No data"+i);i.setHours(0,0,0,0);const c=e.ref(new Date(i)),a=_(i,30);e.onMounted(()=>{if(t.value){const u=t.value.getElementsByClassName("selected")[0]||t.value.getElementsByClassName("bg-main")[0];u&&(t.value.scrollLeft=u.offsetLeft-t.value.offsetWidth/2+u.offsetWidth/2)}});function o(u){c.value=u;const h=d(u);r("update:date",h)}function d(u){return`${u.getDate().toString().padStart(2,"0")}${(u.getMonth()+1).toString().padStart(2,"0")}${u.getFullYear()}`}function f(u){return u.toLocaleDateString(n.locale?n.locale:"en",{weekday:"narrow"}).toUpperCase()}function _(u,h){const s=[];for(let l=-15;l<h-15;l++){const m=new Date(u);m.setDate(u.getDate()+l),m.setHours(0,0,0,0),s.push(m)}return s}return(u,h)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:"w-100 o-scroll flex-nowrap flex",ref_key:"scrollContainer",ref:t,style:{"scroll-snap-type":"x mandatory"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),s=>(e.openBlock(),e.createElementBlock("div",{key:s.toString(),onClick:l=>o(s),class:e.normalizeClass([{selected:c.value.toDateString()===s.toDateString()},"cursor-pointer mn-r-small mn-l-small flex-column flex-center flex"])},[e.createElementVNode("span",A,e.toDisplayString(f(s)),1),e.createElementVNode("span",{class:e.normalizeClass([{"bg-main":c.value.toDateString()===s.toDateString()},"transition-ease-in-out t-semi flex-center flex radius-big i-semi day-number"])},e.toDisplayString(s.getDate()),3)],10,R))),128))],512)]))}},J={class:"pd-thin min-h-100vh"},G=e.createElementVNode("div",{class:"mn-thin br-solid br-1px br-grey bg-grey radius-big"},null,-1),W={class:""},C={__name:"layoutEvents",setup(p){const r=y.useRoute(),n=y.useRouter(),i=c(new Date);function c(a){return`${a.getDate().toString().padStart(2,"0")}${(a.getMonth()+1).toString().padStart(2,"0")}${a.getFullYear()}`}if(r.query){const a=r.query,o={tags:a.tags?a.tags.split(","):null,date:a.date?a.date:i};g.state.filter=o}else{const a={date:i};g.state.filter=a}return e.watch(()=>g.state.filter,(a,o)=>{const d={...r.query};Object.keys(o).forEach(_=>{d[_]&&delete d[_]});const f=Object.fromEntries(Object.entries(a).filter(([_,u])=>Array.isArray(u)&&u.length>0||typeof u=="string"&&u).map(([_,u])=>[_,Array.isArray(u)?u.join(","):u]));Object.assign(d,f),n.push({query:d})},{deep:!0}),(a,o)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",J,[e.createVNode(H,{date:g.state.filter.date,"onUpdate:date":o[0]||(o[0]=f=>g.state.filter.date=f),locale:a.$i18n.locale,class:"radius-small bg-grey pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),G,e.createElementVNode("section",W,[e.createVNode(d,null,{default:e.withCtx(({Component:f,route:_})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f),{ref:"page",key:_.query}))]),_:2},1024)]),_:1})])])}}},Y={key:0,class:"pd-thin"},Q={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},K=e.createElementVNode("h4",null,"Upload Event Cover",-1),X=e.createElementVNode("h3",{class:"mn-small"},"Date",-1),Z=e.createElementVNode("h3",{class:"mn-small"},"Description",-1),ee={key:0,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},te={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},re={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},ae={class:"w-m-66r t-left pd-big bg-white radius-big"},ne=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),oe=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),se={key:0,class:"mn-thin"},le={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},D={__name:"EditEvent",setup(p){const r=y.useRoute(),n=y.useRouter();let t=e.ref(null),i=e.ref(null);const c=e.ref([]),a=e.ref(null);e.onMounted(async()=>{if(r.params.url){const l=await g.read({user:v.state.user._id,url:r.params.url});t.value=l.pop(),t.value.date.start=t.value.date.start.slice(0,16),t.value.date.end=t.value.date.end.slice(0,16)}else g.clean(),t.value=g.state.current;t.value.owner||(t.value.owner={target:v.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:v.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(a.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await q.actions.read({user:v.state.user._id,postable:v.state.user._id});i.value=s.map(l=>({name:l.profile.name,_id:l._id,photo:l.profile.photo}))});const o=e.ref(!1);function d(){o.value=!0}function f(){o.value=!1}function _(){c.value.length>0&&c.value.map(s=>s.text),t.value.status="draft",r.params.url?g.update(t.value).then(s=>{n.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):g.create(t.value).then(s=>{n.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function u(){confirm("Are you sure you want to delete this event?")&&(void 0)(t.value._id).then(s=>{n.push({name:"Drafts"})}).catch(s=>{console.error(s)})}function h(){a.value&&(t.value.owner={target:a.value._id,type:"organization"}),a.value||(t.value.creator.hidden=!1),a.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?g.update(t.value).then(s=>{n.push({name:"Blogevent",params:{url:s.url}})}).catch(s=>{console.log(s)}):g.create(t.value).then(s=>{n.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}return(s,l)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",Y,[e.createElementVNode("div",Q,[e.createVNode($._sfc_main,{photo:e.unref(t).cover,"onUpdate:photo":l[0]||(l[0]=m=>e.unref(t).cover=m),uploadPath:"users/"+v.state.user._id+"/events",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),K]),e.createVNode(v.Field,{field:e.unref(t).name,"onUpdate:field":l[1]||(l[1]=m=>e.unref(t).name=m),placeholder:"Event name",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(v.Field,{field:e.unref(t).description,"onUpdate:field":l[2]||(l[2]=m=>e.unref(t).description=m),type:"textfield",placeholder:"Enter short description",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),X,e.createTextVNode(" "+e.toDisplayString(e.unref(t).date.start)+" ",1),e.createVNode(v.Field,{field:e.unref(t).date.start,"onUpdate:field":l[3]||(l[3]=m=>e.unref(t).date.start=m),label:"Start",type:"datetime-local",placeholder:"Not specified",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(v.Field,{field:e.unref(t).date.end,"onUpdate:field":l[4]||(l[4]=m=>e.unref(t).date.end=m),label:"End",type:"datetime-local",placeholder:"Not specified",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),Z,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ee,[e.createVNode(B._sfc_main,{content:e.unref(t).content,onUpdate:l[5]||(l[5]=m=>e.unref(t).content=m)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",te,[e.createElementVNode("div",re,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:l[6]||(l[6]=m=>u()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:l[7]||(l[7]=m=>_()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:l[8]||(l[8]=m=>d()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(P._sfc_main,{title:"Добавить участника",onClosePopup:f,isPopupOpen:o.value},{default:e.withCtx(()=>[e.createElementVNode("div",ae,[ne,e.createVNode(E._sfc_main,{onTagsChanged:l[9]||(l[9]=m=>e.unref(t).tags=m),tags:e.unref(t).tags},null,8,["tags"]),oe,e.createVNode(E.SelectMulti,{modelValue:a.value,"onUpdate:modelValue":l[10]||(l[10]=m=>a.value=m),options:e.unref(i),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"]),a.value?(e.openBlock(),e.createElementBlock("h5",se,"Options:")):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(E.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":l[11]||(l[11]=m=>e.unref(t).creator.hidden=m),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(v._sfc_main,{submit:h,callback:s.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}},N=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"})),w=v.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),k=e.reactive({tickets:[],error:null}),x={async read({user:p,type:r,target:n,role:t}){try{const i=await w.get("/api/tickets",{params:{user:p,type:r,target:n,role:t}});return k.error=null,k.tickets=i.data,Promise.resolve(i.data)}catch(i){return b.setError(i),Promise.reject(i)}},async create(p){try{const r=await w.post("/api/tickets/create",p);return k.error=null,Promise.resolve(r.data)}catch(r){return b.setError(r),Promise.reject(r)}},async update(p){try{const r=await w.post("/api/tickets/update",p);return k.error=null,Promise.resolve(r.data)}catch(r){return b.setError(r),Promise.reject(r)}},async delete(p){try{const r=await w.post("/api/tickets/delete",p);return k.error=null,Promise.resolve(r.data)}catch(r){return b.setError(r),Promise.reject(r)}}},ie={handleTicketUpdate(p,r,n){let t;if(Array.isArray(p)?t=p.find(i=>i._id===r.target):typeof p=="object"&&p._id===r.target&&(t=p),t)if(t.hasTicket=n,n)t.tickets.push(r),t.numberOfTickets+=1;else{const i=t.tickets.findIndex(c=>c._id===r._id);i!==-1&&(t.tickets.splice(i,1),t.numberOfTickets-=1)}}};e.watch(k,p=>{});const ce={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(p,{emit:r}){const n=p,t=async()=>{n.hasTicket?await c(n.targetId):await i(n.targetId)};async function i(a){try{const o={type:n.type,target:a,user:n.userId},d=await x.create(o);r("updateTicket",{ticket:d,hasTicket:!0,targetId:n.targetId})}catch(o){throw console.log(o),o}}async function c(a){const o={type:n.type,target:a,user:n.userId};try{const d=await x.delete(o);r("updateTicket",{ticket:d,hasTicket:!1,targetId:n.targetId})}catch(d){throw console.log(d),d}}return(a,o)=>(e.openBlock(),e.createBlock(v._sfc_main,{submit:t,class:"bg-main button-small button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.hasTicket?"Leave":"Join"),1)]),_:1}))}},ue=v._export_sfc(ce,[["__scopeId","data-v-d5c351bb"]]),de={class:"pd-thin"},S={__name:"Event",setup(p){const r=y.useRoute(),n=({ticket:o,hasTicket:d,targetId:f})=>{ie.handleTicketUpdate(c.value,o,d,f)},t={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:B._sfc_main$2};function i(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}:{}}const c=e.ref(null),a=e.ref(!0);return e.onMounted(async()=>{a.value=!0;const o=await g.read({user:v.state.user._id,url:r.params.url});c.value=o[0],a.value=!1}),(o,d)=>(e.openBlock(),e.createElementBlock("section",de,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,f=>e.createVNode(g.SkeletonEvent,{key:f})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!a.value&&!c.value?(e.openBlock(),e.createBlock(V._sfc_main,{key:0,title:"No Event Found",description:"Currently, there are no events 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(()=>[!a.value&&c.value?(e.openBlock(),e.createBlock(g._sfc_main$1,{key:0,onClick:d[0]||(d[0]=f=>o.$router.push({name:"Event",params:{url:c.value.url}})),event:c.value,owner:c.value.owner,user:v.state.user._id,type:"normal",class:"mn-medium bg-grey radius-big"},{default:e.withCtx(()=>[v.state.user._id?(e.openBlock(),e.createBlock(ue,{key:0,type:"event",hasTicket:c.value.hasTicket,targetId:c.value._id,userId:v.state.user._id,class:"mn-small w-100 pd-medium mn-auto",onUpdateTicket:n},null,8,["hasTicket","targetId","userId"])):e.createCommentVNode("",!0),e.createElementVNode("section",null,[c.value&&c.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value.content,(f,_)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[f.type]),e.mergeProps({key:_,index:_,component:f,prop:f,class:f.class,content:"content"},i(f),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["event","owner","user"])):e.createCommentVNode("",!0),!a.value&&c.value?(e.openBlock(),e.createBlock(B._sfc_main$1,{key:1,type:"event",target:c.value._id,owner:v.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},pe=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),T={__name:"Events",setup(p){const r=y.useRoute();return y.useRouter(),(n,t)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(g._sfc_main,{category:e.unref(r).params.category,user:v.state.user._id,period:e.unref(r).query.period,selectedDate:g.state.filter.date},null,8,["category","user","period","selectedDate"])]))}},me=Object.freeze(Object.defineProperty({__proto__:null,default:T},Symbol.toStringTag,{value:"Module"})),fe=[{path:"events",component:C,meta:{title:{en:"Events",ru:"События"}},children:[{path:":category?",name:"Events",component:()=>Promise.resolve().then(()=>me)}]},{path:"events/create",name:"Create Event",meta:{title:{en:"Create Event",ru:"Создать Событие"},authorize:[]},component:()=>Promise.resolve().then(()=>N)},{path:"events/:url",name:"Event",meta:{title:{en:"Event",ru:"Событие"}},component:()=>Promise.resolve().then(()=>pe)},{path:"events/:url/edit",name:"Edit Event",meta:{authorize:[]},component:()=>Promise.resolve().then(()=>N)}];exports.CardEvent=g._sfc_main$1;exports.Feed=g._sfc_main;exports.eventsStore=g.events;exports.EditEvent=D;exports.EventPage=S;exports.EventsLayout=C;exports.EventsPage=T;exports.List=M;exports.eventsRoutes=fe;