PageSourceSearch

https://app.dibsteur.com/_app/immutable/chunks/streams-export.c8459441.js

js dibsteur.com collected 2026-09-24 11:58:50 UTC 2,028 bytes, 3 lines download raw bytes

1function l(n,e,r){return!e?.items||!r?.items?null:{...n,items:[...Object.values(e.items).map(t=>({...t,type:"stream"})),...Object.values(r.items).map(t=>({distributorId:t.distributorId,distributorName:t.distributorName,eventDate:t.eventDate,type:"vue",streamsCount:t.viewsCount??0,downloadsCount:0}))]}}function c(n){let e=String(n);return typeof n=="string"&&/^[\s]*[=+@-]|^[\t\r\n]/.test(e)&&(e="'"+e),/[;"\r\n]/.test(e)?`"${e.replaceAll('"','""')}"`:e}function d(n){const e=["artiste;projet;mois;plateforme;type;streams;telechargements"];for(const r of Object.values(n.items)){const t=r.eventDate.match(/^\d{4}-\d{2}-\d{2}(?=T|$)/)?.[0];if(!t||Number.isNaN(Date.parse(r.eventDate)))throw new Error("Invalid export date");const[o,s,i]=t.split("-").map(Number),a=new Date(`${t}T00:00:00Z`);if(a.getUTCFullYear()!==o||a.getUTCMonth()+1!==s||a.getUTCDate()!==i)throw new Error("Invalid export date");e.push([n.artist,n.project,t,r.distributorName,r.type??"stream",r.streamsCount??0,r.type==="vue"?0:r.downloadsCount??0].map(c).join(";"))}return"\uFEFF"+e.join(`\r
2`)+`\r
3`}async function m(n,e,r){if(!e)throw new Error("An artist is required");const t=await n.get("/streamingstats/export/streams",{params:{q:JSON.stringify({owner:e})},signal:r,timeout:10*60*1e3,headers:{Accept:"text/csv"},responseType:"blob",SKIP_ERROR:!0,handleNetworkErrorLocally:!0});if(t.status!==200||!/^text\/csv\b/i.test(String(t.headers["content-type"])))throw new Error("Invalid CSV response");const o=String(t.headers["content-disposition"]??"");let s=`streams-${new Date().toISOString().slice(0,10)}.csv`;const i=o.match(/filename\*=UTF-8''([^;]+)/i)?.[1],a=o.match(/filename="([^"]+)"|filename=([^;]+)/i);try{s=(i?decodeURIComponent(i):a?.[1]??a?.[2])?.trim()||s}catch{}return{blob:t.data,filename:s.replace(/[\\/\r\n]/g,"_")}}function u(n,e){const r=URL.createObjectURL(n),t=document.createElement("a");try{t.href=r,t.download=e,document.body.appendChild(t),t.click()}finally{t.remove(),URL.revokeObjectURL(r)}}export{l as a,d as b,u as d,m as f};

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.