PageSourceSearch

https://www.tracklib.com/assets/index-YRW4HPIm.js

js tracklib.com collected 2026-10-02 06:50:52 UTC 7,126 bytes, 1 lines download raw bytes

1import{j as e}from"./react-CaZ3b-uf.js";import{L as m}from"./tanstack-router-DdV6ARKN.js";import{aD as x,M as u,K as v,a7 as h,cZ as N,bI as R,L as f,au as c,b_ as w,bh as I,W as k}from"./tanstack-start-BzM2Ciq7.js";import{L as S}from"./shell--root-CfSXB45t.js";import{l as y,m as L,j as P}from"./revenue-Bqp3RZdy.js";import"./tanstack-CzaH6mfd.js";import"./radix-accordion-B9Cw5kfI.js";import"./radix-dialog-CRaAAOVD.js";import"./radix-menu-D_9sKf4A.js";import"./radix-select-Cz5S0Opm.js";import"./radix-navigation-menu-DkxGYPh1.js";import"./sonner-D-uFVvD1.js";import"./lucide-CqZJRsZM.js";import"./tanstack-query-CWWMDizP.js";import"./ui-utils-Bj2vDxdV.js";import"./unpic-CfMFyugp.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"[email protected]"};var s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="996c1a83-ef3a-4cd8-92ad-57162b0b6c21",t._sentryDebugIdIdentifier="sentry-dbid-996c1a83-ef3a-4cd8-92ad-57162b0b6c21")}catch{}})();const T=(t,s)=>t===0?"You have no songs that need reporting right now":`You have ${t} ${t===1?"song":"songs"} that you need to report revenue before the end of the day ${s}`,_=(t,s)=>s===0?"No songs have reached the minimum payment threshold. You don't need to pay right now":t>0?"You cannot pay until all songs that need reporting have been reported":"You have unpaid revenue",B=()=>{const{status:t,reportCount:s,needsPayment:n,dueNextPayment:a}=y(),r=L();if(!t)return null;const o=s>0,i=n.length>0,l=!i||o,b=[{success:!o,message:T(s,r)},{success:!i,message:_(s,n.length)}],j=S(a,t.unpaid_revenue_currency);return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 rounded-md bg-card p-6","data-testid":"revenue-reporting-status",children:[e.jsx("ul",{className:"flex flex-col gap-2",children:b.map(({success:p,message:g})=>e.jsxs("li",{className:"flex items-center gap-2 text-body-sm text-foreground",children:[e.jsx(x,{className:p?"text-success":"text-destructive",name:p?"check":"cancel",size:20}),g]},g))}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-body-sm text-muted-foreground",children:"Needs payment"}),e.jsx("span",{className:"font-bold text-foreground",children:j})]}),e.jsx(m,{"aria-disabled":l,className:v("inline-flex h-9 cursor-pointer items-center justify-center rounded-md bg-primary px-4 font-bold text-body-sm text-primary-foreground transition-colors hover:bg-primary/90",l&&"pointer-events-none opacity-50"),"data-testid":"pay-revenue-button",tabIndex:l?-1:void 0,to:u({name:"license-revenue-pay",orderId:"latest"}),children:"Pay Revenue"})]})]})},D=t=>t.samples[0]?.song.artists.map(s=>s.name).join(", "),Y=({bucketTestId:t,showReport0:s,userSong:n})=>{const a=h(),r=P(n.id),o=n.samples[0],i=D(n);return e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md bg-card p-4","data-testid":t,children:[e.jsxs(m,{className:"flex min-w-0 flex-1 items-center gap-3",to:u({name:"license-detail",userSongId:n.id}),children:[o&&e.jsx(N,{song:o.song}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[e.jsx("h3",{className:"truncate font-bold text-body-md text-foreground",children:n.song_title||"Untitled"}),o&&e.jsxs("p",{className:"truncate text-body-sm text-muted-foreground",children:["Samples"," ",e.jsx("span",{className:"text-foreground",children:o.song.title}),i&&` by ${i}`]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s?e.jsx(R,{color:"secondary","data-testid":"button-report-0-income",isLoading:r.isPending,onClick:()=>r.mutate(),size:"sm",type:"button",children:"Report 0 income"}):null,e.jsx(f,{color:"primary","data-testid":"button-report-revenue",onClick:()=>a("report-revenue",{userSongId:n.id}),size:"sm",type:"button",children:"Report Revenue"})]})]})},d=({bucketTestId:t,description:s,heading:n,showReport0:a,userSongs:r})=>r.length===0?null:e.jsxs("section",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"font-bold text-body-lg text-foreground",children:n}),e.jsx("span",{className:"flex size-6 items-center justify-center rounded-full bg-neutral-800 text-body-sm text-muted-foreground",children:r.length})]}),e.jsx("p",{className:"text-body-sm text-muted-foreground",children:s})]}),e.jsx("ul",{className:"flex flex-col gap-2",children:r.map(o=>e.jsx(Y,{bucketTestId:t,showReport0:a,userSong:o},o.id))})]}),z=()=>{const t=y(),s=h();return t.isPending?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(c,{className:"h-24 w-full rounded-md"}),e.jsx(c,{className:"h-20 w-full rounded-md"}),e.jsx(c,{className:"h-20 w-full rounded-md"})]}):e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsx(B,{}),e.jsx(d,{bucketTestId:"song-in-breach",description:"These songs are in breach of the license agreement and must be reported and paid for immediately.",heading:"In breach of license",showReport0:!0,userSongs:t.inBreach}),e.jsx(d,{bucketTestId:"song-needs-reporting",description:"Report for these songs before the end of the peri
1od to avoid being in breach of the sample license agreement.",heading:"Songs you need to report for this period",showReport0:!0,userSongs:t.needsReporting}),e.jsx(d,{bucketTestId:"song-dont-need-reporting",description:"You don't need to report these right now, but you can — report 0 income to get all your songs on the same schedule.",heading:"Songs you don't need to report for this period",showReport0:!1,userSongs:t.dontNeed}),e.jsx(d,{bucketTestId:"song-automatic-reporting",description:"These songs have automatic payment splits through a preferred distributor. Only report additional revenue earned outside digital streaming.",heading:"Songs with automatic payment splits",showReport0:!1,userSongs:t.automatic}),t.inBreach.length===0&&t.needsReporting.length===0&&t.dontNeed.length===0&&t.automatic.length===0?e.jsx(w,{action:e.jsxs(f,{className:"cursor-pointer",color:"accent",onClick:()=>s("create-license"),children:[e.jsx(x,{name:"add",size:20}),"License a sample"]}),description:"Once you license a sample, its songs show up here so you can report the revenue they earn.",icon:e.jsx(I,{className:"size-10 text-muted-foreground"}),title:"You don't have any active licenses to report revenue for yet"}):null]})},V=()=>e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-6",children:[e.jsxs(m,{className:"flex items-center gap-2 text-body-sm text-muted-foreground transition-opacity hover:opacity-80",to:u({name:"licenses"}),children:[e.jsx(k,{className:"size-5"}),"Back to licenses"]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h1",{className:"text-foreground text-heading-md",children:"Revenue reporting"}),e.jsx("p",{className:"text-body-sm text-muted-foreground",children:"Report revenue for your songs and pay royalties to the original rightsholders."})]}),e.jsx(z,{})]});export{V as component};

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.