PageSourceSearch

https://online.fintelligence.ai/static/vue/assets/UsageView-okQ_yrez.js

js fintelligence.ai collected 2026-10-05 11:59:51 UTC 27,203 bytes, 1 lines download raw bytes

1import{u as fs,A as ks,r as u,l as Cs,D as ws,c as o,a as s,e as xs,t as a,b as _,K as v,F as p,s as E,j as N,n as Ss,J as U,y as X,k as F,o as n,E as Ls}from"./index-C5jlLLbI.js";import{_ as Ps}from"./TimeIntervalPicker-BRdm02hj.js";const As={id:"content",class:"page-usage"},Ts={class:"page-container"},Es={class:"page-header"},Fs={class:"usage-summary"},$s={class:"summary-content"},qs={class:"summary-number"},Ds={class:"summary-content"},Rs={class:"summary-number"},Ns={class:"summary-content"},Us={class:"summary-number"},js={class:"summary-content"},Ms={class:"summary-number"},Ws={class:"summary-content"},Qs={class:"summary-number"},Vs={class:"usage-summary"},zs={class:"summary-content"},Bs={class:"summary-number"},Gs={class:"summary-content"},Os={class:"summary-number"},Ys={class:"summary-content"},Hs={class:"summary-number"},Is={class:"summary-content"},Js={class:"summary-number"},Zs={class:"summary-content"},Ks={class:"summary-number"},Xs={class:"summary-content"},st={class:"summary-number"},tt={key:0,class:"data-table-section"},et={class:"table-container"},at={class:"table customers-summary-table"},lt={class:"table__body"},ot={key:0},nt={class:"table__cell--number"},rt={class:"table__cell--number"},it={class:"table__cell--number"},ct={class:"table__cell--number"},dt={class:"table__cell--number"},ut={class:"table__cell--number"},_t={class:"table__cell--number"},mt={class:"table__cell--number"},bt={class:"table__cell--number"},gt={class:"table__cell--number"},pt={class:"table__cell--number"},yt={key:0,class:"table__row table__row--subtotal"},ht={class:"table__cell--number"},vt={class:"table__cell--number"},ft={class:"table__cell--number"},kt={class:"table__cell--number"},Ct={class:"table__cell--number"},wt={class:"table__cell--number"},xt={class:"table__cell--number"},St={class:"table__cell--number"},Lt={class:"table__cell--number"},Pt={class:"table__cell--number"},At={key:1,class:"table__row table__row--grand-total"},Tt={class:"table__cell--number"},Et={class:"table__cell--number"},Ft={class:"table__cell--number"},$t={class:"table__cell--number"},qt={class:"table__cell--number"},Dt={class:"table__cell--number"},Rt={class:"table__cell--number"},Nt={class:"table__cell--number"},Ut={class:"table__cell--number"},jt={class:"table__cell--number"},Mt={class:"charts-container"},Wt={class:"chart-header"},Qt={class:"chart-info"},Vt={class:"chart-container chart-container--large"},zt={class:"chart-container"},Bt={class:"chart-header"},Gt={class:"chart-info"},Ot={class:"chart-container"},Yt={class:"data-table-section"},Ht={class:"table-container"},It={class:"table"},Jt={class:"table__header"},Zt={key:0,class:"table__cell--number"},Kt={key:1,class:"table__cell--number"},Xt={class:"table__body"},se={class:"table__cell--number"},te={key:0,class:"table__cell--number"},ee={key:1,class:"table__cell--number"},ae={class:"table__cell--number"},le={class:"table__cell--number"},oe={class:"table__cell--number"},ne={class:"table__cell--number"},re={class:"table__cell--number"},ie={class:"table-header"},ce={class:"table-header-info"},de={key:0,class:"badge"},ue={class:"table-container"},_e={class:"table"},me={class:"table__body"},be={key:0},ge={key:1},pe={class:"table__cell--date"},ye={class:"table__cell--nowrap"},he={key:0,class:"billing-badge billing-badge--fixed"},ve={key:1,class:"billing-badge billing-badge--payg"},fe={class:"table__cell--truncate"},ke={class:"table__cell--number"},Ce={class:"table__cell--nowrap"},we={key:0,class:"badge badge--warning"},xe={key:1,class:"badge badge--info"},Se={class:"table__cell--nowrap"},Le={key:0,class:"fas fa-check-circle",style:{color:"var(--color-success, #28a745)"}},Pe={key:1,class:"fas fa-times-circle",style:{color:"var(--color-danger, #dc3545)"}},Ae={class:"table__cell--truncate"},Te={class:"table-header"},Ee={class:"table-header-info"},Fe={key:0,class:"badge"},$e={class:"table-container"},qe={class:"table"},De={class:"table__header"},Re={key:0},Ne={class:"table__body"},Ue={key:0},je=["colspan"],Me={key:1},We=["colspan"],Qe={class:"table__cell--date"},Ve={key:0},ze={class:"table-header"},Be={class:"table-header-info"},Ge={key:0,class:"badge"},Oe={class:"table-container"},Ye={class:"table"},He={class:"table__header"},Ie={key:0},Je={class:"table__body"},Ze={key:0},Ke=["colspan"],Xe={key:1},sa=["colspan"],ta={class:"table__cell--date"},ea={key:0},na={__name:"UsageView",setup(aa){const b=fs(),$=ks(),f=X(()=>{var l;return((l=b.userData)==null?void 0:l.enable_pep)!==!1}),k=X(()=>{var l;return((l=b.userData)==null?void 0:l.enable_sanctions)!==!1}),P=new Date,w=u(`${P.getFullYear()}
1-${String(P.getMonth()+1).padStart(2,"0")}-01`),x=u(`${P.getFullYear()}-${String(P.getMonth()+1).padStart(2,"0")}-${String(P.getDate()).padStart(2,"0")}`),q=u(!1),j=u(!1),M=u(!1),W=u(!1),Q=u(!1),is=u(null),d=U({dates:[],queries:[],new_links:[],existing_links:[],total_links:[],links_cost:[],sanctions_cost:[],peps_cost:[],total_cost:[],sanctions:[],peps:[],graph:[]}),i=U({queries:"-",newLinks:"-",totalLinks:"-",cost:"-",sanctions:"-",peps:"-",graph:"-",lookups:"-",linksCost:"-",sanctionsCost:"-",pepsCost:"-"}),h=U({billingType:"pay_as_you_go",rate:0,fixedPlanAmount:null,fixedPlanLimit:null,minPayment:null}),c=U({customers:[],paying_totals:null,grand_totals:null}),cs=X(()=>[...c.customers||[]].sort((l,t)=>l.is_paying!==t.is_paying?t.is_paying-l.is_paying:l.name.localeCompare(t.name))),V=u([]),A=u(null),z=u([]),B=u(0),ss=u(null),G=u([]),O=u(0),ts=u(null),es=u(null),as=u(null),ls=u(null),T=u(null),Y=u(null),os=u(null),H=u(null),y={};let I=!1;function S(l){return l==="-"||l===null||l===void 0?"-":Number.isInteger(l)?l.toString():Number(l).toFixed(2)}function J(l){const t=new Date(l),e=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),m=t.getFullYear();return`${e}/${r}/${m}`}function ds(l){if(l.includes(" - ")){const t=l.split(" - ");return J(t[0])+" - "+J(t[1])}return J(l)}function Z(l){const t=l.includes(" - ")?l.split(" - ")[0]:l,e=new Date(t),r=String(e.getDate()).padStart(2,"0"),m=String(e.getMonth()+1).padStart(2,"0");return`${r}/${m}`}async function us(){if(!I){if(window.Chart){I=!0;return}return new Promise((l,t)=>{const e=document.createElement("script");e.src="https://cdn.jsdelivr.net/npm/chart.js",e.onload=()=>{I=!0,l()},e.onerror=t,document.head.appendChild(e)})}}function _s(l){const t=es.value;if(!t||!window.Chart)return;y.cost&&y.cost.destroy();const e=(l.dates||[]).length,r=Array(e).fill(0),m=l.links_cost||r,L=l.sanctions_cost||r,D=l.peps_cost||r,K=l.total_cost||m.map((C,rs)=>(C||0)+(L[rs]||0)+(D[rs]||0)),R=[{label:"Links Cost",data:m,borderColor:"#4facfe",backgroundColor:"rgba(79, 172, 254, 0.1
1)",borderWidth:2,fill:!1,tension:.4}];k.value&&R.push({label:"Sanctions Cost",data:L,borderColor:"#f5576c",backgroundColor:"rgba(245, 87, 108, 0.1)",borderWidth:2,fill:!1,tension:.4}),f.value&&R.push({label:"PEPs Cost",data:D,borderColor:"#ffa726",backgroundColor:"rgba(255, 167, 38, 0.1)",borderWidth:2,fill:!1,tension:.4}),R.push({label:"Total Cost",data:K,borderColor:"#667eea",backgroundColor:"rgba(102, 126, 234, 0.15)",borderWidth:3,fill:!0,tension:.4}),y.cost=new window.Chart(t,{type:"line",data:{labels:l.dates.map(C=>Z(C)),datasets:R},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"top"},tooltip:{mode:"index",intersect:!1,callbacks:{label:C=>C.dataset.label+": €"+C.parsed.y.toFixed(2)}}},scales:{x:{type:"category",grid:{display:!1},ticks:{maxTicksLimit:15,maxRotation:45,autoSkip:!0}},y:{beginAtZero:!0,grid:{color:"rgba(0,0,0,0.1)"},ticks:{callback:C=>"€"+C.toFixed(2)}}},interaction:{mode:"nearest",axis:"x",intersect:!1}}})}function ms(l){const t=as.value;!t||!window.Chart||(y.links&&y.links.destroy(),y.links=new window.Chart(t,{type:"line",data:{labels:l.dates.map(e=>Z(e)),datasets:[{label:"New Links",data:l.new_links,borderColor:"#f5576c",backgroundColor:"rgba(245, 87, 108, 0.1)",borderWidth:3,fill:!1,tension:.4},{label:"Existing Links",data:l.existing_links,borderColor:"#4facfe",backgroundColor:"rgba(79, 172, 254, 0.1
1)",borderWidth:3,fill:!1,tension:.4},{label:"Total Links",data:l.total_links,borderColor:"#667eea",backgroundColor:"rgba(102, 126, 234, 0.1)",borderWidth:3,fill:!1,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"top"},tooltip:{mode:"index",intersect:!1,callbacks:{label:e=>e.dataset.label+": "+Math.round(e.parsed.y)}}},scales:{x:{type:"category",grid:{display:!1},ticks:{maxTicksLimit:15,maxRotation:45,autoSkip:!0}},y:{beginAtZero:!0,grid:{color:"rgba(0,0,0,0.1)"},ticks:{precision:0}}},interaction:{mode:"nearest",axis:"x",intersect:!1}}}))}function bs(l){const t=ls.value;if(!t||!window.Chart)return;y.queries&&y.queries.destroy();const e=[{label:"Queries",data:l.queries,borderColor:"#667eea",backgroundColor:"rgba(102, 126, 234, 0.1)",borderWidth:3,fill:!1,tension:.4}];k.value&&e.push({label:"Sanctions",data:l.sanctions||[],borderColor:"#f5576c",backgroundColor:"rgba(245, 87, 108, 0.1)",borderWidth:3,fill:!1,tension:.4}),f.value&&e.push({label:"PEPs",data:l.peps||[],borderColor:"#ffa726",backgroundColor:"rgba(255, 167, 38, 0.1)",borderWidth:3,fill:!1,tension:.4});const r=e.length>1;y.queries=new window.Chart(t,{type:"line",data:{labels:l.dates.map(m=>Z(m)),datasets:e},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:r,position:"top"},tooltip:{mode:"index",intersect:!1,callbacks:{label:m=>m.dataset.label+": "+Math.round(m.parsed.y)}}},scales:{x:{type:"category",grid:{display:!1},ticks:{maxTicksLimit:15,maxRotation:45,autoSkip:!0}},y:{beginAtZero:!0,grid:{color:"rgba(0,0,0,0.1)"},ticks:{precision:0}}},interaction:{mode:"nearest",axis:"x",intersect:!1}}})}async function gs(){q.value=!0;try{const l=new URLSearchParams({date_from:w.value,date_to:x.value}),t=await F.get(`/usage-analytics-data/?${l}`);if(!t.ok)throw new Error(`HTTP error ${t.status}`);const e=await t.json();if(e.error)throw new Error(e.error);is.value=e;const r=e.chart_data;if(d.dates=r.dates||[],d.queries=r.queries||[],d.new_links=r.new_links||[],d.existing_links=r.existing_links||[],d.total_links=r.total_links||[],d.links_cost=r.links_cost||[],d.sanctions_cost=r.sanctions_cost||[],d.peps_cost=r.peps_cost||[],d.total_cost=r.total_cost||[],d.sanctions=r.sanctions||[],d.peps=r.peps||[],d.graph=r.graph||[],await us(),_s(r),ms(r),bs(r),!b.isAdmin&&e.totals){i.queries=e.totals.queries,i.newLinks=e.totals.new_links,i.totalLinks=e.totals.total_links||0,i.sanctions=e.totals.sanctions||0,i.peps=e.totals.peps||0,i.graph=e.totals.graph||0;const m=e.totals.total_cost||0,L=e.totals.sanctions_cost||0,D=e.totals.peps_cost||0;i.linksCost="€"+m.toFixed(2),i.sanctionsCost="€"+L.toFixed(2),i.pepsCost="€"+D.toFixed(2);const K=e.totals.effective_cost!==void 0?e.totals.effective_cost:e.totals.total_cost;i.cost="€"+K.toFixed(2)}e.billing_info&&Object.assign(h,e.billing_info)}catch(l){$.error("Error loading usage data: "+l.message)}finally{q.value=!1}}async function ps(){if(b.isAdmin){j.value=!0;try{const l=new URLSearchParams({date_from:w.value,date_to:x.value}),t=await F.get(`/usage-all-customers/?${l}`);if(!t.ok)throw new Error(`HTTP error ${t.status}`);const e=await t.json();if(e.error)throw new Error(e.error);if(c.customers=e.customers||[],c.paying_totals=e.paying_totals||null,c.grand_totals=e.grand_totals||null,e.grand_totals){i.queries=e.grand_totals.queries,i.newLinks=e.grand_totals.new_links,i.totalLinks=e.grand_totals.total_links||0,i.sanctions=e.grand_totals.sanctions||0,i.peps=e.grand_totals.peps||0,i.graph=e.grand_totals.graph||0;const r=e.grand_totals.cost||0,m=e.grand_totals.sanctions_cost||0,L=e.grand_totals.peps_cost||0;i.linksCost="€"+r.toFixed(2),i.sanctionsCost="€"+m.toFixed(2),i.pepsCost="€"+L.toFixed(2),i.cost="€"+(e.grand_totals.total_cost??e.grand_totals.cost).toFixed(2)}}catch(l){$.error("Error loading customers data: "+l.message)}finally{j.value=!1}}}async function ys(){M.value=!0;try{const l=new URLSearchParams({date_from:w.value,date_to:x.value}),t=await F.get(`/usage-public-searches/?${l}`);if(!t.ok)throw new Error(`HTTP error ${t.status}`);const e=await t.json();if(e.error)throw new Error(e.error);V.value=e.searches||[],A.value=e.totals||null}catch(l){console.error("Error loading public searches:",l)}finally{M.value=!1}}function ns(){gs(),ys(),hs(),vs(),b.isAdmin&&ps()}function g(l){l==null||l.scrollIntoView({behavior:"smooth",block:"start"})}async function hs(){W.value=!0;try{const l=new URLSearchParams({date_from:w.value,date_to:x.value}),t=await F.get(`/usage-graph-searches/?${l}`);if(!t.ok)throw new Error(`HTTP error ${t.status}`);const e=await t.json();if(e.error)throw new Error(e.error);z.value=e.searches||[],B.value=e.total||0}catch(l){$.error("Error loading graph searches: "+l.message)}finally{W.value=!1}}async function vs(){Q.value=!0;try{const l=new URLSearchParams({date_from:w.value,date_to:x.value}),t=await F.get(`/usage-registry-lookups/?${l}`);if(!t.ok)throw new Error(`HTTP error ${t.status}`);const e=await t.json();if(e.error)throw new Error(e.error);G.value=e.searches||[],O.value=e.total||0,i.lookups=e.total||0}catch(l){$.error("Error loading registry lookups: "+l.message)}finally{Q.value=!1}}return Cs(()=>{ns()}),ws(()=>
1{Object.values(y).forEach(l=>l&&l.destroy())}),(l,t)=>(n(),o(p,null,[s("section",As,[s("div",Ts,[s("div",Es,[t[13]||(t[13]=s("div",{class:"page-header-content"},[s("h1",{class:"page-title"},"Usage")],-1)),xs(Ps,{"date-from":w.value,"onUpdate:dateFrom":t[0]||(t[0]=e=>w.value=e),"date-to":x.value,"onUpdate:dateTo":t[1]||(t[1]=e=>x.value=e),loading:q.value,id:"usage",compact:"",onFilter:ns},null,8,["date-from","date-to","loading"])]),s("div",Fs,[s("div",{class:"summary-card summary-card--clickable",onClick:t[2]||(t[2]=e=>g(os.value))},[t[15]||(t[15]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-search"})],-1)),s("div",$s,[s("div",qs,a(S(i.queries)),1),t[14]||(t[14]=s("div",{class:"summary-label"},"Queries",-1))])]),k.value?(n(),o("div",{key:0,class:"summary-card summary-card--clickable",onClick:t[3]||(t[3]=e=>g(H.value))},[t[17]||(t[17]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-ban"})],-1)),s("div",Ds,[s("div",Rs,a(S(i.sanctions)),1),t[16]||(t[16]=s("div",{class:"summary-label"},"Sanctions Searches",-1))])])):_("",!0),f.value?(n(),o("div",{key:1,class:"summary-card summary-card--clickable",onClick:t[4]||(t[4]=e=>g(H.value))},[t[19]||(t[19]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-user-tie"})],-1)),s("div",Ns,[s("div",Us,a(S(i.peps)),1),t[18]||(t[18]=s("div",{class:"summary-label"},"PEP Searches",-1))])])):_("",!0),s("div",{class:"summary-card summary-card--clickable",onClick:t[5]||(t[5]=e=>g(ss.value))},[t[21]||(t[21]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-project-diagram"})],-1)),s("div",js,[s("div",Ms,a(S(i.graph)),1),t[20]||(t[20]=s("div",{class:"summary-label"},"Graph Searches",-1))])]),s("div",{class:"summary-card summary-card--clickable",onClick:t[6]||(t[6]=e=>g(ts.value))},[t[23]||(t[23]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-building"})],-1)),s("div",Ws,[s("div",Qs,a(S(i.lookups)),1),t[22]||(t[22]=s("div",{class:"summary-label"},"Registry Lookups",-1))])])]),s("div",Vs,[s("div",{class:"summary-card summary-card--clickable",onClick:t[7]||(t[7]=e=>g(Y.value))},[t[25]||(t[25]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-link"})],-1)),s("div",zs,[s("div",Bs,a(S(i.newLinks)),1),t[24]||(t[24]=s("div",{class:"summary-label"},"New Links Processed",-1))])]),s("div",{class:"summary-card summary-card--clickable",onClick:t[8]||(t[8]=e=>g(Y.value))},[t[27]||(t[27]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-layer-group"})],-1)),s("div",Gs,[s("div",Os,a(S(i.totalLinks)),1),t[26]||(t[26]=s("div",{class:"summary-label"},"Total Links Searched",-1))])]),s("div",{class:"summary-card summary-card--clickable",onClick:t[9]||(t[9]=e=>g(T.value))},[t[29]||(t[29]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-link"})],-1)),s("div",Ys,[s("div",Hs,a(i.linksCost),1),t[28]||(t[28]=s("div",{class:"summary-label"},"Links Cost",-1))])]),k.value?(n(),o("div",{key:0,class:"summary-card summary-card--clickable",onClick:t[10]||(t[10]=e=>g(T.value))},[t[31]||(t[31]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-ban"})],-1)),s("div",Is,[s("div",Js,a(i.sanctionsCost),1),t[30]||(t[30]=s("div",{class:"summary-label"},"Sanctions Cost",-1))])])):_("",!0),f.value?(n(),o("div",{key:1,class:"summary-card summary-card--clickable",onClick:t[11]||(t[11]=e=>g(T.value))},[t[33]||(t[33]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-user-tie"})],-1)),s("div",Zs,[s("div",Ks,a(i.pepsCost),1),t[32]||(t[32]=s("div",{class:"summary-label"},"PEPs Cost",-1))])])):_("",!0),s("div",{class:"summary-card summary-card--clickable",onClick:t[12]||(t[12]=e=>g(T.value))},[t[35]||(t[35]=s("div",{class:"summary-icon"},[s("i",{class:"fas fa-dollar-sign"})],-1)),s("div",Xs,[s("div",st,a(i.cost),1),t[34]||(t[34]=s("div",{class:"summary-label"},"Total Cost",-1))])])]),v(b).isAdmin?(n(),o("div",tt,[t[40]||(t[40]=s("div",{class:"table-header"},[s("h2",null,"All Customers Summary")],-1)),s("div",et,[s("table",at,[t[39]||(t[39]=s("thead",{class:"table__header"},[s("tr",null,[s("th",{class:"table__cell--number"},"#"),s("th",null,"Customer"),s("th",null,"Billing"),s("th",{class:"table__cell--number"},"Queries"),s("th",{class:"table__cell--number"},"Sanctions"),s("th",{class:"table__cell--number"},"PEPs"),s("th",{class:"table__cell--number"},"New Links"),s("th",{class:"table__cell--number"},"Existing Links"),s("th",{class:"table__cell--number"},"Total Links"),s("th",{class:"table__cell--number"},"Links Cost"),s("th",{class:"table__cell--number"},"Sanctions Cost"),s("th",{class:"table__cell--number"},"PEPs Cost"),s("th",{class:"table__cell--number"},"Total Cost")])],-1)),s("tbody",lt,[j.value?(n(),o("tr",ot,[...t[36]||(t[36]=[s("td",{colspan:"13",style:{"text-align":"center",padding:"2rem",color:"var(--color-text-secondary)"}},"Loading...",-1)])])):(n(),o(p,{key:1},[(n(!0),o(p,null,E(cs.value,(e,r)=>(n(),o("tr",{key:e.name,class:"table__row"},[s("td",nt,a(r+1),1),s("td",null,a(e.name),1),s("td",{style:Ls(e.is_paying?"color: var(--color-success, #22c55e); font-weight: 600":"color: var(--color-text-secondary)")},a(e.billing_type==="fixed"?"Fixed":"PAYG"),5),s("td",rt,a(e.queries),1),s("td",it,a(e.sanctions),1),s("td",ct,a(e.peps),1),s("td",dt,a(e.new_links),1),s("td",ut,a(e.existing_links),1),s("td",_t,a(e.total_links),1),s("td",mt,"€"+a(e.cost.toFixed(2)),1),s("td",bt,"€"+a(e.sanctions_cost.toFixed(2)),1),s("td",gt,"€"+a(e.peps_cost.toFixed(2)),1),s("td",pt,[s("strong",null,"€"+a(e.total_cost.toFixed(2)),1)])]))),128)),c.paying_totals?(n(),o("tr",yt,[t[37]||(t[37]=s("td",{colspan:"3"},[s("strong",null,"Paying Customers Total")],-1)),s("td",ht,[s("strong",null,a(c.paying_totals.queries),1)]),s("td",vt,[s("strong",null,a(c.paying_totals.sanctions),1)]),s("td",ft,[s("strong",null,a(c.paying_totals.peps),1)]),s("td",kt,[s("strong",null,a(c.paying_totals.new_links),1)]),s("td",Ct,[s("strong",null,a(c.paying_totals.existing_links),1)]),s("td",wt,[s("strong",null,a(c.paying_totals.total_links),1)]),s("td",xt,[s("strong",null,"€"+a(c.paying_totals.cost.toFixed(2)),1)]),s("td",St,[s("strong",null,"€"+a(c.paying_totals.sanctions_cost.toFixed(2)),1)]),s("td",Lt,[s("strong",null,"€"+a(c.paying_totals.peps_cost.toFixed(2)),1)]),s("td",Pt,[s("strong",null,"€"+a(c.paying_totals.total_cost.toFixed(2)),1)])])):_("",!0),c.grand_totals?(n(),o("tr",At,[t[38]||(t[38]=s("td",{colspan:"3"},[s("strong",null,"All Customers Total")],-1)),s("td",Tt,[s("strong",null,a(c.grand_totals.queries),1)]),s("td",Et,[s("strong",null,a(c.grand_totals.sanctions),1)]),s("td",Ft,[s("strong",null,a(c.grand_totals.peps),1)]),s("td",$t,[
1s("strong",null,a(c.grand_totals.new_links),1)]),s("td",qt,[s("strong",null,a(c.grand_totals.existing_links),1)]),s("td",Dt,[s("strong",null,a(c.grand_totals.total_links),1)]),s("td",Rt,[s("strong",null,"€"+a(c.grand_totals.cost.toFixed(2)),1)]),s("td",Nt,[s("strong",null,"€"+a(c.grand_totals.sanctions_cost.toFixed(2)),1)]),s("td",Ut,[s("strong",null,"€"+a(c.grand_totals.peps_cost.toFixed(2)),1)]),s("td",jt,[s("strong",null,"€"+a(c.grand_totals.total_cost.toFixed(2)),1)])])):_("",!0)],64))])])])])):_("",!0),s("div",Mt,[s("div",{class:"chart-section chart-section--full",ref_key:"costChartSection",ref:T},[s("div",Wt,[t[43]||(t[43]=s("h2",null,"Cost Analysis",-1)),s("div",Qt,[h.billingType==="fixed"?(n(),o(p,{key:0},[t[41]||(t[41]=s("span",{class:"billing-badge billing-badge--fixed"},"Fixed Plan",-1)),s("span",null,[N("Monthly fee: €"+a(h.fixedPlanAmount||"0.00")+" ",1),h.fixedPlanLimit?(n(),o(p,{key:0},[N(" ("+a(h.fixedPlanLimit)+" queries/month)",1)],64)):_("",!0)])],64)):h.rate?(n(),o(p,{key:1},[t[42]||(t[42]=s("span",{class:"billing-badge billing-badge--payg"},"Pay as You Go",-1)),s("span",null,[N("€"+a(h.rate)+" per link processed ",1),h.minPayment?(n(),o(p,{key:0},[N(" (min. €"+a(h.minPayment)+"/month)",1)],64)):_("",!0)])],64)):_("",!0)])]),s("div",Vt,[s("canvas",{ref_key:"costChartCanvas",ref:es,width:"800",height:"300"},null,512)])],512),s("div",{class:"chart-section chart-section--full",ref_key:"linksChartSection",ref:Y},[t[44]||(t[44]=s("div",{class:"chart-header"},[s("h2",null,"Links Processed Over Time"),s("div",{class:"chart-info"},[s("span",null,"Links analyzed and processed daily")])],-1)),s("div",zt,[s("canvas",{ref_key:"linksChartCanvas",ref:as,width:"800",height:"200"},null,512)])],512),s("div",{class:"chart-section chart-section--full",ref_key:"queriesChartSection",ref:os},[s("div",Bt,[t[45]||(t[45]=s("h2",null,"Queries Over Time",-1)),s("div",Gt,[s("span",null,a(k.value||f.value?"Queries, sanctions and PEP searches over time":"User queries submitted daily"),1)])]),s("div",Ot,[s("canvas",{ref_key:"queriesChartCanvas",ref:ls,width:"800",height:"200"},null,512)])],512)]),s("div",Yt,[t[53]||(t[53]=s("div",{class:"table-header"},[s("h2",null,"Daily Breakdown")],-1)),s("div",Ht,[s("table",It,[s("thead",Jt,[s("tr",null,[t[46]||(t[46]=s("th",null,"Date",-1)),t[47]||(t[47]=s("th",{class:"table__cell--number"},"Queries",-1)),k.value?(n(),o("th",Zt,"Sanctions")):_("",!0),f.value?(n(),o("th",Kt,"PEPs")):_("",!0),t[48]||(t[48]=s("th",{class:"table__cell--number"},"Graph",-1)),t[49]||(t[49]=s("th",{class:"table__cell--number"},"New Links",-1)),t[50]||(t[50]=s("th",{class:"table__cell--number"},"Existing Links",-1)),t[51]||(t[51]=s("th",{class:"table__cell--number"},"Total Links",-1)),t[52]||(t[52]=s("th",{class:"table__cell--number"},"Total Cost",-1))])]),s("tbody",Xt,[(n(!0),o(p,null,E(d.dates,(e,r)=>(n(),o("tr",{key:e,class:"table__row"},[s("td",null,a(ds(e)),1),s("td",se,a(d.queries[r]||0),1),k.value?(n(),o("td",te,a(d.sanctions[r]||0),1)):_("",!0),f.value?(n(),o("td",ee,a(d.peps[r]||0),1)):_("",!0),s("td",ae,a(d.graph[r]||0),1),s("td",le,a(d.new_links[r]||0),1),s("td",oe,a(d.existing_links[r]||0),1),s("td",ne,a(d.total_links[r]||0),1),s("td",re,"€"+a((d.total_cost[r]!=null?d.total_cost[r]:(d.links_cost[r]||0)+(d.sanctions_cost[r]||0)+(d.peps_cost[r]||0)).toFixed(2)),1)]))),128))])])])]),k.value||f.value?(n(),o("div",{key:1,class:"data-table-section",ref_key:"sanctionsSection",ref:H},[s("div",ie,[t[54]||(t[54]=s("h2",null,"Sanctions & PEPs Searches",-1)),s("div",ce,[A.value?(n(),o("span",de,a(A.value.sanctions)+" sanctions, "+a(A.value.peps)+" PEPs ("+a(A.value.total)+" total) ",1)):_("",!0)])]),s("div",ue,[s("table",_e,[t[57]||(t[57]=s("thead",{class:"table__header"},[s("tr",null,[s("th",{class:"table__cell--date"},"Date"),s("th",{class:"table__cell--nowrap"},"Type"),s("th",{class:"table__cell--truncate"},"Search Term"),s("th",{class:"table__cell--number"},"Results"),s("th",{class:"table__cell--nowrap"},"Source"),s("th",{class:"table__cell--nowrap"},"Status"),s("th",{class:"table__cell--truncate"},"User")])],-1)),s("tbody",me,[M.value?(n(),o("tr",be,[...t[55]||(t[55]=[s("td",{colspan:"7",style:{"text-align":"center",padding:"2rem",color:"var(--color-text-secondary)"}},"Loading...",-1)])])):V.value.length===0?(n(),o("tr",ge,[...t[56]||(t[56]=[s("td",{colspan:"7",style:{"text-align":"center",padding:"2rem",color:"var(--color-text-secondary)"}},"No searches in this period",-1)])])):(n(!0),o(p,{key:2},E(V.value,e=>(n(),o("tr",{key:e.id||e.created_at+e.search_term,class:"table__row"},[s("td",pe,a(e.created_at),1),s("td",ye,[e.type==="Sanctions"?(n(),o("span",he,"Sanctions")):(n(),o("span",ve,"PEPs"))]),s("td",fe,a(e.search_term),1),s("td",ke,a(e.results_count),1),s("td",Ce,[e.is_public?(n(),o("span",we,"Public")):(n(),o("span",xe,"Internal"))]),s("td",Se,[e.successful?(n(),o("i",Le)):(n(),o("i",Pe))]),s("td",Ae,a(e.user),1)]))),128))])])])],512)):_("",!0),s("div",{class:"data-table-section",ref_key:"graphSearchesSection",ref:ss},[s("div",Te,[t[58]||(t[58]=s("h2",null,"Graph Searches",-1)),s("div",Ee,[B.value>0?(n(),o("span",Fe,a(B.value)+" total",1)):_("",!0)])]),s("div",$e,[s("table",qe,[s("thead",De,[s("tr",null,[t[59]||(t[59]=s("th",null,"Date",-1)),t[60]||(t[60]=s("th",null,"Search Query",-1)),t[61]||(t[61]=s("th",null,"User",-1)),v(b).isAdmin?(n(),o("th",Re,"Organization")):_("",!0)])]),s("tbody",Ne,[W.value?(n(),o("tr",Ue,[s("td",{colspan:v(b).isAdmin?4:3,style:{"text-align":"center",padding:"2rem",color:"var(--color-text-secondary)"}},"Loading...",8,je)])):z.value.length===0?(n(),o("tr",Me,[s("td",{colspan:v(b).isAdmin?4:3,style:{"text-align":"center",padding:"2rem",color:"var(--color-text-secondary)"}},"No graph searches in this period",8,We)])):(n(!0),o(p,{key:2},E(z.value,(e,r)=>(n(),o("tr",{key:r,class:"table__row"},[s("td",Qe,a(e.date),1),s("td",null,a(e.search_query),1),s("td",null,a(e.user),1),v(b).isAdmin?(n(),o("td",Ve,a(e.org),1)):_("",!0)]))),128))])])])],512),s("div",{class:"data-table-section",ref_key:"registryLookupsSection",ref:ts},[s("div",ze,[t[62]||(t[62]=s("h2",null,"Registry Lookups",-1)),s("div",Be,[O.value>0?(n(),o("span",Ge,a(O.value)+" total",1)):_("",!0)])]),s("div",Oe,[s("table",Ye,[s("thead",He,[s("tr",null,[t[63]||(t[63]=s("th",null,"Date",-1)),t[64]||(t[64]=s("th",null,"Search Value",-1)),t[65]||(t[65]=s("th",null,"Matched Entity",-1)),t[66]||(t[66]=s("th",null,"Results",-1)),t[67]||(t[67]=s("th",null,"User",-1)),v(b).isAdmin?(n(),o("th",Ie,"Organization")):_("",!0)])]),s("tbody",Je,[Q.value?(n(),o("tr",Ze,[s("td",{colspan:v(b).isAdmin?6:5,style:{"text-align":"center",padding:"2rem",color:"var(--color-text-secondary)"}},"Loading...",8,Ke)])):G.value.length===0?(n(),o("tr",Xe,[s("td",{colspan:v(b).isAdmin?6:5,style:{"text-align":"center",padding:"2rem",color:"var(--color-text-secondary)"}},"No registry lookups in this period",8,sa)])):(n(!0),o(p,{key:2},E(G.value,(e,r)=>(n(),o("tr",{key:r,class:"table__row"},[s("td",ta,a(e.date),1),s("td",null,a(e.query),1),s("td",null,a(e.source_name),1),s("td",null,a(e.result_count),1),s("td",null,a(e.user),1),v(b).isAdmin?(n(),o("td",ea,a(e.org),1)):_("",!0)]))),128))])])])],512)])]),s("div",{class:Ss(["loading-overlay",{show:q.value}])},[...t[68]||(t[68]=[s("div",{class:"loading-spinner"},[s("i",{class:"fas fa-spinner fa-spin"}
1),s("span",null,"Loading usage data...")],-1)])],2)],64))}};export{na 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.