@ozdao/prometheus-framework 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./organizations.client-37ec4817.js"),r=require("./CardOrganization-79eb2b6f.js"),t=require("./Socials-821bd677.js"),n=require("./Publics-8bc74cc3.js"),i=require("./ButtonFollow-daa0e9e4.js"),a=require("./organizations-e74f4f84.js");require("vue");require("vue-router");require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-cf9f6aed.js");require("./auth-3dedf391.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Tab-6f0a4909.js");require("./inputs.validation-24ae76b9.js");require("./Feed-2c92ceed.js");require("./EmptyState-7658d7d6.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./Feed-a5229528.js");require("./UploadImage-802b81db.js");exports.Contacts=e._sfc_main$9;exports.Department=e._sfc_main$2;exports.DepartmentEdit=e.DepartmentEdit;exports.DepartmentMemberModify=e.DepartmentMemberModify;exports.DepartmentSection=e.Department;exports.DepartmentSub=e.DepartmentSub;exports.DepartmentSubDepartmentModify=e.DepartmentSubDepartmentModify;exports.DetailsTab=e._sfc_main$13;exports.Documents=e.Documents;exports.EditArray=e._sfc_main$6;exports.EmptyState=e._sfc_main$8;exports.MembersAdd=e._sfc_main$11;exports.MembersList=e._sfc_main$15;exports.MembersTab=e._sfc_main$14;exports.Organization=e._sfc_main$1;exports.OrganizationEdit=e._sfc_main$4;exports.Organizations=e._sfc_main$5;exports.OrganizationsAccount=e._sfc_main$3;exports.OrganizationsSection=e._sfc_main$16;exports.Places=e.Places;exports.Rating=e._sfc_main$10;exports.StructureTab=e._sfc_main$12;exports.Unit=e._sfc_main$7;exports.User=e.User;exports.invitesStore=e.invites;exports.organizationsRoutes=e.organizations;exports.CardOrganization=r._sfc_main;exports.Socials=t._sfc_main;exports.Publics=n._sfc_main;exports.ButtonFollow=i.ButtonFollow;exports.membershipsStore=i.memberships;exports.organizationStore=a.organizations;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./organizations.client-9e480f60.js"),r=require("./CardOrganization-79eb2b6f.js"),t=require("./Socials-821bd677.js"),n=require("./Publics-8bc74cc3.js"),i=require("./ButtonFollow-daa0e9e4.js"),a=require("./organizations-e74f4f84.js");require("vue");require("vue-router");require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-cf9f6aed.js");require("./auth-3dedf391.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Tab-6f0a4909.js");require("./inputs.validation-24ae76b9.js");require("./Feed-3a187776.js");require("./EmptyState-7658d7d6.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./Feed-a5229528.js");require("./UploadImage-802b81db.js");exports.Contacts=e._sfc_main$9;exports.Department=e._sfc_main$2;exports.DepartmentEdit=e.DepartmentEdit;exports.DepartmentMemberModify=e.DepartmentMemberModify;exports.DepartmentSection=e.Department;exports.DepartmentSub=e.DepartmentSub;exports.DepartmentSubDepartmentModify=e.DepartmentSubDepartmentModify;exports.DetailsTab=e._sfc_main$13;exports.Documents=e.Documents;exports.EditArray=e._sfc_main$6;exports.EmptyState=e._sfc_main$8;exports.MembersAdd=e._sfc_main$11;exports.MembersList=e._sfc_main$15;exports.MembersTab=e._sfc_main$14;exports.Organization=e._sfc_main$1;exports.OrganizationEdit=e._sfc_main$4;exports.Organizations=e._sfc_main$5;exports.OrganizationsAccount=e._sfc_main$3;exports.OrganizationsSection=e._sfc_main$16;exports.Places=e.Places;exports.Rating=e._sfc_main$10;exports.StructureTab=e._sfc_main$12;exports.Unit=e._sfc_main$7;exports.User=e.User;exports.invitesStore=e.invites;exports.organizationsRoutes=e.organizations;exports.CardOrganization=r._sfc_main;exports.Socials=t._sfc_main;exports.Publics=n._sfc_main;exports.ButtonFollow=i.ButtonFollow;exports.membershipsStore=i.memberships;exports.organizationStore=a.organizations;
@@ -1,4 +1,4 @@
1
- import { o as f, e as z, D as l, l as x, x as M, k as O, m as y, t as A, v as E, i as P, n as T, q as U, w as _, u as h, d as v, g as w, h as B, f as C, y as R, P as j, p as k, r as q, j as F, U as L, z as G, A as H } from "./organizations.client-52d2951c.mjs";
1
+ import { o as f, e as z, D as l, l as x, x as M, k as O, m as y, t as A, v as E, i as P, n as T, q as U, w as _, u as h, d as v, g as w, h as B, f as C, y as R, P as j, p as k, r as q, j as F, U as L, z as G, A as H } from "./organizations.client-bae43c7c.mjs";
2
2
  import { _ as J } from "./CardOrganization-d3a9d898.mjs";
3
3
  import { _ as N } from "./Socials-8193477c.mjs";
4
4
  import { _ as V } from "./Publics-5ae33b91.mjs";
@@ -13,7 +13,7 @@ import "./auth-c3234662.mjs";
13
13
  import "./_plugin-vue_export-helper-dad06003.mjs";
14
14
  import "./Tab-a243605d.mjs";
15
15
  import "./inputs.validation-14e8e01f.mjs";
16
- import "./Feed-bbe44c17.mjs";
16
+ import "./Feed-406e3b66.mjs";
17
17
  import "./EmptyState-34d85f10.mjs";
18
18
  import "./Chips-03ff0c34.mjs";
