1"use strict";(self.webpackChunkslipmate_web_app=self.webpackChunkslipmate_web_app||[]).push([[572],{5572:(kt,I,r)=>{r.r(I),r.d(I,{DashboardModule:()=>bt});var c=r(4250),e=r(6264),g=r(7254),k=r(2839),G=r(646),N=r(4063);let v,Y=1;const f={};function F(n){return n in f&&(delete f[n],!0)}const P={setImmediate(n){const a=Y++;return f[a]=!0,v||(v=Promise.resolve()),v.then(()=>F(a)&&n()),a},clearImmediate(n){F(n)}},{setImmediate:V,clearImmediate:U}=P,_={setImmediate(...n){const{delegate:a}=_;return(a?.setImmediate||V)(...n)},clearImmediate(n){const{delegate:a}=_;return(a?.clearImmediate||U)(n)},delegate:void 0};var L=r(6657);const J=new class K extends L.q{flush(a){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:s}=this;let i;a=a||s.shift();do{if(i=a.execute(a.state,a.delay))break}while((a=s[0])&&a.id===t&&s.shift());if(this._active=!1,i){for(;(a=s[0])&&a.id===t&&s.shift();)a.unsubscribe();throw i}}}(class X extends N.R{constructor(a,t){super(a,t),this.scheduler=a,this.work=t}requestAsyncId(a,t,s=0){return null!==s&&s>0?super.requestAsyncId(a,t,s):(a.actions.push(this),a._scheduled||(a._scheduled=_.setImmediate(a.flush.bind(a,void 0))))}recycleAsyncId(a,t,s=0){var i;if(null!=s?s>0:this.delay>0)return super.recycleAsyncId(a,t,s);const{actions:o}=a;null!=t&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==t&&(_.clearImmediate(t),a._scheduled===t&&(a._scheduled=void 0))}}),H=["chart"];let B=(()=>{class n{constructor(){this.chart=(0,e.hFB)(),this.annotations=(0,e.hFB)(),this.colors=(0,e.hFB)(),this.dataLabels=(0,e.hFB)(),this.series=(0,e.hFB)(),this.stroke=(0,e.hFB)(),this.labels=(0,e.hFB)(),this.legend=(0,e.hFB)(),this.markers=(0,e.hFB)(),this.noData=(0,e.hFB)(),this.fill=(0,e.hFB)(),this.tooltip=(0,e.hFB)(),this.plotOptions=(0,e.hFB)(),this.responsive=(0,e.hFB)(),this.xaxis=(0,e.hFB)(),this.yaxis=(0,e.hFB)(),this.forecastDataPoints=(0,e.hFB)(),this.grid=(0,e.hFB
1)(),this.states=(0,e.hFB)(),this.title=(0,e.hFB)(),this.subtitle=(0,e.hFB)(),this.theme=(0,e.hFB)(),this.autoUpdateSeries=(0,e.hFB)(!0),this.chartReady=(0,e.CGW)(),this.chartInstance=(0,e.vPA)(null),this.chartElement=e.ebz.required("chart"),this.ngZone=(0,e.WQX)(e.SKi),this.isBrowser=(0,c.UE)((0,e.WQX)(e.Agw))}ngOnChanges(t){this.isBrowser&&this.ngZone.runOutsideAngular(()=>{J.schedule(()=>this.hydrate(t))})}ngOnDestroy(){this.destroy()}hydrate(t){this.autoUpdateSeries()&&0===Object.keys(t).filter(i=>"series"!==i).length?this.updateSeries(this.series(),!0):this.createElement()}createElement(){var t=this;return(0,G.A)(function*(){const{default:s}=yield r.e(817).then(r.t.bind(r,5817,19));window.ApexCharts||=s;const i={};["annotations","chart","colors","dataLabels","series","stroke","labels","legend","fill","tooltip","plotOptions","responsive","markers","noData","xaxis","yaxis","forecastDataPoints","grid","states","title","subtitle","theme"].forEach(p=>{const d=t[p]();d&&(i[p]=d)}),t.destroy();const l=t.ngZone.runOutsideAngular(()=>new s(t.chartElement().nativeElement,i));t.chartInstance.set(l),t.render(),t.chartReady.emit({chartObj:l})})()}render(){return this.ngZone.runOutsideAngular(()=>this.chartInstance()?.render())}updateOptions(t,s,i,o){return this.ngZone.runOutsideAngular(()=>this.chartInstance()?.updateOptions(t,s,i,o))}updateSeries(t,s){return this.ngZone.runOutsideAngular(()=>this.chartInstance()?.updateSeries(t,s))}appendSeries(t,s){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.appendSeries(t,s))}appendData(t){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.appendData(t))}highlightSeries(t){return this.ngZone.runOutsideAngular(()=>this.chartInstance()?.highlightSeries(t))}toggleSeries(t){return this.ngZone.runOutsideAngular(()=>this.chartInstance()?.toggleSeries(t))}showSeries(t){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.showSeries(t))}hideSeries(t){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.hideSeries(t))}resetSeries(){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.resetSeries())}zoomX(t,s){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.zoomX(t,s))}toggleDataPointSelection(t,s){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.toggleDataPointSelection(t,s))}destroy(){this.chartInstance()?.destroy(),this.chartInstance.set(null)}setLocale(t){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.setLocale(t))}paper(){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.paper())}addXaxisAnnotation(t,s,i){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.addXaxisAnnotation(t,s,i))}addYaxisAnnotation(t,s,i){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.addYaxisAnnotation(t,s,i))}addPointAnnotation(t,s,i){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.addPointAnnotation(t,s,i))}removeAnnotation(t,s){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.removeAnnotation(t,s))}clearAnnotations(t){this.ngZone.runOutsideAngular(()=>this.chartInstance()?.clearAnnotations(t))}dataURI(t){return this.chartInstance()?.dataURI(t)}static{this.\u0275fac=function(s){return new(s||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["apx-chart"]],viewQuery:function(s,i){1&s&&e.wEZ(i.chartElement,H,5),2&s&&e.NyB()},inputs:{chart:[e.Mj6.SignalBased,"chart"],annotations:[e.Mj6.SignalBased,"annotations"],colors:[e.Mj6.SignalBased,"colors"],dataLabels:[e.Mj6.SignalBased,"dataLabels"],series:[e.Mj6.SignalBased,"series"],stroke:[e.Mj6.SignalBased,"stroke"],labels:[e.Mj6.SignalBased,"labels"],legend:[e.Mj6.SignalBased,"legend"],markers:[e.Mj6.SignalBased,"markers"],noData:[e.Mj6.SignalBased,"noData"],fill:[e.Mj6.SignalBased,"fill"],tooltip:[e.Mj6.SignalBased,"tooltip"],plotOptions:[e.Mj6.SignalBased,"plotOptions"],responsive:[e.Mj6.SignalBased,"responsive"],xaxis:[e.Mj6.SignalBased,"xaxis"],yaxis:[e.Mj6.SignalBased,"yaxis"],forecastDataPoints:[e.Mj6.SignalBased,"forecastDataPoints"],grid:[e.Mj6.SignalBased,"grid"],states:[e.Mj6.SignalBased,"states"],title:[e.Mj6.SignalBased,"title"],subtitle:[e.Mj6.SignalBased,"subtitle"],theme:[e.Mj6.SignalBased,"theme"],autoUpdateSeries:[e.Mj6.SignalBased,"autoUpdateSeries"]},outputs:{chartReady:"chartReady"},standalone:!0,features:[e.OA$,e.aNF],decls:2,vars:0,consts:[["chart",""]],template:function(s,i){1&s&&e.nrm(0,"div",null,0)},encapsulation:2,changeDetection:0})}}return n})(),z=(()=>{class n{static{this.\u0275fac=function(s){return new(s||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({})}}return n})();var Q=r(3571),w=r(1359);let Z=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.$C({type:n});static \u0275inj=e.G2t({imports:[c.MD,w.G]})}return n})();
1var q=r(2153),W=r(7162),E=r(7087),x=r(3807),D=r(1550),R=r(4176),T=r(4669),u=r(1641),y=r(477),h=r(385);const A=`${y.c.apiUrl}/account`,ee=`${y.c.apiUrl}/report`;let b=(()=>{class n{_httpClient;_creditBalance=new x.t({apiKeyLimit:0,updatedAt:new Date,userId:"",creditExpiredAt:new Date,creditLimit:0,createdAt:new Date,SK:"",totalCreditUsed:0,PK:"",phone:"",paymentType:"PREPAID"});_transactionList=new x.t({items:[],nextCursor:null});_apiCallsStatistics=new x.t({labels:[],series:[],total:{txnCount:0,amount:0,credit:0}});constructor(t){this._httpClient=t}get creditBalance$(){return this._creditBalance.asObservable()}get transactionList$(){return this._transactionList.asObservable()}get apiCallsStatistics$(){return this._apiCallsStatistics.asObservable()}set transactionList(t){this._transactionList.next(t)}getCreditBalance(){return this._httpClient.get(`${A}/v1/credit-balance`).pipe((0,D.M)(t=>{this._creditBalance.next(t)}))}getTransactionList(t){return this.transactionList$.pipe((0,R.s)(1),(0,T.n)(s=>this._httpClient.post(`${A}/v1/transactions`,{nextCursor:t}).pipe((0,u.T)(i=>{const o={items:[...s.items,...(0,E.filter)(i.items,["type","PAY"])],nextCursor:i.nextCursor};return this._transactionList.next(o),o}))))}getAPICallsStatistics(t,s){return this._httpClient.post(`${ee}/v1/api-calls`,{startDate:t,endDate:s}).pipe((0,D.M)(i=>{this._apiCallsStatistics.next(i)}))}static \u0275fac=function(s){return new(s||n)(e.KVO(h.Qq))};static \u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var C=r(9578);let te=(()=>{class n{transform(t){if(!t)return"";const s=new Date(t).getTime(),i=(new Date).getTime();return Math.ceil((s-i)/864e5)}static \u0275fac=function(s){return new(s||n)};static \u0275pipe=e.EJ8({name:"daysLeft",type:n,pure:!0})}return n})();function ne(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",6)(2,"div",7)(3,"div",8)(4,"span",9),e.nrm(5,"app-keenicon",10),e.k0s()(),e.j41(6,"span",11),e.EFF(7),e.k0s()()(),e.bVm()),2&n){const t=a.ngIf;e.R7$(7),e.JRh(t.username)}}function ie(n,a){if(1&n&&(e.qex(0),e.j41(1,"span",25),e.EFF(2),e.nI1(3,"daysLeft"),e.k0s(),e.bVm()),2&n){const t=e.XpG(2).ngIf;e.R7$(2),e.SpI(" \u0e2d\u0e35\u0e01 ",e.bMT(3,1,t.creditExpiredAt)," \u0e27\u0e31\u0e19 ")}}function se(n,a){1&n&&(e.j41(0,"span",26),e.EFF(1,"\u0e2b\u0e21\u0e14\u0e2d\u0e32\u0e22\u0e38\u0e41\u0e25\u0e49\u0e27"),e.k0s())}function ae(n,a){1&n&&(e.qex(0),e.nrm(1,"div",7),e.bVm())}function oe(n,a){1&n&&e.nrm(0,"div",7)}function re(n,a){if(1&n&&(e.j41(0,"div",12),e.nrm(1,"app-keenicon",13),e.j41(2,"span",14),e.EFF(3),e.nI1(4,"number"),e.k0s(),e.j41(5,"span",11),e.EFF(6,"\u0e40\u0e04\u0e23\u0e14\u0e34\u0e15\u0e04\u0e07\u0e40\u0e2b\u0e25\u0e37\u0e2d"),e.k0s()(),e.j41(7,"div",15)(8,"div",16),e.nrm(9,"app-keenicon",17),e.j41(10,"div")(11,"span",18),e.EFF(12,"\u0e43\u0e0a\u0e49\u0e44\u0e14\u0e49\u0e16\u0e36\u0e07"),e.k0s(),e.j41(13,"span",19),e.EFF(14),e.nI1(15,"date"),e.k0s()()(),e.DNE(16,ie,4,3,"ng-container",20)(17,se,2,0,"ng-template",null,0,e.C5r),e.k0s(),e.j41(19,"div",21),e.DNE(20,ae,2,0,"ng-container",20)(21,oe,1,0,"ng-template",null,1,e.C5r),e.j41(23,"a",22),e.nrm(24,"app-keenicon",23),e.j41(25,"span",24),e.EFF(26,"\u0e40\u0e15\u0e34\u0e21\u0e40\u0e04\u0e23\u0e14\u0e34\u0e15"),e.k0s()()()),2&n){const t=e.sdS(18),s=e.sdS(22),i=e.XpG().ngIf,o=e.XpG();e.R7$(3),e.SpI(" ",e.bMT(4,7,i.creditLimit)," "),e.R7$(11),e.SpI(" ",e.i5U(15,9,i.creditExpiredAt,"d MMM yyyy")," "),e.R7$(2),e.Y8G("ngIf",!o.isExpired(i.creditExpiredAt))("ngIfElse",t),e.R7$(4),e.Y8G("ngIf",!o.isExpired(i.creditExpiredAt))("ngIfElse",s),e.R7$(3),e.Y8G("routerLink","/packages")}}function le(n,a){if(1&n&&(e.j41(0,"div",12),e.nrm(1,"app-keenicon",13),e.j41(2,"span",14),e.EFF(3),e.nI1(4,"number"),e.k0s(),e.j41(5,"span",11),e.EFF(6,"\u0e40\u0e04\u0e23\u0e14\u0e34\u0e15\u0e17\u0e35\u0e48\u0e43\u0e0a\u0e49\u0e44\u0e1b"),e.k0s()()),2&n){const t=e.XpG().ngIf;e.R7$(3),e.SpI(" ",e.bMT(4,1,t.totalCreditUsed)," ")}}function ce(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",4),e.DNE(2,ne,8,1,"ng-container",3),e.nI1(3,"async"),e.k0s(),e.j41(4,"div",5),e.DNE(5,re,27,12)(6,le,7,3),e.k0s(),e.bVm()),2&n){const t=a.ngIf,s=e.XpG();e.R7$(2),e.Y8G("ngIf",e.bMT(3,2,s.user$)),e.R7$(3),e.vxM(5,"POSTPAID"!==t.paymentType?5:6)}}let pe=(()=>{class n{auth;dashboardService;creditBalance$;user$;constructor(t,s){this.auth=t,this.dashboardService=s}ngOnInit(){this.user$=this.auth.currentUserSubject.asObservable(),this.creditBalance$=this.dashboardService.creditBalance$}isExpired(t){return new Date(t).getTime()<Date.now()}static \u0275fac=function(s){return new(s||n)(e.rXU(W.u),e.rXU(b))};static \u0275cmp=e.VBU({type:n,selectors:[["app-credit-balance"]],decls:3,vars:3,consts:[["expiredBadge",""],["expiredStatus",""],[1,"card","card-flush","h-xl-100"],[4,"ngIf"],[1,"card-header","border-0","pt-6","pb-2"],[1,"card-body","pt-3","pb-7","d-flex","flex-column"],[1,"card-title"],[1,"d-flex","align-items-center","gap-2"],[1,"symbol","symbol-30px","symbol-circle","bg-light-primary"],[1,"symbol-label"],["name","profile-circle",1,"fs-4","text-primary"],[1,"text-muted","fw-semibold","fs-7"],[1,"rounded-3","p-6","mb-5","d-flex","flex-column","align-items-center","text-center"],["name","bitcoin",1,"fs-2x","text-warning","mb-3"],[1,"fs-5x","fw-bolder","text-primary","text-white","lh-1","mb-2"],[1,"d-flex","align-items-center","justify-content-between","bg-transparent","border","border-primary","rounded-3","px-5","py-4","mb-5"],[1,"d-flex","align-items-center","gap-3"],["name","calendar",1,"fs-2","text-primary"],[1,"text-gray-500","fw-semibold","fs-8","d-block"],[1,"text-gray-800","fw-bold","fs-6"],[4,"ngIf","ngIfElse"],[1,"d-flex","align-items-center","justify-content-between","mt-auto"],[1,"btn","btn-primary","btn-sm","fw-bold","px-5","d-flex","align-items-center","justify-content-center","gap-1",3,"routerLink"],["name","plus",1,"fs-5","text-white"],[1,"fs-7"],[1,"badge","badge-light-primary","fw-bold","fs-8","px-3","py-2"],[1,"badge","badge-light-danger","fw-bold","fs-8","px-3","py-2"]],template:function(s,i){1&s&&(e.j41(0,"div",2),e.DNE(1,ce,7,4,"ng-container",3),e.nI1(2,"async"),e.k0s()),2&s&&(e.R7$(),e.Y8G("ngIf",e.bMT(2,1,i.creditBalance$)))},dependencies:[c.bT,k.Wk,C.w,c.Jj,c.QX,c.vh,te]})}return n})();var de=r(9193),M=r(9006),j=r(1718),ue=r(5109),S=r(5798);const he=["daterangepickerElement"];let me=(()=>{class n{daterangepickerElement;buttonClass="btn btn-sm fw-bold d-flex align-items-center px-4";opens="left";range="default";displayFormat="D MMM YYYY";dateRangeSelected=new e.bkB;
1displayText="Loading date range...";daterangepickerInstance;ngAfterViewInit(){this.initializeDaterangepicker()}initializeDaterangepicker(){typeof $>"u"||typeof $.fn.daterangepicker>"u"?console.warn("jQuery or daterangepicker not available"):setTimeout(()=>{if(!this.daterangepickerElement)return;const t=this.daterangepickerElement.nativeElement;if("1"===t.getAttribute("data-kt-initialized"))return;let s=moment().subtract(6,"days"),i=moment();"today"===this.range&&(s=moment(),i=moment());const o=(l,p)=>{const d=moment();this.displayText=d.isSame(l,"day")&&d.isSame(p,"day")?l.format(this.displayFormat):l.format(this.displayFormat)+" - "+p.format(this.displayFormat),this.dateRangeSelected.emit({startDate:l,endDate:p})};this.daterangepickerInstance=$(t).daterangepicker({startDate:s,endDate:i,opens:this.opens,maxDate:moment(),minDate:moment().subtract(90,"days"),ranges:{"Last 7 Days":[moment().subtract(6,"days"),moment()],"Last 30 Days":[moment().subtract(29,"days"),moment()],"This Month":[moment().startOf("month"),moment().endOf("month")],"Last Month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")]}},o),o(s,i),t.setAttribute("data-kt-initialized","1")},100)}ngOnDestroy(){if(this.daterangepickerElement){const t=this.daterangepickerElement.nativeElement;$(t).data("daterangepicker")&&$(t).data("daterangepicker").remove()}}static \u0275fac=function(s){return new(s||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-daterangepicker"]],viewQuery:function(s,i){if(1&s&&e.GBs(he,5),2&s){let o;e.mGM(o=e.lsd())&&(i.daterangepickerElement=o.first)}},inputs:{buttonClass:"buttonClass",opens:"opens",range:"range",displayFormat:"displayFormat"},outputs:{dateRangeSelected:"dateRangeSelected"},decls:5,vars:2,consts:[["daterangepickerElement",""],[3,"ngClass"],[1,"text-gray-600","fw-bold"],["name","calendar-8",1,"fs-1","ms-2","me-0"]],template:function(s,i){1&s&&(e.j41(0,"div",1,0)(2,"div",2),e.EFF(3),e.k0s(),e.nrm(4,"app-keenicon",3),e.k0s()),2&s&&(e.Y8G("ngClass",i.buttonClass),e.R7$(3),e.JRh(i.displayText))},dependencies:[c.YU,C.w]})}return n})();const ge=["chart"];function fe(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",13)(2,"div")(3,"span",14),e.EFF(4),e.nI1(5,"number"),e.k0s()(),e.j41(6,"div",15)(7,"span",16),e.EFF(8,"\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49 API"),e.k0s()()(),e.bVm()),2&n){const t=a.ngIf;e.R7$(4),e.SpI(" ",e.bMT(5,1,t.total.txnCount)," ")}}function _e(n,a){1&n&&e.nrm(0,"div",12)}
1function Ee(n,a){if(1&n&&(e.j41(0,"div",17,0),e.nrm(2,"apx-chart",18,1),e.k0s()),2&n){const t=e.XpG();e.xc7("height","350px"),e.R7$(2),e.Y8G("series",t.chartOptions.series)("chart",t.chartOptions.chart)("xaxis",t.chartOptions.xaxis)("yaxis",t.chartOptions.yaxis)("dataLabels",t.chartOptions.dataLabels)("stroke",t.chartOptions.stroke)("legend",t.chartOptions.legend)("fill",t.chartOptions.fill)("states",t.chartOptions.states)("tooltip",t.chartOptions.tooltip)("colors",t.chartOptions.colors)("markers",t.chartOptions.markers)("plotOptions",t.chartOptions.plotOptions)("grid",t.chartOptions.grid)}}let be=(()=>{class n{dashboardService;chart;chartOptions;loading=!1;statistics$;_destroy$=new M.B;constructor(t){this.dashboardService=t}ngOnInit(){this.chartOptions=this.getChartOptions(350,[],[]),this.dashboardService.apiCallsStatistics$.pipe((0,j.Q)(this._destroy$)).subscribe(t=>{const s=(0,E.find)(t.series,["name","txnCount"]),i=s?[{name:"API Calls",data:s.data}]:[],o=t.labels.map(l=>de(l,"YYYY/MM/DD").format("D MMM"));this.chart?this.chart.updateOptions({series:i.length?i:[{name:"API Calls",data:[]}],xaxis:{categories:o},yaxis:{min:0,max:((0,E.min)(i.map(l=>Math.max(...l.data)))||0)+4}},!1,!0):this.chartOptions=this.getChartOptions(350,o,i)}),this.statistics$=this.dashboardService.apiCallsStatistics$}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}onDateRangeSelected(t){this.fetchStatistics(t.startDate.toISOString(),t.endDate.toISOString())}fetchStatistics(t,s){this.loading=!0,this.statistics$=this.dashboardService.getAPICallsStatistics(t,s).pipe((0,ue.j)(()=>this.loading=!1))}getChartOptions(t,s,i){const o=(0,S.tN)("--bs-gray-500"),l=(0,S.tN)("--bs-border-dashed-color"),p=(0,S.tN)("--bs-text-primary");return{series:i.length?i:[{name:"API Calls",data:[]}],chart:{fontFamily:"inherit",type:"area",height:t,toolbar:{show:!1}},legend:{show:!1},dataLabels:{enabled:!1},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.4,opacityTo:0,stops:[0,80,100]}},stroke:{curve:"smooth",show:!0,width:3,colors:[p]},xaxis:{categories:s,axisBorder:{show:!1},axisTicks:{show:!1},labels:{style:{colors:o,fontSize:"13px"}},crosshairs:{position:"front",stroke:{color:p,width:1,dashArray:3}},tooltip:{enabled:!0,formatter:void 0,offsetY:0,style:{fontSize:"13px"}}},yaxis:{min:0,max:((0,E.min)(i.map(d=>Math.max(...d.data)))||0)+4,labels:{style:{colors:o,fontSize:"13px"}}},states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"none",value:0}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"none",value:0}}},tooltip:{style:{fontSize:"12px"}},colors:[p],grid:{borderColor:l,strokeDashArray:3,yaxis:{lines:{show:!0}}},markers:{strokeColor:p,strokeWidth:3}}}static \u0275fac=function(s){return new(s||n)(e.rXU(b))};static \u0275cmp=e.VBU({type:n,selectors:[["app-api-calls"]],viewQuery:function(s,i){if(1&s&&e.GBs(ge,5),2&s){let o;e.mGM(o=e.lsd())&&(i.chart=o.first)}},decls:14,vars:7,consts:[["chartRef",""],["chart",""],[1,"card","card-flush"],[1,"card-header","pt-5","border-0"],[1,"card-title","d-flex","flex-column","gap-1"],[1,"d-flex","align-items-center","gap-2"],[1,"bullet","bullet-vertical","h-20px","w-4px","rounded","bg-primary","me-1"],[1,"card-label","fw-bold","text-gray-900","mb-0"],[1,"card-toolbar"],[3,"dateRangeSelected","buttonClass","opens","range"],[1,"card-body","pt-2"],[4,"ngIf"],[1,"skeleton","rounded-3",2,"height","350px"],[1,"d-flex","align-items-end","gap-3","mb-3"],[1,"fs-2hx","fw-bolder","text-gray-800","lh-1","ls-n2"],[1,"pb-2"],[1,"badge","badge-light-primary","fw-semibold","fs-8"],["id","kt_charts_widget_3_chart"],[3,"series","chart","xaxis","yaxis","dataLabels","stroke","legend","fill","states","tooltip","colors","markers","plotOptions","grid"]],template:function(s,i){1&s&&(e.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),e.nrm(4,"span",6),e.j41(5,"h3",7),e.EFF(6,"\u0e2a\u0e16\u0e34\u0e15\u0e34\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 API"),e.k0s()()(),e.j41(7,"div",8)(8,"app-daterangepicker",9),e.bIt("dateRangeSelected",function(l){return i.onDateRangeSelected(l)}),e.k0s()()(),e.j41(9,"div",10),e.DNE(10,fe,9,3,"ng-container",11),e.nI1(11,"async"),e.DNE(12,_e,1,0,"div",12)(13,Ee,4,16),e.k0s()()),2&s&&(e.R7$(8),e.Y8G("buttonClass","btn btn-sm fw-bold d-flex align-items-center px-4")("opens","left")("range","default"),e.R7$(2),e.Y8G("ngIf",e.bMT(11,5,i.statistics$)),e.R7$(2),e.vxM(12,i.loading?12:13))},dependencies:[c.bT,me,B,c.Jj,c.QX]})}return n})();var ke=r(4379),ve=r(572);const m=`${y.c.apiUrl}/open-api`;let xe=(()=>{class n{_http;constructor(t){this._http=new h.Qq(t)}verifyByQrData(t,s,i=!1){return this._http.post(`${m}/v1/verify`,{qrData:s,allowDuplicate:i},{headers:this._jsonHeaders(t)}).pipe((0,u.T)(o=>this._mapResponse(o)))}verifyByBase64File(t,s,i=!1){return this._fileToBase64(s).pipe((0,T.n)(o=>this._http.post(`${m}/v1/verify`,{qrImageBase64:o,allowDuplicate:i},{headers:this._jsonHeaders(t)})),(0,u.T)(o=>this._mapResponse(o)))}verifyByBase64String(t,s,i=!1){return this._http.post(`${m}/v1/verify`,{qrImageBase64:s,allowDuplicate:i},{headers:this._jsonHeaders(t)}).pipe((0,u.T)(o=>this._mapResponse(o)))}verifyByFileUpload(t,s,i=!1){const o=new FormData;return o.append("file",s),o.append("allowDuplicate",String(i)),this._http.post(`${m}/v1/verify`,o,{headers:new h.Lr({"X-API-KEY":t})}).pipe((0,u.T)(l=>this._mapResponse(l)))}verifyByImageUrl(t,s,i=!1){return this._http.post(`${m}/v1/verify`,{qrImageUrl:s,allowDuplicate:i},{headers:this._jsonHeaders(t)}).pipe((0,u.T)(o=>this._mapResponse(o)))}verifyByTransRef(t,s,i,o=!1){return this._http.post(`${m}/v1/verify`,{sendingBank:s,transRef:i,allowDuplicate:o},{headers:this._jsonHeaders(t)}).pipe((0,u.T)(l=>this._mapResponse(l)))}_jsonHeaders(t){return new h.Lr({"Content-Type":"application/json","X-API-KEY":t})}_mapResponse(t){return{status:"SUCCESS",transRef:t.transRef,slipInfo:{sendingBankName:t.
1sendingBankName,sendingBankLogo:t.sendingBankLogo,receivingBankName:t.receivingBankName,receivingBankLogo:t.receivingBankLogo,transDateTime:new Date(t.transDateTime),sender:t.sender,receiver:t.receiver,amount:t.amount},rawResponse:t}}_fileToBase64(t){return new ve.c(s=>{const i=new FileReader;i.onload=()=>{const o=i.result.split(",")[1];s.next(o),s.complete()},i.onerror=()=>s.error(i.error),i.readAsDataURL(t)})}static \u0275fac=function(s){return new(s||n)(e.KVO(h.JV))};static \u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ye=r(6074);const Ce=["fileInput"],O=(n,a,t)=>({"active text-primary":n,"text-muted cursor-pointer":a,"text-gray-300 check-slip-tab-disabled":t}),je=n=>({dragging:n}),Se=n=>({open:n}),Ie=n=>({rotated:n}),Fe=(n,a)=>({active:n,"border-bottom":a}),Be=(n,a,t)=>({"bg-success":n,"bg-danger":a,"bg-warning":t}),we=n=>({active:n});function De(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",37),e.bIt("dragover",function(i){e.eBV(t);const o=e.XpG(3);return e.Njj(o.handleDragOver(i))})("dragleave",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.handleDragLeave())})("drop",function(i){e.eBV(t);const o=e.XpG(3);return e.Njj(o.handleDrop(i))})("click",function(){e.eBV(t);const i=e.sdS(2);return e.Njj(i.click())}),e.j41(1,"input",38,0),e.bIt("change",function(i){e.eBV(t);const o=e.XpG(3);return e.Njj(o.handleFileChange(i))}),e.k0s(),e.j41(3,"i",39),e.nrm(4,"span",28)(5,"span",29),e.k0s(),e.j41(6,"div",40)(7,"span",41),e.EFF(8,"\u0e04\u0e25\u0e34\u0e01\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e2d\u0e31\u0e1b\u0e42\u0e2b\u0e25\u0e14 \u0e2b\u0e23\u0e37\u0e2d\u0e25\u0e32\u0e01\u0e44\u0e1f\u0e25\u0e4c\u0e21\u0e32\u0e27\u0e32\u0e07"),e.k0s(),e.j41(9,"span",42),e.EFF(10,"PNG, JPG \u0e2b\u0e23\u0e37\u0e2d WEBP (\u0e2a\u0e39\u0e07\u0e2a\u0e38\u0e14 5MB)"),e.k0s()()()}if(2&n){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(2,je,t.isDragging)),e.R7$(),e.Y8G("accept",t.allowedFileTypes.join(","))}}function Re(n,a){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"div",43),e.nrm(2,"img",44),e.k0s(),e.j41(3,"div",45)(4,"span",46)(5,"i",47),e.nrm(6,"span",28)(7,"span",29),e.k0s(),e.EFF(8),e.k0s(),e.j41(9,"button",48),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.handleRemoveFile())}),e.nrm(10,"app-keenicon",49),e.k0s()()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("src",t.fileUrl,e.B4B),e.R7$(6),e.SpI(" ",t.uploadFile.name," ")}}function Te(n,a){if(1&n&&(e.qex(0),e.DNE(1,De,11,4,"div",36)(2,Re,11,2,"div",14),e.bVm()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",!t.fileUrl),e.R7$(),e.Y8G("ngIf",t.fileUrl&&t.uploadFile)}}function Ae(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"input",50),e.mxI("ngModelChange",function(i){e.eBV(t);const o=e.XpG(2);return e.DH7(o.imageUrl,i)||(o.imageUrl=i),e.Njj(i)}),e.k0s(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(),e.R50("ngModel",t.imageUrl)}}function Me(n,a){1&n&&(e.j41(0,"span",58)(1,"i",47),e.nrm(2,"span",28)(3,"span",29),e.k0s(),e.EFF(4," \u0e04\u0e31\u0e14\u0e25\u0e2d\u0e01\u0e41\u0e25\u0e49\u0e27 "),e.k0s())}function Oe(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",51)(2,"div")(3,"label",15),e.EFF(4,"SENDING BANK"),e.k0s(),e.j41(5,"div",52)(6,"input",53),e.mxI("ngModelChange",function(i){e.eBV(t);const o=e.XpG(2);return e.DH7(o.sendingBank,i)||(o.sendingBank=i),e.Njj(i)}),e.k0s(),e.j41(7,"button",54),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.openBankModal())}),e.nrm(8,"app-keenicon",55),e.EFF(9," \u0e40\u0e25\u0e37\u0e2d\u0e01\u0e18\u0e19\u0e32\u0e04\u0e32\u0e23 "),e.k0s(),e.DNE(10,Me,5,0,"span",56),e.k0s()(),e.j41(11,"div")(12,"label",15),e.EFF(13,"TRANSACTION REF"),e.k0s(),e.j41(14,"input",57),e.mxI("ngModelChange",function(i){e.eBV(t);const o=e.XpG(2);return e.DH7(o.transRef,i)||(o.transRef=i),e.Njj(i)}),e.k0s()()(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(6),e.R50("ngModel",t.sendingBank),e.R7$(4),e.Y8G("ngIf",t.copiedBankCode),e.R7$(4),e.R50("ngModel",t.transRef)}}function $e(n,a){if(1&n&&(e.qex(0),e.DNE(1,Te,3,2,"ng-container",14)(2,Ae,2,1,"ng-container",14)(3,Oe,15,3,"ng-container",14),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.isFileBasedMethod),e.R7$(),e.Y8G("ngIf","image-url"===t.verificationMethod),e.R7$(),e.Y8G("ngIf","trans-ref"===t.verificationMethod)}}function Ge(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"textarea",59),e.mxI("ngModelChange",function(i){e.eBV(t);const o=e.XpG();return e.DH7(o.jsonBody,i)||(o.jsonBody=i),e.Njj(i)}),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(),e.R50("ngModel",t.jsonBody)}}function Ne(n,a){1&n&&(e.j41(0,"span",66),e.EFF(1,"\u0e40\u0e25\u0e37\u0e2d\u0e01 API Key"),e.k0s())}function Ye(n,a){if(1&n&&(e.j41(0,"div",67),e.nrm(1,"span",68),e.j41(2,"div",69)(3,"span",70),e.EFF(4),e.k0s(),e.j41(5,"span",71),e.EFF(6),e.nI1(7,"slice"),e.k0s()()()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngClass",t.selectedApiKeyObj.status?"bg-success":"bg-danger"),e.R7$(3),e.JRh(t.selectedApiKeyObj.name),e.R7$(2),e.SpI(" ",e.brH(7,3,t.selectedApiKeyObj.apiKey,0,28),"... ")}}function Pe(n,a){1&n&&(e.j41(0,"div",75),e.EFF(1," \u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35 API Key \u2014 "),e.j41(2,"a",76),e.EFF(3,"\u0e2a\u0e23\u0e49\u0e32\u0e07 API Key"),e.k0s()()),2&n&&(e.R7$(2),e.Y8G("routerLink","/open-api"))}function Ve(n,a){1&n&&(e.j41(0,"i",80),e.nrm(1,"span",28)(2,"span",29),e.k0s())}function Ue(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",77),e.bIt("click",function(i){const o=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.selectApiKey(o,i))}),e.nrm(1,"span",68),e.j41(2,"div",78)(3,"span",70),e.EFF(4),e.k0s(),e.j41(5,"span",71),e.EFF(6),e.nI1(7,"slice"),e.k0s()(),e.DNE(8,Ve,3,0,"i",79),e.k0s()}if(2&n){const t=a.$implicit,s=a.last,i=e.XpG(3);e.Y8G("ngClass",e.l_i(9,Fe,i.selectedApiKey===t.apiKey,!s)),e.R7$(),e.Y8G("ngClass",t.status?"bg-success":"bg-danger"),e.R7$(3),e.JRh(t.name),e.R7$(2),e.SpI(" ",e.brH(7,5,t.apiKey,0,28),"... "),e.R7$(2),e.Y8G("ngIf",i.selectedApiKey===t.apiKey)}}function Xe(n,a){if(1&n&&(e.j41(0,"div",72),e.DNE(1,Pe,4,1,"div",73)(2,Ue,9,12,"div",74),e.k0s()),2&n){const t=e.XpG().ngIf;e.R7$(),e.Y8G("ngIf",0===t.items.length),e.R7$(),e.Y8G("ngForOf",t.items)}}function Le(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",60)(2,"div",61),e.bIt("click",function(i){e.eBV(t);const o=e.XpG();return e.Njj(o.toggleApiKeyDropdown(i))}),e.DNE(3,Ne,2,0,"span",62)(4,Ye,8,7,"div",63),e.nrm(5,"app-keenicon",64),e.k0s(),e.DNE(6,
1Xe,3,2,"div",65),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngClass",e.eq3(5,Se,t.apiKeyDropdownOpen)),e.R7$(),e.Y8G("ngIf",!t.selectedApiKeyObj),e.R7$(),e.Y8G("ngIf",t.selectedApiKeyObj),e.R7$(),e.Y8G("ngClass",e.eq3(7,Ie,t.apiKeyDropdownOpen)),e.R7$(),e.Y8G("ngIf",t.apiKeyDropdownOpen)}}function Ke(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",81),e.bIt("click",function(){const i=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.setMethod(i.key))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit,s=e.XpG();e.Y8G("ngClass",s.verificationMethod===t.key?"active":""),e.R7$(),e.SpI(" ",t.label," ")}}function Je(n,a){if(1&n&&(e.j41(0,"div",82),e.nrm(1,"app-keenicon",83),e.j41(2,"span",84),e.EFF(3),e.k0s()()),2&n){const t=e.XpG();e.R7$(3),e.JRh(t.error)}}function He(n,a){1&n&&(e.j41(0,"div",85),e.nrm(1,"span",86),e.j41(2,"span",66),e.EFF(3,"\u0e01\u0e33\u0e25\u0e31\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e2a\u0e25\u0e34\u0e1b..."),e.k0s()())}function ze(n,a){1&n&&(e.j41(0,"div",87)(1,"i",88),e.nrm(2,"span",28)(3,"span",29),e.k0s(),e.j41(4,"span",66),e.EFF(5,"\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e08\u0e30\u0e41\u0e2a\u0e14\u0e07\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48"),e.k0s()())}function Qe(n,a){1&n&&(e.j41(0,"i",105),e.nrm(1,"span",28)(2,"span",29),e.k0s())}function Ze(n,a){1&n&&(e.j41(0,"i",106),e.nrm(1,"span",28)(2,"span",29),e.k0s())}function qe(n,a){1&n&&(e.j41(0,"i",107),e.nrm(1,"span",28)(2,"span",29)(3,"span",108),e.k0s())}function We(n,a){1&n&&(e.qex(0),e.EFF(1,"\u0e2a\u0e25\u0e34\u0e1b\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07"),e.bVm())}function et(n,a){1&n&&(e.qex(0),e.EFF(1,"\u0e2a\u0e25\u0e34\u0e1b\u0e0b\u0e49\u0e33"),e.bVm())}function tt(n,a){1&n&&(e.qex(0),e.EFF(1,"\u0e2a\u0e25\u0e34\u0e1b\u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07"),e.bVm())}function nt(n,a){1&n&&(e.qex(0),e.EFF(1,"\u0e1e\u0e1a\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14"),e.bVm())}function it(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",109)(2,"span",110),e.EFF(3),e.nI1(4,"number"),e.k0s()(),e.nrm(5,"div",111),e.j41(6,"div",112)(7,"div",113)(8,"span",114),e.EFF(9,"\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48-\u0e40\u0e27\u0e25\u0e32"),e.k0s(),e.j41(10,"span",115),e.EFF(11),e.nI1(12,"date"),e.k0s()(),e.j41(13,"div",113)(14,"span",114),e.EFF(15,"\u0e1c\u0e39\u0e49\u0e42\u0e2d\u0e19"),e.k0s(),e.j41(16,"div",116)(17,"span",117),e.EFF(18),e.k0s(),e.j41(19,"span",118),e.EFF(20),e.k0s()()(),e.j41(21,"div",113)(22,"span",114),e.EFF(23,"\u0e1c\u0e39\u0e49\u0e23\u0e31\u0e1a"),e.k0s(),e.j41(24,"div",116)(25,"span",117),e.EFF(26),e.k0s(),e.j41(27,"span",118),e.EFF(28),e.k0s()()()(),e.bVm()),2&n){const t=a.ngIf;e.R7$(3),e.SpI("\u0e3f",e.i5U(4,6,t.amount,"1.2-2"),""),e.R7$(8),e.SpI(" ",e.i5U(12,9,t.transDateTime,"d MMM yy, HH:mm")," "),e.R7$(7),e.JRh(t.sender.displayName),e.R7$(2),e.JRh(t.sendingBankName),e.R7$(6),e.JRh(t.receiver.displayName),e.R7$(2),e.JRh(t.receivingBankName)}}function st(n,a){if(1&n&&(e.j41(0,"span",122),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.SpI(" Ref: ",t.result.transRef," ")}}function at(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",119)(2,"span",120),e.EFF(3),e.k0s(),e.DNE(4,st,2,1,"span",121),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(3),e.SpI(" ",t.getErrorMessage(t.result.errorCode,t.result.message||"\u0e2a\u0e25\u0e34\u0e1b\u0e19\u0e35\u0e49\u0e40\u0e04\u0e22\u0e16\u0e39\u0e01\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e44\u0e1b\u0e41\u0e25\u0e49\u0e27")," "),e.R7$(),e.Y8G("ngIf",t.result.transRef)}}function ot(n,a){if(1&n&&(e.j41(0,"span",124),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.SpI(" ",t.result.errorCode," ")}}function rt(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",119)(2,"span",120),e.EFF(3),e.k0s(),e.DNE(4,ot,2,1,"span",123),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(3),e.SpI(" ",t.getErrorMessage(t.result.errorCode,t.result.message||"\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e2a\u0e25\u0e34\u0e1b\u0e44\u0e14\u0e49")," "),e.R7$(),e.Y8G("ngIf",t.result.errorCode)}}function lt(n,a){if(1&n&&(e.j41(0,"span",126),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.SpI(" ",t.result.errorCode," ")}}function ct(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",119)(2,"span",120),e.EFF(3),e.k0s(),e.DNE(4,lt,2,1,"span",125),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(3),e.SpI(" ",t.getErrorMessage(t.result.errorCode,t.result.message)," "),e.R7$(),e.Y8G("ngIf",t.result.errorCode)}}function pt(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",89)(1,"div",90)(2,"div",91)(3,"div",92),e.DNE(4,Qe,3,0,"i",93)(5,Ze,3,0,"i",94)(6,qe,4,0,"i",95),e.k0s(),e.j41(7,"span",96
1),e.qex(8,97),e.DNE(9,We,2,0,"ng-container",98)(10,et,2,0,"ng-container",98)(11,tt,2,0,"ng-container",98)(12,nt,2,0,"ng-container",98),e.bVm(),e.k0s()(),e.nrm(13,"div",99),e.k0s(),e.j41(14,"div",100),e.DNE(15,it,29,12,"ng-container",14)(16,at,5,2,"ng-container",14)(17,rt,5,2,"ng-container",14)(18,ct,5,2,"ng-container",14),e.k0s(),e.j41(19,"div",101),e.nrm(20,"img",102),e.j41(21,"div",4)(22,"button",103),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.jsonModalOpen=!0)}),e.EFF(23," JSON "),e.k0s(),e.j41(24,"button",104),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.resetForm())}),e.EFF(25," \u0e15\u0e23\u0e27\u0e08\u0e43\u0e2b\u0e21\u0e48 "),e.k0s()()()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("ngClass",e.sMw(13,Be,"SUCCESS"===t.result.status,"FAILED"===t.result.status||"DUPLICATE"===t.result.status,"ERROR"===t.result.status)),e.R7$(3),e.Y8G("ngIf","SUCCESS"===t.result.status),e.R7$(),e.Y8G("ngIf","DUPLICATE"===t.result.status||"FAILED"===t.result.status),e.R7$(),e.Y8G("ngIf","ERROR"===t.result.status),e.R7$(2),e.Y8G("ngSwitch",t.result.status),e.R7$(),e.Y8G("ngSwitchCase","SUCCESS"),e.R7$(),e.Y8G("ngSwitchCase","DUPLICATE"),e.R7$(),e.Y8G("ngSwitchCase","FAILED"),e.R7$(),e.Y8G("ngSwitchCase","ERROR"),e.R7$(3),e.Y8G("ngIf","SUCCESS"===t.result.status&&t.result.slipInfo),e.R7$(),e.Y8G("ngIf","DUPLICATE"===t.result.status),e.R7$(),e.Y8G("ngIf","FAILED"===t.result.status),e.R7$(),e.Y8G("ngIf","ERROR"===t.result.status)}}function dt(n,a){1&n&&(e.j41(0,"i",143),e.nrm(1,"span",28)(2,"span",29),e.k0s())}function ut(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",136),e.bIt("click",function(){const i=e.eBV(t).$implicit,o=e.XpG(2);return e.Njj(o.selectBankCode(i))}),e.j41(1,"div",137),e.nrm(2,"img",138),e.k0s(),e.j41(3,"div",139)(4,"span",140),e.EFF(5),e.k0s()(),e.j41(6,"span",141),e.EFF(7),e.k0s(),e.DNE(8,dt,3,0,"i",142),e.k0s()}if(2&n){const t=a.$implicit,s=e.XpG(2);e.Y8G("ngClass",e.eq3(6,we,s.sendingBank===t.code)),e.R7$(2),e.Y8G("src",t.logo,e.B4B)("alt",t.nameTH),e.R7$(3),e.JRh(t.nameTH),e.R7$(2),e.JRh(t.code),e.R7$(),e.Y8G("ngIf",s.sendingBank===t.code)}}function ht(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",127),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.closeBankModal())}),e.j41(1,"div",128),e.bIt("click",function(i){return e.eBV(t),e.Njj(i.stopPropagation())}),e.j41(2,"div",129)(3,"div",130)(4,"div",4)(5,"i",131),e.nrm(6,"span",28)(7,"span",29),e.k0s(),e.j41(8,"h5",132),e.EFF(9,"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e18\u0e19\u0e32\u0e04\u0e32\u0e23"),e.k0s()(),e.j41(10,"button",133),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.closeBankModal())}),e.k0s()(),e.j41(11,"div",134),e.DNE(12,ut,9,8,"div",135),e.k0s()()()()}if(2&n){const t=e.XpG();e.R7$(12),e.Y8G("ngForOf",t.thaiBanks)}}function mt(n,a){1&n&&e.nrm(0,"div",144)}function gt(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",127),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.jsonModalOpen=!1)}),e.j41(1,"div",145),e.bIt("click",function(i){return e.eBV(t),e.Njj(i.stopPropagation())}),e.j41(2,"div",129)(3,"div",130)(4,"div",4)(5,"i",146),e.nrm(6,"span",28)(7,"span",29),e.k0s(),e.j41(8,"h5",132),e.EFF(9,"JSON Response"),e.k0s()(),e.j41(10,"div",4)(11,"button",133),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.jsonModalOpen=!1)}),e.k0s()()(),e.j41(12,"div",134)(13,"div",147)(14,"button",148),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyJson())}),e.nrm(15,"app-keenicon",149),e.k0s(),e.j41(16,"pre",150),e.EFF(17),e.nI1(18,"json"),e.k0s()()()()()()}if(2&n){const t=e.XpG();e.R7$(14),e.Y8G("title",t.jsonCopied?"\u0e04\u0e31\u0e14\u0e25\u0e2d\u0e01\u0e41\u0e25\u0e49\u0e27!":"\u0e04\u0e31\u0e14\u0e25\u0e2d\u0e01 JSON"),e.R7$(),e.Y8G("name",t.jsonCopied?"check":"copy"),e.R7$(2),e.JRh(e.bMT(18,3,null==t.result?null:t.result.rawResponse))}}function ft(n,a){1&n&&e.nrm(0,"div",144)}let _t=(()=>{class n{_openApiService;_checkSlipService;_dashboardService;_clipboard;_http;cdr;_el;fileInput;apiKeys$;selectedApiKey="";selectedApiKeyObj=null;apiKeyDropdownOpen=!1;uploadFile=null;fileUrl=null;isDragging=!1;isLoading=!1;result=null;error=null;activeTab="upload";verificationMethod="file-upload";jsonBody="";imageUrl="";transRef="";sendingBank="";bankModalOpen=!1;copiedBankCode=null;allowDuplicate=!1;jsonModalOpen=!1;jsonCopied=!1;allowedFileTypes=["image/jpeg","image/png","image/webp"];verificationMethods=[{key:"qr-data",label:"QR Data"},{key:"base64",label:"Base64"},{key:"file-upload",label:"File Upload"},{key:"image-url",label:"Image URL"},{key:"trans-ref",label:"Trans. Ref"}];thaiBanks=[];_unsubscribeAll=new M.B;_copyTimeout=null;constructor(t,s,i,o,l,p,d){this._openApiService=t,this._checkSlipService=s,this._dashboardService=i,this._clipboard=o,this._http=l,this.cdr=p,this._el=d}ngOnInit(){this.apiKeys$=this._openApiService.apiKeys$,this._openApiService.getApiKeys().pipe((0,j.Q)(this._unsubscribeAll)).subscribe(),this._loadThaiBanks()}_loadThaiBanks(){this._http.get("https://s3.ap-southeast-1.amazonaws.com/assets.slipmate.ai/public/banks_th.json").pipe((0,j.Q)(this._unsubscribeAll)).subscribe({next:t=>{this.thaiBanks=t.map(s=>({logo:s.bankLogo,nameTH:s.bankNameTH,code:s.bankCode})),this.cdr.markForCheck()},error:()=>{}})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete(),this._copyTimeout&&clearTimeout(this._copyTimeout)}isTabDisabled(t){return"json"===t?["file-upload","image-url","trans-ref"].includes(this.verificationMethod):"upload"===t&&["qr-data","base64"].includes(this.verificationMethod)}setTab(t){this.isTabDisabled(t)||(this.activeTab=t,this.error=null,"json"===t&&"base64"===this.verificationMethod&&!this.jsonBody&&this._prefillJsonTemplate())}setMethod(t){this.verificationMethod=t,this.error=null,this.handleRemoveFile(),this.imageUrl="",this.transRef="",this.sendingBank="",this.jsonBody="","qr-data"===t||"base64"===t?(this.activeTab="json",this._prefillJsonTemplate()):this.activeTab="upload"}_prefillJsonTemplate(){const s={"qr-data":{qrData:""},base64:{qrImageBase64:""}}[this.verificationMethod];s&&(this.jsonBody=JSON.stringify(s,null,2))}get isFileBasedMethod(){return["file-upload","base64"].includes(this.verificationMethod)}get canVerify(){if(!this.selectedApiKey||this.isLoading)return!1;if("json"===this.activeTab)return this.jsonBody.trim().length>0;switch(this.verificationMethod){case"file-upload":case"base64":return!!this.uploadFile;case"image-url":return this.imageUrl.trim().length>0;case"trans-ref":return this.sendingBank.trim().length>0&&this.transRef.trim().length>0;default:return!1}}verify(){if(this.canVerify){if("json"===this.activeTab)return void this._verifyFromJson();switch(this.verificationMethod){case"file-upload":this._doVerify(this._checkSlipService.verifyByFileUpload(this.selectedApiKey,this.uploadFile,this.allowDuplicate));break;case"base64":this._doVerify(this._checkSlipService.verifyByBase64File(this.selectedApiKey,this.uploadFile,this.allowDuplicate));break;case"image-url":this._doVerify(this._checkSlipService.verifyByImageUrl(this.selectedApiKey,this.imageUrl,this.allowDuplicate));break;case"trans-ref":this._doVerify(this._checkSlipService.verifyByTransRef(this.selectedApiKey,this.sendingBank,this.transRef,this.allowDuplicate))}}}_verifyFromJson(){let t;try{t=JSON.parse(this.jsonBody)}catch{return void(this.error="JSON format \u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07 \u0e01\u0e23\u0e38\u0e13\u0e32\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a syntax")}switch(this.verificationMethod){case"qr-data":if(!t.qrData)return void(this.error="\u0e01\u0e23\u0e38\u0e13\u0e32\u0e23\u0e30\u0e1a\u0e38 qrData \u0e43\u0e19 JSON");this._doVerify(this._checkSlipService.verifyByQrData(this.selectedApiKey,t.qrData,t.allowDuplicate??this.allowDuplicate));break;case"base64":if(!t.qrImageBase64)return void(this.error="\u0e01\u0e23\u0e38\u0e13\u0e32\u0e23\u0e30\u0e1a\u0e38 qrImageBase64 \u0e43\u0e19 JSON");this._doVerify(this._checkSlipService.verifyByBase64String(this.selectedApiKey,t.qrImageBase64,t.allowDuplicate??this.allowDuplicate))}}getErrorMessage(t,s){return s||"\u0e40\u0e01\u0e34\u0e14\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14 \u0e01\u0e23\u0e38\u0e13\u0e32\u0e25\u0e2d\u0e07\u0e43\u0e2b\u0e21\u0e48\u0e2d\u0e35\u0e01\u0e04\u0e23\u0e3
11\u0e49\u0e07"}copyJson(){this._clipboard.copy(JSON.stringify(this.result,null,2)),this.jsonCopied=!0,setTimeout(()=>{this.jsonCopied=!1,this.cdr.markForCheck()},2e3)}resetForm(){this.handleRemoveFile(),this.result=null,this.error=null,this.imageUrl="",this.transRef="",this.sendingBank="",this.jsonBody=""}onDocumentClick(t){this._el.nativeElement.contains(t.target)||(this.apiKeyDropdownOpen=!1)}toggleApiKeyDropdown(t){t.stopPropagation(),this.apiKeyDropdownOpen=!this.apiKeyDropdownOpen}selectApiKey(t,s){s.stopPropagation(),this.selectedApiKey=t.apiKey,this.selectedApiKeyObj=t,this.apiKeyDropdownOpen=!1}openBankModal(){this.bankModalOpen=!0}closeBankModal(){this.bankModalOpen=!1}selectBankCode(t){this.sendingBank=t.code,this._clipboard.copy(t.code),this.copiedBankCode=t.code,this.bankModalOpen=!1,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=setTimeout(()=>{this.copiedBankCode=null,this.cdr.markForCheck()},2e3)}handleFileChange(t){this.isDragging=!1;const s=t.target.files[0];s&&this._processFile(s)}handleDragOver(t){t.preventDefault(),this.isDragging=!0}handleDragLeave(){this.isDragging=!1}handleDrop(t){t.preventDefault(),this.isDragging=!1;const s=t.dataTransfer?.files[0];s&&this._processFile(s)}handleRemoveFile(){this.fileInput?.nativeElement&&(this.fileInput.nativeElement.value=null),this.uploadFile=null,this.fileUrl=null}_processFile(t){this.allowedFileTypes.includes(t.type)?t.size>5242880?this.error="\u0e02\u0e19\u0e32\u0e14\u0e44\u0e1f\u0e25\u0e4c\u0e40\u0e01\u0e34\u0e19 5MB":(this.error=null,this.fileUrl=URL.createObjectURL(t),this.uploadFile=t):this.error="\u0e44\u0e21\u0e48\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15\u0e43\u0e2b\u0e49\u0e43\u0e0a\u0e49\u0e44\u0e1f\u0e25\u0e4c\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e19\u0e35\u0e49 (\u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a JPG, PNG, WEBP)"}_doVerify(t){this.isLoading=!0,this.result=null,this.error=null,t.subscribe({next:s=>{this.result=s,this.isLoading=!1,"SUCCESS"===s.status&&this._dashboardService.getCreditBalance().pipe((0,R.s)(1)).subscribe(),this.cdr.markForCheck()},error:s=>{const i=s.error,o=s.status;this.result=409===o?{status:"DUPLICATE",message:i?.message||"\u0e2a\u0e25\u0e34\u0e1b\u0e19\u0e35\u0e49\u0e40\u0e04\u0e22\u0e16\u0e39\u0e01\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e44\u0e1b\u0e41\u0e25\u0e49\u0e27",errorCode:i?.code||i?.errorCode,transRef:i?.data?.rqUID}:400===o?{status:"FAILED",message:i?.message||"\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e2a\u0e25\u0e34\u0e1b\u0e44\u0e14\u0e49",errorCode:i?.code||i?.errorCode,transRef:i?.data?.rqUID}:{status:"ERROR",message:i?.message||`[${o}] \u0e40\u0e01\u0e34\u0e14\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14 \u0e01\u0e23\u0e38\u0e13\u0e32\u0e25\u0e2d\u0e07\u0e43\u0e2b\u0e21\u0e48\u0e2d\u0e35\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07`,errorCode:i?.code||i?.errorCode},this.result.rawResponse=i,this.isLoading=!1,this.cdr.markForCheck()}})}static \u0275fac=function(s){return new(s||n)(e.rXU(ke.O),e.rXU(xe),e.rXU(b),e.rXU(ye.B0),e.rXU(h.Qq),e.rXU(e.gRc),e.rXU(e.aKT))};static \u0275cmp=e.VBU({type:n,selectors:[["app-check-slip"]],viewQuery:function(s,i){if(1&s&&e.GBs(Ce,5),2&s){let o;e.mGM(o=e.lsd())&&(i.fileInput=o.first)}},hostBindings:function(s,i){1&s&&e.bIt("click",function(l){return i.onDocumentClick(l)},!1,e.EBC)},decls:52,vars:26,consts:[["fileInput",""],[1,"card","card-flush"],[1,"card-header","border-0","pt-6","pb-3"],[1,"card-title"],[1,"d-flex","align-items-center","gap-2"],[1,"bullet","bullet-vertical","h-25px","w-4px","rounded","bg-primary","me-1"],[1,"fw-bold","mb-0"],[1,"card-body","pt-2",2,"overflow-y","auto","height","610px"],[1,"row","g-6"],[1,"col-12","col-xl-7"],[1,"nav","nav-line-tabs","nav-line-tabs-2x","nav-stretch","fs-6","fw-semibold","border-bottom","mb-6"],[1,"nav-item"],[1,"nav-link","pb-4",3,"click","ngClass"],[1,"mb-5"],[4,"ngIf"],[1,"check-slip-section-label","fw-bold","text-uppercase","text-gray-500","fs-8","d-block","mb-2"],[1,"form-check","form-switch","form-check-custom","form-check-solid"],["type","checkbox","id","allowDuplicateCheck",1,"form-check-input",3,"ngModelChange","ngModel"],["for","allowDuplicateCheck",1,"form-check-label","fw-semibold","text-gray-700","ms-3"],[1,"text-muted","fw-normal","fs-8","ms-1"],[1,"mb-6"],[1,"check-slip-section-label","fw-bold","text-uppercase","text-gray-500","fs-8","d-block","mb-3"],[1,"d-flex","flex-wrap","gap-2"],["type","button","class","check-slip-method-pill btn btn-sm fw-bold fs-7",3,"ngClass","click",4,"ngFor","ngForOf"],["class","alert alert-danger d-flex align-items-center p-4 mb-5",4,"ngIf"],[1,"btn","btn-primary","fw-bold","w-100","check-slip-verify-btn","rounded-pill","fs-5",3,"click","disabled"],[1,"d-flex","align-items-center","justify-content-center","gap-3"],[1,"ki-duotone","ki-ver
1ify","fs-3","text-white"],[1,"path1"],[1,"path2"],[1,"col-12","col-xl-5","d-flex","align-items-center","justify-content-center"],["class","d-flex flex-column align-items-center justify-content-center gap-4 py-10",4,"ngIf"],["class","d-flex flex-column align-items-center justify-content-center gap-3 py-10 text-center",4,"ngIf"],["class","card shadow-sm overflow-hidden w-100","style","max-width: 360px",4,"ngIf"],["class","modal fade show d-block","tabindex","-1",3,"click",4,"ngIf"],["class","modal-backdrop fade show",4,"ngIf"],["class","check-slip-dropzone rounded-3 d-flex flex-column align-items-center justify-content-center gap-2 py-8 px-4 cursor-pointer",3,"ngClass","dragover","dragleave","drop","click",4,"ngIf"],[1,"check-slip-dropzone","rounded-3","d-flex","flex-column","align-items-center","justify-content-center","gap-2","py-8","px-4","cursor-pointer",3,"dragover","dragleave","drop","click","ngClass"],["type","file",1,"d-none",3,"change","accept"],[1,"ki-duotone","ki-file-up","fs-3x","text-primary"],[1,"text-center"],[1,"text-gray-700","fw-semibold","fs-6","d-block"],[1,"text-muted","fw-semibold","fs-7"],[1,"rounded-3","overflow-hidden","border","border-dashed","border-success","bg-light-success","p-2"],[1,"w-100","rounded-2",2,"max-height","200px","object-fit","contain","background","#fff",3,"src"],[1,"d-flex","align-items-center","justify-content-between","mt-2","px-1"],[1,"text-success","fw-semibold","fs-8"],[1,"ki-duotone","ki-check-circle","fs-5","text-success","me-1"],[1,"btn","btn-sm","btn-icon","btn-danger","flex-shrink-0",2,"width","26px","height","26px",3,"click"],["name","trash",1,"fs-7","text-white"],["type","url","placeholder","https://example.com/slip.jpg",1,"form-control","form-control-solid",3,"ngModelChange","ngModel"],[1,"d-flex","flex-column","gap-3"],[1,"d-flex","gap-2"],["type","text","placeholder","Bank Code",1,"form-control","form-control-solid","font-monospace",2,"max-width","160px",3,"ngModelChange","ngModel"],["type","button",1,"btn","btn-light-primary","btn-sm","fw-semibold","flex-shrink-0","d-flex","align-items-center","gap-2",3,"click"],["name","bank",1,"fs-5"],["class","d-flex align-items-center text-success fw-semibold fs-7 ms-1",4,"ngIf"],["type","text","placeholder","Transaction Reference Number",1,"form-control","form-control-solid",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","text-success","fw-semibold","fs-7","ms-1"],["rows","9",1,"form-control","form-control-solid","font-monospace","fs-7",2,"resize","vertical",3,"ngModelChange","ngModel"],[1,"check-slip-api-dropdown","position-relative"],[1,"check-slip-api-trigger","d-flex","align-items-center","justify-content-between","rounded-3","px-3","py-3","cursor-pointer",3,"click","ngClass"],["class","text-muted fw-semibold fs-6",4,"ngIf"],["class","d-flex align-items-center gap-3 min-w-0",4,"ngIf"],["name","down",1,"fs-5","text-gray-400","flex-shrink-0","check-slip-api-arrow",3,"ngClass"],["class","check-slip-api-menu position-absolute w-100 rounded-2 bg-light-primary",4,"ngIf"],[1,"text-muted","fw-semibold","fs-6"],[1,"d-flex","align-items-center","gap-3","min-w-0"],[1,"bullet","bullet-dot","h-8px","w-8px","flex-shrink-0",3,"ngClass"],[1,"d-flex","flex-column","min-w-0"],[1,"fw-bold","text-gray-800","fs-7","lh-sm"],[1,"text-muted","fw-semibold","fs-8","font-monospace","text-truncate"],[1,"check-slip-api-menu","position-absolute","w-100","rounded-2","bg-light-primary"],["class","px-4 py-4 text-muted fw-semibold fs-7 text-center",4,"ngIf"],["class","check-slip-api-item d-flex align-items-center gap-3 px-4 py-3 cursor-pointer",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"px-4","py-4","text-muted","fw-semibold","fs-7","text-center"],[1,"text-primary","fw-bold",3,"routerLink"],[1,"check-slip-api-item","d-flex","align-items-center","gap-3","px-4","py-3","cursor-pointer",3,"click","ngClass"],[1,"d-flex","flex-column","min-w-0","flex-grow-1"],["class","ki-duotone ki-check fs-4 text-primary flex-shrink-0",4,"ngIf"],[1,"ki-duotone","ki-check","fs-4","text-primary","flex-shrink-0"],["type","button",1,"check-slip-method-pill","btn","btn-sm","fw-bold","fs-7",3,"click","ngClass"],[1,"alert","alert-danger","d-flex","align-items-center","p-4","mb-5"],["name","information-5",1,"fs-3","text-danger","me-3","flex-shrink-0"],[1,"fw-semibold","fs-7"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-4","py-10"],[1,"spinner-border","text-primary",2,"width","3rem","height","3rem"],[1,"d-flex","flex-column","align-items-center","justify-content-center","gap-3","py-10","text-center"],[1,"ki-duotone","ki-ver
1ify","fs-5x","text-gray-300"],[1,"card","shadow-sm","overflow-hidden","w-100",2,"max-width","360px"],[1,"card-header","border-0","position-relative","overflow-hidden","py-5",3,"ngClass"],[1,"d-flex","align-items-center","gap-3","position-relative",2,"z-index","1"],[1,"w-40px","h-40px","bg-white","rounded-circle","d-flex","align-items-center","justify-content-center","flex-shrink-0","shadow-sm"],["class","ki-duotone ki-check-circle fs-2 text-success",4,"ngIf"],["class","ki-duotone ki-cross-circle fs-2 text-danger",4,"ngIf"],["class","ki-duotone ki-information fs-2 text-warning",4,"ngIf"],[1,"text-white","fw-bold","fs-5"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"position-absolute","rounded-circle","bg-white",2,"width","110px","height","110px","top","-28px","right","-28px","z-index","0","opacity","0.15"],[1,"card-body","py-6"],[1,"card-footer","d-flex","align-items-center","justify-content-between","py-3","px-6","gap-2"],["src","assets/media/logos/default.png","alt","Slipmate",2,"height","20px","width","auto"],[1,"btn","btn-sm","btn-warning","fw-semibold","rounded-pill",3,"click"],[1,"btn","btn-sm","btn-primary","fw-bold","rounded-pill",3,"click"],[1,"ki-duotone","ki-check-circle","fs-2","text-success"],[1,"ki-duotone","ki-cross-circle","fs-2","text-danger"],[1,"ki-duotone","ki-information","fs-2","text-warning"],[1,"path3"],[1,"text-center","mb-5"],[1,"fw-bolder","text-gray-900","fs-2x"],[1,"separator","mb-5"],[1,"d-flex","flex-column","gap-4"],[1,"d-flex","align-items-start","justify-content-between"],[1,"text-muted","fw-semibold","fs-7","flex-shrink-0",2,"min-width","90px"],[1,"text-gray-800","fw-semibold","fs-7","text-end"],[1,"text-end"],[1,"text-gray-800","fw-bold","fs-7","d-block"],[1,"text-primary","fw-semibold","fs-8"],[1,"text-center","py-3"],[1,"text-gray-700","fw-semibold","fs-6","d-block","mb-4"],["class","badge badge-light-warning fw-semibold px-4 py-2 font-monospace fs-8",4,"ngIf"],[1,"badge","badge-light-warning","fw-semibold","px-4","py-2","font-monospace","fs-8"],["class","badge badge-light-danger fw-semibold px-4 py-2",4,"ngIf"],[1,"badge","badge-light-danger","fw-semibold","px-4","py-2"],["class","badge badge-light-warning fw-semibold px-4 py-2",4,"ngIf"],[1,"badge","badge-light-warning","fw-semibold","px-4","py-2"],["tabindex","-1",1,"modal","fade","show","d-block",3,"click"],[1,"modal-dialog","modal
1-dialog-centered","modal-dialog-scrollable",2,"max-width","480px",3,"click"],[1,"modal-content"],[1,"modal-header"],[1,"ki-duotone","ki-bank","fs-3","text-primary"],[1,"modal-title","fw-bold"],["type","button",1,"btn-close",3,"click"],[1,"modal-body","p-0"],["class","check-slip-bank-item d-flex align-items-center gap-4 px-5 py-3 cursor-pointer",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"check-slip-bank-item","d-flex","align-items-center","gap-4","px-5","py-3","cursor-pointer",3,"click","ngClass"],[1,"symbol","symbol-30px","flex-shrink-0"],[1,"rounded-1",3,"src","alt"],[1,"d-flex","flex-column","flex-grow-1","min-w-0"],[1,"fw-semibold","text-gray-800","fs-7","text-truncate"],[1,"badge","badge-light-primary","fw-bold","font-monospace","flex-shrink-0"],["class","ki-duotone ki-check-circle fs-4 text-success flex-shrink-0",4,"ngIf"],[1,"ki-duotone","ki-check-circle","fs-4","text-success","flex-shrink-0"],[1,"modal-backdrop","fade","show"],[1,"modal-dialog","modal-dialog-centered","modal-dialog-scrollable","modal-lg",3,"click"],[1,"ki-duotone","ki-code","fs-3","text-info"],[1,"position-relative"],[1,"btn","btn-sm","btn-icon","btn-light-primary","position-absolute",2,"top","12px","right","12px","z-index","1",3,"click","title"],[1,"fs-5","text-gray-600",3,"name"],[1,"m-0","p-6","bg-light-primary","rounded-bottom","fs-7","font-monospace","text-gray-800",2,"overflow-x","auto","max-height","500px","padding-top","48px !important"]],template:function(s,i){1&s&&(e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),e.nrm(4,"span",5),e.j41(5,"h3",6),e.EFF(6,"\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e23\u0e30\u0e1a\u0e1a\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e2a\u0e25\u0e34\u0e1b"),e.k0s()()()(),e.j41(7,"div",7)(8,"div",8)(9,"div",9)(10,"ul",10)(11,"li",11)(12,"a",12),e.bIt("click",function(){return i.setTab("upload")}),e.EFF(13,"Upload Image"),e.k0s()(),e.j41(14,"li",11)(15,"a",12),e.bIt("click",function(){return i.setTab("json")}),e.EFF(16,"JSON Body"),e.k0s()()(),e.j41(17,"div",13),e.DNE(18,$e,4,3,"ng-container",14)(19,Ge,2,1,"ng-container",14),e.k0s(),e.j41(20,"div",13)(21,"label",15),e.EFF(22,"API KEY"),e.k0s(),e.DNE(23,Le,7,9,"ng-container",14),e.nI1(24,"async"),e.k0s(),e.j41(25,"div",13)(26,"div",16)(27,"input",17),e.mxI("ngModelChange",function(l){return e.DH7(i.allowDuplicate,l)||(i.allowDuplicate=l),l}),e.k0s(),e.j41(28,"label",18),e.EFF(29," Allow Duplicate "),e.j41(30,"span",19),e.EFF(31,"(\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15\u0e43\u0e2b\u0e49\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e25\u0e34\u0e1b\u0e0b\u0e49\u0e33\u0e44\u0e14\u0e49)"),e.k0s()()()(),e.j41(32,"div",20)(33,"label",21),e.EFF(34,"VERIFICATION METHOD"),e.k0s(),e.j41(35,"div",22),e.DNE(36,Ke,2,2,"button",23),e.k0s()(),e.DNE(37,Je,4,1,"div",24),e.j41(38,"button",25),e.bIt("click",function(){return i.verify()}),e.j41(39,"span",26),e.EFF(40," \u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e2a\u0e25\u0e34\u0e1b "),e.j41(41,"i",27),e.nrm(42,"span",28)(43,"span",29),e.k0s()()()(),e.j41(44,"div",30),e.DNE(45,He,4,0,"div",31)(46,ze,6,0,"div",32)(47,pt,26,17,"div",33),e.k0s()()()(),e.DNE(48,ht,13,1,"div",34)(49,mt,1,0,"div",35)(50,gt,19,5,"div",34)(51,ft,1,0,"div",35)),2&s&&(e.R7$(12),e.Y8G("ngClass",e.sMw(18,O,"upload"===i.activeTab,"upload"!==i.activeTab&&!i.isTabDisabled("upload"),i.isTabDisabled("upload"))),e.R7$(3),e.Y8G("ngClass",e.sMw(22,O,"json"===i.activeTab,"json"!==i.activeTab&&!i.isTabDisabled("json"),i.isTabDisabled("json"))),e.R7$(3),e.Y8G("ngIf","upload"===i.activeTab),e.R7$(),e.Y8G("ngIf","json"===i.activeTab),e.R7$(4),e.Y8G("ngIf",e.bMT(24,16,i.apiKeys$)),e.R7$(4),e.R50("ngModel",i.allowDuplicate),e.R7$(9),e.Y8G("ngForOf",i.verificationMethods),e.R7$(),e.Y8G("ngIf",i.error),e.R7$(),e.Y8G("disabled",!i.canVerify||i.isLoading),e.R7$(7),e.Y8G("ngIf",i.isLoading),e.R7$(),e.Y8G("ngIf",!i.isLoading&&!i.result),e.R7$(),e.Y8G("ngIf",!i.isLoading&&i.result),e.R7$(),e.Y8G("ngIf",i.bankModalOpen),e.R7$(),e.Y8G("ngIf",i.bankModalOpen),e.R7$(),e.Y8G("ngIf",i.jsonModalOpen),e.R7$(),e.Y8G("ngIf",i.jsonModalOpen))},dependencies:[c.YU,c.Sq,c.bT,c.ux,c.e1,k.Wk,g.me,g.Zm,g.BC,g.vS,C.w,c.Jj,c.TG,c.P9,c.QX,c.vh],styles:[".check-slip-section-label[_ngcontent-%COMP%]{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--bs-gray-500)}.check-slip-tab-disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;opacity:.4}.nav-line-tabs[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%]{color:var(--bs-primary)!important;border-bottom-color:var(--bs-primary)!important;border-bottom-width:2px!important}.check-slip-dropzone[_ngcontent-%COMP%]{border:2px dashed var(--bs-gray-300);background-color:var(--bs-gray-100);transition:border-color .2s ease,background-color .2s ease;min-height:170px}.check-slip-dropzone[_ngcontent-%COMP%]:hover, .check-slip-dropzone.dragging[_ngcontent-%COMP%]{border-color:var(--bs-primary);background-color:rgba(var(--bs-primary-rgb),.04)}.check-slip-method-pill[_ngcontent-%COMP%]{border-radius:20px;border:1.5px solid var(--bs-gray-300);color:var(--bs-gray-600);background-color:var(--bs-white);font-size:.8rem;padding:6px 16px;transition:all .15s ease}.check-slip-method-pill[_ngcontent-%COMP%]:hover{border-color:var(--bs-primary);color:var(--bs-primary);background-color:rgba(var(--bs-primary-rgb),.05)}.check-slip-method-pill.active[_ngcontent-%COMP%]{border-color:var(--bs-primary);color:var(--bs-primary);background-color:rgba(var(--bs-primary-rgb),.1);font-weight:700}.check-slip-api-trigger[_ngcontent-%COMP%]{border:1.5px solid var(--bs-gray-300);background-color:var(--bs-gray-100);transition:border-color .15s ease,box-shadow .15s ease;min-height:52px;-webkit-user-select:none;user-select:none}.check-slip-api-trigger[_ngcontent-%COMP%]:hover{border-color:var(--bs-primary)}.check-slip-api-trigger.open[_ngcontent-%COMP%]{border-color:var(--bs-primary);box-shadow:0 0 0 3px rgba(var(--bs-primary-rgb),.12);background-color:var(--bs-white)}.check-slip-api-arrow[_ngcontent-%COMP%]{transition:transform .2s ease}.check-slip-api-arrow.rotated[_ngcontent-%COMP%]{transform:rotate(180deg)}.check-slip-api-menu[_ngcontent-%COMP%]{top:calc(100% + 6px);left:0;z-index:100;border:1.5px solid var(--bs-gray-200);box-shadow:0 8px 24px #0000001a;max-height:240px;overflow-y:auto}.check-slip-api-item[_ngcontent-%COMP%]{transition:background-color .1s ease}.check-slip-api-item[_ngcontent-%COMP%]:hover{background-color:var(--bs-gray-100)}.check-slip-api-item.active[_ngcontent-%COMP%]{background-color:rgba(var(--bs-primary-rgb),.06)}.check-slip-api-item[_ngcontent-%COMP%]:first-child{border-radius:8px 8px 0 0}.check-slip-api-item[_ngcontent-%COMP%]:last-child{border-radius:0 0 8px 8px}.check-slip-verify-btn[_ngcontent-%COMP%]{padding:14px 24px;letter-spacing:.02em}.check-slip-bank-item[_ngcontent-%COMP%]{transition:background-color .1s ease;border-bottom:1px solid var(--bs-border-color)}.check-slip-bank-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.check-slip-bank-item[_ngcontent-%COMP%]:hover{background-color:var(--bs-tertiary-bg)}.check-slip-bank-item.active[_ngcontent-%COMP%]{background-color:rgba(var(--bs-primary-rgb),.08)}"]})}return n})(),Et=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275cmp=e.VBU({type:n,selectors:[["app-dashboard"]],decls:8,vars:0,consts:[[1,"row","g-5","gx-xl-10","mb-5","mb-xl-10"],[1,"col-xl-4","mb-5","mb-xl-10"],[1,"col-xl-8","mb-5","mb-xl-10"],[1,"row","gx-5","gx-xl-10","mb-5","mb-xl-10","h-690px"],[1,"col-xl-12","mb-5","mb-xl-10"]],template:function(s,i){1&s&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"app-credit-balance"),e.k0s(),e.j41(3,"div",2),e.nrm(4,"app-api-calls"),e.k0s()(),e.j41(5,"div",3)(6,"div",4),e.nrm(7,"app-check-slip"),e.k0s()())},dependencies:[pe,be,_t],styles:["[_nghost-%COMP%]{width:100%}.h-100[_ngcontent-%COMP%]{height:100%}"]})}return n})(),bt=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.$C({type:n});static \u0275inj=e.G2t({imports:[c.MD,k.iI.forChild([{path:"",component:Et,resolve:{dashboard:()=>{const t=(0,e.WQX)(b),s=new Date,i=new Date;return i.setDate(i.getDate()-6),(0,Q.p)([t.getCreditBalance(),t.getTransactionList(),t.getAPICallsStatistics(i.toISOString(),s.toISOString())])}}}]),g.YN,Z,w.G,q.J,z]})}return n})()}}]);
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.