@ozdao/prometheus-framework 0.2.195 → 0.2.196

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -1
  3. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +12 -12
  4. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  5. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +7 -3
  6. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  7. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  8. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  9. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  10. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  12. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  14. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  16. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  18. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  20. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  22. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +94 -116
  24. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +68 -104
  26. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  28. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  30. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  32. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  34. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  38. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  40. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  44. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  60. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  64. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  66. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  70. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  74. package/dist/prometheus-framework.cjs.js +92 -1
  75. package/dist/prometheus-framework.es.js +12891 -36
  76. package/dist/style.css +1 -1
  77. package/package.json +1 -1
  78. package/src/components/index.js +0 -1
  79. package/src/main.js +0 -3
  80. package/src/modules/backoffice/components/layouts/Backoffice.vue +3 -2
  81. package/src/modules/backoffice/router/backoffice.js +10 -2
  82. package/src/modules/globals/views/components/layouts/App.vue +36 -31
  83. package/src/modules/globals/views/components/layouts/Client.vue +33 -52
  84. package/src/{components/Sidebar → modules/globals/views/components/partials}/Sidebar.vue +2 -4
  85. package/src/styles/layout.scss +1 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router");require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const a={id:"account",class:"gap-thin pd-thin cols-2-1_3"},s={key:0,class:"w-100"},u={class:"w-100"},i={__name:"Backoffice",props:{favorites:Array},setup(l){const t=o.useRoute();return o.useRouter(),e.ref(null),e.ref([]),e.onMounted(async()=>{}),(d,_)=>{const n=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",a,[e.unref(t).meta.sidebar?(e.openBlock(),e.createElementBlock("div",s,[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t).meta.sidebar)))]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",u,[e.createVNode(n,null,{default:e.withCtx(({Component:r,route:c})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:c.path}))]),_:2},1024)]),_:1})])])}}};exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router");require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const a={id:"account",class:"gap-thin pd-thin cols-2-1_3"},s={key:0,class:"w-100"},u={class:"w-100"},i={__name:"Backoffice",props:{newsletterPopup:Number},setup(l){const t=o.useRoute();return o.useRouter(),e.ref(null),e.ref([]),e.onMounted(async()=>{}),(d,_)=>{const n=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",a,[e.unref(t).meta.sidebar?(e.openBlock(),e.createElementBlock("div",s,[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t).meta.sidebar)))]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",u,[e.createVNode(n,null,{default:e.withCtx(({Component:r,route:c})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:c.path}))]),_:2},1024)]),_:1})])])}}};exports.default=i;
@@ -1,5 +1,5 @@
1
- import { ref as r, onMounted as d, resolveComponent as p, openBlock as e, createElementBlock as a, unref as s, createVNode as t, Transition as c, withCtx as o, createBlock as i, resolveDynamicComponent as m, createCommentVNode as f, createElementVNode as h } from "vue";
2
- import { useRoute as v, useRouter as k } from "vue-router";
1
+ import { ref as r, onMounted as p, resolveComponent as d, openBlock as e, createElementBlock as s, unref as a, createVNode as t, Transition as c, withCtx as o, createBlock as i, resolveDynamicComponent as u, createCommentVNode as f, createElementVNode as h } from "vue";
2
+ import { useRoute as k, useRouter as v } from "vue-router";
3
3
  import "../../../auth/views/store/auth.js";
4
4
  import "../../../organizations/store/organizations.js";
