1import{j as t}from"./vendor/@tanstack-query-V9stBZps.js";import{r as k}from"./vendor/@react-dom-BjtUEAyD.js";import{o as E}from"./vendor/@mobx-BYpSjeyr.js";import{d as j,b as B,n as A,u as H,j as v,y as C,k as F}from"./client-UkkVDggc.js";import{g as P,c as W,aw as G,ax as O,T as S,I as b,N as R}from"./index-Cj6uzrap.js";import{S as D,g as M,P as $,B as z,a as U}from"./SuccessIcon-BQDwkt7W.js";import{u as I,T as K}from"./vendor/@i18next-TYMIzdgG.js";import"./vendor/@segment-qS3uDR1j.js";import"./vendor/@firebase-BsnDfF0b.js";import"./vendor/@react-final-form-D3vHaMFU.js";import"./vendor/@launchdarkly-Cd9YOr4W.js";import"./vendor/@misc-1KgCF3nJ.js";import"./vendor/@popperjs-core-BNwyPKuO.js";import"./vendor/@axios-CKC5yBEL.js";import"./vendor/@socket.io-client-TjCxX7sJ.js";import"./vendor/@framer-motion-gOv_XHCr.js";/* empty css */import"./vendor/@react-router-dom-4tVU0qbp.js";import"./vendor/@rive-app-CkCO5bug.js";const Y="_fundsHistoryDialog_tp8vc_14",Z="_dialogBody_tp8vc_14",V="_dialog_tp8vc_14",Q="_inner_tp8vc_36",q="_titleWrapper_tp8vc_42",J="_titleTextGroup_tp8vc_54",X="_titleImage_tp8vc_65",tt="_tooltipWrapper_tp8vc_75",et="_tooltipIcon_tp8vc_80",st="_tooltipContent_tp8vc_83",ot="_supportButton_tp8vc_88",nt="_fundsHistory_tp8vc_14",it="_item_tp8vc_125",at="_typeSection_tp8vc_140",ct="_typeName_tp8vc_155",rt="_typeDate_tp8vc_167",lt="_coinsSection_tp8vc_179",pt="_freeDaubRow_tp8vc_192",dt="_coinsGroup_tp8vc_199",ut="_coinIcon_tp8vc_204",_t="_freeDaubIcon_tp8vc_215",mt="_coinAmount_tp8vc_226",ft="_freeLabel_tp8vc_237",ht="_premiumLabel_tp8vc_250",vt="_cashPrize_tp8vc_262",yt="_statusSection_tp8vc_272",xt="_statusName_tp8vc_297",gt="_footer_tp8vc_304",Nt="_footerText_tp8vc_314",jt="_link_tp8vc_326",e={"arrow-tooltip":"_arrow-tooltip_tp8vc_1","fade-in":"_fade-in_tp8vc_1",fundsHistoryDialog:Y,dialogBody:Z,dialog:V,inner:Q,titleWrapper:q,titleTextGroup:J,titleImage:X,tooltipWrapper:tt,tooltipIcon:et,tooltipContent:st,supportButton:ot,fundsHistory:nt,item:it,typeSection:at,typeName:ct,typeDate:rt,coinsSection:lt,freeDaubRow:pt,coinsGroup:dt,coinIcon:ut,freeDaubIcon:_t,coinAmount:mt,freeLabel:ft,premiumLabel:ht,cashPrize:vt,statusSection:yt,statusName:xt,footer:gt,footerText:Nt,link:jt},Ct=()=>t.jsxs("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M16.5641 18.4506L11.9303 13.8169L7.29654 18.4506C6.94495 18.8022 6.37485 18.8022 6.02326 18.4506L5.17613 17.6034C4.82455 17.2519 4.82455 16.6817 5.17613 16.3301L9.80987 11.6964L5.17613 7.06271C4.82455 6.71112 4.82455 6.14101 5.17613 5.78941L6.02326 4.94227C6.37485 4.59067 6.94495 4.59067 7.29654 4.94227L11.9302 9.57606L16.5641 4.94227C16.9156 4.59067 17.4858 4.59067 17.8373 4.94227L18.6845 5.78941C19.0361 6.14101 19.0361 6.71112 18.6845 7.06271L14.0507 11.6965L18.6842 16.3301C19.0358 16.6817 19.0358 17.2519 18.6842 17.6034L17.8371 18.4506C17.4855 18.8022 16.9156 18.8022 16.5641 18.4506Z",fill:"#FE5F5F"}),t.jsx("path",{clipRule:"evenodd",d:"M11.6964 0C5.2367 0 0 5.2367 0 11.6964C0 18.1561 5.2367 23.3928 11.6964 23.3928C18.1561 23.3928 23.3928 18.1561 23.3928 11.6964C23.3928 5.2367 18.1561 0 11.6964 0ZM11.6964 21.6132C6.21955 21.6132 1.77962 17.1733 1.77962 11.6964C1.77962 6.21955 6.21955 1.77962 11.6964 1.77962C17.1733 1.77962 21.6132 6.21955 21.6132 11.6964C21.6132 17.1733 17.1733 21.6132 11.6964 21.6132Z",fill:"#FE5F5F",fillRule:"evenodd"})]}),St={pending:t.jsx(U,{}),success:t.jsx(D,{}),error:t.jsx(Ct,{}),unknown:t.jsx(b,{color:"yellow"})},bt={coinsGroup:e.coinsGroup,coinAmount:e.coinAmount,coinIcon:e.coinIcon,freeDaubIcon:e.freeDaubIcon,freeLabel:e.freeLabel,plus:e.freeLabel,row:e.freeDaubRow};function Dt({item:r,bingoPurchaseSources:a,onTooltipClick:u}){const{t:s}=I(),{formatDate:y}=P(),x=W("(max-width: 768px)"),l={name:s("profile.transactionStatus.success"),icon:t.jsx(D,{})},{id:n,transactiontype:o,gccoin:c,sccoin:_,amount:p,created_at:i,moreDetails:d}=r,N=M(r.status),m=$.includes(o.toLowerCase())?{name:s(N.labelKey),icon:St[N.tone]}:l,f=d==null?void 0:d.purchaseSource,h=d==null?void 0:d.packageData,g=(h==null?void 0:h.bundleItems)&&h.bundleItems.length>0;if(f&&a.includes(f)&&!g)return null;const L=c>0||_>0||o==="redeem"&&p>
10,w=["road","snappy gift"].includes(f||""),T=!["bingo_store","snappy gift","road"].includes(f||"");return!L&&!g&&!w?null:t.jsxs("div",{className:e.item,"data-testid":`funds-history-item-${n}`,children:[t.jsxs("div",{className:e.typeSection,children:[t.jsx("div",{className:e.typeDate,"data-testid":`funds-history-item-date-${n}`,children:y(i)}),t.jsx("div",{className:e.typeName,"data-testid":`funds-history-item-type-${n}`,children:o.toLowerCase()==="special bonus"?"Monthly Bonus":o.toLowerCase().replace("vip","VIP")})]}),t.jsxs("div",{className:e.coinsSection,children:[f==="road"&&t.jsx("span",{className:e.premiumLabel,children:s("road.premiumLane")}),T&&t.jsx(t.Fragment,{children:o==="redeem"?t.jsx("span",{className:e.cashPrize,children:s("profile.cashPrize")}):c>0&&t.jsxs("div",{className:e.coinsGroup,children:[t.jsx(G,{className:e.coinIcon}),t.jsx("span",{className:e.coinAmount,"data-testid":`funds-history-item-gc-${n}`,children:j(c,s)})]})}),(!!_||o==="redeem"&&!!p)&&t.jsxs(t.Fragment,{children:[o!=="redeem"&&c>0&&t.jsx("span",{className:e.freeLabel,children:s("profile.free")}),t.jsxs("div",{className:e.coinsGroup,children:[t.jsx(O,{className:e.coinIcon}),t.jsx("span",{className:e.coinAmount,"data-testid":`funds-history-item-sc-${n}`,children:j(Number(o==="redeem"?p:_),s)})]})]}),g&&t.jsx(z,{classNames:bt,packageData:h})]}),t.jsx("div",{className:e.statusSection,"data-testid":`funds-history-item-status-${n}`,children:x?t.jsx(S,{supportsNewTooltipDesign:!0,className:e.tooltipStatus,content:m.name,dataTestId:`transaction-status-icon-${n}`,handleEvents:()=>u(m.name),offset:[0,5],wrapperClassName:e.tooltipWrapper,children:m.icon}):t.jsxs(t.Fragment,{children:[m.icon,t.jsx("span",{className:e.statusName,children:m.name})]})})]})}const Kt=E(()=>{var p;const{appStore:r,uiStore:a}=B(),{t:u}=I(),s=a.openDialog.dialog===A.isOpenFundsHistoryDialogNew,y=(p=a.openDialog.options)==null?void 0:p.onBackClick;H(()=>{v.sendEvent("funds_history",{event_category:"funds_history",event_action:"impression"})}),k.useEffect(()=>{s&&(v.sendEvent("info_icon",{event_category:"funds_history",event_action:"click"}),r.getTransactions())},[r,s]);const x=["bingo_store","subscription"],l=typeof y=="function"?()=>{y(),a.setCloseDialog()}:void 0,n=()=>{v.sendEvent("funds_history",{event_category:"funds_history",event_action:"click",click_location:"close"}),l?l():a.setCloseDialog()},o=()=>{l?l():a.setCloseDialog()},c=i=>{i.preventDefault(),v.sendEvent("contact_support",{event_category:"funds_history",event_action:"click",cta_button:"contact_support"}),F.handleOpenSupport()},_=i=>{v.sendEvent("funds_status",{event_category:"funds_history",event_type:"status",event_value:i,event_action:"click"})};return t.jsx("div",{className:e.fundsHistoryDialog,children:t.jsx(R,{classNameBody:e.dialogBody,classNameParent:e.dialog,headerLeftElement:t.jsx("img",{alt:"Funds History",className:e.titleImage,src:"myAccount/funds_history.png"}),isOpen:s,loading:!1,newDialogStyleEnabled:!0,title:t.jsx("div",{className:e.titleWrapper,children:t.jsxs("div",{className:e.titleTextGroup,children:[t.jsx("span",{children:u("profile.fundsHistoryLowerCase")}),t.jsx(S,{supportsNewTooltipDesign:!0,content:t.jsxs("div",{className:e.tooltipContent,"data-testid":"funds-history-dialog-tooltip-text",style:{minWidth:"200px",maxWidth:"250px",padding:"9px",fontWeight:"300"},children:[t.jsx("span",{children:u("profile.fundsHistoryTooltip")}),t.jsx("div",{children:t.jsx("a",{href:C,rel:"noreferrer",style:{color:"rgba(1, 219, 128, 1)",textDecoration:"underline"},target:"_blank",onClick:c,children:u("common.contactSupport")})})]}),dataTestId:"funds-history-tooltip",offset:[0,5],wrapperClassName:e.tooltipWrapper,children:t.jsx(b,{className:e.tooltipIcon,color:"purple"})})]})}),onBackdropClick:o,onClose:n,children:t.jsxs("div",{className:e.inner,children:[t.jsx("div",{className:e.fundsHistory,"data-testid":"funds-history-list",children:r.transactions.map(i=>t.jsx(Dt,{bingoPurchaseSources:x,item:i,onTooltipClick:_},i.id))}),t.jsx("div",{className:e.footer,children:t.jsx("div",{className:e.footerText,"data-testid":"funds-history-need-help",children:t.jsx(K,{components:{support:t.jsx("a",{className:e.link,"data-testid":"funds-history-dialog-contact-support",href:C,rel:"noreferrer",target:"_blank",onClick:c})},i18nKey:"profile.needHelpContactSupport"})})})]})})})});export{Kt as default}; 2//# sourceMappingURL=FundsHistoryDialog-BbYxO-9_.js.map
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.