1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1660],{14332:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/bet-history",function(){return n(35152)}])},35152:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return r},default:function(){return d}});var a=n(52322),l=n(2784),i=n(30001),s=n(60343);n(25986);var r=!0;function d(){let e=new Date;e.setDate(e.getDate()-10);let t=e.toISOString().split("T")[0],{octonovusWidgetStatus:n,setOctonovusWidgetStatus:r}=(0,i.MSD)(),[d,o]=(0,l.useState)(null),[c,u]=(0,l.useState)({startDate:t,endDate:new Date().toISOString().split("T")[0],selectedStatus:"all",code:""}),h=(0,i.bND)().bookmaker.data,v=(0,i.SEh)(),m=i.eFl.includes(null==h?void 0:h.site_code),p=(0,l.useMemo)(()=>{var e;let t=!!(null==h?void 0:h.open_paid_win),n=(0,i.JYS)(v.data)&&(null==v?void 0:null===(e=v.data)||void 0===e?void 0:e.type)===1;return[{value:"all",name:"all_tickets"},{value:"running",name:"running"},...t&&n?[{value:"paid_winnings",name:"paid_win"},{value:"paid_out",name:"open_win"}]:[],{value:"won",name:"won"},{value:"lost",name:"lost"},{value:"void",name:"void"},{value:"rejected",name:"rejected"},{value:"canceled",name:"canceled"},{value:"cashout",name:"cash_out"},{value:"resulted",name:"resulted"},{value:"bonus",name:"bonus"}]},[null==h?void 0:h.open_paid_win,null==v?void 0:v.data]);(0,l.useEffect)(()=>()=>{r(!1,!1)},[]);let _=(0,l.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"".concat(e," ").concat(t?"23:59:59":"00:00:00")},[]),x=e=>{let{name:t,value:n}=e.target;u(e=>({...e,["betCode"===t?"code":t]:n}))},b=(0,l.useCallback)((e,t)=>{e&&u(t=>({...t,startDate:(0,s.WU)(e,"yyyy-MM-dd")})),t&&u(e=>({...e,endDate:(0,s.WU)(t,"yyyy-MM-dd")}))},[]);return(0,a.jsxs)("div",{className:"bh-search-container",children:[(0,a.jsx)("div",{className:"bh-search-container__title",children:(0,a.jsx)(i.ZT$,{children:"bet_history"})}),(0,a.jsx)("div",{className:"bet-history-filters",children:(0,a.jsxs)("form",{onSubmit:e=>e.preventDefault(),className:"Xinput-wrapper",children:[(0,a.jsxs)("div",{className:"inputs-row",children:[(0,a.jsx)("div",{className:"Xinput-container",children:(0,a.jsx)(i.Dwp,{dateRangeLabelElement:(0,a.jsx)(i.ZT$,{children:"date_range"}),initialStartDate:e,initialEndDate:new Date,onRangeChange:b})}),(0,a.jsxs)("div",{className:"Xinput-container",children:[(0,a.jsx)("label",{htmlFor:"bet_code",children:(0,a.jsx)(i.ZT$,{children:"bet_code"})}),(0,a.jsx)("input",{name:"betCode",className:"Xinput-self",value:c.code,onChange:x})]}),(0,a.jsxs)("div",{className:"Xinput-container input-with-icon",children:[(0,a.jsx)("label",{htmlFor:"selectedStatus",children:(0,a.jsx)(i.ZT$,{children:"ticket_type"})}),(0,a.jsx)("select",{name:"selectedStatus",value:c.selectedStatus,onChange:x,children:p.map(e=>(0,a.jsx)("option",{value:e.value,children:(0,a.jsx)(i.ZT$,{children:e.name})},e.value))}),(0,a.jsx)(i.JO$,{iconClass:"arrow-down"})]})]}),(0,a.jsxs)("div",{className:"inputs-button",children:[(0,a.jsx)(i.zxk,{extraClass:"btn-primary btn-border bh-search-button",onClick:()=>{var e;let t={status:c.selectedStatus,start_time:_(c.startDate),end_time:_(c.endDate,!0),code:c.code};(null==d?void 0:null===(e=d.settings)||void 0===e?void 0:e.filters)&&JSON.stringify(d.settings.filters)===JSON.stringify(t)||(r(!0),o({directive:"BetHistory",settings:{title:"bet_history",filters:t,showCashoutableTicket:!1}}))},disabled:n.loading,children:n.loading?(0,a.jsx)(i.YfE,{type:"2"}):(0,a.jsx)(i.ZT$,{children:"search"})}),!n.loading&&n.hasData&&!m&&(0,a.jsx)(i.zxk,{extraClass:"bh-export-button",onClick:()=>{let{startDate:e,endDate:t,code:n,selectedStatus:a}=c,l=[{name:"auth",value:localStorage.getItem("oct-auth")},{name:"status",value:a},{name:"code",value:n},{name:"start_time",value:e},{name:"end_time",value:t}];(0,i.rDm)(l,"".concat(i.Unh.tp).concat(i.zH0.userBetHistoryExport))},children:(0,a.jsx)(i.ZT$,{children:"export"})})]})]})}),d&&(0,a.jsx)(i.$LY,{widget:d},JSON.stringify(d.settings.filters))]})}},25986:function(){}},function(e){e.O(0,[1705,1617,1711,1709],function(){return e(e.s=14332)}),_N_E=e.O()}]);
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.