5
5
  const w = {
@@ -11,34 +11,34 @@ const w = {
11
11
  }, B = { class: "w-100" }, I = {
12
12
  __name: "Backoffice",
13
13
  props: {
14
- favorites: Array
14
+ newsletterPopup: Number
15
15
  },
16
16
  setup(C) {
17
- const n = v();
18
- return k(), r(null), r([]), d(async () => {
19
- }), (x, N) => {
20
- const u = p("router-view");
21
- return e(), a("section", w, [
22
- s(n).meta.sidebar ? (e(), a("div", y, [
17
+ const n = k();
18
+ return v(), r(null), r([]), p(async () => {
19
+ }), (N, b) => {
20
+ const m = d("router-view");
21
+ return e(), s("section", w, [
22
+ a(n).meta.sidebar ? (e(), s("div", y, [
23
23
  t(c, {
24
24
  name: "scaleIn",
25
25
  mode: "out-in"
26
26
  }, {
27
27
  default: o(() => [
28
- (e(), i(m(s(n).meta.sidebar)))
28
+ (e(), i(u(a(n).meta.sidebar)))
29
29
  ]),
30
30
  _: 1
31
31
  })
32
32
  ])) : f("", !0),
33
33
  h("div", B, [
34
- t(u, null, {
34
+ t(m, null, {
35
35
  default: o(({ Component: l, route: _ }) => [
36
36
  t(c, {
37
37
  name: "scaleIn",
38
38
  mode: "out-in"
39
39
  }, {
40
40
  default: o(() => [
41
- (e(), i(m(l), {
41
+ (e(), i(u(l), {
42
42
  ref: "page",
43
43
  key: _.path
44
44
  }))
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/Backoffice.vue.cjs"),t=require("../components/partials/Sidebar.vue.cjs");require("vue");const o=require("../../auth/views/middlewares/auth.validation.cjs"),i=[{path:"backoffice",name:"Backoffice Root",component:e.default,beforeEnter:[o.requiresAdmin],children:[{path:"",name:"Backoffice Admin",meta:{title:{en:"Backoffice",ru:"Управление"},sidebar:t.default,authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/Dashboard.vue.cjs"))},{path:"reports",name:"Backoffice Reports",meta:{title:{en:"Backoffice Reports",ru:"Управление Жалобами"}},component:()=>Promise.resolve().then(()=>require("../../reports/components/pages/BackofficeReports.vue.cjs"))},{path:"organizations",name:"Backoffice Organizations",meta:{title:{en:"Backoffice Organizations",ru:"Управление Организациями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../organizations/components/pages/Organizations.vue.cjs"))},{path:"events",name:"Backoffice Events",meta:{title:{en:"Backoffice Events",ru:"Управление Событиями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../events/components/pages/Events.vue.cjs"))},{path:"community",name:"Backoffice Community",meta:{title:{en:"Backoffice Community",ru:"Управление Сообществом"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../community/components/pages/Community.vue.cjs"))}]}];exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/Backoffice.vue.cjs"),t=require("../components/partials/Sidebar.vue.cjs");require("vue");const o=require("../../auth/views/middlewares/auth.validation.cjs"),i=[{path:"backoffice",name:"Backoffice Root",component:e.default,meta:{sidebar:t.default},props:{newsletterPopup:12344},beforeEnter:[o.requiresAdmin],children:[{path:"",name:"Backoffice Admin",meta:{title:{en:"Backoffice",ru:"Управление"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Dashboard.vue.cjs"))},{path:"reports",name:"Backoffice Reports",meta:{title:{en:"Backoffice Reports",ru:"Управление Жалобами"}},component:()=>Promise.resolve().then(()=>require("../../reports/components/pages/BackofficeReports.vue.cjs"))},{path:"organizations",name:"Backoffice Organizations",meta:{title:{en:"Backoffice Organizations",ru:"Управление Организациями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../organizations/components/pages/Organizations.vue.cjs"))},{path:"events",name:"Backoffice Events",meta:{title:{en:"Backoffice Events",ru:"Управление Событиями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../events/components/pages/Events.vue.cjs"))},{path:"community",name:"Backoffice Community",meta:{title:{en:"Backoffice Community",ru:"Управление Сообществом"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../community/components/pages/Community.vue.cjs"))}]}];exports.default=i;
@@ -6,6 +6,12 @@ const c = [{
6
6
  path: "backoffice",
7
7
  name: "Backoffice Root",
8
8
  component: e,
9
+ meta: {
10
+ sidebar: t
11
+ },
12
+ props: {
13
+ newsletterPopup: 12344
14
+ },
9
15
  beforeEnter: [
10
16
  o
11
17
  ],
@@ -17,9 +23,7 @@ const c = [{
17
23
  title: {
18
24
  en: "Backoffice",
19
25
  ru: "Управление"
20
- },
21
- sidebar: t,
22
- authorize: []
26
+ }
23
27
  },
24
28
  component: () => import(
25
29
  /* webpackChunkName: 'BackofficeGallery' */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.vue2.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),w=require("../../../icons/entities/IconRecent.vue.cjs"),_=require("../../../icons/entities/IconFollowing.vue.cjs"),a=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),d=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-thin"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=m.useRoute(),s=m.useRouter();o.params.category==="popular"&&(a.state.sort.param="views"),o.params.category==="new"&&(a.state.sort.param="createdAt");const p=({membership:u,status:t,target:n},c,r)=>{k.mutations.handleMembershipUpdate(d.state.current,u,t,n,c,r)};return(u,t)=>{const n=e.resolveComponent("router-link"),c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:t[0]||(t[0]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"featured"}})})},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[1]||(t[1]=()=>{a.state.sort.param="views",e.unref(s).push({name:"Blog",params:{category:"popular"}})})},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[2]||(t[2]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"new"}})})},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),i.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[3]||(t[3]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"following"}})})},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(n,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h3",y,[B,e.createVNode(f.default,{options:["today","week","month","year","all time"],select:a.state.filter.period,"onUpdate:select":t[4]||(t[4]=r=>a.state.filter.period=r),placeholder:"all time",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(c,null,{default:e.withCtx(({Component:r,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:l.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,i.state.user._id?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:r=>d.actions.read(r),state:d.state},options:{user:i.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,l=>(e.openBlock(),e.createBlock(h.default,{key:l._id,organization:l,user:i.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.vue.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),w=require("../../../icons/entities/IconRecent.vue.cjs"),_=require("../../../icons/entities/IconFollowing.vue.cjs"),a=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),d=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-thin"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=m.useRoute(),s=m.useRouter();o.params.category==="popular"&&(a.state.sort.param="views"),o.params.category==="new"&&(a.state.sort.param="createdAt");const p=({membership:u,status:t,target:n},c,r)=>{k.mutations.handleMembershipUpdate(d.state.current,u,t,n,c,r)};return(u,t)=>{const n=e.resolveComponent("router-link"),c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:t[0]||(t[0]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"featured"}})})},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[1]||(t[1]=()=>{a.state.sort.param="views",e.unref(s).push({name:"Blog",params:{category:"popular"}})})},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[2]||(t[2]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"new"}})})},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),i.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[3]||(t[3]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"following"}})})},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(n,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h3",y,[B,e.createVNode(f.default,{options:["today","week","month","year","all time"],select:a.state.filter.period,"onUpdate:select":t[4]||(t[4]=r=>a.state.filter.period=r),placeholder:"all time",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(c,null,{default:e.withCtx(({Component:r,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:l.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,i.state.user._id?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:r=>d.actions.read(r),state:d.state},options:{user:i.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,l=>(e.openBlock(),e.createBlock(h.default,{key:l._id,organization:l,user:i.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as x, openBlock as n, createElementBlock as h, createElementVNode as t, normalizeClass as u, unref as s, createVNode as r, createTextVNode as l, createCommentVNode as w, withCtx as m, Transition as y, createBlock as _, resolveDynamicComponent as C, Fragment as B, renderList as $ } from "vue";
2
2
  import { useRoute as F, useRouter as z } from "vue-router";
3
- import N from "../../../../components/Select/Select.vue2.js";
3
+ import N from "../../../../components/Select/Select.vue.js";
4
4
  import P from "../../../../components/Feed/Feed.vue.js";
5
5
  import A from "../../../organizations/components/blocks/CardOrganization.vue.js";
6
6
  import M from "../../../icons/entities/IconFeatured.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/views/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-2fc13a78"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>n.read()),await s,c(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-2fc13a78"]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/views/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-2fc13a78"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>n.read()),await s,c(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-2fc13a78"]]);exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { withAsyncContext as b, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
2
2
  /* empty css */
3
3
  import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- /* empty css */
4
+ /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  import "axios";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
@@ -2,7 +2,7 @@ import { ref as n, onMounted as V, computed as w, openBlock as u, createElementB
2
2
  import "isomorphic-dompurify";
3
3
  /* empty css */
4
4
  import D from "../../../constructor/components/sections/Constructor.vue.js";
5
- import N from "../../../../components/Popup/Popup.vue2.js";
5
+ import N from "../../../../components/Popup/Popup.vue.js";
6
6
  /* empty css */
7
7
  /* empty css */
8
8
  import O from "../../../../components/FieldTags/BlockTags.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue2.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");;/* empty css */const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");;/* empty css */const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
@@ -1,6 +1,6 @@
1
1
  import { ref as s, openBlock as w, createElementBlock as E, createVNode as n, withCtx as l, createTextVNode as S, createElementVNode as u, unref as g, pushScopeId as T, popScopeId as C } from "vue";
2
2
  import { QrcodeStream as y } from "../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js";
3
- import N from "../../../../components/Popup/Popup.vue2.js";
3
+ import N from "../../../../components/Popup/Popup.vue.js";
4
4
  import B from "../../../../components/Button/Button.vue2.js";
5
5
  import { actions as I } from "../../store/tickets.js";
6
6
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),L=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/views/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");;/* empty css */const O={key:0,class:"h-min-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),Y={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.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 s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:d.value[0],end:d.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){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",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function y(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",O,[e.createElementVNode("div",R,[e.createVNode(h.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),S]),e.createVNode(i.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-b-semi w-100 bg-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(q.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(i.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(L.default,{submit:x,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)}};exports.default=be;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),L=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/views/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");;/* empty css */const O={key:0,class:"h-min-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),Y={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.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 s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:d.value[0],end:d.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){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",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function y(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",O,[e.createElementVNode("div",R,[e.createVNode(h.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),S]),e.createVNode(i.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-b-semi w-100 bg-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(q.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(i.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(L.default,{submit:x,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)}};exports.default=be;
@@ -5,7 +5,7 @@ import A from "../../../constructor/components/sections/Constructor.vue.js";
5
5
  import B from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
6
6
  /* empty css */
7
7
  import E from "../../../../components/Block/Block.vue.js";
8
- import I from "../../../../components/Popup/Popup.vue2.js";
8
+ import I from "../../../../components/Popup/Popup.vue.js";
9
9
  import n from "../../../../components/Field/Field.vue2.js";
10
10
  import z from "../../../../components/FieldTags/BlockTags.vue.js";
11
11
  import P from "../../../../components/Checkbox/Checkbox.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
@@ -1,7 +1,7 @@
1
1
  import { ref as p, onMounted as B, unref as _, openBlock as i, createElementBlock as o, createElementVNode as r, createVNode as l, withCtx as u, Fragment as $, renderList as q, createTextVNode as v, toDisplayString as f, createBlock as P, createCommentVNode as b } from "vue";
2
2
  import V from "../../../../components/Feed/Feed.vue.js";
3
3
  import F from "../../../../components/Block/Block.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import g from "../../../../components/Field/Field.vue2.js";
6
6
  import w from "../../../../components/Button/Button.vue2.js";
7
7
  import S from "../elements/ButtonCheck.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue2.cjs"),m=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),b=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 h-min-10r pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),o=e.ref("all");let r=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),s=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function p(a){u.value=!0,n.value=a}function c(){u.value=!1,n.value=null}return(a,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(b.default,{title:a.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>o.value=t),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:c,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(m.default,{photoUrl:(a.FILE_SERVER_URL||"")+n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(r),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(r)?r.value=t:r=t),date:e.unref(s),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),showLoadMore:!1,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...o.value!=="all"&&{tags:o.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:E=>p(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue.cjs"),m=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),b=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 h-min-10r pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),o=e.ref("all");let r=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),s=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function p(a){u.value=!0,n.value=a}function c(){u.value=!1,n.value=null}return(a,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(b.default,{title:a.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>o.value=t),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:c,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(m.default,{photoUrl:(a.FILE_SERVER_URL||"")+n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(r),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(r)?r.value=t:r=t),date:e.unref(s),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),showLoadMore:!1,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...o.value!=="all"&&{tags:o.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:E=>p(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
@@ -1,6 +1,6 @@
1
1
  import { ref as t, openBlock as d, createElementBlock as m, createVNode as n, withCtx as f, unref as c, isRef as _, Fragment as P, renderList as w, createElementVNode as b } from "vue";
2
2
  import k from "../../../../components/Feed/Feed.vue.js";
3
- import E from "../../../../components/Popup/Popup.vue2.js";
3
+ import E from "../../../../components/Popup/Popup.vue.js";
4
4
  import y from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
5
5
  import U from "../../../globals/views/components/sections/SectionPageTitle.vue.js";
6
6
  import R from "../../store/gallery.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue2.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
@@ -2,10 +2,10 @@ import { ref as s, openBlock as d, createElementBlock as h, createVNode as o, un
2
2
  import { useRoute as j } from "vue-router";
3
3
  /* empty css */
4
4
  import I from "../../../../components/Button/Button.vue2.js";
5
- /* empty css */
5
+ /* empty css */
6
6
  import G from "../../../../components/Chips/Chips.vue.js";
7
7
  /* empty css */
8
- import O from "../../../../components/Popup/Popup.vue2.js";
8
+ import O from "../../../../components/Popup/Popup.vue.js";
9
9
  import z from "../../../../components/Feed/Feed.vue.js";
10
10
  import q from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
11
11
  import { state as D } from "../../../auth/views/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../../../../../node_modules/@unhead/vue/dist/shared/vue.f36acd1f.cjs"),y=require("vue-i18n"),b=require("vue-router"),n=require("../../store/globals.cjs"),B=require("../../../../../components/Sidebar/Sidebar.vue.cjs"),C=require("../partials/BottomNavigation.vue.cjs"),_=require("../../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),S={key:0,class:"w-100 h-100"},c="https://weeder.delivery",O={__name:"App",props:{messages:{type:Object,required:!0},logotype:{type:Object},navigation:{type:Object}},setup(p){const r=p,{t:o,locale:N}=y.useI18n({messages:r.messages}),u=e.computed(()=>m(`${c}${i.path}`)),i=b.useRoute(),g=["en","ru"];function m(t){return t.endsWith("/")?t.slice(0,-1):t}const h=e.computed(()=>({title:o("meta.title"),description:o("meta.description"),meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1, shrink-to-fit=no"},{hid:"description",name:"description",content:o("meta.description")},{hid:"keywords",name:"keywords",content:o("meta.keywords")},{hid:"og:title",property:"og:title",content:o("meta.og.title")},{hid:"og:description",property:"og:description",content:o("meta.og.description")},{hid:"og:image",property:"og:image",content:c+"/favicon/cover.jpg"},{hid:"og:url",property:"og:url",content:u.value},{hid:"twitter:title",name:"twitter:title",content:o("meta.twitter.title")},{hid:"twitter:description",name:"twitter:description",content:o("meta.twitter.description")},{hid:"twitter:image",name:"twitter:image",content:c+"/favicon/cover.jpg"},{hid:"twitter:card",name:"twitter:card",content:o("meta.twitter.card")}],link:[{hid:"canonical",rel:"canonical",href:u.value},...v.value],htmlAttrs:{lang:o("meta.htmlAttrs.lang")}})),v=e.computed(()=>g.map(t=>{let a=i.path;i.params.locale?a=a.replace(`/${i.params.locale}`,`/${t}`):a=`/${t}${a}`;const s=m(`${c}${a}`);return{hid:"alternate",rel:"alternate",hreflang:t,href:s}}));f.u(h.value);const l=e.ref(!1);async function k(){const t=await _.Preferences.get({key:"first-use"});l.value=t.value?JSON.parse(t.value):!0}const w=t=>{l.value=t};return e.onMounted(async()=>{await k()}),(t,a)=>{const s=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"scaleTransition",mode:"out-in"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("section",S,[e.createVNode(s,{name:"Walkthrough",onUpdateFirstUse:w,slides:[1,2,3],class:"tab"})])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"moveFromTop",mode:"out-in",appear:""},{default:e.withCtx(()=>[n.state.isOpenSidebar?(e.openBlock(),e.createBlock(B.default,{key:0,stateSidebar:n.state.isOpenSidebar,onCloseSidebar:a[0]||(a[0]=()=>{n.state.isOpenSidebar=!n.state.isOpenSidebar}),class:e.normalizeClass(["transition-ease-in-out pos-absolute w-70 z-index-0 bg-light",{"pos-l-70-negative":!n.state.isOpenSidebar,"pos-l-0":n.state.isOpenSidebar}])},{default:e.withCtx(()=>[r.navigation?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.navigation),{key:0,class:"h3 pd-big cols-1"})):e.createCommentVNode("",!0)]),_:1},8,["stateSidebar","class"])):e.createCommentVNode("",!0)]),_:1}),t.MOBILE_APP?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,name:"Header",ref:"header",class:e.normalizeClass(["transition-ease-in-out pos-relative br-b br-solid br-grey-transp-10 pos-t-0",{"pos-l-70":n.state.isOpenSidebar,"pos-l-0":!n.state.isOpenSidebar}]),theme:t.headerTheme,logotype:p.logotype},{default:e.withCtx(({Component:d})=>[e.createVNode(e.Transition,{name:"moveFromTop",mode:"out-in",appear:""},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d),null,{default:e.withCtx(()=>[r.navigation?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.navigation),{key:0,class:"mn-l-auto desktop-only"})):e.createCommentVNode("",!0)]),_:2},1024))]),_:2},1024)]),_:1},8,["theme","logotype","class"])),e.createVNode(s,null,{default:e.withCtx(({Component:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d)))]),_:1}),t.MOBILE_APP&&e.unref(i).meta.title_hide?(e.openBlock(),e.createBlock(C.default,{key:1,class:"pd-small z-index-2"})):e.createCommentVNode("",!0)],64)}}};exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../../../../../node_modules/@unhead/vue/dist/shared/vue.f36acd1f.cjs"),y=require("vue-i18n"),k=require("vue-router"),n=require("../../store/globals.cjs"),C=require("../partials/BottomNavigation.vue.cjs"),S=require("../../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),i="https://weeder.delivery",O={__name:"App",props:{messages:{type:Object,required:!0},logotype:{type:Object}},setup(c){const m=c,{t:a,locale:B}=y.useI18n({messages:m.messages}),d=e.computed(()=>p(`${i}${o.path}`)),o=k.useRoute(),u=["en","ru"];function p(t){return t.endsWith("/")?t.slice(0,-1):t}const g=e.computed(()=>({title:a("meta.title"),description:a("meta.description"),meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1, shrink-to-fit=no"},{hid:"description",name:"description",content:a("meta.description")},{hid:"keywords",name:"keywords",content:a("meta.keywords")},{hid:"og:title",property:"og:title",content:a("meta.og.title")},{hid:"og:description",property:"og:description",content:a("meta.og.description")},{hid:"og:image",property:"og:image",content:i+"/favicon/cover.jpg"},{hid:"og:url",property:"og:url",content:d.value},{hid:"twitter:title",name:"twitter:title",content:a("meta.twitter.title")},{hid:"twitter:description",name:"twitter:description",content:a("meta.twitter.description")},{hid:"twitter:image",name:"twitter:image",content:i+"/favicon/cover.jpg"},{hid:"twitter:card",name:"twitter:card",content:a("meta.twitter.card")}],link:[{hid:"canonical",rel:"canonical",href:d.value},...h.value],htmlAttrs:{lang:a("meta.htmlAttrs.lang")}})),h=e.computed(()=>u.map(t=>{let r=o.path;o.params.locale?r=r.replace(`/${o.params.locale}`,`/${t}`):r=`/${t}${r}`;const s=p(`${i}${r}`);return{hid:"alternate",rel:"alternate",hreflang:t,href:s}}));w.u(g.value);const v=e.ref(!1);async function f(){const t=await S.Preferences.get({key:"first-use"});v.value=t.value?JSON.parse(t.value):!0}return e.onMounted(async()=>{await f()}),(t,r)=>{const s=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"moveFromTop",mode:"out-in",appear:""},{default:e.withCtx(()=>[e.unref(o).meta.sidebar&&n.state.isOpenSidebar?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).meta.sidebar),{key:0,stateSidebar:n.state.isOpenSidebar,onCloseSidebar:r[0]||(r[0]=()=>{n.state.isOpenSidebar=!n.state.isOpenSidebar}),class:e.normalizeClass(["transition-ease-in-out pos-absolute w-70 z-index-0 bg-light",{"pos-l-70-negative":!n.state.isOpenSidebar,"pos-l-0":n.state.isOpenSidebar}])},{default:e.withCtx(({Component:l})=>[e.unref(o).meta.navigation?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).meta.navigation),{key:0,class:"h3 pd-big cols-1"})):e.createCommentVNode("",!0)]),_:1},40,["stateSidebar","class"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"moveFromTop",mode:"out-in",appear:""},{default:e.withCtx(()=>[!t.MOBILE_APP&&e.unref(o).meta.header?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).meta.header),{key:0,ref:"header",class:e.normalizeClass(["transition-ease-in-out pos-relative br-b br-solid br-grey-transp-10 pos-t-0",{"pos-l-70":n.state.isOpenSidebar,"pos-l-0":!n.state.isOpenSidebar}]),theme:t.headerTheme,logotype:c.logotype},{default:e.withCtx(()=>[e.unref(o).meta.navigation?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).meta.navigation),{key:0,class:"mn-l-auto desktop-only"})):e.createCommentVNode("",!0)]),_:1},8,["theme","logotype","class"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(s,{class:e.normalizeClass([{"pos-l-70":n.state.isOpenSidebar,"pos-l-0":!n.state.isOpenSidebar},"transition-ease-in-out h-min-100 w-100 bg-white pos-relative"]),ref:"screen",onScroll:t.handleScroll,onClick:r[1]||(r[1]=l=>n.state.isOpenSidebar?b=>n.state.isOpenSidebar=!1:b=>{console.log("not succes")})},{default:e.withCtx(({Component:l})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l)))]),_:1},8,["class","onScroll"]),t.MOBILE_APP&&e.unref(o).meta.title_hide?(e.openBlock(),e.createBlock(C.default,{key:0,class:"pd-small z-index-2"})):e.createCommentVNode("",!0)],64)}}};exports.default=O;