1import{a as Ie}from"./chunk-OFK3S2XO.js";import{a as X}from"./chunk-2DE6VE6R.js";import{a as Y}from"./chunk-D6R222ET.js";import{a as z}from"./chunk-BBIWWKLS.js";import{a as Pe}from"./chunk-DPOJUGQX.js";import{a as ve}from"./chunk-TUKJRVTR.js";import{b as W,c as Me}from"./chunk-HC4IKBYH.js";import{a as he}from"./chunk-3YGBBZ3Z.js";import{a as ge}from"./chunk-745BQPOS.js";import{b as ye}from"./chunk-EHD4YHFX.js";import{b as Ce}from"./chunk-E3H4BJ7I.js";import{f as Le}from"./chunk-ASTXUBF3.js";import{Ja as q,Ka as G,La as Ee,Oa as O,Sa as Be,W as k,a as U,c as ue,g as xe,ga as be,h as _e,ha as Se,ia as De,ja as we,ka as Te,n as $}from"./chunk-XNTCN5LM.js";import{$b as ee,Ab as F,Bc as M,Da as r,Hc as fe,Jc as P,Kc as D,Ma as b,Nb as s,Ob as pe,P as ae,Pb as _,Qb as H,S as re,Sb as L,Tb as S,Ub as g,Wb as Z,_b as R,aa as f,bb as le,c as oe,ca as w,da as T,db as u,dc as m,eb as x,ec as v,fb as ce,fc as h,gb as de,gc as me,hb as K,ib as Q,jb as l,jc as j,jd as V,kb as o,la as A,lb as i,mb as y,nc as C,nd as I,qa as se,tb as E,wb as B,yb as d,zb as N}from"./chunk-5LGYDGR4.js";import"./chunk-HIUAR4UN.js";var je=[[["withdrawalReason"]]],Ve=["withdrawalReason"],ze=(t,c)=>({"text-success":t,"text-danger":c});function Ue(t,c){t&1&&(o(0,"fx-alert",1),s(1,"Getting your Balance details, Please wait..."),i())}function $e(t,c){if(t&1&&(o(0,"div",2)(1,"div",6),s(2,"Pending Withdrawals:"),i(),o(3,"div",7),s(4),m(5,"cent"),m(6,"currency"),i()()),t&2){d(3);let e=g(0),n=g(1);r(4),_(" ",n.withdrawalPendingAmount?h(6,3,v(5,1,n.withdrawalPendingAmount),e.currencyISO):""," ")}}function qe(t,c){if(t&1&&(o(0,"div",2)(1,"div",6),s(2,"Balance:"),i(),o(3,"div",7)(4,"span",8),s(5),m(6,"cent"),m(7,"currency"),i()()(),o(8,"div",2)(9,"div",6),s(10,"Bonus Balance:"),i(),o(11,"div",7)(12,"span",8),s(13),m(14,"cent"),m(15,"currency"),i()()(),o(16,"div",2)(17,"div",6),s(18),i(),o(19,"div",7),s(20),m(21,"number"),i()(),u(22,$e,7,6,"div",2),o(23,"div",2)(24,"div",6),s(25,"Last Played:"),i(),o(26,"div",7),s(27),m(28,"fxDate"),i()(),o(29,"div",2)(30,"div",6),s(31,"Registered Since:"),i(),o(32,"div",7),s(33),m(34,"fxDate"),i()()),t&2){let e=d(2),n=g(0),a=g(1);r(4),l("ngClass",ee(29,ze,a.currentBalance>=0,a.currentBalance<0)),r(),_(" ",h(7,11,v(6,9,a.currentBalance),n.currencyISO)," "),r(7),l("ngClass",ee(32,ze,a.currentBalance>=0,a.currentBalance<0)),r(),_(" ",h(15,16,v(14,14,a.currentBonusBalance),n.currencyISO)," "),r(5),_("",e.LOYALTY_POINTS_LABEL.name,":"),r(2),_(" ",h(21,19,a.currentLoyaltyPoints,"1.0-0")," "),r(2),x(a.withdrawalPendingAmount?22:-1),r(5),_(" ",a.lastPlayedDate?me(28,22,a.lastPlayedDate,"shortDate",!0):"Never"," "),r(6),_(" ",h(34,26,n.signUpDate,"shortDate")," ")}}function Ge(t,c){if(t&1&&u(0,qe,35,35),t&2){d();let e=g(0),n=g(1);x(e&&n?0:-1)}}var ke=(()=>{class t{constructor(){this.LOYALTY_POINTS_LABEL=f(Me).loyalty_points,this.playerDetails=C.required(),this.isPlayerLoading=C(),this.balance=C.required(),this.withdrawalDisabled=C(!1),this.config=f(Y)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["fx-details-balance"]],inputs:{playerDetails:[1,"playerDetails"],isPlayerLoading:[1,"isPlayerLoading"],balance:[1,"balance"],withdrawalDisabled:[1,"withdrawalDisabled"]},ngContentSelectors:Ve,decls:19,vars:8,consts:[[1,"card-title"],["type","info"],[1,"row"],[1,"col-12"],[1,"d-block","text-center",3,"btnType","routerLink"],[1,"d-block","text-center",3,"btnType","disabled","routerLink"],[1,"col-12","col-md-4","label"],[1,"col-12","col-md-8","value"],[3,"ngClass"]],template:function(n,a){if(n&1&&(N(je),L(0)(1),o(2,"fx-card")(3,"fx-card-body")(4,"h3",0),s(5,"Your balance"),i(),y(6,"hr"),u(7,Ue,2,0,"fx-alert",1)(8,Ge,1,1),i(),o(9,"fx-card-footer")(10,"div",2)(11,"div",3)(12,"fx-button",4),s(13,"Deposit"),i()()(),o(14,"div",2)(15,"div",3)(16,"fx-button",5),s(17," Withdraw "),i()()(),F(18),i()()),n&2){S(a.playerDetails()),r(),S(a.balance());let p=a.isPlayerLoading();r(6),x(p?7:8),r(5),l("btnType","primary")("routerLink",a.config.routes.deposit),r(4),l("btnType","secondary")("disabled",a.withdrawalDisabled())("routerLink",a.config.routes.withdrawal)}},dependencies:[O,D,M,I,V,k,q,G,Ee,fe,P,z,X],styles:[`.value{padding-top:0}@media(min-width:768px){.value{padding-top:var(--fx-gutter-padding-y)}}.label{padding-bottom:0;font-weight:700}@media(min-width:768px){.label{padding-bottom:var(--fx-gutter-padding-y)}} 2`],encapsulation:2,changeDetection:1})}}return t})();var We={history:null,status:"INITIAL",error:null},Oe=ue({providedIn:"root"},_e(We),xe((t,c=f(Ce))=>({getTransactions:ge(oe(re(()=>U(t,{status:"LOADING",error:null})),ae(e=>c.getTransactionsHistory(e.page,e.pageSize,e.sortBy,e.sortDirection,e.types).pipe(ye({next:n=>U(t,{status:"DONE",history:n}),error:n=>U(t,{status:"DONE",error:n})})))))})));var Xe=[[["","title",""]],[["","message",""]]],Ye=["[title]","[message]"];function Je(t,c){if(t&1){let e=E();o(0,"fx-button",6),B("click",function(){let a=w(e);return T(a.onClick?.())}),s(1),i()}if(t&2){let e=c;l("size",e.size||"default")("routerLink",e.link||null),r(),_(" ",e.label," ")}}var Ae=(()=>{class t{constructor(){this.icon=C.required(),this.iconSize=C("very-large"),this.ctnButtonProps=C(),this.containerClass=j(()=>this.ctnButtonProps()?.size==="default"?"transactions-history-empty-state":`transactions-history-empty-state-${this.ctnButtonProps()?.size}`)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["fx-transactions-history-empty-state"]],inputs:{icon:[1,"icon"],iconSize:[1,"iconSize"],ctnButtonProps:[1,"ctnButtonProps"]},ngContentSelectors:Ye,decls:8,vars:4,consts:[[1,"d-flex","flex-column","align-items-center","gap-6",3,"ngClass"],[3,"icon","size"],[1,"d-flex","flex-column","gap-3","text-center"],[1,"title"],[1,"message"],["btnType","primary",3,"size","routerLink"],["btnType","primary",3,"click","
2size","routerLink"]],template:function(n,a){if(n&1&&(N(Xe),o(0,"div",0),y(1,"fx-icon",1),o(2,"div",2)(3,"div",3),F(4),i(),o(5,"div",4),F(6,1),i()(),u(7,Je,2,3,"fx-button",5),i()),n&2){let p;l("ngClass",a.containerClass()),r(),l("icon",a.icon())("size",a.iconSize()),r(6),x((p=a.ctnButtonProps())?7:-1,p)}},dependencies:[D,M,$,k,I,V],styles:[".transactions-history-empty-state[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;line-height:1.5rem}.transactions-history-empty-state[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;line-height:1.5rem}.transactions-history-empty-state[_ngcontent-%COMP%]{--fx-icon-size-x: 2rem;--fx-icon-size-y: 2rem}.transactions-history-empty-state-small[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;line-height:1.5rem}.transactions-history-empty-state-small[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;line-height:1rem}.transactions-history-empty-state-small[_ngcontent-%COMP%]{--fx-icon-size-x: 3rem;--fx-icon-size-y: 3rem}.transactions-history-empty-state-large[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;line-height:2rem}.transactions-history-empty-state-large[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;line-height:1.5rem}.transactions-history-empty-state-large[_ngcontent-%COMP%]{--fx-icon-size-x: 4.5rem;--fx-icon-size-y: 4.5rem}"],changeDetection:1})}}return t})();var Fe={success:["Accepted","Successful","Approved","Redeemed","Awarded"],info:["Authorized_Pending","Pending","Requested","Unknown"],danger:["Rejected","Cancelled"]},ie=(function(t){return t.Bonus="Bonus",t.Deposit="Deposit",t.Withdrawal="Withdrawal",t.Loyalty="Loyalty",t})(ie||{});var Ne=t=>({"text-success":t}),Ke=t=>({label:"Deposit Now",link:t,size:"default"});function Qe(t,c){if(t&1){let e=E();o(0,"div",3)(1,"div",7)(2,"div",8)(3,"input",9),B("change",function(){let a=w(e).$implicit,p=d(2);return T(p.toggleType(a))}),i(),y(4,"label",10),i()(),o(5,"small",11),s(6),i()()}if(t&2){let e=c.$implicit,n=d(2);r(3),l("id",Z("filter-",e))("checked",n.selectedTypes().includes(e)),r(),l("for",Z("filter-",e)),r(2),pe(e)}}function Ze(t,c){t&1&&(o(0,"fx-alert",4),s(1,"We are getting the transaction info, Please wait..."),i())}function et(t,c){if(t&1){let e=E();o(0,"fx-button",29),B("click",function(){w(e);let a=d(4);return T(a.toggleDateSort())}),y(1,"fx-icon",30),i()}if(t&2){d(4);let e=g(0);le("aria-label","Sort by date "+(e.sort.direction==="asc"?"descending":"ascending")),r(),l("icon",e.sort.ref==="date_time"&&e.sort.direction==="asc"?"caret_up":"caret_down")}}function tt(t,c){if(t&1&&(o(0,"div",26),s(1),i()),t&2){let e=d().$implicit;l("ngClass",R(2,Ne,e.bonusName)),r(),_(" ",e.bonusName," ")}}function nt(t,c){if(t&1&&y(0,"fx-bonus-description",27),t&2){let e=d().$implicit;l("clamp",4)("content",e.bonusDescription)}}function it(t,c){if(t&1&&(o(0,"fx-tr")(1,"fx-td",18)(2,"label",19)(3,"span",20),s(4,"Date & Time"),i(),u(5,et,2,2,"fx-button",21),i(),s(6),m(7,"fxDate"),i(),o(8,"fx-td",22)(9,"label",23),s(10,"ID"),i(),s(11),i(),o(12,"fx-td")(13,"label",23),s(14,"Type"),i(),o(15,"fx-badge",24),s(16),i()(),o(17,"fx-td",25)(18,"label",23),s(19,"Bonus"),i(),u(20,tt,2,4,"div",26),u(21,nt,1,2,"fx-bonus-description",27),i(),o(22,"fx-td",28)(23,"label",23),s(24,"Amount"),i(),o(25,"span",26),s(26),m(27,"cent"),m(28,"currency"),i()()()),t&2){let e,n=c.$implicit,a=c.$index,p=d(3);r(5),x(a===0?5:-1),r(),_(" ",v(7,11,n.date_time)," "),r(5),_(" ",n.transaction_id," "),r(4),l("type",p.getBadgeType(n.status)),r(),H(" ",n.type," ",n.status," "),r(),l("title",n.bonusDescription||n.bonusName||n.bonusCode),r(3),x(n.bonusName?20:-1),r(),x(n.bonusDescription?21:-1),r(4),l("ngClass",R(18,Ne,n.amount>0)),r(),_(" ",n.amount!==0?h(28,15,v(27,13,n.amount),(e=p.player())==null?null:e.currencyISO):""," ")}}function ot(t,c){if(t&1){let e=E();o(0,"fx-table",12,0),B("paged",function(a){w(e);let p=d(2);return T(p.paginate(a))}),o(2,"fx-th",13),s(3,"DATE & TIME"),i(),o(4,"fx-th",14),s(5,"Id"),i(),o(6,"fx-th",15),s(7,"Type"),i(),o(8,"fx-th",16),s(9,"BONUS"),i(),o(10,"fx-th",17),s(11,"Amount"),i(),K(12,it,29,20,"fx-tr",null,ce),i()}if(t&2){d(2);let e=g(0);l("num_entries",e.maxNumItems)("current_page",e.page)("page_size",e.pageSize)("pagination_text",!1)("sortby",e.
2sort)("mid_size",1),r(2),l("sortable",!0),r(10),Q(e.transactions)}}function at(t,c){if(t&1&&(o(0,"fx-transactions-history-empty-state",6)(1,"div",31),s(2,"No transactions"),i(),o(3,"div",32),s(4,"There are no transactions to display, yet."),i()()),t&2){let e=d(2);l("ctnButtonProps",R(1,Ke,e.config.routes.deposit))}}function rt(t,c){if(t&1&&(o(0,"fx-card")(1,"fx-card-body")(2,"h3",1),s(3,"Transaction history"),i(),o(4,"p"),s(5,"Only transactions dated within the previous three months are included."),i(),y(6,"hr"),o(7,"div",2),K(8,Qe,7,6,"div",3,de),i(),u(10,Ze,2,0,"fx-alert",4)(11,ot,14,7,"fx-table",5)(12,at,5,3,"fx-transactions-history-empty-state",6),i()()),t&2){let e=d(),n=g(0);r(8),Q(e.transactionTypes),r(2),x(e.store.status()==="INITIAL"?10:n.maxNumItems!==0?11:12)}}var He=(()=>{class t{constructor(){this.features=f(W),this.config=f(Y),this.store=f(Oe),this.player=C.required(),this.page=A(1),this.pageSize=A(10),this.sort=A({ref:"date_time",direction:"desc"}),this.selectedTypes=A([]),this.transactionTypes=Object.values(ie),this.state=j(()=>{let e=this.store.history(),n=e?.transactions??[],a=e?.max_num_items??0;return{transactions:n,maxNumItems:a,pageSize:this.pageSize(),sort:this.sort(),page:this.page(),types:this.selectedTypes()}}),se(()=>{let e=this.selectedTypes(),n=this.pageSize(),a=this.page(),p=this.sort();this.store.getTransactions({page:a,pageSize:n,sortBy:p.ref??"",sortDirection:p.direction,types:e})})}toggleType(e){this.selectedTypes.update(n=>n.includes(e)?n.filter(a=>a!==e):[...n,e]),this.page.set(1)}getBadgeType(e){for(let[n,a]of Object.entries(Fe))if(a.includes(e))return n;return"primary"}paginate(e){this.pageSize.set(e.size),this.page.set(e.page),this.sort.set(e.sort)}toggleDateSort(){this.page.set(1),this.sort.update(e=>({ref:"date_time",direction:e.ref==="date_time"&&e.direction==="asc"?"desc":"asc"}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["fx-transaction-history"]],inputs:{player:[1,"player"]},decls:2,vars:2,consts:[["transactionHistory",""],[1,"card-title"],[1,"d-flex","flex-wrap","justify-content-center","gap-5","mb-4"],[1,"toggle-wrapper","d-flex","flex-column","align-items-center"],["type","info"],[1,"fx-table-responsive-md",3,"num_entries","current_page","page_size","pagination_text","sortby","mid_size"],["icon","no_content","size","small",3,"ctnButtonProps"],[1,"form-check","form-check-switch"],[1,"form-check-element","d-flex","justify-content-center"],["type","checkbox",1,"form-check-input","form-check-switch-input",3,"change","id","checked"],[1,"form-check-label","form-check-switch-label",3,"for"],[1,"toggle-label","text-muted","mt-1"],[1,"fx-table-responsive-md",3,"paged","num_entries","current_page","page_size","pagination_text","sortby","mid_size"],["ref","date_time",3,"sortable"],["ref","transaction_id"],["ref","type"],["ref","bonus"],["ref","amount","align","right"],[1,"fw-md-bold","text-nowrap"],["fxTdResponsiveLabel","",1,"d-flex","align-items-center","gap-2","justify-content-start"],[1,"d-md-none"],["btnType","tertiary",1,"d-md-none","p-0"],["fill","shrink",1,"fw-md-bold","text-nowrap"],["fxTdResponsiveLabel",""],["size","sm",1,"me-2","type-badge",3,"type"],[3,"title"],[3,"ngClass"],[1,"text-success",3,"clamp","content"],["fill","shrink",1,"text-left","text-md-right"],["btnType","tertiary",1,"d-md-none","p-0",3,"click"],[3,"icon"],["title",""],["message",""]],template:function(n,a){n&1&&(L(0),u(1,rt,13,1,"fx-card")),n&2&&(S(a.state()),r(),x(a.features.transactionHistory?1:-1))},dependencies:[D,M,I,q,G,be,Se,Te,De,we,Be,Ae,O,k,Ie,$,P,z,X],styles:[".form-check-switch-input[_ngcontent-%COMP%]{width:3.5rem;margin-left:-2.75rem}.type-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;text-align:center;min-width:7.5rem;min-height:2.25rem;white-space:normal;line-height:1.15;word-break:break-word}"],changeDetection:1})}}return t})();function st(t,c){if(t&1&&(o(0,"fx-alert",1)(1,"div",3),s(2),m(3,"cent"),m(4,"currency"),i()()),t&2){d();let e=g(0),n=g(1);l("dismissible",!1),r(2),H(" Please note: Currently, you cannot request a withdrawal as you still have a playthrough of ",h(4,5,v(3,3,e.wager_remaining),n.currencyISO),' left from the bonus "',e.name,'" ')}}function lt(t,c){if(t&1&&(o(0,"div",2),y(1,"fx-transaction-history",4),i()),t&2){d();let e=g(1);r(),l("player",e)}}var mn=(()=>{class t{constructor(){this.features=f(W),this.bonusStore=f(Pe),this.playerStore=f(ve),this.balanceStore=f(he),this.matomo=f(Le)}ngOnInit(){this.bonusStore.load(),this.matomo.trackPageView("Balance & Transactions")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["fx-balance-transactions"]],decls:5,vars:8,consts:[[3,"balance","playerDetails","isPlayerLoading","withdrawalDisabled"],["ngProjectAs","withdrawalReason","type","warning",5,["withdrawalReason"],1,"mt-4",3,"dismissible"],[1,"my-5"],["fxAlertMessage",""],[1,"mt-4",3,"player"]],template:function(n,a){if(n&1&&(L(0)(1),o(2,"fx-detail
2s-balance",0),u(3,st,5,8,"fx-alert",1),i(),u(4,lt,2,1,"div",2)),n&2){let p=S(a.bonusStore.activeBonus());r();let J=S(a.playerStore.player());r(),l("balance",a.balanceStore.balance())("playerDetails",J)("isPlayerLoading",a.playerStore.loading())("withdrawalDisabled",!!p),r(),x(p&&J?3:-1),r(),x(J&&a.features.transactionHistory?4:-1)}},dependencies:[D,ke,O,He,P,z],encapsulation:2,changeDetection:1})}}return t})();export{mn as BalanceTransactionsComponent};
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.