19
19
  import "./IconEdit-eacf3856.mjs";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./auth-3dedf391.js"),V=require("./_plugin-vue_export-helper-f246444f.js"),b=require("./ButtonFollow-daa0e9e4.js"),x=require("./Socials-821bd677.js"),w=require("./IconEdit-4cfe2115.js"),v=require("vue-router");require("./inputs.validation-24ae76b9.js");const B=require("./UploadImage-802b81db.js");require("./auth.validation-892bea9b.js");require("./globals-928eb13c.js");require("vue-i18n");const P={class:"mobile-menu-section mn-semi pd-r-zero pd-t-thin pd-b-thin pd-medium bg-grey radius-medium"},k={__name:"Menu",setup(o){return(t,d)=>(e.openBlock(),e.createElementBlock("section",P,[e.renderSlot(t.$slots,"default")]))}},$={},M={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},U=e.createElementVNode("path",{fill:"black",d:"M16.25 9.375L20 5.9375C21.5625 4.53125 23.9062 4.6875 25.3125 6.25L54.2188 37.8125C55.3125 39.0625 55.3125 40.9375 54.2188 42.1875L25.3125 73.75C23.9062 75.3125 21.5625 75.4688 20 74.0625L16.25 70.625C14.6875 69.375 14.5312 66.875 15.9375 65.4688L39.375 40L15.9375 14.5312C14.5312 13.125 14.6875 10.625 16.25 9.375Z"},null,-1),S=[U];function H(o,t){return e.openBlock(),e.createElementBlock("svg",M,S)}const Z=V._export_sfc($,[["render",H]]),f=e.defineComponent({setup(o,{slots:t}){return()=>{const d=t.default?t.default():[],m=[],p=[];return d.forEach(r=>{r.toString(),r.props&&r.props.icon?m.push(r):p.push(r)}),e.h("div",{class:["w-100","t-left","flex-nowrap","flex-v-center","flex",{"br-b br-black-transp-10 br-solid":!0}]},[...m.length?[e.h("div",{class:["mn-thin","mn-t-thin","flex-center","flex","mn-r-small","flex-child","flex-child-shrink-0","i-big","bg-main","radius-thin"]},m)]:[],e.h("div",{class:["w-100","mn-thin","mn-t-thin","mn-r-small","i-big","flex-v-center","flex"]},[e.h("span",{class:["p-big","t-medium","mn-r-auto"]},p)]),e.h(Z,{class:"i-medium mn-r-medium",type:"chevron"})])}}}),L={class:"w-100 mn-semi radius-medium pd-medium bg-main t-black"},y={__name:"ProfileCompletion",props:{user:Object,target:Object,cta:Boolean},setup(o){const{user:t,cta:d,target:m}=o,p=e.ref(0),r=_=>{let a=0,c=0;function u(n){for(let l in n)n.hasOwnProperty(l)&&(n[l]&&typeof n[l]=="object"&&!Array.isArray(n[l])?u(n[l]):(a++,n[l]!=null&&n[l]!==""&&c++))}return u(_),a===0?0:Math.round(c/a*100)};return m&&(p.value=r(m)),(_,a)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",L,[e.createElementVNode("h3",null," Profile completed at "+e.toDisplayString(p.value)+"% ",1),o.cta?(e.openBlock(),e.createBlock(c,{key:0,to:{name:"User Edit Profile",params:{_id:o.user}},class:"mn-t-regular t-black bg-white w-100 button"},{default:e.withCtx(()=>[e.createTextVNode(" Fill Profile ")]),_:1},8,["to"])):e.createCommentVNode("",!0)])}}},q={},I={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=e.createElementVNode("path",{d:"M12 66V32H68V66C68 69.25 65.25 72 62 72H18C14.75 72 12 69.25 12 66ZM52 42V46C52 47.125 52.875 48 54 48H58C59.125 48 60 47.125 60 46V42C60 40.875 59.125 40 58 40H54C52.875 40 52 40.875 52 42ZM52 58V62C52 63.125 52.875 64 54 64H58C59.125 64 60 63.125 60 62V58C60 56.875 59.125 56 58 56H54C52.875 56 52 56.875 52 58ZM36 42V46C36 47.125 36.875 48 38 48H42C43.125 48 44 47.125 44 46V42C44 40.875 43.125 40 42 40H38C36.875 40 36 40.875 36 42ZM36 58V62C36 63.125 36.875 64 38 64H42C43.125 64 44 63.125 44 62V58C44 56.875 43.125 56 42 56H38C36.875 56 36 56.875 36 58ZM20 42V46C20 47.125 20.875 48 22 48H26C27.125 48 28 47.125 28 46V42C28 40.875 27.125 40 26 40H22C20.875 40 20 40.875 20 42ZM20 58V62C20 63.125 20.875 64 22 64H26C27.125 64 28 63.125 28 62V58C28 56.875 27.125 56 26 56H22C20.875 56 20 56.875 20 58ZM62 16C65.25 16 68 18.75 68 22V28H12V22C12 18.75 14.75 16 18 16H24V10C24 8.875 24.875 8 26 8H30C31.125 8 32 8.875 32 10V16H48V10C48 8.875 48.875 8 50 8H54C55.125 8 56 8.875 56 10V16H62Z",fill:"white"},null,-1),O=[F];function R(o,t){return e.openBlock(),e.createElementBlock("svg",I,O)}const z=V._export_sfc(q,[["render",R]]),D={},T={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j=e.createElementVNode("path",{d:"M9 19C9 17.1435 9.7375 15.363 11.0503 14.0503C12.363 12.7375 14.1435 12 16 12C17.8565 12 19.637 12.7375 20.9497 14.0503C22.2625 15.363 23 17.1435 23 19C23 20.8565 22.2625 22.637 20.9497 23.9497C19.637 25.2625 17.8565 26 16 26C14.1435 26 12.363 25.2625 11.0503 23.9497C9.7375 22.637 9 20.8565 9 19ZM8 38.7125C6.75 40.1125 6 41.975 6 44C6 46.025 6.75 47.8875 8 49.2875V38.7125ZM26.05 32.55C22.3375 35.8375 20 40.65 20 46C20 50.2875 21.5 54.225 24 57.3125V60C24 62.2125 22.2125 64 20 64H12C9.7875 64 8 62.2125 8 60V56.65C3.275 54.4 0 49.5875 0 44C0 36.2625 6.2625 30 14 30H18C21 30 23.775 30.9375 26.05 32.5375V32.55ZM56 60V57.3125C58.5 54.225 60 50.2875 60 46C60 40.65 57.6625 35.8375 53.95 32.5375C56.225 30.9375 59 30 62 30H66C73.7375 30 80 36.2625 80 44C80 49.5875 76.725 54.4 72 56.65V60C72 62.2125 70.2125 64 68 64H60C57.7875 64 56 62.2125 56 60ZM57 19C57 17.1435 57.7375 15.363 59.0503 14.0503C60.363 12.7375 62.1435 12 64 12C65.8565 12 67.637 12.7375 68.9497 14.0503C70.2625 15.363 71 17.1435 71 19C71 20.8565 70.2625 22.637 68.9497 23.9497C67.637 25.2625 65.8565 26 64 26C62.1435 26 60.363 25.2625 59.0503 23.9497C57.7375 22.637 57 20.8565 57 19ZM72 38.7125V49.3C73.25 47.8875 74 46.0375 74 44.0125C74 41.9875 73.25 40.125 72 38.725V38.7125ZM40 12C42.1217 12 44.1566 12.8429 45.6569 14.3431C47.1571 15.8434 48 17.8783 48 20C48 22.1217 47.1571 24.1566 45.6569 25.6569C44.1566 27.1571 42.1217 28 40 28C37.8783 28 35.8434 27.1571 34.3431 25.6569C32.8429 24.1566 32 22.1217 32 20C32 17.8783 32.8429 15.8434 34.3431 14.3431C35.8434 12.8429 37.8783 12 40 12ZM30 46C30 48.025 30.75 49.875 32 51.2875V40.7125C30.75 42.125 30 43.975 30 46ZM48 40.7125V51.3C49.25 49.8875 50 48.0375 50 46.0125C50 43.9875 49.25 42.125 48 40.725V40.7125ZM56 46C56 51.5875 52.725 56.4 48 58.65V64C48 66.2125 46.2125 68 44 68H36C33.7875 68 32 66.2125 32 64V58.65C27.275 56.4 24 51.5875 24 46C24 38.2625 30.2625 32 38 32H42C49.7375 32 56 38.2625 56 46Z",fill:"white"},null,-1),A=[j];function G(o,t){return e.openBlock(),e.createElementBlock("svg",T,A)}const Y=V._export_sfc(D,[["render",G]]),J={},K={width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q=e.createElementVNode("path",{d:"M28.2899 50C24.4282 50.007 20.6332 48.9927 17.2899 47.06L12.5299 49.17C11.6317 49.567 10.6307 49.6695 9.67068 49.4627C8.71061 49.2558 7.84068 48.7503 7.1856 48.0186C6.53051 47.2869 6.12391 46.3666 6.02409 45.3896C5.92426 44.4126 6.13634 43.4291 6.62991 42.58L8.96991 38.58C6.65145 34.3531 5.78562 29.4816 6.50556 24.7147C7.22549 19.9478 9.49132 15.5493 12.9546 12.1956C16.418 8.84187 20.887 6.71863 25.6747 6.15233C30.4623 5.58604 35.3034 6.60805 39.4536 9.06121C43.6037 11.5144 46.8332 15.2629 48.6454 19.7303C50.4576 24.1977 50.7522 29.1367 49.4839 33.7879C48.2155 38.4391 45.4545 42.5448 41.6254 45.4739C37.7962 48.403 33.1109 49.9932 28.2899 50ZM17.4799 42.81C17.8631 42.811 18.238 42.9221 18.5599 43.13C22.2995 45.5441 26.7982 46.4939 31.1945 45.7975C35.5908 45.1011 39.5757 42.8075 42.3861 39.3558C45.1966 35.9041 46.6349 31.537 46.4258 27.0908C46.2167 22.6446 44.3748 18.4318 41.2529 15.2591C38.1309 12.0864 33.9483 10.1769 29.5061 9.89616C25.0638 9.61544 20.6741 10.9833 17.1776 13.7377C13.6811 16.4921 11.3235 20.4396 10.5563 24.8241C9.78918 29.2086 10.6664 33.722 13.0199 37.5C13.2068 37.8111 13.3055 38.1671 13.3055 38.53C13.3055 38.8929 13.2068 39.2489 13.0199 39.56L10.0899 44.56C10.0202 44.6791 9.99023 44.8174 10.0043 44.9547C10.0184 45.0919 10.0759 45.2212 10.1683 45.3237C10.2608 45.4262 10.3834 45.4966 10.5186 45.5247C10.6537 45.5528 10.7943 45.5371 10.9199 45.48L16.6699 43C16.9236 42.8806 17.1996 42.8159 17.4799 42.81Z",fill:"white"},null,-1),W=e.createElementVNode("path",{d:"M28.2898 30C27.7594 30 27.2507 29.7893 26.8756 29.4142C26.5005 29.0391 26.2898 28.5304 26.2898 28C26.2898 27.4696 26.5005 26.9609 26.8756 26.5858C27.2507 26.2107 27.7594 26 28.2898 26C28.8202 26 29.3289 26.2107 29.704 26.5858C30.0791 26.9609 30.2898 27.4696 30.2898 28C30.2898 28.5304 30.0791 29.0391 29.704 29.4142C29.3289 29.7893 28.8202 30 28.2898 30Z",fill:"white"},null,-1),X=e.createElementVNode("path",{d:"M20.2898 30C19.7594 30 19.2507 29.7893 18.8756 29.4142C18.5005 29.0391 18.2898 28.5304 18.2898 28C18.2898 27.4696 18.5005 26.9609 18.8756 26.5858C19.2507 26.2107 19.7594 26 20.2898 26C20.8202 26 21.3289 26.2107 21.704 26.5858C22.0791 26.9609 22.2898 27.4696 22.2898 28C22.2898 28.5304 22.0791 29.0391 21.704 29.4142C21.3289 29.7893 20.8202 30 20.2898 30Z",fill:"white"},null,-1),ee=e.createElementVNode("path",{d:"M36.2898 30C35.7594 30 35.2507 29.7893 34.8756 29.4142C34.5005 29.0391 34.2898 28.5304 34.2898 28C34.2898 27.4696 34.5005 26.9609 34.8756 26.5858C35.2507 26.2107 35.7594 26 36.2898 26C36.8202 26 37.3289 26.2107 37.704 26.5858C38.0791 26.9609 38.2898 27.4696 38.2898 28C38.2898 28.5304 38.0791 29.0391 37.704 29.4142C37.3289 29.7893 36.8202 30 36.2898 30Z",fill:"white"},null,-1),te=[Q,W,X,ee];function re(o,t){return e.openBlock(),e.createElementBlock("svg",K,te)}const oe=V._export_sfc(J,[["render",re]]),g=i.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),s=e.reactive({all:[],current:{_id:"",username:"",email:"",phone:"",status:"",profile:{name:"",photo:"",description:"",birthday:""},socials:{facebook:"",twitter:"",instagram:"",telegram:""},roles:[]}}),C={async create(o){try{const t=await g.post("/api/users",o);return h.set(t.data,"current"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async read(o={}){o.params={},o._id&&(o.params._id=o._id),o.user&&(o.params.user=o.user);try{const t=await g.get("/api/users",{params:o.params});return o._id?h.set(t.data[0],"current"):h.set(t.data,"all"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async update(o){try{const t=await g.put(`/api/users/${o._id}`,o);return h.set(t.data,"current"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async delete(o){try{await g.delete(`/api/users/${o._id}`);const t=s.all.findIndex(d=>d._id===o._id);t!==-1&&s.all.splice(t,1)}catch(t){console.error(t)}}},h={set(o,t){s[t]=o},clean(){s.current={phone:"",name:"",surname:"",birthday:"",city:"",address:"",roles:[],orders:[]}}},se=Object.freeze(Object.defineProperty({__proto__:null,actions:C,mutations:h,state:s},Symbol.toStringTag,{value:"Module"}));const ne={class:"for-transition w-100"},le={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},ie={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},ae={class:"flex-center flex flex-column t-center w-100 mn-semi radius-medium pd-medium bg-grey"},ce=["src"],de={class:"mn-thin"},ue={class:"mn-thin t-main t-semi"},me={class:"mn-small p-medium"},pe={class:"mn-medium flex-center flex-nowrap flex"},_e={class:"t-semi mn-small"},fe={key:4,class:"mn-t-small mn-thin"},he=e.createElementVNode("span",null,"Events",-1),Ce=e.createElementVNode("span",null,"Groups",-1),ge=e.createElementVNode("span",null,"Posts",-1),ve=e.createElementVNode("span",null," Settings ",-1),Ve=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),N={__name:"Profile",setup(o){const t=v.useRoute(),d=v.useRouter(),m=e.ref(!1);e.onMounted(async()=>{await C.read({_id:t.params._id,user:i.state.user._id}),m.value=!0});const p=({membership:_,isMember:a,targetId:c})=>{b.mutations.handleMembershipUpdate(s.current,_,a,c)};function r(){i.actions.logout(),d.push({name:"Sign In"})}return(_,a)=>(e.openBlock(),e.createElementBlock("div",ne,[s.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",le," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",ie,[e.unref(t).params._id===i.state.user._id&&m.value?(e.openBlock(),e.createBlock(y,{key:0,user:i.state.user._id,target:s.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",ae,[e.unref(t).params._id===i.state.user._id?(e.openBlock(),e.createBlock(w.IconEdit,{key:0,onClick:a[0]||(a[0]=c=>_.$router.push({name:"User Edit Profile",params:{_id:i.state.user._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),s.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:1,src:(_.FILE_SERVER_URL||"")+s.current.profile.photo,class:"radius-extra bg-white mn-small object-fit-cover i-extra"},null,8,ce)):(e.openBlock(),e.createBlock(w.PlaceholderUserpic,{key:2,class:"radius-medium mn-small i-extra"})),e.createElementVNode("h3",de,e.toDisplayString(s.current.profile.name?s.current.profile.name:"Not specified"),1),e.createElementVNode("p",ue," @"+e.toDisplayString(s.current.username?s.current.username:"Not specified"),1),e.createElementVNode("p",me,e.toDisplayString(s.current.profile.description?s.current.profile.description:"Not specified"),1),e.createElementVNode("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.current.roles,(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":u!==s.current.roles.length-1}])},e.toDisplayString(c.icon)+" "+e.toDisplayString(c.name),3))),256))]),e.createElementVNode("p",_e," 👨‍👨‍👧‍👧 "+e.toDisplayString(s.current.numberOfMemberships)+" followers ",1),i.state.user._id&&e.unref(t).params._id&&e.unref(t).params._id!==i.state.user._id?(e.openBlock(),e.createBlock(b.ButtonFollow,{key:3,type:"user",isMember:s.current.isMember,targetId:s.current._id,userId:i.state.user._id,class:"w-min mn-medium mn-r-auto mn-l-auto",onUpdateMembership:p},null,8,["isMember","targetId","userId"])):e.createCommentVNode("",!0),Object.values(s.current.socials).some(c=>c)?(e.openBlock(),e.createElementBlock("h4",fe," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(x._sfc_main,{telegram:s.current.socials.telegram,facebook:s.current.socials.facebook,instagram:s.current.socials.instagram,twitter:s.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(f,{onClick:a[1]||(a[1]=c=>e.unref(d).push({name:"User Events",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(z,{class:"i-semi",icon:!0}),he]),_:1}),e.createVNode(f,{onClick:a[2]||(a[2]=c=>e.unref(d).push({name:"User Organizations",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(Y,{class:"i-semi",icon:!0}),Ce]),_:1}),e.createVNode(f,{onClick:a[3]||(a[3]=c=>e.unref(d).push({name:"User Blogposts",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(oe,{class:"i-semi",icon:!0}),ge]),_:1})]),_:1}),i.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(k,{key:1},{default:e.withCtx(()=>[e.createVNode(f,{onClick:a[4]||(a[4]=c=>e.unref(d).push({name:"User Edit Profile",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[ve]),_:1}),e.createVNode(f,{class:"cursor-pointer",onClick:a[5]||(a[5]=c=>r())},{default:e.withCtx(()=>[Ve]),_:1})]),_:1})):e.createCommentVNode("",!0)]))]))}},be=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));const we={class:"pd-medium for-transition w-100"},ke=e.createElementVNode("h3",{class:"mn-small"},"Username",-1),ye=e.createElementVNode("p",{class:"mn-semi"},"Your username will be used for URL of profile like thecommunephuket/users/username",-1),Ne=e.createElementVNode("h3",{class:"mn-small"},"Profile",-1),Ee={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},xe=e.createElementVNode("h4",null,"Upload userpic",-1),Be=e.createElementVNode("h3",{class:"mn-small"},"Socials",-1),Pe=e.createElementVNode("p",{class:"mn-thin"},"Please provide only the username for social media profiles, without full links.",-1),$e=e.createElementVNode("h3",{class:"mn-small"},"Account",-1),E={__name:"ProfileEdit",async setup(o){let t,d;e.ref(null);const m=v.useRoute(),p=v.useRouter();[t,d]=e.withAsyncContext(()=>C.read({_id:i.state.user._id})),await t,d();const r=e.ref(s.current);async function _(){await C.update(s.current)}async function a(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.current.status="removed",await C.update(s.current),i.actions.logout())}function c(){p.replace({name:"User Profile",params:{_id:s.current._id}})}return(u,n)=>(e.openBlock(),e.createElementBlock("div",we,[e.unref(m).params._id===i.state.user._id?(e.openBlock(),e.createBlock(y,{key:0,user:i.state.user._id,target:r.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),ke,e.createVNode(i.Field,{field:r.value.username,"onUpdate:field":n[0]||(n[0]=l=>r.value.username=l),label:"@",placeholder:"Not specified",class:"mn-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:u.organizationName},null,8,["field","validation"]),ye,Ne,e.createElementVNode("div",Ee,[e.createVNode(B._sfc_main,{photo:r.value.profile.photo,"onUpdate:photo":n[1]||(n[1]=l=>r.value.profile.photo=l),uploadPath:"users/"+r.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-thin radius-extra"},null,8,["photo","uploadPath"]),xe]),e.createVNode(i.Field,{field:r.value.profile.name,"onUpdate:field":n[2]||(n[2]=l=>r.value.profile.name=l),label:"Name",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",validation:u.organizationName},null,8,["field","validation"]),e.createVNode(i.Field,{field:r.value.profile.description,"onUpdate:field":n[3]||(n[3]=l=>r.value.profile.description=l),label:"Description",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",disabled:"true",validation:u.organizationName},null,8,["field","validation"]),Be,Pe,e.createVNode(i.Field,{field:r.value.socials.instagram,"onUpdate:field":n[4]||(n[4]=l=>r.value.socials.instagram=l),label:"Instagram",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.Field,{field:r.value.socials.twitter,"onUpdate:field":n[5]||(n[5]=l=>r.value.socials.twitter=l),label:"Twitter",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.Field,{field:r.value.socials.facebook,"onUpdate:field":n[6]||(n[6]=l=>r.value.socials.facebook=l),label:"Facebook",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.Field,{field:r.value.socials.telegram,"onUpdate:field":n[7]||(n[7]=l=>r.value.socials.telegram=l),label:"Telegram",placeholder:"",class:"mn-semi bg-grey pd-medium radius-small"},null,8,["field"]),$e,e.createVNode(i.Field,{field:r.value.phone,"onUpdate:field":n[8]||(n[8]=l=>r.value.phone=l),label:"Phone",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium mn-thin radius-small",disabled:"true",validation:u.organizationName},null,8,["field","validation"]),e.createVNode(i.Field,{field:r.value.email,"onUpdate:field":n[9]||(n[9]=l=>r.value.email=l),label:"Email",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",disabled:!0,validation:u.organizationName},null,8,["field","validation"]),e.createVNode(i._sfc_main,{submit:_,callback:c,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(i._sfc_main,{submit:a,callback:u.a=()=>{e.unref(p).push({name:"Sign In"})},class:"mn-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}},Me=Object.freeze(Object.defineProperty({__proto__:null,default:E},Symbol.toStringTag,{value:"Module"})),Ue=[{path:"profile/:_id",name:"User Profile",meta:{title:{en:"Profile",ru:"Профиль"}},component:()=>Promise.resolve().then(()=>be)},{path:"profile/:_id/blogposts",name:"User Blogposts",meta:{title:{en:"Posts",ru:"Посты"}},component:()=>Promise.resolve().then(()=>require("./ProfileBlogposts-d1d3326e.js"))},{path:"profile/:_id/comments",name:"User Comments",meta:{title:{en:"Comments",ru:"Комментарии"}},component:()=>Promise.resolve().then(()=>require("./ProfileComments-c3290211.js"))},{path:"profile/:_id/edit",name:"User Edit Profile",meta:{title:{en:"Edit Profile",ru:"Редактировать Профиль"}},component:()=>Promise.resolve().then(()=>Me)},{path:"profile/:_id/events",name:"User Events",meta:{title:{en:"Events",ru:"События"}},component:()=>Promise.resolve().then(()=>require("./ProfileEvents-314eadc3.js"))},{path:"profile/:_id/likes",name:"User Likes",meta:{title:{en:"Likes",ru:"Лайки"}},component:()=>Promise.resolve().then(()=>require("./ProfileLikes-a2c1b585.js"))},{path:"profile/:_id/organizations",name:"User Organizations",meta:{title:{en:"Groups",ru:"Группы"}},component:()=>Promise.resolve().then(()=>require("./ProfileOrganizations-1f9f1841.js"))}];exports.Profile=N;exports.ProfileEdit=E;exports.usersRoutes=Ue;exports.usersStore=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./auth-3dedf391.js"),V=require("./_plugin-vue_export-helper-f246444f.js"),b=require("./ButtonFollow-daa0e9e4.js"),x=require("./Socials-821bd677.js"),w=require("./IconEdit-4cfe2115.js"),v=require("vue-router");require("./inputs.validation-24ae76b9.js");const B=require("./UploadImage-802b81db.js");require("./auth.validation-892bea9b.js");require("./globals-928eb13c.js");require("vue-i18n");const P={class:"mobile-menu-section mn-semi pd-r-zero pd-t-thin pd-b-thin pd-medium bg-grey radius-medium"},k={__name:"Menu",setup(o){return(t,d)=>(e.openBlock(),e.createElementBlock("section",P,[e.renderSlot(t.$slots,"default")]))}},$={},M={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},U=e.createElementVNode("path",{fill:"black",d:"M16.25 9.375L20 5.9375C21.5625 4.53125 23.9062 4.6875 25.3125 6.25L54.2188 37.8125C55.3125 39.0625 55.3125 40.9375 54.2188 42.1875L25.3125 73.75C23.9062 75.3125 21.5625 75.4688 20 74.0625L16.25 70.625C14.6875 69.375 14.5312 66.875 15.9375 65.4688L39.375 40L15.9375 14.5312C14.5312 13.125 14.6875 10.625 16.25 9.375Z"},null,-1),S=[U];function H(o,t){return e.openBlock(),e.createElementBlock("svg",M,S)}const Z=V._export_sfc($,[["render",H]]),f=e.defineComponent({setup(o,{slots:t}){return()=>{const d=t.default?t.default():[],m=[],p=[];return d.forEach(r=>{r.toString(),r.props&&r.props.icon?m.push(r):p.push(r)}),e.h("div",{class:["w-100","t-left","flex-nowrap","flex-v-center","flex",{"br-b br-black-transp-10 br-solid":!0}]},[...m.length?[e.h("div",{class:["mn-thin","mn-t-thin","flex-center","flex","mn-r-small","flex-child","flex-child-shrink-0","i-big","bg-main","radius-thin"]},m)]:[],e.h("div",{class:["w-100","mn-thin","mn-t-thin","mn-r-small","i-big","flex-v-center","flex"]},[e.h("span",{class:["p-big","t-medium","mn-r-auto"]},p)]),e.h(Z,{class:"i-medium mn-r-medium",type:"chevron"})])}}}),L={class:"w-100 mn-semi radius-medium pd-medium bg-main t-black"},y={__name:"ProfileCompletion",props:{user:Object,target:Object,cta:Boolean},setup(o){const{user:t,cta:d,target:m}=o,p=e.ref(0),r=_=>{let a=0,c=0;function u(n){for(let l in n)n.hasOwnProperty(l)&&(n[l]&&typeof n[l]=="object"&&!Array.isArray(n[l])?u(n[l]):(a++,n[l]!=null&&n[l]!==""&&c++))}return u(_),a===0?0:Math.round(c/a*100)};return m&&(p.value=r(m)),(_,a)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",L,[e.createElementVNode("h3",null," Profile completed at "+e.toDisplayString(p.value)+"% ",1),o.cta?(e.openBlock(),e.createBlock(c,{key:0,to:{name:"User Edit Profile",params:{_id:o.user}},class:"mn-t-regular t-black bg-white w-100 button"},{default:e.withCtx(()=>[e.createTextVNode(" Fill Profile ")]),_:1},8,["to"])):e.createCommentVNode("",!0)])}}},q={},I={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=e.createElementVNode("path",{d:"M12 66V32H68V66C68 69.25 65.25 72 62 72H18C14.75 72 12 69.25 12 66ZM52 42V46C52 47.125 52.875 48 54 48H58C59.125 48 60 47.125 60 46V42C60 40.875 59.125 40 58 40H54C52.875 40 52 40.875 52 42ZM52 58V62C52 63.125 52.875 64 54 64H58C59.125 64 60 63.125 60 62V58C60 56.875 59.125 56 58 56H54C52.875 56 52 56.875 52 58ZM36 42V46C36 47.125 36.875 48 38 48H42C43.125 48 44 47.125 44 46V42C44 40.875 43.125 40 42 40H38C36.875 40 36 40.875 36 42ZM36 58V62C36 63.125 36.875 64 38 64H42C43.125 64 44 63.125 44 62V58C44 56.875 43.125 56 42 56H38C36.875 56 36 56.875 36 58ZM20 42V46C20 47.125 20.875 48 22 48H26C27.125 48 28 47.125 28 46V42C28 40.875 27.125 40 26 40H22C20.875 40 20 40.875 20 42ZM20 58V62C20 63.125 20.875 64 22 64H26C27.125 64 28 63.125 28 62V58C28 56.875 27.125 56 26 56H22C20.875 56 20 56.875 20 58ZM62 16C65.25 16 68 18.75 68 22V28H12V22C12 18.75 14.75 16 18 16H24V10C24 8.875 24.875 8 26 8H30C31.125 8 32 8.875 32 10V16H48V10C48 8.875 48.875 8 50 8H54C55.125 8 56 8.875 56 10V16H62Z",fill:"white"},null,-1),O=[F];function R(o,t){return e.openBlock(),e.createElementBlock("svg",I,O)}const z=V._export_sfc(q,[["render",R]]),D={},T={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j=e.createElementVNode("path",{d:"M9 19C9 17.1435 9.7375 15.363 11.0503 14.0503C12.363 12.7375 14.1435 12 16 12C17.8565 12 19.637 12.7375 20.9497 14.0503C22.2625 15.363 23 17.1435 23 19C23 20.8565 22.2625 22.637 20.9497 23.9497C19.637 25.2625 17.8565 26 16 26C14.1435 26 12.363 25.2625 11.0503 23.9497C9.7375 22.637 9 20.8565 9 19ZM8 38.7125C6.75 40.1125 6 41.975 6 44C6 46.025 6.75 47.8875 8 49.2875V38.7125ZM26.05 32.55C22.3375 35.8375 20 40.65 20 46C20 50.2875 21.5 54.225 24 57.3125V60C24 62.2125 22.2125 64 20 64H12C9.7875 64 8 62.2125 8 60V56.65C3.275 54.4 0 49.5875 0 44C0 36.2625 6.2625 30 14 30H18C21 30 23.775 30.9375 26.05 32.5375V32.55ZM56 60V57.3125C58.5 54.225 60 50.2875 60 46C60 40.65 57.6625 35.8375 53.95 32.5375C56.225 30.9375 59 30 62 30H66C73.7375 30 80 36.2625 80 44C80 49.5875 76.725 54.4 72 56.65V60C72 62.2125 70.2125 64 68 64H60C57.7875 64 56 62.2125 56 60ZM57 19C57 17.1435 57.7375 15.363 59.0503 14.0503C60.363 12.7375 62.1435 12 64 12C65.8565 12 67.637 12.7375 68.9497 14.0503C70.2625 15.363 71 17.1435 71 19C71 20.8565 70.2625 22.637 68.9497 23.9497C67.637 25.2625 65.8565 26 64 26C62.1435 26 60.363 25.2625 59.0503 23.9497C57.7375 22.637 57 20.8565 57 19ZM72 38.7125V49.3C73.25 47.8875 74 46.0375 74 44.0125C74 41.9875 73.25 40.125 72 38.725V38.7125ZM40 12C42.1217 12 44.1566 12.8429 45.6569 14.3431C47.1571 15.8434 48 17.8783 48 20C48 22.1217 47.1571 24.1566 45.6569 25.6569C44.1566 27.1571 42.1217 28 40 28C37.8783 28 35.8434 27.1571 34.3431 25.6569C32.8429 24.1566 32 22.1217 32 20C32 17.8783 32.8429 15.8434 34.3431 14.3431C35.8434 12.8429 37.8783 12 40 12ZM30 46C30 48.025 30.75 49.875 32 51.2875V40.7125C30.75 42.125 30 43.975 30 46ZM48 40.7125V51.3C49.25 49.8875 50 48.0375 50 46.0125C50 43.9875 49.25 42.125 48 40.725V40.7125ZM56 46C56 51.5875 52.725 56.4 48 58.65V64C48 66.2125 46.2125 68 44 68H36C33.7875 68 32 66.2125 32 64V58.65C27.275 56.4 24 51.5875 24 46C24 38.2625 30.2625 32 38 32H42C49.7375 32 56 38.2625 56 46Z",fill:"white"},null,-1),A=[j];function G(o,t){return e.openBlock(),e.createElementBlock("svg",T,A)}const Y=V._export_sfc(D,[["render",G]]),J={},K={width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q=e.createElementVNode("path",{d:"M28.2899 50C24.4282 50.007 20.6332 48.9927 17.2899 47.06L12.5299 49.17C11.6317 49.567 10.6307 49.6695 9.67068 49.4627C8.71061 49.2558 7.84068 48.7503 7.1856 48.0186C6.53051 47.2869 6.12391 46.3666 6.02409 45.3896C5.92426 44.4126 6.13634 43.4291 6.62991 42.58L8.96991 38.58C6.65145 34.3531 5.78562 29.4816 6.50556 24.7147C7.22549 19.9478 9.49132 15.5493 12.9546 12.1956C16.418 8.84187 20.887 6.71863 25.6747 6.15233C30.4623 5.58604 35.3034 6.60805 39.4536 9.06121C43.6037 11.5144 46.8332 15.2629 48.6454 19.7303C50.4576 24.1977 50.7522 29.1367 49.4839 33.7879C48.2155 38.4391 45.4545 42.5448 41.6254 45.4739C37.7962 48.403 33.1109 49.9932 28.2899 50ZM17.4799 42.81C17.8631 42.811 18.238 42.9221 18.5599 43.13C22.2995 45.5441 26.7982 46.4939 31.1945 45.7975C35.5908 45.1011 39.5757 42.8075 42.3861 39.3558C45.1966 35.9041 46.6349 31.537 46.4258 27.0908C46.2167 22.6446 44.3748 18.4318 41.2529 15.2591C38.1309 12.0864 33.9483 10.1769 29.5061 9.89616C25.0638 9.61544 20.6741 10.9833 17.1776 13.7377C13.6811 16.4921 11.3235 20.4396 10.5563 24.8241C9.78918 29.2086 10.6664 33.722 13.0199 37.5C13.2068 37.8111 13.3055 38.1671 13.3055 38.53C13.3055 38.8929 13.2068 39.2489 13.0199 39.56L10.0899 44.56C10.0202 44.6791 9.99023 44.8174 10.0043 44.9547C10.0184 45.0919 10.0759 45.2212 10.1683 45.3237C10.2608 45.4262 10.3834 45.4966 10.5186 45.5247C10.6537 45.5528 10.7943 45.5371 10.9199 45.48L16.6699 43C16.9236 42.8806 17.1996 42.8159 17.4799 42.81Z",fill:"white"},null,-1),W=e.createElementVNode("path",{d:"M28.2898 30C27.7594 30 27.2507 29.7893 26.8756 29.4142C26.5005 29.0391 26.2898 28.5304 26.2898 28C26.2898 27.4696 26.5005 26.9609 26.8756 26.5858C27.2507 26.2107 27.7594 26 28.2898 26C28.8202 26 29.3289 26.2107 29.704 26.5858C30.0791 26.9609 30.2898 27.4696 30.2898 28C30.2898 28.5304 30.0791 29.0391 29.704 29.4142C29.3289 29.7893 28.8202 30 28.2898 30Z",fill:"white"},null,-1),X=e.createElementVNode("path",{d:"M20.2898 30C19.7594 30 19.2507 29.7893 18.8756 29.4142C18.5005 29.0391 18.2898 28.5304 18.2898 28C18.2898 27.4696 18.5005 26.9609 18.8756 26.5858C19.2507 26.2107 19.7594 26 20.2898 26C20.8202 26 21.3289 26.2107 21.704 26.5858C22.0791 26.9609 22.2898 27.4696 22.2898 28C22.2898 28.5304 22.0791 29.0391 21.704 29.4142C21.3289 29.7893 20.8202 30 20.2898 30Z",fill:"white"},null,-1),ee=e.createElementVNode("path",{d:"M36.2898 30C35.7594 30 35.2507 29.7893 34.8756 29.4142C34.5005 29.0391 34.2898 28.5304 34.2898 28C34.2898 27.4696 34.5005 26.9609 34.8756 26.5858C35.2507 26.2107 35.7594 26 36.2898 26C36.8202 26 37.3289 26.2107 37.704 26.5858C38.0791 26.9609 38.2898 27.4696 38.2898 28C38.2898 28.5304 38.0791 29.0391 37.704 29.4142C37.3289 29.7893 36.8202 30 36.2898 30Z",fill:"white"},null,-1),te=[Q,W,X,ee];function re(o,t){return e.openBlock(),e.createElementBlock("svg",K,te)}const oe=V._export_sfc(J,[["render",re]]),g=i.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),s=e.reactive({all:[],current:{_id:"",username:"",email:"",phone:"",status:"",profile:{name:"",photo:"",description:"",birthday:""},socials:{facebook:"",twitter:"",instagram:"",telegram:""},roles:[]}}),C={async create(o){try{const t=await g.post("/api/users",o);return h.set(t.data,"current"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async read(o={}){o.params={},o._id&&(o.params._id=o._id),o.user&&(o.params.user=o.user);try{const t=await g.get("/api/users",{params:o.params});return o._id?h.set(t.data[0],"current"):h.set(t.data,"all"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async update(o){try{const t=await g.put(`/api/users/${o._id}`,o);return h.set(t.data,"current"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async delete(o){try{await g.delete(`/api/users/${o._id}`);const t=s.all.findIndex(d=>d._id===o._id);t!==-1&&s.all.splice(t,1)}catch(t){console.error(t)}}},h={set(o,t){s[t]=o},clean(){s.current={phone:"",name:"",surname:"",birthday:"",city:"",address:"",roles:[],orders:[]}}},se=Object.freeze(Object.defineProperty({__proto__:null,actions:C,mutations:h,state:s},Symbol.toStringTag,{value:"Module"}));const ne={class:"for-transition w-100"},le={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},ie={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},ae={class:"flex-center flex flex-column t-center w-100 mn-semi radius-medium pd-medium bg-grey"},ce=["src"],de={class:"mn-thin"},ue={class:"mn-thin t-main t-semi"},me={class:"mn-small p-medium"},pe={class:"mn-medium flex-center flex-nowrap flex"},_e={class:"t-semi mn-small"},fe={key:4,class:"mn-t-small mn-thin"},he=e.createElementVNode("span",null,"Events",-1),Ce=e.createElementVNode("span",null,"Groups",-1),ge=e.createElementVNode("span",null,"Posts",-1),ve=e.createElementVNode("span",null," Settings ",-1),Ve=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),N={__name:"Profile",setup(o){const t=v.useRoute(),d=v.useRouter(),m=e.ref(!1);e.onMounted(async()=>{await C.read({_id:t.params._id,user:i.state.user._id}),m.value=!0});const p=({membership:_,isMember:a,targetId:c})=>{b.mutations.handleMembershipUpdate(s.current,_,a,c)};function r(){i.actions.logout(),d.push({name:"Sign In"})}return(_,a)=>(e.openBlock(),e.createElementBlock("div",ne,[s.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",le," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",ie,[e.unref(t).params._id===i.state.user._id&&m.value?(e.openBlock(),e.createBlock(y,{key:0,user:i.state.user._id,target:s.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",ae,[e.unref(t).params._id===i.state.user._id?(e.openBlock(),e.createBlock(w.IconEdit,{key:0,onClick:a[0]||(a[0]=c=>_.$router.push({name:"User Edit Profile",params:{_id:i.state.user._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),s.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:1,src:(_.FILE_SERVER_URL||"")+s.current.profile.photo,class:"radius-extra bg-white mn-small object-fit-cover i-extra"},null,8,ce)):(e.openBlock(),e.createBlock(w.PlaceholderUserpic,{key:2,class:"radius-medium mn-small i-extra"})),e.createElementVNode("h3",de,e.toDisplayString(s.current.profile.name?s.current.profile.name:"Not specified"),1),e.createElementVNode("p",ue," @"+e.toDisplayString(s.current.username?s.current.username:"Not specified"),1),e.createElementVNode("p",me,e.toDisplayString(s.current.profile.description?s.current.profile.description:"Not specified"),1),e.createElementVNode("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.current.roles,(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":u!==s.current.roles.length-1}])},e.toDisplayString(c.icon)+" "+e.toDisplayString(c.name),3))),256))]),e.createElementVNode("p",_e," 👨‍👨‍👧‍👧 "+e.toDisplayString(s.current.numberOfMemberships)+" followers ",1),i.state.user._id&&e.unref(t).params._id&&e.unref(t).params._id!==i.state.user._id?(e.openBlock(),e.createBlock(b.ButtonFollow,{key:3,type:"user",isMember:s.current.isMember,targetId:s.current._id,userId:i.state.user._id,class:"w-min mn-medium mn-r-auto mn-l-auto",onUpdateMembership:p},null,8,["isMember","targetId","userId"])):e.createCommentVNode("",!0),Object.values(s.current.socials).some(c=>c)?(e.openBlock(),e.createElementBlock("h4",fe," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(x._sfc_main,{telegram:s.current.socials.telegram,facebook:s.current.socials.facebook,instagram:s.current.socials.instagram,twitter:s.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(f,{onClick:a[1]||(a[1]=c=>e.unref(d).push({name:"User Events",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(z,{class:"i-semi",icon:!0}),he]),_:1}),e.createVNode(f,{onClick:a[2]||(a[2]=c=>e.unref(d).push({name:"User Organizations",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(Y,{class:"i-semi",icon:!0}),Ce]),_:1}),e.createVNode(f,{onClick:a[3]||(a[3]=c=>e.unref(d).push({name:"User Blogposts",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(oe,{class:"i-semi",icon:!0}),ge]),_:1})]),_:1}),i.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(k,{key:1},{default:e.withCtx(()=>[e.createVNode(f,{onClick:a[4]||(a[4]=c=>e.unref(d).push({name:"User Edit Profile",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[ve]),_:1}),e.createVNode(f,{class:"cursor-pointer",onClick:a[5]||(a[5]=c=>r())},{default:e.withCtx(()=>[Ve]),_:1})]),_:1})):e.createCommentVNode("",!0)]))]))}},be=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));const we={class:"pd-medium for-transition w-100"},ke=e.createElementVNode("h3",{class:"mn-small"},"Username",-1),ye=e.createElementVNode("p",{class:"mn-semi"},"Your username will be used for URL of profile like thecommunephuket/users/username",-1),Ne=e.createElementVNode("h3",{class:"mn-small"},"Profile",-1),Ee={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},xe=e.createElementVNode("h4",null,"Upload userpic",-1),Be=e.createElementVNode("h3",{class:"mn-small"},"Socials",-1),Pe=e.createElementVNode("p",{class:"mn-thin"},"Please provide only the username for social media profiles, without full links.",-1),$e=e.createElementVNode("h3",{class:"mn-small"},"Account",-1),E={__name:"ProfileEdit",async setup(o){let t,d;e.ref(null);const m=v.useRoute(),p=v.useRouter();[t,d]=e.withAsyncContext(()=>C.read({_id:i.state.user._id})),await t,d();const r=e.ref(s.current);async function _(){await C.update(s.current)}async function a(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.current.status="removed",await C.update(s.current),i.actions.logout())}function c(){p.replace({name:"User Profile",params:{_id:s.current._id}})}return(u,n)=>(e.openBlock(),e.createElementBlock("div",we,[e.unref(m).params._id===i.state.user._id?(e.openBlock(),e.createBlock(y,{key:0,user:i.state.user._id,target:r.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),ke,e.createVNode(i.Field,{field:r.value.username,"onUpdate:field":n[0]||(n[0]=l=>r.value.username=l),label:"@",placeholder:"Not specified",class:"mn-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:u.organizationName},null,8,["field","validation"]),ye,Ne,e.createElementVNode("div",Ee,[e.createVNode(B._sfc_main,{photo:r.value.profile.photo,"onUpdate:photo":n[1]||(n[1]=l=>r.value.profile.photo=l),uploadPath:"users/"+r.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-thin radius-extra"},null,8,["photo","uploadPath"]),xe]),e.createVNode(i.Field,{field:r.value.profile.name,"onUpdate:field":n[2]||(n[2]=l=>r.value.profile.name=l),label:"Name",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",validation:u.organizationName},null,8,["field","validation"]),e.createVNode(i.Field,{field:r.value.profile.description,"onUpdate:field":n[3]||(n[3]=l=>r.value.profile.description=l),label:"Description",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",disabled:"true",validation:u.organizationName},null,8,["field","validation"]),Be,Pe,e.createVNode(i.Field,{field:r.value.socials.instagram,"onUpdate:field":n[4]||(n[4]=l=>r.value.socials.instagram=l),label:"Instagram",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.Field,{field:r.value.socials.twitter,"onUpdate:field":n[5]||(n[5]=l=>r.value.socials.twitter=l),label:"Twitter",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.Field,{field:r.value.socials.facebook,"onUpdate:field":n[6]||(n[6]=l=>r.value.socials.facebook=l),label:"Facebook",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.Field,{field:r.value.socials.telegram,"onUpdate:field":n[7]||(n[7]=l=>r.value.socials.telegram=l),label:"Telegram",placeholder:"",class:"mn-semi bg-grey pd-medium radius-small"},null,8,["field"]),$e,e.createVNode(i.Field,{field:r.value.phone,"onUpdate:field":n[8]||(n[8]=l=>r.value.phone=l),label:"Phone",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium mn-thin radius-small",disabled:"true",validation:u.organizationName},null,8,["field","validation"]),e.createVNode(i.Field,{field:r.value.email,"onUpdate:field":n[9]||(n[9]=l=>r.value.email=l),label:"Email",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",disabled:!0,validation:u.organizationName},null,8,["field","validation"]),e.createVNode(i._sfc_main,{submit:_,callback:c,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(i._sfc_main,{submit:a,callback:u.a=()=>{e.unref(p).push({name:"Sign In"})},class:"mn-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}},Me=Object.freeze(Object.defineProperty({__proto__:null,default:E},Symbol.toStringTag,{value:"Module"})),Ue=[{path:"profile/:_id",name:"User Profile",meta:{title:{en:"Profile",ru:"Профиль"}},component:()=>Promise.resolve().then(()=>be)},{path:"profile/:_id/blogposts",name:"User Blogposts",meta:{title:{en:"Posts",ru:"Посты"}},component:()=>Promise.resolve().then(()=>require("./ProfileBlogposts-d1d3326e.js"))},{path:"profile/:_id/comments",name:"User Comments",meta:{title:{en:"Comments",ru:"Комментарии"}},component:()=>Promise.resolve().then(()=>require("./ProfileComments-c3290211.js"))},{path:"profile/:_id/edit",name:"User Edit Profile",meta:{title:{en:"Edit Profile",ru:"Редактировать Профиль"}},component:()=>Promise.resolve().then(()=>Me)},{path:"profile/:_id/events",name:"User Events",meta:{title:{en:"Events",ru:"События"}},component:()=>Promise.resolve().then(()=>require("./ProfileEvents-bff6e071.js"))},{path:"profile/:_id/likes",name:"User Likes",meta:{title:{en:"Likes",ru:"Лайки"}},component:()=>Promise.resolve().then(()=>require("./ProfileLikes-a2c1b585.js"))},{path:"profile/:_id/organizations",name:"User Organizations",meta:{title:{en:"Groups",ru:"Группы"}},component:()=>Promise.resolve().then(()=>require("./ProfileOrganizations-1f9f1841.js"))}];exports.Profile=N;exports.ProfileEdit=E;exports.usersRoutes=Ue;exports.usersStore=se;
@@ -606,7 +606,7 @@ const Ye = { class: "pd-medium for-transition w-100" }, qe = /* @__PURE__ */ o("
606
606
  },
607
607
  component: () => import(
608
608
  /* webpackChunkName: "profile" */
609
- "./ProfileEvents-ba769f57.mjs"
609
+ "./ProfileEvents-980b0281.mjs"
610
610
  )
611
611
  }, {
612
612
  path: "profile/:_id/likes",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/prometheus-framework",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Web3 Framework focused on user experience and ease of development.",
5
5
  "author": "OZ DAO <hello@ozdao.dev>",
6
6
  "license": "GPL-3.0-or-later",
@@ -1,6 +1,6 @@
1
1
  f<template>
2
2
  <section class="feed">
3
- <TransitionGroup tag="ul" name="fade" class="o-hidden bg-grey radius-big">
3
+ <TransitionGroup tag="ul" name="scaleTransition" class="o-hidden bg-grey radius-big">
4
4
  <SkeletonEvent
5
5
  v-if="isLoading"
6
6
  v-for="i in limit" :key="i"
@@ -8,7 +8,7 @@ f<template>
8
8
  </TransitionGroup>
9
9
 
10
10
  <transition
11
- name="fade"
11
+ name="scaleTransition"
12
12
  >
13
13
  <EmptyState
14
14
  v-if="!isLoading && eventsList.length < 1"
@@ -19,7 +19,7 @@ f<template>
19
19
  </transition>
20
20
 
21
21
 
22
- <TransitionGroup tag="ul" name="fade" class="container">
22
+ <TransitionGroup tag="ul" name="scaleTransition" class="container">
23
23
  <CardEvent
24
24
  v-if="!isLoading && eventsList.length > 0"
25
25
  @click="$router.push({name: 'Event', params: {url: event.url}})"