2 lines
148 KiB
JavaScript
2 lines
148 KiB
JavaScript
var Xe=Object.defineProperty,Qe=Object.defineProperties;var e1=Object.getOwnPropertyDescriptors;var Ie=Object.getOwnPropertySymbols;var t1=Object.prototype.hasOwnProperty,s1=Object.prototype.propertyIsEnumerable;var Ue=(U,h,l)=>h in U?Xe(U,h,{enumerable:!0,configurable:!0,writable:!0,value:l}):U[h]=l,Ae=(U,h)=>{for(var l in h||(h={}))t1.call(h,l)&&Ue(U,l,h[l]);if(Ie)for(var l of Ie(h))s1.call(h,l)&&Ue(U,l,h[l]);return U},ze=(U,h)=>Qe(U,e1(h));var B=(U,h,l)=>new Promise((d,i)=>{var m=C=>{try{_(l.next(C))}catch(r){i(r)}},a=C=>{try{_(l.throw(C))}catch(r){i(r)}},_=C=>C.done?d(C.value):Promise.resolve(C.value).then(m,a);_((l=l.apply(U,h)).next())});import{u as pe,dG as ae,a as re,i as E,f as ie,_ as je,A as Se}from"./index.CjrDwa0W.js";import{r as L,f as o,h as s,i as e,k as t,A as F,t as p,J as fe,L as Te,b as X,a0 as o1,w as ke,o as xe,n as be,e as Ze,s as he,q as W,v as Y,x as ee,g,F as oe,m as le,T as Oe,y as Fe,V as G,W as Ve,j as de,l as se,X as Re,C as _e,Q as He,U as qe,B as l1,G as Ye}from"./vendor-vue.CmaRnji1.js";import{U as Me}from"./UploadPhoto.DgxGHiME.js";import{G as n1}from"./Givebadge.DFJBjPmb.js";import{_ as Ge}from"./AiakosEmojiPicker.D8pZj3nB.js";import{C as i1}from"./AiakosContextmenu.D-Wkww1X.js";import"./swiper.tg5sgs8j.js";import"./UploadPhoto.Bqd-ApD8.js";import{C as a1}from"./CrossFade.B9Ap6pL9.js";import"./vendor.DSdF8huI.js";const r1={class:"w-full h-full bg-[#F2F2F7]"},c1={class:"w-full h-[25.7%] flex items-end justify-center"},u1=["src"],d1={class:"w-full h-[36.5%] flex items-end justify-center"},f1={class:"w-[74%] h-[67%] flex flex-col justify-between"},h1={class:"w-full h-[25%] outline outline-2 outline-offset-[-2px] outline-black/10 rounded-[15em] px-[10em]"},m1=["placeholder"],v1={class:"w-full h-[25%] outline outline-2 outline-offset-[-2px] outline-black/10 rounded-[15em] px-[10em] flex items-center justify-between"},p1=["type","placeholder"],C1={class:"font-['SFPRO'] text-[14em] text-white"},w1={class:"w-full h-[31.5%] flex items-end justify-center"},g1={class:"font-['SFPRO'] text-[14em] text-black/30"},_1={__name:"login",emits:["changePage"],setup(U,{emit:h}){const l=pe(),d=ae(),i=L(!1),m=h,{t:a}=re(),_={username:"",password:""},C=()=>B(this,null,function*(){if(_.username===""||_.password===""){l.TriggerNotification({appname:"instashot",header:a("apps.instashot"),message:a("instashot.fillinall")});return}const r=yield ie("INSTASHOT",{action:"login",data:{username:_.username,password:_.password}});r.success?(d.MyProfileData=r.data,m("changePage","home",!0)):l.TriggerNotification({appname:"instashot",header:a("apps.instashot"),message:a(r.message)||r.message})});return(r,x)=>(s(),o("div",r1,[e("div",c1,[e("img",{src:t(E)["instashot/instatext.png"],class:"h-[20%]",alt:""},null,8,u1)]),e("div",d1,[e("div",f1,[e("div",h1,[F(e("input",{type:"text","onUpdate:modelValue":x[0]||(x[0]=u=>_.username=u),maxlength:20,placeholder:t(a)("instashot.username"),class:"font-['SFPRO'] w-full h-full text-[12em] bg-transparent border-none outline-none text-black"},null,8,m1),[[fe,_.username]])]),e("div",v1,[F(e("input",{type:i.value?"text":"password","onUpdate:modelValue":x[1]||(x[1]=u=>_.password=u),placeholder:t(a)("instashot.password"),maxlength:30,class:"font-['SFPRO'] w-[80%] h-full text-[12em] bg-transparent border-none outline-none text-black"},null,8,p1),[[Te,_.password]]),(s(),o("svg",{onClick:x[2]||(x[2]=u=>i.value=!i.value),class:"h-[25%] cursor-pointer anim-hover-1",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x[4]||(x[4]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.27031 2.46298C5.97595 1.13141 8.17944 0 10.75 0C13.3206 0 15.524 1.13141 17.2297 2.46298C18.9369 3.79576 20.1987 5.36974 20.9046 6.3595L20.9578 6.4337C21.211 6.7858 21.5 7.1878 21.5 7.75C21.5 8.3122 21.211 8.7142 20.9578 9.0663L20.9046 9.1405C20.1987 10.1303 18.9369 11.7042 17.2297 13.037C15.524 14.3686 13.3206 15.5 10.75 15.5C8.17944 15.5 5.97595 14.3686 4.27031 13.037C2.56313 11.7042 1.30126 10.1303 0.59541 9.1405L0.54219 9.0663C0.28904 8.7142 0 8.3122 0 7.75C0 7.1878 0.28904 6.7858 0.54219 6.4337L0.59541 6.3595C1.30126 5.36974 2.56313 3.79576 4.27031 2.46298ZM7.25 7.75C7.25 9.683 8.817 11.25 10.75 11.25C12.683 11.25 14.25 9.683 14.25 7.75C14.25 5.817 12.683 4.25 10.75 4.25C8.817 4.25 7.25 5.817 7.25 7.75Z",fill:"#00000060"},null,-1)])))]),e("div",{class:"w-full h-[25%] bg-[#3E5FFF] rounded-[15em] flex items-center justify-center cursor-pointer anim-hover-1",onClick:C},[e("p",C1,p(t(a)("instashot.login")),1)])])]),e("div",w1,[e("p",g1,p(t(a)("instashot.donthaveaccount")),1),e("p",{onClick:x[3]||(x[3]=u=>m("changePage","signup")),class:"font-['SFPRO'] text-[14em] text-black ml-[0.4em] cursor-pointer anim-hover-1"},p(t(a)("instashot.signup")),1)])]))}},x1={class:"w-full h-full bg-[#F2F2F7]"},y1={class:"w-full h-[19.5%] flex items-end justify-center"},b1=["src"],k1={class:"w-full h-[51.7%] flex items-end justify-center"},$1={class:"w-[74%] h-[82.5%] flex flex-col justify-between"},P1={class:"w-full h-[15%] outline outline-2 outline-offset-[-2px] outline-black/10 rounded-[15em] px-[10em]"},S1=["placeholder"],L1={class:"w-full h-[15%] outline outline-2 outline-offset-[-2px] outline-black/10 rounded-[15em] px-[10em]"},j1=["placeholder"],F1={class:"w-full h-[15%] outline outline-2 outline-offset-[-2px] outline-black/10 rounded-[15em] px-[10em] flex items-center justify-between"},M1=["type","placeholder"],T1={class:"w-full h-[15%] outline outline-2 outline-offset-[-2px] outline-black/10 rounded-[15em] px-[10em] flex items-center justify-between"},O1=["type","placeholder"],V1={class:"font-['SFPRO'] text-[14em] text-white"},H1={class:"w-full h-[22.5%] flex items-end justify-center"},Z1={class:"font-['SFPRO'] text-[12em] text-black/30"},R1={__name:"signup",emits:["changePage"],setup(U,{emit:h}){const l=h,d=pe(),{t:i}=re(),m=L(!1),a={name:"",username:"",password:"",repassword:""},_=()=>B(this,null,function*(){if(a.password!==a.repassword){d.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i("instashot.fillinall")});return}if(a.name===""||a.username===""||a.password===""){d.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i("instashot.fillinall")});return}if(a.username.length<4||a.password.length<6){d.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i("instashot.usernamemust")});return}if(a.name.length>15){d.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i("instashot.nameToLong")});return}if(a.username.length>15){d.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i("instashot.usernameToLong")});return}let C=yield ie("INSTASHOT",{action:"signup",data:{name:a.name,username:a.username,password:a.password}});C.success?(d.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i("instashot.accountCreated")}),l("changePage","login")):d.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i(C.message)||i("instashot.signupError")})});return(C,r)=>(s(),o("div",x1,[e("div",y1,[e("img",{src:t(E)["instashot/instatext.png"],class:"h-[25.5%]",alt:""},null,8,b1)]),e("div",k1,[e("div",$1,[e("div",P1,[F(e("input",{"onUpdate:modelValue":r[0]||(r[0]=x=>a.name=x),maxlength:15,type:"text",placeholder:t(i)("instashot.name"),class:"font-['SFPRO'] w-full h-full text-[12em] bg-transparent border-none outline-none text-black"},null,8,S1),[[fe,a.name]])]),e("div",L1,[F(e("input",{"onUpdate:modelValue":r[1]||(r[1]=x=>a.username=x),maxlength:15,type:"text",placeholder:t(i)("instashot.username"),class:"font-['SFPRO'] w-full h-full text-[12em] bg-transparent border-none outline-none text-black"},null,8,j1),[[fe,a.username]])]),e("div",F1,[F(e("input",{type:m.value?"text":"password","onUpdate:modelValue":r[2]||(r[2]=x=>a.password=x),placeholder:t(i)("instashot.password"),class:"font-['SFPRO'] w-[80%] h-full text-[12em] bg-transparent border-none outline-none text-black"},null,8,M1),[[Te,a.password]]),(s(),o("svg",{onClick:r[3]||(r[3]=x=>m.value=!m.value),class:"h-[25%] cursor-pointer anim-hover-1",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r[7]||(r[7]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.27031 2.46298C5.97595 1.13141 8.17944 0 10.75 0C13.3206 0 15.524 1.13141 17.2297 2.46298C18.9369 3.79576 20.1987 5.36974 20.9046 6.3595L20.9578 6.4337C21.211 6.7858 21.5 7.1878 21.5 7.75C21.5 8.3122 21.211 8.7142 20.9578 9.0663L20.9046 9.1405C20.1987 10.1303 18.9369 11.7042 17.2297 13.037C15.524 14.3686 13.3206 15.5 10.75 15.5C8.17944 15.5 5.97595 14.3686 4.27031 13.037C2.56313 11.7042 1.30126 10.1303 0.59541 9.1405L0.54219 9.0663C0.28904 8.7142 0 8.3122 0 7.75C0 7.1878 0.28904 6.7858 0.54219 6.4337L0.59541 6.3595C1.30126 5.36974 2.56313 3.79576 4.27031 2.46298ZM7.25 7.75C7.25 9.683 8.817 11.25 10.75 11.25C12.683 11.25 14.25 9.683 14.25 7.75C14.25 5.817 12.683 4.25 10.75 4.25C8.817 4.25 7.25 5.817 7.25 7.75Z",fill:"#00000060"},null,-1)])))]),e("div",T1,[F(e("input",{"onUpdate:modelValue":r[4]||(r[4]=x=>a.repassword=x),type:m.value?"text":"password",placeholder:t(i)("instashot.reenterpassword"),class:"font-['SFPRO'] w-[80%] h-full text-[12em] bg-transparent border-none outline-none text-black"},null,8,O1),[[Te,a.repassword]]),(s(),o("svg",{onClick:r[5]||(r[5]=x=>m.value=!m.value),class:"h-[25%] cursor-pointer anim-hover-1",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r[8]||(r[8]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.27031 2.46298C5.97595 1.13141 8.17944 0 10.75 0C13.3206 0 15.524 1.13141 17.2297 2.46298C18.9369 3.79576 20.1987 5.36974 20.9046 6.3595L20.9578 6.4337C21.211 6.7858 21.5 7.1878 21.5 7.75C21.5 8.3122 21.211 8.7142 20.9578 9.0663L20.9046 9.1405C20.1987 10.1303 18.9369 11.7042 17.2297 13.037C15.524 14.3686 13.3206 15.5 10.75 15.5C8.17944 15.5 5.97595 14.3686 4.27031 13.037C2.56313 11.7042 1.30126 10.1303 0.59541 9.1405L0.54219 9.0663C0.28904 8.7142 0 8.3122 0 7.75C0 7.1878 0.28904 6.7858 0.54219 6.4337L0.59541 6.3595C1.30126 5.36974 2.56313 3.79576 4.27031 2.46298ZM7.25 7.75C7.25 9.683 8.817 11.25 10.75 11.25C12.683 11.25 14.25 9.683 14.25 7.75C14.25 5.817 12.683 4.25 10.75 4.25C8.817 4.25 7.25 5.817 7.25 7.75Z",fill:"#00000060"},null,-1)])))]),e("div",{onClick:_,class:"w-full h-[15%] bg-[#3E5FFF] rounded-[15em] flex items-center justify-center cursor-pointer anim-hover-1"},[e("p",V1,p(t(i)("instashot.signup")),1)])])]),e("div",H1,[e("p",Z1,p(t(i)("instashot.alreadyhaveaccount")),1),e("p",{class:"font-['SFPRO'] text-[14em] text-black ml-[0.4em] cursor-pointer anim-hover-1",onClick:r[6]||(r[6]=x=>l("changePage","login"))},p(t(i)("instashot.login")),1)])]))}};function Be(U={}){const{getItems:h,itemHeightPercent:l=.7,overscan:d=2,loadMore:i=null,canLoadMore:m=()=>!1,isLoading:a=()=>!1,loadMoreThreshold:_=300}=U,C=pe(),r=L(null),x=L(0),u=L("top"),c=L(0),$=X(()=>{const w=h==null?void 0:h();return Array.isArray(w)?w.length:0}),P=X(()=>x.value>0?Math.round(x.value*l):250),R=o1(X(()=>({count:$.value,getScrollElement:()=>r.value,estimateSize:()=>P.value,overscan:d}))),k=X(()=>R.value.getVirtualItems()),v=X(()=>R.value.getTotalSize()),Z=()=>{r.value&&(x.value=r.value.clientHeight,be(()=>{R.value.measure()}))},D=()=>{if(!r.value||!i)return;const w=r.value,V=w.scrollTop,A=w.scrollHeight,b=w.clientHeight;A-V-b<_&&m()&&!a()&&i()},I=()=>{if(!r.value)return;const w=r.value,V=w.scrollTop,A=w.scrollHeight,b=w.clientHeight,f=A-b;c.value=f>0?V/f:0,V<=5?u.value="top":V>=f-5?u.value="bottom":u.value="middle",D()},M=w=>{const V=h==null?void 0:h();return Array.isArray(V)?V[w]:null};ke(()=>C.scale,()=>{be(()=>{Z()})}),xe(()=>{be(()=>{Z(),r.value&&r.value.addEventListener("scroll",I)}),window.addEventListener("resize",Z)}),Ze(()=>{r.value&&r.value.removeEventListener("scroll",I),window.removeEventListener("resize",Z)});const T=X(()=>u.value==="top"?"mask-bottom":u.value==="bottom"?"mask-top":u.value==="middle"?"mask-both":"");return{parentRef:r,virtualRows:k,totalSize:v,itemHeightPx:P,scrollPosition:u,scrollProgress:c,scrollMaskClass:T,getItem:M,measureContainer:Z,rowVirtualizer:R}}const B1={key:0,class:"w-full h-[470em] absolute z-[500] bottom-0 px-[6.5em] py-[6.5em]"},D1={class:"w-full h-full rounded-[35em] overflow-hidden bg-white shadow-[0px_0px_32.400001525878906px_0px_rgba(0,0,0,0.15)]"},N1={class:"w-full h-[24em] flex items-center justify-center"},I1={class:"w-full h-[20em] flex items-center justify-center"},U1={class:"text-black text-[14em] font-['SFPRO']"},A1={class:"w-full h-[41em] flex items-end justify-center"},z1={class:"w-[95%] h-[70%] rounded-[10em] bg-[#F2F2F7] flex"},E1={class:"w-[90%] h-full"},q1=["placeholder"],Y1={class:"w-full h-[365em] overflow-auto no-scrollbar"},G1=["onClick"],W1={class:"w-[95%] h-[80%] flex items-center"},K1={class:"h-full aspect-square rounded-full"},J1=["src"],X1={class:"text-black text-[12em] font-['SFPRO'] ml-[1em]"},Q1=["src"],et={__name:"sharepost",props:{show:{type:Boolean,required:!0},headername:{type:String,required:!1,default:null},users:{type:Array,required:!1,default:()=>[]},fetchData:{type:Boolean,required:!1,default:!1}},emits:["close","selectProfile"],setup(U,{emit:h}){const{t:l}=re(),d=ae(),{searchUsers:i}=he(d),m=U,a=h,_=X(()=>{var u;return(u=m.headername)!=null?u:l("instashot.sharePost")}),C=L("");let r=null;ke(C,u=>{m.fetchData&&(r&&clearTimeout(r),r=setTimeout(()=>{u.length>=2&&d.searchUsersAction(u)},300))});const x=X(()=>{if(m.fetchData)return i.value;if(!C.value.trim())return m.users;const u=C.value.toLowerCase().trim();return m.users.filter(c=>{var $,P;return(($=c.name)==null?void 0:$.toLowerCase().includes(u))||((P=c.username)==null?void 0:P.toLowerCase().includes(u))})});return(u,c)=>(s(),W(Fe,{to:"#main-container"},[Y(Oe,{name:"slide-up"},{default:ee(()=>[m.show?(s(),o("div",B1,[e("div",D1,[e("div",N1,[e("div",{onClick:c[0]||(c[0]=$=>a("close")),class:"w-[45em] h-[4em] cursor-pointer anim-hover-1 rounded-full bg-[#ACACAC]"})]),e("div",I1,[e("p",U1,p(_.value),1)]),c[3]||(c[3]=e("div",{class:"w-full h-[8em]"},null,-1)),e("div",A1,[e("div",z1,[c[2]||(c[2]=e("div",{class:"w-[11%] h-full flex items-center justify-center"},[e("svg",{class:"h-[50%]",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.50003 0C3.35786 0 0 3.35787 0 7.5C0 11.6422 3.35786 15 7.50003 15C8.94982 15 10.3036 14.5886 11.4509 13.8761C11.8838 13.6074 12.4539 13.6325 12.8142 13.9928L15.3155 16.4941C15.641 16.8195 16.1686 16.8195 16.4941 16.4941C16.8195 16.1687 16.8195 15.641 16.4941 15.3155L13.9928 12.8143C13.6325 12.454 13.6074 11.8838 13.8762 11.4509C14.5886 10.3036 15 8.94983 15 7.5C15 3.35787 11.6421 0 7.50003 0ZM1.66667 7.5C1.66667 4.27834 4.27833 1.66667 7.50003 1.66667C10.7216 1.66667 13.3334 4.27834 13.3334 7.5C13.3334 10.7217 10.7216 13.3333 7.50003 13.3333C4.27833 13.3333 1.66667 10.7217 1.66667 7.5Z",fill:"black"})])],-1)),e("div",E1,[F(e("input",{"onUpdate:modelValue":c[1]||(c[1]=$=>C.value=$),type:"text",class:"w-full h-full bg-transparent border-none outline-none text-[12em] font-['SFPRO'] placeholder:text-black/50 text-black",placeholder:t(l)("instashot.search")},null,8,q1),[[fe,C.value]])])])]),e("div",Y1,[(s(!0),o(oe,null,le(x.value,$=>(s(),o("div",{onClick:P=>a("selectProfile",$),key:$.username,class:"w-full h-[49em] flex items-end justify-center cursor-pointer anim-hover-1"},[e("div",W1,[e("div",K1,[e("img",{src:$.profilephoto,class:"w-full h-full rounded-full object-cover object-center",alt:""},null,8,J1)]),e("p",X1,p($.name),1),$.badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+$.badge+".svg"],class:"h-[25%] ml-[5em]",alt:""},null,8,Q1)):g("",!0)])],8,G1))),128))])])])):g("",!0)]),_:1})]))}},Le=je(et,[["__scopeId","data-v-11f38148"]]),tt={key:0,class:"w-full h-full bg-white"},st={class:"w-full h-[11.2%] flex items-end justify-center",delay:50},ot={class:"w-[92%] h-[40%]"},lt={class:"w-full h-[85%] flex"},nt={class:"w-[3%] h-full flex items-center justify-center",delay:100},it={class:"w-[9%] h-full flex items-center justify-center",delay:150},at=["src"],rt={class:"font-['SFPRO'] text-[13em] text-black leading-[100%]"},ct={key:0,class:"h-[50%] ml-[3em] mt-[1em]",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ut={class:"w-[20%] h-full flex items-center justify-end",delay:250},dt={class:"font-['SFPRO'] text-[12em] text-black/30 leading-[100%]"},ft={class:"w-full h-[79.4%] overflow-auto no-scrollbar"},ht={class:"w-full h-[65.3%] flex items-center justify-center px-[3em]",delay:300},mt={class:"w-[97%] h-full rounded-[22em] overflow-hidden flex items-center justify-center"},vt=["src"],pt=["src"],Ct={class:"w-full h-[8%] flex items-center justify-center"},wt={class:"w-[89%] h-[48%] flex"},gt={class:"w-[25%] h-full flex items-center justify-center"},_t={key:0,class:"h-full",viewBox:"0 0 26 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xt={key:1,class:"h-full",viewBox:"0 0 26 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yt={class:"w-[70%] h-full flex items-center justify-start"},bt={class:"font-['SFPRO'] text-[12em] text-black leading-[100%] ml-[0.5em]"},kt={class:"w-[23%] h-full flex items-center",delay:400},$t={class:"w-[70%] h-full flex items-center justify-start"},Pt={class:"font-['SFPRO'] text-[12em] text-black leading-[100%] ml-[0.5em]"},St={class:"w-[25%] h-full flex items-center",delay:450},Lt={class:"w-[70%] h-full flex items-center justify-start"},jt={class:"font-['SFPRO'] text-[12em] text-black leading-[100%] ml-[0.5em]"},Ft={key:0,class:"w-full px-[14em] pb-[10em] leading-none"},Mt={class:"font-['SFPRO'] text-[12em] text-black"},Tt={class:"font-semibold"},Ot={key:0,class:"font-['SFPRO'] text-[10em] text-black/50 mt-[0.5em]"},Vt=["delay"],Ht={class:"w-[13.5%] flex items-start min-h-[43em] max-h-[43em] p-[6em]"},Zt=["src"],Rt={class:"w-[78.5%] h-full"},Bt={class:"w-full h-[24em] flex items-end"},Dt=["onClick"],Nt={class:"font-['SFPRO'] text-[10em] text-black/60 leading-[100%] ml-[0.4em]"},It={key:0,class:"h-[45%] ml-[2.5em]",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ut={class:"w-full inline-flex py-[2em]"},At={class:"font-['SFPRO'] text-[11em] text-black leading-[100%]"},zt=["onClick"],Et={key:0,class:"h-[10em]",viewBox:"0 0 19 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qt={key:1,class:"h-[10em]",viewBox:"0 0 19 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Yt={class:"font-['SFPRO'] text-[10em] text-black leading-[100%] mt-[0.5em]"},Gt={class:"w-full bg-white shadow-[0px_-4px_20px_rgba(0,0,0,0.15)]",style:{height:"250em"}},Wt={class:"w-[15.5%] h-[44em] flex items-center justify-center p-[3em]"},Kt=["src"],Jt={class:"w-[81%] h-[44em] outline outline-1 outline-offset-[-1px] outline-[#F2F2F7] rounded-full flex"},Xt={class:"w-[85%] h-full"},Qt=["placeholder"],We={__name:"post",emits:["close","selectProfile"],setup(U,{emit:h}){const{t:l}=re(),d=h,i=ae(),m=pe(),{selectedPost:a,PostComments:_,MyProfileData:C}=he(i),r=L(!1),x=L(!1),u=L(!1),c=()=>{u.value=!u.value},$=b=>{v.value+=b},P=b=>{if(!b)return"";const f=new Date(b),Q=new Date-f,me=Math.floor(Q/6e4),ce=Math.floor(Q/36e5),z=Math.floor(Q/864e5);return me<1?l("general.now"):me<60?`${me} ${l("general.minute")}`:ce<24?`${ce} ${l("general.hour")}`:z<7?`${z} ${l("general.day")}`:f.toLocaleDateString()};xe(()=>B(this,null,function*(){var b;if((b=a.value)!=null&&b.id){const f=yield ie("INSTASHOT",{action:"getpostcomments",data:{postId:a.value.id}});f.success&&i.GetPostComments({postId:a.value.id,comments:f.comments||[]})}}));const R=()=>B(this,null,function*(){a.value&&(yield ie("INSTASHOT",{action:"likepost",data:{postId:a.value.id}}))}),k=b=>B(this,null,function*(){a.value&&(yield ie("INSTASHOT",{action:"likecomment",data:{postId:a.value.id,commentId:b}}))}),v=L(""),Z=()=>B(this,null,function*(){!v.value.trim()||!a.value||(u.value&&(u.value=!1),yield ie("INSTASHOT",{action:"sendcomment",data:{postId:a.value.id,comment:v.value.trim()}}),v.value="")}),D=()=>{x.value=!0},I=()=>B(this,null,function*(){if(x.value=!1,!!a.value)try{const b=yield ie("INSTASHOT",{action:"deletepost",data:{postId:a.value.id}});b&&b.success?(m.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l("instashot.postDeleted")}),yield i.fetchPosts(!0),C.value&&a.value.username===C.value.username&&(yield i.fetchProfilePosts(C.value.username,!0)),w()):m.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l(b==null?void 0:b.message)||(b==null?void 0:b.message)||l("instashot.failedToDeletePost")})}catch(b){m.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l("instashot.errorDeletingPost")})}}),M=()=>{x.value=!1},T=X(()=>C.value&&a.value&&C.value.username===a.value.username),w=()=>{i.ClearPostComments(),i.clearSelectedPost(),d("close")},V=b=>{w(),d("selectProfile",b)},A=b=>B(this,null,function*(){!a.value||!b||(yield i.sendPostMessage(b,a.value),r.value=!1)});return(b,f)=>{var we;const j=G("motion-fade"),Q=G("motion-pop"),me=G("motion-slide-left"),ce=G("motion-slide-top"),z=G("motion-slide-bottom");return t(a)?(s(),o("div",tt,[Y(Le,{show:r.value,onClose:f[0]||(f[0]=J=>r.value=!1),fetchData:!0,onSelectProfile:A},null,8,["show"]),F((s(),o("div",st,[e("div",ot,[e("div",lt,[F((s(),o("div",nt,[(s(),o("svg",{onClick:w,class:"h-full cursor-pointer anim-hover-1",viewBox:"0 0 11 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f[4]||(f[4]=[e("path",{d:"M9.414 0.707031L1.41406 8.70707L9.41406 16.7071",stroke:"black","stroke-width":"2","stroke-miterlimit":"16"},null,-1)])))])),[[j]]),f[6]||(f[6]=e("div",{class:"w-[4.5%] h-full"},null,-1)),F((s(),o("div",it,[e("img",{src:t(a).profilephoto,class:"h-full aspect-square object-cover object-center rounded-full",alt:""},null,8,at)])),[[Q]]),f[7]||(f[7]=e("div",{class:"w-[3%] h-full"},null,-1)),F((s(),o("div",{onClick:f[1]||(f[1]=J=>V(t(a).username)),class:"w-[60%] h-full flex items-center cursor-pointer anim-hover-1",delay:200},[e("p",rt,p(t(a).name),1),t(a).badge>0?(s(),o("svg",ct,f[5]||(f[5]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.64936 0.290182C6.28791 -0.0967273 5.67445 -0.0967273 5.313 0.290182L4.42655 1.23836C4.24582 1.43118 3.99064 1.53745 3.72655 1.52791L2.43027 1.484C1.90082 1.46618 1.46682 1.90018 1.48464 2.42964L1.52855 3.72718C1.53745 3.99127 1.43182 4.24645 1.23836 4.42718L0.290182 5.313C-0.0967273 5.67445 -0.0967273 6.28855 0.290182 6.65L1.23836 7.53645C1.43182 7.71718 1.53745 7.97173 1.52855 8.23645L1.484 9.53336C1.46682 10.0628 1.90082 10.4968 2.43027 10.479L3.72718 10.4351C3.99127 10.4262 4.24645 10.5318 4.42718 10.7246L5.313 11.6728C5.67509 12.0604 6.28855 12.0604 6.65064 11.6728L7.53709 10.7246C7.71718 10.5318 7.97236 10.4255 8.23645 10.4351L9.53336 10.479C10.0628 10.4968 10.4975 10.0628 10.479 9.53336L10.4357 8.23582C10.4262 7.97173 10.5325 7.71718 10.7253 7.53645L11.6735 6.65C12.0604 6.28855 12.0604 5.67445 11.6735 5.313L10.7253 4.42655C10.5325 4.24645 10.4262 3.99127 10.4357 3.72655L10.479 2.42964C10.4975 1.90018 10.0628 1.46618 9.53336 1.484L8.23645 1.52855C7.97236 1.53682 7.71718 1.43118 7.53645 1.23836L6.64936 0.290182ZM2.94764 6.251L5.12973 8.43245L8.74618 4.48318L7.889 3.68964L5.089 6.741L3.77045 5.42245L2.94764 6.251Z",fill:"#0D71F0"},null,-1)]))):g("",!0)])),[[me]]),F((s(),o("div",ut,[e("p",dt,p(P(t(a).date)),1)])),[[j]])])])])),[[ce]]),e("div",ft,[F((s(),o("div",ht,[e("div",mt,[t(m).isVideo(t(a).media)?(s(),o("video",{key:1,src:t(a).media,class:"w-full h-full object-cover object-center",controls:""},null,8,pt)):(s(),o("img",{key:0,src:t(a).media,class:"w-full h-full object-cover object-center",alt:""},null,8,vt))])])),[[j]]),e("div",Ct,[e("div",wt,[F((s(),o("div",{onClick:R,class:"w-[25%] h-full flex items-center cursor-pointer anim-hover-1",delay:350},[e("div",gt,[t(a).isLiked?(s(),o("svg",xt,f[9]||(f[9]=[e("path",{d:"M10.8125 20.2123C7.52099 17.751 1 12.1239 1 7.06018C1 3.71323 3.45614 1 6.83333 1C8.58333 1 10.3333 1.58333 12.6667 3.91667C15 1.58333 16.75 1 18.5 1C21.8771 1 24.3333 3.71323 24.3333 7.06018C24.3333 12.1239 17.8124 17.751 14.5208 20.2123C13.4132 21.0405 11.9201 21.0405 10.8125 20.2123Z",fill:"#FF3B30",stroke:"#FF3B30","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(s(),o("svg",_t,f[8]||(f[8]=[e("path",{d:"M10.8125 20.2123C7.52099 17.751 1 12.1239 1 7.06018C1 3.71323 3.45614 1 6.83333 1C8.58333 1 10.3333 1.58333 12.6667 3.91667C15 1.58333 16.75 1 18.5 1C21.8771 1 24.3333 3.71323 24.3333 7.06018C24.3333 12.1239 17.8124 17.751 14.5208 20.2123C13.4132 21.0405 11.9201 21.0405 10.8125 20.2123Z",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])))]),e("div",yt,[e("p",bt,p(t(a).likeCount||0),1)])])),[[j]]),F((s(),o("div",kt,[f[10]||(f[10]=e("div",{class:"w-[25%] h-full flex items-center justify-center"},[e("svg",{class:"h-full",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M0.999838 12.0833C0.999838 18.2045 5.96202 23.1667 12.0832 23.1667C13.9826 23.1667 15.7705 22.6888 17.3332 21.8468C19.5128 20.6723 20.9794 21.7642 22.2729 21.9601C22.4691 21.9898 22.6646 21.9186 22.8049 21.7783C23.0179 21.5653 23.0584 21.236 22.9408 20.9586C22.4331 19.7621 21.9669 17.4946 22.6025 15.5833C22.9684 14.4832 23.1665 13.3063 23.1665 12.0833C23.1665 5.96217 18.2043 1 12.0832 1C5.96202 1 0.999838 5.96217 0.999838 12.0833Z",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),e("div",$t,[e("p",Pt,p(t(a).commentCount||0),1)])])),[[j]]),F((s(),o("div",St,[e("div",{onClick:f[2]||(f[2]=J=>r.value=!0),class:"w-[25%] h-full flex items-center justify-center"},f[11]||(f[11]=[e("svg",{class:"h-full",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M12.0833 13.2539L16.1667 9.17057M12.0833 13.2539L2.02169 10.9937C0.741163 10.7026 0.63446 8.91957 1.87114 8.4779L22.5768 1.08301C23.6197 0.710557 24.6266 1.71752 24.2542 2.7604L16.8593 23.4661C16.4176 24.7028 14.6346 24.5961 14.3435 23.3156L12.0833 13.2539Z",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),e("div",Lt,[e("p",jt,p(t(a).sharecount||0),1)])])),[[j]]),T.value?F((s(),o("div",{key:0,onClick:D,class:"w-[27%] h-full flex items-center justify-end cursor-pointer anim-hover-1",delay:500},f[12]||(f[12]=[e("svg",{class:"h-[80%]",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M22.5615 6.54297L21.8477 18.2061C21.7571 19.6861 21.6892 20.7919 21.5527 21.6611C21.4149 22.5381 21.2087 23.1639 20.8506 23.6826C20.4919 24.2021 20.031 24.6403 19.4971 24.9688C18.9741 25.2906 18.3587 25.4572 17.5088 25.543H10.4688C9.61761 25.457 9.00191 25.2892 8.47852 24.9668C7.94409 24.6376 7.48262 24.1992 7.12402 23.6787C6.76602 23.1591 6.56054 22.5326 6.42383 21.6543C6.28834 20.7838 6.22139 19.6764 6.13281 18.1943L5.43652 6.54297H22.5615Z",stroke:"black","stroke-width":"2"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.572 1.49526C16.2313 1.55422 16.8509 1.75542 17.383 2.15226C17.7765 2.44576 18.0499 2.80502 18.2835 3.19411C18.4999 3.55467 18.7178 4.00421 18.9649 4.51416L19.4628 5.54118H24.5002C25.1445 5.54118 25.6668 6.06352 25.6668 6.70784C25.6668 7.35218 25.1445 7.87451 24.5002 7.87451C17.4999 7.87451 10.5004 7.87451 3.50016 7.87451C2.85584 7.87451 2.3335 7.35218 2.3335 6.70784C2.3335 6.06352 2.85584 5.54118 3.50016 5.54118H8.64488L9.05998 4.63055C9.30097 4.10181 9.5132 3.63615 9.72638 3.26249C9.95634 2.85944 10.2286 2.48646 10.6269 2.1809C11.1655 1.76767 11.7976 1.55817 12.4717 1.4968C12.9792 1.4506 13.4908 1.45696 14.0002 1.45778C14.5961 1.45873 15.1318 1.45589 15.572 1.49526ZM11.2092 5.54118H16.8698C16.6053 4.99589 16.4362 4.65028 16.2829 4.39493C16.0585 4.02121 15.7897 3.85739 15.3641 3.81932C15.0616 3.79226 14.6674 3.79118 14.0404 3.79118C13.3978 3.79118 12.9933 3.7923 12.6832 3.82052C12.2468 3.86026 11.9747 4.03032 11.753 4.4188C11.6078 4.67338 11.4497 5.01416 11.2092 5.54118Z",fill:"black"})],-1)]))),[[j]]):g("",!0)])]),t(a).content?(s(),o("div",Ft,[e("p",Mt,[e("span",Tt,p(t(a).username),1),Ve(" "+p(t(a).content),1)]),t(a).location?(s(),o("p",Ot,p(t(a).location),1)):g("",!0)])):g("",!0),(s(!0),o(oe,null,le(t(_).comments,(J,te)=>F((s(),o("div",{key:J.id,class:"w-full inline-flex px-[10em]",delay:550+te*50},[e("div",Ht,[e("img",{src:J.profilephoto,class:"object-cover aspect-square h-[85%] object-center rounded-full",alt:""},null,8,Zt)]),e("div",Rt,[e("div",Bt,[e("p",{onClick:ge=>V(J.username),class:"font-['SFPRO'] text-[13em] text-black leading-[100%] cursor-pointer anim-hover-1"},p(J.name),9,Dt),e("p",Nt,p(P(J.date)),1),J.badge>0?(s(),o("svg",It,f[13]||(f[13]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.64936 0.290182C6.28791 -0.0967273 5.67445 -0.0967273 5.313 0.290182L4.42655 1.23836C4.24582 1.43118 3.99064 1.53745 3.72655 1.52791L2.43027 1.484C1.90082 1.46618 1.46682 1.90018 1.48464 2.42964L1.52855 3.72718C1.53745 3.99127 1.43182 4.24645 1.23836 4.42718L0.290182 5.313C-0.0967273 5.67445 -0.0967273 6.28855 0.290182 6.65L1.23836 7.53645C1.43182 7.71718 1.53745 7.97173 1.52855 8.23645L1.484 9.53336C1.46682 10.0628 1.90082 10.4968 2.43027 10.479L3.72718 10.4351C3.99127 10.4262 4.24645 10.5318 4.42718 10.7246L5.313 11.6728C5.67509 12.0604 6.28855 12.0604 6.65064 11.6728L7.53709 10.7246C7.71718 10.5318 7.97236 10.4255 8.23645 10.4351L9.53336 10.479C10.0628 10.4968 10.4975 10.0628 10.479 9.53336L10.4357 8.23582C10.4262 7.97173 10.5325 7.71718 10.7253 7.53645L11.6735 6.65C12.0604 6.28855 12.0604 5.67445 11.6735 5.313L10.7253 4.42655C10.5325 4.24645 10.4262 3.99127 10.4357 3.72655L10.479 2.42964C10.4975 1.90018 10.0628 1.46618 9.53336 1.484L8.23645 1.52855C7.97236 1.53682 7.71718 1.43118 7.53645 1.23836L6.64936 0.290182ZM2.94764 6.251L5.12973 8.43245L8.74618 4.48318L7.889 3.68964L5.089 6.741L3.77045 5.42245L2.94764 6.251Z",fill:"#0D71F0"},null,-1)]))):g("",!0)]),e("div",Ut,[e("p",At,p(J.comment),1)])]),e("div",{onClick:ge=>k(J.id),class:"w-[6%] h-full min-h-[43em] max-h-[43em] flex flex-col justify-center items-center cursor-pointer anim-hover-1"},[J.isLiked?(s(),o("svg",qt,f[15]||(f[15]=[e("path",{d:"M7.75892 14.4731C5.40785 12.715 0.75 8.69567 0.75 5.0787C0.75 2.68802 2.50438 0.75 4.91667 0.75C6.16667 0.75 7.41667 1.16667 9.08333 2.83333C10.75 1.16667 12 0.75 13.25 0.75C15.6622 0.75 17.4167 2.68802 17.4167 5.0787C17.4167 8.69567 12.7588 12.715 10.4077 14.4731C9.61658 15.0647 8.55008 15.0647 7.75892 14.4731Z",fill:"#FF3B30",stroke:"#FF3B30","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(s(),o("svg",Et,f[14]||(f[14]=[e("path",{d:"M7.75892 14.4731C5.40785 12.715 0.75 8.69567 0.75 5.0787C0.75 2.68802 2.50438 0.75 4.91667 0.75C6.16667 0.75 7.41667 1.16667 9.08333 2.83333C10.75 1.16667 12 0.75 13.25 0.75C15.6622 0.75 17.4167 2.68802 17.4167 5.0787C17.4167 8.69567 12.7588 12.715 10.4077 14.4731C9.61658 15.0647 8.55008 15.0647 7.75892 14.4731Z",stroke:"black","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))),e("p",Yt,p(J.likeCount||0),1)],8,zt)],8,Vt)),[[me]])),128)),f[16]||(f[16]=e("div",{class:"w-full h-[50em]"},null,-1))]),u.value?(s(),o("div",{key:0,class:"absolute bottom-0 left-0 right-0 z-40 transition-transform duration-300 ease-out px-[10em]",style:de({transform:u.value?"translateY(0)":"translateY(250em)"})},[e("div",Gt,[Y(Ge,{show:u.value,onSelectEmoji:$,onClose:c},null,8,["show"])])],4)):g("",!0),F((s(),o("div",{class:se([u.value?"bottom-[250em]":"bottom-0","w-full h-[58em] flex items-center px-[10em] pb-[8em] absolute bg-white transition-all duration-300 z-30"]),delay:100},[e("div",Wt,[e("img",{src:(we=t(C))==null?void 0:we.profilephoto,class:"object-cover h-[32em] w-[32em] object-center rounded-full",alt:""},null,8,Kt)]),e("div",Jt,[e("div",Xt,[F(e("input",{"onUpdate:modelValue":f[3]||(f[3]=J=>v.value=J),onKeyup:Re(Z,["enter"]),type:"text",class:"w-full h-full text-[13em] pl-[1em] outline-none border-none placeholder:text-black/50 text-black",placeholder:t(l)("instashot.startTheConversation")},null,40,Qt),[[fe,v.value]])]),e("div",{onClick:c,class:"w-[15%] h-full flex items-center justify-center cursor-pointer anim-hover-1"},f[17]||(f[17]=[e("svg",{class:"h-[35%]",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M9.99999 20C11.366 20 12.652 19.7385 13.8578 19.2156C15.0637 18.6928 16.1274 17.9706 17.049 17.049C17.9706 16.1274 18.6928 15.0637 19.2156 13.8578C19.7385 12.652 20 11.366 20 9.99999C20 8.63398 19.7385 7.34803 19.2156 6.14214C18.6928 4.93627 17.9706 3.87255 17.049 2.95097C16.1274 2.02941 15.0621 1.30719 13.8529 0.784313C12.6438 0.261438 11.3562 0 9.99018 0C8.62417 0 7.33823 0.261438 6.13235 0.784313C4.92646 1.30719 3.86437 2.02941 2.94607 2.95097C2.02778 3.87255 1.30719 4.93627 0.784313 6.14214C0.261438 7.34803 0 8.63398 0 9.99999C0 11.366 0.261438 12.652 0.784313 13.8578C1.30719 15.0637 2.02941 16.1274 2.95097 17.049C3.87255 17.9706 4.93627 18.6928 6.14214 19.2156C7.34803 19.7385 8.63398 20 9.99999 20ZM9.99999 18.3333C8.84313 18.3333 7.76143 18.1176 6.7549 17.6863C5.74836 17.2549 4.86437 16.6585 4.10293 15.8971C3.3415 15.1356 2.74673 14.2517 2.31862 13.2451C1.89052 12.2386 1.67647 11.1569 1.67647 9.99999C1.67647 8.84313 1.89052 7.76143 2.31862 6.7549C2.74673 5.74836 3.33987 4.86274 4.09803 4.09803C4.8562 3.33333 5.73855 2.73692 6.74509 2.30882C7.75163 1.88072 8.83332 1.66667 9.99018 1.66667C11.1471 1.66667 12.2288 1.88072 13.2353 2.30882C14.2418 2.73692 15.1274 3.33333 15.8922 4.09803C16.6569 4.86274 17.2549 5.74836 17.6863 6.7549C18.1176 7.76143 18.3333 8.84313 18.3333 9.99999C18.3333 11.1569 18.1193 12.2386 17.6912 13.2451C17.263 14.2517 16.6683 15.1356 15.9068 15.8971C15.1454 16.6585 14.2598 17.2549 13.2499 17.6863C12.2402 18.1176 11.1569 18.3333 9.99999 18.3333ZM9.99018 14.9117C10.6699 14.9117 11.268 14.7892 11.7843 14.5441C12.3007 14.299 12.701 14.018 12.9853 13.701C13.2696 13.384 13.4118 13.1176 13.4118 12.902C13.4118 12.7843 13.3644 12.7026 13.2696 12.6568C13.1748 12.6111 13.0752 12.6111 12.9705 12.6568C12.6176 12.8529 12.2108 13.0408 11.75 13.2205C11.2892 13.4003 10.7026 13.4902 9.99018 13.4902C9.27777 13.4902 8.69117 13.4003 8.23038 13.2205C7.7696 13.0408 7.35947 12.8529 7 12.6568C6.89542 12.6111 6.79738 12.6111 6.70588 12.6568C6.61437 12.7026 6.56862 12.7843 6.56862 12.902C6.56862 13.1176 6.71078 13.384 6.99509 13.701C7.2794 14.018 7.67973 14.299 8.19606 14.5441C8.71241 14.7892 9.31045 14.9117 9.99018 14.9117ZM7.07842 9.12744C7.39215 9.12744 7.66666 9.00163 7.90195 8.74999C8.13725 8.49835 8.2549 8.17646 8.2549 7.78431C8.2549 7.39215 8.13725 7.06862 7.90195 6.81372C7.66666 6.55882 7.39215 6.43136 7.07842 6.43136C6.77123 6.43136 6.50326 6.55882 6.2745 6.81372C6.04574 7.06862 5.93136 7.39215 5.93136 7.78431C5.93136 8.17646 6.04574 8.49835 6.2745 8.74999C6.50326 9.00163 6.77123 9.12744 7.07842 9.12744ZM12.8921 9.12744C13.2058 9.12744 13.4803 9.00163 13.7157 8.74999C13.951 8.49835 14.0686 8.17646 14.0686 7.78431C14.0686 7.39215 13.951 7.06862 13.7157 6.81372C13.4803 6.55882 13.2058 6.43136 12.8921 6.43136C12.5849 6.43136 12.317 6.55882 12.0882 6.81372C11.8594 7.06862 11.7451 7.39215 11.7451 7.78431C11.7451 8.17646 11.8594 8.49835 12.0882 8.74999C12.317 9.00163 12.5849 9.12744 12.8921 9.12744Z",fill:"black","fill-opacity":"0.8"})],-1)]))])],2)),[[z]]),x.value?(s(),W(Se,{key:1,header:t(l)("apps.instashot"),label:t(l)("instashot.deletePostConfirm"),buttons:{cancel:t(l)("general.cancel"),submit:t(l)("general.delete")},onCancel:M,onSubmit:I},null,8,["header","label","buttons"])):g("",!0)])):g("",!0)}}},es={class:"w-full h-full bg-[#FFFFFF]"},ts={key:2,delay:100,class:"w-full h-[10.5%] flex items-end justify-between px-[14em]"},ss={class:"w-[70%] h-[27%] flex items-center"},os={class:"font-['SFPRO'] tracking-tight font-[500] text-[14em] text-black"},ls={key:1,class:"h-[60%] ml-[2em] mt-[1em]",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ns=["src"],is=["src"],as={class:"w-[30%] h-[27%] flex items-center justify-end"},rs={key:3,delay:200,class:"w-full h-[11.8%] flex items-end justify-center"},cs={class:"w-[91%] h-[75%] flex justify-between"},us={delay:300,class:"w-[21%] h-full relative flex items-center justify-center"},ds=["src"],fs={class:"w-[74.2%] h-full flex flex-col justify-between"},hs={class:"w-full h-[40%] flex items-center"},ms={class:"font-['SFPRO'] tracking-tight font-[600] text-[14em] text-black/70"},vs={class:"w-full h-[54%] flex justify-between"},ps={delay:350,class:"w-[26%] flex flex-col items-end h-full"},Cs={class:"w-full h-[40%] flex items-start"},ws={class:"font-['SFPRO'] font-[400] text-[14em] text-black"},gs={class:"w-full h-[60%] flex items-end"},_s={class:"font-['SFPRO'] font-[500] leading-none text-[10em] text-black"},xs={class:"w-full h-[40%] flex items-start"},ys={class:"font-['SFPRO'] font-[400] text-[14em] text-black"},bs={class:"w-full h-[60%] flex items-end"},ks={class:"font-['SFPRO'] font-[500] leading-none text-[10em] text-black truncate"},$s={class:"w-full h-[40%] flex items-start"},Ps={class:"font-['SFPRO'] font-[400] text-[14em] text-black"},Ss={class:"w-full h-[60%] flex items-end"},Ls={class:"font-['SFPRO'] font-[500] text-[10em] leading-none text-black"},js={key:4,class:"w-full flex flex-col items-center"},Fs={class:"w-full inline-flex items-end justify-center"},Ms={class:"w-[90%] min-h-[30em] rounded-[10em] border-[1em] border-[#0000001A] flex items-center justify-center"},Ts=["placeholder"],Os={key:5,class:"w-full flex flex-col items-center"},Vs={class:"w-[90%]"},Hs={class:"font-['SFPRO'] text-[12em] text-black tracking-tight leading-[130%]"},Zs={key:6,delay:500,class:"w-full h-[9.4%] flex items-center justify-center"},Rs={class:"font-['SFPRO'] tracking-tight leading-none font-[500] text-[13em]"},Bs={key:1,class:"w-[90%] h-[50%] rounded-[10em] flex items-center justify-between"},Ds={class:"font-['SFPRO'] text-[14em] text-black"},Ns={class:"font-['SFPRO'] text-[14em] text-black"},Is={key:0,class:"w-full h-[200em] flex items-center justify-center"},Us={class:"text-[12em] font-['SFPRO'] text-black/50 font-[400]"},As={key:0,class:"w-full h-[calc(100%-1em)] flex gap-[1em]"},zs=["onClick"],Es=["src"],qs={key:1,class:"w-full h-full relative"},Ys=["src"],Gs={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},Ws={class:"w-[35em] h-[35em] rounded-full flex items-center justify-center"},Ks=["src"],Js={class:"w-full h-[20em] flex items-center justify-center"},Xs={key:0,class:"flex items-center justify-center"},Ee=3,Qs={__name:"profile",emits:["selectProfile","goBack","selectPost"],setup(U,{emit:h}){const l=pe(),d=ae(),{ScrollPage:i,MyProfileData:m}=he(d),{PhoneData:a}=he(l),_=X(()=>{const y=i.value.profilePosts.loadedData,n=[];for(let q=0;q<y.length;q+=Ee)n.push(y.slice(q,q+Ee));return n}),{parentRef:C,virtualRows:r,totalSize:x,scrollPosition:u,getItem:c}=Be({getItems:()=>_.value,itemHeightPercent:.25,overscan:3,loadMore:()=>d._getProfileDataActions(i.value.profilePosts.username).loadMore(),canLoadMore:()=>i.value.profilePosts.isInitialized&&i.value.profilePosts.hasMore&&!i.value.profilePosts.isLoading,isLoading:()=>i.value.profilePosts.isLoading,loadMoreThreshold:200}),$=h,P=y=>{$("selectPost",y)},R=()=>d.hasProfileHistory(),k=()=>{$("goBack")},{t:v}=re(),Z=L(!1),D=L(""),I=L(!1),M=L(!1),T=L(!1),w=L(!1),V=L(!1),A=L(!1),b=y=>B(this,null,function*(){var ne;if(!y||y<1||y>3)return;const n=(ne=i.value.profilePosts.profile)==null?void 0:ne.username;if(!n)return;const q=yield d.updateBadge(n,y);q!=null&&q.success?(I.value=!1,l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v("instashot.badgeGiven")})):l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v(q==null?void 0:q.message)||(q==null?void 0:q.message)||v("instashot.badgeNotGiven")})}),f=()=>B(this,null,function*(){var q;const y=(q=i.value.profilePosts.profile)==null?void 0:q.username;if(!y)return;const n=yield d.updateBadge(y,0);n!=null&&n.success?l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v("instashot.badgeRemoved")}):l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v(n==null?void 0:n.message)||(n==null?void 0:n.message)||v("instashot.badgeNotRemoved")})}),j=()=>B(this,null,function*(){const y=yield d.logout();y!=null&&y.success?l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v("instashot.loggedOut")}):l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v(y==null?void 0:y.message)||(y==null?void 0:y.message)||v("instashot.logoutError")})}),Q=()=>B(this,null,function*(){var q;const y=(q=i.value.profilePosts.profile)==null?void 0:q.username;if(!y)return;const n=yield d.deleteProfile(y);n!=null&&n.success?(A.value=!1,l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v("instashot.profileDeleted")})):l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v(n==null?void 0:n.message)||(n==null?void 0:n.message)||v("instashot.profileNotDeleted")})}),me=()=>B(this,null,function*(){const y=yield ie("INSTASHOT",{action:"followProfile",data:{username:i.value.profilePosts.profile.username}});y.success?(d.invalidateStoryCache(),d.fetchStories(!0)):l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v(y.message)||y.message})}),ce=L(v("instashot.follow")),z=y=>B(this,null,function*(){const n=yield ie("INSTASHOT",{action:"GetFollowAction",data:{value:y,username:i.value.profilePosts.profile.username}});n.success?(y==="followers"?ce.value=v("instashot.followers"):ce.value=v("instashot.following"),T.value=n.users):l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v(n.message)||n.message})}),we=y=>{T.value=!1,$("selectProfile",y.username)},J=y=>B(this,null,function*(){const n=i.value.profilePosts.profile;yield d.sendProfileToUser(y,n),M.value=!1}),te=L(!1),ge=y=>B(this,null,function*(){if(te.value=!1,!y)return;const n=yield d.updateProfilePhoto(y);n.success?l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v("instashot.profilePhotoUpdated")}):l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v(n.message)||n.message||v("instashot.errorUpdatingPhoto")})}),$e=()=>B(this,null,function*(){if(Z.value){const y=i.value.profilePosts.profile.bio||"";if(D.value!==y){const n=yield d.updateBio(D.value);n.success?l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v("instashot.bioUpdated")}):l.TriggerNotification({appname:"instashot",header:v("apps.instashot"),message:v(n.message)||n.message||v("instashot.errorUpdatingBio")})}Z.value=!1}else D.value=i.value.profilePosts.profile.bio||"",Z.value=!0});return(y,n)=>{const q=G("motion-fade"),ne=G("motion-pop"),ve=G("motion-slide-visible-bottom"),H=G("motion-slide-visible-left"),O=G("motion-slide-top"),S=G("motion-slide-visible-right");return s(),o("div",es,[Y(Me,{show:te.value,onSelectPhoto:ge,onCancel:n[0]||(n[0]=N=>te.value=!1)},null,8,["show"]),Y(n1,{show:I.value,onCancel:n[1]||(n[1]=N=>I.value=!1),onVerify:b,onTakebadge:f},null,8,["show"]),Y(Le,{show:M.value,onClose:n[2]||(n[2]=N=>M.value=!1),fetchData:!0,onSelectProfile:J},null,8,["show"]),Y(Le,{show:T.value,headername:ce.value,onClose:n[3]||(n[3]=N=>T.value=!1),users:T.value,onSelectProfile:we},null,8,["show","headername","users"]),Y(We,{show:w.value,onClose:n[4]||(n[4]=N=>w.value=!1)},null,8,["show"]),V.value?(s(),W(Se,{key:0,onClose:n[5]||(n[5]=N=>V.value=!1),buttons:{cancel:t(v)("general.cancel"),submit:t(v)("general.accept")},header:t(v)("general.areYouSure"),label:t(v)("instashot.areyousurelogout"),onCancel:n[6]||(n[6]=N=>V.value=!1),onSubmit:j},null,8,["buttons","header","label"])):g("",!0),A.value?(s(),W(Se,{key:1,onClose:n[7]||(n[7]=N=>A.value=!1),buttons:{cancel:t(v)("general.cancel"),submit:t(v)("general.accept")},header:t(v)("general.areYouSure"),label:t(v)("instashot.areyousuredelete"),onCancel:n[8]||(n[8]=N=>A.value=!1),onSubmit:Q},null,8,["buttons","header","label"])):g("",!0),t(i).profilePosts.profile?F((s(),o("div",ts,[e("div",ss,[R()?(s(),o("svg",{key:0,onClick:k,class:"h-[70%] mr-[8em] cursor-pointer anim-hover-1",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[17]||(n[17]=[e("path",{d:"M15 18L9 12L15 6",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):g("",!0),e("p",os,p(t(i).profilePosts.profile.username),1),t(i).profilePosts.profile.badge===1?(s(),o("svg",ls,n[18]||(n[18]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.49909 0.414545C8.98273 -0.138182 8.10636 -0.138182 7.59 0.414545L6.32364 1.76909C6.06545 2.04455 5.70091 2.19636 5.32364 2.18273L3.47182 2.12C2.71545 2.09455 2.09545 2.71455 2.12091 3.47091L2.18364 5.32455C2.19636 5.70182 2.04545 6.06636 1.76909 6.32455L0.414545 7.59C-0.138182 8.10636 -0.138182 8.98364 0.414545 9.5L1.76909 10.7664C2.04545 11.0245 2.19636 11.3882 2.18364 11.7664L2.12 13.6191C2.09545 14.3755 2.71545 14.9955 3.47182 14.97L5.32455 14.9073C5.70182 14.8945 6.06636 15.0455 6.32454 15.3209L7.59 16.6755C8.10727 17.2291 8.98364 17.2291 9.50091 16.6755L10.7673 15.3209C11.0245 15.0455 11.3891 14.8936 11.7664 14.9073L13.6191 14.97C14.3755 14.9955 14.9964 14.3755 14.97 13.6191L14.9082 11.7655C14.8945 11.3882 15.0464 11.0245 15.3218 10.7664L16.6764 9.5C17.2291 8.98364 17.2291 8.10636 16.6764 7.59L15.3218 6.32364C15.0464 6.06636 14.8945 5.70182 14.9082 5.32364L14.97 3.47091C14.9964 2.71455 14.3755 2.09455 13.6191 2.12L11.7664 2.18364C11.3891 2.19545 11.0245 2.04455 10.7664 1.76909L9.49909 0.414545ZM4.21091 8.93L7.32818 12.0464L12.4945 6.40455L11.27 5.27091L7.27 9.63L5.38636 7.74636L4.21091 8.93Z",fill:"#0D71F0"},null,-1)]))):t(i).profilePosts.profile.badge===2?(s(),o("img",{key:2,src:t(E)["twix/2.svg"],class:"h-[60%] ml-[2em] mt-[1em]",alt:""},null,8,ns)):t(i).profilePosts.profile.badge===3?(s(),o("img",{key:3,src:t(E)["twix/3.svg"],class:"h-[60%] ml-[2em] mt-[1em]",alt:""},null,8,is)):g("",!0)]),e("div",as,[t(a).isAdmin?(s(),o("svg",{key:0,onClick:n[9]||(n[9]=N=>I.value=!0),class:"h-[75%] mr-[7em] cursor-pointer anim-hover-1",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[19]||(n[19]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.8739 0.518182C11.2284 -0.172727 10.133 -0.172727 9.4875 0.518182L7.90455 2.21136C7.58182 2.55568 7.12614 2.74545 6.65455 2.72841L4.33977 2.65C3.39432 2.61818 2.61932 3.39318 2.65114 4.33864L2.72955 6.65568C2.74545 7.12727 2.55682 7.58295 2.21136 7.90568L0.518182 9.4875C-0.172727 10.133 -0.172727 11.2295 0.518182 11.875L2.21136 13.458C2.55682 13.7807 2.74545 14.2352 2.72955 14.708L2.65 17.0239C2.61932 17.9693 3.39432 18.7443 4.33977 18.7125L6.65568 18.6341C7.12727 18.6182 7.58295 18.8068 7.90568 19.1511L9.4875 20.8443C10.1341 21.5364 11.2295 21.5364 11.8761 20.8443L13.4591 19.1511C13.7807 18.8068 14.2364 18.617 14.708 18.6341L17.0239 18.7125C17.9693 18.7443 18.7455 17.9693 18.7125 17.0239L18.6352 14.7068C18.6182 14.2352 18.808 13.7807 19.1523 13.458L20.8455 11.875C21.5364 11.2295 21.5364 10.133 20.8455 9.4875L19.1523 7.90455C18.808 7.58295 18.6182 7.12727 18.6352 6.65455L18.7125 4.33864C18.7455 3.39318 17.9693 2.61818 17.0239 2.65L14.708 2.72955C14.2364 2.74432 13.7807 2.55568 13.458 2.21136L11.8739 0.518182ZM5.26364 11.1625L9.16023 15.058L15.6182 8.00568L14.0875 6.58864L9.0875 12.0375L6.73295 9.68295L5.26364 11.1625Z",fill:"black"},null,-1)]))):g("",!0),t(a).isAdmin?(s(),o("svg",{key:1,onClick:n[10]||(n[10]=N=>A.value=!0),class:"h-[75%] cursor-pointer anim-hover-1 mr-[7em]",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[20]||(n[20]=[e("path",{d:"M19.1865 5.75L18.584 15.5957C18.5062 16.8665 18.4477 17.8062 18.332 18.543C18.2156 19.2843 18.0447 19.797 17.7549 20.2168C17.4586 20.6459 17.0775 21.0071 16.6367 21.2783C16.2153 21.5376 15.7138 21.6774 15 21.75H8.98047C8.26581 21.6772 7.76346 21.5371 7.3418 21.2773C6.9008 21.0057 6.51973 20.6436 6.22363 20.2139C5.93394 19.7934 5.763 19.2803 5.64746 18.5381C5.5326 17.8002 5.47549 16.8588 5.39941 15.5859L4.81152 5.75H19.1865Z",stroke:"black","stroke-width":"2"},null,-1),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.3473 1.28277C13.9124 1.33331 14.4435 1.50576 14.8996 1.84591C15.2369 2.09748 15.4712 2.40542 15.6714 2.73893C15.8569 3.04798 16.0437 3.4333 16.2555 3.8704L16.6823 4.7507H21C21.5523 4.7507 22 5.19842 22 5.7507C22 6.30299 21.5523 6.7507 21 6.7507C14.9998 6.7507 9.00019 6.7507 3 6.7507C2.44772 6.7507 2 6.30299 2 5.7507C2 5.19842 2.44772 4.7507 3 4.7507H7.40976L7.76556 3.97016C7.97212 3.51696 8.15403 3.11782 8.33676 2.79754C8.53387 2.45207 8.76721 2.13237 9.10861 1.87046C9.57032 1.51626 10.1121 1.33669 10.6899 1.28409C11.1249 1.24449 11.5634 1.24994 12 1.25064C12.5108 1.25146 12.97 1.24902 13.3473 1.28277ZM9.60776 4.7507H14.4597C14.233 4.28331 14.088 3.98707 13.9566 3.7682C13.7643 3.44787 13.5339 3.30745 13.1691 3.27482C12.9098 3.25163 12.5719 3.2507 12.0345 3.2507C11.4837 3.2507 11.137 3.25166 10.8712 3.27585C10.4971 3.30991 10.2639 3.45568 10.0739 3.78866C9.94941 4.00687 9.81387 4.29897 9.60776 4.7507Z",fill:"black"},null,-1)]))):g("",!0),(s(),o("svg",{onClick:n[11]||(n[11]=N=>V.value=!0),class:"h-[75%] cursor-pointer anim-hover-1",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[21]||(n[21]=[e("path",{d:"M8.752 7.40023e-05C9.6317 -5.99767e-06 10.2188 -0.0066261 10.7188 0.127024C11.7398 0.400054 12.5826 1.08807 13.0645 2.00104C14.1985 2.00271 15.1509 2.01518 15.9248 2.11921C16.8526 2.24395 17.672 2.51583 18.3281 3.17194C18.9842 3.82805 19.2561 4.64743 19.3809 5.57526C19.5017 6.47429 19.5 7.61423 19.5 9.00005V11.5001C19.5 12.886 19.5017 14.0259 19.3809 14.9249C19.2561 15.8527 18.9842 16.6721 18.3281 17.3282C17.672 17.9843 16.8526 18.2562 15.9248 18.381C15.1507 18.485 14.198 18.4965 13.0635 18.4982C12.582 19.41 11.7406 20.0969 10.7207 20.3702C10.2198 20.5045 9.6317 20.4982 8.75 20.4982H6.68555C5.3225 20.4982 4.2233 20.4982 3.3584 20.382C2.4583 20.2609 1.70054 20.0014 1.09863 19.3995C0.496781 18.7976 0.237221 18.0398 0.116211 17.1398C-2.90647e-05 16.2749 -2.90439e-05 15.1756 9.56093e-07 13.8126V6.68561C-2.90439e-05 5.32277 -4.90621e-05 4.22325 0.116211 3.35846C0.237241 2.45858 0.496861 1.70052 1.09863 1.0987C1.70042 0.497074 2.45855 0.238314 3.3584 0.117254C4.22844 0.000263989 5.33568 0.000174002 6.70996 7.40023e-05H8.752ZM13.4951 4.00104C13.4983 4.22554 13.5 4.47243 13.5 4.74811V5.8819C12.5051 5.21449 11.1548 5.44183 10.4385 6.41413C10.0891 6.88853 9.9559 7.45507 10.0166 7.99811H6.75C5.58521 7.99811 4.62731 8.88355 4.51172 10.0177L4.5 10.2482C4.5 11.4908 5.50736 12.4982 6.75 12.4982H10.0156C9.9547 13.041 10.089 13.6074 10.4385 14.0821C11.1549 15.0548 12.5049 15.2815 13.5 14.6134V15.7482C13.5 16.0249 13.4984 16.2728 13.4951 16.4982C14.4157 16.493 15.1064 16.4737 15.6582 16.3995C16.3643 16.3046 16.6915 16.1367 16.9141 15.9142C17.1366 15.6916 17.3045 15.3644 17.3994 14.6583C17.4982 13.9235 17.5 12.9423 17.5 11.5001V9.00005C17.5 7.55785 17.4982 6.57664 17.3994 5.84186C17.3045 5.13581 17.1366 4.80857 16.9141 4.586C16.6915 4.36343 16.3643 4.19558 15.6582 4.10065C15.1064 4.0265 14.4157 4.00616 13.4951 4.00104ZM11.4453 7.15729C11.7727 6.71283 12.3981 6.61731 12.8428 6.9444L12.8438 6.94538L12.8457 6.94733C12.8473 6.94849 12.8498 6.95019 12.8525 6.95221C12.858 6.95627 12.8662 6.96152 12.876 6.96882C12.8958 6.98362 12.9241 7.00522 12.96 7.03229C13.0319 7.08663 13.134 7.16471 13.2559 7.25983C13.4986 7.44924 13.8254 7.71168 14.1553 7.99811C14.4801 8.28015 14.8311 8.60525 15.1084 8.91905C15.2461 9.07485 15.3873 9.25215 15.499 9.43755C15.5943 9.59555 15.75 9.88945 15.75 10.2501C15.75 10.6107 15.5943 10.9046 15.499 11.0626C15.3873 11.248 15.2461 11.4254 15.1084 11.5812C14.8311 11.895 14.4801 12.22 14.1553 12.5021C13.8254 12.7885 13.4986 13.0509 13.2559 13.2403C13.134 13.3355 13.0319 13.4136 12.96 13.4679C12.9241 13.495 12.8958 13.5166 12.876 13.5314C12.8662 13.5387 12.858 13.5439 12.8525 13.548C12.8498 13.55 12.8473 13.5517 12.8457 13.5528L12.8438 13.5548L12.8428 13.5558C12.3981 13.8829 11.7727 13.7874 11.4453 13.3429C11.1383 12.9259 11.2024 12.3501 11.5781 12.0099L11.6572 11.9445H11.6582C11.659 11.9438 11.6604 11.9428 11.6621 11.9415C11.6661 11.9386 11.6724 11.934 11.6807 11.9278C11.6973 11.9154 11.7226 11.8966 11.7549 11.8722C11.8196 11.8233 11.913 11.7519 12.0254 11.6642C12.1727 11.5492 12.3494 11.4057 12.5371 11.2501H6.75C6.19772 11.2501 5.75 10.8024 5.75 10.2501C5.75007 9.69785 6.19776 9.25005 6.75 9.25005H12.5371C12.3494 9.09445 12.1727 8.95095 12.0254 8.83605C11.913 8.74835 11.8196 8.67685 11.7549 8.62795C11.7226 8.60365 11.6973 8.58475 11.6807 8.57235C11.6724 8.56615 11.6661 8.56155 11.6621 8.55865C11.6604 8.55735 11.659 8.55635 11.6582 8.55575L11.6572 8.55475C11.2126 8.22721 11.1178 7.60198 11.4453 7.15729Z",fill:"black"},null,-1)])))])])),[[q]]):g("",!0),t(i).profilePosts.profile?F((s(),o("div",rs,[e("div",cs,[F((s(),o("div",us,[Z.value?(s(),o("svg",{key:0,onClick:n[12]||(n[12]=N=>te.value=!0),class:"h-[50%] absolute cursor-pointer anim-hover-1",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[22]||(n[22]=[e("rect",{width:"32",height:"32",rx:"16",fill:"#F2F2F7"},null,-1),e("g",{opacity:"0.5"},[e("path",{d:"M17.4143 8.29297C18.0411 8.29298 18.6265 8.60632 18.9743 9.12793L20.0843 10.793H22.6665C23.9322 10.793 24.9582 11.819 24.9582 13.0846V21.418C24.9582 22.6836 23.9322 23.7096 22.6665 23.7096H9.33317C8.06752 23.7096 7.0415 22.6836 7.0415 21.418V13.0846C7.0415 11.819 8.06752 10.793 9.33317 10.793H11.9154L13.0254 9.12793C13.3731 8.60632 13.9586 8.29298 14.5854 8.29297H17.4143ZM15.9998 12.668C13.6986 12.668 11.8332 14.5335 11.8332 16.8346C11.8332 19.1358 13.6986 21.0013 15.9998 21.0013C18.301 21.0013 20.1665 19.1358 20.1665 16.8346C20.1665 14.5335 18.301 12.668 15.9998 12.668ZM15.9998 14.3346C17.3806 14.3346 18.4998 15.4539 18.4998 16.8346C18.4998 18.2154 17.3806 19.3346 15.9998 19.3346C14.6191 19.3346 13.4998 18.2154 13.4998 16.8346C13.4998 15.4539 14.6191 14.3346 15.9998 14.3346ZM21.8332 13.0846C21.3729 13.0846 20.9998 13.4577 20.9998 13.918V13.9261C20.9998 14.3864 21.3729 14.7595 21.8332 14.7595C22.2934 14.7595 22.6665 14.3864 22.6665 13.9261V13.918C22.6665 13.4577 22.2934 13.0846 21.8332 13.0846Z",fill:"black"})],-1)]))):g("",!0),e("img",{src:t(i).profilePosts.profile.profilephoto,class:"h-full aspect-square rounded-full object-cover object-center",alt:""},null,8,ds)])),[[ne]]),e("div",fs,[e("div",hs,[e("p",ms,p(t(i).profilePosts.profile.name),1)]),e("div",vs,[F((s(),o("div",ps,[e("div",Cs,[e("p",ws,p(t(i).profilePosts.profile.postCount),1)]),e("div",gs,[e("p",_s,p(t(v)("instashot.posts")),1)])])),[[ve]]),F((s(),o("div",{delay:400,class:"w-[33%] flex flex-col h-full cursor-pointer",onClick:n[13]||(n[13]=N=>z("followers"))},[e("div",xs,[e("p",ys,p(t(i).profilePosts.profile.followerCount),1)]),e("div",bs,[e("p",ks,p(t(v)("instashot.followers")),1)])])),[[ve]]),F((s(),o("div",{delay:450,class:"w-[33%] flex flex-col h-full cursor-pointer",onClick:n[14]||(n[14]=N=>z("following"))},[e("div",$s,[e("p",Ps,p(t(i).profilePosts.profile.followingCount),1)]),e("div",Ss,[e("p",Ls,p(t(v)("instashot.following")),1)])])),[[ve]])])])])])),[[H]]):g("",!0),Z.value?F((s(),o("div",js,[n[23]||(n[23]=e("div",{class:"w-full h-[15em]"},null,-1)),e("div",Fs,[e("div",Ms,[F(e("input",{"onUpdate:modelValue":n[15]||(n[15]=N=>D.value=N),type:"text",maxlength:250,placeholder:t(v)("instashot.bio"),class:"w-[95%] h-[60%] bg-transparent outline-none font-['SFPRO'] tracking-tight text-[12em] placeholder:text-black/50 text-black"},null,8,Ts),[[fe,D.value]])])])])),[[O]]):t(i).profilePosts.profile&&t(i).profilePosts.profile.bio?(s(),o("div",Os,[n[24]||(n[24]=e("div",{class:"w-full h-[22em]"},null,-1)),e("div",Vs,[e("p",Hs,p(t(i).profilePosts.profile.bio),1)])])):g("",!0),t(i).profilePosts.profile?F((s(),o("div",Zs,[t(m)&&t(m).username==t(i).profilePosts.profile.username?(s(),o("div",{key:0,onClick:$e,class:se([Z.value?"bg-[#3E5FFF] text-white":"bg-[#F2F2F7] text-black","w-[90%] h-[50%] rounded-[10em] flex items-center justify-center cursor-pointer anim-hover-1"])},[e("p",Rs,p(Z.value?t(v)("instashot.saveProfile"):t(v)("instashot.editprofile")),1)],2)):(s(),o("div",Bs,[e("div",{onClick:me,class:"h-[100%] w-[48%] bg-[#F2F2F7] rounded-[10em] flex items-center justify-center cursor-pointer anim-hover-1"},[e("p",Ds,p(t(i).profilePosts.profile.isFollowing?t(v)("instashot.unfollow"):t(v)("instashot.follow")),1)]),e("div",{onClick:n[16]||(n[16]=N=>M.value=!0),class:"h-[100%] w-[48%] bg-[#F2F2F7] rounded-[10em] flex items-center justify-center cursor-pointer anim-hover-1"},[e("p",Ns,p(t(v)("instashot.share")),1)])]))])),[[S]]):g("",!0),F((s(),o("div",{ref_key:"parentRef",ref:C,delay:600,class:se(["w-full h-[68%] overflow-auto no-scrollbar",[t(u)==="top"?"mask-bottom":"",t(u)==="middle"?"mask-both":"",t(u)==="bottom"?"mask-top":""]])},[t(i).profilePosts.loadedData.length===0&&!t(i).profilePosts.isLoading?(s(),o("div",Is,[e("p",Us,p(t(v)("instashot.noPostsYet")),1)])):g("",!0),t(i).profilePosts.loadedData.length>0?(s(),o("div",{key:1,style:de({height:`${t(x)}px`,width:"100%",position:"relative"})},[(s(!0),o(oe,null,le(t(r),N=>(s(),o("div",{key:N.key,style:de({position:"absolute",top:0,left:0,width:"100%",height:`${N.size}px`,transform:`translateY(${N.start}px)`})},[t(c)(N.index)?(s(),o("div",As,[(s(!0),o(oe,null,le(t(c)(N.index),(K,Ce)=>(s(),o("div",{key:K.id,onClick:ye=>P(K.id),class:"w-[calc(33.33%-0.67em)] h-full cursor-pointer anim-hover-1 overflow-hidden"},[t(l).isVideo(K.media)?(s(),o("div",qs,[e("video",{class:"w-full h-full object-cover transition-all duration-300",src:K.media,preload:"metadata",muted:""},p(t(v)("instashot.browserNoVideo")),9,Ys),e("div",Gs,[e("div",Ws,[e("img",{src:t(E)["photos/play.svg"],class:"h-[100%]",alt:""},null,8,Ks)])])])):(s(),o("img",{key:0,src:K.media,class:"w-full h-full object-cover cursor-pointer object-center"},null,8,Es))],8,zs))),128))])):g("",!0)],4))),128))],4)):g("",!0),e("div",Js,[t(i).profilePosts.isLoading?(s(),o("div",Xs,n[25]||(n[25]=[e("div",{class:"w-[20em] h-[20em] border-2 border-black/20 border-t-black rounded-full animate-spin"},null,-1)]))):g("",!0)]),n[26]||(n[26]=e("div",{class:"w-full h-[100em]"},null,-1))],2)),[[q]])])}}},eo=je(Qs,[["__scopeId","data-v-fc767fe9"]]),to={class:"w-full h-full z-[50] relative bg-black"},so={class:"w-full h-full absolute z-[1]"},oo=["src"],lo={key:1,class:"w-full h-full overflow-hidden relative"},no=["src"],io={class:"w-full h-full absolute z-[2]"},ao={class:"w-full h-[74em] flex items-end px-[20em]"},ro={class:"w-full h-[36em] flex items-center justify-center relative z-[10]"},co=["placeholder"],uo={class:"w-full h-[44em] flex items-end justify-center"},fo={key:0,class:"font-['SFPRO'] text-[14em] text-white"},ho={key:1,class:"w-[16em] h-[16em] border-2 border-white/30 border-t-white rounded-full animate-spin"},mo={__name:"newstory",props:{show:{type:Boolean,default:!1},storyData:{type:String,default:""}},emits:["close"],setup(U,{emit:h}){const l=pe(),d=ae(),{t:i}=re(),m=L(""),a=L(!1),_=U,C=h,r=L(null);ke(()=>_.show,u=>{u&&l.isVideo(_.storyData)?be(()=>{r.value&&(r.value.volume=.1,r.value.currentTime=0,r.value.play())}):!u&&r.value&&r.value.pause(),u||(m.value="",a.value=!1)});const x=()=>B(this,null,function*(){if(a.value||!_.storyData)return;a.value=!0;const u=yield d.shareStory(_.storyData,m.value);u.success?(l.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i("instashot.storyShared")}),m.value="",C("close")):l.TriggerNotification({appname:"instashot",header:i("apps.instashot"),message:i(u.message)||u.message||i("instashot.failedToShareStory")}),a.value=!1});return(u,c)=>{const $=G("motion-fade");return _.show?(s(),W(Fe,{key:0,to:"#phone-screen"},[F((s(),o("div",to,[e("div",so,[t(l).isVideo(_.storyData)?t(l).isVideo(_.storyData)?(s(),o("div",lo,[e("video",{ref_key:"videoRef",ref:r,class:"w-full h-full object-cover",src:_.storyData,loop:"",playsinline:""},p(t(i)("instashot.browserNoVideo")),9,no)])):g("",!0):(s(),o("img",{key:0,src:_.storyData||"",class:"w-full h-full object-cover object-center",alt:""},null,8,oo))]),e("div",io,[c[3]||(c[3]=e("div",{class:"w-full h-[18%] absolute bottom-0 bg-gradient-to-t from-black via-black/100 to-transparent pointer-events-none",style:{"background-size":"100% 100%"}},null,-1)),c[4]||(c[4]=e("div",{class:"w-full h-[5%] absolute top-0 bg-gradient-to-b from-black via-black/50 to-transparent pointer-events-none",style:{"background-size":"100% 100%"}},null,-1)),e("div",ao,[(s(),o("svg",{class:"h-[21%] cursor-pointer anim-hover-1",onClick:c[0]||(c[0]=P=>C("close")),viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c[2]||(c[2]=[e("path",{d:"M16.3904 0.39052C16.911 -0.130173 17.755 -0.130173 18.2757 0.39052C18.7964 0.911227 18.7964 1.75524 18.2757 2.27595L11.2172 9.33325L18.2744 16.3906L18.3669 16.4921C18.7936 17.0158 18.7624 17.7879 18.2744 18.2759C17.7862 18.7641 17.0142 18.7943 16.4905 18.3671L16.389 18.2759L9.33171 11.2186L2.27703 18.2746C1.75634 18.7954 0.912326 18.7953 0.391619 18.2746C-0.129074 17.7539 -0.129074 16.9099 0.391619 16.3893L7.44625 9.33325L0.390313 2.27724L0.299166 2.17568C-0.128021 1.65201 -0.0977805 0.880013 0.390313 0.391827C0.8783 -0.0961601 1.65049 -0.12728 2.17417 0.299373L2.27574 0.391827L9.33171 7.44779L16.3904 0.39052Z",fill:"white"},null,-1)])))]),c[5]||(c[5]=e("div",{class:"w-full h-[477em]"},null,-1)),e("div",ro,[F(e("input",{"onUpdate:modelValue":c[1]||(c[1]=P=>m.value=P),type:"text",maxlength:200,class:"w-[88%] h-full bg-transparent font-['SFPRO'] text-[12em] outline-none border-none text-white/50",placeholder:t(i)("instashot.addCaption")},null,8,co),[[fe,m.value]])]),e("div",uo,[e("div",{onClick:x,class:se([a.value?"opacity-50 cursor-not-allowed":"cursor-pointer anim-hover-1","w-[90%] h-[90%] rounded-[20em] flex items-center justify-center bg-white/20"])},[a.value?(s(),o("div",ho)):(s(),o("p",fo,p(t(i)("instashot.addToStory")),1))],2)])])])),[[$]])])):g("",!0)}}},vo=["enter"],po={class:"w-full h-full rounded-[36em] overflow-hidden bg-white/95 backdrop-blur-md"},Co={class:"w-full h-[25em] flex items-center justify-center"},wo={class:"w-full h-[30em] border-b-[1.5em] border-black/10 px-[15em]"},go={class:"w-full h-[58%] flex justify-between items-center"},_o={class:"flex items-center gap-[8em]"},xo={class:"text-black text-[14em] tracking-tight font-['SFPRO'] font-medium"},yo={class:"w-full h-[calc(100%-55em)] pt-[10em] overflow-auto flex flex-col gap-2 no-scrollbar px-[15em]"},bo={key:0,class:"w-full h-full flex items-center justify-center"},ko={class:"text-gray-400 text-[12em] font-['SFPRO']"},$o=["onClick"],Po={class:"h-[70%] aspect-square rounded-full overflow-hidden"},So=["src"],Lo={class:"flex-1 h-full flex flex-col justify-center ml-[10em]"},jo={class:"flex items-center"},Fo={class:"text-black text-[12em] tracking-tight font-['SFPRO'] font-medium"},Mo=["src"],To={class:"text-gray-400 text-[10em] tracking-tight font-['SFPRO']"},Oo={class:"h-full flex items-center"},Vo={class:"text-gray-400 text-[10em] tracking-tight font-['SFPRO']"},Ho={__name:"whowatchedstory",emits:["close","selectProfile"],setup(U,{emit:h}){const{t:l}=re(),d=ae(),{storyViewers:i}=he(d),m=h,a=C=>{m("close"),m("selectProfile",C)},_=C=>{if(!C)return"";let r=parseInt(C);r.toString().length===10&&(r*=1e3);const u=Date.now()-r;if(u<0)return l("instashot.now");const c=Math.floor(u/(1e3*60));if(c<1)return l("instashot.now");if(c<60)return`${c}m`;const $=Math.floor(c/60);return $<24?`${$}h`:`${Math.floor($/24)}d`};return(C,r)=>{const x=G("motion");return F((s(),o("div",{class:"w-full h-[75%] absolute bottom-0 z-[20] px-[8em] py-[2em]",initial:{opacity:1,y:25},enter:{opacity:1,y:-10,transition:{delay:Math.min(C.index*100,600),duration:500,ease:"easeOut"}},onClick:r[1]||(r[1]=_e(()=>{},["stop"]))},[e("div",po,[e("div",Co,[e("div",{onClick:r[0]||(r[0]=u=>m("close")),class:"w-[15%] h-[4em] bg-gray-300 rounded-full cursor-pointer anim-hover-1"})]),e("div",wo,[e("div",go,[e("div",_o,[r[2]||(r[2]=e("svg",{class:"h-[18em]",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M7.40343 14.4399C4.44608 15.1571 2.25 17.8221 2.25 21C2.25 21.4142 2.58579 21.75 3 21.75H15C15.4142 21.75 15.75 21.4142 15.75 21C15.75 17.8221 13.5539 15.1571 10.5966 14.4399C12.1526 13.8088 13.25 12.2825 13.25 10.5C13.25 8.15279 11.3472 6.25 9 6.25C6.65279 6.25 4.75 8.15279 4.75 10.5C4.75 12.2825 5.84739 13.8088 7.40343 14.4399Z",fill:"black"}),e("path",{d:"M10.9854 5.10194C13.1827 5.91035 14.75 8.02214 14.75 10.5C14.75 11.8557 14.281 13.1008 13.4973 14.0829C14.8566 14.9683 15.9389 16.2433 16.5853 17.75H21C21.4143 17.75 21.75 17.4142 21.75 17C21.75 13.8221 19.554 11.1571 16.5966 10.4399C18.1526 9.80875 19.25 8.28253 19.25 6.5C19.25 4.15279 17.3473 2.25 15 2.25C13.1426 2.25 11.5635 3.44154 10.9854 5.10194Z",fill:"black"})],-1)),e("p",xo,p(t(i).length)+" "+p(t(l)("instashot.viewers")),1)])])]),e("div",yo,[t(i).length===0?(s(),o("div",bo,[e("p",ko,p(t(l)("instashot.noViewersYet")),1)])):g("",!0),(s(!0),o(oe,null,le(t(i),u=>(s(),o("div",{key:u.username,onClick:c=>a(u.username),class:"w-full h-[47em] flex items-center cursor-pointer anim-hover-1"},[e("div",Po,[e("img",{src:u.profilephoto||t(E)["instashot/default-avatar.png"],class:"w-full h-full object-cover object-center",alt:""},null,8,So)]),e("div",Lo,[e("div",jo,[e("p",Fo,p(u.name||u.username),1),u.badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+u.badge+".svg"],class:"h-[12em] ml-[4em]",alt:""},null,8,Mo)):g("",!0)]),e("p",To,"@"+p(u.username),1)]),e("div",Oo,[e("p",Vo,p(_(u.viewed_at)),1)])],8,$o))),128))])])],8,vo)),[[x]])}}},Zo=["src"],Ro=["src","autoplay"],Bo={class:"w-full h-full absolute inset-0 pointer-events-none",style:{"z-index":"10"}},Do={delay:100,class:"w-full pt-[40em] flex justify-center px-[12em]"},No={class:"w-full h-[4em] flex gap-[4em]"},Io={delay:200,class:"w-full h-[34em] px-[12em] flex items-end"},Uo={class:"w-full h-[26em] flex"},Ao=["src"],zo={class:"w-[79%] h-full flex items-center pointer-events-auto"},Eo=["src"],qo={class:"text-[10em] font-['SFPRO'] ml-[.4em] text-black/15"},Yo={key:0,class:"h-[65%]",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Go={key:1,class:"h-[65%]",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Wo={key:0,class:"w-full px-[20em] h-[150em] flex items-end absolute bottom-[62em]"},Ko={class:"text-[12.5em] tracking-tight font-['SFPRO'] text-white/80"},Jo={key:1,delay:300,class:"w-full h-[565em] flex items-end px-[17em]"},Xo={class:"w-full h-[35em] mb-[10em] pointer-events-auto flex items-center gap-[8em]"},Qo=["placeholder"],el={key:2,delay:300,class:"w-full h-[520em] flex items-end px-[10em]"},tl={key:3,class:"w-full h-[35em] flex items-center justify-center borderred"},sl={class:"w-[92%] h-full flex justify-between px-[10em] pointer-events-auto"},ol={class:"text-[12em] font-['SFPRO'] font-[500] tracking-tight ml-[0.5em] text-white"},ll={class:"text-[12em] font-['SFPRO'] font-[500] tracking-tight ml-[0.5em] text-white"},nl={__name:"storyview",props:{userIndex:{type:Number,default:0},isMyStory:{type:Boolean,default:!1}},emits:["close","selectProfile"],setup(U,{emit:h}){const{t:l}=re(),d=pe(),i=ae(),{stories:m,myStories:a,MyProfileData:_}=he(i),C=L(!1),r=U,x=h,u=L(r.userIndex),c=L(0),$=L(r.isMyStory),P=X(()=>{var O,S,N,K;return $.value?{username:(O=_.value)==null?void 0:O.username,name:(S=_.value)==null?void 0:S.name,profilephoto:(N=_.value)==null?void 0:N.profilephoto,badge:((K=_.value)==null?void 0:K.badge)||0,stories:a.value}:m.value.users&&m.value.users[u.value]?m.value.users[u.value]:null}),R=X(()=>{var O;return((O=P.value)==null?void 0:O.stories)||[]}),k=X(()=>R.value.length>0&&R.value[c.value]?R.value[c.value]:null),v=X(()=>{var O,S;return $.value||((O=P.value)==null?void 0:O.username)===((S=_.value)==null?void 0:S.username)}),Z=L(0),D=L(null),I=L([]);let M=null;const T=L(new Set),w=L(!1),V=()=>k.value&&d.isVideo(k.value.media)?15e3:5e3,A=()=>{b(),Z.value=0,w.value=!1;const S=100/(V()/50);k.value&&!v.value&&!T.value.has(k.value.id)&&(T.value.add(k.value.id),i.viewStory(k.value.id)),M=setInterval(()=>{w.value||(Z.value+=S,Z.value>=100&&(Z.value=100,j()))},50)},b=()=>{M&&(clearInterval(M),M=null)},f=()=>{w.value=!w.value;const O=I.value[c.value];O&&(w.value?O.pause():O.play())},j=()=>{var O,S,N;c.value<R.value.length-1?(c.value++,(O=D.value)==null||O.slideNext()):$.value?m.value.users&&m.value.users.length>0?($.value=!1,u.value=0,c.value=0,(S=D.value)==null||S.slideTo(0),A()):x("close"):u.value<m.value.users.length-1?(u.value++,c.value=0,(N=D.value)==null||N.slideTo(0),A()):x("close")},Q=()=>{var O,S,N;if(c.value>0)c.value--,(O=D.value)==null||O.slidePrev();else if(u.value>0){u.value--;const K=((S=m.value.users[u.value])==null?void 0:S.stories)||[];c.value=Math.max(0,K.length-1),(N=D.value)==null||N.slideTo(c.value),A()}},me=O=>{D.value=O},ce=O=>{c.value=O.activeIndex,A(),I.value.forEach((S,N)=>{S&&(N===O.activeIndex?(S.currentTime=0,S.play()):S.pause())})},z=O=>{const S=O.currentTarget.getBoundingClientRect(),N=O.clientX-S.left,K=S.width;N<K/3?Q():N>K*2/3&&j()},we=(O,S)=>{O&&(I.value[S]=O)},J=O=>{if(!O)return"";let S=parseInt(O);S.toString().length===10&&(S*=1e3);const K=Date.now()-S;if(K<0)return l("instashot.now");const Ce=Math.floor(K/(1e3*60));if(Ce<1)return l("instashot.now");if(Ce<60)return`${Ce}m`;const ye=Math.floor(Ce/60);return ye<24?`${ye}h`:`${Math.floor(ye/24)}d`};xe(()=>{C.value=!0,setTimeout(()=>{A()},100)}),Ze(()=>{b()});const te=L(""),ge=L(!1),$e=()=>B(this,null,function*(){if(!te.value.trim()||!k.value||ge.value)return;ge.value=!0,(yield i.replyToStory(k.value.id,P.value.username,te.value.trim())).success&&(te.value="",d.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l("instashot.replySent")})),ge.value=!1}),y=L(!1),n=()=>{y.value=!1},q=()=>B(this,null,function*(){if(!k.value)return;(yield i.deleteStory(k.value.id)).success&&(y.value=!1,R.value.length<=1?x("close"):(c.value>0&&c.value--,A()))}),ne=L(!1),ve=()=>B(this,null,function*(){k.value&&(yield i.getStoryViewers(k.value.id),ne.value=!0)}),H=()=>{P.value&&(x("close"),x("selectProfile",P.value.username))};return(O,S)=>{var ye,De,Ne;const N=G("motion-slide-top"),K=G("motion-fade"),Ce=G("motion-slide-visible-bottom");return s(),W(Fe,{to:"#phone-screen",disabled:!C.value},[C.value&&P.value&&R.value.length>0?F((s(),o("div",{key:0,class:"w-full h-full z-[110] relative bg-black",onClick:z},[ne.value?(s(),W(Ho,{key:0,onClose:S[0]||(S[0]=ue=>ne.value=!1),onSelectProfile:S[1]||(S[1]=ue=>{ne.value=!1,x("close"),x("selectProfile",ue)})})):g("",!0),y.value?(s(),W(Se,{key:1,onCancel:n,onSubmit:q,header:t(l)("general.areYouSure"),label:t(l)("voice.confirmDeleteRecording"),buttons:{cancel:t(l)("general.cancel"),submit:t(l)("general.delete")}},null,8,["header","label","buttons"])):g("",!0),Y(t(qe),{class:"w-full h-full absolute inset-0","slides-per-view":1,"space-between":0,"allow-touch-move":!1,onSwiper:me,onSlideChange:ce},{default:ee(()=>[(s(!0),o(oe,null,le(R.value,(ue,Pe)=>(s(),W(t(He),{key:ue.id,class:"w-full h-full"},{default:ee(()=>[t(d).isVideo(ue.media)?(s(),o("video",{key:1,ref_for:!0,ref:Je=>we(Je,Pe),src:ue.media,class:"w-full h-full object-cover object-center",muted:"",playsinline:"",autoplay:Pe===0},null,8,Ro)):(s(),o("img",{key:0,src:ue.media,class:"w-full h-full object-cover object-center",alt:""},null,8,Zo))]),_:2},1024))),128))]),_:1}),e("div",Bo,[S[13]||(S[13]=e("div",{class:"w-full h-[18%] absolute bottom-0 bg-gradient-to-t from-black via-black/100 to-transparent pointer-events-none",style:{"background-size":"100% 100%"}},null,-1)),S[14]||(S[14]=e("div",{class:"w-full h-[5%] absolute top-0 bg-gradient-to-b from-black via-black/50 to-transparent pointer-events-none",style:{"background-size":"100% 100%"}},null,-1)),F((s(),o("div",Do,[e("div",No,[(s(!0),o(oe,null,le(R.value,(ue,Pe)=>(s(),o("div",{key:ue.id,class:"flex-1 h-full bg-[#FFFFFF33] rounded-full overflow-hidden"},[e("div",{class:"h-full bg-white rounded-full transition-all duration-100",style:de({width:Pe<c.value?"100%":Pe===c.value?`${Z.value}%`:"0%"})},null,4)]))),128))])])),[[N]]),F((s(),o("div",Io,[e("div",Uo,[e("div",{onClick:_e(H,["stop"]),class:"h-full aspect-square rounded-full cursor-pointer pointer-events-auto"},[e("img",{src:P.value.profilephoto||t(E)["instashot/default-avatar.png"],class:"w-full h-full aspect-square object-cover object-center rounded-full",alt:""},null,8,Ao)]),e("div",zo,[e("p",{onClick:_e(H,["stop"]),class:"text-[12em] tracking-tight font-['SFPRO'] font-[500] ml-[.5em] text-white cursor-pointer"},p(P.value.name||P.value.username),1),P.value.badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+P.value.badge+".svg"],class:"h-[50%] ml-[5em]",alt:""},null,8,Eo)):g("",!0),e("p",qo,p(J((ye=k.value)==null?void 0:ye.created_at)),1)]),e("div",{onClick:_e(f,["stop"]),class:"w-[14%] h-full flex items-center justify-center cursor-pointer anim-hover-1 pointer-events-auto"},[w.value?(s(),o("svg",Go,S[7]||(S[7]=[e("path",{d:"M8 5.14V19.14L19 12.14L8 5.14Z",fill:"white"},null,-1)]))):(s(),o("svg",Yo,S[6]||(S[6]=[e("path",{d:"M6 4H10V20H6V4Z",fill:"white"},null,-1),e("path",{d:"M14 4H18V20H14V4Z",fill:"white"},null,-1)])))]),e("div",{onClick:S[2]||(S[2]=_e(ue=>x("close"),["stop"])),class:"w-[5.5%] h-full flex items-center justify-center cursor-pointer anim-hover-1 pointer-events-auto"},S[8]||(S[8]=[e("svg",{class:"h-[40%]",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M16.3904 0.39052C16.911 -0.130173 17.755 -0.130173 18.2757 0.39052C18.7964 0.911227 18.7964 1.75524 18.2757 2.27595L11.2172 9.33325L18.2744 16.3906L18.3669 16.4921C18.7936 17.0158 18.7624 17.7879 18.2744 18.2759C17.7862 18.7641 17.0142 18.7943 16.4905 18.3671L16.389 18.2759L9.33171 11.2186L2.27703 18.2746C1.75634 18.7954 0.912326 18.7953 0.391619 18.2746C-0.129074 17.7539 -0.129074 16.9099 0.391619 16.3893L7.44625 9.33325L0.390313 2.27724L0.299166 2.17568C-0.128021 1.65201 -0.0977805 0.880013 0.390313 0.391827C0.8783 -0.0961601 1.65049 -0.12728 2.17417 0.299373L2.27574 0.391827L9.33171 7.44779L16.3904 0.39052Z",fill:"white"})],-1)]))])])),[[K]]),(De=k.value)!=null&&De.caption?(s(),o("div",Wo,[e("p",Ko,p(k.value.caption),1)])):g("",!0),v.value?g("",!0):F((s(),o("div",Jo,[e("div",Xo,[F(e("input",{"onUpdate:modelValue":S[3]||(S[3]=ue=>te.value=ue),type:"text",class:"flex-1 h-full bg-white/10 rounded-full outline-none border-none text-[12em] text-white px-[1em] placeholder-white/50",placeholder:t(l)("instashot.sendMessage"),onKeyup:Re($e,["enter"]),onClick:S[4]||(S[4]=_e(()=>{},["stop"]))},null,40,Qo),[[fe,te.value]]),te.value.trim()?(s(),o("div",{key:0,onClick:_e($e,["stop"]),class:"h-full aspect-square rounded-full bg-blue-500 flex items-center justify-center cursor-pointer"},S[9]||(S[9]=[e("svg",{class:"h-[50%]",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M2.01 21L23 12L2.01 3L2 10L17 12L2 14L2.01 21Z",fill:"white"})],-1)]))):g("",!0)])])),[[Ce]]),v.value?F((s(),o("div",el,S[10]||(S[10]=[e("div",{class:"w-full mb-[10em]"},null,-1)]))),[[Ce]]):g("",!0),v.value?(s(),o("div",tl,[e("div",sl,[e("div",{onClick:_e(ve,["stop"]),class:"w-[47%] h-full rounded-full bg-[#FFFFFF26] flex items-center justify-center gap-1 cursor-pointer anim-hover-1"},[S[11]||(S[11]=e("svg",{class:"h-[50%]",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M7.40343 14.4399C4.44608 15.1571 2.25 17.8221 2.25 21C2.25 21.4142 2.58579 21.75 3 21.75H15C15.4142 21.75 15.75 21.4142 15.75 21C15.75 17.8221 13.5539 15.1571 10.5966 14.4399C12.1526 13.8088 13.25 12.2825 13.25 10.5C13.25 8.15279 11.3472 6.25 9 6.25C6.65279 6.25 4.75 8.15279 4.75 10.5C4.75 12.2825 5.84739 13.8088 7.40343 14.4399Z",fill:"white"}),e("path",{d:"M10.9854 5.10194C13.1827 5.91035 14.75 8.02214 14.75 10.5C14.75 11.8557 14.281 13.1008 13.4973 14.0829C14.8566 14.9683 15.9389 16.2433 16.5853 17.75H21C21.4143 17.75 21.75 17.4142 21.75 17C21.75 13.8221 19.554 11.1571 16.5966 10.4399C18.1526 9.80875 19.25 8.28253 19.25 6.5C19.25 4.15279 17.3473 2.25 15 2.25C13.1426 2.25 11.5635 3.44154 10.9854 5.10194Z",fill:"white"})],-1)),e("p",ol,p(((Ne=k.value)==null?void 0:Ne.viewCount)||0)+" "+p(t(l)("instashot.views")),1)]),e("div",{onClick:S[5]||(S[5]=_e(ue=>y.value=!0,["stop"])),class:"w-[47%] h-full rounded-full bg-[#FFFFFF26] flex items-center gap-1 justify-center cursor-pointer anim-hover-1"},[S[12]||(S[12]=e("svg",{class:"h-[40%]",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M19.5825 15.6564C19.5058 16.9096 19.4449 17.9041 19.3202 18.6984C19.1922 19.5131 18.9874 20.1915 18.5777 20.7849C18.2029 21.3278 17.7204 21.786 17.1608 22.1303C16.5491 22.5067 15.8661 22.6713 15.0531 22.75L8.92739 22.7499C8.1135 22.671 7.42972 22.5061 6.8176 22.129C6.25763 21.7841 5.77494 21.3251 5.40028 20.7813C4.99073 20.1869 4.78656 19.5075 4.65957 18.6917C4.53574 17.8962 4.47623 16.9003 4.40122 15.6453L3.75 4.75H20.25L19.5825 15.6564Z",fill:"white"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.3473 1.28277C13.9124 1.33331 14.4435 1.50576 14.8996 1.84591C15.2369 2.09748 15.4712 2.40542 15.6714 2.73893C15.8569 3.04798 16.0437 3.4333 16.2555 3.8704L16.6823 4.7507H21C21.5523 4.7507 22 5.19842 22 5.7507C22 6.30299 21.5523 6.7507 21 6.7507C14.9998 6.7507 9.00019 6.7507 3 6.7507C2.44772 6.7507 2 6.30299 2 5.7507C2 5.19842 2.44772 4.7507 3 4.7507H7.40976L7.76556 3.97016C7.97212 3.51696 8.15403 3.11782 8.33676 2.79754C8.53387 2.45207 8.76721 2.13237 9.10861 1.87046C9.57032 1.51626 10.1121 1.33669 10.6899 1.28409C11.1249 1.24449 11.5634 1.24994 12 1.25064C12.5108 1.25146 12.97 1.24902 13.3473 1.28277ZM9.60776 4.7507H14.4597C14.233 4.28331 14.088 3.98707 13.9566 3.7682C13.7643 3.44787 13.5339 3.30745 13.1691 3.27482C12.9098 3.25163 12.5719 3.2507 12.0345 3.2507C11.4837 3.2507 11.137 3.25166 10.8712 3.27585C10.4971 3.30991 10.2639 3.45568 10.0739 3.78866C9.94941 4.00687 9.81387 4.29897 9.60776 4.7507Z",fill:"white"})],-1)),e("p",ll,p(t(l)("instashot.delete")),1)])])])):g("",!0)])])),[[K]]):g("",!0)],8,["disabled"])}}},il={key:0,class:"w-full h-[470em] absolute z-[500] bottom-0 px-[6.5em] py-[6.5em]"},al={class:"w-[96%] h-[220em] absolute bottom-0 z-[10]"},rl={class:"w-full h-full rounded-[34em] overflow-hidden bg-white"},cl={class:"w-full h-[24.5em] flex items-center justify-center"},ul={class:"w-full h-[28em] flex items-start justify-center border-b"},dl={class:"font-['SFPRO'] text-[13em] text-black leading-[100%] mt-[0.2em]"},fl={class:"w-full h-[353em] overflow-auto no-scrollbar"},hl={class:"w-full inline-flex"},ml={class:"w-[13.5%] flex items-start min-h-[43em] max-h-[43em] p-[6em]"},vl=["src"],pl={class:"w-[78.5%] h-full"},Cl={class:"w-full h-[24em] flex items-end"},wl={class:"font-['SFPRO'] text-[13em] text-black leading-[100%]"},gl={class:"font-['SFPRO'] text-[10em] text-black/60 leading-[100%] ml-[0.4em]"},_l=["src"],xl={class:"w-full inline-flex py-[2em]"},yl={class:"font-['SFPRO'] text-[11em] text-black leading-none"},bl={class:"w-[6%] h-full min-h-[43em] max-h-[43em] flex flex-col justify-center items-center"},kl=["onClick"],$l=["onClick"],Pl={class:"font-['SFPRO'] text-[10em] text-black leading-[100%] mt-[0.5em]"},Sl={class:"h-full flex items-center aspect-square rounded-full justify-center p-[3em]"},Ll=["src"],jl={class:"w-[78%] h-full outline outline-1 outline-offset-[-1px] outline-[#F2F2F7] rounded-full flex"},Fl={class:"w-[85%] h-full"},Ml=["placeholder"],Tl={__name:"comment",props:{show:{type:Boolean,default:!1},postId:{type:Number,required:!0}},emits:["close"],setup(U,{emit:h}){const l=pe(),{t:d}=re(),i=ae(),{PostComments:m,MyProfileData:a}=he(i),_=L(!1),C=L(""),r=R=>{C.value+=R},x=h,u=U,c=()=>B(this,null,function*(){if(C.value.trim()==="")return;const R=yield ie("INSTASHOT",{action:"sendcomment",data:{comment:C.value,postId:u.postId}});C.value="",R.success||l.TriggerNotification({appname:"instashot",header:d("apps.instashot"),message:d(R.message)||R.message})}),$=R=>B(this,null,function*(){const k=yield ie("INSTASHOT",{action:"likecomment",data:{commentId:R,postId:u.postId}});k.success||l.TriggerNotification({appname:"instashot",header:d("apps.instashot"),message:d(k.message)||k.message})}),P=R=>{let k=parseInt(R);if(k>9999999999999&&(k=Math.floor(k/1e3)),k>9999999999999&&(k=Math.floor(k/1e3)),k.toString().length===10&&(k*=1e3),isNaN(k)||k<=0)return d("twix.timeUnknown");const Z=Date.now()-k;if(Z<0)return d("twix.timeNow");const D=Math.floor(Z/1e3),I=Math.floor(D/60),M=Math.floor(I/60),T=Math.floor(M/24),w=Math.floor(T/7),V=Math.floor(T/30),A=Math.floor(T/365);return D<10?d("twix.timeNow"):D<60?d("twix.timeSeconds",{count:D}):I<60?d("twix.timeMinutes",{count:I}):M<24?d("twix.timeHours",{count:M}):T<7?T===1?d("twix.timeYesterday"):d("twix.timeDays",{count:T}):w<4?d("twix.timeWeeks",{count:w}):V<12?d("twix.timeMonths",{count:V}):d("twix.timeYears",{count:A})};return(R,k)=>(s(),W(Fe,{to:"#main-container"},[Y(Oe,{name:"slide-up"},{default:ee(()=>{var v;return[u.show?(s(),o("div",il,[Y(Oe,{name:"emoji-slide"},{default:ee(()=>[F(e("div",al,[Y(Ge,{show:_.value,forcetheme:"light",onClose:k[0]||(k[0]=Z=>_.value=!1),onSelectEmoji:r},null,8,["show"])],512),[[l1,_.value]])]),_:1}),e("div",rl,[e("div",cl,[e("div",{onClick:k[1]||(k[1]=Z=>x("close")),class:"w-[45em] h-[4em] bg-[#ACACAC] rounded-full cursor-pointer anim-hover-1"})]),e("div",ul,[e("p",dl,p(t(d)("instashot.comments")),1)]),e("div",fl,[(s(!0),o(oe,null,le(t(m).comments,Z=>(s(),o("div",hl,[e("div",ml,[e("img",{src:Z.profilephoto,class:"object-cover h-[85%] object-center rounded-full",alt:""},null,8,vl)]),e("div",pl,[e("div",Cl,[e("p",wl,p(Z.name),1),e("p",gl,p(P(Z.date)),1),Z.badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+Z.badge+".svg"],class:"h-[45%] ml-[3em]",alt:""},null,8,_l)):g("",!0)]),e("div",xl,[e("p",yl,p(Z.comment),1)])]),e("div",bl,[Z.isLiked?(s(),o("svg",{key:1,onClick:D=>$(Z.id),class:"h-[10em] cursor-pointer anim-hover-1",viewBox:"0 0 26 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k[5]||(k[5]=[e("path",{d:"M10.8125 20.2123C7.52099 17.751 1 12.1239 1 7.06018C1 3.71323 3.45614 1 6.83333 1C8.58333 1 10.3333 1.58333 12.6667 3.91667C15 1.58333 16.75 1 18.5 1C21.8771 1 24.3333 3.71323 24.3333 7.06018C24.3333 12.1239 17.8124 17.751 14.5209 20.2123C13.4132 21.0405 11.9201 21.0405 10.8125 20.2123Z",fill:"#FF000F",stroke:"#FF000F","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),8,$l)):(s(),o("svg",{key:0,onClick:D=>$(Z.id),class:"h-[10em] cursor-pointer anim-hover-1",viewBox:"0 0 19 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k[4]||(k[4]=[e("path",{d:"M7.75892 14.4731C5.40785 12.715 0.75 8.69567 0.75 5.0787C0.75 2.68802 2.50438 0.75 4.91667 0.75C6.16667 0.75 7.41667 1.16667 9.08333 2.83333C10.75 1.16667 12 0.75 13.25 0.75C15.6622 0.75 17.4167 2.68802 17.4167 5.0787C17.4167 8.69567 12.7588 12.715 10.4077 14.4731C9.61658 15.0647 8.55008 15.0647 7.75892 14.4731Z",stroke:"black","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),8,kl)),e("p",Pl,p(Z.likeCount),1)])]))),256))]),k[7]||(k[7]=e("div",{class:"w-full h-[44.5em] flex justify-between px-[10em]"},null,-1)),e("div",{class:se(["w-full h-[58em] flex justify-start px-[10em] py-[5em] absolute bg-white transition-all duration-300",_.value?" bottom-[218em]":" bottom-0"])},[e("div",Sl,[e("img",{src:((v=t(a))==null?void 0:v.profilephoto)||t(E)["instashot/default-avatar.png"],class:"object-cover h-[90%] aspect-square object-center rounded-full",alt:""},null,8,Ll)]),e("div",jl,[e("div",Fl,[F(e("input",{type:"text",onKeydown:Re(c,["enter"]),"onUpdate:modelValue":k[2]||(k[2]=Z=>C.value=Z),maxlength:800,class:"w-full h-full text-[13em] text-black pl-[1em] outline-none border-none bg-transparent placeholder:text-[#00000080] placeholder:text-black/50 text-black",placeholder:t(d)("instashot.startTheConversation")},null,40,Ml),[[fe,C.value]])]),e("div",{onClick:k[3]||(k[3]=Z=>_.value=!_.value),class:"w-[15%] h-full flex items-center justify-center cursor-pointer anim-hover-1"},k[6]||(k[6]=[e("svg",{class:"h-[35%]",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M9.99999 20C11.366 20 12.652 19.7385 13.8578 19.2156C15.0637 18.6928 16.1274 17.9706 17.049 17.049C17.9706 16.1274 18.6928 15.0637 19.2156 13.8578C19.7385 12.652 20 11.366 20 9.99999C20 8.63398 19.7385 7.34803 19.2156 6.14214C18.6928 4.93627 17.9706 3.87255 17.049 2.95097C16.1274 2.02941 15.0621 1.30719 13.8529 0.784313C12.6438 0.261438 11.3562 0 9.99018 0C8.62417 0 7.33823 0.261438 6.13235 0.784313C4.92646 1.30719 3.86437 2.02941 2.94607 2.95097C2.02778 3.87255 1.30719 4.93627 0.784313 6.14214C0.261438 7.34803 0 8.63398 0 9.99999C0 11.366 0.261438 12.652 0.784313 13.8578C1.30719 15.0637 2.02941 16.1274 2.95097 17.049C3.87255 17.9706 4.93627 18.6928 6.14214 19.2156C7.34803 19.7385 8.63398 20 9.99999 20ZM9.99999 18.3333C8.84313 18.3333 7.76143 18.1176 6.7549 17.6863C5.74836 17.2549 4.86437 16.6585 4.10293 15.8971C3.3415 15.1356 2.74673 14.2517 2.31862 13.2451C1.89052 12.2386 1.67647 11.1569 1.67647 9.99999C1.67647 8.84313 1.89052 7.76143 2.31862 6.7549C2.74673 5.74836 3.33987 4.86274 4.09803 4.09803C4.8562 3.33333 5.73855 2.73692 6.74509 2.30882C7.75163 1.88072 8.83332 1.66667 9.99018 1.66667C11.1471 1.66667 12.2288 1.88072 13.2353 2.30882C14.2418 2.73692 15.1274 3.33333 15.8922 4.09803C16.6569 4.86274 17.2549 5.74836 17.6863 6.7549C18.1176 7.76143 18.3333 8.84313 18.3333 9.99999C18.3333 11.1569 18.1193 12.2386 17.6912 13.2451C17.263 14.2517 16.6683 15.1356 15.9068 15.8971C15.1454 16.6585 14.2598 17.2549 13.2499 17.6863C12.2402 18.1176 11.1569 18.3333 9.99999 18.3333ZM9.99018 14.9117C10.6699 14.9117 11.268 14.7892 11.7843 14.5441C12.3007 14.299 12.701 14.018 12.9853 13.701C13.2696 13.384 13.4118 13.1176 13.4118 12.902C13.4118 12.7843 13.3644 12.7026 13.2696 12.6568C13.1748 12.6111 13.0752 12.6111 12.9705 12.6568C12.6176 12.8529 12.2108 13.0408 11.75 13.2205C11.2892 13.4003 10.7026 13.4902 9.99018 13.4902C9.27777 13.4902 8.69117 13.4003 8.23038 13.2205C7.7696 13.0408 7.35947 12.8529 7 12.6568C6.89542 12.6111 6.79738 12.6111 6.70588 12.6568C6.61437 12.7026 6.56862 12.7843 6.56862 12.902C6.56862 13.1176 6.71078 13.384 6.99509 13.701C7.2794 14.018 7.67973 14.299 8.19606 14.5441C8.71241 14.7892 9.31045 14.9117 9.99018 14.9117ZM7.07842 9.12744C7.39215 9.12744 7.66666 9.00163 7.90195 8.74999C8.13725 8.49835 8.2549 8.17646 8.2549 7.78431C8.2549 7.39215 8.13725 7.06862 7.90195 6.81372C7.66666 6.55882 7.39215 6.43136 7.07842 6.43136C6.77123 6.43136 6.50326 6.55882 6.2745 6.81372C6.04574 7.06862 5.93136 7.39215 5.93136 7.78431C5.93136 8.17646 6.04574 8.49835 6.2745 8.74999C6.50326 9.00163 6.77123 9.12744 7.07842 9.12744ZM12.8921 9.12744C13.2058 9.12744 13.4803 9.00163 13.7157 8.74999C13.951 8.49835 14.0686 8.17646 14.0686 7.78431C14.0686 7.39215 13.951 7.06862 13.7157 6.81372C13.4803 6.55882 13.2058 6.43136 12.8921 6.43136C12.5849 6.43136 12.317 6.55882 12.0882 6.81372C11.8594 7.06862 11.7451 7.39215 11.7451 7.78431C11.7451 8.17646 11.8594 8.49835 12.0882 8.74999C12.317 9.00163 12.5849 9.12744 12.8921 9.12744Z",fill:"black","fill-opacity":"0.8"})],-1)]))])],2)])])):g("",!0)]}),_:1})]))}},Ol=je(Tl,[["__scopeId","data-v-b1c88c46"]]),Vl={key:0,class:"w-full h-full bg-[#F2F2F7] absolute z-[200]"},Hl={class:"w-full h-[12%] flex items-end justify-center"},Zl={class:"w-[88%] h-[47%] flex items-center justify-center"},Rl={class:"w-full h-[50%] flex items-center"},Bl={class:"font-['SFPRO'] text-[17em] ml-[0.5em] text-black leading-[100%]"},Dl={class:"w-full h-[88%] px-[13em] flex items-center justify-center"},Nl={class:"w-full h-full overflow-auto no-scrollbar"},Il={key:0,class:"w-full h-full flex items-center justify-center"},Ul={key:1,class:"w-full h-full flex items-center justify-center"},Al={class:"font-['SFPRO'] text-[14em] text-black/50"},zl={class:"w-[12.5%] h-[35em] flex-shrink-0 relative"},El=["src"],ql={key:0,class:"absolute -bottom-[2em] -right-[2em] w-[14em] h-[14em]"},Yl=["src"],Gl={class:"w-[70%] mt-[10em] flex items-center"},Wl={class:"font-['SFPRO'] text-[11em] text-black leading-[100%]"},Kl={class:"inline-flex items-center font-[500] font-['SFPRO']"},Jl={key:0,class:"h-[1em] ml-[.4em]",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Xl=["src"],Ql=["src"],e2={class:"font-['SFPRO'] text-[1em] text-black/50 font-[300] leading-[100%] ml-[0.5em]"},t2={class:"w-[12.5%] h-[35em] flex-shrink-0"},s2=["src"],o2={key:1,class:"h-[100%] aspect-square"},Ke={__name:"activities",props:{show:{type:Boolean,required:!0}},emits:["close"],setup(U,{emit:h}){const{t:l}=re(),d=ae(),{activities:i,activitiesLoading:m}=he(d),a=U,_=h,C=X(()=>m.value),r=()=>B(this,null,function*(){yield d.getActivities()}),x=c=>{let $="";switch(c.action){case"post_like":$=l("instashot.likedYourPhoto",{name:""});break;case"follow":$=l("instashot.startedFollowingYou",{name:""});break;case"comment":$=l("instashot.commentedOnYourPost",{name:""});break;case"comment_like":$=l("instashot.likedYourComment",{name:""});break;case"story_reply":$=l("instashot.repliedToYourStory",{name:""});break;default:return""}return $.trim()},u=c=>{(!c||c<0||c>Date.now())&&(c=Math.floor(Date.now()/1e3)),c>1e12&&(c=Math.floor(c/1e3));const P=Math.floor(Date.now()/1e3)-c;return P<=0?l("general.now"):P<60?`${P}s`:P<3600?`${Math.floor(P/60)}${l("general.minute")}`:P<86400?`${Math.floor(P/3600)}${l("general.hour")}`:P<604800?`${Math.floor(P/86400)}${l("general.day")}`:`${Math.floor(P/604800)}${l("general.week")}`};return ke(()=>a.show,c=>{c&&r()}),xe(()=>{a.show&&r()}),(c,$)=>(s(),W(Fe,{to:"#main-container"},[a.show?(s(),o("div",Vl,[e("div",Hl,[e("div",Zl,[e("div",Rl,[(s(),o("svg",{class:"h-[80%] cursor-pointer anim-hover-1",onClick:$[0]||($[0]=P=>_("close")),viewBox:"0 0 11 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$[1]||($[1]=[e("path",{d:"M9.414 0.707031L1.41406 8.70707L9.41406 16.7071",stroke:"black","stroke-width":"2","stroke-miterlimit":"16"},null,-1)]))),e("p",Bl,p(t(l)("instashot.activities")),1)])])]),e("div",Dl,[e("div",Nl,[C.value?(s(),o("div",Il,$[2]||($[2]=[e("div",{class:"animate-spin rounded-full h-[32em] w-[32em] border-b-2 border-black"},null,-1)]))):t(i).length?(s(!0),o(oe,{key:2},le(t(i),P=>(s(),o("div",{key:P.id,class:"w-full flex justify-between items-start mt-[20em]"},[e("div",zl,[e("img",{src:P.profilephoto||"https://aiakos.net/codem/api.php?script=tebex-images&file=login-background.png",class:"object-cover h-[100%] aspect-square object-center rounded-full",alt:""},null,8,El),P.action==="post_like"||P.action=="comment_like"?(s(),o("div",ql,[e("img",{src:t(E)["instashot/activities_liked_icon.png"],class:"w-full h-full",alt:""},null,8,Yl)])):g("",!0)]),e("div",Gl,[e("p",Wl,[e("span",Kl,[Ve(p(P.name||P.username)+" ",1),P.badge===1?(s(),o("svg",Jl,$[3]||($[3]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.64936 0.290182C6.28791 -0.0967273 5.67445 -0.0967273 5.313 0.290182L4.42655 1.23836C4.24582 1.43118 3.99064 1.53745 3.72655 1.52791L2.43027 1.484C1.90082 1.46618 1.46682 1.90018 1.48464 2.42964L1.52855 3.72718C1.53745 3.99127 1.43182 4.24645 1.23836 4.42718L0.290182 5.313C-0.0967273 5.67445 -0.0967273 6.28855 0.290182 6.65L1.23836 7.53645C1.43182 7.71718 1.53745 7.97173 1.52855 8.23645L1.484 9.53336C1.46682 10.0628 1.90082 10.4968 2.43027 10.479L3.72718 10.4351C3.99127 10.4262 4.24645 10.5318 4.42718 10.7246L5.313 11.6728C5.67509 12.0604 6.28855 12.0604 6.65064 11.6728L7.53709 10.7246C7.71718 10.5318 7.97236 10.4255 8.23645 10.4351L9.53336 10.479C10.0628 10.4968 10.4975 10.0628 10.479 9.53336L10.4357 8.23582C10.4262 7.97173 10.5325 7.71718 10.7253 7.53645L11.6735 6.65C12.0604 6.28855 12.0604 5.67445 11.6735 5.313L10.7253 4.42655C10.5325 4.24645 10.4262 3.99127 10.4357 3.72655L10.479 2.42964C10.4975 1.90018 10.0628 1.46618 9.53336 1.484L8.23645 1.52855C7.97236 1.53682 7.71718 1.43118 7.53645 1.23836L6.64936 0.290182ZM2.94764 6.251L5.12973 8.43245L8.74618 4.48318L7.889 3.68964L5.089 6.741L3.77045 5.42245L2.94764 6.251Z",fill:"#0D71F0"},null,-1)]))):P.badge===2?(s(),o("img",{key:1,src:t(E)["twix/2.svg"],class:"h-[1em] ml-[.4em]",alt:"Gold Badge"},null,8,Xl)):P.badge===3?(s(),o("img",{key:2,src:t(E)["twix/3.svg"],class:"h-[1em] ml-[.4em]",alt:"Special Badge"},null,8,Ql)):g("",!0)]),Ve(" "+p(x(P))+" ",1),e("span",e2,p(u(P.created_at)),1)])]),e("div",t2,[P.post_media?(s(),o("img",{key:0,src:P.post_media,class:"object-cover h-[100%] aspect-square object-center rounded-[5em]",alt:""},null,8,s2)):(s(),o("div",o2))])]))),128)):(s(),o("div",Ul,[e("p",Al,p(t(l)("instashot.noActivities")),1)]))])])])):g("",!0)]))}},l2={class:"w-full h-full bg-[#F2F2F7]"},n2={delay:100,class:"w-full h-[10.8%] flex items-end justify-between px-[12em]"},i2=["src"],a2={delay:200,class:"w-full h-[14.5%] pl-[4em] flex items-end"},r2={class:"w-full h-[87%]"},c2={delay:250,class:"w-full h-full"},u2=["src"],d2={key:1,class:"absolute inset-0 grid place-items-center"},f2={class:"w-full h-[20%] flex items-end justify-center"},h2={style:{"letter-spacing":"-0.04em"},class:"font-['SFPRO'] text-[9em] text-black truncate"},m2=["delay"],v2=["src"],p2={class:"w-full h-[20%] flex items-end justify-center"},C2={style:{"letter-spacing":"-0.04em"},class:"font-['SFPRO'] text-[9em] text-black truncate"},w2={key:0,class:"w-full h-[300em] flex items-center justify-center"},g2={class:"text-[12em] font-['SFPRO'] text-black/50 font-[400]"},_2={key:0,class:"w-full h-full"},x2={class:"w-full h-[8.5%] flex items-center justify-center px-[12em]"},y2={class:"w-full h-[75%] flex items-center"},b2=["src"],k2={class:"w-[70%] h-[100%] flex items-center flex-wrap"},$2=["onClick"],P2={class:"font-['SFPRO'] font-[500] text-[12em] leading-snug tracking-tight text-black ml-[0.6em]"},S2=["src"],L2={key:0,class:"w-full h-[50%] flex items-center"},j2={class:"font-['SFPRO'] text-[9em] leading-snug tracking-tight text-black/40 ml-[0.9em]"},F2={class:"w-[20%] h-full flex items-center justify-end"},M2={class:"font-['SFPRO'] text-[9em] text-black/30 ml-[0.6em]"},T2={class:"w-full h-[82.5%] px-[7em]"},O2=["onClick","src"],V2=["onClick"],H2=["src"],Z2={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},R2={class:"w-[35em] h-[35em] rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-200"},B2=["src"],D2={class:"w-full h-[7.5%] flex items-end justify-center"},N2={class:"w-[89%] h-[61%] flex items-center"},I2=["onClick"],U2=["onClick"],A2={class:"w-[17%] h-full flex items-center justify-start"},z2={class:"font-['SFPRO'] text-[12em] text-black font-[500] ml-[0.5em]"},E2=["onClick"],q2={class:"w-[17%] h-full flex items-center justify-start"},Y2={class:"font-['SFPRO'] text-[12em] text-black font-[500] ml-[0.5em]"},G2=["onClick"],W2={class:"w-[17%] h-full flex items-center justify-start"},K2={class:"font-['SFPRO'] text-[12em] text-black font-[500] ml-[0.5em]"},J2={class:"w-full h-[20em] flex items-center justify-center"},X2={key:0,class:"flex items-center justify-center"},Q2={__name:"home",emits:["selectProfile"],setup(U,{emit:h}){const{t:l}=re(),d=pe(),i=h,m=ae(),{ScrollPage:a,stories:_,myStories:C,MyProfileData:r}=he(m),x=L(!1),u=L([{id:1,name:"addnewstory",label:l("instashot.addNewStory"),action:"addnewstory"},{id:2,name:"viewstory",label:l("instashot.viewStory"),action:"viewstory"}]),c=L(!1),$=L(null),P=L(!1);xe(()=>{m.fetchStories()});const R=L(!1),k=L(!1),v=L(!1),Z=L(!1),D=L(!1),I=L(null),M=y=>{let n=parseInt(y);if(n.toString().length===10&&(n*=1e3),isNaN(n)||n<=0)return l("twix.timeUnknown");const ne=Date.now()-n;if(ne<0)return l("twix.timeNow");const ve=Math.floor(ne/1e3),H=Math.floor(ve/60),O=Math.floor(H/60),S=Math.floor(O/24),N=Math.floor(S/7),K=Math.floor(S/30),Ce=Math.floor(S/365);return ve<10?l("twix.timeNow"):ve<60?l("twix.timeSeconds",{count:ve}):H<60?l("twix.timeMinutes",{count:H}):O<24?l("twix.timeHours",{count:O}):S<7?S===1?l("twix.timeYesterday"):l("twix.timeDays",{count:S}):N<4?l("twix.timeWeeks",{count:N}):K<12?l("twix.timeMonths",{count:K}):l("twix.timeYears",{count:Ce})},T=()=>{x.value=!1},w=y=>B(this,null,function*(){y=="addnewstory"?(x.value=!1,Z.value=!0):y=="viewstory"&&(x.value=!1,C.value&&C.value.length>0&&A(0,!0))}),V=(y,n=!1)=>{n?x.value=!0:A(y,!1)},A=(y,n=!1)=>{$.value=y,P.value=n,m.setCurrentStoryUser(y),c.value=!0},b=()=>{c.value=!1,$.value=null,P.value=!1,m.clearStoryView()},f=y=>{Z.value=!1,D.value=y},{parentRef:j,virtualRows:Q,totalSize:me,scrollPosition:ce,getItem:z}=Be({getItems:()=>a.value.post.loadedData,itemHeightPercent:.7,overscan:2,loadMore:()=>m._getPostActions().loadMore(),canLoadMore:()=>a.value.post.isInitialized&&a.value.post.hasMore&&!a.value.post.isLoading,isLoading:()=>a.value.post.isLoading,loadMoreThreshold:300});Ze(()=>{m.ClearPostComments()});const we=y=>B(this,null,function*(){const n=yield ie("INSTASHOT",{action:"likepost",data:{postId:y}});n.success||d.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l(n.message)||n.message})}),J=y=>B(this,null,function*(){const n=yield ie("INSTASHOT",{action:"getpostcomments",data:{postId:y}});n.success?(yield m.GetPostComments({postId:y,comments:n.comments}),R.value=y):d.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l(n.message)||n.message})}),te=y=>{const n=d.isVideo(y);d.setPhotoViewerData({image:y,type:n?"video":"image"})},ge=y=>{I.value=y,k.value=!0},$e=y=>B(this,null,function*(){if(!I.value||!y)return;const n=z(a.value.post.loadedData.findIndex(q=>q.id===I.value));if(!n){k.value=!1,I.value=null;return}yield m.sendPostMessage(y,n),k.value=!1,I.value=null});return(y,n)=>{const q=G("motion-fade"),ne=G("motion-pop"),ve=G("motion-slide-visible-left");return s(),o("div",l2,[Y(Ol,{show:R.value,onClose:n[0]||(n[0]=H=>{R.value=!1,t(m).ClearPostComments()}),postId:R.value},null,8,["show","postId"]),Y(Le,{show:k.value,onClose:n[1]||(n[1]=H=>k.value=!1),fetchData:!0,onSelectProfile:$e},null,8,["show"]),Y(Ke,{show:v.value,onClose:n[2]||(n[2]=H=>v.value=!1)},null,8,["show"]),Y(i1,{items:u.value,show:x.value,onSelectcontextaction:w,onClose:T},null,8,["items","show"]),Y(Me,{show:Z.value,onSelectPhoto:f,onCancel:n[3]||(n[3]=H=>Z.value=!1)},null,8,["show"]),Y(mo,{show:D.value,onClose:n[4]||(n[4]=H=>D.value=!1),storyData:D.value},null,8,["show","storyData"]),c.value?(s(),W(nl,{key:0,userIndex:$.value,isMyStory:P.value,onClose:b,onSelectProfile:n[5]||(n[5]=H=>i("selectProfile",H))},null,8,["userIndex","isMyStory"])):g("",!0),F((s(),o("div",n2,[e("img",{src:t(E)["instashot/instatext.png"],class:"h-[30%]",alt:""},null,8,i2),(s(),o("svg",{onClick:n[6]||(n[6]=H=>v.value=!0),class:"h-[20%] cursor-pointer anim-hover-1",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[8]||(n[8]=[e("path",{d:"M9.4107 17.4677C6.58942 15.358 1 10.5348 1 6.19444C1 3.32563 3.10526 1 6 1C7.5 1 9 1.5 11 3.5C13 1.5 14.5 1 16 1C18.8947 1 21 3.32563 21 6.19444C21 10.5348 15.4106 15.358 12.5893 17.4677C11.6399 18.1776 10.3601 18.1776 9.4107 17.4677Z",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])))])),[[q]]),e("div",{class:se(["w-full h-[90%] overflow-auto no-scrollbar",[t(ce)==="top"?"mask-bottom":"",t(ce)==="middle"?"mask-both":"",t(ce)==="bottom"?"mask-top":""]]),ref_key:"parentRef",ref:j},[F((s(),o("div",a2,[e("div",r2,[Y(t(qe),{"slides-per-view":4.5,"space-between":8,class:"w-full h-full px-[7em]"},{default:ee(()=>[Y(t(He),{class:"!w-[54em] cursor-pointer first:ml-[8em]",onClick:n[7]||(n[7]=H=>V(0,!0))},{default:ee(()=>{var H;return[F((s(),o("div",c2,[e("div",{class:se(["w-full h-[75%] relative overflow-hidden",t(C).length>0?"p-[3em]":""]),style:de({backgroundImage:t(C).length>0?`url(${t(E)["instashot/storyline.png"]})`:"none",backgroundSize:"100% 100%",border:t(C).length===0?"2px dashed #ccc":"none",borderRadius:t(C).length===0?"17em":"0"})},[t(C).length>0?(s(),o("img",{key:0,src:((H=t(r))==null?void 0:H.profilephoto)||t(E)["instashot/default-avatar.png"],class:"object-cover w-full h-full object-center rounded-[17em]",alt:""},null,8,u2)):(s(),o("div",d2,n[9]||(n[9]=[e("svg",{viewBox:"0 0 24 24",class:"w-[32%] h-[32%] text-gray-400",fill:"none"},[e("path",{d:"M12 4v16M4 12h16",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"})],-1)])))],6),e("div",f2,[e("p",h2,p(t(l)("instashot.yourStory")),1)])])),[[ne]])]}),_:1}),(s(!0),o(oe,null,le(t(_).users,(H,O)=>(s(),W(t(He),{key:H.username,class:"!w-[54em] cursor-pointer",onClick:S=>V(O)},{default:ee(()=>[F((s(),o("div",{delay:300+O*50,class:"w-full h-full"},[e("div",{class:"w-full h-[75%] relative p-[3em] overflow-hidden",style:de({backgroundImage:H.hasUnviewed?`url(${t(E)["instashot/storyline.png"]})`:`url(${t(E)["instashot/viewedstoryline.png"]})`,backgroundSize:"100% 100%"})},[e("img",{src:H.profilephoto||t(E)["instashot/default-avatar.png"],class:"object-cover w-full h-full object-center rounded-[17em]",alt:""},null,8,v2)],4),e("div",p2,[e("p",C2,p(H.name||H.username),1)])],8,m2)),[[ne]])]),_:2},1032,["onClick"]))),128))]),_:1})])])),[[ve]]),n[15]||(n[15]=e("div",{class:"w-full h-[1.9%]"},null,-1)),t(a).post.loadedData.length===0&&!t(a).post.isLoading?(s(),o("div",w2,[e("p",g2,p(t(l)("instashot.noPostsYet")),1)])):g("",!0),t(a).post.loadedData.length>0?(s(),o("div",{key:1,style:de({height:`${t(me)}px`,width:"100%",position:"relative"})},[(s(!0),o(oe,null,le(t(Q),H=>(s(),o("div",{key:H.key,style:de({position:"absolute",top:0,left:0,width:"100%",height:`${H.size}px`,transform:`translateY(${H.start}px)`})},[t(z)(H.index)?(s(),o("div",_2,[e("div",x2,[e("div",y2,[e("img",{src:t(z)(H.index).profilephoto,class:"h-full w-[9.5%] rounded-full aspect-square object-cover object-center",alt:""},null,8,b2),e("div",k2,[e("div",{onClick:O=>i("selectProfile",t(z)(H.index).username),class:"w-[100%] h-[50%] flex items-center cursor-pointer"},[e("p",P2,p(t(z)(H.index).name),1),t(z)(H.index).badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+t(z)(H.index).badge+".svg"],class:"h-[85%] borderr ml-[4em]",alt:""},null,8,S2)):g("",!0)],8,$2),t(z)(H.index).location?(s(),o("div",L2,[e("p",j2,p(t(z)(H.index).location),1)])):g("",!0)]),e("div",F2,[e("p",M2,p(M(t(z)(H.index).date)),1)])])]),e("div",T2,[t(d).isVideo(t(z)(H.index).media)?(s(),o("div",{key:1,onClick:O=>te(t(z)(H.index).media),class:"w-full h-full relative"},[e("video",{class:"w-full h-full object-cover rounded-[20em] transition-all duration-300",src:t(z)(H.index).media,preload:"metadata",muted:""},p(t(l)("instashot.browserNoVideo")),9,H2),e("div",Z2,[e("div",R2,[e("img",{src:t(E)["photos/play.svg"],class:"h-[100%]",alt:""},null,8,B2)])])],8,V2)):(s(),o("img",{key:0,onClick:O=>te(t(z)(H.index).media),src:t(z)(H.index).media,class:"w-full h-full object-cover cursor-pointer object-center rounded-[20em]"},null,8,O2))]),e("div",D2,[e("div",N2,[t(z)(H.index).isLiked?(s(),o("svg",{key:1,onClick:O=>we(t(z)(H.index).id),class:"h-[90%] cursor-pointer anim-hover-1",viewBox:"0 0 26 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[11]||(n[11]=[e("path",{d:"M10.8125 20.2123C7.52099 17.751 1 12.1239 1 7.06018C1 3.71323 3.45614 1 6.83333 1C8.58333 1 10.3333 1.58333 12.6667 3.91667C15 1.58333 16.75 1 18.5 1C21.8771 1 24.3333 3.71323 24.3333 7.06018C24.3333 12.1239 17.8124 17.751 14.5209 20.2123C13.4132 21.0405 11.9201 21.0405 10.8125 20.2123Z",fill:"#FF000F",stroke:"#FF000F","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),8,U2)):(s(),o("svg",{key:0,class:"h-[90%] cursor-pointer anim-hover-1",onClick:O=>we(t(z)(H.index).id),viewBox:"0 0 26 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[10]||(n[10]=[e("path",{d:"M10.8125 20.2123C7.52099 17.751 1 12.1239 1 7.06018C1 3.71323 3.45614 1 6.83333 1C8.58333 1 10.3333 1.58333 12.6667 3.91667C15 1.58333 16.75 1 18.5 1C21.8771 1 24.3333 3.71323 24.3333 7.06018C24.3333 12.1239 17.8124 17.751 14.5208 20.2123C13.4132 21.0405 11.9201 21.0405 10.8125 20.2123Z",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),8,I2)),e("div",A2,[e("p",z2,p(t(z)(H.index).likeCount),1)]),(s(),o("svg",{class:"h-[90%] ml-[2em] cursor-pointer anim-hover-1",onClick:O=>J(t(z)(H.index).id),viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[12]||(n[12]=[e("path",{d:"M1.00008 12.0833C1.00008 18.2045 5.96227 23.1667 12.0834 23.1667C13.9829 23.1667 15.7708 22.6888 17.3334 21.8468C19.513 20.6723 20.9797 21.7642 22.2732 21.9601C22.4694 21.9898 22.6648 21.9186 22.8051 21.7783C23.0181 21.5653 23.0586 21.236 22.941 20.9586C22.4333 19.7621 21.9672 17.4946 22.6028 15.5833C22.9686 14.4832 23.1667 13.3063 23.1667 12.0833C23.1667 5.96217 18.2046 1 12.0834 1C5.96227 1 1.00008 5.96217 1.00008 12.0833Z",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),8,E2)),e("div",q2,[e("p",Y2,p(t(z)(H.index).commentCount),1)]),(s(),o("svg",{class:"h-[90%] ml-[2em] cursor-pointer anim-hover-1",onClick:O=>ge(t(z)(H.index).id),viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n[13]||(n[13]=[e("path",{d:"M12.0833 13.2539L16.1667 9.17057M12.0833 13.2539L2.02169 10.9937C0.741163 10.7026 0.63446 8.91957 1.87114 8.4779L22.5768 1.08301C23.6197 0.710557 24.6266 1.71752 24.2542 2.7604L16.8593 23.4661C16.4176 24.7028 14.6346 24.5961 14.3435 23.3156L12.0833 13.2539Z",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),8,G2)),e("div",W2,[e("p",K2,p(t(z)(H.index).sharecount||0),1)])])])])):g("",!0)],4))),128))],4)):g("",!0),e("div",J2,[t(a).post.isLoading?(s(),o("div",X2,n[14]||(n[14]=[e("div",{class:"w-[20em] h-[20em] border-2 border-black/20 border-t-black rounded-full animate-spin"},null,-1)]))):g("",!0)]),n[16]||(n[16]=e("div",{class:"w-full h-[50%]"},null,-1))],2)])}}},en=je(Q2,[["__scopeId","data-v-8d5e267f"]]),tn={class:"w-full h-[60%] flex justify-between px-[21em] relative",style:{"border-top":"2px solid #0000001a"}},sn={class:"w-full h-[10%] absolute top-[-1.2em]"},on={class:"w-[8%] h-full flex items-center justify-center"},ln={class:"w-[8%] h-full flex items-center justify-center"},nn={class:"w-[8%] h-full flex items-center justify-center"},an={key:1,class:"h-[55%] cursor-pointer anim-hover-1",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rn={class:"w-[8%] h-full flex items-center justify-center"},cn={key:0,cx:"21.5",cy:"21.5",r:"2.5",fill:"#FF000F"},un={class:"w-[8%] h-full flex items-center justify-center"},dn={__name:"navbar",props:{currentCategory:{type:String,required:!0}},emits:["changePage"],setup(U,{emit:h}){const l=ae(),{hasUnreadMessages:d}=he(l),i=U,m=X(()=>i.currentCategory==="search"?{marginLeft:"58em"}:i.currentCategory==="profile"?{marginLeft:"237em"}:i.currentCategory==="create"?{marginLeft:"118.5em"}:i.currentCategory==="chatlist"?{marginLeft:"178em"}:{marginLeft:"0em"}),a=h,_=C=>{a("changePage",C)};return(C,r)=>(s(),o("div",tn,[e("div",sn,[e("div",{style:de([m.value,{transition:"0.5s all"}]),class:"w-[6.5%] h-full bg-black rounded-bl-[10em] rounded-br-[10em]"},null,4)]),e("div",on,[(s(),o("svg",{onClick:r[0]||(r[0]=x=>_("home")),class:"h-[45%] cursor-pointer anim-hover-1",viewBox:"0 0 22 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r[5]||(r[5]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.75 0C11.2425 0 11.7209 0.16556 12.1074 0.4707L20.7021 7.25684L20.8809 7.41504C21.2748 7.80636 21.5 8.3415 21.5 8.9033C21.4997 10.0287 20.6129 10.9443 19.5 10.9951V13.8145C19.5 15.1775 19.5001 16.2767 19.3838 17.1416C19.2628 18.0417 19.0033 18.7994 18.4014 19.4014C17.7994 20.0033 17.0417 20.2628 16.1416 20.3838C15.4841 20.4722 14.6912 20.493 13.75 20.498H7.75C6.80875 20.493 6.01589 20.4722 5.3584 20.3838C4.51456 20.2703 3.79541 20.0356 3.21289 19.5107L3.09863 19.4014C2.49672 18.7994 2.23723 18.0417 2.11621 17.1416C2.02902 16.493 2.00739 15.7127 2.00195 14.7881L2 13.8145V10.9951C0.88709 10.9443 0.00025 10.0287 0 8.9033C0 8.2615 0.29409 7.65454 0.79785 7.25684L9.3926 0.4707L9.542 0.36328C9.8992 0.12709 10.3191 0 10.75 0ZM10.25 12.25C9.3154 12.25 8.8481 12.2502 8.5 12.4512C8.27204 12.5828 8.0828 12.772 7.95117 13C7.75021 13.3481 7.75 13.8154 7.75 14.75V18.498H13.75V14.75C13.75 13.8154 13.7498 13.3481 13.5488 13C13.4172 12.772 13.228 12.5828 13 12.4512C12.6519 12.2502 12.1846 12.25 11.25 12.25H10.25Z",fill:"black"},null,-1)])))]),e("div",ln,[(s(),o("svg",{onClick:r[1]||(r[1]=x=>_("search")),class:"h-[45%] cursor-pointer anim-hover-1",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r[6]||(r[6]=[e("path",{d:"M9.3999 0.198242C14.481 0.198242 18.6001 4.31742 18.6001 9.39844C18.6001 11.5059 17.8889 13.4468 16.6968 14.998L20.2485 18.5498C20.7171 19.0184 20.7171 19.7785 20.2485 20.2471C19.7799 20.7157 19.0199 20.7157 18.5513 20.2471L14.9995 16.6953C13.4482 17.8875 11.5074 18.5986 9.3999 18.5986C4.31889 18.5986 0.199707 14.4795 0.199707 9.39844C0.199707 4.31742 4.31889 0.198242 9.3999 0.198242ZM9.3999 2.59863C5.64437 2.59863 2.6001 5.6429 2.6001 9.39844C2.6001 13.154 5.64437 16.1982 9.3999 16.1982C13.1554 16.1982 16.1997 13.154 16.1997 9.39844C16.1997 5.6429 13.1554 2.59863 9.3999 2.59863Z",fill:"black",stroke:"black","stroke-width":"0.4"},null,-1)])))]),e("div",nn,[U.currentCategory!=="create"?(s(),o("svg",{key:0,onClick:r[2]||(r[2]=x=>_("create")),class:"h-[55%] cursor-pointer anim-hover-1",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r[7]||(r[7]=[e("path",{d:"M13.7369 27.3334C16.6604 27.3334 18.9564 27.3334 20.7487 27.0925C22.5843 26.8457 24.0407 26.3291 25.1849 25.1849C26.3292 24.0406 26.8456 22.5842 27.0924 20.7487C27.3333 18.9563 27.3333 16.6605 27.3333 13.737V13.5963C27.3333 10.6729 27.3333 8.37699 27.0924 6.58464C26.8456 4.74909 26.3292 3.29271 25.1849 2.14844C24.0407 1.00417 22.5843 0.487667 20.7487 0.240894C18.9564 -2.64446e-05 16.6604 -1.3135e-05 13.7369 1.98372e-07H13.5964C10.6729 -1.3135e-05 8.37699 -2.64446e-05 6.58464 0.240894C4.74909 0.487667 3.29271 1.00417 2.14844 2.14844C1.00417 3.29271 0.487667 4.74909 0.24088 6.58464C-2.64645e-05 8.37699 -1.3135e-05 10.6729 1.98381e-07 13.5963V13.737C-1.3135e-05 16.6605 -2.64645e-05 18.9563 0.24088 20.7487C0.487667 22.5842 1.00417 24.0406 2.14844 25.1849C3.29271 26.3291 4.74909 26.8457 6.58464 27.0925C8.37699 27.3334 10.6729 27.3334 13.5964 27.3334H13.7369ZM13.6667 20.3334C12.9303 20.3334 12.3333 19.7363 12.3333 19.0001V15.0001H8.33333C7.59696 15.0001 7 14.403 7 13.6667C7 12.9303 7.59696 12.3334 8.33333 12.3334H12.3333V8.33333C12.3333 7.59696 12.9303 7 13.6667 7C14.4031 7 15 7.59696 15 8.33333V12.3334H19L19.1367 12.3398C19.8089 12.4083 20.3333 12.9765 20.3333 13.6667C20.3333 14.3569 19.8089 14.925 19.1367 14.9935L19 15.0001H15V19.0001C15 19.7363 14.4031 20.3334 13.6667 20.3334Z",fill:"black"},null,-1)]))):(s(),o("svg",an,r[8]||(r[8]=[Ye('<path d="M13.7369 27.3334C16.6604 27.3334 18.9564 27.3334 20.7487 27.0925C22.5843 26.8457 24.0407 26.3291 25.1849 25.1849C26.3292 24.0406 26.8456 22.5842 27.0924 20.7487C27.3333 18.9563 27.3333 16.6605 27.3333 13.737V13.5963C27.3333 10.6729 27.3333 8.37699 27.0924 6.58464C26.8456 4.74909 26.3292 3.29271 25.1849 2.14844C24.0407 1.00417 22.5843 0.487667 20.7487 0.240894C18.9564 -2.64446e-05 16.6604 -1.3135e-05 13.7369 1.98372e-07H13.5964C10.6729 -1.3135e-05 8.37699 -2.64446e-05 6.58464 0.240894C4.74909 0.487667 3.29271 1.00417 2.14844 2.14844C1.00417 3.29271 0.487667 4.74909 0.24088 6.58464C-2.64645e-05 8.37699 -1.3135e-05 10.6729 1.98381e-07 13.5963V13.737C-1.3135e-05 16.6605 -2.64645e-05 18.9563 0.24088 20.7487C0.487667 22.5842 1.00417 24.0406 2.14844 25.1849C3.29271 26.3291 4.74909 26.8457 6.58464 27.0925C8.37699 27.3334 10.6729 27.3334 13.5964 27.3334H13.7369ZM13.6667 20.3334C12.9303 20.3334 12.3333 19.7363 12.3333 19.0001V15.0001H8.33333C7.59696 15.0001 7 14.403 7 13.6667C7 12.9303 7.59696 12.3334 8.33333 12.3334H12.3333V8.33333C12.3333 7.59696 12.9303 7 13.6667 7C14.4031 7 15 7.59696 15 8.33333V12.3334H19L19.1367 12.3398C19.8089 12.4083 20.3333 12.9765 20.3333 13.6667C20.3333 14.3569 19.8089 14.925 19.1367 14.9935L19 15.0001H15V19.0001C15 19.7363 14.4031 20.3334 13.6667 20.3334Z" fill="black"></path><path d="M13.7369 27.3334C16.6604 27.3334 18.9564 27.3334 20.7487 27.0925C22.5843 26.8457 24.0407 26.3291 25.1849 25.1849C26.3292 24.0406 26.8456 22.5842 27.0924 20.7487C27.3333 18.9563 27.3333 16.6605 27.3333 13.737V13.5963C27.3333 10.6729 27.3333 8.37699 27.0924 6.58464C26.8456 4.74909 26.3292 3.29271 25.1849 2.14844C24.0407 1.00417 22.5843 0.487667 20.7487 0.240894C18.9564 -2.64446e-05 16.6604 -1.3135e-05 13.7369 1.98372e-07H13.5964C10.6729 -1.3135e-05 8.37699 -2.64446e-05 6.58464 0.240894C4.74909 0.487667 3.29271 1.00417 2.14844 2.14844C1.00417 3.29271 0.487667 4.74909 0.24088 6.58464C-2.64645e-05 8.37699 -1.3135e-05 10.6729 1.98381e-07 13.5963V13.737C-1.3135e-05 16.6605 -2.64645e-05 18.9563 0.24088 20.7487C0.487667 22.5842 1.00417 24.0406 2.14844 25.1849C3.29271 26.3291 4.74909 26.8457 6.58464 27.0925C8.37699 27.3334 10.6729 27.3334 13.5964 27.3334H13.7369ZM13.6667 20.3334C12.9303 20.3334 12.3333 19.7363 12.3333 19.0001V15.0001H8.33333C7.59696 15.0001 7 14.403 7 13.6667C7 12.9303 7.59696 12.3334 8.33333 12.3334H12.3333V8.33333C12.3333 7.59696 12.9303 7 13.6667 7C14.4031 7 15 7.59696 15 8.33333V12.3334H19L19.1367 12.3398C19.8089 12.4083 20.3333 12.9765 20.3333 13.6667C20.3333 14.3569 19.8089 14.925 19.1367 14.9935L19 15.0001H15V19.0001C15 19.7363 14.4031 20.3334 13.6667 20.3334Z" fill="url(#paint0_linear_2707_10639)"></path><defs><linearGradient id="paint0_linear_2707_10639" x1="2.5625" y1="26.6501" x2="31.0917" y2="-1.8791" gradientUnits="userSpaceOnUse"><stop stop-color="#F9CE34"></stop><stop offset="0.5" stop-color="#EE2A7B"></stop><stop offset="1" stop-color="#6228D7"></stop></linearGradient></defs>',3)])))]),e("div",rn,[(s(),o("svg",{onClick:r[3]||(r[3]=x=>_("chatlist")),class:"h-[45%] cursor-pointer anim-hover-1",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[r[9]||(r[9]=e("path",{d:"M22.3886 3.50934C22.9207 2.01947 21.4821 0.580923 19.9922 1.11301L2.24451 7.45149C0.477796 8.08246 0.630217 10.6298 2.45959 11.0455L9.59327 12.648L13.3909 8.73607C13.7756 8.3398 14.4087 8.33041 14.8049 8.7151C15.2012 9.09979 15.2106 9.73289 14.8259 10.1292L10.9106 14.1623L12.456 21.042C12.8718 22.8714 15.4191 23.0238 16.0501 21.2571L22.3886 3.50934Z",fill:"black"},null,-1)),t(d)?(s(),o("circle",cn)):g("",!0)]))]),e("div",un,[(s(),o("svg",{onClick:r[4]||(r[4]=x=>_("profile")),class:"h-[45%] cursor-pointer anim-hover-1",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r[10]||(r[10]=[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.75 0C4.81294 0 0 4.81294 0 10.75C0 16.6871 4.81294 21.5 10.75 21.5C16.6871 21.5 21.5 16.6871 21.5 10.75C21.5 4.81294 16.6871 0 10.75 0ZM7.5 7.25C7.5 5.45507 8.9551 4 10.75 4C12.5449 4 14 5.45507 14 7.25C14 8.53708 13.2518 9.6494 12.1667 10.1758C14.6215 10.7977 16.4476 12.9982 16.4998 15.6341C16.5038 15.8355 16.4267 16.03 16.2857 16.1739C14.8799 17.6085 12.9184 18.5 10.75 18.5C8.58216 18.5 6.62109 17.6089 5.2154 16.175C5.07439 16.0312 4.99717 15.8367 5.00112 15.6353C5.05285 12.999 6.87834 10.7978 9.3333 10.1758C8.24818 9.6494 7.5 8.53708 7.5 7.25Z",fill:"black"},null,-1)])))])]))}},fn={class:"w-full h-full bg-white"},hn={delay:100,class:"w-full h-[13.8%] flex items-end justify-center sticky top-0 bg-white z-10"},mn={class:"w-[90%] h-[51%]"},vn={delay:150,class:"w-full h-[76%] rounded-full bg-[#F2F2F7] flex"},pn={class:"w-[80%] h-[100%]"},Cn=["placeholder"],wn={key:0,class:"w-full h-full flex gap-[2px]"},gn=["onClick"],_n=["src"],xn={key:1,class:"w-full h-full relative"},yn=["src"],bn={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},kn=["src"],$n={class:"w-full h-[20em] flex items-center justify-center"},Pn={key:0,class:"flex items-center justify-center"},Sn={key:1,class:"w-full h-[79%] bg-[#F2F2F7] overflow-auto no-scrollbar"},Ln={key:0,class:"w-full h-[100em] flex items-center justify-center"},jn={class:"text-[12em] font-['SFPRO'] text-black/50"},Fn=["onClick","delay"],Mn={class:"w-[90.5%] h-[75%] flex justify-between px-[5em] py-[5em] rounded-full hover:bg-white cursor-pointer anim-hover-1 transition-all duration-200"},Tn={class:"h-full aspect-square rounded-full overflow-hidden"},On=["src"],Vn={class:"h-full w-[84.5%] flex flex-col justify-center"},Hn={class:"w-full h-[50%] flex items-end"},Zn={class:"text-[12em] font-['SFPRO'] leading-none"},Rn=["src"],Bn={class:"w-full h-[50%] flex items-start"},Dn={class:"text-[10em] font-['SFPRO'] leading-none text-black/50"},Nn={__name:"search",emits:["selectProfile","selectPost"],setup(U,{emit:h}){const{t:l}=re(),d=pe(),i=ae(),{ScrollPage:m,searchUsers:a}=he(i),_=h,C=[[{span:2},{span:1}],[{span:1},{span:2}],[{span:1},{span:1},{span:1}],[{span:3}]],r=X(()=>{const D=m.value.explore.loadedData,I=[];let M=0,T=0;for(;M<D.length;){const w=C[T%C.length],V=[];for(const A of w){if(M>=D.length)break;V.push(ze(Ae({},D[M]),{span:A.span})),M++}V.length>0&&I.push(V),T++}return I}),{parentRef:x,virtualRows:u,totalSize:c,scrollPosition:$,getItem:P}=Be({getItems:()=>r.value,itemHeightPercent:.22,overscan:3,loadMore:()=>i._getExploreActions().loadMore(),canLoadMore:()=>m.value.explore.isInitialized&&m.value.explore.hasMore&&!m.value.explore.isLoading,isLoading:()=>m.value.explore.isLoading,loadMoreThreshold:300});xe(()=>B(this,null,function*(){yield i.fetchExplorePosts()}));const R=L("");let k=null;ke(R,D=>{k&&clearTimeout(k),k=setTimeout(()=>{i.searchUsersAction(D)},300)});const v=D=>{_("selectProfile",D.username)},Z=D=>{_("selectPost",D)};return(D,I)=>{const M=G("motion-slide-visible-bottom"),T=G("motion-fade"),w=G("motion-pop");return s(),o("div",fn,[F((s(),o("div",hn,[e("div",mn,[F((s(),o("div",vn,[I[1]||(I[1]=e("div",{class:"w-[14%] h-full flex items-center justify-center"},[e("svg",{class:"h-[40%]",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.50003 0C3.35786 0 0 3.35787 0 7.5C0 11.6422 3.35786 15 7.50003 15C8.94982 15 10.3036 14.5886 11.4509 13.8761C11.8838 13.6074 12.4539 13.6325 12.8142 13.9928L15.3155 16.4941C15.641 16.8195 16.1686 16.8195 16.4941 16.4941C16.8195 16.1687 16.8195 15.641 16.4941 15.3155L13.9928 12.8143C13.6325 12.454 13.6074 11.8838 13.8762 11.4509C14.5886 10.3036 15 8.94983 15 7.5C15 3.35787 11.6421 0 7.50003 0ZM1.66667 7.5C1.66667 4.27834 4.27833 1.66667 7.50003 1.66667C10.7216 1.66667 13.3334 4.27834 13.3334 7.5C13.3334 10.7217 10.7216 13.3333 7.50003 13.3333C4.27833 13.3333 1.66667 10.7217 1.66667 7.5Z",fill:"black"})])],-1)),e("div",pn,[F(e("input",{"onUpdate:modelValue":I[0]||(I[0]=V=>R.value=V),type:"text",class:"w-full h-full bg-transparent text-[12em] placeholder:text-black/50 text-black outline-none border-none",placeholder:t(l)("instashot.search")},null,8,Cn),[[fe,R.value]])])])),[[M]])])])),[[T]]),R.value.length<2?(s(),o("div",{key:0,ref_key:"parentRef",ref:x,class:se(["w-full h-[86.2%] overflow-y-auto no-scrollbar",[t($)==="top"?"mask-bottom":"",t($)==="middle"?"mask-both":"",t($)==="bottom"?"mask-top":""]])},[e("div",{style:de({height:`${t(c)}px`,width:"100%",position:"relative"})},[(s(!0),o(oe,null,le(t(u),V=>(s(),o("div",{key:V.key,style:de({position:"absolute",top:0,left:0,width:"100%",height:`${V.size}px`,transform:`translateY(${V.start}px)`})},[t(P)(V.index)?(s(),o("div",wn,[(s(!0),o(oe,null,le(t(P)(V.index),A=>(s(),o("div",{key:A.id,style:de({flex:A.span}),class:"h-full cursor-pointer anim-hover-1 overflow-hidden bg-gray-200 relative",onClick:b=>Z(A.id)},[t(d).isVideo(A.media)?(s(),o("div",xn,[e("video",{class:"w-full h-full object-cover",src:A.media,preload:"metadata",muted:""},null,8,yn),e("div",bn,[e("img",{src:t(E)["photos/play.svg"],class:"h-[20em]",alt:""},null,8,kn)])])):(s(),o("img",{key:0,src:A.media,class:"object-cover w-full h-full object-center hover:scale-105 transition-transform duration-300",alt:""},null,8,_n))],12,gn))),128))])):g("",!0)],4))),128))],4),e("div",$n,[t(m).explore.isLoading?(s(),o("div",Pn,I[2]||(I[2]=[e("div",{class:"w-[20em] h-[20em] border-2 border-black/20 border-t-black rounded-full animate-spin"},null,-1)]))):g("",!0)]),I[3]||(I[3]=e("div",{class:"w-full h-[100em]"},null,-1))],2)):(s(),o("div",Sn,[t(a).length===0&&R.value.length>=2?(s(),o("div",Ln,[e("p",jn,p(t(l)("instashot.noUsersFound")),1)])):g("",!0),(s(!0),o(oe,null,le(t(a),(V,A)=>F((s(),o("div",{key:V.username,onClick:b=>v(V),delay:250+A*40,class:"w-full h-[53em] flex items-end justify-center"},[e("div",Mn,[e("div",Tn,[e("img",{src:V.profilephoto,class:"w-full h-full object-cover object-center",alt:""},null,8,On)]),e("div",Vn,[e("div",Hn,[e("p",Zn,p(V.username),1),V.badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+V.badge+".svg"],class:"h-[55%] ml-[3em]",alt:""},null,8,Rn)):g("",!0)]),e("div",Bn,[e("p",Dn,p(V.name),1)])])])],8,Fn)),[[w]])),128)),I[4]||(I[4]=e("div",{class:"w-full h-[100em]"},null,-1))]))])}}},In=je(Nn,[["__scopeId","data-v-f8c62aa2"]]),Un={class:"w-full h-full bg-[#F2F2F7]"},An={delay:100,class:"w-full h-[90em] flex items-center justify-center bg-white"},zn={class:"font-['SFPRO'] text-[15em] text-black leading-[100%] mt-[2.5em]"},En={delay:200,class:"w-full h-[285em] flex items-end justify-center"},qn=["src"],Yn={key:1,class:"w-full h-full relative bg-black"},Gn=["src"],Wn={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},Kn={class:"w-[35px] h-[35px] rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-200"},Jn=["src"],Xn={delay:300,class:"w-full h-[76em] flex items-end justify-center"},Qn={class:"w-[91%] rounded-[22em] h-[87%] borderred overflow-hidden px-[10em] py-[10em]",style:{border:"1em solid rgba(0, 0, 0, 0.11)"}},ei=["placeholder"],ti={delay:400,class:"w-full h-[36em] flex items-center justify-center"},si={class:"w-[90%] h-full bg-white rounded-[10em] flex"},oi={class:"w-[60%] h-full flex items-center justify-start"},li={class:"font-['SFPRO'] text-[11em] text-black leading-[100%]"},ni={class:"w-[22%] h-full flex items-center justify-end"},ii=["src"],ai={delay:500,class:"w-full h-[40em] flex items-center justify-center"},ri={class:"font-['SFPRO'] text-[15em] text-white leading-[100%]"},ci={__name:"create",emits:["changePage"],setup(U,{emit:h}){const{t:l}=re(),d=pe(),i=L(!1),m=L(!1),a=L(null),_=L(""),C=u=>{a.value=u,m.value=!1},r=h,x=()=>B(this,null,function*(){if(!a.value){d.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l("instashot.mediaNotFound")});return}const u=yield ie("INSTASHOT",{action:"sharePost",data:{photo:a.value,caption:_.value,location:i.value}});u.success?(d.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l("instashot.postSharedSuccessfully")}),r("changePage","home")):d.TriggerNotification({appname:"instashot",header:l("apps.instashot"),message:l(u.message)||u.message})});return(u,c)=>{const $=G("motion-fade"),P=G("motion-pop"),R=G("motion-slide-visible-bottom"),k=G("motion-slide-visible-left");return s(),o("div",Un,[Y(Me,{show:m.value,onSelectPhoto:C,onCancel:c[0]||(c[0]=v=>m.value=!1)},null,8,["show"]),F((s(),o("div",An,[e("p",zn,p(t(l)("instashot.newPost")),1)])),[[$]]),F((s(),o("div",En,[a.value?(s(),o("div",{key:1,class:"w-[91%] b h-[95%] rounded-[20em] bg-white flex items-center justify-center overflow-hidden cursor-pointer anim-hover-1",onClick:c[2]||(c[2]=v=>m.value=!0)},[t(d).isVideo(a.value)?F((s(),o("div",Yn,[e("video",{class:"w-full h-full object-cover rounded-[10px] transition-all duration-300",src:a.value,preload:"metadata",muted:""},p(t(l)("instashot.browserNoVideo")),9,Gn),e("div",Wn,[e("div",Kn,[e("img",{src:t(E)["photos/play.svg"],class:"h-[100%]",alt:""},null,8,Jn)])])])),[[$]]):F((s(),o("img",{key:0,src:a.value,class:"w-full h-full object-cover object-center rounded-[10px] transition-all duration-300"},null,8,qn)),[[$]])])):(s(),o("div",{key:0,class:"w-[91%] b h-[95%] rounded-[20em] bg-white flex items-center justify-center cursor-pointer anim-hover-1",onClick:c[1]||(c[1]=v=>m.value=!0)},c[5]||(c[5]=[e("svg",{class:"h-[15%]",viewBox:"0 0 58 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M33.1928 0C35.1987 2.66667e-05 37.072 1.00272 38.1848 2.67187L41.7371 8H50C54.0501 8 57.3333 11.2833 57.3333 15.3333V42C57.3333 46.0501 54.0501 49.3333 50 49.3333H7.33333C3.28325 49.3333 0 46.0501 0 42V15.3333C0 11.2833 3.28325 8 7.33333 8H15.5963L19.1484 2.67187C20.2612 1.00272 22.1346 2.66667e-05 24.1405 0H33.1928ZM28.6667 14C21.3029 14 15.3333 19.9696 15.3333 27.3333C15.3333 34.6971 21.3029 40.6667 28.6667 40.6667C36.0304 40.6667 42 34.6971 42 27.3333C42 19.9696 36.0304 14 28.6667 14ZM28.6667 19.3333C33.0851 19.3333 36.6667 22.9149 36.6667 27.3333C36.6667 31.7517 33.0851 35.3333 28.6667 35.3333C24.2483 35.3333 20.6667 31.7517 20.6667 27.3333C20.6667 22.9149 24.2483 19.3333 28.6667 19.3333ZM47.3333 15.3333C45.8605 15.3333 44.6667 16.5273 44.6667 18V18.0261C44.6667 19.4989 45.8605 20.6928 47.3333 20.6928C48.8061 20.6928 50 19.4989 50 18.0261V18C50 16.5273 48.8061 15.3333 47.3333 15.3333Z",fill:"black"})],-1)])))])),[[P]]),F((s(),o("div",Xn,[e("div",Qn,[F(e("textarea",{maxlength:400,"onUpdate:modelValue":c[3]||(c[3]=v=>_.value=v),placeholder:t(l)("instashot.addCaption"),class:"w-full flex-1 reset-textarea outline-none border-none h-full resize-none border-[.15em] leading-[1] bg-transparent text-black text-[11em] font-['SFPRO'] font-[400]"},null,8,ei),[[fe,_.value]])])])),[[R]]),c[7]||(c[7]=e("div",{class:"w-full h-[11em]"},null,-1)),F((s(),o("div",ti,[e("div",si,[c[6]||(c[6]=e("div",{class:"w-[15%] h-full flex items-center justify-center"},[e("svg",{class:"h-[40%]",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.75 0C4.47451 0 0 4.35954 0 9.6758C0 12.3982 1.15187 14.6741 2.76689 16.5525C4.37496 18.4228 6.46834 19.9311 8.4282 21.1444L8.4411 21.1524L8.4543 21.1598C8.8496 21.3829 9.296 21.5 9.75 21.5C10.204 21.5 10.6504 21.3829 11.0457 21.1598L11.0572 21.1533L11.0685 21.1464C13.0355 19.9428 15.1293 18.4296 16.7366 16.5538C18.3503 14.6706 19.5 12.3892 19.5 9.6758C19.5 4.35954 15.0255 0 9.75 0ZM9.75 5.75C7.54086 5.75 5.75 7.54086 5.75 9.75C5.75 11.9591 7.54086 13.75 9.75 13.75C11.9591 13.75 13.75 11.9591 13.75 9.75C13.75 7.54086 11.9591 5.75 9.75 5.75Z",fill:"black"})])],-1)),e("div",oi,[e("p",li,p(t(l)("instashot.shareLocation")),1)]),e("div",ni,[e("div",{onClick:c[4]||(c[4]=v=>i.value=!i.value),class:se(["w-[85%] h-[60%] rounded-full flex items-center cursor-pointer transition-colors duration-300 relative",[i.value?"bg-[#3E5FFF]":"bg-gray-200",i.value?"dark:bg-[#3E5FFF]":"dark:bg-[#292929]"]])},[e("img",{src:t(E)["settings/switchbutton.svg"],alt:"",style:de([{filter:"drop-shadow(0 2em 6em rgba(0, 0, 0, 0.3))"},{transform:i.value?"translateX(calc(100% - 5em))":"translateX(2em)"}]),class:"h-[80%] absolute transition-transform duration-300 ease-in-out"},null,12,ii)],2)])])])),[[k]]),c[8]||(c[8]=e("div",{class:"w-full h-[25em]"},null,-1)),F((s(),o("div",ai,[e("div",{onClick:x,class:"w-[90%] h-full flex items-center justify-center bg-[#3E5FFF] rounded-[10em] cursor-pointer anim-hover-1"},[e("p",ri,p(t(l)("instashot.share")),1)])])),[[P]])])}}},ui={key:0,class:"w-full h-full absolute z-[10] bg-white"},di={class:"w-full h-[100em] flex items-center justify-center"},fi={class:"w-[88%] h-[63%] flex items-end justify-center"},hi={class:"w-full h-[57%] flex justify-between"},mi={class:"h-full aspect-square rounded-full overflow-hidden"},vi=["src"],pi={class:"h-full w-[78%]"},Ci={class:"w-full h-[50%] flex items-end"},wi={class:"text-[11.5em] font-['SFPRO'] leading-[99%] text-black"},gi=["src"],_i={class:"w-full h-[50%] flex items-center"},xi={class:"text-[10em] font-['SFPRO'] leading-[99%] text-black/40"},yi={class:"w-full h-[479em] px-[10em]",style:{"border-top":"0.5em solid #00000030","border-bottom":"0.5em solid #00000030"}},bi={key:0,class:"w-full h-full flex items-center justify-center"},ki={key:0,class:"w-full h-[30em] flex items-center justify-center"},$i={class:"text-[10em] leading-[110%] overflow-hidden break-words"},Pi=["onClick"],Si={class:"h-full w-[31%] flex items-center justify-center"},Li=["src"],ji={class:"w-[69%] h-full flex items-center"},Fi={class:"w-full h-[50%]"},Mi={class:"w-full h-[50%] flex items-center"},Ti={class:"text-[11.5em] font-['SFPRO'] leading-[99%] text-black/50"},Oi=["src"],Vi={class:"w-full h-[50%] flex"},Hi={class:"text-[11.5em] font-['SFPRO'] leading-[99%] text-black/50 w-full truncate"},Zi=["onClick"],Ri={class:"w-full h-[16.5%] bg-[#F2F2F7] flex items-center px-[10em]"},Bi={class:"w-full h-[50%] flex items-center"},Di={class:"text-[11.5em] font-['SFPRO'] leading-[99%] text-black/50"},Ni=["src"],Ii={class:"w-full h-[83.5%]"},Ui=["src"],Ai=["src"],zi={class:"w-[40.5%] h-full flex items-start flex-col rounded-[22em] overflow-hidden"},Ei=["onClick","src"],qi=["onClick"],Yi=["src"],Gi={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},Wi={class:"w-[35em] h-[35em] rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-200"},Ki=["src"],Ji={key:0,class:"w-[100em] rounded-[10em] overflow-hidden bg-black/5"},Xi={class:"w-full h-[130em] relative"},Qi=["src"],e0=["src"],t0={class:"w-full py-[6em] px-[8em]"},s0={class:"text-[8em] text-black/50 font-['SFPRO'] text-center"},o0={class:"text-[10em] leading-[110%] overflow-hidden break-words"},l0={class:"w-full h-[66em] absolute bottom-0 flex items-center justify-center px-[15em]"},n0={class:"w-full h-[50%] rounded-full flex justify-between bg-[#F2F2F7] overflow-hidden"},i0={class:"w-[200em] h-full"},a0=["placeholder"],r0={__name:"message",props:{show:{type:Boolean,required:!0},user:{type:Object,required:!1,default:()=>({})}},emits:["close","goToProfile","goToPost"],setup(U,{emit:h}){const l=pe(),{t:d}=re(),i=ae(),{currentChat:m}=he(i),a=U,_=h,C=L(""),r=L(null),x=L(0),u=L(!1),c=L(!1);ke(()=>a.show,b=>B(this,null,function*(){var f;if(b&&((f=a.user)!=null&&f.username)){const j=yield i.openChat(a.user);if(j&&!j.success&&j.message){l.TriggerNotification({appname:"instashot",header:d("apps.instashot"),message:d(j.message)||j.message||d("instashot.cannotMessageYourself")}),_("close");return}be(()=>$())}})),ke(()=>m.value.messages.length,(b,f)=>{b>f&&!m.value.pagination.isLoadingMore&&be(()=>$())});const $=()=>{r.value&&(r.value.scrollTop=r.value.scrollHeight)},P=b=>B(this,null,function*(){const{scrollTop:f}=b.target;f<50&&m.value.pagination.hasMore&&!m.value.pagination.isLoadingMore&&(x.value=r.value.scrollHeight,yield i.loadMoreMessages(),be(()=>{if(r.value){const Q=r.value.scrollHeight;r.value.scrollTop=Q-x.value}}))}),R=()=>B(this,null,function*(){const b=C.value.trim();if(!b)return;C.value="";const f=yield i.sendMessage(b,"text");!f.success&&f.message&&(l.TriggerNotification({appname:"instashot",header:d("apps.instashot"),message:d(f.message)||f.message||d("instashot.cannotMessageYourself")}),C.value=b)}),k=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),R())},v=()=>{i.closeChat(),_("close")},Z=()=>{var b;(b=a.user)!=null&&b.username&&(i.closeChat(),_("goToProfile",a.user.username))},D=()=>{c.value=!0},I=()=>B(this,null,function*(){var b;(b=a.user)!=null&&b.username&&(yield i.deleteConversation(a.user.username),_("close")),c.value=!1}),M=b=>B(this,null,function*(){if(!b)return;const f=yield i.sendMessage(b,"media");!f.success&&f.message&&l.TriggerNotification({appname:"instashot",header:d("apps.instashot"),message:d(f.message)||f.message||d("instashot.cannotMessageYourself")})}),T=b=>{const f=l.isVideo(b);l.setPhotoViewerData({image:b,type:f?"video":"image"})},w=b=>{try{return typeof b=="string"?JSON.parse(b):b}catch(f){return{username:"",media:"",badge:0,name:"",profilephoto:""}}},V=b=>B(this,null,function*(){const f=w(b);f.postId?(i.closeChat(),_("goToPost",f.postId)):f.media&&T(f.media)}),A=b=>{const f=w(b);f.username&&(i.closeChat(),_("goToProfile",f.username))};return(b,f)=>a.show?(s(),o("div",ui,[Y(Me,{show:u.value,onSelectPhoto:M,onCancel:f[0]||(f[0]=j=>u.value=!1)},null,8,["show"]),c.value?(s(),W(Se,{key:0,onClose:f[1]||(f[1]=j=>c.value=!1),buttons:{cancel:t(d)("general.cancel"),submit:t(d)("general.delete")},header:t(d)("general.areYouSure"),label:t(d)("instashot.deleteConversation"),onCancel:f[2]||(f[2]=j=>c.value=!1),onSubmit:I},null,8,["buttons","header","label"])):g("",!0),e("div",di,[e("div",fi,[e("div",hi,[e("div",{onClick:v,class:"w-[3%] h-full flex items-center justify-center cursor-pointer anim-hover-1"},f[5]||(f[5]=[e("svg",{class:"h-[40%]",viewBox:"0 0 11 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M9.41412 0.707031L1.41418 8.70707L9.41418 16.7071",stroke:"black","stroke-width":"2","stroke-miterlimit":"16"})],-1)])),e("div",{onClick:Z,class:"w-[74%] h-full flex justify-between cursor-pointer anim-hover-1"},[e("div",mi,[e("img",{src:a.user.profilephoto,class:"w-full h-full object-cover object-center",alt:""},null,8,vi)]),e("div",pi,[e("div",Ci,[e("p",wi,p(a.user.username),1),a.user.badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+a.user.badge+".svg"],class:"h-[55%] ml-[3em]",alt:""},null,8,gi)):g("",!0)]),e("div",_i,[e("p",xi,p(a.user.name),1)])])]),e("div",{onClick:D,class:"w-[10%] h-full flex items-center justify-start cursor-pointer anim-hover-1"},f[6]||(f[6]=[Ye('<div class="h-[75%] aspect-square rounded-full"><svg class="h-full w-full" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="32" height="32" rx="16" fill="#F2F2F7"></rect><path d="M21.055 18.4389C21.0039 19.2744 20.9633 19.9374 20.8801 20.4669C20.7948 21.01 20.6583 21.4623 20.3851 21.8579C20.1353 22.2198 19.8136 22.5253 19.4405 22.7548C19.0327 23.0058 18.5774 23.1155 18.0354 23.168L13.9516 23.1679C13.409 23.1153 12.9531 23.0054 12.5451 22.754C12.1718 22.524 11.85 22.218 11.6002 21.8555C11.3272 21.4592 11.191 21.0063 11.1064 20.4624C11.0238 19.9321 10.9842 19.2682 10.9341 18.4315L10.5 11.168H21.5L21.055 18.4389Z" fill="black"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M16.8982 8.85388C17.275 8.88757 17.629 9.00254 17.9331 9.2293C18.158 9.39702 18.3142 9.60231 18.4476 9.82465C18.5713 10.0307 18.6958 10.2876 18.837 10.579L19.1216 11.1658H22C22.3682 11.1658 22.6667 11.4643 22.6667 11.8325C22.6667 12.2007 22.3682 12.4992 22 12.4992C17.9999 12.4992 14.0002 12.4992 10 12.4992C9.63185 12.4992 9.33337 12.2007 9.33337 11.8325C9.33337 11.4643 9.63185 11.1658 10 11.1658H12.9399L13.1771 10.6455C13.3148 10.3433 13.4361 10.0772 13.5579 9.86372C13.6893 9.63341 13.8448 9.42028 14.0724 9.24567C14.3803 9.00954 14.7414 8.88982 15.1266 8.85476C15.4166 8.82836 15.709 8.83199 16 8.83246C16.3406 8.833 16.6467 8.83138 16.8982 8.85388ZM14.4052 11.1658H17.6398C17.4887 10.8542 17.392 10.6567 17.3044 10.5108C17.1762 10.2973 17.0226 10.2037 16.7794 10.1819C16.6066 10.1664 16.3813 10.1658 16.023 10.1658C15.6558 10.1658 15.4247 10.1665 15.2475 10.1826C14.9981 10.2053 14.8426 10.3025 14.716 10.5245C14.633 10.6699 14.5426 10.8647 14.4052 11.1658Z" fill="black"></path></svg></div>',1)]))])])]),e("div",yi,[t(m).isLoading?(s(),o("div",bi,f[7]||(f[7]=[e("div",{class:"w-[20em] h-[20em] border-2 border-black/20 border-t-black rounded-full animate-spin"},null,-1)]))):(s(),o("div",{key:1,ref_key:"messagesContainer",ref:r,onScroll:P,class:"w-full h-full overflow-auto no-scrollbar"},[t(m).pagination.isLoadingMore?(s(),o("div",ki,f[8]||(f[8]=[e("div",{class:"w-[14em] h-[14em] border-2 border-black/20 border-t-black rounded-full animate-spin"},null,-1)]))):g("",!0),(s(!0),o(oe,null,le(t(m).messages,j=>(s(),o("div",{key:j.id,class:se(["w-full min-h-[31em] flex pt-[7em] pb-[7em]",j.ismine?"justify-end":"justify-start"])},[j.type=="text"?(s(),o("div",{key:0,class:se(["max-w-[78%] h-full flex items-center px-[13em] py-[7em] rounded-[20em]",j.ismine?"bg-[#0D71F0] text-white":"bg-[#F2F2F7] text-black"])},[e("p",$i,p(j.content),1)],2)):g("",!0),j.type=="profile"?(s(),o("div",{key:1,class:se(["w-full h-[50em] flex",j.ismine?"justify-end":"justify-start"])},[e("div",{onClick:Q=>A(j.content),class:"w-[59%] h-full flex items-center rounded-[16em] bg-[#F2F2F7] cursor-pointer anim-hover-1"},[e("div",Si,[e("img",{src:w(j.content).profilephoto,class:"h-[70%] aspect-square rounded-full object-cover object-center",alt:""},null,8,Li)]),e("div",ji,[e("div",Fi,[e("div",Mi,[e("p",Ti,p(w(j.content).username),1),w(j.content).badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+w(j.content).badge+".svg"],class:"h-[75%] ml-[3em]",alt:""},null,8,Oi)):g("",!0)]),e("div",Vi,[e("p",Hi,p(w(j.content).name),1)])])])],8,Pi)],2)):g("",!0),j.type=="post"?(s(),o("div",{key:2,class:se(["w-full h-[182em] flex",j.ismine?"justify-end":"justify-start"])},[e("div",{onClick:Q=>V(j.content),class:"w-[59.5%] h-full flex items-start flex-col rounded-[15em] overflow-hidden cursor-pointer anim-hover-1"},[e("div",Ri,[e("div",Bi,[e("p",Di,p(w(j.content).username),1),w(j.content).badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+w(j.content).badge+".svg"],class:"h-[75%] ml-[3em]",alt:""},null,8,Ni)):g("",!0)])]),e("div",Ii,[t(l).isVideo(w(j.content).media)?(s(),o("video",{key:1,class:"w-full h-full object-cover",src:w(j.content).media,preload:"metadata",muted:""},null,8,Ai)):(s(),o("img",{key:0,src:w(j.content).media,class:"w-full h-full object-cover object-center",alt:""},null,8,Ui))])],8,Zi)],2)):g("",!0),j.type=="media"?(s(),o("div",{key:3,class:se(["w-full h-[182em] flex",j.ismine?"justify-end":"justify-start"])},[e("div",zi,[t(l).isVideo(j.content)?(s(),o("div",{key:1,onClick:Q=>T(j.content),class:"w-full h-full relative"},[e("video",{class:"w-full h-full object-cover rounded-[20em] transition-all duration-300",src:j.content,preload:"metadata",muted:""},p(t(d)("instashot.browserNoVideo")),9,Yi),e("div",Gi,[e("div",Wi,[e("img",{src:t(E)["photos/play.svg"],class:"h-[100%]",alt:""},null,8,Ki)])])],8,qi)):(s(),o("img",{key:0,onClick:Q=>T(j.content),src:j.content,class:"w-full h-full object-cover object-center",alt:""},null,8,Ei))])],2)):g("",!0),j.type=="story_reply"?(s(),o("div",{key:4,class:se(["w-full flex flex-col gap-[6em]",j.ismine?"items-end":"items-start"])},[w(j.content).storyMedia?(s(),o("div",Ji,[e("div",Xi,[t(l).isVideo(w(j.content).storyMedia)?(s(),o("video",{key:1,class:"w-full h-full object-cover",src:w(j.content).storyMedia,preload:"metadata",muted:""},null,8,e0)):(s(),o("img",{key:0,src:w(j.content).storyMedia,class:"w-full h-full object-cover object-center",alt:""},null,8,Qi))]),e("div",t0,[e("p",s0,p(j.ismine?t(d)("instashot.youRepliedToStory"):t(d)("instashot.repliedToYourStory")),1)])])):g("",!0),e("div",{class:se(["max-w-[78%] flex items-center px-[13em] py-[7em] rounded-[20em]",j.ismine?"bg-[#0D71F0] text-white":"bg-[#F2F2F7] text-black"])},[e("p",o0,p(w(j.content).message),1)],2)],2)):g("",!0)],2))),128))],544))]),e("div",l0,[e("div",n0,[e("div",{class:"w-[34em] h-full flex items-center justify-center cursor-pointer anim-hover-1",onClick:f[3]||(f[3]=j=>u.value=!0)},f[9]||(f[9]=[e("svg",{class:"h-[80%]",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("circle",{cx:"20",cy:"20",r:"20",fill:"#3D5EFC"}),e("path",{d:"M21.6973 10.75C22.4495 10.75 23.152 11.126 23.5693 11.752L24.9014 13.75H28C29.5188 13.75 30.75 14.9812 30.75 16.5V26.5C30.75 28.0188 29.5188 29.25 28 29.25H12C10.4812 29.25 9.25 28.0188 9.25 26.5V16.5C9.25 14.9812 10.4812 13.75 12 13.75H15.0986L16.4307 11.752C16.848 11.126 17.5505 10.75 18.3027 10.75H21.6973ZM20 16C17.2386 16 15 18.2386 15 21C15 23.7614 17.2386 26 20 26C22.7614 26 25 23.7614 25 21C25 18.2386 22.7614 16 20 16ZM20 18C21.6569 18 23 19.3431 23 21C23 22.6569 21.6569 24 20 24C18.3431 24 17 22.6569 17 21C17 19.3431 18.3431 18 20 18ZM27 16.5C26.4477 16.5 26 16.9477 26 17.5V17.5098C26 18.0621 26.4477 18.5098 27 18.5098C27.5523 18.5098 28 18.0621 28 17.5098V17.5C28 16.9477 27.5523 16.5 27 16.5Z",fill:"white"})],-1)])),e("div",i0,[F(e("input",{"onUpdate:modelValue":f[4]||(f[4]=j=>C.value=j),onKeydown:k,type:"text",class:"w-full h-full text-[12em] outline-none border-none bg-transparent font-['SFPRO'] text-black",placeholder:t(d)("instashot.messageInput")},null,40,a0),[[fe,C.value]])]),e("div",{onClick:R,class:"w-[34em] h-full flex items-center justify-center cursor-pointer anim-hover-1"},f[10]||(f[10]=[e("svg",{class:"h-[55%]",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M22 2L11 13",stroke:"#0D71F0","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M22 2L15 22L11 13L2 9L22 2Z",stroke:"#0D71F0","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))])])])):g("",!0)}},c0={class:"w-full h-full relative bg-white"},u0={class:"w-full h-[78em] flex items-end justify-center"},d0={class:"w-[90%] h-[43%] rounded-[20em] flex bg-[#F2F2F7]"},f0={class:"w-[80%] h-full"},h0=["placeholder"],m0={class:"w-full h-[40em] flex items-end"},v0={class:"text-[16em] font-['SFPRO'] text-black leading-[99%] ml-[0.8em] mb-[0.1em]"},p0={key:0,class:"w-full h-[100em] flex items-center justify-center"},C0={class:"text-[12em] font-['SFPRO'] text-black/50"},w0=["onClick"],g0={class:"w-[90%] h-[61%] flex justify-between"},_0={class:"h-full aspect-square rounded-full overflow-hidden"},x0=["src"],y0={class:"w-[76%] h-full"},b0={class:"w-full h-[50%] flex items-end"},k0={class:"text-[12em] font-['SFPRO'] text-black leading-[99%]"},$0=["src"],P0={class:"w-full h-[50%] flex items-center"},S0={class:"text-[10em] font-['SFPRO'] text-black/50 leading-[99%] truncate w-full"},L0={class:"w-[6%] h-full flex items-center justify-center"},j0={key:0,class:"h-[10%] bg-[#FF000F] aspect-square rounded-full"},F0={key:1,class:"w-full h-[40em] flex items-center justify-center"},M0={__name:"chatlist",emits:["messageOpen","goToProfile","goToPost"],setup(U,{emit:h}){const{t:l}=re(),d=ae(),{conversations:i,conversationsPagination:m}=he(d),a=h,_=L(!1),C=L(!1),r=L({}),x=L(""),u=L(null),c=X(()=>{if(!x.value.trim())return i.value;const M=x.value.toLowerCase().trim();return i.value.filter(T=>{var w,V;return((w=T.username)==null?void 0:w.toLowerCase().includes(M))||((V=T.name)==null?void 0:V.toLowerCase().includes(M))})}),$=M=>{if(!M.lastMessage)return l("instashot.startConversation");const T=M.lastMessageType||"text";if(T==="post")return l("instashot.sharedPost");if(T==="profile")return l("instashot.sharedProfile");if(T==="media")return l("instashot.sentPhoto");if(T==="story_reply")try{const w=typeof M.lastMessage=="string"?JSON.parse(M.lastMessage):M.lastMessage;return`${l("instashot.storyReply")} ${w.message||l("instashot.repliedToStory")}`}catch(w){return l("instashot.repliedToStory")}if(T==="text")return M.lastMessage;try{const w=typeof M.lastMessage=="string"?JSON.parse(M.lastMessage):M.lastMessage;return w.postId?l("instashot.sharedPost"):w.profileUsername?l("instashot.sharedProfile"):w.storyId?`${l("instashot.storyReply")} ${w.message||l("instashot.repliedToStory")}`:M.lastMessage}catch(w){return M.lastMessage}},P=M=>{r.value=M,_.value=!1,C.value=!0,a("messageOpen",!0)},R=M=>{r.value={username:M.username,name:M.name,profilephoto:M.profilephoto,badge:M.badge||0},C.value=!0,a("messageOpen",!0)},k=()=>{C.value=!1,r.value={},a("messageOpen",!1)},v=M=>{C.value=!1,r.value={},a("messageOpen",!1),a("goToProfile",M)},Z=M=>{C.value=!1,r.value={},a("messageOpen",!1),a("goToPost",M)},D=M=>{const{scrollTop:T,scrollHeight:w,clientHeight:V}=M.target;w-T-V<100&&I()},I=()=>B(this,null,function*(){m.value.isLoading||!m.value.hasMore||(yield d.loadMoreConversations())});return xe(()=>B(this,null,function*(){yield d.fetchConversations(!0)})),(M,T)=>(s(),o("div",c0,[Y(r0,{show:C.value,user:r.value,onClose:k,onGoToProfile:v,onGoToPost:Z},null,8,["show","user"]),Y(Le,{show:_.value,headername:t(l)("instashot.newMessage"),onSelectProfile:P,onClose:T[0]||(T[0]=w=>_.value=!1),fetchData:!0},null,8,["show","headername"]),e("div",{onClick:T[1]||(T[1]=w=>_.value=!0),class:"h-[51em] absolute aspect-square rounded-full bottom-[72em] cursor-pointer anim-hover-1 flex items-center justify-center right-[16em] z-[2] bg-[#3E5FFF]"},T[3]||(T[3]=[e("svg",{class:"h-[50%]",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.1067 2.71704C14.7107 2.65161 17.2894 2.65161 19.8934 2.71705L19.971 2.719C22.004 2.77005 23.64 2.81113 24.9511 3.03946C26.3238 3.27852 27.4394 3.73702 28.3819 4.68309C29.3204 5.6252 29.7765 6.72478 30.0109 8.0752C30.2343 9.36102 30.2683 10.9571 30.3104 12.9342L30.3121 13.0125C30.3237 13.5594 30.3307 14.105 30.3327 14.6503C30.3351 15.2946 30.3363 15.6166 30.1959 15.737C30.1591 15.7685 30.1362 15.7826 30.0916 15.8015C29.9212 15.8737 29.5685 15.6963 28.8633 15.3415C27.3077 14.4434 25.3912 14.4434 23.8356 15.3415C23.2505 15.6794 22.769 16.1637 22.4547 16.4799L17.906 21.029C16.9259 22.0091 16.5146 23.1513 16.3002 23.9911C16.1947 24.4045 16.1228 24.8043 16.0694 25.1141L15.9066 25.9969C15.8707 26.1641 15.8252 26.3754 15.7839 26.6022C15.7172 26.9666 15.6839 27.1487 15.5718 27.2417C15.4595 27.3346 15.2871 27.3334 14.9424 27.331C13.9988 27.3246 13.0545 27.3094 12.1067 27.2855L12.029 27.2837C9.99598 27.2326 8.36003 27.1915 7.04895 26.9631C5.67628 26.7241 4.56066 26.2657 3.61818 25.3195C2.67965 24.3774 2.22354 23.2778 1.98903 21.9274C1.76574 20.6417 1.73174 19.0455 1.68961 17.0685L1.68794 16.9901C1.65961 15.6617 1.65961 14.341 1.68793 13.0125L1.68961 12.9342C1.73173 10.9571 1.76574 9.36101 1.98903 8.07517C2.22354 6.72477 2.67963 5.62518 3.61818 4.68308C4.56066 3.737 5.67628 3.27849 7.04895 3.03944C8.36004 2.8111 9.99602 2.77004 12.0291 2.71898L12.1067 2.71704ZM9.84244 9.47378C9.36704 9.1927 8.75379 9.35024 8.47271 9.82564C8.19163 10.3011 8.34916 10.9143 8.82458 11.1954L12.7473 13.5146C13.9084 14.2011 14.9103 14.6679 16.0002 14.6679C17.09 14.6679 18.092 14.2011 19.2531 13.5146L23.1757 11.1954C23.6512 10.9143 23.8087 10.3011 23.5276 9.82564C23.2465 9.35024 22.6334 9.1927 22.1579 9.47378L18.2352 11.793C17.1094 12.4586 16.5108 12.6679 16.0002 12.6679C15.4895 12.6679 14.891 12.4586 13.7651 11.793L9.84244 9.47378Z",fill:"white"}),e("path",{d:"M24.8359 17.0737C25.7727 16.5327 26.9268 16.5327 27.8636 17.0737C28.2124 17.275 28.5248 17.5881 28.8889 17.9529L28.9687 18.0327L29.0484 18.1123C29.4133 18.4766 29.7263 18.7889 29.9277 19.1377C30.4685 20.0745 30.4685 21.2286 29.9277 22.1654C29.7263 22.5142 29.4133 22.8266 29.0484 23.1907L24.5581 27.6809C23.9377 28.3013 23.1885 28.5911 22.5155 28.763C22.1795 28.8489 21.8419 28.9099 21.5356 28.9629L20.6136 29.1329C20.2057 29.2202 19.7973 29.3075 19.4597 29.329C19.0877 29.3527 18.5484 29.3163 18.1168 28.8846C17.6851 28.4529 17.6485 27.9135 17.6723 27.5417C17.6937 27.2039 17.7811 26.7957 17.8685 26.3877L18.0384 25.4658C18.0913 25.1595 18.1525 24.8219 18.2383 24.4858C18.4101 23.8129 18.7 23.0635 19.3204 22.4431L23.8105 17.9529C24.1748 17.5881 24.4871 17.275 24.8359 17.0737Z",fill:"white"})],-1)])),e("div",u0,[e("div",d0,[T[4]||(T[4]=e("div",{class:"w-[12%] h-full flex items-center justify-center"},[e("svg",{class:"h-[40%]",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.50003 0C3.35786 0 0 3.35787 0 7.5C0 11.6422 3.35786 15 7.50003 15C8.94982 15 10.3036 14.5886 11.4509 13.8761C11.8838 13.6074 12.4539 13.6325 12.8142 13.9928L15.3155 16.4941C15.641 16.8195 16.1686 16.8195 16.4941 16.4941C16.8195 16.1687 16.8195 15.641 16.4941 15.3155L13.9928 12.8143C13.6325 12.454 13.6074 11.8838 13.8762 11.4509C14.5886 10.3036 15 8.94983 15 7.5C15 3.35787 11.6421 0 7.50003 0ZM1.66667 7.5C1.66667 4.27834 4.27833 1.66667 7.50003 1.66667C10.7216 1.66667 13.3334 4.27834 13.3334 7.5C13.3334 10.7217 10.7216 13.3333 7.50003 13.3333C4.27833 13.3333 1.66667 10.7217 1.66667 7.5Z",fill:"black"})])],-1)),e("div",f0,[F(e("input",{"onUpdate:modelValue":T[2]||(T[2]=w=>x.value=w),type:"text",placeholder:t(l)("instashot.search"),class:"w-full h-full bg-transparent outline-none text-[12em] font-['SFPRO'] placeholder:text-black/50 text-black"},null,8,h0),[[fe,x.value]])])])]),e("div",m0,[e("p",v0,p(t(l)("instashot.messages")),1)]),e("div",{ref_key:"listContainer",ref:u,onScroll:D,class:"w-full h-[calc(100%-170em)] overflow-auto no-scrollbar"},[c.value.length===0&&!t(m).isLoading?(s(),o("div",p0,[e("p",C0,p(t(l)("instashot.noConversationsYet")),1)])):g("",!0),(s(!0),o(oe,null,le(c.value,w=>(s(),o("div",{key:w.username,onClick:V=>R(w),class:"w-full h-[60em] flex items-center justify-center cursor-pointer anim-hover-1"},[e("div",g0,[e("div",_0,[e("img",{src:w.profilephoto,class:"w-full h-full object-cover object-center",alt:""},null,8,x0)]),e("div",y0,[e("div",b0,[e("p",k0,p(w.username),1),w.badge>0?(s(),o("img",{key:0,src:t(E)["twix/"+w.badge+".svg"],class:"h-[60%] ml-[3em]",alt:""},null,8,$0)):g("",!0)]),e("div",P0,[e("p",S0,p($(w)),1)])]),e("div",L0,[w.unread>0?(s(),o("div",j0)):g("",!0)])])],8,w0))),128)),t(m).isLoading?(s(),o("div",F0,T[5]||(T[5]=[e("div",{class:"w-[16em] h-[16em] border-2 border-black/20 border-t-black rounded-full animate-spin"},null,-1)]))):g("",!0)],544)]))}},T0={class:"w-full rounded-[44em] h-full bg-white relative"},O0={key:0,class:"w-full h-[8.7%] absolute bottom-0 z-[200] bg-white"},E0={__name:"InstaShotApp",setup(U){const h=ae(),l=L([{key:"login"},{key:"signup"},{key:"profile"},{key:"home"},{key:"search"},{key:"post"},{key:"activities"},{key:"create"},{key:"chatlist"}]),d=(u,c=!1)=>B(this,null,function*(){u==="profile"&&(h.clearProfileHistory(),h.fetchProfilePosts()),u==="home"&&(h.clearProfileHistory(),c&&(h.clearStoryState(),yield h.fetchPosts(),h.fetchUnreadCount(),h.fetchStories(!0))),h.Page=u}),i=u=>B(this,null,function*(){yield h.navigateToProfile(u),h.Page="profile"}),m=()=>B(this,null,function*(){yield h.goBackProfile()}),a=L("search"),_=u=>B(this,null,function*(){a.value=h.Page,yield h.fetchPostDetail(u),h.Page="post"}),C=()=>{h.Page=a.value||"search"},r=L(!1),x=u=>{r.value=u};return xe(()=>B(this,null,function*(){const u=yield ie("INSTASHOT",{action:"hasProfile"});u.success?(yield h.SetProfile(u.data),yield h.fetchPosts(),h.fetchUnreadCount(),h.fetchStories(),h.Page="home"):h.Page="login"})),(u,c)=>(s(),o("div",T0,[Y(a1,{"current-key":t(h).Page,items:l.value,duration:300,easing:"ease-in-out"},{login:ee(()=>[t(h).Page=="login"?(s(),W(_1,{key:0,onChangePage:d})):g("",!0)]),signup:ee(()=>[t(h).Page=="signup"?(s(),W(R1,{key:0,onChangePage:d})):g("",!0)]),profile:ee(()=>[t(h).Page=="profile"?(s(),W(eo,{key:0,onSelectProfile:i,onGoBack:m,onSelectPost:_})):g("",!0)]),home:ee(()=>[t(h).Page=="home"?(s(),W(en,{key:0,onSelectProfile:i})):g("",!0)]),search:ee(()=>[t(h).Page=="search"?(s(),W(In,{key:0,onSelectProfile:i,onSelectPost:_})):g("",!0)]),post:ee(()=>[t(h).Page=="post"?(s(),W(We,{key:0,onSelectProfile:i,onClose:C})):g("",!0)]),activities:ee(()=>[t(h).Page=="activities"?(s(),W(Ke,{key:0})):g("",!0)]),create:ee(()=>[t(h).Page=="create"?(s(),W(ci,{key:0,onChangePage:d})):g("",!0)]),chatlist:ee(()=>[t(h).Page=="chatlist"?(s(),W(M0,{key:0,onMessageOpen:x,onGoToProfile:i,onGoToPost:_})):g("",!0)]),_:1},8,["current-key","items"]),t(h).Page!=="post"&&t(h).Page!=="activities"&&t(h).Page!=="login"&&t(h).Page!=="signup"&&!r.value?(s(),o("div",O0,[Y(dn,{currentCategory:t(h).Page,onChangePage:d},null,8,["currentCategory"])])):g("",!0)]))}};export{E0 as default};
|