PageSourceSearch

https://link2get.app/build/assets/AnalyticsTable-7_5Ap88X.js

js link2get.app collected 2026-10-02 00:43:19 UTC 8,282 bytes, 1 lines download raw bytes

1import{d as c}from"./dayjs.min-BI5_qgXS.js";import{u as A}from"./utc-BEw8Gp6c.js";import{t as S}from"./timezone-CrwMvqT6.js";import{r as g,e as k,m as V,w as j,a as l,o,b as e,h,d as _,F as N,k as P,t as v}from"./app-DIjeDpmy.js";const z={class:"w-full overflow-hidden rounded-b-lg"},E={class:"overflow-x-auto"},G={class:"w-full table-fixed border-collapse"},I={class:"sticky top-0 z-10 bg-white border-b border-border-1"},K={class:"flex items-center gap-2"},R={key:0},T={key:0,class:"w-3 h-3 rotate-180",viewBox:"0 0 12 13"},U={key:1,class:"w-3 h-3",viewBox:"0 0 12 13"},q={class:"flex items-center gap-2"},J={key:0},Q={key:0,class:"w-3 h-3 rotate-180",viewBox:"0 0 12 13"},W={key:1,class:"w-3 h-3",viewBox:"0 0 12 13"},X={class:"flex items-center gap-2"},tt={key:0},et={key:0,class:"w-3 h-3 rotate-180",viewBox:"0 0 12 13"},st={key:1,class:"w-3 h-3",viewBox:"0 0 12 13"},lt={class:"flex items-center gap-2"},ot={key:0},at={key:0,class:"w-3 h-3 rotate-180",viewBox:"0 0 12 13"},rt={key:1,class:"w-3 h-3",viewBox:"0 0 12 13"},nt={class:"flex items-center gap-2"},it={key:0},dt={key:0,class:"w-3 h-3 rotate-180",viewBox:"0 0 12 13"},ut={key:1,class:"w-3 h-3",viewBox:"0 0 12 13"},pt={class:"flex justify-end items-center gap-2"},vt={key:0},ft={key:0,class:"w-3 h-3 rotate-180",viewBox:"0 0 12 13"},ct={key:1,class:"w-3 h-3",viewBox:"0 0 12 13"},yt={class:"px-4 py-1.5"},wt={class:"px-4 text-right"},gt={class:"flex justify-end items-center gap-8 my-2 mx-3"},kt={class:"font-bold text-base text-gray-600"},ht={class:"flex gap-7"},bt=["disabled"],xt=["disabled"],mt={key:0,class:"p-4 text-center text-gray-500"},Bt={__name:"AnalyticsTable",props:{data:Object,link:Object,startDateFilter:Date,endDateFilter:Date,groupBy:{type:String,default:"day"},selectedFilter:String},setup(Y){c.extend(A),c.extend(S),c.tz.guess();const a=Y,n=g("date"),i=g(!0),y=g([]);g([]);const M=g(!1),w=g(1),D=g(20),L=k(()=>{var r;return((r=y.value)==null?void 0:r.length)||0}),C=k(()=>Math.ceil(L.value/D.value)||1),H=k(()=>L.value===0?0:(w.value-1)*D.value+1),O=k(()=>Math.min(w.value*D.value,L.value)),Z=k(()=>{if(!Array.isArray(y.value))return[];const r=(w.value-1)*D.value,t=r+D.value;return y.value.slice(r,t)});function B(r){const t={};if(!r||!Array.isArray(r))return[];let s,d;a.selectedFilter==="last24"?(d=c(a.endDateFilter),s=d.subtract(23,"hour")):(s=c(a.startDateFilter).startOf("day"),d=c(a.endDateFilter).endOf("day"));for(const f of r){const m=c.utc(f.created_at).local();let p;a.groupBy==="hour"?p=m.startOf("hour").format("YYYY-MM-DD HH:00"):p=m.startOf("day").format("YYYY-MM-DD"),t[p]||(t[p]={key:a.groupBy==="hour"?m.startOf("hour").toDate():m.startOf("day").toDate(),date:a.groupBy==="hour"?m.startOf("hour").toDate():m.startOf("day").toDate(),click:0,android:0,apple:0,web:0,huawei:0}),t[p].click+=1,t[p].android+=f.redirect_type==="android"?1:0,t[p].apple+=f.redirect_type==="apple"?1:0,t[p].web+=f.redirect_type==="web"?1:0,t[p].huawei+=f.redirect_type==="huawei"?1:0}const x=[];let u=s.clone();for(;u.isBefore(d)||u.isSame(d);){const f=a.groupBy==="hour"?u.format("YYYY-MM-DD HH:00"):u.format("YYYY-MM-DD");t[f]?x.push(t[f]):x.push({key:a.groupBy==="hour"?u.startOf("hour").toDate():u.startOf("day").toDate(),date:a.groupBy==="hour"?u.startOf("hour").toDate():u.startOf("day").toDate(),click:0,android:0,apple:0,web:0,huawei:0}),u=u.add(1,a.groupBy)}return x}const F=k(()=>(M.value=y.value===0,M.value));k(()=>{const r=[...y.value];return r.sort((t,s)=>{const d=t[n.value],x=s[n.value];return i.value?d>x?1:-1:d<x?1:-1}),r});function b(r){n.value===r?i.value=!i.value:(n.value=r,i.value=!0)}const $=r=>{if(!r)return"-";const t=c.utc(r).local();if(!t.isValid())return"-";let s=t.format("MMMM DD, YYYY");return a.groupBy==="hour"&&(s=t.format("MMMM DD, YYYY HH:mm")),`${s}`};return V(()=>{y.value=B(a.data)}),j(()=>a.data,()=>{y.value=B(a.data)}),(r,t)=>(o(),l("div",z,[e("div",E,[e("table",G,[e("thead",I,[e("tr",null,[e("th",{class:"w-[140px] px-4 py-2 text-left cursor-pointer select-none",onClick:t[0]||(t[0]=s=>b("date"))},[e("div",K,[t[10]||(t[10]=_(" Date ")),n.value==="date"?(o(),l("span",R,[i.value?(o(),l("svg",T,t[8]||(t[8]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)]))):(o(),l("svg",U,t[9]||(t[9]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)])))])):h("",!0)])]),e("th",{class:"w-[110px] py-2 text-left cursor-pointer select-none",onClick:t[1]||(t[1]=s=>b("apple"))},[e("div",q,[t[13]||(t[13]=_(" App Store ")),n.value==="apple"?(o(),l("span",J,[i.value?(o(),l("svg",Q,t[11]||(t[11]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)]))):(o(),l("svg",W,t[12]||(t[12]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)])))])):h("",!0)])]),e("th",{class:"w-[110px] py-2 text-left cursor-pointer select-none",onClick:t[2]||(t[2]=s=>b("android"))},[e("div",X,[t[16]||(t[16]=_(" Google Play ")),n.value==="android"?(o(),l("span",tt,[i.value?(o(),l("svg",et,t[14]||(t[14]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)]))):(o(),l("svg",st,t[15]||(t[15]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)])))])):h("",!0)])]),e("th",{class:"w-[110px] py-2 text-left cursor-pointer select-none",onClick:t[3]||(t[3]=s=>b("huawei"))},[e("div",lt,[t[19]||(t[19]=_(" AppGallery ")),n.value==="huawei"?(o(),l("span",ot,[i.value?(o(),l("svg",at,t[17]||(t[17]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)]))):(o(),l("svg",rt,t[18]||(t[18]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)])))])):h("",!0)])]),e("th",{class:"w-[140px] py-2 text-left cursor-pointer select-none",onClick:t[4]||(t[4]=s=>b("web"))},[e("div",nt,[t[22]||(t[22]=_(" Fallback URL ")),n.value==="web"?(o(),l("span",it,[i.value?(o(),l("svg",dt,t[20]||(t[20]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)]))):(o(),l("svg",ut,t[21]||(t[21]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)])))])):h("",!0)])]),e("th",{class:"w-[120px] px-4 py-2 text-right cursor-pointer select-none",onClick:t[5]||(t[5]=s=>b("click"))},[e("div",pt,[t[25]||(t[25]=_(" Combined Clicks ")),n.value==="click"?(o(),l("span",vt,[i.value?(o(),l("svg",ft,t[23]||(t[23]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)]))):(o(),l("svg",ct,t[24]||(t[24]=[e("path",{d:"M10 4.76758H2L6 8.76758L10 4.76758Z",fill:"black"},null,-1)])))])):h("",!0)])])])]),e("tbody",null,[(o(!0),l(N,null,P(Z.value,(s,d)=>(o(),l("tr",{key:d,class:"border-b border-border-1"},[e("td",yt,v($(s.key)),1),e("td",null,v(a.link.string_apple_app_id?s.apple:"-"),1),e("td",null,v(a.link.string_android_app_id?s.android:"-"),1),e("td",null,v(a.link.string_huawei_app_id?s.huawei:"-"),1),e("td",null,v(a.link.web_link?s.web:"-"),1),e("td",wt,v(s.click),1)]))),128))])]),e("div",gt,[e("div",kt,v(H.value)+"–"+v(O.value)+" of "+v(L.value),1),e("div",ht,[e("button",{onClick:t[6]||(t[6]=s=>w.value--),disabled:w.value===1,class:"rotate-180 disabled:opacity-30"},t[26]||(t[26]=[e("svg",{width:"18",height:"18",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.11611 4.11623C9.60427 3.62808 10.3957 3.62808 10.8839 4.11623L20.8839 14.1162C21.372 14.6044 21.372 15.3959 20.8839 15.884L10.8839 25.884C10.3957 26.3721 9.60427 26.3721 9.11611 25.884C8.62796 25.3959 8.62796 24.6044 9.11611 24.1162L18.2323 15.0001L9.11611 5.88401C8.62796 5.39585 8.62796 4.6044 9.11611 4.11623Z",fill:"#4B5563"})],-1)]),8,bt),e("button",{onClick:t[7]||(t[7]=s=>w.value++),disabled:w.value===C.value,class:"disabled:opacity-30"},t[27]||(t[27]=[e("svg",{width:"18",height:"18",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.11611 4.11623C9.60427 3.62808 10.3957 3.62808 10.8839 4.11623L20.8839 14.1162C21.372 14.6044 21.372 15.3959 20.8839 15.884L10.8839 25.884C10.3957 26.3721 9.60427 26.3721 9.11611 25.884C8.62796 25.3959 8.62796 24.6044 9.11611 24.1162L18.2323 15.0001L9.11611 5.88401C8.62796 5.39585 8.62796 4.6044 9.11611 4.11623Z",fill:"#4B5563"})],-1)]),8,xt)])]),F.value?(o(),l("div",mt,"No data available")):h("",!0)])]))}};export{Bt 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.