1import{a as ce,b as le,c as se}from"./chunk-PPRF2OOF.js";import{a as b,b as _e}from"./chunk-XQGP5CNG.js";import{b as de}from"./chunk-DGXKY25G.js";import{a as ae}from"./chunk-QUYU242Z.js";import{c as re}from"./chunk-D7JYBPK4.js";import{a as oe}from"./chunk-6Z67Y3ZO.js";import{a as Y,b as q}from"./chunk-CYUA5BPC.js";import{c as J}from"./chunk-PULQSFXN.js";import{b as ne}from"./chunk-LMZCTOBT.js";import{a as K}from"./chunk-BSKQTWNX.js";import{d as Z,i as te}from"./chunk-2N6HA2XW.js";import{g as ie}from"./chunk-5P32XLDJ.js";import{c as ee}from"./chunk-4BOWCGAG.js";import{j as Q,k as X}from"./chunk-I5EPNETH.js";import{Oa as U,Pa as W,Xa as j,db as H,i as P}from"./chunk-NPLYHJWT.js";import{Na as R,m as x,u as V}from"./chunk-DQCMG7P5.js";import{da as O}from"./chunk-3HE6RCYU.js";import{a as E,c as S,d as z}from"./chunk-YOLZNQ4M.js";import{ha as N}from"./chunk-QGNTHXV5.js";import{Ab as i,Cc as k,Dc as A,Fc as y,Fd as G,Gd as $,Ha as v,Ia as g,Mc as f,Na as I,Oc as r,Rb as M,Rd as B,Xb as T,Yc as F,_c as L,bd as u,cd as C,oc as p,qc as m,vc as _,wc as a,wd as h,xc as c,y as w,ya as l,yc as d,z as D}from"./chunk-HSO33GGI.js";var me=()=>["dropdown","goToBalance"],ue=()=>["dropdown","changeCurrency"],Ce=()=>["dropdown","goToSkinsBalance"],ve=()=>["dropdown","treasuryBalance","price"];function ge(t,s){t&1&&d(0,"spinner",7)}function fe(t,s){if(t&1&&(a(0,"span",8),d(1,"price",13),c()),t&2){let e=r();i(),_("amount",e.userBalance)}}function he(t,s){if(t&1&&(a(0,"span",8),d(1,"price",14),c()),t&2){let e=r(2);i(),_("amount",e.userBalance)("isLocalizationEnabled",!1)}}function ye(t,s){if(t&1&&(a(0,"div",9),p(1,he,2,2,"span",8),c()),t&2){let e=r(3);i(),m(e.hideDefaultCurrency?-1:1)}}function Se(t,s){if(t&1&&d(0,"i",10),t&2){let e=r(3);_("inlineSVG","sprites/"+e.spriteName+"#icon-arrow-down")}}function xe(t,s){if(t&1&&d(0,"price",21),t&2){let e=r(5);_("amount",e.treasuryBalance())("isLocalizationEnabled",!1)("testId",h(3,ve))}}function we(t,s){t&1&&d(0,"spinner",22)}function Te(t,s){if(t&1){let e=y();a(0,"div",16)(1,"p",17),u(2),c(),a(3,"div",18),p(4,xe,1,4,"price",21)(5,we,1,0,"spinner",22),a(6,"span",19),f("click",function(){v(e);let o=r(4);return g(o.redirectToExchange())}),u(7),c()()(),d(8,"div",20)}if(t&2){let e=r(3).$implicit,n=r();i(2),C(e("Skins balance")),i(2),m(n.treasuryBalance()?4:5),i(2),_("testId",h(4,Ce)),i(),C(e("View"))}}function Be(t,s){if(t&1){let e=y();a(0,"div",15)(1,"div",16)(2,"p",17),u(3),c(),a(4,"div",18),d(5,"price",14),a(6,"span",19),f("click",function(){v(e);let o=r(3);return g(o.startFlow(o.flowType.Balance))}),u(7),c()()(),d(8,"div",20),p(9,Te,9,5),a(10,"div",16)(11,"p",17),u(12),c(),a(13,"div",18)(14,"span"),u(15),c(),a(16,"span",19),f("click",function(){v(e);let o=r(3);return g(o.openLocalizationSettingsDialog())}),u(17),c()()()()}if(t&2){let e=r(),n=r().$implicit,o=r();i(3),C(n("Balance")),i(2),_("amount",e.userBalance)("isLocalizationEnabled",!1),i(),_("testId",h(10,me)),i(),C(n("View")),i(2),m(o.skinsBalance()?9:-1),i(3),C(n("Currency")),i(3),C(e.currency),i(),_("testId",h(11,ue)),i(),C(n("Change"))}}function Ee(t,s){if(t&1){let e=y();a(0,"div",3),f("click",function(){v(e);let o=r(2);return g(o.menuOpened(o.showMenu))}),a(1,"div",4)(2,"div",5)(3,"div",6),p(4,ge,1,0,"spinner",7)(5,fe,2,1,"span",8),c(),p(6,ye,2,1,"div",9),c()(),p(7,Se,1,1,"i",10),a(8,"mat-menu",11,0),T(10,Be,18,12,"ng-template",12),c()()}if(t&2){let e=s,n=F(9),o=r(2);L("c-dropdown--disabled",!o.showMenu),_("matMenuTriggerFor",n),i(4),m(!e.userBalance&&e.isLoggedIn?4:5),i(2),m(e.userBalance&&e.isLoggedIn&&!e.isDefaultCurrencyActive?6:-1),i(),m(o.showMenu?7:-1),i(),_("overlapTrigger",!1)}}function Ve(t,s){if(t&1&&(k(0),p(1,Ee,11,7,"div",2),G(2,"async"),A()),t&2){let e,n=r();i(),m((e=$(2,1,n.vm$))?1:-1,e)}}var rt=(()=>{class t{#e;#t;#n;#i;#o;#r;#a;#c;constructor(){this.flowBuilderService=l(Y),this.dialog=l(O),this.currencyStore=l(J),this.googleAnalyticsService=l(ne),this.deviceDetectorService=l(oe),this.userTabsService=l(re),this.#e=l(te),this.#t=l(K),this.#n=l(Z),this.#i=l(P),this.#o=l(I),this.currency=W.USD,this.showMenu=!1,this.hideDefaultCurrency=!1,this.flowType=V,this.spriteName=R,this.userBalance$=S(this.#e.userCombinedBalance).pipe(H(),w(e=>e[U.USD]),E()),this.#r=this.#e.userId,this.#a=z(this.#n.activeGame$),this.gameId=B(()=>this.#a()?.id??null),this.#c=_e(this.#r,this.gameId),this.skinsBalance=this.#c.balance,this.treasuryBalance=B(()=>this.skinsBalance()?.exchange?.amount),this.activeCurrency$=S(this.currencyStore.activeCurrency),this.isDefaultCurrencyActive$=S(this.currencyStore.isDefaultCurrencyActive),this.vm$=D([this.activeCurrency$,this.userBalance$,this.#t.isLoggedIn$,this.isDefaultCurrencyActive$]).pipe(w(([e,n,o,pe])=>({currency:e,userBalance:n,isLoggedIn:o,isDefaultCurrencyActive:pe})))}menuOpened(e){e&&this.showTreasury&&this.sendGaEvent(b.VIEW_HEADER)}redirectToExchange(){this.showTreasury&&this.sendGaEvent(b.CLICK_HEADER),this.userTabsService.getActiveTab()!==x.Exchange&&this.userTabsService.navigateToTab(this.deviceDetectorService.isDesktop()?x.Exchange:x.ExchangeMobile)}startFlow(e){e===V.Balance&&this.googleAnalyticsService.sendFundsOperationEvent("balance_button",{balance_btn:"go to balance btn"}),this.flowBuilderService.startFlow(e,{flowStartSource:q.Navigation}).pipe(E(this.#o)).subscribe()}openLocalizationSettingsDialog(){de(this.dialog)}get showTreasury(){return!!this.gameId()&&!!this.skinsBalance()&&this.#i.url!=="/"}sendGaEvent(e){let n=this.treasuryBalance();this.googleAnalyticsService.sendGeneralEventWithValue({event_name:e,value:this.googleAnalyticsService.getItemPrice(n)},!0)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=M({type:t,selectors:[["dm-currency-selector-balance-v2"]],inputs:{currency:"currency",showMenu:"showMenu",hideDefaultCurrency:"hideDefaultCurrency"},decls:1,vars:0,consts:[["balanceNavNew","matMenu"],[4,"transloco"],[1,"c-dropdown","c-dropdown--balance",3,"c-dropdown--disabled","matMenuTriggerFor"],[1,"c-dropdown","c-dropdown--balance",3,"click","matMenuTriggerFor"],[1,"c-dropdown__current","c-dropdown__currentV2"],[1,"c-dropdown__currentV2Wrap"],[1,"c-dropdown__currentValue"],[1,"c-dropdown__currencySpinner"],[1,"c-dropdown__currentTitle"],[1,"c-dropdown__currentValue","c-dropdown__currentValue--default"],[1,"o-icon","c-dropdown__arrow",3,"inlineSVG"],["yPosition","below","xPosition","before",1,"c-dropdown__list",3,"overlapTrigger"],["matMenuContent",""],[3,"amount"],[3,"amount","isLocalizationEnabled"],[1,"c-dropdown__listButtons"],[1,"c-dropdown__listItem"],[1,"c-dropdown__listItemTitle"],[1,"c-dropdown__listItemDetails"],[1,"c-dropdown__listItemAction",3,"click","testId"],[1,"c-dropdown__listItemDivider"],[1,"skins",3,"amount","isLocalizationEnabled","testId"],[1,"c-dropdown--balance__spinner"]],template:function(n,o){n&1&&T(0,Ve,3,3,"ng-container",1)},dependencies:[X,Q,se,ae,ie,j,le,ce,ee,N],encapsulation:2,changeDetection:0})}}return t})();export{rt as a};
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.