1import{_ as h,f as p,o as c,g as m,i as F,T as L,z as S,A as C,B as x,F as $,s as v,C as B,r as u,D as M,j as a,t as _,q as y,E as N,P as T,G as P,k as q,m as A,a as G,u as D,y as E,c as Q}from"./BcZZBfx9.js";import{c as w}from"./vnNg8D3v.js";import{S as V}from"./DvVuCqmz.js";import{a as R}from"./-oFWav77.js";import{_ as b}from"./w8lc_7Ki.js";import{d as O}from"./B8BtHEbq.js";import{u as U}from"./B1BnbtGw.js";import"./BNvFTH3X.js";import"./CTAE3X4w.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f0f095cd-9f07-464d-a553-9d3cc1734899",e._sentryDebugIdIdentifier="sentry-dbid-f0f095cd-9f07-464d-a553-9d3cc1734899")}catch{}const W={name:"AppGridItem",props:{src:{type:String,required:!0},size:{type:Number,default:null}},data(){return{animationName:"none"}},computed:{dynamicStyles(){return this.size?`width: ${this.size}px; height: ${this.size}px;`:""},optimizedSrc(){return`${this.src}?x-img=v1/optimize,q_90/resize,w_130,h_130`}},watch:{src(){this.animationName="flip"}}},j=["src"];function J(e,t,s,d,n,r){return c(),p("div",{class:"AppGridItem",style:S(r.dynamicStyles)},[m(L,{name:n.animationName,mode:"out-in"},{default:F(()=>[(c(),p("img",{key:s.src,src:r.optimizedSrc,class:"AppGridItem__image",decoding:"async",alt:""},null,8,j))]),_:1},8,["name"])],4)}const Y=h(W,[["render",J]]),Z=500,K={name:"AppsGrid",components:{AppGridItem:Y},props:{apps:{type:Array,required:!0}},data(){return{appsList:x([...this.apps]),interval:null}},mounted(){typeof window<"u"&&(this.interval=C(()=>{var e;(e=this.appsList)!=null&&e.length&&this.swapAppIcons()},Z))},beforeUnmount(){clearInterval(this.interval)},methods:{swapAppIcons(){const e=this.appsList.length-1,t=parseInt(e/2),s=Math.floor(Math.random()*t),d=t+Math.floor(Math.random()*(e-t)),n=this.appsList[s];this.appsList[s]=this.appsList[d],this.appsList[d]=n}}},X={ref:"gridEl",class:"AppsGrid"};function ee(e,t,s,d,n,r){const i=u("AppGridItem");return c(),p("div",X,[(c(!0),p($,null,v(n.appsList.slice(0,62),(o,l)=>{var f,g;return c(),B(i,{key:"1-"+l,keyx:(f=o.info)==null?void 0:f.packageName,src:(g=o.info)==null?void 0:g.image,class:"AppsGrid__item",alt:""},null,8,["keyx","src"])}),128))],512)}const te=h(K,[["render",ee]]),ae=M("/images/home/logo.png"),se={name:"HomeHeader",components:{AppsGrid:te},mixins:[w],props:{gridApps:{type:Array,required:!0},title:{type:String,default:""},subtitle:{type:String,default:""}},methods:{sendAndroidTvLinkEvent(){gtag("event","android-tv-download-click",{event_category:"bazaar",event_label:"download-android-tv",event_value:1})}}},re={class:"HomeHeader"},ne={class:"HomeHeader__content"},ie={class:"HomeHeader__title"},oe={class:"HomeHeader__subtitle text-muted"},ce={class:"HomeHeader__download-buttons"},de=["href"],le=["src"],pe=["href"],me=["src"];function _e(e,t,s,d,n,r){const i=u("AppsGrid");return c(),p("header",re,[m(i,{apps:s.gridApps,class:"HomeHeader__app-icons"},null,8,["apps"]),a("div",ne,[t[1]||(t[1]=a("img",{class:"HomeHeader__logo",src:ae,alt:"بازار",width:"750",height:"750"},null,-1)),a("h1",ie,_(e.$t("home.title")),1),a("p",oe,_(e.$t("home.subtitle")),1),a("div",ce,[a("a",{class:"newbtn","data-color":"primary","data-variant":"normal","data-size":"xl",href:e.links.downloadAndroid.link,"data-arrow-focusable":""},[a("img",{src:e.$resolve("/images/pre-install/android-icon.svg"),alt:""}
1,null,8,le),y(" "+_(e.$t("footer.downloadAndroidButton")),1)],8,de),a("a",{class:"newbtn","data-color":"primary","data-variant":"ghost","data-size":"xl",href:e.links.downloadTv.link,"data-arrow-focusable":"",onClick:t[0]||(t[0]=(...o)=>r.sendAndroidTvLinkEvent&&r.sendAndroidTvLinkEvent(...o))},[a("img",{src:e.$resolve("/images/pre-install/tv-icon.svg"),alt:""},null,8,me),y(" "+_(e.$t("footer.downloadTvButton")),1)],8,pe)])])])}const I=h(se,[["render",_e]]),ue={name:"HomeFeaturedApps",components:{SimpleAppList:V},props:{rows:{type:Array,required:!0}}},he={class:"HomeFeaturedApps"},fe={class:"HomeFeaturedApps__title"};function ge(e,t,s,d,n,r){const i=u("SimpleAppList");return c(),p("div",he,[a("h2",fe,_(e.$t("home.featured-apps")),1),(c(!0),p($,null,v(s.rows,o=>(c(),B(i,{key:o.title,title:o.title,apps:o.apps,"expand-info":o.expandInfo,class:"HomeFeaturedApps__row"},null,8,["title","apps","expand-info"]))),128))])}const H=h(ue,[["render",ge]]),$e=new N("https://mag.cafebazaar.ir");async function ve({timeout:e=3e3}={}){var t;try{const{data:s}=await $e.get("/wp-json/wp/v2/posts?per_page=4&_embed",{timeout:e});return(t=s==null?void 0:s.map)==null?void 0:t.call(s,d=>{var i,o;const n=((o=(i=d==null?void 0:d._embedded)==null?void 0:i["wp:featuredmedia"])==null?void 0:o[0].media_details.sizes)||{},r=n.medium_large||n.medium||n.full;return d.thumbnail=r==null?void 0:r.source_url,d})}catch{return[]}}const ze={name:"LocalizedIcon",props:{name:{type:String,required:!0},enName:{type:String,default:""}},computed:{iconName(){var t,s;const e=this.enName||this.name;return((s=(t=this._.provides[T]||this.$route)==null?void 0:t.query)==null?void 0:s.l)==="en"?e:this.name}}};function be(e,t,s,d,n,r){return c(),p("i",{class:P(r.iconName)},null,2)}const ye=h(ze,[["render",be],["__scopeId","data-v-5e39ffb2"]]),we=/<\/?[^>]+(>|$)/g,ke={name:"BazaarMagazine",components:{LocalizedIcon:ye},mixins:[w],data(){return{posts:[]}},mounted(){this.fetchPosts()},methods:{cleanText(e){return e.replace(we,"").replace("[…]","...")},async fetchPosts(){const e=await ve({timeout:7e3});this.posts=e||[]}}},Ae={key:0,class:"BazaarMagazine"},Be={class:"BazaarMagazine__title"},Ie={class:"BazaarMagazine__posts"},He={class:"row"},Fe=["href","title"],Le=["src","alt"],Se={class:"BazaarMagazine__post-title"},Ce={class:"text-muted"},xe=["href"];function Me(e,t,s,d,n,r){var o;const i=u("LocalizedIcon");return(o=n.posts)!=null&&o.length?(c(),p("div",Ae,[a("h2",Be,_(e.$t("home.blog-news")),1),a("div",Ie,[a("div",He,[(c(!0),p($,null,v(n.posts,l=>{var f,g,z,k;return c(),p("div",{key:l.id,class:"col-md-4 col-sm-6 col-xs-12 BazaarMagazine__post"},[a("a",{href:l.link,title:(f=l.title)==null?void 0:f.rendered,target:"_blank"},[a("img",{class:"BazaarMagazine__post-image",height:"150",loading:"lazy",decoding:"async",src:l.thumbnail,alt:(g=l.title)==null?void 0:g.rendered},null,8,Le),a("div",Se,_((z=l.title)==null?void 0:z.rendered),1),a("div",Ce,_(r.cleanText((k=l.excerpt)==null?void 0:k.rendered)),1)],8,Fe)])}),128))])]),a("a",{class:"newbtn BazaarMagazine__mag-link","data-color":"primary","data-variant":"ghost","data-size":"lg",href:e.links.mag.link,"data-arrow-focusable":""},[y(_(e.$t("home.view-magazine"))+" ",1),m(i,{name:"icon-keyboard_arrow_left","en-name":"icon-keyboard_arrow_right"})],8,xe)])):q("",!0)}const Ne=h(ke,[["render",Me]]),Te={name:"FeatureCard",components:{BaristaImage:b},props:{title:{type:String,required:!0},description:{type:String,required:!0},icon:{type:String,required:!0}}},Pe={class:"FeatureCard"},qe={class:"FeatureCard__title"},Ge={class:"FeatureCard__content fs-12"};function De(e,t,s,d,n,r){const i=u("BaristaImage");return c(),p("div",Pe,[m(i,{src:s.icon,width:60,height:60,reformat:"webp",optimize:"",class:"FeatureCard__icon",alt:""},null,8,["src"]),a("div",null,[a("h2",qe,_(s.title),1),a("div",Ge,_(s.description),1)])])}const Ee=h(Te,[["render",De]]),Qe={name:"BazaarFeatures",components:{FeatureCard:Ee,BaristaImage:b},computed:{features(){return[{title:this.$t("bazaar-features.internet-cost.title"),description:this.$t("bazaar-features.internet-cost.description"),icon:this.$resolve("/images/home/download-cost.png")},{title:this.$t("bazaar-features.hosting-game-makers.title"),description:this.$t("bazaar-features.hosting-game-makers.description"),icon:this.$resolve("/images/home/supports-game-creators.png")},{title:this.$t("bazaar-features.bazaar-for-kids.title"),description:this.$t("bazaar-features.bazaar-for-kids.description"),icon:this.$resolve("/images/home/bazaar-for-kids.png")},{title:this.$t("bazaar-features.games-with-data.title"),description:this.$t("bazaar-features.games-with-data.description"),icon:this.$resolve("/images/home/games-with-data.png")},{title:this.$t("bazaar-features.security.title"),description:this.$t("bazaar-features.security.description"),icon:this.$resolve("/images/home/secure.png")},{title:this.$t("bazaar-features.instant-games.title"),description:this.$t("bazaar-features.instant-games.description"),icon:this.$resolve("/images/home/instant-games.png")},{title:this.$t("bazaar-features.accessibility.title"),description:this.$t("bazaar-features.accessibility.description"),icon:this.$resolve("/images/home/accessibility.png")},{title:this.$t("bazaar-features.official-bank-apps.title"),description:this.$t("bazaar-features.official-bank-apps.description"),icon:this.$resolve("/images/home/official-bank-apps.png")}]}}},Ve={class:"BazaarFeatures"},Re={class:"BazaarFeatures__right-features"},Oe={class:"row"},Ue={class:"BazaarFeatures__left-features"},We={class:"row"};function je(e,t,s,d,n,r){const i=u("FeatureCard"),o=u("BaristaImage");return c(),p("div",Ve,[a("div",Re,[a("div",Oe,[(c(!0),p($,null,v(r.features.slice(0,r.features.length/2),l=>(c(),p("div",{key:l.title,class:"col-md-12 col-sm-6"},[m(i,A({ref_for:!0},l,{class:"BazaarFeatures__feature-item"}),null,16)]))),128))])]),m(o,{class:"BazaarFeatures__mobile-frame",src:e.$resolve("/images/home/bazaar-mobile-frame.png"),width:255,alt:"",reformat:"webp"},null,8,["src"]),a("div",Ue,[a("div",We,[(c(!0),p($,null,v(r.features.slice(r.features.length/2),l=>(c(),p("div",{key:l.title,class:"col-md-12 col-sm-6"},[m(i,A({ref_for:!0},l,{class:"BazaarFeatures__feature-item"}),null,16)]))),128))])])])}const Je=h(Qe,[["render",je]]),Ye=e=>e,Ze={name:"BazaarFloatQrCode",components:{BaristaImage:b},data(){return{visible:!0}},mounted(){var t;((t=window.navigator.userAgentData)==null?void 0:t.mobile)||window.addEventListener("scroll",this.checkVisibleState)},beforeUnmount(){window.removeEventListener("scroll",this.checkVisibleState)},methods:{checkVisibleState:Ye(function(){this.visible=window.scrollY<200})}},Ke=["data-visible"],Xe={class:"fs-12 text-muted"};function et(e,t,s,d,n,r){const i=u("BaristaImage");return c(),p("div",{class:"BazaarFloatQrCode","data-visible":n.visible},[m(i,{src:e.$resolve("/images/mini-games/qr-code.png"),width:"70",height:"70",lazy:"",class:"BazaarFloatQrCode__qrcode"},null,8,["src"]),a("div",null,[a("div",null,_(e.$t("footer.download")),1),a("div",Xe,_(e.$t("actions.scan")),1)])],8,Ke)}const tt=h(Ze,[["render",et]]),at=O({name:"HomePage",components:{BazaarMagazine:Ne,HomeHeader:I,BazaarFeatures:Je,HomeFeaturedApps:H,BaristaImage:b,BazaarFloatQrCode:tt},mixins:[w],async setup(){let e,t;const s=G(),{$api:d}=D(),n=([e,t]=E(()=>U(R(async()=>{const{headerApps:o,appRows:l}=await d.homeContents({l:s.query.l});return{headerApps:o,appRows:l}}),"$ltOl7AHFs1")),e=await e,t(),e);if(n.error.value)throw Q(n.error.value);const{headerApps:r,appRows:i}=n.data.value;return{headerApps:r,featuredAppsLists:i}},head(e){return e.$head({link:"/",title:e.$title(e.$t("titles.home")),description:e.$t("meta.home-description"),meta:[{name:"google-site-verification",content:"SJkunc_iAVBuwtmnQaJOx61UVc8s7kTQd_RLWTiQfHY"}]})}},"$ocZtWR2WO6"),st={ref:"homePage",class:"HomePage"},rt={class:"HomePage__container"},nt={class:"HomePage__section"},it=["href"];function ot(e,t,s,d,n,r){const i=I,o=u("BazaarFeatures"),l=H,f=u("BazaarMagazine"),g=u("BaristaImage"),z=u("BazaarFloatQrCode");return c(),p("div",st,[m(i,{"grid-apps":e.headerApps||[]},null,8,["grid-apps"]),a("div",rt,[m(o,{class:"HomePage__section"}),m(l,{class:"HomePage__section",rows:e.featuredAppsLists||[]},null,8,["rows"]),m(f,{class:"HomePage__section"}),a("div",nt,[a("a",{href:e.socials.instagram.link,rel:"noopenner",target:"_blank"},[m(g,{class:"HomePage__large-banner",reformat:"webp",lazy:"",optimize:100,src:e.$resolve("/images/home/insta-banner.png"),alt:e.$t("titles.bazaar.production")},null,8,["src","alt"])],8,it)])]),m(z,{class:"hide-mobile"})],512)}const gt=h(at,[["render",ot]]);export{gt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.