1import{$a as B,C as M,Ec as N,Gc as O,Gd as L,Jd as A,Kd as n,Of as f,Rd as D,Sf as r,Tc as T,Td as c,Ud as s,Wd as V,Xd as v,Yd as h,ap as t,cn as E,da as U,ep as g,ff as R,hn as z,mc as k,md as G,mf as p,on as S,qd as H,ra as Y,u as j,uf as o,wc as P}from"./DRtw6qQx.js";import"./CiNZziEO.js";import{t as K}from"./BWym8XI8.js";import{t as q}from"./Br2JQMDz.js";import{t as J}from"./BSjSwUw-.js";/* empty css *//* empty css */import"./dafh8coT.js";import{i as W,t as X}from"./VY91FW8U.js";var C=f([]),I=f(0),F=f({}),Q={name:"LoyaltyLevelList",components:{ProgressLevelPanel:W,LevelCard:X,BaseSkeletonLoader:j},data(){return{list:[],currentLoyaltyProgressAmount:0,currentLoyaltyStepData:{},hasVipNotification:!1}},computed:{...P(["isMobileDevice"]),...N({newLoyaltyBonusPercent:e=>e.socket.socket.newLoyaltyBonusPercent,userData:e=>e.user.userInformation.userData}),isUserVip(){return!!this.userData?.isVipStatus},hasVipLevels(){return this.list.some(e=>e.is_vip)},nonVipList(){return this.list.filter(e=>!e.is_vip)},currentLevel(){return this.currentLoyaltyStepData||{}},currentLevelIndex(){return this.list.findIndex(e=>e.id===this.currentLevel?.id)},nextLevel(){return this.list[this.currentLevelIndex+1]||null},firstVipLevelIndex(){return this.list.findIndex(e=>e.is_vip)},isCurrentStepVip(){return this.currentLevel?.is_vip},isLastLevelReached(){return this.list.length&&this.currentLevelIndex===this.list.length-1},isLastNonVipLevelReached(){return this.hasVipLevels&&this.currentLevelIndex>=this.firstVipLevelIndex-1},circleProgress(){const e=this.isUserVip?this.list:this.nonVipList;return e.length===0?0:this.isLastLevelReached||!this.isUserVip&&this.isLastNonVipLevelReached?100:this.calculateProgress({list:e,currentLevelIndex:this.currentLevelIndex,currentLevel:this.currentLevel,nextLevel:this.nextLevel})},lineProgress(){if(this.list.length===0)return 0;const e=this.list.findLastIndex(_=>_.amount<=this.currentLoyaltyProgressAmount);if(this.isLastLevelReached||e===this.list.length-1)return 100;const i=this.list[e],u=this.list[e+1];return this.calculateProgress({list:this.list,currentLevelIndex:e,currentLevel:i,nextLevel:u})},hasVipInvite(){return this.hasVipLevels&&!this.isUserVip&&this.list[this.currentLevelIndex+2]?.is_vip}},mounted(){this.list=C.value,this.currentLoyaltyProgressAmount=I.value,this.currentLoyaltyStepData=F.value,this.getLoyaltiesSteps()},watch:{isUserVip(){this.getLoyaltiesSteps()},newLoyaltyBonusPercent(){this.getLoyaltiesSteps()},hasVipInvite:{handler(e){this.hasVipNotification=!k.get("loyalty_vip_invite_notification_closed")&&e},immediate:!0}},methods:{getCardByLevelNumber(e){return this.list[e-1]},getLoyaltiesSteps(){this.$httpService.getLoyaltiesSteps().then(e=>{this.list=e.data.data,this.currentLoyaltyProgressAmount=(+e.data.current_loyalty_bonus).toFixed(2),this.currentLoyaltyStepData=e.data.current_step,C.value=this.list,I.value=this.currentLoyaltyProgressAmount,F.value=this.currentLoyaltyStepData})},calculateProgress({list:e,currentLevelIndex:i,currentLevel:u,nextLevel:_}){const m=100/e.length,y=(i+1)*m,l=u?.amount||0,d=_.amount,b=d-l;return y+(Math.min(this.currentLoyaltyProgressAmount,d)-l)/b*100/e.length},closeVipNotification(){k.set(O,!0),this.hasVipNotification=!1}},BECOME_VIP_GOOGLE_FORM_LINK:K},w=c("/images/backgrounds/bonus_system/percent-coin-vip.webp"),Z=c("/images/backgrounds/bonus_system/percent-coin.webp"),x=c("/images/backgrounds/bonus_system/glitter.webp"),ee=Q,se={class:"list-wrapper"},te={key:0},ie={key:1},ae={class:"card-body__image-wrapper"},re={key:0,class:"card-body__image img-lazy",src:w,alt:"bonus collect image"},oe={key:1,class:"card-body__image img-lazy",src:Z,alt:"bonus collect image"},ne={key:0,class:"card-body__text"},le={class:"card-body__text-top"},de={class:"card-body__text-bottom"},ue={key:1,class:"card-body__text"},_e={class:"card-body__text-top"},pe={class:"card-body__text-bottom card-body__text-percent"},ce={key:0,class:"card-footer"},ve={class:"card-footer__text"},me={class:"card-footer__title"},ye={key:1,class:"card-footer"},be={class:"card-footer__text"},he={class:"card-footer__title"},ge={class:"accent"},Le={key:2,class:"card-footer"},fe={class:"card-footer__title"},Ve={class:"card-footer__text"},ke={class:"currency__symbol"},Ce={class:"card-bottom-panel"},Ie=["innerHTML"],Fe={class:"card-notification"},$e={class:"card-notification__main"},Ne={class:"card-notification__text"},Se=["innerHTML"],Pe={class:"card-notification__subtitle"},we=["innerHTML"],Be={class:"steps-preview-panel-wrapper"},Me={class:"steps-preview-panel__sparkles","aria-hidden":"true"},Oe={class:"steps-preview-panel"};function Ae(e,i,u,_,m,y){const l=p("base-button"),d=p("level-card"),b=p("progress-level-panel");return o(),n("div",se,[e.list.length?(o(),V(b,{key:0,"is-loading":!e.list.length,"is-user-vip":e.isUserVip,"total-steps":e.list.length,"non-vip-steps":e.nonVipList.length,"progress-circle-percent":e.cir
1cleProgress,"progress-line-percent":e.lineProgress,"progress-circle-color":e.isCurrentStepVip?["var(--vip-color-10)","var(--vip-color-20)"]:"#B1F98F","progress-line-color":"#B1F98F","first-preview-step-index":e.firstVipLevelIndex,"show-card-bottom-panel-slot":e.hasVipInvite,"show-card-notification-slot":e.hasVipInvite&&e.hasVipNotification},H({"card-title":r(()=>[e.currentLevel.id?(o(),n("span",te,t(e.$t("progress_panel.achieved_level",{level:e.currentLevelIndex+1})),1)):(o(),n("span",ie,t(e.$t("progress_panel.without_level")),1))]),"card-body":r(()=>[s("div",{class:g(["card-body",{"card-body_vip":e.isCurrentStepVip,"card-body_has-vip-invite":e.hasVipInvite}])},[s("div",ae,[e.isCurrentStepVip?(o(),n("img",re)):(o(),n("img",oe))]),e.currentLevelIndex===-1?(o(),n("div",ne,[s("span",le,t(e.$t("profile.sell_skins")),1),s("span",de,t(e.$t("retention_page.bonus_panel.get_a_bonus")),1)])):(o(),n("div",ue,[s("span",_e,t(e.$t("bonus_system.current")),1),s("span",pe," +"+t(e.currentLevel.percent)+"% ",1)]))],2)]),"card-footer":r(()=>[e.isLastLevelReached?(o(),n("div",ce,[s("div",ve,t(e.$t("bonus_system.great_job")),1),s("div",me,[s("span",{class:g(["accent",{accent_vip:e.isCurrentStepVip}])},t(e.$t("bonus_system.you_at_the_peak"))+"! ",3)])])):!e.isUserVip&&e.isLastNonVipLevelReached?(o(),n("div",ye,[s("div",be,t(e.$t("bonus_system.want_more"))+"?",1),s("div",he,[s("span",ge,t(e.$t("bonus_system.upgrade_to_vip")),1)])])):(o(),n("div",Le,[s("div",fe,t(e.$t("progress_panel.to_next_level"))+":",1),s("div",Ve,[s("span",ke,t(e.currencySymbol),1),s("span",null,t(e.convertToCurrentCurrency(e.nextLevel?.amount-e.currentLoyaltyProgressAmount)),1)])]))]),"card-bottom-panel":r(()=>[s("div",Ce,[s("span",{class:"card-bottom-panel__title",innerHTML:e.$t("vip_status.join_our_vip_community")},null,8,Ie),v(l,{"min-width":0,type:"light","border-radius":"9999px",size:e.isMobileDevice?"sm":"default",href:e.$options.BECOME_VIP_GOOGLE_FORM_LINK,target:"_blank"},{default:r(()=>[s("span",null,t(e.$t("vip_status.become_vip")),1)]),_:1},8,["size","href"])])]),"card-notification":r(()=>[s("div",Fe,[s("div",{class:"card-notification__close",onClick:i[0]||(i[0]=(...a)=>e.closeVipNotification&&e.closeVipNotification(...a))},[...i[1]||(i[1]=[s("img",{src:E,alt:"close"},null,-1)])]),i[2]||(i[2]=s("img",{src:w,alt:"percent coin vip",class:"card-notification__icon"},null,-1)),i[3]||(i[3]=s("img",{src:x,alt:"glitter",class:"card-notification__glitter"},null,-1)),s("div",$e,[s("div",Ne,[s("span",{class:"card-notification__title",innerHTML:e.$t("vip_status.join_our_vip_community")},null,8,Se),s("span",Pe,t(e.$t("vip_status.we_invite_you",{vipInviteLevel:e.firstVipLevelIndex-1})),1)]),v(l,{"min-width":"100%",type:"light","border-radius":"9999px",class:"card-notification__action",href:e.$options.BECOME_VIP_GOOGLE_FORM_LINK,target:"_blank"},{default:r(()=>[s("span",null,t(e.$t("vip_status.become_vip")),1)]),_:1},8,["href"])])])]),title:r(()=>[h(t(e.$t("bonus_system.sell_skins_amount")),1)]),"step-body":r(({step:a})=>[e.getCardByLevelNumber(a)&&e.userData?(o(),V(d,{key:0,item:e.getCardByLevelNumber(a),"level-number":a,"is-type-vip":e.getCardByLevelNumber(a)?.is_vip,"is-active":e.currentLevel.id===e.getCardByLevelNumber(a).id,"is-opened":e.getCardByLevelNumber(a).amount<=e.currentLoyaltyProgressAmount&&(e.getCardByLevelNumber(a)?.is_vip?e.isUserVip:!0),"is-locked":e.getCardByLevelNumber(a).amount>e.currentLoyaltyProgressAmount||!e.isUserVip&&e.getCardByLevelNumber(a)?.is_vip,"has-tooltip-text-slot":e.hasVipLevels&&!e.isUserVip&&e.getCardByLevelNumber(a)?.is_vip},{"tooltip-text":r(()=>[s("span",{class:"vip-level-tooltip-text",innerHTML:e.$t("vip_status.vip_level_tooltip",{currencySymbol:e.currencySymbol,salesAmount:e.convertToFloatCurrentCurrency(e.getCardByLevelNumber(e.firstVipLevelIndex).amount)})},null,8,we)]),_:1},8,["item","level-number","is-type-vip","is-active","is-opened","is-locked","has-tooltip-text-slot"])):L("",!0)]),"progress-indicator":r(()=>[h(t(e.currencySymbol)+" "+t(e.convertToCurrentCurrency(e.currentLoyaltyProgressAmount)),1)]),"progress-value":r(({step:a})=>[h(t(e.currencySymbol)+" "+t(e.convertToCurrentCurrency(e.getCardByLevelNumber(a).amount)),1)]),_:2},[e.hasVipLevels?{name:"steps-preview-panel",fn:r(()=>[s("div",Be,[s("div",Me,[(o(),n(D,null,R(20,a=>s("span",{key:a,class:g(["steps-preview-panel__sparkle",`steps-preview-panel__sparkle_${a}`])},null,2)),64))]),s("div",Oe,[s("span",null,t(e.$t("vip_status.vip_bonuses")),1)])])]),key:"0"}
1:void 0]),1032,["is-loading","is-user-vip","total-steps","non-vip-steps","progress-circle-percent","progress-line-percent","progress-circle-color","first-preview-step-index","show-card-bottom-panel-slot","show-card-notification-slot"])):L("",!0)])}var De=S(ee,[["render",Ae],["__scopeId","data-v-bca66cab"]]),Te={name:"BonusSystem",components:{BonusSystemList:De},setup(){const{t:e}=U(),{seoHeadData:i}=z();G({...J({title:e("project_name"),description:"",seoData:i})})},computed:{...P(["isMobileDevice"]),...N({isUserLogged:e=>e.user.userInformation.isUserLogged})},methods:{...T(["OPEN_MODAL_MUTATION"]),openLoyaltyBonusRulesModal(){this.OPEN_MODAL_MUTATION(Y.LOYALTY_BONUS_RULES)}},SELL_PAGE:B},$=c("/images/backgrounds/bonus_system/decoration/orange-box.webp"),Ee=c("/images/backgrounds/bonus_system/decoration/green-box.webp"),Ue=Te,Re={key:0,class:"bonus-system"},ze={class:"bonus-system__head-panel"},Ge={class:"bonus-system__head"},He={class:"bonus-system__title"};function Ye(e,i,u,_,m,y){const l=p("base-button"),d=p("bonus-system-list");return e.isUserLogged?(o(),n("div",Re,[s("div",ze,[s("div",Ge,[s("h1",He,t(e.$t("header.bonus_system")),1),v(l,{"min-width":e.isMobileDevice?"fit-content":188,size:e.isMobileDevice?"xs":"default",type:e.isMobileDevice?"text":"info",padding:e.isMobileDevice?"0 0":"0 20px",onOnClick:e.openLoyaltyBonusRulesModal},{default:r(()=>[s("span",null,t(e.$t("footer.how_it_works")),1),i[0]||(i[0]=s("img",{src:M,alt:"clue icon"},null,-1))]),_:1},8,["min-width","size","type","padding","onOnClick"])]),i[1]||(i[1]=A('<div class="bonus-system__head-decoration" data-v-df7abb29><div class="bonus-system__decoration-orange-box_left" data-v-df7abb29><img class="img-lazy" src="'+$+'" data-v-df7abb29></div><div class="bonus-system__decoration-green-box" data-v-df7abb29><img class="img-lazy" src="'+Ee+'" data-v-df7abb29></div><div class="bonus-system__decoration-percent-label" data-v-df7abb29><img class="img-lazy" src="'+q+'" data-v-df7abb29></div><div class="bonus-system__decoration-orange-box" data-v-df7abb29><img class="img-lazy" src="'+$+'" data-v-df7abb29></div></div>',1))]),v(d,{class:"bonus-system__list"})])):L("",!0)}var es=S(Ue,[["render",Ye],["__scopeId","data-v-df7abb29"]]);export{es 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.