PageSourceSearch

https://arches.avantlink.com/chunk-4VIMGQ7Q.js

js avantlink.com collected 2026-10-02 02:16:00 UTC 4,493 bytes, 2 lines download raw bytes

1import{m as s,p as O,ra as M,ta as N,za as w}from"./chunk-E46PARQF.js";import{$a as j,E as y,K as v,T as q,U as _,Z as m,b as $,ba as g,c as S,ea as b,hd as A,ja as U,ka as k,ma as u,s as h,t as c,v as d,x as R}from"./chunk-MNQHZSSI.js";var C=(()=>{class o{constructor(t){if(t)throw new Error("ReportApiModule is already loaded. Import it in the AppModule only")}static{this.\u0275fac=function(e){return new(e||o)(u(o,12))}}static{this.\u0275mod=j({type:o})}static{this.\u0275inj=k({})}}return o})();var V=(()=>{class o{constructor(t,e,r,i){this.http=t,this.apiService=e,this.dashboardApiService=r,this.requestTracker=i,this.path="/picker",this.availableColumns$=this.dashboardApiService.currentAccount$.pipe(q((p,a)=>p.entity_group_name===a.entity_group_name),g(()=>this.getAvailableColumns()),m(1),d(p=>JSON.parse(JSON.stringify(p))))}preparedColumns(t){return this.availableColumns$.pipe(d(e=>({dims:e.dims.filter(r=>r.display_groups.includes(t)),facts:e.facts.filter(r=>r.display_groups.includes(t))})),m({bufferSize:1,refCount:!0}))}getReport(t,e="USD",r=!0){return h([t,e]).pipe(b(()=>{r&&this.requestTracker.affiliateSnapshotRequestTracker$.next(this.requestTracker.affiliateSnapshotRequestTracker$.value+1)}),R(([i,p])=>{let a=`${s.apiUrl}${this.path}/report/custom/json?currency=${p}`;return this.http.post(a,i?{report_query:JSON.stringify(i)}:{}).pipe(this.getReportStatusPipe(2e3))}),_(()=>{r&&this.requestTracker.affiliateSnapshotRequestTracker$.next(this.requestTracker.affiliateSnapshotRequestTracker$.value-1)}))}getCustomReport(t,e){return this.http.post(e,{report_query:JSON.stringify(t)})}getAvailableColumns(){return this.http.get(s.apiUrl+this.path+"/columns/prepared")}getAvailableReports(){return this.http.get(s.apiUrl+this.path+"/report")}getReportStatus(t){return this.http.get(`${s.apiUrl}${this.path}/report/${t}/status`,!1)}getReportByUrl(t){return this.http.get(t,!0,new A)}getReportRequestById(t){return this.http.get(`${s.apiUrl}${this.path}/report/${t}/request`)}saveReportRequest(t,e,r,i,p=!0,a,n,l){if(e.length>500)return c(()=>({error:{error:"Report name cannot be longer than 500 characters."}}));let f={report_query:JSON.stringify(t),report_name:e,report_description:i,can_override:p,visible_to:a?a.join():null,available_to:n?n.join():null,anonymous:l,display_group:r};return this.http.post(`${s.apiUrl}/picker/report`,f)}updateReportRequest(t,e,r,i,p=!0,a,n){if(r.length>500)return c(()=>({error:{error:"Report name cannot be longer than 500 characters."}}));let l={report_query:JSON.stringify(e),report_name:r,report_description:i,can_override:p,visible_to:a?a.join():null,available_to:n?n.join():null};return this.http.put(`${s.apiUrl}/picker/report/${t}`,l)}deleteReportRequest(t){return this.http.delete(`${s.apiUrl}/picker/report/${t}`)}getSubscriptionFrequencies(){return this.http.get(`${s.apiUrl}/subscription/frequencies`)}getUserReportSubscriptions(t,e){return this.http.get(`${s.apiUrl}/subscription/${t}/reports/${e}`).pipe(v(r=>r.status===404?h([]):c(()=>r)))}createReportSubscription(t,e,r){return this.http.post(`${s.apiUrl}/subscription/${t}/reports/${e}`,r)}updateReportSubscription(t,e,r,i){return this.http.put(`${s.apiUrl}/subscription/${t}/reports/${e}/${r}`,i)}deleteReportSubscription(t,e,r){return this.http.delete(`${s.apiUrl}/subscription/${t}/reports/${e}/${r}`)}unsubscribeReport(t,e,r,i){let p="authorization";return this.apiService.removeHeader(p),this.apiService.appendHeader(p,i),this.http.delete(s.apiUrl+`/subscription/${t}/reports/${e}/${r}`).pipe(b(()=>{this.apiService.refreshHeaders()}))}getReportStatusPipe(t){return $(g(e=>{let r=Object.keys(e._request)[0];return e[r].request_id?new S(i=>{let p=y(t).subscribe(a=>{this.getReportStatus(e[r].request_id).subscribe(n=>{n.file&&(p.unsubscribe(),this.getReportByUrl(n.file).subscribe(l=>{let f={_request:e._request,[r]:l};i.next(f),i.complete()}))},n=>{i.error(n)})});return()=>{p.unsubscribe()}}):h(e)}))}dimensionSelectOptions(t){let e=this.groupedAvailableColumns(t.facts);return this.toNestedMenuItems(e)}groupedAvailableColumns(t){return t.reduce((e,r)=>(e[r.group]==null?e[r.group]=[r]:e[r.group].push(r),e),{})}toNestedMenuItems(t){return Object.keys(t).map(r=>({label:r,children:t[r].map(i=>({label:i.name,value:i.prepared_column_id}))}))}static{this.\u0275fac=function(e){return new(e||o)(u(M),u(O),u(w),u(N))}}static{this.\u0275prov=U({token:o,factory:o.\u0275fac,providedIn:C})}}return o}
1)();export{C as a,V as b};
2//# sourceMappingURL=chunk-4VIMGQ7Q.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.