1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4172,7029,9410],{94456:(e,t,i)=>{i.d(t,{L:()=>o});var r=i(12115),a=i(50824);let n={track:"likedSongs",album:"albums",playlist:"playlists",artist:"artists",genre:"genres",market:"markets",radio:"radioStations"},l=/^[A-Za-z0-9_-]{11}$/;function s(e){return"string"!=typeof e?"":e.trim().toLowerCase()}function o(e,t){let{isLoggedIn:o}=(0,a.v)(),[d,c]=(0,r.useState)(!1),u=(0,r.useMemo)(()=>e?n[e.type]:null,[e]),m=t?.matchHint?.artist,b=t?.matchHint?.title,y=(0,r.useMemo)(()=>{let e="string"==typeof m?m:"",t="string"==typeof b?b:"";return e&&t?{artist:e,title:t}:null},[m,b]),f=(0,r.useCallback)(async()=>{if(!e||!u||!o)return void c(!1);try{let{clientLibraryManager:t}=await Promise.all([i.e(583),i.e(3436)]).then(i.bind(i,87620)),r="radio"===e.type?"playlist":e.type;if("track"===e.type&&null!==y&&!l.test(e.id)){let i=await t.getLibrarySection(u),r=!!Array.isArray(i)&&i.some(t=>t.id===e.id||function(e,t){if("track"!==e.type)return!1;let i=s(e.title),r=s(e.artist),a=s(t.title),n=s(t.artist);return!!i&&!!r&&!!a&&!!n&&i===a&&r===n}(t,y));c(r);return}let a=await t.isInLibrary(e.id,r,u);c(a)}catch{c(!1)}},[o,e,u,y]);return(0,r.useEffect)(()=>{let e=!1,t=null,i=null,r=()=>{e||f()};return"requestIdleCallback"in window?i=window.requestIdleCallback(r,{timeout:1500}):t=setTimeout(r,250),()=>{e=!0,t&&clearTimeout(t),null!==i&&"cancelIdleCallback"in window&&window.cancelIdleCallback(i)}},[f]),(0,r.useEffect)(()=>{if(!e||!u)return;let t=t=>{let i=t.detail,r="radio"===e.type&&"radioStations"===u&&(i.item?.type==="radio"||i.item?.type==="playlist");if(i?.section===u&&i.item?.id===e.id&&(i.item?.type===e.type||r))return void c(!0);i?.section===u&&f()},i=t=>{let i=t.detail,r="radio"===e.type&&"radioStations"===u&&("radio"===i.itemType||"playlist"===i.itemType);if(i?.section===u&&i.itemId===e.id&&(i.itemType===e.type||r))return void c(!1);i?.section===u&&f()};return window.addEventListener("frogtoon:addToLibrary:success",t),window.addEventListener("frogtoon:addToLibrary:localOnly",t),window.addEventListener("frogtoon:removeFromLibrary:success",i),()=>{window.removeEventListener("frogtoon:addToLibrary:success",t),window.removeEventListener("frogtoon:addToLibrary:localOnly",t),window.removeEventListener("frogtoon:removeFromLibrary:success",i)}},[e,u,f]),{isSaved:d,primarySection:u,refreshSavedState:f}}},96259:(e,t,i)=>{i.d(t,{A:()=>n});var r=i(95155),a=i(12115);function n({isOpen:e,initialValue:t,label:i="Name",title:n,confirmLabel:l="Save",cancelLabel:s="Cancel",savingLabel:o="Saving...",placeholder:d="Give it a clear name",isSubmitting:c=!1,onClose:u,onSubmit:m}){let[b,y]=(0,a.useState)(t),[f,p]=(0,a.useState)(0);if((0,a.useEffect)(()=>{e&&y(t)},[t,e]),(0,a.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"!==e.key||c||u()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,c,u]),(0,a.useEffect)(()=>{if(!e)return;let t=window.visualViewport;if(!t)return;let i=()=>{p(Math.max(0,window.innerHeight-t.height-t.offsetTop))};return i(),t.addEventListener("resize",i),t.addEventListener("scroll",i),()=>{t.removeEventListener("resize",i),t.removeEventListener("scroll",i),p(0)}},[e]),!e)return null;let w=b.trim();return(0,r.jsx)("div",{className:"fixed inset-0 z-[2147483647] flex items-end justify-center bg-black/70 p-4 pb-[max(1rem,env(safe-area-inset-bottom))] backdrop-blur-sm sm:items-center","data-library-edit-dialog":"",role:"dialog","aria-modal":"true","aria-labelledby":"library-edit-dialog-title",style:f?{paddingBottom:f+16}:void 0,children:(0,r.jsxs)("div",{className:"flex min-h-[22rem] w-full max-w-md flex-col rounded-t-3xl border border-white/10 bg-gray-950 shadow-2xl sm:rounded-2xl",children:[(0,r.jsx)("div",{className:"border-b border-white/10 px-5 py-4",children:(0,r.jsx)("h3",{id:"library-edit-dialog-title",className:"text-lg font-semibold text-white",children:n})}),(0,r.jsxs)("form",{className:"flex flex-1 flex-col justify-between space-y-6 px-5 py-6",onSubmit:async e=>{e.preventDefault(),w&&!c&&await m(w)},children:[(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"mb-2 block text-sm font-medium text-gray-300",children:i}),(0,r.jsx)("input",{autoFocus:!0,value:b,onChange:e=>y(e.target.value),className:"w-full rounded-xl border border-white/10 bg-black px-4 py-3 text-white outline-none transition focus:border-green-500",placeholder:d})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-3",children:[(0,r.jsx)("button",{type:"button",onClick:u,disabled:c,
1className:"rounded-xl border border-white/10 px-4 py-2 text-sm text-gray-300 transition hover:bg-white/5 disabled:opacity-50",children:s}),(0,r.jsx)("button",{type:"submit",disabled:!w||c,className:"rounded-xl bg-green-500 px-4 py-2 text-sm font-semibold text-white transition hover:bg-green-400 disabled:cursor-not-allowed disabled:opacity-50",children:c?o:l})]})]})]})})}}}]);
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.