PageSourceSearch

https://pay.thinkbigcsp.com/_nuxt/BqzCFtni.js

js thinkbigcsp.com collected 2026-10-06 16:18:26 UTC 4,855 bytes, 1 lines download raw bytes

1import{_ as Y}from"./mTXbpj1R.js";import{_ as H}from"./BsCicS4D.js";import{McButton as q}from"./CD7tKUld.js";import{r as v}from"./CtrN6tzw.js";import{t as Q}from"./CkpPDa6p.js";import{McTitle as O}from"./Co03LFZ_.js";import{c2 as R,w as Z,b as tt,U as V,x as s,I as d,D as S,z as m,B as x,y as g,E as a,G as B,H as A,Y as y,J as f,K as D,bX as K,r as z,g as E,n as et}from"#entry";import{u as at}from"./gYmoHtlO.js";import"./WPpg4MLo.js";const rt={class:"tm-statistic-card"},pt={__name:"TmStatisticCard",props:{statistic:{type:Object,default:()=>{}},paramsToShow:{type:Number,default:6},additionalToShow:{type:Number,default:0},progressTitleKey:{type:String,default:"title"},progressValueKey:{type:String,default:"value"},cardTitle:{type:String,default:null},amountPrepend:{type:String,default:""},useAmount:{type:Boolean,default:!1},withOrders:{type:Boolean,default:!1},tracking:{type:Array,default:()=>[]}},emits:["loaded"],setup(_,{emit:M}){const j=R(),{hasSlot:C}=at(j),b=Z(),k=et(),{t:N}=tt(),G=M,e=_,T=z([]),$=z(!0),J=E(()=>u.value.data&&u.value.data.length),u=E(()=>{if(!e.statistic.data)return{data:[],additionalData:[],other:null,tracking:[]};let t=[...e.statistic.data.map((i,c)=>({...i,i:c}))];const o=e.paramsToShow===t.length?e.paramsToShow:e.paramsToShow-1,r=t.splice(0,o),h=w(r);let p=e.tracking.map(i=>{const c=t.find(l=>Number(l.id)===Number(i)),n=t.findIndex(l=>Number(l.id)===Number(i));return{...c,index:n}});p.sort((i,c)=>i.i-c.i);const P=p.map(i=>{const c=t.findIndex(X=>Number(X.id)===Number(i.id)),n=t.splice(0,c+1),l=w(n);return{visible:l?.length<=1,data:l}}),U=t.splice(0,e.additionalToShow),W=w(U);let F=null;if(t.length){const i=t.map(n=>b.getDeepKey(n,e.progressValueKey)).reduce((n,l)=>I(Number(n)+Number(l))),c=e.useAmount?t.map(n=>n.amount).reduce((n,l)=>Number(n)+Number(l)):0;F={[e.progressTitleKey]:N("elements.labels.other"),number:e.useAmount?e.amountPrepend+k.numToShort(c):k.numberFilters.number(i,"%"),value:i}}return{data:h,additionalData:W,other:F,tracking:P}}),I=(t,o=2)=>b.truncateToDecimals(t,o),w=t=>t.map(o=>({...o,[e.progressTitleKey]:L(o,o.i),number:e.useAmount?e.amountPrepend+k.numToShort(o.amount):k.numberFilters.number(I(Number(b.getDeepKey(o,e.progressValueKey))),"%")})),L=(t,o)=>e.withOrders?`${o+1}. ${b.getDeepKey(t,e.progressTitleKey)}`:b.getDeepKey(t,e.progressTitleKey);return V(()=>e.statistic,()=>{$.value=!0}),V(()=>u.value,t=>{t&&t.tracking?(!T.value.length||$.value)&&(T.value=t.tracking,$.value=!1):T.value=[],G("loaded",!t?.other)},{immediate:!0,deep:!0}),(t,o)=>(s(),d("section",rt,[S(Y,{class:"statistic"},{default:m(()=>[S(H,{class:"statistic__head"},{left:m(()=>[x(t.$slots,"title",{},()=>[e.cardTitle?(s(),g(a(O),{key:0,variation:"subtitle",weight:"semi-bold"},{default:m(()=>[B(A(e.cardTitle),1)]),_:1})):y("",!0)])]),right:m(()=>[x(t.$slots,"actions")]),_:3}),a(J)?(s(),d(f,{key:0},[(s(!0),d(f,null,D(a(u).data,(r,h)=>(s(),g(a(v),K({key:`statistic_category-item-${h}${r.id}`,amount:r.number,percent:r.value,"help-text":r[_.progressTitleKey]},{ref_for:!0},e.statistic.progressProps,{class:"statistic__item"}),null,16,["amount","percent","help-text"]))),128)),a(T).length?(s(!0),d(f,{key:0},D(a(T),(r,h)=>(s(),d(f,null,[r.data.length?(s(),d(f,{key:0},[r.visible?y("",!0):(s(),g(a(q),{key:0,size:"xxs",variation:"gray-outline",class:"statistic__tracking-button",onClick:p=>r.visible=!0},{"icon-prepend":m(()=>[S(a(Q),{name:"arrow_downward"})]),default:m(()=>[B(" "+A(a(N)("actions.market_share_load_mcns",{count:r.data.length-1})),1)]),_:2},1032,["onClick"])),(s(!0),d(f,null,D(r.visible?r.data:[r.data[r.data.length-1]],(p,P)=>(s(),d("section",{key:`statistic-tracking_category-item-${P}${p.id}`,class:"statistic__tracking"},[S(a(v),K({amount:p.number,"help-text":p[_.progressTitleKey],percent:p.value},{ref_for:!0},e.statistic.progressProps,{class:"statistic__tracking-item"}),null,16,["amount","help-text","percent"])]))),128))],64)):y("",!0)],64))),256)):y("",!0),(s(!0),d(f,null,D(a(u).additionalData,(r,h)=>(s(),g(a(v),K({key:`statistic_additional-category-item-${h}${r.id}`,amount:r.number,"help-text":r[_.progressTitleKey],percent:r.value},{ref_for:!0},e.statistic.progressProps,{class:"statistic__item"}),null,16,["amount","help-text","percent"]))),128)),a(u).other?(s(),g(a(v),K({key:1,amount:a(u).other?.number,percent:a(u).other?.value,"help-text":a(u).other[_.progressTitleKey]},e.statistic.progressProps,{class:"statistic__other-item"}),null,16,["amount","percent","help-text"])):y("",!0),a(C)("footer-right")||a(C)("footer-left")?(s(),g(H,{key:2,class:"statistic__footer"},{left:m(()=>[x(t.$slots,"footer-left")]),right:m(()=>[x(t.$slots,"footer-right")]),_:3})):y("",!0)],64)):(s(),g(a(O),{key:1,ellipsis:!1,"text-align":"center",color:"gray",class:"empty-title"},{default:m(()=>[B(A(a(N)("others.no_data_need_time")),1)]),_:1}))]),_:3})]))}};export{pt 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.