1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[743],{40743:(e,l,s)=>{s.r(l),s.d(l,{default:()=>v});var r=s(37876),t=s(49700),a=s(48230),n=s.n(a),c=s(54587),i=s.n(c),o=s(1515),u=s(20621),d=s(25905),x=s(71134),m=s(4186),f=s(14232),h=s(75656),p=s(92306),j=s(44857),g=s(60577);function v(e){let{config:l}=(0,g.r)(),s=e.item;({...e});let[a,c]=(0,f.useState)(!0),v=(0,f.useRef)(null),N=(0,t.A)(v),b=s?.waveform_url,{data:w,error:y}=(0,h.Ay)(b,(0,p.we)());(0,f.useEffect)(()=>{w&&N.setWaveform(w.data)},[w]);let _=l.publicUrl;return(0,f.useEffect)(()=>{console.log("IS PLAYING CHANGED",N.isPlaying),c(N.isPlaying)},[N.isPlaying]),(0,r.jsx)("div",{className:"bg-black h-screen",children:(0,r.jsxs)("div",{className:"flex flex-row bg-neutral-800",children:[(0,r.jsx)("div",{className:"w-[120px] h-[120px]",children:(0,r.jsx)("a",{href:_+s.url,children:(0,r.jsx)(i(),{className:"max-w-none",height:120,width:120,alt:`Artwork for ${s.title}`,src:s.image_display_url,unoptimized:!0})})}),(0,r.jsxs)("div",{className:"pl-2 flex-grow truncate text-ellipsis flex flex-col justify-end border-2 border-neutral-900",children:[(0,r.jsxs)("div",{className:"pl-1 flex flex-row truncate",children:[(0,r.jsxs)("div",{className:"flex-grow flex flex-col justify-end pb-2 truncate",children:[(0,r.jsxs)("div",{className:"w-full truncate text-ellipsis text-sm",children:[s.url?(0,r.jsx)("a",{href:_+s.url,className:"text-neutral-200 font-bold",children:s._full_title}):(0,r.jsx)("span",{children:s._full_title}),(0,r.jsx)("span",{className:"ml-2 text-neutral-400"})]}),(0,r.jsx)("div",{className:" flex flex-row gap-4 text-sm",children:(0,r.jsxs)("div",{className:"text-xs font-semibold text-neutral-400 truncate",children:[s.label_json?(0,r.jsx)(o.A,{baseUrl:_,useAnchor:!0,className:"mr-1 inline uppercase font-bold text-neutral-400 active:text-neutral-800",labels:s.label_json}):"",(0,r.jsx)(u.A,{baseUrl:_,useAnchor:!0,className:"inline text-neutral-400",item:s})]})}),(0,r.jsxs)("div",{className:"text-xxs font-semibold text-neutral-400 truncate",children:[(0,r.jsx)(n(),{href:`/genre/${s.genre}`,prefetch:!1,className:"text-neutral-400",children:(0,j.yu)(s.genre)?.label}),s._bpm?(0,r.jsx)(d.y,{className:"ml-1 text-neutral-400 ",bpm:s._bpm}):"",s._scale?(0,r.jsx)("span",{className:"ml-2 text-neutral-400",children:s._scale}):""]})]}),(0,r.jsx)("div",{className:"-mt-1 px-2 ",children:(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{children:(0,r.jsx)("a",{target:"_blank",href:_,children:(0,r.jsx)("img",{alt:"Visit Artcore",className:"inline w-[24px] h-[22px]",src:"/imgs/artcore-logo-ai-orange-grad-a-01.svg"})})}),(0,r.jsx)("div",{className:"mt-2 text-xs ",children:(0,r.jsx)("a",{href:_+s.url,children:"Buy"})})]})})]}),(0,r.jsxs)("div",{className:"pb-2 w-full border-neutral-700 flex flex-row relative",children:[(0,r.jsx)("div",{className:" pr-2 text-4xl text-neutral-200 ",children:a?(0,r.jsx)("div",{onClick:e=>{N.pauseTrack()},children:(0,r.jsx)(m.u3P,{className:"hover:text-neutral-200 cursor-pointer"})}):(0,r.jsxs)("div",{onClick:e=>{N.playTrack(s)},children:[" ",(0,r.jsx)(m._xj,{className:"hover:text-neutral-200 cursor-pointer"})," "]})}),(0,r.jsx)("div",{className:"flex-grow h-8 relative",children:(0,r.jsx)("div",{className:"w-full",ref:v})}),(0,r.jsx)("div",{className:"mx-1 mt-2 font-semibold text-xxs ",children:(0,r.jsxs)("div",{className:" text-neutral-400",children:[N?.formattedCurrentTime," / ",(0,x.Ye)(s.duration_seconds)]})})]})]})]})})}},49700:(e,l,s)=>{s.d(l,{A:()=>f});var r=s(37876),t=s(42135),a=s(14232),n=s(57186),c=s(45947),i=s.n(c),o=s(10841),u=s.n(o),d=s(45880),x=s(30946);let m=(0,n.A)();function f(e,l={}){let[s,n]=(0,t.Mj)("playingTab",void 0),[c,o]=(0,t.Mj)("lastPlayingTrack",void 0),[h,p]=(0,a.useState)(void 0),[j,g]=(0,a.useState)(!1),[v,N]=(0,a.useState)(0),b=u().duration(v||0,"seconds"),w=v?v>3600?b.format("hh:mm:ss",{trim:!1}):b.format("mm:ss",{trim:!1}):"--:--",y=(0,a.useRef)(null),_=(0,a.useRef)(l.onFinish);function k(e){console.log("SetPlayingTrack",e),p(e),o(e)}return _.current=l.onFinish,(0,a.useEffect)(()=>{y.current||(console.log("--------------------- LISTEN CREATING WAVESURFER.."),y.current=i().create({container:e.current,backend:"MediaElement",fillParent:!0,hideScrollbar:!0,height:34,waveColor:"rgba(60, 60, 60, 1)",progressColor:d.tD,normalize:!0}),y.current.on("play",()=>{g(!0)}),y.current.on("pause",()=>{console.log("LISTEN WaveSurfer paused"),g(!1)}),y.current.on("audioprocess",e=>{let l=y.current?.getCurrentTime();l&&N(l)}),y.current.on("finish",()=>{console.log("LISTEN - track finish"),_.current?.()}))},[]),(0,a.useEffect)(()=>{console.log("wavesurferRef.current?.isPlaying() Changes",y.current?.isPlaying())},[y.current?.isPlaying()]),{stopOtherTabsAndPlay:function(e){console.log("stopOtherTabsAndPlay"),n(m),console.log("SETTING LOCAL TRACK",e?.id),k(e)},setPlayingTrack:k,playingTrack:h,playingTab:s,component:(0,r.jsx)("div",{id:"waveform"}),playTrack:function(e){console.log("playTrack",e,e.mp3_url),y.current.load(e.mp3_url),y.current.play(),e?.id&&(0,x.Lh)(e.id.toString(),e.seller_slug)},pauseTrack:function(){y.current.pause()},isPlaying:j,setWaveform:function(e){y.current&&(y.current.backend.peaks=e,y.current.drawBuffer())},currentTime:v,formattedCurrentTime:w}}}}]);
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.