1import{F as x,bN as S,l as j,r as m,A as e,S as s,L as v,n as u,R as w}from"./index.d5ed491e.1790691266856.js";import{r as N}from"./agentation.5cf31a33.1790691266856.js";import{m as y}from"./selector.4b536653.1790691266856.js";import A from"./SmallLoading.d51ed49e.1790691266856.js";import{a as p}from"./agent-service.a77310e6.1790691266856.js";import{M as k}from"./index.05e25ec2.1790691266856.js";import{w as L}from"./withTranslation.e96527d2.1790691266856.js";import{T as b}from"./Translation.3585ed1a.1790691266856.js";import"./warning.883c7a3c.1790691266856.js";const n={vm:null,init(a){a.state={modal:!1,isTrans:"",activeId:"",languageList:[]},this.vm=a},getLanguageList(){window.SPL_Content.getLanguageList().then(a=>{this.vm.setState({languageList:a})})},toggle(){this.vm.setState({modal:!this.vm.state.modal})},changeLanguage(a){x.setLanguageKeyAndCountryLanguage(this.vm,a.countryLanguageKey,S,!0)}};class P extends m.Component{isMount=!0;constructor(){super(),n.init(this),n.toggle=n.toggle.bind(n)}componentDidMount(){this.isMount=!0,n.getLanguageList()}componentWillUnmount(){this.isMount=!1}handleClickOutsideModal(l){l.target&&(l.target.className.includes("language-modal")||l.target.className.includes("modal-show"))&&n.toggle()}render(){return e.jsx(b,{children:l=>e.jsxs("div",{className:"language-box",children:[e.jsx("button",{"aria-label":"change-language",id:"translateBtn",className:"d-flex align-items-center",onClick:n.toggle,children:e.jsx(s,{category:"SVGAgentPortal",name:"language"})}),e.jsxs(k,{overlayClassName:"standard-popup-overlay",className:"standard-popup-modal-container language-popup-modal-container agent-language-popup-modal-container",isOpen:this.state.modal,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0,onRequestClose:()=>n.toggle(),children:[e.jsxs("div",{className:"standard-popup-modal-header",children:[e.jsx("span",{className:"standard-modal-title",children:l("global:global.menu.language","Region and Language")}),e.jsx("div",{className:"standard-modal-close",onClick:()=>n.toggle(),children:"Ã"})]}),e.jsx("div",{className:"standard-popup-modal-body language-popup-modal-body",children:this.state.languageList.map(i=>e.jsxs(m.Fragment,{children:[e.jsx("div",{className:"country-name",children:i.countryName}),e.jsxs("div",{className:"separator",children:[e.jsx(v,{className:"language-icon",src:i.languages[0].src,alt:`${i.countryName}.png`}),i.languages.map(t=>e.jsx("span",{className:`language-select ${this.props.language.countryLanguageKey===t.countryLanguageKey&&"is-active"}`,onClick:()=>{n.changeLanguage(t),n.toggle()},children:t.display},t.countryLanguageKey))]})]},i.countryName))})]})]})})}}const M=j.connect(y)(L("")(N.withRouter(P))),r={vm:null,init(a){this.vm=a,this.vm.state={liveChatUrl:null,brandLogoObj:{},restoreOnLoad:!1,mainWallet:null}},contactOnClick(a){u.handleControllerOnClick(a)},logout(){x.logout(r.vm)},navigate(a){r.vm.props.history.push(a)},getLogo(){u.getBrandLogo(r.vm)}},O=[{id:"1",name:"account",svgName:"userIcon",title:"agent:agent.menu.account",route:"/agent/settings/account"},{id:"2",name:"report",svgName:"report",title:"agent:agent.menu.report",route:"/agent/settings/report"},{id:"3",name:"transfer",svgName:"switch",title:"agent:agent.menu.transfer",route:"/agent/settings/transfer"},{id:"4",name:"manageUser",svgName:"settingIcon",title:"agent:agent.menu.manageUser",route:"/agent/settings/manageUser"}];class G extends w.Component{constructor(){super(),r.init(this)}componentDidMount(){u.setLivechatUrl(this),r.getLogo(),p.getAgentMainWallet(this)}render(){const{liveChatUrl:l,brandLogoObj:i,mainWallet:t,restoreOnLoad:C}=this.state,{user:c}=this.props,f=this.props.history.location.pathname,h=i?.brandLogo;return e.jsx(b,{children:g=>e.jsxs("div",{className:"agent-navbar-container",children:[e.jsx("div",{className:"top",children:e.jsxs("div",{className:"header",children:[e.jsxs("section",{className:"header-control",children:[c.isLogin&&c.account&&e.jsxs(m.Fragment,{children:[e.jsxs("div",{className:"btnAccount",children:[e.jsx(s,{category:"SVGAgentPortal",name:"profile"}),e.jsx("div",{className:"arrowDownIcon",children:e.jsx(s,{category:"SVGAgentPortal",name:"down"})})]}),e.jsxs("ul",{className:"btnAccount-dropdown",children:[e.jsx("li",{children:e.jsxs("div",{className:"userName",children:[g("global:global.menu.account.welcome"),e.jsx("span",{children:c.account.login})]})}),e.jsxs("li",{onClick:()=>{this.props.history.push("/agent/settings")},children:[e.jsx(s,{category:"SVGAgentPortal",name:"system"}),e.jsx("span",{children:g("agent:agent.settings")})]}),e.jsxs("li",{onClick:()=>r.logout(),children:[e.jsx(s,{category:"SVGAgentPortal",name:"logout"}),e.jsx("span",{children:g("global:global.menu.account.logout")})]})]})]}),l&&e.jsx("div",{className:"liveChat-box",onClick:()=>
1r.contactOnClick(l),children:e.jsx(s,{category:"SVGAgentPortal",name:"liveChat"})}),e.jsx(M,{})]}),e.jsx("section",{className:"header-logo",children:h&&e.jsx("a",{onClick:()=>r.navigate("/"),children:e.jsx(v,{onError:o=>o.target.style.display="none",src:h,className:"brand-logo pointer",alt:"brand-logo"})})})]})}),c.isLogin&&e.jsx("div",{className:"bottom",children:e.jsxs("div",{className:"menu-container",children:[e.jsxs("ul",{className:"navbar-item-container",children:[c.account&&c.account.agentType!=="ADMIN"&&e.jsxs("li",{className:"wallet-container",children:[e.jsx(s,{category:"SVGAgentPortal",name:"wallet"}),g("global:global.form.mainWallet","main wallet"),C?e.jsx(A,{}):e.jsxs(m.Fragment,{children:[t&&t.length>0?t[0].currency+" "+window.SPL_Other.formatAmount(t[0].balance):window.SPL_Other.formatAmount(0),t&&t.length>1&&e.jsxs("div",{className:"",children:[" ",t.map((o,d)=>e.jsxs("div",{children:["(",o.currency,") ",window.SPL_Other.formatAmount(o.balance)]},d)),";"]}),e.jsx(s,{category:"SVGReactIcons",width:"1em",height:"1em",name:"AiOutlineSync",className:"restore-icon",onClick:()=>p.restoreAgentWallet(this)})]})]}),e.jsxs("li",{className:"report-container",onClick:()=>this.props.history.push("/agent/settings/report"),children:[e.jsx(s,{category:"SVGAgentPortal",name:"fund"}),g("agent:agent.menu.reportSummary","Report Summary")]})]}),e.jsx("ul",{className:"navbar-item-container",children:O.map((o,d)=>e.jsxs("li",{className:`navbar-item ${f.includes(o.name)?"active":""}`,onClick:()=>this.props.history.push(o.route),children:[e.jsx("div",{className:"svgBg",children:e.jsx(s,{category:"SVGAgentPortal",name:o.svgName})}),g(o.title)]},d))})]})})]})})}}const $=j.connect(y)(L(["global","agent"])(N.withRouter(G)));export{$ 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.