@ozdao/prometheus-framework 0.0.92 → 0.0.93

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ "use strict";const e=require("vue"),b=require("vue-router"),ce=require("vue-i18n"),g=require("./globals-928eb13c.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-e32a3041.js"),J=require("./Tab-6f0a4909.js"),P=require("./ButtonFollow-959861db.js"),de=require("./Feed-a2870bbf.js"),ue=require("./Feed-c25dc839.js"),U=require("./IconEdit-823ddda9.js"),pe=require("./PlaceholderUserpic-20d58460.js"),h=require("./auth-5a58f8cb.js"),j=require("./inputs.validation-24ae76b9.js"),m=require("./organizations-e97a0f85.js"),k=require("./_plugin-vue_export-helper-f246444f.js"),Q=require("./UploadImage-73d66f27.js"),me=require("./CardOrganization-1be3651b.js"),X=require("./Publics-e14d36ed.js"),he={class:"breadcrumbs flex-row flex-nowrap flex-left flex","aria-label":"breadcrumbs"},_e={key:0,class:"i-small mn-r-thin",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fe=e.createElementVNode("path",{fill:"black",d:"M0.494141 4.26391C0.494141 4.48862 0.659906 4.66912 0.928813 4.66912C1.05037 4.66912 1.16825 4.6065 1.27139 4.52177L1.64344 4.20866V7.56448C1.64344 8.13545 1.98971 8.47803 2.5791 8.47803H7.56678C8.15616 8.47803 8.50243 8.13545 8.50243 7.56448V4.19392L8.8929 4.52177C8.99604 4.6065 9.11392 4.66912 9.23916 4.66912C9.48597 4.66912 9.67015 4.5144 9.67015 4.27128C9.67015 4.1313 9.61121 4.01343 9.5007 3.92133L8.50243 3.08146V1.47538C8.50243 1.30961 8.3956 1.1991 8.22984 1.1991H7.63308C7.46732 1.1991 7.35313 1.30961 7.35313 1.47538V2.11634L5.66969 0.70181C5.31606 0.403433 4.85928 0.403433 4.50197 0.70181L0.663589 3.92133C0.553079 4.01711 0.494141 4.14235 0.494141 4.26391ZM6.13752 5.26219C6.13752 5.08906 6.02701 4.97855 5.85387 4.97855H4.31779C4.14097 4.97855 4.02678 5.08906 4.02678 5.26219V7.63447H2.83327C2.60856 7.63447 2.48332 7.50922 2.48332 7.28084V3.5014L4.90349 1.47538C5.01768 1.37592 5.15029 1.37592 5.26817 1.47538L7.66255 3.48298V7.28084C7.66255 7.50922 7.53731 7.63447 7.3126 7.63447H6.13752V5.26219Z"},null,-1),ge=[fe],be={key:2},ve={key:3,class:"i-small chevron",viewBox:"0 0 4 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ye=e.createElementVNode("path",{d:"M4 3.99992C4 3.83673 3.94307 3.70391 3.81025 3.57867L0.899431 0.732369C0.800759 0.629902 0.679317 0.580566 0.531309 0.580566C0.239089 0.580566 0 0.815861 0 1.10808C0 1.25229 0.0607211 1.38512 0.166983 1.49138L2.74763 3.99613L0.166983 6.50846C0.0607211 6.61093 0 6.74375 0 6.89176C0 7.18398 0.239089 7.41928 0.531309 7.41928C0.675522 7.41928 0.800759 7.36994 0.899431 7.26747L3.81025 4.42117C3.94307 4.29594 4 4.15931 4 3.99992Z",fill:"black"},null,-1),ke=[ye],G={__name:"Breadcrumbs",setup(t){const n=b.useRoute(),{t:o,locale:a}=ce.useI18n(),l=e.computed(()=>n.matched.map(i=>{var f,v,$;const d=(f=i.meta)==null?void 0:f.title,r=a==null?void 0:a.value,c=d&&r&&d[r],s=i.path.replace(/:.+?\//g,C=>""),u=($=(v=i.meta)==null?void 0:v.breadcrumbs)==null?void 0:$.hidden;return{name:c,path:s,isHidden:u}}).filter(i=>i.name&&!i.isHidden));return(i,d)=>{const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("ol",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(c,s)=>(e.openBlock(),e.createElementBlock("li",{key:s,class:e.normalizeClass(["flex-v-center flex-nowrap flex",{"t-main":s===e.unref(l).length-1}])},[s===0?(e.openBlock(),e.createElementBlock("svg",_e,ge)):e.createCommentVNode("",!0),s!==e.unref(l).length-1?(e.openBlock(),e.createBlock(r,{key:1,to:s===0?"/":c.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.name),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",be,e.toDisplayString(c.name),1)),s!==e.unref(l).length-1?(e.openBlock(),e.createElementBlock("svg",ve,ke)):e.createCommentVNode("",!0)],2))),128))])}}},we={class:"mn-small w-100"},$e=["href"],Ee=e.createElementVNode("span",{class:"t-semi uppercase"},"Website",-1),Be=[Ee],Ve=["href"],Ce=e.createElementVNode("span",{class:"t-semi uppercase"},"Phone",-1),xe=[Ce],Ne=["href"],Se=e.createElementVNode("span",{class:"t-semi uppercase"},"Email",-1),Le=[Se],Oe=["href"],Pe=e.createElementVNode("span",{class:"t-semi uppercase"},"Address",-1),ze=[Pe],De={__name:"Contacts",props:{website:String,phone:String,email:String,address:String},setup(t){const n=t,o=e.computed(()=>n.website?!n.website.startsWith("http://")&&!n.website.startsWith("https://")?`http://${n.website}`:n.website:null),a=e.computed(()=>n.address?encodeURIComponent(n.address):null);return(l,i)=>(e.openBlock(),e.createElementBlock("div",we,[e.unref(o)?(e.openBlock(),e.createElementBlock("a",{key:0,href:e.unref(o),target:"_blank",class:"w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"},Be,8,$e)):e.createCommentVNode("",!0),n.phone?(e.openBlock(),e.createElementBlock("a",{key:1,href:`tel:${n.phone}`,class:"w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"},xe,8,Ve)):e.createCommentVNode("",!0),n.email?(e.openBlock(),e.createElementBlock("a",{key:2,href:`mailto:${n.email}`,target:"_blank",class:"w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"},Le,8,Ne)):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("a",{key:3,href:`https://www.google.com/maps/search/?api=1&query=${e.unref(a)}`,target:"_blank",class:"w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"},ze,8,Oe)):e.createCommentVNode("",!0)]))}},Me={class:"w-100 mn-small star-container flex-v-center flex"},Ae={class:"p-big t-semi mn-r-small"},Te=e.createElementVNode("path",{fill:"#00FF88",d:"M62.2406 5.85971L75.413 32.6098L105.203 36.8654C110.472 37.676 112.498 44.3636 108.648 48.0113L87.1668 68.8844L92.2331 98.2689C93.2464 103.741 87.5721 107.591 82.9111 105.159L56.3637 91.3788L29.8163 105.159C25.1553 107.794 19.4811 103.741 20.4944 98.4716L25.5607 68.8844L4.07956 48.0113C0.22917 44.3636 2.25569 37.676 7.52464 36.8654L37.3145 32.6098L50.4868 5.85971C52.9186 0.996063 59.8088 0.996063 62.2406 5.85971Z"},null,-1),Fe=[Te],Ie={class:""},Ue={__name:"Rating",props:{rating:{type:Number,required:!0},amount:{type:Number,required:!0}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("section",null,[e.createElementVNode("div",Me,[e.createElementVNode("span",Ae,e.toDisplayString(t.rating),1),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,a=>e.createElementVNode("svg",{class:e.normalizeClass(["i-semi mn-r-small",{"t-transp":a>t.rating}]),width:"113",height:"108",viewBox:"0 0 113 108",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Fe,2)),64))]),e.createElementVNode("p",Ie,"Based on "+e.toDisplayString(t.amount)+" reviews",1)]))}},je={key:0,class:"cursor-pointer t-second"},qe={__name:"Text",props:{maxLen:{type:Number,required:!0},text:{type:String,required:!0}},setup(t){const n=t,o=e.ref(!1),a=e.computed(()=>n.text.length>n.maxLen?n.text.slice(0,n.maxLen)+"...":n.text),l=e.computed(()=>n.text),i=()=>{o.value=!o.value},d=e.computed(()=>o.value?l.value:a.value),r=e.computed(()=>n.text.length>n.maxLen),c=e.computed(()=>o.value?"Hide":"Show more");return(s,u)=>(e.openBlock(),e.createElementBlock("span",{onClick:i,class:""},[e.createTextVNode(e.toDisplayString(e.unref(d))+" ",1),e.unref(r)?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)]))}},Re={class:"t-center flex-center flex-column flex pd-medium radius-big bg-grey"},He=["src"],Ze={class:"mn-thin"},Ke={class:"mn-medium p-big"},We={class:"flex-center flex-wrap gap-thin flex mn-semi"},Ye={class:"pd-thin radius-small t-semi uppercase t-black bg-main p-medium"},Je={key:3,class:"mn-t-small mn-thin"},ee={__name:"DetailsTab",props:{organization:Object,user:Object},setup(t){return(n,o)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("section",Re,[t.user._id===t.organization.owner?(e.openBlock(),e.createBlock(U.IconEdit,{key:0,onClick:o[0]||(o[0]=a=>n.$router.push({name:"Organization Edit",params:{_id:t.organization._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.organization.profile.photo?(e.openBlock(),e.createElementBlock("img",{key:1,src:t.organization.profile.photo,class:"radius-big bg-grey flex-center flex mn-small i-extra"},null,8,He)):(e.openBlock(),e.createBlock(pe.PlaceholderUserpic,{key:2,class:"radius-medium mn-small i-extra"})),e.createElementVNode("h1",Ze,e.toDisplayString(t.organization.profile.name),1),e.createElementVNode("p",Ke,[e.createVNode(qe,{text:t.organization.profile.description?t.organization.profile.description:"",maxLen:240},null,8,["text"])]),e.createElementVNode("div",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.organization.profile.tags,a=>(e.openBlock(),e.createElementBlock("span",Ye,e.toDisplayString(a),1))),256))]),e.renderSlot(n.$slots,"default"),Object.values(t.organization.socials).some(a=>a)?(e.openBlock(),e.createElementBlock("h4",Je," Find us in socials ")):e.createCommentVNode("",!0),e.createVNode(U._sfc_main,{telegram:t.organization.socials.telegram,facebook:t.organization.socials.facebook,instagram:t.organization.socials.instagram,twitter:t.organization.socials.twitter},null,8,["telegram","facebook","instagram","twitter"])])]),_:3}))}};const Qe={key:0,class:"spoiler"},q={__name:"Spoiler",props:{status:{type:Boolean,default:!1}},setup(t){const n=t,o=e.ref(!1);return n.status&&(o.value=n.status),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{onClick:l[0]||(l[0]=i=>o.value=!o.value),class:"flex-v-center flex-nowrap flex"},[e.renderSlot(a.$slots,"header")]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(a.$slots,"content")])):e.createCommentVNode("",!0)]),_:3})]))}},E=h.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),_=e.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],coverImage:"",images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],description:""}}),Xe={async create(t,n){const o={...n,organization:t};return await E.post("/products/create",o).then(a=>(Ge(a.data,"current"),Promise.resolve(a.data)),a=>(g.setError(a),Promise.reject(a)))},async read(t={}){t._id&&(t.params={_id:t._id}),t.category&&(t.params=t.params||{},t.params.category=t.category),t.params=t.params||{},t.params.skip=t.skip||0,t.params.limit=t.limit||10,t.organization&&(t.params.organization=t.organization),t.params.sort="createdAt";try{console.log("Request params:"+t.params);const n=await E.get("/products/read",{params:t.params});return t._id?_.current=n.data[0]:_.all=n.data,Promise.resolve(n.data)}catch(n){return g.setError(n),Promise.reject(n)}},async update(t,n){return await E.post("/products/"+t,n).then(o=>Promise.resolve(o.data),o=>(g.setError(o),Promise.reject(o)))},async deleteProduct(t){return await E.delete("/products/"+t).then(n=>Promise.resolve(n.data),n=>(g.setError(n),Promise.reject(n)))},async submitMood(t=null){return console.log(t),E.post("/product/recommended",{mood:t}).then(n=>(_.current=n.data.product,_.current.recommendation=n.data.recommendationText,Promise.resolve(n.data)),n=>(console.log(n),g.setError(n),Promise.reject(n)))},async fetchProducts(){return await E.get("/products").then(t=>(_.all=t.data,_.filtered=t.data.slice(),_.filteredPrice=_.filtered,_.filteredPrice.sort(function(n,o){return n[_.sort.current]>o[_.sort.current]?_.sort.ascending?1:-1:n[_.sort.current]<o[_.sort.current]?_.sort.ascending?-1:1:0}),Promise.resolve(t.data)),t=>(g.setError(t),Promise.reject(t)))},async fetchProductsPopular(){return await E.get("/products/popular").then(t=>(_.popular=t.data,Promise.resolve(t.data)),t=>(g.setError(t),Promise.reject(t)))},async fetchProductsPublished(){return await E.get("/products").then(t=>{let n=t.data.filter(function(o,a){return o.status!=="unpublished"});return _.all=n,_.filtered=n.slice(),_.filteredPrice=_.filtered,_.filteredPrice.sort(function(o,a){return o[_.sort.current]>a[_.sort.current]?_.sort.ascending?1:-1:o[_.sort.current]<a[_.sort.current]?_.sort.ascending?-1:1:0}),Promise.resolve(t.data)},t=>(g.setError(t),Promise.reject(t)))},async fetchProduct(t){return await E.get("/products/"+t).then(n=>(n.localization||(n.localization=[]),_.current=n.data,Promise.resolve(n.data)),n=>(g.setError(n),Promise.reject(n)))},async fetchProductPopular(){return await E.get("/products").then(t=>(_.all=t.data.slice(1,5),Promise.resolve(t.data.slice(1,5))),t=>(g.setError(t),Promise.reject(t)))}};function Ge(t,n){_[n]=t}e.watch(_,(t,n)=>{});const et=process.env.API_URL,N=h.axios.create({baseURL:et,withCredentials:!0}),w=e.reactive({all:[],current:{order:"1",name:"",url:"",subcategories:[],filters:[],localization:[]}}),tt={async fetchCategories(){return await N.get("/categories").then(t=>(w.all=t.data,Promise.resolve(t.data)),t=>(g.setError(t),Promise.reject(t)))},updateCategories(t){return N.post("/categories",t).then(n=>(w.all=t,Promise.resolve(t)),n=>(g.setError(n),Promise.reject(n)))},fetchCategory(t){return N.get("/categories/"+t).then(n=>(w.current=n.data,Promise.resolve(n.data)),n=>(g.setError(n),Promise.reject(n)))},addCategory(){return N.post("/categories/add",w.current).then(t=>(w.all.push(t.data),Promise.resolve(t.data)),t=>(g.setError(t),Promise.reject(t)))},updateCategory(t){return N.post("/categories/"+t,w.current).then(n=>(w.current=n.data,Promise.resolve(n.data)),n=>(g.setError(n),Promise.reject(n)))},deleteCategory(t){return N.delete("/categories/"+t).then(n=>{const o=w.all.findIndex(a=>a.url===t);w.all.splice(o,1)},n=>{g.setError(n)})}};e.watch(w,t=>{});const nt={class:"mn-big radius-medium pd-big bg-white"},ot={class:"mn-regular"},at={class:"mn-small t-transp p-medium"},M={__name:"EmptyState",props:{title:{type:String,default:"У вас еще нет организации"},description:{type:String,default:"Для использования сервиса, вам необходимо добавить вашу организацию."},action:{type:String,default:"Создать организацию"},callback:{type:Function,default:()=>{}}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("section",nt,[e.createElementVNode("h3",ot,e.toDisplayString(t.title),1),e.createElementVNode("p",at,e.toDisplayString(t.description),1),e.createElementVNode("button",{onClick:o[0]||(o[0]=(...a)=>t.callback&&t.callback(...a)),class:"t-white bg-second w-100 button"},e.toDisplayString(t.action),1)]))}};const st={__name:"Map",props:{location:Object},setup(t){const n=t;let o=e.ref(null),a=null,l=null;return e.onMounted(async()=>{a=new google.maps.Map(o.value,{zoom:13,center:{lat:n.location.lat,lng:n.location.lng}}),l=new google.maps.Marker({position:{lat:n.location.lat,lng:n.location.lng},map:a})}),e.watch(()=>n.location,()=>{a&&l&&(l.setPosition(new google.maps.LatLng(n.location.lat,n.location.lng)),a.setCenter(new google.maps.LatLng(n.location.lat,n.location.lng)))},{deep:!0}),(i,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"gmap",ref:o,class:"gmap"},null,512))}},rt=k._export_sfc(st,[["__scopeId","data-v-c194b4a5"]]);const lt={class:"pd-small flex-nowrap flex"},it={class:"user-card__info"},ct={class:"user-card__name"},dt={class:"user-card__position"},ut={__name:"DepartmentSub",props:{department:{type:Object,required:!0}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",lt,[e.createElementVNode("div",it,[e.createElementVNode("p",ct,e.toDisplayString(t.department.name?t.department.name:"Безымянный"),1),e.createElementVNode("p",dt,e.toDisplayString(t.department.members?t.department.members.length:"0")+" человек",1)])]))}},T=k._export_sfc(ut,[["__scopeId","data-v-3a07133c"]]);const pt={class:"pd-small flex-nowrap flex"},mt={class:"user-card__info"},ht={class:"user-card__name"},_t={class:"t-transp"},ft={__name:"User",props:{user:{type:Object,required:!0},position:{type:String,required:!0}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("p",ht,e.toDisplayString(t.user.name?t.user.name:"Безымянный"),1),e.createElementVNode("p",_t,e.toDisplayString(t.position),1)])]))}},F=k._export_sfc(ft,[["__scopeId","data-v-c0ea3801"]]);const A=t=>(e.pushScopeId("data-v-1d33cf95"),t=t(),e.popScopeId(),t),gt={class:"radius-big o-hidden cols-2-1_3"},bt={class:"pd-medium w-100"},vt=A(()=>e.createElementVNode("path",{d:"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",fill:"black"},null,-1)),yt=[vt],kt=["innerHTML"],wt=["innerHTML"],$t={class:"pd-small flex-v-center flex-nowrap flex"},Et=A(()=>e.createElementVNode("h5",{class:"w-100"},"Contacts ",-1)),Bt={class:"mn-r-small"},Vt=A(()=>e.createElementVNode("svg",{width:"14",height:"9",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",fill:"#8A8A8A"})],-1)),Ct={key:0},xt={class:"pd-small flex-v-center flex-nowrap flex"},Nt=A(()=>e.createElementVNode("h5",{class:"w-100"},"Working Hours ",-1)),St={class:"mn-r-small"},Lt=A(()=>e.createElementVNode("svg",{width:"14",height:"9",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",fill:"#8A8A8A"})],-1)),Ot={key:0},Pt={__name:"Department",props:{department:Object,organization:Object},setup(t){const n=t;return(o,a)=>(e.openBlock(),e.createElementBlock("div",gt,[e.createVNode(rt,{location:{lat:t.department.location.coordinates[1],lng:t.department.location.coordinates[0]},class:""},null,8,["location"]),e.createElementVNode("div",bt,[(e.openBlock(),e.createElementBlock("svg",{onClick:a[0]||(a[0]=l=>o.$router.push(`/app/organization/${n.organization._id}/departments/${t.department._id}/edit`)),class:"i-regular pos-absolute pos-r-0 pos-t-0 t-transp",width:"652",height:"652",viewBox:"0 0 652 652",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yt)),e.createElementVNode("h3",{onClick:a[1]||(a[1]=l=>o.$router.push(`/app/organization/${n.organization._id}/departments/${t.department._id}`)),class:"mn-small w-100",innerHTML:t.department.profile.name},null,8,kt),e.createElementVNode("p",{onClick:a[2]||(a[2]=l=>o.$router.push(`/app/organization/${n.organization._id}/departments/${t.department._id}`)),class:"mn-small p-big w-100",innerHTML:t.department.address},null,8,wt),e.createVNode(q,{class:"radius-small o-hidden br-1px br-solid br-grey mn-thin"},{header:e.withCtx(()=>[e.createElementVNode("div",$t,[Et,e.createElementVNode("p",Bt,e.toDisplayString(t.department.members.length)+" человек",1),Vt])]),content:e.withCtx(()=>[e.createElementVNode("ul",null,[t.department.members.length<1?(e.openBlock(),e.createElementBlock("li",Ct,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.department.members,(l,i)=>(e.openBlock(),e.createBlock(F,{class:"br-b br-solid br-grey",key:i,user:l.user,position:l.position,onClick:d=>o.$router.push(`/app/profile/${l.user._id}`)},null,8,["user","position","onClick"]))),128))])]),_:1}),e.createVNode(q,{class:"radius-small o-hidden br-1px br-solid br-grey mn-thin"},{header:e.withCtx(()=>[e.createElementVNode("div",xt,[Nt,e.createElementVNode("p",St,e.toDisplayString(t.department.subdepartments?t.department.subdepartments.length:0)+" отделов",1),Lt])]),content:e.withCtx(()=>[e.createElementVNode("ul",null,[t.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",Ot,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.department.subdepartments,(l,i)=>(e.openBlock(),e.createBlock(T,{onClick:d=>o.$router.push(`/app/organization/departments/${l._id}`),key:i,class:"br-b br-solid br-grey",department:l},null,8,["onClick","department"]))),128))])]),_:1})])]))}},te=k._export_sfc(Pt,[["__scopeId","data-v-1d33cf95"]]),L=h.axios.create({baseURL:process.env.API_URL,withCredentials:!0});L.defaults.withCredentials=!0;const p=e.reactive({departments:[],department:{organization:"",profile:{photo:"",name:"",description:"",categories:[]},address:"",location:{lat:null,lng:null},worktime:[],delivery:[],payment:[],members:[],subdepartments:[]},error:null}),x={async readOne(t){await L.get(`/api/departments/get/${t}`).then(n=>{p.department=n.data,p.error=null}).catch(n=>{g.setError(n)})},async read(t){await L.get(`/api/departments/${t}`).then(n=>{console.log("Response:",n),p.departments=n.data,p.error=null}).catch(n=>{g.setError(n)})},async create(t,n){await L.post(`/api/departments/${t}/create`,n).then(o=>{p.error=null,p.department=o.data}).catch(o=>{g.setError(o)})},async update(t,n){await L.post(`/api/departments/${t}/update`,n).then(()=>{p.error=null}).catch(o=>{g.setError(o)})},async delete(t,n){await L.delete(`/api/departments/${t}/delete`,{data:{_id:n}}).then(()=>{p.error=null}).catch(o=>{g.setError(o)})}};e.watch(p,(t,n)=>{});const zt={__name:"StructureTab",props:{organization:Object,units:Array,memberships:Array},async setup(t){let n,o;const a=t;e.ref("departments"),[n,o]=e.withAsyncContext(()=>x.read(a.organization._id)),await n,o();const l=e.computed(()=>{const i=p.departments,d=i.flatMap(r=>r.subdepartments.map(c=>c._id));return i.filter(r=>!d.includes(r._id))});return(i,d)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.unref(l).length<1?(e.openBlock(),e.createBlock(M,{key:0,title:"You don't have any spots yet.",description:"Add spots to your hub.",action:"Add spot",callback:()=>i.$router.push(`/app/organization/${a.organization._id}/departments/create`)},null,8,["callback"])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(r,c)=>(e.openBlock(),e.createBlock(te,{key:c,department:r,organization:t.organization,class:"radius-big bg-grey mn-thin"},null,8,["department","organization"]))),128)),e.unref(l).length>0&&h.state.user._id===t.organization.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:d[0]||(d[0]=r=>i.$router.push(`/app/organization/${a.organization._id}/departments/create`)),class:"mn-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])])]),_:1}))}},O=h.axios.create({baseURL:process.env.API_URL,withCredentials:!0});O.defaults.withCredentials=!0;const B=e.reactive({invites:[],invite:null,error:null}),D={async read(t){await O.get(`/api/invites/${t}`).then(n=>{B.invites=n.data,B.error=null}).catch(n=>{g.setError(n)})},async readOne(t){await O.get(`/api/invites/get/${t}`).then(n=>{B.invite=n.data,h.state.user.phone=n.data.invitedPhone,h.state.user.email=n.data.invitedEmail}).catch(n=>{g.setError(n)})},async create(t,n){await O.post(`/api/invites/${t}/create`,n).then(()=>{B.error=null}).catch(o=>{g.setError(o)})},async update(t,n){await O.put(`/api/invites/${t}/update`,n).then(()=>{B.error=null}).catch(o=>{g.setError(o)})},async delete(t){await O.delete(`/api/invites/${t}/delete`).then(()=>{B.error=null}).catch(n=>{g.setError(n)})}};e.watch(B,(t,n)=>{});const Dt=Object.freeze(Object.defineProperty({__proto__:null,actions:D,state:B},Symbol.toStringTag,{value:"Module"})),Mt={class:"mn-medium radius-medium pd-semi bg-white"},At=e.createElementVNode("h3",{class:"mn-medium"},"Добавить участников",-1),Tt=e.createElementVNode("p",{class:"mn-small t-transp p-medium"},"Укажите email или телефон, чтобы отправить ссылку с приглашением:",-1),Ft={class:"w-100 flex-nowrap flex"},It={key:0,class:"mn-r-medium flex-v-center flex"},Ut=["onClick"],jt=e.createElementVNode("p",{class:"t-blue mn-r-small"},"+ Добавить приглашение",-1),qt=[jt],Rt=e.createElementVNode("span",null,"Отправить приглашения ",-1),ne={__name:"MembersAdd",props:{organization:Object},emits:["send-invite"],setup(t,{emit:n}){const o=t,a=e.ref(null),l=e.ref([{contact:"",role:""}]);function i(){l.value.push({contact:"",role:""})}function d(s){l.value.splice(s,1)}async function r(s){await D.create(o.organization._id,l.value)}function c(){}return(s,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("section",Mt,[At,Tt,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(f,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"br-1px br-solid br-grey flex radius-small mn-thin"},[e.createElementVNode("div",Ft,[e.createVNode(h.Field,{field:f.contact,"onUpdate:field":$=>f.contact=$,placeholder:"Email или телефон",class:"w-100 bg-white",validation:a.value},null,8,["field","onUpdate:field","validation"]),v>0?(e.openBlock(),e.createElementBlock("div",It,[e.createElementVNode("button",{onClick:$=>d(v),class:"button-small button"},"×",8,Ut)])):e.createCommentVNode("",!0)]),e.createVNode(X.Select,{options:[{name:"Директор",value:"director"},{name:"Менеджер",value:"manager"},{name:"Сотрудник",value:"member"}],prop:f,content:"role",placeholder:"Роль",size:"small",class:"w-80"},null,8,["prop"])]))),128)),e.createElementVNode("div",{onClick:i,class:"mn-small flex-v-center flex-nowrap flex"},qt),e.createVNode(h._sfc_main,{submit:s.a=()=>r(B.invites),callback:c,class:"mn-t-medium"},{default:e.withCtx(()=>[Rt]),_:1},8,["submit"])])]))}},Ht={class:"mn-big radius-medium bg-white"},Zt={key:0,class:"pd-semi"},Kt={class:"br-grey br-1px br-solid radius-small flex-nowrap flex-v-center flex pd-medium"},Wt={class:"w-100 mn-r-small"},Yt={class:"t-transp"},Jt={key:0,class:"mn-l-medium flex-v-center flex"},Qt=["onClick"],Xt={key:1,class:"pd-semi"},Gt={key:0},en={class:"br-grey br-1px br-solid radius-small mn-thin flex-nowrap flex-v-center flex pd-medium"},tn={class:"w-100 mn-r-small"},nn={class:"t-transp"},on={class:"mn-l-medium flex-v-center flex"},an=["onClick"],oe={__name:"MembersList",props:{organization:Object,memberships:Array,invites:Array},emits:[["removeMember","removeInvite"]],setup(t,{emit:n}){const o=t,a=e.ref("members");function l(d,r){o.memberships.splice(d,1),n("removeMember",r)}function i(d,r){o.invites.splice(d,1),n("removeInvite",r)}return(d,r)=>(e.openBlock(),e.createElementBlock("section",Ht,[e.createVNode(J._sfc_main,{selected:a.value,"onUpdate:selected":r[0]||(r[0]=c=>a.value=c),class:"br-grey br-b br-solid radius-small",tabs:[{name:"Участники",value:"members"},{name:"Приглашения",value:"invites"}]},null,8,["selected"]),a.value==="members"?(e.openBlock(),e.createElementBlock("div",Zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.memberships,(c,s)=>(e.openBlock(),e.createElementBlock("div",Kt,[e.createElementVNode("span",Wt,e.toDisplayString(c.user.email)+" "+e.toDisplayString(c.user.phone),1),e.createElementVNode("span",Yt,e.toDisplayString(c.position),1),c.position!=="Основатель"?(e.openBlock(),e.createElementBlock("div",Jt,[e.createElementVNode("button",{onClick:u=>l(s,c),class:"button-small button"},"×",8,Qt)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),a.value==="invites"?(e.openBlock(),e.createElementBlock("div",Xt,[t.invites.length<1?(e.openBlock(),e.createElementBlock("span",Gt,"В организации нет приглашений")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invites,(c,s)=>(e.openBlock(),e.createElementBlock("div",en,[e.createElementVNode("span",tn,e.toDisplayString(c.invitedEmail)+" "+e.toDisplayString(c.invitedPhone),1),e.createElementVNode("span",nn,e.toDisplayString(c.status),1),e.createElementVNode("div",on,[e.createElementVNode("button",{onClick:u=>i(s,c),class:"button-small button"},"×",8,an)])]))),256))])):e.createCommentVNode("",!0)]))}},sn=e.createElementVNode("section",{class:"mn-medium radius-medium pd-semi bg-white"},[e.createElementVNode("h2",{class:"mn-regular"},"Участники"),e.createElementVNode("p",{class:"t-transp p-big"},"Добавляйте новых участников организации и настраивайте права доступа.")],-1),rn={__name:"MembersTab",props:{organization:Object,memberships:Array},async setup(t){let n,o;const a=t;[n,o]=e.withAsyncContext(()=>D.read(a.organization._id)),await n,o();async function l(r){await D.create(a.organization._id,r)}async function i(r){await P.actions.delete(r._id)}async function d(r){await D.delete(r._id)}return(r,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[sn,e.createVNode(ne,{organization:t.organization,onSendInvite:l},null,8,["organization"]),e.createVNode(oe,{organization:t.organization,memberships:t.memberships,invites:B.invites,onRemoveInvite:d,onRemoveMember:i},null,8,["organization","memberships","invites"])])]),_:1}))}};const ln={key:0,class:"pd-thin for-transition w-100"},cn={class:"t-semi mn-small"},ae={__name:"Organization",setup(t){const n=b.useRouter(),o=b.useRoute();let a=o.query.tab?o.query.tab:"events";const l=e.ref(null);e.onMounted(async()=>{l.value=await m.actions.read({_id:o.params._id,user:h.state.user._id}),await P.actions.read(o.params._id)});const i=e.ref(a);o.query.tab=i.value,e.watch(i,r=>{n.push({query:{...o.query,tab:r}})});const d=({membership:r,isMember:c,targetId:s})=>{P.mutations.handleMembershipUpdate(m.state.current,r,c,s)};return(r,c)=>l.value?(e.openBlock(),e.createElementBlock("div",ln,[e.createVNode(ee,{organization:m.state.current,user:h.state.user,class:"mn-semi"},{default:e.withCtx(()=>[e.createElementVNode("p",cn," 👨‍👨‍👧‍👧 "+e.toDisplayString(m.state.current.numberOfMemberships)+" followers ",1),h.state.user._id&&e.unref(o).params._id&&e.unref(o).params._id!==h.state.user._id&&m.state.current.owner!==h.state.user._id?(e.openBlock(),e.createBlock(P.ButtonFollow,{key:0,type:"organization",isMember:m.state.current.isMember,targetId:m.state.current._id,userId:h.state.user._id,class:"w-min mn-auto",onUpdateMembership:d},null,8,["isMember","targetId","userId"])):e.createCommentVNode("",!0)]),_:1},8,["organization","user"]),e.createVNode(J._sfc_main,{selected:i.value,"onUpdate:selected":c[0]||(c[0]=s=>i.value=s),tabs:[{name:"Events",value:"events"},{name:"Community",value:"community"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[i.value==="events"?(e.openBlock(),e.createBlock(de._sfc_main,{key:0,user:h.state.user._id,owner:e.unref(o).params._id,sortOrder:"asc"},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[i.value==="community"?(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,user:h.state.user._id,owner:e.unref(o).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1})])):e.createCommentVNode("",!0)}},dn=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),un={class:"for-transition w-100"},pn={id:"dash",class:"pd-medium bg-grey"},mn={class:"mn-medium radius-medium pd-semi bg-white"},hn={class:"flex-nowrap flex mn-small"},_n={class:"w-100"},fn=e.createElementVNode("path",{d:"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",fill:"black"},null,-1),gn=[fn],bn=["innerHTML"],vn={class:"mn-medium radius-medium pd-semi bg-white"},yn=e.createElementVNode("h3",{class:"mn-regular"},"Команда",-1),kn={key:0},wn={class:"mn-medium radius-medium pd-semi bg-white"},$n=e.createElementVNode("h3",{class:"mn-regular"},"Подотделы",-1),En={key:0},se={__name:"Department",async setup(t){let n,o;b.useRouter();const a=b.useRoute();return[n,o]=e.withAsyncContext(()=>x.readOne(a.params._id)),await n,o(),(l,i)=>(e.openBlock(),e.createElementBlock("div",un,[e.createElementVNode("div",pn,[e.createElementVNode("section",mn,[e.createElementVNode("div",hn,[e.createElementVNode("h2",_n,e.toDisplayString(p.department.name),1),(e.openBlock(),e.createElementBlock("svg",{onClick:i[0]||(i[0]=d=>l.$router.push(`/app/organization/departments/${p.department._id}/edit`)),class:"i-regular t-transp",width:"652",height:"652",viewBox:"0 0 652 652",fill:"none",xmlns:"http://www.w3.org/2000/svg"},gn))]),e.createElementVNode("p",{class:"t-transp p-big",innerHTML:p.department.description},null,8,bn)]),e.createElementVNode("section",vn,[yn,e.createElementVNode("ul",null,[p.department.members.length<1?(e.openBlock(),e.createElementBlock("li",kn,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.department.members,(d,r)=>(e.openBlock(),e.createBlock(F,{class:"br-b br-solid br-grey",key:r,user:d.user,position:d.position,onClick:c=>l.$router.push(`/app/profile/${d.user._id}`)},null,8,["user","position","onClick"]))),128))])]),e.createElementVNode("section",wn,[$n,e.createElementVNode("ul",null,[p.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",En,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.department.subdepartments,(d,r)=>(e.openBlock(),e.createBlock(T,{onClick:c=>l.$router.push(`/app/organization/departments/${d._id}`),key:r,class:"br-b br-solid br-grey",department:d},null,8,["onClick","department"]))),128))])])])]))}},Bn=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"}));const Vn={class:"for-transition bg-white radius-big w-100"},Cn={class:"flex-v-center flex-nowrap flex pd-semi"},xn=e.createElementVNode("h2",{class:"mn-r-medium"},"Organizations",-1),Nn={class:"pd-semi"},Sn={key:1,class:"cols-3"},Ln=["onClick"],On=["src"],Pn={key:1,class:"radius-medium mn-small i-thin",width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zn=e.createElementVNode("circle",{fill:"rgb(var(--main))",cx:"21",cy:"21",r:"21"},null,-1),Dn=e.createElementVNode("path",{fill:"#242424","fill-opacity":"0.1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"},null,-1),Mn=[zn,Dn],An={class:"h4 mn-r-semi mn-small"},Tn=["onClick"],Fn=e.createElementVNode("path",{fill:"black",d:"M6.41357 11.979C9.6831 11.979 12.3901 9.26611 12.3901 6.00244C12.3901 2.73291 9.67724 0.0258789 6.40771 0.0258789C3.14404 0.0258789 0.437008 2.73291 0.437008 6.00244C0.437008 9.26611 3.1499 11.979 6.41357 11.979ZM6.41357 10.9829C3.64795 10.9829 1.43896 8.76807 1.43896 6.00244C1.43896 3.23682 3.64209 1.02197 6.40771 1.02197C9.17334 1.02197 11.3882 3.23682 11.394 6.00244C11.3999 8.76807 9.1792 10.9829 6.41357 10.9829ZM8.72802 4.36182L9.1499 3.93408C9.3374 3.74072 9.35498 3.52979 9.1792 3.34814L9.04443 3.21924C8.86865 3.0376 8.65185 3.06104 8.46435 3.24854L8.03662 3.67041L8.72802 4.36182ZM4.53271 8.53955L8.37646 4.71338L7.68505 4.02197L3.84716 7.84814L3.51318 8.62158C3.45459 8.76807 3.59521 8.89697 3.72412 8.8501L4.53271 8.53955Z"},null,-1),In=[Fn],Un={class:"t-black p-small"},jn={__name:"OrganizationsAccount",async setup(t){let n,o;h.state.user._id&&([n,o]=e.withAsyncContext(()=>m.actions.read({owner:h.state.user._id})),await n,o());const a=b.useRouter(),l=b.useRoute();let i=l.query.tab?l.query.tab:"details";const d=e.ref(i);return l.query.tab=d.value,e.watch(d,r=>{a.push({query:{...l.query,tab:r}})}),(r,c)=>(e.openBlock(),e.createElementBlock("div",Vn,[e.createElementVNode("header",Cn,[xn,e.createElementVNode("button",{onClick:c[0]||(c[0]=s=>r.$router.push({name:"Create Organization"})),class:"radius-100p i-semi hover-scale-1 cursor-pointer t-white bg-second"},"+")]),e.createElementVNode("div",Nn,[m.state.all.length<1?(e.openBlock(),e.createBlock(M,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",Sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.state.all,s=>(e.openBlock(),e.createElementBlock("div",{key:s._id,class:"mn-small radius-medium pd-medium br-2px br-solid br-grey",onClick:u=>r.$router.push({name:"Organization",params:{_id:s._id}})},[s.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.profile.photo,class:"radius-medium mn-small i-thin"},null,8,On)):(e.openBlock(),e.createElementBlock("svg",Pn,Mn)),e.createElementVNode("p",An,e.toDisplayString(s.profile.name),1),(e.openBlock(),e.createElementBlock("svg",{onClick:e.withModifiers(u=>r.$router.push({name:"Organization Edit",params:{_id:s._id}}),["stop"]),class:"t-transp hover-scale-1 z-index-1 pos-absolute pos-t-regular pos-r-regular i-medium",width:"13",height:"12",viewBox:"0 0 13 12",xmlns:"http://www.w3.org/2000/svg"},In,8,Tn)),e.createElementVNode("p",Un,e.toDisplayString(s.profile.description.slice(0,120)+"..."),1)],8,Ln))),128))]))])]))}},qn={class:"for-transition pd-thin"},Rn=e.createElementVNode("h3",{class:"mn-small"},"Type of group",-1),Hn=e.createElementVNode("p",{class:"mn-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),Zn=e.createElementVNode("h3",{class:"mn-small"},"Profile",-1),Kn={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},Wn=e.createElementVNode("h4",null,"Upload photo",-1),Yn=e.createElementVNode("h3",{class:"mn-small"},"Socials",-1),Jn=e.createElementVNode("p",{class:"mn-thin"},"Please provide only the username for social media profiles, without full links.",-1),re={__name:"OrganizationEdit",async setup(t){let n,o;const a=b.useRoute(),l=b.useRouter();m.actions.reset(),a.params._id&&([n,o]=e.withAsyncContext(()=>m.actions.read({_id:a.params._id})),await n,o());const i=e.computed(()=>m.state.current);async function d(){a.params._id?await m.actions.update(a.params._id,i.value):await m.actions.create(m.state.current,h.state.user._id)}function r(){l.replace({name:"Organization",params:{_id:m.state.current._id}})}return(c,s)=>(e.openBlock(),e.createElementBlock("div",qn,[Rn,Hn,e.createVNode(V.SelectMulti,{modelValue:m.state.current.types,"onUpdate:modelValue":s[0]||(s[0]=u=>m.state.current.types=u),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),Zn,e.createElementVNode("div",Kn,[e.createVNode(Q._sfc_main,{photo:m.state.current.profile.photo,"onUpdate:photo":s[1]||(s[1]=u=>m.state.current.profile.photo=u),uploadPath:"organizations/"+m.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),Wn]),e.createVNode(h.Field,{field:m.state.current.profile.name,"onUpdate:field":s[2]||(s[2]=u=>m.state.current.profile.name=u),placeholder:"Name of organization",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(h.Field,{field:m.state.current.profile.description,"onUpdate:field":s[3]||(s[3]=u=>m.state.current.profile.description=u),placeholder:"Brief description of your group",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(V._sfc_main,{onTagsChanged:s[4]||(s[4]=u=>m.state.current.profile.tags=u),tags:m.state.current.profile.tags},null,8,["tags"]),Yn,Jn,e.createVNode(h.Field,{field:m.state.current.socials.instagram,"onUpdate:field":s[5]||(s[5]=u=>m.state.current.socials.instagram=u),label:"Instagram",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(h.Field,{field:m.state.current.socials.twitter,"onUpdate:field":s[6]||(s[6]=u=>m.state.current.socials.twitter=u),label:"Twitter",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(h.Field,{field:m.state.current.socials.facebook,"onUpdate:field":s[7]||(s[7]=u=>m.state.current.socials.facebook=u),label:"Facebook",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(h.Field,{field:m.state.current.socials.telegram,"onUpdate:field":s[8]||(s[8]=u=>m.state.current.socials.telegram=u),label:"Telegram",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(h._sfc_main,{submit:d,callback:r,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})]))}},R=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));const Qn={class:"for-transition bg-white radius-big w-100"},Xn=e.createElementVNode("header",{class:"flex-v-center flex-nowrap flex pd-semi"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Weed dispensaries in Thailand")],-1),Gn={class:"pd-semi"},eo={key:1,class:"cols-3"},to=["onClick"],no=["src"],oo={key:1,class:"radius-medium mn-small i-thin",width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ao=e.createElementVNode("circle",{fill:"rgb(var(--main))",cx:"21",cy:"21",r:"21"},null,-1),so=e.createElementVNode("path",{fill:"#242424","fill-opacity":"0.1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"},null,-1),ro=[ao,so],lo={class:"h4 mn-r-semi mn-small"},io=["onClick"],co=e.createElementVNode("path",{fill:"black",d:"M6.41357 11.979C9.6831 11.979 12.3901 9.26611 12.3901 6.00244C12.3901 2.73291 9.67724 0.0258789 6.40771 0.0258789C3.14404 0.0258789 0.437008 2.73291 0.437008 6.00244C0.437008 9.26611 3.1499 11.979 6.41357 11.979ZM6.41357 10.9829C3.64795 10.9829 1.43896 8.76807 1.43896 6.00244C1.43896 3.23682 3.64209 1.02197 6.40771 1.02197C9.17334 1.02197 11.3882 3.23682 11.394 6.00244C11.3999 8.76807 9.1792 10.9829 6.41357 10.9829ZM8.72802 4.36182L9.1499 3.93408C9.3374 3.74072 9.35498 3.52979 9.1792 3.34814L9.04443 3.21924C8.86865 3.0376 8.65185 3.06104 8.46435 3.24854L8.03662 3.67041L8.72802 4.36182ZM4.53271 8.53955L8.37646 4.71338L7.68505 4.02197L3.84716 7.84814L3.51318 8.62158C3.45459 8.76807 3.59521 8.89697 3.72412 8.8501L4.53271 8.53955Z"},null,-1),uo=[co],po={class:"t-black p-small"},mo={__name:"Organizations",async setup(t){let n,o;h.state.user._id&&([n,o]=e.withAsyncContext(()=>m.actions.read({owner:h.state.user._id})),await n,o());const a=b.useRouter(),l=b.useRoute();let i=l.query.tab?l.query.tab:"details";const d=e.ref(i);return l.query.tab=d.value,e.watch(d,r=>{a.push({query:{...l.query,tab:r}})}),(r,c)=>(e.openBlock(),e.createElementBlock("div",Qn,[Xn,e.createElementVNode("div",Gn,[m.state.all.length<1?(e.openBlock(),e.createBlock(M,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",eo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.state.all,s=>(e.openBlock(),e.createElementBlock("div",{key:s._id,class:"mn-small radius-medium pd-medium br-2px br-solid br-grey",onClick:u=>r.$router.push({name:"Organization",params:{_id:s._id}})},[s.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.profile.photo,class:"radius-medium mn-small i-thin"},null,8,no)):(e.openBlock(),e.createElementBlock("svg",oo,ro)),e.createElementVNode("p",lo,e.toDisplayString(s.profile.name),1),(e.openBlock(),e.createElementBlock("svg",{onClick:e.withModifiers(u=>r.$router.push({name:"Organization Edit",params:{_id:s._id}}),["stop"]),class:"t-transp hover-scale-1 z-index-1 pos-absolute pos-t-regular pos-r-regular i-medium",width:"13",height:"12",viewBox:"0 0 13 12",xmlns:"http://www.w3.org/2000/svg"},uo,8,io)),e.createElementVNode("p",po,e.toDisplayString(s.profile.description.slice(0,120)+"..."),1)],8,to))),128))]))])]))}};const ho={key:0,class:"t-transp mn-r-small"},_o=["placeholder","value"],fo={key:0,class:"mn-t-thin invalid-feedback"},go={__name:"Address",props:{apiKey:{type:String,required:!0},label:null,placeholder:"Enter something here",field:null,location:{type:Object,default:{lat:48.6900735,lng:41.1620239}},address:{type:String,default:""}},emits:["update:address","update:location","update:country","update:state","update:city"],setup(t,{emit:n}){const o=t,a=e.ref(null);let l;const i=()=>{l=new google.maps.places.Autocomplete(a.value),l.addListener("place_changed",r)},d=()=>{l||i()},r=()=>{const c=l.getPlace();if(!c.geometry||!c.address_components)return;let s="",u="",f="";for(let C=0;C<c.address_components.length;C++){console.log(c.address_components);let y=c.address_components[C];y.types.includes("country")&&(s=y.long_name),y.types.includes("administrative_area_level_1")&&(u=y.long_name),y.types.includes("locality")&&(f=y.long_name)}const v=c.formatted_address,$={lat:c.geometry.location.lat(),lng:c.geometry.location.lng()};n("update:address",v),n("update:location",$),n("update:country",s),n("update:state",u),n("update:city",f)};return e.watchEffect(()=>{o.address!==a.value&&(a.value=o.address)}),e.onMounted(()=>{i()}),(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([c.$attrs.class,"flex-nowrap flex"])},[t.label?(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("span",null,e.toDisplayString(t.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("input",{ref_key:"addressInput",ref:a,class:"w-100",placeholder:t.placeholder,value:t.address,onInput:d},null,40,_o),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[c.validation?(e.openBlock(),e.createElementBlock("div",fo," * "+e.toDisplayString(c.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],2))}},bo=k._export_sfc(go,[["__scopeId","data-v-faece1a6"]]);const vo=t=>(e.pushScopeId("data-v-1c7971e5"),t=t(),e.popScopeId(),t),yo={class:"map-container"},ko=vo(()=>e.createElementVNode("svg",{class:"i-medium",width:"98",height:"98",viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",fill:"white"}),e.createElementVNode("path",{d:"M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",fill:"white"})],-1)),wo=[ko],$o={__name:"LocationMarker",props:{location:{type:Object,default:{lat:48.6900735,lng:41.1620239}},address:{type:String,default:""},apiKey:String},emits:["update:location","update:address","update:country","update:state","update:city"],setup(t,{emit:n}){const o=t,a=e.ref(null);let l,i;e.onMounted(()=>{l=new google.maps.Map(a.value,{center:o.location,zoom:15,mapTypeControl:!1,fullscreenControl:!1}),i=new google.maps.Marker({position:o.location,map:l,draggable:!0}),i.addListener("dragend",c=>{const s={lat:c.latLng.lat(),lng:c.latLng.lng()};n("update:location",s),d(s)})}),e.watchEffect(()=>{o.location&&i&&i.setPosition(new google.maps.LatLng(o.location.lat,o.location.lng))}),e.watchEffect(()=>{if(o.location&&l){const c=new google.maps.LatLng(o.location.lat,o.location.lng);l.setCenter(c)}});function d(c){new google.maps.Geocoder().geocode({location:c},(u,f)=>{if(f==="OK")if(u[0]){n("update:address",u[0].formatted_address);let v="",$="",C="";u[0].address_components.forEach(y=>{y.types.includes("country")&&(v=y.long_name),y.types.includes("administrative_area_level_1")&&($=y.long_name),y.types.includes("locality")&&(C=y.long_name)}),n("update:country",v),n("update:state",$),n("update:city",C)}else console.error("No results found");else console.error("Geocoder failed due to: "+f)})}async function r(){navigator.geolocation?navigator.geolocation.getCurrentPosition(c=>{const s={lat:c.coords.latitude,lng:c.coords.longitude};n("update:location",s),d(s)},()=>{console.error("Error getting location")}):console.error("Geolocation is not supported by this browser.")}return(c,s)=>(e.openBlock(),e.createElementBlock("div",yo,[e.createElementVNode("div",{ref_key:"mapContainer",ref:a,class:"w-100 h-100"},null,512),e.createElementVNode("button",{class:"pos-absolute pos-t-regular pos-r-regular i-semi bg-second radius-extra",onClick:r},wo)]))}},Eo=k._export_sfc($o,[["__scopeId","data-v-1c7971e5"]]);var Bo=Object.defineProperty,Vo=Object.defineProperties,Co=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,xo=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,Z=(t,n,o)=>n in t?Bo(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,S=(t,n)=>{for(var o in n||(n={}))xo.call(n,o)&&Z(t,o,n[o]);if(H)for(var o of H(n))No.call(n,o)&&Z(t,o,n[o]);return t},K=(t,n)=>Vo(t,Co(n));const So={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(t){this.autoscroll&&t&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var t;const n=((t=this.$refs.dropdownMenu)==null?void 0:t.children[this.typeAheadPointer])||!1;if(n){const o=this.getDropdownViewport(),{top:a,bottom:l,height:i}=n.getBoundingClientRect();if(a<o.top)return this.$refs.dropdownMenu.scrollTop=n.offsetTop;if(l>o.bottom)return this.$refs.dropdownMenu.scrollTop=n.offsetTop-(o.height-i)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},Lo={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let t=0;t<this.filteredOptions.length;t++)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},open(t){t&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let t=this.typeAheadPointer-1;t>=0;t--)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},typeAheadDown(){for(let t=this.typeAheadPointer+1;t<this.filteredOptions.length;t++)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},typeAheadSelect(){const t=this.filteredOptions[this.typeAheadPointer];t&&this.selectable(t)&&this.select(t)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},Oo={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(t){this.mutableLoading=t}},methods:{toggleLoading(t=null){return t==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=t}}},I=(t,n)=>{const o=t.__vccOpts||t;for(const[a,l]of n)o[a]=l;return o},Po={},zo={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},Do=e.createElementVNode("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),Mo=[Do];function Ao(t,n){return e.openBlock(),e.createElementBlock("svg",zo,Mo)}const To=I(Po,[["render",Ao]]),Fo={},Io={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Uo=e.createElementVNode("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),jo=[Uo];function qo(t,n){return e.openBlock(),e.createElementBlock("svg",Io,jo)}const Ro=I(Fo,[["render",qo]]),W={Deselect:To,OpenIndicator:Ro},Ho={mounted(t,{instance:n}){if(n.appendToBody){const{height:o,top:a,left:l,width:i}=n.$refs.toggle.getBoundingClientRect();let d=window.scrollX||window.pageXOffset,r=window.scrollY||window.pageYOffset;t.unbindPosition=n.calculatePosition(t,n,{width:i+"px",left:d+l+"px",top:r+a+o+"px"}),document.body.appendChild(t)}},unmounted(t,{instance:n}){n.appendToBody&&(t.unbindPosition&&typeof t.unbindPosition=="function"&&t.unbindPosition(),t.parentNode&&t.parentNode.removeChild(t))}};function Zo(t){const n={};return Object.keys(t).sort().forEach(o=>{n[o]=t[o]}),JSON.stringify(n)}let Ko=0;function Wo(){return++Ko}const Yo={components:S({},W),directives:{appendToBody:Ho},mixins:[So,Lo,Oo],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:t=>t},selectable:{type:Function,default:t=>!0},getOptionLabel:{type:Function,default(t){return typeof t=="object"?t.hasOwnProperty(this.label)?t[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(t)}.
2
+ https://vue-select.org/api/props.html#getoptionlabel`):t}},getOptionKey:{type:Function,default(t){if(typeof t!="object")return t;try{return t.hasOwnProperty("id")?t.id:Zo(t)}catch(n){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
3
+ https://vue-select.org/api/props.html#getoptionkey`,t,n)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(t,n,o){return(n||"").toLocaleLowerCase().indexOf(o.toLocaleLowerCase())>-1}},filter:{type:Function,default(t,n){return t.filter(o=>{let a=this.getOptionLabel(o);return typeof a=="number"&&(a=a.toString()),this.filterBy(o,a,n)})}},createOption:{type:Function,default(t){return typeof this.optionList[0]=="object"?{[this.label]:t}:t}},resetOnOptionsChange:{default:!1,validator:t=>["function","boolean"].includes(typeof t)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:t,multiple:n}){return t&&!n}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(t,n)=>t},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(t,n,{width:o,top:a,left:l}){t.style.top=a,t.style.left=l,t.style.width=o}},dropdownShouldOpen:{type:Function,default({noDrop:t,open:n,mutableLoading:o}){return t?!1:n&&!o}},uid:{type:[String,Number],default:()=>Wo()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let t=this.modelValue;return this.isTrackingValues&&(t=this.$data._value),t!=null&&t!==""?[].concat(t):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const t={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:S({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:n=>this.search=n.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:t,listFooter:t,header:K(S({},t),{deselect:this.deselect}),footer:K(S({},t),{deselect:this.deselect})}},childComponents(){return S(S({},W),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const t=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return t;const n=this.search.length?this.filter(t,this.search,this):t;if(this.taggable&&this.search.length){const o=this.createOption(this.search);this.optionExists(o)||n.unshift(o)}return n},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(t,n){const o=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(t,n,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&o()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(t){this.isTrackingValues&&this.setInternalValueFromOptions(t)}},multiple(){this.clearSelection()},open(t){this.$emit(t?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(t){Array.isArray(t)?this.$data._value=t.map(n=>this.findOptionFromReducedValue(n)):this.$data._value=this.findOptionFromReducedValue(t)},select(t){this.$emit("option:selecting",t),this.isOptionSelected(t)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(t):(this.taggable&&!this.optionExists(t)&&(this.$emit("option:created",t),this.pushTag(t)),this.multiple&&(t=this.selectedValue.concat(t)),this.updateValue(t),this.$emit("option:selected",t)),this.onAfterSelect(t)},deselect(t){this.$emit("option:deselecting",t),this.updateValue(this.selectedValue.filter(n=>!this.optionComparator(n,t))),this.$emit("option:deselected",t)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(t){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(t){typeof this.modelValue>"u"&&(this.$data._value=t),t!==null&&(Array.isArray(t)?t=t.map(n=>this.reduce(n)):t=this.reduce(t)),this.$emit("update:modelValue",t)},toggleDropdown(t){const n=t.target!==this.searchEl;n&&t.preventDefault();const o=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||o.filter(Boolean).some(a=>a.contains(t.target)||a===t.target)){t.preventDefault();return}this.open&&n?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(t){return this.selectedValue.some(n=>this.optionComparator(n,t))},isOptionDeselectable(t){return this.isOptionSelected(t)&&this.deselectFromDropdown},optionComparator(t,n){return this.getOptionKey(t)===this.getOptionKey(n)},findOptionFromReducedValue(t){const n=a=>JSON.stringify(this.reduce(a))===JSON.stringify(t),o=[...this.options,...this.pushedTags].filter(n);return o.length===1?o[0]:o.find(a=>this.optionComparator(a,this.$data._value))||t},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let t=null;this.multiple&&(t=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(t)}},optionExists(t){return this.optionList.some(n=>this.optionComparator(n,t))},normalizeOptionForSlot(t){return typeof t=="object"?t:{[this.label]:t}},pushTag(t){this.pushedTags.push(t)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:t,multiple:n}=this;this.clearSearchOnBlur({clearSearchOnSelect:t,multiple:n})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(t){const n=l=>(l.preventDefault(),!this.isComposing&&this.typeAheadSelect()),o={8:l=>this.maybeDeleteValue(),9:l=>this.onTab(),27:l=>this.onEscape(),38:l=>(l.preventDefault(),this.typeAheadUp()),40:l=>(l.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(l=>o[l]=n);const a=this.mapKeydown(o,this);if(typeof a[t.keyCode]=="function")return a[t.keyCode](t)}}},Jo=["dir"],Qo=["id","aria-expanded","aria-owns"],Xo={ref:"selectedOptions",class:"vs__selected-options"},Go=["disabled","title","aria-label","onClick"],ea={ref:"actions",class:"vs__actions"},ta=["disabled"],na={class:"vs__spinner"},oa=["id"],aa=["id","aria-selected","onMouseover","onClick"],sa={key:0,class:"vs__no-options"},ra=e.createTextVNode(" Sorry, no matching options. "),la=["id"];function ia(t,n,o,a,l,i){const d=e.resolveDirective("append-to-body");return e.openBlock(),e.createElementBlock("div",{dir:o.dir,class:e.normalizeClass(["v-select",i.stateClasses])},[e.renderSlot(t.$slots,"header",e.normalizeProps(e.guardReactiveProps(i.scope.header))),e.createElementVNode("div",{id:`vs${o.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":i.dropdownOpen.toString(),"aria-owns":`vs${o.uid}__listbox`,"aria-label":"Search for option",onMousedown:n[1]||(n[1]=r=>i.toggleDropdown(r))},[e.createElementVNode("div",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.selectedValue,(r,c)=>e.renderSlot(t.$slots,"selected-option-container",{option:i.normalizeOptionForSlot(r),deselect:i.deselect,multiple:o.multiple,disabled:o.disabled},()=>[(e.openBlock(),e.createElementBlock("span",{key:o.getOptionKey(r),class:"vs__selected"},[e.renderSlot(t.$slots,"selected-option",e.normalizeProps(e.guardReactiveProps(i.normalizeOptionForSlot(r))),()=>[e.createTextVNode(e.toDisplayString(o.getOptionLabel(r)),1)]),o.multiple?(e.openBlock(),e.createElementBlock("button",{key:0,ref_for:!0,ref:s=>l.deselectButtons[c]=s,disabled:o.disabled,type:"button",class:"vs__deselect",title:`Deselect ${o.getOptionLabel(r)}`,"aria-label":`Deselect ${o.getOptionLabel(r)}`,onClick:s=>i.deselect(r)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.childComponents.Deselect)))],8,Go)):e.createCommentVNode("",!0)]))])),256)),e.renderSlot(t.$slots,"search",e.normalizeProps(e.guardReactiveProps(i.scope.search)),()=>[e.createElementVNode("input",e.mergeProps({class:"vs__search"},i.scope.search.attributes,e.toHandlers(i.scope.search.events)),null,16)])],512),e.createElementVNode("div",ea,[e.withDirectives(e.createElementVNode("button",{ref:"clearButton",disabled:o.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:n[0]||(n[0]=(...r)=>i.clearSelection&&i.clearSelection(...r))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.childComponents.Deselect)))],8,ta),[[e.vShow,i.showClearButton]]),e.renderSlot(t.$slots,"open-indicator",e.normalizeProps(e.guardReactiveProps(i.scope.openIndicator)),()=>[o.noDrop?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.childComponents.OpenIndicator),e.normalizeProps(e.mergeProps({key:0},i.scope.openIndicator.attributes)),null,16))]),e.renderSlot(t.$slots,"spinner",e.normalizeProps(e.guardReactiveProps(i.scope.spinner)),()=>[e.withDirectives(e.createElementVNode("div",na,"Loading...",512),[[e.vShow,t.mutableLoading]])])],512)],40,Qo),e.createVNode(e.Transition,{name:o.transition},{default:e.withCtx(()=>[i.dropdownOpen?e.withDirectives((e.openBlock(),e.createElementBlock("ul",{id:`vs${o.uid}__listbox`,ref:"dropdownMenu",key:`vs${o.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:n[2]||(n[2]=e.withModifiers((...r)=>i.onMousedown&&i.onMousedown(...r),["prevent"])),onMouseup:n[3]||(n[3]=(...r)=>i.onMouseUp&&i.onMouseUp(...r))},[e.renderSlot(t.$slots,"list-header",e.normalizeProps(e.guardReactiveProps(i.scope.listHeader))),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.filteredOptions,(r,c)=>(e.openBlock(),e.createElementBlock("li",{id:`vs${o.uid}__option-${c}`,key:o.getOptionKey(r),role:"option",class:e.normalizeClass(["vs__dropdown-option",{"vs__dropdown-option--deselect":i.isOptionDeselectable(r)&&c===t.typeAheadPointer,"vs__dropdown-option--selected":i.isOptionSelected(r),"vs__dropdown-option--highlight":c===t.typeAheadPointer,"vs__dropdown-option--disabled":!o.selectable(r)}]),"aria-selected":c===t.typeAheadPointer?!0:null,onMouseover:s=>o.selectable(r)?t.typeAheadPointer=c:null,onClick:e.withModifiers(s=>o.selectable(r)?i.select(r):null,["prevent","stop"])},[e.renderSlot(t.$slots,"option",e.normalizeProps(e.guardReactiveProps(i.normalizeOptionForSlot(r))),()=>[e.createTextVNode(e.toDisplayString(o.getOptionLabel(r)),1)])],42,aa))),128)),i.filteredOptions.length===0?(e.openBlock(),e.createElementBlock("li",sa,[e.renderSlot(t.$slots,"no-options",e.normalizeProps(e.guardReactiveProps(i.scope.noOptions)),()=>[ra])])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"list-footer",e.normalizeProps(e.guardReactiveProps(i.scope.listFooter)))],40,oa)),[[d]]):(e.openBlock(),e.createElementBlock("ul",{key:1,id:`vs${o.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,la))]),_:3},8,["name"]),e.renderSlot(t.$slots,"footer",e.normalizeProps(e.guardReactiveProps(i.scope.footer)))],10,Jo)}const le=I(Yo,[["render",ia]]);const ca={class:"w-100"},da={class:"flex"},ua={class:"mn-regular"},pa={class:"flex-column flex-wrap block"},ma={key:0,class:"w-100"},ha={class:"w-100 flex-center flex-nowrap flex"},_a={class:"mn-r-regular w-100"},fa=["onClick"],ga={key:0,class:"mn-t-small mn-small w-100"},ba={__name:"EditArray",props:{name:Object,items:Array},emits:["add","remove"],setup(t,{emit:n}){b.useRouter(),b.useRoute();let o=e.reactive([]);e.toRefs(o);const a=e.ref(null),l=e.ref(null),i=e.ref(null);e.computed(()=>{if(a.value===null||i.value===null||i.value==="")return!0;if(a.value.modifications.length>0)return l.value===null});function d(r){store.commit("leftovers/deleteItemFromLeftover",r)}return(r,c)=>(e.openBlock(),e.createElementBlock("div",ca,[e.createElementVNode("div",da,[e.createElementVNode("h3",ua,e.toDisplayString(t.name),1)]),e.createElementVNode("ul",pa,[t.items.length<1?(e.openBlock(),e.createElementBlock("span",ma,"Вы еще не добавили позиции")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(s,u)=>(e.openBlock(),e.createElementBlock("li",{key:s._id,class:"w-100"},[e.createElementVNode("div",ha,[e.createElementVNode("span",_a,e.toDisplayString(s.name),1),e.createElementVNode("a",{class:"w-20 button",onClick:f=>d(s)},"Удалить",8,fa)]),u!=t.items.length-1?(e.openBlock(),e.createElementBlock("hr",ga)):e.createCommentVNode("",!0)]))),128))])]))}};const va={class:"br-grey radius-small mn-small"},ya={key:1,class:"pd-small br-grey br-1px br-solid"},ka=["disabled"],wa={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,department:Number,departments:Array,maindepartment:Object,alldepartments:Array},emits:["callback","remove"],setup(t,{emit:n}){const o=t,a=e.ref({subdepartment:null});o.department!==null&&(a.value=o.departments[o.department]);function l(c,s,u){return c.filter(f=>!(s.some(v=>v._id===f._id)||u._id===f._id))}const i=e.computed(()=>l(o.alldepartments,o.departments,o.maindepartment));async function d(){o.departments.push(a.value.subdepartment),n("callback")}async function r(){o.departments.splice(o.department,1),n("callback")}return(c,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",va,[o.department===null?(e.openBlock(),e.createBlock(e.unref(le),{key:0,modelValue:a.value.subdepartment,"onUpdate:modelValue":s[0]||(s[0]=u=>a.value.subdepartment=u),options:e.unref(i),"get-option-label":u=>u.name,class:"w-100 mn-small"},null,8,["modelValue","options","get-option-label"])):(e.openBlock(),e.createElementBlock("div",ya,e.toDisplayString(a.value.name?a.value.name:"Безымянный"),1))]),o.department===null?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!a.value.subdepartment,onClick:d,class:"w-100 button bg-second t-white"}," Добавить отдел ",8,ka)):e.createCommentVNode("",!0),o.department!==null?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:r,class:"w-100 button bg-fourth t-white"}," Удалить отдел ")):e.createCommentVNode("",!0)]))}},$a=k._export_sfc(wa,[["__scopeId","data-v-21f393e1"]]);const Ea={class:"br-grey radius-small mn-small"},Ba={key:1,class:"pd-small br-grey br-1px br-solid"},Va=["disabled"],Ca={__name:"DepartmentSubDepartmentModify",props:{isPopupOpen:Boolean,department:Number,departments:Array,maindepartment:Object,alldepartments:Array},emits:["callback","remove"],setup(t,{emit:n}){const o=t,a=e.ref({subdepartment:null});o.department!==null&&(a.value=o.departments[o.department]);function l(c,s,u){return c.filter(f=>!(s.some(v=>v._id===f._id)||u._id===f._id))}const i=e.computed(()=>l(o.alldepartments,o.departments,o.maindepartment));async function d(){o.departments.push(a.value.subdepartment),n("callback")}async function r(){o.departments.splice(o.department,1),n("callback")}return(c,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Ea,[o.department===null?(e.openBlock(),e.createBlock(e.unref(le),{key:0,modelValue:a.value.subdepartment,"onUpdate:modelValue":s[0]||(s[0]=u=>a.value.subdepartment=u),options:e.unref(i),"get-option-label":u=>u.name,class:"w-100 mn-small"},null,8,["modelValue","options","get-option-label"])):(e.openBlock(),e.createElementBlock("div",Ba,e.toDisplayString(a.value.name?a.value.name:"Безымянный"),1))]),o.department===null?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!a.value.subdepartment,onClick:d,class:"w-100 button bg-second t-white"}," Добавить отдел ",8,Va)):e.createCommentVNode("",!0),o.department!==null?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:r,class:"w-100 button bg-fourth t-white"}," Удалить отдел ")):e.createCommentVNode("",!0)]))}},xa=k._export_sfc(Ca,[["__scopeId","data-v-d3c6f191"]]);const z=t=>(e.pushScopeId("data-v-195322bd"),t=t(),e.popScopeId(),t),Na={class:"for-transition w-100"},Sa={class:"pd-b-zero pd-t-zero pd-thin"},La={class:"pd-thin"},Oa={class:"flex-nowrap flex bg-grey pd-medium radius-big"},Pa={key:0,class:"mn-r-auto"},za={key:1,class:"mn-r-auto"},Da={class:"flex-nowrap flex pd-thin"},Ma={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},Aa={class:"flex-stretch flex-column flex"},Ta={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},Fa=z(()=>e.createElementVNode("h3",{class:"mn-semi"},"Profile",-1)),Ia={class:"radius-small flex-nowrap flex"},Ua={class:"w-100 flex-child-grow-1 flex-child"},ja={class:"bg-grey pd-medium o-hidden radius-big"},qa=z(()=>e.createElementVNode("h3",{class:"mn-semi"},"Details",-1)),Ra=z(()=>e.createElementVNode("p",{class:"p-medium mn-small"},"Please the available delivery options:",-1)),Ha={class:"mn-medium flex-nowrap flex"},Za=z(()=>e.createElementVNode("p",{class:"p-medium mn-small"},"Please select the available payment methods:",-1)),Ka={class:"flex-nowrap flex"},Wa={class:"bg-grey pd-medium o-hidden radius-big"},Ya=z(()=>e.createElementVNode("h3",{class:"mn-semi"},"Location",-1)),Ja=z(()=>e.createElementVNode("p",{class:"mn-small p-medium"},"Or choose on map:",-1)),Qa={class:"flex-nowrap flex pd-thin"},Xa={__name:"DepartmentEdit",setup(t){const n=b.useRouter(),o=b.useRoute();e.ref("details"),e.ref(!1);async function a(){o.params.department&&await P.actions.read(o.params.department),e.ref(P.state.memberships),await x.read(o.params._id),o.params.department&&await x.readOne(o.params.department)}a(),e.ref(p.department.members),e.ref(!1),e.ref(null),e.ref(!1),e.ref(null);async function l(){o.params.department&&await x.update(o.params._id,p.department),o.params.department||await x.create(o.params._id,p.department)}function i(){n.replace({name:"Department",params:{_id:o.params._id,department:p.department._id}})}async function d(){await x.delete(o.params._id,p.department)}return(r,c)=>(e.openBlock(),e.createElementBlock("div",Na,[e.createElementVNode("div",Sa,[e.createVNode(G,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",La,[e.createElementVNode("header",Oa,[e.unref(o).params.department?(e.openBlock(),e.createElementBlock("h1",Pa,"Edit Spot")):(e.openBlock(),e.createElementBlock("h1",za,"Create Spot")),e.createElementVNode("section",Da,[e.createVNode(h._sfc_main,{submit:l,callback:i},{default:e.withCtx(()=>[e.createTextVNode("Save Spot")]),_:1})])])]),e.createElementVNode("div",Ma,[e.createElementVNode("div",Aa,[e.createElementVNode("div",Ta,[Fa,e.createElementVNode("div",Ia,[e.createVNode(Q._sfc_main,{photo:p.department.profile.photo,"onUpdate:photo":c[0]||(c[0]=s=>p.department.profile.photo=s),uploadPath:"organizations/"+p.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",Ua,[e.createVNode(h.Field,{field:p.department.profile.name,"onUpdate:field":c[1]||(c[1]=s=>p.department.profile.name=s),label:"Name",placeholder:"Spot Name",class:"mn-small bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(h.Field,{field:p.department.profile.description,"onUpdate:field":c[2]||(c[2]=s=>p.department.profile.description=s),label:"Description",placeholder:"Spot description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"])])])]),e.createElementVNode("div",ja,[qa,Ra,e.createElementVNode("div",Ha,[e.createVNode(V.Checkbox,{label:"Pickup",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:p.department.delivery},null,8,["radio"]),e.createVNode(V.Checkbox,{label:"Delivery",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:p.department.delivery},null,8,["radio"]),e.createVNode(V.Checkbox,{label:"Post",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:p.department.delivery},null,8,["radio"])]),Za,e.createElementVNode("div",Ka,[e.createVNode(V.Checkbox,{label:"Cash",name:"Payment",value:"cash",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:p.department.payment},null,8,["radio"]),e.createVNode(V.Checkbox,{label:"Bank Transfer",name:"Payment",value:"bank",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:p.department.payment},null,8,["radio"]),e.createVNode(V.Checkbox,{label:"Crypto",name:"Payment",value:"crypto",class:"w-100 bg-white radius-small pd-small",radio:p.department.payment},null,8,["radio"])])])]),e.createElementVNode("div",Wa,[Ya,e.createVNode(bo,{apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",address:p.department.address,location:p.department.location,label:"Address",placeholder:"Enter delivery address",class:"bg-white radius-small pd-small mn-small","onUpdate:location":c[3]||(c[3]=s=>{p.department.location=s}),"onUpdate:address":c[4]||(c[4]=s=>{p.department.address=s})},null,8,["address","location"]),Ja,e.createVNode(Eo,{address:p.department.address,location:p.department.location,apiKey:"AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",class:"radius-big o-hidden","onUpdate:location":c[5]||(c[5]=s=>{p.department.location=s}),"onUpdate:address":c[6]||(c[6]=s=>{p.department.address=s})},null,8,["address","location"])])]),e.createElementVNode("section",Qa,[e.createVNode(h._sfc_main,{submit:d,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])])]))}},ie=k._export_sfc(Xa,[["__scopeId","data-v-195322bd"]]),Y=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"})),Ga={class:"unit"},es={class:"unit-details"},ts={key:0},ns={class:"subunits"},os={__name:"Unit",props:{unit:{type:Object,required:!0},editMode:{type:Boolean,required:!0}},setup(t){const n=t,o=e.ref({...n.unit});e.watch(n.unit,()=>{o.value={...n.unit}});async function a(){emit("unit-updated",o.value)}async function l(){emit("subunit-added",n.unit._id)}return(i,d)=>{const r=e.resolveComponent("unit-component");return e.openBlock(),e.createElementBlock("div",Ga,[e.createElementVNode("div",es,[e.createElementVNode("h3",null,e.toDisplayString(t.unit.name),1),e.createElementVNode("p",null,e.toDisplayString(t.unit.description),1),t.editMode?(e.openBlock(),e.createElementBlock("div",ts,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=c=>o.value.name=c),placeholder:"Название отдела"},null,512),[[e.vModelText,o.value.name]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=c=>o.value.description=c),placeholder:"Описание отдела"},null,512),[[e.vModelText,o.value.description]]),e.createElementVNode("button",{onClick:a},"Сохранить"),e.createElementVNode("button",{onClick:l},"Добавить подотдел")])):e.createCommentVNode("",!0)]),e.createElementVNode("div",ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.unit.subunits,(c,s)=>(e.openBlock(),e.createBlock(r,{key:s,unit:c,"edit-mode":t.editMode},null,8,["unit","edit-mode"]))),128))])])}}};const as={class:"br-grey radius-small mn-small"},ss={__name:"Places",props:{isPopupOpen:Boolean,place:Number,places:Array},emits:["callback"],setup(t,{emit:n}){const o=t,a=e.ref({logo:"",name:"",address:""});o.place!==null&&(a.value=o.places[o.place]);const l=e.ref(null);async function i(){try{await j.validateInputs(l,j.validateLength,a.value.name,"Некорректное название")}catch{throw new Error}o.place!==null?(o.places[o.place]=a.value,n("callback")):(o.places.push(a.value),n("callback"))}return(d,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",as,[e.createVNode(X.Select,{options:[{name:"Кафе",value:"cafe"},{name:"Бар",value:"bar"},{name:"Ресторан",value:"restaraunt"},{name:"Пиццерия",value:"pizzeria"},{name:"Ночной клуб",value:"night-club"},{name:"Шаверма",value:"shaverma"},{name:"Кофейня",value:"coffee"}],prop:a.value,content:"type",label:"Тип",placeholder:"Тип заведения",size:"small"},null,8,["prop"]),e.createVNode(h.Field,{field:a.value.name,"onUpdate:field":r[0]||(r[0]=c=>a.value.name=c),label:"Название",validation:l.value,placeholder:"Введите название места"},null,8,["field","validation"]),e.createVNode(h.Field,{field:a.value.address,"onUpdate:field":r[1]||(r[1]=c=>a.value.address=c),label:"Адрес",validation:l.value,placeholder:"Введите адрес места"},null,8,["field","validation"]),e.createVNode(h.Field,{field:a.value.phone,"onUpdate:field":r[2]||(r[2]=c=>a.value.phone=c),label:"Телефон",validation:l.value,placeholder:"Введите телефон места"},null,8,["field","validation"])]),e.createElementVNode("button",{onClick:i,class:"w-100 button bg-second t-white"},e.toDisplayString(o.place!==null?"Редактировать заведение":"Добавить заведение"),1)]))}},rs=k._export_sfc(ss,[["__scopeId","data-v-de5143c5"]]);const ls=t=>(e.pushScopeId("data-v-20739d92"),t=t(),e.popScopeId(),t),is={class:"documents"},cs=ls(()=>e.createElementVNode("h3",{class:"mn-small"},"Список документов",-1)),ds={class:"mn-big cols-4"},us=["onClick"],ps={class:"mn-small"},ms={class:"t-semi t-transp radius-small"},hs={__name:"Documents",setup(t){b.useRouter(),b.useRoute();let n=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const o=e.ref(!1),a=e.ref(null),l=r=>{a.value=r,o.value=!0},i=()=>{o.value=!1},d=()=>{i()};return e.watchEffect(()=>{}),(r,c)=>{const s=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",is,[cs,e.createElementVNode("div",ds,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),(u,f)=>(e.openBlock(),e.createElementBlock("div",{key:f,onClick:v=>l(f),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",ps,e.toDisplayString(u.name),1),e.createElementVNode("p",ms,e.toDisplayString(u.status),1)],8,us))),128))]),e.createVNode(s,{title:"Добавить документ",onClosePopup:i,isPopupOpen:o.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n)[a.value].inputs,u=>(e.openBlock(),e.createElementBlock("div",{key:u.name},[e.createVNode(h.Field,{field:u.value,"onUpdate:field":f=>u.value=f,label:u.name,_id:u.name,placeholder:u.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:d,class:"w-100 mn-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},_s=k._export_sfc(hs,[["__scopeId","data-v-20739d92"]]);const fs={class:"for-transition bg-white radius-big w-100"},gs={class:""},bs={key:1,class:"cols-1"},vs={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(t){let n,o;const a=t,l=e.ref(null);l.value=([n,o]=e.withAsyncContext(()=>m.actions.read({owner:a.owner,user:a.user,onlyuser:a.onlyuser})),n=await n,o(),n);const i=b.useRouter(),d=b.useRoute();let r=d.query.tab?d.query.tab:"details";const c=e.ref(r);return d.query.tab=c.value,e.watch(c,s=>{i.push({query:{...d.query,tab:s}})}),(s,u)=>(e.openBlock(),e.createElementBlock("div",fs,[e.createElementVNode("div",gs,[l.value<1?(e.openBlock(),e.createBlock(M,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:s.a=()=>s.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",bs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,f=>(e.openBlock(),e.createBlock(me._sfc_main,{key:f._id,organization:f,user:h.state.user,onUpdateMembership:s.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":s.index!==l.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}},ys={};function ks(t,n){const o=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(o,null,{default:e.withCtx(({Component:a,route:l})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a)))]),_:1})}const ws=k._export_sfc(ys,[["render",ks]]),$s=[{path:"organizations",component:ws,meta:{title:{en:"Organizations",ru:"Организации"}},children:[{path:":_id",name:"Organization",meta:{title:{en:"Organization",ru:"Организация"}},component:()=>Promise.resolve().then(()=>dn)},{path:"create",name:"Create Organization",title:{en:"Create Organization",ru:"Создать Организацию"},component:()=>Promise.resolve().then(()=>R)},{path:":_id/edit",name:"Organization Edit",meta:{title:{en:"Edit Organization",ru:"Редактировать Организацию"}},component:()=>Promise.resolve().then(()=>R)},{path:":_id/departments/create",name:"Department Creation",meta:{title:"Создание отдела"},component:()=>Promise.resolve().then(()=>Y)},{path:":_id/departments/:deparment",name:"Department",meta:{title:"Отдел"},component:()=>Promise.resolve().then(()=>Bn)},{path:":_id/departments/:department/edit",name:"Department Edit",meta:{title:"Редактирование отдела"},component:()=>Promise.resolve().then(()=>Y)},{path:":_id/products/:product",name:"Product Organization",meta:{title:{en:"Product",ru:"Продукт"}},component:()=>Promise.resolve().then(()=>require("./Product-a23f852f.js"))},{path:":_id/products/:product/edit",name:"ProductEdit",component:()=>Promise.resolve().then(()=>require("./ProductEdit-171c9923.js"))},{path:":_id/products/add",name:"AddProduct",component:()=>Promise.resolve().then(()=>require("./ProductEdit-171c9923.js"))}]}];exports.Department=te;exports.DepartmentEdit=ie;exports.DepartmentMemberModify=$a;exports.DepartmentSub=T;exports.DepartmentSubDepartmentModify=xa;exports.Documents=_s;exports.Places=rs;exports.User=F;exports._sfc_main=G;exports._sfc_main$1=ae;exports._sfc_main$10=Ue;exports._sfc_main$11=ne;exports._sfc_main$12=zt;exports._sfc_main$13=ee;exports._sfc_main$14=rn;exports._sfc_main$15=oe;exports._sfc_main$16=vs;exports._sfc_main$2=se;exports._sfc_main$3=jn;exports._sfc_main$4=re;exports._sfc_main$5=mo;exports._sfc_main$6=ba;exports._sfc_main$7=os;exports._sfc_main$8=M;exports._sfc_main$9=De;exports.actions=tt;exports.actions$1=Xe;exports.invites=Dt;exports.organizations=$s;exports.state=_;exports.state$1=w;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./organizations.client-1eb0b49c.js"),r=require("./CardOrganization-1be3651b.js"),t=require("./IconEdit-823ddda9.js"),n=require("./Publics-e14d36ed.js"),i=require("./ButtonFollow-959861db.js"),a=require("./organizations-e97a0f85.js");require("vue");require("vue-router");require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-e32a3041.js");require("./auth-5a58f8cb.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Tab-6f0a4909.js");require("./inputs.validation-24ae76b9.js");require("./Feed-a2870bbf.js");require("./EmptyState-7658d7d6.js");require("./Chips-2a0d9bfe.js");require("./PlaceholderUserpic-20d58460.js");require("./Feed-a0df5d24.js");require("./UploadImage-73d66f27.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-6947e530.js"),r=require("./CardOrganization-1be3651b.js"),t=require("./IconEdit-823ddda9.js"),n=require("./Publics-e14d36ed.js"),i=require("./ButtonFollow-959861db.js"),a=require("./organizations-e97a0f85.js");require("vue");require("vue-router");require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-e32a3041.js");require("./auth-5a58f8cb.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Tab-6f0a4909.js");require("./inputs.validation-24ae76b9.js");require("./Feed-a2870bbf.js");require("./EmptyState-7658d7d6.js");require("./Chips-2a0d9bfe.js");require("./PlaceholderUserpic-20d58460.js");require("./Feed-c25dc839.js");require("./UploadImage-73d66f27.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-c7844bc2.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-21cfcf36.mjs";
2
2
  import { _ as J } from "./CardOrganization-01c2e248.mjs";
3
3
  import { _ as N } from "./IconEdit-f0ad8b9a.mjs";
4
4
  import { _ as V } from "./Publics-fcb1f708.mjs";
@@ -17,7 +17,7 @@ import "./Feed-986ddd21.mjs";
17
17
  import "./EmptyState-34d85f10.mjs";
18
18
  import "./Chips-f0b7ce36.mjs";
19
19
  import "./PlaceholderUserpic-14c6ea7e.mjs";
20
- import "./Feed-bf575b72.mjs";
20
+ import "./Feed-530e40ab.mjs";
21
21
  import "./UploadImage-a3ef4012.mjs";
22
22
  export {
23
23
  X as ButtonFollow,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./auth-5a58f8cb.js"),V=require("./_plugin-vue_export-helper-f246444f.js"),b=require("./ButtonFollow-959861db.js"),w=require("./IconEdit-823ddda9.js"),x=require("./PlaceholderUserpic-20d58460.js"),g=require("vue-router");require("./inputs.validation-24ae76b9.js");const $=require("./UploadImage-73d66f27.js");require("./auth.validation-be05e981.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"},y={__name:"Menu",setup(o){return(t,d)=>(e.openBlock(),e.createElementBlock("section",P,[e.renderSlot(t.$slots,"default")]))}},B={},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),H=[U];function S(o,t){return e.openBlock(),e.createElementBlock("svg",M,H)}const Z=V._export_sfc(B,[["render",S]]),f=e.defineComponent({setup(o,{slots:t}){return()=>{const d=t.default?t.default():[],u=[],m=[];return d.forEach(r=>{r.toString(),r.props&&r.props.icon?u.push(r):m.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}]},[...u.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"]},u)]:[],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"]},m)]),e.h(Z,{class:"i-medium mn-r-medium",type:"chevron"})])}}}),q={class:"w-100 mn-semi radius-medium pd-medium bg-main t-black"},k={__name:"ProfileCompletion",props:{user:Object,target:Object,cta:Boolean},setup(o){const{user:t,cta:d,target:u}=o,m=e.ref(0),r=p=>{let c=0,i=0;function n(s){for(let _ in s)s.hasOwnProperty(_)&&(s[_]&&typeof s[_]=="object"&&!Array.isArray(s[_])?n(s[_]):(c++,s[_]!=null&&s[_]!==""&&i++))}return n(p),c===0?0:Math.round(i/c*100)};return u&&(m.value=r(u)),(p,c)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",q,[e.createElementVNode("h3",null," Profile completed at "+e.toDisplayString(m.value)+"% ",1),o.cta?(e.openBlock(),e.createBlock(i,{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)])}}},L={},F={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I=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),z=[I];function O(o,t){return e.openBlock(),e.createElementBlock("svg",F,z)}const R=V._export_sfc(L,[["render",O]]),T={},j={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D=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=[D];function G(o,t){return e.openBlock(),e.createElementBlock("svg",j,A)}const Y=V._export_sfc(T,[["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]]),C=a.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),l=e.reactive({all:[],current:{_id:"",username:"",email:"",phone:"",profile:{name:"",photo:"",description:"",birthday:""},socials:{facebook:"",twitter:"",instagram:"",telegram:""},roles:[]}}),v={async create(o){try{const t=await C.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 C.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){console.log(o);try{const t=await C.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 C.delete(`/api/users/${o._id}`);const t=l.all.findIndex(d=>d._id===o._id);t!==-1&&l.all.splice(t,1)}catch(t){console.error(t)}}},h={set(o,t){l[t]=o},clean(){l.current={phone:"",name:"",surname:"",birthday:"",city:"",address:"",roles:[],orders:[]}}},se=Object.freeze(Object.defineProperty({__proto__:null,actions:v,mutations:h,state:l},Symbol.toStringTag,{value:"Module"}));const ne={class:"for-transition w-100"},le={_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"},ie=["src"],ce={class:""},de={class:"mn-small t-main t-semi"},ue={class:"mn-medium flex-center flex-nowrap flex"},me={class:"t-semi mn-small"},pe={key:4,class:"mn-t-small mn-thin"},_e=e.createElementVNode("span",null,"Events",-1),fe=e.createElementVNode("span",null,"Groups",-1),he=e.createElementVNode("span",null,"Posts",-1),Ce=e.createElementVNode("span",null," Settings ",-1),ge=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),N={__name:"Profile",setup(o){const t=g.useRoute(),d=g.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await v.read({_id:t.params._id,user:a.state.user._id}),u.value=!0});const m=({membership:p,isMember:c,targetId:i})=>{b.mutations.handleMembershipUpdate(l.current,p,c,i)};function r(){a.actions.logout(),d.push({name:"Sign In"})}return(p,c)=>(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",le,[e.unref(t).params._id===a.state.user._id&&u.value?(e.openBlock(),e.createBlock(k,{key:0,user:a.state.user._id,target:l.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",ae,[e.unref(t).params._id===a.state.user._id?(e.openBlock(),e.createBlock(w.IconEdit,{key:0,onClick:c[0]||(c[0]=i=>p.$router.push({name:"User Edit Profile",params:{_id:a.state.user._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),l.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:1,src:l.current.profile.photo,class:"radius-medium mn-small i-extra"},null,8,ie)):(e.openBlock(),e.createBlock(x.PlaceholderUserpic,{key:2,class:"radius-medium mn-small i-extra"})),e.createElementVNode("h3",ce,e.toDisplayString(l.current.profile.name?l.current.profile.name:"Не указан"),1),e.createElementVNode("p",de," @"+e.toDisplayString(l.current.username?l.current.username:"Не указан"),1),e.createElementVNode("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.current.roles,(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":n!==l.current.roles.length-1}])},e.toDisplayString(i.icon)+" "+e.toDisplayString(i.name),3))),256))]),e.createElementVNode("p",me," 👨‍👨‍👧‍👧 "+e.toDisplayString(l.current.numberOfMemberships)+" followers ",1),a.state.user._id&&e.unref(t).params._id&&e.unref(t).params._id!==a.state.user._id?(e.openBlock(),e.createBlock(b.ButtonFollow,{key:3,type:"user",isMember:l.current.isMember,targetId:l.current._id,userId:a.state.user._id,class:"w-min mn-auto",onUpdateMembership:m},null,8,["isMember","targetId","userId"])):e.createCommentVNode("",!0),Object.values(l.current.socials).some(i=>i)?(e.openBlock(),e.createElementBlock("h4",pe," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(w._sfc_main,{telegram:l.current.socials.telegram,facebook:l.current.socials.facebook,instagram:l.current.socials.instagram,twitter:l.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(f,{onClick:c[1]||(c[1]=i=>e.unref(d).push({name:"User Events",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(R,{class:"i-semi",icon:!0}),_e]),_:1}),e.createVNode(f,{onClick:c[2]||(c[2]=i=>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}),fe]),_:1}),e.createVNode(f,{onClick:c[3]||(c[3]=i=>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}),he]),_:1})]),_:1}),a.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(y,{key:1},{default:e.withCtx(()=>[e.createVNode(f,{onClick:c[4]||(c[4]=i=>e.unref(d).push({name:"User Edit Profile",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[Ce]),_:1}),e.createVNode(f,{class:"cursor-pointer",onClick:c[5]||(c[5]=i=>r())},{default:e.withCtx(()=>[ge]),_:1})]),_:1})):e.createCommentVNode("",!0)])]))}},ve=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));const Ve={class:"pd-medium for-transition w-100"},be=e.createElementVNode("h3",{class:"mn-small"},"Username",-1),we=e.createElementVNode("p",{class:"mn-semi"},"Your username will be used for URL of profile like thecommunephuket/users/username",-1),ye=e.createElementVNode("h3",{class:"mn-small"},"Profile",-1),ke={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},Ne=e.createElementVNode("h4",null,"Upload userpic",-1),Ee=e.createElementVNode("p",{class:"mn-thin"},"Select your birthday if you want to receive your birthday gift.",-1),xe=e.createElementVNode("h3",{class:"mn-small"},"Socials",-1),$e=e.createElementVNode("p",{class:"mn-thin"},"Please provide only the username for social media profiles, without full links.",-1),Pe=e.createElementVNode("h3",{class:"mn-small"},"Account",-1),Be=e.createElementVNode("p",{class:"mn-thin"},"If you want to change your account details please contact the administratior: admin@thecommunephuket.com",-1),E={__name:"ProfileEdit",async setup(o){let t,d;e.ref(null);const u=g.useRoute(),m=g.useRouter();[t,d]=e.withAsyncContext(()=>v.read({_id:a.state.user._id})),await t,d();const r=e.ref(l.current);async function p(){await v.update(l.current)}function c(){m.replace({name:"User Profile",params:{_id:l.current._id}})}return(i,n)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.unref(u).params._id===a.state.user._id?(e.openBlock(),e.createBlock(k,{key:0,user:a.state.user._id,target:r.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),be,e.createVNode(a.Field,{field:r.value.username,"onUpdate:field":n[0]||(n[0]=s=>r.value.username=s),label:"Username",placeholder:"Not specified",class:"mn-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:i.organizationName},null,8,["field","validation"]),we,ye,e.createElementVNode("div",ke,[e.createVNode($._sfc_main,{photo:r.value.profile.photo,"onUpdate:photo":n[1]||(n[1]=s=>r.value.profile.photo=s),uploadPath:"users/"+r.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),Ne]),e.createVNode(a.Field,{field:r.value.profile.name,"onUpdate:field":n[2]||(n[2]=s=>r.value.profile.name=s),label:"Name",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",validation:i.organizationName},null,8,["field","validation"]),e.createVNode(a.Field,{field:r.value.profile.description,"onUpdate:field":n[3]||(n[3]=s=>r.value.profile.description=s),label:"Description",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",disabled:"true",validation:i.organizationName},null,8,["field","validation"]),Ee,e.createVNode(a.Field,{field:r.value.birthday,"onUpdate:field":n[4]||(n[4]=s=>r.value.birthday=s),label:"Birthday",type:"date",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",validation:i.organizationName},null,8,["field","validation"]),xe,$e,e.createVNode(a.Field,{field:r.value.socials.instagram,"onUpdate:field":n[5]||(n[5]=s=>r.value.socials.instagram=s),label:"Instagram",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(a.Field,{field:r.value.socials.twitter,"onUpdate:field":n[6]||(n[6]=s=>r.value.socials.twitter=s),label:"Twitter",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(a.Field,{field:r.value.socials.facebook,"onUpdate:field":n[7]||(n[7]=s=>r.value.socials.facebook=s),label:"Facebook",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(a.Field,{field:r.value.socials.telegram,"onUpdate:field":n[8]||(n[8]=s=>r.value.socials.telegram=s),label:"Telegram",placeholder:"",class:"mn-semi bg-grey pd-medium radius-small"},null,8,["field"]),Pe,Be,e.createVNode(a.Field,{field:r.value.phone,"onUpdate:field":n[9]||(n[9]=s=>r.value.phone=s),label:"Phone",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium mn-thin radius-small",disabled:"true",validation:i.organizationName},null,8,["field","validation"]),e.createVNode(a.Field,{field:r.value.email,"onUpdate:field":n[10]||(n[10]=s=>r.value.email=s),label:"Email",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",disabled:!0,validation:i.organizationName},null,8,["field","validation"]),e.createVNode(a._sfc_main,{submit:p,callback:c,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode("Сохранить")]),_:1})]))}},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(()=>ve)},{path:"profile/:_id/blogposts",name:"User Blogposts",meta:{title:{en:"Posts",ru:"Посты"}},component:()=>Promise.resolve().then(()=>require("./ProfileBlogposts-8b66ae1b.js"))},{path:"profile/:_id/comments",name:"User Comments",meta:{title:{en:"Comments",ru:"Комментарии"}},component:()=>Promise.resolve().then(()=>require("./ProfileComments-e0116e5f.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:"Профиль"},component:()=>Promise.resolve().then(()=>require("./ProfileEvents-cdebd612.js"))},{path:"profile/:_id/likes",name:"User Likes",meta:{title:{en:"Likes",ru:"Лайки"}},component:()=>Promise.resolve().then(()=>require("./ProfileLikes-11ca8c11.js"))},{path:"profile/:_id/organizations",name:"User Organizations",meta:{title:{en:"Groups",ru:"Группы"}},component:()=>Promise.resolve().then(()=>require("./ProfileOrganizations-5348e892.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"),a=require("./auth-5a58f8cb.js"),V=require("./_plugin-vue_export-helper-f246444f.js"),b=require("./ButtonFollow-959861db.js"),w=require("./IconEdit-823ddda9.js"),x=require("./PlaceholderUserpic-20d58460.js"),g=require("vue-router");require("./inputs.validation-24ae76b9.js");const $=require("./UploadImage-73d66f27.js");require("./auth.validation-be05e981.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"},y={__name:"Menu",setup(o){return(t,d)=>(e.openBlock(),e.createElementBlock("section",P,[e.renderSlot(t.$slots,"default")]))}},B={},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),H=[U];function S(o,t){return e.openBlock(),e.createElementBlock("svg",M,H)}const Z=V._export_sfc(B,[["render",S]]),f=e.defineComponent({setup(o,{slots:t}){return()=>{const d=t.default?t.default():[],u=[],m=[];return d.forEach(r=>{r.toString(),r.props&&r.props.icon?u.push(r):m.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}]},[...u.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"]},u)]:[],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"]},m)]),e.h(Z,{class:"i-medium mn-r-medium",type:"chevron"})])}}}),q={class:"w-100 mn-semi radius-medium pd-medium bg-main t-black"},k={__name:"ProfileCompletion",props:{user:Object,target:Object,cta:Boolean},setup(o){const{user:t,cta:d,target:u}=o,m=e.ref(0),r=p=>{let c=0,i=0;function n(s){for(let _ in s)s.hasOwnProperty(_)&&(s[_]&&typeof s[_]=="object"&&!Array.isArray(s[_])?n(s[_]):(c++,s[_]!=null&&s[_]!==""&&i++))}return n(p),c===0?0:Math.round(i/c*100)};return u&&(m.value=r(u)),(p,c)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",q,[e.createElementVNode("h3",null," Profile completed at "+e.toDisplayString(m.value)+"% ",1),o.cta?(e.openBlock(),e.createBlock(i,{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)])}}},L={},F={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I=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),z=[I];function O(o,t){return e.openBlock(),e.createElementBlock("svg",F,z)}const R=V._export_sfc(L,[["render",O]]),T={},j={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D=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=[D];function G(o,t){return e.openBlock(),e.createElementBlock("svg",j,A)}const Y=V._export_sfc(T,[["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]]),C=a.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),l=e.reactive({all:[],current:{_id:"",username:"",email:"",phone:"",profile:{name:"",photo:"",description:"",birthday:""},socials:{facebook:"",twitter:"",instagram:"",telegram:""},roles:[]}}),v={async create(o){try{const t=await C.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 C.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){console.log(o);try{const t=await C.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 C.delete(`/api/users/${o._id}`);const t=l.all.findIndex(d=>d._id===o._id);t!==-1&&l.all.splice(t,1)}catch(t){console.error(t)}}},h={set(o,t){l[t]=o},clean(){l.current={phone:"",name:"",surname:"",birthday:"",city:"",address:"",roles:[],orders:[]}}},se=Object.freeze(Object.defineProperty({__proto__:null,actions:v,mutations:h,state:l},Symbol.toStringTag,{value:"Module"}));const ne={class:"for-transition w-100"},le={_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"},ie=["src"],ce={class:""},de={class:"mn-small t-main t-semi"},ue={class:"mn-medium flex-center flex-nowrap flex"},me={class:"t-semi mn-small"},pe={key:4,class:"mn-t-small mn-thin"},_e=e.createElementVNode("span",null,"Events",-1),fe=e.createElementVNode("span",null,"Groups",-1),he=e.createElementVNode("span",null,"Posts",-1),Ce=e.createElementVNode("span",null," Settings ",-1),ge=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),N={__name:"Profile",setup(o){const t=g.useRoute(),d=g.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await v.read({_id:t.params._id,user:a.state.user._id}),u.value=!0});const m=({membership:p,isMember:c,targetId:i})=>{b.mutations.handleMembershipUpdate(l.current,p,c,i)};function r(){a.actions.logout(),d.push({name:"Sign In"})}return(p,c)=>(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",le,[e.unref(t).params._id===a.state.user._id&&u.value?(e.openBlock(),e.createBlock(k,{key:0,user:a.state.user._id,target:l.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",ae,[e.unref(t).params._id===a.state.user._id?(e.openBlock(),e.createBlock(w.IconEdit,{key:0,onClick:c[0]||(c[0]=i=>p.$router.push({name:"User Edit Profile",params:{_id:a.state.user._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),l.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:1,src:l.current.profile.photo,class:"radius-medium mn-small i-extra"},null,8,ie)):(e.openBlock(),e.createBlock(x.PlaceholderUserpic,{key:2,class:"radius-medium mn-small i-extra"})),e.createElementVNode("h3",ce,e.toDisplayString(l.current.profile.name?l.current.profile.name:"Не указан"),1),e.createElementVNode("p",de," @"+e.toDisplayString(l.current.username?l.current.username:"Не указан"),1),e.createElementVNode("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.current.roles,(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":n!==l.current.roles.length-1}])},e.toDisplayString(i.icon)+" "+e.toDisplayString(i.name),3))),256))]),e.createElementVNode("p",me," 👨‍👨‍👧‍👧 "+e.toDisplayString(l.current.numberOfMemberships)+" followers ",1),a.state.user._id&&e.unref(t).params._id&&e.unref(t).params._id!==a.state.user._id?(e.openBlock(),e.createBlock(b.ButtonFollow,{key:3,type:"user",isMember:l.current.isMember,targetId:l.current._id,userId:a.state.user._id,class:"w-min mn-auto",onUpdateMembership:m},null,8,["isMember","targetId","userId"])):e.createCommentVNode("",!0),Object.values(l.current.socials).some(i=>i)?(e.openBlock(),e.createElementBlock("h4",pe," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(w._sfc_main,{telegram:l.current.socials.telegram,facebook:l.current.socials.facebook,instagram:l.current.socials.instagram,twitter:l.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(f,{onClick:c[1]||(c[1]=i=>e.unref(d).push({name:"User Events",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(R,{class:"i-semi",icon:!0}),_e]),_:1}),e.createVNode(f,{onClick:c[2]||(c[2]=i=>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}),fe]),_:1}),e.createVNode(f,{onClick:c[3]||(c[3]=i=>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}),he]),_:1})]),_:1}),a.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(y,{key:1},{default:e.withCtx(()=>[e.createVNode(f,{onClick:c[4]||(c[4]=i=>e.unref(d).push({name:"User Edit Profile",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[Ce]),_:1}),e.createVNode(f,{class:"cursor-pointer",onClick:c[5]||(c[5]=i=>r())},{default:e.withCtx(()=>[ge]),_:1})]),_:1})):e.createCommentVNode("",!0)])]))}},ve=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));const Ve={class:"pd-medium for-transition w-100"},be=e.createElementVNode("h3",{class:"mn-small"},"Username",-1),we=e.createElementVNode("p",{class:"mn-semi"},"Your username will be used for URL of profile like thecommunephuket/users/username",-1),ye=e.createElementVNode("h3",{class:"mn-small"},"Profile",-1),ke={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},Ne=e.createElementVNode("h4",null,"Upload userpic",-1),Ee=e.createElementVNode("p",{class:"mn-thin"},"Select your birthday if you want to receive your birthday gift.",-1),xe=e.createElementVNode("h3",{class:"mn-small"},"Socials",-1),$e=e.createElementVNode("p",{class:"mn-thin"},"Please provide only the username for social media profiles, without full links.",-1),Pe=e.createElementVNode("h3",{class:"mn-small"},"Account",-1),Be=e.createElementVNode("p",{class:"mn-thin"},"If you want to change your account details please contact the administratior: admin@thecommunephuket.com",-1),E={__name:"ProfileEdit",async setup(o){let t,d;e.ref(null);const u=g.useRoute(),m=g.useRouter();[t,d]=e.withAsyncContext(()=>v.read({_id:a.state.user._id})),await t,d();const r=e.ref(l.current);async function p(){await v.update(l.current)}function c(){m.replace({name:"User Profile",params:{_id:l.current._id}})}return(i,n)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.unref(u).params._id===a.state.user._id?(e.openBlock(),e.createBlock(k,{key:0,user:a.state.user._id,target:r.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),be,e.createVNode(a.Field,{field:r.value.username,"onUpdate:field":n[0]||(n[0]=s=>r.value.username=s),label:"Username",placeholder:"Not specified",class:"mn-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:i.organizationName},null,8,["field","validation"]),we,ye,e.createElementVNode("div",ke,[e.createVNode($._sfc_main,{photo:r.value.profile.photo,"onUpdate:photo":n[1]||(n[1]=s=>r.value.profile.photo=s),uploadPath:"users/"+r.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),Ne]),e.createVNode(a.Field,{field:r.value.profile.name,"onUpdate:field":n[2]||(n[2]=s=>r.value.profile.name=s),label:"Name",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",validation:i.organizationName},null,8,["field","validation"]),e.createVNode(a.Field,{field:r.value.profile.description,"onUpdate:field":n[3]||(n[3]=s=>r.value.profile.description=s),label:"Description",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",disabled:"true",validation:i.organizationName},null,8,["field","validation"]),Ee,e.createVNode(a.Field,{field:r.value.birthday,"onUpdate:field":n[4]||(n[4]=s=>r.value.birthday=s),label:"Birthday",type:"date",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",validation:i.organizationName},null,8,["field","validation"]),xe,$e,e.createVNode(a.Field,{field:r.value.socials.instagram,"onUpdate:field":n[5]||(n[5]=s=>r.value.socials.instagram=s),label:"Instagram",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(a.Field,{field:r.value.socials.twitter,"onUpdate:field":n[6]||(n[6]=s=>r.value.socials.twitter=s),label:"Twitter",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(a.Field,{field:r.value.socials.facebook,"onUpdate:field":n[7]||(n[7]=s=>r.value.socials.facebook=s),label:"Facebook",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(a.Field,{field:r.value.socials.telegram,"onUpdate:field":n[8]||(n[8]=s=>r.value.socials.telegram=s),label:"Telegram",placeholder:"",class:"mn-semi bg-grey pd-medium radius-small"},null,8,["field"]),Pe,Be,e.createVNode(a.Field,{field:r.value.phone,"onUpdate:field":n[9]||(n[9]=s=>r.value.phone=s),label:"Phone",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium mn-thin radius-small",disabled:"true",validation:i.organizationName},null,8,["field","validation"]),e.createVNode(a.Field,{field:r.value.email,"onUpdate:field":n[10]||(n[10]=s=>r.value.email=s),label:"Email",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",disabled:!0,validation:i.organizationName},null,8,["field","validation"]),e.createVNode(a._sfc_main,{submit:p,callback:c,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode("Сохранить")]),_:1})]))}},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(()=>ve)},{path:"profile/:_id/blogposts",name:"User Blogposts",meta:{title:{en:"Posts",ru:"Посты"}},component:()=>Promise.resolve().then(()=>require("./ProfileBlogposts-a2d04221.js"))},{path:"profile/:_id/comments",name:"User Comments",meta:{title:{en:"Comments",ru:"Комментарии"}},component:()=>Promise.resolve().then(()=>require("./ProfileComments-db4b6fbc.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:"Профиль"},component:()=>Promise.resolve().then(()=>require("./ProfileEvents-cdebd612.js"))},{path:"profile/:_id/likes",name:"User Likes",meta:{title:{en:"Likes",ru:"Лайки"}},component:()=>Promise.resolve().then(()=>require("./ProfileLikes-553c52df.js"))},{path:"profile/:_id/organizations",name:"User Organizations",meta:{title:{en:"Groups",ru:"Группы"}},component:()=>Promise.resolve().then(()=>require("./ProfileOrganizations-5348e892.js"))}];exports.Profile=N;exports.ProfileEdit=E;exports.usersRoutes=Ue;exports.usersStore=se;
@@ -561,7 +561,7 @@ const Ge = { class: "pd-medium for-transition w-100" }, De = /* @__PURE__ */ i("
561
561
  },
562
562
  component: () => import(
563
563
  /* webpackChunkName: "profile" */
564
- "./ProfileBlogposts-f90f947b.mjs"
564
+ "./ProfileBlogposts-5382274b.mjs"
565
565
  )
566
566
  }, {
567
567
  path: "profile/:_id/comments",
@@ -574,7 +574,7 @@ const Ge = { class: "pd-medium for-transition w-100" }, De = /* @__PURE__ */ i("
574
574
  },
575
575
  component: () => import(
576
576
  /* webpackChunkName: "profile" */
577
- "./ProfileComments-061ea40b.mjs"
577
+ "./ProfileComments-06985576.mjs"
578
578
  )
579
579
  }, {
580
580
  path: "profile/:_id/edit",
@@ -607,7 +607,7 @@ const Ge = { class: "pd-medium for-transition w-100" }, De = /* @__PURE__ */ i("
607
607
  },
608
608
  component: () => import(
609
609
  /* webpackChunkName: "profile" */
610
- "./ProfileLikes-e88dae8f.mjs"
610
+ "./ProfileLikes-3c5c02be.mjs"
611
611
  )
612
612
  }, {
613
613
  path: "profile/:_id/organizations",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/prometheus-framework",
3
- "version": "0.0.92",
3
+ "version": "0.0.93",
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",
@@ -109,12 +109,12 @@
109
109
  </div>
110
110
  <!-- Button -->
111
111
  <Button :submit="onSubmit" :callback="redirectTo" class="mn-thin">{{ t('signin') }}</Button>
112
- <button class="bg-black t-white w-100 button">
112
+ <!-- <button class="bg-black t-white w-100 button"> -->
113
113
  <!-- <span class="bg-fifth t-black radius-big p-small t-medium soon-label">{{ t('soon') }}</span> -->
114
- <div class=" flex-v-center flex">
114
+ <!-- <div class=" flex-v-center flex">
115
115
  <span class="mn-r-small">{{ t('signinMetamask') }}</span>
116
116
  </div>
117
- </button>
117
+ </button> -->
118
118
  </section>
119
119
  </template>
120
120
 
@@ -83,7 +83,7 @@
83
83
  let isLoading = ref(true);
84
84
 
85
85
  let skip = ref(0);
86
- let limit = ref(10);
86
+ let limit = ref(7);
87
87
 
88
88
  const loadMorePosts = async () => {
89
89
  if (hasMorePosts.value) {